gnu: Python@2: Update to 2.7.16.
[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>
47f66348 29;;; Copyright © 2016, 2017, 2018, 2019 Marius Bakke <mbakke@fastmail.com>
44d10b1f
RW
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")
b3ca2b45 617 (version "40.8.0")
44d10b1f
RW
618 (source
619 (origin
620 (method url-fetch)
621 (uri (pypi-uri "setuptools" version ".zip"))
622 (sha256
623 (base32
b3ca2b45 624 "0k9hifpgahnw2a26w3cr346iy733k6d3nwh3f7g9m13y6f8fqkkf"))
44d10b1f
RW
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")
8dd1fce6 1529 (version "1.7.0")
44d10b1f
RW
1530 (source
1531 (origin
1532 (method url-fetch)
1533 (uri (pypi-uri "py" version))
1534 (sha256
1535 (base32
8dd1fce6 1536 "152nyjvd8phqbm9pwlnfx0xi4c6343hakjzg42sp4qw3k1qn74mz"))))
44d10b1f
RW
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")
298d878d 2634 (version "0.23.2")
be4d840c
BG
2635 (source
2636 (origin
2637 (method url-fetch)
2638 (uri (pypi-uri "python-language-server" version))
2639 (sha256
2640 (base32
298d878d 2641 "1h83x5widj9p630ha9yv39cpp3djxppll3iww9nc8i3hdmyrbnnh"))))
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)
3540 ("python-mock" ,python-mock)
3541 ("graphviz" ,graphviz)
3542 ("texlive" ,texlive)
3543 ("texinfo" ,texinfo)
3544 ,@(package-native-inputs python-matplotlib)))
3545 (arguments
3546 `(#:tests? #f ; we're only generating documentation
3547 #:phases
3548 (modify-phases %standard-phases
3549 (replace 'build
3550 (lambda _
3551 (chdir "doc")
3552 ;; Produce pdf in 'A4' format.
3553 (substitute* "conf.py"
3554 (("latex_paper_size = 'letter'") "")
3555 ;; latex_paper_size is deprecated -> set paper size using
3556 ;; latex_elements
3557 (("latex_elements\\['pointsize'\\] = '11pt'" match)
3558 ;; insert at a point where latex_elements{} is defined:
3559 (string-append match "\nlatex_elements['papersize'] = 'a4paper'")))
3560 (invoke "make" "SPHINXBUILD=sphinx-build" "html" "latex" "texinfo")))
3561 (replace 'install
3562 (lambda* (#:key inputs outputs #:allow-other-keys)
3563 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3564 (doc (string-append data "/doc/python-matplotlib-" ,version))
3565 (info (string-append data "/info"))
3566 (html (string-append doc "/html")))
3567 (mkdir-p html)
3568 (mkdir-p info)
3569 (copy-recursively "build/html" html)
3570 (symlink (string-append html "/_images")
3571 (string-append info "/matplotlib-figures"))
3572 (with-directory-excursion "build/texinfo"
3573 (substitute* "matplotlib.texi"
3574 (("@image\\{([^,]*)" all file)
3575 (string-append "@image{matplotlib-figures/" file)))
3576 (symlink (string-append html "/_images")
3577 "./matplotlib-figures")
3578 (system* "makeinfo" "--no-split"
3579 "-o" "matplotlib.info" "matplotlib.texi"))
3580 (copy-file "build/texinfo/matplotlib.info"
3581 (string-append info "/matplotlib.info"))
3582 (copy-file "build/latex/Matplotlib.pdf"
3583 (string-append doc "/Matplotlib.pdf")))
3584 #t)))))
3585 (home-page (package-home-page python-matplotlib))
3586 (synopsis "Documentation for the python-matplotlib package")
3587 (description (package-description python-matplotlib))
3588 (license (package-license python-matplotlib))))
3589
3590(define-public python2-matplotlib-documentation
3591 (package-with-python2 python-matplotlib-documentation))
3592
3593(define-public python2-pysnptools
3594 (package
3595 (name "python2-pysnptools")
5d1ade85 3596 (version "0.3.13")
44d10b1f
RW
3597 (source
3598 (origin
3599 (method url-fetch)
5d1ade85 3600 (uri (pypi-uri "pysnptools" version))
44d10b1f
RW
3601 (sha256
3602 (base32
5d1ade85 3603 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
44d10b1f
RW
3604 (build-system python-build-system)
3605 (arguments
5d1ade85
RW
3606 `(#:python ,python-2 ; only Python 2.7 is supported
3607 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
44d10b1f
RW
3608 (propagated-inputs
3609 `(("python2-numpy" ,python2-numpy)
3610 ("python2-scipy" ,python2-scipy)
3611 ("python2-pandas" ,python2-pandas)))
44d10b1f 3612 (native-inputs
5d1ade85 3613 `(("python2-cython" ,python2-cython)))
1b66989b 3614 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
44d10b1f
RW
3615 (synopsis "Library for reading and manipulating genetic data")
3616 (description
3617 "PySnpTools is a library for reading and manipulating genetic data. It
3618can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3619those files. It can also efficiently manipulate ranges of integers using set
3620operators such as union, intersection, and difference.")
3621 (license license:asl2.0)))
3622
3623(define-public python-scipy
3624 (package
3625 (name "python-scipy")
3626 (version "1.1.0")
3627 (source
3628 (origin
3629 (method url-fetch)
3630 (uri (pypi-uri "scipy" version))
3631 (sha256
3632 (base32
3633 "1lfg686w6vv2m2dfs8v9d0bf2i18z7wz5vgzjnkgmpr4hi0550w7"))))
3634 (build-system python-build-system)
3635 (propagated-inputs
3636 `(("python-numpy" ,python-numpy)
3637 ("python-matplotlib" ,python-matplotlib)
3638 ("python-pyparsing" ,python-pyparsing)))
3639 (inputs
3640 `(("lapack" ,lapack)
3641 ("openblas" ,openblas)))
3642 (native-inputs
3643 `(("python-cython" ,python-cython)
3644 ("python-pytest" ,python-pytest)
3645 ("python-sphinx" ,python-sphinx)
3646 ("python-numpydoc" ,python-numpydoc)
3647 ("gfortran" ,gfortran)
3648 ("perl" ,perl)
3649 ("which" ,which)))
3650 (outputs '("out" "doc"))
3651 (arguments
3652 `(#:phases
3653 (modify-phases %standard-phases
3654 (add-after 'unpack 'disable-broken-tests
3655 (lambda _
3656 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
3657 (("^( +)def test_threads_parallel\\(self\\):" m indent)
3658 (string-append indent
3659 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
3660 m)))
3661 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
3662 (("^def test_parallel_threads\\(\\):" m)
3663 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
3664 m)))
3665 #t))
3666 (add-before 'build 'configure-openblas
3667 (lambda* (#:key inputs #:allow-other-keys)
3668 (call-with-output-file "site.cfg"
3669 (lambda (port)
3670 (format port
3671 "[blas]
3672libraries = openblas
3673library_dirs = ~a/lib
3674include_dirs = ~a/include
3675
3676# backslash-n to make emacs happy
3677\n[atlas]
3678library_dirs = ~a/lib
3679atlas_libs = openblas
3680"
3681 (assoc-ref inputs "openblas")
3682 (assoc-ref inputs "openblas")
3683 (assoc-ref inputs "openblas"))))
3684 #t))
3685 (add-after 'install 'install-doc
3686 (lambda* (#:key inputs outputs #:allow-other-keys)
3687 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3688 (doc (string-append data "/doc/" ,name "-" ,version))
3689 (html (string-append doc "/html"))
3690 (pyver ,(string-append "PYVER=" (version-major+minor
3691 (package-version python))))
3692 ;; By default it tries to run sphinx-build through the Python
3693 ;; interpreter which won't work with our shell wrapper.
3694 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
3695 ;; Make installed package available for building the
3696 ;; documentation
3697 (add-installed-pythonpath inputs outputs)
3698 (with-directory-excursion "doc"
3699 ;; Fix generation of images for mathematical expressions.
3700 (substitute* (find-files "source" "conf\\.py")
3701 (("pngmath_use_preview = True")
3702 "pngmath_use_preview = False"))
3703 (mkdir-p html)
3704 (invoke "make" "html" pyver sphinxbuild)
3705 (with-directory-excursion "build/html"
3706 (for-each (lambda (file)
3707 (let* ((dir (dirname file))
3708 (tgt-dir (string-append html "/" dir)))
3709 (install-file file html)))
3710 (find-files "." ".*")))))
3711 #t))
3712 ;; Tests can only be run after the library has been installed and not
3713 ;; within the source directory.
3714 (delete 'check)
3715 (add-after 'install 'check
3716 (lambda* (#:key inputs outputs #:allow-other-keys)
3717 (add-installed-pythonpath inputs outputs)
3718 (with-directory-excursion "/tmp"
3719 (invoke "python" "-c"
3720 "import scipy; scipy.test(verbose=2)")))))))
3721 (home-page "https://www.scipy.org/")
3722 (synopsis "The Scipy library provides efficient numerical routines")
3723 (description "The SciPy library is one of the core packages that make up
3724the SciPy stack. It provides many user-friendly and efficient numerical
3725routines such as routines for numerical integration and optimization.")
3726 (properties `((python2-variant . ,(delay python2-scipy))))
3727 (license license:bsd-3)))
3728
3729(define-public python2-scipy
3730 (package-with-python2
3731 (strip-python2-variant python-scipy)))
3732
3733(define-public python-socksipy-branch
3734 (package
3735 (name "python-socksipy-branch")
3736 (version "1.01")
3737 (source
3738 (origin
3739 (method url-fetch)
3740 (uri (pypi-uri "SocksiPy-branch" version))
3741 (sha256
3742 (base32
3743 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3744 (build-system python-build-system)
3745 (arguments
3746 `(#:tests? #f)) ; There are no tests
3747 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3748 (synopsis "Python SOCKS module")
3749 (description
3750 "SocksiPy - A Python SOCKS client module. It provides a
3751socket-like interface that supports connections to any TCP
3752service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3753The original version was developed by Dan Haim, this is a
3754branch created by Mario Vilas to address some open issues,
3755as the original project seems to have been abandoned circa 2007.")
3756 (license license:bsd-3)))
3757
3758(define-public python2-socksipy-branch
3759 (package-with-python2 python-socksipy-branch))
3760
3761(define-public python-pycodestyle
3762 (package
3763 (name "python-pycodestyle")
d16ef28b 3764 (version "2.5.0")
44d10b1f 3765 (source
ba88eea2
RW
3766 (origin
3767 (method url-fetch)
3768 (uri (pypi-uri "pycodestyle" version))
3769 (sha256
3770 (base32
d16ef28b 3771 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
44d10b1f
RW
3772 (build-system python-build-system)
3773 (home-page "https://pycodestyle.readthedocs.io/")
3774 (synopsis "Python style guide checker")
3775 (description "@code{pycodestyle} (formerly pep8) is a tool to check
3776Python code against some of the style conventions in
3777@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
3778 (license license:expat)))
3779
3780(define-public python2-pycodestyle
3781 (package-with-python2 python-pycodestyle))
3782
3783(define-public python-multidict
3784 (package
3785 (name "python-multidict")
3786 (version "4.2.0")
3787 (source
3788 (origin
3789 (method url-fetch)
3790 (uri (pypi-uri "multidict" version))
3791 (sha256
3792 (base32
3793 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
3794 (build-system python-build-system)
3795 (native-inputs
3796 `(("python-pytest" ,python-pytest)
3797 ("python-pytest-runner" ,python-pytest-runner)))
3798 (home-page "https://github.com/aio-libs/multidict/")
3799 (synopsis "Multidict implementation")
3800 (description "Multidict is dict-like collection of key-value pairs
3801where key might be occurred more than once in the container.")
3802 (license license:asl2.0)))
3803
3804(define-public python-orderedmultidict
3805 (package
3806 (name "python-orderedmultidict")
3807 (version "0.7.11")
3808 (source
3809 (origin
3810 (method url-fetch)
3811 (uri (pypi-uri "orderedmultidict" version))
3812 (sha256
3813 (base32
3814 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
3815 (build-system python-build-system)
3816 (arguments
3817 `(#:phases
3818 (modify-phases %standard-phases
3819 (add-after 'unpack 'fix-tests
3820 (lambda _
3821 ;; The package uses nosetest for running the tests.
3822 ;; Adding this initfile allows to run the test suite
3823 ;; without requiring nosetest.
d1c4f329
RW
3824 (with-output-to-file "tests/__init__.py" newline)
3825 #t)))))
44d10b1f
RW
3826 (propagated-inputs
3827 `(("python-six" ,python-six)))
3828 (native-inputs
3829 `(("python-pycodestyle" ,python-pycodestyle)))
3830 (home-page "https://github.com/gruns/orderedmultidict")
3831 (synopsis "Python Ordered Multivalue Dictionary - omdict")
3832 (description "This package contains a library for ordered multivalue
3833dictionaries. A multivalue dictionary is a dictionary that can store
3834multiple values for the same key. An ordered multivalue dictionary is a
3835multivalue dictionary that retains the order of insertions and deletions.")
3836 (license license:unlicense)))
3837
3838(define-public python2-orderedmultidict
3839 (package-with-python2 python-orderedmultidict))
3840
3841(define-public python-autopep8
3842 (package
3843 (name "python-autopep8")
3844 (version "1.3.5")
3845 (source
3846 (origin
3847 (method url-fetch)
3848 (uri (pypi-uri "autopep8" version))
3849 (sha256
3850 (base32
3851 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
3852 (build-system python-build-system)
3853 (propagated-inputs
3854 `(("python-pycodestyle" ,python-pycodestyle)))
3855 (home-page "https://github.com/hhatto/autopep8")
3856 (synopsis "Format Python code according to the PEP 8 style guide")
3857 (description
3858 "@code{autopep8} automatically formats Python code to conform to
3859the PEP 8 style guide. It uses the pycodestyle utility to determine
3860what parts of the code needs to be formatted. @code{autopep8} is
3861capable of fixing most of the formatting issues that can be reported
3862by pycodestyle.")
3863 (license (license:non-copyleft
3864 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
3865
3866(define-public python2-autopep8
3867 (package-with-python2 python-autopep8))
3868
3869(define-public python-distutils-extra
3870 (package
3871 (name "python-distutils-extra")
3872 (version "2.38")
3873 (source
3874 (origin
3875 (method url-fetch)
3876 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
3877 version "/+download/python-distutils-extra-"
3878 version ".tar.gz"))
3879 (sha256
3880 (base32
3881 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
3882 (build-system python-build-system)
3883 (home-page "https://launchpad.net/python-distutils-extra/")
3884 (synopsis "Enhancements to Python's distutils")
3885 (description
3886 "The python-distutils-extra module enables you to easily integrate
3887gettext support, themed icons, and scrollkeeper-based documentation into
3888Python's distutils.")
3889 (license license:gpl2)))
3890
3891(define-public python2-distutils-extra
3892 (package-with-python2 python-distutils-extra))
3893
3894(define-public python2-elib.intl
3895 (package
3896 (name "python2-elib.intl")
3897 (version "0.0.3")
3898 (source
3899 (origin
3900 ;; This project doesn't tag releases or publish tarballs, so we take
3901 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
3902 (method git-fetch)
3903 (uri (git-reference
3904 (url "https://github.com/dieterv/elib.intl.git")
3905 (commit "d09997cfef")))
3906 (file-name (string-append name "-" version "-checkout"))
3907 (sha256
3908 (base32
3909 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
3910 (build-system python-build-system)
3911 (arguments
3912 ;; incompatible with Python 3 (exception syntax)
3913 `(#:python ,python-2
3914 #:tests? #f))
3915 (home-page "https://github.com/dieterv/elib.intl")
3916 (synopsis "Enhanced internationalization for Python")
3917 (description
3918 "The elib.intl module provides enhanced internationalization (I18N)
3919services for your Python modules and applications.")
3920 (license license:lgpl3+)))
3921
3922(define-public python-olefile
3923 (package
3924 (name "python-olefile")
3925 (version "0.45.1")
3926 (source
3927 (origin
3928 (method url-fetch)
3929 (uri (string-append "https://github.com/decalage2/olefile/archive/v"
3930 version ".tar.gz"))
3931 (file-name (string-append name "-" version ".tar.gz"))
3932 (sha256
3933 (base32
3934 "18ai19zwagm6nli14k8bii31ipbab2rp7plrvsm6gmfql551a8ai"))))
3935 (build-system python-build-system)
3936 (home-page
3937 "https://www.decalage.info/python/olefileio")
3938 (synopsis "Read and write Microsoft OLE2 files.")
3939 (description
3940 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
3941Storage or Compound Document, Microsoft Office). It is an improved version of
3942the OleFileIO module from PIL, the Python Image Library.")
3943 (license license:bsd-3)))
3944
3945(define-public python2-olefile
3946 (package-with-python2 python-olefile))
3947
3948(define-public python-pillow
3949 (package
3950 (name "python-pillow")
3951 (version "5.4.1")
3952 (source
3953 (origin
3954 (method url-fetch)
3955 (uri (pypi-uri "Pillow" version))
3956 (sha256
3957 (base32
3958 "17waygkhhzjd75kajlfw9v57mbb41lcpg6cvkdijqd7smm76ccsj"))))
3959 (build-system python-build-system)
3960 (native-inputs
3961 `(("python-pytest" ,python-pytest)))
3962 (inputs
3963 `(("freetype" ,freetype)
3964 ("lcms" ,lcms)
3965 ("zlib" ,zlib)
3966 ("libjpeg" ,libjpeg)
3967 ("openjpeg" ,openjpeg)
3968 ("libtiff" ,libtiff)
3969 ("libwebp" ,libwebp)))
3970 (propagated-inputs
3971 `(("python-olefile" ,python-olefile)))
3972 (arguments
3973 `(#:phases
3974 (modify-phases %standard-phases
3975 (add-after 'unpack 'patch-ldconfig
3976 (lambda _
3977 (substitute* "setup.py"
3978 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
3979 (delete 'check) ; We must run checks after python-pillow is installed.
3980 (add-after 'install 'check-installed
3981 (lambda* (#:key outputs inputs #:allow-other-keys)
3982 (begin
3983 (setenv "HOME" (getcwd))
3984 ;; Make installed package available for running the tests.
3985 (add-installed-pythonpath inputs outputs)
3986 (invoke "python" "selftest.py" "--installed")
3987 (invoke "python" "-m" "pytest" "-vv")))))))
3988 (home-page "https://python-pillow.org")
3989 (synopsis "Fork of the Python Imaging Library")
3990 (description
3991 "The Python Imaging Library adds image processing capabilities to your
3992Python interpreter. This library provides extensive file format support, an
3993efficient internal representation, and fairly powerful image processing
3994capabilities. The core image library is designed for fast access to data
3995stored in a few basic pixel formats. It should provide a solid foundation for
3996a general image processing tool.")
3997 (license (license:x11-style
3998 "http://www.pythonware.com/products/pil/license.htm"
3999 "The PIL Software License"))))
4000
4001(define-public python2-pillow
4002 (package-with-python2 python-pillow))
4003
4004(define-public python-pycparser
4005 (package
4006 (name "python-pycparser")
4007 (version "2.18")
4008 (source
4009 (origin
4010 (method url-fetch)
4011 (uri (pypi-uri "pycparser" version))
4012 (sha256
4013 (base32
4014 "09mjyw82ibqzl449g7swy8bfxnfpmas0815d2rkdjlcqw81wma4r"))))
4015 (outputs '("out" "doc"))
4016 (build-system python-build-system)
4017 (native-inputs
4018 `(("pkg-config" ,pkg-config)))
4019 (arguments
4020 `(#:phases
4021 (modify-phases %standard-phases
4022 (replace 'check
4023 (lambda _
4024 (with-directory-excursion "tests"
acb75c03
RW
4025 (invoke "python" "all_tests.py"))
4026 #t))
44d10b1f
RW
4027 (add-after 'install 'install-doc
4028 (lambda* (#:key outputs #:allow-other-keys)
4029 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4030 (doc (string-append data "/doc/" ,name "-" ,version))
4031 (examples (string-append doc "/examples")))
4032 (mkdir-p examples)
4033 (for-each (lambda (file)
4034 (copy-file (string-append "." file)
4035 (string-append doc file)))
4036 '("/README.rst" "/CHANGES" "/LICENSE"))
4037 (copy-recursively "examples" examples)))))))
4038 (home-page "https://github.com/eliben/pycparser")
4039 (synopsis "C parser in Python")
4040 (description
4041 "Pycparser is a complete parser of the C language, written in pure Python
4042using the PLY parsing library. It parses C code into an AST and can serve as
4043a front-end for C compilers or analysis tools.")
4044 (license license:bsd-3)))
4045
4046(define-public python2-pycparser
4047 (package-with-python2 python-pycparser))
4048
4049(define-public python-pywavelets
4050 (package
4051 (name "python-pywavelets")
4052 (version "1.0.1")
4053 (home-page "https://github.com/PyWavelets/pywt")
4054 (source (origin
4055 (method url-fetch)
4056 (uri (pypi-uri "PyWavelets" version))
4057 (sha256
4058 (base32
4059 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4060 (build-system python-build-system)
4061 (arguments
4062 '(#:modules ((ice-9 ftw)
4063 (srfi srfi-1)
4064 (srfi srfi-26)
4065 (guix build utils)
4066 (guix build python-build-system))
4067 #:phases (modify-phases %standard-phases
4068 (replace 'check
4069 (lambda _
4070 (let ((cwd (getcwd))
4071 (libdir (find (cut string-prefix? "lib." <>)
4072 (scandir "build"))))
4073 (with-directory-excursion (string-append cwd "/build/" libdir)
4074 (invoke "nosetests" "-v" "."))))))))
4075 (native-inputs
4076 `(("python-matplotlib" ,python-matplotlib) ;for tests
4077 ("python-nose" ,python-nose)))
4078 (propagated-inputs
4079 `(("python-numpy" ,python-numpy)))
4080 (synopsis "Wavelet transforms in Python")
4081 (description
4082 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4083mathematical basis functions that are localized in both time and frequency.
4084Wavelet transforms are time-frequency transforms employing wavelets. They are
4085similar to Fourier transforms, the difference being that Fourier transforms are
4086localized only in frequency instead of in time and frequency.")
4087 (license license:expat)))
4088
4089(define-public python2-pywavelets
4090 (package-with-python2 python-pywavelets))
4091
4092(define-public python-xcffib
4093 (package
4094 (name "python-xcffib")
4095 (version "0.6.0")
4096 (source
4097 (origin
4098 (method url-fetch)
4099 (uri (pypi-uri "xcffib" version))
4100 (sha256
4101 (base32
4102 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4103 (build-system python-build-system)
4104 (inputs
4105 `(("libxcb" ,libxcb)))
4106 (propagated-inputs
4107 `(("python-cffi" ,python-cffi) ; used at run time
4108 ("python-six" ,python-six)))
4109 (arguments
4110 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4111 #:tests? #f
4112 #:phases
4113 (modify-phases %standard-phases
4114 (add-after 'unpack 'fix-libxcb-path
4115 (lambda* (#:key inputs #:allow-other-keys)
4116 (let ((libxcb (assoc-ref inputs "libxcb")))
4117 (substitute* '("xcffib/__init__.py")
4118 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4119 #t)))
4120 (add-after 'install 'install-doc
4121 (lambda* (#:key outputs #:allow-other-keys)
4122 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4123 "/doc/" ,name "-" ,version)))
4124 (mkdir-p doc)
4125 (copy-file "README.md"
4126 (string-append doc "/README.md"))
4127 #t))))))
4128 (home-page "https://github.com/tych0/xcffib")
4129 (synopsis "XCB Python bindings")
4130 (description
4131 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4132support for Python 3 and PyPy. It is based on cffi.")
4133 (license license:expat)))
4134
4135(define-public python2-xcffib
4136 (package-with-python2 python-xcffib))
4137
4138(define-public python-cairocffi
4139 (package
4140 (name "python-cairocffi")
4141 (version "0.9.0")
4142 (source
4143 (origin
4144 (method url-fetch)
4145 (uri (pypi-uri "cairocffi" version))
4146 (sha256
4147 (base32
4148 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4149 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4150 (build-system python-build-system)
4151 (outputs '("out" "doc"))
4152 (inputs
4153 `(("glib" ,glib)
4154 ("gtk+" ,gtk+)
4155 ("gdk-pixbuf" ,gdk-pixbuf)
4156 ("cairo" ,cairo)
4157 ("pango" ,pango)))
4158 (native-inputs
4159 `(("pkg-config" ,pkg-config)
4160 ("python-pytest" ,python-pytest)
4161 ("python-pytest-cov" ,python-pytest-cov)
4162 ("python-pytest-runner" ,python-pytest-runner)
4163 ("python-sphinx" ,python-sphinx)
4164 ("python-docutils" ,python-docutils)))
4165 (propagated-inputs
4166 `(("python-xcffib" ,python-xcffib))) ; used at run time
4167 (arguments
4168 `(#:phases
4169 (modify-phases %standard-phases
4170 (add-after 'unpack 'patch-paths
4171 (lambda* (#:key inputs outputs #:allow-other-keys)
4172 (substitute* (find-files "." "\\.py$")
4173 (("dlopen\\(ffi, 'cairo'")
4174 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4175 "/lib/libcairo.so.2'"))
4176 (("dlopen\\(ffi, 'gdk-3'")
4177 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4178 "/lib/libgtk-3.so.0'"))
4179 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4180 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4181 "/lib/libgdk_pixbuf-2.0.so.0'"))
4182 (("dlopen\\(ffi, 'glib-2.0'")
4183 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4184 "/lib/libglib-2.0.so.0'"))
4185 (("dlopen\\(ffi, 'gobject-2.0'")
4186 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4187 "/lib/libgobject-2.0.so.0'"))
4188 (("dlopen\\(ffi, 'pangocairo-1.0'")
4189 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4190 "/lib/libpangocairo-1.0.so.0'"))
4191 (("dlopen\\(ffi, 'pango-1.0'")
4192 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4193 "/lib/libpango-1.0.so.0'")))
4194 #t))
4195 (add-after 'install 'install-doc
4196 (lambda* (#:key inputs outputs #:allow-other-keys)
4197 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4198 (doc (string-append data "/doc/" ,name "-" ,version))
4199 (html (string-append doc "/html")))
4200 (setenv "LD_LIBRARY_PATH"
4201 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4202 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4203 (setenv "LANG" "en_US.UTF-8")
4204 (mkdir-p html)
4205 (for-each (lambda (file)
4206 (copy-file (string-append "." file)
4207 (string-append doc file)))
4208 '("/README.rst" "/CHANGES" "/LICENSE"))
4209 (system* "python" "setup.py" "build_sphinx")
4210 (copy-recursively "docs/_build/html" html)
4211 #t))))))
4212 (home-page "https://github.com/Kozea/cairocffi")
4213 (synopsis "Python bindings and object-oriented API for Cairo")
4214 (description
4215 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4216Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4217graphics library with support for multiple backends including image buffers,
4218PNG, PostScript, PDF, and SVG file output.")
4219 (license license:bsd-3)))
4220
4221(define-public python2-cairocffi
4222 (package-with-python2 python-cairocffi))
4223
4224(define-public python-decorator
4225 (package
4226 (name "python-decorator")
4227 (version "4.3.0")
4228 (source
4229 (origin
4230 (method url-fetch)
4231 (uri (pypi-uri "decorator" version))
4232 (sha256
4233 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4234 (build-system python-build-system)
4235 (home-page "https://pypi.python.org/pypi/decorator/")
4236 (synopsis "Python module to simplify usage of decorators")
4237 (description
4238 "The aim of the decorator module is to simplify the usage of decorators
4239for the average programmer, and to popularize decorators usage giving examples
4240of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4241etc. The core of this module is a decorator factory.")
4242 (license license:expat)))
4243
4244(define-public python2-decorator
4245 (package-with-python2 python-decorator))
4246
4247(define-public python-drmaa
4248 (package
4249 (name "python-drmaa")
4250 (version "0.7.7")
4251 (source
4252 (origin
4253 (method url-fetch)
4254 (uri (pypi-uri "drmaa" version))
4255 (sha256
4256 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4257 (build-system python-build-system)
4258 ;; The test suite requires libdrmaa which is provided by the cluster
4259 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4260 ;; should be set to the path of the libdrmaa library.
4261 (arguments '(#:tests? #f))
4262 (native-inputs
4263 `(("python-nose" ,python-nose)))
4264 (home-page "https://pypi.python.org/pypi/drmaa")
4265 (synopsis "Python bindings for the DRMAA library")
4266 (description
4267 "A Python package for Distributed Resource Management (DRM) job
4268submission and control. This package is an implementation of the DRMAA 1.0
4269Python language binding specification.")
4270 (license license:bsd-3)))
4271
4272(define-public python2-drmaa
4273 (package-with-python2 python-drmaa))
4274
4275(define-public python-grako
4276 (package
4277 (name "python-grako")
4278 (version "3.99.9")
4279 (source
4280 (origin
4281 (method url-fetch)
4282 (uri
4283 (pypi-uri "grako" version ".zip"))
4284 (sha256
4285 (base32
4286 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4287 (build-system python-build-system)
4288 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4289 (native-inputs
4290 `(("unzip" ,unzip)
4291 ("python-pytest" ,python-pytest)
4292 ("python-pytest-runner" ,python-pytest-runner)))
4293 (home-page "https://bitbucket.org/neogeny/grako")
4294 (synopsis "EBNF parser generator")
4295 (description
4296 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4297memoizing PEG/Packrat parser in Python.")
4298 (license license:bsd-3)))
4299
4300(define-public python2-grako
4301 (package-with-python2 python-grako))
4302
4303(define-public python-gridmap
4304 (package
4305 (name "python-gridmap")
4306 (version "0.13.0")
4307 (source
4308 (origin
4309 (method url-fetch)
4310 (uri (string-append
4311 "https://github.com/pygridtools/gridmap/archive/v"
4312 version ".tar.gz"))
4313 (file-name (string-append name "-" version ".tar.gz"))
4314 (sha256
4315 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4316 (build-system python-build-system)
4317 (arguments
4318 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4319 (propagated-inputs
4320 `(("python-psutil" ,python-psutil)
4321 ("python-drmaa" ,python-drmaa)
4322 ("python-pyzmq" ,python-pyzmq)))
4323 (home-page "https://github.com/pygridtools/gridmap")
4324 (synopsis "Create jobs on a cluster directly from Python")
4325 (description
4326 "Gridmap is a Python package to allow you to easily create jobs on the
4327cluster directly from Python. You can directly map Python functions onto the
4328cluster without needing to write any wrapper code yourself.")
4329 (license license:gpl3+)))
4330
4331(define-public python2-gridmap
4332 (package-with-python2 python-gridmap))
4333
4334(define-public python-honcho
4335 (package
4336 (name "python-honcho")
4337 (version "1.0.1")
4338 (source
4339 (origin
4340 (method url-fetch)
4341 (uri (string-append
4342 "https://github.com/nickstenning/honcho/archive/v"
4343 version ".tar.gz"))
4344 (file-name (string-append name "-" version ".tar.gz"))
4345 (sha256
4346 (base32 "0zizn61n5z5hq421hkypk9pw8s6fpxw30f4hsg7k4ivwzy3gjw9j"))))
4347 (build-system python-build-system)
4348 (native-inputs
4349 `(("python-pytest" ,python-pytest)
4350 ("python-mock" ,python-mock)
4351 ("python-tox" ,python-tox)
4352 ("which" ,which))) ;for tests
4353 (propagated-inputs
4354 `(("python-jinja2" ,python-jinja2)))
4355 (arguments
4356 `(#:phases
4357 (modify-phases %standard-phases
4358 (delete 'check)
4359 (add-after 'install 'check
4360 (lambda* (#:key outputs inputs #:allow-other-keys)
4361 ;; fix honcho path in testsuite
4362 (substitute* "tests/conftest.py"
4363 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4364 "/bin/honcho" "'")))
4365 ;; It's easier to run tests after install.
4366 ;; Make installed package available for running the tests
4367 (add-installed-pythonpath inputs outputs)
95b707fb 4368 (invoke "py.test" "-v"))))))
44d10b1f
RW
4369 (home-page "https://github.com/nickstenning/honcho")
4370 (synopsis "Manage Procfile-based applications")
4371 (description
4372 "A Procfile is a file which describes how to run an application
4373consisting of serveral processes. honcho starts all listed processes.
4374The output of all running processes is collected by honcho and
4375displayed.")
4376 (license license:expat)))
4377
4378(define-public python2-honcho
4379 (package-with-python2 python-honcho))
4380
4381(define-public python-pexpect
4382 (package
4383 (name "python-pexpect")
4384 (version "4.6.0")
4385 (source
4386 (origin
4387 (method url-fetch)
4388 (uri (pypi-uri "pexpect" version))
4389 (sha256
4390 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4391 (build-system python-build-system)
4392 (arguments
4393 `(#:phases
4394 (modify-phases %standard-phases
4395 (add-before 'check 'prepare-tests
4396 (lambda _
4397 (substitute* (find-files "tests")
4398 (("/bin/ls") (which "ls"))
4399 (("/bin/echo") (which "echo"))
4400 (("/bin/which") (which "which"))
4401 ;; Many tests try to use the /bin directory which
4402 ;; is not present in the build environment.
4403 ;; Use one that's non-empty and unlikely to change.
4404 (("/bin'") "/dev'"))
4405 ;; XXX: Socket connection test gets "Connection reset by peer".
4406 ;; Why does it not work? Delete for now.
4407 (delete-file "tests/test_socket.py")
4408 #t))
4409 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4410 (native-inputs
4411 `(("python-nose" ,python-nose)
4412 ("python-pytest" ,python-pytest)
4413 ("man-db" ,man-db)
4414 ("which" ,which)
4415 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4416 (propagated-inputs
4417 `(("python-ptyprocess" ,python-ptyprocess)))
4418 (home-page "http://pexpect.readthedocs.org/")
4419 (synopsis "Controlling interactive console applications")
4420 (description
4421 "Pexpect is a pure Python module for spawning child applications;
4422controlling them; and responding to expected patterns in their output.
4423Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4424child application and control it as if a human were typing commands.")
4425 (license license:isc)))
4426
4427(define-public python2-pexpect
4428 (package-with-python2 python-pexpect))
4429
4430(define-public python-setuptools-scm
4431 (package
4432 (name "python-setuptools-scm")
85092643 4433 (version "3.2.0")
44d10b1f
RW
4434 (source (origin
4435 (method url-fetch)
4436 (uri (pypi-uri "setuptools_scm" version))
4437 (sha256
4438 (base32
85092643 4439 "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj"))))
44d10b1f
RW
4440 (build-system python-build-system)
4441 (home-page "https://github.com/pypa/setuptools_scm/")
4442 (synopsis "Manage Python package versions in SCM metadata")
4443 (description
4444 "Setuptools_scm handles managing your Python package versions in
4445@dfn{software configuration management} (SCM) metadata instead of declaring
4446them as the version argument or in a SCM managed file.")
4447 (license license:expat)))
4448
4449(define-public python2-setuptools-scm
4450 (package-with-python2 python-setuptools-scm))
4451
4452(define-public python-pathpy
4453 (package
4454 (name "python-pathpy")
4455 (version "11.0.1")
4456 (source
4457 (origin
4458 (method url-fetch)
4459 (uri (pypi-uri "path.py" version))
4460 (sha256
4461 (base32 "07x15v8c7ry9bvycw294c9yq6ky9v2b0dalvgi6rn38ilh69vsz7"))))
4462 ;; (outputs '("out" "doc"))
4463 (build-system python-build-system)
4464 (propagated-inputs
4465 `(("python-appdirs" ,python-appdirs)))
4466 (native-inputs
4467 `(("python-setuptools-scm" ,python-setuptools-scm)
4468 ("python-sphinx" ,python-sphinx)
4469 ("python-rst.linker" ,python-rst.linker)
4470 ("python-pytest" ,python-pytest)
4471 ("python-pytest-runner" ,python-pytest-runner)))
4472 (arguments
4473 ;; FIXME: Documentation and tests require "jaraco.packaging".
4474 `(#:tests? #f))
4475 ;; #:phases
4476 ;; (modify-phases %standard-phases
4477 ;; (add-after 'build 'build-doc
4478 ;; (lambda _
4479 ;; (setenv "LANG" "en_US.UTF-8")
4480 ;; (zero? (system* "python" "setup.py" "build_sphinx"))))
4481 ;; (add-after 'install 'install-doc
4482 ;; (lambda* (#:key outputs #:allow-other-keys)
4483 ;; (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4484 ;; (doc (string-append data "/doc/" ,name "-" ,version))
4485 ;; (html (string-append doc "/html")))
4486 ;; (mkdir-p html)
4487 ;; (for-each (lambda (file)
4488 ;; (copy-file file (string-append doc "/" file)))
4489 ;; '("README.rst" "CHANGES.rst"))
4490 ;; (copy-recursively "build/sphinx/html" html)))))))
4491 (home-page "https://github.com/jaraco/path.py")
4492 (synopsis "Python module wrapper for built-in os.path")
4493 (description
4494 "@code{path.py} implements path objects as first-class entities, allowing
4495common operations on files to be invoked on those path objects directly.")
4496 (license license:expat)))
4497
4498(define-public python2-pathpy
4499 (package-with-python2 python-pathpy))
4500
4501(define-public python-simplegeneric
4502 (package
4503 (name "python-simplegeneric")
4504 (version "0.8.1")
4505 (source
4506 (origin
4507 (method url-fetch)
6c8c3980 4508 (uri (pypi-uri "simplegeneric" version ".zip"))
44d10b1f
RW
4509 (sha256
4510 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4511 (build-system python-build-system)
4512 (native-inputs
4513 `(("unzip" ,unzip)))
4514 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4515 (synopsis "Python module for simple generic functions")
4516 (description
4517 "The simplegeneric module lets you define simple single-dispatch generic
4518functions, akin to Python’s built-in generic functions like @code{len()},
4519@code{iter()} and so on. However, instead of using specially-named methods,
4520these generic functions use simple lookup tables, akin to those used by
4521e.g. @code{pickle.dump()} and other generic functions found in the Python
4522standard library.")
4523 (license license:zpl2.1)))
4524
4525(define-public python2-simplegeneric
4526 (package-with-python2 python-simplegeneric))
4527
4528(define-public python-ipython-genutils
4529 ;; TODO: This package is retired, check if can be removed, see description.
4530 (package
4531 (name "python-ipython-genutils")
4532 (version "0.1.0")
4533 (source
4534 (origin
4535 (method url-fetch)
c9671d4b 4536 (uri (pypi-uri "ipython_genutils" version))
44d10b1f
RW
4537 (sha256
4538 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4539 (build-system python-build-system)
4540 (arguments `(#:tests? #f)) ; no tests
4541 (home-page "https://ipython.org")
4542 (synopsis "Vestigial utilities from IPython")
4543 (description
4544 "This package provides retired utilities from IPython. No packages
4545outside IPython/Jupyter should depend on it.
4546
4547This package shouldn't exist. It contains some common utilities shared by
4548Jupyter and IPython projects during The Big Split. As soon as possible, those
4549packages will remove their dependency on this, and this package will go
4550away.")
4551 (license license:bsd-3)))
4552
4553(define-public python2-ipython-genutils
4554 (package-with-python2 python-ipython-genutils))
4555
4556(define-public python-traitlets
4557 (package
4558 (name "python-traitlets")
4559 (version "4.3.2")
4560 (source
4561 (origin
4562 (method url-fetch)
4563 (uri (pypi-uri "traitlets" version))
4564 (sha256
4565 (base32
4566 "0dbq7sx26xqz5ixs711k5nc88p8a0nqyz6162pwks5dpcz9d4jww"))))
4567 (build-system python-build-system)
4568 (arguments
4569 `(#:phases
4570 (modify-phases %standard-phases
4571 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
4572 (propagated-inputs
4573 `(("python-ipython-genutils" ,python-ipython-genutils)
4574 ("python-decorator" ,python-decorator))) ;not needed for >4.3.2
4575 (native-inputs
4576 `(("python-pytest" ,python-pytest)))
4577 (properties `((python2-variant . ,(delay python2-traitlets))))
4578 (home-page "https://ipython.org")
4579 (synopsis "Configuration system for Python applications")
4580 (description
4581 "Traitlets is a framework that lets Python classes have attributes with
4582type checking, dynamically calculated default values, and ‘on change’
4583callbacks. The package also includes a mechanism to use traitlets for
4584configuration, loading values from files or from command line arguments. This
4585is a distinct layer on top of traitlets, so you can use traitlets in your code
4586without using the configuration machinery.")
4587 (license license:bsd-3)))
4588
4589(define-public python2-traitlets
4590 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
4591 (package
4592 (inherit traitlets)
4593 (propagated-inputs
4594 `(("python2-enum34" ,python2-enum34)
4595 ,@(package-propagated-inputs traitlets))))))
4596
4597(define-public python-jupyter-core
4598 (package
4599 (name "python-jupyter-core")
4600 (version "4.4.0")
4601 (source
4602 (origin
4603 (method url-fetch)
4604 (uri (string-append (pypi-uri "jupyter_core" version)))
4605 (sha256
4606 (base32
4607 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
4608 (build-system python-build-system)
4609 ;; FIXME: not sure how to run the tests
4610 (arguments `(#:tests? #f))
4611 (propagated-inputs
4612 `(("python-traitlets" ,python-traitlets)))
4613 (home-page "http://jupyter.org/")
4614 (synopsis "Jupyter base package")
4615 (description
4616 "Jupyter core is the base package on which Jupyter projects rely.")
4617 (license license:bsd-3)))
4618
4619(define-public python2-jupyter-core
4620 (package-with-python2 python-jupyter-core))
4621
4622(define-public python-jupyter-client
4623 (package
4624 (name "python-jupyter-client")
4625 (version "5.2.4")
4626 (source
4627 (origin
4628 (method url-fetch)
4629 (uri (pypi-uri "jupyter_client" version))
4630 (sha256
4631 (base32
4632 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
4633 (build-system python-build-system)
4634 ;; Tests fail because of missing native python kernel which I assume is
4635 ;; provided by the ipython package, which we cannot use because it would
4636 ;; cause a dependency cycle.
4637 (arguments `(#:tests? #f))
4638 (propagated-inputs
4639 `(("python-pyzmq" ,python-pyzmq)
4640 ("python-traitlets" ,python-traitlets)
4641 ("python-jupyter-core" ,python-jupyter-core)))
4642 (home-page "http://jupyter.org/")
4643 (synopsis "Jupyter protocol implementation and client libraries")
4644 (description
4645 "The @code{jupyter_client} package contains the reference implementation
4646of the Jupyter protocol. It also provides client and kernel management APIs
4647for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4648installing @code{kernelspec}s for use with Jupyter frontends.")
4649 (license license:bsd-3)))
4650
4651(define-public python2-jupyter-client
4652 (package-with-python2 python-jupyter-client))
4653
4654(define-public python-ipykernel
4655 (package
4656 (name "python-ipykernel")
4657 (version "5.1.0")
4658 (source
4659 (origin
4660 (method url-fetch)
4661 (uri (pypi-uri "ipykernel" version))
4662 (sha256
4663 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
4664 (build-system python-build-system)
4665 (arguments
4666 `(#:phases
4667 (modify-phases %standard-phases
4668 (replace 'check
4669 (lambda _
4670 (setenv "HOME" "/tmp")
4671 (invoke "pytest" "-v")
4672 #t)))))
4673 (propagated-inputs
4674 `(("python-ipython" ,python-ipython)
4675 ;; imported at runtime during connect
4676 ("python-jupyter-client" ,python-jupyter-client)))
4677 (native-inputs
4678 `(("python-pytest" ,python-pytest)
4679 ("python-nose" ,python-nose)))
4680 (home-page "https://ipython.org")
4681 (synopsis "IPython Kernel for Jupyter")
4682 (description
4683 "This package provides the IPython kernel for Jupyter.")
4684 (license license:bsd-3)))
4685
4686(define-public python2-ipykernel
4687 (package-with-python2 python-ipykernel))
4688
966aa714
AE
4689(define-public python-pari-jupyter
4690 (package
4691 (name "python-pari-jupyter")
4692 (version "1.3.2")
4693 (source
4694 (origin
4695 (method url-fetch)
4696 (uri (pypi-uri "pari_jupyter" version))
4697 (sha256
4698 (base32
4699 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
4700 (build-system python-build-system)
4701 (propagated-inputs
4702 `(("python-ipykernel" ,python-ipykernel)))
4703 (inputs
4704 `(("pari-gp" ,pari-gp)
4705 ("readline" ,readline)))
4706 (arguments
4707 `(#:tests? #f)) ; no test suite
4708 (home-page
4709 "https://github.com/jdemeyer/pari_jupyter")
4710 (synopsis "A Jupyter kernel for PARI/GP")
4711 (description "The package provides a PARI/GP kernel for Jupyter.")
4712 (license license:gpl3+)))
4713
44d10b1f
RW
4714;; This is the latest release of the LTS version of ipython with support for
4715;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
4716;; dropped support for Python 2.7. We may want to rename this package.
4717(define-public python-ipython
4718 (package
4719 (name "python-ipython")
4720 (version "5.8.0")
4721 (source
4722 (origin
4723 (method url-fetch)
4724 (uri (pypi-uri "ipython" version ".tar.gz"))
4725 (sha256
4726 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
4727 (build-system python-build-system)
4728 (outputs '("out" "doc"))
4729 (propagated-inputs
4730 `(("python-pyzmq" ,python-pyzmq)
4731 ("python-prompt-toolkit" ,python-prompt-toolkit-1)
4732 ("python-terminado" ,python-terminado)
4733 ("python-matplotlib" ,python-matplotlib)
4734 ("python-numpy" ,python-numpy)
4735 ("python-numpydoc" ,python-numpydoc)
4736 ("python-jinja2" ,python-jinja2)
4737 ("python-mistune" ,python-mistune)
4738 ("python-pexpect" ,python-pexpect)
4739 ("python-pickleshare" ,python-pickleshare)
4740 ("python-simplegeneric" ,python-simplegeneric)
4741 ("python-jsonschema" ,python-jsonschema)
4742 ("python-traitlets" ,python-traitlets)
4743 ("python-nbformat" ,python-nbformat)
4744 ("python-pygments" ,python-pygments)))
4745 (inputs
4746 `(("readline" ,readline)
4747 ("which" ,which)))
4748 (native-inputs
4749 `(("graphviz" ,graphviz)
4750 ("pkg-config" ,pkg-config)
4751 ("python-requests" ,python-requests) ;; for tests
4752 ("python-testpath" ,python-testpath)
4753 ("python-nose" ,python-nose)
4754 ("python-sphinx" ,python-sphinx)
4755 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
4756 ;; FIXME: It's possible that a smaller union would work just as well.
4757 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
4758 texlive-fonts-ec
4759 texlive-generic-ifxetex
4760 texlive-generic-pdftex
4761 texlive-latex-amsfonts
4762 texlive-latex-capt-of
4763 texlive-latex-cmap
4764 texlive-latex-environ
4765 texlive-latex-eqparbox
4766 texlive-latex-etoolbox
4767 texlive-latex-expdlist
4768 texlive-latex-fancyhdr
4769 texlive-latex-fancyvrb
4770 texlive-latex-fncychap
4771 texlive-latex-float
4772 texlive-latex-framed
4773 texlive-latex-geometry
4774 texlive-latex-graphics
4775 texlive-latex-hyperref
4776 texlive-latex-mdwtools
4777 texlive-latex-multirow
4778 texlive-latex-oberdiek
4779 texlive-latex-parskip
4780 texlive-latex-preview
4781 texlive-latex-tabulary
4782 texlive-latex-threeparttable
4783 texlive-latex-titlesec
4784 texlive-latex-trimspaces
4785 texlive-latex-ucs
4786 texlive-latex-upquote
4787 texlive-latex-url
4788 texlive-latex-varwidth
4789 texlive-latex-wrapfig)))
4790 ("texinfo" ,texinfo)))
4791 (arguments
4792 `(#:phases
4793 (modify-phases %standard-phases
4794 (add-after 'install 'install-doc
4795 (lambda* (#:key inputs outputs #:allow-other-keys)
4796 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4797 (doc (string-append data "/doc/" ,name "-" ,version))
4798 (html (string-append doc "/html"))
4799 (man1 (string-append data "/man/man1"))
4800 (info (string-append data "/info"))
4801 (examples (string-append doc "/examples"))
4802 (python-arg (string-append "PYTHON=" (which "python"))))
4803 (setenv "LANG" "en_US.utf8")
4804 ;; Make installed package available for running the tests
4805 (add-installed-pythonpath inputs outputs)
4806 (with-directory-excursion "docs"
4807 ;; FIXME: pdf fails to build
4808 ;;(system* "make" "pdf" "PAPER=a4")
4809 (system* "make" python-arg "html")
4810 (system* "make" python-arg "info"))
4811 (copy-recursively "docs/man" man1)
4812 (copy-recursively "examples" examples)
4813 (copy-recursively "docs/build/html" html)
4814 ;; (copy-file "docs/build/latex/ipython.pdf"
4815 ;; (string-append doc "/ipython.pdf"))
4816 (mkdir-p info)
4817 (copy-file "docs/build/texinfo/ipython.info"
4818 (string-append info "/ipython.info"))
4819 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
4820 #t))
4821 ;; Tests can only be run after the library has been installed and not
4822 ;; within the source directory.
4823 (delete 'check)
4824 (add-after 'install 'check
4825 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4826 (if tests?
4827 (begin
4828 ;; Make installed package available for running the tests
4829 (add-installed-pythonpath inputs outputs)
4830 (setenv "HOME" "/tmp/") ;; required by a test
4831 ;; We only test the core because one of the other tests
4832 ;; tries to import ipykernel.
4833 (invoke "python" "IPython/testing/iptest.py"
4834 "-v" "IPython/core/tests"))
4835 #t)))
4836 (add-before 'check 'fix-tests
4837 (lambda* (#:key inputs #:allow-other-keys)
4838 (substitute* "./IPython/utils/_process_posix.py"
4839 (("/usr/bin/env', 'which") (which "which")))
4840 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4841 (("#!/usr/bin/env python")
4842 (string-append "#!" (which "python"))))
4843 ;; Disable 1 failing test
4844 (substitute* "./IPython/core/tests/test_magic.py"
4845 (("def test_dirops\\(\\):" all)
4846 (string-append "@dec.skipif(True)\n" all)))
4847 ;; This test introduces a circular dependency on ipykernel
4848 ;; (which depends on ipython).
4849 (delete-file "IPython/core/tests/test_display.py")
4850 ;; These tests throw errors for unknown reasons.
4851 (delete-file "IPython/extensions/tests/test_storemagic.py")
4852 (delete-file "IPython/core/tests/test_displayhook.py")
4853 (delete-file "IPython/core/tests/test_interactiveshell.py")
4854 (delete-file "IPython/core/tests/test_pylabtools.py")
4855 (delete-file "IPython/core/tests/test_paths.py")
4856 #t)))))
4857 (home-page "https://ipython.org")
4858 (synopsis "IPython is a tool for interactive computing in Python")
4859 (description
4860 "IPython provides a rich architecture for interactive computing with:
4861Powerful interactive shells, a browser-based notebook, support for interactive
4862data visualization, embeddable interpreters and tools for parallel
4863computing.")
4864 (license license:bsd-3)
4865 (properties `((python2-variant . ,(delay python2-ipython))))))
4866
4867(define-public python2-ipython
4868 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
4869 (package
4870 (inherit ipython)
4871 ;; FIXME: add pyreadline once available.
4872 (propagated-inputs
4873 `(("python2-backports-shutil-get-terminal-size"
4874 ,python2-backports-shutil-get-terminal-size)
4875 ("python2-pathlib2" ,python2-pathlib2)
4876 ,@(package-propagated-inputs ipython)))
4877 (native-inputs
4878 `(("python2-mock" ,python2-mock)
4879 ,@(package-native-inputs ipython))))))
4880
4881(define-public python-urwid
4882 (package
4883 (name "python-urwid")
4884 (version "2.0.1")
4885 (source
4886 (origin
4887 (method url-fetch)
4888 (uri (pypi-uri "urwid" version))
4889 (sha256
4890 (base32
4891 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
4892 (build-system python-build-system)
4893 (home-page "http://urwid.org")
4894 (synopsis "Console user interface library for Python")
4895 (description
4896 "Urwid is a curses-based UI/widget library for Python. It includes many
4897features useful for text console applications.")
4898 (license license:lgpl2.1+)))
4899
4900(define-public python2-urwid
4901 (package-with-python2 python-urwid))
4902
4903(define-public python-urwidtrees
4904 (package
4905 (name "python-urwidtrees")
4906 (version "1.0.2")
4907 (source
4908 (origin
4909 (method url-fetch)
4910 ;; package author intends on distributing via github rather than pypi:
4911 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
4912 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
4913 version ".tar.gz"))
4914 (file-name (string-append name "-" version ".tar.gz"))
4915 (sha256
4916 (base32
4917 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
4918 (build-system python-build-system)
4919 (arguments
4920 '(#:tests? #f)) ; no tests
4921 (propagated-inputs `(("python-urwid" ,python-urwid)))
4922 (home-page "https://github.com/pazz/urwidtrees")
4923 (synopsis "Tree widgets for urwid")
4924 (description "Urwidtrees is a Widget Container API for the @code{urwid}
4925toolkit. Use it to build trees of widgets.")
4926 (license license:gpl3+)))
4927
4928(define-public python2-urwidtrees
4929 (package-with-python2 python-urwidtrees))
4930
4931(define-public python-ua-parser
4932 (package
4933 (name "python-ua-parser")
4934 (version "0.8.0")
4935 (source
4936 (origin
4937 (method url-fetch)
4938 (uri (pypi-uri "ua-parser" version))
4939 (sha256
4940 (base32
4941 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
4942 (build-system python-build-system)
4943 (arguments
4944 `(#:tests? #f)) ;no test suite in release
4945 (native-inputs
4946 `(("python-pyyaml" ,python-pyyaml)))
4947 (home-page "https://github.com/ua-parser/uap-python")
4948 (synopsis "User agent parser")
4949 (description
4950 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
4951 (license license:asl2.0)))
4952
4953(define-public python2-ua-parser
4954 (package-with-python2 python-ua-parser))
4955
4956(define-public python-user-agents
4957 (package
4958 (name "python-user-agents")
4959 (version "1.1.0")
4960 (source
4961 (origin
4962 (method url-fetch)
4963 (uri (pypi-uri "user-agents" version))
4964 (sha256
4965 (base32
4966 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
4967 (build-system python-build-system)
4968 (arguments
4969 `(#:tests? #f)) ;missing devices.json test file in release
4970 (propagated-inputs
4971 `(("python-ua-parser" ,python-ua-parser)))
4972 (home-page "https://github.com/selwin/python-user-agents")
4973 (synopsis "User Agent strings parsing library")
4974 (description
4975 "A library to identify devices (phones, tablets) and their capabilities by
4976parsing (browser/HTTP) user agent strings.")
4977 (license license:expat)))
4978
4979(define-public python2-user-agents
4980 (package-with-python2 python-user-agents))
4981
4982(define-public python-dbus
4983 (package
4984 (name "python-dbus")
4985 (version "1.2.8")
4986 (source
4987 (origin
4988 (method url-fetch)
4989 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
4990 "dbus-python-" version ".tar.gz"))
4991 (sha256
4992 (base32
4993 "0vvvjmiwnc9cjlks3gcdk43ap7llhlpz7cm1wbw0nc2yfsxjpwdb"))))
4994 (build-system gnu-build-system)
4995 (arguments
4996 '(#:phases
4997 (modify-phases %standard-phases
4998 (add-before
4999 'check 'pre-check
5000 (lambda _
5001 ;; XXX: For the missing '/etc/machine-id'.
5002 (substitute* "test/run-test.sh"
5003 (("DBUS_FATAL_WARNINGS=1")
5004 "DBUS_FATAL_WARNINGS=0"))
5005 #t)))))
5006 (native-inputs
5007 `(("pkg-config" ,pkg-config)))
5008 (inputs
5009 `(("python" ,python-wrapper)
5010 ("dbus-glib" ,dbus-glib)))
5011 (synopsis "Python bindings for D-bus")
5012 (description "python-dbus provides bindings for libdbus, the reference
5013implementation of D-Bus.")
5014 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5015 (license license:expat)))
5016
5017(define-public python2-dbus
5018 (package (inherit python-dbus)
5019 (name "python2-dbus")
5020 (inputs `(("python" ,python-2)
5021 ,@(alist-delete "python"
5022 (package-inputs python-dbus)
5023 equal?)))
5024 ;; FIXME: on Python 2, the test_utf8 fails with:
5025 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5026 (arguments `(#:tests? #f))))
5027
5028(define-public python-lxml
5029 (package
5030 (name "python-lxml")
5031 (version "4.2.5")
5032 (source
5033 (origin
5034 (method url-fetch)
5035 (uri (pypi-uri "lxml" version))
5036 (sha256
5037 (base32
5038 "0zw0y9hs0nflxhl9cs6ipwwh53szi3w2x06wl0k9cylyqac0cwin"))))
5039 (build-system python-build-system)
5040 (inputs
5041 `(("libxml2" ,libxml2)
5042 ("libxslt" ,libxslt)))
5043 (home-page "http://lxml.de/")
5044 (synopsis
5045 "Python XML processing library")
5046 (description
5047 "The lxml XML toolkit is a Pythonic binding for the C libraries
5048libxml2 and libxslt.")
5049 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5050
5051(define-public python2-lxml
5052 (package-with-python2 python-lxml))
5053
5054;; beautifulsoup4 has a totally different namespace than 3.x,
5055;; and pypi seems to put it under its own name, so I guess we should too
5056(define-public python-beautifulsoup4
5057 (package
5058 (name "python-beautifulsoup4")
5059 (version "4.6.3")
5060 (source
5061 (origin
5062 (method url-fetch)
5063 (uri (pypi-uri "beautifulsoup4" version))
5064 (sha256
5065 (base32
5066 "041dhalzjciw6qyzzq7a2k4h1yvyk76xigp35hv5ibnn448ydy4h"))))
5067 (build-system python-build-system)
5068 (arguments
5069 `(#:phases
5070 (modify-phases %standard-phases
5071 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5072 ;; must use this conversion script when building with Python 3. The
5073 ;; conversion script also runs the tests.
5074 ;; For more information, see the file 'convert-py3k' in the source
5075 ;; distribution.
5076 (replace 'check
dff0197e 5077 (lambda _ (invoke "./convert-py3k"))))))
44d10b1f
RW
5078 (home-page
5079 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5080 (synopsis
5081 "Python screen-scraping library")
5082 (description
5083 "Beautiful Soup is a Python library designed for rapidly setting up
5084screen-scraping projects. It offers Pythonic idioms for navigating,
5085searching, and modifying a parse tree, providing a toolkit for
5086dissecting a document and extracting what you need. It automatically
5087converts incoming documents to Unicode and outgoing documents to UTF-8.")
5088 (license license:expat)
5089 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5090
5091(define-public python2-beautifulsoup4
5092 (package
5093 (inherit (package-with-python2
5094 (strip-python2-variant python-beautifulsoup4)))
5095 (arguments `(#:python ,python-2))))
5096
5097(define-public python-netifaces
5098 (package
5099 (name "python-netifaces")
5100 (version "0.10.7")
5101 (source
5102 (origin
5103 (method url-fetch)
5104 (uri (pypi-uri "netifaces" version))
5105 (sha256
5106 (base32
5107 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5108 (build-system python-build-system)
5109 (home-page "https://github.com/al45tair/netifaces")
5110 (synopsis
5111 "Python module for portable network interface information")
5112 (description
5113 "Netifaces is a Python module providing information on network
5114interfaces in an easy and portable manner.")
5115 (license license:expat)))
5116
5117(define-public python2-netifaces
5118 (package-with-python2 python-netifaces))
5119
5120(define-public python-networkx
5121 (package
5122 (name "python-networkx")
5123 (version "2.2")
5124 (source
5125 (origin
5126 (method url-fetch)
5127 (uri (pypi-uri "networkx" version ".zip"))
5128 (sha256
5129 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5130 (build-system python-build-system)
5131 ;; python-decorator is needed at runtime.
5132 (propagated-inputs
5133 `(("python-decorator" ,python-decorator)))
5134 (native-inputs
5135 `(("python-nose" ,python-nose)
5136 ("unzip" ,unzip)))
5137 (home-page "https://networkx.github.io/")
5138 (synopsis "Python module for creating and manipulating graphs and networks")
5139 (description
5140 "NetworkX is a Python package for the creation, manipulation, and study
5141of the structure, dynamics, and functions of complex networks.")
5142 (license license:bsd-3)))
5143
5144(define-public python2-networkx
5145 (package-with-python2 python-networkx))
5146
5147(define-public python-datrie
5148 (package
5149 (name "python-datrie")
5150 (version "0.7.1")
5151 (source
5152 (origin
5153 (method url-fetch)
5154 (uri (pypi-uri "datrie" version))
5155 (sha256
5156 (base32
5157 "08r0if7dry2q7p34gf7ffyrlnf4bdvnprxgydlfxgfnvq8f3f4bs"))))
5158 (build-system python-build-system)
5159 (arguments
5160 `(#:phases (modify-phases %standard-phases
5161 (add-before 'build 'cythonize
5162 (lambda _
5163 ;; Regenerate Cython classes to solve ABI issues with Python
5164 ;; 3.7.0. See <https://github.com/pytries/datrie/issues/52>.
5165 (invoke "cython" "src/datrie.pyx" "src/cdatrie.pxd"
5166 "src/stdio_ext.pxd" "-a"))))))
5167 (native-inputs
5168 `(("python-cython" ,python-cython)
5169 ("python-hypothesis" ,python-hypothesis)
5170 ("python-pytest" ,python-pytest)
5171 ("python-pytest-runner" ,python-pytest-runner)))
5172 (home-page "https://github.com/kmike/datrie")
5173 (synopsis "Fast, efficiently stored trie for Python")
5174 (description
5175 "This package provides a fast, efficiently stored trie implementation for
5176Python.")
5177 (license license:lgpl2.1+)))
5178
5179(define-public snakemake
5180 (package
5181 (name "snakemake")
5182 (version "5.2.4")
5183 (source
5184 (origin
5185 (method url-fetch)
5186 (uri (pypi-uri "snakemake" version))
5187 (sha256
5188 (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z"))))
5189 (build-system python-build-system)
5190 (arguments
5191 ;; TODO: Package missing test dependencies.
5192 '(#:tests? #f
5193 #:phases
5194 (modify-phases %standard-phases
5195 ;; For cluster execution Snakemake will call Python. Since there is
5196 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5197 ;; this by calling the snakemake wrapper instead.
5198 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5199 (lambda* (#:key outputs #:allow-other-keys)
5200 (substitute* "snakemake/executors.py"
5201 (("\\{sys.executable\\} -m snakemake")
5202 (string-append (assoc-ref outputs "out")
5203 "/bin/snakemake")))
5204 #t)))))
5205 (propagated-inputs
5206 `(("python-gitpython" ,python-gitpython)
5207 ("python-wrapt" ,python-wrapt)
5208 ("python-requests" ,python-requests)
5209 ("python-appdirs" ,python-appdirs)
5210 ("python-configargparse" ,python-configargparse)
5211 ("python-datrie" ,python-datrie)
5212 ("python-docutils" ,python-docutils)
5213 ("python-jinja2" ,python-jinja2)
5214 ("python-jsonschema" ,python-jsonschema)
5215 ("python-networkx" ,python-networkx)
5216 ("python-pyyaml" ,python-pyyaml)
5217 ("python-ratelimiter" ,python-ratelimiter)))
5218 (home-page "https://snakemake.readthedocs.io")
5219 (synopsis "Python-based execution environment for make-like workflows")
5220 (description
5221 "Snakemake aims to reduce the complexity of creating workflows by
5222providing a clean and modern domain specific specification language (DSL) in
5223Python style, together with a fast and comfortable execution environment.")
5224 (license license:expat)))
5225
5226;; This is currently needed for the pigx-* packages.
5227(define-public snakemake-4
5228 (package (inherit snakemake)
5229 (version "4.4.0")
5230 (source
5231 (origin
5232 (method url-fetch)
5233 (uri (pypi-uri "snakemake" version))
5234 (sha256
5235 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
5236 (propagated-inputs
5237 `(("python-wrapt" ,python-wrapt)
5238 ("python-requests" ,python-requests)
5239 ("python-appdirs" ,python-appdirs)
5240 ("python-configargparse" ,python-configargparse)
5241 ("python-pyyaml" ,python-pyyaml)
5242 ("python-ratelimiter" ,python-ratelimiter)))))
5243
5244(define-public python-pyqrcode
5245 (package
5246 (name "python-pyqrcode")
5247 (version "1.2.1")
5248 (source
5249 (origin
5250 (method url-fetch)
5251 (uri (pypi-uri "PyQRCode" version))
5252 (sha256
5253 (base32
5254 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
5255 (build-system python-build-system)
5256 (home-page
5257 "https://github.com/mnooner256/pyqrcode")
5258 (synopsis "QR code generator")
5259 (description
5260 "Pyqrcode is a QR code generator written purely in Python with
5261SVG, EPS, PNG and terminal output.")
5262 (license license:bsd-3)))
5263
5264(define-public python-seaborn
5265 (package
5266 (name "python-seaborn")
5267 (version "0.9.0")
5268 (source
5269 (origin
5270 (method url-fetch)
5271 (uri (pypi-uri "seaborn" version))
5272 (sha256
5273 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
5274 (build-system python-build-system)
5275 (arguments
5276 `(#:phases
5277 (modify-phases %standard-phases
5278 (add-before 'check 'start-xserver
5279 (lambda* (#:key inputs #:allow-other-keys)
5280 (let ((xorg-server (assoc-ref inputs "xorg-server")))
5281 ;; There must be a running X server and make check doesn't
5282 ;; start one. Therefore we must do it.
5283 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
5284 (setenv "DISPLAY" ":1")
5285 #t)))
5286 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
5287 (propagated-inputs
5288 `(("python-pandas" ,python-pandas)
5289 ("python-matplotlib" ,python-matplotlib)
5290 ("python-numpy" ,python-numpy)
5291 ("python-scipy" ,python-scipy)))
5292 (native-inputs
5293 `(("python-pytest" ,python-pytest)
5294 ("xorg-server" ,xorg-server)))
5295 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5296 (synopsis "Statistical data visualization")
5297 (description
5298 "Seaborn is a library for making attractive and informative statistical
5299graphics in Python. It is built on top of matplotlib and tightly integrated
5300with the PyData stack, including support for numpy and pandas data structures
5301and statistical routines from scipy and statsmodels.")
5302 (license license:bsd-3)))
5303
5304(define-public python2-seaborn
5305 (package-with-python2 python-seaborn))
5306
5307(define-public python-mpmath
5308 (package
5309 (name "python-mpmath")
5310 (version "0.19")
5311 (source (origin
5312 (method url-fetch)
5313 (uri (string-append "http://mpmath.org/files/mpmath-"
5314 version ".tar.gz"))
5315 (sha256
5316 (base32
5317 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
5318 (build-system python-build-system)
5319 (arguments
5320 '(#:phases
5321 (modify-phases %standard-phases
5322 (replace 'check
5323 (lambda _
5d7a6f1c 5324 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
44d10b1f
RW
5325 (home-page "http://mpmath.org")
5326 (synopsis "Arbitrary-precision floating-point arithmetic in python")
5327 (description
5328 "@code{mpmath} can be used as an arbitrary-precision substitute for
5329Python's float/complex types and math/cmath modules, but also does much
5330more advanced mathematics.")
5331 (license license:bsd-3)))
5332
5333(define-public python2-mpmath
5334 (package-with-python2 python-mpmath))
5335
5336(define-public python-bigfloat
5337 (package
5338 (name "python-bigfloat")
5339 (version "0.3.0")
5340 (source
5341 (origin
5342 (method url-fetch)
5343 (uri (pypi-uri "bigfloat" version))
5344 (sha256
5345 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
5346 (build-system python-build-system)
5347 (inputs
5348 `(("mpfr" ,mpfr)))
5349 (home-page "https://github.com/mdickinson/bigfloat")
5350 (synopsis "Arbitrary precision floating-point arithmetic for Python")
5351 (description
5352 "This packages provides a Python interface to the MPFR library for
5353multiprecision arithmetic.")
5354 (license license:lgpl3+)))
5355
5356(define-public python2-bigfloat
5357 (package-with-python2 python-bigfloat))
5358
5359(define-public python-sympy
5360 (package
5361 (name "python-sympy")
5362 (version "1.1.1")
5363 (source
5364 (origin
5365 (method url-fetch)
5366 (uri (string-append
5367 "https://github.com/sympy/sympy/releases/download/sympy-"
5368 version "/sympy-" version ".tar.gz"))
5369 (sha256
5370 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
5371 (build-system python-build-system)
5372 (arguments
5373 `(#:phases
5374 (modify-phases %standard-phases
5375 ;; Run the core tests after installation. By default it would run
5376 ;; *all* tests, which take a very long time to complete and are known
5377 ;; to be flaky.
5378 (delete 'check)
5379 (add-after 'install 'check
5380 (lambda* (#:key outputs #:allow-other-keys)
5381 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
5382 #t)))))
5383 (propagated-inputs
5384 `(("python-mpmath" ,python-mpmath)))
5385 (home-page "http://www.sympy.org/")
5386 (synopsis "Python library for symbolic mathematics")
5387 (description
5388 "SymPy is a Python library for symbolic mathematics. It aims to become a
5389full-featured computer algebra system (CAS) while keeping the code as simple
5390as possible in order to be comprehensible and easily extensible.")
5391 (license license:bsd-3)))
5392
5393(define-public python2-sympy
5394 (package
5395 (inherit (package-with-python2 python-sympy))
5396 (arguments
5397 `(#:phases
5398 (modify-phases %standard-phases
5399 ;; Run the core tests after installation. By default it would run
5400 ;; *all* tests, which take a very long time to complete and are known
5401 ;; to be flaky.
5402 (delete 'check)
5403 (add-after 'install 'check
5404 (lambda* (#:key outputs #:allow-other-keys)
5405 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
5406 #t)))))))
5407
5408(define-public python-q
5409 (package
5410 (name "python-q")
5411 (version "2.6")
5412 (source
5413 (origin
5414 (method url-fetch)
5415 (uri (pypi-uri "q" version))
5416 (sha256
5417 (base32
5418 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5419 (build-system python-build-system)
5420 (home-page "https://github.com/zestyping/q")
5421 (synopsis "Quick-and-dirty debugging output for tired programmers")
5422 (description
5423 "q is a Python module for \"print\" style of debugging Python code. It
5424provides convenient short API for print out of values, tracebacks, and
5425falling into the Python interpreter.")
5426 (license license:asl2.0)))
5427
5428(define-public python2-q
5429 (package-with-python2 python-q))
5430
5431(define-public python2-xlib
5432 (package
5433 (name "python2-xlib")
5434 (version "0.14")
5435 (source (origin
5436 (method url-fetch)
5437 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5438 "/" version "/"
5439 "python-xlib-" version ".tar.gz"))
5440 (sha256
5441 (base32
5442 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5443 (build-system python-build-system)
5444 (arguments
5445 `(#:python ,python-2 ;Python 2 only
5446 #:tests? #f)) ;no tests
5447 (home-page "http://python-xlib.sourceforge.net/")
5448 (synopsis "Python X11 client library")
5449 (description
5450 "The Python X Library is intended to be a fully functional X client
5451library for Python programs. It is useful to implement low-level X clients.
5452It is written entirely in Python.")
5453 (license license:gpl2+)))
5454
5455(define-public python-singledispatch
5456 (package
5457 (name "python-singledispatch")
5458 (version "3.4.0.3")
5459 (source
5460 (origin
5461 (method url-fetch)
5462 (uri (pypi-uri "singledispatch" version))
5463 (sha256
5464 (base32
5465 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5466 (build-system python-build-system)
5467 (native-inputs
5468 `(("python-six" ,python-six))) ; required for conversion, not at run-time
5469 (home-page
5470 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5471 (synopsis "Backport of singledispatch feature from Python 3.4")
5472 (description
5473 "This library brings functools.singledispatch from Python 3.4 to Python
54742.6-3.3.")
5475 (license license:expat)))
5476
5477(define-public python2-singledispatch
5478 (package-with-python2 python-singledispatch))
5479
5480;; the python- version can be removed with python-3.5
5481(define-public python-backports-abc
5482 (package
5483 (name "python-backports-abc")
5484 (version "0.5")
5485 (source
5486 (origin
5487 (method url-fetch)
5488 (uri (pypi-uri "backports_abc" version))
5489 (sha256
5490 (base32
5491 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
5492 (build-system python-build-system)
5493 (home-page "https://github.com/cython/backports_abc")
5494 (synopsis "Backport of additions to the 'collections.abc' module")
5495 (description
5496 "Python-backports-abc provides a backport of additions to the
5497'collections.abc' module in Python-3.5.")
5498 (license license:psfl)))
5499
5500(define-public python2-backports-abc
5501 (package-with-python2 python-backports-abc))
5502
5503(define-public python-backports-csv
5504 (package
5505 (name "python-backports-csv")
5506 (version "1.0.5")
5507 (source
5508 (origin
5509 (method url-fetch)
5510 (uri (pypi-uri "backports.csv" version))
5511 (sha256
5512 (base32
5513 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
5514 (build-system python-build-system)
5515 (home-page "https://github.com/ryanhiebert/backports.csv")
5516 (synopsis "Backport of Python 3's csv module for Python 2")
5517 (description
5518 "Provides a backport of Python 3's @code{csv} module for parsing
5519comma separated values. The API of the @code{csv} module in Python 2
5520is drastically different from the @code{csv} module in Python 3.
5521This is due, for the most part, to the difference between str in
5522Python 2 and Python 3.")
5523 (license license:psfl)))
5524
5525(define-public python2-backports-csv
5526 (package-with-python2 python-backports-csv))
5527
5528(define-public python2-backports-shutil-get-terminal-size
5529 (package
5530 (name "python2-backports-shutil-get-terminal-size")
5531 (version "1.0.0")
5532 (source
5533 (origin
5534 (method url-fetch)
5535 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
5536 (sha256
5537 (base32
5538 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
5539 (build-system python-build-system)
5540 (arguments
5541 `(#:python ,python-2
5542 #:phases
5543 (modify-phases %standard-phases
5544 (replace 'check
5545 (lambda _
4a4a7d9a 5546 (invoke "py.test" "-v"))))))
44d10b1f
RW
5547 (native-inputs
5548 `(("python2-pytest" ,python2-pytest)))
5549 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
5550 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
5551 (description
5552 "This package provides a backport of the @code{get_terminal_size
5553function} from Python 3.3's @code{shutil}.
5554Unlike the original version it is written in pure Python rather than C,
5555so it might be a tiny bit slower.")
5556 (license license:expat)))
5557
5558(define-public python-waf
5559 (package
5560 (name "python-waf")
5561 (version "2.0.11")
5562 (source (origin
5563 (method url-fetch)
5564 (uri (string-append "https://waf.io/"
5565 "waf-" version ".tar.bz2"))
5566 (sha256
5567 (base32
5568 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
5569 (build-system python-build-system)
5570 (arguments
5571 '(#:phases
5572 (modify-phases %standard-phases
5573 (replace 'build
5574 (lambda _
5575 (invoke "python" "waf-light" "configure" "build")))
5576 (replace 'check
5577 (lambda _
5578 (invoke "python" "waf" "--version")))
5579 (replace 'install
5580 (lambda* (#:key outputs #:allow-other-keys)
5581 (let ((out (assoc-ref outputs "out")))
5582 (install-file "waf" (string-append out "/bin")))
5583 #t))
5584 ;; waf breaks when it is wrapped.
5585 (delete 'wrap))))
5586 (home-page "https://waf.io/")
5587 (synopsis "Python-based build system")
5588 (description
5589 "Waf is a Python-based framework for configuring, compiling and installing
5590applications.")
5591 (license license:bsd-3)))
5592
5593(define-public python2-waf
5594 (package-with-python2 python-waf))
5595
5596(define-public python-pyzmq
5597 (package
5598 (name "python-pyzmq")
5599 (version "17.1.2")
5600 (source
5601 (origin
5602 (method url-fetch)
5603 (uri (pypi-uri "pyzmq" version))
5604 (sha256
5605 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
5606 (build-system python-build-system)
5607 (arguments
5608 `(#:configure-flags
5609 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5610 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5611 ;; --inplace' for 'python setup.py test' to work.
5612 #:tests? #f))
5613 (inputs
5614 `(("zeromq" ,zeromq)))
5615 (native-inputs
5616 `(("pkg-config" ,pkg-config)
5617 ("python-nose" ,python-nose)))
5618 (home-page "https://github.com/zeromq/pyzmq")
5619 (synopsis "Python bindings for 0MQ")
5620 (description
5621 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
5622 (license license:bsd-4)))
5623
5624(define-public python2-pyzmq
5625 (package-with-python2 python-pyzmq))
5626
5627(define-public python-pep8
5628 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
5629 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
5630 ;; some dependents' test suites, and nothing more.
5631 (package
5632 (name "python-pep8")
5633 (version "1.7.0")
5634 (source
5635 (origin
5636 (method url-fetch)
5637 (uri (pypi-uri "pep8" version))
5638 (sha256
5639 (base32
5640 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
5641 (build-system python-build-system)
5642 (home-page "https://pep8.readthedocs.org/")
5643 (synopsis "Python style guide checker")
5644 (description
5645 "This tools checks Python code against some of the style conventions in
5646PEP 8.")
5647 (license license:expat)))
5648
5649(define-public python2-pep8
5650 (package-with-python2 python-pep8))
5651
5652(define-public python-pyflakes
5653 (package
5654 (name "python-pyflakes")
5655 (version "2.0.0")
5656 (source
5657 (origin
5658 (method url-fetch)
5659 (uri (pypi-uri "pyflakes" version))
5660 (sha256
5661 (base32
5662 "0jba28czyvimdc72llms3f17swp3i8jdcabf5w0j00adfbn64xls"))))
5663 (build-system python-build-system)
5664 (home-page
5665 "https://github.com/pyflakes/pyflakes")
5666 (synopsis "Passive checker of Python programs")
5667 (description
5668 "Pyflakes statically checks Python source code for common errors.")
5669 (license license:expat)))
5670
5671(define-public python2-pyflakes
5672 (package-with-python2 python-pyflakes))
5673
5674(define-public python-mccabe
5675 (package
5676 (name "python-mccabe")
5677 (version "0.6.1")
5678 (source
5679 (origin
5680 (method url-fetch)
5681 (uri (pypi-uri "mccabe" version))
5682 (sha256
5683 (base32
5684 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
5685 (build-system python-build-system)
5686 (native-inputs
5687 `(("python-pytest" ,python-pytest-bootstrap)
5688 ("python-pytest-runner" ,python-pytest-runner)))
5689 (home-page "https://github.com/flintwork/mccabe")
5690 (synopsis "McCabe checker, plugin for flake8")
5691 (description
5692 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5693complexity of Python source code.")
5694 (license license:expat)))
5695
5696(define-public python2-mccabe
5697 (package-with-python2 python-mccabe))
5698
5699(define-public python-mccabe-0.2.1
5700 (package (inherit python-mccabe)
5701 (version "0.2.1")
5702 (source
5703 (origin
5704 (method url-fetch)
5705 (uri (pypi-uri "mccabe" version))
5706 (sha256
5707 (base32
5708 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
5709
5710(define-public python2-mccabe-0.2.1
5711 (package-with-python2 python-mccabe-0.2.1))
5712
5713;; Flake8 2.4.1 requires an older version of pep8.
5714;; This should be removed ASAP.
5715(define-public python-pep8-1.5.7
5716 (package (inherit python-pep8)
5717 (version "1.5.7")
5718 (source
f3576970
RW
5719 (origin
5720 (method url-fetch)
5721 (uri (pypi-uri "pep8" version))
5722 (sha256
5723 (base32
5724 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
44d10b1f
RW
5725 (arguments
5726 ;; XXX Tests not compatible with Python 3.5.
5727 '(#:tests? #f))))
5728
5729(define-public python2-pep8-1.5.7
5730 (package-with-python2 python-pep8-1.5.7))
5731
5732;; Flake8 2.4.1 requires an older version of pyflakes.
5733;; This should be removed ASAP.
5734(define-public python-pyflakes-0.8.1
5735 (package (inherit python-pyflakes)
5736 (version "0.8.1")
5737 (source
8c4dffb5
RW
5738 (origin
5739 (method url-fetch)
5740 (uri (pypi-uri "pyflakes" version))
5741 (sha256
5742 (base32
5743 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
44d10b1f
RW
5744 (arguments
5745 ;; XXX Tests not compatible with Python 3.5.
5746 '(#:tests? #f))))
5747
5748(define-public python2-pyflakes-0.8.1
5749 (package-with-python2 python-pyflakes-0.8.1))
5750
ac63cf0a 5751(define-public python-flake8
44d10b1f
RW
5752 (package
5753 (name "python-flake8")
ac63cf0a
MB
5754 (version "3.6.0")
5755 (source (origin
5756 (method url-fetch)
5757 (uri (pypi-uri "flake8" version))
5758 (sha256
5759 (base32
5760 "0w0nprx22rbvrrkbfx9v5jc5gskbm08g219l7r8wai8zfswgadba"))))
44d10b1f
RW
5761 (build-system python-build-system)
5762 (arguments
5763 `(#:phases
5764 (modify-phases %standard-phases
44d10b1f
RW
5765 (delete 'check)
5766 (add-after 'install 'check
5767 (lambda* (#:key inputs outputs #:allow-other-keys)
5768 (add-installed-pythonpath inputs outputs)
5769 (invoke "pytest" "-v")
5770 #t)))))
5771 (propagated-inputs
5772 `(("python-pycodestyle" ,python-pycodestyle)
5773 ("python-pyflakes" ,python-pyflakes)
5774 ("python-mccabe" ,python-mccabe)))
5775 (native-inputs
5776 `(("python-mock" ,python-mock)
5777 ("python-pytest" ,python-pytest-bootstrap)
5778 ("python-pytest-runner" ,python-pytest-runner)))
5779 (home-page "https://gitlab.com/pycqa/flake8")
5780 (synopsis
5781 "The modular source code checker: pep8, pyflakes and co")
5782 (description
5783 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
ac63cf0a 5784 (properties `((python2-variant . ,(delay python2-flake8))))
44d10b1f
RW
5785 (license license:expat)))
5786
ac63cf0a
MB
5787(define-public python2-flake8
5788 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
44d10b1f
RW
5789 (package (inherit base)
5790 (propagated-inputs
5791 `(("python2-configparser" ,python2-configparser)
5792 ("python2-enum34" ,python2-enum34)
5793 ,@(package-propagated-inputs base))))))
5794
44d10b1f
RW
5795;; python-hacking requires flake8 <2.6.0.
5796(define-public python-flake8-2.5
5797 (package
5798 (inherit python-flake8)
5799 (version "2.5.5")
5800 (source (origin
5801 (method url-fetch)
5802 (uri (pypi-uri "flake8" version))
5803 (sha256
5804 (base32
5805 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
5806 (propagated-inputs
5807 `(("python-pep8" ,python-pep8)
5808 ,@(package-propagated-inputs python-flake8)))
5809 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
5810
5811(define-public python2-flake8-2.5
5812 (package
5813 (inherit python2-flake8)
5814 (version (package-version python-flake8-2.5))
5815 (source (origin
5816 (inherit (package-source python-flake8-2.5))))
5817 (propagated-inputs
5818 `(("python2-pep8" ,python2-pep8)
5819 ,@(package-propagated-inputs python2-flake8)))))
5820
5821(define-public python-flake8-polyfill
5822 (package
5823 (name "python-flake8-polyfill")
5824 (version "1.0.2")
5825 (source
5826 (origin
5827 (method url-fetch)
5828 (uri (pypi-uri "flake8-polyfill" version))
5829 (sha256
5830 (base32
5831 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
5832 (build-system python-build-system)
5833 (arguments
5834 '(#:phases
5835 (modify-phases %standard-phases
5836 (replace 'check
5837 (lambda _
5838 (setenv "PYTHONPATH"
5839 (string-append (getcwd) "/build/lib:"
5840 (getenv "PYTHONPATH")))
4f0a0894 5841 (invoke "py.test" "-v"))))))
44d10b1f
RW
5842 (native-inputs
5843 `(("python-flake8" ,python-flake8)
5844 ("python-mock" ,python-mock)
5845 ("python-pep8" ,python-pep8)
5846 ("python-pycodestyle" ,python-pycodestyle)
5847 ("python-pytest" ,python-pytest)))
5848 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
5849 (synopsis "Polyfill package for Flake8 plugins")
5850 (description
5851 "This package that provides some compatibility helpers for Flake8
5852plugins that intend to support Flake8 2.x and 3.x simultaneously.")
5853 (license license:expat)))
5854
5855(define-public python2-flake8-polyfill
5856 (package-with-python2 python-flake8-polyfill))
5857
5858(define-public python-mistune
5859 (package
5860 (name "python-mistune")
5861 (version "0.8.4")
5862 (source
5863 (origin
5864 (method url-fetch)
5865 (uri (pypi-uri "mistune" version))
5866 (sha256
5867 (base32
5868 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
5869 (build-system python-build-system)
5870 (native-inputs
5871 `(("python-nose" ,python-nose)
5872 ("python-cython" ,python-cython)))
5873 (home-page "https://github.com/lepture/mistune")
5874 (synopsis "Markdown parser in pure Python")
5875 (description "This package provides a fast markdown parser in pure
5876Python.")
5877 (license license:bsd-3)))
5878
5879(define-public python2-mistune
5880 (package-with-python2 python-mistune))
5881
5882(define-public python-markdown
5883 (package
5884 (name "python-markdown")
5885 (version "3.0.1")
5886 (source
5887 (origin
5888 (method url-fetch)
5889 (uri (pypi-uri "Markdown" version))
5890 (sha256
5891 (base32
5892 "0z6v8649sr434d5r5zmrhydka7v7f9yas4bwcgkcs0650jdhybnh"))))
5893 (build-system python-build-system)
5894 (native-inputs
5895 `(("python-nose" ,python-nose)
5896 ("python-pyyaml" ,python-pyyaml)))
5897 (home-page "https://python-markdown.github.io/")
5898 (synopsis "Python implementation of Markdown")
5899 (description
5900 "This package provides a Python implementation of John Gruber's
5901Markdown. The library features international input, various Markdown
5902extensions, and several HTML output formats. A command line wrapper
5903markdown_py is also provided to convert Markdown files to HTML.")
5904 (license license:bsd-3)))
5905
5906(define-public python2-markdown
5907 (package-with-python2 python-markdown))
5908
5909(define-public python-ptyprocess
5910 (package
5911 (name "python-ptyprocess")
5912 (version "0.5.2")
5913 (source
5914 (origin
5915 (method url-fetch)
5916 (uri (pypi-uri "ptyprocess" version))
5917 (sha256
5918 (base32
5919 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
5920 (build-system python-build-system)
5921 (native-inputs
5922 `(("python-nose" ,python-nose)))
5923 (arguments
5924 `(#:phases
5925 (modify-phases %standard-phases
5926 (replace 'check
7904d6fa 5927 (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
5928 (home-page "https://github.com/pexpect/ptyprocess")
5929 (synopsis "Run a subprocess in a pseudo terminal")
5930 (description
5931 "This package provides a Python library used to launch a subprocess in a
5932pseudo terminal (pty), and interact with both the process and its pty.")
5933 (license license:isc)))
5934
5935(define-public python2-ptyprocess
5936 (package-with-python2 python-ptyprocess))
5937
5938(define-public python-cram
5939 (package
5940 (name "python-cram")
5941 (version "0.7")
5942 (home-page "https://bitheap.org/cram/")
5943 (source (origin
5944 (method url-fetch)
5945 (uri (list (string-append home-page "cram-"
5946 version ".tar.gz")
5947 (pypi-uri "cram" version)))
5948 (sha256
5949 (base32
5950 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
5951 (arguments
5952 '(#:phases
5953 (modify-phases %standard-phases
5954 (add-after 'unpack 'patch-source
5955 (lambda _
5956 (substitute* (find-files "cram" ".*\\.py$")
5957 ;; Replace default shell path.
5958 (("/bin/sh") (which "sh")))
5959 (substitute* (find-files "tests" ".*\\.t$")
5960 (("md5") "md5sum")
5961 (("/bin/bash") (which "bash"))
5962 (("/bin/sh") (which "sh")))
5963 (substitute* "cram/_test.py"
5964 ;; This hack works around a bug triggered by substituting
5965 ;; the /bin/sh paths. "tests/usage.t" compares the output of
5966 ;; "cram -h", which breaks the output at 80 characters. This
5967 ;; causes the line showing the default shell to break into two
5968 ;; lines, but the test expects a single line...
5969 (("env\\['COLUMNS'\\] = '80'")
5970 "env['COLUMNS'] = '160'"))
5971 #t))
5972 (delete 'check)
5973 (add-after 'install 'check
5974 ;; The test phase uses the built library and executable.
5975 ;; It's easier to run it after install since the build
5976 ;; directory contains version-specific PATH.
5977 (lambda* (#:key inputs outputs #:allow-other-keys)
5978 (add-installed-pythonpath inputs outputs)
5979 (setenv "PATH" (string-append (getenv "PATH") ":"
5980 (assoc-ref outputs "out") "/bin"))
2d7db192 5981 (invoke "make" "test"))))))
44d10b1f
RW
5982 (build-system python-build-system)
5983 (native-inputs
5984 `(("python-coverage" ,python-coverage)
5985 ("which" ,which)))
5986 (synopsis "Simple testing framework for command line applications")
5987 (description
5988 "Cram is a functional testing framework for command line applications.
5989Cram tests look like snippets of interactive shell sessions. Cram runs each
5990command and compares the command output in the test with the command’s actual
5991output.")
5992 (license license:gpl2+)))
5993
5994(define-public python2-cram
5995 (package-with-python2 python-cram))
5996
5997(define-public python-straight-plugin
5998 (package
5999 (name "python-straight-plugin")
6000 (version "1.4.1")
6001 (source
6002 (origin
6003 (method url-fetch)
6004 (uri (pypi-uri "straight.plugin" version))
6005 (sha256
6006 (base32
6007 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6008 (build-system python-build-system)
6009 (home-page "https://github.com/ironfroggy/straight.plugin")
6010 (synopsis "Simple namespaced plugin facility")
6011 (description "Straight Plugin provides a type of plugin you can create from
6012almost any existing Python modules, and an easy way for outside developers to
6013add functionality and customization to your projects with their own plugins.")
6014 (license license:expat)))
6015
6016(define-public python2-straight-plugin
6017 (package-with-python2 python-straight-plugin))
6018
6019(define-public python-fonttools
6020 (package
6021 (name "python-fonttools")
59bd5a4a 6022 (version "3.37.3")
44d10b1f
RW
6023 (source (origin
6024 (method url-fetch)
6025 (uri (pypi-uri "fonttools" version ".zip"))
6026 (sha256
6027 (base32
59bd5a4a 6028 "0k90g0q1h4var3kq6xn6zs3j1ghff97hwyn1gdqfdywsldas9668"))))
44d10b1f
RW
6029 (build-system python-build-system)
6030 (native-inputs
6031 `(("unzip" ,unzip)
6032 ("python-pytest" ,python-pytest)
6033 ("python-pytest-runner" ,python-pytest-runner)))
6034 (home-page "https://github.com/behdad/fonttools")
6035 (synopsis "Tools to manipulate font files")
6036 (description
6037 "FontTools/TTX is a library to manipulate font files from Python. It
6038supports reading and writing of TrueType/OpenType fonts, reading and writing
6039of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6040also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6041from an XML-based format.")
6042 (license license:expat)))
6043
6044(define-public python2-fonttools
6045 (package-with-python2 python-fonttools))
6046
6047(define-public python-ly
6048 (package
6049 (name "python-ly")
6050 (version "0.9.5")
6051 (source
6052 (origin
6053 (method url-fetch)
6054 (uri (pypi-uri name version))
6055 (sha256
6056 (base32
6057 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6058 (build-system python-build-system)
6059 (arguments
6060 ;; FIXME: Some tests need network access.
6061 '(#:tests? #f))
6062 (synopsis "Tool and library for manipulating LilyPond files")
6063 (description "This package provides a Python library to parse, manipulate
6064or create documents in LilyPond format. A command line program ly is also
6065provided that can be used to do various manipulations with LilyPond files.")
6066 (home-page "https://pypi.python.org/pypi/python-ly")
6067 (license license:gpl2+)))
6068
6069(define-public python-appdirs
6070 (package
6071 (name "python-appdirs")
6072 (version "1.4.3")
6073 (source
6074 (origin
6075 (method url-fetch)
6076 (uri (pypi-uri "appdirs" version))
6077 (sha256
6078 (base32
6079 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6080 (build-system python-build-system)
6081 (home-page "https://github.com/ActiveState/appdirs")
6082 (synopsis
6083 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6084 (description
6085 "This module provides a portable way of finding out where user data
6086should be stored on various operating systems.")
6087 (license license:expat)))
6088
6089(define-public python2-appdirs
6090 (package-with-python2 python-appdirs))
6091
6092(define-public python-llfuse
6093 (package
6094 (name "python-llfuse")
6095 (version "1.3.5")
6096 (source (origin
6097 (method url-fetch)
6098 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6099 (sha256
6100 (base32
6101 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6102 (build-system python-build-system)
6103 (inputs
6104 `(("fuse" ,fuse)
6105 ("attr" ,attr)))
6106 (native-inputs
6107 `(("pkg-config" ,pkg-config)))
6108 (synopsis "Python bindings for FUSE")
6109 (description
6110 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6111 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6112 (license license:lgpl2.0+)
6113 (properties `((python2-variant . ,(delay python2-llfuse))))))
6114
6115(define-public python2-llfuse
6116 (package (inherit (package-with-python2
6117 (strip-python2-variant python-llfuse)))
6118 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6119
6120;; For attic-0.16
6121(define-public python-llfuse-0.41
6122 (package (inherit python-llfuse)
6123 (version "0.41.1")
6124 (source (origin
6125 (method url-fetch)
6126 (uri (string-append
6127 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6128 "llfuse-" version ".tar.bz2"))
6129 (sha256
6130 (base32
6131 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6132 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6133 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6134 (license (list license:expat license:lgpl2.0+))))
6135
6136(define-public python-msgpack
6137 (package
6138 (name "python-msgpack")
6139 (version "0.5.6")
6140 (source (origin
6141 (method url-fetch)
6142 (uri (pypi-uri "msgpack" version))
6143 (sha256
6144 (base32
6145 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6146 (build-system python-build-system)
6147 (arguments
6148 `(#:modules ((guix build utils)
6149 (guix build python-build-system)
6150 (ice-9 ftw)
6151 (srfi srfi-1)
6152 (srfi srfi-26))
6153 #:phases
6154 (modify-phases %standard-phases
6155 (replace 'check
6156 (lambda _
6157 (let ((cwd (getcwd)))
6158 (setenv "PYTHONPATH"
6159 (string-append cwd "/build/"
6160 (find (cut string-prefix? "lib" <>)
6161 (scandir (string-append cwd "/build")))
6162 ":"
6163 (getenv "PYTHONPATH")))
6164 (invoke "pytest" "-v" "test")))))))
6165 (native-inputs
6166 `(("python-pytest" ,python-pytest)))
6167 (synopsis "MessagePack (de)serializer")
6168 (description "MessagePack is a fast, compact binary serialization format,
6169suitable for similar data to JSON. This package provides CPython bindings for
6170reading and writing MessagePack data.")
6171 (home-page "https://pypi.python.org/pypi/msgpack/")
6172 (license license:asl2.0)))
6173
6174;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6175;; release 0.5. Some packages like borg still call it by the old name for now.
6176;; <https://bugs.gnu.org/30662>
6177(define-public python-msgpack-transitional
6178 (package
6179 (inherit python-msgpack)
6180 (name "python-msgpack-transitional")
6181 (arguments
6182 (substitute-keyword-arguments (package-arguments python-msgpack)
6183 ((#:phases phases)
6184 `(modify-phases ,phases
6185 (add-after 'unpack 'configure-transitional
6186 (lambda _
6187 ;; Keep using the old name.
6188 (substitute* "setup.py"
6189 (("TRANSITIONAL = False")
6190 "TRANSITIONAL = 1"))
6191 #t))))))))
6192
6193(define-public python2-msgpack
6194 (package-with-python2 python-msgpack))
6195
6196(define-public python-netaddr
6197 (package
6198 (name "python-netaddr")
6199 (version "0.7.19")
6200 (source
6201 (origin
6202 (method url-fetch)
6203 (uri (pypi-uri "netaddr" version))
6204 (sha256
6205 (base32
6206 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6207 (build-system python-build-system)
6208 (arguments `(#:tests? #f)) ;; No tests.
6209 (home-page "https://github.com/drkjam/netaddr/")
6210 (synopsis "Pythonic manipulation of network addresses")
6211 (description
6212 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6213and MAC network addresses.")
6214 (license license:bsd-3)))
6215
6216(define-public python2-netaddr
6217 (package-with-python2 python-netaddr))
6218
6219(define-public python-wrapt
6220 (package
6221 (name "python-wrapt")
dddd7a75 6222 (version "1.11.1")
44d10b1f
RW
6223 (source
6224 (origin
6225 (method url-fetch)
6226 (uri (pypi-uri "wrapt" version))
6227 (sha256
6228 (base32
dddd7a75 6229 "0cqmysny1pz01jw26q48q5zasvns6507rwhgm6wcw743f0r01sja"))))
44d10b1f
RW
6230 (build-system python-build-system)
6231 (arguments
6232 ;; Tests are not included in the tarball, they are only available in the
6233 ;; git repository.
6234 `(#:tests? #f))
6235 (home-page "https://github.com/GrahamDumpleton/wrapt")
6236 (synopsis "Module for decorators, wrappers and monkey patching")
6237 (description
6238 "The aim of the wrapt module is to provide a transparent object proxy for
6239 Python, which can be used as the basis for the construction of function
6240 wrappers and decorator functions.")
6241 (license license:bsd-2)))
6242
6243(define-public python2-wrapt
6244 (package-with-python2 python-wrapt))
6245
6246(define-public python-xlrd
6247 (package
6248 (name "python-xlrd")
6249 (version "1.0.0")
6250 (source (origin
6251 (method url-fetch)
6252 (uri (pypi-uri "xlrd" version))
6253 (sha256
6254 (base32
6255 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
6256 (build-system python-build-system)
6257 (arguments
6258 `(#:phases
6259 (modify-phases %standard-phases
6260 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
6261 ;; run tests instead for now.
45fd0081 6262 (replace 'check (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
6263 (native-inputs `(("python-nose" ,python-nose)))
6264 (home-page "http://www.python-excel.org/")
6265 (synopsis "Library for extracting data from Excel files")
6266 (description "This packages provides a library to extract data from
6267spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
6268@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6269Unicode-aware. It is not intended as an end-user tool.")
6270 (license license:bsd-3)))
6271
6272(define-public python2-xlrd
6273 (package-with-python2 python-xlrd))
6274
6275(define-public python-prettytable
6276 (package
6277 (name "python-prettytable")
6278 (version "0.7.2")
6279 (source
6280 (origin
6281 (method url-fetch)
337c3a1e 6282 (uri (pypi-uri "prettytable" version ".tar.bz2"))
44d10b1f
RW
6283 (sha256
6284 (base32
6285 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6286 (build-system python-build-system)
6287 (home-page "http://code.google.com/p/prettytable/")
6288 (synopsis "Display tabular data in an ASCII table format")
6289 (description
6290 "A library designed to represent tabular data in visually appealing ASCII
6291tables. PrettyTable allows for selection of which columns are to be printed,
6292independent alignment of columns (left or right justified or centred) and
6293printing of sub-tables by specifying a row range.")
6294 (license license:bsd-3)))
6295
6296(define-public python2-prettytable
6297 (package-with-python2 python-prettytable))
6298
6299(define-public python-tables
6300 (package
6301 (name "python-tables")
6302 (version "3.4.4")
6303 (source
6304 (origin
6305 (method url-fetch)
6306 (uri (pypi-uri "tables" version))
6307 (sha256
6308 (base32
6309 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
6310 (modules '((guix build utils)))
6311 (snippet
6312 '(begin
6313 ;; Remove pre-compiled .pyc files from source.
6314 (for-each delete-file-recursively
6315 (find-files "." "__pycache__" #:directories? #t))
6316 (for-each delete-file (find-files "." "\\.pyc$"))
6317 #t))))
6318 (build-system python-build-system)
6319 (arguments
6320 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6321 ;; or "check", so we must override the build and check phases.
6322 #:phases
6323 (modify-phases %standard-phases
6324 (add-after 'unpack 'use-gcc
6325 (lambda _
6326 (substitute* "setup.py"
6327 (("compiler = new_compiler\\(\\)" line)
6328 (string-append line
6329 "\ncompiler.set_executables(compiler='gcc',"
6330 "compiler_so='gcc',"
6331 "linker_exe='gcc',"
6332 "linker_so='gcc -shared')")))
6333 #t))
6334 (replace 'build
6335 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
6336 (invoke "python" "setup.py" "build"
6337 (string-append "--hdf5="
6338 (assoc-ref inputs "hdf5")))))
44d10b1f
RW
6339 (replace 'check
6340 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
6341 (invoke "python" "setup.py" "check"
6342 (string-append "--hdf5="
6343 (assoc-ref inputs "hdf5"))))))))
44d10b1f
RW
6344 (propagated-inputs
6345 `(("python-numexpr" ,python-numexpr)
6346 ("python-numpy" ,python-numpy)))
6347 (native-inputs
6348 `(("python-cython" ,python-cython)
6349 ("pkg-config" ,pkg-config)))
6350 (inputs
6351 `(("hdf5" ,hdf5)
6352 ("bzip2" ,bzip2)
6353 ("zlib" ,zlib)))
6354 (home-page "http://www.pytables.org/")
6355 (synopsis "Hierarchical datasets for Python")
6356 (description "PyTables is a package for managing hierarchical datasets and
6357designed to efficiently cope with extremely large amounts of data.")
6358 (license license:bsd-3)))
6359
6360(define-public python2-tables
6361 (package-with-python2 python-tables))
6362
6363(define-public python-pyasn1
6364 (package
6365 (name "python-pyasn1")
6366 (version "0.4.3")
6367 (source
6368 (origin
6369 (method url-fetch)
6370 (uri (pypi-uri "pyasn1" version))
6371 (sha256
6372 (base32
6373 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
6374 (build-system python-build-system)
6375 (home-page "http://pyasn1.sourceforge.net/")
6376 (synopsis "ASN.1 types and codecs")
6377 (description
6378 "This is an implementation of ASN.1 types and codecs in Python. It is
6379suitable for a wide range of protocols based on the ASN.1 specification.")
6380 (license license:bsd-2)))
6381
6382(define-public python2-pyasn1
6383 (package-with-python2 python-pyasn1))
6384
6385(define-public python-pyasn1-modules
6386 (package
6387 (name "python-pyasn1-modules")
6388 (version "0.2.2")
6389 (source
6390 (origin
6391 (method url-fetch)
6392 (uri (pypi-uri "pyasn1-modules" version))
6393 (sha256
6394 (base32
6395 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
6396 (build-system python-build-system)
6397 (propagated-inputs
6398 `(("python-pyasn1" ,python-pyasn1)))
6399 (home-page "https://sourceforge.net/projects/pyasn1/")
6400 (synopsis "ASN.1 codec implementations")
6401 (description
6402 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6403implementations of ASN.1-based codecs and protocols.")
6404 (license license:bsd-3)))
6405
6406(define-public python2-pyasn1-modules
6407 (package-with-python2 python-pyasn1-modules))
6408
6409(define-public python-ipaddress
6410 (package
6411 (name "python-ipaddress")
6412 (version "1.0.22")
6413 (source (origin
6414 (method url-fetch)
6415 (uri (pypi-uri "ipaddress" version))
6416 (sha256
6417 (base32
6418 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
6419 (build-system python-build-system)
6420 (home-page "https://github.com/phihag/ipaddress")
6421 (synopsis "IP address manipulation library")
6422 (description
6423 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6424 in Python. This library is used to create, poke at, and manipulate IPv4 and
6425 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6426 module to older versions of Python.")
6427 (license license:psfl)))
6428
6429(define-public python2-ipaddress
6430 (package-with-python2 python-ipaddress))
6431
6432(define-public python2-ipaddr
6433 (package
6434 (name "python2-ipaddr")
6435 (version "2.1.11")
6436 (source
6437 (origin
6438 (method url-fetch)
6439 (uri (pypi-uri "ipaddr" version))
6440 (sha256
6441 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6442 (build-system python-build-system)
6443 (arguments
6444 `(#:python ,python-2 ;version 2 only
6445 #:phases
6446 (modify-phases %standard-phases
6447 (replace 'check
40b8c4e3 6448 (lambda _ (invoke "python" "ipaddr_test.py"))))))
44d10b1f
RW
6449 (home-page "https://github.com/google/ipaddr-py")
6450 (synopsis "IP address manipulation library")
6451 (description
6452 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6453IPv6 addresses and networks.
6454
6455For new implementations you may prefer to use the standard module
6456@code{ipaddress}, which was introduced in Python 3.3 and backported to older
6457versions of Python.")
6458 (license license:asl2.0)))
6459
6460(define-public python-idna
6461 (package
6462 (name "python-idna")
6463 (version "2.7")
6464 (source
6465 (origin
6466 (method url-fetch)
6467 (uri (pypi-uri "idna" version))
6468 (sha256
6469 (base32
6470 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))
6471 (build-system python-build-system)
6472 (home-page "https://github.com/kjd/idna")
6473 (synopsis "Internationalized domain names in applications")
6474 (description
6475 "This is a library to support the Internationalised Domain Names in
6476Applications (IDNA) protocol as specified in RFC 5891. This version of the
6477protocol is often referred to as “IDNA2008” and can produce different results
6478from the earlier standard from 2003. The library is also intended to act as a
6479suitable drop-in replacement for the “encodings.idna” module that comes with
6480the Python standard library but currently only supports the older 2003
6481specification.")
6482 (license license:bsd-4)))
6483
6484(define-public python2-idna
6485 (package-with-python2 python-idna))
6486
6487(define-public python-idna-ssl
6488 (package
6489 (name "python-idna-ssl")
6490 (version "1.0.1")
6491 (source
6492 (origin
6493 (method url-fetch)
6494 (uri (pypi-uri "idna-ssl" version))
6495 (sha256
6496 (base32
6497 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
6498 (build-system python-build-system)
6499 (arguments
6500 `(#:tests? #f)) ;circular dependency with python-aiohttp
6501 (home-page "https://github.com/aio-libs/idna-ssl")
6502 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
6503 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
6504domains support.")
6505 (license license:expat)))
6506
6507(define-public python-pretend
6508 (package
6509 (name "python-pretend")
6510 (version "1.0.9")
6511 (source
6512 (origin
6513 (method url-fetch)
9f1f22ee 6514 (uri (pypi-uri "pretend" version))
44d10b1f
RW
6515 (sha256
6516 (base32
6517 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
6518 (build-system python-build-system)
6519 (home-page "https://github.com/alex/pretend")
6520 (synopsis "Library for stubbing in Python")
6521 (description
6522 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6523technique for writing tests. You may hear the term mixed up with mocks,
6524fakes, or doubles. Basically, a stub is an object that returns pre-canned
6525responses, rather than doing any computation.")
6526 (license license:bsd-3)))
6527
6528(define-public python2-pretend
6529 (package-with-python2 python-pretend))
6530
6531(define-public python-pip
6532 (package
6533 (name "python-pip")
6534 (version "18.1")
6535 (source
6536 (origin
6537 (method url-fetch)
6538 (uri (pypi-uri "pip" version))
6539 (sha256
6540 (base32
6541 "188fclay154s520n43s7cxxlhdaiysvxf19zk8vr1xbyjyyr58n0"))))
6542 (build-system python-build-system)
6543 (arguments
6544 '(#:tests? #f)) ; there are no tests in the pypi archive.
6545 (home-page "https://pip.pypa.io/")
6546 (synopsis "Package manager for Python software")
6547 (description
6548 "Pip is a package manager for Python software, that finds packages on the
6549Python Package Index (PyPI).")
6550 (license license:expat)))
6551
6552(define-public python2-pip
6553 (package-with-python2 python-pip))
6554
6555(define-public python-tlsh
6556 (package
6557 (name "python-tlsh")
6558 (version "3.4.5")
6559 (home-page "https://github.com/trendmicro/tlsh")
6560 (source (origin
6561 (method url-fetch)
6562 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6563 version ".tar.gz"))
6564 (sha256
6565 (base32
6566 "1x1vahd4zg5kpyr9h9hs3fvh460p25rjy4cclwdnbbw8x3vc30q3"))
6567 (file-name (string-append name "-" version ".tar.gz"))))
6568 (build-system cmake-build-system)
6569 (arguments
6570 '(#:out-of-source? #f
6571 #:phases (modify-phases %standard-phases
6572 (replace
6573 'install
6574 (lambda* (#:key outputs #:allow-other-keys)
6575 ;; Build and install the Python bindings. The underlying
6576 ;; C++ library is apparently not meant to be installed.
6577 (let ((out (assoc-ref outputs "out")))
6578 (with-directory-excursion "py_ext"
6579 (and (system* "python" "setup.py" "build")
6580 (system* "python" "setup.py" "install"
6581 (string-append "--prefix=" out))))))))))
6582 (inputs `(("python" ,python-wrapper))) ;for the bindings
6583 (synopsis "Fuzzy matching library for Python")
6584 (description
6585 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6586Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6587value which can be used for similarity comparisons. Similar objects have
6588similar hash values, which allows for the detection of similar objects by
6589comparing their hash values. The byte stream should have a sufficient amount
6590of complexity; for example, a byte stream of identical bytes will not generate
6591a hash value.")
6592 (license license:asl2.0)))
6593
6594(define-public python2-tlsh
6595 (package
6596 (inherit python-tlsh)
6597 (name "python2-tlsh")
6598 (inputs `(("python" ,python-2)))))
6599
6600(define-public python-termcolor
6601 (package
6602 (name "python-termcolor")
6603 (version "1.1.0")
6604 (source
6605 (origin
6606 (method url-fetch)
6607 (uri (pypi-uri "termcolor" version))
6608 (sha256
6609 (base32
6610 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6611 (build-system python-build-system)
6612 (arguments
6613 ;; There are no tests.
6614 `(#:tests? #f))
6615 (home-page "https://pypi.python.org/pypi/termcolor")
6616 (synopsis "ANSII Color formatting for terminal output")
6617 (description
6618 "This package provides ANSII Color formatting for output in terminals.")
6619 (license license:expat)))
6620
6621(define-public python2-termcolor
6622 (package-with-python2 python-termcolor))
6623
6624(define-public python-libarchive-c
6625 (package
6626 (name "python-libarchive-c")
6627 (version "2.8")
6628 (source (origin
6629 (method url-fetch)
6630 (uri (pypi-uri "libarchive-c" version))
6631 (sha256
6632 (base32
6633 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
6634 (build-system python-build-system)
6635 (arguments
6636 '(#:phases (modify-phases %standard-phases
6637 (add-before
6638 'build 'reference-libarchive
6639 (lambda* (#:key inputs #:allow-other-keys)
6640 ;; Retain the absolute file name of libarchive.so.
6641 (let ((libarchive (assoc-ref inputs "libarchive")))
6642 (substitute* "libarchive/ffi.py"
6643 (("find_library\\('archive'\\)")
6644 (string-append "'" libarchive
6645 "/lib/libarchive.so'"))))))
6646 (replace 'check
6647 (lambda _ (invoke "pytest" "-vv"))))))
6648 (native-inputs
6649 `(("python-mock" ,python-mock)
6650 ("python-pytest" ,python-pytest)))
6651 (inputs
6652 `(("libarchive" ,libarchive)))
6653 (home-page "https://github.com/Changaco/python-libarchive-c")
6654 (synopsis "Python interface to libarchive")
6655 (description
6656 "This package provides Python bindings to libarchive, a C library to
6657access possibly compressed archives in many different formats. It uses
6658Python's @code{ctypes} foreign function interface (FFI).")
6659 (license license:lgpl2.0+)))
6660
6661(define-public python2-libarchive-c
6662 (package-with-python2 python-libarchive-c))
6663
6664(define-public python-file
6665 (package
6666 (inherit file)
6667 (name "python-file")
6668 (build-system python-build-system)
6669 (arguments
6670 '(#:tests? #f ;no tests
6671 #:configure-flags '("--single-version-externally-managed" "--root=/")
6672 #:phases (modify-phases %standard-phases
6673 (add-before 'build 'change-directory
6674 (lambda _
6675 (chdir "python")
6676 #t))
6677 (add-before 'build 'set-library-file-name
6678 (lambda* (#:key inputs #:allow-other-keys)
6679 (let ((file (assoc-ref inputs "file")))
6680 (substitute* "magic.py"
6681 (("find_library\\('magic'\\)")
6682 (string-append "'" file "/lib/libmagic.so'")))
6683 #t))))))
6684 (inputs `(("file" ,file)))
6685 (self-native-input? #f)
6686 (synopsis "Python bindings to the libmagic file type guesser. Note that
6687this module and the python-magic module both provide a \"magic.py\" file;
6688these two modules, which are different and were developed separately, both
6689serve the same purpose: provide Python bindings for libmagic.")))
6690
6691(define-public python2-file
6692 (package-with-python2 python-file))
6693
6694(define-public python-debian
6695 (package
6696 (name "python-debian")
6697 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
6698 (version "0.1.28")
6699 (source
6700 (origin
6701 (method url-fetch)
6702 (uri (pypi-uri name version))
6703 (sha256
6704 (base32
6705 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
6706 (build-system python-build-system)
6707 (propagated-inputs
6708 `(("python-six" ,python-six)))
6709 (synopsis "Debian package related modules")
6710 (description
6711 ;; XXX: Use @enumerate instead of @itemize to work around
6712 ;; <http://bugs.gnu.org/21772>.
6713 "This package provides Python modules that abstract many formats of
6714Debian-related files, such as:
6715
6716@enumerate
6717@item Debtags information;
6718@item @file{debian/changelog} files;
6719@item packages files, pdiffs;
6720@item control files of single or multiple RFC822-style paragraphs---e.g.
6721 @file{debian/control}, @file{.changes}, @file{.dsc};
6722@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6723 contained files and meta-information.
6724@end enumerate\n")
6725
6726 ;; Modules are either GPLv2+ or GPLv3+.
6727 (license license:gpl3+)))
6728
6729(define-public python2-debian
6730 (package-with-python2 python-debian))
6731
6732(define-public python-nbformat
6733 (package
6734 (name "python-nbformat")
6735 (version "4.4.0")
6736 (source
6737 (origin
6738 (method url-fetch)
6739 (uri (pypi-uri "nbformat" version))
6740 (sha256
6741 (base32
6742 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
6743 (build-system python-build-system)
6744 (arguments `(#:tests? #f)) ; no test target
6745 (propagated-inputs
6746 `(("python-ipython-genutils" ,python-ipython-genutils)
6747 ("python-jsonschema" ,python-jsonschema)
6748 ("python-jupyter-core" ,python-jupyter-core)
6749 ("python-traitlets" ,python-traitlets)))
6750 (home-page "http://jupyter.org")
6751 (synopsis "Jupyter Notebook format")
6752 (description "This package provides the reference implementation of the
6753Jupyter Notebook format and Python APIs for working with notebooks.")
6754 (license license:bsd-3)))
6755
6756(define-public python2-nbformat
6757 (package-with-python2 python-nbformat))
6758
6759(define-public python-bleach
6760 (package
6761 (name "python-bleach")
6762 (version "1.4.3")
6763 (source
6764 (origin
6765 (method url-fetch)
6766 (uri (pypi-uri "bleach" version))
6767 (sha256
6768 (base32
6769 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
6770 (build-system python-build-system)
6771 (propagated-inputs
6772 `(("python-html5lib" ,python-html5lib-0.9)
6773 ("python-six" ,python-six)))
6774 (native-inputs
6775 `(("python-nose" ,python-nose)))
6776 (home-page "https://github.com/jsocol/bleach")
6777 (synopsis "Whitelist-based HTML-sanitizing tool")
6778 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
6779 (license license:asl2.0)))
6780
6781(define-public python2-bleach
6782 (package-with-python2 python-bleach))
6783
6784(define-public python-entrypoints
6785 (package
6786 (name "python-entrypoints")
a7f1b718 6787 (version "0.3")
44d10b1f
RW
6788 (source
6789 (origin
6790 (method url-fetch)
a7f1b718 6791 (uri (pypi-uri "entrypoints" version))
44d10b1f
RW
6792 (sha256
6793 (base32
a7f1b718 6794 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
44d10b1f
RW
6795 (build-system python-build-system)
6796 ;; The package does not come with a setup.py file, so we have to generate
6797 ;; one ourselves.
6798 (arguments
6799 `(#:tests? #f
6800 #:phases
6801 (modify-phases %standard-phases
6802 (add-after 'unpack 'create-setup.py
6803 (lambda _
6804 (call-with-output-file "setup.py"
6805 (lambda (port)
6806 (format port "\
6807from setuptools import setup
6808setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
6809" ,version))))))))
6810 (home-page "https://github.com/takluyver/entrypoints")
6811 (synopsis "Discover and load entry points from installed Python packages")
6812 (description "Entry points are a way for Python packages to advertise
6813objects with some common interface. The most common examples are
6814@code{console_scripts} entry points, which define shell commands by
6815identifying a Python function to run. The @code{entrypoints} module contains
6816functions to find and load entry points.")
6817 (license license:expat)))
6818
6819(define-public python2-entrypoints
6820 (package-with-python2 python-entrypoints))
6821
6822(define-public python-nbconvert
6823 (package
6824 (name "python-nbconvert")
6825 (version "5.0.0b1")
6826 (source
6827 (origin
6828 (method url-fetch)
6829 (uri (pypi-uri "nbconvert" version))
6830 (sha256
6831 (base32
6832 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
6833 (build-system python-build-system)
6834 (arguments
6835 `(;; The "bdist_egg" target is disabled by default, causing the installation
6836 ;; to fail.
6837 #:configure-flags (list "bdist_egg")
6838 ;; FIXME: 5 failures, 40 errors.
6839 #:tests? #f))
6840 ;; #:phases
6841 ;; (modify-phases %standard-phases
6842 ;; (replace 'check
6843 ;; (lambda _
6844 ;; (zero? (system* "py.test" "-v")))))
6845 (native-inputs
6846 `(("python-pytest" ,python-pytest)))
6847 (propagated-inputs
6848 `(("python-bleach" ,python-bleach)
6849 ("python-entrypoints" ,python-entrypoints)
6850 ("python-jinja2" ,python-jinja2)
6851 ("python-jupyter-core" ,python-jupyter-core)
6852 ("python-mistune" ,python-mistune)
6853 ("python-nbformat" ,python-nbformat)
6854 ("python-pygments" ,python-pygments)
6855 ("python-traitlets" ,python-traitlets)))
6856 (home-page "http://jupyter.org")
6857 (synopsis "Converting Jupyter Notebooks")
6858 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
6859notebooks to various other formats via Jinja templates. It allows you to
6860convert an @code{.ipynb} notebook file into various static formats including:
6861
6862@enumerate
6863@item HTML
6864@item LaTeX
6865@item PDF
6866@item Reveal JS
6867@item Markdown (md)
6868@item ReStructured Text (rst)
6869@item executable script
6870@end enumerate\n")
6871 (license license:bsd-3)))
6872
6873(define-public python2-nbconvert
6874 (package-with-python2 python-nbconvert))
6875
44d10b1f
RW
6876(define-public python-notebook
6877 (package
6878 (name "python-notebook")
6879 (version "5.7.4")
6880 (source (origin
6881 (method url-fetch)
6882 (uri (pypi-uri "notebook" version))
6883 (sha256
6884 (base32
6885 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
6886 (build-system python-build-system)
6887 (arguments
6888 `(#:phases
6889 (modify-phases %standard-phases
6890 (replace 'check
6891 (lambda _
6892 ;; These tests require a browser
6893 (delete-file-recursively "notebook/tests/selenium")
6894 ;; Some tests need HOME
6895 (setenv "HOME" "/tmp")
6896 ;; This file contains "warningfilters", which are not supported
6897 ;; by this version of nose.
6898 (delete-file "setup.cfg")
6899 (with-directory-excursion "/tmp"
6900 (invoke "nosetests" "-v"))
6901 #t)))))
6902 (propagated-inputs
6903 `(("python-jupyter-core" ,python-jupyter-core)
6904 ("python-nbformat" ,python-nbformat)
6905 ("python-nbconvert" ,python-nbconvert)
6906 ("python-prometheus-client" ,python-prometheus-client)
6907 ("python-send2trash" ,python-send2trash)
6908 ("python-terminado" ,python-terminado)))
6909 (native-inputs
6910 `(("python-nose" ,python-nose)
6911 ("python-sphinx" ,python-sphinx)
6912 ("python-requests" ,python-requests)))
6913 (home-page "http://jupyter.org/")
6914 (synopsis "Web-based notebook environment for interactive computing")
6915 (description
6916 "The Jupyter HTML notebook is a web-based notebook environment for
6917interactive computing.")
6918 (properties `((python2-variant . ,(delay python2-notebook))))
6919 (license license:bsd-3)))
6920
6921(define-public python2-notebook
6922 (let ((base (package-with-python2
6923 (strip-python2-variant python-notebook))))
6924 (package (inherit base)
6925 (native-inputs
6926 `(("python2-mock" ,python2-mock)
6927 ,@(package-native-inputs base)))
6928 (arguments
6929 (substitute-keyword-arguments (package-arguments base)
6930 ((#:phases phases)
6931 `(modify-phases ,phases
6932 (add-before 'check 'disable-test-case
6933 ;; The test requires network access to localhost. Curiously it
6934 ;; fails with Python 2 only. Simply make the test-case return
6935 ;; immediately.
6936 (lambda _
6937 (substitute*
6938 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
6939 (("formats = self.nbconvert_api") "return #")))))))))))
6940
6941(define-public python-widgetsnbextension
6942 (package
6943 (name "python-widgetsnbextension")
6944 (version "3.4.2")
6945 (source
6946 (origin
6947 (method url-fetch)
6948 (uri (pypi-uri "widgetsnbextension" version))
6949 (sha256
6950 (base32
6951 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
6952 (build-system python-build-system)
6953 (propagated-inputs
6954 `(("python-ipykernel" ,python-ipykernel)
6955 ("python-notebook" ,python-notebook)))
6956 (native-inputs
6957 `(("python-certifi" ,python-certifi)
6958 ("python-nose" ,python-nose)))
6959 (home-page "https://ipython.org")
6960 (synopsis "IPython HTML widgets for Jupyter")
6961 (description "This package provides interactive HTML widgets for Jupyter
6962notebooks.")
6963 (license license:bsd-3)))
6964
6965(define-public python2-widgetsnbextension
6966 (package-with-python2 python-widgetsnbextension))
6967
6968(define-public python-ipywidgets
6969 (package
6970 (name "python-ipywidgets")
6971 (version "5.2.2")
6972 (source
6973 (origin
6974 (method url-fetch)
6975 (uri (pypi-uri "ipywidgets" version))
6976 (sha256
6977 (base32
6978 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
6979 (build-system python-build-system)
6980 (propagated-inputs
6981 `(("python-ipython" ,python-ipython)
6982 ("python-traitlets" ,python-traitlets)
6983 ("python-widgetsnbextension" ,python-widgetsnbextension)))
6984 (native-inputs
6985 `(("python-nose" ,python-nose)
6986 ("python-pytest" ,python-pytest)))
6987 (home-page "https://ipython.org")
6988 (synopsis "IPython HTML widgets for Jupyter")
6989 (description "Ipywidgets are interactive HTML widgets for Jupyter
6990notebooks and the IPython kernel. Notebooks come alive when interactive
6991widgets are used. Users gain control of their data and can visualize changes
6992in the data.")
6993 (license license:bsd-3)))
6994
6995(define-public python2-ipywidgets
6996 (package-with-python2 python-ipywidgets))
6997
6998(define-public python-jupyter-console
6999 (package
7000 (name "python-jupyter-console")
7001 (version "5.2.0")
7002 (source
7003 (origin
7004 (method url-fetch)
7005 (uri (pypi-uri "jupyter_console" version))
7006 (sha256
7007 (base32
7008 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7009 (build-system python-build-system)
7010 ;; Tests only run in an TTY.
7011 (arguments `(#:tests? #f))
7012 (propagated-inputs
7013 `(("python-ipykernel" ,python-ipykernel)
7014 ("python-jupyter-client" ,python-jupyter-client)
7015 ("python-prompt-toolkit" ,python-prompt-toolkit-1)
7016 ("python-pygments" ,python-pygments)))
7017 (native-inputs
7018 `(("python-nose" ,python-nose)))
7019 (home-page "https://jupyter.org")
7020 (synopsis "Jupyter terminal console")
7021 (description "This package provides a terminal-based console frontend for
7022Jupyter kernels. It also allows for console-based interaction with non-Python
7023Jupyter kernels such as IJulia and IRKernel.")
7024 (license license:bsd-3)))
7025
7026(define-public python2-jupyter-console
7027 (package-with-python2 python-jupyter-console))
7028
7029;; The python-ipython and python-jupyter-console require each other. To get
7030;; the functionality in both packages working, strip down the
7031;; python-jupyter-console package when using it as an input to python-ipython.
7032(define python-jupyter-console-minimal
7033 (package
7034 (inherit python-jupyter-console)
7035 (name "python-jupyter-console-minimal")
7036 (arguments
7037 (substitute-keyword-arguments
7038 (package-arguments python-jupyter-console)
7039 ((#:phases phases)
7040 `(modify-phases ,phases
7041 (add-after 'install 'delete-bin
7042 (lambda* (#:key outputs #:allow-other-keys)
7043 ;; Delete the bin files, to avoid conflicts in profiles
7044 ;; where python-ipython and python-jupyter-console are
7045 ;; both present.
7046 (delete-file-recursively
7047 (string-append
7048 (assoc-ref outputs "out") "/bin"))))))))
7049 ;; Remove the python-ipython propagated input, to avoid the cycle
7050 (propagated-inputs
7051 (alist-delete
7052 "python-ipython"
7053 (package-propagated-inputs python-jupyter-console)))))
7054
7055(define-public python-qtconsole
7056 (package
7057 (name "python-qtconsole")
7058 (version "4.4.3")
7059 (source
7060 (origin
7061 (method url-fetch)
7062 (uri (pypi-uri "qtconsole" version))
7063 (sha256
7064 (base32
7065 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
7066 (build-system python-build-system)
7067 (arguments
7068 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
7069 ;; but we only have the LTS version 5.x. This means that there might be
7070 ;; runtime errors, but since this is a dependency of the Jupyter package,
7071 ;; and Jupyter can be used without the qtconsole we can overlook this for
7072 ;; now.
7073 `(#:tests? #f
7074 #:phases
7075 (modify-phases %standard-phases
7076 (add-before 'check 'pre-check
7077 (lambda _
7078 (setenv "QT_QPA_PLATFORM" "offscreen")
7079 #t)))))
7080 (propagated-inputs
7081 `(("python-ipykernel" ,python-ipykernel)
7082 ("python-ipython" ,python-ipython)))
7083 (native-inputs
7084 `(("python-pytest" ,python-pytest)))
7085 (home-page "http://jupyter.org")
7086 (synopsis "Jupyter Qt console")
7087 (description "This package provides a Qt-based console for Jupyter with
7088support for rich media output.")
7089 (license license:bsd-3)))
7090
7091(define-public jupyter
7092 (package
7093 (name "jupyter")
7094 (version "1.0.0")
7095 (source
7096 (origin
7097 (method url-fetch)
7098 (uri (pypi-uri "jupyter" version))
7099 (sha256
7100 (base32
7101 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7102 (build-system python-build-system)
7103 (arguments '(#:tests? #f)) ; there are none.
7104 (propagated-inputs
7105 `(("python-ipykernel" ,python-ipykernel)
7106 ("python-ipywidgets" ,python-ipywidgets)
7107 ("python-jupyter-console" ,python-jupyter-console)
7108 ("python-nbconvert" ,python-nbconvert)
7109 ("python-notebook" ,python-notebook)
7110 ("python-qtconsole" ,python-qtconsole)))
7111 (native-search-paths
7112 (list (search-path-specification
7113 (variable "JUPYTER_PATH")
7114 (files '("share/jupyter")))))
7115 (home-page "https://jupyter.org")
7116 (synopsis "Web application for interactive documents")
7117 (description
7118 "The Jupyter Notebook is a web application that allows you to create and
7119share documents that contain live code, equations, visualizations and
7120explanatory text. Uses include: data cleaning and transformation, numerical
7121simulation, statistical modeling, machine learning and much more.")
7122 (license license:bsd-3)))
7123
7124(define-public python-chardet
7125 (package
7126 (name "python-chardet")
7127 (version "3.0.4")
7128 (source
7129 (origin
7130 (method url-fetch)
7131 (uri (pypi-uri "chardet" version))
7132 (sha256
7133 (base32
7134 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
7135 (native-inputs
7136 `(("python-hypothesis" ,python-hypothesis)
7137 ("python-pytest" ,python-pytest)
7138 ("python-pytest-runner" ,python-pytest-runner)))
7139 (build-system python-build-system)
7140 (home-page "https://github.com/chardet/chardet")
7141 (synopsis "Universal encoding detector for Python 2 and 3")
7142 (description
7143 "This package provides @code{chardet}, a Python module that can
7144automatically detect a wide range of file encodings.")
7145 (license license:lgpl2.1+)))
7146
7147(define-public python2-chardet
7148 (package-with-python2 python-chardet))
7149
7150(define-public python-docopt
7151 (package
7152 (name "python-docopt")
7153 (version "0.6.2")
7154 (source
7155 (origin
7156 (method url-fetch)
7157 ;; The release on PyPI does not include tests.
7158 (uri (string-append
7159 "https://github.com/docopt/docopt/archive/"
7160 version ".tar.gz"))
7161 (file-name (string-append name "-" version ".tar.gz"))
7162 (sha256
7163 (base32
7164 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7165 (build-system python-build-system)
7166 (native-inputs
7167 `(("python-pytest" ,python-pytest)))
7168 (arguments
7169 `(#:phases
7170 (modify-phases %standard-phases
7171 (replace 'check
7172 (lambda _ (invoke "py.test"))))))
7173 (home-page "http://docopt.org")
7174 (synopsis "Command-line interface description language for Python")
7175 (description "This library allows the user to define a command-line
7176interface from a program's help message rather than specifying it
7177programatically with command-line parsers like @code{getopt} and
7178@code{argparse}.")
7179 (license license:expat)))
7180
7181(define-public python2-docopt
7182 (package-with-python2 python-docopt))
7183
7184(define-public python-pythondialog
7185 (package
7186 (name "python-pythondialog")
7187 (version "3.4.0")
7188 (source
7189 (origin
7190 (method url-fetch)
7191 (uri (pypi-uri "pythondialog" version))
7192 (sha256
7193 (base32
7194 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
7195 (build-system python-build-system)
7196 (arguments
7197 `(#:phases
7198 (modify-phases %standard-phases
7199 (add-after 'unpack 'patch-path
7200 (lambda* (#:key inputs #:allow-other-keys)
7201 (let* ((dialog (assoc-ref inputs "dialog")))
7202 ;; Since this library really wants to grovel the search path, we
7203 ;; must hardcode dialog's store path into it.
7204 (substitute* "dialog.py"
7205 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7206 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7207 #t))))
7208 #:tests? #f)) ; no test suite
7209 (propagated-inputs
7210 `(("dialog" ,dialog)))
7211 (home-page "http://pythondialog.sourceforge.net/")
7212 (synopsis "Python interface to the UNIX dialog utility")
7213 (description "A Python wrapper for the dialog utility. Its purpose is to
7214provide an easy to use, pythonic and comprehensive Python interface to dialog.
7215This allows one to make simple text-mode user interfaces on Unix-like systems")
7216 (license license:lgpl2.1)
7217 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7218
7219(define-public python2-pythondialog
7220 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7221 (package
7222 (inherit base)
7223 (version (package-version python-pythondialog))
7224 (source (origin
7225 (method url-fetch)
7226 (uri (pypi-uri "python2-pythondialog" version))
7227 (sha256
7228 (base32
7229 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
7230
7231(define-public python-configobj
7232 (package
7233 (name "python-configobj")
7234 (version "5.0.6")
7235 (source (origin
7236 (method url-fetch)
b0758fbb 7237 (uri (pypi-uri "configobj" version))
44d10b1f
RW
7238 (sha256
7239 (base32
7240 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7241 ;; Patch setup.py so it looks for python-setuptools, which is
7242 ;; required to parse the keyword 'install_requires' in setup.py.
7243 (patches (search-patches "python-configobj-setuptools.patch"))))
7244 (build-system python-build-system)
7245 (propagated-inputs
7246 `(("python-six" ,python-six)))
7247 (synopsis "Config file reading, writing and validation")
7248 (description "ConfigObj is a simple but powerful config file reader and
7249writer: an ini file round tripper. Its main feature is that it is very easy to
7250use, with a straightforward programmer’s interface and a simple syntax for
7251config files.")
7252 (home-page "https://github.com/DiffSK/configobj")
7253 (license license:bsd-3)))
7254
7255(define-public python2-configobj
7256 (package-with-python2 python-configobj))
7257
7258(define-public python-configargparse
7259 (package
7260 (name "python-configargparse")
86ae491f 7261 (version "0.14.0")
44d10b1f
RW
7262 (source (origin
7263 (method url-fetch)
7264 (uri (pypi-uri "ConfigArgParse" version))
7265 (sha256
7266 (base32
86ae491f 7267 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
44d10b1f
RW
7268 (build-system python-build-system)
7269 (native-inputs
7270 `(("python-pyyaml" ,python-pyyaml)))
7271 (arguments
7272 `(#:phases
7273 (modify-phases %standard-phases
7274 (replace 'check
7275 (lambda _
7276 ;; Bypass setuptools-shim because one test relies on "setup.py"
7277 ;; being the first argument passed to the python call.
7278 ;;
7279 ;; NOTE: Many tests do not run because they rely on Python's
7280 ;; built-in test.test_argparse, but we remove the unit tests from
7281 ;; our Python installation.
7282 (invoke "python" "setup.py" "test"))))))
7283 (synopsis "Replacement for argparse")
7284 (description "A drop-in replacement for argparse that allows options to also
7285be set via config files and/or environment variables.")
7286 (home-page "https://github.com/bw2/ConfigArgParse")
7287 (license license:expat)))
7288
7289(define-public python2-configargparse
7290 (package-with-python2 python-configargparse))
7291
7292(define-public python-argparse-manpage
7293 (package
7294 (name "python-argparse-manpage")
7295 (version "1.1")
7296 (source
7297 (origin
7298 (method url-fetch)
7299 (uri (pypi-uri "argparse-manpage" version))
7300 (sha256
7301 (base32
7302 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
7303 (build-system python-build-system)
7304 (home-page "https://github.com/praiskup/argparse-manpage")
7305 (synopsis "Build manual page from Python's ArgumentParser object")
7306 (description
7307 "This package provides tools to build manual pages from Python's
7308@code{ArgumentParser} object.")
7309 (license license:asl2.0)))
7310
7311(define-public python2-contextlib2
7312 (package
7313 (name "python2-contextlib2")
7314 (version "0.5.5")
7315 (source
7316 (origin
7317 (method url-fetch)
7318 (uri (pypi-uri "contextlib2" version))
7319 (sha256
7320 (base32
7321 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
7322 (build-system python-build-system)
7323 (arguments
7324 `(#:python ,python-2
7325 #:phases
7326 (modify-phases %standard-phases
7327 (replace 'check
7328 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
7329 (native-inputs
7330 `(("python2-unittest2" ,python2-unittest2)))
7331 (home-page "http://contextlib2.readthedocs.org/")
7332 (synopsis "Tools for decorators and context managers")
7333 (description "This module is primarily a backport of the Python
73343.2 contextlib to earlier Python versions. Like contextlib, it
7335provides utilities for common tasks involving decorators and context
7336managers. It also contains additional features that are not part of
7337the standard library.")
7338 (license license:psfl)))
7339
7340(define-public python-texttable
7341 (package
7342 (name "python-texttable")
7343 (version "0.8.7")
7344 (source
7345 (origin
7346 (method url-fetch)
7347 (uri (pypi-uri "texttable" version))
7348 (sha256
7349 (base32
7350 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
7351 (build-system python-build-system)
7352 (arguments '(#:tests? #f)) ; no tests
7353 (home-page "https://github.com/foutaise/texttable/")
7354 (synopsis "Python module for creating simple ASCII tables")
7355 (description "Texttable is a Python module for creating simple ASCII
7356tables.")
7357 (license license:lgpl2.1+)))
7358
7359(define-public python2-texttable
7360 (package-with-python2 python-texttable))
7361
7362(define-public python-atomicwrites
7363 (package
7364 (name "python-atomicwrites")
14f10479 7365 (version "1.3.0")
44d10b1f
RW
7366 (source (origin
7367 (method url-fetch)
7368 (uri (pypi-uri "atomicwrites" version))
7369 (sha256
7370 (base32
14f10479 7371 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
44d10b1f
RW
7372 (build-system python-build-system)
7373 (synopsis "Atomic file writes in Python")
7374 (description "Library for atomic file writes using platform dependent tools
7375for atomic file system operations.")
7376 (home-page "https://github.com/untitaker/python-atomicwrites")
7377 (license license:expat)))
7378
7379(define-public python2-atomicwrites
7380 (package-with-python2 python-atomicwrites))
7381
7382(define-public python-click-threading
7383 (package
7384 (name "python-click-threading")
7385 (version "0.4.4")
7386 (source (origin
7387 (method url-fetch)
7388 (uri (pypi-uri "click-threading" version))
7389 (sha256
7390 (base32
7391 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
7392 (build-system python-build-system)
7393 (propagated-inputs
7394 `(("python-click" ,python-click)))
7395 (synopsis "Utilities for multithreading in Click")
7396 (description "This package provides utilities for multithreading in Click
7397applications.")
7398 (home-page "https://github.com/click-contrib/click-threading")
7399 (license license:expat)))
7400
7401(define-public python-click-log
7402 (package
7403 (name "python-click-log")
7404 (version "0.3.2")
7405 (source (origin
7406 (method url-fetch)
7407 (uri (pypi-uri "click-log" version))
7408 (sha256
7409 (base32
7410 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
7411 (build-system python-build-system)
7412 (propagated-inputs
7413 `(("python-click" ,python-click)))
7414 (synopsis "Logging for click applications")
7415 (description "This package provides a Python library for logging Click
7416applications.")
7417 (home-page "https://github.com/click-contrib/click-log")
7418 (license license:expat)))
7419
7420(define-public python-apipkg
7421 (package
7422 (name "python-apipkg")
7423 (version "1.4")
7424 (source (origin
7425 (method url-fetch)
7426 (uri (pypi-uri "apipkg" version))
7427 (sha256
7428 (base32
7429 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7430 (build-system python-build-system)
7431 (native-inputs
7432 `(("python-pytest" ,python-pytest)))
7433 (synopsis "Namespace control and lazy-import mechanism")
7434 (description "With apipkg you can control the exported namespace of a Python
7435package and greatly reduce the number of imports for your users. It is a small
7436pure Python module that works on virtually all Python versions.")
7437 (home-page "https://github.com/pytest-dev/apipkg")
7438 (license license:expat)))
7439
7440(define-public python2-apipkg
7441 (package-with-python2 python-apipkg))
7442
7443(define-public python-execnet
7444 (package
7445 (name "python-execnet")
7446 (version "1.4.1")
7447 (source (origin
7448 (method url-fetch)
7449 (uri (pypi-uri "execnet" version))
7450 (sha256
7451 (base32
7452 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7453 (build-system python-build-system)
7454 (arguments
7455 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
7456 ;; The two test failures are caused by the lack of an `ssh` executable.
7457 ;; The test suite can be run with pytest after the 'install' phase.
7458 #:tests? #f))
7459 (native-inputs
7460 `(("python-pytest" ,python-pytest)
7461 ("python-setuptools-scm" ,python-setuptools-scm)))
7462 (propagated-inputs
7463 `(("python-apipkg" ,python-apipkg)))
7464 (synopsis "Rapid multi-Python deployment")
7465 (description "Execnet provides a share-nothing model with
7466channel-send/receive communication for distributing execution across many
7467Python interpreters across version, platform and network barriers. It has a
7468minimal and fast API targeting the following uses:
7469@enumerate
7470@item distribute tasks to (many) local or remote CPUs
7471@item write and deploy hybrid multi-process applications
7472@item write scripts to administer multiple environments
7473@end enumerate")
7474 (home-page "http://codespeak.net/execnet/")
7475 (license license:expat)))
7476
7477(define-public python2-execnet
7478 (package-with-python2 python-execnet))
7479
7480(define-public python-icalendar
7481 (package
7482 (name "python-icalendar")
7483 (version "4.0.3")
7484 (source (origin
7485 (method url-fetch)
7486 (uri (pypi-uri "icalendar" version))
7487 (sha256
7488 (base32
7489 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
7490 (build-system python-build-system)
7491 (propagated-inputs
7492 `(("python-dateutil" ,python-dateutil)
7493 ("python-pytz" ,python-pytz)))
7494 (synopsis "Python library for parsing iCalendar files")
7495 (description "The icalendar package is a parser/generator of iCalendar
7496files for use with Python.")
7497 (home-page "https://github.com/collective/icalendar")
7498 (license license:bsd-2)))
7499
7500(define-public python-sphinxcontrib-newsfeed
7501 (package
7502 (name "python-sphinxcontrib-newsfeed")
7503 (version "0.1.4")
7504 (source (origin
7505 (method url-fetch)
7506 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
7507 (sha256
7508 (base32
7509 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
7510 (arguments '(#:tests? #f)) ; No tests.
7511 (build-system python-build-system)
7512 (propagated-inputs
7513 `(("python-sphinx" ,python-sphinx)))
7514 (synopsis "News Feed extension for Sphinx")
7515 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
7516Blog, News or Announcements section to a Sphinx website.")
7517 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
7518 (license license:bsd-2)))
7519
7520(define-public python-args
7521 (package
7522 (name "python-args")
7523 (version "0.1.0")
7524 (source (origin
7525 (method url-fetch)
7526 (uri (pypi-uri "args" version))
7527 (sha256
7528 (base32
7529 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
7530 (build-system python-build-system)
7531 (home-page "https://github.com/kennethreitz/args")
7532 (synopsis "Command-line argument parser")
7533 (description
7534 "This library provides a Python module to parse command-line arguments.")
7535 (license license:bsd-3)))
7536
7537(define-public python2-args
7538 (package-with-python2 python-args))
7539
7540(define-public python-clint
7541 (package
7542 (name "python-clint")
7543 (version "0.5.1")
7544 (source (origin
7545 (method url-fetch)
7546 (uri (pypi-uri "clint" version))
7547 (sha256
7548 (base32
7549 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
7550 (build-system python-build-system)
7551 (arguments
7552 '(#:phases
7553 (modify-phases %standard-phases
7554 (replace 'check
7555 (lambda _ (invoke "py.test" "-v"))))))
7556 (native-inputs
7557 `(("python-pytest" ,python-pytest)))
7558 (propagated-inputs
7559 `(("python-args" ,python-args)))
7560 (home-page "https://github.com/kennethreitz/clint")
7561 (synopsis "Command-line interface tools")
7562 (description
7563 "Clint is a Python module filled with a set of tools for developing
7564command-line applications, including tools for colored and indented
7565output, progress bar display, and pipes.")
7566 (license license:isc)))
7567
7568(define-public python2-clint
7569 (package-with-python2 python-clint))
7570
44d10b1f
RW
7571(define-public python-rply
7572 (package
7573 (name "python-rply")
7574 (version "0.7.5")
7575 (source (origin
7576 (method url-fetch)
7577 (uri (pypi-uri "rply" version))
7578 (sha256
7579 (base32
7580 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
7581 (build-system python-build-system)
7582 (propagated-inputs
7583 `(("python-appdirs" ,python-appdirs)))
7584 (home-page "https://github.com/alex/rply")
7585 (synopsis "Parser generator for Python")
7586 (description
7587 "This package provides a pure Python based parser generator, that also
7588works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
7589with a new public API, and RPython support.")
7590 (license license:bsd-3)))
7591
7592(define-public python2-rply
7593 (package-with-python2 python-rply))
7594
7595(define-public python-hy
7596 (package
7597 (name "python-hy")
7598 (version "0.13.0")
7599 (source (origin
7600 (method url-fetch)
7601 (uri (pypi-uri "hy" version))
7602 (sha256
7603 (base32
7604 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
7605 (build-system python-build-system)
7606 (arguments
7607 '(#:phases
7608 (modify-phases %standard-phases
7609 (replace 'check
7610 (lambda _
7611 ;; Tests require write access to HOME.
7612 (setenv "HOME" "/tmp")
7613 (invoke "nosetests"))))))
7614 (native-inputs
7615 `(("python-coverage" ,python-coverage)
7616 ("python-nose" ,python-nose)))
7617 (propagated-inputs
7618 `(("python-astor" ,python-astor)
7619 ("python-clint" ,python-clint)
7620 ("python-rply" ,python-rply)))
7621 (home-page "http://hylang.org/")
7622 (synopsis "Lisp frontend to Python")
7623 (description
7624 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
7625its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
7626Python at your fingertips, in Lisp form.")
7627 (license license:expat)))
7628
7629(define-public python2-hy
7630 (package-with-python2 python-hy))
7631
7632(define-public python2-functools32
7633 (package
7634 (name "python2-functools32")
7635 (version "3.2.3-2")
7636 (source
7637 (origin
7638 (method url-fetch)
7639 (uri (pypi-uri "functools32" version))
7640 (sha256
7641 (base32
7642 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
7643 (build-system python-build-system)
7644 (arguments
7645 `(#:python ,python-2
7646 #:tests? #f)) ; no test target
7647 (home-page "https://github.com/MiCHiLU/python-functools32")
7648 (synopsis
7649 "Backport of the functools module from Python 3.2.3")
7650 (description
7651 "This package is a backport of the @code{functools} module from Python
76523.2.3 for use with older versions of Python and PyPy.")
7653 (license license:expat)))
7654
7655(define-public python2-subprocess32
7656 (package
7657 (name "python2-subprocess32")
7658 (version "3.2.7")
7659 (source (origin
7660 (method url-fetch)
7661 (uri (pypi-uri "subprocess32" version))
7662 (sha256
7663 (base32
7664 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
7665 (patches
7666 (search-patches "python2-subprocess32-disable-input-test.patch"))))
7667 (build-system python-build-system)
7668 (arguments
7669 `(#:python ,python-2
7670 ;; The test suite fails with Python > 2.7.13:
7671 ;; import test.support
7672 ;; ImportError: No module named support
7673 #:tests? #f
7674 #:phases
7675 (modify-phases %standard-phases
7676 (add-after 'unpack 'patch-/bin/sh
7677 (lambda _
7678 (substitute* '("subprocess32.py"
7679 "test_subprocess32.py")
7680 (("/bin/sh") (which "sh")))
7681 #t)))))
7682 (home-page "https://github.com/google/python-subprocess32")
7683 (synopsis "Backport of the subprocess module from Python 3.2")
7684 (description
7685 "This is a backport of the @code{subprocess} standard library module
7686from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
7687new features. On POSIX systems it is guaranteed to be reliable when used
7688in threaded applications. It includes timeout support from Python 3.3 but
7689otherwise matches 3.2’s API.")
7690 (license license:psfl)))
7691
7692(define-public python2-futures
7693 (package
7694 (name "python2-futures")
7695 (version "3.2.0")
7696 (source
7697 (origin
7698 (method url-fetch)
7699 (uri (pypi-uri "futures" version))
7700 (sha256
7701 (base32
7702 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
7703 (build-system python-build-system)
ba88eea2
RW
7704 (arguments
7705 `(#:python ,python-2
7706 #:phases
7707 (modify-phases %standard-phases
7708 (replace 'check
7709 (lambda _
7710 (invoke "python" "test_futures.py")
7711 #t)))))
44d10b1f
RW
7712 (home-page "https://github.com/agronholm/pythonfutures")
7713 (synopsis
7714 "Backport of the concurrent.futures package from Python 3.2")
7715 (description
7716 "The concurrent.futures module provides a high-level interface for
7717asynchronously executing callables. This package backports the
7718concurrent.futures package from Python 3.2")
7719 (license license:bsd-3)))
7720
7721(define-public python-promise
7722 (package
7723 (name "python-promise")
7724 (version "0.4.2")
7725 (source
7726 (origin
7727 (method url-fetch)
7728 (uri (pypi-uri "promise" version))
7729 (sha256
7730 (base32
7731 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
7732 (build-system python-build-system)
7733 ;; Tests wants python-futures, which is a python2 only program, and
7734 ;; can't be found by python-promise at test time.
7735 (arguments `(#:tests? #f))
7736 (home-page "https://github.com/syrusakbary/promise")
7737 (synopsis "Promises/A+ implementation for Python")
7738 (description
7739 "Promises/A+ implementation for Python")
7740 (properties `((python2-variant . ,(delay python2-promise))))
7741 (license license:expat)))
7742
7743(define-public python2-promise
7744 (let ((promise (package-with-python2
7745 (strip-python2-variant python-promise))))
7746 (package (inherit promise)
7747 (arguments (substitute-keyword-arguments (package-arguments promise)
7748 ((#:tests? _) #t)))
7749 (native-inputs
7750 `(("python2-futures" ,python2-futures)
7751 ("python2-pytest" ,python2-pytest)
7752 ,@(package-native-inputs promise))))))
7753
7754(define-public python-colorama
7755 (package
7756 (name "python-colorama")
7757 (version "0.3.9")
7758 (source
7759 (origin
7760 (method url-fetch)
7761 (uri (pypi-uri "colorama" version))
7762 (sha256
7763 (base32
7764 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
7765 (build-system python-build-system)
7766 (synopsis "Colored terminal text rendering for Python")
7767 (description "Colorama is a Python library for rendering colored terminal
7768text.")
7769 (home-page "https://pypi.python.org/pypi/colorama")
7770 (license license:bsd-3)))
7771
7772(define-public python2-colorama
7773 (package-with-python2 python-colorama))
7774
7775(define-public python-rsa
7776 (package
7777 (name "python-rsa")
7778 (version "3.4.2")
7779 (source
7780 (origin
7781 (method url-fetch)
7782 (uri (pypi-uri "rsa" version))
7783 (sha256
7784 (base32
7785 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
7786 (build-system python-build-system)
7787 (propagated-inputs
7788 `(("python-pyasn1" ,python-pyasn1)))
7789 (synopsis "Pure-Python RSA implementation")
7790 (description "Python-RSA is a pure-Python RSA implementation. It supports
7791encryption and decryption, signing and verifying signatures, and key
7792generation according to PKCS#1 version 1.5. It can be used as a Python
7793library as well as on the command line.")
7794 (home-page "https://stuvel.eu/rsa")
7795 (license license:asl2.0)))
7796
7797(define-public python2-rsa
7798 (package-with-python2 python-rsa))
7799
7800(define-public python-pluggy
7801 (package
7802 (name "python-pluggy")
81ed0980 7803 (version "0.8.1")
44d10b1f
RW
7804 (source
7805 (origin
7806 (method url-fetch)
7807 (uri (pypi-uri "pluggy" version))
7808 (sha256
7809 (base32
81ed0980 7810 "05l6g42p9ilmabw0hlbiyxy6gyzjri41m5l11a8dzgvi77q35p4d"))))
44d10b1f
RW
7811 (build-system python-build-system)
7812 (native-inputs
7813 `(("python-setuptools-scm" ,python-setuptools-scm)))
7814 (synopsis "Plugin and hook calling mechanism for Python")
7815 (description "Pluggy is an extraction of the plugin manager as used by
7816Pytest but stripped of Pytest specific details.")
7817 (home-page "https://pypi.python.org/pypi/pluggy")
7818 (license license:expat)))
7819
7820(define-public python2-pluggy
7821 (package-with-python2 python-pluggy))
7822
7823(define-public python-tox
7824 (package
7825 (name "python-tox")
7826 (version "2.8.1")
7827 (source
7828 (origin
7829 (method url-fetch)
7830 (uri (pypi-uri "tox" version))
7831 (sha256
7832 (base32
7833 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
7834 (build-system python-build-system)
7835 (arguments
7836 ;; FIXME: Tests require pytest-timeout, which itself requires
7837 ;; pytest>=2.8.0 for installation.
7838 '(#:tests? #f))
7839 (propagated-inputs
7840 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
7841 ("python-py" ,python-py)
7842 ("python-virtualenv" ,python-virtualenv)))
7843 (native-inputs
7844 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
7845 ("python-pytest" ,python-pytest) ; >= 2.3.5
7846 ("python-setuptools-scm" ,python-setuptools-scm)))
7847 (home-page "http://tox.testrun.org/")
7848 (synopsis "Virtualenv-based automation of test activities")
7849 (description "Tox is a generic virtualenv management and test command line
7850tool. It can be used to check that a package installs correctly with
7851different Python versions and interpreters, or run tests in each type of
7852supported environment, or act as a frontend to continuous integration
7853servers.")
7854 (license license:expat)))
7855
7856(define-public python2-tox
7857 (package-with-python2 python-tox))
7858
7859(define-public python-jmespath
7860 (package
7861 (name "python-jmespath")
7862 (version "0.9.3")
7863 (source
7864 (origin
7865 (method url-fetch)
7866 (uri (pypi-uri "jmespath" version))
7867 (sha256
7868 (base32
7869 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
7870 (build-system python-build-system)
7871 (native-inputs
7872 `(("python-nose" ,python-nose)))
7873 (synopsis "JSON Matching Expressions")
7874 (description "JMESPath (pronounced “james path”) is a Python library that
7875allows one to declaratively specify how to extract elements from a JSON
7876document.")
7877 (home-page "https://github.com/jmespath/jmespath.py")
7878 (license license:expat)))
7879
7880(define-public python2-jmespath
7881 (package-with-python2 python-jmespath))
7882
7883(define-public python-botocore
7884 (package
7885 (name "python-botocore")
7886 (version "1.8.43")
7887 (source
7888 (origin
7889 (method url-fetch)
7890 (uri (pypi-uri "botocore" version))
7891 (sha256
7892 (base32
7893 "12cqpbnz3vfv41mp9admvciw7bc7hz57sjpqs2bxaw9wnfmbw5lg"))))
7894 (build-system python-build-system)
7895 (arguments
7896 ;; FIXME: Many tests are failing.
7897 '(#:tests? #f))
7898 (propagated-inputs
7899 `(("python-dateutil" ,python-dateutil)
7900 ("python-docutils" ,python-docutils)
7901 ("python-jmespath" ,python-jmespath)))
7902 (native-inputs
7903 `(("python-mock" ,python-mock)
7904 ("python-nose" ,python-nose)
7905 ("behave" ,behave)
7906 ("python-tox" ,python-tox)
7907 ("python-wheel" ,python-wheel)))
7908 (home-page "https://github.com/boto/botocore")
7909 (synopsis "Low-level interface to AWS")
7910 (description "Botocore is a Python library that provides a low-level
7911interface to the Amazon Web Services (AWS) API.")
7912 (license license:asl2.0)))
7913
7914(define-public python2-botocore
7915 (package-with-python2 python-botocore))
7916
7917(define-public python-xdo
7918 (package
7919 (name "python-xdo")
7920 (version "0.3")
7921 (source (origin
7922 (method url-fetch)
7923 (uri (string-append
7924 "http://http.debian.net/debian/pool/main/p/python-xdo/"
7925 "python-xdo_" version ".orig.tar.gz"))
7926 (sha256
7927 (base32
7928 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
7929 (build-system python-build-system)
7930 (arguments
7931 '(#:phases
7932 (modify-phases %standard-phases
7933 (add-before 'install 'patch-libxdo-path
7934 ;; Hardcode the path of dynamically loaded libxdo library.
7935 (lambda* (#:key inputs #:allow-other-keys)
7936 (let ((libxdo (string-append
7937 (assoc-ref inputs "xdotool")
7938 "/lib/libxdo.so")))
7939 (substitute* "xdo/_xdo.py"
7940 (("find_library\\(\"xdo\"\\)")
7941 (simple-format #f "\"~a\"" libxdo)))
7942 #t))))
7943 #:tests? #f)) ; no tests provided
7944 (propagated-inputs
7945 `(("python-six" ,python-six)))
7946 (inputs
7947 `(("xdotool" ,xdotool)
7948 ("libX11" ,libx11)))
7949 (home-page "https://tracker.debian.org/pkg/python-xdo")
7950 (synopsis "Python library for simulating X11 keyboard/mouse input")
7951 (description "Provides bindings to libxdo for manipulating X11 via simulated
7952input. (Note that this is mostly a legacy library; you may wish to look at
7953python-xdo for newer bindings.)")
7954 (license license:bsd-3)))
7955
7956(define-public python2-xdo
7957 (package-with-python2 python-xdo))
7958
7959(define-public python-mako
7960 (package
7961 (name "python-mako")
7962 (version "1.0.7")
7963 (source
7964 (origin
7965 (method url-fetch)
7966 (uri (pypi-uri "Mako" version))
7967 (sha256
7968 (base32
7969 "1bi5gnr8r8dva06qpyx4kgjc6spm2k1y908183nbbaylggjzs0jf"))))
7970 (build-system python-build-system)
7971 (propagated-inputs
7972 `(("python-markupsafe" ,python-markupsafe)))
7973 (native-inputs
7974 `(("python-mock" ,python-mock)
7975 ("python-nose" ,python-nose)
7976 ("python-pytest" ,python-pytest)))
7977 (home-page "http://www.makotemplates.org/")
7978 (synopsis "Templating language for Python")
7979 (description "Mako is a templating language for Python that compiles
7980templates into Python modules.")
7981 (license license:expat)))
7982
7983(define-public python2-mako
7984 (package-with-python2 python-mako))
7985
7986(define-public python-waitress
7987 (package
7988 (name "python-waitress")
7989 (version "1.1.0")
7990 (source
7991 (origin
7992 (method url-fetch)
7993 (uri (pypi-uri "waitress" version))
7994 (patches (search-patches "python-waitress-fix-tests.patch"))
7995 (sha256
7996 (base32
7997 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
7998 (build-system python-build-system)
7999 (home-page "https://github.com/Pylons/waitress")
8000 (synopsis "Waitress WSGI server")
8001 (description "Waitress is meant to be a production-quality pure-Python WSGI
8002server with very acceptable performance.")
8003 (license license:zpl2.1)))
8004
8005(define-public python2-waitress
8006 (package-with-python2 python-waitress))
8007
8008(define-public python-pyquery
8009 (package
8010 (name "python-pyquery")
8011 (version "1.2.17")
8012 (source
8013 (origin
8014 (method url-fetch)
8015 (uri (pypi-uri "pyquery" version))
8016 (sha256
8017 (base32
8018 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
8019 (build-system python-build-system)
8020 (native-inputs
8021 `(("python-webob" ,python-webob)
8022 ("python-webtest" ,python-webtest)))
8023 (propagated-inputs
8024 `(("python-lxml" ,python-lxml)
8025 ("python-cssselect" ,python-cssselect)))
8026 (home-page "https://github.com/gawel/pyquery")
8027 (synopsis "Make jQuery-like queries on xml documents")
8028 (description "pyquery allows you to make jQuery queries on xml documents.
8029The API is as much as possible the similar to jQuery. pyquery uses lxml for
8030fast xml and html manipulation.")
8031 (license license:bsd-3)))
8032
44d10b1f
RW
8033(define-public python-anyjson
8034 (package
8035 (name "python-anyjson")
8036 (version "0.3.3")
8037 (source
8038 (origin
8039 (method url-fetch)
8040 (uri (pypi-uri "anyjson" version))
8041 (sha256
8042 (base32
8043 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
8044 (build-system python-build-system)
8045 (arguments
8046 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
8047 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
8048 ;; whatever) so this transformation needs to be done before the tests
8049 ;; can be run. Maybe we could add a build step to transform beforehand
8050 ;; but it could be annoying/difficult.
8051 ;; We can enable tests for the Python 2 version, though, and do below.
8052 #:tests? #f))
8053 (home-page "https://bitbucket.org/runeh/anyjson/")
8054 (synopsis
8055 "Wraps best available JSON implementation in a common interface")
8056 (description
8057 "Anyjson loads whichever is the fastest JSON module installed
8058and provides a uniform API regardless of which JSON implementation is used.")
8059 (license license:bsd-3)
8060 (properties `((python2-variant . ,(delay python2-anyjson))))))
8061
8062(define-public python2-anyjson
8063 (let ((anyjson (package-with-python2
8064 (strip-python2-variant python-anyjson))))
8065 (package
8066 (inherit anyjson)
8067 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
8068 #:tests? #t
8069 ,@(package-arguments anyjson)))
8070 (native-inputs `(("python2-nose" ,python2-nose))))))
8071
8072(define-public python-amqp
8073 (package
8074 (name "python-amqp")
8075 (version "2.3.2")
8076 (source
8077 (origin
8078 (method url-fetch)
8079 (uri (pypi-uri "amqp" version))
8080 (sha256
8081 (base32
8082 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
8083 (build-system python-build-system)
8084 (native-inputs
8085 `(("python-case" ,python-case)
8086 ("python-pytest-sugar" ,python-pytest-sugar)
8087 ("python-mock" ,python-mock)))
8088 (propagated-inputs
8089 `(("python-vine" ,python-vine)))
8090 (home-page "https://github.com/celery/py-amqp")
8091 (synopsis
8092 "Low-level AMQP client for Python (fork of amqplib)")
8093 (description
8094 "This is a fork of amqplib which was originally written by Barry Pederson.
8095It is maintained by the Celery project, and used by kombu as a pure python
8096alternative when librabbitmq is not available.")
8097 (license license:lgpl2.1+)
8098 (properties `((python2-variant . ,(delay python2-amqp))))))
8099
8100(define-public python2-amqp
8101 (let ((amqp (package-with-python2
8102 (strip-python2-variant python-amqp))))
8103 (package
8104 (inherit amqp)
8105 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8106 ;; unmaintained. Weirdly, does not do this on the python 3
8107 ;; version?
8108 #:tests? #f
8109 ,@(package-arguments amqp))))))
8110
8111(define-public python-txamqp
8112 (package
8113 (name "python-txamqp")
8114 (version "0.8.2")
8115 (source
8116 (origin
8117 (method url-fetch)
8118 (uri (pypi-uri "txAMQP" version))
8119 (sha256
8120 (base32
8121 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
8122 (build-system python-build-system)
8123 (propagated-inputs
8124 `(("python-six" ,python-six)
8125 ("python-twisted" ,python-twisted)))
8126 (home-page "https://github.com/txamqp/txamqp")
8127 (synopsis "Communicate with AMQP peers and brokers using Twisted")
8128 (description
8129 "This package provides a Python library for communicating with AMQP peers
8130and brokers using the asynchronous networking framework Twisted. It contains
8131all the necessary code to connect, send and receive messages to/from an
8132AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
8133also includes support for using Thrift RPC over AMQP in Twisted
8134applications.")
8135 (license license:asl2.0)))
8136
8137(define-public python2-txamqp
8138 (package-with-python2 python-txamqp))
8139
8140(define-public python-kombu
8141 (package
8142 (name "python-kombu")
8143 (version "4.2.2")
8144 (source
8145 (origin
8146 (method url-fetch)
8147 (uri (pypi-uri "kombu" version))
8148 (sha256
8149 (base32
8150 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
8151 (build-system python-build-system)
8152 (native-inputs
8153 `(("python-mock" ,python-mock)
8154 ("python-case" ,python-case)
8155 ("python-pyro4" ,python-pyro4)
8156 ("python-pytest-sugar" ,python-pytest-sugar)
8157 ("python-pytz" ,python-pytz)))
8158 (propagated-inputs
8159 `(("python-anyjson" ,python-anyjson)
8160 ("python-amqp" ,python-amqp)
8161 ("python-redis" ,python-redis)))
8162 (home-page "https://kombu.readthedocs.io")
8163 (synopsis "Message passing library for Python")
8164 (description "The aim of Kombu is to make messaging in Python as easy as
8165possible by providing an idiomatic high-level interface for the AMQ protocol,
8166and also provide proven and tested solutions to common messaging problems.
8167AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8168message orientation, queuing, routing, reliability and security, for which the
8169RabbitMQ messaging server is the most popular implementation.")
8170 (license license:bsd-3)
8171 (properties `((python2-variant . ,(delay python2-kombu))))))
8172
8173(define-public python2-kombu
8174 (let ((kombu (package-with-python2
8175 (strip-python2-variant python-kombu))))
8176 (package
8177 (inherit kombu)
8178 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
8179 ;; It works fine on the python3 variant.
8180 #:tests? #f
8181 ,@(package-arguments kombu)))
8182 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8183 ,@(package-native-inputs kombu))))))
8184
8185(define-public python-billiard
8186 (package
8187 (name "python-billiard")
8188 (version "3.5.0.5")
8189 (source
8190 (origin
8191 (method url-fetch)
8192 (uri (pypi-uri "billiard" version))
8193 (sha256
8194 (base32
8195 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
8196 (build-system python-build-system)
8197 (native-inputs
8198 `(("python-case" ,python-case)
8199 ("python-pytest" ,python-pytest)))
8200 (home-page "https://github.com/celery/billiard")
8201 (synopsis
8202 "Python multiprocessing fork with improvements and bugfixes")
8203 (description
8204 "Billiard is a fork of the Python 2.7 multiprocessing package. The
8205multiprocessing package itself is a renamed and updated version of R Oudkerk's
8206pyprocessing package. This standalone variant is intended to be compatible with
8207Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
8208 (license license:bsd-3)
8209 (properties `((python2-variant . ,(delay python2-billiard))))))
8210
8211(define-public python2-billiard
8212 (let ((billiard (package-with-python2
8213 (strip-python2-variant python-billiard))))
8214 (package
8215 (inherit billiard)
8216 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8217 ("python2-mock" ,python2-mock)
8218 ,@(package-native-inputs billiard))))))
8219
8220(define-public python-celery
8221 (package
8222 (name "python-celery")
8223 (version "4.2.1")
8224 (source
8225 (origin
8226 (method url-fetch)
8227 (uri (pypi-uri "celery" version))
8228 (sha256
8229 (base32
8230 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
8231 (build-system python-build-system)
8232 (arguments
8233 '(;; TODO The tests fail with Python 3.7
8234 ;; https://github.com/celery/celery/issues/4849
8235 #:tests? #f
8236 #:phases
8237 (modify-phases %standard-phases
8238 (add-after 'unpack 'patch-requirements
8239 (lambda _
8240 (substitute* "requirements/test.txt"
8241 (("pytest>=3\\.0,<3\\.3")
8242 "pytest>=3.0"))
8243 #t)))))
8244 (native-inputs
8245 `(("python-case" ,python-case)
8246 ("python-pytest" ,python-pytest)))
8247 (propagated-inputs
8248 `(("python-pytz" ,python-pytz)
8249 ("python-billiard" ,python-billiard)
8250 ("python-kombu" ,python-kombu)))
8251 (home-page "https://celeryproject.org")
8252 (synopsis "Distributed Task Queue")
8253 (description "Celery is an asynchronous task queue/job queue based on
8254distributed message passing. It is focused on real-time operation, but
8255supports scheduling as well. The execution units, called tasks, are executed
8256concurrently on a single or more worker servers using multiprocessing,
8257Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
8258synchronously (wait until ready).")
8259 (license license:bsd-3)
8260 (properties `((python2-variant . ,(delay python2-celery))))))
8261
8262(define-public python2-celery
8263 (let ((celery (package-with-python2
8264 (strip-python2-variant python-celery))))
8265 (package
8266 (inherit celery)
8267 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8268 ("python2-mock" ,python2-mock)
8269 ,@(package-native-inputs celery))))))
8270
8271(define-public python-translitcodec
8272 (package
8273 (name "python-translitcodec")
8274 (version "0.4.0")
8275 (source
8276 (origin
8277 (method url-fetch)
8278 (uri (pypi-uri "translitcodec" version))
8279 (sha256
8280 (base32
8281 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
8282 (build-system python-build-system)
8283 (arguments
8284 `(#:tests? #f)) ; no tests provided
8285 (home-page
8286 "https://github.com/claudep/translitcodec")
8287 (synopsis
8288 "Unicode to 8-bit charset transliteration codec")
8289 (description
8290 "This package contains codecs for transliterating ISO 10646 texts into
8291best-effort representations using smaller coded character sets (ASCII,
8292ISO 8859, etc.).")
8293 (license license:expat)))
8294
8295(define-public python2-translitcodec
8296 (package-with-python2 python-translitcodec))
8297
8298(define-public python-editor
8299 (package
8300 (name "python-editor")
8301 (version "0.5")
8302 (source
8303 (origin
8304 (method url-fetch)
8305 (uri (pypi-uri "python-editor" version))
8306 (sha256
8307 (base32
8308 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
8309 (build-system python-build-system)
8310 (home-page
8311 "https://github.com/fmoo/python-editor")
8312 (synopsis
8313 "Programmatically open an editor, capture the result")
8314 (description
8315 "python-editor is a library that provides the editor module for
8316programmatically interfacing with your system's $EDITOR.")
8317 (license license:asl2.0)))
8318
8319(define-public python2-editor
8320 (package-with-python2 python-editor))
8321
8322(define-public python-sphinxcontrib-programoutput
8323 (package
8324 (name "python-sphinxcontrib-programoutput")
8325 (version "0.10")
8326 (source (origin
8327 (method url-fetch)
8328 (uri (pypi-uri "sphinxcontrib-programoutput" version))
8329 (sha256
8330 (base32
8331 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
8332 (build-system python-build-system)
8333 (arguments
8334 ;; FIXME: Many tests are failing and the upstream is gone.
8335 '(#:tests? #f))
8336 (propagated-inputs
8337 `(("python-sphinx" ,python-sphinx)))
8338 (synopsis "Sphinx extension to include program output")
8339 (description "A Sphinx extension to literally insert the output of arbitrary
8340commands into documents, helping you to keep your command examples up to date.")
8341 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
8342 (license license:bsd-2)))
8343
8344(define-public python2-sphinxcontrib-programoutput
8345 (package-with-python2 python-sphinxcontrib-programoutput))
8346
8347(define-public python-sphinx-repoze-autointerface
8348 (package
8349 (name "python-sphinx-repoze-autointerface")
8350 (version "0.8")
8351 (source (origin
8352 (method url-fetch)
8353 (uri (pypi-uri "repoze.sphinx.autointerface" version))
8354 (sha256
8355 (base32
8356 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
8357 (build-system python-build-system)
8358 (arguments '(#:tests? #f)) ; No tests.
8359 (propagated-inputs
8360 `(("python-sphinx" ,python-sphinx)
8361 ("python-zope-interface" ,python-zope-interface)))
8362 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
8363 (description "This package defines an extension for the Sphinx documentation
8364system. The extension allows generation of API documentation by
8365introspection of @code{zope.interface} instances in code.")
8366 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
8367 (license license:repoze)))
8368
8369(define-public python2-sphinx-repoze-autointerface
8370 (package-with-python2 python-sphinx-repoze-autointerface))
8371
8372(define-public python-vobject
8373 (package
8374 (name "python-vobject")
8375 (version "0.9.5")
8376 (source (origin
8377 (method url-fetch)
8378 (uri (pypi-uri "vobject" version))
8379 (sha256
8380 (base32
8381 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
8382 (build-system python-build-system)
8383 (arguments
8384 '(;; The test suite relies on some non-portable Windows interfaces.
8385 #:tests? #f))
8386 (propagated-inputs
8387 `(("python-dateutil" ,python-dateutil)
8388 ("python-pyicu" ,python-pyicu)))
8389 (synopsis "Parse and generate vCard and vCalendar files")
8390 (description "Vobject is intended to be a full featured Python package for
8391parsing and generating vCard and vCalendar files. Currently, iCalendar files
8392are supported and well tested. vCard 3.0 files are supported, and all data
8393should be imported, but only a few components are understood in a sophisticated
8394way.")
8395 (home-page "http://eventable.github.io/vobject/")
8396 (license license:asl2.0)))
8397
8398(define-public python2-vobject
8399 (package-with-python2 python-vobject))
8400
8401(define-public python-munkres
8402 (package
8403 (name "python-munkres")
8404 (version "1.0.8")
8405 (source (origin
8406 (method url-fetch)
8407 (uri (pypi-uri "munkres" version))
8408 (sha256
8409 (base32
8410 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
8411 (build-system python-build-system)
8412 (arguments
8413 '(#:tests? #f)) ; no test suite
8414 (home-page "http://software.clapper.org/munkres/")
8415 (synopsis "Implementation of the Munkres algorithm")
8416 (description "The Munkres module provides an implementation of the Munkres
8417algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
8418useful for solving the Assignment Problem.")
8419 (license license:bsd-3)))
8420
8421(define-public python2-munkres
8422 (package-with-python2 python-munkres))
8423
8424(define-public python-whoosh
8425 (package
8426 (name "python-whoosh")
8427 (version "2.7.4")
8428 (source
8429 (origin
8430 (method url-fetch)
8431 (uri (pypi-uri "Whoosh" version))
8432 (sha256
8433 (base32
8434 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
8435 (build-system python-build-system)
8436 (native-inputs
8437 `(("python-pytest" ,python-pytest)))
8438 (home-page "https://bitbucket.org/mchaput/whoosh")
8439 (synopsis "Full text indexing, search, and spell checking library")
8440 (description
8441 "Whoosh is a fast, pure-Python full text indexing, search, and spell
8442checking library.")
8443 (license license:bsd-2)))
8444
8445(define-public python2-whoosh
8446 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
8447 (package (inherit whoosh)
8448 (propagated-inputs
8449 `(("python2-backport-ssl-match-hostname"
8450 ,python2-backport-ssl-match-hostname)
8451 ,@(package-propagated-inputs whoosh))))))
8452
8453(define-public python-pathlib
8454 (package
8455 (name "python-pathlib")
8456 (version "1.0.1")
8457 (source (origin
8458 (method url-fetch)
8459 (uri (pypi-uri "pathlib" version))
8460 (sha256
8461 (base32
8462 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
8463 (build-system python-build-system)
8464 ;; The tests depend on the internal "test" module, which does not provide
8465 ;; a stable interface.
8466 (arguments `(#:tests? #f))
8467 (home-page "https://pathlib.readthedocs.org/")
8468 (synopsis "Object-oriented file system paths")
8469 (description "Pathlib offers a set of classes to handle file system paths.
8470It offers the following advantages over using string objects:
8471
8472@enumerate
8473@item No more cumbersome use of os and os.path functions. Everything can
8474be done easily through operators, attribute accesses, and method calls.
8475@item Embodies the semantics of different path types. For example,
8476comparing Windows paths ignores casing.
8477@item Well-defined semantics, eliminating any inconsistencies or
8478ambiguities (forward vs. backward slashes, etc.).
8479@end enumerate
8480
8481Note: In Python 3.4, pathlib is now part of the standard library. For other
8482Python versions please consider python-pathlib2 instead, which tracks the
8483standard library module. This module (python-pathlib) isn't maintained
8484anymore.")
8485 (license license:expat)))
8486
8487(define-public python2-pathlib
8488 (package-with-python2 python-pathlib))
8489
8490(define-public python2-pathlib2
8491 (package
8492 (name "python2-pathlib2")
54da6f9f 8493 (version "2.3.3")
44d10b1f
RW
8494 (source (origin
8495 (method url-fetch)
8496 (uri (pypi-uri "pathlib2" version))
8497 (sha256
8498 (base32
54da6f9f 8499 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
44d10b1f
RW
8500 (build-system python-build-system)
8501 ;; We only need the the Python 2 variant, since for Python 3 our minimum
8502 ;; version is 3.4 which already includes this package as part of the
8503 ;; standard library.
8504 (arguments
8505 `(#:python ,python-2))
8506 (propagated-inputs
8507 `(("python2-scandir" ,python2-scandir)
8508 ("python2-six" ,python2-six)))
8509 (home-page "https://pypi.python.org/pypi/pathlib2/")
8510 (synopsis "Object-oriented file system paths - backport of standard
8511pathlib module")
8512 (description "The goal of pathlib2 is to provide a backport of standard
8513pathlib module which tracks the standard library module, so all the newest
8514features of the standard pathlib can be used also on older Python versions.
8515
8516Pathlib offers a set of classes to handle file system paths. It offers the
8517following advantages over using string objects:
8518
8519@enumerate
8520@item No more cumbersome use of os and os.path functions. Everything can
8521be done easily through operators, attribute accesses, and method calls.
8522@item Embodies the semantics of different path types. For example,
8523comparing Windows paths ignores casing.
8524@item Well-defined semantics, eliminating any inconsistencies or
8525ambiguities (forward vs. backward slashes, etc.).
8526@end enumerate")
8527 (license license:expat)))
8528
8529(define-public python2-pathlib2-bootstrap
8530 (hidden-package
8531 (package
8532 (inherit python2-pathlib2)
8533 (name "python2-pathlib2-bootstrap")
8534 (propagated-inputs
8535 `(("python2-scandir" ,python2-scandir)
8536 ("python2-six" ,python2-six-bootstrap))))))
8537
8538(define-public python-jellyfish
8539 (package
8540 (name "python-jellyfish")
8541 (version "0.5.6")
8542 (source (origin
8543 (method url-fetch)
8544 (uri (pypi-uri "jellyfish" version))
8545 (sha256
8546 (base32
8547 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
8548 (build-system python-build-system)
8549 (native-inputs
8550 `(("python-pytest" ,python-pytest)))
8551 (home-page "https://github.com/jamesturk/jellyfish")
8552 (synopsis "Approximate and phonetic matching of strings")
8553 (description "Jellyfish uses a variety of string comparison and phonetic
8554encoding algorithms to do fuzzy string matching.")
8555 (license license:bsd-2)
8556 (properties `((python2-variant . ,(delay python2-jellyfish))))))
8557
8558(define-public python2-jellyfish
8559 (let ((jellyfish (package-with-python2
8560 (strip-python2-variant python-jellyfish))))
8561 (package (inherit jellyfish)
8562 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
8563 ,@(package-native-inputs jellyfish))))))
8564
8565(define-public python2-unicodecsv
8566 (package
8567 (name "python2-unicodecsv")
8568 (version "0.14.1")
8569 (source (origin
8570 (method url-fetch)
8571 ;; The test suite is not included in the PyPi release.
8572 ;; https://github.com/jdunck/python-unicodecsv/issues/19
8573 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
8574 "archive/" version ".tar.gz"))
8575 (file-name (string-append name "-" version ".tar.gz"))
8576 (sha256
8577 (base32
8578 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
8579 (build-system python-build-system)
8580 (arguments
8581 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
8582 #:python ,python-2))
8583 (native-inputs
8584 `(("python2-unittest2" ,python2-unittest2)))
8585 (home-page "https://github.com/jdunck/python-unicodecsv")
8586 (synopsis "Unicode CSV module for Python 2")
8587 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
8588module, adding support for Unicode strings.")
8589 (license license:bsd-2)))
8590
8591(define-public python-rarfile
8592 (package
8593 (name "python-rarfile")
8594 (version "2.8")
8595 (source (origin
8596 (method url-fetch)
8597 (uri (pypi-uri "rarfile" version))
8598 (sha256
8599 (base32
8600 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
8601 (build-system python-build-system)
8602 (arguments
8603 '(#:phases
8604 (modify-phases %standard-phases
8605 (replace 'check
8606 ;; Many tests fail, but the installation proceeds.
e59dd341 8607 (lambda _ (invoke "make" "-C" "test" "test"))))))
44d10b1f
RW
8608 (native-inputs
8609 `(("which" ,which))) ; required for tests
8610 (propagated-inputs
8611 `(("libarchive" ,libarchive)))
8612 (home-page "https://github.com/markokr/rarfile")
8613 (synopsis "RAR archive reader for Python")
8614 (description "This is Python module for RAR archive reading. The interface
8615is made as zipfile like as possible.")
8616 (license license:isc)))
8617
8618(define-public python2-rarfile
8619 (package-with-python2 python-rarfile))
8620
8621(define-public python-magic
8622 (package
8623 (name "python-magic")
8624 (version "0.4.15")
8625 (source
8626 (origin
8627 (method url-fetch)
8628 (uri (pypi-uri "python-magic" version))
8629 (sha256
8630 (base32
8631 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
8632 (file-name (string-append name "-" version "-checkout"))))
8633 (build-system python-build-system)
8634 (arguments
8635 ;; The tests are unreliable, so don't run them. The tests fail
8636 ;; under Python3 because they were written for Python2 and
8637 ;; contain import statements that do not work in Python3. One of
8638 ;; the tests fails under Python2 because its assertions are
8639 ;; overly stringent; it relies on comparing output strings which
8640 ;; are brittle and can change depending on the version of
8641 ;; libmagic being used and the system on which the test is
8642 ;; running. In my case, under GuixSD 0.10.0, only one test
8643 ;; failed, and it seems to have failed only because the version
8644 ;; of libmagic that is packaged in Guix outputs a slightly
8645 ;; different (but not wrong) string than the one that the test
8646 ;; expected.
8647 '(#:tests? #f
8648 #:phases (modify-phases %standard-phases
8649 ;; Replace a specific method call with a hard-coded
8650 ;; path to the necessary libmagic.so file in the
8651 ;; store. If we don't do this, then the method call
8652 ;; will fail to find the libmagic.so file, which in
8653 ;; turn will cause any application using
8654 ;; python-magic to fail.
8655 (add-before 'build 'hard-code-path-to-libmagic
8656 (lambda* (#:key inputs #:allow-other-keys)
8657 (let ((file (assoc-ref inputs "file")))
8658 (substitute* "magic.py"
8659 (("ctypes.util.find_library\\('magic'\\)")
8660 (string-append "'" file "/lib/libmagic.so'")))
8661 #t)))
8662 (add-before 'install 'disable-egg-compression
8663 (lambda _
8664 (let ((port (open-file "setup.cfg" "a")))
8665 (display "\n[easy_install]\nzip_ok = 0\n"
8666 port)
8667 (close-port port)
8668 #t))))))
8669 (inputs
8670 ;; python-magic needs to be able to find libmagic.so.
8671 `(("file" ,file)))
8672 (home-page
8673 "https://github.com/ahupp/python-magic")
8674 (synopsis
8675 "File type identification using libmagic")
8676 (description
8677 "This module uses ctypes to access the libmagic file type
8678identification library. It makes use of the local magic database and
8679supports both textual and MIME-type output. Note that this module and
8680the python-file module both provide a \"magic.py\" file; these two
8681modules, which are different and were developed separately, both serve
8682the same purpose: to provide Python bindings for libmagic.")
8683 (license license:expat)))
8684
8685(define-public python2-magic
8686 (package-with-python2 python-magic))
8687
8688(define-public python2-s3cmd
8689 (package
8690 (name "python2-s3cmd")
8691 (version "1.6.1")
8692 (source
8693 (origin
8694 (method url-fetch)
8695 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
8696 "s3cmd-" version ".tar.gz"))
8697 (sha256
8698 (base32
8699 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
8700 (build-system python-build-system)
8701 (arguments
8702 ;; s3cmd is written for python2 only and contains no tests.
8703 `(#:python ,python-2
8704 #:tests? #f))
8705 (propagated-inputs
8706 `(("python2-dateutil" ,python2-dateutil)
8707 ;; The python-file package also provides a magic.py module.
8708 ;; This is an unfortunate state of affairs; however, s3cmd
8709 ;; fails to install if it cannot find specifically the
8710 ;; python-magic package. Thus we include it, instead of using
8711 ;; python-file. Ironically, s3cmd sometimes works better
8712 ;; without libmagic bindings at all:
8713 ;; https://github.com/s3tools/s3cmd/issues/198
8714 ("python2-magic" ,python2-magic)))
8715 (home-page "http://s3tools.org/s3cmd")
8716 (synopsis "Command line tool for S3-compatible storage services")
8717 (description
8718 "S3cmd is a command line tool for uploading, retrieving and managing data
8719in storage services that are compatible with the Amazon Simple Storage
8720Service (S3) protocol, including S3 itself. It supports rsync-like backup,
8721GnuPG encryption, and more. It also supports management of Amazon's
8722CloudFront content delivery network.")
8723 (license license:gpl2+)))
8724
8725(define-public python-pkgconfig
8726 (package
8727 (name "python-pkgconfig")
8728 (version "1.3.1")
8729 (source
8730 (origin
8731 (method url-fetch)
8732 (uri (pypi-uri "pkgconfig" version))
8733 (sha256
8734 (base32
8735 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
8736 (build-system python-build-system)
8737 (native-inputs
8738 `(("python-nose" ,python-nose)))
8739 (inputs
8740 `(("pkg-config" ,pkg-config)))
8741 (arguments
8742 `(#:phases
8743 (modify-phases %standard-phases
8744 (add-before 'build 'patch
8745 ;; Hard-code the path to pkg-config.
8746 (lambda _
8747 (substitute* "pkgconfig/pkgconfig.py"
8748 (("cmd = 'pkg-config")
8749 (string-append "cmd = '" (which "pkg-config"))))
8750 #t))
8751 (replace 'check
8752 (lambda _
8753 (invoke "nosetests" "test.py"))))))
8754 (home-page "https://github.com/matze/pkgconfig")
8755 (synopsis "Python interface for pkg-config")
8756 (description "This module provides a Python interface to pkg-config. It
8757can be used to find all pkg-config packages, check if a package exists,
8758check if a package meets certain version requirements, query CFLAGS and
8759LDFLAGS and parse the output to build extensions with setup.py.")
8760 (license license:expat)))
8761
8762(define-public python2-pkgconfig
8763 (package-with-python2 python-pkgconfig))
8764
8765(define-public python-bz2file
8766 (package
8767 (name "python-bz2file")
8768 (version "0.98")
8769 (source
8770 (origin
8771 (method url-fetch)
8772 (uri (pypi-uri "bz2file" version))
8773 (sha256
8774 (base32
8775 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
8776 (build-system python-build-system)
8777 (arguments
8778 `(#:tests? #f)) ; Tests use deprecated python modules.
8779 (home-page "https://github.com/nvawda/bz2file")
8780 (synopsis "Read and write bzip2-compressed files")
8781 (description
8782 "Bz2file is a Python library for reading and writing bzip2-compressed
8783files. It contains a drop-in replacement for the I/O interface in the
8784standard library's @code{bz2} module, including features from the latest
8785development version of CPython that are not available in older releases.")
8786 (license license:asl2.0)))
8787
8788(define-public python2-bz2file
8789 (package-with-python2 python-bz2file))
8790
8791(define-public python-future
8792 (package
8793 (name "python-future")
8794 (version "0.16.0")
8795 (source
8796 (origin
8797 (method url-fetch)
8798 (uri (pypi-uri "future" version))
8799 (sha256
8800 (base32
8801 "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773"))))
8802 (build-system python-build-system)
8803 ;; Many tests connect to the network or are otherwise flawed.
8804 ;; https://github.com/PythonCharmers/python-future/issues/210
8805 (arguments
8806 `(#:tests? #f))
8807 (home-page "http://python-future.org")
8808 (synopsis "Single-source support for Python 3 and 2")
8809 (description
8810 "@code{python-future} is the missing compatibility layer between Python 2 and
8811Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
8812to support both Python 2 and Python 3 with minimal overhead.")
8813 (license license:expat)))
8814
8815(define-public python2-future
8816 (package-with-python2 python-future))
8817
8818(define-public python-cysignals
8819 (package
8820 (name "python-cysignals")
8e3e51df 8821 (version "1.9.0")
44d10b1f
RW
8822 (source
8823 (origin
8824 (method url-fetch)
8e3e51df 8825 (uri (pypi-uri "cysignals" version))
44d10b1f
RW
8826 (sha256
8827 (base32
8e3e51df 8828 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
44d10b1f
RW
8829 (build-system python-build-system)
8830 (native-inputs
8831 `(("python-cython" ,python-cython)
8832 ("python-sphinx" ,python-sphinx)))
8833 (inputs
8834 `(("pari-gp" ,pari-gp)))
8835 (arguments
8836 `(#:modules ((guix build python-build-system)
8837 ((guix build gnu-build-system) #:prefix gnu:)
8838 (guix build utils))
8839 ;; FIXME: Tests are executed after installation and currently fail
8840 ;; when not installing into standard locations; the author is working
8841 ;; on a fix.
8842 #:tests? #f
8843 #:phases
8844 (modify-phases %standard-phases
8845 (add-before
8846 'build 'configure
8847 (assoc-ref gnu:%standard-phases 'configure)))))
8848 (home-page
8849 "https://github.com/sagemath/cysignals")
8850 (synopsis
8851 "Handling of interrupts and signals for Cython")
8852 (description
8853 "The cysignals package provides mechanisms to handle interrupts (and
8854other signals and errors) in Cython code, using two related approaches,
8855for mixed Cython/Python code or external C libraries and pure Cython code,
8856respectively.")
8857 (license license:lgpl3+)))
8858
8859(define-public python2-cysignals
8860 (package-with-python2 python-cysignals))
8861
8862(define-public python2-shedskin
8863 (package
8864 (name "python2-shedskin")
8865 (version "0.9.4")
8866 (source
8867 (origin
8868 (method url-fetch)
8869 (uri (string-append "https://github.com/shedskin/shedskin/"
8870 "releases/download/v" version
8871 "/shedskin-" version ".tgz"))
8872 (sha256
8873 (base32
8874 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
8875 (build-system python-build-system)
8876 (arguments
8877 `(#:python ,python-2
8878 #:phases (modify-phases %standard-phases
8879 (add-after 'unpack 'fix-resulting-include-libs
8880 (lambda* (#:key inputs #:allow-other-keys)
8881 (let ((libgc (assoc-ref inputs "libgc"))
8882 (pcre (assoc-ref inputs "pcre")))
8883 (substitute* "shedskin/makefile.py"
8884 (("variable == 'CCFLAGS':[ ]*")
8885 (string-append "variable == 'CCFLAGS':\n"
8886 " line += ' -I " pcre "/include"
8887 " -I " libgc "/include'"))
8888 (("variable == 'LFLAGS':[ ]*")
8889 (string-append "variable == 'LFLAGS':\n"
8890 " line += ' -L" pcre "/lib"
8891 " -L " libgc "/lib'")))
8892 #t))))))
8893 (inputs `(("pcre" ,pcre)
8894 ("libgc" ,libgc)))
8895 (home-page "https://shedskin.github.io/")
8896 (synopsis "Experimental Python-2 to C++ Compiler")
8897 (description (string-append "This is an experimental compiler for a subset of
8898Python. It generates C++ code and a Makefile."))
8899 (license (list license:gpl3 license:bsd-3 license:expat))))
8900
8901(define-public python2-rope
8902 (package
8903 (name "python2-rope")
a9ba0a31 8904 (version "0.11.0")
44d10b1f
RW
8905 (source
8906 (origin
8907 (method url-fetch)
8908 (uri (pypi-uri "rope" version))
8909 (sha256
8910 (base32
a9ba0a31 8911 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
44d10b1f 8912 (arguments
afb29715 8913 ;; Rope has only partial python3 support, see `python-rope'
44d10b1f
RW
8914 `(#:python ,python-2))
8915 (build-system python-build-system)
8916 (native-inputs
8917 `(("python2-unittest2" ,python2-unittest2)))
8918 (home-page "https://github.com/python-rope/rope")
8919 (synopsis "Refactoring library for Python")
8920 (description "Rope is a refactoring library for Python. It facilitates
8921the renaming, moving and extracting of attributes, functions, modules, fields
8922and parameters in Python 2 source code. These refactorings can also be applied
8923to occurrences in strings and comments.")
8924 (license license:gpl2)))
8925
2c880ef4
LC
8926(define-public python-rope
8927 (package
8928 (inherit python2-rope)
8929 (name "python-rope")
8930 (arguments `(#:python ,python-wrapper
8931 ;; XXX: Only partial python3 support, results in some failing
8932 ;; tests: <https://github.com/python-rope/rope/issues/247>.
8933 #:tests? #f))
8934 (properties `((python2-variant . ,(delay python2-rope))))))
8935
44d10b1f
RW
8936(define-public python-py3status
8937 (package
8938 (name "python-py3status")
8939 (version "3.7")
8940 (source
8941 (origin
8942 (method url-fetch)
8943 (uri (pypi-uri "py3status" version))
8944 (sha256
8945 (base32
8946 "0shxcfz4wcczj0mhwp4w0dvwd2fdd9bgprq8slim1519iiqzgwhq"))))
8947 (build-system python-build-system)
8948 (inputs
8949 `(("file" ,file)))
8950 (arguments
8951 '(#:phases
8952 (modify-phases %standard-phases
8953 ;; 'file' is used for detection of configuration file encoding
8954 ;; let's make link the dependency to particular input
8955 (add-before 'build 'patch-file-path
8956 (lambda* (#:key inputs #:allow-other-keys)
8957 (let ((file-path (assoc-ref inputs "file")))
8958 (substitute* "py3status/parse_config.py"
8959 (("\\['file', '-b'")
8960 (string-append "['" file-path "/bin/file', '-b'")))
8961 #t))))
8962 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
8963 (home-page "https://github.com/ultrabug/py3status")
8964 (synopsis "Extensible i3status wrapper written in Python")
8965 (description "py3status is an i3status wrapper which extends i3status
8966functionality in a modular way, allowing you to extend your panel with your
8967own code, responding to click events and updating clock every second.")
8968 (license license:bsd-3)))
8969
8970(define-public python-tblib
8971 (package
8972 (name "python-tblib")
8973 (version "1.3.2")
8974 (source (origin
8975 (method url-fetch)
8976 (uri (pypi-uri "tblib" version))
8977 (sha256 (base32
8978 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
8979 (build-system python-build-system)
8980 (arguments
8981 `(#:phases
8982 (modify-phases %standard-phases
8983 (add-before 'check 'adjust-tests
8984 (lambda _
8985 (when (which "python3")
8986 ;; Adjust the example output to match that of Python 3.7:
8987 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
8988 (substitute* "README.rst"
8989 (("Exception\\('fail',") "Exception('fail'"))
8990 #t)))
8991 (replace 'check
8992 (lambda _
8993 ;; Upstream runs tests after installation and the package itself
8994 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
8995 ;; found.
8996 (setenv "PYTHONPATH"
8997 (string-append (getcwd) "/build/lib:"
8998 (getenv "PYTHONPATH")))
8999 (invoke "py.test" "-vv" "tests" "README.rst"))))))
9000 (native-inputs
9001 `(("python-pytest" ,python-pytest)
9002 ("python-six" ,python-six)))
9003 (home-page "https://github.com/ionelmc/python-tblib")
9004 (synopsis "Traceback serialization library")
9005 (description
9006 "Traceback serialization allows you to:
9007
9008@enumerate
9009@item Pickle tracebacks and raise exceptions with pickled tracebacks in
9010different processes. This allows better error handling when running code over
9011multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9012
9013@item Parse traceback strings and raise with the parsed tracebacks.
9014@end enumerate\n")
9015 (license license:bsd-3)))
9016
9017(define-public python2-tblib
9018 (package-with-python2 python-tblib))
9019
9020(define-public python-greenlet
9021 (package
9022 (name "python-greenlet")
9023 (version "0.4.15")
9024 (source (origin
9025 (method url-fetch)
9026 (uri (pypi-uri "greenlet" version))
9027 (sha256
9028 (base32
9029 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
9030 (build-system python-build-system)
9031 (home-page "https://greenlet.readthedocs.io/")
9032 (synopsis "Lightweight in-process concurrent programming")
9033 (description
9034 "Greenlet package is a spin-off of Stackless, a version of CPython
9035that supports micro-threads called \"tasklets\". Tasklets run
9036pseudo-concurrently (typically in a single or a few OS-level threads) and
9037are synchronized with data exchanges on \"channels\".")
9038 (license (list license:psfl license:expat))))
9039
9040(define-public python2-greenlet
9041 (package-with-python2 python-greenlet))
9042
9043(define-public python-objgraph
9044 (package
9045 (name "python-objgraph")
9046 (version "3.4.0")
9047 (source
9048 (origin
9049 (method url-fetch)
9050 (uri (pypi-uri "objgraph" version))
9051 (sha256
9052 (base32
9053 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
9054 (build-system python-build-system)
9055 (propagated-inputs
9056 `(("python-graphviz" ,python-graphviz)))
9057 (native-inputs
9058 `(("python-mock" ,python-mock)
9059 ("graphviz" ,graphviz)))
9060 (home-page "https://mg.pov.lt/objgraph/")
9061 (synopsis "Draw Python object reference graphs with graphviz")
9062 (description
9063 "This package provides tools to draw Python object reference graphs with
9064graphviz.")
9065 (license license:expat)))
9066
9067(define-public python-gevent
9068 (package
9069 (name "python-gevent")
9070 (version "1.3.7")
9071 (source (origin
9072 (method url-fetch)
9073 (uri (pypi-uri "gevent" version))
9074 (sha256
9075 (base32
9076 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
9077 (modules '((guix build utils)))
9078 (snippet
9079 '(begin
9080 ;; unbunding libev and c-ares
9081 (delete-file-recursively "deps")
9082 #t))))
9083 (build-system python-build-system)
9084 (arguments
9085 `(#:modules ((ice-9 ftw)
9086 (ice-9 match)
9087 (srfi srfi-26)
9088 (guix build utils)
9089 (guix build python-build-system))
9090 #:phases (modify-phases %standard-phases
9091 (add-after 'unpack 'unpack-libev
9092 (lambda* (#:key inputs #:allow-other-keys)
9093 (mkdir-p "deps/libev")
9094 ;; FIXME: gevent requires building libev, even though
9095 ;; it only links against the proper one.
9096 (invoke "tar" "-xf" (assoc-ref inputs "libev-source")
9097 "--strip-components=1" "-C" "deps/libev")))
9098 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
9099 (lambda _
9100 (substitute* "src/gevent/subprocess.py"
9101 (("/bin/sh") (which "sh")))
9102 (for-each (lambda (file)
9103 (substitute* file
9104 (("/bin/sh") (which "sh"))
9105 (("/bin/true") (which "true"))))
9106 (find-files "src/greentest" "\\.py$"))
9107 #t))
9108 (add-before 'build 'do-not-use-bundled-sources
9109 (lambda* (#:key inputs #:allow-other-keys)
9110 (setenv "CONFIG_SHELL" (which "bash"))
9111 (setenv "LIBEV_EMBED" "false")
9112 (setenv "CARES_EMBED" "false")
9113 (setenv "EMBED" "false")
9114
9115 (let ((greenlet (string-append
9116 (assoc-ref inputs "python-greenlet")
9117 "/include")))
9118 (match (scandir greenlet
9119 (lambda (item)
9120 (string-prefix? "python" item)))
9121 ((python)
9122 (setenv "CPATH"
9123 (string-append greenlet "/" python)))))
9124 #t))
9125 (add-before 'check 'skip-timer-test
9126 (lambda _
9127 ;; XXX: Skip 'TestTimerResolution', which appears to be
9128 ;; unreliable.
9129 (substitute* "src/greentest/test__core_timer.py"
9130 (("not greentest.RUNNING_ON_CI") "False"))
9131 #t))
9132 (replace 'check
9133 (lambda _
9134 ;; Make sure the build directory is on PYTHONPATH.
9135 (setenv "PYTHONPATH"
9136 (string-append
9137 (getenv "PYTHONPATH") ":"
9138 (getcwd) "/build/"
9139 (car (scandir "build" (cut string-prefix? "lib." <>)))))
9140 (with-directory-excursion "src/greentest"
9141 ;; XXX: Many tests require network access. Instead we only
9142 ;; run known-good tests. Unfortunately we cannot use
9143 ;; recursion here since this directory also contains
9144 ;; Python-version-specific subfolders.
9145 (apply invoke "python" "testrunner.py" "--config"
9146 "known_failures.py"
9147 (scandir "." (cut regexp-exec
9148 (make-regexp "test_+(subprocess|core)")
9149 <>)))))))))
9150 (propagated-inputs
9151 `(("python-greenlet" ,python-greenlet)
9152 ("python-objgraph" ,python-objgraph)))
9153 (native-inputs
9154 `(("libev-source" ,(package-source libev))
9155 ("python-six" ,python-six)))
9156 (inputs
9157 `(("c-ares" ,c-ares)
9158 ("libev" ,libev)))
9159 (home-page "http://www.gevent.org/")
9160 (synopsis "Coroutine-based network library")
9161 (description
9162 "gevent is a coroutine-based Python networking library that uses greenlet
9163to provide a high-level synchronous API on top of the libev event loop.")
9164 (license license:expat)
9165 (properties `((python2-variant . ,(delay python2-gevent))))))
9166
9167(define-public python2-gevent
9168 (let ((base (package-with-python2
9169 (strip-python2-variant python-gevent))))
9170 (package
9171 (inherit base)
9172 (native-inputs `(,@(package-native-inputs python-gevent)
9173 ("python-mock" ,python2-mock))))))
9174
9175(define-public python-fastimport
9176 (package
9177 (name "python-fastimport")
9178 (version "0.9.6")
9179 (source
9180 (origin
9181 (method url-fetch)
9182 (uri (pypi-uri "fastimport" version))
9183 (sha256
9184 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
9185 (build-system python-build-system)
9186 (home-page "https://github.com/jelmer/python-fastimport")
9187 (synopsis "VCS fastimport parser and generator in Python")
9188 (description "This package provides a parser for and generator of the Git
9189@url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
9190format.")
9191 (license license:gpl2+)))
9192
9193(define-public python2-fastimport
9194 (package-with-python2 python-fastimport))
9195
9196(define-public python-twisted
9197 (package
9198 (name "python-twisted")
e5ba2fe3 9199 (version "17.5.0")
44d10b1f
RW
9200 (source (origin
9201 (method url-fetch)
9202 (uri (pypi-uri "Twisted" version ".tar.bz2"))
9203 (sha256
9204 (base32
e5ba2fe3 9205 "1sh2h23nnizcdyrl2rn7zxijglikxwz7z7grqpvq496zy2aa967i"))))
44d10b1f
RW
9206 (build-system python-build-system)
9207 (arguments
9208 '(#:tests? #f)) ; FIXME: Some tests are failing.
9209 ;; #:phases
9210 ;; (modify-phases %standard-phases
9211 ;; (replace 'check
9212 ;; (lambda _
9213 ;; (zero? (system* "./bin/trial" "twisted")))))
9214 (propagated-inputs
9215 `(("python-zope-interface" ,python-zope-interface)
9216 ("python-incremental" ,python-incremental)
e5ba2fe3 9217 ("python-hyperlink" ,python-hyperlink)
44d10b1f
RW
9218 ("python-constantly" ,python-constantly)
9219 ("python-automat" ,python-automat)))
9220 (home-page "https://twistedmatrix.com/")
9221 (synopsis "Asynchronous networking framework written in Python")
9222 (description
9223 "Twisted is an extensible framework for Python programming, with special
9224focus on event-based network programming and multiprotocol integration.")
9225 (license license:expat)))
9226
9227(define-public python2-twisted
9228 (package-with-python2 python-twisted))
9229
9230(define-public python-pika
9231 (package
9232 (name "python-pika")
9233 (version "0.12.0")
9234 (source
9235 (origin
9236 (method url-fetch)
9237 (uri (pypi-uri "pika" version))
9238 (sha256
9239 (base32
9240 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
9241 (build-system python-build-system)
9242 (native-inputs
9243 `(("python-pyev" ,python-pyev)
9244 ("python-tornado" ,python-tornado)
9245 ("python-twisted" ,python-twisted)))
9246 (home-page "https://pika.readthedocs.org")
9247 (synopsis "Pure Python AMQP Client Library")
9248 (description
9249 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
9250Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
9251network support library.")
9252 (license license:bsd-3)))
9253
9254(define-public python2-pika
9255 (package-with-python2 python-pika))
9256
9257(define-public python-ply
9258 (package
9259 (name "python-ply")
9260 (version "3.10")
9261 (source
9262 (origin
9263 (method url-fetch)
9264 (uri (pypi-uri "ply" version))
9265 (sha256
9266 (base32
9267 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
9268 (build-system python-build-system)
9269 (home-page "http://www.dabeaz.com/ply/")
9270 (synopsis "Python Lex & Yacc")
9271 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
9272It uses LR parsing and does extensive error checking.")
9273 (license license:bsd-3)))
9274
9275(define-public python2-ply
9276 (package-with-python2 python-ply))
9277
9278(define-public python-tabulate
9279 (package
9280 (name "python-tabulate")
9281 (version "0.7.7")
9282 (source (origin
9283 (method url-fetch)
9284 (uri (pypi-uri "tabulate" version))
9285 (sha256
9286 (base32
9287 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
9288 (build-system python-build-system)
9289 (arguments
9290 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
9291 ;; and the latest release is not tagged in the upstream repository.
9292 '(#:tests? #f))
9293 (home-page "https://bitbucket.org/astanin/python-tabulate")
9294 (synopsis "Pretty-print tabular data")
9295 (description
9296 "Tabulate is a library and command-line utility to pretty-print tabular
9297data in Python.")
9298 (license license:expat)))
9299
9300(define-public python2-tabulate
9301 (package-with-python2 python-tabulate))
9302
9303(define-public python-kazoo
9304 (package
9305 (name "python-kazoo")
9306 (version "2.4.0")
9307 (source
9308 (origin
9309 (method url-fetch)
9310 (uri (pypi-uri "kazoo" version))
9311 (sha256
9312 (base32
9313 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
9314 (build-system python-build-system)
9315 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
9316 (propagated-inputs
9317 `(("python-six" ,python-six)))
9318 (home-page "https://kazoo.readthedocs.org")
9319 (synopsis "High-level Zookeeper client library")
9320 (description
9321 "Kazoo is a Python client library for the Apache Zookeeper distributed
9322application service. It is designed to be easy to use and to avoid common
9323programming errors.")
9324 (license license:asl2.0)))
9325
9326(define-public python2-kazoo
9327 (package-with-python2 python-kazoo))
9328
9329(define-public python-pykafka
9330 (package
9331 (name "python-pykafka")
9332 (version "2.4.0")
9333 (source (origin
9334 (method url-fetch)
0ca1d040 9335 (uri (pypi-uri "pykafka" version))
44d10b1f
RW
9336 (sha256
9337 (base32
9338 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
9339 (build-system python-build-system)
9340 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
9341 (propagated-inputs
9342 `(("python-gevent" ,python-gevent)
9343 ("python-kazoo" ,python-kazoo)
9344 ("python-tabulate" ,python-tabulate)))
9345 (inputs
9346 `(("librdkafka" ,librdkafka)))
9347 (home-page "https://pykafka.readthedocs.io/")
9348 (synopsis "Apache Kafka client for Python")
9349 (description
9350 "PyKafka is a client for the Apache Kafka distributed messaging system.
9351It includes Python implementations of Kafka producers and consumers, which
9352are optionally backed by a C extension built on librdkafka.")
9353 (license license:asl2.0)))
9354
9355(define-public python2-pykafka
9356 (package-with-python2 python-pykafka))
9357
9358(define-public python-wcwidth
9359 (package
9360 (name "python-wcwidth")
9361 (version "0.1.7")
9362 (source
9363 (origin
9364 (method url-fetch)
9365 (uri (pypi-uri "wcwidth" version))
9366 (sha256
9367 (base32
9368 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
9369 (build-system python-build-system)
9370 (home-page "https://github.com/jquast/wcwidth")
9371 (synopsis "Measure number of terminal column cells of wide-character codes")
9372 (description "Wcwidth measures the number of terminal column cells of
9373wide-character codes. It is useful for those implementing a terminal emulator,
9374or programs that carefully produce output to be interpreted by one. It is a
9375Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
9376specified in POSIX.1-2001 and POSIX.1-2008.")
9377 (license license:expat)))
9378
9379(define-public python2-wcwidth
9380 (package-with-python2 python-wcwidth))
9381
9382(define-public python2-jsonrpclib
9383 (package
9384 (name "python2-jsonrpclib")
9385 (version "0.1.7")
9386 (source (origin
9387 (method url-fetch)
6571bba0 9388 (uri (pypi-uri "jsonrpclib" version))
44d10b1f
RW
9389 (sha256
9390 (base32
9391 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
9392 (build-system python-build-system)
9393 (arguments
9394 `(#:tests? #f
9395 #:python ,python-2))
9396 (home-page "https://github.com/joshmarshall/jsonrpclib/")
9397 (synopsis "Implementation of JSON-RPC specification for Python")
9398 (description
9399 "This library is an implementation of the JSON-RPC specification.
9400It supports both the original 1.0 specification, as well as the
9401new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
9402etc.")
9403 (license license:asl2.0)))
9404
9405(define-public python-chai
9406 (package
9407 (name "python-chai")
9408 (version "1.1.2")
9409 (source (origin
9410 (method url-fetch)
9411 (uri (pypi-uri "chai" version))
9412 (sha256
9413 (base32
9414 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
9415 (build-system python-build-system)
9416 (home-page "https://github.com/agoragames/chai")
9417 (synopsis "Mocking framework for Python")
9418 (description
9419 "Chai provides an api for mocking, stubbing and spying your python
9420objects, patterned after the Mocha library for Ruby.")
9421 (license license:bsd-3)))
9422
9423(define-public python2-chai
9424 (package-with-python2 python-chai))
9425
9426(define-public python-inflection
9427 (package
9428 (name "python-inflection")
9429 (version "0.3.1")
9430 (source
9431 (origin (method url-fetch)
9432 (uri (pypi-uri "inflection" version))
9433 (sha256
9434 (base32
9435 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
9436 (build-system python-build-system)
9437 (native-inputs
9438 `(("python-pytest" ,python-pytest)))
9439 (home-page "https://github.com/jpvanhal/inflection")
9440 (synopsis "Python string transformation library")
9441 (description
9442 "Inflection is a string transformation library. It singularizes
9443and pluralizes English words, and transforms strings from CamelCase to
9444underscored string.")
9445 (license license:expat)))
9446
9447(define-public python2-inflection
9448 (package-with-python2 python-inflection))
9449
9450(define-public python-pylev
9451 (package
9452 (name "python-pylev")
9453 (version "1.3.0")
9454 (source (origin
9455 (method url-fetch)
9456 (uri (pypi-uri "pylev" version))
9457 (sha256
9458 (base32
9459 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
9460 (build-system python-build-system)
9461 (home-page "https://github.com/toastdriven/pylev")
9462 (synopsis "Levenshtein distance implementation in Python")
9463 (description "Pure Python Levenshtein implementation, based off the
9464Wikipedia code samples at
9465@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
9466 (license license:bsd-3)))
9467
9468(define-public python2-pylev
9469 (package-with-python2 python-pylev))
9470
9471(define-public python-cleo
9472 (package
9473 (name "python-cleo")
9474 (version "0.6.1")
9475 (source (origin
9476 (method url-fetch)
9477 (uri (pypi-uri "cleo" version))
9478 (sha256
9479 (base32
9480 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
9481 (build-system python-build-system)
9482 (native-inputs
9483 `(;; For testing
9484 ("python-mock" ,python-mock)
9485 ("python-pytest-mock" ,python-pytest-mock)
9486 ("python-pytest" ,python-pytest)))
9487 (propagated-inputs
9488 `(("python-backpack" ,python-backpack)
9489 ("python-pastel" ,python-pastel)
9490 ("python-pylev" ,python-pylev)))
9491 (home-page "https://github.com/sdispater/cleo")
9492 (synopsis "Command-line arguments library for Python")
9493 (description
9494 "Cleo allows you to create command-line commands with signature in
9495docstring and colored output.")
9496 (license license:expat)))
9497
9498(define-public python2-cleo
9499 (package-with-python2 python-cleo))
9500
9501(define-public python-lazy-object-proxy
9502 (package
9503 (name "python-lazy-object-proxy")
9504 (version "1.3.1")
9505 (source (origin
9506 (method url-fetch)
9507 (uri (pypi-uri "lazy-object-proxy" version))
9508 (sha256
9509 (base32
9510 "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb"))))
9511 (build-system python-build-system)
9512 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
9513 (synopsis "Lazy object proxy for python")
9514 (description
9515 "Lazy object proxy is an object that wraps a callable but defers the call
9516until the object is actually required, and caches the result of said call.")
9517 (license license:bsd-2)))
9518
9519(define-public python2-lazy-object-proxy
9520 (package-with-python2 python-lazy-object-proxy))
9521
9522(define-public python-dnspython
9523 (package
9524 (name "python-dnspython")
9525 (version "1.15.0")
9526 (source (origin
9527 (method url-fetch)
9528 (uri (string-append "http://www.dnspython.org/kits/"
9529 version "/dnspython-" version ".tar.gz"))
9530 (sha256
9531 (base32
9532 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
9533 (build-system python-build-system)
9534 (arguments '(#:tests? #f)) ; XXX: requires internet access
9535 (home-page "http://www.dnspython.org")
9536 (synopsis "DNS toolkit for Python")
9537 (description
9538 "dnspython is a DNS toolkit for Python. It supports almost all record
9539types. It can be used for queries, zone transfers, and dynamic updates.
9540It supports TSIG authenticated messages and EDNS0.")
9541 (license license:expat)))
9542
9543(define-public python2-dnspython
9544 (package-with-python2 python-dnspython))
9545
9546(define-public python-email-validator
9547 (package
9548 (name "python-email-validator")
9549 (version "1.0.2")
9550 (source
9551 (origin (method url-fetch)
9552 (uri (pypi-uri "email_validator" version))
9553 (sha256
9554 (base32
9555 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
9556 (build-system python-build-system)
9557 (arguments
9558 '(#:phases
9559 (modify-phases %standard-phases
9560 (add-before 'build 'use-dnspython
9561 (lambda _
9562 (substitute* "setup.py"
9563 (("dnspython3") "dnspython"))
9564 #t)))))
9565 (propagated-inputs
9566 `(("python-dnspython" ,python-dnspython)
9567 ("python-idna" ,python-idna)))
9568 (home-page "https://github.com/JoshData/python-email-validator")
9569 (synopsis "Email address validation library for Python")
9570 (description
9571 "This library validates email address syntax and deliverability.")
9572 (license license:cc0)))
9573
9574(define-public python2-email-validator
9575 (package-with-python2 python-email-validator))
9576
9577(define-public python-ukpostcodeparser
9578 (package
9579 (name "python-ukpostcodeparser")
9580 (version "1.0.3")
9581 (source (origin
9582 (method url-fetch)
9583 (uri (pypi-uri "UkPostcodeParser" version))
9584 (sha256
9585 (base32
9586 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
9587 (build-system python-build-system)
9588 (home-page "https://github.com/hamstah/ukpostcodeparser")
9589 (synopsis "UK Postcode parser for Python")
9590 (description
9591 "This library provides the @code{parse_uk_postcode} function for
9592parsing UK postcodes.")
9593 (license license:expat)))
9594
9595(define-public python2-ukpostcodeparser
9596 (package-with-python2 python-ukpostcodeparser))
9597
9598(define-public python-faker
9599 (package
9600 (name "python-faker")
9601 (version "0.7.9")
9602 (source (origin
9603 (method url-fetch)
9604 (uri (pypi-uri "Faker" version))
9605 (sha256
9606 (base32
9607 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
9608 (patches
9609 (search-patches "python-faker-fix-build-32bit.patch"))
9610 (modules '((guix build utils)))
9611 (snippet
9612 '(begin
9613 (for-each delete-file (find-files "." "\\.pyc$"))
9614 #t))))
9615 (build-system python-build-system)
9616 (arguments
9617 '(#:phases
9618 (modify-phases %standard-phases
9619 (replace 'check
49ff8827 9620 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
44d10b1f
RW
9621 (native-inputs
9622 `(;; For testing
9623 ("python-email-validator" ,python-email-validator)
9624 ("python-mock" ,python-mock)
9625 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
9626 (propagated-inputs
9627 `(("python-dateutil" ,python-dateutil)
9628 ("python-six" ,python-six)))
9629 (home-page "https://github.com/joke2k/faker")
9630 (synopsis "Python package that generates fake data")
9631 (description
9632 "Faker is a Python package that generates fake data such as names,
9633addresses, and phone numbers.")
9634 (license license:expat)
9635 (properties `((python2-variant . ,(delay python2-faker))))))
9636
9637(define-public python2-faker
9638 (let ((base (package-with-python2 (strip-python2-variant
9639 python-faker))))
9640 (package
9641 (inherit base)
9642 (propagated-inputs
9643 `(("python2-ipaddress" ,python2-ipaddress)
9644 ,@(package-propagated-inputs base))))))
9645
9646(define-public python-pyaml
9647 (package
9648 (name "python-pyaml")
9649 (version "18.11.0")
9650 (source (origin
9651 (method url-fetch)
9652 (uri (pypi-uri "pyaml" version))
9653 (sha256
9654 (base32
9655 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
9656 (build-system python-build-system)
9657 (native-inputs
9658 `(("python-unidecode" ,python-unidecode)))
9659 (propagated-inputs
9660 `(("python-pyyaml" ,python-pyyaml)))
9661 (home-page "https://github.com/mk-fg/pretty-yaml")
9662 (synopsis "YAML pretty-print library for Python")
9663 (description
9664 "pyaml is a PyYAML based python module to produce pretty and readable
9665YAML-serialized data.")
9666 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
9667
9668(define-public python2-pyaml
9669 (package-with-python2 python-pyaml))
9670
9671(define-public python-backpack
9672 (package
9673 (name "python-backpack")
9674 (version "0.1")
9675 (source
9676 (origin
9677 (method url-fetch)
9678 (uri (pypi-uri "backpack" version))
9679 (sha256
9680 (base32
9681 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
9682 (build-system python-build-system)
9683 (native-inputs
9684 `(("python-pytest" ,python-pytest)
9685 ("python-nose" ,python-nose)))
9686 (propagated-inputs
9687 `(("python-simplejson" ,python-simplejson)))
9688 (home-page "https://github.com/sdispater/backpack")
9689 (synopsis "Utilities for working with Python collections")
9690 (description "Backpack provides some useful utilities for working with
9691collections of data.")
9692 (license license:expat)))
9693
9694(define-public python2-backpack
9695 (package-with-python2 python-backpack))
9696
9697(define-public python-prompt-toolkit
9698 (package
9699 (name "python-prompt-toolkit")
9700 (version "2.0.7")
9701 (source
9702 (origin
9703 (method url-fetch)
9704 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
9705 (sha256
9706 (base32
9707 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
9708 (build-system python-build-system)
9709 (arguments
9710 `(#:phases
9711 (modify-phases %standard-phases
9712 (delete 'check)
9713 (add-after 'install 'post-install-check
9714 (lambda* (#:key inputs outputs #:allow-other-keys)
9715 ;; HOME is needed for the test
9716 ;; "test_pathcompleter_can_expanduser".
9717 (setenv "HOME" "/tmp")
9718 (add-installed-pythonpath inputs outputs)
9719 (invoke "py.test"))))))
9720 (propagated-inputs
9721 `(("python-wcwidth" ,python-wcwidth)
9722 ("python-six" ,python-six)
9723 ("python-pygments" ,python-pygments)))
9724 (native-inputs
9725 `(("python-pytest" ,python-pytest)))
9726 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
9727 (synopsis "Library for building command line interfaces in Python")
9728 (description
9729 "Prompt-Toolkit is a library for building interactive command line
9730interfaces in Python. It's like GNU Readline but it also features syntax
9731highlighting while typing, out-of-the-box multi-line input editing, advanced
9732code completion, incremental search, support for Chinese double-width
9733characters, mouse support, and auto suggestions.")
9734 (license license:bsd-3)))
9735
9736(define-public python2-prompt-toolkit
9737 (package-with-python2 python-prompt-toolkit))
9738
9739(define-public python-prompt-toolkit-1
9740 (package (inherit python-prompt-toolkit)
9741 (version "1.0.15")
9742 (source
9743 (origin
9744 (method url-fetch)
9745 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
9746 (sha256
9747 (base32
9748 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
9749
9750(define-public python2-prompt-toolkit-1
9751 (package-with-python2 python-prompt-toolkit-1))
9752
9753(define-public python-jedi
9754 (package
9755 (name "python-jedi")
40bd0aa3 9756 (version "0.13.2")
44d10b1f
RW
9757 (source
9758 (origin
9759 (method url-fetch)
9760 (uri (pypi-uri "jedi" version))
9761 (sha256
9762 (base32
40bd0aa3 9763 "1za944msp0f8x36qa8l309jhv0kzlsdh7r9nj3z12y8npnsh45sp"))))
44d10b1f
RW
9764 (build-system python-build-system)
9765 (arguments
40bd0aa3 9766 `( ;; Many tests are failing with Python 3.7.x as of version 0.13.2 (see:
44d10b1f
RW
9767 ;; https://github.com/davidhalter/jedi/issues/1263)
9768 #:tests? #f
9769 #:phases
9770 (modify-phases %standard-phases
9771 (replace 'check
9772 (lambda* (#:key tests? #:allow-other-keys)
9773 (when tests?
9774 (invoke "py.test" "-vv")))))))
9775 (native-inputs
9776 `(("python-pytest" ,python-pytest)
9777 ("python-docopt" ,python-docopt)))
9778 (propagated-inputs
9779 `(("python-parso" ,python-parso)))
9780 (home-page "https://github.com/davidhalter/jedi")
9781 (synopsis "Autocompletion and static analysis library for Python")
9782 (description
9783 "Jedi is a static analysis tool for Python that can be used in Integrated
9784Development Environments (@dfn{IDE}s) and text editors. It understands Python
9785on a deeper level than many other static analysis frameworks for Python.
9786
9787Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
9788well.")
9789 (license license:expat)))
9790
9791(define-public python2-jedi
9792 (package-with-python2 python-jedi))
9793
9794(define-public ptpython
9795 (package
9796 (name "ptpython")
9797 (version "0.34")
9798 (source (origin
9799 (method url-fetch)
9800 (uri (pypi-uri "ptpython" version))
9801 (sha256
9802 (base32
9803 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
9804 (build-system python-build-system)
9805 (arguments
9806 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
9807 (propagated-inputs
9808 `(("python-docopt" ,python-docopt)
9809 ("python-jedi" ,python-jedi)
9810 ("python-prompt-toolkit" ,python-prompt-toolkit)
9811 ("python-pygments" ,python-pygments)))
9812 (home-page "https://github.com/jonathanslenders/ptpython")
9813 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
9814 (description
9815 "ptpython is a Python read-eval-print loop with IDE-like features.
9816It supports syntax highlighting, multiline editing, autocompletion, mouse,
9817color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
9818etc.")
9819 (license license:bsd-3)
9820 (properties `((python2-variant . ,(delay ptpython-2))))))
9821
9822(define-public ptpython-2
9823 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
9824 (package
9825 (inherit base)
9826 (name "ptpython2"))))
9827
9828(define-public python-stem
9829 (package
9830 (name "python-stem")
9831 (version "1.7.0")
9832 (source
9833 (origin
9834 (method url-fetch)
9835 (uri (pypi-uri "stem" version))
9836 (sha256
9837 (base32
9838 "1awiglfiajnx2hva9aqpj3fmdvdb4qg7cwnlfyih827m68y3cq8v"))))
9839 (build-system python-build-system)
9840 (arguments
9841 `(#:phases
9842 (modify-phases %standard-phases
9843 (replace 'check
9844 (lambda _
9845 (invoke "./run_tests.py" "--unit")
9846 #t)))))
9847 (native-inputs
9848 `(("python-mock" ,python-mock)
9849 ("python-pycodestyle" ,python-pycodestyle)
9850 ("python-pyflakes" ,python-pyflakes)))
9851 (home-page "https://stem.torproject.org/")
9852 (synopsis
9853 "Python controller library that allows applications to interact with Tor")
9854 (description
9855 "Stem is a Python controller library for Tor. With it you can use Tor's
9856control protocol to script against the Tor process and read descriptor data
9857relays publish about themselves.")
9858 (license license:lgpl3)))
9859
9860(define-public python2-stem
9861 (package-with-python2 python-stem))
9862
9863(define-public python-pyserial
9864 (package
9865 (name "python-pyserial")
9866 (version "3.1.1")
9867 (source
9868 (origin
9869 (method url-fetch)
9870 (uri (pypi-uri "pyserial" version))
9871 (sha256
9872 (base32
9873 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
9874 (build-system python-build-system)
9875 (arguments
9876 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
9877 ;; #:phases
9878 ;; (modify-phases %standard-phases
9879 ;; (replace 'check
9880 ;; (lambda _
9881 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
9882 (home-page
9883 "https://github.com/pyserial/pyserial")
9884 (synopsis "Python Serial Port Bindings")
9885 (description "@code{pyserial} provide serial port bindings for Python. It
9886supports different byte sizes, stop bits, parity and flow control with RTS/CTS
9887and/or Xon/Xoff. The port is accessed in RAW mode.")
9888 (license license:bsd-3)))
9889
9890(define-public python2-pyserial
9891 (package-with-python2 python-pyserial))
9892
9893(define-public python-kivy
9894 (package
9895 (name "python-kivy")
9896 (version "1.10.1")
9897 (source
9898 (origin
9899 (method url-fetch)
9900 (uri (pypi-uri "Kivy" version))
9901 (file-name (string-append name "-" version ".tar.gz"))
9902 (sha256
9903 (base32
9904 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
9905 (build-system python-build-system)
9906 (arguments
9907 `(#:tests? #f ; Tests require many optional packages
9908 #:phases
9909 (modify-phases %standard-phases
9910 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
9911 (lambda* (#:key inputs #:allow-other-keys)
9912 (setenv "KIVY_SDL2_PATH"
9913 (string-append (assoc-ref inputs "sdl-union")
9914 "/include/SDL2"))
9915 #t)))))
9916 (native-inputs
9917 `(("git" ,git)
9918 ("pkg-config" ,pkg-config)
9919 ("python-cython" ,python-cython)))
9920 (inputs
9921 `(("gstreamer" ,gstreamer)
9922 ("mesa" ,mesa)
9923 ("sdl-union"
9924 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
9925 (home-page "http://kivy.org")
9926 (synopsis
9927 "Multitouch application framework")
9928 (description
9929 "A software library for rapid development of
9930hardware-accelerated multitouch applications.")
9931 (license license:expat)))
9932
9933(define-public python2-kivy
9934 (package-with-python2 python-kivy))
9935
9936(define-public python-kivy-next
9937 (deprecated-package "python-kivy-next" python-kivy))
9938
9939(define-public python2-kivy-next
9940 (deprecated-package "python2-kivy-next" python2-kivy))
9941
9942(define-public python-binaryornot
9943 (package
9944 (name "python-binaryornot")
9945 (version "0.4.4")
9946 (source (origin
9947 (method url-fetch)
9948 (uri (pypi-uri "binaryornot" version))
9949 (sha256
9950 (base32
9951 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
9952 (build-system python-build-system)
9953 (propagated-inputs
9954 `(("python-chardet" ,python-chardet)
9955 ("python-hypothesis" ,python-hypothesis)))
9956 (home-page "https://github.com/audreyr/binaryornot")
9957 (synopsis "Package to check if a file is binary or text")
9958 (description "Ultra-lightweight pure Python package to check if a file is
9959binary or text.")
9960 (license license:bsd-3)
9961 (properties `((python2-variant . ,(delay python2-binaryornot))))))
9962
9963(define-public python2-binaryornot
9964 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
9965 (package (inherit base)
9966 (propagated-inputs
9967 `(("python2-enum34" ,python2-enum34)
9968 ,@(package-propagated-inputs base))))))
9969
9970(define-public python-nltk
9971 (package
9972 (name "python-nltk")
9973 (version "3.2.1")
9974 (source (origin
9975 (method url-fetch)
9976 (uri (pypi-uri "nltk" version))
9977 (sha256
9978 (base32
9979 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
9980 (build-system python-build-system)
9981 (arguments
9982 '(;; The tests require some extra resources to be downloaded.
9983 ;; TODO Try packaging these resources.
9984 #:tests? #f))
9985 (home-page "http://nltk.org/")
9986 (synopsis "Natural Language Toolkit")
9987 (description "It provides interfaces to over 50 corpora and lexical
9988resources such as WordNet, along with a suite of text processing libraries
9989for classification, tokenization, stemming, tagging, parsing, and semantic
9990reasoning, wrappers for natural language processing libraries.")
9991 (license license:asl2.0)))
9992
9993(define-public python2-nltk
9994 (package-with-python2 python-nltk))
9995
9996(define-public python-pymongo
9997 (package
9998 (name "python-pymongo")
9999 (version "3.7.2")
10000 (source (origin
10001 (method url-fetch)
10002 (uri (pypi-uri "pymongo" version))
10003 (sha256
10004 (base32
10005 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
10006 (build-system python-build-system)
10007 (propagated-inputs
10008 `(("python-certifi" ,python-certifi)))
10009 (home-page "https://github.com/mongodb/mongo-python-driver")
10010 (synopsis "Python driver for MongoDB")
10011 (description "Python driver for MongoDB.")
10012 (license license:asl2.0)))
10013
10014(define-public python2-pymongo
10015 (package-with-python2 python-pymongo))
10016
44d10b1f
RW
10017(define-public python-consul
10018 (package
10019 (name "python-consul")
10020 (version "0.6.1")
10021 (source
10022 (origin
10023 (method url-fetch)
10024 (uri (pypi-uri "python-consul" version))
10025 (sha256
10026 (base32
10027 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
10028 (build-system python-build-system)
10029 (arguments
10030 '(#:tests? #f)) ; The tests are not distributed
10031 (propagated-inputs
10032 `(("python-requests" ,python-requests)
10033 ("python-six" ,python-six)))
10034 (home-page "https://github.com/cablehead/python-consul")
10035 (synopsis "Python client for Consul")
10036 (description
10037 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
10038discovery, monitoring and configuration.")
10039 (license license:expat)))
10040
10041(define-public python2-consul
10042 (package-with-python2 python-consul))
10043
10044(define-public python-schematics
10045 (package
10046 (name "python-schematics")
10047 (version "1.1.1")
10048 (source
10049 (origin
10050 (method url-fetch)
10051 (uri (string-append
10052 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
10053 (file-name (string-append name "-" version ".tar.gz"))
10054 (sha256
10055 (base32
10056 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
10057 (build-system python-build-system)
10058 (propagated-inputs
10059 `(("python-six" ,python-six)))
10060 (arguments
10061 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
10062 ; version requirements (eg python-coveralls)
10063 (home-page "https://github.com/schematics/schematics")
10064 (synopsis "Python Data Structures for Humans")
10065 (description "Python Data Structures for Humans.")
10066 (license license:bsd-3)))
10067
10068(define-public python2-schematics
10069 (package-with-python2 python-schematics))
10070
10071(define-public python-odfpy
10072 (package
10073 (name "python-odfpy")
10074 (version "1.3.3")
10075 (source (origin
10076 (method url-fetch)
10077 (uri (pypi-uri "odfpy" version))
10078 (sha256
10079 (base32
10080 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10081 (arguments
10082 `(#:modules ((srfi srfi-1)
10083 (guix build python-build-system)
10084 (guix build utils))
10085 #:phases
10086 (modify-phases %standard-phases
10087 (replace 'check
10088 ;; The test runner invokes python2 and python3 for test*.py.
10089 ;; To avoid having both in inputs, we replicate it here.
10090 (lambda _
21ccc01d
RW
10091 (for-each (lambda (test-file) (invoke "python" test-file))
10092 (find-files "tests" "^test.*\\.py$"))
10093 #t)))))
44d10b1f
RW
10094 (build-system python-build-system)
10095 (home-page "https://github.com/eea/odfpy")
10096 (synopsis "Python API and tools to manipulate OpenDocument files")
10097 (description "Collection of libraries and utility programs written in
10098Python to manipulate OpenDocument 1.2 files.")
10099 (license
10100 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
10101 ;; number of files with other licenses.
10102 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
10103
10104(define-public python2-odfpy
10105 (package-with-python2 python-odfpy))
10106
10107(define-public python-natsort
10108 (package
10109 (name "python-natsort")
10110 (version "5.4.1")
10111 (source (origin
10112 (method url-fetch)
10113 (uri (pypi-uri "natsort" version))
10114 (sha256
10115 (base32
10116 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
10117 (build-system python-build-system)
10118 (arguments
10119 `(#:modules ((guix build utils)
10120 (guix build python-build-system)
10121 (srfi srfi-1)
10122 (srfi srfi-26)
10123 (ice-9 ftw))
10124 #:phases
10125 (modify-phases %standard-phases
10126 (add-before 'check 'set-cachedir
10127 ;; Tests require write access to $HOME by default
10128 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
10129 (replace 'check
10130 (lambda _
10131 (let ((cwd (getcwd)))
10132 (setenv "PYTHONPATH"
10133 (string-append
10134 cwd "/build/"
10135 (find (cut string-prefix? "lib" <>)
10136 (scandir (string-append cwd "/build")))
10137 ":"
10138 (getenv "PYTHONPATH")))
10139 (invoke "pytest" "-v")))))))
10140 (native-inputs
10141 `(("python-hypothesis" ,python-hypothesis)
10142 ("python-pytest-cov" ,python-pytest-cov)
10143 ("python-pytest-mock" ,python-pytest-mock)
10144 ("python-pytest" ,python-pytest)))
10145 (propagated-inputs ; TODO: Add python-fastnumbers.
10146 `(("python-pyicu" ,python-pyicu)))
10147 (home-page "https://github.com/SethMMorton/natsort")
10148 (synopsis "Natural sorting for python and shell")
10149 (description
10150 "Natsort lets you apply natural sorting on lists instead of
10151lexicographical. If you use the built-in @code{sorted} method in python
10152on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
10153returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
10154function @code{natsorted} that identifies numbers and sorts them separately
10155from strings. It can also sort version numbers, real numbers, mixed types
10156and more, and comes with a shell command @command{natsort} that exposes this
10157functionality in the command line.")
10158 (license license:expat)
10159 (properties `((python2-variant . ,(delay python2-natsort))))))
10160
10161(define-public python2-natsort
10162 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
10163 (package (inherit base)
10164 (native-inputs
10165 `(("python2-pathlib" ,python2-pathlib)
10166 ,@(package-native-inputs base))))))
10167
10168(define-public python-glances
10169 (package
10170 (name "python-glances")
10171 (version "3.0.2")
10172 (source
10173 (origin
10174 (method url-fetch)
10175 (uri (pypi-uri "Glances" version))
10176 (sha256
10177 (base32
10178 "09fxysfp1n16csqvzvawy74qm6a94nvwjf3vcf5gkqp4i6k4vjjy"))))
10179 (build-system python-build-system)
10180 (propagated-inputs
10181 `(("python-psutil" ,python-psutil)))
10182 (home-page
10183 "https://github.com/nicolargo/glances")
10184 (synopsis
10185 "A cross-platform curses-based monitoring tool")
10186 (description
10187 "Glances is a curses-based monitoring tool for a wide variety of platforms.
10188Glances uses the PsUtil library to get information from your system. It monitors
10189CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
10190 (license license:lgpl3+)))
10191
10192(define-public python2-glances
10193 (package-with-python2 python-glances))
10194
10195(define-public python-graphql-core
10196 (package
10197 (name "python-graphql-core")
10198 (version "0.5.3")
10199 (source
10200 (origin
10201 (method url-fetch)
10202 (uri (pypi-uri "graphql-core" version))
10203 (sha256
10204 (base32
10205 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
10206 (build-system python-build-system)
10207 (arguments
10208 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
10209 #:phases
10210 (modify-phases %standard-phases
10211 (add-after 'unpack 'patch-hardcoded-version
10212 (lambda _ (substitute*
10213 "setup.py"
10214 (("'gevent==1.1rc1'") "'gevent'"))
10215 #t)))))
10216 (native-inputs
10217 `(("python-gevent" ,python-gevent)
10218 ("python-mock" ,python-mock)
10219 ("python-pytest-mock" ,python-pytest-mock)))
10220 (propagated-inputs
10221 `(("python-promise" ,python-promise)
10222 ("python-six" ,python-six)))
10223 (home-page "https://github.com/graphql-python/graphql-core")
10224 (synopsis "GraphQL implementation for Python")
10225 (description
10226 "GraphQL implementation for Python. GraphQL is a data query language and
10227runtime designed and used to request and deliver data to mobile and web apps.
10228This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
10229to Python.")
10230 (license license:expat)))
10231
10232(define-public python2-graphql-core
10233 (package-with-python2 python-graphql-core))
10234
10235(define-public python-graphql-relay
10236 (package
10237 (name "python-graphql-relay")
10238 (version "0.4.5")
10239 (source
10240 (origin
10241 (method url-fetch)
10242 (uri (pypi-uri "graphql-relay" version))
10243 (sha256
10244 (base32
10245 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
10246 (build-system python-build-system)
10247 (arguments
10248 '(#:tests? #f)) ; The tests are not distributed
10249 (propagated-inputs
10250 `(("python-graphql-core" ,python-graphql-core)
10251 ("python-promise" ,python-promise)
10252 ("python-six" ,python-six)))
10253 (home-page "https://github.com/graphql-python/graphql-relay-py")
10254 (synopsis "Relay implementation for Python")
10255 (description
10256 "This is a library to allow the easy creation of Relay-compliant servers
10257using the GraphQL Python reference implementation of a GraphQL server. It
10258should be noted that the code is a exact port of the original
10259@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
10260from Facebook.")
10261 (license license:expat)))
10262
10263(define-public python2-graphql-relay
10264 (package-with-python2 python-graphql-relay))
10265
10266(define-public python-graphene
10267 (package
10268 (name "python-graphene")
10269 (version "0.10.2")
10270 (source
10271 (origin
10272 (method url-fetch)
10273 (uri (pypi-uri "graphene" version))
10274 (sha256
10275 (base32
10276 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
10277 (build-system python-build-system)
10278 (propagated-inputs
10279 `(("python-graphql-core" ,python-graphql-core)
10280 ("python-graphql-relay" ,python-graphql-relay)
10281 ("python-iso8601" ,python-iso8601)
10282 ("python-promise" ,python-promise)
10283 ("python-six" ,python-six)))
10284 (arguments
10285 `(#:tests? #f)) ; no tests/ in the PyPI tarball
10286 (home-page "http://graphene-python.org/")
10287 (synopsis "GraphQL Framework for Python")
10288 (description
10289 "Graphene is a Python library for building GraphQL schemas/types.
10290A GraphQL schema describes your data model, and provides a GraphQL server
10291with an associated set of resolve methods that know how to fetch data.")
10292 (properties `((python2-variant . ,(delay python2-graphene))))
10293 (license license:expat)))
10294
10295(define-public python2-graphene
10296 (let ((base (package-with-python2
10297 (strip-python2-variant python-graphene))))
10298 (package (inherit base)
10299 (native-inputs
10300 `(("python2-sqlalchemy" ,python2-sqlalchemy)
10301 ,@(package-native-inputs base))))))
10302
10303(define-public python-nautilus
10304 (package
10305 (name "python-nautilus")
10306 (version "0.4.9")
10307 (source
10308 (origin
10309 (method url-fetch)
10310 (uri (pypi-uri "nautilus" version))
10311 (sha256
10312 (base32
10313 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
10314 (build-system python-build-system)
10315 (arguments `(#:tests? #f)) ; fails to import test modules
10316 (propagated-inputs
10317 `(("python-bcrypt" ,python-bcrypt)
10318 ("python-click" ,python-click)
10319 ("python-consul" ,python-consul)
10320 ("python-graphene" ,python-graphene)
10321 ("python-jinja2" ,python-jinja2)
10322 ("python-peewee" ,python-peewee)
10323 ("python-pika" ,python-pika)
10324 ("python-tornado" ,python-tornado)
10325 ("python-wtforms" ,python-wtforms)))
10326 (native-inputs
10327 `(("python-nose2" ,python-nose2)))
10328 (home-page "https://github.com/AlecAivazis/nautilus")
10329 (synopsis "Library for creating microservice applications")
10330 (description
10331 "Nautilus is a framework for flux based microservices that looks to
10332provide extendible implementations of common aspects of a cloud so that you can
10333focus on building massively scalable web applications.")
10334 (license license:expat)))
10335
10336(define-public python-snowballstemmer
10337 (package
10338 (name "python-snowballstemmer")
10339 (version "1.2.1")
10340 (source (origin
10341 (method url-fetch)
10342 (uri (pypi-uri "snowballstemmer" version))
10343 (sha256
10344 (base32
10345 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
10346 (build-system python-build-system)
10347 (arguments
10348 `(;; No tests exist
10349 #:tests? #f))
10350 (home-page "https://github.com/shibukawa/snowball_py")
10351 (synopsis "Snowball stemming library collection for Python")
10352 (description "This package provides 16 word stemmer algorithms generated
10353from Snowball algorithms. It includes the 15 original ones plus the Poerter
10354English stemmer.")
10355 (license license:bsd-3)))
10356
10357(define-public python2-snowballstemmer
10358 (package-with-python2 python-snowballstemmer))
10359
10360(define-public python-sphinx-cloud-sptheme
10361 (package
10362 (name "python-sphinx-cloud-sptheme")
10363 (version "1.8.0")
10364 (source (origin
10365 (method url-fetch)
10366 (uri (pypi-uri "cloud_sptheme" version))
10367 (sha256
10368 (base32
10369 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
10370 (build-system python-build-system)
10371 ;; FIXME: The 'pypi' release archive does not contain tests.
10372 (arguments '(#:tests? #f))
10373 (native-inputs
10374 `(("python-sphinx" ,python-sphinx)))
10375 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
10376 (synopsis "'Cloud' theme for Sphinx documenter")
10377 (description "This package contains the \"Cloud\" theme for Sphinx and some
10378related extensions.")
10379 (license license:bsd-3)))
10380
10381(define-public python2-sphinx-cloud-sptheme
10382 (package-with-python2 python-sphinx-cloud-sptheme))
10383
10384(define-public python-sphinx-alabaster-theme
10385 (package
10386 (name "python-sphinx-alabaster-theme")
10387 (version "0.7.12")
10388 (source (origin
10389 (method url-fetch)
10390 (uri (pypi-uri "alabaster" version))
10391 (sha256
10392 (base32
10393 "00nwwjj2d2ym4s2kk217x7jkx1hnczc3fvm8yxbqmsp6b0nxfqd6"))))
10394 (build-system python-build-system)
10395 (propagated-inputs
10396 `(("python-pygments" ,python-pygments)))
10397 (home-page "https://alabaster.readthedocs.io/")
10398 (synopsis "Configurable sidebar-enabled Sphinx theme")
10399 (description "Alabaster is a visually (c)lean, responsive, configurable
10400theme for the Sphinx documentation system. It's the default theme of Sphinx.")
10401 (license license:bsd-3)))
10402
10403(define-public python2-sphinx-alabaster-theme
10404 (package-with-python2 python-sphinx-alabaster-theme))
10405
10406(define-public python-setproctitle
10407(package
10408 (name "python-setproctitle")
10409 (version "1.1.10")
10410 (source
10411 (origin
10412 (method url-fetch)
10413 (uri (pypi-uri "setproctitle" version))
10414 (sha256
10415 (base32
10416 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
10417 (build-system python-build-system)
10418 (arguments
10419 '(#:phases
10420 (modify-phases %standard-phases
10421 (add-before 'check 'patch-Makefile
10422 ;; Stricly this is only required for the python2 variant.
10423 ;; But adding a phase in an inherited package seems to be
10424 ;; cumbersum. So we patch even for python3.
10425 (lambda _
10426 (let ((nose (assoc-ref %build-inputs "python2-nose")))
10427 (when nose
10428 (substitute* "Makefile"
10429 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
10430 (string-append nose "/bin/nosetests "))))
10431 #t)))
10432 (replace 'check
10433 (lambda _
10434 (setenv "PYTHON" (or (which "python3") (which "python")))
10435 (setenv "PYCONFIG" (or (which "python3-config")
10436 (which "python-config")))
10437 (setenv "CC" "gcc")
10438 ;; No need to extend PYTHONPATH to find the built package, since
10439 ;; the Makefile will build anyway
10440 (invoke "make" "check"))))))
10441 (native-inputs
10442 `(("procps" ,procps))) ; required for tests
10443 (home-page
10444 "https://github.com/dvarrazzo/py-setproctitle")
10445 (synopsis
10446 "Setproctitle implementation for Python to customize the process title")
10447 (description "The library allows a process to change its title (as displayed
10448by system tools such as ps and top).
10449
10450Changing the title is mostly useful in multi-process systems, for
10451example when a master process is forked: changing the children's title
10452allows to identify the task each process is busy with. The technique
10453is used by PostgreSQL and the OpenSSH Server for example.")
10454 (license license:bsd-3)
10455 (properties `((python2-variant . ,(delay python2-setproctitle))))))
10456
10457(define-public python2-setproctitle
10458 (let ((base (package-with-python2
10459 (strip-python2-variant python-setproctitle))))
10460 (package
10461 (inherit base)
10462 (native-inputs `(("python2-nose" ,python2-nose)
10463 ,@(package-native-inputs base))))))
10464
10465(define-public python-validictory
10466 (package
10467 (name "python-validictory")
10468 (version "1.0.1")
10469 (source
10470 (origin
10471 (method url-fetch)
10472 (uri (pypi-uri "validictory" version))
10473 (sha256
10474 (base32
10475 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
10476 (build-system python-build-system)
10477 (arguments
10478 '(#:phases
10479 (modify-phases %standard-phases
10480 (add-after 'unpack 'bootstrap
10481 ;; Move the tests out of the package directory to avoid
10482 ;; packaging them.
10483 (lambda* _
10484 (rename-file "validictory/tests" "tests")
10485 (delete-file "tests/__init__.py")))
10486 (replace 'check
10487 (lambda _
10488 ;; Extend PYTHONPATH so the built package will be found.
10489 (setenv "PYTHONPATH"
10490 (string-append (getcwd) "/build/lib:"
10491 (getenv "PYTHONPATH")))
6568bd5d 10492 (invoke "py.test" "-vv" ))))))
44d10b1f
RW
10493 (native-inputs
10494 `(("python-pytest" ,python-pytest)))
10495 (home-page
10496 "https://github.com/jamesturk/validictory")
10497 (synopsis "General purpose Python data validator")
10498 (description "It allows validation of arbitrary Python data structures.
10499
10500The schema format is based on the JSON Schema
10501proposal (http://json-schema.org), so combined with json the library is also
10502useful as a validator for JSON data.")
10503 (license license:expat)))
10504
10505(define-public python2-validictory
10506 (package-with-python2 python-validictory))
10507
10508(define-public python-pyelftools
10509 (package
10510 (name "python-pyelftools")
10511 (version "0.25")
10512 (source
10513 (origin
10514 (method url-fetch)
10515 (uri (pypi-uri "pyelftools" version))
10516 (sha256
10517 (base32
10518 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
10519 (build-system python-build-system)
10520 (arguments
10521 `(#:phases
10522 (modify-phases %standard-phases
10523 (add-before 'check 'set-pythonpath
10524 (lambda _
10525 (setenv "PYTHONPATH"
10526 (string-append
10527 (getcwd) "/test/"
10528 ":" (getenv "PYTHONPATH")))
10529 #t)))))
10530 (home-page
10531 "https://github.com/eliben/pyelftools")
10532 (synopsis
10533 "Analyze binary and library file information")
10534 (description "This Python library provides interfaces for parsing and
10535analyzing two binary and library file formats; the Executable and Linking
10536Format (ELF), and debugging information in the Debugging With Attributed
10537Record Format (DWARF).")
10538 (license license:public-domain)))
10539
10540(define-public python-pyev
10541 (package
10542 (name "python-pyev")
10543 (version "0.9.0")
10544 (source
10545 (origin
10546 (method url-fetch)
10547 (uri (pypi-uri "pyev" version))
10548 (sha256
10549 (base32
10550 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
10551 (build-system python-build-system)
10552 (arguments
10553 `(#:tests? #f ; no test suite
10554 #:phases
10555 (modify-phases %standard-phases
10556 (add-after 'unpack 'patch
10557 (lambda* (#:key inputs #:allow-other-keys)
10558 (let ((libev (string-append (assoc-ref inputs "libev")
10559 "/lib/libev.so.4")))
10560 (substitute* "setup.py"
10561 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
10562 (string-append "libev_dll_name = \"" libev "\"")))))))))
10563 (inputs
10564 `(("libev" ,libev)))
10565 (home-page "http://pythonhosted.org/pyev/")
10566 (synopsis "Python libev interface")
10567 (description "Pyev provides a Python interface to libev.")
10568 (license license:gpl3)))
10569
10570(define-public python2-pyev
10571 (package-with-python2 python-pyev))
10572
10573(define-public python-imagesize
10574 (package
10575 (name "python-imagesize")
10576 (version "1.1.0")
10577 (source
10578 (origin
10579 (method url-fetch)
10580 (uri (pypi-uri "imagesize" version))
10581 (sha256
10582 (base32
10583 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
10584 (build-system python-build-system)
10585 (home-page "https://github.com/shibukawa/imagesize_py")
10586 (synopsis "Gets image size of files in various formats in Python")
10587 (description
10588 "This package allows determination of image size from
10589PNG, JPEG, JPEG2000 and GIF files in pure Python.")
10590 (license license:expat)))
10591
10592(define-public python2-imagesize
10593 (package-with-python2 python-imagesize))
10594
10595(define-public python-termstyle
10596 (package
10597 (name "python-termstyle")
10598 (version "0.1.11")
10599 (source
10600 (origin
10601 (method url-fetch)
10602 (uri (pypi-uri "termstyle" version))
10603 (sha256
10604 (base32
10605 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
10606 (build-system python-build-system)
10607 (arguments
10608 '(#:phases
10609 (modify-phases %standard-phases
10610 (replace 'check
10611 (lambda _
831080a6 10612 (invoke "python" "test3.py"))))))
44d10b1f
RW
10613 (home-page "https://github.com/gfxmonk/termstyle")
10614 (synopsis "Console text coloring for Python")
10615 (description "This package provides console text coloring for Python.")
10616 (license license:bsd-3)))
10617
10618(define-public python-argcomplete
10619 (package
10620 (name "python-argcomplete")
10621 (version "1.7.0")
10622 (source
10623 (origin
10624 (method url-fetch)
10625 (uri (pypi-uri "argcomplete" version))
10626 (sha256
10627 (base32
10628 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
10629 (build-system python-build-system)
10630 (native-inputs
10631 `(("python-pexpect" ,python-pexpect)
10632 ("tcsh" ,tcsh)
10633 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
10634 (home-page "https://github.com/kislyuk/argcomplete")
10635 (synopsis "Shell tab completion for Python argparse")
10636 (description "argcomplete provides extensible command line tab completion
10637of arguments and options for Python scripts using @code{argparse}. It's
10638particularly useful for programs with many options or sub-parsers that can
10639dynamically suggest completions; for example, when browsing resources over the
10640network.")
10641 (license license:asl2.0)))
10642
10643(define-public python2-argcomplete
10644 (package-with-python2 python-argcomplete))
10645
10646(define-public python-xopen
10647 (package
10648 (name "python-xopen")
10649 (version "0.3.3")
10650 (source
10651 (origin
10652 (method url-fetch)
10653 (uri (pypi-uri "xopen" version))
10654 (sha256
10655 (base32
10656 "1a0wbil552wsmklwd89ssmgz3pjd86qa9i7jh8wqb9wslc8a2qjr"))
10657 (file-name (string-append name "-" version ".tar.gz"))))
10658 (build-system python-build-system)
10659 (home-page "https://github.com/marcelm/xopen/")
10660 (synopsis "Open compressed files transparently")
10661 (description "This module provides an @code{xopen} function that works like
10662Python's built-in @code{open} function, but can also deal with compressed files.
10663Supported compression formats are gzip, bzip2 and, xz, and are automatically
10664recognized by their file extensions. The focus is on being as efficient as
10665possible on all supported Python versions.")
10666 (license license:expat)))
10667
10668(define-public python2-xopen
10669 (let ((base (package-with-python2
10670 (strip-python2-variant python-xopen))))
10671 (package
10672 (inherit base)
10673 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
10674 ,@(package-propagated-inputs base))))))
10675
10676(define-public python-cheetah
10677 (package
10678 (name "python-cheetah")
10679 (version "3.1.0")
10680 (source
10681 (origin
10682 (method url-fetch)
10683 (uri (pypi-uri "Cheetah3" version))
10684 (sha256
10685 (base32
10686 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
10687 (build-system python-build-system)
10688 (arguments
10689 `(#:modules ((guix build utils)
10690 (guix build python-build-system)
10691 (ice-9 ftw)
10692 (srfi srfi-1)
10693 (srfi srfi-26))
10694 #:phases (modify-phases %standard-phases
10695 (add-after 'unpack 'use-absolute-python
10696 (lambda _
10697 (substitute* "Cheetah/CheetahWrapper.py"
10698 (("#!/usr/bin/env python")
10699 (string-append "#!" (which "python"))))
10700 #t))
10701 (replace 'check
10702 (lambda _
10703 (let ((cwd (getcwd)))
10704 (setenv "PYTHONPATH"
10705 (string-append
10706 cwd "/build/"
10707 (find (cut string-prefix? "lib" <>)
10708 (scandir (string-append cwd "/build")))
10709 ":" (getenv "PYTHONPATH")))
10710 (setenv "PATH"
10711 (string-append (getenv "PATH")
10712 ":" cwd "/bin"))
10713 (setenv "TMPDIR" "/tmp")
10714
10715 (substitute* "Cheetah/Tests/Test.py"
10716 (("unittest.TextTestRunner\\(\\)")
10717 "unittest.TextTestRunner(verbosity=2)"))
10718
10719 (invoke "python" "Cheetah/Tests/Test.py")))))))
10720 (propagated-inputs
10721 `(("python-markdown" ,python-markdown))) ;optional
10722 (home-page "http://cheetahtemplate.org/")
10723 (synopsis "Template engine")
10724 (description "Cheetah is a text-based template engine and Python code
10725generator.
10726
10727Cheetah can be used as a standalone templating utility or referenced as
10728a library from other Python applications. It has many potential uses,
10729but web developers looking for a viable alternative to ASP, JSP, PHP and
10730PSP are expected to be its principle user group.
10731
10732Features:
10733@enumerate
10734@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
10735 text-based format.
10736@item Cleanly separates content, graphic design, and program code.
10737@item Blends the power and flexibility of Python with a simple template language
10738 that non-programmers can understand.
10739@item Gives template writers full access to any Python data structure, module,
10740 function, object, or method in their templates.
10741@item Makes code reuse easy by providing an object-orientated interface to
10742 templates that is accessible from Python code or other Cheetah templates.
10743 One template can subclass another and selectively reimplement sections of it.
10744@item Provides a simple, yet powerful, caching mechanism that can dramatically
10745 improve the performance of a dynamic website.
10746@item Compiles templates into optimized, yet readable, Python code.
10747@end enumerate")
10748 (license (license:x11-style "file://LICENSE"))))
10749
10750(define-public python2-cheetah
10751 (package-with-python2 python-cheetah))
10752
10753(define-public python-dulwich
10754 (package
10755 (name "python-dulwich")
10756 (version "0.18.6")
10757 (source
10758 (origin
10759 (method url-fetch)
10760 (uri (list (string-append "https://www.dulwich.io/releases/"
10761 "dulwich-" version ".tar.gz")
10762 (pypi-uri "dulwich" version)))
10763 (sha256
10764 (base32
10765 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
10766 (build-system python-build-system)
10767 (arguments
10768 `(#:phases
10769 (modify-phases %standard-phases
10770 (add-before 'check 'fix-tests
10771 (lambda* (#:key inputs #:allow-other-keys)
10772 ;; The tests use Popen with a custom environment which doesn't
10773 ;; include PATH.
10774 (substitute* "dulwich/tests/compat/utils.py"
10775 (("'git'") (string-append "'"
10776 (which "git")
10777 "'")))
10778 (substitute* '("dulwich/tests/test_repository.py"
10779 "dulwich/tests/test_hooks.py")
10780 (("#!/bin/sh") (string-append "#!" (which "sh"))))
10781 (setenv "TEST_RUNNER" "unittest")
10782 (setenv "PYTHONHASHSEED" "random")
10783 #t)))))
10784 (propagated-inputs
10785 `(("python-fastimport" ,python-fastimport)))
10786 (native-inputs
10787 `(("python-mock" ,python-mock)
10788 ("python-geventhttpclient" ,python-geventhttpclient)
10789 ("git" ,git)))
10790 (home-page "https://www.dulwich.io/")
10791 (synopsis "Git implementation in Python")
10792 (description "Dulwich is an implementation of the Git file formats and
10793protocols written in pure Python.")
10794 ;; Can be used with either license.
10795 (license (list license:asl2.0 license:gpl2+))))
10796
10797(define-public python2-dulwich
10798 (package-with-python2 python-dulwich))
10799
10800(define-public python-pbkdf2
10801 (package
10802 (name "python-pbkdf2")
10803 (version "1.3")
10804 (source
10805 (origin
10806 (method url-fetch)
10807 (uri (pypi-uri "pbkdf2" version))
10808 (sha256
10809 (base32
10810 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
10811 (build-system python-build-system)
10812 (arguments
10813 '(#:phases
10814 (modify-phases %standard-phases
10815 (replace 'check
10816 (lambda _
10817 (setenv "PYTHONPATH"
10818 (string-append (getcwd) "/build/lib:"
10819 (getenv "PYTHONPATH")))
ee2bb944 10820 (invoke "python" "test/test_pbkdf2.py"))))))
44d10b1f
RW
10821 (propagated-inputs
10822 `(("python-pycrypto" ,python-pycrypto))) ; optional
10823 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
10824 (synopsis "Password-based key derivation")
10825 (description "This module implements the password-based key derivation
10826function, PBKDF2, specified in RSA PKCS#5 v2.0.
10827
10828PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
10829is part of the RSA Public Key Cryptography Standards series. The provided
10830implementation takes a password or a passphrase and a salt value (and
10831optionally a iteration count, a digest module, and a MAC module) and provides
10832a file-like object from which an arbitrarly-sized key can be read.")
10833 (license license:expat)))
10834
10835(define-public python2-pbkdf2
10836 (package-with-python2 python-pbkdf2))
10837
10838(define-public python-qrcode
10839 (package
10840 (name "python-qrcode")
217ea1a1 10841 (version "6.1")
44d10b1f
RW
10842 (source
10843 (origin
10844 (method url-fetch)
10845 (uri (pypi-uri "qrcode" version))
10846 (sha256
217ea1a1 10847 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
44d10b1f
RW
10848 (build-system python-build-system)
10849 (arguments
10850 ;; FIXME: Tests require packaging 'pymaging'.
10851 '(#:tests? #f))
10852 (propagated-inputs
10853 `(("python-lxml" ,python-lxml) ; for SVG output
10854 ("python-pillow" ,python-pillow) ; for PNG output
10855 ("python-six" ,python-six)))
44d10b1f
RW
10856 (home-page "https://github.com/lincolnloop/python-qrcode")
10857 (synopsis "QR Code image generator")
10858 (description "This package provides a pure Python QR Code generator
10859module. It uses the Python Imaging Library (PIL) to allow for the generation
10860of QR Codes.
10861
10862In addition this package provides a command line tool to generate QR codes and
10863either write these QR codes to a file or do the output as ascii art at the
10864console.")
10865 (license license:bsd-3)))
10866
10867(define-public python2-qrcode
10868 (package-with-python2 python-qrcode))
10869
10870(define-public python-rst2ansi
10871 (package
10872 (name "python-rst2ansi")
10873 (version "0.1.5")
10874 (source
10875 (origin
10876 (method url-fetch)
10877 (uri (pypi-uri "rst2ansi" version))
10878 (sha256
10879 (base32
10880 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
10881 (build-system python-build-system)
10882 (propagated-inputs
10883 `(("python-docutils" ,python-docutils)))
10884 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
10885 (synopsis "Convert RST to ANSI-decorated console output")
10886 (description
10887 "Python module dedicated to rendering RST (reStructuredText) documents
10888to ansi-escaped strings suitable for display in a terminal.")
10889 (license license:expat)))
10890
10891(define-public python-ansi2html
10892 (package
10893 (name "python-ansi2html")
10894 (version "1.2.0")
10895 (source
10896 (origin
10897 (method url-fetch)
10898 (uri (pypi-uri "ansi2html" version))
10899 (sha256
10900 (base32
10901 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
10902 (build-system python-build-system)
10903 (native-inputs
10904 `(("python-mock" ,python-mock)
10905 ("python-nose" ,python-nose)))
10906 (propagated-inputs
10907 `(("python-six" ,python-six)))
10908 (home-page "https://github.com/ralphbean/ansi2html")
10909 (synopsis "Convert ANSI-decorated console output to HTML")
10910 (description
10911 "@command{ansi2html} is a Python library and command line utility for
10912convering text with ANSI color codes to HTML or LaTeX.")
10913 (license license:gpl3+)))
10914
10915(define-public python2-ansi2html
10916 (package-with-python2 python-ansi2html))
10917
10918(define-public python-ddt
10919 (package
10920 (name "python-ddt")
10921 (version "1.1.3")
10922 (source
10923 (origin
10924 (method url-fetch)
10925 (uri (pypi-uri "ddt" version))
10926 (sha256
10927 (base32
10928 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
10929 (build-system python-build-system)
10930 (native-inputs
10931 `(("python-mock" ,python-mock)
10932 ("python-nose" ,python-nose)))
10933 (propagated-inputs
10934 `(("python-six" ,python-six)
10935 ("python-pyyaml" ,python-pyyaml)))
10936 (home-page "https://github.com/txels/ddt")
10937 (synopsis "Data-Driven Tests")
10938 (description
10939 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
10940running it with different test data, and make it appear as multiple test
10941cases.")
10942 (license license:expat)))
10943
10944(define-public python2-ddt
10945 (package-with-python2 python-ddt))
10946
10947(define-public python-pycountry
10948 (package
10949 (name "python-pycountry")
10950 (version "18.5.26")
10951 (source
10952 (origin
10953 (method url-fetch)
10954 (uri (pypi-uri "pycountry" version))
10955 (sha256
10956 (base32
10957 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
10958 (build-system python-build-system)
10959 (home-page "https://bitbucket.org/flyingcircus/pycountry")
10960 (synopsis "ISO databases for languages, countries, currencies, etc.")
10961 (description
10962 "@code{pycountry} provides the ISO databases for the standards:
10963@enumerate
10964@item 639-3 (Languages)
10965@item 3166 (Countries)
10966@item 3166-3 (Deleted Countries)
10967@item 3166-2 (Subdivisions of countries)
10968@item 4217 (Currencies)
10969@item 15924 (Scripts)
10970@end enumerate
10971It includes a copy from Debian’s pkg-isocodes and makes the data accessible
10972through a Python API.")
10973 (license license:lgpl2.1+)))
10974
10975(define-public python2-pycountry
10976 (package-with-python2 python-pycountry))
10977
10978(define-public python-pycosat
10979 (package
10980 (name "python-pycosat")
10981 (version "0.6.1")
10982 (source
10983 (origin
10984 (method url-fetch)
10985 (uri (pypi-uri "pycosat" version))
10986 (sha256
10987 (base32
10988 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
10989 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
10990 (build-system python-build-system)
10991 (home-page "https://github.com/ContinuumIO/pycosat")
10992 (synopsis "Bindings to picosat (a SAT solver)")
10993 (description
10994 "This package provides efficient Python bindings to @code{picosat} on
10995the C level. When importing pycosat, the @code{picosat} solver becomes part
10996of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
10997Problem} (SAT) solver.")
10998 (license license:expat)))
10999
11000(define-public python2-pycosat
11001 (package-with-python2 python-pycosat))
11002
11003(define-public python2-ruamel.ordereddict
11004 (package
11005 (name "python2-ruamel.ordereddict")
11006 (version "0.4.9")
11007 (source
11008 (origin
11009 (method url-fetch)
11010 (uri (pypi-uri "ruamel.ordereddict" version))
11011 (sha256
11012 (base32
11013 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
11014 (build-system python-build-system)
11015 (arguments
11016 `(#:python ,python-2
11017 #:phases
11018 (modify-phases %standard-phases
11019 (delete 'check)
11020 (add-after 'install 'check
11021 (lambda* (#:key inputs outputs #:allow-other-keys)
11022 (add-installed-pythonpath inputs outputs)
f987ac30 11023 (invoke "python" "test/testordereddict.py"))))))
44d10b1f
RW
11024 (home-page "https://bitbucket.org/ruamel/ordereddict")
11025 (synopsis "Version of dict that keeps keys in insertion order")
11026 (description
11027 "This is an implementation of an ordered dictionary with @dfn{Key
11028Insertion Order} (KIO: updates of values do not affect the position of the
11029key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
11030removed and put at the back). The standard library module @code{OrderedDict},
11031implemented later, implements a subset of @code{ordereddict} functionality.
11032Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
11033Order} (KSO, no sorting function can be specified, but a transform can be
11034specified to apply on the key before comparison (e.g. @code{string.lower})).")
11035 (license license:expat)))
11036
11037(define-public python-pypeg2
11038 (package
11039 (name "python-pypeg2")
11040 (version "2.15.2")
11041 (source
11042 (origin
11043 (method url-fetch)
11044 (uri (pypi-uri "pyPEG2" version))
11045 (sha256
11046 (base32
11047 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
11048 (build-system python-build-system)
11049 (propagated-inputs `(("python-lxml" ,python-lxml)))
11050 (arguments
11051 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
11052 '(#:tests? #f))
11053 (home-page "https://fdik.org/pyPEG/")
11054 (synopsis "Parsering Expression Grammars in Python")
11055 (description "PyPEG is an intrinsic parser interpreter framework for
11056Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
11057parse many formal languages.")
11058 (license license:gpl2)))
11059
11060(define-public python-incremental
11061 (package
11062 (name "python-incremental")
11063 (version "17.5.0")
11064 (source
11065 (origin
11066 (method url-fetch)
11067 (uri (pypi-uri "incremental" version))
11068 (sha256
11069 (base32
11070 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
11071 (build-system python-build-system)
11072 (home-page "https://github.com/hawkowl/incremental")
11073 (synopsis "Library for versioning Python projects")
11074 (description "Incremental is a small library that versions your Python
11075projects.")
11076 (license license:expat)))
11077
11078(define-public python2-incremental
11079 (package-with-python2 python-incremental))
11080
11081(define-public python-invoke
11082 (package
11083 (name "python-invoke")
11084 (home-page "http://www.pyinvoke.org/")
11085 (version "1.1.0")
11086 (source (origin
11087 (method url-fetch)
11088 (uri (pypi-uri "invoke" version))
11089 (sha256
11090 (base32
11091 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
11092 (build-system python-build-system)
11093 (arguments
11094 ;; XXX: Requires many dependencies that are not yet in Guix.
11095 `(#:tests? #f))
11096 (synopsis "Pythonic task execution")
11097 (description
11098 "Invoke is a Python task execution tool and library, drawing inspiration
11099from various sources to arrive at a powerful and clean feature set. It is
11100evolved from the Fabric project, but focuses on local and abstract concerns
11101instead of servers and network commands.")
11102 (license license:bsd-3)))
11103
11104(define-public python2-invoke
11105 (package-with-python2 python-invoke))
11106
11107(define-public python-automat
11108 (package
11109 (name "python-automat")
11110 (version "0.6.0")
11111 (source (origin
11112 (method url-fetch)
11113 (uri (pypi-uri "Automat" version))
11114 (sha256
11115 (base32
11116 "1a7nsrljysfmdqmpn2apfa1gg6rfah4y9sizvns8gb08rx7d07rw"))))
11117 (build-system python-build-system)
11118 ;; We disable the tests because they require python-twisted, while
11119 ;; python-twisted depends on python-automat. Twisted is optional, but the
11120 ;; tests fail if it is not available. Also see
11121 ;; <https://github.com/glyph/automat/issues/71>.
11122 (arguments '(#:tests? #f))
11123 (native-inputs
11124 `(("python-m2r" ,python-m2r)
11125 ("python-setuptools-scm" ,python-setuptools-scm)
11126 ("python-graphviz" ,python-graphviz)))
11127 (propagated-inputs
11128 `(("python-six" ,python-six)
11129 ("python-attrs" ,python-attrs)))
11130 (home-page "https://github.com/glyph/Automat")
11131 (synopsis "Self-service finite-state machines")
11132 (description "Automat is a library for concise, idiomatic Python
11133expression of finite-state automata (particularly deterministic finite-state
11134transducers).")
11135 (license license:expat)))
11136
11137(define-public python2-automat
11138 (package-with-python2 python-automat))
11139
11140(define-public python-m2r
11141 (package
11142 (name "python-m2r")
11143 (version "0.1.12")
11144 (source (origin
11145 (method url-fetch)
11146 (uri (pypi-uri "m2r" version))
11147 (sha256
11148 (base32
11149 "1axrwnf425sz4qz3c0qc7yhhki4myzb8rki7pczcsgzznzmqdyxd"))))
11150 (build-system python-build-system)
11151 (propagated-inputs
11152 `(("python-docutils" ,python-docutils)
11153 ("python-mistune" ,python-mistune)))
11154 (native-inputs
11155 `(("python-pygments" ,python-pygments)
11156 ("python-mock" ,python-mock)))
11157 (home-page "https://github.com/miyakogi/m2r")
11158 (synopsis "Markdown to reStructuredText converter")
11159 (description "M2R converts a markdown file including reST markups to valid
11160reST format.")
11161 (license license:expat)))
11162
11163(define-public python2-m2r
11164 (package-with-python2 python-m2r))
11165
11166(define-public python-constantly
11167 (package
11168 (name "python-constantly")
11169 (version "15.1.0")
11170 (source (origin
11171 (method url-fetch)
11172 (uri (pypi-uri "constantly" version))
11173 (sha256
11174 (base32
11175 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
11176 (build-system python-build-system)
11177 (home-page "https://github.com/twisted/constantly")
11178 (synopsis "Symbolic constants in Python")
11179 (description "Constantly is a Python library that provides symbolic
11180constant support. It includes collections and constants with text, numeric,
11181and bit flag values.")
11182 (license license:expat)))
11183
11184(define-public python2-constantly
11185 (package-with-python2 python-constantly))
11186
11187(define-public python-attrs
11188 (package
11189 (name "python-attrs")
11190 (version "18.2.0")
11191 (source (origin
11192 (method url-fetch)
11193 (uri (pypi-uri "attrs" version))
11194 (sha256
11195 (base32
11196 "0s9ydh058wmmf5v391pym877x4ahxg45dw6a0w4c7s5wgpigdjqh"))))
11197 (build-system python-build-system)
11198 (arguments
11199 `(#:modules ((guix build utils)
11200 (guix build python-build-system)
11201 (ice-9 ftw)
11202 (srfi srfi-1)
11203 (srfi srfi-26))
11204 #:phases (modify-phases %standard-phases
11205 (replace 'check
11206 (lambda _
11207 (let ((cwd (getcwd)))
11208 (setenv "PYTHONPATH"
11209 (string-append
11210 cwd "/build/"
11211 (find (cut string-prefix? "lib" <>)
11212 (scandir (string-append cwd "/build")))
11213 ":"
11214 (getenv "PYTHONPATH")))
11215 (invoke "python" "-m" "pytest")))))))
11216 (native-inputs
11217 `(("python-coverage" ,python-coverage)
11218 ("python-hypothesis" ,python-hypothesis)
11219 ("python-pympler" ,python-pympler)
11220 ("python-pytest" ,python-pytest)
11221 ("python-six" ,python-six)
11222 ("python-sphinx" ,python-sphinx)
11223 ("python-zope-interface" ,python-zope-interface)))
11224 (home-page "https://github.com/python-attrs/attrs/")
11225 (synopsis "Attributes without boilerplate")
11226 (description "@code{attrs} is a Python package with class decorators that
11227ease the chores of implementing the most common attribute-related object
11228protocols.")
11229 (license license:expat)))
11230
11231(define-public python2-attrs
11232 (package-with-python2 python-attrs))
11233
11234(define-public python-attrs-bootstrap
11235 (package
11236 (inherit python-attrs)
11237 (name "python-attrs-bootstrap")
11238 ;; Keep this on a fixed version so python-attrs can be updated without
11239 ;; triggering a mass-rebuild. FIXME: Update this in the next rebuild cycle.
11240 (version "17.4.0")
11241 (source (origin
11242 (method url-fetch)
11243 (uri (pypi-uri "attrs" version))
11244 (sha256
11245 (base32
11246 "1jafnn1kzd6qhxgprhx6y6ik1r5m2rilx25syzcmq03azp660y8w"))))
11247 (native-inputs `())
11248 (arguments `(#:tests? #f))))
11249
11250(define-public python2-attrs-bootstrap
11251 (package-with-python2 python-attrs-bootstrap))
11252
11253(define-public python2-cliapp
11254 (package
11255 (name "python2-cliapp")
9064b84e 11256 (version "1.20180812.1")
44d10b1f
RW
11257 (source
11258 (origin
11259 (method url-fetch)
11260 (uri (string-append
11261 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
11262 version ".tar.gz"))
11263 (sha256
11264 (base32
9064b84e 11265 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
44d10b1f
RW
11266 (build-system python-build-system)
11267 (arguments
11268 `(#:python ,python-2
11269 #:phases
11270 (modify-phases %standard-phases
11271 ;; check phase needs to be run before the build phase. If not,
11272 ;; coverage-test-runner looks for tests for the built source files,
11273 ;; and fails.
11274 (delete 'check)
11275 (add-before 'build 'check
11276 (lambda _
11277 ;; Disable python3 tests
11278 (substitute* "check"
11279 (("python3") "# python3"))
6c826d32 11280 (invoke "./check"))))))
44d10b1f
RW
11281 (native-inputs
11282 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11283 ("python2-pep8" ,python2-pep8)))
11284 (propagated-inputs
11285 `(("python2-pyaml" ,python2-pyaml)))
11286 (home-page "https://liw.fi/cliapp/")
11287 (synopsis "Python framework for command line programs")
11288 (description "@code{python2-cliapp} is a python framework for
11289command line programs. It contains the typical stuff such programs
11290need to do, such as parsing the command line for options, and
11291iterating over input files.")
11292 (license license:gpl2+)))
11293
11294(define-public python2-ttystatus
11295 (package
11296 (name "python2-ttystatus")
e516a9c2 11297 (version "0.36")
44d10b1f
RW
11298 (source
11299 (origin
11300 (method url-fetch)
11301 (uri (string-append
11302 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
11303 version ".tar.gz"))
11304 (sha256
11305 (base32
e516a9c2 11306 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
44d10b1f
RW
11307 (build-system python-build-system)
11308 (native-inputs
11309 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11310 ("python2-pep8" ,python2-pep8)))
11311 (arguments
11312 `(#:python ,python-2
11313 #:phases
11314 (modify-phases %standard-phases
11315 ;; check phase needs to be run before the build phase. If not,
11316 ;; coverage-test-runner looks for tests for the built source files,
11317 ;; and fails.
11318 (delete 'check)
11319 (add-before 'build 'check
cbeee881 11320 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
11321 (home-page "https://liw.fi/ttystatus/")
11322 (synopsis "Python library for showing progress reporting and
11323status updates on terminals")
11324 (description "@code{python2-ttystatus} is a python library for
11325showing progress reporting and status updates on terminals, for
11326command line programs. Output is automatically adapted to the width
11327of the terminal: truncated if it does not fit, and resized if the
11328terminal size changes.")
11329 (license license:gpl3+)))
11330
11331(define-public python2-tracing
11332 (package
11333 (name "python2-tracing")
11334 (version "0.10")
11335 (source
11336 (origin
11337 (method url-fetch)
11338 (uri (string-append
11339 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
11340 version ".tar.gz"))
11341 (sha256
11342 (base32
11343 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
11344 (build-system python-build-system)
11345 (arguments
11346 `(#:python ,python-2))
11347 (home-page "https://liw.fi/tracing/")
11348 (synopsis "Python debug logging helper")
11349 (description "@code{python2-tracing} is a python library for
11350logging debug messages. It provides a way to turn debugging messages
11351on and off, based on the filename they occur in. It is much faster
11352than using @code{logging.Filter} to accomplish the same thing, which
11353matters when code is run in production mode. The actual logging still
11354happens using the @code{logging} library.")
11355 (license license:gpl3+)))
11356
11357(define-public python2-larch
11358 (package
11359 (name "python2-larch")
11360 (version "1.20151025")
11361 (source
11362 (origin
11363 (method url-fetch)
11364 (uri (string-append
11365 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
11366 version ".tar.gz"))
11367 (patches (search-patches
11368 "python2-larch-coverage-4.0a6-compatibility.patch"))
11369 (sha256
11370 (base32
11371 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
11372 (build-system python-build-system)
11373 (arguments
11374 `(#:python ,python-2
11375 #:phases
11376 (modify-phases %standard-phases
11377 ;; check phase needs to be run before the build phase. If not,
11378 ;; coverage-test-runner looks for tests for the built source files,
11379 ;; and fails.
11380 (delete 'check)
11381 (add-before 'build 'check
204ad455 11382 (lambda _ (invoke "make" "check"))))))
44d10b1f
RW
11383 (native-inputs
11384 `(("cmdtest" ,cmdtest)
11385 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
11386 (propagated-inputs
11387 `(("python2-tracing" ,python2-tracing)))
11388 (home-page "https://liw.fi/larch/")
11389 (synopsis "Python copy-on-write B-tree library")
11390 (description "@code{python2-larch} is an implementation of
11391particular kind of B-tree, based on research by Ohad Rodeh. See
11392@url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
11393on the data structure.
11394
11395The distinctive feature of this B-tree is that a node is never
11396(conceptually) modified. Instead, all updates are done by
11397copy-on-write. This makes it easy to clone a tree, and modify only the
11398clone, while other processes access the original tree.")
11399 (license license:gpl3+)))
11400
11401(define-public python-astroid
11402 (package
11403 (name "python-astroid")
11404 (version "2.1.0")
11405 (source
11406 (origin
11407 (method url-fetch)
11408 (uri (pypi-uri "astroid" version))
11409 (sha256
11410 (base32
11411 "08hz675knh4294bancdapql392fmbjyimhbyrmfkz1ka7l035c1m"))))
11412 (build-system python-build-system)
11413 (propagated-inputs
11414 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
11415 ("python-six" ,python-six)
11416 ("python-wrapt" ,python-wrapt)))
11417 (native-inputs
11418 `(("python-dateutil" ,python-dateutil)
11419 ("python-nose" ,python-nose)
11420 ("python-pytest" ,python-pytest)
11421 ("python-pytest-runner" ,python-pytest-runner)))
11422 (arguments
11423 `(#:phases
11424 (modify-phases %standard-phases
11425 (add-after 'unpack 'remove-spurious-test
11426 (lambda _
11427 ;; This can be removed after upgrading from python-3.7
11428 ;; https://github.com/PyCQA/astroid/issues/593
11429 ;; https://bugs.python.org/issue34056
11430 (delete-file "astroid/tests/unittest_modutils.py")
11431 #t))
11432 (replace 'check
11433 (lambda _
11434 (invoke "pytest" "astroid"))))))
11435 (home-page "https://github.com/PyCQA/astroid")
11436 (synopsis "Common base representation of python source code for pylint and
11437other projects")
11438 (description "@code{python-astroid} provides a common base representation
11439of python source code for projects such as pychecker, pyreverse, pylint, etc.
11440
11441It provides a compatible representation which comes from the _ast module. It
11442rebuilds the tree generated by the builtin _ast module by recursively walking
11443down the AST and building an extended ast. The new node classes have
11444additional methods and attributes for different usages. They include some
11445support for static inference and local name scopes. Furthermore, astroid
11446builds partial trees by inspecting living objects.")
11447 (license license:lgpl2.1+)
11448 (properties `((python2-variant . ,(delay python2-astroid))))))
11449
11450(define-public python2-astroid
11451 (let ((base (package-with-python2
11452 (strip-python2-variant python-astroid))))
11453 (package (inherit base)
11454 ;; Version 2.x removes python2 support.
11455 (version "1.6.5")
11456 (source
11457 (origin
11458 (method url-fetch)
11459 (uri (pypi-uri "astroid" version))
11460 (sha256
11461 (base32
11462 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
11463 (arguments
11464 (substitute-keyword-arguments (package-arguments base)
11465 ((#:phases phases)
11466 `(modify-phases ,phases
11467 (add-after 'unpack 'remove-spurious-test
11468 (lambda _
11469 ;; https://github.com/PyCQA/astroid/issues/276
11470 (delete-file "astroid/tests/unittest_brain.py")
11471 #t))
11472 (replace 'check
11473 (lambda _
11474 (invoke"python" "-m" "unittest" "discover"
11475 "-p" "unittest*.py")))))))
11476 (native-inputs `())
11477 (propagated-inputs
11478 `(("python2-backports-functools-lru-cache"
11479 ,python2-backports-functools-lru-cache)
11480 ("python2-enum34" ,python2-enum34)
11481 ("python2-singledispatch" ,python2-singledispatch)
11482 ,@(package-propagated-inputs base))))))
11483
11484(define-public python-isort
11485 (package
11486 (name "python-isort")
e2227b6a 11487 (version "4.3.4")
44d10b1f
RW
11488 (source
11489 (origin
e2227b6a
EF
11490 (method git-fetch)
11491 (uri (git-reference
11492 ;; Tests pass only from the Github sources
11493 (url "https://github.com/timothycrosley/isort")
11494 (commit version)))
11495 (file-name (git-file-name name version))
44d10b1f
RW
11496 (sha256
11497 (base32
e2227b6a 11498 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
44d10b1f
RW
11499 (build-system python-build-system)
11500 (native-inputs
11501 `(("python-mock" ,python-mock)
11502 ("python-pytest" ,python-pytest)))
11503 (home-page "https://github.com/timothycrosley/isort")
11504 (synopsis "Python utility/library to sort python imports")
11505 (description "@code{python-isort} is a python utility/library to sort
11506imports alphabetically, and automatically separated into sections. It
11507provides a command line utility, a python library and plugins for various
11508editors.")
e2227b6a
EF
11509 (license license:expat)
11510 (properties `((python2-variant . ,(delay python2-isort))))))
44d10b1f
RW
11511
11512(define-public python2-isort
e2227b6a
EF
11513 (let ((base (package-with-python2
11514 (strip-python2-variant python-isort))))
11515 (package (inherit base)
11516 (native-inputs
11517 `(("python2-futures" ,python2-futures)
11518 ,@(package-native-inputs base))))))
44d10b1f
RW
11519
11520(define-public python2-backports-functools-lru-cache
11521 (package
11522 (name "python2-backports-functools-lru-cache")
11523 (version "1.5")
11524 (source
11525 (origin
11526 (method url-fetch)
11527 ;; only the pypi tarballs contain the necessary metadata
11528 (uri (pypi-uri "backports.functools_lru_cache" version))
11529 (sha256
11530 (base32
11531 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
11532 (build-system python-build-system)
11533 (native-inputs
11534 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
11535 (arguments
11536 `(#:python ,python-2))
11537 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
11538 (synopsis "Backport of functools.lru_cache from Python 3.3")
11539 (description "@code{python2-backports-functools-lru-cache} is a backport
11540of @code{functools.lru_cache} from python 3.3.")
11541 (license license:expat)))
11542
11543(define-public python-configparser
11544 (package
11545 (name "python-configparser")
84127f8c 11546 (version "3.7.1")
44d10b1f
RW
11547 (source
11548 (origin
11549 (method url-fetch)
84127f8c 11550 (uri (pypi-uri "configparser" version))
44d10b1f
RW
11551 (sha256
11552 (base32
84127f8c 11553 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
44d10b1f 11554 (build-system python-build-system)
809f003f 11555 (home-page "https://github.com/jaraco/configparser/")
44d10b1f
RW
11556 (synopsis "Backport of configparser from python 3.5")
11557 (description "@code{python-configparser} is a backport of
11558@code{configparser} from Python 3.5 so that it can be used directly
11559in other versions.")
11560 (license license:expat)))
11561
11562(define-public python2-configparser
11563 (package-with-python2 python-configparser))
11564
11565(define-public python-mando
11566 (package
11567 (name "python-mando")
11568 (version "0.6.4")
11569 (source (origin
11570 (method url-fetch)
11571 (uri (pypi-uri "mando" version))
11572 (sha256
11573 (base32
11574 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
11575 (build-system python-build-system)
11576 (propagated-inputs
11577 `(("python-rst2ansi" ,python-rst2ansi)
11578 ("python-six" ,python-six)))
11579 (native-inputs
11580 `(("python-pytest" ,python-pytest)))
11581 (home-page "https://mando.readthedocs.org/")
11582 (synopsis
11583 "Wrapper around argparse, allowing creation of complete CLI applications")
11584 (description
11585 "This package is a wrapper around argparse, allowing you to write complete CLI
11586applications in seconds while maintaining all the flexibility.")
11587 (license license:expat)))
11588
11589(define-public python2-mando
11590 (package-with-python2 python-mando))
11591
11592(define-public python-fudge
11593 (package
11594 (name "python-fudge")
11595 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
11596 ;; package, which is currently the only use of this package.
11597 (version "0.9.6")
11598 (source
11599 (origin
11600 (method url-fetch)
11601 (uri (pypi-uri "fudge" version))
11602 (sha256
11603 (base32
11604 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
11605 (build-system python-build-system)
11606 (arguments
11607 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
11608 (home-page "https://github.com/fudge-py/fudge")
11609 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
11610 (description
11611 "Fudge is a Python module for using fake objects (mocks and stubs) to
11612test real ones.
11613
11614In readable Python code, you declare the methods available on your fake object
11615and how they should be called. Then you inject that into your application and
11616start testing. This declarative approach means you don’t have to record and
11617playback actions and you don’t have to inspect your fakes after running code.
11618If the fake object was used incorrectly then you’ll see an informative
11619exception message with a traceback that points to the culprit.")
11620 (license license:expat)))
11621
11622(define-public python2-fudge
11623 (package-with-python2 python-fudge))
11624
11625(define-public python-mwclient
11626 (package
11627 (name "python-mwclient")
11628 (version "0.8.4")
11629 (source
11630 (origin
11631 (method url-fetch)
11632 ;; The PyPI version wouldn't contain tests.
11633 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
11634 "v" version ".tar.gz"))
11635 (file-name (string-append name "-" version ".tar.gz"))
11636 (sha256
11637 (base32
11638 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
11639 (build-system python-build-system)
11640 (propagated-inputs
11641 `(("python-requests" ,python-requests)
11642 ("python-requests-oauthlib"
11643 ,python-requests-oauthlib)
11644 ("python-six" ,python-six)))
11645 (native-inputs
11646 `(("python-mock" ,python-mock)
11647 ("python-pytest" ,python-pytest)
11648 ("python-pytest-pep8" ,python-pytest-pep8)
11649 ("python-pytest-cache" ,python-pytest-cache)
11650 ("python-pytest-cov" ,python-pytest-cov)
11651 ("python-responses" ,python-responses)))
11652 (home-page "https://github.com/btongminh/mwclient")
11653 (synopsis "MediaWiki API client")
11654 (description "This package provides a MediaWiki API client.")
11655 (license license:expat)))
11656
11657(define-public python2-mwclient
11658 (package-with-python2 python-mwclient))
11659
11660(define-public python-utils
11661 (package
11662 (name "python-utils")
11663 (version "2.1.0")
11664 (source (origin
11665 (method url-fetch)
11666 (uri (pypi-uri "python-utils" version))
11667 (sha256
11668 (base32
11669 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
11670 (build-system python-build-system)
11671 (native-inputs
11672 `(("pytest-runner" ,python-pytest-runner)
11673 ("pytest" ,python-pytest)
11674 ("six" ,python-six)))
11675 (home-page "https://github.com/WoLpH/python-utils")
11676 (synopsis "Convenient utilities not included with the standard Python install")
11677 (description
11678 "Python Utils is a collection of small Python functions and classes which
11679make common patterns shorter and easier.")
11680 (license license:bsd-2)))
11681
11682(define-public python2-utils
11683 (package-with-python2 python-utils))
11684
11685(define-public python-sphinx-me
11686 (package
11687 (name "python-sphinx-me")
11688 (version "0.3")
11689 (source
11690 (origin
11691 (method url-fetch)
11692 (uri (pypi-uri "sphinx-me" version))
11693 (sha256
11694 (base32
11695 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
11696 (build-system python-build-system)
11697 (home-page "https://github.com/stephenmcd/sphinx-me")
11698 (synopsis "Create a Sphinx documentation shell")
11699 (description
11700 "Create a Sphinx documentation shell for your project and include the
11701README file as the documentation index. It handles extracting the required
11702meta data such as the project name, author and version from your project for
11703use in your Sphinx docs.")
11704 (license license:bsd-2)))
11705
11706(define-public python2-sphinx-me
11707 (package-with-python2 python-sphinx-me))
11708
11709(define-public python-diff-match-patch
11710 (package
11711 (name "python-diff-match-patch")
11712 (version "20121119")
11713 (source
11714 (origin
11715 (method url-fetch)
11716 (uri (pypi-uri "diff-match-patch" version))
11717 (sha256
11718 (base32
11719 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
11720 (build-system python-build-system)
11721 (home-page "https://code.google.com/p/google-diff-match-patch")
11722 (synopsis "Synchronize plain text")
11723 (description "Diff Match and Patch libraries offer robust algorithms to
11724perform the operations required for synchronizing plain text.")
11725 (license license:asl2.0)))
11726
11727(define-public python2-diff-match-patch
11728 (package-with-python2 python-diff-match-patch))
11729
11730(define-public python-dirsync
11731 (package
11732 (name "python-dirsync")
11733 (version "2.2.3")
11734 (source
11735 (origin
11736 (method url-fetch)
11737 (uri (pypi-uri "dirsync" version))
11738 (sha256
11739 (base32
11740 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
11741 (build-system python-build-system)
11742 (propagated-inputs
11743 `(("six" ,python-six)))
11744 (home-page "https://bitbucket.org/tkhyn/dirsync")
11745 (synopsis "Advanced directory tree synchronisation tool")
11746 (description "Advanced directory tree synchronisation tool.")
11747 (license license:expat)))
11748
11749(define-public python2-dirsync
11750 (package-with-python2 python-dirsync))
11751
11752(define-public python-levenshtein
11753 (package
11754 (name "python-levenshtein")
11755 (version "0.12.0")
11756 (source
11757 (origin
11758 (method url-fetch)
11759 (uri (pypi-uri "python-Levenshtein" version))
11760 (sha256
11761 (base32
11762 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
11763 (build-system python-build-system)
11764 (home-page "https://github.com/ztane/python-Levenshtein")
11765 (synopsis "Fast computation of Levenshtein distance and string similarity")
11766 (description
11767 "The Levenshtein Python C extension module contains functions for fast computation of
11768@enumerate
11769@item Levenshtein (edit) distance, and edit operations
11770@item string similarity
11771@item approximate median strings, and generally string averaging
11772@item string sequence and set similarity
11773@end enumerate
11774It supports both normal and Unicode strings.")
11775 (license license:gpl2+)))
11776
11777(define-public python2-levenshtein
11778 (package-with-python2 python-levenshtein))
11779
11780(define-public python-scandir
11781 (package
11782 (name "python-scandir")
11783 (version "1.9.0")
11784 (source
11785 (origin
11786 (method url-fetch)
11787 (uri (pypi-uri "scandir" version))
11788 (sha256
11789 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
11790 (build-system python-build-system)
11791 (arguments
11792 `(#:phases (modify-phases %standard-phases
11793 (replace 'check
11794 (lambda _
11795 (invoke "python" "test/run_tests.py"))))))
11796 (home-page "https://github.com/benhoyt/scandir")
11797 (synopsis "Directory iteration function")
11798 (description
11799 "Directory iteration function like os.listdir(), except that instead of
11800returning a list of bare filenames, it yields DirEntry objects that include
11801file type and stat information along with the name. Using scandir() increases
11802the speed of os.walk() by 2-20 times (depending on the platform and file
11803system) by avoiding unnecessary calls to os.stat() in most cases.
11804
11805This package is part of the Python standard library since version 3.5.")
11806 (license license:bsd-3)))
11807
11808(define-public python2-scandir
11809 (package-with-python2 python-scandir))
11810
11811(define-public python2-stemming
11812 (package
11813 (name "python2-stemming")
11814 (version "1.0.1")
11815 (source
11816 (origin
11817 (method url-fetch)
11818 (uri (pypi-uri "stemming" version))
11819 (sha256
11820 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
11821 (build-system python-build-system)
11822 (arguments
11823 `(#:python ,python-2))
11824 (home-page "https://bitbucket.org/mchaput/stemming/overview")
11825 (synopsis "Python implementations of various stemming algorithms")
11826 (description
11827 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
11828stemming algorithms for English. These implementations are straightforward and
11829efficient, unlike some Python versions of the same algorithms available on the
11830Web. This package is an extraction of the stemming code included in the Whoosh
11831search engine.")
11832 (license license:public-domain)))
11833
11834(define-public python-factory-boy
11835 (package
11836 (name "python-factory-boy")
11837 (version "2.8.1")
11838 (source
11839 (origin
11840 (method url-fetch)
11841 (uri (pypi-uri "factory_boy" version))
11842 (sha256
11843 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
11844 (build-system python-build-system)
11845 (arguments
11846 ;; Tests are not included in the tarball.
11847 `(#:tests? #f))
11848 (propagated-inputs
11849 `(("faker" ,python-faker)))
11850 (home-page "https://github.com/benhoyt/scandir")
11851 (synopsis "Versatile test fixtures replacement")
11852 (description
11853 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
11854
11855As a fixtures replacement tool, it aims to replace static, hard to maintain
11856fixtures with easy-to-use factories for complex object.
11857
11858Instead of building an exhaustive test setup with every possible combination
11859of corner cases, factory_boy allows you to use objects customized for the
11860current test, while only declaring the test-specific fields")
11861 (license license:expat)))
11862
11863(define-public python2-factory-boy
11864 (package-with-python2 python-factory-boy))
11865
11866(define-public python-translate-toolkit
11867 (package
11868 (name "python-translate-toolkit")
11869 (version "2.1.0")
11870 (source
11871 (origin
11872 (method url-fetch)
11873 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
11874 (sha256
11875 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
11876 (build-system python-build-system)
11877 (native-inputs
11878 `(("python-pytest" ,python-pytest)
11879 ("python-sphinx" ,python-sphinx)))
11880 (propagated-inputs
11881 `(("python-babel" ,python-babel)
11882 ("python-beautifulsoup4" ,python-beautifulsoup4)
11883 ("python-chardet" ,python-chardet)
11884 ("python-diff-match-patch" ,python-diff-match-patch)
11885 ("python-levenshtein" ,python-levenshtein)
11886 ("python-lxml" ,python-lxml)
11887 ("python-six" ,python-six)
11888 ("python-vobject" ,python-vobject)
11889 ("python-pyyaml" ,python-pyyaml)))
11890 (arguments
11891 ;; TODO: tests are not run, because they end with
11892 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
11893 ;; 'parse_funcs'
11894 ;; during test setup.
11895 `(#:tests? #f))
11896 (home-page "http://toolkit.translatehouse.org")
11897 (synopsis "Tools and API for translation and localization engineering")
11898 (description
11899 "Tools and API for translation and localization engineering. It contains
11900several utilities, as well as an API for building localization tools.")
11901 (license license:gpl2+)))
11902
11903(define-public python2-translate-toolkit
11904 (package-with-python2 python-translate-toolkit))
11905
11906(define-public python-packaging
11907 (package
11908 (name "python-packaging")
94295903 11909 (version "19.0")
44d10b1f
RW
11910 (source
11911 (origin
11912 (method url-fetch)
11913 (uri (pypi-uri "packaging" version))
11914 (sha256
11915 (base32
94295903 11916 "1brjhygq9dz6x1kdljivkjfldi3qf5rbkqgck1bpgv9qpv8ab60c"))))
44d10b1f
RW
11917 (build-system python-build-system)
11918 (arguments
11919 `(#:phases (modify-phases %standard-phases
11920 (replace 'check
11921 (lambda _ (invoke "py.test" "-vv"))))))
11922 (native-inputs
11923 `(("python-pretend" ,python-pretend)
11924 ("python-pytest" ,python-pytest)))
11925 (propagated-inputs
11926 `(("python-pyparsing" ,python-pyparsing)
11927 ("python-six" ,python-six)))
11928 (home-page "https://github.com/pypa/packaging")
11929 (synopsis "Core utilities for Python packages")
11930 (description "Packaging is a Python module for dealing with Python packages.
11931It offers an interface for working with package versions, names, and dependency
11932information.")
11933 ;; From 'LICENSE': This software is made available under the terms of
11934 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
11935 ;; Contributions to this software is made under the terms of *both* these
11936 ;; licenses.
11937 (license (list license:asl2.0 license:bsd-2))))
11938
11939(define-public python2-packaging
11940 (package-with-python2 python-packaging))
11941
11942(define-public python-relatorio
11943 (package
11944 (name "python-relatorio")
11945 (version "0.8.0")
11946 (source
11947 (origin
11948 (method url-fetch)
11949 (uri (pypi-uri "relatorio" version))
11950 (sha256
11951 (base32
11952 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
11953 (build-system python-build-system)
11954 (propagated-inputs
11955 `(("python-lxml" ,python-lxml)
11956 ("python-genshi" ,python-genshi)))
11957 (native-inputs
11958 `(("python-magic" ,python-magic)))
11959 (home-page "https://relatorio.tryton.org/")
11960 (synopsis "Templating library able to output ODT and PDF files")
11961 (description "Relatorio is a templating library which provides a way to
11962easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
11963for more filetypes can be easily added by creating plugins for them.")
11964 (license license:gpl3+)))
11965
11966(define-public python2-relatorio
11967 (package-with-python2 python-relatorio))
11968
11969(define-public python-radon
11970 (package
11971 (name "python-radon")
11972 (version "2.2.0")
11973 (source
11974 (origin
11975 (method url-fetch)
11976 (uri (pypi-uri "radon" version))
11977 (sha256
11978 (base32
11979 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
11980 (build-system python-build-system)
11981 (arguments
11982 `(#:phases (modify-phases %standard-phases
11983 (replace 'check
11984 (lambda _
11985 (invoke "python" "radon/tests/run.py"))))))
11986 (propagated-inputs
11987 `(("python-colorama" ,python-colorama)
11988 ("python-flake8-polyfill" ,python-flake8-polyfill)
11989 ("python-mando" ,python-mando)))
11990 (native-inputs
11991 `(("python-pytest" ,python-pytest)
11992 ("python-pytest-mock" ,python-pytest-mock)))
11993 (home-page "https://radon.readthedocs.org/")
11994 (synopsis "Code Metrics in Python")
11995 (description "Radon is a Python tool which computes various code metrics.
11996Supported metrics are:
11997@itemize @bullet
11998@item raw metrics: SLOC, comment lines, blank lines, &c.
11999@item Cyclomatic Complexity (i.e. McCabe’s Complexity)
12000@item Halstead metrics (all of them)
12001@item the Maintainability Index (a Visual Studio metric)
12002@end itemize")
12003 (license license:expat)))
12004
12005(define-public python2-radon
12006 (package-with-python2 python-radon))
12007
12008(define-public python-sure
12009 (package
12010 (name "python-sure")
12011 (version "1.4.11")
12012 (source
12013 (origin
12014 (method url-fetch)
12015 (uri (pypi-uri "sure" version))
12016 (sha256
12017 (base32
12018 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
12019 (build-system python-build-system)
12020 (propagated-inputs
12021 `(("python-mock" ,python-mock)
12022 ("python-six" ,python-six)))
12023 (native-inputs
12024 `(("python-nose" ,python-nose)))
12025 (home-page "https://github.com/gabrielfalcao/sure")
12026 (synopsis "Automated testing library in python for python")
12027 (description
12028 "Sure is a python library that leverages a DSL for writing assertions.
12029Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
12030 (license license:gpl3+)))
12031
12032(define-public python2-sure
12033 (package-with-python2 python-sure))
12034
12035(define-public python2-couleur
12036 ;; This package does not seem to support python3 at all, hence,
12037 ;; only the python2 variant definition is provided.
12038 (package
12039 (name "python2-couleur")
12040 (version "0.6.2")
12041 (source
12042 (origin
12043 (method url-fetch)
12044 (uri (pypi-uri "couleur" version))
12045 (sha256
12046 (base32
12047 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
12048 (build-system python-build-system)
12049 (arguments
12050 `(#:python ,python-2))
12051 (home-page "https://github.com/gabrielfalcao/couleur")
12052 (synopsis
12053 "ANSI terminal tool for python, colored shell and other handy fancy features")
12054 (description
12055 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
12056terminal such as coloured output in the shell, overwriting output, indentation, etc.")
12057 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
12058 ;; https://github.com/gabrielfalcao/couleur/issues/11
12059 (license license:lgpl3+)))
12060
12061(define-public python-misaka
12062 (package
12063 (name "python-misaka")
0dcb3412 12064 (version "2.1.1")
44d10b1f
RW
12065 (source
12066 (origin
12067 (method url-fetch)
12068 (uri (pypi-uri "misaka" version))
12069 (sha256
12070 (base32
0dcb3412 12071 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
44d10b1f
RW
12072 (build-system python-build-system)
12073 (arguments
12074 `(;; Line 37 of setup.py calls self.run_command('develop')
12075 ;; in the 'check' phase. This command seems to be trying
12076 ;; to write to
12077 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
12078 ;; for which it does not have the permission to write.
12079 #:tests? #f))
12080 (propagated-inputs
12081 `(("python-cffi" ,python-cffi)))
12082 (home-page "https://github.com/FSX/misaka")
12083 (synopsis "Python binding for Hoedown")
12084 (description
12085 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
12086library written in C. It features a fast HTML renderer and functionality to make custom
12087renderers (e.g. man pages or LaTeX).")
12088 (license license:expat)))
12089
12090(define-public python2-misaka
12091 (package-with-python2 python-misaka))
12092
12093(define-public python2-steadymark
12094 ;; This is forced into being a python2 only variant
12095 ;; due to its dependence on couleur that has no support
12096 ;; for python3
12097 (package
12098 (name "python2-steadymark")
12099 (version "0.7.3")
12100 (source
12101 (origin
12102 (method url-fetch)
12103 (uri (pypi-uri "steadymark" version))
12104 (sha256
12105 (base32
12106 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
12107 (build-system python-build-system)
12108 (native-inputs
12109 `(("python-couleur" ,python2-couleur)
12110 ("python-sure" ,python2-sure)
12111 ("python-misaka" ,python2-misaka)))
12112 (arguments
12113 `(#:python ,python-2
12114 #:phases
12115 (modify-phases %standard-phases
12116 (add-before 'build 'patch-setup-py
12117 (lambda _
12118 ;; Update requirements from dependency==version
12119 ;; to dependency>=version
12120 (substitute* "setup.py"
12121 (("==") ">="))
12122 #t)))))
12123 (home-page "https://github.com/gabrielfalcao/steadymark")
12124 (synopsis "Markdown-based test runner for python")
12125 (description
12126 "@code{Steadymark} allows documentation to be written in github-flavoured
12127markdown. The documentation may contain snippets of code surrounded by python
12128code blocks and @code{Steadymark} will find these snippets and run them, making
12129sure that there are no old malfunctional examples in the documentation examples.")
12130 (license license:expat)))
12131
12132(define-public python-jsonpointer
12133 (package
12134 (name "python-jsonpointer")
12135 (version "1.10")
12136 (source
12137 (origin
12138 (method url-fetch)
12139 (uri (pypi-uri "jsonpointer" version))
12140 (sha256
12141 (base32
12142 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
12143 (build-system python-build-system)
12144 (home-page "https://github.com/stefankoegl/python-json-pointer")
12145 (synopsis "Identify specific nodes in a JSON document")
12146 (description "@code{jsonpointer} allows you to access specific nodes
12147by path in a JSON document (see RFC 6901).")
12148 (license license:bsd-3)))
12149
12150(define-public python2-jsonpointer
12151 (package-with-python2 python-jsonpointer))
12152
12153(define-public python-jsonpatch
12154 (package
12155 (name "python-jsonpatch")
12156 (version "1.16")
12157 (source
12158 (origin
12159 (method url-fetch)
12160 ;; pypi version lacks tests.js
12161 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12162 "archive/v" version ".tar.gz"))
12163 (file-name (string-append name "-" version ".tar.gz"))
12164 (sha256
12165 (base32
12166 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
12167 (build-system python-build-system)
12168 (native-inputs
12169 `(("python-jsonpointer" ,python-jsonpointer)))
12170 (home-page "https://github.com/stefankoegl/python-json-patch")
12171 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
12172 (description "@code{jsonpatch} is a library and program that allows
12173applying JSON Patches according to RFC 6902.")
12174 (license license:bsd-3)))
12175
12176(define-public python2-jsonpatch
12177 (package-with-python2 python-jsonpatch))
12178
12179(define-public python-jsonpatch-0.4
12180 (package (inherit python-jsonpatch)
12181 (name "python-jsonpatch")
12182 (version "0.4")
12183 (source
12184 (origin
12185 (method url-fetch)
12186 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12187 "archive/v" version ".tar.gz"))
12188 (file-name (string-append name "-" version ".tar.gz"))
12189 (sha256
12190 (base32
12191 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
12192
12193(define-public python2-jsonpatch-0.4
12194 (package-with-python2 python-jsonpatch-0.4))
12195
12196(define-public python-rfc3986
12197 (package
12198 (name "python-rfc3986")
12199 (version "1.1.0")
12200 (source (origin
12201 (method url-fetch)
12202 (uri (pypi-uri "rfc3986" version))
12203 (sha256
12204 (base32
12205 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
12206 (build-system python-build-system)
12207 (arguments
12208 `(#:modules ((guix build utils)
12209 (guix build python-build-system)
12210 (ice-9 ftw)
12211 (srfi srfi-1)
12212 (srfi srfi-26))
12213 #:phases
12214 (modify-phases %standard-phases
12215 (replace 'check
12216 (lambda _
12217 (let ((cwd (getcwd)))
12218 (setenv "PYTHONPATH"
12219 (string-append cwd "/build/"
12220 (find (cut string-prefix? "lib" <>)
12221 (scandir (string-append cwd "/build")))
12222 ":"
12223 (getenv "PYTHONPATH")))
12224 (invoke "pytest" "-v")))))))
12225 (native-inputs
12226 `(("python-pytest" ,python-pytest)))
12227 (home-page "https://rfc3986.readthedocs.io/")
12228 (synopsis "Parse and validate URI references")
12229 (description
12230 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
12231validation and authority parsing. This module also supports RFC@tie{}6874
12232which adds support for zone identifiers to IPv6 addresses.")
12233 (license license:asl2.0)))
12234
12235(define-public python2-rfc3986
12236 (package-with-python2 python-rfc3986))
12237
12238(define-public python-rfc3987
12239 (package
12240 (name "python-rfc3987")
12241 (version "1.3.7")
12242 (source
12243 (origin
12244 (method url-fetch)
12245 (uri (pypi-uri "rfc3987" version))
12246 (sha256
12247 (base32
12248 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
12249 (build-system python-build-system)
12250 (home-page "https://pypi.python.org/pypi/rfc3987")
12251 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
12252 (description "@code{rfc3987} provides routines for parsing and
12253validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
12254 (license license:gpl3+)))
12255
12256(define-public python2-rfc3987
12257 (package-with-python2 python-rfc3987))
12258
12259(define-public python-validate-email
12260 (package
12261 (name "python-validate-email")
12262 (version "1.3")
12263 (source
12264 (origin
12265 (method url-fetch)
12266 (uri (pypi-uri "validate_email" version))
12267 (sha256
12268 (base32
12269 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
12270 (build-system python-build-system)
12271 (home-page "https://github.com/syrusakbary/validate_email")
12272 (synopsis "Verifies if an email address is valid and really exists")
12273 (description "@code{validate_email} can be used to verify if an email
12274address is valid and really exists.")
12275 (license license:lgpl3+)))
12276
12277(define-public python2-validate-email
12278 (package-with-python2 python-validate-email))
12279
12280(define-public python-flex
12281 (package
12282 (name "python-flex")
12283 (version "6.10.0")
12284 (source
12285 (origin
12286 (method url-fetch)
12287 (uri (pypi-uri "flex" version))
12288 (sha256
12289 (base32
12290 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
12291 (build-system python-build-system)
12292 (propagated-inputs
12293 `(("python-click" ,python-click)
12294 ("python-iso8601" ,python-iso8601)
12295 ("python-jsonpointer" ,python-jsonpointer)
12296 ("python-pyyaml" ,python-pyyaml)
12297 ("python-requests" ,python-requests)
12298 ("python-rfc3987" ,python-rfc3987)
12299 ("python-six" ,python-six)
12300 ("python-validate-email" ,python-validate-email)))
12301 (home-page "https://github.com/pipermerriam/flex")
12302 (synopsis "Validates Swagger schemata")
12303 (description "@code{flex} can be used to validate Swagger schemata.")
12304 (license license:bsd-3)))
12305
12306(define-public python2-flex
12307 (package-with-python2 python-flex))
12308
12309(define-public python-marshmallow
12310 (package
12311 (name "python-marshmallow")
12312 (version "3.0.0b14")
12313 (source
12314 (origin
12315 (method url-fetch)
12316 (uri (pypi-uri "marshmallow" version))
12317 (sha256
12318 (base32
12319 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
12320 (build-system python-build-system)
12321 (propagated-inputs
12322 `(("python-dateutil" ,python-dateutil)
12323 ("python-simplejson" ,python-simplejson)))
12324 (native-inputs
12325 `(("python-pytest" ,python-pytest)
12326 ("python-pytz" ,python-pytz)))
12327 (home-page "https://github.com/marshmallow-code/marshmallow")
12328 (synopsis "Convert complex datatypes to and from native
12329Python datatypes.")
12330 (description "@code{marshmallow} provides a library for converting
12331complex datatypes to and from native Python datatypes.")
12332 (license license:expat)))
12333
12334(define-public python2-marshmallow
12335 (package-with-python2 python-marshmallow))
12336
12337(define-public python-apispec
12338 (package
12339 (name "python-apispec")
12340 (version "0.25.3")
12341 (source
12342 (origin
12343 (method url-fetch)
12344 (uri (pypi-uri "apispec" version))
12345 (sha256
12346 (base32
12347 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
12348 (build-system python-build-system)
12349 (propagated-inputs
12350 `(("python-pyyaml" ,python-pyyaml)))
12351 (native-inputs
12352 `(("python-pytest" ,python-pytest)
12353 ("python-flask" ,python-flask)
12354 ("python-marshmallow" ,python-marshmallow)
12355 ("python-tornado" ,python-tornado)
12356 ("python-bottle" ,python-bottle)
12357 ("python-mock" ,python-mock)))
12358 (home-page "https://github.com/marshmallow-code/apispec")
12359 (synopsis "Swagger 2.0 API specification generator")
12360 (description "@code{python-apispec} is a pluggable API specification
12361generator. Currently supports the OpenAPI specification (f.k.a.
12362Swagger 2.0).")
12363 (license license:expat)))
12364
12365(define-public python2-apispec
12366 (package-with-python2 python-apispec))
12367
12368(define-public python-flasgger
12369 (package
12370 (name "python-flasgger")
12371 (version "0.6.3")
12372 (source
12373 (origin
12374 (method url-fetch)
12375 (uri (string-append "https://github.com/rochacbruno/flasgger/archive/"
12376 version ".tar.gz"))
12377 (file-name (string-append name "-" version ".tar.gz"))
12378 (sha256
12379 (base32
12380 "1gqzlm0rb55fdpsy5ipkganlx9cnpi454fqyycr03jm22zql14ay"))))
12381 (build-system python-build-system)
12382 (arguments
12383 `(#:phases
12384 (modify-phases %standard-phases
12385 (replace 'check
12386 (lambda* (#:key inputs outputs #:allow-other-keys)
12387 (substitute* "Makefile"
12388 (("flake8 flasgger --ignore=F403")
12389 "flake8 flasgger --ignore=E731,F403"))
12390 (setenv "PYTHONPATH" (string-append (getcwd)
12391 ":"
12392 (getenv "PYTHONPATH")))
ac599a09 12393 (invoke "py.test"))))))
44d10b1f
RW
12394 (propagated-inputs
12395 `(("python-flask" ,python-flask)
12396 ("python-pyyaml" ,python-pyyaml)
12397 ("python-jsonschema" ,python-jsonschema)
12398 ("python-mistune" ,python-mistune)
12399 ("python-six" ,python-six)))
12400 (native-inputs
12401 `(("python-decorator" ,python-decorator)
12402 ("python-flake8" ,python-flake8)
12403 ("python-flask-restful" ,python-flask-restful)
12404 ("python-flex" ,python-flex)
12405 ("python-pytest" ,python-pytest)
12406 ("python-pytest-cov" ,python-pytest-cov)
12407 ("python-marshmallow" ,python-marshmallow)
12408 ("python-apispec" ,python-apispec)))
12409 (home-page "https://github.com/rochacbruno/flasgger/")
12410 (synopsis "Extract Swagger specs from your Flask project")
12411 (description "@code{python-flasgger} allows extracting Swagger specs
12412from your Flask project. It is a fork of Flask-Swagger.")
12413 (license license:expat)))
12414
12415(define-public python2-flasgger
12416 (package-with-python2 python-flasgger))
12417
12418(define-public python-swagger-spec-validator
12419 (package
12420 (name "python-swagger-spec-validator")
12421 (version "2.1.0")
12422 (source
12423 (origin
12424 (method url-fetch)
12425 (uri (pypi-uri "swagger-spec-validator" version))
12426 (sha256
12427 (base32
12428 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
12429 (build-system python-build-system)
12430 (propagated-inputs
12431 `(("python-jsonschema" ,python-jsonschema)
12432 ("python-six" ,python-six)))
12433 (home-page
12434 "https://github.com/Yelp/swagger_spec_validator")
12435 (synopsis "Validation of Swagger specifications")
12436 (description "@code{swagger_spec_validator} provides a library for
12437validating Swagger API specifications.")
12438 (license license:asl2.0)))
12439
12440(define-public python2-swagger-spec-validator
12441 (package-with-python2 python-swagger-spec-validator))
12442
12443(define-public python-apache-libcloud
12444 (package
12445 (name "python-apache-libcloud")
12446 (version "2.4.0")
12447 (source
12448 (origin
12449 (method url-fetch)
12450 (uri (pypi-uri "apache-libcloud" version))
12451 (sha256
12452 (base32
12453 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
12454 (build-system python-build-system)
12455 (arguments
12456 `(#:phases
12457 (modify-phases %standard-phases
12458 (add-after 'unpack 'patch-ssh
12459 (lambda* (#:key inputs #:allow-other-keys)
12460 (substitute* "libcloud/compute/ssh.py"
12461 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
12462 "/bin/ssh" "'")))
12463 #t))
12464 (add-after 'unpack 'patch-tests
12465 (lambda _
12466 (substitute* "./libcloud/test/test_file_fixtures.py"
12467 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
12468 (("def _ascii") "def _raw_data(self, method, url, body, headers):
12469 return (httplib.OK,
12470 \"1234abcd\",
12471 {\"test\": \"value\"},
12472 httplib.responses[httplib.OK])
12473 def _ascii"))
12474 (substitute* "libcloud/test/compute/test_ssh_client.py"
12475 (("class ShellOutSSHClientTests")
12476 "@unittest.skip(\"Guix container doesn't have ssh service\")
12477class ShellOutSSHClientTests")
12478 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
12479 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
12480 (("'.xF0', '.x90', '.x8D', '.x88'")
12481 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
12482 #t))
12483 (add-before 'check 'copy-secret
12484 (lambda _
12485 (copy-file "libcloud/test/secrets.py-dist"
12486 "libcloud/test/secrets.py")
12487 #t)))))
12488 (inputs
12489 `(("openssh" ,openssh)))
12490 (propagated-inputs
12491 `(("python-paramiko" ,python-paramiko)
12492 ("python-requests" ,python-requests)))
12493 (native-inputs
12494 `(("python-lockfile" ,python-lockfile)
12495 ("python-mock" ,python-mock)
12496 ("python-pytest" ,python-pytest)
12497 ("python-pytest-runner" ,python-pytest-runner)
12498 ("python-requests-mock" ,python-requests-mock)))
12499 (home-page "https://libcloud.apache.org/")
12500 (synopsis "Unified Cloud API")
12501 (description "@code{libcloud} is a Python library for interacting with
12502many of the popular cloud service providers using a unified API.")
12503 (license license:asl2.0)))
12504
12505(define-public python2-apache-libcloud
12506 (package-with-python2 python-apache-libcloud))
12507
12508(define-public python-smmap2
12509 (package
12510 (name "python-smmap2")
12511 (version "2.0.3")
12512 (source
12513 (origin
12514 (method url-fetch)
12515 (uri (pypi-uri "smmap2" version))
12516 (sha256
12517 (base32
12518 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
12519 (build-system python-build-system)
12520 (native-inputs
12521 `(("python-nosexcover" ,python-nosexcover)))
12522 (home-page "https://github.com/Byron/smmap")
12523 (synopsis "Python sliding window memory map manager")
12524 (description "@code{smmap2} is a pure Python implementation of a sliding
12525window memory map manager.")
12526 (license license:bsd-3)))
12527
12528(define-public python2-smmap2
12529 (package-with-python2 python-smmap2))
12530
12531(define-public python-regex
12532 (package
12533 (name "python-regex")
12534 (version "2017.06.07")
12535 (source (origin
12536 (method url-fetch)
12537 (uri (pypi-uri "regex" version))
12538 (sha256
12539 (base32
12540 "06r6b7yigikbj3a72whl85r2b64pj1r0ypmw9yalmkm0wnxq8mz4"))))
12541 (build-system python-build-system)
12542 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
12543 (synopsis "Alternative regular expression module")
12544 (description "This regular expression implementation is backwards-
12545compatible with the standard @code{re} module, but offers additional
12546functionality like full case-folding for case-insensitive matches in Unicode.")
12547 (license license:psfl)))
12548
12549(define-public python2-regex
12550 (package-with-python2 python-regex))
12551
12552(define-public python2-pyopengl
12553 (package
12554 (name "python2-pyopengl")
12555 (version "3.1.0")
12556 (source
12557 (origin
12558 (method url-fetch)
12559 (uri (pypi-uri "PyOpenGL" version))
12560 (sha256
12561 (base32
12562 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
12563 (arguments
12564 `(#:python ,python-2))
12565 (build-system python-build-system)
12566 (home-page "http://pyopengl.sourceforge.net")
12567 (synopsis "Standard OpenGL bindings for Python")
12568 (description
12569 "PyOpenGL is the most common cross platform Python binding to OpenGL and
12570related APIs. The binding is created using the standard @code{ctypes}
12571library.")
12572 (license license:bsd-3)))
12573
12574(define-public python2-pyopengl-accelerate
12575 (package
12576 (inherit python2-pyopengl)
12577 (name "python2-pyopengl-accelerate")
12578 (version "3.1.0")
12579 (source
12580 (origin
12581 (method url-fetch)
12582 (uri (pypi-uri "PyOpenGL-accelerate" version))
12583 (sha256
12584 (base32
12585 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
12586 (synopsis "Acceleration code for PyOpenGL")
12587 (description
12588 "This is the Cython-coded accelerator module for PyOpenGL.")))
12589
12590(define-public python-rencode
12591 (package
12592 (name "python-rencode")
12593 (version "1.0.5")
12594 (source
12595 (origin
12596 (method url-fetch)
12597 (uri (pypi-uri "rencode" version))
12598 (sha256
12599 (base32
12600 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
12601 (build-system python-build-system)
12602 (arguments
12603 `(#:phases
12604 (modify-phases %standard-phases
12605 (add-before 'check 'delete-bogus-test
12606 ;; This test requires /home/aresch/Downloads, which is not provided by
12607 ;; the build environment.
12608 (lambda _
12609 (delete-file "rencode/t.py")
12610 #t)))))
12611 (native-inputs `(("pkg-config" ,pkg-config)
12612 ("python-cython" ,python-cython)))
12613 (home-page "https://github.com/aresch/rencode")
12614 (synopsis "Serialization of heterogeneous data structures")
12615 (description
12616 "The @code{rencode} module is a data structure serialization library,
12617similar to @code{bencode} from the BitTorrent project. For complex,
12618heterogeneous data structures with many small elements, r-encoding stake up
12619significantly less space than b-encodings. This version of rencode is a
12620complete rewrite in Cython to attempt to increase the performance over the
12621pure Python module.")
12622 (license license:bsd-3)))
12623
12624(define-public python2-rencode
12625 (package-with-python2 python-rencode))
12626
12627(define-public python-xenon
12628 (package
12629 (name "python-xenon")
12630 (version "0.5.4")
12631 (source
12632 (origin
12633 (method url-fetch)
12634 (uri (pypi-uri "xenon" version))
12635 (sha256
12636 (base32
12637 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
12638 (build-system python-build-system)
12639 (native-inputs
12640 `(("python-pyyaml" ,python-pyyaml)
12641 ("python-radon" ,python-radon)
12642 ("python-requests" ,python-requests)
12643 ("python-flake8" ,python-flake8)
12644 ("python-tox" ,python-tox)))
12645 (arguments
12646 `(#:phases
12647 (modify-phases %standard-phases
12648 (add-before 'build 'patch-test-requirements
12649 (lambda _
12650 ;; Remove httpretty dependency for tests.
12651 (substitute* "setup.py"
12652 (("httpretty") ""))
12653 #t)))))
12654 (home-page "https://xenon.readthedocs.org/")
12655 (synopsis "Monitor code metrics for Python on your CI server")
12656 (description
12657 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
12658Ideally, @code{xenon} is run every time code is committed. Through command
12659line options, various thresholds can be set for the complexity of code. It
12660will fail (i.e. it will exit with a non-zero exit code) when any of these
12661requirements is not met.")
12662 (license license:expat)))
12663
12664(define-public python2-xenon
12665 (package-with-python2 python-xenon))
12666
12667(define-public python-pysocks
12668 (package
12669 (name "python-pysocks")
12670 (version "1.6.8")
12671 (source
12672 (origin
12673 (method url-fetch)
12674 (uri (pypi-uri "PySocks" version))
12675 (sha256
12676 (base32
12677 "0wn6xafwy9c1gamwljw3fyvih5w19qy9xp39zmv8c90ai5ajrr9z"))))
12678 (build-system python-build-system)
12679 (arguments `(#:tests? #f))
12680 (home-page "https://github.com/Anorov/PySocks")
12681 (synopsis "SOCKS client module")
12682 (description "@code{pysocks} is an updated and semi-actively maintained
12683version of @code{SocksiPy} with bug fixes and extra features.")
12684 (license license:bsd-3)))
12685
12686(define-public python2-pysocks
12687 (package-with-python2 python-pysocks))
12688
12689(define-public python-pydiff
12690 (package
12691 (name "python-pydiff")
12692 (version "0.2")
12693 (source
12694 (origin
12695 (method url-fetch)
12696 (uri (pypi-uri "pydiff" version))
12697 (sha256
12698 (base32
12699 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
12700 (build-system python-build-system)
12701 (home-page "https://github.com/myint/pydiff")
12702 (synopsis "Library to diff two Python files at the bytecode level")
12703 (description
12704 "@code{pydiff} makes it easy to look for actual code changes while
12705ignoring formatting changes.")
12706 (license license:expat)))
12707
12708(define-public python2-pydiff
12709 (package-with-python2 python-pydiff))
12710
12711(define-public python-tqdm
12712 (package
12713 (name "python-tqdm")
12714 (version "4.19.6")
12715 (source
12716 (origin
12717 (method url-fetch)
12718 (uri (pypi-uri "tqdm" version))
12719 (sha256
12720 (base32
12721 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
12722 (build-system python-build-system)
12723 (native-inputs
12724 `(("python-flake8" ,python-flake8)
12725 ("python-nose" ,python-nose)
12726 ("python-coverage" ,python-coverage)))
12727 (home-page "https://github.com/tqdm/tqdm")
12728 (synopsis "Fast, extensible progress meter")
12729 (description
12730 "Make loops show a progress bar on the console by just wrapping any
12731iterable with @code{|tqdm(iterable)|}. Offers many options to define
12732design and layout.")
12733 (license (list license:mpl2.0 license:expat))))
12734
12735(define-public python2-tqdm
12736 (package-with-python2 python-tqdm))
12737
12738(define-public python-pkginfo
12739 (package
12740 (name "python-pkginfo")
12741 (version "1.4.2")
12742 (source
12743 (origin
12744 (method url-fetch)
12745 (uri (pypi-uri "pkginfo" version))
12746 (sha256
12747 (base32
12748 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
12749 (build-system python-build-system)
12750 (arguments
12751 ;; The tests are broken upstream.
12752 '(#:tests? #f))
12753 (home-page
12754 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
12755 (synopsis
12756 "Query metadatdata from sdists, bdists, and installed packages")
12757 (description
12758 "API to query the distutils metadata written in @file{PKG-INFO} inside a
12759source distriubtion (an sdist) or a binary distribution (e.g., created by
12760running bdist_egg). It can also query the EGG-INFO directory of an installed
12761distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
12762created by running @code{python setup.py develop}).")
12763 (license license:expat)))
12764
12765(define-public python2-pkginfo
12766 (package-with-python2 python-pkginfo))
12767
12768(define-public python-twine
12769 (package
12770 (name "python-twine")
12771 (version "1.9.1")
12772 (source
12773 (origin
12774 (method url-fetch)
12775 (uri (pypi-uri "twine" version))
12776 (sha256
12777 (base32
12778 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
12779 (build-system python-build-system)
12780 (propagated-inputs
12781 `(("python-tqdm" ,python-tqdm)
12782 ("python-pkginfo" ,python-pkginfo)
12783 ("python-requests" ,python-requests)
12784 ("python-requests-toolbelt" ,python-requests-toolbelt)))
12785 (home-page "https://github.com/pypa/twine")
12786 (synopsis "Collection of utilities for interacting with PyPI")
12787 (description
12788 "@code{twine} currently supports registering projects and uploading
12789distributions. It authenticates the user over HTTPS, allows them to pre-sign
12790their files and supports any packaging format (including wheels).")
12791 (license license:asl2.0)))
12792
12793(define-public python2-twine
12794 (package-with-python2 python-twine))
12795
12796(define-public python-linecache2
12797 (package
12798 (name "python-linecache2")
12799 (version "1.0.0")
12800 (source
12801 (origin
12802 (method url-fetch)
12803 (uri (pypi-uri "linecache2" version))
12804 (sha256
12805 (base32
12806 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
12807 (build-system python-build-system)
12808 (arguments
12809 `(;; The tests depend on unittest2, and our version is a bit too old.
12810 #:tests? #f))
12811 (native-inputs
12812 `(("python-pbr" ,python-pbr-minimal)))
12813 (home-page
12814 "https://github.com/testing-cabal/linecache2")
12815 (synopsis "Backports of the linecache module")
12816 (description
12817 "The linecache module allows one to get any line from any file, while
12818attempting to optimize internally, using a cache, the common case where many
12819lines are read from a single file.")
12820 (license license:psfl)))
12821
12822(define-public python2-linecache2
12823 (package-with-python2 python-linecache2))
12824
12825(define-public python-traceback2
12826 (package
12827 (name "python-traceback2")
12828 (version "1.4.0")
12829 (source
12830 (origin
12831 (method url-fetch)
12832 (uri (pypi-uri "traceback2" version))
12833 (sha256
12834 (base32
12835 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
12836 (build-system python-build-system)
12837 (arguments
12838 `(;; python-traceback2 and python-unittest2 depend on one another.
12839 #:tests? #f))
12840 (native-inputs
12841 `(("python-pbr" ,python-pbr-minimal)))
12842 (propagated-inputs
12843 `(("python-linecache2" ,python-linecache2)))
12844 (home-page
12845 "https://github.com/testing-cabal/traceback2")
12846 (synopsis "Backports of the traceback module")
12847 (description
12848 "This module provides a standard interface to extract, format and print
12849stack traces of Python programs. It exactly mimics the behavior of the Python
12850interpreter when it prints a stack trace.")
12851 (license license:psfl)))
12852
12853(define-public python2-traceback2
12854 (package-with-python2 python-traceback2))
12855
12856(define-public python-ratelimiter
12857 (package
12858 (name "python-ratelimiter")
12859 (version "1.2.0")
12860 (source
12861 (origin
12862 (method url-fetch)
12863 (uri (pypi-uri "ratelimiter" version))
12864 (sha256
12865 (base32
12866 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
12867 (build-system python-build-system)
12868 (arguments
12869 '(#:tests? #f)) ; There are no tests in the pypi archive.
12870 (home-page "https://github.com/RazerM/ratelimiter")
12871 (synopsis "Simple rate limiting object")
12872 (description
12873 "The @code{ratelimiter} module ensures that an operation will not be
12874executed more than a given number of times during a given period.")
12875 (license license:asl2.0)))
12876
12877(define-public python2-ratelimiter
12878 (package-with-python2 python-ratelimiter))
12879
12880(define-public python-dukpy
12881 (package
12882 (name "python-dukpy")
12883 (version "0.3")
12884 (source
12885 (origin
12886 (method url-fetch)
12887 (uri (string-append "https://github.com/kovidgoyal/dukpy/archive/v"
12888 version ".tar.gz"))
12889 (file-name (string-append name "-" version ".tar.gz"))
12890 (sha256
12891 (base32
12892 "0pj39rfwlzivqm5hkrsza7gssg6ggpxlq5ivc8f3h7x5pfgc6y6c"))))
12893 (build-system python-build-system)
12894 (home-page "https://github.com/kovidgoyal/dukpy")
12895 (synopsis "Run JavaScript in python")
12896 (description
12897 "dukpy is a JavaScript runtime environment for Python using the duktape
12898embeddable JavaScript engine.")
12899 ;; Dukpy is licensed under MIT like the embedded duktape library,
12900 ;; with 'errors.c' as GPL3.
12901 (license (list license:expat license:gpl3))))
12902
12903(define-public python2-dukpy
12904 (package-with-python2 python-dukpy))
12905
12906(define-public python-jsonrpclib-pelix
12907 (package
12908 (name "python-jsonrpclib-pelix")
12909 (version "0.3.2")
12910 (source
12911 (origin
12912 (method url-fetch)
12913 (uri (pypi-uri "jsonrpclib-pelix" version))
12914 (sha256
12915 (base32
12916 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
12917 (build-system python-build-system)
12918 (arguments
12919 `(#:tests? #f)) ; no tests in PyPI tarball
12920 (home-page "https://github.com/tcalmant/jsonrpclib/")
12921 (synopsis "JSON-RPC 2.0 client library for Python")
12922 (description
12923 "This library implements the JSON-RPC v2.0
12924specification (backwards-compatible) as a client library for Python. This
12925version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
12926services.")
12927 (license license:asl2.0)))
12928
12929(define-public python2-jsonrpclib-pelix
12930 (package-with-python2 python-jsonrpclib-pelix))
12931
12932(define-public python-setuptools-scm-git-archive
12933 (package
12934 (name "python-setuptools-scm-git-archive")
12935 (version "1.0")
12936 (source
12937 (origin
12938 (method url-fetch)
12939 (uri (pypi-uri "setuptools_scm_git_archive" version))
12940 (sha256
12941 (base32
12942 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
12943 (build-system python-build-system)
12944 (native-inputs
12945 `(("python-pytest" ,python-pytest)))
12946 (propagated-inputs
12947 `(("python-setuptools-scm" ,python-setuptools-scm)))
12948 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
12949 (synopsis "Setuptools_scm plugin for git archives")
12950 (description
12951 "The setuptools_scm_git_archive package is a plugin to
12952setuptools_scm, which supports obtaining versions from git archives that
12953belong to tagged versions.")
12954 (license license:expat)))
12955
12956(define-public python2-setuptools-scm-git-archive
12957 (package-with-python2 python-setuptools-scm-git-archive))
12958
12959(define-public python-pyclipper
12960 (package
12961 (name "python-pyclipper")
12962 (version "1.1.0.post1")
12963 (source
12964 (origin
12965 (method url-fetch)
12966 (uri (pypi-uri "pyclipper" version ".zip"))
12967 (sha256
12968 (base32
12969 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
12970 (modules '((guix build utils)))
12971 (snippet
12972 '(begin
12973 ;; This file is generated by Cython.
12974 (delete-file "pyclipper/pyclipper.cpp") #t))))
12975 (build-system python-build-system)
12976 (arguments
12977 `(#:phases
12978 (modify-phases %standard-phases
12979 (add-before 'build 'cythonize-sources
12980 (lambda _
12981 (with-directory-excursion "pyclipper"
12982 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
12983 (propagated-inputs
12984 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
12985 (native-inputs
12986 `(("python-cython" ,python-cython)
12987 ("python-pytest" ,python-pytest)
12988 ("python-pytest-runner" ,python-pytest-runner)
12989 ("python-unittest2" ,python-unittest2)
12990 ("unzip" ,unzip)))
12991 (home-page "https://github.com/greginvm/pyclipper")
12992 (synopsis "Wrapper for Angus Johnson's Clipper library")
12993 (description
12994 "Pyclipper is a Cython wrapper for the C++ translation of the
12995Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
12996 (license license:expat)))
12997
12998(define-public python2-pyclipper
12999 (package-with-python2 python-pyclipper))
13000
13001(define-public python2-booleanoperations
13002 (package
13003 (name "python2-booleanoperations")
13004 (version "0.7.1")
13005 (source
13006 (origin
13007 (method url-fetch)
13008 (uri (pypi-uri "booleanOperations" version ".zip"))
13009 (sha256
13010 (base32
13011 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
13012 (build-system python-build-system)
13013 (arguments
13014 `(#:python ,python-2))
13015 (native-inputs
13016 `(("unzip" ,unzip)
13017 ("python2-pytest" ,python2-pytest)
13018 ("python2-pytest-runner" ,python2-pytest-runner)))
13019 (propagated-inputs
13020 `(("python-fonttools" ,python2-fonttools)
13021 ("python-pyclipper" ,python2-pyclipper)
13022 ("python-ufolib" ,python2-ufolib)))
13023 (home-page "https://github.com/typemytype/booleanOperations")
13024 (synopsis "Boolean operations on paths")
13025 (description
13026 "BooleanOperations provides a Python library that enables
13027boolean operations on paths.")
13028 (license license:expat)))
13029
13030(define-public python-tempdir
13031 (package
13032 (name "python-tempdir")
13033 (version "0.7.1")
13034 (source
13035 (origin
13036 (method url-fetch)
13037 (uri (pypi-uri "tempdir" version))
13038 (sha256
13039 (base32
13040 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
13041 (build-system python-build-system)
13042 (home-page "https://pypi.org/project/tempdir/")
13043 (arguments
13044 ;; the package has no tests
13045 '(#:tests? #f))
13046 (synopsis "Python library for managing temporary directories")
13047 (description
13048 "This library manages temporary directories that are automatically
13049deleted with all their contents when they are no longer needed. It is
13050particularly convenient for use in tests.")
13051 (license license:expat)))
13052
13053(define-public python2-tempdir
13054 (package-with-python2 python-tempdir))
13055
13056(define-public python-activepapers
13057 (package
13058 (name "python-activepapers")
13059 (version "0.2.2")
13060 (source
13061 (origin
13062 (method url-fetch)
13063 (uri (pypi-uri "ActivePapers.Py" version))
13064 (sha256
13065 (base32
13066 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
13067 (build-system python-build-system)
13068 (arguments
13069 `(#:modules ((ice-9 ftw)
13070 (srfi srfi-1)
13071 (guix build utils)
13072 (guix build python-build-system))
13073
13074 #:phases
13075 (modify-phases %standard-phases
13076 (add-after 'unpack 'delete-python2-code
13077 (lambda _
13078 (for-each delete-file
13079 '("lib/activepapers/builtins2.py"
13080 "lib/activepapers/standardlib2.py"
13081 "lib/activepapers/utility2.py"))))
13082 (replace 'check
13083 (lambda _
13084 ;; Deactivate the test cases that download files
13085 (setenv "NO_NETWORK_ACCESS" "1")
13086 ;; For some strange reason, some tests fail if nosetests runs all
13087 ;; test modules in a single execution. They pass if each test
13088 ;; module is run individually.
13089 (for-each (lambda (filename)
13090 (invoke "nosetests"
13091 (string-append "tests/" filename)))
13092 (scandir "tests"
13093 (lambda (filename)
13094 (string-suffix? ".py" filename)))))))))
13095 (native-inputs
13096 `(("python-tempdir" ,python-tempdir)
13097 ("python-nose" ,python-nose)))
13098 (propagated-inputs
13099 `(("python-h5py" ,python-h5py)))
13100 (home-page "http://www.activepapers.org/")
13101 (synopsis "Executable papers for scientific computing")
13102 (description
13103 "ActivePapers is a tool for working with executable papers, which
13104combine data, code, and documentation in single-file packages,
13105suitable for publication as supplementary material or on repositories
13106such as figshare or Zenodo.")
13107 (properties `((python2-variant . ,(delay python2-activepapers))))
13108 (license license:bsd-3)))
13109
13110(define-public python2-activepapers
13111 (let ((base (package-with-python2
13112 (strip-python2-variant python-activepapers))))
13113 (package
13114 (inherit base)
13115 (arguments
13116 (substitute-keyword-arguments (package-arguments base)
13117 ((#:phases phases)
13118 `(modify-phases ,phases
13119 (delete 'delete-python2-code)
13120 (add-after 'unpack 'delete-python3-code
13121 (lambda _
13122 (for-each delete-file
13123 '("lib/activepapers/builtins3.py"
13124 "lib/activepapers/standardlib3.py"
13125 "lib/activepapers/utility3.py")))))))))))
13126
13127(define-public python-semver
13128 (package
13129 (name "python-semver")
13130 (version "2.7.9")
13131 (source
13132 (origin
13133 (method url-fetch)
13134 (uri (pypi-uri "semver" version))
13135 (sha256
13136 (base32
13137 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
13138 (build-system python-build-system)
13139 (arguments
13140 `(#:phases
13141 (modify-phases %standard-phases
13142 (add-after 'unpack 'patch-test-requirements
13143 (lambda _
13144 (substitute* "setup.py"
13145 ;; Our Python is new enough.
13146 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
13147 #t)))))
13148 (native-inputs
13149 `(("python-tox" ,python-tox)
13150 ("python-virtualenv" ,python-virtualenv)))
13151 (home-page "https://github.com/k-bx/python-semver")
13152 (synopsis "Python helper for Semantic Versioning")
13153 (description "This package provides a Python library for
13154@url{Semantic Versioning, http://semver.org/}.")
13155 (license license:bsd-3)))
13156
13157(define-public python2-semver
13158 (package-with-python2 python-semver))
13159
13160(define-public python-pyro4
13161 (package
13162 (name "python-pyro4")
13163 (version "4.74")
13164 (source
13165 (origin
13166 (method url-fetch)
13167 (uri (pypi-uri "Pyro4" version))
13168 (sha256
13169 (base32
13170 "0pzp7c6q3vvkxq0wy9lr6wd5wky40sajz69g697i5rb2q497pvc9"))))
13171 (build-system python-build-system)
13172 (propagated-inputs
13173 `(("python-serpent" ,python-serpent)))
13174 (home-page "https://pyro4.readthedocs.io")
13175 (synopsis "Distributed object middleware for Python")
13176 (description
13177 "Pyro enables you to build applications in which objects can talk to each
13178other over the network. You can just use normal Python method calls to call
13179objects on other machines, also known as remote procedure calls (RPC).")
13180 (license license:expat)))
13181
13182(define-public python2-pyro
13183 (package
13184 (name "python2-pyro")
13185 (version "3.16")
13186 (source
13187 (origin
13188 (method url-fetch)
13189 (uri (pypi-uri "Pyro" version))
13190 (file-name (string-append "Pyro-" version ".tar.gz"))
13191 (sha256
13192 (base32
13193 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
13194 (build-system python-build-system)
13195 (arguments
13196 ;; Pyro is not compatible with Python 3
13197 `(#:python ,python-2
13198 ;; Pyro has no test cases for automatic execution
13199 #:tests? #f))
13200 (home-page "http://pythonhosted.org/Pyro/")
13201 (synopsis "Distributed object manager for Python")
13202 (description "Pyro is a Distributed Object Technology system
13203written in Python that is designed to be easy to use. It resembles
13204Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
13205which is a system and language independent Distributed Object Technology
13206and has much more to offer than Pyro or RMI. Pyro 3.x is no
13207longer maintained. New projects should use Pyro4 instead, which
13208is the new Pyro version that is actively developed.")
13209 (license license:expat)))
13210
13211(define-public python2-scientific
13212 (package
13213 (name "python2-scientific")
13214 (version "2.9.4")
13215 (source
13216 (origin
13217 (method url-fetch)
13218 (uri (string-append "https://bitbucket.org/khinsen/"
13219 "scientificpython/downloads/ScientificPython-"
13220 version ".tar.gz"))
13221 (file-name (string-append "ScientificPython-" version ".tar.gz"))
13222 (sha256
13223 (base32
13224 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
13225 (build-system python-build-system)
13226 (inputs
13227 `(("netcdf" ,netcdf)))
13228 (propagated-inputs
13229 `(("python-numpy" ,python2-numpy-1.8)
13230 ("python-pyro" ,python2-pyro)))
13231 (arguments
13232 ;; ScientificPython is not compatible with Python 3
13233 `(#:python ,python-2
13234 #:tests? #f ; No test suite
13235 #:phases
13236 (modify-phases %standard-phases
13237 (replace 'build
13238 (lambda* (#:key inputs #:allow-other-keys)
77e61e25
RW
13239 (invoke "python" "setup.py" "build"
13240 (string-append "--netcdf_prefix="
13241 (assoc-ref inputs "netcdf"))))))))
44d10b1f
RW
13242 (home-page "https://bitbucket.org/khinsen/scientificpython")
13243 (synopsis "Python modules for scientific computing")
13244 (description "ScientificPython is a collection of Python modules that are
13245useful for scientific computing. Most modules are rather general (Geometry,
13246physical units, automatic derivatives, ...) whereas others are more
13247domain-specific (e.g. netCDF and PDB support). The library is currently
13248not actively maintained and works only with Python 2 and NumPy < 1.9.")
13249 (license license:cecill-c)))
13250
13251(define-public python2-mmtk
13252 (package
13253 (name "python2-mmtk")
13254 (version "2.7.11")
13255 (source
13256 (origin
13257 (method url-fetch)
13258 (uri (string-append "https://bitbucket.org/khinsen/"
13259 "mmtk/downloads/MMTK-" version ".tar.gz"))
13260 (file-name (string-append "MMTK-" version ".tar.gz"))
13261 (sha256
13262 (base32
13263 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
13264 (build-system python-build-system)
13265 (native-inputs
13266 `(("netcdf" ,netcdf)))
13267 (propagated-inputs
13268 `(("python-scientific" ,python2-scientific)
13269 ("python-tkinter" ,python-2 "tk")))
13270 (arguments
13271 `(#:python ,python-2
13272 #:tests? #f
13273 #:phases
13274 (modify-phases %standard-phases
13275 (add-before 'build 'includes-from-scientific
13276 (lambda* (#:key inputs #:allow-other-keys)
13277 (mkdir-p "Include/Scientific")
13278 (copy-recursively
13279 (string-append
13280 (assoc-ref inputs "python-scientific")
13281 "/include/python2.7/Scientific")
13282 "Include/Scientific"))))))
13283 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
13284 (synopsis "Python library for molecular simulation")
13285 (description "MMTK is a library for molecular simulations with an emphasis
13286on biomolecules. It provides widely used methods such as Molecular Dynamics
13287and normal mode analysis, but also basic routines for implementing new methods
13288for simulation and analysis. The library is currently not actively maintained
13289and works only with Python 2 and NumPy < 1.9.")
13290 (license license:cecill-c)))
13291
13292(define-public python-phonenumbers
13293 (package
13294 (name "python-phonenumbers")
13295 (version "8.9.1")
13296 (source
13297 (origin
13298 (method url-fetch)
13299 (uri (pypi-uri "phonenumbers" version))
13300 (sha256
13301 (base32
13302 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
13303 (build-system python-build-system)
13304 (home-page
13305 "https://github.com/daviddrysdale/python-phonenumbers")
13306 (synopsis
13307 "Python library for dealing with international phone numbers")
13308 (description
13309 "This package provides a Python port of Google's libphonenumber library.")
13310 (license license:asl2.0)))
13311
13312(define-public python2-phonenumbers
13313 (package-with-python2 python-phonenumbers))
13314
13315(define-public python-send2trash
13316 (package
13317 (name "python-send2trash")
d9b0216b 13318 (version "1.5.0")
44d10b1f 13319 (source
d9b0216b 13320 (origin (method git-fetch)
44d10b1f 13321 ;; Source tarball on PyPI doesn't include tests.
d9b0216b
RW
13322 (uri (git-reference
13323 (url "https://github.com/hsoft/send2trash.git")
13324 (commit version)))
13325 (file-name (git-file-name name version))
44d10b1f
RW
13326 (sha256
13327 (base32
d9b0216b 13328 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
44d10b1f
RW
13329 (build-system python-build-system)
13330 (arguments
13331 '(#:phases
13332 (modify-phases %standard-phases
13333 (add-before 'check 'pre-check
13334 (lambda _
13335 (mkdir-p "/tmp/foo")
13336 (setenv "HOME" "/tmp/foo")
13337 #t)))))
13338 (home-page "https://github.com/hsoft/send2trash")
13339 (synopsis "Send files to the user's @file{~/Trash} directory")
13340 (description "This package provides a Python library to send files to the
13341user's @file{~/Trash} directory.")
13342 (license license:bsd-3)))
13343
13344(define-public python2-send2trash
13345 (package
13346 (inherit (package-with-python2 python-send2trash))
13347 (arguments
13348 (substitute-keyword-arguments (package-arguments python-send2trash)
13349 ((#:phases phases)
13350 `(modify-phases ,phases
13351 (add-before 'check 'setenv
13352 (lambda _
13353 (setenv "PYTHONPATH"
13354 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
13355 #t))))))
13356 (properties `((python2-variant . ,(delay python-send2trash))))))
13357
13358(define-public python-yapf
13359 (package
13360 (name "python-yapf")
13361 (version "0.24.0")
13362 (source
13363 (origin
13364 (method url-fetch)
13365 (uri (pypi-uri "yapf" version))
13366 (sha256
13367 (base32
13368 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
13369 (build-system python-build-system)
13370 (home-page "https://github.com/google/yapf")
13371 (synopsis "Formatter for Python code")
13372 (description "YAPF is a formatter for Python code. It's based off of
13373@dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
13374takes the code and reformats it to the best formatting that conforms to the
13375style guide, even if the original code didn't violate the style guide.")
13376 (license license:asl2.0)))
13377
13378(define-public python2-yapf
13379 (package-with-python2 python-yapf))
13380
13381(define-public python-gyp
13382 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
13383 (revision "0"))
13384 (package
13385 (name "python-gyp")
13386 ;; Google does not release versions,
13387 ;; based on second most recent commit date.
13388 (version (git-version "0.0.0" revision commit))
13389 (source
13390 (origin
13391 ;; Google does not release tarballs,
13392 ;; git checkout is needed.
13393 (method git-fetch)
13394 (uri (git-reference
13395 (url "https://chromium.googlesource.com/external/gyp")
13396 (commit commit)))
13397 (file-name (git-file-name name version))
13398 (sha256
13399 (base32
13400 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
13401 (build-system python-build-system)
13402 (home-page "https://gyp.gsrc.io/")
13403 (synopsis "GYP is a Meta-Build system")
13404 (description
13405 "GYP builds build systems for large, cross platform applications.
13406It can be used to generate XCode projects, Visual Studio projects, Ninja build
13407files, and Makefiles.")
13408 (license license:bsd-3))))
13409
13410(define-public python2-gyp
13411 (package-with-python2 python-gyp))
13412
13413(define-public python-whatever
13414 (package
13415 (name "python-whatever")
13416 (version "0.5")
13417 (source
13418 (origin
13419 (method url-fetch)
13420 (uri (string-append "https://github.com/Suor/whatever/archive/" version
13421 ".tar.gz"))
13422 (sha256
13423 (base32
13424 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
13425 (file-name (string-append name "-" version ".tar.gz"))))
13426 (build-system python-build-system)
13427 (arguments
13428 `(#:phases
13429 (modify-phases %standard-phases
13430 (replace 'check
13431 (lambda _
13432 (invoke "py.test"))))))
13433 (native-inputs
13434 `(("python-pytest" ,python-pytest)))
13435 (home-page "http://github.com/Suor/whatever")
13436 (synopsis "Make anonymous functions by partial application of operators")
13437 (description "@code{whatever} provides an easy way to make anonymous
13438functions by partial application of operators.")
13439 (license license:bsd-3)))
13440
13441(define-public python2-whatever
13442 (package-with-python2 python-whatever))
13443
13444(define-public python-funcy
13445 (package
13446 (name "python-funcy")
9e396ab8 13447 (version "1.11")
44d10b1f
RW
13448 (source
13449 (origin
a85c6027
TGR
13450 (method git-fetch)
13451 (uri (git-reference
13452 (url "https://github.com/Suor/funcy.git")
13453 (commit version)))
44d10b1f 13454 (sha256
a85c6027
TGR
13455 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
13456 (file-name (git-file-name name version))))
44d10b1f
RW
13457 (build-system python-build-system)
13458 (arguments
13459 `(#:phases
13460 (modify-phases %standard-phases
13461 (replace 'check
13462 (lambda _
13463 (invoke "py.test"))))))
13464 (native-inputs
13465 `(("python-pytest" ,python-pytest)
13466 ("python-whatever" ,python-whatever)))
13467 (home-page "http://github.com/Suor/funcy")
13468 (synopsis "Functional tools")
13469 (description "@code{funcy} is a library that provides functional tools.
13470Examples are:
13471@enumerate
13472@item merge - Merges collections of the same type
13473@item walk - Type-preserving map
13474@item select - Selects a part of a collection
13475@item take - Takes the first n items of a collection
13476@item first - Takes the first item of a collection
13477@item remove - Predicated-removes items of a collection
13478@item concat - Concatenates two collections
13479@item flatten - Flattens a collection with subcollections
13480@item distinct - Returns only distinct items
13481@item split - Predicated-splits a collection
13482@item split_at - Splits a collection at a given item
13483@item group_by - Groups items by group
13484@item pairwise - Pairs off adjacent items
13485@item partial - Partially-applies a function
13486@item curry - Curries a function
13487@item compose - Composes functions
13488@item complement - Complements a predicate
13489@item all_fn - \"all\" with predicate
13490@end enumerate")
13491 (license license:bsd-3)))
13492
13493(define-public python2-funcy
13494 (package-with-python2 python-funcy))
13495
13496(define-public python-isoweek
13497 (package
13498 (name "python-isoweek")
13499 (version "1.3.3")
13500 (source
13501 (origin
13502 (method url-fetch)
13503 (uri (pypi-uri "isoweek" version))
13504 (sha256
13505 (base32
13506 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
13507 (build-system python-build-system)
13508 (home-page "https://github.com/gisle/isoweek")
13509 (synopsis "Objects representing a week")
13510 (description "The @code{isoweek} module provide the class Week that
13511implements the week definition of ISO 8601. This standard also defines
13512a notation for identifying weeks; yyyyWww (where the W is a literal).
13513Week instances stringify to this form.")
13514 (license license:bsd-3)))
13515
13516(define-public python2-isoweek
13517 (package-with-python2 python-isoweek))
13518
13519(define-public python-tokenize-rt
13520 (package
13521 (name "python-tokenize-rt")
13522 (version "2.0.1")
13523 (source
13524 (origin
13525 (method url-fetch)
13526 (uri (pypi-uri "tokenize-rt" version))
13527 (sha256
13528 (base32
13529 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
13530 (build-system python-build-system)
13531 (home-page "https://github.com/asottile/tokenize-rt")
13532 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
13533 (description
13534 "This Python library is a wrapper around @code{tokenize} from the Python
13535standard library. It provides two additional tokens @code{ESCAPED_NL} and
13536@code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
13537and @code{tokens_to_src} to roundtrip.")
13538 (license license:expat)))
13539
13540(define-public python-future-fstrings
13541 (package
13542 (name "python-future-fstrings")
13543 (version "0.4.1")
13544 (source
13545 (origin
13546 (method url-fetch)
13547 (uri (pypi-uri "future_fstrings" version))
13548 (sha256
13549 (base32
13550 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
13551 (build-system python-build-system)
13552 (propagated-inputs
13553 `(("python-tokenize-rt" ,python-tokenize-rt)))
13554 (home-page "https://github.com/asottile/future-fstrings")
13555 (synopsis "Backport of fstrings to Python < 3.6")
13556 (description
13557 "This package provides a UTF-8 compatible encoding
13558@code{future_fstrings}, which performs source manipulation. It decodes the
13559source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
13560@code{f} strings.")
13561 (license license:expat)))
13562
13563(define-public python-typing
13564 (package
13565 (name "python-typing")
13566 (version "3.6.6")
13567 (source
13568 (origin
13569 (method url-fetch)
13570 (uri (pypi-uri "typing" version))
13571 (sha256
13572 (base32
13573 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
13574 (build-system python-build-system)
13575 (home-page "https://docs.python.org/3/library/typing.html")
13576 (synopsis "Type hints for Python")
13577 (description "This is a backport of the standard library @code{typing}
13578module to Python versions older than 3.5. Typing defines a standard notation
13579for Python function and variable type annotations. The notation can be used
13580for documenting code in a concise, standard format, and it has been designed
13581to also be used by static and runtime type checkers, static analyzers, IDEs
13582and other tools.")
13583 (license license:psfl)))
13584
13585(define-public python2-typing
13586 (package-with-python2 python-typing))
13587
f89d443b
VC
13588(define-public python-typing-extensions
13589 (package
13590 (name "python-typing-extensions")
13591 (version "3.7.2")
13592 (source
13593 (origin
13594 (method url-fetch)
13595 (uri (pypi-uri "typing_extensions" version))
13596 (sha256
13597 (base32
13598 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
13599 (build-system python-build-system)
13600 (home-page
13601 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
13602 (synopsis "Experimental type hints for Python")
13603 (description
13604 "The typing_extensions module contains additional @code{typing} hints not
13605yet present in the of the @code{typing} standard library.
13606Included are implementations of:
13607@enumerate
13608@item ClassVar
13609@item ContextManager
13610@item Counter
13611@item DefaultDict
13612@item Deque
13613@item NewType
13614@item NoReturn
13615@item overload
13616@item Protocol
13617@item runtime
13618@item Text
13619@item Type
13620@item TYPE_CHECKING
13621@item AsyncGenerator
13622@end enumerate\n")
13623 (license license:psfl)))
13624
44d10b1f
RW
13625(define-public bpython
13626 (package
13627 (name "bpython")
13628 (version "0.17.1")
13629 (source
13630 (origin
13631 (method url-fetch)
13632 (uri (pypi-uri "bpython" version))
13633 (sha256
13634 (base32
13635 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
13636 (build-system python-build-system)
13637 (arguments
13638 `(#:phases
13639 (modify-phases %standard-phases
13640 (add-after 'unpack 'remove-failing-test
13641 (lambda _
13642 ;; Remove failing test. FIXME: make it pass
13643 (delete-file "bpython/test/test_args.py")
13644 #t))
13645 (add-after 'wrap 'add-aliases
13646 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
13647 (lambda* (#:key outputs #:allow-other-keys)
13648 (let ((out (assoc-ref outputs "out")))
13649 (for-each
13650 (lambda (old new)
13651 (symlink old (string-append out "/bin/" new)))
13652 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
13653 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
13654 #t)))))
13655 (propagated-inputs
13656 `(("python-pygments" ,python-pygments)
13657 ("python-requests" ,python-requests)
13658 ("python-babel" ,python-babel) ; optional, for internationalization
13659 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
13660 ("python-greenlet" ,python-greenlet)
13661 ("python-urwid" ,python-urwid) ; for bpython-urwid only
13662 ("python-six" ,python-six)))
13663 (native-inputs
13664 `(("python-sphinx" ,python-sphinx)
13665 ("python-mock" ,python-mock)))
13666 (home-page "https://bpython-interpreter.org/")
13667 (synopsis "Fancy interface to the Python interpreter")
13668 (description "Bpython is a fancy interface to the Python
13669interpreter. bpython's main features are
13670
13671@enumerate
13672@item in-line syntax highlighting,
13673@item readline-like autocomplete with suggestions displayed as you type,
13674@item expected parameter list for any Python function,
13675@item \"rewind\" function to pop the last line of code from memory and
13676 re-evaluate,
13677@item send the code you've entered off to a pastebin,
13678@item save the code you've entered to a file, and
13679@item auto-indentation.
13680@end enumerate")
13681 (license license:expat)))
13682
13683(define-public bpython2
13684 (let ((base (package-with-python2
13685 (strip-python2-variant bpython))))
13686 (package (inherit base)
13687 (name "bpython2")
13688 (arguments
13689 `(#:python ,python-2
13690 #:phases
13691 (modify-phases %standard-phases
13692 (add-after 'unpack 'remove-failing-test
13693 (lambda _
13694 ;; Remove failing test. FIXME: make it pass
13695 (delete-file "bpython/test/test_args.py")
13696 ;; Disable failing test-cases (renaming inhibits they are
13697 ;; discovered)
13698 (substitute* "bpython/test/test_curtsies_repl.py"
13699 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
13700 (string-append a "xxx_off_" b))
13701 (("^(\\s*def )(test_complex\\W)" _ a b)
13702 (string-append a "xxx_off_" b)))
13703 #t))
13704 (add-before 'build 'rename-scripts
13705 ;; rename the scripts to bypthon2, bpdb2, etc.
13706 (lambda _
13707 (substitute* "setup.py"
13708 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
13709 (string-append name "2" rest "\n"))
13710 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
13711 (string-append name "2" (or sub "") rest "\n")))
13712 #t))))))))
13713
13714(define-public python-pyinotify
13715 (package
13716 (name "python-pyinotify")
13717 (version "0.9.6")
13718 (source (origin
13719 (method url-fetch)
13720 (uri (pypi-uri "pyinotify" version))
13721 (sha256
13722 (base32
13723 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
13724 (build-system python-build-system)
13725 (arguments `(#:tests? #f)) ;no tests
13726 (home-page "https://github.com/seb-m/pyinotify")
13727 (synopsis "Python library for monitoring inotify events")
13728 (description
13729 "@code{pyinotify} provides a Python interface for monitoring
13730file system events on Linux.")
13731 (license license:expat)))
13732
13733(define-public python2-pyinotify
13734 (package-with-python2 python-pyinotify))
13735
13736;; Ada parser uses this version.
13737(define-public python2-quex-0.67.3
13738 (package
13739 (name "python2-quex")
13740 (version "0.67.3")
13741 (source
13742 (origin
13743 (method url-fetch)
13744 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
13745 (version-major+minor version)
13746 "/quex-" version ".zip"))
13747 (sha256
13748 (base32
13749 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
13750 (build-system python-build-system)
13751 (native-inputs
13752 `(("unzip" ,unzip)))
13753 (arguments
13754 `(#:python ,python-2
13755 #:tests? #f
13756 #:phases
13757 (modify-phases %standard-phases
13758 (delete 'configure)
13759 (delete 'build)
13760 (replace 'install
13761 (lambda* (#:key outputs #:allow-other-keys)
13762 (let* ((out (assoc-ref outputs "out"))
13763 (share/quex (string-append out "/share/quex"))
13764 (bin (string-append out "/bin")))
13765 (copy-recursively "." share/quex)
13766 (mkdir-p bin)
13767 (symlink (string-append share/quex "/quex-exe.py")
13768 (string-append bin "/quex"))
13769 #t))))))
13770 (native-search-paths
13771 (list (search-path-specification
13772 (variable "QUEX_PATH")
13773 (files '("share/quex")))))
13774 (home-page "http://quex.sourceforge.net/")
13775 (synopsis "Lexical analyzer generator in Python")
13776 (description "@code{quex} is a lexical analyzer generator in Python.")
13777 (license license:lgpl2.1+))) ; Non-military
13778
13779(define-public python2-quex
13780 (package (inherit python2-quex-0.67.3)
13781 (name "python2-quex")
13782 (version "0.68.1")
13783 (source
13784 (origin
13785 (method url-fetch)
13786 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
13787 (sha256
13788 (base32
13789 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
13790 (file-name (string-append name "-" version ".tar.gz"))))))
13791
13792(define-public python-more-itertools
13793 (package
13794 (name "python-more-itertools")
47f66348 13795 (version "6.0.0")
44d10b1f
RW
13796 (source
13797 (origin
13798 (method url-fetch)
13799 (uri (pypi-uri "more-itertools" version))
13800 (sha256
13801 (base32
47f66348 13802 "1lfrx2ndnilla3a5lhpjc1wjgkplkxrhp5nyn6ys2l93jkil802r"))))
44d10b1f 13803 (build-system python-build-system)
44d10b1f
RW
13804 (home-page "https://github.com/erikrose/more-itertools")
13805 (synopsis "More routines for operating on iterables, beyond itertools")
13806 (description "Python's built-in @code{itertools} module implements a
13807number of iterator building blocks inspired by constructs from APL, Haskell,
13808and SML. @code{more-itertools} includes additional building blocks for
13809working with iterables.")
47f66348 13810 (properties `((python2-variant . ,(delay python2-more-itertools))))
44d10b1f
RW
13811 (license license:expat)))
13812
47f66348 13813;; The 5.x series are the last versions supporting Python 2.7.
44d10b1f 13814(define-public python2-more-itertools
47f66348
MB
13815 (package
13816 (inherit python-more-itertools)
13817 (name "python2-more-itertools")
13818 (version "5.0.0")
13819 (source (origin
13820 (method url-fetch)
13821 (uri (pypi-uri "more-itertools" version))
13822 (sha256
13823 (base32
13824 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
13825 (arguments
13826 `(#:python ,python2-minimal))
13827 (propagated-inputs
13828 `(("python2-six" ,python2-six-bootstrap)))))
44d10b1f
RW
13829
13830(define-public python-latexcodec
13831 (package
13832 (name "python-latexcodec")
13833 (version "1.0.5")
13834 (source
13835 (origin
13836 (method url-fetch)
13837 (uri (pypi-uri "latexcodec" version))
13838 (sha256
13839 (base32
13840 "0zdd1gf24i83ykadx0y30n3001j43scqr2saql3vckk5c39dj1wn"))))
13841 (build-system python-build-system)
13842 (inputs
13843 `(("python-six" ,python-six)))
13844 (home-page "https://readthedocs.org/projects/latexcodec/")
13845 (synopsis "Work with LaTeX code in Python")
13846 (description "Lexer and codec to work with LaTeX code in Python.")
13847 (license license:expat)))
13848
13849(define-public python-pybtex
13850 (package
13851 (name "python-pybtex")
13852 (version "0.21")
13853 (source
13854 (origin
13855 (method url-fetch)
13856 (uri (pypi-uri "pybtex" version))
13857 (sha256
13858 (base32
13859 "00300j8dn5pxq4ndxmfmbmycg2znawkqs49val2x6jlmfiy6r2mg"))))
13860 (build-system python-build-system)
13861 (native-inputs
13862 `(("python-nose" ,python-nose)))
13863 (inputs
13864 `(("python-latexcodec" ,python-latexcodec)
13865 ("python-pyyaml" ,python-pyyaml)
13866 ("python-six" ,python-six)))
13867 (arguments
13868 `(#:test-target "nosetests"))
13869 (home-page "https://pybtex.org/")
13870 (synopsis "BibTeX-compatible bibliography processor")
13871 (description "Pybtex is a BibTeX-compatible bibliography processor written
13872in Python. You can simply type pybtex instead of bibtex.")
13873 (license license:expat)))
13874
13875(define-public python-onetimepass
13876 (package
13877 (name "python-onetimepass")
13878 (version "1.0.1")
13879 (source
13880 (origin
13881 (method url-fetch)
13882 (uri (pypi-uri "onetimepass" version))
13883 (sha256
13884 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
13885 (build-system python-build-system)
13886 (propagated-inputs `(("python-six" ,python-six)))
13887 (home-page "https://github.com/tadeck/onetimepass/")
13888 (synopsis "One-time password library")
13889 (description "Python one-time password library for HMAC-based (HOTP) and
13890time-based (TOTP) passwords.")
13891 (license license:expat)))
13892
13893(define-public python-parso
13894 (package
13895 (name "python-parso")
13896 (version "0.3.1")
13897 (source
13898 (origin
13899 (method url-fetch)
13900 (uri (pypi-uri "parso" version))
13901 (sha256
13902 (base32
13903 "18p89iwcm8mnf380f92g9w0bhx5km8wxp392vvjcq4y1ld1llw1m"))))
13904 (native-inputs
13905 `(("python-pytest" ,python-pytest)))
13906 (build-system python-build-system)
13907 (home-page "https://github.com/davidhalter/parso")
13908 (synopsis "Python Parser")
13909 (description "Parso is a Python parser that supports error recovery and
13910round-trip parsing for different Python versions (in multiple Python versions).
13911Parso is also able to list multiple syntax errors in your Python file.")
13912 (license license:expat)))
13913
13914(define-public python2-parso
13915 (package-with-python2 python-parso))
13916
13917(define-public python-async-generator
13918 (package
13919 (name "python-async-generator")
94fcbf8d 13920 (version "1.10")
44d10b1f
RW
13921 (source
13922 (origin
13923 (method url-fetch)
13924 (uri (pypi-uri "async_generator" version))
13925 (sha256
13926 (base32
94fcbf8d 13927 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
44d10b1f
RW
13928 (build-system python-build-system)
13929 (native-inputs
13930 `(("python-pytest" ,python-pytest)))
13931 (home-page "https://github.com/python-trio/async_generator")
13932 (synopsis "Async generators and context managers for Python 3.5+")
13933 (description "@code{async_generator} back-ports Python 3.6's native async
13934generators and Python 3.7's context managers into Python 3.5.")
13935 ;; Dual licensed.
13936 (license (list license:expat license:asl2.0))))
13937
13938(define-public python-async-timeout
13939 (package
13940 (name "python-async-timeout")
13941 (version "3.0.1")
13942 (source
13943 (origin
13944 (method url-fetch)
13945 (uri (pypi-uri "async-timeout" version))
13946 (sha256
13947 (base32
13948 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
13949 (build-system python-build-system)
13950 (home-page "https://github.com/aio-libs/async_timeout/")
13951 (synopsis "Timeout context manager for asyncio programs")
13952 (description "@code{async-timeout} provides a timeout timeout context
13953manager compatible with @code{asyncio}.")
13954 (license license:asl2.0)))
13955
13956(define-public python-glob2
13957 (package
13958 (name "python-glob2")
13959 (version "0.6")
13960 (source (origin
13961 (method url-fetch)
13962 (uri (string-append
13963 "https://github.com/miracle2k/python-glob2/archive/"
13964 version
13965 ".tar.gz"))
13966 (sha256
13967 (base32
13968 "0ja168f0dz4kbz4m06dm0rd3acaypk6hjx2km541pw22y9s40mag"))
13969 (file-name (string-append name "-" version ".tar.gz"))))
13970 (build-system python-build-system)
13971 (home-page "https://github.com/miracle2k/python-glob2/")
13972 (synopsis "Extended Version of the python buildin glob module")
13973 (description "This is an extended version of the Python
13974@url{http://docs.python.org/library/glob.html, built-in glob module} which
13975adds:
13976
13977@itemize
13978@item The ability to capture the text matched by glob patterns, and return
13979those matches alongside the file names.
13980@item A recursive @code{**} globbing syntax, akin for example to the
13981@code{globstar} option of Bash.
13982@item The ability to replace the file system functions used, in order to glob
13983on virtual file systems.
13984@item Compatible with Python 2 and Python 3 (tested with 3.3).
13985@end itemize
13986
13987Glob2 currently based on the glob code from Python 3.3.1.")
13988 (license license:bsd-2)))
13989
13990(define-public python2-glob2
13991 (package-with-python2 python-glob2))
13992
13993(define-public python-gipc
13994 (package
13995 (name "python-gipc")
13996 (version "0.6.0")
13997 (source
13998 (origin
13999 (method url-fetch)
14000 (uri (pypi-uri "gipc" version ".zip"))
14001 (sha256
14002 (base32
14003 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
14004 (build-system python-build-system)
14005 (native-inputs
14006 `(("unzip" ,unzip)))
14007 (propagated-inputs
14008 `(("python-gevent" ,python-gevent)))
14009 (home-page "http://gehrcke.de/gipc")
14010 (synopsis "Child process management in the context of gevent")
14011 (description "Usage of Python's multiprocessing package in a
14012gevent-powered application may raise problems. With @code{gipc},
14013process-based child processes can safely be created anywhere within a
14014gevent-powered application.")
14015 (license license:expat)))
14016
14017(define-public python2-gipc
14018 (package-with-python2 python-gipc))
14019
14020(define-public python-fusepy
14021 (package
14022 (name "python-fusepy")
14023 (version "2.0.4")
14024 (source
14025 (origin
14026 (method url-fetch)
14027 (uri (pypi-uri "fusepy" version))
14028 (sha256
14029 (base32
14030 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
14031 (build-system python-build-system)
14032 (arguments
14033 `(#:phases
14034 (modify-phases %standard-phases
14035 (add-before 'build 'set-library-file-name
14036 (lambda* (#:key inputs #:allow-other-keys)
14037 (let ((fuse (assoc-ref inputs "fuse")))
14038 (substitute* "fuse.py"
14039 (("find_library\\('fuse'\\)")
14040 (string-append "'" fuse "/lib/libfuse.so'")))
14041 #t))))))
14042 (propagated-inputs
14043 `(("fuse" ,fuse)))
14044 (home-page "https://github.com/fusepy/fusepy")
14045 (synopsis "Simple ctypes bindings for FUSE")
14046 (description "Python module that provides a simple interface to FUSE and
14047MacFUSE. The binding is created using the standard @code{ctypes} library.")
14048 (license license:isc)))
14049
14050(define-public python2-fusepy
14051 (package-with-python2 python-fusepy))
14052
14053(define-public python2-gdrivefs
14054 (package
14055 (name "python2-gdrivefs")
14056 (version "0.14.9")
14057 (source
14058 (origin
14059 (method url-fetch)
14060 (uri (pypi-uri "gdrivefs" version))
14061 (sha256
14062 (base32
14063 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
14064 (build-system python-build-system)
14065 (arguments
14066 `(#:python ,python-2
14067 #:phases
14068 (modify-phases %standard-phases
14069 (add-before 'build 'patch-setup-py
14070 (lambda _
14071 ;; Update requirements from dependency==version
14072 ;; to dependency>=version
14073 (substitute* "gdrivefs/resources/requirements.txt"
14074 (("==") ">="))
14075 #t)))))
14076 (native-inputs
14077 `(("python2-gipc" ,python2-gipc)
14078 ("python2-gevent" ,python2-gevent)
14079 ("python2-greenlet" ,python2-greenlet)
14080 ("python2-httplib2" ,python2-httplib2)
14081 ("python2-uritemplate" ,python2-uritemplate)
14082 ("python2-oauth2client" ,python2-oauth2client)
14083 ("python2-six" ,python2-six)))
14084 (propagated-inputs
14085 `(("python2-dateutil" ,python2-dateutil)
14086 ("python2-fusepy" ,python2-fusepy)
14087 ("python2-google-api-client" ,python2-google-api-client)))
14088 (home-page "https://github.com/dsoprea/GDriveFS")
14089 (synopsis "Mount Google Drive as a local file system")
14090 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
14091under Python 2.7.")
14092 (license license:gpl2)))
14093
14094(define-public pybind11
14095 (package
14096 (name "pybind11")
14097 (version "2.2.4")
14098 (source (origin
14099 (method git-fetch)
14100 (uri (git-reference
14101 (url "https://github.com/pybind/pybind11.git")
14102 (commit (string-append "v" version))))
14103 (sha256
14104 (base32
14105 "0pa79ymcasv8br5ifbx7878id5py2jpjac3i20cqxr6gs9l6ivlv"))
14106 (file-name (git-file-name name version))))
14107 (build-system cmake-build-system)
14108 (native-inputs
14109 `(("python" ,python)
14110 ("python-pytest" ,python-pytest)))
14111 (arguments
14112 `(#:test-target "check"))
14113 (home-page "https://github.com/pybind/pybind11/")
14114 (synopsis "Seamless operability between C++11 and Python")
14115 (description "pybind11 is a lightweight header-only library that exposes
14116C++ types in Python and vice versa, mainly to create Python bindings of
14117existing C++ code. Its goals and syntax are similar to the excellent
14118Boost.Python library by David Abrahams: to minimize boilerplate code in
14119traditional extension modules by inferring type information using compile-time
14120introspection.")
14121 (license license:expat)))
14122
14123(define-public python-fasteners
14124 (package
14125 (name "python-fasteners")
14126 (version "0.14.1")
14127 (source
14128 (origin
14129 (method url-fetch)
14130 (uri (pypi-uri "fasteners" version))
14131 (sha256
14132 (base32
14133 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
14134 (build-system python-build-system)
14135 (propagated-inputs
14136 `(("python-monotonic" ,python-monotonic)
14137 ("python-six" ,python-six)
14138 ("python-testtools" ,python-testtools)))
14139 (home-page "https://github.com/harlowja/fasteners")
14140 (synopsis "Python package that provides useful locks")
14141 (description
14142 "This package provides a Python program that provides following locks:
14143
14144@itemize
14145@item Locking decorator
14146@item Reader-writer locks
14147@item Inter-process locks
14148@item Generic helpers
14149@end itemize\n")
14150 (properties `((python2-variant . ,(delay python2-fasteners))))
14151 (license license:asl2.0)))
14152
14153(define-public python2-fasteners
14154 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
14155 (package
14156 (inherit base)
14157 (propagated-inputs
14158 `(("python2-futures" ,python2-futures)
14159 ,@(package-propagated-inputs base))))))
14160
14161(define-public python-requests-file
14162 (package
14163 (name "python-requests-file")
14164 (version "1.4.3")
14165 (source
14166 (origin
14167 (method url-fetch)
14168 (uri (pypi-uri "requests-file" version))
14169 (sha256
14170 (base32
14171 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
14172 (build-system python-build-system)
14173 (propagated-inputs
14174 `(("python-requests" ,python-requests)
14175 ("python-six" ,python-six)))
14176 (home-page
14177 "https://github.com/dashea/requests-file")
14178 (synopsis "File transport adapter for Requests")
14179 (description
14180 "Requests-File is a transport adapter for use with the Requests Python
14181library to allow local filesystem access via file:// URLs.")
14182 (license license:asl2.0)))
14183
14184(define-public python2-requests-file
14185 (package-with-python2 python-requests-file))
14186
14187(define-public python-tldextract
14188 (package
14189 (name "python-tldextract")
14190 (version "2.2.0")
14191 (source
14192 (origin
14193 (method url-fetch)
14194 (uri (pypi-uri "tldextract" version))
14195 (sha256
14196 (base32
14197 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
14198 (build-system python-build-system)
14199 (native-inputs
14200 `(("python-pytest" ,python-pytest)
14201 ("python-responses" ,python-responses)))
14202 (propagated-inputs
14203 `(("python-idna" ,python-idna)
14204 ("python-requests" ,python-requests)
14205 ("python-requests-file" ,python-requests-file)))
14206 (home-page
14207 "https://github.com/john-kurkowski/tldextract")
14208 (synopsis
14209 "Separate the TLD from the registered domain and subdomains of a URL")
14210 (description
14211 "TLDExtract accurately separates the TLD from the registered domain and
14212subdomains of a URL, using the Public Suffix List. By default, this includes
14213the public ICANN TLDs and their exceptions. It can optionally support the
14214Public Suffix List's private domains as well.")
14215 (license license:bsd-3)))
14216
14217(define-public python2-tldextract
14218 (package-with-python2 python-tldextract))
14219
14220(define-public python-pynamecheap
14221 (package
14222 (name "python-pynamecheap")
14223 (version "0.0.3")
14224 (source
14225 (origin
14226 (method url-fetch)
14227 (uri (pypi-uri "PyNamecheap" version))
14228 (sha256
14229 (base32
14230 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
14231 (build-system python-build-system)
14232 (propagated-inputs
14233 `(("python-requests" ,python-requests)))
14234 (home-page
14235 "https://github.com/Bemmu/PyNamecheap")
14236 (synopsis
14237 "Namecheap API client in Python")
14238 (description
14239 "PyNamecheap is a Namecheap API client in Python.")
14240 (license license:expat)))
14241
14242(define-public python2-pynamecheap
14243 (package-with-python2 python-pynamecheap))
14244
14245(define-public python-dns-lexicon
14246 (package
14247 (name "python-dns-lexicon")
14248 (version "2.4.0")
14249 (source
14250 (origin
14251 (method url-fetch)
14252 (uri (pypi-uri "dns-lexicon" version))
14253 (sha256
14254 (base32
14255 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
14256 (build-system python-build-system)
14257 (arguments
14258 `(#:tests? #f)) ;requires internet access
14259 (propagated-inputs
14260 `(("python-future" ,python-future)
14261 ("python-pynamecheap" ,python-pynamecheap)
14262 ("python-requests" ,python-requests)
14263 ("python-tldextract" ,python-tldextract)
14264 ("python-urllib3" ,python-urllib3)))
14265 (home-page "https://github.com/AnalogJ/lexicon")
14266 (synopsis
14267 "Manipulate DNS records on various DNS providers")
14268 (description
14269 "Lexicon provides a way to manipulate DNS records on multiple DNS
14270providers in a standardized way. It has a CLI but it can also be used as a
14271Python library. It was designed to be used in automation, specifically with
14272Let's Encrypt.")
14273 (license license:expat)))
14274
14275(define-public python2-dns-lexicon
14276 (package-with-python2 python-dns-lexicon))
14277
14278(define-public python-commandlines
14279 (package
14280 (name "python-commandlines")
14281 (version "0.4.1")
14282 (source
14283 (origin
14284 (method url-fetch)
14285 (uri (pypi-uri "commandlines" version))
14286 (sha256
14287 (base32
14288 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
14289 (build-system python-build-system)
14290 (home-page "https://github.com/chrissimpkins/commandlines")
14291 (synopsis "Command line argument to object parsing library")
14292 (description
14293 "@code{Commandlines} is a Python library for command line application
14294development that supports command line argument parsing, command string
14295validation testing and application logic.")
14296 (license license:expat)))
14297
14298;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
14299;; python-numba. They have a very unflexible relationship.
14300(define-public python-numba
14301 (package
14302 (name "python-numba")
14303 (version "0.39.0")
14304 (source
14305 (origin
14306 (method url-fetch)
14307 (uri (pypi-uri "numba" version))
14308 (sha256
14309 (base32
14310 "1bibvkwga1v8293i9ivl469d8bzgabn3vgr2ig7c1i68v8frsx07"))))
14311 (build-system python-build-system)
14312 (arguments
14313 `(#:modules ((guix build utils)
14314 (guix build python-build-system)
14315 (ice-9 ftw)
14316 (srfi srfi-1)
14317 (srfi srfi-26))
14318 #:phases
14319 (modify-phases %standard-phases
14320 (add-after 'unpack 'disable-proprietary-features
14321 (lambda _
14322 (setenv "NUMBA_DISABLE_HSA" "1")
14323 (setenv "NUMBA_DISABLE_CUDA" "1")
14324 #t))
14325 (add-after 'unpack 'remove-failing-tests
14326 (lambda _
14327 ;; FIXME: these tests fail for unknown reasons:
14328 ;; test_non_writable_pycache, test_non_creatable_pycache, and
14329 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
14330 (substitute* "numba/tests/test_dispatcher.py"
14331 (("def test(_non_writable_pycache)" _ m)
14332 (string-append "def guix_skip" m))
14333 (("def test(_non_creatable_pycache)" _ m)
14334 (string-append "def guix_skip" m))
14335 (("def test(_frozen)" _ m)
14336 (string-append "def guix_skip" m)))
14337
14338 ;; These tests fail because we don't run the tests from the build
14339 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
14340 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
14341 (substitute* "numba/tests/test_pycc.py"
14342 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
14343 (string-append "def guix_skip" m)))
14344 #t))
14345 (replace 'check
14346 (lambda _
14347 (let ((cwd (getcwd)))
14348 (setenv "PYTHONPATH"
14349 (string-append cwd "/build/"
14350 (find (cut string-prefix? "lib" <>)
14351 (scandir (string-append cwd "/build")))
14352 ":"
14353 (getenv "PYTHONPATH")))
14354 ;; Something is wrong with the PYTHONPATH when running the
14355 ;; tests from the build directory, as it complains about not being
14356 ;; able to import certain modules.
14357 (with-directory-excursion "/tmp"
14358 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
14359 #t)))))
14360 (propagated-inputs
14361 `(("python-llvmlite" ,python-llvmlite)
14362 ("python-numpy" ,python-numpy)
14363 ("python-singledispatch" ,python-singledispatch)))
14364 ;; Needed for tests.
14365 (inputs
14366 `(("python-jinja2" ,python-jinja2)
14367 ("python-pygments" ,python-pygments)))
14368 (home-page "https://numba.pydata.org")
14369 (synopsis "Compile Python code using LLVM")
14370 (description "Numba gives you the power to speed up your applications with
14371high performance functions written directly in Python. With a few
14372annotations, array-oriented and math-heavy Python code can be just-in-time
14373compiled to native machine instructions, similar in performance to C, C++ and
14374Fortran, without having to switch languages or Python interpreters.
14375
14376Numba works by generating optimized machine code using the LLVM compiler
14377infrastructure at import time, runtime, or statically (using the included pycc
14378tool).")
14379 (license license:bsd-3)))
14380
14381(define-public python-anndata
14382 (package
14383 (name "python-anndata")
14384 (version "0.6.9")
14385 (source
14386 (origin
14387 (method url-fetch)
14388 (uri (pypi-uri "anndata" version))
14389 (sha256
14390 (base32
14391 "1fh461xyyc7pcrjfgd013bdc2alf53r46ss3gfw3431mbb1gappi"))))
14392 (build-system python-build-system)
14393 (propagated-inputs
14394 `(("python-h5py" ,python-h5py)
14395 ("python-natsort" ,python-natsort)
14396 ("python-pandas" ,python-pandas)
14397 ("python-scipy" ,python-scipy)))
14398 (home-page "https://github.com/theislab/anndata")
14399 (synopsis "Annotated data for data analysis pipelines")
14400 (description "Anndata is a package for simple (functional) high-level APIs
14401for data analysis pipelines. In this context, it provides an efficient,
14402scalable way of keeping track of data together with learned annotations and
14403reduces the code overhead typically encountered when using a mostly
14404object-oriented library such as @code{scikit-learn}.")
14405 (license license:bsd-3)))
14406
14407(define-public python-dill
14408 (package
14409 (name "python-dill")
14410 (version "0.2.8.2")
14411 (source
14412 (origin
14413 (method url-fetch)
14414 (uri (pypi-uri "dill" version))
14415 (sha256
14416 (base32
14417 "1cymzn9fxwdy33h21zkk4gqgzvd25110hh3zdqnvnwa3p52c4kb2"))))
14418 (build-system python-build-system)
14419 ;; FIXME: The check phase fails with "don't know how to make test".
14420 (arguments '(#:tests? #f))
14421 (home-page "https://pypi.org/project/dill")
14422 (synopsis "Serialize all of Python")
14423 (description "Dill extends Python's @code{pickle} module for serializing
14424and de-serializing Python objects to the majority of the built-in Python
14425types. Dill provides the user the same interface as the @code{pickle} module,
14426and also includes some additional features. In addition to pickling Python
14427objects, @code{dill} provides the ability to save the state of an interpreter
14428session in a single command. Hence, it would be feasable to save a
14429interpreter session, close the interpreter, ship the pickled file to another
14430computer, open a new interpreter, unpickle the session and thus continue from
14431the saved state of the original interpreter session.")
14432 (license license:bsd-3)))
14433
14434(define-public python-multiprocess
14435 (package
14436 (name "python-multiprocess")
14437 (version "0.70.6.1")
14438 (source
14439 (origin
14440 (method url-fetch)
14441 (uri (pypi-uri "multiprocess" version))
14442 (sha256
14443 (base32
14444 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
14445 (build-system python-build-system)
14446 (propagated-inputs
14447 `(("python-dill" ,python-dill)))
14448 (home-page "https://pypi.org/project/multiprocess")
14449 (synopsis "Multiprocessing and multithreading in Python")
14450 (description
14451 "This package is a fork of the multiprocessing Python package, a package
14452which supports the spawning of processes using the API of the standard
14453library's @code{threading} module.")
14454 (license license:bsd-3)))
14455
14456(define-public python-toolz
14457 (package
14458 (name "python-toolz")
14459 (version "0.9.0")
14460 (source
14461 (origin
14462 (method url-fetch)
14463 (uri (pypi-uri "toolz" version))
14464 (sha256
14465 (base32
14466 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
14467 (build-system python-build-system)
14468 ;; FIXME: tests cannot be computed: "Can't perform this operation for
14469 ;; unregistered loader type"
14470 (arguments '(#:tests? #f))
14471 (home-page "https://github.com/pytoolz/toolz/")
14472 (synopsis "List processing tools and functional utilities")
14473 (description
14474 "This package provides a set of utility functions for iterators,
14475functions, and dictionaries.")
14476 (license license:bsd-3)))
14477
14478(define-public python2-toolz
14479 (package-with-python2 python-toolz))
14480
14481(define-public python-cytoolz
14482 (package
14483 (name "python-cytoolz")
14484 (version "0.9.0.1")
14485 (source
14486 (origin
14487 (method url-fetch)
14488 (uri (pypi-uri "cytoolz" version))
14489 (sha256
14490 (base32
14491 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
14492 (build-system python-build-system)
14493 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
14494 ;; 'exceptions'"
14495 (arguments '(#:tests? #f))
14496 (propagated-inputs
14497 `(("python-toolz" ,python-toolz)))
14498 (native-inputs
14499 `(("python-cython" ,python-cython)))
14500 (home-page "https://github.com/pytoolz/cytoolz")
14501 (synopsis "High performance functional utilities")
14502 (description
14503 "The cytoolz package implements the same API as provided by toolz. The
14504main differences are that @code{cytoolz} is faster and cytoolz offers a C API
14505that is accessible to other projects developed in Cython.")
14506 (license license:bsd-3)))
14507
14508(define-public python-sortedcontainers
14509 (package
14510 (name "python-sortedcontainers")
14511 (version "2.0.4")
14512 (source
14513 (origin
14514 (method url-fetch)
14515 (uri (pypi-uri "sortedcontainers" version))
14516 (sha256
14517 (base32
14518 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
14519 (build-system python-build-system)
14520 (native-inputs
14521 `(("python-tox" ,python-tox)))
14522 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
14523 (synopsis "Sorted List, Sorted Dict, Sorted Set")
14524 (description
14525 "This package provides a sorted collections library, written in
14526pure-Python.")
14527 (license license:asl2.0)))
14528
14529(define-public python-cloudpickle
14530 (package
14531 (name "python-cloudpickle")
14532 (version "0.6.1")
14533 (source
14534 (origin
14535 (method url-fetch)
14536 (uri (pypi-uri "cloudpickle" version))
14537 (sha256
14538 (base32
14539 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
14540 (build-system python-build-system)
14541 ;; FIXME: there are 5 errors in 122 tests:
14542 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
14543 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
14544 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
14545 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
14546 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
14547 ;; TypeError: cannot serialize '_io.BufferedRandom' object
14548 (arguments '(#:tests? #f))
14549 (native-inputs
14550 `(("python-pytest" ,python-pytest)
14551 ("python-mock" ,python-mock)
14552 ("python-tornado" ,python-tornado)))
14553 (home-page "https://github.com/cloudpipe/cloudpickle")
14554 (synopsis "Extended pickling support for Python objects")
14555 (description
14556 "Cloudpickle makes it possible to serialize Python constructs not
14557supported by the default pickle module from the Python standard library. It
14558is especially useful for cluster computing where Python expressions are
14559shipped over the network to execute on remote hosts, possibly close to the
14560data.")
14561 (license license:bsd-3)))
14562
14563(define-public python2-cloudpickle
14564 (package-with-python2 python-cloudpickle))
14565
14566(define-public python-locket
14567 (package
14568 (name "python-locket")
14569 (version "0.2.0")
14570 (source
14571 (origin
14572 (method url-fetch)
14573 (uri (pypi-uri "locket" version))
14574 (sha256
14575 (base32
14576 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
14577 (build-system python-build-system)
14578 (home-page "https://github.com/mwilliamson/locket.py")
14579 (synopsis "File-based locks for Python")
14580 (description
14581 "Locket implements a lock that can be used by multiple processes provided
14582they use the same path.")
14583 (license license:bsd-2)))
14584
14585(define-public python2-locket
14586 (package-with-python2 python-locket))
14587
14588(define-public python-blosc
14589 (package
14590 (name "python-blosc")
14591 (version "1.5.1")
14592 (source
14593 (origin
14594 (method url-fetch)
14595 (uri (pypi-uri "blosc" version))
14596 (sha256
14597 (base32
14598 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
14599 (build-system python-build-system)
14600 ;; FIXME: all tests pass, but then this error is printed:
14601 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
14602 (arguments '(#:tests? #f))
14603 (propagated-inputs
14604 `(("python-numpy" ,python-numpy)))
14605 (home-page "https://github.com/blosc/python-blosc")
14606 (synopsis "Python wrapper for the Blosc data compressor library")
14607 (description "Blosc is a high performance compressor optimized for binary
14608data. It has been designed to transmit data to the processor cache faster
14609than the traditional, non-compressed, direct memory fetch approach via a
14610@code{memcpy()} system call.
14611
14612Blosc works well for compressing numerical arrays that contains data with
14613relatively low entropy, like sparse data, time series, grids with
14614regular-spaced values, etc.
14615
14616This Python package wraps the Blosc library.")
14617 (license license:bsd-3)))
14618
14619(define-public python2-blosc
14620 (package-with-python2 python-blosc))
14621
14622(define-public python-partd
14623 (package
14624 (name "python-partd")
14625 (version "0.3.9")
14626 (source
14627 (origin
14628 (method url-fetch)
14629 (uri (pypi-uri "partd" version))
14630 (sha256
14631 (base32
14632 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
14633 (build-system python-build-system)
14634 (propagated-inputs
14635 `(("python-blosc" ,python-blosc)
14636 ("python-locket" ,python-locket)
14637 ("python-numpy" ,python-numpy)
14638 ("python-pandas" ,python-pandas)
14639 ("python-pyzmq" ,python-pyzmq)
14640 ("python-toolz" ,python-toolz)))
14641 (home-page "https://github.com/dask/partd/")
14642 (synopsis "Appendable key-value storage")
14643 (description "Partd stores key-value pairs. Values are raw bytes. We
14644append on old values. Partd excels at shuffling operations.")
14645 (license license:bsd-3)))
14646
14647(define-public python2-partd
14648 (package-with-python2 python-partd))
14649
14650(define-public python-dask
14651 (package
14652 (name "python-dask")
14653 (version "1.0.0")
14654 (source
14655 (origin
14656 (method url-fetch)
14657 (uri (pypi-uri "dask" version))
14658 (sha256
14659 (base32
14660 "1xwz8h020ipwav2p5gcq9pskya1cvzd6hjyvd06dvr3w5lxlmym1"))))
14661 (build-system python-build-system)
14662 ;; A single test out of 5000+ fails. This test is marked as xfail when
14663 ;; pytest-xdist is used.
14664 (arguments
14665 `(#:phases
14666 (modify-phases %standard-phases
14667 (add-after 'unpack 'disable-broken-test
14668 (lambda _
14669 (substitute* "dask/tests/test_threaded.py"
14670 (("def test_interrupt\\(\\)" m)
14671 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
14672 m)))
14673 (when (which "python2")
14674 ;; This test fails with recent Pandas:
14675 ;; <https://github.com/dask/dask/issues/3794>.
14676 (substitute* "dask/dataframe/tests/test_dataframe.py"
14677 (("def test_info\\(\\)" m)
14678 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
14679 m))))
14680 #t))
14681 (replace 'check
14682 (lambda _ (invoke "pytest" "-vv"))))))
14683 (propagated-inputs
14684 `(("python-cloudpickle" ,python-cloudpickle)
14685 ("python-numpy" ,python-numpy)
14686 ("python-pandas" ,python-pandas)
14687 ("python-partd" ,python-partd)
14688 ("python-toolz" ,python-toolz)
14689 ("python-pyyaml" ,python-pyyaml)))
14690 (native-inputs
14691 `(("python-pytest" ,python-pytest)
14692 ("python-pytest-runner" ,python-pytest-runner)))
14693 (home-page "https://github.com/dask/dask/")
14694 (synopsis "Parallel computing with task scheduling")
14695 (description
14696 "Dask is a flexible parallel computing library for analytics. It
14697consists of two components: dynamic task scheduling optimized for computation,
14698and large data collections like parallel arrays, dataframes, and lists that
14699extend common interfaces like NumPy, Pandas, or Python iterators to
14700larger-than-memory or distributed environments. These parallel collections
14701run on top of the dynamic task schedulers. ")
14702 (license license:bsd-3)))
14703
14704(define-public python2-dask
14705 (package-with-python2 python-dask))
14706
14707(define-public python-ilinkedlist
14708 (package
14709 (name "python-ilinkedlist")
14710 (version "0.4.0")
14711 (source
14712 (origin
14713 (method url-fetch)
14714 (uri (pypi-uri "ilinkedlist" version))
14715 (sha256
14716 (base32
14717 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
14718 (build-system python-build-system)
14719 (native-inputs `(("python-pytest" ,python-pytest)))
14720 (inputs `(("python" ,python)))
14721 (home-page "https://github.com/luther9/ilinkedlist-py")
14722 (synopsis "Immutable linked list library")
14723 (description
14724 "This is a implementation of immutable linked lists for Python. It
14725contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
14726Since a linked list is treated as immutable, it is hashable, and its length
14727can be retrieved in constant time. Some of the terminology is inspired by
14728LISP. It is possible to create an improper list by creating a @code{Pair}
14729with a non-list @code{cdr}.")
14730 (license license:gpl3+)))
14731
14732(define-public python-readlike
14733 (package
14734 (name "python-readlike")
14735 (version "0.1.3")
14736 (source
14737 (origin
14738 (method url-fetch)
14739 (uri (pypi-uri "readlike" version))
14740 (sha256
14741 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
14742 (build-system python-build-system)
14743 (home-page "https://github.com/jangler/readlike")
14744 (synopsis "GNU Readline-like line editing module")
14745 (description
14746 "This Python module provides line editing functions similar to the default
14747Emacs-style ones of GNU Readline. Unlike the Python standard library's
14748@code{readline} package, this one allows access to those capabilties in settings
14749outside of a standard command-line interface. It is especially well-suited to
14750interfacing with Urwid, due to a shared syntax for describing key inputs.
14751
14752Currently, all stateless Readline commands are implemented. Yanking and history
14753are not supported.")
14754 (license license:expat)))
14755
14756(define-public python2-readlike
14757 (package-with-python2 python-readlike))
14758
14759(define-public python-reparser
14760 (package
14761 (name "python-reparser")
14762 (version "1.4.3")
14763 (source
14764 (origin
14765 (method url-fetch)
14766 (uri (pypi-uri "ReParser" version))
14767 (sha256
14768 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
14769 (build-system python-build-system)
14770 (home-page "https://github.com/xmikos/reparser")
14771 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
14772 (description
14773 "This Python library provides a simple lexer/parser for inline markup based
14774on regular expressions.")
14775 (license license:expat)))
14776
14777(define-public python2-reparser
14778 (let ((reparser (package-with-python2
14779 (strip-python2-variant python-reparser))))
14780 (package (inherit reparser)
14781 (propagated-inputs
14782 `(("python2-enum34" ,python2-enum34)
14783 ,@(package-propagated-inputs reparser))))))
14784
14785(define-public python-precis-i18n
14786 (package
14787 (name "python-precis-i18n")
14788 (version "1.0.0")
14789 (source
14790 (origin
14791 (method url-fetch)
14792 (uri (pypi-uri "precis_i18n" version))
14793 (sha256
14794 (base32
14795 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
14796 (build-system python-build-system)
14797 (home-page "https://github.com/byllyfish/precis_i18n")
14798 (synopsis "Implementation of the PRECIS framework")
14799 (description
14800 "This module implements the PRECIS Framework as described in RFC 8264,
14801RFC 8265 and RFC 8266.")
14802 (license license:expat)))
14803
d0446c4b
RW
14804(define-public python-absl-py
14805 (package
14806 (name "python-absl-py")
14807 (version "0.6.1")
14808 (source
14809 (origin
14810 (method url-fetch)
14811 (uri (pypi-uri "absl-py" version))
14812 (sha256
14813 (base32
14814 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
14815 (build-system python-build-system)
14816 (propagated-inputs
14817 `(("python-six" ,python-six)))
14818 (home-page "https://github.com/abseil/abseil-py")
14819 (synopsis "Abseil Python common libraries")
14820 (description
14821 "This package provides the Abseil Python Common Libraries, a collection
14822of Python libraries for building Python applications.")
14823 (license license:asl2.0)))
14824
81bed4e9
RW
14825(define-public python-astor
14826 (package
14827 (name "python-astor")
14828 (version "0.7.1")
14829 (source
14830 (origin
14831 (method url-fetch)
14832 (uri (pypi-uri "astor" version))
14833 (sha256
14834 (base32
14835 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
14836 (build-system python-build-system)
14837 ;; FIXME: There are two errors and two test failures.
14838 (arguments `(#:tests? #f))
14839 (home-page "https://github.com/berkerpeksag/astor")
39ee82ff 14840 (synopsis "Read and write Python ASTs")
81bed4e9 14841 (description "Astor is designed to allow easy manipulation of Python
39ee82ff 14842source via the Abstract Syntax Tree.")
81bed4e9
RW
14843 (license license:bsd-3)))
14844
39ee82ff
RW
14845(define-public python2-astor
14846 (package-with-python2 python-astor))
14847
22e623ae
RW
14848(define-public python-grpcio
14849 (package
14850 (name "python-grpcio")
14851 (version "1.17.1")
14852 (source
14853 (origin
14854 (method url-fetch)
14855 (uri (pypi-uri "grpcio" version))
14856 (sha256
14857 (base32
14858 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
14859 (build-system python-build-system)
14860 (propagated-inputs
14861 `(("python-six" ,python-six)))
14862 (home-page "https://grpc.io")
14863 (synopsis "HTTP/2-based RPC framework")
14864 (description "This package provides a Python library for communicating
14865with the HTTP/2-based RPC framework gRPC.")
14866 (license license:asl2.0)))
14867
79869f80
RW
14868(define-public python-astunparse
14869 (package
14870 (name "python-astunparse")
14871 (version "1.6.1")
14872 (source
14873 (origin
14874 (method url-fetch)
14875 (uri (pypi-uri "astunparse" version))
14876 (sha256
14877 (base32
14878 "1jhidwyrqn17avqh9xnnm3wd7q7aahaq009cba67g86y6gxicyyj"))))
14879 (build-system python-build-system)
14880 (arguments '(#:tests? #f)) ; there are none
14881 (propagated-inputs
14882 `(("python-six" ,python-six)
14883 ("python-wheel" ,python-wheel)))
14884 (home-page "https://github.com/simonpercivall/astunparse")
14885 (synopsis "AST unparser for Python")
14886 (description "This package provides an AST unparser for Python. It is a
14887factored out version of @code{unparse} found in the Python source
14888distribution.")
14889 (license license:bsd-3)))
14890
2884aac0
RW
14891(define-public python-gast
14892 (package
14893 (name "python-gast")
14894 (version "0.2.0")
14895 (source
14896 (origin
14897 (method url-fetch)
14898 (uri (pypi-uri "gast" version))
14899 (sha256
14900 (base32
14901 "0c296xm1vz9x4w4inmdl0k8mnc0i9arw94si2i7pglpc461r0s3h"))))
14902 (build-system python-build-system)
14903 (propagated-inputs
14904 `(("python-astunparse" ,python-astunparse)))
14905 (home-page "https://pypi.org/project/gast/")
14906 (synopsis "Generic Python AST that abstracts the underlying Python version")
14907 (description
14908 "GAST provides a compatibility layer between the AST of various Python
14909versions, as produced by @code{ast.parse} from the standard @code{ast}
14910module.")
14911 (license license:bsd-3)))
14912
44d10b1f
RW
14913(define-public python-wikidata
14914 (package
14915 (name "python-wikidata")
14916 (version "0.6.1")
14917 (source
14918 (origin
14919 (method url-fetch)
14920 (uri (pypi-uri "Wikidata" version))
14921 (sha256
14922 (base32
14923 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
14924 (build-system python-build-system)
14925 (propagated-inputs
14926 `(("python-babel" ,python-babel)))
14927 (home-page "https://github.com/dahlia/wikidata")
14928 (synopsis "Wikidata client library")
14929 (description
14930 "This package provides a Python interface to
14931@url{https://www.wikidata.org/, Wikidata}.")
14932 (properties '((upstream-name . "Wikidata")))
14933 (license license:gpl3+)))
14934
14935(define-public python-doctest-ignore-unicode
14936 (package
14937 (name "python-doctest-ignore-unicode")
14938 (version "0.1.2")
14939 (source
14940 (origin
14941 (method url-fetch)
14942 (uri (pypi-uri "doctest-ignore-unicode" version))
14943 (sha256
14944 (base32
14945 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
14946 (build-system python-build-system)
14947 (native-inputs
14948 `(("python-nose" ,python-nose)))
14949 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
14950 (synopsis "Ignore Unicode literal prefixes in doctests")
14951 (description
14952 "This package adds support for a flag to ignore Unicode literal prefixes
14953in doctests.")
14954 (license license:asl2.0)))
14955
14956(define-public python-attr
14957 (package
14958 (name "python-attr")
14959 (version "0.3.1")
14960 (source
14961 (origin
14962 (method url-fetch)
14963 (uri (pypi-uri "attr" version))
14964 (sha256
14965 (base32
14966 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
14967 (build-system python-build-system)
14968 (home-page "https://github.com/denis-ryzhkov/attr")
14969 (synopsis "Decorator for attributes of target function or class")
14970 (description "Simple decorator to set attributes of target function or
14971class in a @acronym{DRY, Don't Repeat Yourself} way.")
14972 (license license:expat)))
f98232a3
VC
14973
14974(define-public python-construct
14975 (package
14976 (name "python-construct")
14977 (version "2.9.45")
14978 (source
14979 (origin
14980 (method url-fetch)
14981 (uri (pypi-uri "construct" version))
14982 (sha256
14983 (base32
14984 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
14985 (build-system python-build-system)
14986 (arguments
14987 `(#:tests? #f)) ; No tests exist.
14988 (propagated-inputs
14989 `(("python-extras" ,python-extras)
14990 ("python-arrow" ,python-arrow)
14991 ("python-numpy" ,python-numpy)
14992 ("python-ruamel.yaml" ,python-ruamel.yaml)))
14993 (home-page "http://construct.readthedocs.io")
14994 (synopsis "Declarative and symmetrical parser and builder for binary data")
14995 (description
14996 "This package provides both simple, atomic constructs (such as
14997integers of various sizes), as well as composite ones which allow you
14998form hierarchical and sequential structures of increasing complexity.
14999It features bit and byte granularity, easy debugging and testing, an
15000easy-to-extend subclass system, and lots of primitive constructs to
15001make your work easier.")
15002 (license license:expat)))
b742c006
LF
15003
15004(define-public python-humanize
15005 (package
15006 (name "python-humanize")
15007 (version "0.5.1")
15008 (source
15009 (origin
15010 (method url-fetch)
15011 (uri (pypi-uri "humanize" version))
15012 (sha256
15013 (base32
15014 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
15015 (arguments
15016 '(#:tests? #f)) ; tests not in pypi archive
15017 (build-system python-build-system)
15018 (home-page "https://github.com/jmoiron/humanize")
15019 (synopsis "Print numerical information in a human-readable form")
15020 (description "This package provides a Python module that displays numbers
15021and dates in \"human readable\" forms. For example, it would display
15022\"12345591313\" as \"12.3 billion\".")
15023 (license license:expat)))
d5bbf66d
LF
15024
15025(define-public python-txaio
15026 (package
15027 (name "python-txaio")
15028 (version "18.8.1")
15029 (source
15030 (origin
15031 (method url-fetch)
15032 (uri (pypi-uri "txaio" version))
15033 (sha256
15034 (base32
15035 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
15036 (build-system python-build-system)
15037 (propagated-inputs
15038 `(("python-twisted" ,python-twisted)
15039 ("python-six" ,python-six)))
15040 (home-page "https://github.com/crossbario/txaio")
15041 (synopsis "Compatibility layer between Python asyncio and Twisted")
15042 (description "Txaio provides a compatibility layer between the Python
15043@code{asyncio} module and @code{Twisted}.")
15044 (license license:expat)))