gnu: python-validictory: Use INVOKE.
[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>
44d10b1f
RW
4;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr>
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>
14;;; Copyright © 2015, 2016, 2017 Leo Famulari <leo@famulari.name>
15;;; Copyright © 2015, 2017 Ben Woodcroft <donttrustben@gmail.com>
16;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
17;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
18;;; Copyright © 2015, 2017 Kyle Meyer <kyle@kyleam.com>
19;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
20;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
21;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
22;;; Copyright © 2016, 2018 Hartmut Goebel <h.goebel@crazy-compilers.com>
23;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
24;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
25;;; Copyright © 2016, 2017 Troy Sankey <sankeytms@gmail.com>
26;;; Copyright © 2016, 2017 Nils Gillmann <ng0@n0.is>
27;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28;;; Copyright © 2016 David Craven <david@craven.ch>
29;;; Copyright © 2016, 2017, 2018 Marius Bakke <mbakke@fastmail.com>
30;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
31;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
32;;; Copyright © 2016, 2017 Alex Vong <alexvong1995@gmail.com>
33;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
34;;; Copyright © 2016, 2017, 2018 Julien Lepiller <julien@lepiller.eu>
35;;; Copyright © 2016, 2017, 2018 Tobias Geerinckx-Rice <me@tobias.gr>
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>
60;;;
61;;; This file is part of GNU Guix.
62;;;
63;;; GNU Guix is free software; you can redistribute it and/or modify it
64;;; under the terms of the GNU General Public License as published by
65;;; the Free Software Foundation; either version 3 of the License, or (at
66;;; your option) any later version.
67;;;
68;;; GNU Guix is distributed in the hope that it will be useful, but
69;;; WITHOUT ANY WARRANTY; without even the implied warranty of
70;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
71;;; GNU General Public License for more details.
72;;;
73;;; You should have received a copy of the GNU General Public License
74;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
75
76(define-module (gnu packages python-xyz)
77 #:use-module ((guix licenses) #:prefix license:)
78 #:use-module (gnu packages)
79 #:use-module (gnu packages algebra)
80 #:use-module (gnu packages adns)
81 #:use-module (gnu packages attr)
82 #:use-module (gnu packages backup)
83 #:use-module (gnu packages bash)
84 #:use-module (gnu packages check)
85 #:use-module (gnu packages compression)
86 #:use-module (gnu packages crypto)
87 #:use-module (gnu packages databases)
88 #:use-module (gnu packages file)
89 #:use-module (gnu packages fontutils)
90 #:use-module (gnu packages gcc)
91 #:use-module (gnu packages geo)
92 #:use-module (gnu packages ghostscript)
93 #:use-module (gnu packages gl)
94 #:use-module (gnu packages glib)
95 #:use-module (gnu packages graphviz)
96 #:use-module (gnu packages graphics)
97 #:use-module (gnu packages gstreamer)
98 #:use-module (gnu packages gtk)
99 #:use-module (gnu packages icu4c)
100 #:use-module (gnu packages image)
101 #:use-module (gnu packages imagemagick)
102 #:use-module (gnu packages libevent)
103 #:use-module (gnu packages libffi)
104 #:use-module (gnu packages linux)
105 #:use-module (gnu packages llvm)
106 #:use-module (gnu packages man)
107 #:use-module (gnu packages maths)
108 #:use-module (gnu packages multiprecision)
109 #:use-module (gnu packages networking)
110 #:use-module (gnu packages ncurses)
111 #:use-module (gnu packages openstack)
112 #:use-module (gnu packages pcre)
113 #:use-module (gnu packages perl)
114 #:use-module (gnu packages pkg-config)
115 #:use-module (gnu packages python)
d362b11d 116 #:use-module (gnu packages python-check)
44d10b1f
RW
117 #:use-module (gnu packages python-crypto)
118 #:use-module (gnu packages python-web)
119 #:use-module (gnu packages qt)
120 #:use-module (gnu packages readline)
121 #:use-module (gnu packages sdl)
122 #:use-module (gnu packages search)
123 #:use-module (gnu packages shells)
124 #:use-module (gnu packages ssh)
125 #:use-module (gnu packages terminals)
126 #:use-module (gnu packages tex)
127 #:use-module (gnu packages texinfo)
128 #:use-module (gnu packages time)
129 #:use-module (gnu packages tls)
130 #:use-module (gnu packages version-control)
131 #:use-module (gnu packages video)
132 #:use-module (gnu packages web)
133 #:use-module (gnu packages base)
134 #:use-module (gnu packages xml)
135 #:use-module (gnu packages xorg)
136 #:use-module (gnu packages xdisorg)
137 #:use-module (gnu packages tcl)
138 #:use-module (gnu packages bdw-gc)
139 #:use-module (guix packages)
140 #:use-module (guix download)
141 #:use-module (guix git-download)
142 #:use-module (guix utils)
143 #:use-module (guix build-system gnu)
144 #:use-module (guix build-system cmake)
145 #:use-module (guix build-system python)
146 #:use-module (guix build-system trivial)
147 #:use-module (srfi srfi-1)
148 #:use-module (srfi srfi-26))
149
150(define-public python-psutil
151 (package
152 (name "python-psutil")
153 (version "5.4.3")
154 (source
155 (origin
156 (method url-fetch)
157 (uri (pypi-uri "psutil" version))
158 (sha256
159 (base32
160 "063v69x7spyclyaxrd3gmzj3p16q5ayg97xqhwb1kyn22a9pwip2"))))
161 (build-system python-build-system)
162 (arguments
163 ;; FIXME: some tests does not return and times out.
164 '(#:tests? #f))
165 (home-page "https://www.github.com/giampaolo/psutil")
166 (synopsis "Library for retrieving information on running processes")
167 (description
168 "psutil (Python system and process utilities) is a library for retrieving
169information on running processes and system utilization (CPU, memory, disks,
170network) in Python. It is useful mainly for system monitoring, profiling and
171limiting process resources and management of running processes. It implements
172many functionalities offered by command line tools such as: ps, top, lsof,
173netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
174pidof, tty, taskset, pmap.")
175 (properties `((python2-variant . ,(delay python2-psutil))))
176 (license license:bsd-3)))
177
178(define-public python2-psutil
179 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
180 (package
181 (inherit base)
182 (propagated-inputs
183 `(("python2-enum34" ,python2-enum34) ;optional
184 ,@(package-propagated-inputs base))))))
185
186(define-public python-shapely
187 (package
188 (name "python-shapely")
189 (version "1.6.3")
190 (source
191 (origin
192 (method url-fetch)
193 (uri (pypi-uri "Shapely" version))
194 (sha256
195 (base32
196 "0svc58dzcw9gj92b4sgq35sdxkf85z0qwlzxarkzq4bp3h8jy58l"))))
197 (build-system python-build-system)
198 (native-inputs
199 `(("python-cython" ,python-cython)
200 ("python-matplotlib" ,python-matplotlib)
201 ("python-pytest" ,python-pytest)
202 ("python-pytest-cov" ,python-pytest-cov)))
203 (inputs
204 `(("geos" ,geos)))
205 (propagated-inputs
206 `(("python-numpy" ,python-numpy)))
207 (arguments
208 `(#:phases
209 (modify-phases %standard-phases
210 (add-after 'unpack 'patch-geos-path
211 (lambda* (#:key inputs #:allow-other-keys)
212 (let ((geos (assoc-ref inputs "geos"))
213 (glibc (assoc-ref inputs ,(if (%current-target-system)
214 "cross-libc" "libc"))))
215 (substitute* "shapely/geos.py"
216 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
217 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
218 geos "/lib/libgeos_c.so'])"))
219 (("free = load_dll\\('c'\\)\\.free")
220 (string-append "free = load_dll('c', fallbacks=['"
221 glibc "/lib/libc.so.6']).free"))))
222 #t)))))
223 (home-page "https://github.com/Toblerity/Shapely")
224 (synopsis "Library for the manipulation and analysis of geometric objects")
225 (description "Shapely is a Python package for manipulation and analysis of
226planar geometric objects. It is based on the @code{GEOS} library.")
227 (license license:bsd-3)))
228
229(define-public python-logwrap
230 (package
231 (name "python-logwrap")
232 (version "3.2.1")
233 (source
234 (origin
235 (method url-fetch)
236 (uri (pypi-uri "logwrap" version ".zip"))
237 (sha256
238 (base32
239 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
240 (build-system python-build-system)
241 (propagated-inputs
242 `(("python-six" ,python-six)
243 ("python-typing" ,python-typing)))
244 (native-inputs
245 `(("unzip" ,unzip)
246 ("python-cython" ,python-cython)
247 ("python-pytest" ,python-pytest)
248 ("python-pytest-cov" ,python-pytest-cov)
249 ("python-pytest-runner" ,python-pytest-runner)))
250 (home-page "https://github.com/penguinolog/logwrap")
251 (synopsis "Decorator for logging function arguments")
252 (description "This package provides a decorator to log function arguments
253and function call return values in a human-readable way.")
254 (license license:asl2.0)))
255
256(define-public python2-shapely
257 (package-with-python2 python-shapely))
258
259(define-public python-clyent
260 (package
261 (name "python-clyent")
262 (version "1.2.1")
263 (source
264 (origin
265 (method url-fetch)
266 (uri (pypi-uri "clyent" version))
267 (sha256
268 (base32
269 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
270 (build-system python-build-system)
271 (native-inputs
272 `(("python-mock" ,python-mock)))
273 (home-page "https://github.com/binstar/clyent")
274 (synopsis "Command line client library")
275 (description "Clyent is a Python command line utiliy library. It is used
276by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
277 (license license:bsd-3)))
278
279(define-public python2-clyent
280 (package-with-python2 python-clyent))
281
282(define-public python-babel
283 (package
284 (name "python-babel")
285 (version "2.6.0")
286 (source
287 (origin
288 (method url-fetch)
289 (uri (pypi-uri "Babel" version))
290 (sha256
291 (base32
292 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))
293 (build-system python-build-system)
294 (native-inputs
295 `(("python-freezegun" ,python-freezegun)
296 ("python-pytest" ,python-pytest)))
297 (propagated-inputs
298 `(("python-pytz" ,python-pytz)))
299 (arguments
300 `(#:phases (modify-phases %standard-phases
301 (replace 'check
302 (lambda _ (invoke "pytest" "-vv"))))))
303 (home-page "http://babel.pocoo.org/")
304 (synopsis
305 "Tools for internationalizing Python applications")
306 (description
307 "Babel is composed of two major parts:
308- tools to build and work with gettext message catalogs
309- a Python interface to the CLDR (Common Locale Data Repository), providing
310access to various locale display names, localized number and date formatting,
311etc. ")
312 (license license:bsd-3)))
313
314(define-public python2-babel
315 (package-with-python2 python-babel))
316
317(define-public python2-backport-ssl-match-hostname
318 (package
319 (name "python2-backport-ssl-match-hostname")
320 (version "3.5.0.1")
321 (source
322 (origin
323 (method url-fetch)
324 (uri (string-append
325 "https://pypi.python.org/packages/source/b/"
326 "backports.ssl_match_hostname/backports.ssl_match_hostname-"
327 version ".tar.gz"))
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)
450 (home-page "https://github.com/amoffat/sh")
451 (synopsis "Python subprocess replacement")
452 (description "This package provides a replacement for Python's
453@code{subprocess} feature.")
454 (license license:expat)))
455
d362b11d
RW
456(define-public python-cftime
457 (package
458 (name "python-cftime")
459 (version "1.0.3.4")
460 (source
461 (origin
462 (method url-fetch)
463 (uri (pypi-uri "cftime" version))
464 (sha256
465 (base32
466 "0362dhxbzk593walyjz30dll6y2y79wialik647cbwdsf3ad0x6x"))))
467 (build-system python-build-system)
468 (propagated-inputs
469 `(("python-numpy" ,python-numpy)))
470 (native-inputs
471 `(("python-coveralls" ,python-coveralls)
472 ("python-cython" ,python-cython)
473 ("python-pytest-cov" ,python-pytest-cov)))
474 (home-page "https://github.com/Unidata/cftime")
475 (synopsis "Library for time handling")
476 (description
477 "This package provides time-handling functionality that used to be part
478of the netcdf4 package before.")
479 ;; This package claims to include code under the GPLv3 but is released
480 ;; under ISC.
481 (license (list license:isc license:gpl3+))))
482
44d10b1f
RW
483(define-public python-netcdf4
484 (package
485 (name "python-netcdf4")
93e7b209 486 (version "1.4.2")
44d10b1f
RW
487 (source
488 (origin
489 (method url-fetch)
490 (uri (pypi-uri "netCDF4" version))
491 (sha256
492 (base32
93e7b209 493 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
44d10b1f 494 (build-system python-build-system)
93e7b209
RW
495 (arguments
496 '(#:phases
497 (modify-phases %standard-phases
498 (add-after 'unpack 'configure-locations
499 (lambda* (#:key inputs #:allow-other-keys)
500 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
501 #t)))))
44d10b1f
RW
502 (native-inputs
503 `(("python-cython" ,python-cython)))
504 (propagated-inputs
93e7b209
RW
505 `(("python-numpy" ,python-numpy)
506 ("python-cftime" ,python-cftime)))
44d10b1f
RW
507 (inputs
508 `(("netcdf" ,netcdf)
509 ("hdf4" ,hdf4)
510 ("hdf5" ,hdf5)))
93e7b209 511 (home-page "https://github.com/Unidata/netcdf4-python")
44d10b1f
RW
512 (synopsis "Python/numpy interface to the netCDF library")
513 (description "Netcdf4-python is a Python interface to the netCDF C
514library. netCDF version 4 has many features not found in earlier
515versions of the library and is implemented on top of HDF5. This module
516can read and write files in both the new netCDF 4 and the old netCDF 3
517format, and can create files that are readable by HDF5 clients. The
518API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
519to users of that module.")
520 ;; The software is mainly ISC, but includes some files covered
521 ;; by the Expat license.
522 (license (list license:isc license:expat))))
523
524(define-public python2-netcdf4
525 (package-with-python2 python-netcdf4))
526
527(define-public python-lockfile
528 (package
529 (name "python-lockfile")
530 (version "0.12.2")
531 (source
532 (origin
533 (method url-fetch)
534 (uri (string-append "https://pypi.python.org/packages/source/l/lockfile/"
535 "lockfile-" version ".tar.gz"))
536 (sha256
537 (base32
538 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
539 (build-system python-build-system)
540 (arguments '(#:test-target "check"))
541 (native-inputs
542 `(("python-pbr" ,python-pbr)))
543 (home-page "https://launchpad.net/pylockfile")
544 (synopsis "Platform-independent file locking module")
545 (description
546 "The lockfile package exports a LockFile class which provides a simple
547API for locking files.")
548 (license license:expat)))
549
550(define-public python2-lockfile
551 (package-with-python2 python-lockfile))
552
553(define-public python-semantic-version
554 (package
555 (name "python-semantic-version")
556 (version "2.6.0")
557 (source
558 (origin
559 (method url-fetch)
560 (uri (pypi-uri "semantic_version" version))
561 (sha256
562 (base32
563 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
564 (build-system python-build-system)
565 (arguments
566 `(#:tests? #f)) ; PyPI tarball lacks tests
567 (home-page "https://github.com/rbarrois/python-semanticversion")
568 (synopsis "Semantic versioning module for Python")
569 (description
570 "The @code{semantic_version} class is a small library for handling
571@uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
572
573It can compare versions, generate a new version that represents a bump in one of
574the version levels, and check whether any given string is a proper semantic
575version identifier.")
576 (license license:bsd-3)))
577
578(define-public python2-semantic-version
579 (package-with-python2 python-semantic-version))
580
581(define-public python-serpent
582 (package
583 (name "python-serpent")
584 (version "1.27")
585 (source
586 (origin
587 (method url-fetch)
588 (uri (pypi-uri "serpent" version))
589 (sha256
590 (base32
591 "04p9dsrm5pv8vhk3flvih55kgvlzpi38hlaykdiakddmgwqw93bg"))))
592 (build-system python-build-system)
593 (home-page "https://github.com/irmen/Serpent")
594 (synopsis "Serializer for literal Python expressions")
595 (description
596 "Serpent provides ast.literal_eval() compatible object tree
597serialization. It serializes an object tree into bytes (utf-8 encoded string)
598that can be decoded and then passed as-is to ast.literal_eval() to rebuild it
599as the original object tree. As such it is safe to send serpent data to other
600machines over the network for instance (because only safe literals are
601encoded).")
602 (license license:expat)))
603
604(define-public python-setuptools
605 (package
606 (name "python-setuptools")
607 (version "40.0.0")
608 (source
609 (origin
610 (method url-fetch)
611 (uri (pypi-uri "setuptools" version ".zip"))
612 (sha256
613 (base32
614 "0pq116lr14gnc62v76nk0npkm6krb2mpp7p9ab369zgv4n7dnah1"))
615 (modules '((guix build utils)))
616 (snippet
617 '(begin
618 ;; Remove included binaries which are used to build self-extracting
619 ;; installers for Windows.
620 ;; TODO: Find some way to build them ourself so we can include them.
621 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
622 #t))))
623 (build-system python-build-system)
624 ;; FIXME: Tests require pytest, which itself relies on setuptools.
625 ;; One could bootstrap with an internal untested setuptools.
626 (arguments
627 `(#:tests? #f))
628 (home-page "https://pypi.python.org/pypi/setuptools")
629 (synopsis
630 "Library designed to facilitate packaging Python projects")
631 (description
632 "Setuptools is a fully-featured, stable library designed to facilitate
633packaging Python projects, where packaging includes:
634Python package and module definitions,
635distribution package metadata,
636test hooks,
637project installation,
638platform-specific details,
639Python 3 support.")
640 ;; TODO: setuptools now bundles the following libraries:
641 ;; packaging, pyparsing, six and appdirs. How to unbundle?
642 (license (list license:psfl ; setuptools itself
643 license:expat ; six, appdirs, pyparsing
644 license:asl2.0 ; packaging is dual ASL2/BSD-2
645 license:bsd-2))))
646
647(define-public python2-setuptools
648 (package-with-python2 python-setuptools))
649
650(define-public python-uniseg
651 (package
652 (name "python-uniseg")
653 (version "0.7.1")
654 (source
655 (origin
656 (method url-fetch)
657 (uri (pypi-uri "uniseg" version ".zip"))
658 (sha256
659 (base32
660 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
661 (build-system python-build-system)
662 (arguments
663 '(#:tests? #f)) ; The test suite requires network access.
664 (native-inputs
665 `(("unzip" ,unzip)))
666 (home-page
667 "https://bitbucket.org/emptypage/uniseg-python")
668 (synopsis
669 "Python library to determine Unicode text segmentations")
670 (description
671 "Uniseg is a Python package used to determine Unicode text segmentations.
672Supported segmentations include:
673@enumerate
674@item @dfn{Code point} (any value in the Unicode codespace)
675@item @dfn{Grapheme cluster} (user-perceived character made of a single or
676multiple Unicode code points, e.g. \"G\" + acute-accent)
677@item Word break
678@item Sentence break
679@item Line break
680@end enumerate")
681 (license license:expat)))
682
683(define-public python2-uniseg
684 (package-with-python2 python-uniseg))
685
686(define-public python-humanfriendly
687 (package
688 (name "python-humanfriendly")
689 (version "4.4.1")
690 (source
691 (origin
692 (method url-fetch)
693 (uri (pypi-uri "humanfriendly" version))
694 (sha256
695 (base32
696 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
697 (build-system python-build-system)
698 (arguments
699 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
700 #:tests? #f))
701 (propagated-inputs
702 `(("python-monotonic" ,python-monotonic)))
703 (home-page "https://humanfriendly.readthedocs.io")
704 (synopsis "Human-friendly input and output in Python")
705 (description
706 "The functions and classes in @code{humanfriendly} can be used to make
707text interfaces more user-friendly. It includes tools to parse and format
708numbers, file sizes, and timespans, timers for long-running operations, menus
709to allow the user to choose from a list of options, and terminal interaction
710helpers.")
711 (license license:expat)))
712
713(define-public python2-humanfriendly
714 (package-with-python2 python-humanfriendly))
715
716(define-public python-capturer
717 (package
718 (name "python-capturer")
719 (version "2.4")
720 (source
721 (origin
722 (method url-fetch)
723 (uri (pypi-uri "capturer" version))
724 (sha256
725 (base32
726 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
727 (build-system python-build-system)
728 (arguments
729 `(#:tests? #f))
730 (propagated-inputs
731 `(("python-humanfriendly" ,python-humanfriendly)))
732 (home-page "https://capturer.readthedocs.io")
733 (synopsis "Capture stdout and stderr streams of the current process")
734 (description
735 "The capturer package makes it easy to capture the stdout and stderr
736streams of the current process and subprocesses. Output can be relayed
737to the terminal in real time but is also available to the Python program
738for additional processing.")
739 (license license:expat)))
740
741(define-public python2-capturer
742 (package-with-python2 python-capturer))
743
744(define-public python-case
745 (package
746 (name "python-case")
747 (version "1.5.3")
748 (source
749 (origin
750 (method url-fetch)
751 (uri (pypi-uri "case" version))
752 (sha256
753 (base32
754 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
755 (build-system python-build-system)
756 (propagated-inputs
757 `(("python-mock" ,python-mock)
758 ("python-nose" ,python-nose)
759 ("python-six" ,python-six)
760 ("python-unittest2" ,python-unittest2)))
761 (native-inputs
762 `(("python-coverage" ,python-coverage)))
763 (home-page "https://github.com/celery/case")
764 (synopsis "Unittest utilities and convenience methods")
765 (description
766 "The @code{case} package provides utilities on top of unittest, including
767some helpful Python 2 compatibility convenience methods.")
768 (license license:bsd-3)))
769
770(define-public python-verboselogs
771 (package
772 (name "python-verboselogs")
773 (version "1.7")
774 (source
775 (origin
776 (method url-fetch)
777 (uri (pypi-uri "verboselogs" version))
778 (sha256
779 (base32
780 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
781 (build-system python-build-system)
782 (native-inputs
783 `(("python-mock" ,python-mock)
784 ("python-astroid" ,python-astroid)
785 ("python-pylint" ,python-pylint)))
786 (home-page "https://verboselogs.readthedocs.io")
787 (synopsis "Verbose logging level for Python's logging module")
788 (description
789 "The @code{verboselogs} package extends Python's @code{logging} module to
790add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
791 (license license:expat)))
792
793(define-public python2-verboselogs
794 (package-with-python2 python-verboselogs))
795
796(define-public python-coloredlogs
797 (package
798 (name "python-coloredlogs")
799 (version "7.3")
800 (source
801 (origin
802 (method url-fetch)
803 (uri (pypi-uri "coloredlogs" version))
804 (sha256
805 (base32
806 "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9"))))
807 (build-system python-build-system)
808 (arguments
809 `(;Tests require some updated modules
810 #:tests? #f))
811 (propagated-inputs
812 `(("python-capturer" ,python-capturer)))
813 (home-page "https://coloredlogs.readthedocs.io")
814 (synopsis "Colored stream handler for Python's logging module")
815 (description
816 "The @code{coloredlogs} package enables colored terminal output for
817Python's logging module. The @code{ColoredFormatter} class inherits from
818@code{logging.Formatter} and uses ANSI escape sequences to render your logging
819messages in color.")
820 (license license:expat)))
821
822(define-public python2-coloredlogs
823 (package-with-python2 python-coloredlogs))
824
825(define-public python-eventlet
826 (package
827 (name "python-eventlet")
828 (version "0.20.1")
829 (source
830 (origin
831 (method url-fetch)
832 (uri (pypi-uri "eventlet" version))
833 (sha256
834 (base32
835 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
836 (build-system python-build-system)
837 (propagated-inputs
838 `(("python-greenlet" ,python-greenlet)))
839 (arguments
840 ;; TODO: Requires unpackaged 'enum-compat'.
841 '(#:tests? #f))
842 (home-page "http://eventlet.net")
843 (synopsis "Concurrent networking library for Python")
844 (description
845 "Eventlet is a concurrent networking library for Python that
846allows you to change how you run your code, not how you write it.
847It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
848Coroutines ensure that the developer uses a blocking style of programming
849that is similar to threading, but provide the benefits of non-blocking I/O.
850The event dispatch is implicit, which means you can easily use @code{Eventlet}
851from the Python interpreter, or as a small part of a larger application.")
852 (license license:expat)))
853
854(define-public python2-eventlet
855 (let ((base (package-with-python2
856 (strip-python2-variant python-eventlet))))
857 (package (inherit base)
858 (propagated-inputs
859 `(("python2-enum34" ,python2-enum34)
860 ,@(package-propagated-inputs base))))))
861
862(define-public python-six
863 (package
864 (name "python-six")
865 (version "1.11.0")
866 (source
867 (origin
868 (method url-fetch)
869 (uri (pypi-uri "six" version))
870 (sha256
871 (base32
872 "1scqzwc51c875z23phj48gircqjgnn3af8zy2izjwmnlxrxsgs3h"))))
873 (build-system python-build-system)
874 (arguments
875 `(#:phases
876 (modify-phases %standard-phases
877 (replace 'check
878 (lambda _
879 (invoke "py.test" "-v"))))))
880 (native-inputs
881 `(("python-py" ,python-py)
882 ("python-pytest" ,python-pytest-bootstrap)))
883 (home-page "https://pypi.python.org/pypi/six/")
884 (synopsis "Python 2 and 3 compatibility utilities")
885 (description
886 "Six is a Python 2 and 3 compatibility library. It provides utility
887functions for smoothing over the differences between the Python versions with
888the goal of writing Python code that is compatible on both Python versions.
889Six supports every Python version since 2.5. It is contained in only one
890Python file, so it can be easily copied into your project.")
891 (license license:x11)))
892
893(define-public python2-six
894 (package-with-python2 python-six))
895
896(define-public python-six-bootstrap
897 (package
898 (inherit python-six)
899 (name "python-six-bootstrap")
900 (native-inputs `())
901 (arguments `(#:tests? #f))))
902
903(define-public python2-six-bootstrap
904 (package-with-python2 python-six-bootstrap))
905
906(define-public python-schedule
907 (package
908 (name "python-schedule")
909 (version "0.4.3")
910 (source
911 (origin
912 (method url-fetch)
913 (uri (pypi-uri "schedule" version))
914 (sha256
915 (base32
916 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
917 (build-system python-build-system)
918 (native-inputs
919 `(("python-pytest" ,python-pytest)
920 ("python-mock" ,python-mock)))
921 (home-page "https://github.com/dbader/schedule")
922 (synopsis "Schedule periodic function calls in Python")
923 (description
924 "Schedule is an in-process scheduler for periodic jobs that uses the
925builder pattern for configuration. Schedule lets you run Python functions (or
926any other callable) periodically at pre-determined intervals using a simple,
927human-friendly syntax.")
928 (license license:expat)))
929
930(define-public python2-schedule
931 (package-with-python2 python-schedule))
932
933(define-public python-pandas
934 (package
935 (name "python-pandas")
936 (version "0.23.4")
937 (source
938 (origin
939 (method url-fetch)
940 (uri (pypi-uri "pandas" version))
941 (sha256
942 (base32 "1x54pd7hr3y7qahx6b5bf2wzj54xvl8r3s1h4pl254pnmi3wl92v"))))
943 (build-system python-build-system)
944 (arguments
945 `(#:modules ((guix build utils)
946 (guix build python-build-system)
947 (ice-9 ftw)
948 (srfi srfi-26))
949 #:phases (modify-phases %standard-phases
950 (replace 'check
951 (lambda _
952 (let ((build-directory
953 (string-append
954 (getcwd) "/build/"
955 (car (scandir "build"
956 (cut string-prefix? "lib." <>))))))
957 ;; Disable the "strict data files" option which causes
958 ;; the build to error out if required data files are not
959 ;; available (as is the case with PyPI archives).
960 (substitute* "setup.cfg"
961 (("addopts = --strict-data-files") "addopts = "))
962 (with-directory-excursion build-directory
963 ;; Delete tests that require "moto" which is not yet in Guix.
964 (for-each delete-file
965 '("pandas/tests/io/conftest.py"
966 "pandas/tests/io/json/test_compression.py"
967 "pandas/tests/io/parser/test_network.py"
968 "pandas/tests/io/test_excel.py"
969 "pandas/tests/io/test_parquet.py"))
970 (invoke "pytest" "-vv" "pandas" "--skip-slow"
971 "--skip-network" "-k"
972 ;; XXX: Due to the deleted tests above.
973 "not test_read_s3_jsonl"))))))))
974 (propagated-inputs
975 `(("python-numpy" ,python-numpy)
976 ("python-pytz" ,python-pytz)
977 ("python-dateutil" ,python-dateutil)))
978 (native-inputs
979 `(("python-cython" ,python-cython)
980 ("python-beautifulsoup4" ,python-beautifulsoup4)
981 ("python-lxml" ,python-lxml)
982 ("python-html5lib" ,python-html5lib)
983 ("python-nose" ,python-nose)
984 ("python-pytest" ,python-pytest)))
985 (home-page "https://pandas.pydata.org")
986 (synopsis "Data structures for data analysis, time series, and statistics")
987 (description
988 "Pandas is a Python package providing fast, flexible, and expressive data
989structures designed to make working with structured (tabular,
990multidimensional, potentially heterogeneous) and time series data both easy
991and intuitive. It aims to be the fundamental high-level building block for
992doing practical, real world data analysis in Python.")
993 (license license:bsd-3)))
994
995(define-public python2-pandas
996 (package-with-python2 python-pandas))
997
998(define-public python2-mechanize
999 (package
1000 (name "python2-mechanize")
1001 (version "0.2.5")
1002 (source
1003 (origin
1004 (method url-fetch)
1005 (uri (string-append "https://pypi.python.org/packages/source/m/mechanize/mechanize-"
1006 version ".tar.gz"))
1007 (sha256
1008 (base32
1009 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1010 (build-system python-build-system)
1011 (arguments
1012 `(#:python ,python-2 ; apparently incompatible with Python 3
1013 #:tests? #f))
1014 ;; test fails with message
1015 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1016 ;; (python-3.3.2) or
1017 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1018 ;; (python-2.7.5).
1019 ;; The source code is from March 2011 and probably not up-to-date
1020 ;; with respect to python unit tests.
1021 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1022 (synopsis
1023 "Stateful programmatic web browsing in Python")
1024 (description
1025 "Mechanize implements stateful programmatic web browsing in Python,
1026after Andy Lester’s Perl module WWW::Mechanize.")
1027 (license (license:non-copyleft
1028 "file://COPYING"
1029 "See COPYING in the distribution."))))
1030
1031
1032(define-public python-simplejson
1033 (package
1034 (name "python-simplejson")
1035 (version "3.14.0")
1036 (source
1037 (origin
1038 (method url-fetch)
1039 (uri (pypi-uri "simplejson" version))
1040 (sha256
1041 (base32
1042 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1043 (build-system python-build-system)
1044 (home-page "http://simplejson.readthedocs.org/en/latest/")
1045 (synopsis
1046 "Json library for Python")
1047 (description
1048 "JSON (JavaScript Object Notation) is a subset of JavaScript
1049syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1050format.
1051
1052Simplejson exposes an API familiar to users of the standard library marshal
1053and pickle modules. It is the externally maintained version of the json
1054library contained in Python 2.6, but maintains compatibility with Python 2.5
1055and (currently) has significant performance advantages, even without using
1056the optional C extension for speedups. Simplejson is also supported on
1057Python 3.3+.")
1058 (license license:x11)))
1059
1060(define-public python2-simplejson
1061 (package-with-python2 python-simplejson))
1062
1063
1064(define-public python-pyicu
1065 (package
1066 (name "python-pyicu")
1067 (version "2.2")
1068 (source
1069 (origin
1070 (method url-fetch)
1071 (uri (pypi-uri "PyICU" version))
1072 (sha256
1073 (base32
1074 "0wq9y5fi1ighgf5aws9nr87vi1w44p7q1k83rx2y3qj5d2xyhspa"))))
1075 (build-system python-build-system)
1076 (inputs
1077 `(("icu4c" ,icu4c)))
1078 (native-inputs
1079 `(("python-pytest" ,python-pytest)
1080 ("python-six" ,python-six)))
1081 (home-page "https://github.com/ovalhub/pyicu")
1082 (synopsis "Python extension wrapping the ICU C++ API")
1083 (description
1084 "PyICU is a python extension wrapping the ICU C++ API.")
1085 (properties `((python2-variant . ,(delay python2-pyicu))))
1086 (license license:x11)))
1087
1088(define-public python2-pyicu
1089 (let ((base (package-with-python2
1090 (strip-python2-variant python-pyicu))))
1091 (package
1092 (inherit base)
1093 (arguments
1094 `(,@(package-arguments base)
1095 #:phases
1096 (modify-phases %standard-phases
1097 (add-before 'check 'delete-failing-test
1098 (λ _
1099 ;; XXX: This fails due to Unicode issues unique to Python 2,
1100 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1101 (delete-file "test/test_Script.py")
1102 #t))))))))
1103
1104(define-public python2-dogtail
1105 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1106 ;; spaces in indentation" with Python 3.
1107 (package
1108 (name "python2-dogtail")
1109 (version "0.9.9")
1110 (source (origin
1111 (method url-fetch)
1112 (uri (pypi-uri "dogtail" version))
1113 (sha256
1114 (base32
1115 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1116 (build-system python-build-system)
1117 (arguments `(#:python ,python-2
1118 #:tests? #f)) ; invalid command "test"
1119 ;; Currently no offical homepage.
1120 (home-page "https://pypi.python.org/pypi/dogtail/")
1121 (synopsis "GUI test tool and automation framework written in Python")
1122 (description
1123 "Dogtail is a GUI test tool and automation framework written in Python.
1124It uses Accessibility (a11y) technologies to communicate with desktop
1125applications. dogtail scripts are written in Python and executed like any
1126other Python program.")
1127 (license license:gpl2+)))
1128
1129(define-public python-empy
1130 (package
1131 (name "python-empy")
1132 (version "3.3")
1133 (source (origin
1134 (method url-fetch)
1135 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1136 version ".tar.gz"))
1137 (sha256
1138 (base32
1139 "01g8mmkfnvjdmlhsihwyx56lrg7r5m5d2fg6mnxsvy6g0dnl69f6"))))
1140 (build-system python-build-system)
1141 (arguments
1142 `(#:tests? #f)) ;python2 only
1143 (home-page "http://www.alcyone.com/software/empy/")
1144 (synopsis "Templating system for Python")
1145 (description
1146 "EmPy is a system for embedding Python expressions and statements in
1147template text; it takes an EmPy source file, processes it, and produces
1148output. This is accomplished via expansions, which are special signals to the
1149EmPy system and are set off by a special prefix (by default the at sign, @@).
1150EmPy can expand arbitrary Python expressions and statements in this way, as
1151well as a variety of special forms. Textual data not explicitly delimited in
1152this way is sent unaffected to the output, allowing Python to be used in
1153effect as a markup language. Also supported are callbacks via hooks,
1154recording and playback via diversions, and dynamic, chainable filters. The
1155system is highly configurable via command line options and embedded
1156commands.")
1157 (license license:lgpl2.1+)))
1158
1159(define-public python2-empy
1160 (package-with-python2 python-empy))
1161
1162(define-public python2-element-tree
1163 (package
1164 (name "python2-element-tree")
1165 (version "1.2.6")
1166 (source (origin
1167 (method url-fetch)
1168 (uri (string-append
1169 "http://effbot.org/media/downloads/elementtree-"
1170 version "-20050316.tar.gz"))
1171 (sha256
1172 (base32
1173 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1174 (build-system python-build-system)
1175 (arguments
1176 `(#:python ,python-2 ; seems to be part of Python 3
1177 #:tests? #f)) ; no 'test' sub-command
1178 (synopsis "Toolkit for XML processing in Python")
1179 (description
1180 "ElementTree is a Python library supporting lightweight XML processing.")
1181 (home-page "http://effbot.org/zone/element-index.htm")
1182 (license (license:x11-style
1183 "http://docs.python.org/2/license.html"
1184 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1185
1186(define-public python2-pybugz
1187 (package
1188 (name "python2-pybugz")
1189 (version "0.6.11")
1190 (source (origin
1191 (method url-fetch)
1192 (uri (string-append
1193 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1194 version ".tar.gz"))
1195 (sha256
1196 (base32
1197 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1198 (patches (search-patches "pybugz-stty.patch"
1199 "pybugz-encode-error.patch"))))
1200 (build-system python-build-system)
1201 (arguments
1202 `(#:python ,python-2 ; SyntaxError with Python 3
1203 #:tests? #f)) ; no 'test' sub-command
1204 (propagated-inputs
1205 `(("element-tree" ,python2-element-tree)))
1206 (synopsis "Python and command-line interface to Bugzilla")
1207 (description
1208 "PyBugz is a Python library and command-line tool to query the Bugzilla
1209bug tracking system. It is meant as an aid to speed up interaction with the
1210bug tracker.")
1211 (home-page "http://www.liquidx.net/pybugz/")
1212 (license license:gpl2)))
1213
1214(define-public python2-enum
1215 (package
1216 (name "python2-enum")
1217 (version "0.4.6")
1218 (source (origin
1219 (method url-fetch)
1220 (uri (pypi-uri "enum" version))
1221 (sha256
1222 (base32
1223 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1224 (build-system python-build-system)
1225 (arguments
1226 `(#:python ,python-2))
1227 (home-page "http://pypi.python.org/pypi/enum/")
1228 (synopsis "Robust enumerated type support in Python")
1229 (description
1230 "This provides a module for robust enumerations in Python. It has
1231been superseded by the Python standard library and is provided only for
1232compatibility.")
1233 ;; Choice of either license.
1234 (license (list license:gpl3+ license:psfl))))
1235
1236(define-public python-enum34
1237 (package
1238 (name "python-enum34")
1239 (version "1.1.6")
1240 (source
1241 (origin
1242 (method url-fetch)
1243 (uri (pypi-uri "enum34" version))
1244 (sha256
1245 (base32
1246 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1247 (build-system python-build-system)
1248 (home-page "https://pypi.python.org/pypi/enum34")
1249 (synopsis "Backported Python 3.4 Enum")
1250 (description
1251 "Enum34 is the new Python stdlib enum module available in Python 3.4
1252backported for previous versions of Python from 2.4 to 3.3.")
1253 (license license:bsd-3)))
1254
1255(define-public python2-enum34
1256 (package-with-python2 python-enum34))
1257
1258(define-public python-parse-type
1259 (package
1260 (name "python-parse-type")
1261 (version "0.4.2")
1262 (source
1263 (origin
1264 (method url-fetch)
1265 (uri (pypi-uri "parse_type" version))
1266 (sha256
1267 (base32
1268 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1269 (build-system python-build-system)
1270 (propagated-inputs
1271 `(("python-six" ,python-six)
1272 ("python-parse" ,python-parse)))
1273 (native-inputs
1274 `(("python-pytest" ,python-pytest)
1275 ("python-pytest-runner" ,python-pytest-runner)))
1276 (home-page "https://github.com/jenisys/parse_type")
1277 (synopsis "Extended parse module")
1278 (description
1279 "Parse_type extends the python parse module.")
1280 (properties
1281 `((python2-variant . ,(delay python2-parse-type))))
1282 (license license:bsd-3)))
1283
1284(define-public python2-parse-type
1285 (let ((base (package-with-python2
1286 (strip-python2-variant python-parse-type))))
1287 (package (inherit base)
1288 (propagated-inputs
1289 `(("python2-enum34" ,python2-enum34)
1290 ,@(package-propagated-inputs base))))))
1291
1292(define-public python-parse
1293 (package
1294 (name "python-parse")
1295 (version "1.8.4")
1296 (source
1297 (origin
1298 (method url-fetch)
1299 (uri (pypi-uri "parse" version))
1300 (sha256
1301 (base32
1302 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1303 (build-system python-build-system)
1304 (arguments
1305 `(#:phases
1306 (modify-phases %standard-phases
1307 (replace 'check
1308 (lambda _ (invoke "python" "test_parse.py"))))))
1309 (home-page "https://github.com/r1chardj0n3s/parse")
1310 (synopsis "Parse strings")
1311 (description
1312 "Parse strings using a specification based on the Python @code{format()}
1313syntax.")
1314 (license license:x11)))
1315
1316(define-public python-polib
1317 (package
1318 (name "python-polib")
1319 (version "1.0.8")
1320 (source (origin
1321 (method url-fetch)
1322 (uri (pypi-uri "polib" version))
1323 (sha256
1324 (base32
1325 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1326 (build-system python-build-system)
1327 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1328 (synopsis "Manipulate, create and modify gettext files")
1329 (description "Polib can manipulate any gettext format (po, pot and mo)
1330files. It can be used to create po files from scratch or to modify
1331existing ones.")
1332 (license license:expat)))
1333
1334(define-public python2-polib
1335 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1336 (package
1337 (inherit base)
1338 (arguments `(,@(package-arguments base)
1339 ;; Tests don't work with python2.
1340 #:tests? #f)))))
1341
1342(define-public scons
1343 (package
1344 (name "scons")
1345 (version "3.0.1")
1346 (source (origin
1347 (method url-fetch)
1348 (uri (string-append "mirror://sourceforge/scons/scons/" version
1349 "/scons-" version ".tar.gz"))
1350 (sha256
1351 (base32
1352 "0wzid419mlwqw9llrg8gsx4nkzhqy16m4m40r0xnh6cwscw5wir4"))))
1353 (build-system python-build-system)
1354 (arguments
1355 `(#:use-setuptools? #f ; still relies on distutils
1356 #:tests? #f)) ; no 'python setup.py test' command
1357 (home-page "http://scons.org/")
1358 (synopsis "Software construction tool written in Python")
1359 (description
1360 "SCons is a software construction tool. Think of SCons as an improved,
1361cross-platform substitute for the classic Make utility with integrated
1362functionality similar to autoconf/automake and compiler caches such as ccache.
1363In short, SCons is an easier, more reliable and faster way to build
1364software.")
1365 (license license:x11)))
1366
1367(define-public scons-python2
1368 (package
1369 (inherit (package-with-python2 scons))
1370 (name "scons-python2")))
1371
1372(define-public python-extras
1373 (package
1374 (name "python-extras")
1375 (version "1.0.0")
1376 (source
1377 (origin
1378 (method url-fetch)
1379 (uri (pypi-uri "extras" version))
1380 (sha256
1381 (base32
1382 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1383 (build-system python-build-system)
1384 (arguments
1385 ;; FIXME: Circular dependency on testtools.
1386 '(#:tests? #f))
1387 (home-page "https://github.com/testing-cabal/extras")
1388 (synopsis "Useful extensions to the Python standard library")
1389 (description
1390 "Extras is a set of extensions to the Python standard library.")
1391 (license license:expat)))
1392
1393(define-public python2-extras
1394 (package-with-python2 python-extras))
1395
1396(define-public python-mimeparse
1397 (package
1398 (name "python-mimeparse")
1399 (version "1.6.0")
1400 (source
1401 (origin
1402 (method url-fetch)
1403 (uri (string-append
1404 "https://pypi.python.org/packages/source/p/python-mimeparse/python-mimeparse-"
1405 version ".tar.gz"))
1406 (sha256
1407 (base32
1408 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1409 (build-system python-build-system)
1410 (arguments
1411 '(#:phases
1412 (modify-phases %standard-phases
1413 (replace 'check
1414 (lambda _
1415 (invoke "./mimeparse_test.py"))))))
1416 (home-page
1417 "https://github.com/dbtsai/python-mimeparse")
1418 (synopsis "Python library for parsing MIME types")
1419 (description
1420 "Mimeparse provides basic functions for parsing MIME type names and
1421matching them against a list of media-ranges.")
1422 (license license:expat)))
1423
1424(define-public python2-mimeparse
1425 (package-with-python2 python-mimeparse))
1426
1427(define-public python-miniboa
1428 (package
1429 (name "python-miniboa")
1430 (version "1.0.7")
1431 (source
1432 (origin
1433 (method url-fetch)
1434 (uri (pypi-uri "miniboa" version))
1435 (sha256
1436 (base32
1437 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1438 (build-system python-build-system)
1439 (home-page "https://github.com/shmup/miniboa")
1440 (synopsis "Simple, single-threaded Telnet server")
1441 (description
1442 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1443server.")
1444 (license license:asl2.0)))
1445
1446(define-public python2-miniboa
1447 (package-with-python2 python-miniboa))
1448
1449(define-public python-pafy
1450 (package
1451 (name "python-pafy")
1452 (version "0.5.3.1")
1453 (source
1454 (origin
1455 (method url-fetch)
1456 (uri (pypi-uri "pafy" version))
1457 (sha256
1458 (base32
1459 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1460 (build-system python-build-system)
1461 (arguments
1462 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1463 (propagated-inputs
1464 ;; Youtube-dl is a python package which is imported in the file
1465 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1466 `(("youtube-dl" ,youtube-dl)))
1467 (home-page "https://np1.github.io/pafy/")
1468 (synopsis "Retrieve YouTube content and metadata")
1469 (description
1470 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1471 (license license:lgpl3+)))
1472
1473(define-public python2-funcsigs
1474 (package
1475 (name "python2-funcsigs")
1476 (version "1.0.2")
1477 (source (origin
1478 (method url-fetch)
1479 (uri (pypi-uri "funcsigs" version))
1480 (sha256
1481 (base32
1482 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1483 (build-system python-build-system)
1484 (arguments
1485 `(#:python ,python-2))
1486 (native-inputs
1487 `(("python2-unittest2" ,python2-unittest2)))
1488 (home-page "http://funcsigs.readthedocs.org")
1489 (synopsis "Python function signatures from PEP362")
1490 (description
1491 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1492 (license license:asl2.0)))
1493
1494(define-public python2-funcsigs-bootstrap
1495 (package
1496 (inherit python2-funcsigs)
1497 (name "python2-funcsigs-bootstrap")
1498 (native-inputs `())
1499 (arguments
1500 `(#:tests? #f
1501 ,@(package-arguments python2-funcsigs)))))
1502
1503(define-public python-py
1504 (package
1505 (name "python-py")
1506 (version "1.5.4")
1507 (source
1508 (origin
1509 (method url-fetch)
1510 (uri (pypi-uri "py" version))
1511 (sha256
1512 (base32
1513 "1xxvwfn82457djf55f5n2c94699rfqnk43br8fif2r2q8gvrmm9z"))))
1514 (build-system python-build-system)
1515 (arguments
1516 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1517 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1518 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1519 ;; Is this module globally installed?"
1520 '(#:tests? #f))
1521 (native-inputs
1522 `(("python-setuptools-scm" ,python-setuptools-scm)))
1523 (home-page "https://github.com/pytest-dev/py")
1524 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1525 (description
1526 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1527code introspection, and logging.")
1528 (license license:expat)))
1529
1530(define-public python2-py
1531 (package-with-python2 python-py))
1532
1533;; Recent versions of python-fixtures and python-testrepository need
1534;; python-pbr for packaging, which itself needs these two packages for
1535;; testing.
1536;; To fix this circular dependency, we use a build of python-pbr, based on the
1537;; same source, just without any test dependencies and with tests disabled.
1538;; python-pbr-minmal is then used to package python-fixtures and
1539;; python-testrepository.
1540;; Strictly speaking we currently could remove the test-requirements from the
1541;; normal python-pbr package (and save this package) since test are disabled
1542;; there anyway. But this may change in future.
1543(define-public python-pbr-minimal
1544 (package
1545 (name "python-pbr-minimal")
1546 (version "3.0.1")
1547 (source
1548 (origin
1549 (method url-fetch)
1550 (uri (pypi-uri "pbr" version))
1551 (sha256
1552 (base32
1553 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1554 (build-system python-build-system)
1555 (arguments
1556 `(#:tests? #f))
1557 (home-page "http://docs.openstack.org/developer/pbr/")
1558 (synopsis "Minimal build of python-pbr used for bootstrapping")
1559 (description
1560 "Used only for bootstrapping python2-pbr, you should not need this.")
1561 (license license:asl2.0)))
1562
1563(define-public python2-pbr-minimal
1564 (package-with-python2 python-pbr-minimal))
1565
1566(define-public python-pbr
1567 (package
1568 (inherit python-pbr-minimal)
1569 (name "python-pbr")
1570 (arguments
1571 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1572 (propagated-inputs
1573 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1574 (native-inputs
1575 `(("python-fixtures" ,python-fixtures-bootstrap)
1576 ;; discover, coverage, hacking, subunit
1577 ("python-mock" ,python-mock)
1578 ("python-six" ,python-six)
1579 ("python-sphinx" ,python-sphinx)
1580 ("python-testrepository" ,python-testrepository-bootstrap)
1581 ("python-testresources" ,python-testresources-bootstrap)
1582 ("python-testscenarios" ,python-testscenarios-bootstrap)
1583 ("python-testtools" ,python-testtools-bootstrap)
1584 ("python-virtualenv" ,python-virtualenv)))
1585 (synopsis "Enhance the default behavior of Python’s setuptools")
1586 (description
1587 "Python Build Reasonableness (PBR) is a library that injects some useful
1588and sensible default behaviors into your setuptools run. It will set
1589versions, process requirements files and generate AUTHORS and ChangeLog file
1590from git information.
1591")))
1592
1593(define-public python2-pbr
1594 (package-with-python2 python-pbr))
1595
1596(define-public python-exif-read
1597 (package
1598 (name "python-exif-read")
1599 (version "2.1.2")
1600 (source (origin
1601 (method url-fetch)
1602 (uri (pypi-uri "ExifRead" version))
1603 (sha256
1604 (base32
1605 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1606 (build-system python-build-system)
1607 (arguments `(#:tests? #f)) ; no tests
1608 (home-page "https://github.com/ianare/exif-py")
1609 (synopsis "Python library to extract EXIF data from image files")
1610 (description
1611 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1612files.")
1613 (license license:bsd-3)))
1614
1615(define-public python2-exif-read
1616 (package-with-python2 python-exif-read))
1617
1618(define-public python-pyld
1619 (package
1620 (name "python-pyld")
1621 (version "1.0.3")
1622 (source (origin
1623 (method url-fetch)
1624 (uri (pypi-uri "PyLD" version))
1625 (sha256
1626 (base32
1627 "12i2g6xdj30k7xxcibg3sc5y76snwq8l6n8fy9lyi577kgy0h2pm"))))
1628 (build-system python-build-system)
1629 (home-page "https://github.com/digitalbazaar/pyld")
1630 (synopsis "Python implementation of the JSON-LD specification")
1631 (description
1632 "PyLD is an implementation of the JSON-LD specification.")
1633 (license license:bsd-3)))
1634
1635(define-public python2-pyld
1636 (package-with-python2 python-pyld))
1637
1638(define-public python-click
1639 (package
1640 (name "python-click")
1641 (version "6.7")
1642 (source
1643 (origin
1644 (method url-fetch)
1645 (uri (pypi-uri "click" version))
1646 (sha256
1647 (base32
1648 "02qkfpykbq35id8glfgwc38yc430427yd05z1wc5cnld8zgicmgi"))))
1649 (build-system python-build-system)
1650 (arguments
1651 `(;; The tests are fragile, depending on a specific version of pytest:
1652 ;; <https://github.com/pallets/click/issues/823>
1653 #:tests? #f
1654 #:phases
1655 (modify-phases %standard-phases
1656 (add-after 'unpack 'fix-paths
1657 (lambda* (#:key inputs #:allow-other-keys)
1658 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1659 "cross-libc" "libc"))))
1660 (substitute* "click/_unicodefun.py"
1661 (("'locale'")
1662 (string-append "'" glibc "/bin/locale'"))))
1663 #t)))))
1664 (native-inputs
1665 `(("python-pytest" ,python-pytest)))
1666 (home-page "http://click.pocoo.org")
1667 (synopsis "Command line library for Python")
1668 (description
1669 "Click is a Python package for creating command line interfaces in a
1670composable way with as little code as necessary. Its name stands for
1671\"Command Line Interface Creation Kit\". It's highly configurable but comes
1672with sensible defaults out of the box.")
1673 (license license:bsd-3)))
1674
1675(define-public python2-click
1676 (package-with-python2 python-click))
1677
1678(define-public python-wheel
1679 (package
1680 (name "python-wheel")
1681 (version "0.30.0a0")
1682 (source
1683 (origin
1684 (method url-fetch)
1685 (uri (pypi-uri "wheel" version))
1686 (sha256
1687 (base32
1688 "1nm6mn8isny0hr86rhbfrpfj867c0phf001xgsd69xfp9ady1wwq"))))
1689 (build-system python-build-system)
1690 (native-inputs
1691 `(("python-jsonschema" ,python-jsonschema)
1692 ("python-pytest-cov" ,python-pytest-cov)))
1693 (home-page "https://bitbucket.org/pypa/wheel/")
1694 (synopsis "Format for built Python packages")
1695 (description
1696 "A wheel is a ZIP-format archive with a specially formatted filename and
1697the @code{.whl} extension. It is designed to contain all the files for a PEP
1698376 compatible install in a way that is very close to the on-disk format. Many
1699packages will be properly installed with only the @code{Unpack} step and the
1700unpacked archive preserves enough information to @code{Spread} (copy data and
1701scripts to their final locations) at any later time. Wheel files can be
1702installed with a newer @code{pip} or with wheel's own command line utility.")
1703 (license license:expat)
1704 (properties `((python2-variant . ,(delay python2-wheel))))))
1705
1706(define-public python2-wheel
1707 (let ((wheel (package-with-python2
1708 (strip-python2-variant python-wheel))))
1709 (package (inherit wheel)
1710 (native-inputs `(("python2-functools32" ,python2-functools32)
1711 ,@(package-native-inputs wheel))))))
1712
1713(define-public python-vcversioner
1714 (package
1715 (name "python-vcversioner")
1716 (version "2.16.0.0")
1717 (source
1718 (origin
1719 (method url-fetch)
1720 (uri (pypi-uri "vcversioner" version))
1721 (sha256
1722 (base32
1723 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1724 (build-system python-build-system)
1725 (synopsis "Python library for version number discovery")
1726 (description "Vcversioner is a Python library that inspects tagging
1727information in a variety of version control systems in order to discover
1728version numbers.")
1729 (home-page "https://github.com/habnabit/vcversioner")
1730 (license license:isc)))
1731
1732(define-public python2-vcversioner
1733 (package-with-python2 python-vcversioner))
1734
1735(define-public python-jsonschema
1736 (package
1737 (name "python-jsonschema")
1738 (version "2.6.0")
1739 (source (origin
1740 (method url-fetch)
1741 (uri
1742 (string-append
1743 "https://pypi.python.org/packages/source/j/jsonschema/jsonschema-"
1744 version ".tar.gz"))
1745 (sha256
1746 (base32
1747 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
1748 (build-system python-build-system)
1749 (arguments
1750 '(#:phases
1751 (modify-phases %standard-phases
8d466799 1752 (replace 'check (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
1753 (native-inputs
1754 `(("python-nose" ,python-nose)
1755 ("python-vcversioner" ,python-vcversioner)))
1756 (home-page "https://github.com/Julian/jsonschema")
1757 (synopsis "Implementation of JSON Schema for Python")
1758 (description
1759 "Jsonschema is an implementation of JSON Schema for Python.")
1760 (license license:expat)
1761 (properties `((python2-variant . ,(delay python2-jsonschema))))))
1762
1763(define-public python2-jsonschema
1764 (let ((jsonschema (package-with-python2
1765 (strip-python2-variant python-jsonschema))))
1766 (package (inherit jsonschema)
1767 (native-inputs
1768 `(("python2-mock" ,python2-mock)
1769 ,@(package-native-inputs jsonschema)))
1770 (propagated-inputs
1771 `(("python2-functools32" ,python2-functools32))))))
1772
1773(define-public python-schema
1774 (package
1775 (name "python-schema")
1776 (version "0.6.6")
1777 (source
1778 (origin
1779 (method url-fetch)
1780 (uri (pypi-uri "schema" version))
1781 (sha256
1782 (base32
1783 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
1784 (build-system python-build-system)
1785 (native-inputs
1786 `(("python-pytest" ,python-pytest)))
1787 (home-page "https://github.com/keleshev/schema")
1788 (synopsis "Simple data validation library")
1789 (description
1790 "@code{python-schema} is a library for validating Python data
1791structures, such as those obtained from config-files, forms, external
1792services or command-line parsing, converted from JSON/YAML (or
1793something else) to Python data-types.")
1794 (license license:psfl)))
1795
1796(define-public python2-schema
1797 (package-with-python2 python-schema))
1798
1799(define-public python-schema-0.5
1800 (package (inherit python-schema)
1801 (version "0.5.0")
1802 (source
1803 (origin
1804 (method url-fetch)
1805 (uri (pypi-uri "schema" version))
1806 (sha256
1807 (base32
1808 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
1809
1810(define-public python2-schema-0.5
1811 (package-with-python2 python-schema-0.5))
1812
1813(define-public python-kitchen
1814 (package
1815 (name "python-kitchen")
1816 (version "1.2.5")
1817 (source
1818 (origin
1819 (method url-fetch)
1820 (uri (pypi-uri "kitchen" version))
1821 (sha256
1822 (base32
1823 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
1824 (build-system python-build-system)
1825 (propagated-inputs
1826 `(("python-chardet" ,python-chardet)))
1827 (home-page "https://github.com/fedora-infra/kitchen")
1828 (synopsis "Python API for snippets")
1829 (description "@code{kitchen} module provides a python API for all sorts of
1830little useful snippets of code that everybody ends up writing for their projects
1831but never seem big enough to build an independent release. Use kitchen and stop
1832cutting and pasting that code over and over.")
1833 (license (list license:lgpl2.1+
1834 ;; subprocess.py, test_subprocess.py,
1835 ;; kitchen/pycompat25/defaultdict.py:
1836 license:psfl))))
1837
1838(define-public python2-kitchen
1839 (package-with-python2 python-kitchen))
1840
1841(define-public python-unidecode
1842 (package
1843 (name "python-unidecode")
1844 (version "1.0.23")
1845 (source (origin
1846 (method url-fetch)
1847 (uri (pypi-uri "Unidecode" version))
1848 (sha256
1849 (base32
1850 "1ysjbr3nqfqj97h8zyj3v9pya413vkv7a1mzml80w37xx15kb1cb"))))
1851 (build-system python-build-system)
1852 (home-page "https://pypi.python.org/pypi/Unidecode")
1853 (synopsis "ASCII transliterations of Unicode text")
1854 (description
1855 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
1856useful when integrating with legacy code that doesn't support Unicode, or for
1857ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
1858machine identifiers from human-readable Unicode strings that should still be
1859somewhat intelligible.")
1860 (license license:gpl2+)))
1861
1862(define-public python2-unidecode
1863 (package-with-python2 python-unidecode))
1864
1865(define-public python-pyjwt
1866 (package
1867 (name "python-pyjwt")
1868 (version "1.5.3")
1869 (source
1870 (origin
1871 (method url-fetch)
1872 (uri (pypi-uri "PyJWT" version))
1873 (sha256
1874 (base32
1875 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
1876 (modules '((guix build utils)))
1877 (snippet
1878 '(begin
1879 (for-each delete-file-recursively
1880 (find-files "." "\\.pyc$"))
1881 #t))))
1882 (build-system python-build-system)
1883 (native-inputs
1884 `(("python-pytest" ,python-pytest)
1885 ("python-pytest-cov" ,python-pytest-cov)
1886 ("python-pytest-runner" ,python-pytest-runner)))
1887 (home-page "https://github.com/progrium/pyjwt")
1888 (synopsis "JSON Web Token implementation in Python")
1889 (description
1890 "PyJWT is a JSON Web Token implementation written in Python.")
1891 (license license:expat)))
1892
1893(define-public python2-pyjwt
1894 (package-with-python2 python-pyjwt))
1895
1896(define-public python-pykka
1897 (package
1898 (name "python-pykka")
1899 (version "1.2.1")
1900 (source
1901 (origin
1902 (method url-fetch)
1903 (uri (pypi-uri "Pykka" version))
1904 (sha256
1905 (base32
1906 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
1907 (build-system python-build-system)
1908 (native-inputs
1909 `(("python-mock" ,python-mock)
1910 ("python-nose" ,python-nose)
1911 ("python-gevent" ,python-gevent)
1912 ("python-eventlet" ,python-eventlet)))
1913 (home-page "https://www.pykka.org/")
1914 (synopsis "Pykka is a Python implementation of the actor model")
1915 (description
1916 "Pykka is a Python implementation of the actor model.
1917The actor model introduces some simple rules to control the sharing
1918of state and cooperation between execution units, which makes it
1919easier to build concurrent applications.")
1920 (license license:asl2.0)))
1921
1922(define-public python2-pykka
1923 (package-with-python2 python-pykka))
1924
1925(define-public python-pympler
1926 (package
1927 (name "python-pympler")
1928 (home-page "https://pythonhosted.org/Pympler/")
1929 (version "0.5")
1930 (source (origin
1931 (method url-fetch)
1932 (uri (pypi-uri "Pympler" version))
1933 (sha256
1934 (base32
1935 "03qwsbilqgvnbl3a1jmpgixbr2kq6m3fvdlzyr3wdp01bwlc85kx"))))
1936 (build-system python-build-system)
1937 (arguments
1938 `(#:phases (modify-phases %standard-phases
1939 (delete 'check)
1940 (add-after 'install 'check
1941 (lambda* (#:key inputs outputs #:allow-other-keys)
1942 (add-installed-pythonpath inputs outputs)
1943 (invoke "python" "setup.py" "test"))))))
1944 (synopsis "Measure, monitor and analyze memory behavior")
1945 (description
1946 "Pympler is a development tool to measure, monitor and analyze
1947the memory behavior of Python objects in a running Python application.
1948
1949By pympling a Python application, detailed insight in the size and the
1950lifetime of Python objects can be obtained. Undesirable or unexpected
1951runtime behavior like memory bloat and other @samp{pymples} can easily
1952be identified.
1953
1954A web profiling frontend exposes process statistics, garbage
1955visualisation and class tracker statistics.")
1956 (license license:asl2.0)))
1957
1958(define-public python2-pympler
1959 (package-with-python2 python-pympler))
1960
1961(define-public python-itsdangerous
1962 (package
1963 (name "python-itsdangerous")
1964 (version "0.24")
1965 (source
1966 (origin
1967 (method url-fetch)
1968 (uri (string-append
1969 "https://pypi.python.org/packages/source/i/itsdangerous/itsdangerous-"
1970 version ".tar.gz"))
1971 (sha256
1972 (base32
1973 "06856q6x675ly542ig0plbqcyab6ksfzijlyf1hzhgg3sgwgrcyb"))))
1974 (build-system python-build-system)
1975 (home-page "https://github.com/mitsuhiko/itsdangerous")
1976 (synopsis "Python library for passing data to/from untrusted environments")
1977 (description
1978 "Itsdangerous provides various helpers to pass trusted data to untrusted
1979environments and back.")
1980 (license license:bsd-3)))
1981
1982(define-public python2-itsdangerous
1983 (package-with-python2 python-itsdangerous))
1984
1985(define-public python-pyyaml
1986 (package
1987 (name "python-pyyaml")
1988 (version "3.13")
1989 (source
1990 (origin
1991 (method url-fetch)
1992 (uri (pypi-uri "PyYAML" version))
1993 (sha256
1994 (base32
1995 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
1996 (build-system python-build-system)
1997 (inputs
1998 `(("libyaml" ,libyaml)))
1999 (home-page "http://pyyaml.org/wiki/PyYAML")
2000 (synopsis "YAML parser and emitter for Python")
2001 (description
2002 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2003complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2004API, and sensible error messages. PyYAML supports standard YAML tags and
2005provides Python-specific tags that allow to represent an arbitrary Python
2006object.")
2007 (license license:expat)))
2008
2009(define-public python2-pyyaml
2010 (package-with-python2 python-pyyaml))
2011
2012(define-public python-vine
2013 (package
2014 (name "python-vine")
2015 (version "1.1.4")
2016 (source
2017 (origin
2018 (method url-fetch)
2019 (uri (pypi-uri "vine" version))
2020 (sha256
2021 (base32
2022 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2023 (build-system python-build-system)
2024 (native-inputs
2025 `(("python-pytest" ,python-pytest)
2026 ("python-case" ,python-case)))
2027 (home-page "https://github.com/celery/vine")
2028 (synopsis "Promises for Python")
2029 (description
2030 "@code{vine} provides a special implementation of promises in that it can
2031be used both for \"promise of a value\" and lazy evaluation. The biggest
2032upside for this is that everything in a promise can also be a promise,
2033e.g. filters, callbacks and errbacks can all be promises.")
2034 (license license:bsd-3)))
2035
2036(define-public python-virtualenv
2037 (package
2038 (name "python-virtualenv")
2782bd51 2039 (version "16.1.0")
44d10b1f
RW
2040 (source
2041 (origin
2042 (method url-fetch)
2043 (uri (pypi-uri "virtualenv" version))
2044 (sha256
2045 (base32
2782bd51 2046 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
44d10b1f
RW
2047 (build-system python-build-system)
2048 (arguments
2049 `(#:phases
2050 (modify-phases %standard-phases
2782bd51 2051 (add-before 'check 'disable-failing-test
44d10b1f
RW
2052 (lambda _
2053 ;; Disable failing test. See upstream bug report
2054 ;; https://github.com/pypa/virtualenv/issues/957
2055 (substitute* "tests/test_virtualenv.py"
2056 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2782bd51 2057 #t)))))
44d10b1f
RW
2058 (native-inputs
2059 `(("python-mock" ,python-mock)
2060 ("python-pytest" ,python-pytest)))
2061 (home-page "https://virtualenv.pypa.io/")
2062 (synopsis "Virtual Python environment builder")
2063 (description
2064 "Virtualenv is a tool to create isolated Python environments.")
2065 (license license:expat)))
2066
2067(define-public python2-virtualenv
2068 (package-with-python2 python-virtualenv))
2069
2070(define-public python-markupsafe
2071 (package
2072 (name "python-markupsafe")
2073 (version "1.0")
2074 (source
2075 (origin
2076 (method url-fetch)
2077 (uri (string-append
2078 "https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-"
2079 version ".tar.gz"))
2080 (sha256
2081 (base32
2082 "0rdn1s8x9ni7ss8rfiacj7x1085lx8mh2zdwqslnw8xc3l4nkgm6"))))
2083 (build-system python-build-system)
2084 (home-page "https://github.com/mitsuhiko/markupsafe")
2085 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2086 (description
2087 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2088for Python.")
2089 (license license:bsd-3)))
2090
2091(define-public python2-markupsafe
2092 (package-with-python2 python-markupsafe))
2093
2094(define-public python-jinja2
2095 (package
2096 (name "python-jinja2")
2097 (version "2.10")
2098 (source
2099 (origin
2100 (method url-fetch)
2101 (uri (pypi-uri "Jinja2" version))
2102 (sha256
2103 (base32
2104 "190l36hfw3wb2n3n68yacjabxyb1pnxwn7vjx96cmjj002xy2jzq"))))
2105 (build-system python-build-system)
2106 (propagated-inputs
2107 `(("python-markupsafe" ,python-markupsafe)))
2108 (home-page "http://jinja.pocoo.org/")
2109 (synopsis "Python template engine")
2110 (description
2111 "Jinja2 is a small but fast and easy to use stand-alone template engine
2112written in pure Python.")
2113 (license license:bsd-3)))
2114
2115(define-public python2-jinja2
2116 (package-with-python2 python-jinja2))
2117
2118(define-public python-pystache
2119 (package
2120 (name "python-pystache")
2121 (version "0.5.4")
2122 (source (origin
2123 (method url-fetch)
2124 (uri (pypi-uri "pystache" version))
2125 (sha256
2126 (base32
2127 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2128 (build-system python-build-system)
2129 (arguments
2130 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2131 (home-page "http://defunkt.io/pystache/")
2132 (synopsis "Python logic-less template engine")
2133 (description
2134 "Pystache is a Python implementation of the framework agnostic,
2135logic-free templating system Mustache.")
2136 (license license:expat)
2137 (properties `((python2-variant . ,(delay python2-pystache))))))
2138
2139(define-public python2-pystache
2140 (package (inherit (package-with-python2
2141 (strip-python2-variant python-pystache)))
2142 (arguments
2143 `(#:python ,python-2
2144 #:phases
2145 (modify-phases %standard-phases
2146 (replace 'check
2147 (lambda _
dfafc29b 2148 (invoke "python" "test_pystache.py"))))))))
44d10b1f
RW
2149
2150(define-public python-joblib
2151 (package
2152 (name "python-joblib")
2153 (version "0.13.0")
2154 (source (origin
2155 (method url-fetch)
2156 (uri (pypi-uri "joblib" version))
2157 (sha256
2158 (base32
2159 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2160 (build-system python-build-system)
2161 (arguments
2162 `(#:phases
2163 (modify-phases %standard-phases
2164 (replace 'check
2165 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2166 (native-inputs
2167 `(("python-pytest" ,python-pytest)))
2168 (home-page "https://joblib.readthedocs.io/")
2169 (synopsis "Using Python functions as pipeline jobs")
2170 (description
2171 "Joblib is a set of tools to provide lightweight pipelining in Python.
2172In particular, joblib offers: transparent disk-caching of the output values
2173and lazy re-evaluation (memoize pattern), easy simple parallel computing
2174logging and tracing of the execution.")
2175 (license license:bsd-3)))
2176
2177(define-public python2-joblib
2178 (package-with-python2 python-joblib))
2179
2180(define-public python-docutils
2181 (package
2182 (name "python-docutils")
2183 (version "0.14")
2184 (source
2185 (origin
2186 (method url-fetch)
2187 (uri (pypi-uri "docutils" version))
2188 (sha256
2189 (base32
2190 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2191 (build-system python-build-system)
2192 (arguments
2193 '(#:tests? #f)) ; no setup.py test command
2194 (home-page "http://docutils.sourceforge.net/")
2195 (synopsis "Python Documentation Utilities")
2196 (description
2197 "Docutils is a modular system for processing documentation into useful
2198formats, such as HTML, XML, and LaTeX. For input Docutils supports
2199reStructuredText.")
2200 ;; Most of the source code is public domain, but some source files are
2201 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2202 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2203
2204(define-public python2-docutils
2205 (package-with-python2 python-docutils))
2206
2207(define-public python-pygments
2208 (package
2209 (name "python-pygments")
2210 (version "2.2.0")
2211 (source
2212 (origin
2213 (method url-fetch)
2214 (uri (pypi-uri "Pygments" version))
2215 (sha256
2216 (base32
2217 "1k78qdvir1yb1c634nkv6rbga8wv4289xarghmsbbvzhvr311bnv"))))
2218 (build-system python-build-system)
2219 (arguments
2220 ;; FIXME: Tests require sphinx, which depends on this.
2221 '(#:tests? #f))
2222 (home-page "http://pygments.org/")
2223 (synopsis "Syntax highlighting")
2224 (description
2225 "Pygments is a syntax highlighting package written in Python.")
2226 (license license:bsd-2)))
2227
2228(define-public python2-pygments
2229 (package-with-python2 python-pygments))
2230
2231(define-public python-sphinxcontrib-websupport
2232 (package
2233 (name "python-sphinxcontrib-websupport")
2234 (version "1.1.0")
2235 (source (origin
2236 (method url-fetch)
2237 (uri (pypi-uri "sphinxcontrib-websupport" version))
2238 (sha256
2239 (base32
2240 "1ff3ix76xi1y6m99qxhaq5161ix9swwzydilvdya07mgbcvpzr4x"))))
2241 (build-system python-build-system)
2242 (arguments
2243 ;; FIXME: Tests depend on Sphinx, which depends on this.
2244 `(#:tests? #f))
2245 (home-page "http://sphinx-doc.org/")
2246 (synopsis "Sphinx API for web applications")
2247 (description "This package provides a Python API to easily integrate
2248Sphinx documentation into your web application. It provides tools to
2249integrate Sphinx documents in web templates and to handle searches.")
2250 (license license:bsd-3)))
2251
2252(define-public python2-sphinxcontrib-websupport
2253 (package-with-python2 python-sphinxcontrib-websupport))
2254
2255(define-public python-sphinx
2256 (package
2257 (name "python-sphinx")
2258 (version "1.7.7")
2259 (source
2260 (origin
2261 (method url-fetch)
2262 (uri (pypi-uri "Sphinx" version))
2263 (sha256
2264 (base32
2265 "0pkkbfj7cl157q550gcs45am5y78ps0h7q6455d64s1zmw01jlvi"))))
2266 (build-system python-build-system)
2267 (arguments
2268 `(#:phases
2269 (modify-phases %standard-phases
2270 (replace 'check
2271 (lambda _
2272 ;; Requires Internet access.
2273 (delete-file "tests/test_build_linkcheck.py")
2274 (substitute* "tests/test_build_latex.py"
2275 (("@pytest.mark.sphinx\\('latex', testroot='images'\\)")
2276 "@pytest.mark.skip()"))
2277 (when (which "python")
2278 ;; XXX: These tests are broken when using Python2:
2279 ;; <https://github.com/sphinx-doc/sphinx/issues/4710>.
2280 (delete-file "tests/test_api_translator.py")
2281 (delete-file "tests/test_setup_command.py"))
2282 (invoke "make" "test"))))))
2283 (propagated-inputs
2284 `(("python-imagesize" ,python-imagesize)
2285 ("python-sphinx-alabaster-theme"
2286 ,python-sphinx-alabaster-theme)
2287 ("python-babel" ,python-babel)
2288 ("python-snowballstemmer" ,python-snowballstemmer)
2289 ("python-docutils" ,python-docutils)
2290 ("python-jinja2" ,python-jinja2)
2291 ("python-packaging" ,python-packaging)
2292 ("python-pygments" ,python-pygments)
2293 ("python-requests" ,python-requests)
2294 ("python-six" ,python-six)
2295 ("python-sphinxcontrib-websupport" ,python-sphinxcontrib-websupport)))
2296 (native-inputs
2297 `(("graphviz" ,graphviz)
2298 ("imagemagick" ,imagemagick) ;for "convert"
2299 ("python-html5lib" ,python-html5lib)
2300 ("python-mock" ,python-mock)
2301 ("python-nose" ,python-nose)
2302 ("python-pytest" ,python-pytest)))
2303 (home-page "http://sphinx-doc.org/")
2304 (synopsis "Python documentation generator")
2305 (description "Sphinx is a tool that makes it easy to create documentation
2306for Python projects or other documents consisting of multiple reStructuredText
2307sources.")
2308 (license license:bsd-3)
2309 (properties `((python2-variant . ,(delay python2-sphinx))))))
2310
2311(define-public python2-sphinx
2312 (let ((base (package-with-python2 (strip-python2-variant python-sphinx))))
2313 (package
2314 (inherit base)
2315 (native-inputs `(("python2-mock" ,python2-mock)
2316 ("python2-enum34" ,python2-enum34)
2317 ,@(package-native-inputs base)))
2318 (propagated-inputs `(("python2-pytz" ,python2-pytz)
2319 ("python2-typing" ,python2-typing)
2320 ,@(package-propagated-inputs base))))))
2321
2322(define-public python-sphinx-gallery
2323 (package
2324 (name "python-sphinx-gallery")
2325 (version "0.1.13")
2326 (source (origin
2327 (method url-fetch)
2328 (uri (string-append "https://github.com/sphinx-gallery/sphinx-gallery"
2329 "/archive/v" version ".tar.gz"))
2330 (file-name (string-append name "-" version ".tar.gz"))
2331 (sha256
2332 (base32
2333 "03fs99mcb1r7qp0xixqv07vcz98sk21yq19ffdysi0infdcpzfkd"))))
2334 (build-system python-build-system)
2335 (arguments
2336 ;; FIXME: Tests attempt to download <https://docs.python.org/3/objects.inv>,
2337 ;; <https://docs.scipy.org/doc/numpy/objects.inv>, and
2338 ;; <https://matplotlib.org/objects.inv>.
2339 `(#:tests? #f))
2340 (native-inputs
2341 `(("python-pytest-runner" ,python-pytest-runner)))
2342 (home-page "https://sphinx-gallery.github.io/")
2343 (synopsis "Generate an examples gallery automatically")
2344 (description
2345 "@code{sphinx_gallery} is a Sphinx extension that builds an HTML version
2346from any set of Python scripts and puts it into an examples gallery.")
2347 (license license:bsd-3)))
2348
2349(define-public python2-sphinx-gallery
2350 (package-with-python2 python-sphinx-gallery))
2351
2352(define-public python-sphinx-rtd-theme
2353 (package
2354 (name "python-sphinx-rtd-theme")
2355 (version "0.2.4")
2356 (source
2357 (origin
2358 (method url-fetch)
2359 (uri (pypi-uri "sphinx_rtd_theme" version))
2360 (sha256
2361 (base32
2362 "05rlhjzdyapr2w74jjs7mrm8hi69qskcr5vya9f9drpsys7lpxrd"))))
2363 (build-system python-build-system)
2364 (arguments '(#:tests? #f)) ; No tests.
2365 (propagated-inputs
2366 `(("python-sphinx" ,python-sphinx)))
2367 (home-page "https://github.com/snide/sphinx_rtd_theme/")
2368 (synopsis "ReadTheDocs.org theme for Sphinx")
2369 (description "A theme for Sphinx used by ReadTheDocs.org.")
2370 (license license:expat)))
2371
2372(define-public python2-sphinx-rtd-theme
2373 (package-with-python2 python-sphinx-rtd-theme))
2374
2375(define-public python-guzzle-sphinx-theme
2376 (package
2377 (name "python-guzzle-sphinx-theme")
2378 (version "0.7.11")
2379 (source
2380 (origin
2381 (method url-fetch)
2382 (uri (pypi-uri "guzzle_sphinx_theme" version))
2383 (sha256
2384 (base32
2385 "1rnkzrrsbnifn3vsb4pfaia3nlvgvw6ndpxp7lzjrh23qcwid34v"))))
2386 (build-system python-build-system)
2387 (propagated-inputs
2388 `(("python-sphinx" ,python-sphinx)))
2389 (home-page "https://github.com/guzzle/guzzle_sphinx_theme")
2390 (synopsis "Sphinx theme used by Guzzle")
2391 (description "This package provides guzzle_sphinx_theme, a theme for the
2392Sphinx documentation system, used by @uref{http://docs.guzzlephp.org, Guzzle}
2393and several other projects.")
2394 (license license:expat)))
2395
2396(define-public python2-guzzle-sphinx-theme
2397 (package-with-python2 python-guzzle-sphinx-theme))
2398
2399(define-public python-rst.linker
2400 (package
2401 (name "python-rst.linker")
2402 (version "1.10")
2403 (source
2404 (origin
2405 (method url-fetch)
2406 (uri (pypi-uri "rst.linker" version))
2407 (sha256
2408 (base32
2409 "0iqaacp7pj1s8avs4kc0qg0r7dscywaq37y6l9j14glqdikk0wdj"))))
2410 (build-system python-build-system)
2411 (propagated-inputs
2412 `(("python-dateutil" ,python-dateutil)
2413 ("python-six" ,python-six)))
2414 (native-inputs
2415 `(("python-setuptools-scm" ,python-setuptools-scm)))
2416 ;; Test would require path.py, which would introduce a cyclic dependence.
2417 (arguments `(#:tests? #f))
2418 ;; Note: As of version 1.7 the documentation is not worth building.
2419 (home-page "https://github.com/jaraco/rst.linker")
2420 (synopsis "Sphinx plugin to add links and timestamps")
2421 (description "rst.linker allows to automatically replace text by a
2422reStructuredText external reference or timestamps. It's primary purpose is to
2423augment the changelog, but it can be used for other documents, too.")
2424 (license license:expat)))
2425
2426(define-public python2-rst.linker
2427 (package-with-python2 python-rst.linker))
2428
2429(define-public python-feedgenerator
2430 (package
2431 (name "python-feedgenerator")
2432 (version "1.9")
2433 (source
2434 (origin
2435 (method url-fetch)
2436 (uri (pypi-uri "feedgenerator" version))
2437 (sha256
2438 (base32
2439 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2440 (modules '((guix build utils)))
2441 (snippet
2442 '(begin
2443 ;; Remove pre-compiled .pyc files from source.
2444 (for-each delete-file-recursively
2445 (find-files "." "__pycache__" #:directories? #t))
2446 (for-each delete-file (find-files "." "\\.pyc$"))
2447 #t))))
2448 (build-system python-build-system)
2449 (propagated-inputs
2450 `(("python-pytz" ,python-pytz)
2451 ("python-six" ,python-six)))
2452 (home-page "https://github.com/getpelican/feedgenerator")
2453 (synopsis
2454 "Standalone version of Django's Atom/RSS feed generator")
2455 (description
2456 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2457which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2458 (license license:bsd-3)))
2459
2460(define-public python2-feedgenerator
2461 (package-with-python2 python-feedgenerator))
2462
2463(define-public python-toml
2464 (package
2465 (name "python-toml")
2466 (version "0.9.4")
2467 (source
2468 (origin
2469 (method url-fetch)
2470 (uri (pypi-uri "toml" version))
2471 (sha256
2472 (base32
2473 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
2474 (build-system python-build-system)
2475 (arguments
2476 `(#:tests? #f)) ;no tests suite in release
2477 (home-page "https://github.com/uiri/toml")
2478 (synopsis "Library for TOML")
2479 (description
2480 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
2481Language (TOML) configuration files.")
2482 (license license:expat)))
2483
2484(define-public python-black
2485 (package
2486 (name "python-black")
2487 (version "18.6b4")
2488 (source
2489 (origin
2490 (method url-fetch)
2491 (uri (pypi-uri "black" version))
2492 (sha256
2493 (base32
2494 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
2495 (build-system python-build-system)
2496 (arguments
2497 `(#:phases
2498 (modify-phases %standard-phases
2499 (add-after 'patch-source-shebangs 'patch-extra-shebangs
2500 (lambda _
2501 (let ((python3 (which "python3")))
2502 (substitute* '("tests/data/fmtonoff.py"
2503 "tests/data/string_prefixes.py"
2504 "tests/data/function.py")
2505 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
2506 (string-append "#!" python3 (if (string? minor-version)
2507 minor-version
2508 ""))))))))))
2509 (propagated-inputs
2510 `(("python-click" ,python-click)
2511 ("python-attrs" ,python-attrs)
2512 ("python-appdirs" ,python-appdirs)
2513 ("python-toml" ,python-toml)))
2514 (home-page "https://github.com/ambv/black")
2515 (synopsis "The uncompromising code formatter")
2516 (description "Black is the uncompromising Python code formatter.")
2517 (license license:expat)))
2518
2519(define-public python-blinker
2520 (package
2521 (name "python-blinker")
2522 (version "1.4")
2523 (source
2524 (origin
2525 (method url-fetch)
2526 (uri (pypi-uri "blinker" version))
2527 (sha256
2528 (base32
2529 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
2530 (build-system python-build-system)
2531 (home-page "http://pythonhosted.org/blinker/")
2532 (synopsis "Fast, simple object-to-object and broadcast signaling")
2533 (description
2534 "Blinker provides a fast dispatching system that allows any number of
2535interested parties to subscribe to events, or \"signals\".")
2536 (license license:expat)))
2537
2538(define-public python2-blinker
2539 (package-with-python2 python-blinker))
2540
2541(define-public pelican
2542 (package
2543 (name "pelican")
2544 (version "3.7.1")
2545 (source
2546 (origin
2547 (method url-fetch)
2548 (uri (pypi-uri "pelican" version))
2549 (sha256
2550 (base32
2551 "12spygavv9b6xpb5pgp7f0p3z0mms60nx6zrpx1yfkj68zz4flra"))))
2552 (build-system python-build-system)
2553 (propagated-inputs
2554 `(("python-feedgenerator" ,python-feedgenerator)
2555 ("python-jinja2" ,python-jinja2)
2556 ("python-pygments" ,python-pygments)
2557 ("python-docutils" ,python-docutils)
2558 ("python-pytz" ,python-pytz)
2559 ("python-blinker" ,python-blinker)
2560 ("python-unidecode" ,python-unidecode)
2561 ("python-six" ,python-six)
2562 ("python-dateutil" ,python-dateutil)
2563 ("python-markdown" ,python-markdown)))
2564 (home-page "https://getpelican.com/")
2565 (arguments
2566 `(;; XXX Requires a lot more packages to do unit tests :P
2567 #:tests? #f
2568 #:phases (modify-phases %standard-phases
2569 (add-before
2570 'install 'adjust-requires
2571 ;; Since feedgenerator is installed from git, it doesn't
2572 ;; conform to the version requirements.
2573 ;;
2574 ;; We *do have* "feedgenerator >= 1.6", but strip off the
2575 ;; version requirement so setuptools doesn't get confused.
2576 (lambda _
2577 (substitute* "setup.py"
2578 (("['\"]feedgenerator.*?['\"]")
2579 "'feedgenerator'")))))))
2580 (synopsis "Python-based static site publishing system")
2581 (description
2582 "Pelican is a tool to generate a static blog from reStructuredText,
2583Markdown input files, and more. Pelican uses Jinja2 for templating
2584and is very extensible.")
2585 (license license:agpl3+)))
2586
2587(define-public python-scikit-image
2588 (package
2589 (name "python-scikit-image")
2590 (version "0.14.1")
2591 (source
2592 (origin
2593 (method url-fetch)
2594 (uri (pypi-uri "scikit-image" version))
2595 (sha256
2596 (base32 "0l1c3rl4s1jyv80i5hns4pgih09zrxfj7lygdc51w8sgyysb7ac6"))))
2597 (build-system python-build-system)
2598 (arguments
2599 ;; TODO: Some tests require running X11 server. Disable them?
2600 '(#:tests? #f))
2601 ;; See DEPENDS.txt for the list of build and run time requiremnts
2602 (propagated-inputs
2603 `(("python-cloudpickle" ,python-cloudpickle)
2604 ("python-dask" ,python-dask)
2605 ("python-matplotlib" ,python-matplotlib)
2606 ("python-networkx" ,python-networkx)
2607 ("python-numpy" ,python-numpy)
2608 ("python-pillow" ,python-pillow)
2609 ("python-pywavelets" ,python-pywavelets)
2610 ("python-scipy" ,python-scipy)
2611 ("python-six" ,python-six)))
2612 (native-inputs
2613 `(("python-cython" ,python-cython)))
2614 (home-page "http://scikit-image.org/")
2615 (synopsis "Image processing in Python")
2616 (description
2617 "Scikit-image is a collection of algorithms for image processing.")
2618 (license license:bsd-3)))
2619
2620(define-public python2-scikit-image
2621 (package-with-python2 python-scikit-image))
2622
2623(define-public python-cython
2624 (package
2625 (name "python-cython")
2626 (version "0.28.4")
2627 (source
2628 (origin
2629 (method url-fetch)
2630 (uri (pypi-uri "Cython" version))
2631 (sha256
2632 (base32
2633 "0imw9s2rbrh32clbl10csnwmig9p3nzkrd2baxxxfmnrsc42pb3n"))))
2634 (build-system python-build-system)
2635 ;; we need the full python package and not just the python-wrapper
2636 ;; because we need libpython3.3m.so
2637 (inputs
2638 `(("python" ,python)))
2639 (arguments
2640 `(#:phases
2641 (modify-phases %standard-phases
2642 (add-before 'check 'set-HOME
2643 ;; some tests require access to "$HOME/.cython"
2644 (lambda _ (setenv "HOME" "/tmp") #t))
2645
2646 ;; FIXME: These tests started failing on armhf after the 0.28 update
2647 ;; (commit c69d11c5930), both with an error such as this:
2648 ;; compiling (cpp) and running dictcomp ...
2649 ;; === C/C++ compiler error output: ===
2650 ;; ‘
2651 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
2652 ;; See <https://hydra.gnu.org/build/2948724> for logs.
2653 ,@(if (target-arm32?)
2654 `((add-before 'check 'disable-failing-tests
2655 (lambda _
2656 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
2657 (for-each (lambda (test)
2658 (format disabled-tests "~a\n" test))
2659 '("memslice" "dictcomp"))
2660 (close-port disabled-tests)))))
2661 '())
2662
2663 (replace 'check
2664 (lambda _
2665 ;; The "with_outer_raising" test fails with Python 3.7. See
2666 ;; https://github.com/cython/cython/issues/2454
2667 (delete-file "tests/run/generators_py.py")
2668 (invoke "python" "runtests.py" "-vv"))))))
2669 (home-page "http://cython.org/")
2670 (synopsis "C extensions for Python")
2671 (description "Cython is an optimising static compiler for both the Python
2672programming language and the extended Cython programming language. It makes
2673writing C extensions for Python as easy as Python itself.")
2674 (license license:asl2.0)
2675 (properties `((python2-variant . ,(delay python2-cython))))))
2676
2677(define-public python2-cython
2678 (package (inherit (package-with-python2
2679 (strip-python2-variant python-cython)))
2680 (name "python2-cython")
2681 (inputs
2682 `(("python-2" ,python-2))))) ; this is not automatically changed
2683
2684;; The RPython toolchain currently does not support Python 3.
2685(define-public python2-rpython
2686 (package
2687 (name "python2-rpython")
2688 (version "0.2.1")
2689 (source
2690 (origin
2691 (method url-fetch)
2692 (uri (pypi-uri "rpython" version))
2693 (sha256
2694 (base32
2695 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
2696 (build-system python-build-system)
2697 (arguments `(#:python ,python-2))
2698 (native-inputs
2699 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
2700 (home-page "https://rpython.readthedocs.org")
2701 (synopsis "Framework for implementing interpreters and virtual machines")
2702 (description "RPython is a translation and support framework for
2703producing implementations of dynamic languages, emphasizing a clean separation
2704between language specification and implementation aspects.")
2705 (license license:expat)))
2706
2707;; NOTE: when upgrading numpy please make sure that python-pandas and
2708;; python-scipy still build, as these three packages are often used together.
2709(define-public python-numpy
2710 (package
2711 (name "python-numpy")
2712 (version "1.15.4")
2713 (source
2714 (origin
2715 (method url-fetch)
2716 (uri (string-append
2717 "https://github.com/numpy/numpy/releases/download/v"
2718 version "/numpy-" version ".tar.gz"))
2719 (sha256
2720 (base32
2721 "102vcl2qq4pjbm7a3d67vkkvn4466ngia1d8wi5avqwqh8j0jvkn"))))
2722 (build-system python-build-system)
2723 (inputs
2724 `(("openblas" ,openblas)
2725 ("lapack" ,lapack)))
2726 (native-inputs
2727 `(("python-cython" ,python-cython)
2728 ("python-pytest" ,python-pytest)
2729 ("gfortran" ,gfortran)))
2730 (arguments
2731 `(#:phases
2732 (modify-phases %standard-phases
2733 (add-before 'build 'configure-blas-lapack
2734 (lambda* (#:key inputs #:allow-other-keys)
2735 (call-with-output-file "site.cfg"
2736 (lambda (port)
2737 (format port
2738 "[openblas]
2739libraries = openblas
2740library_dirs = ~a/lib
2741include_dirs = ~a/include
2742
2743# backslash-n to make emacs happy
2744\n[lapack]
2745lapack_libs = lapack
2746library_dirs = ~a/lib
2747include_dirs = ~a/include
2748"
2749 (assoc-ref inputs "openblas")
2750 (assoc-ref inputs "openblas")
2751 (assoc-ref inputs "lapack")
2752 (assoc-ref inputs "lapack"))))
2753 #t))
2754 (add-before 'build 'fix-executable-paths
2755 (lambda* (#:key inputs #:allow-other-keys)
2756 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
2757 ;; instead of /bin/sh.
2758 (substitute* "numpy/distutils/exec_command.py"
2759 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
2760 (string-append match-start (assoc-ref inputs "bash") match-end)))
2761 ;; Use "gcc" executable, not "cc".
2762 (substitute* "numpy/distutils/system_info.py"
2763 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
2764 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
2765 #t))
2766 ;; Tests can only be run after the library has been installed and not
2767 ;; within the source directory.
2768 (delete 'check)
2769 (add-after 'install 'check
2770 (lambda* (#:key outputs inputs #:allow-other-keys)
2771 ;; Make installed package available for running the tests
2772 (add-installed-pythonpath inputs outputs)
2773 ;; Make sure "f2py" etc is found.
2774 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
2775 ":" (getenv "PATH")))
2776 (with-directory-excursion "/tmp"
2777 (invoke "python" "-c"
2778 "import numpy; numpy.test(verbose=2)")))))))
2779 (home-page "http://www.numpy.org/")
2780 (synopsis "Fundamental package for scientific computing with Python")
2781 (description "NumPy is the fundamental package for scientific computing
2782with Python. It contains among other things: a powerful N-dimensional array
2783object, sophisticated (broadcasting) functions, tools for integrating C/C++
2784and Fortran code, useful linear algebra, Fourier transform, and random number
2785capabilities.")
2786 (license license:bsd-3)))
2787
2788(define-public python2-numpy
2789 (package-with-python2 python-numpy))
2790
2791;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
2792;; interest only for legacy code going back to NumPy's predecessor
2793;; Numeric.
2794(define-public python2-numpy-1.8
2795 (package (inherit python2-numpy)
2796 (version "1.8.2")
2797 (source
2798 (origin
2799 (method url-fetch)
2800 (uri (string-append
2801 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
2802 (file-name (string-append "python2-numpy-" version ".tar.gz"))
2803 (sha256
2804 (base32
2805 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
2806 (arguments
2807 (substitute-keyword-arguments (package-arguments python2-numpy)
2808 ((#:phases phases)
2809 `(modify-phases ,phases
2810 (replace 'configure-blas-lapack
2811 (lambda* (#:key inputs #:allow-other-keys)
2812 (call-with-output-file "site.cfg"
2813 (lambda (port)
2814 (format port
2815 "[openblas]
2816libraries = openblas,lapack
2817library_dirs = ~a/lib:~a/lib
2818include_dirs = ~a/include:~a/include
2819"
2820 (assoc-ref inputs "openblas")
2821 (assoc-ref inputs "lapack")
2822 (assoc-ref inputs "openblas")
2823 (assoc-ref inputs "lapack"))))
2824 #t))))))
2825 (native-inputs
2826 `(("python2-nose" ,python2-nose)))
2827 (description "NumPy is the fundamental package for scientific computing
2828with Python. It contains among other things: a powerful N-dimensional array
2829object, sophisticated (broadcasting) functions, tools for integrating C/C++
2830and Fortran code, useful linear algebra, Fourier transform, and random number
2831capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
2832that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
2833Numeric.")
2834 (license license:bsd-3)))
2835
2836(define-public python-munch
2837 (package
2838 (name "python-munch")
2839 (version "2.0.4")
2840 (source
2841 (origin
2842 (method url-fetch)
2843 (uri (pypi-uri "munch" version))
2844 (sha256
2845 (base32
2846 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
2847 (build-system python-build-system)
2848 (home-page "https://github.com/Infinidat/munch")
2849 (synopsis "Dot-accessible dictionary")
2850 (description "Munch is a dot-accessible dictionary similar to JavaScript
2851objects.")
2852 (license license:expat)))
2853
2854(define-public python2-munch
2855 (package-with-python2 python-munch))
2856
2857(define-public python-colormath
2858 (package
2859 (name "python-colormath")
2860 (version "3.0.0")
2861 (source
2862 (origin
2863 (method url-fetch)
2864 (uri (pypi-uri "colormath" version))
2865 (sha256
2866 (base32
2867 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
2868 (build-system python-build-system)
2869 (propagated-inputs
2870 `(("python-networkx" ,python-networkx)
2871 ("python-numpy" ,python-numpy)))
2872 (home-page "https://github.com/gtaylor/python-colormath")
2873 (synopsis "Color math and conversion library")
2874 (description
2875 "This is a Python library for color math and conversions.")
2876 (license license:bsd-3)))
2877
2878(define-public python2-colormath
2879 (package-with-python2 python-colormath))
2880
2881(define-public python-spectra
2882 (package
2883 (name "python-spectra")
2884 (version "0.0.11")
2885 (source
2886 (origin
2887 (method url-fetch)
2888 (uri (pypi-uri "spectra" version))
2889 (sha256
2890 (base32
2891 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
2892 (build-system python-build-system)
2893 (arguments
2894 `(#:phases
2895 (modify-phases %standard-phases
2896 (replace 'check
38ec0f6a 2897 (lambda _ (invoke "nosetests" "-v"))))))
44d10b1f
RW
2898 (propagated-inputs
2899 `(("python-colormath" ,python-colormath)))
2900 (native-inputs
2901 `(("python-nose" ,python-nose)))
2902 (home-page "https://github.com/jsvine/spectra")
2903 (synopsis "Color scales and color conversion")
2904 (description
2905 "This package provides a Python library intended to make color math,
2906color scales, and color space conversion easy. It has support for:
2907
2908@enumerate
2909@item Color scales
2910@item Color ranges
2911@item Color blending
2912@item Brightening/darkening colors
2913@item Saturating/desaturating colors
2914@item Conversion to/from multiple color spaces.
2915@end enumerate\n")
2916 (license license:expat)))
2917
2918(define-public python2-spectra
2919 (package-with-python2 python-spectra))
2920
2921(define-public python-numpy-documentation
2922 (package
2923 (name "python-numpy-documentation")
2924 (version (package-version python-numpy))
2925 (source (package-source python-numpy))
2926 (build-system python-build-system)
2927 (native-inputs
2928 `(("python-matplotlib" ,python-matplotlib)
2929 ("python-numpy" ,python-numpy)
2930 ("pkg-config" ,pkg-config)
2931 ("python-sphinx" ,python-sphinx)
2932 ("python-numpydoc" ,python-numpydoc)
2933 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
2934 texlive-fonts-cm-super
2935 texlive-fonts-ec
2936 texlive-generic-ifxetex
2937 texlive-generic-pdftex
2938 texlive-latex-amsfonts
2939 texlive-latex-capt-of
2940 texlive-latex-cmap
2941 texlive-latex-environ
2942 texlive-latex-eqparbox
2943 texlive-latex-etoolbox
2944 texlive-latex-expdlist
2945 texlive-latex-fancyhdr
2946 texlive-latex-fancyvrb
2947 texlive-latex-fncychap
2948 texlive-latex-float
2949 texlive-latex-framed
2950 texlive-latex-geometry
2951 texlive-latex-graphics
2952 texlive-latex-hyperref
2953 texlive-latex-mdwtools
2954 texlive-latex-multirow
2955 texlive-latex-needspace
2956 texlive-latex-oberdiek
2957 texlive-latex-parskip
2958 texlive-latex-preview
2959 texlive-latex-tabulary
2960 texlive-latex-threeparttable
2961 texlive-latex-titlesec
2962 texlive-latex-trimspaces
2963 texlive-latex-ucs
2964 texlive-latex-upquote
2965 texlive-latex-url
2966 texlive-latex-varwidth
2967 texlive-latex-wrapfig)))
2968 ("texinfo" ,texinfo)
2969 ("perl" ,perl)
2970 ("scipy-sphinx-theme"
2971 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
2972 (method git-fetch)
2973 (uri (git-reference
2974 (url "https://github.com/scipy/scipy-sphinx-theme.git")
2975 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
2976 (sha256
2977 (base32
2978 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
2979 ,@(package-native-inputs python-numpy)))
2980 (arguments
2981 `(#:tests? #f ; we're only generating the documentation
2982 #:phases
2983 (modify-phases %standard-phases
2984 (delete 'build)
2985 (replace 'install
2986 (lambda* (#:key inputs outputs #:allow-other-keys)
2987 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
2988 (doc (string-append
2989 data "/doc/" ,name "-"
2990 ,(package-version python-numpy)))
2991 (info-reader (string-append data "/info"))
2992 (html (string-append doc "/html"))
2993 (scipy-sphinx-theme "scipy-sphinx-theme")
2994 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
2995 (pyver ,(string-append "PYVER=")))
2996
2997 ;; FIXME: this is needed to for texlive-union to generate
2998 ;; fonts, which are not found.
2999 (setenv "HOME" "/tmp")
3000
3001 (with-directory-excursion "doc"
3002 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3003 (mkdir-p html)
4fc898da
RW
3004 (invoke "make" "html" pyver)
3005 (invoke "make" "latex" "PAPER=a4" pyver)
3006 (invoke "make" "-C" "build/latex"
44d10b1f
RW
3007 "all-pdf" "PAPER=a4" pyver)
3008 ;; FIXME: Generation of the info file fails.
4fc898da 3009 ;; (invoke "make" "info" pyver)
44d10b1f
RW
3010 ;; (mkdir-p info)
3011 ;; (copy-file "build/texinfo/numpy.info"
3012 ;; (string-append info "/numpy.info"))
3013 (for-each (lambda (file)
3014 (copy-file (string-append "build/latex" file)
3015 (string-append doc file)))
3016 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3017 (with-directory-excursion "build/html"
3018 (for-each (lambda (file)
3019 (let* ((dir (dirname file))
3020 (tgt-dir (string-append html "/" dir)))
3021 (unless (equal? "." dir)
3022 (mkdir-p tgt-dir))
3023 (install-file file html)))
3024 (find-files "." ".*")))))
3025 #t)))))
3026 (home-page (package-home-page python-numpy))
3027 (synopsis "Documentation for the python-numpy package")
3028 (description (package-description python-numpy))
3029 (license (package-license python-numpy))))
3030
3031(define-public python2-numpy-documentation
3032 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3033 (package
3034 (inherit numpy-documentation)
3035 (native-inputs `(("python2-functools32" ,python2-functools32)
3036 ,@(package-native-inputs numpy-documentation))))))
3037
3038(define-public python-pygit2
3039 (package
3040 (name "python-pygit2")
3041 (version "0.27.3")
3042 (source
3043 (origin
3044 (method url-fetch)
3045 (uri (pypi-uri "pygit2" version))
3046 (sha256
3047 (base32
3048 "046ahvsb7a20sgvscqfm3cb32sp3sii4gim9vz7zzrkf7yz16xlv"))))
3049 (build-system python-build-system)
3050 (arguments
3051 '(#:phases
3052 (modify-phases %standard-phases
3053 ;; Remove after the next update. See:
3054 ;; https://github.com/libgit2/pygit2/pull/851
3055 (add-after 'unpack 'compile-with-cffi
3056 (lambda _
3057 (substitute* "setup.py"
3058 (("install_requires")
3059 "setup_requires=['cffi'],\n install_requires"))
3060 #t))
3061 (add-after 'unpack 'fix-dependency-versioning
3062 (lambda _
3063 (substitute* "setup.py"
3064 (("<") "<="))
3065 #t)))))
3066 (propagated-inputs
3067 `(("python-six" ,python-six)
3068 ("python-cffi" ,python-cffi)
3069 ("libgit2" ,libgit2)
3070 ("python-tox" ,python-tox)))
3071 (native-inputs
3072 `(("python-pytest" ,python-pytest)))
3073 (home-page "https://github.com/libgit2/pygit2")
3074 (synopsis "Python bindings for libgit2")
3075 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3076library, libgit2 implements Git plumbing.")
3077 ;; GPL2.0 only, with linking exception.
3078 (license license:gpl2)))
3079
3080(define-public python2-pygit2
3081 (package-with-python2 python-pygit2))
3082
3083(define-public python-pyparsing
3084 (package
3085 (name "python-pyparsing")
3086 (version "2.2.1")
3087 (source
3088 (origin
3089 (method url-fetch)
3090 (uri (pypi-uri "pyparsing" version))
3091 (sha256
3092 (base32 "06dgd0iilvf8m0ssmfpcbh8l6jf0zkp8adbb84llksg17crfx4zl"))))
3093 (build-system python-build-system)
3094 (outputs '("out" "doc"))
3095 (arguments
3096 `(#:tests? #f ; no test target
3097 #:phases
3098 (modify-phases %standard-phases
3099 (add-after 'install 'install-doc
3100 (lambda* (#:key outputs #:allow-other-keys)
3101 (let* ((doc (string-append (assoc-ref outputs "doc")
3102 "/share/doc/" ,name "-" ,version))
3103 (html-doc (string-append doc "/html"))
3104 (examples (string-append doc "/examples")))
3105 (mkdir-p html-doc)
3106 (mkdir-p examples)
3107 (for-each
3108 (lambda (dir tgt)
3109 (map (lambda (file)
3110 (install-file file tgt))
3111 (find-files dir ".*")))
3112 (list "docs" "htmldoc" "examples")
3113 (list doc html-doc examples))
3114 #t))))))
3115 (home-page "https://github.com/pyparsing/pyparsing")
3116 (synopsis "Python parsing class library")
3117 (description
3118 "The pyparsing module is an alternative approach to creating and
3119executing simple grammars, vs. the traditional lex/yacc approach, or the use
3120of regular expressions. The pyparsing module provides a library of classes
3121that client code uses to construct the grammar directly in Python code.")
3122 (license license:expat)))
3123
3124(define-public python2-pyparsing
3125 (package-with-python2 python-pyparsing))
3126
3127(define-public python-numpydoc
3128 (package
3129 (name "python-numpydoc")
3130 (version "0.8.0")
3131 (source
3132 (origin
3133 (method url-fetch)
3134 (uri (pypi-uri "numpydoc" version))
3135 (sha256
3136 (base32
3137 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3138 (build-system python-build-system)
3139 (propagated-inputs
3140 `(("python-sphinx" ,python-sphinx)))
3141 (native-inputs
3142 `(("python-nose" ,python-nose)))
3143 (home-page "https://pypi.python.org/pypi/numpydoc")
3144 (synopsis
3145 "Numpy's Sphinx extensions")
3146 (description
3147 "Sphinx extension to support docstrings in Numpy format.")
3148 (license license:bsd-2)))
3149
3150(define-public python2-numpydoc
3151 (package-with-python2 python-numpydoc))
3152
3153(define-public python-numexpr
3154 (package
3155 (name "python-numexpr")
3156 (version "2.6.5")
3157 (source
3158 (origin
3159 (method url-fetch)
3160 (uri (pypi-uri "numexpr" version))
3161 (sha256
3162 (base32
3163 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3164 (build-system python-build-system)
3165 (arguments `(#:tests? #f)) ; no tests included
3166 (propagated-inputs
3167 `(("python-numpy" ,python-numpy)))
3168 (home-page "https://github.com/pydata/numexpr")
3169 (synopsis "Fast numerical expression evaluator for NumPy")
3170 (description
3171 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3172expressions that operate on arrays are accelerated and use less memory than
3173doing the same calculation in Python. In addition, its multi-threaded
3174capabilities can make use of all your cores, which may accelerate
3175computations, most specially if they are not memory-bounded (e.g. those using
3176transcendental functions).")
3177 (license license:expat)))
3178
3179(define-public python2-numexpr
3180 (package-with-python2 python-numexpr))
3181
3182(define-public python-cycler
3183 (package
3184 (name "python-cycler")
3185 (version "0.10.0")
3186 (source (origin
3187 (method url-fetch)
3188 (uri (pypi-uri "cycler" version))
3189 (sha256
3190 (base32
3191 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3192 (build-system python-build-system)
3193 (arguments
3194 ;; XXX: The current version requires 'coveralls' which we don't have.
3195 ;; Enable this for the next release which uses 'python-pytest'.
3196 '(#:tests? #f))
3197 (propagated-inputs
3198 `(("python-six" ,python-six)))
3199 (home-page "http://matplotlib.org/cycler/")
3200 (synopsis "Composable keyword argument iterator")
3201 (description
3202 "When using @code{matplotlib} and plotting more than one line, it is
3203common to want to be able to want to be able to cycle over one or more artist
3204styles; but the plotting logic can quickly become involved.
3205To address this and enable easy cycling over arbitrary @code{kwargs}, the
3206@code{Cycler} class was developed.")
3207 (license license:bsd-3)))
3208
3209(define-public python2-cycler
3210 (package-with-python2 python-cycler))
3211
3212(define-public python-colorspacious
3213 (package
3214 (name "python-colorspacious")
3215 (version "1.1.0")
3216 (source
3217 (origin
3218 (method url-fetch)
3219 (uri (string-append "https://github.com/njsmith/colorspacious/archive/v"
3220 version ".tar.gz"))
3221 (file-name (string-append name "-" version))
3222 (sha256
3223 (base32 "1vflh5jm32qb0skza2i8pjacv09w6gq84fqpp2nj77s0rbmzgr4k"))))
3224 (build-system python-build-system)
3225 (propagated-inputs
3226 `(("python-numpy" ,python-numpy)))
3227 (native-inputs
3228 `(("python-nose" ,python-nose)))
3229 (arguments
3230 `(#:phases
3231 (modify-phases %standard-phases
3232 (replace 'check
3233 (lambda _
c988afda 3234 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
44d10b1f
RW
3235 (home-page "https://github.com/njsmith/colorspacious")
3236 (synopsis "Python library for colorspace conversions")
3237 (description "@code{colorspacious} is a Python library that lets you
3238convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3239 (license license:expat)))
3240
3241(define-public python2-colorspacious
3242 (package-with-python2 python-colorspacious))
3243
3244(define-public python-matplotlib
3245 (package
3246 (name "python-matplotlib")
3247 (version "2.2.3")
3248 (source
3249 (origin
3250 (method url-fetch)
3251 (uri (pypi-uri "matplotlib" version))
3252 (sha256
3253 (base32
3254 "1rcc7x9ig3hpchkc4cwdvym3y451w74275fxr455zkfagrsvymbk"))))
3255 (build-system python-build-system)
3256 (propagated-inputs ; the following packages are all needed at run time
3257 `(("python-cycler" ,python-cycler)
3258 ("python-kiwisolver" ,python-kiwisolver)
3259 ("python-pyparsing" ,python-pyparsing)
3260 ("python-pygobject" ,python-pygobject)
3261 ("gobject-introspection" ,gobject-introspection)
3262 ("python-tkinter" ,python "tk")
3263 ("python-dateutil" ,python-dateutil)
3264 ("python-numpy" ,python-numpy)
3265 ("python-pillow" ,python-pillow)
3266 ("python-pytz" ,python-pytz)
3267 ("python-six" ,python-six)
3268 ;; The 'gtk+' package (and 'gdk-pixbuf', 'atk' and 'pango' propagated
3269 ;; from 'gtk+') provides the required 'typelib' files used by
3270 ;; 'gobject-introspection'. The location of these files is set with the
3271 ;; help of the environment variable GI_TYPELIB_PATH. At build time this
3272 ;; is done automatically by a 'native-search-path' procedure. However,
3273 ;; at run-time the user must set this variable as follows:
3274 ;;
3275 ;; export GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0
3276 ("gtk+" ,gtk+)
3277 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3278 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3279 ;; object. For this reason we need to import both libraries.
3280 ;; https://pythonhosted.org/cairocffi/cffi_api.html#converting-pycairo
3281 ("python-pycairo" ,python-pycairo)
3282 ;; XXX: qtwebkit cannot be built reliably.
3283 ("python-pyqt" ,python-pyqt-without-qtwebkit)
3284 ("python-cairocffi" ,python-cairocffi)))
3285 (inputs
3286 `(("libpng" ,libpng)
3287 ("imagemagick" ,imagemagick)
3288 ("freetype" ,freetype)
3289 ("cairo" ,cairo)
3290 ("glib" ,glib)
3291 ;; FIXME: Add backends when available.
3292 ;("python-wxpython" ,python-wxpython)
3293 ("tcl" ,tcl)
3294 ("tk" ,tk)))
3295 (native-inputs
3296 `(("pkg-config" ,pkg-config)
3297 ("python-nose" ,python-nose)
3298 ("python-mock" ,python-mock)))
3299 (arguments
3300 `(#:phases
3301 (modify-phases %standard-phases
3302 (add-before 'build 'configure-environment
3303 (lambda* (#:key outputs inputs #:allow-other-keys)
3304 (let ((cairo (assoc-ref inputs "cairo"))
3305 (gtk+ (assoc-ref inputs "gtk+")))
3306 ;; Setting these directories in the 'basedirlist' of 'setup.cfg'
3307 ;; has not effect.
3308 (setenv "LD_LIBRARY_PATH"
3309 (string-append cairo "/lib:" gtk+ "/lib"))
3310 (setenv "HOME" (getcwd))
3311 (call-with-output-file "setup.cfg"
3312 (lambda (port)
3313 (format port "[directories]~%
3314basedirlist = ~a,~a~%
3315 [rc_options]~%
3316backend = TkAgg~%"
3317 (assoc-ref inputs "tcl")
3318 (assoc-ref inputs "tk")))))
3319 #t)))))
3320 (home-page "http://matplotlib.org")
3321 (synopsis "2D plotting library for Python")
3322 (description
3323 "Matplotlib is a Python 2D plotting library which produces publication
3324quality figures in a variety of hardcopy formats and interactive environments
3325across platforms. Matplotlib can be used in Python scripts, the python and
3326ipython shell, web application servers, and six graphical user interface
3327toolkits.")
3328 (license license:psfl)
3329 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3330
3331(define-public python2-matplotlib
3332 (let ((matplotlib (package-with-python2
3333 (strip-python2-variant python-matplotlib))))
3334 (package (inherit matplotlib)
3335 ;; Make sure to use special packages for Python 2 instead
3336 ;; of those automatically rewritten by package-with-python2.
3337 (propagated-inputs
3338 `(("python2-pycairo" ,python2-pycairo)
3339 ("python2-backports-functools-lru-cache"
3340 ,python2-backports-functools-lru-cache)
3341 ("python2-functools32" ,python2-functools32)
3342 ("python2-pygobject-2" ,python2-pygobject-2)
3343 ("python2-subprocess32" ,python2-subprocess32)
3344 ("python2-tkinter" ,python-2 "tk")
3345 ,@(fold alist-delete (package-propagated-inputs matplotlib)
3346 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
3347
3348(define-public python-matplotlib-documentation
3349 (package
3350 (name "python-matplotlib-documentation")
3351 (version (package-version python-matplotlib))
3352 (source (package-source python-matplotlib))
3353 (build-system python-build-system)
3354 (native-inputs
3355 `(("python-matplotlib" ,python-matplotlib)
3356 ("python-colorspacious" ,python-colorspacious)
3357 ("python-sphinx" ,python-sphinx)
3358 ("python-sphinx-gallery" ,python-sphinx-gallery)
3359 ("python-numpydoc" ,python-numpydoc)
3360 ("python-ipython" ,python-ipython)
3361 ("python-mock" ,python-mock)
3362 ("graphviz" ,graphviz)
3363 ("texlive" ,texlive)
3364 ("texinfo" ,texinfo)
3365 ,@(package-native-inputs python-matplotlib)))
3366 (arguments
3367 `(#:tests? #f ; we're only generating documentation
3368 #:phases
3369 (modify-phases %standard-phases
3370 (replace 'build
3371 (lambda _
3372 (chdir "doc")
3373 ;; Produce pdf in 'A4' format.
3374 (substitute* "conf.py"
3375 (("latex_paper_size = 'letter'") "")
3376 ;; latex_paper_size is deprecated -> set paper size using
3377 ;; latex_elements
3378 (("latex_elements\\['pointsize'\\] = '11pt'" match)
3379 ;; insert at a point where latex_elements{} is defined:
3380 (string-append match "\nlatex_elements['papersize'] = 'a4paper'")))
3381 (invoke "make" "SPHINXBUILD=sphinx-build" "html" "latex" "texinfo")))
3382 (replace 'install
3383 (lambda* (#:key inputs outputs #:allow-other-keys)
3384 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3385 (doc (string-append data "/doc/python-matplotlib-" ,version))
3386 (info (string-append data "/info"))
3387 (html (string-append doc "/html")))
3388 (mkdir-p html)
3389 (mkdir-p info)
3390 (copy-recursively "build/html" html)
3391 (symlink (string-append html "/_images")
3392 (string-append info "/matplotlib-figures"))
3393 (with-directory-excursion "build/texinfo"
3394 (substitute* "matplotlib.texi"
3395 (("@image\\{([^,]*)" all file)
3396 (string-append "@image{matplotlib-figures/" file)))
3397 (symlink (string-append html "/_images")
3398 "./matplotlib-figures")
3399 (system* "makeinfo" "--no-split"
3400 "-o" "matplotlib.info" "matplotlib.texi"))
3401 (copy-file "build/texinfo/matplotlib.info"
3402 (string-append info "/matplotlib.info"))
3403 (copy-file "build/latex/Matplotlib.pdf"
3404 (string-append doc "/Matplotlib.pdf")))
3405 #t)))))
3406 (home-page (package-home-page python-matplotlib))
3407 (synopsis "Documentation for the python-matplotlib package")
3408 (description (package-description python-matplotlib))
3409 (license (package-license python-matplotlib))))
3410
3411(define-public python2-matplotlib-documentation
3412 (package-with-python2 python-matplotlib-documentation))
3413
3414(define-public python2-pysnptools
3415 (package
3416 (name "python2-pysnptools")
5d1ade85 3417 (version "0.3.13")
44d10b1f
RW
3418 (source
3419 (origin
3420 (method url-fetch)
5d1ade85 3421 (uri (pypi-uri "pysnptools" version))
44d10b1f
RW
3422 (sha256
3423 (base32
5d1ade85 3424 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
44d10b1f
RW
3425 (build-system python-build-system)
3426 (arguments
5d1ade85
RW
3427 `(#:python ,python-2 ; only Python 2.7 is supported
3428 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
44d10b1f
RW
3429 (propagated-inputs
3430 `(("python2-numpy" ,python2-numpy)
3431 ("python2-scipy" ,python2-scipy)
3432 ("python2-pandas" ,python2-pandas)))
44d10b1f 3433 (native-inputs
5d1ade85 3434 `(("python2-cython" ,python2-cython)))
1b66989b 3435 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
44d10b1f
RW
3436 (synopsis "Library for reading and manipulating genetic data")
3437 (description
3438 "PySnpTools is a library for reading and manipulating genetic data. It
3439can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
3440those files. It can also efficiently manipulate ranges of integers using set
3441operators such as union, intersection, and difference.")
3442 (license license:asl2.0)))
3443
3444(define-public python-scipy
3445 (package
3446 (name "python-scipy")
3447 (version "1.1.0")
3448 (source
3449 (origin
3450 (method url-fetch)
3451 (uri (pypi-uri "scipy" version))
3452 (sha256
3453 (base32
3454 "1lfg686w6vv2m2dfs8v9d0bf2i18z7wz5vgzjnkgmpr4hi0550w7"))))
3455 (build-system python-build-system)
3456 (propagated-inputs
3457 `(("python-numpy" ,python-numpy)
3458 ("python-matplotlib" ,python-matplotlib)
3459 ("python-pyparsing" ,python-pyparsing)))
3460 (inputs
3461 `(("lapack" ,lapack)
3462 ("openblas" ,openblas)))
3463 (native-inputs
3464 `(("python-cython" ,python-cython)
3465 ("python-pytest" ,python-pytest)
3466 ("python-sphinx" ,python-sphinx)
3467 ("python-numpydoc" ,python-numpydoc)
3468 ("gfortran" ,gfortran)
3469 ("perl" ,perl)
3470 ("which" ,which)))
3471 (outputs '("out" "doc"))
3472 (arguments
3473 `(#:phases
3474 (modify-phases %standard-phases
3475 (add-after 'unpack 'disable-broken-tests
3476 (lambda _
3477 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
3478 (("^( +)def test_threads_parallel\\(self\\):" m indent)
3479 (string-append indent
3480 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
3481 m)))
3482 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
3483 (("^def test_parallel_threads\\(\\):" m)
3484 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
3485 m)))
3486 #t))
3487 (add-before 'build 'configure-openblas
3488 (lambda* (#:key inputs #:allow-other-keys)
3489 (call-with-output-file "site.cfg"
3490 (lambda (port)
3491 (format port
3492 "[blas]
3493libraries = openblas
3494library_dirs = ~a/lib
3495include_dirs = ~a/include
3496
3497# backslash-n to make emacs happy
3498\n[atlas]
3499library_dirs = ~a/lib
3500atlas_libs = openblas
3501"
3502 (assoc-ref inputs "openblas")
3503 (assoc-ref inputs "openblas")
3504 (assoc-ref inputs "openblas"))))
3505 #t))
3506 (add-after 'install 'install-doc
3507 (lambda* (#:key inputs outputs #:allow-other-keys)
3508 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3509 (doc (string-append data "/doc/" ,name "-" ,version))
3510 (html (string-append doc "/html"))
3511 (pyver ,(string-append "PYVER=" (version-major+minor
3512 (package-version python))))
3513 ;; By default it tries to run sphinx-build through the Python
3514 ;; interpreter which won't work with our shell wrapper.
3515 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
3516 ;; Make installed package available for building the
3517 ;; documentation
3518 (add-installed-pythonpath inputs outputs)
3519 (with-directory-excursion "doc"
3520 ;; Fix generation of images for mathematical expressions.
3521 (substitute* (find-files "source" "conf\\.py")
3522 (("pngmath_use_preview = True")
3523 "pngmath_use_preview = False"))
3524 (mkdir-p html)
3525 (invoke "make" "html" pyver sphinxbuild)
3526 (with-directory-excursion "build/html"
3527 (for-each (lambda (file)
3528 (let* ((dir (dirname file))
3529 (tgt-dir (string-append html "/" dir)))
3530 (install-file file html)))
3531 (find-files "." ".*")))))
3532 #t))
3533 ;; Tests can only be run after the library has been installed and not
3534 ;; within the source directory.
3535 (delete 'check)
3536 (add-after 'install 'check
3537 (lambda* (#:key inputs outputs #:allow-other-keys)
3538 (add-installed-pythonpath inputs outputs)
3539 (with-directory-excursion "/tmp"
3540 (invoke "python" "-c"
3541 "import scipy; scipy.test(verbose=2)")))))))
3542 (home-page "https://www.scipy.org/")
3543 (synopsis "The Scipy library provides efficient numerical routines")
3544 (description "The SciPy library is one of the core packages that make up
3545the SciPy stack. It provides many user-friendly and efficient numerical
3546routines such as routines for numerical integration and optimization.")
3547 (properties `((python2-variant . ,(delay python2-scipy))))
3548 (license license:bsd-3)))
3549
3550(define-public python2-scipy
3551 (package-with-python2
3552 (strip-python2-variant python-scipy)))
3553
3554(define-public python-socksipy-branch
3555 (package
3556 (name "python-socksipy-branch")
3557 (version "1.01")
3558 (source
3559 (origin
3560 (method url-fetch)
3561 (uri (pypi-uri "SocksiPy-branch" version))
3562 (sha256
3563 (base32
3564 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
3565 (build-system python-build-system)
3566 (arguments
3567 `(#:tests? #f)) ; There are no tests
3568 (home-page "https://code.google.com/archive/p/socksipy-branch/")
3569 (synopsis "Python SOCKS module")
3570 (description
3571 "SocksiPy - A Python SOCKS client module. It provides a
3572socket-like interface that supports connections to any TCP
3573service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
3574The original version was developed by Dan Haim, this is a
3575branch created by Mario Vilas to address some open issues,
3576as the original project seems to have been abandoned circa 2007.")
3577 (license license:bsd-3)))
3578
3579(define-public python2-socksipy-branch
3580 (package-with-python2 python-socksipy-branch))
3581
3582(define-public python-pycodestyle
3583 (package
3584 (name "python-pycodestyle")
3585 (version "2.4.0")
3586 (source
3587 (origin
3588 (method url-fetch)
3589 (uri (pypi-uri "pycodestyle" version))
3590 (sha256
3591 (base32
3592 "0fhy4vnlgpjq4qd1wdnl6pvdw7rah0ypmn8c9mkhz8clsndskz6b"))))
3593 (build-system python-build-system)
3594 (home-page "https://pycodestyle.readthedocs.io/")
3595 (synopsis "Python style guide checker")
3596 (description "@code{pycodestyle} (formerly pep8) is a tool to check
3597Python code against some of the style conventions in
3598@url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
3599 (license license:expat)))
3600
3601(define-public python2-pycodestyle
3602 (package-with-python2 python-pycodestyle))
3603
3604(define-public python-multidict
3605 (package
3606 (name "python-multidict")
3607 (version "4.2.0")
3608 (source
3609 (origin
3610 (method url-fetch)
3611 (uri (pypi-uri "multidict" version))
3612 (sha256
3613 (base32
3614 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
3615 (build-system python-build-system)
3616 (native-inputs
3617 `(("python-pytest" ,python-pytest)
3618 ("python-pytest-runner" ,python-pytest-runner)))
3619 (home-page "https://github.com/aio-libs/multidict/")
3620 (synopsis "Multidict implementation")
3621 (description "Multidict is dict-like collection of key-value pairs
3622where key might be occurred more than once in the container.")
3623 (license license:asl2.0)))
3624
3625(define-public python-orderedmultidict
3626 (package
3627 (name "python-orderedmultidict")
3628 (version "0.7.11")
3629 (source
3630 (origin
3631 (method url-fetch)
3632 (uri (pypi-uri "orderedmultidict" version))
3633 (sha256
3634 (base32
3635 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
3636 (build-system python-build-system)
3637 (arguments
3638 `(#:phases
3639 (modify-phases %standard-phases
3640 (add-after 'unpack 'fix-tests
3641 (lambda _
3642 ;; The package uses nosetest for running the tests.
3643 ;; Adding this initfile allows to run the test suite
3644 ;; without requiring nosetest.
d1c4f329
RW
3645 (with-output-to-file "tests/__init__.py" newline)
3646 #t)))))
44d10b1f
RW
3647 (propagated-inputs
3648 `(("python-six" ,python-six)))
3649 (native-inputs
3650 `(("python-pycodestyle" ,python-pycodestyle)))
3651 (home-page "https://github.com/gruns/orderedmultidict")
3652 (synopsis "Python Ordered Multivalue Dictionary - omdict")
3653 (description "This package contains a library for ordered multivalue
3654dictionaries. A multivalue dictionary is a dictionary that can store
3655multiple values for the same key. An ordered multivalue dictionary is a
3656multivalue dictionary that retains the order of insertions and deletions.")
3657 (license license:unlicense)))
3658
3659(define-public python2-orderedmultidict
3660 (package-with-python2 python-orderedmultidict))
3661
3662(define-public python-autopep8
3663 (package
3664 (name "python-autopep8")
3665 (version "1.3.5")
3666 (source
3667 (origin
3668 (method url-fetch)
3669 (uri (pypi-uri "autopep8" version))
3670 (sha256
3671 (base32
3672 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
3673 (build-system python-build-system)
3674 (propagated-inputs
3675 `(("python-pycodestyle" ,python-pycodestyle)))
3676 (home-page "https://github.com/hhatto/autopep8")
3677 (synopsis "Format Python code according to the PEP 8 style guide")
3678 (description
3679 "@code{autopep8} automatically formats Python code to conform to
3680the PEP 8 style guide. It uses the pycodestyle utility to determine
3681what parts of the code needs to be formatted. @code{autopep8} is
3682capable of fixing most of the formatting issues that can be reported
3683by pycodestyle.")
3684 (license (license:non-copyleft
3685 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
3686
3687(define-public python2-autopep8
3688 (package-with-python2 python-autopep8))
3689
3690(define-public python-distutils-extra
3691 (package
3692 (name "python-distutils-extra")
3693 (version "2.38")
3694 (source
3695 (origin
3696 (method url-fetch)
3697 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
3698 version "/+download/python-distutils-extra-"
3699 version ".tar.gz"))
3700 (sha256
3701 (base32
3702 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
3703 (build-system python-build-system)
3704 (home-page "https://launchpad.net/python-distutils-extra/")
3705 (synopsis "Enhancements to Python's distutils")
3706 (description
3707 "The python-distutils-extra module enables you to easily integrate
3708gettext support, themed icons, and scrollkeeper-based documentation into
3709Python's distutils.")
3710 (license license:gpl2)))
3711
3712(define-public python2-distutils-extra
3713 (package-with-python2 python-distutils-extra))
3714
3715(define-public python2-elib.intl
3716 (package
3717 (name "python2-elib.intl")
3718 (version "0.0.3")
3719 (source
3720 (origin
3721 ;; This project doesn't tag releases or publish tarballs, so we take
3722 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
3723 (method git-fetch)
3724 (uri (git-reference
3725 (url "https://github.com/dieterv/elib.intl.git")
3726 (commit "d09997cfef")))
3727 (file-name (string-append name "-" version "-checkout"))
3728 (sha256
3729 (base32
3730 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
3731 (build-system python-build-system)
3732 (arguments
3733 ;; incompatible with Python 3 (exception syntax)
3734 `(#:python ,python-2
3735 #:tests? #f))
3736 (home-page "https://github.com/dieterv/elib.intl")
3737 (synopsis "Enhanced internationalization for Python")
3738 (description
3739 "The elib.intl module provides enhanced internationalization (I18N)
3740services for your Python modules and applications.")
3741 (license license:lgpl3+)))
3742
3743(define-public python-olefile
3744 (package
3745 (name "python-olefile")
3746 (version "0.45.1")
3747 (source
3748 (origin
3749 (method url-fetch)
3750 (uri (string-append "https://github.com/decalage2/olefile/archive/v"
3751 version ".tar.gz"))
3752 (file-name (string-append name "-" version ".tar.gz"))
3753 (sha256
3754 (base32
3755 "18ai19zwagm6nli14k8bii31ipbab2rp7plrvsm6gmfql551a8ai"))))
3756 (build-system python-build-system)
3757 (home-page
3758 "https://www.decalage.info/python/olefileio")
3759 (synopsis "Read and write Microsoft OLE2 files.")
3760 (description
3761 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
3762Storage or Compound Document, Microsoft Office). It is an improved version of
3763the OleFileIO module from PIL, the Python Image Library.")
3764 (license license:bsd-3)))
3765
3766(define-public python2-olefile
3767 (package-with-python2 python-olefile))
3768
3769(define-public python-pillow
3770 (package
3771 (name "python-pillow")
3772 (version "5.4.1")
3773 (source
3774 (origin
3775 (method url-fetch)
3776 (uri (pypi-uri "Pillow" version))
3777 (sha256
3778 (base32
3779 "17waygkhhzjd75kajlfw9v57mbb41lcpg6cvkdijqd7smm76ccsj"))))
3780 (build-system python-build-system)
3781 (native-inputs
3782 `(("python-pytest" ,python-pytest)))
3783 (inputs
3784 `(("freetype" ,freetype)
3785 ("lcms" ,lcms)
3786 ("zlib" ,zlib)
3787 ("libjpeg" ,libjpeg)
3788 ("openjpeg" ,openjpeg)
3789 ("libtiff" ,libtiff)
3790 ("libwebp" ,libwebp)))
3791 (propagated-inputs
3792 `(("python-olefile" ,python-olefile)))
3793 (arguments
3794 `(#:phases
3795 (modify-phases %standard-phases
3796 (add-after 'unpack 'patch-ldconfig
3797 (lambda _
3798 (substitute* "setup.py"
3799 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
3800 (delete 'check) ; We must run checks after python-pillow is installed.
3801 (add-after 'install 'check-installed
3802 (lambda* (#:key outputs inputs #:allow-other-keys)
3803 (begin
3804 (setenv "HOME" (getcwd))
3805 ;; Make installed package available for running the tests.
3806 (add-installed-pythonpath inputs outputs)
3807 (invoke "python" "selftest.py" "--installed")
3808 (invoke "python" "-m" "pytest" "-vv")))))))
3809 (home-page "https://python-pillow.org")
3810 (synopsis "Fork of the Python Imaging Library")
3811 (description
3812 "The Python Imaging Library adds image processing capabilities to your
3813Python interpreter. This library provides extensive file format support, an
3814efficient internal representation, and fairly powerful image processing
3815capabilities. The core image library is designed for fast access to data
3816stored in a few basic pixel formats. It should provide a solid foundation for
3817a general image processing tool.")
3818 (license (license:x11-style
3819 "http://www.pythonware.com/products/pil/license.htm"
3820 "The PIL Software License"))))
3821
3822(define-public python2-pillow
3823 (package-with-python2 python-pillow))
3824
3825(define-public python-pycparser
3826 (package
3827 (name "python-pycparser")
3828 (version "2.18")
3829 (source
3830 (origin
3831 (method url-fetch)
3832 (uri (pypi-uri "pycparser" version))
3833 (sha256
3834 (base32
3835 "09mjyw82ibqzl449g7swy8bfxnfpmas0815d2rkdjlcqw81wma4r"))))
3836 (outputs '("out" "doc"))
3837 (build-system python-build-system)
3838 (native-inputs
3839 `(("pkg-config" ,pkg-config)))
3840 (arguments
3841 `(#:phases
3842 (modify-phases %standard-phases
3843 (replace 'check
3844 (lambda _
3845 (with-directory-excursion "tests"
acb75c03
RW
3846 (invoke "python" "all_tests.py"))
3847 #t))
44d10b1f
RW
3848 (add-after 'install 'install-doc
3849 (lambda* (#:key outputs #:allow-other-keys)
3850 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
3851 (doc (string-append data "/doc/" ,name "-" ,version))
3852 (examples (string-append doc "/examples")))
3853 (mkdir-p examples)
3854 (for-each (lambda (file)
3855 (copy-file (string-append "." file)
3856 (string-append doc file)))
3857 '("/README.rst" "/CHANGES" "/LICENSE"))
3858 (copy-recursively "examples" examples)))))))
3859 (home-page "https://github.com/eliben/pycparser")
3860 (synopsis "C parser in Python")
3861 (description
3862 "Pycparser is a complete parser of the C language, written in pure Python
3863using the PLY parsing library. It parses C code into an AST and can serve as
3864a front-end for C compilers or analysis tools.")
3865 (license license:bsd-3)))
3866
3867(define-public python2-pycparser
3868 (package-with-python2 python-pycparser))
3869
3870(define-public python-pywavelets
3871 (package
3872 (name "python-pywavelets")
3873 (version "1.0.1")
3874 (home-page "https://github.com/PyWavelets/pywt")
3875 (source (origin
3876 (method url-fetch)
3877 (uri (pypi-uri "PyWavelets" version))
3878 (sha256
3879 (base32
3880 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
3881 (build-system python-build-system)
3882 (arguments
3883 '(#:modules ((ice-9 ftw)
3884 (srfi srfi-1)
3885 (srfi srfi-26)
3886 (guix build utils)
3887 (guix build python-build-system))
3888 #:phases (modify-phases %standard-phases
3889 (replace 'check
3890 (lambda _
3891 (let ((cwd (getcwd))
3892 (libdir (find (cut string-prefix? "lib." <>)
3893 (scandir "build"))))
3894 (with-directory-excursion (string-append cwd "/build/" libdir)
3895 (invoke "nosetests" "-v" "."))))))))
3896 (native-inputs
3897 `(("python-matplotlib" ,python-matplotlib) ;for tests
3898 ("python-nose" ,python-nose)))
3899 (propagated-inputs
3900 `(("python-numpy" ,python-numpy)))
3901 (synopsis "Wavelet transforms in Python")
3902 (description
3903 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
3904mathematical basis functions that are localized in both time and frequency.
3905Wavelet transforms are time-frequency transforms employing wavelets. They are
3906similar to Fourier transforms, the difference being that Fourier transforms are
3907localized only in frequency instead of in time and frequency.")
3908 (license license:expat)))
3909
3910(define-public python2-pywavelets
3911 (package-with-python2 python-pywavelets))
3912
3913(define-public python-xcffib
3914 (package
3915 (name "python-xcffib")
3916 (version "0.6.0")
3917 (source
3918 (origin
3919 (method url-fetch)
3920 (uri (pypi-uri "xcffib" version))
3921 (sha256
3922 (base32
3923 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
3924 (build-system python-build-system)
3925 (inputs
3926 `(("libxcb" ,libxcb)))
3927 (propagated-inputs
3928 `(("python-cffi" ,python-cffi) ; used at run time
3929 ("python-six" ,python-six)))
3930 (arguments
3931 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
3932 #:tests? #f
3933 #:phases
3934 (modify-phases %standard-phases
3935 (add-after 'unpack 'fix-libxcb-path
3936 (lambda* (#:key inputs #:allow-other-keys)
3937 (let ((libxcb (assoc-ref inputs "libxcb")))
3938 (substitute* '("xcffib/__init__.py")
3939 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
3940 #t)))
3941 (add-after 'install 'install-doc
3942 (lambda* (#:key outputs #:allow-other-keys)
3943 (let ((doc (string-append (assoc-ref outputs "out") "/share"
3944 "/doc/" ,name "-" ,version)))
3945 (mkdir-p doc)
3946 (copy-file "README.md"
3947 (string-append doc "/README.md"))
3948 #t))))))
3949 (home-page "https://github.com/tych0/xcffib")
3950 (synopsis "XCB Python bindings")
3951 (description
3952 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
3953support for Python 3 and PyPy. It is based on cffi.")
3954 (license license:expat)))
3955
3956(define-public python2-xcffib
3957 (package-with-python2 python-xcffib))
3958
3959(define-public python-cairocffi
3960 (package
3961 (name "python-cairocffi")
3962 (version "0.9.0")
3963 (source
3964 (origin
3965 (method url-fetch)
3966 (uri (pypi-uri "cairocffi" version))
3967 (sha256
3968 (base32
3969 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
3970 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
3971 (build-system python-build-system)
3972 (outputs '("out" "doc"))
3973 (inputs
3974 `(("glib" ,glib)
3975 ("gtk+" ,gtk+)
3976 ("gdk-pixbuf" ,gdk-pixbuf)
3977 ("cairo" ,cairo)
3978 ("pango" ,pango)))
3979 (native-inputs
3980 `(("pkg-config" ,pkg-config)
3981 ("python-pytest" ,python-pytest)
3982 ("python-pytest-cov" ,python-pytest-cov)
3983 ("python-pytest-runner" ,python-pytest-runner)
3984 ("python-sphinx" ,python-sphinx)
3985 ("python-docutils" ,python-docutils)))
3986 (propagated-inputs
3987 `(("python-xcffib" ,python-xcffib))) ; used at run time
3988 (arguments
3989 `(#:phases
3990 (modify-phases %standard-phases
3991 (add-after 'unpack 'patch-paths
3992 (lambda* (#:key inputs outputs #:allow-other-keys)
3993 (substitute* (find-files "." "\\.py$")
3994 (("dlopen\\(ffi, 'cairo'")
3995 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
3996 "/lib/libcairo.so.2'"))
3997 (("dlopen\\(ffi, 'gdk-3'")
3998 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
3999 "/lib/libgtk-3.so.0'"))
4000 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4001 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4002 "/lib/libgdk_pixbuf-2.0.so.0'"))
4003 (("dlopen\\(ffi, 'glib-2.0'")
4004 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4005 "/lib/libglib-2.0.so.0'"))
4006 (("dlopen\\(ffi, 'gobject-2.0'")
4007 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4008 "/lib/libgobject-2.0.so.0'"))
4009 (("dlopen\\(ffi, 'pangocairo-1.0'")
4010 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4011 "/lib/libpangocairo-1.0.so.0'"))
4012 (("dlopen\\(ffi, 'pango-1.0'")
4013 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4014 "/lib/libpango-1.0.so.0'")))
4015 #t))
4016 (add-after 'install 'install-doc
4017 (lambda* (#:key inputs outputs #:allow-other-keys)
4018 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4019 (doc (string-append data "/doc/" ,name "-" ,version))
4020 (html (string-append doc "/html")))
4021 (setenv "LD_LIBRARY_PATH"
4022 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4023 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4024 (setenv "LANG" "en_US.UTF-8")
4025 (mkdir-p html)
4026 (for-each (lambda (file)
4027 (copy-file (string-append "." file)
4028 (string-append doc file)))
4029 '("/README.rst" "/CHANGES" "/LICENSE"))
4030 (system* "python" "setup.py" "build_sphinx")
4031 (copy-recursively "docs/_build/html" html)
4032 #t))))))
4033 (home-page "https://github.com/Kozea/cairocffi")
4034 (synopsis "Python bindings and object-oriented API for Cairo")
4035 (description
4036 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4037Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4038graphics library with support for multiple backends including image buffers,
4039PNG, PostScript, PDF, and SVG file output.")
4040 (license license:bsd-3)))
4041
4042(define-public python2-cairocffi
4043 (package-with-python2 python-cairocffi))
4044
4045(define-public python-decorator
4046 (package
4047 (name "python-decorator")
4048 (version "4.3.0")
4049 (source
4050 (origin
4051 (method url-fetch)
4052 (uri (pypi-uri "decorator" version))
4053 (sha256
4054 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4055 (build-system python-build-system)
4056 (home-page "https://pypi.python.org/pypi/decorator/")
4057 (synopsis "Python module to simplify usage of decorators")
4058 (description
4059 "The aim of the decorator module is to simplify the usage of decorators
4060for the average programmer, and to popularize decorators usage giving examples
4061of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4062etc. The core of this module is a decorator factory.")
4063 (license license:expat)))
4064
4065(define-public python2-decorator
4066 (package-with-python2 python-decorator))
4067
4068(define-public python-drmaa
4069 (package
4070 (name "python-drmaa")
4071 (version "0.7.7")
4072 (source
4073 (origin
4074 (method url-fetch)
4075 (uri (pypi-uri "drmaa" version))
4076 (sha256
4077 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4078 (build-system python-build-system)
4079 ;; The test suite requires libdrmaa which is provided by the cluster
4080 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4081 ;; should be set to the path of the libdrmaa library.
4082 (arguments '(#:tests? #f))
4083 (native-inputs
4084 `(("python-nose" ,python-nose)))
4085 (home-page "https://pypi.python.org/pypi/drmaa")
4086 (synopsis "Python bindings for the DRMAA library")
4087 (description
4088 "A Python package for Distributed Resource Management (DRM) job
4089submission and control. This package is an implementation of the DRMAA 1.0
4090Python language binding specification.")
4091 (license license:bsd-3)))
4092
4093(define-public python2-drmaa
4094 (package-with-python2 python-drmaa))
4095
4096(define-public python-grako
4097 (package
4098 (name "python-grako")
4099 (version "3.99.9")
4100 (source
4101 (origin
4102 (method url-fetch)
4103 (uri
4104 (pypi-uri "grako" version ".zip"))
4105 (sha256
4106 (base32
4107 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4108 (build-system python-build-system)
4109 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4110 (native-inputs
4111 `(("unzip" ,unzip)
4112 ("python-pytest" ,python-pytest)
4113 ("python-pytest-runner" ,python-pytest-runner)))
4114 (home-page "https://bitbucket.org/neogeny/grako")
4115 (synopsis "EBNF parser generator")
4116 (description
4117 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4118memoizing PEG/Packrat parser in Python.")
4119 (license license:bsd-3)))
4120
4121(define-public python2-grako
4122 (package-with-python2 python-grako))
4123
4124(define-public python-gridmap
4125 (package
4126 (name "python-gridmap")
4127 (version "0.13.0")
4128 (source
4129 (origin
4130 (method url-fetch)
4131 (uri (string-append
4132 "https://github.com/pygridtools/gridmap/archive/v"
4133 version ".tar.gz"))
4134 (file-name (string-append name "-" version ".tar.gz"))
4135 (sha256
4136 (base32 "1gzjg2k6f14i1msm2b0ax8d9ds1hvk6qd5nlaivg8m4cxqp4cp1x"))))
4137 (build-system python-build-system)
4138 (arguments
4139 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4140 (propagated-inputs
4141 `(("python-psutil" ,python-psutil)
4142 ("python-drmaa" ,python-drmaa)
4143 ("python-pyzmq" ,python-pyzmq)))
4144 (home-page "https://github.com/pygridtools/gridmap")
4145 (synopsis "Create jobs on a cluster directly from Python")
4146 (description
4147 "Gridmap is a Python package to allow you to easily create jobs on the
4148cluster directly from Python. You can directly map Python functions onto the
4149cluster without needing to write any wrapper code yourself.")
4150 (license license:gpl3+)))
4151
4152(define-public python2-gridmap
4153 (package-with-python2 python-gridmap))
4154
4155(define-public python-honcho
4156 (package
4157 (name "python-honcho")
4158 (version "1.0.1")
4159 (source
4160 (origin
4161 (method url-fetch)
4162 (uri (string-append
4163 "https://github.com/nickstenning/honcho/archive/v"
4164 version ".tar.gz"))
4165 (file-name (string-append name "-" version ".tar.gz"))
4166 (sha256
4167 (base32 "0zizn61n5z5hq421hkypk9pw8s6fpxw30f4hsg7k4ivwzy3gjw9j"))))
4168 (build-system python-build-system)
4169 (native-inputs
4170 `(("python-pytest" ,python-pytest)
4171 ("python-mock" ,python-mock)
4172 ("python-tox" ,python-tox)
4173 ("which" ,which))) ;for tests
4174 (propagated-inputs
4175 `(("python-jinja2" ,python-jinja2)))
4176 (arguments
4177 `(#:phases
4178 (modify-phases %standard-phases
4179 (delete 'check)
4180 (add-after 'install 'check
4181 (lambda* (#:key outputs inputs #:allow-other-keys)
4182 ;; fix honcho path in testsuite
4183 (substitute* "tests/conftest.py"
4184 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4185 "/bin/honcho" "'")))
4186 ;; It's easier to run tests after install.
4187 ;; Make installed package available for running the tests
4188 (add-installed-pythonpath inputs outputs)
95b707fb 4189 (invoke "py.test" "-v"))))))
44d10b1f
RW
4190 (home-page "https://github.com/nickstenning/honcho")
4191 (synopsis "Manage Procfile-based applications")
4192 (description
4193 "A Procfile is a file which describes how to run an application
4194consisting of serveral processes. honcho starts all listed processes.
4195The output of all running processes is collected by honcho and
4196displayed.")
4197 (license license:expat)))
4198
4199(define-public python2-honcho
4200 (package-with-python2 python-honcho))
4201
4202(define-public python-pexpect
4203 (package
4204 (name "python-pexpect")
4205 (version "4.6.0")
4206 (source
4207 (origin
4208 (method url-fetch)
4209 (uri (pypi-uri "pexpect" version))
4210 (sha256
4211 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4212 (build-system python-build-system)
4213 (arguments
4214 `(#:phases
4215 (modify-phases %standard-phases
4216 (add-before 'check 'prepare-tests
4217 (lambda _
4218 (substitute* (find-files "tests")
4219 (("/bin/ls") (which "ls"))
4220 (("/bin/echo") (which "echo"))
4221 (("/bin/which") (which "which"))
4222 ;; Many tests try to use the /bin directory which
4223 ;; is not present in the build environment.
4224 ;; Use one that's non-empty and unlikely to change.
4225 (("/bin'") "/dev'"))
4226 ;; XXX: Socket connection test gets "Connection reset by peer".
4227 ;; Why does it not work? Delete for now.
4228 (delete-file "tests/test_socket.py")
4229 #t))
4230 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4231 (native-inputs
4232 `(("python-nose" ,python-nose)
4233 ("python-pytest" ,python-pytest)
4234 ("man-db" ,man-db)
4235 ("which" ,which)
4236 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4237 (propagated-inputs
4238 `(("python-ptyprocess" ,python-ptyprocess)))
4239 (home-page "http://pexpect.readthedocs.org/")
4240 (synopsis "Controlling interactive console applications")
4241 (description
4242 "Pexpect is a pure Python module for spawning child applications;
4243controlling them; and responding to expected patterns in their output.
4244Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4245child application and control it as if a human were typing commands.")
4246 (license license:isc)))
4247
4248(define-public python2-pexpect
4249 (package-with-python2 python-pexpect))
4250
4251(define-public python-setuptools-scm
4252 (package
4253 (name "python-setuptools-scm")
4254 (version "3.1.0")
4255 (source (origin
4256 (method url-fetch)
4257 (uri (pypi-uri "setuptools_scm" version))
4258 (sha256
4259 (base32
4260 "0h4bglwfz8b9prqljv8z3w9rgydfyxzaj05bm1y6zs5m6shz548i"))))
4261 (build-system python-build-system)
4262 (home-page "https://github.com/pypa/setuptools_scm/")
4263 (synopsis "Manage Python package versions in SCM metadata")
4264 (description
4265 "Setuptools_scm handles managing your Python package versions in
4266@dfn{software configuration management} (SCM) metadata instead of declaring
4267them as the version argument or in a SCM managed file.")
4268 (license license:expat)))
4269
4270(define-public python2-setuptools-scm
4271 (package-with-python2 python-setuptools-scm))
4272
4273(define-public python-pathpy
4274 (package
4275 (name "python-pathpy")
4276 (version "11.0.1")
4277 (source
4278 (origin
4279 (method url-fetch)
4280 (uri (pypi-uri "path.py" version))
4281 (sha256
4282 (base32 "07x15v8c7ry9bvycw294c9yq6ky9v2b0dalvgi6rn38ilh69vsz7"))))
4283 ;; (outputs '("out" "doc"))
4284 (build-system python-build-system)
4285 (propagated-inputs
4286 `(("python-appdirs" ,python-appdirs)))
4287 (native-inputs
4288 `(("python-setuptools-scm" ,python-setuptools-scm)
4289 ("python-sphinx" ,python-sphinx)
4290 ("python-rst.linker" ,python-rst.linker)
4291 ("python-pytest" ,python-pytest)
4292 ("python-pytest-runner" ,python-pytest-runner)))
4293 (arguments
4294 ;; FIXME: Documentation and tests require "jaraco.packaging".
4295 `(#:tests? #f))
4296 ;; #:phases
4297 ;; (modify-phases %standard-phases
4298 ;; (add-after 'build 'build-doc
4299 ;; (lambda _
4300 ;; (setenv "LANG" "en_US.UTF-8")
4301 ;; (zero? (system* "python" "setup.py" "build_sphinx"))))
4302 ;; (add-after 'install 'install-doc
4303 ;; (lambda* (#:key outputs #:allow-other-keys)
4304 ;; (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4305 ;; (doc (string-append data "/doc/" ,name "-" ,version))
4306 ;; (html (string-append doc "/html")))
4307 ;; (mkdir-p html)
4308 ;; (for-each (lambda (file)
4309 ;; (copy-file file (string-append doc "/" file)))
4310 ;; '("README.rst" "CHANGES.rst"))
4311 ;; (copy-recursively "build/sphinx/html" html)))))))
4312 (home-page "https://github.com/jaraco/path.py")
4313 (synopsis "Python module wrapper for built-in os.path")
4314 (description
4315 "@code{path.py} implements path objects as first-class entities, allowing
4316common operations on files to be invoked on those path objects directly.")
4317 (license license:expat)))
4318
4319(define-public python2-pathpy
4320 (package-with-python2 python-pathpy))
4321
4322(define-public python-simplegeneric
4323 (package
4324 (name "python-simplegeneric")
4325 (version "0.8.1")
4326 (source
4327 (origin
4328 (method url-fetch)
4329 (uri (string-append "https://pypi.python.org/packages/source/s/"
4330 "simplegeneric/simplegeneric-" version ".zip"))
4331 (sha256
4332 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
4333 (build-system python-build-system)
4334 (native-inputs
4335 `(("unzip" ,unzip)))
4336 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
4337 (synopsis "Python module for simple generic functions")
4338 (description
4339 "The simplegeneric module lets you define simple single-dispatch generic
4340functions, akin to Python’s built-in generic functions like @code{len()},
4341@code{iter()} and so on. However, instead of using specially-named methods,
4342these generic functions use simple lookup tables, akin to those used by
4343e.g. @code{pickle.dump()} and other generic functions found in the Python
4344standard library.")
4345 (license license:zpl2.1)))
4346
4347(define-public python2-simplegeneric
4348 (package-with-python2 python-simplegeneric))
4349
4350(define-public python-ipython-genutils
4351 ;; TODO: This package is retired, check if can be removed, see description.
4352 (package
4353 (name "python-ipython-genutils")
4354 (version "0.1.0")
4355 (source
4356 (origin
4357 (method url-fetch)
4358 (uri (string-append "https://pypi.python.org/packages/source/i/"
4359 "ipython_genutils/ipython_genutils-"
4360 version ".tar.gz"))
4361 (sha256
4362 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
4363 (build-system python-build-system)
4364 (arguments `(#:tests? #f)) ; no tests
4365 (home-page "https://ipython.org")
4366 (synopsis "Vestigial utilities from IPython")
4367 (description
4368 "This package provides retired utilities from IPython. No packages
4369outside IPython/Jupyter should depend on it.
4370
4371This package shouldn't exist. It contains some common utilities shared by
4372Jupyter and IPython projects during The Big Split. As soon as possible, those
4373packages will remove their dependency on this, and this package will go
4374away.")
4375 (license license:bsd-3)))
4376
4377(define-public python2-ipython-genutils
4378 (package-with-python2 python-ipython-genutils))
4379
4380(define-public python-traitlets
4381 (package
4382 (name "python-traitlets")
4383 (version "4.3.2")
4384 (source
4385 (origin
4386 (method url-fetch)
4387 (uri (pypi-uri "traitlets" version))
4388 (sha256
4389 (base32
4390 "0dbq7sx26xqz5ixs711k5nc88p8a0nqyz6162pwks5dpcz9d4jww"))))
4391 (build-system python-build-system)
4392 (arguments
4393 `(#:phases
4394 (modify-phases %standard-phases
4395 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
4396 (propagated-inputs
4397 `(("python-ipython-genutils" ,python-ipython-genutils)
4398 ("python-decorator" ,python-decorator))) ;not needed for >4.3.2
4399 (native-inputs
4400 `(("python-pytest" ,python-pytest)))
4401 (properties `((python2-variant . ,(delay python2-traitlets))))
4402 (home-page "https://ipython.org")
4403 (synopsis "Configuration system for Python applications")
4404 (description
4405 "Traitlets is a framework that lets Python classes have attributes with
4406type checking, dynamically calculated default values, and ‘on change’
4407callbacks. The package also includes a mechanism to use traitlets for
4408configuration, loading values from files or from command line arguments. This
4409is a distinct layer on top of traitlets, so you can use traitlets in your code
4410without using the configuration machinery.")
4411 (license license:bsd-3)))
4412
4413(define-public python2-traitlets
4414 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
4415 (package
4416 (inherit traitlets)
4417 (propagated-inputs
4418 `(("python2-enum34" ,python2-enum34)
4419 ,@(package-propagated-inputs traitlets))))))
4420
4421(define-public python-jupyter-core
4422 (package
4423 (name "python-jupyter-core")
4424 (version "4.4.0")
4425 (source
4426 (origin
4427 (method url-fetch)
4428 (uri (string-append (pypi-uri "jupyter_core" version)))
4429 (sha256
4430 (base32
4431 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
4432 (build-system python-build-system)
4433 ;; FIXME: not sure how to run the tests
4434 (arguments `(#:tests? #f))
4435 (propagated-inputs
4436 `(("python-traitlets" ,python-traitlets)))
4437 (home-page "http://jupyter.org/")
4438 (synopsis "Jupyter base package")
4439 (description
4440 "Jupyter core is the base package on which Jupyter projects rely.")
4441 (license license:bsd-3)))
4442
4443(define-public python2-jupyter-core
4444 (package-with-python2 python-jupyter-core))
4445
4446(define-public python-jupyter-client
4447 (package
4448 (name "python-jupyter-client")
4449 (version "5.2.4")
4450 (source
4451 (origin
4452 (method url-fetch)
4453 (uri (pypi-uri "jupyter_client" version))
4454 (sha256
4455 (base32
4456 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
4457 (build-system python-build-system)
4458 ;; Tests fail because of missing native python kernel which I assume is
4459 ;; provided by the ipython package, which we cannot use because it would
4460 ;; cause a dependency cycle.
4461 (arguments `(#:tests? #f))
4462 (propagated-inputs
4463 `(("python-pyzmq" ,python-pyzmq)
4464 ("python-traitlets" ,python-traitlets)
4465 ("python-jupyter-core" ,python-jupyter-core)))
4466 (home-page "http://jupyter.org/")
4467 (synopsis "Jupyter protocol implementation and client libraries")
4468 (description
4469 "The @code{jupyter_client} package contains the reference implementation
4470of the Jupyter protocol. It also provides client and kernel management APIs
4471for working with kernels, and the @code{jupyter kernelspec} entrypoint for
4472installing @code{kernelspec}s for use with Jupyter frontends.")
4473 (license license:bsd-3)))
4474
4475(define-public python2-jupyter-client
4476 (package-with-python2 python-jupyter-client))
4477
4478(define-public python-ipykernel
4479 (package
4480 (name "python-ipykernel")
4481 (version "5.1.0")
4482 (source
4483 (origin
4484 (method url-fetch)
4485 (uri (pypi-uri "ipykernel" version))
4486 (sha256
4487 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
4488 (build-system python-build-system)
4489 (arguments
4490 `(#:phases
4491 (modify-phases %standard-phases
4492 (replace 'check
4493 (lambda _
4494 (setenv "HOME" "/tmp")
4495 (invoke "pytest" "-v")
4496 #t)))))
4497 (propagated-inputs
4498 `(("python-ipython" ,python-ipython)
4499 ;; imported at runtime during connect
4500 ("python-jupyter-client" ,python-jupyter-client)))
4501 (native-inputs
4502 `(("python-pytest" ,python-pytest)
4503 ("python-nose" ,python-nose)))
4504 (home-page "https://ipython.org")
4505 (synopsis "IPython Kernel for Jupyter")
4506 (description
4507 "This package provides the IPython kernel for Jupyter.")
4508 (license license:bsd-3)))
4509
4510(define-public python2-ipykernel
4511 (package-with-python2 python-ipykernel))
4512
4513(define-public python-send2trash
4514 (package
4515 (name "python-send2trash")
4516 (version "1.5.0")
4517 (source
4518 (origin
4519 (method url-fetch)
4520 (uri (pypi-uri "send2trash" version))
4521 (sha256
4522 (base32
4523 "1ci8vcwjmjlp11ljj1ckrfmml9fkq1mclx2gr53y4zvhgp01q030"))))
4524 (build-system python-build-system)
4525 (home-page "https://github.com/hsoft/send2trash")
4526 (synopsis "Send files to trash")
4527 (description
4528 "This package provides a cross-platform mechanism to send files to the
4529trash.")
4530 (license license:bsd-3)))
4531
4532(define-public python2-send2trash
4533 (package-with-python2 python-send2trash))
4534
4535;; This is the latest release of the LTS version of ipython with support for
4536;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
4537;; dropped support for Python 2.7. We may want to rename this package.
4538(define-public python-ipython
4539 (package
4540 (name "python-ipython")
4541 (version "5.8.0")
4542 (source
4543 (origin
4544 (method url-fetch)
4545 (uri (pypi-uri "ipython" version ".tar.gz"))
4546 (sha256
4547 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
4548 (build-system python-build-system)
4549 (outputs '("out" "doc"))
4550 (propagated-inputs
4551 `(("python-pyzmq" ,python-pyzmq)
4552 ("python-prompt-toolkit" ,python-prompt-toolkit-1)
4553 ("python-terminado" ,python-terminado)
4554 ("python-matplotlib" ,python-matplotlib)
4555 ("python-numpy" ,python-numpy)
4556 ("python-numpydoc" ,python-numpydoc)
4557 ("python-jinja2" ,python-jinja2)
4558 ("python-mistune" ,python-mistune)
4559 ("python-pexpect" ,python-pexpect)
4560 ("python-pickleshare" ,python-pickleshare)
4561 ("python-simplegeneric" ,python-simplegeneric)
4562 ("python-jsonschema" ,python-jsonschema)
4563 ("python-traitlets" ,python-traitlets)
4564 ("python-nbformat" ,python-nbformat)
4565 ("python-pygments" ,python-pygments)))
4566 (inputs
4567 `(("readline" ,readline)
4568 ("which" ,which)))
4569 (native-inputs
4570 `(("graphviz" ,graphviz)
4571 ("pkg-config" ,pkg-config)
4572 ("python-requests" ,python-requests) ;; for tests
4573 ("python-testpath" ,python-testpath)
4574 ("python-nose" ,python-nose)
4575 ("python-sphinx" ,python-sphinx)
4576 ("python-shpinx-rtd-theme" ,python-sphinx-rtd-theme)
4577 ;; FIXME: It's possible that a smaller union would work just as well.
4578 ("texlive" ,(texlive-union (list texlive-fonts-amsfonts
4579 texlive-fonts-ec
4580 texlive-generic-ifxetex
4581 texlive-generic-pdftex
4582 texlive-latex-amsfonts
4583 texlive-latex-capt-of
4584 texlive-latex-cmap
4585 texlive-latex-environ
4586 texlive-latex-eqparbox
4587 texlive-latex-etoolbox
4588 texlive-latex-expdlist
4589 texlive-latex-fancyhdr
4590 texlive-latex-fancyvrb
4591 texlive-latex-fncychap
4592 texlive-latex-float
4593 texlive-latex-framed
4594 texlive-latex-geometry
4595 texlive-latex-graphics
4596 texlive-latex-hyperref
4597 texlive-latex-mdwtools
4598 texlive-latex-multirow
4599 texlive-latex-oberdiek
4600 texlive-latex-parskip
4601 texlive-latex-preview
4602 texlive-latex-tabulary
4603 texlive-latex-threeparttable
4604 texlive-latex-titlesec
4605 texlive-latex-trimspaces
4606 texlive-latex-ucs
4607 texlive-latex-upquote
4608 texlive-latex-url
4609 texlive-latex-varwidth
4610 texlive-latex-wrapfig)))
4611 ("texinfo" ,texinfo)))
4612 (arguments
4613 `(#:phases
4614 (modify-phases %standard-phases
4615 (add-after 'install 'install-doc
4616 (lambda* (#:key inputs outputs #:allow-other-keys)
4617 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4618 (doc (string-append data "/doc/" ,name "-" ,version))
4619 (html (string-append doc "/html"))
4620 (man1 (string-append data "/man/man1"))
4621 (info (string-append data "/info"))
4622 (examples (string-append doc "/examples"))
4623 (python-arg (string-append "PYTHON=" (which "python"))))
4624 (setenv "LANG" "en_US.utf8")
4625 ;; Make installed package available for running the tests
4626 (add-installed-pythonpath inputs outputs)
4627 (with-directory-excursion "docs"
4628 ;; FIXME: pdf fails to build
4629 ;;(system* "make" "pdf" "PAPER=a4")
4630 (system* "make" python-arg "html")
4631 (system* "make" python-arg "info"))
4632 (copy-recursively "docs/man" man1)
4633 (copy-recursively "examples" examples)
4634 (copy-recursively "docs/build/html" html)
4635 ;; (copy-file "docs/build/latex/ipython.pdf"
4636 ;; (string-append doc "/ipython.pdf"))
4637 (mkdir-p info)
4638 (copy-file "docs/build/texinfo/ipython.info"
4639 (string-append info "/ipython.info"))
4640 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
4641 #t))
4642 ;; Tests can only be run after the library has been installed and not
4643 ;; within the source directory.
4644 (delete 'check)
4645 (add-after 'install 'check
4646 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
4647 (if tests?
4648 (begin
4649 ;; Make installed package available for running the tests
4650 (add-installed-pythonpath inputs outputs)
4651 (setenv "HOME" "/tmp/") ;; required by a test
4652 ;; We only test the core because one of the other tests
4653 ;; tries to import ipykernel.
4654 (invoke "python" "IPython/testing/iptest.py"
4655 "-v" "IPython/core/tests"))
4656 #t)))
4657 (add-before 'check 'fix-tests
4658 (lambda* (#:key inputs #:allow-other-keys)
4659 (substitute* "./IPython/utils/_process_posix.py"
4660 (("/usr/bin/env', 'which") (which "which")))
4661 (substitute* "./IPython/core/tests/test_inputtransformer.py"
4662 (("#!/usr/bin/env python")
4663 (string-append "#!" (which "python"))))
4664 ;; Disable 1 failing test
4665 (substitute* "./IPython/core/tests/test_magic.py"
4666 (("def test_dirops\\(\\):" all)
4667 (string-append "@dec.skipif(True)\n" all)))
4668 ;; This test introduces a circular dependency on ipykernel
4669 ;; (which depends on ipython).
4670 (delete-file "IPython/core/tests/test_display.py")
4671 ;; These tests throw errors for unknown reasons.
4672 (delete-file "IPython/extensions/tests/test_storemagic.py")
4673 (delete-file "IPython/core/tests/test_displayhook.py")
4674 (delete-file "IPython/core/tests/test_interactiveshell.py")
4675 (delete-file "IPython/core/tests/test_pylabtools.py")
4676 (delete-file "IPython/core/tests/test_paths.py")
4677 #t)))))
4678 (home-page "https://ipython.org")
4679 (synopsis "IPython is a tool for interactive computing in Python")
4680 (description
4681 "IPython provides a rich architecture for interactive computing with:
4682Powerful interactive shells, a browser-based notebook, support for interactive
4683data visualization, embeddable interpreters and tools for parallel
4684computing.")
4685 (license license:bsd-3)
4686 (properties `((python2-variant . ,(delay python2-ipython))))))
4687
4688(define-public python2-ipython
4689 (let ((ipython (package-with-python2 (strip-python2-variant python-ipython))))
4690 (package
4691 (inherit ipython)
4692 ;; FIXME: add pyreadline once available.
4693 (propagated-inputs
4694 `(("python2-backports-shutil-get-terminal-size"
4695 ,python2-backports-shutil-get-terminal-size)
4696 ("python2-pathlib2" ,python2-pathlib2)
4697 ,@(package-propagated-inputs ipython)))
4698 (native-inputs
4699 `(("python2-mock" ,python2-mock)
4700 ,@(package-native-inputs ipython))))))
4701
4702(define-public python-urwid
4703 (package
4704 (name "python-urwid")
4705 (version "2.0.1")
4706 (source
4707 (origin
4708 (method url-fetch)
4709 (uri (pypi-uri "urwid" version))
4710 (sha256
4711 (base32
4712 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
4713 (build-system python-build-system)
4714 (home-page "http://urwid.org")
4715 (synopsis "Console user interface library for Python")
4716 (description
4717 "Urwid is a curses-based UI/widget library for Python. It includes many
4718features useful for text console applications.")
4719 (license license:lgpl2.1+)))
4720
4721(define-public python2-urwid
4722 (package-with-python2 python-urwid))
4723
4724(define-public python-urwidtrees
4725 (package
4726 (name "python-urwidtrees")
4727 (version "1.0.2")
4728 (source
4729 (origin
4730 (method url-fetch)
4731 ;; package author intends on distributing via github rather than pypi:
4732 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
4733 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
4734 version ".tar.gz"))
4735 (file-name (string-append name "-" version ".tar.gz"))
4736 (sha256
4737 (base32
4738 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
4739 (build-system python-build-system)
4740 (arguments
4741 '(#:tests? #f)) ; no tests
4742 (propagated-inputs `(("python-urwid" ,python-urwid)))
4743 (home-page "https://github.com/pazz/urwidtrees")
4744 (synopsis "Tree widgets for urwid")
4745 (description "Urwidtrees is a Widget Container API for the @code{urwid}
4746toolkit. Use it to build trees of widgets.")
4747 (license license:gpl3+)))
4748
4749(define-public python2-urwidtrees
4750 (package-with-python2 python-urwidtrees))
4751
4752(define-public python-ua-parser
4753 (package
4754 (name "python-ua-parser")
4755 (version "0.8.0")
4756 (source
4757 (origin
4758 (method url-fetch)
4759 (uri (pypi-uri "ua-parser" version))
4760 (sha256
4761 (base32
4762 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
4763 (build-system python-build-system)
4764 (arguments
4765 `(#:tests? #f)) ;no test suite in release
4766 (native-inputs
4767 `(("python-pyyaml" ,python-pyyaml)))
4768 (home-page "https://github.com/ua-parser/uap-python")
4769 (synopsis "User agent parser")
4770 (description
4771 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
4772 (license license:asl2.0)))
4773
4774(define-public python2-ua-parser
4775 (package-with-python2 python-ua-parser))
4776
4777(define-public python-user-agents
4778 (package
4779 (name "python-user-agents")
4780 (version "1.1.0")
4781 (source
4782 (origin
4783 (method url-fetch)
4784 (uri (pypi-uri "user-agents" version))
4785 (sha256
4786 (base32
4787 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
4788 (build-system python-build-system)
4789 (arguments
4790 `(#:tests? #f)) ;missing devices.json test file in release
4791 (propagated-inputs
4792 `(("python-ua-parser" ,python-ua-parser)))
4793 (home-page "https://github.com/selwin/python-user-agents")
4794 (synopsis "User Agent strings parsing library")
4795 (description
4796 "A library to identify devices (phones, tablets) and their capabilities by
4797parsing (browser/HTTP) user agent strings.")
4798 (license license:expat)))
4799
4800(define-public python2-user-agents
4801 (package-with-python2 python-user-agents))
4802
4803(define-public python-dbus
4804 (package
4805 (name "python-dbus")
4806 (version "1.2.8")
4807 (source
4808 (origin
4809 (method url-fetch)
4810 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
4811 "dbus-python-" version ".tar.gz"))
4812 (sha256
4813 (base32
4814 "0vvvjmiwnc9cjlks3gcdk43ap7llhlpz7cm1wbw0nc2yfsxjpwdb"))))
4815 (build-system gnu-build-system)
4816 (arguments
4817 '(#:phases
4818 (modify-phases %standard-phases
4819 (add-before
4820 'check 'pre-check
4821 (lambda _
4822 ;; XXX: For the missing '/etc/machine-id'.
4823 (substitute* "test/run-test.sh"
4824 (("DBUS_FATAL_WARNINGS=1")
4825 "DBUS_FATAL_WARNINGS=0"))
4826 #t)))))
4827 (native-inputs
4828 `(("pkg-config" ,pkg-config)))
4829 (inputs
4830 `(("python" ,python-wrapper)
4831 ("dbus-glib" ,dbus-glib)))
4832 (synopsis "Python bindings for D-bus")
4833 (description "python-dbus provides bindings for libdbus, the reference
4834implementation of D-Bus.")
4835 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
4836 (license license:expat)))
4837
4838(define-public python2-dbus
4839 (package (inherit python-dbus)
4840 (name "python2-dbus")
4841 (inputs `(("python" ,python-2)
4842 ,@(alist-delete "python"
4843 (package-inputs python-dbus)
4844 equal?)))
4845 ;; FIXME: on Python 2, the test_utf8 fails with:
4846 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
4847 (arguments `(#:tests? #f))))
4848
4849(define-public python-lxml
4850 (package
4851 (name "python-lxml")
4852 (version "4.2.5")
4853 (source
4854 (origin
4855 (method url-fetch)
4856 (uri (pypi-uri "lxml" version))
4857 (sha256
4858 (base32
4859 "0zw0y9hs0nflxhl9cs6ipwwh53szi3w2x06wl0k9cylyqac0cwin"))))
4860 (build-system python-build-system)
4861 (inputs
4862 `(("libxml2" ,libxml2)
4863 ("libxslt" ,libxslt)))
4864 (home-page "http://lxml.de/")
4865 (synopsis
4866 "Python XML processing library")
4867 (description
4868 "The lxml XML toolkit is a Pythonic binding for the C libraries
4869libxml2 and libxslt.")
4870 (license license:bsd-3))) ; and a few more, see LICENSES.txt
4871
4872(define-public python2-lxml
4873 (package-with-python2 python-lxml))
4874
4875;; beautifulsoup4 has a totally different namespace than 3.x,
4876;; and pypi seems to put it under its own name, so I guess we should too
4877(define-public python-beautifulsoup4
4878 (package
4879 (name "python-beautifulsoup4")
4880 (version "4.6.3")
4881 (source
4882 (origin
4883 (method url-fetch)
4884 (uri (pypi-uri "beautifulsoup4" version))
4885 (sha256
4886 (base32
4887 "041dhalzjciw6qyzzq7a2k4h1yvyk76xigp35hv5ibnn448ydy4h"))))
4888 (build-system python-build-system)
4889 (arguments
4890 `(#:phases
4891 (modify-phases %standard-phases
4892 ;; The Python 2 source is the definitive source of beautifulsoup4. We
4893 ;; must use this conversion script when building with Python 3. The
4894 ;; conversion script also runs the tests.
4895 ;; For more information, see the file 'convert-py3k' in the source
4896 ;; distribution.
4897 (replace 'check
dff0197e 4898 (lambda _ (invoke "./convert-py3k"))))))
44d10b1f
RW
4899 (home-page
4900 "https://www.crummy.com/software/BeautifulSoup/bs4/")
4901 (synopsis
4902 "Python screen-scraping library")
4903 (description
4904 "Beautiful Soup is a Python library designed for rapidly setting up
4905screen-scraping projects. It offers Pythonic idioms for navigating,
4906searching, and modifying a parse tree, providing a toolkit for
4907dissecting a document and extracting what you need. It automatically
4908converts incoming documents to Unicode and outgoing documents to UTF-8.")
4909 (license license:expat)
4910 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
4911
4912(define-public python2-beautifulsoup4
4913 (package
4914 (inherit (package-with-python2
4915 (strip-python2-variant python-beautifulsoup4)))
4916 (arguments `(#:python ,python-2))))
4917
4918(define-public python-netifaces
4919 (package
4920 (name "python-netifaces")
4921 (version "0.10.7")
4922 (source
4923 (origin
4924 (method url-fetch)
4925 (uri (pypi-uri "netifaces" version))
4926 (sha256
4927 (base32
4928 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
4929 (build-system python-build-system)
4930 (home-page "https://github.com/al45tair/netifaces")
4931 (synopsis
4932 "Python module for portable network interface information")
4933 (description
4934 "Netifaces is a Python module providing information on network
4935interfaces in an easy and portable manner.")
4936 (license license:expat)))
4937
4938(define-public python2-netifaces
4939 (package-with-python2 python-netifaces))
4940
4941(define-public python-networkx
4942 (package
4943 (name "python-networkx")
4944 (version "2.2")
4945 (source
4946 (origin
4947 (method url-fetch)
4948 (uri (pypi-uri "networkx" version ".zip"))
4949 (sha256
4950 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
4951 (build-system python-build-system)
4952 ;; python-decorator is needed at runtime.
4953 (propagated-inputs
4954 `(("python-decorator" ,python-decorator)))
4955 (native-inputs
4956 `(("python-nose" ,python-nose)
4957 ("unzip" ,unzip)))
4958 (home-page "https://networkx.github.io/")
4959 (synopsis "Python module for creating and manipulating graphs and networks")
4960 (description
4961 "NetworkX is a Python package for the creation, manipulation, and study
4962of the structure, dynamics, and functions of complex networks.")
4963 (license license:bsd-3)))
4964
4965(define-public python2-networkx
4966 (package-with-python2 python-networkx))
4967
4968(define-public python-datrie
4969 (package
4970 (name "python-datrie")
4971 (version "0.7.1")
4972 (source
4973 (origin
4974 (method url-fetch)
4975 (uri (pypi-uri "datrie" version))
4976 (sha256
4977 (base32
4978 "08r0if7dry2q7p34gf7ffyrlnf4bdvnprxgydlfxgfnvq8f3f4bs"))))
4979 (build-system python-build-system)
4980 (arguments
4981 `(#:phases (modify-phases %standard-phases
4982 (add-before 'build 'cythonize
4983 (lambda _
4984 ;; Regenerate Cython classes to solve ABI issues with Python
4985 ;; 3.7.0. See <https://github.com/pytries/datrie/issues/52>.
4986 (invoke "cython" "src/datrie.pyx" "src/cdatrie.pxd"
4987 "src/stdio_ext.pxd" "-a"))))))
4988 (native-inputs
4989 `(("python-cython" ,python-cython)
4990 ("python-hypothesis" ,python-hypothesis)
4991 ("python-pytest" ,python-pytest)
4992 ("python-pytest-runner" ,python-pytest-runner)))
4993 (home-page "https://github.com/kmike/datrie")
4994 (synopsis "Fast, efficiently stored trie for Python")
4995 (description
4996 "This package provides a fast, efficiently stored trie implementation for
4997Python.")
4998 (license license:lgpl2.1+)))
4999
5000(define-public snakemake
5001 (package
5002 (name "snakemake")
5003 (version "5.2.4")
5004 (source
5005 (origin
5006 (method url-fetch)
5007 (uri (pypi-uri "snakemake" version))
5008 (sha256
5009 (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z"))))
5010 (build-system python-build-system)
5011 (arguments
5012 ;; TODO: Package missing test dependencies.
5013 '(#:tests? #f
5014 #:phases
5015 (modify-phases %standard-phases
5016 ;; For cluster execution Snakemake will call Python. Since there is
5017 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5018 ;; this by calling the snakemake wrapper instead.
5019 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5020 (lambda* (#:key outputs #:allow-other-keys)
5021 (substitute* "snakemake/executors.py"
5022 (("\\{sys.executable\\} -m snakemake")
5023 (string-append (assoc-ref outputs "out")
5024 "/bin/snakemake")))
5025 #t)))))
5026 (propagated-inputs
5027 `(("python-gitpython" ,python-gitpython)
5028 ("python-wrapt" ,python-wrapt)
5029 ("python-requests" ,python-requests)
5030 ("python-appdirs" ,python-appdirs)
5031 ("python-configargparse" ,python-configargparse)
5032 ("python-datrie" ,python-datrie)
5033 ("python-docutils" ,python-docutils)
5034 ("python-jinja2" ,python-jinja2)
5035 ("python-jsonschema" ,python-jsonschema)
5036 ("python-networkx" ,python-networkx)
5037 ("python-pyyaml" ,python-pyyaml)
5038 ("python-ratelimiter" ,python-ratelimiter)))
5039 (home-page "https://snakemake.readthedocs.io")
5040 (synopsis "Python-based execution environment for make-like workflows")
5041 (description
5042 "Snakemake aims to reduce the complexity of creating workflows by
5043providing a clean and modern domain specific specification language (DSL) in
5044Python style, together with a fast and comfortable execution environment.")
5045 (license license:expat)))
5046
5047;; This is currently needed for the pigx-* packages.
5048(define-public snakemake-4
5049 (package (inherit snakemake)
5050 (version "4.4.0")
5051 (source
5052 (origin
5053 (method url-fetch)
5054 (uri (pypi-uri "snakemake" version))
5055 (sha256
5056 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
5057 (propagated-inputs
5058 `(("python-wrapt" ,python-wrapt)
5059 ("python-requests" ,python-requests)
5060 ("python-appdirs" ,python-appdirs)
5061 ("python-configargparse" ,python-configargparse)
5062 ("python-pyyaml" ,python-pyyaml)
5063 ("python-ratelimiter" ,python-ratelimiter)))))
5064
5065(define-public python-pyqrcode
5066 (package
5067 (name "python-pyqrcode")
5068 (version "1.2.1")
5069 (source
5070 (origin
5071 (method url-fetch)
5072 (uri (pypi-uri "PyQRCode" version))
5073 (sha256
5074 (base32
5075 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
5076 (build-system python-build-system)
5077 (home-page
5078 "https://github.com/mnooner256/pyqrcode")
5079 (synopsis "QR code generator")
5080 (description
5081 "Pyqrcode is a QR code generator written purely in Python with
5082SVG, EPS, PNG and terminal output.")
5083 (license license:bsd-3)))
5084
5085(define-public python-seaborn
5086 (package
5087 (name "python-seaborn")
5088 (version "0.9.0")
5089 (source
5090 (origin
5091 (method url-fetch)
5092 (uri (pypi-uri "seaborn" version))
5093 (sha256
5094 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
5095 (build-system python-build-system)
5096 (arguments
5097 `(#:phases
5098 (modify-phases %standard-phases
5099 (add-before 'check 'start-xserver
5100 (lambda* (#:key inputs #:allow-other-keys)
5101 (let ((xorg-server (assoc-ref inputs "xorg-server")))
5102 ;; There must be a running X server and make check doesn't
5103 ;; start one. Therefore we must do it.
5104 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
5105 (setenv "DISPLAY" ":1")
5106 #t)))
5107 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
5108 (propagated-inputs
5109 `(("python-pandas" ,python-pandas)
5110 ("python-matplotlib" ,python-matplotlib)
5111 ("python-numpy" ,python-numpy)
5112 ("python-scipy" ,python-scipy)))
5113 (native-inputs
5114 `(("python-pytest" ,python-pytest)
5115 ("xorg-server" ,xorg-server)))
5116 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
5117 (synopsis "Statistical data visualization")
5118 (description
5119 "Seaborn is a library for making attractive and informative statistical
5120graphics in Python. It is built on top of matplotlib and tightly integrated
5121with the PyData stack, including support for numpy and pandas data structures
5122and statistical routines from scipy and statsmodels.")
5123 (license license:bsd-3)))
5124
5125(define-public python2-seaborn
5126 (package-with-python2 python-seaborn))
5127
5128(define-public python-mpmath
5129 (package
5130 (name "python-mpmath")
5131 (version "0.19")
5132 (source (origin
5133 (method url-fetch)
5134 (uri (string-append "http://mpmath.org/files/mpmath-"
5135 version ".tar.gz"))
5136 (sha256
5137 (base32
5138 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
5139 (build-system python-build-system)
5140 (arguments
5141 '(#:phases
5142 (modify-phases %standard-phases
5143 (replace 'check
5144 (lambda _
5d7a6f1c 5145 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
44d10b1f
RW
5146 (home-page "http://mpmath.org")
5147 (synopsis "Arbitrary-precision floating-point arithmetic in python")
5148 (description
5149 "@code{mpmath} can be used as an arbitrary-precision substitute for
5150Python's float/complex types and math/cmath modules, but also does much
5151more advanced mathematics.")
5152 (license license:bsd-3)))
5153
5154(define-public python2-mpmath
5155 (package-with-python2 python-mpmath))
5156
5157(define-public python-bigfloat
5158 (package
5159 (name "python-bigfloat")
5160 (version "0.3.0")
5161 (source
5162 (origin
5163 (method url-fetch)
5164 (uri (pypi-uri "bigfloat" version))
5165 (sha256
5166 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
5167 (build-system python-build-system)
5168 (inputs
5169 `(("mpfr" ,mpfr)))
5170 (home-page "https://github.com/mdickinson/bigfloat")
5171 (synopsis "Arbitrary precision floating-point arithmetic for Python")
5172 (description
5173 "This packages provides a Python interface to the MPFR library for
5174multiprecision arithmetic.")
5175 (license license:lgpl3+)))
5176
5177(define-public python2-bigfloat
5178 (package-with-python2 python-bigfloat))
5179
5180(define-public python-sympy
5181 (package
5182 (name "python-sympy")
5183 (version "1.1.1")
5184 (source
5185 (origin
5186 (method url-fetch)
5187 (uri (string-append
5188 "https://github.com/sympy/sympy/releases/download/sympy-"
5189 version "/sympy-" version ".tar.gz"))
5190 (sha256
5191 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
5192 (build-system python-build-system)
5193 (arguments
5194 `(#:phases
5195 (modify-phases %standard-phases
5196 ;; Run the core tests after installation. By default it would run
5197 ;; *all* tests, which take a very long time to complete and are known
5198 ;; to be flaky.
5199 (delete 'check)
5200 (add-after 'install 'check
5201 (lambda* (#:key outputs #:allow-other-keys)
5202 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
5203 #t)))))
5204 (propagated-inputs
5205 `(("python-mpmath" ,python-mpmath)))
5206 (home-page "http://www.sympy.org/")
5207 (synopsis "Python library for symbolic mathematics")
5208 (description
5209 "SymPy is a Python library for symbolic mathematics. It aims to become a
5210full-featured computer algebra system (CAS) while keeping the code as simple
5211as possible in order to be comprehensible and easily extensible.")
5212 (license license:bsd-3)))
5213
5214(define-public python2-sympy
5215 (package
5216 (inherit (package-with-python2 python-sympy))
5217 (arguments
5218 `(#:phases
5219 (modify-phases %standard-phases
5220 ;; Run the core tests after installation. By default it would run
5221 ;; *all* tests, which take a very long time to complete and are known
5222 ;; to be flaky.
5223 (delete 'check)
5224 (add-after 'install 'check
5225 (lambda* (#:key outputs #:allow-other-keys)
5226 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
5227 #t)))))))
5228
5229(define-public python-q
5230 (package
5231 (name "python-q")
5232 (version "2.6")
5233 (source
5234 (origin
5235 (method url-fetch)
5236 (uri (pypi-uri "q" version))
5237 (sha256
5238 (base32
5239 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
5240 (build-system python-build-system)
5241 (home-page "https://github.com/zestyping/q")
5242 (synopsis "Quick-and-dirty debugging output for tired programmers")
5243 (description
5244 "q is a Python module for \"print\" style of debugging Python code. It
5245provides convenient short API for print out of values, tracebacks, and
5246falling into the Python interpreter.")
5247 (license license:asl2.0)))
5248
5249(define-public python2-q
5250 (package-with-python2 python-q))
5251
5252(define-public python2-xlib
5253 (package
5254 (name "python2-xlib")
5255 (version "0.14")
5256 (source (origin
5257 (method url-fetch)
5258 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
5259 "/" version "/"
5260 "python-xlib-" version ".tar.gz"))
5261 (sha256
5262 (base32
5263 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
5264 (build-system python-build-system)
5265 (arguments
5266 `(#:python ,python-2 ;Python 2 only
5267 #:tests? #f)) ;no tests
5268 (home-page "http://python-xlib.sourceforge.net/")
5269 (synopsis "Python X11 client library")
5270 (description
5271 "The Python X Library is intended to be a fully functional X client
5272library for Python programs. It is useful to implement low-level X clients.
5273It is written entirely in Python.")
5274 (license license:gpl2+)))
5275
5276(define-public python-singledispatch
5277 (package
5278 (name "python-singledispatch")
5279 (version "3.4.0.3")
5280 (source
5281 (origin
5282 (method url-fetch)
5283 (uri (pypi-uri "singledispatch" version))
5284 (sha256
5285 (base32
5286 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
5287 (build-system python-build-system)
5288 (native-inputs
5289 `(("python-six" ,python-six))) ; required for conversion, not at run-time
5290 (home-page
5291 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
5292 (synopsis "Backport of singledispatch feature from Python 3.4")
5293 (description
5294 "This library brings functools.singledispatch from Python 3.4 to Python
52952.6-3.3.")
5296 (license license:expat)))
5297
5298(define-public python2-singledispatch
5299 (package-with-python2 python-singledispatch))
5300
5301;; the python- version can be removed with python-3.5
5302(define-public python-backports-abc
5303 (package
5304 (name "python-backports-abc")
5305 (version "0.5")
5306 (source
5307 (origin
5308 (method url-fetch)
5309 (uri (pypi-uri "backports_abc" version))
5310 (sha256
5311 (base32
5312 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
5313 (build-system python-build-system)
5314 (home-page "https://github.com/cython/backports_abc")
5315 (synopsis "Backport of additions to the 'collections.abc' module")
5316 (description
5317 "Python-backports-abc provides a backport of additions to the
5318'collections.abc' module in Python-3.5.")
5319 (license license:psfl)))
5320
5321(define-public python2-backports-abc
5322 (package-with-python2 python-backports-abc))
5323
5324(define-public python-backports-csv
5325 (package
5326 (name "python-backports-csv")
5327 (version "1.0.5")
5328 (source
5329 (origin
5330 (method url-fetch)
5331 (uri (pypi-uri "backports.csv" version))
5332 (sha256
5333 (base32
5334 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
5335 (build-system python-build-system)
5336 (home-page "https://github.com/ryanhiebert/backports.csv")
5337 (synopsis "Backport of Python 3's csv module for Python 2")
5338 (description
5339 "Provides a backport of Python 3's @code{csv} module for parsing
5340comma separated values. The API of the @code{csv} module in Python 2
5341is drastically different from the @code{csv} module in Python 3.
5342This is due, for the most part, to the difference between str in
5343Python 2 and Python 3.")
5344 (license license:psfl)))
5345
5346(define-public python2-backports-csv
5347 (package-with-python2 python-backports-csv))
5348
5349(define-public python2-backports-shutil-get-terminal-size
5350 (package
5351 (name "python2-backports-shutil-get-terminal-size")
5352 (version "1.0.0")
5353 (source
5354 (origin
5355 (method url-fetch)
5356 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
5357 (sha256
5358 (base32
5359 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
5360 (build-system python-build-system)
5361 (arguments
5362 `(#:python ,python-2
5363 #:phases
5364 (modify-phases %standard-phases
5365 (replace 'check
5366 (lambda _
4a4a7d9a 5367 (invoke "py.test" "-v"))))))
44d10b1f
RW
5368 (native-inputs
5369 `(("python2-pytest" ,python2-pytest)))
5370 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
5371 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
5372 (description
5373 "This package provides a backport of the @code{get_terminal_size
5374function} from Python 3.3's @code{shutil}.
5375Unlike the original version it is written in pure Python rather than C,
5376so it might be a tiny bit slower.")
5377 (license license:expat)))
5378
5379(define-public python-waf
5380 (package
5381 (name "python-waf")
5382 (version "2.0.11")
5383 (source (origin
5384 (method url-fetch)
5385 (uri (string-append "https://waf.io/"
5386 "waf-" version ".tar.bz2"))
5387 (sha256
5388 (base32
5389 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
5390 (build-system python-build-system)
5391 (arguments
5392 '(#:phases
5393 (modify-phases %standard-phases
5394 (replace 'build
5395 (lambda _
5396 (invoke "python" "waf-light" "configure" "build")))
5397 (replace 'check
5398 (lambda _
5399 (invoke "python" "waf" "--version")))
5400 (replace 'install
5401 (lambda* (#:key outputs #:allow-other-keys)
5402 (let ((out (assoc-ref outputs "out")))
5403 (install-file "waf" (string-append out "/bin")))
5404 #t))
5405 ;; waf breaks when it is wrapped.
5406 (delete 'wrap))))
5407 (home-page "https://waf.io/")
5408 (synopsis "Python-based build system")
5409 (description
5410 "Waf is a Python-based framework for configuring, compiling and installing
5411applications.")
5412 (license license:bsd-3)))
5413
5414(define-public python2-waf
5415 (package-with-python2 python-waf))
5416
5417(define-public python-pyzmq
5418 (package
5419 (name "python-pyzmq")
5420 (version "17.1.2")
5421 (source
5422 (origin
5423 (method url-fetch)
5424 (uri (pypi-uri "pyzmq" version))
5425 (sha256
5426 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
5427 (build-system python-build-system)
5428 (arguments
5429 `(#:configure-flags
5430 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
5431 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
5432 ;; --inplace' for 'python setup.py test' to work.
5433 #:tests? #f))
5434 (inputs
5435 `(("zeromq" ,zeromq)))
5436 (native-inputs
5437 `(("pkg-config" ,pkg-config)
5438 ("python-nose" ,python-nose)))
5439 (home-page "https://github.com/zeromq/pyzmq")
5440 (synopsis "Python bindings for 0MQ")
5441 (description
5442 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
5443 (license license:bsd-4)))
5444
5445(define-public python2-pyzmq
5446 (package-with-python2 python-pyzmq))
5447
5448(define-public python-pep8
5449 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
5450 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
5451 ;; some dependents' test suites, and nothing more.
5452 (package
5453 (name "python-pep8")
5454 (version "1.7.0")
5455 (source
5456 (origin
5457 (method url-fetch)
5458 (uri (pypi-uri "pep8" version))
5459 (sha256
5460 (base32
5461 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))))
5462 (build-system python-build-system)
5463 (home-page "https://pep8.readthedocs.org/")
5464 (synopsis "Python style guide checker")
5465 (description
5466 "This tools checks Python code against some of the style conventions in
5467PEP 8.")
5468 (license license:expat)))
5469
5470(define-public python2-pep8
5471 (package-with-python2 python-pep8))
5472
5473(define-public python-pyflakes
5474 (package
5475 (name "python-pyflakes")
5476 (version "2.0.0")
5477 (source
5478 (origin
5479 (method url-fetch)
5480 (uri (pypi-uri "pyflakes" version))
5481 (sha256
5482 (base32
5483 "0jba28czyvimdc72llms3f17swp3i8jdcabf5w0j00adfbn64xls"))))
5484 (build-system python-build-system)
5485 (home-page
5486 "https://github.com/pyflakes/pyflakes")
5487 (synopsis "Passive checker of Python programs")
5488 (description
5489 "Pyflakes statically checks Python source code for common errors.")
5490 (license license:expat)))
5491
5492(define-public python2-pyflakes
5493 (package-with-python2 python-pyflakes))
5494
5495(define-public python-mccabe
5496 (package
5497 (name "python-mccabe")
5498 (version "0.6.1")
5499 (source
5500 (origin
5501 (method url-fetch)
5502 (uri (pypi-uri "mccabe" version))
5503 (sha256
5504 (base32
5505 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
5506 (build-system python-build-system)
5507 (native-inputs
5508 `(("python-pytest" ,python-pytest-bootstrap)
5509 ("python-pytest-runner" ,python-pytest-runner)))
5510 (home-page "https://github.com/flintwork/mccabe")
5511 (synopsis "McCabe checker, plugin for flake8")
5512 (description
5513 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
5514complexity of Python source code.")
5515 (license license:expat)))
5516
5517(define-public python2-mccabe
5518 (package-with-python2 python-mccabe))
5519
5520(define-public python-mccabe-0.2.1
5521 (package (inherit python-mccabe)
5522 (version "0.2.1")
5523 (source
5524 (origin
5525 (method url-fetch)
5526 (uri (pypi-uri "mccabe" version))
5527 (sha256
5528 (base32
5529 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
5530
5531(define-public python2-mccabe-0.2.1
5532 (package-with-python2 python-mccabe-0.2.1))
5533
5534;; Flake8 2.4.1 requires an older version of pep8.
5535;; This should be removed ASAP.
5536(define-public python-pep8-1.5.7
5537 (package (inherit python-pep8)
5538 (version "1.5.7")
5539 (source
5540 (origin
5541 (method url-fetch)
5542 (uri (string-append
5543 "https://pypi.python.org/packages/source/p/pep8/pep8-"
5544 version
5545 ".tar.gz"))
5546 (sha256
5547 (base32
5548 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
5549 (arguments
5550 ;; XXX Tests not compatible with Python 3.5.
5551 '(#:tests? #f))))
5552
5553(define-public python2-pep8-1.5.7
5554 (package-with-python2 python-pep8-1.5.7))
5555
5556;; Flake8 2.4.1 requires an older version of pyflakes.
5557;; This should be removed ASAP.
5558(define-public python-pyflakes-0.8.1
5559 (package (inherit python-pyflakes)
5560 (version "0.8.1")
5561 (source
5562 (origin
5563 (method url-fetch)
5564 (uri (string-append
5565 "https://pypi.python.org/packages/source/p/pyflakes/pyflakes-"
5566 version
5567 ".tar.gz"))
5568 (sha256
5569 (base32
5570 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
5571 (arguments
5572 ;; XXX Tests not compatible with Python 3.5.
5573 '(#:tests? #f))))
5574
5575(define-public python2-pyflakes-0.8.1
5576 (package-with-python2 python-pyflakes-0.8.1))
5577
5578;; This package is used by hypothesis which has thousands of dependent packages.
5579;; FIXME: Consolidate this with "python-flake8" below in the next rebuild cycle.
5580(define-public python-flake8-3.5
5581 (package
5582 (name "python-flake8")
5583 (version "3.5.0")
5584 (source
5585 (origin
5586 (method url-fetch)
5587 (uri (pypi-uri "flake8" version))
5588 (sha256
5589 (base32
5590 "184b33grvvjmiwlv9kyd7yng9qv5ld24154j70z332xxg9gjclvj"))))
5591 (build-system python-build-system)
5592 (arguments
5593 `(#:phases
5594 (modify-phases %standard-phases
5595 ;; Two errors don't seem to have assigned codes.
5596 (add-after 'unpack 'delete-broken-test
5597 (lambda _ (delete-file "tests/unit/test_pyflakes_codes.py") #t))
5598 (add-after 'unpack 'fix-problem-with-pycodestyle
5599 (lambda _
5600 ;; See https://gitlab.com/pycqa/flake8/merge_requests/230
5601 ;; This should no longer be needed with the next release.
5602 (substitute* "setup.py"
5603 (("PEP8_PLUGIN\\('break_around_binary_operator'\\),")
5604 "PEP8_PLUGIN('break_after_binary_operator'),\
5605PEP8_PLUGIN('break_before_binary_operator'),"))
5606 #t))
5607 (delete 'check)
5608 (add-after 'install 'check
5609 (lambda* (#:key inputs outputs #:allow-other-keys)
5610 (add-installed-pythonpath inputs outputs)
5611 (invoke "pytest" "-v")
5612 #t)))))
5613 (propagated-inputs
5614 `(("python-pycodestyle" ,python-pycodestyle)
5615 ("python-pyflakes" ,python-pyflakes)
5616 ("python-mccabe" ,python-mccabe)))
5617 (native-inputs
5618 `(("python-mock" ,python-mock)
5619 ("python-pytest" ,python-pytest-bootstrap)
5620 ("python-pytest-runner" ,python-pytest-runner)))
5621 (home-page "https://gitlab.com/pycqa/flake8")
5622 (synopsis
5623 "The modular source code checker: pep8, pyflakes and co")
5624 (description
5625 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
5626 (properties `((python2-variant . ,(delay python2-flake8-3.5))))
5627 (license license:expat)))
5628
5629(define-public python2-flake8-3.5
5630 (let ((base (package-with-python2 (strip-python2-variant python-flake8-3.5))))
5631 (package (inherit base)
5632 (propagated-inputs
5633 `(("python2-configparser" ,python2-configparser)
5634 ("python2-enum34" ,python2-enum34)
5635 ,@(package-propagated-inputs base))))))
5636
5637;; Version 3.5.0 has compatibility issues with Pyflakes 2.0, so we need
5638;; this newer version. Keep it as a separate variable for now to avoid
5639;; rebuilding "python-hypothesis"; this should be removed in the next
5640;; rebuild cycle.
5641(define-public python-flake8
5642 (package
5643 (inherit python-flake8-3.5)
5644 (version "3.6.0")
5645 (source (origin
5646 (method url-fetch)
5647 (uri (pypi-uri "flake8" version))
5648 (sha256
5649 (base32
5650 "0w0nprx22rbvrrkbfx9v5jc5gskbm08g219l7r8wai8zfswgadba"))))
5651 (arguments
5652 (substitute-keyword-arguments (package-arguments python-flake8-3.5)
5653 ((#:phases phases)
5654 `(modify-phases ,phases
5655 (delete 'delete-broken-test)
5656 (delete 'fix-problem-with-pycodestyle)))))
5657 (properties `((python2-variant . ,(delay python2-flake8))))))
5658
5659(define-public python2-flake8
5660 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
5661 (package (inherit base)
5662 (propagated-inputs
5663 (package-propagated-inputs python2-flake8-3.5)))))
5664
5665;; python-hacking requires flake8 <2.6.0.
5666(define-public python-flake8-2.5
5667 (package
5668 (inherit python-flake8)
5669 (version "2.5.5")
5670 (source (origin
5671 (method url-fetch)
5672 (uri (pypi-uri "flake8" version))
5673 (sha256
5674 (base32
5675 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
5676 (propagated-inputs
5677 `(("python-pep8" ,python-pep8)
5678 ,@(package-propagated-inputs python-flake8)))
5679 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
5680
5681(define-public python2-flake8-2.5
5682 (package
5683 (inherit python2-flake8)
5684 (version (package-version python-flake8-2.5))
5685 (source (origin
5686 (inherit (package-source python-flake8-2.5))))
5687 (propagated-inputs
5688 `(("python2-pep8" ,python2-pep8)
5689 ,@(package-propagated-inputs python2-flake8)))))
5690
5691(define-public python-flake8-polyfill
5692 (package
5693 (name "python-flake8-polyfill")
5694 (version "1.0.2")
5695 (source
5696 (origin
5697 (method url-fetch)
5698 (uri (pypi-uri "flake8-polyfill" version))
5699 (sha256
5700 (base32
5701 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
5702 (build-system python-build-system)
5703 (arguments
5704 '(#:phases
5705 (modify-phases %standard-phases
5706 (replace 'check
5707 (lambda _
5708 (setenv "PYTHONPATH"
5709 (string-append (getcwd) "/build/lib:"
5710 (getenv "PYTHONPATH")))
4f0a0894 5711 (invoke "py.test" "-v"))))))
44d10b1f
RW
5712 (native-inputs
5713 `(("python-flake8" ,python-flake8)
5714 ("python-mock" ,python-mock)
5715 ("python-pep8" ,python-pep8)
5716 ("python-pycodestyle" ,python-pycodestyle)
5717 ("python-pytest" ,python-pytest)))
5718 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
5719 (synopsis "Polyfill package for Flake8 plugins")
5720 (description
5721 "This package that provides some compatibility helpers for Flake8
5722plugins that intend to support Flake8 2.x and 3.x simultaneously.")
5723 (license license:expat)))
5724
5725(define-public python2-flake8-polyfill
5726 (package-with-python2 python-flake8-polyfill))
5727
5728(define-public python-mistune
5729 (package
5730 (name "python-mistune")
5731 (version "0.8.4")
5732 (source
5733 (origin
5734 (method url-fetch)
5735 (uri (pypi-uri "mistune" version))
5736 (sha256
5737 (base32
5738 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
5739 (build-system python-build-system)
5740 (native-inputs
5741 `(("python-nose" ,python-nose)
5742 ("python-cython" ,python-cython)))
5743 (home-page "https://github.com/lepture/mistune")
5744 (synopsis "Markdown parser in pure Python")
5745 (description "This package provides a fast markdown parser in pure
5746Python.")
5747 (license license:bsd-3)))
5748
5749(define-public python2-mistune
5750 (package-with-python2 python-mistune))
5751
5752(define-public python-markdown
5753 (package
5754 (name "python-markdown")
5755 (version "3.0.1")
5756 (source
5757 (origin
5758 (method url-fetch)
5759 (uri (pypi-uri "Markdown" version))
5760 (sha256
5761 (base32
5762 "0z6v8649sr434d5r5zmrhydka7v7f9yas4bwcgkcs0650jdhybnh"))))
5763 (build-system python-build-system)
5764 (native-inputs
5765 `(("python-nose" ,python-nose)
5766 ("python-pyyaml" ,python-pyyaml)))
5767 (home-page "https://python-markdown.github.io/")
5768 (synopsis "Python implementation of Markdown")
5769 (description
5770 "This package provides a Python implementation of John Gruber's
5771Markdown. The library features international input, various Markdown
5772extensions, and several HTML output formats. A command line wrapper
5773markdown_py is also provided to convert Markdown files to HTML.")
5774 (license license:bsd-3)))
5775
5776(define-public python2-markdown
5777 (package-with-python2 python-markdown))
5778
5779(define-public python-ptyprocess
5780 (package
5781 (name "python-ptyprocess")
5782 (version "0.5.2")
5783 (source
5784 (origin
5785 (method url-fetch)
5786 (uri (pypi-uri "ptyprocess" version))
5787 (sha256
5788 (base32
5789 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
5790 (build-system python-build-system)
5791 (native-inputs
5792 `(("python-nose" ,python-nose)))
5793 (arguments
5794 `(#:phases
5795 (modify-phases %standard-phases
5796 (replace 'check
7904d6fa 5797 (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
5798 (home-page "https://github.com/pexpect/ptyprocess")
5799 (synopsis "Run a subprocess in a pseudo terminal")
5800 (description
5801 "This package provides a Python library used to launch a subprocess in a
5802pseudo terminal (pty), and interact with both the process and its pty.")
5803 (license license:isc)))
5804
5805(define-public python2-ptyprocess
5806 (package-with-python2 python-ptyprocess))
5807
5808(define-public python-cram
5809 (package
5810 (name "python-cram")
5811 (version "0.7")
5812 (home-page "https://bitheap.org/cram/")
5813 (source (origin
5814 (method url-fetch)
5815 (uri (list (string-append home-page "cram-"
5816 version ".tar.gz")
5817 (pypi-uri "cram" version)))
5818 (sha256
5819 (base32
5820 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
5821 (arguments
5822 '(#:phases
5823 (modify-phases %standard-phases
5824 (add-after 'unpack 'patch-source
5825 (lambda _
5826 (substitute* (find-files "cram" ".*\\.py$")
5827 ;; Replace default shell path.
5828 (("/bin/sh") (which "sh")))
5829 (substitute* (find-files "tests" ".*\\.t$")
5830 (("md5") "md5sum")
5831 (("/bin/bash") (which "bash"))
5832 (("/bin/sh") (which "sh")))
5833 (substitute* "cram/_test.py"
5834 ;; This hack works around a bug triggered by substituting
5835 ;; the /bin/sh paths. "tests/usage.t" compares the output of
5836 ;; "cram -h", which breaks the output at 80 characters. This
5837 ;; causes the line showing the default shell to break into two
5838 ;; lines, but the test expects a single line...
5839 (("env\\['COLUMNS'\\] = '80'")
5840 "env['COLUMNS'] = '160'"))
5841 #t))
5842 (delete 'check)
5843 (add-after 'install 'check
5844 ;; The test phase uses the built library and executable.
5845 ;; It's easier to run it after install since the build
5846 ;; directory contains version-specific PATH.
5847 (lambda* (#:key inputs outputs #:allow-other-keys)
5848 (add-installed-pythonpath inputs outputs)
5849 (setenv "PATH" (string-append (getenv "PATH") ":"
5850 (assoc-ref outputs "out") "/bin"))
2d7db192 5851 (invoke "make" "test"))))))
44d10b1f
RW
5852 (build-system python-build-system)
5853 (native-inputs
5854 `(("python-coverage" ,python-coverage)
5855 ("which" ,which)))
5856 (synopsis "Simple testing framework for command line applications")
5857 (description
5858 "Cram is a functional testing framework for command line applications.
5859Cram tests look like snippets of interactive shell sessions. Cram runs each
5860command and compares the command output in the test with the command’s actual
5861output.")
5862 (license license:gpl2+)))
5863
5864(define-public python2-cram
5865 (package-with-python2 python-cram))
5866
5867(define-public python-straight-plugin
5868 (package
5869 (name "python-straight-plugin")
5870 (version "1.4.1")
5871 (source
5872 (origin
5873 (method url-fetch)
5874 (uri (pypi-uri "straight.plugin" version))
5875 (sha256
5876 (base32
5877 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
5878 (build-system python-build-system)
5879 (home-page "https://github.com/ironfroggy/straight.plugin")
5880 (synopsis "Simple namespaced plugin facility")
5881 (description "Straight Plugin provides a type of plugin you can create from
5882almost any existing Python modules, and an easy way for outside developers to
5883add functionality and customization to your projects with their own plugins.")
5884 (license license:expat)))
5885
5886(define-public python2-straight-plugin
5887 (package-with-python2 python-straight-plugin))
5888
5889(define-public python-fonttools
5890 (package
5891 (name "python-fonttools")
5892 (version "3.28.0")
5893 (source (origin
5894 (method url-fetch)
5895 (uri (pypi-uri "fonttools" version ".zip"))
5896 (sha256
5897 (base32
5898 "0vsvjhidpb5kywpjgz1j3fywzkddxkb0afqai18qa3h6lqjyxwpb"))))
5899 (build-system python-build-system)
5900 (native-inputs
5901 `(("unzip" ,unzip)
5902 ("python-pytest" ,python-pytest)
5903 ("python-pytest-runner" ,python-pytest-runner)))
5904 (home-page "https://github.com/behdad/fonttools")
5905 (synopsis "Tools to manipulate font files")
5906 (description
5907 "FontTools/TTX is a library to manipulate font files from Python. It
5908supports reading and writing of TrueType/OpenType fonts, reading and writing
5909of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
5910also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
5911from an XML-based format.")
5912 (license license:expat)))
5913
5914(define-public python2-fonttools
5915 (package-with-python2 python-fonttools))
5916
5917(define-public python-ly
5918 (package
5919 (name "python-ly")
5920 (version "0.9.5")
5921 (source
5922 (origin
5923 (method url-fetch)
5924 (uri (pypi-uri name version))
5925 (sha256
5926 (base32
5927 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
5928 (build-system python-build-system)
5929 (arguments
5930 ;; FIXME: Some tests need network access.
5931 '(#:tests? #f))
5932 (synopsis "Tool and library for manipulating LilyPond files")
5933 (description "This package provides a Python library to parse, manipulate
5934or create documents in LilyPond format. A command line program ly is also
5935provided that can be used to do various manipulations with LilyPond files.")
5936 (home-page "https://pypi.python.org/pypi/python-ly")
5937 (license license:gpl2+)))
5938
5939(define-public python-appdirs
5940 (package
5941 (name "python-appdirs")
5942 (version "1.4.3")
5943 (source
5944 (origin
5945 (method url-fetch)
5946 (uri (pypi-uri "appdirs" version))
5947 (sha256
5948 (base32
5949 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
5950 (build-system python-build-system)
5951 (home-page "https://github.com/ActiveState/appdirs")
5952 (synopsis
5953 "Determine platform-specific dirs, e.g. a \"user data dir\"")
5954 (description
5955 "This module provides a portable way of finding out where user data
5956should be stored on various operating systems.")
5957 (license license:expat)))
5958
5959(define-public python2-appdirs
5960 (package-with-python2 python-appdirs))
5961
5962(define-public python-llfuse
5963 (package
5964 (name "python-llfuse")
5965 (version "1.3.5")
5966 (source (origin
5967 (method url-fetch)
5968 (uri (pypi-uri "llfuse" version ".tar.bz2"))
5969 (sha256
5970 (base32
5971 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
5972 (build-system python-build-system)
5973 (inputs
5974 `(("fuse" ,fuse)
5975 ("attr" ,attr)))
5976 (native-inputs
5977 `(("pkg-config" ,pkg-config)))
5978 (synopsis "Python bindings for FUSE")
5979 (description
5980 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
5981 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
5982 (license license:lgpl2.0+)
5983 (properties `((python2-variant . ,(delay python2-llfuse))))))
5984
5985(define-public python2-llfuse
5986 (package (inherit (package-with-python2
5987 (strip-python2-variant python-llfuse)))
5988 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
5989
5990;; For attic-0.16
5991(define-public python-llfuse-0.41
5992 (package (inherit python-llfuse)
5993 (version "0.41.1")
5994 (source (origin
5995 (method url-fetch)
5996 (uri (string-append
5997 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
5998 "llfuse-" version ".tar.bz2"))
5999 (sha256
6000 (base32
6001 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6002 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6003 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6004 (license (list license:expat license:lgpl2.0+))))
6005
6006(define-public python-msgpack
6007 (package
6008 (name "python-msgpack")
6009 (version "0.5.6")
6010 (source (origin
6011 (method url-fetch)
6012 (uri (pypi-uri "msgpack" version))
6013 (sha256
6014 (base32
6015 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6016 (build-system python-build-system)
6017 (arguments
6018 `(#:modules ((guix build utils)
6019 (guix build python-build-system)
6020 (ice-9 ftw)
6021 (srfi srfi-1)
6022 (srfi srfi-26))
6023 #:phases
6024 (modify-phases %standard-phases
6025 (replace 'check
6026 (lambda _
6027 (let ((cwd (getcwd)))
6028 (setenv "PYTHONPATH"
6029 (string-append cwd "/build/"
6030 (find (cut string-prefix? "lib" <>)
6031 (scandir (string-append cwd "/build")))
6032 ":"
6033 (getenv "PYTHONPATH")))
6034 (invoke "pytest" "-v" "test")))))))
6035 (native-inputs
6036 `(("python-pytest" ,python-pytest)))
6037 (synopsis "MessagePack (de)serializer")
6038 (description "MessagePack is a fast, compact binary serialization format,
6039suitable for similar data to JSON. This package provides CPython bindings for
6040reading and writing MessagePack data.")
6041 (home-page "https://pypi.python.org/pypi/msgpack/")
6042 (license license:asl2.0)))
6043
6044;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6045;; release 0.5. Some packages like borg still call it by the old name for now.
6046;; <https://bugs.gnu.org/30662>
6047(define-public python-msgpack-transitional
6048 (package
6049 (inherit python-msgpack)
6050 (name "python-msgpack-transitional")
6051 (arguments
6052 (substitute-keyword-arguments (package-arguments python-msgpack)
6053 ((#:phases phases)
6054 `(modify-phases ,phases
6055 (add-after 'unpack 'configure-transitional
6056 (lambda _
6057 ;; Keep using the old name.
6058 (substitute* "setup.py"
6059 (("TRANSITIONAL = False")
6060 "TRANSITIONAL = 1"))
6061 #t))))))))
6062
6063(define-public python2-msgpack
6064 (package-with-python2 python-msgpack))
6065
6066(define-public python-netaddr
6067 (package
6068 (name "python-netaddr")
6069 (version "0.7.19")
6070 (source
6071 (origin
6072 (method url-fetch)
6073 (uri (pypi-uri "netaddr" version))
6074 (sha256
6075 (base32
6076 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6077 (build-system python-build-system)
6078 (arguments `(#:tests? #f)) ;; No tests.
6079 (home-page "https://github.com/drkjam/netaddr/")
6080 (synopsis "Pythonic manipulation of network addresses")
6081 (description
6082 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6083and MAC network addresses.")
6084 (license license:bsd-3)))
6085
6086(define-public python2-netaddr
6087 (package-with-python2 python-netaddr))
6088
6089(define-public python-wrapt
6090 (package
6091 (name "python-wrapt")
dddd7a75 6092 (version "1.11.1")
44d10b1f
RW
6093 (source
6094 (origin
6095 (method url-fetch)
6096 (uri (pypi-uri "wrapt" version))
6097 (sha256
6098 (base32
dddd7a75 6099 "0cqmysny1pz01jw26q48q5zasvns6507rwhgm6wcw743f0r01sja"))))
44d10b1f
RW
6100 (build-system python-build-system)
6101 (arguments
6102 ;; Tests are not included in the tarball, they are only available in the
6103 ;; git repository.
6104 `(#:tests? #f))
6105 (home-page "https://github.com/GrahamDumpleton/wrapt")
6106 (synopsis "Module for decorators, wrappers and monkey patching")
6107 (description
6108 "The aim of the wrapt module is to provide a transparent object proxy for
6109 Python, which can be used as the basis for the construction of function
6110 wrappers and decorator functions.")
6111 (license license:bsd-2)))
6112
6113(define-public python2-wrapt
6114 (package-with-python2 python-wrapt))
6115
6116(define-public python-xlrd
6117 (package
6118 (name "python-xlrd")
6119 (version "1.0.0")
6120 (source (origin
6121 (method url-fetch)
6122 (uri (pypi-uri "xlrd" version))
6123 (sha256
6124 (base32
6125 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
6126 (build-system python-build-system)
6127 (arguments
6128 `(#:phases
6129 (modify-phases %standard-phases
6130 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
6131 ;; run tests instead for now.
45fd0081 6132 (replace 'check (lambda _ (invoke "nosetests"))))))
44d10b1f
RW
6133 (native-inputs `(("python-nose" ,python-nose)))
6134 (home-page "http://www.python-excel.org/")
6135 (synopsis "Library for extracting data from Excel files")
6136 (description "This packages provides a library to extract data from
6137spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
6138@samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
6139Unicode-aware. It is not intended as an end-user tool.")
6140 (license license:bsd-3)))
6141
6142(define-public python2-xlrd
6143 (package-with-python2 python-xlrd))
6144
6145(define-public python-prettytable
6146 (package
6147 (name "python-prettytable")
6148 (version "0.7.2")
6149 (source
6150 (origin
6151 (method url-fetch)
6152 (uri (string-append
6153 "https://pypi.python.org/packages/source/P/PrettyTable/"
6154 "prettytable-" version ".tar.bz2"))
6155 (sha256
6156 (base32
6157 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
6158 (build-system python-build-system)
6159 (home-page "http://code.google.com/p/prettytable/")
6160 (synopsis "Display tabular data in an ASCII table format")
6161 (description
6162 "A library designed to represent tabular data in visually appealing ASCII
6163tables. PrettyTable allows for selection of which columns are to be printed,
6164independent alignment of columns (left or right justified or centred) and
6165printing of sub-tables by specifying a row range.")
6166 (license license:bsd-3)))
6167
6168(define-public python2-prettytable
6169 (package-with-python2 python-prettytable))
6170
6171(define-public python-tables
6172 (package
6173 (name "python-tables")
6174 (version "3.4.4")
6175 (source
6176 (origin
6177 (method url-fetch)
6178 (uri (pypi-uri "tables" version))
6179 (sha256
6180 (base32
6181 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
6182 (modules '((guix build utils)))
6183 (snippet
6184 '(begin
6185 ;; Remove pre-compiled .pyc files from source.
6186 (for-each delete-file-recursively
6187 (find-files "." "__pycache__" #:directories? #t))
6188 (for-each delete-file (find-files "." "\\.pyc$"))
6189 #t))))
6190 (build-system python-build-system)
6191 (arguments
6192 `(;; FIXME: python-build-system does not pass configure-flags to "build"
6193 ;; or "check", so we must override the build and check phases.
6194 #:phases
6195 (modify-phases %standard-phases
6196 (add-after 'unpack 'use-gcc
6197 (lambda _
6198 (substitute* "setup.py"
6199 (("compiler = new_compiler\\(\\)" line)
6200 (string-append line
6201 "\ncompiler.set_executables(compiler='gcc',"
6202 "compiler_so='gcc',"
6203 "linker_exe='gcc',"
6204 "linker_so='gcc -shared')")))
6205 #t))
6206 (replace 'build
6207 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
6208 (invoke "python" "setup.py" "build"
6209 (string-append "--hdf5="
6210 (assoc-ref inputs "hdf5")))))
44d10b1f
RW
6211 (replace 'check
6212 (lambda* (#:key inputs #:allow-other-keys)
35d79d61
RW
6213 (invoke "python" "setup.py" "check"
6214 (string-append "--hdf5="
6215 (assoc-ref inputs "hdf5"))))))))
44d10b1f
RW
6216 (propagated-inputs
6217 `(("python-numexpr" ,python-numexpr)
6218 ("python-numpy" ,python-numpy)))
6219 (native-inputs
6220 `(("python-cython" ,python-cython)
6221 ("pkg-config" ,pkg-config)))
6222 (inputs
6223 `(("hdf5" ,hdf5)
6224 ("bzip2" ,bzip2)
6225 ("zlib" ,zlib)))
6226 (home-page "http://www.pytables.org/")
6227 (synopsis "Hierarchical datasets for Python")
6228 (description "PyTables is a package for managing hierarchical datasets and
6229designed to efficiently cope with extremely large amounts of data.")
6230 (license license:bsd-3)))
6231
6232(define-public python2-tables
6233 (package-with-python2 python-tables))
6234
6235(define-public python-pyasn1
6236 (package
6237 (name "python-pyasn1")
6238 (version "0.4.3")
6239 (source
6240 (origin
6241 (method url-fetch)
6242 (uri (pypi-uri "pyasn1" version))
6243 (sha256
6244 (base32
6245 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
6246 (build-system python-build-system)
6247 (home-page "http://pyasn1.sourceforge.net/")
6248 (synopsis "ASN.1 types and codecs")
6249 (description
6250 "This is an implementation of ASN.1 types and codecs in Python. It is
6251suitable for a wide range of protocols based on the ASN.1 specification.")
6252 (license license:bsd-2)))
6253
6254(define-public python2-pyasn1
6255 (package-with-python2 python-pyasn1))
6256
6257(define-public python-pyasn1-modules
6258 (package
6259 (name "python-pyasn1-modules")
6260 (version "0.2.2")
6261 (source
6262 (origin
6263 (method url-fetch)
6264 (uri (pypi-uri "pyasn1-modules" version))
6265 (sha256
6266 (base32
6267 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
6268 (build-system python-build-system)
6269 (propagated-inputs
6270 `(("python-pyasn1" ,python-pyasn1)))
6271 (home-page "https://sourceforge.net/projects/pyasn1/")
6272 (synopsis "ASN.1 codec implementations")
6273 (description
6274 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
6275implementations of ASN.1-based codecs and protocols.")
6276 (license license:bsd-3)))
6277
6278(define-public python2-pyasn1-modules
6279 (package-with-python2 python-pyasn1-modules))
6280
6281(define-public python-ipaddress
6282 (package
6283 (name "python-ipaddress")
6284 (version "1.0.22")
6285 (source (origin
6286 (method url-fetch)
6287 (uri (pypi-uri "ipaddress" version))
6288 (sha256
6289 (base32
6290 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
6291 (build-system python-build-system)
6292 (home-page "https://github.com/phihag/ipaddress")
6293 (synopsis "IP address manipulation library")
6294 (description
6295 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
6296 in Python. This library is used to create, poke at, and manipulate IPv4 and
6297 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
6298 module to older versions of Python.")
6299 (license license:psfl)))
6300
6301(define-public python2-ipaddress
6302 (package-with-python2 python-ipaddress))
6303
6304(define-public python2-ipaddr
6305 (package
6306 (name "python2-ipaddr")
6307 (version "2.1.11")
6308 (source
6309 (origin
6310 (method url-fetch)
6311 (uri (pypi-uri "ipaddr" version))
6312 (sha256
6313 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
6314 (build-system python-build-system)
6315 (arguments
6316 `(#:python ,python-2 ;version 2 only
6317 #:phases
6318 (modify-phases %standard-phases
6319 (replace 'check
40b8c4e3 6320 (lambda _ (invoke "python" "ipaddr_test.py"))))))
44d10b1f
RW
6321 (home-page "https://github.com/google/ipaddr-py")
6322 (synopsis "IP address manipulation library")
6323 (description
6324 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
6325IPv6 addresses and networks.
6326
6327For new implementations you may prefer to use the standard module
6328@code{ipaddress}, which was introduced in Python 3.3 and backported to older
6329versions of Python.")
6330 (license license:asl2.0)))
6331
6332(define-public python-idna
6333 (package
6334 (name "python-idna")
6335 (version "2.7")
6336 (source
6337 (origin
6338 (method url-fetch)
6339 (uri (pypi-uri "idna" version))
6340 (sha256
6341 (base32
6342 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))
6343 (build-system python-build-system)
6344 (home-page "https://github.com/kjd/idna")
6345 (synopsis "Internationalized domain names in applications")
6346 (description
6347 "This is a library to support the Internationalised Domain Names in
6348Applications (IDNA) protocol as specified in RFC 5891. This version of the
6349protocol is often referred to as “IDNA2008” and can produce different results
6350from the earlier standard from 2003. The library is also intended to act as a
6351suitable drop-in replacement for the “encodings.idna” module that comes with
6352the Python standard library but currently only supports the older 2003
6353specification.")
6354 (license license:bsd-4)))
6355
6356(define-public python2-idna
6357 (package-with-python2 python-idna))
6358
6359(define-public python-idna-ssl
6360 (package
6361 (name "python-idna-ssl")
6362 (version "1.0.1")
6363 (source
6364 (origin
6365 (method url-fetch)
6366 (uri (pypi-uri "idna-ssl" version))
6367 (sha256
6368 (base32
6369 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
6370 (build-system python-build-system)
6371 (arguments
6372 `(#:tests? #f)) ;circular dependency with python-aiohttp
6373 (home-page "https://github.com/aio-libs/idna-ssl")
6374 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
6375 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
6376domains support.")
6377 (license license:expat)))
6378
6379(define-public python-pretend
6380 (package
6381 (name "python-pretend")
6382 (version "1.0.9")
6383 (source
6384 (origin
6385 (method url-fetch)
6386 (uri (string-append "https://pypi.python.org/packages/source/p/"
6387 "pretend/pretend-" version ".tar.gz"))
6388 (sha256
6389 (base32
6390 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
6391 (build-system python-build-system)
6392 (home-page "https://github.com/alex/pretend")
6393 (synopsis "Library for stubbing in Python")
6394 (description
6395 "Pretend is a library to make stubbing with Python easier. Stubbing is a
6396technique for writing tests. You may hear the term mixed up with mocks,
6397fakes, or doubles. Basically, a stub is an object that returns pre-canned
6398responses, rather than doing any computation.")
6399 (license license:bsd-3)))
6400
6401(define-public python2-pretend
6402 (package-with-python2 python-pretend))
6403
6404(define-public python-pip
6405 (package
6406 (name "python-pip")
6407 (version "18.1")
6408 (source
6409 (origin
6410 (method url-fetch)
6411 (uri (pypi-uri "pip" version))
6412 (sha256
6413 (base32
6414 "188fclay154s520n43s7cxxlhdaiysvxf19zk8vr1xbyjyyr58n0"))))
6415 (build-system python-build-system)
6416 (arguments
6417 '(#:tests? #f)) ; there are no tests in the pypi archive.
6418 (home-page "https://pip.pypa.io/")
6419 (synopsis "Package manager for Python software")
6420 (description
6421 "Pip is a package manager for Python software, that finds packages on the
6422Python Package Index (PyPI).")
6423 (license license:expat)))
6424
6425(define-public python2-pip
6426 (package-with-python2 python-pip))
6427
6428(define-public python-tlsh
6429 (package
6430 (name "python-tlsh")
6431 (version "3.4.5")
6432 (home-page "https://github.com/trendmicro/tlsh")
6433 (source (origin
6434 (method url-fetch)
6435 (uri (string-append "https://github.com/trendmicro/tlsh/archive/v"
6436 version ".tar.gz"))
6437 (sha256
6438 (base32
6439 "1x1vahd4zg5kpyr9h9hs3fvh460p25rjy4cclwdnbbw8x3vc30q3"))
6440 (file-name (string-append name "-" version ".tar.gz"))))
6441 (build-system cmake-build-system)
6442 (arguments
6443 '(#:out-of-source? #f
6444 #:phases (modify-phases %standard-phases
6445 (replace
6446 'install
6447 (lambda* (#:key outputs #:allow-other-keys)
6448 ;; Build and install the Python bindings. The underlying
6449 ;; C++ library is apparently not meant to be installed.
6450 (let ((out (assoc-ref outputs "out")))
6451 (with-directory-excursion "py_ext"
6452 (and (system* "python" "setup.py" "build")
6453 (system* "python" "setup.py" "install"
6454 (string-append "--prefix=" out))))))))))
6455 (inputs `(("python" ,python-wrapper))) ;for the bindings
6456 (synopsis "Fuzzy matching library for Python")
6457 (description
6458 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
6459Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
6460value which can be used for similarity comparisons. Similar objects have
6461similar hash values, which allows for the detection of similar objects by
6462comparing their hash values. The byte stream should have a sufficient amount
6463of complexity; for example, a byte stream of identical bytes will not generate
6464a hash value.")
6465 (license license:asl2.0)))
6466
6467(define-public python2-tlsh
6468 (package
6469 (inherit python-tlsh)
6470 (name "python2-tlsh")
6471 (inputs `(("python" ,python-2)))))
6472
6473(define-public python-termcolor
6474 (package
6475 (name "python-termcolor")
6476 (version "1.1.0")
6477 (source
6478 (origin
6479 (method url-fetch)
6480 (uri (pypi-uri "termcolor" version))
6481 (sha256
6482 (base32
6483 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
6484 (build-system python-build-system)
6485 (arguments
6486 ;; There are no tests.
6487 `(#:tests? #f))
6488 (home-page "https://pypi.python.org/pypi/termcolor")
6489 (synopsis "ANSII Color formatting for terminal output")
6490 (description
6491 "This package provides ANSII Color formatting for output in terminals.")
6492 (license license:expat)))
6493
6494(define-public python2-termcolor
6495 (package-with-python2 python-termcolor))
6496
6497(define-public python-libarchive-c
6498 (package
6499 (name "python-libarchive-c")
6500 (version "2.8")
6501 (source (origin
6502 (method url-fetch)
6503 (uri (pypi-uri "libarchive-c" version))
6504 (sha256
6505 (base32
6506 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
6507 (build-system python-build-system)
6508 (arguments
6509 '(#:phases (modify-phases %standard-phases
6510 (add-before
6511 'build 'reference-libarchive
6512 (lambda* (#:key inputs #:allow-other-keys)
6513 ;; Retain the absolute file name of libarchive.so.
6514 (let ((libarchive (assoc-ref inputs "libarchive")))
6515 (substitute* "libarchive/ffi.py"
6516 (("find_library\\('archive'\\)")
6517 (string-append "'" libarchive
6518 "/lib/libarchive.so'"))))))
6519 (replace 'check
6520 (lambda _ (invoke "pytest" "-vv"))))))
6521 (native-inputs
6522 `(("python-mock" ,python-mock)
6523 ("python-pytest" ,python-pytest)))
6524 (inputs
6525 `(("libarchive" ,libarchive)))
6526 (home-page "https://github.com/Changaco/python-libarchive-c")
6527 (synopsis "Python interface to libarchive")
6528 (description
6529 "This package provides Python bindings to libarchive, a C library to
6530access possibly compressed archives in many different formats. It uses
6531Python's @code{ctypes} foreign function interface (FFI).")
6532 (license license:lgpl2.0+)))
6533
6534(define-public python2-libarchive-c
6535 (package-with-python2 python-libarchive-c))
6536
6537(define-public python-file
6538 (package
6539 (inherit file)
6540 (name "python-file")
6541 (build-system python-build-system)
6542 (arguments
6543 '(#:tests? #f ;no tests
6544 #:configure-flags '("--single-version-externally-managed" "--root=/")
6545 #:phases (modify-phases %standard-phases
6546 (add-before 'build 'change-directory
6547 (lambda _
6548 (chdir "python")
6549 #t))
6550 (add-before 'build 'set-library-file-name
6551 (lambda* (#:key inputs #:allow-other-keys)
6552 (let ((file (assoc-ref inputs "file")))
6553 (substitute* "magic.py"
6554 (("find_library\\('magic'\\)")
6555 (string-append "'" file "/lib/libmagic.so'")))
6556 #t))))))
6557 (inputs `(("file" ,file)))
6558 (self-native-input? #f)
6559 (synopsis "Python bindings to the libmagic file type guesser. Note that
6560this module and the python-magic module both provide a \"magic.py\" file;
6561these two modules, which are different and were developed separately, both
6562serve the same purpose: provide Python bindings for libmagic.")))
6563
6564(define-public python2-file
6565 (package-with-python2 python-file))
6566
6567(define-public python-debian
6568 (package
6569 (name "python-debian")
6570 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
6571 (version "0.1.28")
6572 (source
6573 (origin
6574 (method url-fetch)
6575 (uri (pypi-uri name version))
6576 (sha256
6577 (base32
6578 "0i15f0xzx679sd0ldq2sls9pnnps9fv6vhqvnv9dzf4qhma42i0y"))))
6579 (build-system python-build-system)
6580 (propagated-inputs
6581 `(("python-six" ,python-six)))
6582 (synopsis "Debian package related modules")
6583 (description
6584 ;; XXX: Use @enumerate instead of @itemize to work around
6585 ;; <http://bugs.gnu.org/21772>.
6586 "This package provides Python modules that abstract many formats of
6587Debian-related files, such as:
6588
6589@enumerate
6590@item Debtags information;
6591@item @file{debian/changelog} files;
6592@item packages files, pdiffs;
6593@item control files of single or multiple RFC822-style paragraphs---e.g.
6594 @file{debian/control}, @file{.changes}, @file{.dsc};
6595@item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
6596 contained files and meta-information.
6597@end enumerate\n")
6598
6599 ;; Modules are either GPLv2+ or GPLv3+.
6600 (license license:gpl3+)))
6601
6602(define-public python2-debian
6603 (package-with-python2 python-debian))
6604
6605(define-public python-nbformat
6606 (package
6607 (name "python-nbformat")
6608 (version "4.4.0")
6609 (source
6610 (origin
6611 (method url-fetch)
6612 (uri (pypi-uri "nbformat" version))
6613 (sha256
6614 (base32
6615 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
6616 (build-system python-build-system)
6617 (arguments `(#:tests? #f)) ; no test target
6618 (propagated-inputs
6619 `(("python-ipython-genutils" ,python-ipython-genutils)
6620 ("python-jsonschema" ,python-jsonschema)
6621 ("python-jupyter-core" ,python-jupyter-core)
6622 ("python-traitlets" ,python-traitlets)))
6623 (home-page "http://jupyter.org")
6624 (synopsis "Jupyter Notebook format")
6625 (description "This package provides the reference implementation of the
6626Jupyter Notebook format and Python APIs for working with notebooks.")
6627 (license license:bsd-3)))
6628
6629(define-public python2-nbformat
6630 (package-with-python2 python-nbformat))
6631
6632(define-public python-bleach
6633 (package
6634 (name "python-bleach")
6635 (version "1.4.3")
6636 (source
6637 (origin
6638 (method url-fetch)
6639 (uri (pypi-uri "bleach" version))
6640 (sha256
6641 (base32
6642 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
6643 (build-system python-build-system)
6644 (propagated-inputs
6645 `(("python-html5lib" ,python-html5lib-0.9)
6646 ("python-six" ,python-six)))
6647 (native-inputs
6648 `(("python-nose" ,python-nose)))
6649 (home-page "https://github.com/jsocol/bleach")
6650 (synopsis "Whitelist-based HTML-sanitizing tool")
6651 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
6652 (license license:asl2.0)))
6653
6654(define-public python2-bleach
6655 (package-with-python2 python-bleach))
6656
6657(define-public python-entrypoints
6658 (package
6659 (name "python-entrypoints")
6660 (version "0.2.3")
6661 (source
6662 (origin
6663 (method url-fetch)
6664 (uri (string-append "https://github.com/takluyver/entrypoints/archive/"
6665 version ".tar.gz"))
6666 (file-name (string-append name "-" version ".tar.gz"))
6667 (sha256
6668 (base32
6669 "1pdvgfr5bxyvnfvxbsd3zi0dh3il71pc4k6rinx6zpps91b84a56"))))
6670 (build-system python-build-system)
6671 ;; The package does not come with a setup.py file, so we have to generate
6672 ;; one ourselves.
6673 (arguments
6674 `(#:tests? #f
6675 #:phases
6676 (modify-phases %standard-phases
6677 (add-after 'unpack 'create-setup.py
6678 (lambda _
6679 (call-with-output-file "setup.py"
6680 (lambda (port)
6681 (format port "\
6682from setuptools import setup
6683setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
6684" ,version))))))))
6685 (home-page "https://github.com/takluyver/entrypoints")
6686 (synopsis "Discover and load entry points from installed Python packages")
6687 (description "Entry points are a way for Python packages to advertise
6688objects with some common interface. The most common examples are
6689@code{console_scripts} entry points, which define shell commands by
6690identifying a Python function to run. The @code{entrypoints} module contains
6691functions to find and load entry points.")
6692 (license license:expat)))
6693
6694(define-public python2-entrypoints
6695 (package-with-python2 python-entrypoints))
6696
6697(define-public python-nbconvert
6698 (package
6699 (name "python-nbconvert")
6700 (version "5.0.0b1")
6701 (source
6702 (origin
6703 (method url-fetch)
6704 (uri (pypi-uri "nbconvert" version))
6705 (sha256
6706 (base32
6707 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
6708 (build-system python-build-system)
6709 (arguments
6710 `(;; The "bdist_egg" target is disabled by default, causing the installation
6711 ;; to fail.
6712 #:configure-flags (list "bdist_egg")
6713 ;; FIXME: 5 failures, 40 errors.
6714 #:tests? #f))
6715 ;; #:phases
6716 ;; (modify-phases %standard-phases
6717 ;; (replace 'check
6718 ;; (lambda _
6719 ;; (zero? (system* "py.test" "-v")))))
6720 (native-inputs
6721 `(("python-pytest" ,python-pytest)))
6722 (propagated-inputs
6723 `(("python-bleach" ,python-bleach)
6724 ("python-entrypoints" ,python-entrypoints)
6725 ("python-jinja2" ,python-jinja2)
6726 ("python-jupyter-core" ,python-jupyter-core)
6727 ("python-mistune" ,python-mistune)
6728 ("python-nbformat" ,python-nbformat)
6729 ("python-pygments" ,python-pygments)
6730 ("python-traitlets" ,python-traitlets)))
6731 (home-page "http://jupyter.org")
6732 (synopsis "Converting Jupyter Notebooks")
6733 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
6734notebooks to various other formats via Jinja templates. It allows you to
6735convert an @code{.ipynb} notebook file into various static formats including:
6736
6737@enumerate
6738@item HTML
6739@item LaTeX
6740@item PDF
6741@item Reveal JS
6742@item Markdown (md)
6743@item ReStructured Text (rst)
6744@item executable script
6745@end enumerate\n")
6746 (license license:bsd-3)))
6747
6748(define-public python2-nbconvert
6749 (package-with-python2 python-nbconvert))
6750
6751(define-public python-prometheus-client
6752 (package
6753 (name "python-prometheus-client")
6754 (version "0.5.0")
6755 (source
6756 (origin
6757 (method url-fetch)
6758 (uri (pypi-uri "prometheus_client" version))
6759 (sha256
6760 (base32
6761 "0g7rpv1pq2lab1nfqdx98z9d3bqwc400alg1j4ynrpjkrbsizhg8"))))
6762 (build-system python-build-system)
6763 (arguments '(#:tests? #f)) ; tests are not included
6764 (propagated-inputs
6765 `(("python-twisted" ,python-twisted)))
6766 (home-page "https://github.com/prometheus/client_python")
6767 (synopsis "Python client for the Prometheus monitoring system")
6768 (description
6769 "This package provides a Python client for the Prometheus monitoring
6770system.")
6771 (license license:asl2.0)))
6772
6773(define-public python2-prometheus-client
6774 (package-with-python2 python-prometheus-client))
6775
6776(define-public python-notebook
6777 (package
6778 (name "python-notebook")
6779 (version "5.7.4")
6780 (source (origin
6781 (method url-fetch)
6782 (uri (pypi-uri "notebook" version))
6783 (sha256
6784 (base32
6785 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
6786 (build-system python-build-system)
6787 (arguments
6788 `(#:phases
6789 (modify-phases %standard-phases
6790 (replace 'check
6791 (lambda _
6792 ;; These tests require a browser
6793 (delete-file-recursively "notebook/tests/selenium")
6794 ;; Some tests need HOME
6795 (setenv "HOME" "/tmp")
6796 ;; This file contains "warningfilters", which are not supported
6797 ;; by this version of nose.
6798 (delete-file "setup.cfg")
6799 (with-directory-excursion "/tmp"
6800 (invoke "nosetests" "-v"))
6801 #t)))))
6802 (propagated-inputs
6803 `(("python-jupyter-core" ,python-jupyter-core)
6804 ("python-nbformat" ,python-nbformat)
6805 ("python-nbconvert" ,python-nbconvert)
6806 ("python-prometheus-client" ,python-prometheus-client)
6807 ("python-send2trash" ,python-send2trash)
6808 ("python-terminado" ,python-terminado)))
6809 (native-inputs
6810 `(("python-nose" ,python-nose)
6811 ("python-sphinx" ,python-sphinx)
6812 ("python-requests" ,python-requests)))
6813 (home-page "http://jupyter.org/")
6814 (synopsis "Web-based notebook environment for interactive computing")
6815 (description
6816 "The Jupyter HTML notebook is a web-based notebook environment for
6817interactive computing.")
6818 (properties `((python2-variant . ,(delay python2-notebook))))
6819 (license license:bsd-3)))
6820
6821(define-public python2-notebook
6822 (let ((base (package-with-python2
6823 (strip-python2-variant python-notebook))))
6824 (package (inherit base)
6825 (native-inputs
6826 `(("python2-mock" ,python2-mock)
6827 ,@(package-native-inputs base)))
6828 (arguments
6829 (substitute-keyword-arguments (package-arguments base)
6830 ((#:phases phases)
6831 `(modify-phases ,phases
6832 (add-before 'check 'disable-test-case
6833 ;; The test requires network access to localhost. Curiously it
6834 ;; fails with Python 2 only. Simply make the test-case return
6835 ;; immediately.
6836 (lambda _
6837 (substitute*
6838 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
6839 (("formats = self.nbconvert_api") "return #")))))))))))
6840
6841(define-public python-widgetsnbextension
6842 (package
6843 (name "python-widgetsnbextension")
6844 (version "3.4.2")
6845 (source
6846 (origin
6847 (method url-fetch)
6848 (uri (pypi-uri "widgetsnbextension" version))
6849 (sha256
6850 (base32
6851 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
6852 (build-system python-build-system)
6853 (propagated-inputs
6854 `(("python-ipykernel" ,python-ipykernel)
6855 ("python-notebook" ,python-notebook)))
6856 (native-inputs
6857 `(("python-certifi" ,python-certifi)
6858 ("python-nose" ,python-nose)))
6859 (home-page "https://ipython.org")
6860 (synopsis "IPython HTML widgets for Jupyter")
6861 (description "This package provides interactive HTML widgets for Jupyter
6862notebooks.")
6863 (license license:bsd-3)))
6864
6865(define-public python2-widgetsnbextension
6866 (package-with-python2 python-widgetsnbextension))
6867
6868(define-public python-ipywidgets
6869 (package
6870 (name "python-ipywidgets")
6871 (version "5.2.2")
6872 (source
6873 (origin
6874 (method url-fetch)
6875 (uri (pypi-uri "ipywidgets" version))
6876 (sha256
6877 (base32
6878 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
6879 (build-system python-build-system)
6880 (propagated-inputs
6881 `(("python-ipython" ,python-ipython)
6882 ("python-traitlets" ,python-traitlets)
6883 ("python-widgetsnbextension" ,python-widgetsnbextension)))
6884 (native-inputs
6885 `(("python-nose" ,python-nose)
6886 ("python-pytest" ,python-pytest)))
6887 (home-page "https://ipython.org")
6888 (synopsis "IPython HTML widgets for Jupyter")
6889 (description "Ipywidgets are interactive HTML widgets for Jupyter
6890notebooks and the IPython kernel. Notebooks come alive when interactive
6891widgets are used. Users gain control of their data and can visualize changes
6892in the data.")
6893 (license license:bsd-3)))
6894
6895(define-public python2-ipywidgets
6896 (package-with-python2 python-ipywidgets))
6897
6898(define-public python-jupyter-console
6899 (package
6900 (name "python-jupyter-console")
6901 (version "5.2.0")
6902 (source
6903 (origin
6904 (method url-fetch)
6905 (uri (pypi-uri "jupyter_console" version))
6906 (sha256
6907 (base32
6908 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
6909 (build-system python-build-system)
6910 ;; Tests only run in an TTY.
6911 (arguments `(#:tests? #f))
6912 (propagated-inputs
6913 `(("python-ipykernel" ,python-ipykernel)
6914 ("python-jupyter-client" ,python-jupyter-client)
6915 ("python-prompt-toolkit" ,python-prompt-toolkit-1)
6916 ("python-pygments" ,python-pygments)))
6917 (native-inputs
6918 `(("python-nose" ,python-nose)))
6919 (home-page "https://jupyter.org")
6920 (synopsis "Jupyter terminal console")
6921 (description "This package provides a terminal-based console frontend for
6922Jupyter kernels. It also allows for console-based interaction with non-Python
6923Jupyter kernels such as IJulia and IRKernel.")
6924 (license license:bsd-3)))
6925
6926(define-public python2-jupyter-console
6927 (package-with-python2 python-jupyter-console))
6928
6929;; The python-ipython and python-jupyter-console require each other. To get
6930;; the functionality in both packages working, strip down the
6931;; python-jupyter-console package when using it as an input to python-ipython.
6932(define python-jupyter-console-minimal
6933 (package
6934 (inherit python-jupyter-console)
6935 (name "python-jupyter-console-minimal")
6936 (arguments
6937 (substitute-keyword-arguments
6938 (package-arguments python-jupyter-console)
6939 ((#:phases phases)
6940 `(modify-phases ,phases
6941 (add-after 'install 'delete-bin
6942 (lambda* (#:key outputs #:allow-other-keys)
6943 ;; Delete the bin files, to avoid conflicts in profiles
6944 ;; where python-ipython and python-jupyter-console are
6945 ;; both present.
6946 (delete-file-recursively
6947 (string-append
6948 (assoc-ref outputs "out") "/bin"))))))))
6949 ;; Remove the python-ipython propagated input, to avoid the cycle
6950 (propagated-inputs
6951 (alist-delete
6952 "python-ipython"
6953 (package-propagated-inputs python-jupyter-console)))))
6954
6955(define-public python-qtconsole
6956 (package
6957 (name "python-qtconsole")
6958 (version "4.4.3")
6959 (source
6960 (origin
6961 (method url-fetch)
6962 (uri (pypi-uri "qtconsole" version))
6963 (sha256
6964 (base32
6965 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
6966 (build-system python-build-system)
6967 (arguments
6968 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
6969 ;; but we only have the LTS version 5.x. This means that there might be
6970 ;; runtime errors, but since this is a dependency of the Jupyter package,
6971 ;; and Jupyter can be used without the qtconsole we can overlook this for
6972 ;; now.
6973 `(#:tests? #f
6974 #:phases
6975 (modify-phases %standard-phases
6976 (add-before 'check 'pre-check
6977 (lambda _
6978 (setenv "QT_QPA_PLATFORM" "offscreen")
6979 #t)))))
6980 (propagated-inputs
6981 `(("python-ipykernel" ,python-ipykernel)
6982 ("python-ipython" ,python-ipython)))
6983 (native-inputs
6984 `(("python-pytest" ,python-pytest)))
6985 (home-page "http://jupyter.org")
6986 (synopsis "Jupyter Qt console")
6987 (description "This package provides a Qt-based console for Jupyter with
6988support for rich media output.")
6989 (license license:bsd-3)))
6990
6991(define-public jupyter
6992 (package
6993 (name "jupyter")
6994 (version "1.0.0")
6995 (source
6996 (origin
6997 (method url-fetch)
6998 (uri (pypi-uri "jupyter" version))
6999 (sha256
7000 (base32
7001 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
7002 (build-system python-build-system)
7003 (arguments '(#:tests? #f)) ; there are none.
7004 (propagated-inputs
7005 `(("python-ipykernel" ,python-ipykernel)
7006 ("python-ipywidgets" ,python-ipywidgets)
7007 ("python-jupyter-console" ,python-jupyter-console)
7008 ("python-nbconvert" ,python-nbconvert)
7009 ("python-notebook" ,python-notebook)
7010 ("python-qtconsole" ,python-qtconsole)))
7011 (native-search-paths
7012 (list (search-path-specification
7013 (variable "JUPYTER_PATH")
7014 (files '("share/jupyter")))))
7015 (home-page "https://jupyter.org")
7016 (synopsis "Web application for interactive documents")
7017 (description
7018 "The Jupyter Notebook is a web application that allows you to create and
7019share documents that contain live code, equations, visualizations and
7020explanatory text. Uses include: data cleaning and transformation, numerical
7021simulation, statistical modeling, machine learning and much more.")
7022 (license license:bsd-3)))
7023
7024(define-public python-chardet
7025 (package
7026 (name "python-chardet")
7027 (version "3.0.4")
7028 (source
7029 (origin
7030 (method url-fetch)
7031 (uri (pypi-uri "chardet" version))
7032 (sha256
7033 (base32
7034 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
7035 (native-inputs
7036 `(("python-hypothesis" ,python-hypothesis)
7037 ("python-pytest" ,python-pytest)
7038 ("python-pytest-runner" ,python-pytest-runner)))
7039 (build-system python-build-system)
7040 (home-page "https://github.com/chardet/chardet")
7041 (synopsis "Universal encoding detector for Python 2 and 3")
7042 (description
7043 "This package provides @code{chardet}, a Python module that can
7044automatically detect a wide range of file encodings.")
7045 (license license:lgpl2.1+)))
7046
7047(define-public python2-chardet
7048 (package-with-python2 python-chardet))
7049
7050(define-public python-docopt
7051 (package
7052 (name "python-docopt")
7053 (version "0.6.2")
7054 (source
7055 (origin
7056 (method url-fetch)
7057 ;; The release on PyPI does not include tests.
7058 (uri (string-append
7059 "https://github.com/docopt/docopt/archive/"
7060 version ".tar.gz"))
7061 (file-name (string-append name "-" version ".tar.gz"))
7062 (sha256
7063 (base32
7064 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
7065 (build-system python-build-system)
7066 (native-inputs
7067 `(("python-pytest" ,python-pytest)))
7068 (arguments
7069 `(#:phases
7070 (modify-phases %standard-phases
7071 (replace 'check
7072 (lambda _ (invoke "py.test"))))))
7073 (home-page "http://docopt.org")
7074 (synopsis "Command-line interface description language for Python")
7075 (description "This library allows the user to define a command-line
7076interface from a program's help message rather than specifying it
7077programatically with command-line parsers like @code{getopt} and
7078@code{argparse}.")
7079 (license license:expat)))
7080
7081(define-public python2-docopt
7082 (package-with-python2 python-docopt))
7083
7084(define-public python-pythondialog
7085 (package
7086 (name "python-pythondialog")
7087 (version "3.4.0")
7088 (source
7089 (origin
7090 (method url-fetch)
7091 (uri (pypi-uri "pythondialog" version))
7092 (sha256
7093 (base32
7094 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
7095 (build-system python-build-system)
7096 (arguments
7097 `(#:phases
7098 (modify-phases %standard-phases
7099 (add-after 'unpack 'patch-path
7100 (lambda* (#:key inputs #:allow-other-keys)
7101 (let* ((dialog (assoc-ref inputs "dialog")))
7102 ;; Since this library really wants to grovel the search path, we
7103 ;; must hardcode dialog's store path into it.
7104 (substitute* "dialog.py"
7105 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
7106 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
7107 #t))))
7108 #:tests? #f)) ; no test suite
7109 (propagated-inputs
7110 `(("dialog" ,dialog)))
7111 (home-page "http://pythondialog.sourceforge.net/")
7112 (synopsis "Python interface to the UNIX dialog utility")
7113 (description "A Python wrapper for the dialog utility. Its purpose is to
7114provide an easy to use, pythonic and comprehensive Python interface to dialog.
7115This allows one to make simple text-mode user interfaces on Unix-like systems")
7116 (license license:lgpl2.1)
7117 (properties `((python2-variant . ,(delay python2-pythondialog))))))
7118
7119(define-public python2-pythondialog
7120 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
7121 (package
7122 (inherit base)
7123 (version (package-version python-pythondialog))
7124 (source (origin
7125 (method url-fetch)
7126 (uri (pypi-uri "python2-pythondialog" version))
7127 (sha256
7128 (base32
7129 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
7130
7131(define-public python-configobj
7132 (package
7133 (name "python-configobj")
7134 (version "5.0.6")
7135 (source (origin
7136 (method url-fetch)
7137 (uri (string-append
7138 "https://pypi.python.org/packages/source/c/configobj/"
7139 "configobj-" version ".tar.gz"))
7140 (sha256
7141 (base32
7142 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
7143 ;; Patch setup.py so it looks for python-setuptools, which is
7144 ;; required to parse the keyword 'install_requires' in setup.py.
7145 (patches (search-patches "python-configobj-setuptools.patch"))))
7146 (build-system python-build-system)
7147 (propagated-inputs
7148 `(("python-six" ,python-six)))
7149 (synopsis "Config file reading, writing and validation")
7150 (description "ConfigObj is a simple but powerful config file reader and
7151writer: an ini file round tripper. Its main feature is that it is very easy to
7152use, with a straightforward programmer’s interface and a simple syntax for
7153config files.")
7154 (home-page "https://github.com/DiffSK/configobj")
7155 (license license:bsd-3)))
7156
7157(define-public python2-configobj
7158 (package-with-python2 python-configobj))
7159
7160(define-public python-configargparse
7161 (package
7162 (name "python-configargparse")
7163 (version "0.12.0")
7164 (source (origin
7165 (method url-fetch)
7166 (uri (pypi-uri "ConfigArgParse" version))
7167 (sha256
7168 (base32
7169 "0fgkiqh6r3rbkdq3k8c48m85g52k96686rw3a6jg4lcncrkpvk98"))))
7170 (build-system python-build-system)
7171 (native-inputs
7172 `(("python-pyyaml" ,python-pyyaml)))
7173 (arguments
7174 `(#:phases
7175 (modify-phases %standard-phases
7176 (replace 'check
7177 (lambda _
7178 ;; Bypass setuptools-shim because one test relies on "setup.py"
7179 ;; being the first argument passed to the python call.
7180 ;;
7181 ;; NOTE: Many tests do not run because they rely on Python's
7182 ;; built-in test.test_argparse, but we remove the unit tests from
7183 ;; our Python installation.
7184 (invoke "python" "setup.py" "test"))))))
7185 (synopsis "Replacement for argparse")
7186 (description "A drop-in replacement for argparse that allows options to also
7187be set via config files and/or environment variables.")
7188 (home-page "https://github.com/bw2/ConfigArgParse")
7189 (license license:expat)))
7190
7191(define-public python2-configargparse
7192 (package-with-python2 python-configargparse))
7193
7194(define-public python-argparse-manpage
7195 (package
7196 (name "python-argparse-manpage")
7197 (version "1.1")
7198 (source
7199 (origin
7200 (method url-fetch)
7201 (uri (pypi-uri "argparse-manpage" version))
7202 (sha256
7203 (base32
7204 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
7205 (build-system python-build-system)
7206 (home-page "https://github.com/praiskup/argparse-manpage")
7207 (synopsis "Build manual page from Python's ArgumentParser object")
7208 (description
7209 "This package provides tools to build manual pages from Python's
7210@code{ArgumentParser} object.")
7211 (license license:asl2.0)))
7212
7213(define-public python2-contextlib2
7214 (package
7215 (name "python2-contextlib2")
7216 (version "0.5.5")
7217 (source
7218 (origin
7219 (method url-fetch)
7220 (uri (pypi-uri "contextlib2" version))
7221 (sha256
7222 (base32
7223 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
7224 (build-system python-build-system)
7225 (arguments
7226 `(#:python ,python-2
7227 #:phases
7228 (modify-phases %standard-phases
7229 (replace 'check
7230 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
7231 (native-inputs
7232 `(("python2-unittest2" ,python2-unittest2)))
7233 (home-page "http://contextlib2.readthedocs.org/")
7234 (synopsis "Tools for decorators and context managers")
7235 (description "This module is primarily a backport of the Python
72363.2 contextlib to earlier Python versions. Like contextlib, it
7237provides utilities for common tasks involving decorators and context
7238managers. It also contains additional features that are not part of
7239the standard library.")
7240 (license license:psfl)))
7241
7242(define-public python-texttable
7243 (package
7244 (name "python-texttable")
7245 (version "0.8.7")
7246 (source
7247 (origin
7248 (method url-fetch)
7249 (uri (pypi-uri "texttable" version))
7250 (sha256
7251 (base32
7252 "1liiiydgkg37i46a418aw19fyf6z3ds51wdwwpyjbs12x0phhf4a"))))
7253 (build-system python-build-system)
7254 (arguments '(#:tests? #f)) ; no tests
7255 (home-page "https://github.com/foutaise/texttable/")
7256 (synopsis "Python module for creating simple ASCII tables")
7257 (description "Texttable is a Python module for creating simple ASCII
7258tables.")
7259 (license license:lgpl2.1+)))
7260
7261(define-public python2-texttable
7262 (package-with-python2 python-texttable))
7263
7264(define-public python-atomicwrites
7265 (package
7266 (name "python-atomicwrites")
7267 (version "1.1.5")
7268 (source (origin
7269 (method url-fetch)
7270 (uri (pypi-uri "atomicwrites" version))
7271 (sha256
7272 (base32
7273 "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214"))))
7274 (build-system python-build-system)
7275 (synopsis "Atomic file writes in Python")
7276 (description "Library for atomic file writes using platform dependent tools
7277for atomic file system operations.")
7278 (home-page "https://github.com/untitaker/python-atomicwrites")
7279 (license license:expat)))
7280
7281(define-public python2-atomicwrites
7282 (package-with-python2 python-atomicwrites))
7283
7284(define-public python-click-threading
7285 (package
7286 (name "python-click-threading")
7287 (version "0.4.4")
7288 (source (origin
7289 (method url-fetch)
7290 (uri (pypi-uri "click-threading" version))
7291 (sha256
7292 (base32
7293 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
7294 (build-system python-build-system)
7295 (propagated-inputs
7296 `(("python-click" ,python-click)))
7297 (synopsis "Utilities for multithreading in Click")
7298 (description "This package provides utilities for multithreading in Click
7299applications.")
7300 (home-page "https://github.com/click-contrib/click-threading")
7301 (license license:expat)))
7302
7303(define-public python-click-log
7304 (package
7305 (name "python-click-log")
7306 (version "0.3.2")
7307 (source (origin
7308 (method url-fetch)
7309 (uri (pypi-uri "click-log" version))
7310 (sha256
7311 (base32
7312 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
7313 (build-system python-build-system)
7314 (propagated-inputs
7315 `(("python-click" ,python-click)))
7316 (synopsis "Logging for click applications")
7317 (description "This package provides a Python library for logging Click
7318applications.")
7319 (home-page "https://github.com/click-contrib/click-log")
7320 (license license:expat)))
7321
7322(define-public python-apipkg
7323 (package
7324 (name "python-apipkg")
7325 (version "1.4")
7326 (source (origin
7327 (method url-fetch)
7328 (uri (pypi-uri "apipkg" version))
7329 (sha256
7330 (base32
7331 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
7332 (build-system python-build-system)
7333 (native-inputs
7334 `(("python-pytest" ,python-pytest)))
7335 (synopsis "Namespace control and lazy-import mechanism")
7336 (description "With apipkg you can control the exported namespace of a Python
7337package and greatly reduce the number of imports for your users. It is a small
7338pure Python module that works on virtually all Python versions.")
7339 (home-page "https://github.com/pytest-dev/apipkg")
7340 (license license:expat)))
7341
7342(define-public python2-apipkg
7343 (package-with-python2 python-apipkg))
7344
7345(define-public python-execnet
7346 (package
7347 (name "python-execnet")
7348 (version "1.4.1")
7349 (source (origin
7350 (method url-fetch)
7351 (uri (pypi-uri "execnet" version))
7352 (sha256
7353 (base32
7354 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
7355 (build-system python-build-system)
7356 (arguments
7357 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
7358 ;; The two test failures are caused by the lack of an `ssh` executable.
7359 ;; The test suite can be run with pytest after the 'install' phase.
7360 #:tests? #f))
7361 (native-inputs
7362 `(("python-pytest" ,python-pytest)
7363 ("python-setuptools-scm" ,python-setuptools-scm)))
7364 (propagated-inputs
7365 `(("python-apipkg" ,python-apipkg)))
7366 (synopsis "Rapid multi-Python deployment")
7367 (description "Execnet provides a share-nothing model with
7368channel-send/receive communication for distributing execution across many
7369Python interpreters across version, platform and network barriers. It has a
7370minimal and fast API targeting the following uses:
7371@enumerate
7372@item distribute tasks to (many) local or remote CPUs
7373@item write and deploy hybrid multi-process applications
7374@item write scripts to administer multiple environments
7375@end enumerate")
7376 (home-page "http://codespeak.net/execnet/")
7377 (license license:expat)))
7378
7379(define-public python2-execnet
7380 (package-with-python2 python-execnet))
7381
7382(define-public python-icalendar
7383 (package
7384 (name "python-icalendar")
7385 (version "4.0.3")
7386 (source (origin
7387 (method url-fetch)
7388 (uri (pypi-uri "icalendar" version))
7389 (sha256
7390 (base32
7391 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
7392 (build-system python-build-system)
7393 (propagated-inputs
7394 `(("python-dateutil" ,python-dateutil)
7395 ("python-pytz" ,python-pytz)))
7396 (synopsis "Python library for parsing iCalendar files")
7397 (description "The icalendar package is a parser/generator of iCalendar
7398files for use with Python.")
7399 (home-page "https://github.com/collective/icalendar")
7400 (license license:bsd-2)))
7401
7402(define-public python-sphinxcontrib-newsfeed
7403 (package
7404 (name "python-sphinxcontrib-newsfeed")
7405 (version "0.1.4")
7406 (source (origin
7407 (method url-fetch)
7408 (uri (pypi-uri "sphinxcontrib-newsfeed" version))
7409 (sha256
7410 (base32
7411 "1d7gam3mn8v4in4p16yn3v10vps7nnaz6ilw99j4klij39dqd37p"))))
7412 (arguments '(#:tests? #f)) ; No tests.
7413 (build-system python-build-system)
7414 (propagated-inputs
7415 `(("python-sphinx" ,python-sphinx)))
7416 (synopsis "News Feed extension for Sphinx")
7417 (description "Sphinxcontrib-newsfeed is an extension for adding a simple
7418Blog, News or Announcements section to a Sphinx website.")
7419 (home-page "https://bitbucket.org/prometheus/sphinxcontrib-newsfeed")
7420 (license license:bsd-2)))
7421
7422(define-public python-args
7423 (package
7424 (name "python-args")
7425 (version "0.1.0")
7426 (source (origin
7427 (method url-fetch)
7428 (uri (pypi-uri "args" version))
7429 (sha256
7430 (base32
7431 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
7432 (build-system python-build-system)
7433 (home-page "https://github.com/kennethreitz/args")
7434 (synopsis "Command-line argument parser")
7435 (description
7436 "This library provides a Python module to parse command-line arguments.")
7437 (license license:bsd-3)))
7438
7439(define-public python2-args
7440 (package-with-python2 python-args))
7441
7442(define-public python-clint
7443 (package
7444 (name "python-clint")
7445 (version "0.5.1")
7446 (source (origin
7447 (method url-fetch)
7448 (uri (pypi-uri "clint" version))
7449 (sha256
7450 (base32
7451 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
7452 (build-system python-build-system)
7453 (arguments
7454 '(#:phases
7455 (modify-phases %standard-phases
7456 (replace 'check
7457 (lambda _ (invoke "py.test" "-v"))))))
7458 (native-inputs
7459 `(("python-pytest" ,python-pytest)))
7460 (propagated-inputs
7461 `(("python-args" ,python-args)))
7462 (home-page "https://github.com/kennethreitz/clint")
7463 (synopsis "Command-line interface tools")
7464 (description
7465 "Clint is a Python module filled with a set of tools for developing
7466command-line applications, including tools for colored and indented
7467output, progress bar display, and pipes.")
7468 (license license:isc)))
7469
7470(define-public python2-clint
7471 (package-with-python2 python-clint))
7472
7473(define-public python-astor
7474 (package
7475 (name "python-astor")
7476 (version "0.5")
7477 (source (origin
7478 (method url-fetch)
7479 (uri (pypi-uri "astor" version))
7480 (sha256
7481 (base32
7482 "1fdafq5hkis1fxqlmhw0sn44zp2ar46nxhbc22cvwg7hsd8z5gsa"))))
7483 (build-system python-build-system)
7484 (home-page "https://github.com/berkerpeksag/astor")
7485 (synopsis "Read and write Python ASTs")
7486 (description
7487 "Astor is designed to allow easy manipulation of Python source via the
7488Abstract Syntax Tree.")
7489 (license license:bsd-3)))
7490
7491(define-public python2-astor
7492 (package-with-python2 python-astor))
7493
7494(define-public python-rply
7495 (package
7496 (name "python-rply")
7497 (version "0.7.5")
7498 (source (origin
7499 (method url-fetch)
7500 (uri (pypi-uri "rply" version))
7501 (sha256
7502 (base32
7503 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
7504 (build-system python-build-system)
7505 (propagated-inputs
7506 `(("python-appdirs" ,python-appdirs)))
7507 (home-page "https://github.com/alex/rply")
7508 (synopsis "Parser generator for Python")
7509 (description
7510 "This package provides a pure Python based parser generator, that also
7511works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
7512with a new public API, and RPython support.")
7513 (license license:bsd-3)))
7514
7515(define-public python2-rply
7516 (package-with-python2 python-rply))
7517
7518(define-public python-hy
7519 (package
7520 (name "python-hy")
7521 (version "0.13.0")
7522 (source (origin
7523 (method url-fetch)
7524 (uri (pypi-uri "hy" version))
7525 (sha256
7526 (base32
7527 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
7528 (build-system python-build-system)
7529 (arguments
7530 '(#:phases
7531 (modify-phases %standard-phases
7532 (replace 'check
7533 (lambda _
7534 ;; Tests require write access to HOME.
7535 (setenv "HOME" "/tmp")
7536 (invoke "nosetests"))))))
7537 (native-inputs
7538 `(("python-coverage" ,python-coverage)
7539 ("python-nose" ,python-nose)))
7540 (propagated-inputs
7541 `(("python-astor" ,python-astor)
7542 ("python-clint" ,python-clint)
7543 ("python-rply" ,python-rply)))
7544 (home-page "http://hylang.org/")
7545 (synopsis "Lisp frontend to Python")
7546 (description
7547 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
7548its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
7549Python at your fingertips, in Lisp form.")
7550 (license license:expat)))
7551
7552(define-public python2-hy
7553 (package-with-python2 python-hy))
7554
7555(define-public python2-functools32
7556 (package
7557 (name "python2-functools32")
7558 (version "3.2.3-2")
7559 (source
7560 (origin
7561 (method url-fetch)
7562 (uri (pypi-uri "functools32" version))
7563 (sha256
7564 (base32
7565 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
7566 (build-system python-build-system)
7567 (arguments
7568 `(#:python ,python-2
7569 #:tests? #f)) ; no test target
7570 (home-page "https://github.com/MiCHiLU/python-functools32")
7571 (synopsis
7572 "Backport of the functools module from Python 3.2.3")
7573 (description
7574 "This package is a backport of the @code{functools} module from Python
75753.2.3 for use with older versions of Python and PyPy.")
7576 (license license:expat)))
7577
7578(define-public python2-subprocess32
7579 (package
7580 (name "python2-subprocess32")
7581 (version "3.2.7")
7582 (source (origin
7583 (method url-fetch)
7584 (uri (pypi-uri "subprocess32" version))
7585 (sha256
7586 (base32
7587 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
7588 (patches
7589 (search-patches "python2-subprocess32-disable-input-test.patch"))))
7590 (build-system python-build-system)
7591 (arguments
7592 `(#:python ,python-2
7593 ;; The test suite fails with Python > 2.7.13:
7594 ;; import test.support
7595 ;; ImportError: No module named support
7596 #:tests? #f
7597 #:phases
7598 (modify-phases %standard-phases
7599 (add-after 'unpack 'patch-/bin/sh
7600 (lambda _
7601 (substitute* '("subprocess32.py"
7602 "test_subprocess32.py")
7603 (("/bin/sh") (which "sh")))
7604 #t)))))
7605 (home-page "https://github.com/google/python-subprocess32")
7606 (synopsis "Backport of the subprocess module from Python 3.2")
7607 (description
7608 "This is a backport of the @code{subprocess} standard library module
7609from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
7610new features. On POSIX systems it is guaranteed to be reliable when used
7611in threaded applications. It includes timeout support from Python 3.3 but
7612otherwise matches 3.2’s API.")
7613 (license license:psfl)))
7614
7615(define-public python2-futures
7616 (package
7617 (name "python2-futures")
7618 (version "3.2.0")
7619 (source
7620 (origin
7621 (method url-fetch)
7622 (uri (pypi-uri "futures" version))
7623 (sha256
7624 (base32
7625 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
7626 (build-system python-build-system)
7627 (arguments `(#:python ,python-2
7628 ;; FIXME: Python 2.7.14 moved the test.support library,
7629 ;; but our package has not yet been adjusted. Enable
7630 ;; tests when the python2 package has been fixed.
7631 #:tests? #f))
7632 (home-page "https://github.com/agronholm/pythonfutures")
7633 (synopsis
7634 "Backport of the concurrent.futures package from Python 3.2")
7635 (description
7636 "The concurrent.futures module provides a high-level interface for
7637asynchronously executing callables. This package backports the
7638concurrent.futures package from Python 3.2")
7639 (license license:bsd-3)))
7640
7641(define-public python-promise
7642 (package
7643 (name "python-promise")
7644 (version "0.4.2")
7645 (source
7646 (origin
7647 (method url-fetch)
7648 (uri (pypi-uri "promise" version))
7649 (sha256
7650 (base32
7651 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
7652 (build-system python-build-system)
7653 ;; Tests wants python-futures, which is a python2 only program, and
7654 ;; can't be found by python-promise at test time.
7655 (arguments `(#:tests? #f))
7656 (home-page "https://github.com/syrusakbary/promise")
7657 (synopsis "Promises/A+ implementation for Python")
7658 (description
7659 "Promises/A+ implementation for Python")
7660 (properties `((python2-variant . ,(delay python2-promise))))
7661 (license license:expat)))
7662
7663(define-public python2-promise
7664 (let ((promise (package-with-python2
7665 (strip-python2-variant python-promise))))
7666 (package (inherit promise)
7667 (arguments (substitute-keyword-arguments (package-arguments promise)
7668 ((#:tests? _) #t)))
7669 (native-inputs
7670 `(("python2-futures" ,python2-futures)
7671 ("python2-pytest" ,python2-pytest)
7672 ,@(package-native-inputs promise))))))
7673
7674(define-public python-colorama
7675 (package
7676 (name "python-colorama")
7677 (version "0.3.9")
7678 (source
7679 (origin
7680 (method url-fetch)
7681 (uri (pypi-uri "colorama" version))
7682 (sha256
7683 (base32
7684 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
7685 (build-system python-build-system)
7686 (synopsis "Colored terminal text rendering for Python")
7687 (description "Colorama is a Python library for rendering colored terminal
7688text.")
7689 (home-page "https://pypi.python.org/pypi/colorama")
7690 (license license:bsd-3)))
7691
7692(define-public python2-colorama
7693 (package-with-python2 python-colorama))
7694
7695(define-public python-rsa
7696 (package
7697 (name "python-rsa")
7698 (version "3.4.2")
7699 (source
7700 (origin
7701 (method url-fetch)
7702 (uri (pypi-uri "rsa" version))
7703 (sha256
7704 (base32
7705 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
7706 (build-system python-build-system)
7707 (propagated-inputs
7708 `(("python-pyasn1" ,python-pyasn1)))
7709 (synopsis "Pure-Python RSA implementation")
7710 (description "Python-RSA is a pure-Python RSA implementation. It supports
7711encryption and decryption, signing and verifying signatures, and key
7712generation according to PKCS#1 version 1.5. It can be used as a Python
7713library as well as on the command line.")
7714 (home-page "https://stuvel.eu/rsa")
7715 (license license:asl2.0)))
7716
7717(define-public python2-rsa
7718 (package-with-python2 python-rsa))
7719
7720(define-public python-pluggy
7721 (package
7722 (name "python-pluggy")
7723 (version "0.7.1")
7724 (source
7725 (origin
7726 (method url-fetch)
7727 (uri (pypi-uri "pluggy" version))
7728 (sha256
7729 (base32
7730 "1qbn70mksmr03hac6jgp6fiqc4l7859z8dchx2x950vhlij87swm"))))
7731 (build-system python-build-system)
7732 (native-inputs
7733 `(("python-setuptools-scm" ,python-setuptools-scm)))
7734 (synopsis "Plugin and hook calling mechanism for Python")
7735 (description "Pluggy is an extraction of the plugin manager as used by
7736Pytest but stripped of Pytest specific details.")
7737 (home-page "https://pypi.python.org/pypi/pluggy")
7738 (license license:expat)))
7739
7740(define-public python2-pluggy
7741 (package-with-python2 python-pluggy))
7742
7743(define-public python-tox
7744 (package
7745 (name "python-tox")
7746 (version "2.8.1")
7747 (source
7748 (origin
7749 (method url-fetch)
7750 (uri (pypi-uri "tox" version))
7751 (sha256
7752 (base32
7753 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
7754 (build-system python-build-system)
7755 (arguments
7756 ;; FIXME: Tests require pytest-timeout, which itself requires
7757 ;; pytest>=2.8.0 for installation.
7758 '(#:tests? #f))
7759 (propagated-inputs
7760 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
7761 ("python-py" ,python-py)
7762 ("python-virtualenv" ,python-virtualenv)))
7763 (native-inputs
7764 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
7765 ("python-pytest" ,python-pytest) ; >= 2.3.5
7766 ("python-setuptools-scm" ,python-setuptools-scm)))
7767 (home-page "http://tox.testrun.org/")
7768 (synopsis "Virtualenv-based automation of test activities")
7769 (description "Tox is a generic virtualenv management and test command line
7770tool. It can be used to check that a package installs correctly with
7771different Python versions and interpreters, or run tests in each type of
7772supported environment, or act as a frontend to continuous integration
7773servers.")
7774 (license license:expat)))
7775
7776(define-public python2-tox
7777 (package-with-python2 python-tox))
7778
7779(define-public python-jmespath
7780 (package
7781 (name "python-jmespath")
7782 (version "0.9.3")
7783 (source
7784 (origin
7785 (method url-fetch)
7786 (uri (pypi-uri "jmespath" version))
7787 (sha256
7788 (base32
7789 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
7790 (build-system python-build-system)
7791 (native-inputs
7792 `(("python-nose" ,python-nose)))
7793 (synopsis "JSON Matching Expressions")
7794 (description "JMESPath (pronounced “james path”) is a Python library that
7795allows one to declaratively specify how to extract elements from a JSON
7796document.")
7797 (home-page "https://github.com/jmespath/jmespath.py")
7798 (license license:expat)))
7799
7800(define-public python2-jmespath
7801 (package-with-python2 python-jmespath))
7802
7803(define-public python-botocore
7804 (package
7805 (name "python-botocore")
7806 (version "1.8.43")
7807 (source
7808 (origin
7809 (method url-fetch)
7810 (uri (pypi-uri "botocore" version))
7811 (sha256
7812 (base32
7813 "12cqpbnz3vfv41mp9admvciw7bc7hz57sjpqs2bxaw9wnfmbw5lg"))))
7814 (build-system python-build-system)
7815 (arguments
7816 ;; FIXME: Many tests are failing.
7817 '(#:tests? #f))
7818 (propagated-inputs
7819 `(("python-dateutil" ,python-dateutil)
7820 ("python-docutils" ,python-docutils)
7821 ("python-jmespath" ,python-jmespath)))
7822 (native-inputs
7823 `(("python-mock" ,python-mock)
7824 ("python-nose" ,python-nose)
7825 ("behave" ,behave)
7826 ("python-tox" ,python-tox)
7827 ("python-wheel" ,python-wheel)))
7828 (home-page "https://github.com/boto/botocore")
7829 (synopsis "Low-level interface to AWS")
7830 (description "Botocore is a Python library that provides a low-level
7831interface to the Amazon Web Services (AWS) API.")
7832 (license license:asl2.0)))
7833
7834(define-public python2-botocore
7835 (package-with-python2 python-botocore))
7836
7837(define-public python-xdo
7838 (package
7839 (name "python-xdo")
7840 (version "0.3")
7841 (source (origin
7842 (method url-fetch)
7843 (uri (string-append
7844 "http://http.debian.net/debian/pool/main/p/python-xdo/"
7845 "python-xdo_" version ".orig.tar.gz"))
7846 (sha256
7847 (base32
7848 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
7849 (build-system python-build-system)
7850 (arguments
7851 '(#:phases
7852 (modify-phases %standard-phases
7853 (add-before 'install 'patch-libxdo-path
7854 ;; Hardcode the path of dynamically loaded libxdo library.
7855 (lambda* (#:key inputs #:allow-other-keys)
7856 (let ((libxdo (string-append
7857 (assoc-ref inputs "xdotool")
7858 "/lib/libxdo.so")))
7859 (substitute* "xdo/_xdo.py"
7860 (("find_library\\(\"xdo\"\\)")
7861 (simple-format #f "\"~a\"" libxdo)))
7862 #t))))
7863 #:tests? #f)) ; no tests provided
7864 (propagated-inputs
7865 `(("python-six" ,python-six)))
7866 (inputs
7867 `(("xdotool" ,xdotool)
7868 ("libX11" ,libx11)))
7869 (home-page "https://tracker.debian.org/pkg/python-xdo")
7870 (synopsis "Python library for simulating X11 keyboard/mouse input")
7871 (description "Provides bindings to libxdo for manipulating X11 via simulated
7872input. (Note that this is mostly a legacy library; you may wish to look at
7873python-xdo for newer bindings.)")
7874 (license license:bsd-3)))
7875
7876(define-public python2-xdo
7877 (package-with-python2 python-xdo))
7878
7879(define-public python-mako
7880 (package
7881 (name "python-mako")
7882 (version "1.0.7")
7883 (source
7884 (origin
7885 (method url-fetch)
7886 (uri (pypi-uri "Mako" version))
7887 (sha256
7888 (base32
7889 "1bi5gnr8r8dva06qpyx4kgjc6spm2k1y908183nbbaylggjzs0jf"))))
7890 (build-system python-build-system)
7891 (propagated-inputs
7892 `(("python-markupsafe" ,python-markupsafe)))
7893 (native-inputs
7894 `(("python-mock" ,python-mock)
7895 ("python-nose" ,python-nose)
7896 ("python-pytest" ,python-pytest)))
7897 (home-page "http://www.makotemplates.org/")
7898 (synopsis "Templating language for Python")
7899 (description "Mako is a templating language for Python that compiles
7900templates into Python modules.")
7901 (license license:expat)))
7902
7903(define-public python2-mako
7904 (package-with-python2 python-mako))
7905
7906(define-public python-waitress
7907 (package
7908 (name "python-waitress")
7909 (version "1.1.0")
7910 (source
7911 (origin
7912 (method url-fetch)
7913 (uri (pypi-uri "waitress" version))
7914 (patches (search-patches "python-waitress-fix-tests.patch"))
7915 (sha256
7916 (base32
7917 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
7918 (build-system python-build-system)
7919 (home-page "https://github.com/Pylons/waitress")
7920 (synopsis "Waitress WSGI server")
7921 (description "Waitress is meant to be a production-quality pure-Python WSGI
7922server with very acceptable performance.")
7923 (license license:zpl2.1)))
7924
7925(define-public python2-waitress
7926 (package-with-python2 python-waitress))
7927
7928(define-public python-pyquery
7929 (package
7930 (name "python-pyquery")
7931 (version "1.2.17")
7932 (source
7933 (origin
7934 (method url-fetch)
7935 (uri (pypi-uri "pyquery" version))
7936 (sha256
7937 (base32
7938 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
7939 (build-system python-build-system)
7940 (native-inputs
7941 `(("python-webob" ,python-webob)
7942 ("python-webtest" ,python-webtest)))
7943 (propagated-inputs
7944 `(("python-lxml" ,python-lxml)
7945 ("python-cssselect" ,python-cssselect)))
7946 (home-page "https://github.com/gawel/pyquery")
7947 (synopsis "Make jQuery-like queries on xml documents")
7948 (description "pyquery allows you to make jQuery queries on xml documents.
7949The API is as much as possible the similar to jQuery. pyquery uses lxml for
7950fast xml and html manipulation.")
7951 (license license:bsd-3)))
7952
7953(define-public python2-pyquery
7954 (package-with-python2 python-pyquery))
7955
7956(define-public python-anyjson
7957 (package
7958 (name "python-anyjson")
7959 (version "0.3.3")
7960 (source
7961 (origin
7962 (method url-fetch)
7963 (uri (pypi-uri "anyjson" version))
7964 (sha256
7965 (base32
7966 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
7967 (build-system python-build-system)
7968 (arguments
7969 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
7970 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
7971 ;; whatever) so this transformation needs to be done before the tests
7972 ;; can be run. Maybe we could add a build step to transform beforehand
7973 ;; but it could be annoying/difficult.
7974 ;; We can enable tests for the Python 2 version, though, and do below.
7975 #:tests? #f))
7976 (home-page "https://bitbucket.org/runeh/anyjson/")
7977 (synopsis
7978 "Wraps best available JSON implementation in a common interface")
7979 (description
7980 "Anyjson loads whichever is the fastest JSON module installed
7981and provides a uniform API regardless of which JSON implementation is used.")
7982 (license license:bsd-3)
7983 (properties `((python2-variant . ,(delay python2-anyjson))))))
7984
7985(define-public python2-anyjson
7986 (let ((anyjson (package-with-python2
7987 (strip-python2-variant python-anyjson))))
7988 (package
7989 (inherit anyjson)
7990 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
7991 #:tests? #t
7992 ,@(package-arguments anyjson)))
7993 (native-inputs `(("python2-nose" ,python2-nose))))))
7994
7995(define-public python-amqp
7996 (package
7997 (name "python-amqp")
7998 (version "2.3.2")
7999 (source
8000 (origin
8001 (method url-fetch)
8002 (uri (pypi-uri "amqp" version))
8003 (sha256
8004 (base32
8005 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
8006 (build-system python-build-system)
8007 (native-inputs
8008 `(("python-case" ,python-case)
8009 ("python-pytest-sugar" ,python-pytest-sugar)
8010 ("python-mock" ,python-mock)))
8011 (propagated-inputs
8012 `(("python-vine" ,python-vine)))
8013 (home-page "https://github.com/celery/py-amqp")
8014 (synopsis
8015 "Low-level AMQP client for Python (fork of amqplib)")
8016 (description
8017 "This is a fork of amqplib which was originally written by Barry Pederson.
8018It is maintained by the Celery project, and used by kombu as a pure python
8019alternative when librabbitmq is not available.")
8020 (license license:lgpl2.1+)
8021 (properties `((python2-variant . ,(delay python2-amqp))))))
8022
8023(define-public python2-amqp
8024 (let ((amqp (package-with-python2
8025 (strip-python2-variant python-amqp))))
8026 (package
8027 (inherit amqp)
8028 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
8029 ;; unmaintained. Weirdly, does not do this on the python 3
8030 ;; version?
8031 #:tests? #f
8032 ,@(package-arguments amqp))))))
8033
8034(define-public python-txamqp
8035 (package
8036 (name "python-txamqp")
8037 (version "0.8.2")
8038 (source
8039 (origin
8040 (method url-fetch)
8041 (uri (pypi-uri "txAMQP" version))
8042 (sha256
8043 (base32
8044 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
8045 (build-system python-build-system)
8046 (propagated-inputs
8047 `(("python-six" ,python-six)
8048 ("python-twisted" ,python-twisted)))
8049 (home-page "https://github.com/txamqp/txamqp")
8050 (synopsis "Communicate with AMQP peers and brokers using Twisted")
8051 (description
8052 "This package provides a Python library for communicating with AMQP peers
8053and brokers using the asynchronous networking framework Twisted. It contains
8054all the necessary code to connect, send and receive messages to/from an
8055AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
8056also includes support for using Thrift RPC over AMQP in Twisted
8057applications.")
8058 (license license:asl2.0)))
8059
8060(define-public python2-txamqp
8061 (package-with-python2 python-txamqp))
8062
8063(define-public python-kombu
8064 (package
8065 (name "python-kombu")
8066 (version "4.2.2")
8067 (source
8068 (origin
8069 (method url-fetch)
8070 (uri (pypi-uri "kombu" version))
8071 (sha256
8072 (base32
8073 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
8074 (build-system python-build-system)
8075 (native-inputs
8076 `(("python-mock" ,python-mock)
8077 ("python-case" ,python-case)
8078 ("python-pyro4" ,python-pyro4)
8079 ("python-pytest-sugar" ,python-pytest-sugar)
8080 ("python-pytz" ,python-pytz)))
8081 (propagated-inputs
8082 `(("python-anyjson" ,python-anyjson)
8083 ("python-amqp" ,python-amqp)
8084 ("python-redis" ,python-redis)))
8085 (home-page "https://kombu.readthedocs.io")
8086 (synopsis "Message passing library for Python")
8087 (description "The aim of Kombu is to make messaging in Python as easy as
8088possible by providing an idiomatic high-level interface for the AMQ protocol,
8089and also provide proven and tested solutions to common messaging problems.
8090AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
8091message orientation, queuing, routing, reliability and security, for which the
8092RabbitMQ messaging server is the most popular implementation.")
8093 (license license:bsd-3)
8094 (properties `((python2-variant . ,(delay python2-kombu))))))
8095
8096(define-public python2-kombu
8097 (let ((kombu (package-with-python2
8098 (strip-python2-variant python-kombu))))
8099 (package
8100 (inherit kombu)
8101 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
8102 ;; It works fine on the python3 variant.
8103 #:tests? #f
8104 ,@(package-arguments kombu)))
8105 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8106 ,@(package-native-inputs kombu))))))
8107
8108(define-public python-billiard
8109 (package
8110 (name "python-billiard")
8111 (version "3.5.0.5")
8112 (source
8113 (origin
8114 (method url-fetch)
8115 (uri (pypi-uri "billiard" version))
8116 (sha256
8117 (base32
8118 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
8119 (build-system python-build-system)
8120 (native-inputs
8121 `(("python-case" ,python-case)
8122 ("python-pytest" ,python-pytest)))
8123 (home-page "https://github.com/celery/billiard")
8124 (synopsis
8125 "Python multiprocessing fork with improvements and bugfixes")
8126 (description
8127 "Billiard is a fork of the Python 2.7 multiprocessing package. The
8128multiprocessing package itself is a renamed and updated version of R Oudkerk's
8129pyprocessing package. This standalone variant is intended to be compatible with
8130Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
8131 (license license:bsd-3)
8132 (properties `((python2-variant . ,(delay python2-billiard))))))
8133
8134(define-public python2-billiard
8135 (let ((billiard (package-with-python2
8136 (strip-python2-variant python-billiard))))
8137 (package
8138 (inherit billiard)
8139 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8140 ("python2-mock" ,python2-mock)
8141 ,@(package-native-inputs billiard))))))
8142
8143(define-public python-celery
8144 (package
8145 (name "python-celery")
8146 (version "4.2.1")
8147 (source
8148 (origin
8149 (method url-fetch)
8150 (uri (pypi-uri "celery" version))
8151 (sha256
8152 (base32
8153 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
8154 (build-system python-build-system)
8155 (arguments
8156 '(;; TODO The tests fail with Python 3.7
8157 ;; https://github.com/celery/celery/issues/4849
8158 #:tests? #f
8159 #:phases
8160 (modify-phases %standard-phases
8161 (add-after 'unpack 'patch-requirements
8162 (lambda _
8163 (substitute* "requirements/test.txt"
8164 (("pytest>=3\\.0,<3\\.3")
8165 "pytest>=3.0"))
8166 #t)))))
8167 (native-inputs
8168 `(("python-case" ,python-case)
8169 ("python-pytest" ,python-pytest)))
8170 (propagated-inputs
8171 `(("python-pytz" ,python-pytz)
8172 ("python-billiard" ,python-billiard)
8173 ("python-kombu" ,python-kombu)))
8174 (home-page "https://celeryproject.org")
8175 (synopsis "Distributed Task Queue")
8176 (description "Celery is an asynchronous task queue/job queue based on
8177distributed message passing. It is focused on real-time operation, but
8178supports scheduling as well. The execution units, called tasks, are executed
8179concurrently on a single or more worker servers using multiprocessing,
8180Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
8181synchronously (wait until ready).")
8182 (license license:bsd-3)
8183 (properties `((python2-variant . ,(delay python2-celery))))))
8184
8185(define-public python2-celery
8186 (let ((celery (package-with-python2
8187 (strip-python2-variant python-celery))))
8188 (package
8189 (inherit celery)
8190 (native-inputs `(("python2-unittest2" ,python2-unittest2)
8191 ("python2-mock" ,python2-mock)
8192 ,@(package-native-inputs celery))))))
8193
8194(define-public python-translitcodec
8195 (package
8196 (name "python-translitcodec")
8197 (version "0.4.0")
8198 (source
8199 (origin
8200 (method url-fetch)
8201 (uri (pypi-uri "translitcodec" version))
8202 (sha256
8203 (base32
8204 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
8205 (build-system python-build-system)
8206 (arguments
8207 `(#:tests? #f)) ; no tests provided
8208 (home-page
8209 "https://github.com/claudep/translitcodec")
8210 (synopsis
8211 "Unicode to 8-bit charset transliteration codec")
8212 (description
8213 "This package contains codecs for transliterating ISO 10646 texts into
8214best-effort representations using smaller coded character sets (ASCII,
8215ISO 8859, etc.).")
8216 (license license:expat)))
8217
8218(define-public python2-translitcodec
8219 (package-with-python2 python-translitcodec))
8220
8221(define-public python-editor
8222 (package
8223 (name "python-editor")
8224 (version "0.5")
8225 (source
8226 (origin
8227 (method url-fetch)
8228 (uri (pypi-uri "python-editor" version))
8229 (sha256
8230 (base32
8231 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
8232 (build-system python-build-system)
8233 (home-page
8234 "https://github.com/fmoo/python-editor")
8235 (synopsis
8236 "Programmatically open an editor, capture the result")
8237 (description
8238 "python-editor is a library that provides the editor module for
8239programmatically interfacing with your system's $EDITOR.")
8240 (license license:asl2.0)))
8241
8242(define-public python2-editor
8243 (package-with-python2 python-editor))
8244
8245(define-public python-sphinxcontrib-programoutput
8246 (package
8247 (name "python-sphinxcontrib-programoutput")
8248 (version "0.10")
8249 (source (origin
8250 (method url-fetch)
8251 (uri (pypi-uri "sphinxcontrib-programoutput" version))
8252 (sha256
8253 (base32
8254 "153hhnlbx4688zj9wd64819ps5znc2jlyp5crkgzvn5hxgy99vpx"))))
8255 (build-system python-build-system)
8256 (arguments
8257 ;; FIXME: Many tests are failing and the upstream is gone.
8258 '(#:tests? #f))
8259 (propagated-inputs
8260 `(("python-sphinx" ,python-sphinx)))
8261 (synopsis "Sphinx extension to include program output")
8262 (description "A Sphinx extension to literally insert the output of arbitrary
8263commands into documents, helping you to keep your command examples up to date.")
8264 (home-page "https://github.com/lunaryorn/sphinxcontrib-programoutput")
8265 (license license:bsd-2)))
8266
8267(define-public python2-sphinxcontrib-programoutput
8268 (package-with-python2 python-sphinxcontrib-programoutput))
8269
8270(define-public python-sphinx-repoze-autointerface
8271 (package
8272 (name "python-sphinx-repoze-autointerface")
8273 (version "0.8")
8274 (source (origin
8275 (method url-fetch)
8276 (uri (pypi-uri "repoze.sphinx.autointerface" version))
8277 (sha256
8278 (base32
8279 "08ycivzf7bh4a1zcyp31hbyqs1b2c9r26raa3vxjwwmbfqr3iw4f"))))
8280 (build-system python-build-system)
8281 (arguments '(#:tests? #f)) ; No tests.
8282 (propagated-inputs
8283 `(("python-sphinx" ,python-sphinx)
8284 ("python-zope-interface" ,python-zope-interface)))
8285 (synopsis "Auto-generate Sphinx API docs from Zope interfaces")
8286 (description "This package defines an extension for the Sphinx documentation
8287system. The extension allows generation of API documentation by
8288introspection of @code{zope.interface} instances in code.")
8289 (home-page "https://github.com/repoze/repoze.sphinx.autointerface")
8290 (license license:repoze)))
8291
8292(define-public python2-sphinx-repoze-autointerface
8293 (package-with-python2 python-sphinx-repoze-autointerface))
8294
8295(define-public python-vobject
8296 (package
8297 (name "python-vobject")
8298 (version "0.9.5")
8299 (source (origin
8300 (method url-fetch)
8301 (uri (pypi-uri "vobject" version))
8302 (sha256
8303 (base32
8304 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
8305 (build-system python-build-system)
8306 (arguments
8307 '(;; The test suite relies on some non-portable Windows interfaces.
8308 #:tests? #f))
8309 (propagated-inputs
8310 `(("python-dateutil" ,python-dateutil)
8311 ("python-pyicu" ,python-pyicu)))
8312 (synopsis "Parse and generate vCard and vCalendar files")
8313 (description "Vobject is intended to be a full featured Python package for
8314parsing and generating vCard and vCalendar files. Currently, iCalendar files
8315are supported and well tested. vCard 3.0 files are supported, and all data
8316should be imported, but only a few components are understood in a sophisticated
8317way.")
8318 (home-page "http://eventable.github.io/vobject/")
8319 (license license:asl2.0)))
8320
8321(define-public python2-vobject
8322 (package-with-python2 python-vobject))
8323
8324(define-public python-munkres
8325 (package
8326 (name "python-munkres")
8327 (version "1.0.8")
8328 (source (origin
8329 (method url-fetch)
8330 (uri (pypi-uri "munkres" version))
8331 (sha256
8332 (base32
8333 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
8334 (build-system python-build-system)
8335 (arguments
8336 '(#:tests? #f)) ; no test suite
8337 (home-page "http://software.clapper.org/munkres/")
8338 (synopsis "Implementation of the Munkres algorithm")
8339 (description "The Munkres module provides an implementation of the Munkres
8340algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
8341useful for solving the Assignment Problem.")
8342 (license license:bsd-3)))
8343
8344(define-public python2-munkres
8345 (package-with-python2 python-munkres))
8346
8347(define-public python-whoosh
8348 (package
8349 (name "python-whoosh")
8350 (version "2.7.4")
8351 (source
8352 (origin
8353 (method url-fetch)
8354 (uri (pypi-uri "Whoosh" version))
8355 (sha256
8356 (base32
8357 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
8358 (build-system python-build-system)
8359 (native-inputs
8360 `(("python-pytest" ,python-pytest)))
8361 (home-page "https://bitbucket.org/mchaput/whoosh")
8362 (synopsis "Full text indexing, search, and spell checking library")
8363 (description
8364 "Whoosh is a fast, pure-Python full text indexing, search, and spell
8365checking library.")
8366 (license license:bsd-2)))
8367
8368(define-public python2-whoosh
8369 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
8370 (package (inherit whoosh)
8371 (propagated-inputs
8372 `(("python2-backport-ssl-match-hostname"
8373 ,python2-backport-ssl-match-hostname)
8374 ,@(package-propagated-inputs whoosh))))))
8375
8376(define-public python-pathlib
8377 (package
8378 (name "python-pathlib")
8379 (version "1.0.1")
8380 (source (origin
8381 (method url-fetch)
8382 (uri (pypi-uri "pathlib" version))
8383 (sha256
8384 (base32
8385 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
8386 (build-system python-build-system)
8387 ;; The tests depend on the internal "test" module, which does not provide
8388 ;; a stable interface.
8389 (arguments `(#:tests? #f))
8390 (home-page "https://pathlib.readthedocs.org/")
8391 (synopsis "Object-oriented file system paths")
8392 (description "Pathlib offers a set of classes to handle file system paths.
8393It offers the following advantages over using string objects:
8394
8395@enumerate
8396@item No more cumbersome use of os and os.path functions. Everything can
8397be done easily through operators, attribute accesses, and method calls.
8398@item Embodies the semantics of different path types. For example,
8399comparing Windows paths ignores casing.
8400@item Well-defined semantics, eliminating any inconsistencies or
8401ambiguities (forward vs. backward slashes, etc.).
8402@end enumerate
8403
8404Note: In Python 3.4, pathlib is now part of the standard library. For other
8405Python versions please consider python-pathlib2 instead, which tracks the
8406standard library module. This module (python-pathlib) isn't maintained
8407anymore.")
8408 (license license:expat)))
8409
8410(define-public python2-pathlib
8411 (package-with-python2 python-pathlib))
8412
8413(define-public python2-pathlib2
8414 (package
8415 (name "python2-pathlib2")
8416 (version "2.3.2")
8417 (source (origin
8418 (method url-fetch)
8419 (uri (pypi-uri "pathlib2" version))
8420 (sha256
8421 (base32
8422 "10yb0iv5x2hs631rcppkhbddx799d3h8pcwmkbh2a66ns3w71ccf"))))
8423 (build-system python-build-system)
8424 ;; We only need the the Python 2 variant, since for Python 3 our minimum
8425 ;; version is 3.4 which already includes this package as part of the
8426 ;; standard library.
8427 (arguments
8428 `(#:python ,python-2))
8429 (propagated-inputs
8430 `(("python2-scandir" ,python2-scandir)
8431 ("python2-six" ,python2-six)))
8432 (home-page "https://pypi.python.org/pypi/pathlib2/")
8433 (synopsis "Object-oriented file system paths - backport of standard
8434pathlib module")
8435 (description "The goal of pathlib2 is to provide a backport of standard
8436pathlib module which tracks the standard library module, so all the newest
8437features of the standard pathlib can be used also on older Python versions.
8438
8439Pathlib offers a set of classes to handle file system paths. It offers the
8440following advantages over using string objects:
8441
8442@enumerate
8443@item No more cumbersome use of os and os.path functions. Everything can
8444be done easily through operators, attribute accesses, and method calls.
8445@item Embodies the semantics of different path types. For example,
8446comparing Windows paths ignores casing.
8447@item Well-defined semantics, eliminating any inconsistencies or
8448ambiguities (forward vs. backward slashes, etc.).
8449@end enumerate")
8450 (license license:expat)))
8451
8452(define-public python2-pathlib2-bootstrap
8453 (hidden-package
8454 (package
8455 (inherit python2-pathlib2)
8456 (name "python2-pathlib2-bootstrap")
8457 (propagated-inputs
8458 `(("python2-scandir" ,python2-scandir)
8459 ("python2-six" ,python2-six-bootstrap))))))
8460
8461(define-public python-jellyfish
8462 (package
8463 (name "python-jellyfish")
8464 (version "0.5.6")
8465 (source (origin
8466 (method url-fetch)
8467 (uri (pypi-uri "jellyfish" version))
8468 (sha256
8469 (base32
8470 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
8471 (build-system python-build-system)
8472 (native-inputs
8473 `(("python-pytest" ,python-pytest)))
8474 (home-page "https://github.com/jamesturk/jellyfish")
8475 (synopsis "Approximate and phonetic matching of strings")
8476 (description "Jellyfish uses a variety of string comparison and phonetic
8477encoding algorithms to do fuzzy string matching.")
8478 (license license:bsd-2)
8479 (properties `((python2-variant . ,(delay python2-jellyfish))))))
8480
8481(define-public python2-jellyfish
8482 (let ((jellyfish (package-with-python2
8483 (strip-python2-variant python-jellyfish))))
8484 (package (inherit jellyfish)
8485 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
8486 ,@(package-native-inputs jellyfish))))))
8487
8488(define-public python2-unicodecsv
8489 (package
8490 (name "python2-unicodecsv")
8491 (version "0.14.1")
8492 (source (origin
8493 (method url-fetch)
8494 ;; The test suite is not included in the PyPi release.
8495 ;; https://github.com/jdunck/python-unicodecsv/issues/19
8496 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
8497 "archive/" version ".tar.gz"))
8498 (file-name (string-append name "-" version ".tar.gz"))
8499 (sha256
8500 (base32
8501 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
8502 (build-system python-build-system)
8503 (arguments
8504 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
8505 #:python ,python-2))
8506 (native-inputs
8507 `(("python2-unittest2" ,python2-unittest2)))
8508 (home-page "https://github.com/jdunck/python-unicodecsv")
8509 (synopsis "Unicode CSV module for Python 2")
8510 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
8511module, adding support for Unicode strings.")
8512 (license license:bsd-2)))
8513
8514(define-public python-rarfile
8515 (package
8516 (name "python-rarfile")
8517 (version "2.8")
8518 (source (origin
8519 (method url-fetch)
8520 (uri (pypi-uri "rarfile" version))
8521 (sha256
8522 (base32
8523 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
8524 (build-system python-build-system)
8525 (arguments
8526 '(#:phases
8527 (modify-phases %standard-phases
8528 (replace 'check
8529 ;; Many tests fail, but the installation proceeds.
e59dd341 8530 (lambda _ (invoke "make" "-C" "test" "test"))))))
44d10b1f
RW
8531 (native-inputs
8532 `(("which" ,which))) ; required for tests
8533 (propagated-inputs
8534 `(("libarchive" ,libarchive)))
8535 (home-page "https://github.com/markokr/rarfile")
8536 (synopsis "RAR archive reader for Python")
8537 (description "This is Python module for RAR archive reading. The interface
8538is made as zipfile like as possible.")
8539 (license license:isc)))
8540
8541(define-public python2-rarfile
8542 (package-with-python2 python-rarfile))
8543
8544(define-public python-magic
8545 (package
8546 (name "python-magic")
8547 (version "0.4.15")
8548 (source
8549 (origin
8550 (method url-fetch)
8551 (uri (pypi-uri "python-magic" version))
8552 (sha256
8553 (base32
8554 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
8555 (file-name (string-append name "-" version "-checkout"))))
8556 (build-system python-build-system)
8557 (arguments
8558 ;; The tests are unreliable, so don't run them. The tests fail
8559 ;; under Python3 because they were written for Python2 and
8560 ;; contain import statements that do not work in Python3. One of
8561 ;; the tests fails under Python2 because its assertions are
8562 ;; overly stringent; it relies on comparing output strings which
8563 ;; are brittle and can change depending on the version of
8564 ;; libmagic being used and the system on which the test is
8565 ;; running. In my case, under GuixSD 0.10.0, only one test
8566 ;; failed, and it seems to have failed only because the version
8567 ;; of libmagic that is packaged in Guix outputs a slightly
8568 ;; different (but not wrong) string than the one that the test
8569 ;; expected.
8570 '(#:tests? #f
8571 #:phases (modify-phases %standard-phases
8572 ;; Replace a specific method call with a hard-coded
8573 ;; path to the necessary libmagic.so file in the
8574 ;; store. If we don't do this, then the method call
8575 ;; will fail to find the libmagic.so file, which in
8576 ;; turn will cause any application using
8577 ;; python-magic to fail.
8578 (add-before 'build 'hard-code-path-to-libmagic
8579 (lambda* (#:key inputs #:allow-other-keys)
8580 (let ((file (assoc-ref inputs "file")))
8581 (substitute* "magic.py"
8582 (("ctypes.util.find_library\\('magic'\\)")
8583 (string-append "'" file "/lib/libmagic.so'")))
8584 #t)))
8585 (add-before 'install 'disable-egg-compression
8586 (lambda _
8587 (let ((port (open-file "setup.cfg" "a")))
8588 (display "\n[easy_install]\nzip_ok = 0\n"
8589 port)
8590 (close-port port)
8591 #t))))))
8592 (inputs
8593 ;; python-magic needs to be able to find libmagic.so.
8594 `(("file" ,file)))
8595 (home-page
8596 "https://github.com/ahupp/python-magic")
8597 (synopsis
8598 "File type identification using libmagic")
8599 (description
8600 "This module uses ctypes to access the libmagic file type
8601identification library. It makes use of the local magic database and
8602supports both textual and MIME-type output. Note that this module and
8603the python-file module both provide a \"magic.py\" file; these two
8604modules, which are different and were developed separately, both serve
8605the same purpose: to provide Python bindings for libmagic.")
8606 (license license:expat)))
8607
8608(define-public python2-magic
8609 (package-with-python2 python-magic))
8610
8611(define-public python2-s3cmd
8612 (package
8613 (name "python2-s3cmd")
8614 (version "1.6.1")
8615 (source
8616 (origin
8617 (method url-fetch)
8618 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
8619 "s3cmd-" version ".tar.gz"))
8620 (sha256
8621 (base32
8622 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
8623 (build-system python-build-system)
8624 (arguments
8625 ;; s3cmd is written for python2 only and contains no tests.
8626 `(#:python ,python-2
8627 #:tests? #f))
8628 (propagated-inputs
8629 `(("python2-dateutil" ,python2-dateutil)
8630 ;; The python-file package also provides a magic.py module.
8631 ;; This is an unfortunate state of affairs; however, s3cmd
8632 ;; fails to install if it cannot find specifically the
8633 ;; python-magic package. Thus we include it, instead of using
8634 ;; python-file. Ironically, s3cmd sometimes works better
8635 ;; without libmagic bindings at all:
8636 ;; https://github.com/s3tools/s3cmd/issues/198
8637 ("python2-magic" ,python2-magic)))
8638 (home-page "http://s3tools.org/s3cmd")
8639 (synopsis "Command line tool for S3-compatible storage services")
8640 (description
8641 "S3cmd is a command line tool for uploading, retrieving and managing data
8642in storage services that are compatible with the Amazon Simple Storage
8643Service (S3) protocol, including S3 itself. It supports rsync-like backup,
8644GnuPG encryption, and more. It also supports management of Amazon's
8645CloudFront content delivery network.")
8646 (license license:gpl2+)))
8647
8648(define-public python-pkgconfig
8649 (package
8650 (name "python-pkgconfig")
8651 (version "1.3.1")
8652 (source
8653 (origin
8654 (method url-fetch)
8655 (uri (pypi-uri "pkgconfig" version))
8656 (sha256
8657 (base32
8658 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
8659 (build-system python-build-system)
8660 (native-inputs
8661 `(("python-nose" ,python-nose)))
8662 (inputs
8663 `(("pkg-config" ,pkg-config)))
8664 (arguments
8665 `(#:phases
8666 (modify-phases %standard-phases
8667 (add-before 'build 'patch
8668 ;; Hard-code the path to pkg-config.
8669 (lambda _
8670 (substitute* "pkgconfig/pkgconfig.py"
8671 (("cmd = 'pkg-config")
8672 (string-append "cmd = '" (which "pkg-config"))))
8673 #t))
8674 (replace 'check
8675 (lambda _
8676 (invoke "nosetests" "test.py"))))))
8677 (home-page "https://github.com/matze/pkgconfig")
8678 (synopsis "Python interface for pkg-config")
8679 (description "This module provides a Python interface to pkg-config. It
8680can be used to find all pkg-config packages, check if a package exists,
8681check if a package meets certain version requirements, query CFLAGS and
8682LDFLAGS and parse the output to build extensions with setup.py.")
8683 (license license:expat)))
8684
8685(define-public python2-pkgconfig
8686 (package-with-python2 python-pkgconfig))
8687
8688(define-public python-bz2file
8689 (package
8690 (name "python-bz2file")
8691 (version "0.98")
8692 (source
8693 (origin
8694 (method url-fetch)
8695 (uri (pypi-uri "bz2file" version))
8696 (sha256
8697 (base32
8698 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
8699 (build-system python-build-system)
8700 (arguments
8701 `(#:tests? #f)) ; Tests use deprecated python modules.
8702 (home-page "https://github.com/nvawda/bz2file")
8703 (synopsis "Read and write bzip2-compressed files")
8704 (description
8705 "Bz2file is a Python library for reading and writing bzip2-compressed
8706files. It contains a drop-in replacement for the I/O interface in the
8707standard library's @code{bz2} module, including features from the latest
8708development version of CPython that are not available in older releases.")
8709 (license license:asl2.0)))
8710
8711(define-public python2-bz2file
8712 (package-with-python2 python-bz2file))
8713
8714(define-public python-future
8715 (package
8716 (name "python-future")
8717 (version "0.16.0")
8718 (source
8719 (origin
8720 (method url-fetch)
8721 (uri (pypi-uri "future" version))
8722 (sha256
8723 (base32
8724 "1nzy1k4m9966sikp0qka7lirh8sqrsyainyf8rk97db7nwdfv773"))))
8725 (build-system python-build-system)
8726 ;; Many tests connect to the network or are otherwise flawed.
8727 ;; https://github.com/PythonCharmers/python-future/issues/210
8728 (arguments
8729 `(#:tests? #f))
8730 (home-page "http://python-future.org")
8731 (synopsis "Single-source support for Python 3 and 2")
8732 (description
8733 "@code{python-future} is the missing compatibility layer between Python 2 and
8734Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
8735to support both Python 2 and Python 3 with minimal overhead.")
8736 (license license:expat)))
8737
8738(define-public python2-future
8739 (package-with-python2 python-future))
8740
8741(define-public python-cysignals
8742 (package
8743 (name "python-cysignals")
8e3e51df 8744 (version "1.9.0")
44d10b1f
RW
8745 (source
8746 (origin
8747 (method url-fetch)
8e3e51df 8748 (uri (pypi-uri "cysignals" version))
44d10b1f
RW
8749 (sha256
8750 (base32
8e3e51df 8751 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
44d10b1f
RW
8752 (build-system python-build-system)
8753 (native-inputs
8754 `(("python-cython" ,python-cython)
8755 ("python-sphinx" ,python-sphinx)))
8756 (inputs
8757 `(("pari-gp" ,pari-gp)))
8758 (arguments
8759 `(#:modules ((guix build python-build-system)
8760 ((guix build gnu-build-system) #:prefix gnu:)
8761 (guix build utils))
8762 ;; FIXME: Tests are executed after installation and currently fail
8763 ;; when not installing into standard locations; the author is working
8764 ;; on a fix.
8765 #:tests? #f
8766 #:phases
8767 (modify-phases %standard-phases
8768 (add-before
8769 'build 'configure
8770 (assoc-ref gnu:%standard-phases 'configure)))))
8771 (home-page
8772 "https://github.com/sagemath/cysignals")
8773 (synopsis
8774 "Handling of interrupts and signals for Cython")
8775 (description
8776 "The cysignals package provides mechanisms to handle interrupts (and
8777other signals and errors) in Cython code, using two related approaches,
8778for mixed Cython/Python code or external C libraries and pure Cython code,
8779respectively.")
8780 (license license:lgpl3+)))
8781
8782(define-public python2-cysignals
8783 (package-with-python2 python-cysignals))
8784
8785(define-public python2-shedskin
8786 (package
8787 (name "python2-shedskin")
8788 (version "0.9.4")
8789 (source
8790 (origin
8791 (method url-fetch)
8792 (uri (string-append "https://github.com/shedskin/shedskin/"
8793 "releases/download/v" version
8794 "/shedskin-" version ".tgz"))
8795 (sha256
8796 (base32
8797 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
8798 (build-system python-build-system)
8799 (arguments
8800 `(#:python ,python-2
8801 #:phases (modify-phases %standard-phases
8802 (add-after 'unpack 'fix-resulting-include-libs
8803 (lambda* (#:key inputs #:allow-other-keys)
8804 (let ((libgc (assoc-ref inputs "libgc"))
8805 (pcre (assoc-ref inputs "pcre")))
8806 (substitute* "shedskin/makefile.py"
8807 (("variable == 'CCFLAGS':[ ]*")
8808 (string-append "variable == 'CCFLAGS':\n"
8809 " line += ' -I " pcre "/include"
8810 " -I " libgc "/include'"))
8811 (("variable == 'LFLAGS':[ ]*")
8812 (string-append "variable == 'LFLAGS':\n"
8813 " line += ' -L" pcre "/lib"
8814 " -L " libgc "/lib'")))
8815 #t))))))
8816 (inputs `(("pcre" ,pcre)
8817 ("libgc" ,libgc)))
8818 (home-page "https://shedskin.github.io/")
8819 (synopsis "Experimental Python-2 to C++ Compiler")
8820 (description (string-append "This is an experimental compiler for a subset of
8821Python. It generates C++ code and a Makefile."))
8822 (license (list license:gpl3 license:bsd-3 license:expat))))
8823
8824(define-public python2-rope
8825 (package
8826 (name "python2-rope")
8827 (version "0.10.3")
8828 (source
8829 (origin
8830 (method url-fetch)
8831 (uri (pypi-uri "rope" version))
8832 (sha256
8833 (base32
8834 "18k5znhpwvrfck3yp0jmhd5j8r0f0s8bk1zh5yhs2cfgmfhbwigb"))))
8835 (arguments
8836 ;; Rope is currently python-2 only.
8837 ;; https://github.com/python-rope/rope/issues/57
8838 `(#:python ,python-2))
8839 (build-system python-build-system)
8840 (native-inputs
8841 `(("python2-unittest2" ,python2-unittest2)))
8842 (home-page "https://github.com/python-rope/rope")
8843 (synopsis "Refactoring library for Python")
8844 (description "Rope is a refactoring library for Python. It facilitates
8845the renaming, moving and extracting of attributes, functions, modules, fields
8846and parameters in Python 2 source code. These refactorings can also be applied
8847to occurrences in strings and comments.")
8848 (license license:gpl2)))
8849
8850(define-public python-py3status
8851 (package
8852 (name "python-py3status")
8853 (version "3.7")
8854 (source
8855 (origin
8856 (method url-fetch)
8857 (uri (pypi-uri "py3status" version))
8858 (sha256
8859 (base32
8860 "0shxcfz4wcczj0mhwp4w0dvwd2fdd9bgprq8slim1519iiqzgwhq"))))
8861 (build-system python-build-system)
8862 (inputs
8863 `(("file" ,file)))
8864 (arguments
8865 '(#:phases
8866 (modify-phases %standard-phases
8867 ;; 'file' is used for detection of configuration file encoding
8868 ;; let's make link the dependency to particular input
8869 (add-before 'build 'patch-file-path
8870 (lambda* (#:key inputs #:allow-other-keys)
8871 (let ((file-path (assoc-ref inputs "file")))
8872 (substitute* "py3status/parse_config.py"
8873 (("\\['file', '-b'")
8874 (string-append "['" file-path "/bin/file', '-b'")))
8875 #t))))
8876 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
8877 (home-page "https://github.com/ultrabug/py3status")
8878 (synopsis "Extensible i3status wrapper written in Python")
8879 (description "py3status is an i3status wrapper which extends i3status
8880functionality in a modular way, allowing you to extend your panel with your
8881own code, responding to click events and updating clock every second.")
8882 (license license:bsd-3)))
8883
8884(define-public python-tblib
8885 (package
8886 (name "python-tblib")
8887 (version "1.3.2")
8888 (source (origin
8889 (method url-fetch)
8890 (uri (pypi-uri "tblib" version))
8891 (sha256 (base32
8892 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
8893 (build-system python-build-system)
8894 (arguments
8895 `(#:phases
8896 (modify-phases %standard-phases
8897 (add-before 'check 'adjust-tests
8898 (lambda _
8899 (when (which "python3")
8900 ;; Adjust the example output to match that of Python 3.7:
8901 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
8902 (substitute* "README.rst"
8903 (("Exception\\('fail',") "Exception('fail'"))
8904 #t)))
8905 (replace 'check
8906 (lambda _
8907 ;; Upstream runs tests after installation and the package itself
8908 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
8909 ;; found.
8910 (setenv "PYTHONPATH"
8911 (string-append (getcwd) "/build/lib:"
8912 (getenv "PYTHONPATH")))
8913 (invoke "py.test" "-vv" "tests" "README.rst"))))))
8914 (native-inputs
8915 `(("python-pytest" ,python-pytest)
8916 ("python-six" ,python-six)))
8917 (home-page "https://github.com/ionelmc/python-tblib")
8918 (synopsis "Traceback serialization library")
8919 (description
8920 "Traceback serialization allows you to:
8921
8922@enumerate
8923@item Pickle tracebacks and raise exceptions with pickled tracebacks in
8924different processes. This allows better error handling when running code over
8925multiple processes (imagine multiprocessing, billiard, futures, celery etc).
8926
8927@item Parse traceback strings and raise with the parsed tracebacks.
8928@end enumerate\n")
8929 (license license:bsd-3)))
8930
8931(define-public python2-tblib
8932 (package-with-python2 python-tblib))
8933
8934(define-public python-greenlet
8935 (package
8936 (name "python-greenlet")
8937 (version "0.4.15")
8938 (source (origin
8939 (method url-fetch)
8940 (uri (pypi-uri "greenlet" version))
8941 (sha256
8942 (base32
8943 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
8944 (build-system python-build-system)
8945 (home-page "https://greenlet.readthedocs.io/")
8946 (synopsis "Lightweight in-process concurrent programming")
8947 (description
8948 "Greenlet package is a spin-off of Stackless, a version of CPython
8949that supports micro-threads called \"tasklets\". Tasklets run
8950pseudo-concurrently (typically in a single or a few OS-level threads) and
8951are synchronized with data exchanges on \"channels\".")
8952 (license (list license:psfl license:expat))))
8953
8954(define-public python2-greenlet
8955 (package-with-python2 python-greenlet))
8956
8957(define-public python-objgraph
8958 (package
8959 (name "python-objgraph")
8960 (version "3.4.0")
8961 (source
8962 (origin
8963 (method url-fetch)
8964 (uri (pypi-uri "objgraph" version))
8965 (sha256
8966 (base32
8967 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
8968 (build-system python-build-system)
8969 (propagated-inputs
8970 `(("python-graphviz" ,python-graphviz)))
8971 (native-inputs
8972 `(("python-mock" ,python-mock)
8973 ("graphviz" ,graphviz)))
8974 (home-page "https://mg.pov.lt/objgraph/")
8975 (synopsis "Draw Python object reference graphs with graphviz")
8976 (description
8977 "This package provides tools to draw Python object reference graphs with
8978graphviz.")
8979 (license license:expat)))
8980
8981(define-public python-gevent
8982 (package
8983 (name "python-gevent")
8984 (version "1.3.7")
8985 (source (origin
8986 (method url-fetch)
8987 (uri (pypi-uri "gevent" version))
8988 (sha256
8989 (base32
8990 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
8991 (modules '((guix build utils)))
8992 (snippet
8993 '(begin
8994 ;; unbunding libev and c-ares
8995 (delete-file-recursively "deps")
8996 #t))))
8997 (build-system python-build-system)
8998 (arguments
8999 `(#:modules ((ice-9 ftw)
9000 (ice-9 match)
9001 (srfi srfi-26)
9002 (guix build utils)
9003 (guix build python-build-system))
9004 #:phases (modify-phases %standard-phases
9005 (add-after 'unpack 'unpack-libev
9006 (lambda* (#:key inputs #:allow-other-keys)
9007 (mkdir-p "deps/libev")
9008 ;; FIXME: gevent requires building libev, even though
9009 ;; it only links against the proper one.
9010 (invoke "tar" "-xf" (assoc-ref inputs "libev-source")
9011 "--strip-components=1" "-C" "deps/libev")))
9012 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
9013 (lambda _
9014 (substitute* "src/gevent/subprocess.py"
9015 (("/bin/sh") (which "sh")))
9016 (for-each (lambda (file)
9017 (substitute* file
9018 (("/bin/sh") (which "sh"))
9019 (("/bin/true") (which "true"))))
9020 (find-files "src/greentest" "\\.py$"))
9021 #t))
9022 (add-before 'build 'do-not-use-bundled-sources
9023 (lambda* (#:key inputs #:allow-other-keys)
9024 (setenv "CONFIG_SHELL" (which "bash"))
9025 (setenv "LIBEV_EMBED" "false")
9026 (setenv "CARES_EMBED" "false")
9027 (setenv "EMBED" "false")
9028
9029 (let ((greenlet (string-append
9030 (assoc-ref inputs "python-greenlet")
9031 "/include")))
9032 (match (scandir greenlet
9033 (lambda (item)
9034 (string-prefix? "python" item)))
9035 ((python)
9036 (setenv "CPATH"
9037 (string-append greenlet "/" python)))))
9038 #t))
9039 (add-before 'check 'skip-timer-test
9040 (lambda _
9041 ;; XXX: Skip 'TestTimerResolution', which appears to be
9042 ;; unreliable.
9043 (substitute* "src/greentest/test__core_timer.py"
9044 (("not greentest.RUNNING_ON_CI") "False"))
9045 #t))
9046 (replace 'check
9047 (lambda _
9048 ;; Make sure the build directory is on PYTHONPATH.
9049 (setenv "PYTHONPATH"
9050 (string-append
9051 (getenv "PYTHONPATH") ":"
9052 (getcwd) "/build/"
9053 (car (scandir "build" (cut string-prefix? "lib." <>)))))
9054 (with-directory-excursion "src/greentest"
9055 ;; XXX: Many tests require network access. Instead we only
9056 ;; run known-good tests. Unfortunately we cannot use
9057 ;; recursion here since this directory also contains
9058 ;; Python-version-specific subfolders.
9059 (apply invoke "python" "testrunner.py" "--config"
9060 "known_failures.py"
9061 (scandir "." (cut regexp-exec
9062 (make-regexp "test_+(subprocess|core)")
9063 <>)))))))))
9064 (propagated-inputs
9065 `(("python-greenlet" ,python-greenlet)
9066 ("python-objgraph" ,python-objgraph)))
9067 (native-inputs
9068 `(("libev-source" ,(package-source libev))
9069 ("python-six" ,python-six)))
9070 (inputs
9071 `(("c-ares" ,c-ares)
9072 ("libev" ,libev)))
9073 (home-page "http://www.gevent.org/")
9074 (synopsis "Coroutine-based network library")
9075 (description
9076 "gevent is a coroutine-based Python networking library that uses greenlet
9077to provide a high-level synchronous API on top of the libev event loop.")
9078 (license license:expat)
9079 (properties `((python2-variant . ,(delay python2-gevent))))))
9080
9081(define-public python2-gevent
9082 (let ((base (package-with-python2
9083 (strip-python2-variant python-gevent))))
9084 (package
9085 (inherit base)
9086 (native-inputs `(,@(package-native-inputs python-gevent)
9087 ("python-mock" ,python2-mock))))))
9088
9089(define-public python-fastimport
9090 (package
9091 (name "python-fastimport")
9092 (version "0.9.6")
9093 (source
9094 (origin
9095 (method url-fetch)
9096 (uri (pypi-uri "fastimport" version))
9097 (sha256
9098 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
9099 (build-system python-build-system)
9100 (home-page "https://github.com/jelmer/python-fastimport")
9101 (synopsis "VCS fastimport parser and generator in Python")
9102 (description "This package provides a parser for and generator of the Git
9103@url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
9104format.")
9105 (license license:gpl2+)))
9106
9107(define-public python2-fastimport
9108 (package-with-python2 python-fastimport))
9109
9110(define-public python-twisted
9111 (package
9112 (name "python-twisted")
9113 (version "17.1.0")
9114 (source (origin
9115 (method url-fetch)
9116 (uri (pypi-uri "Twisted" version ".tar.bz2"))
9117 (sha256
9118 (base32
9119 "1p245mg15hkxp7hy5cyq2fgvlgjkb4cg0gwkwd148nzy1bbi3wnv"))))
9120 (build-system python-build-system)
9121 (arguments
9122 '(#:tests? #f)) ; FIXME: Some tests are failing.
9123 ;; #:phases
9124 ;; (modify-phases %standard-phases
9125 ;; (replace 'check
9126 ;; (lambda _
9127 ;; (zero? (system* "./bin/trial" "twisted")))))
9128 (propagated-inputs
9129 `(("python-zope-interface" ,python-zope-interface)
9130 ("python-incremental" ,python-incremental)
9131 ("python-constantly" ,python-constantly)
9132 ("python-automat" ,python-automat)))
9133 (home-page "https://twistedmatrix.com/")
9134 (synopsis "Asynchronous networking framework written in Python")
9135 (description
9136 "Twisted is an extensible framework for Python programming, with special
9137focus on event-based network programming and multiprotocol integration.")
9138 (license license:expat)))
9139
9140(define-public python2-twisted
9141 (package-with-python2 python-twisted))
9142
9143(define-public python-pika
9144 (package
9145 (name "python-pika")
9146 (version "0.12.0")
9147 (source
9148 (origin
9149 (method url-fetch)
9150 (uri (pypi-uri "pika" version))
9151 (sha256
9152 (base32
9153 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
9154 (build-system python-build-system)
9155 (native-inputs
9156 `(("python-pyev" ,python-pyev)
9157 ("python-tornado" ,python-tornado)
9158 ("python-twisted" ,python-twisted)))
9159 (home-page "https://pika.readthedocs.org")
9160 (synopsis "Pure Python AMQP Client Library")
9161 (description
9162 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
9163Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
9164network support library.")
9165 (license license:bsd-3)))
9166
9167(define-public python2-pika
9168 (package-with-python2 python-pika))
9169
9170(define-public python-ply
9171 (package
9172 (name "python-ply")
9173 (version "3.10")
9174 (source
9175 (origin
9176 (method url-fetch)
9177 (uri (pypi-uri "ply" version))
9178 (sha256
9179 (base32
9180 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
9181 (build-system python-build-system)
9182 (home-page "http://www.dabeaz.com/ply/")
9183 (synopsis "Python Lex & Yacc")
9184 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
9185It uses LR parsing and does extensive error checking.")
9186 (license license:bsd-3)))
9187
9188(define-public python2-ply
9189 (package-with-python2 python-ply))
9190
9191(define-public python-tabulate
9192 (package
9193 (name "python-tabulate")
9194 (version "0.7.7")
9195 (source (origin
9196 (method url-fetch)
9197 (uri (pypi-uri "tabulate" version))
9198 (sha256
9199 (base32
9200 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
9201 (build-system python-build-system)
9202 (arguments
9203 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
9204 ;; and the latest release is not tagged in the upstream repository.
9205 '(#:tests? #f))
9206 (home-page "https://bitbucket.org/astanin/python-tabulate")
9207 (synopsis "Pretty-print tabular data")
9208 (description
9209 "Tabulate is a library and command-line utility to pretty-print tabular
9210data in Python.")
9211 (license license:expat)))
9212
9213(define-public python2-tabulate
9214 (package-with-python2 python-tabulate))
9215
9216(define-public python-kazoo
9217 (package
9218 (name "python-kazoo")
9219 (version "2.4.0")
9220 (source
9221 (origin
9222 (method url-fetch)
9223 (uri (pypi-uri "kazoo" version))
9224 (sha256
9225 (base32
9226 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
9227 (build-system python-build-system)
9228 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
9229 (propagated-inputs
9230 `(("python-six" ,python-six)))
9231 (home-page "https://kazoo.readthedocs.org")
9232 (synopsis "High-level Zookeeper client library")
9233 (description
9234 "Kazoo is a Python client library for the Apache Zookeeper distributed
9235application service. It is designed to be easy to use and to avoid common
9236programming errors.")
9237 (license license:asl2.0)))
9238
9239(define-public python2-kazoo
9240 (package-with-python2 python-kazoo))
9241
9242(define-public python-pykafka
9243 (package
9244 (name "python-pykafka")
9245 (version "2.4.0")
9246 (source (origin
9247 (method url-fetch)
9248 (uri (string-append
9249 "https://pypi.python.org/packages/8b/3e/"
9250 "384eeff406b06315738b62483fd2126c6e4f544167116b17cc04ea7d2a59/"
9251 "pykafka-" version ".tar.gz"))
9252 (sha256
9253 (base32
9254 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
9255 (build-system python-build-system)
9256 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
9257 (propagated-inputs
9258 `(("python-gevent" ,python-gevent)
9259 ("python-kazoo" ,python-kazoo)
9260 ("python-tabulate" ,python-tabulate)))
9261 (inputs
9262 `(("librdkafka" ,librdkafka)))
9263 (home-page "https://pykafka.readthedocs.io/")
9264 (synopsis "Apache Kafka client for Python")
9265 (description
9266 "PyKafka is a client for the Apache Kafka distributed messaging system.
9267It includes Python implementations of Kafka producers and consumers, which
9268are optionally backed by a C extension built on librdkafka.")
9269 (license license:asl2.0)))
9270
9271(define-public python2-pykafka
9272 (package-with-python2 python-pykafka))
9273
9274(define-public python-wcwidth
9275 (package
9276 (name "python-wcwidth")
9277 (version "0.1.7")
9278 (source
9279 (origin
9280 (method url-fetch)
9281 (uri (pypi-uri "wcwidth" version))
9282 (sha256
9283 (base32
9284 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
9285 (build-system python-build-system)
9286 (home-page "https://github.com/jquast/wcwidth")
9287 (synopsis "Measure number of terminal column cells of wide-character codes")
9288 (description "Wcwidth measures the number of terminal column cells of
9289wide-character codes. It is useful for those implementing a terminal emulator,
9290or programs that carefully produce output to be interpreted by one. It is a
9291Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
9292specified in POSIX.1-2001 and POSIX.1-2008.")
9293 (license license:expat)))
9294
9295(define-public python2-wcwidth
9296 (package-with-python2 python-wcwidth))
9297
9298(define-public python2-jsonrpclib
9299 (package
9300 (name "python2-jsonrpclib")
9301 (version "0.1.7")
9302 (source (origin
9303 (method url-fetch)
9304 (uri (string-append
9305 "https://pypi.python.org/packages/source/j/jsonrpclib/"
9306 "jsonrpclib-" version ".tar.gz"))
9307 (sha256
9308 (base32
9309 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
9310 (build-system python-build-system)
9311 (arguments
9312 `(#:tests? #f
9313 #:python ,python-2))
9314 (home-page "https://github.com/joshmarshall/jsonrpclib/")
9315 (synopsis "Implementation of JSON-RPC specification for Python")
9316 (description
9317 "This library is an implementation of the JSON-RPC specification.
9318It supports both the original 1.0 specification, as well as the
9319new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
9320etc.")
9321 (license license:asl2.0)))
9322
9323(define-public python-chai
9324 (package
9325 (name "python-chai")
9326 (version "1.1.2")
9327 (source (origin
9328 (method url-fetch)
9329 (uri (pypi-uri "chai" version))
9330 (sha256
9331 (base32
9332 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
9333 (build-system python-build-system)
9334 (home-page "https://github.com/agoragames/chai")
9335 (synopsis "Mocking framework for Python")
9336 (description
9337 "Chai provides an api for mocking, stubbing and spying your python
9338objects, patterned after the Mocha library for Ruby.")
9339 (license license:bsd-3)))
9340
9341(define-public python2-chai
9342 (package-with-python2 python-chai))
9343
9344(define-public python-inflection
9345 (package
9346 (name "python-inflection")
9347 (version "0.3.1")
9348 (source
9349 (origin (method url-fetch)
9350 (uri (pypi-uri "inflection" version))
9351 (sha256
9352 (base32
9353 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
9354 (build-system python-build-system)
9355 (native-inputs
9356 `(("python-pytest" ,python-pytest)))
9357 (home-page "https://github.com/jpvanhal/inflection")
9358 (synopsis "Python string transformation library")
9359 (description
9360 "Inflection is a string transformation library. It singularizes
9361and pluralizes English words, and transforms strings from CamelCase to
9362underscored string.")
9363 (license license:expat)))
9364
9365(define-public python2-inflection
9366 (package-with-python2 python-inflection))
9367
9368(define-public python-pylev
9369 (package
9370 (name "python-pylev")
9371 (version "1.3.0")
9372 (source (origin
9373 (method url-fetch)
9374 (uri (pypi-uri "pylev" version))
9375 (sha256
9376 (base32
9377 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
9378 (build-system python-build-system)
9379 (home-page "https://github.com/toastdriven/pylev")
9380 (synopsis "Levenshtein distance implementation in Python")
9381 (description "Pure Python Levenshtein implementation, based off the
9382Wikipedia code samples at
9383@url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
9384 (license license:bsd-3)))
9385
9386(define-public python2-pylev
9387 (package-with-python2 python-pylev))
9388
9389(define-public python-cleo
9390 (package
9391 (name "python-cleo")
9392 (version "0.6.1")
9393 (source (origin
9394 (method url-fetch)
9395 (uri (pypi-uri "cleo" version))
9396 (sha256
9397 (base32
9398 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
9399 (build-system python-build-system)
9400 (native-inputs
9401 `(;; For testing
9402 ("python-mock" ,python-mock)
9403 ("python-pytest-mock" ,python-pytest-mock)
9404 ("python-pytest" ,python-pytest)))
9405 (propagated-inputs
9406 `(("python-backpack" ,python-backpack)
9407 ("python-pastel" ,python-pastel)
9408 ("python-pylev" ,python-pylev)))
9409 (home-page "https://github.com/sdispater/cleo")
9410 (synopsis "Command-line arguments library for Python")
9411 (description
9412 "Cleo allows you to create command-line commands with signature in
9413docstring and colored output.")
9414 (license license:expat)))
9415
9416(define-public python2-cleo
9417 (package-with-python2 python-cleo))
9418
9419(define-public python-lazy-object-proxy
9420 (package
9421 (name "python-lazy-object-proxy")
9422 (version "1.3.1")
9423 (source (origin
9424 (method url-fetch)
9425 (uri (pypi-uri "lazy-object-proxy" version))
9426 (sha256
9427 (base32
9428 "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb"))))
9429 (build-system python-build-system)
9430 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
9431 (synopsis "Lazy object proxy for python")
9432 (description
9433 "Lazy object proxy is an object that wraps a callable but defers the call
9434until the object is actually required, and caches the result of said call.")
9435 (license license:bsd-2)))
9436
9437(define-public python2-lazy-object-proxy
9438 (package-with-python2 python-lazy-object-proxy))
9439
9440(define-public python-dnspython
9441 (package
9442 (name "python-dnspython")
9443 (version "1.15.0")
9444 (source (origin
9445 (method url-fetch)
9446 (uri (string-append "http://www.dnspython.org/kits/"
9447 version "/dnspython-" version ".tar.gz"))
9448 (sha256
9449 (base32
9450 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
9451 (build-system python-build-system)
9452 (arguments '(#:tests? #f)) ; XXX: requires internet access
9453 (home-page "http://www.dnspython.org")
9454 (synopsis "DNS toolkit for Python")
9455 (description
9456 "dnspython is a DNS toolkit for Python. It supports almost all record
9457types. It can be used for queries, zone transfers, and dynamic updates.
9458It supports TSIG authenticated messages and EDNS0.")
9459 (license license:expat)))
9460
9461(define-public python2-dnspython
9462 (package-with-python2 python-dnspython))
9463
9464(define-public python-email-validator
9465 (package
9466 (name "python-email-validator")
9467 (version "1.0.2")
9468 (source
9469 (origin (method url-fetch)
9470 (uri (pypi-uri "email_validator" version))
9471 (sha256
9472 (base32
9473 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
9474 (build-system python-build-system)
9475 (arguments
9476 '(#:phases
9477 (modify-phases %standard-phases
9478 (add-before 'build 'use-dnspython
9479 (lambda _
9480 (substitute* "setup.py"
9481 (("dnspython3") "dnspython"))
9482 #t)))))
9483 (propagated-inputs
9484 `(("python-dnspython" ,python-dnspython)
9485 ("python-idna" ,python-idna)))
9486 (home-page "https://github.com/JoshData/python-email-validator")
9487 (synopsis "Email address validation library for Python")
9488 (description
9489 "This library validates email address syntax and deliverability.")
9490 (license license:cc0)))
9491
9492(define-public python2-email-validator
9493 (package-with-python2 python-email-validator))
9494
9495(define-public python-ukpostcodeparser
9496 (package
9497 (name "python-ukpostcodeparser")
9498 (version "1.0.3")
9499 (source (origin
9500 (method url-fetch)
9501 (uri (pypi-uri "UkPostcodeParser" version))
9502 (sha256
9503 (base32
9504 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
9505 (build-system python-build-system)
9506 (home-page "https://github.com/hamstah/ukpostcodeparser")
9507 (synopsis "UK Postcode parser for Python")
9508 (description
9509 "This library provides the @code{parse_uk_postcode} function for
9510parsing UK postcodes.")
9511 (license license:expat)))
9512
9513(define-public python2-ukpostcodeparser
9514 (package-with-python2 python-ukpostcodeparser))
9515
9516(define-public python-faker
9517 (package
9518 (name "python-faker")
9519 (version "0.7.9")
9520 (source (origin
9521 (method url-fetch)
9522 (uri (pypi-uri "Faker" version))
9523 (sha256
9524 (base32
9525 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
9526 (patches
9527 (search-patches "python-faker-fix-build-32bit.patch"))
9528 (modules '((guix build utils)))
9529 (snippet
9530 '(begin
9531 (for-each delete-file (find-files "." "\\.pyc$"))
9532 #t))))
9533 (build-system python-build-system)
9534 (arguments
9535 '(#:phases
9536 (modify-phases %standard-phases
9537 (replace 'check
49ff8827 9538 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
44d10b1f
RW
9539 (native-inputs
9540 `(;; For testing
9541 ("python-email-validator" ,python-email-validator)
9542 ("python-mock" ,python-mock)
9543 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
9544 (propagated-inputs
9545 `(("python-dateutil" ,python-dateutil)
9546 ("python-six" ,python-six)))
9547 (home-page "https://github.com/joke2k/faker")
9548 (synopsis "Python package that generates fake data")
9549 (description
9550 "Faker is a Python package that generates fake data such as names,
9551addresses, and phone numbers.")
9552 (license license:expat)
9553 (properties `((python2-variant . ,(delay python2-faker))))))
9554
9555(define-public python2-faker
9556 (let ((base (package-with-python2 (strip-python2-variant
9557 python-faker))))
9558 (package
9559 (inherit base)
9560 (propagated-inputs
9561 `(("python2-ipaddress" ,python2-ipaddress)
9562 ,@(package-propagated-inputs base))))))
9563
9564(define-public python-pyaml
9565 (package
9566 (name "python-pyaml")
9567 (version "18.11.0")
9568 (source (origin
9569 (method url-fetch)
9570 (uri (pypi-uri "pyaml" version))
9571 (sha256
9572 (base32
9573 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
9574 (build-system python-build-system)
9575 (native-inputs
9576 `(("python-unidecode" ,python-unidecode)))
9577 (propagated-inputs
9578 `(("python-pyyaml" ,python-pyyaml)))
9579 (home-page "https://github.com/mk-fg/pretty-yaml")
9580 (synopsis "YAML pretty-print library for Python")
9581 (description
9582 "pyaml is a PyYAML based python module to produce pretty and readable
9583YAML-serialized data.")
9584 (license (license:non-copyleft "http://www.wtfpl.net/txt/copying/"))))
9585
9586(define-public python2-pyaml
9587 (package-with-python2 python-pyaml))
9588
9589(define-public python-backpack
9590 (package
9591 (name "python-backpack")
9592 (version "0.1")
9593 (source
9594 (origin
9595 (method url-fetch)
9596 (uri (pypi-uri "backpack" version))
9597 (sha256
9598 (base32
9599 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
9600 (build-system python-build-system)
9601 (native-inputs
9602 `(("python-pytest" ,python-pytest)
9603 ("python-nose" ,python-nose)))
9604 (propagated-inputs
9605 `(("python-simplejson" ,python-simplejson)))
9606 (home-page "https://github.com/sdispater/backpack")
9607 (synopsis "Utilities for working with Python collections")
9608 (description "Backpack provides some useful utilities for working with
9609collections of data.")
9610 (license license:expat)))
9611
9612(define-public python2-backpack
9613 (package-with-python2 python-backpack))
9614
9615(define-public python-prompt-toolkit
9616 (package
9617 (name "python-prompt-toolkit")
9618 (version "2.0.7")
9619 (source
9620 (origin
9621 (method url-fetch)
9622 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
9623 (sha256
9624 (base32
9625 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
9626 (build-system python-build-system)
9627 (arguments
9628 `(#:phases
9629 (modify-phases %standard-phases
9630 (delete 'check)
9631 (add-after 'install 'post-install-check
9632 (lambda* (#:key inputs outputs #:allow-other-keys)
9633 ;; HOME is needed for the test
9634 ;; "test_pathcompleter_can_expanduser".
9635 (setenv "HOME" "/tmp")
9636 (add-installed-pythonpath inputs outputs)
9637 (invoke "py.test"))))))
9638 (propagated-inputs
9639 `(("python-wcwidth" ,python-wcwidth)
9640 ("python-six" ,python-six)
9641 ("python-pygments" ,python-pygments)))
9642 (native-inputs
9643 `(("python-pytest" ,python-pytest)))
9644 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
9645 (synopsis "Library for building command line interfaces in Python")
9646 (description
9647 "Prompt-Toolkit is a library for building interactive command line
9648interfaces in Python. It's like GNU Readline but it also features syntax
9649highlighting while typing, out-of-the-box multi-line input editing, advanced
9650code completion, incremental search, support for Chinese double-width
9651characters, mouse support, and auto suggestions.")
9652 (license license:bsd-3)))
9653
9654(define-public python2-prompt-toolkit
9655 (package-with-python2 python-prompt-toolkit))
9656
9657(define-public python-prompt-toolkit-1
9658 (package (inherit python-prompt-toolkit)
9659 (version "1.0.15")
9660 (source
9661 (origin
9662 (method url-fetch)
9663 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
9664 (sha256
9665 (base32
9666 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
9667
9668(define-public python2-prompt-toolkit-1
9669 (package-with-python2 python-prompt-toolkit-1))
9670
9671(define-public python-jedi
9672 (package
9673 (name "python-jedi")
40bd0aa3 9674 (version "0.13.2")
44d10b1f
RW
9675 (source
9676 (origin
9677 (method url-fetch)
9678 (uri (pypi-uri "jedi" version))
9679 (sha256
9680 (base32
40bd0aa3 9681 "1za944msp0f8x36qa8l309jhv0kzlsdh7r9nj3z12y8npnsh45sp"))))
44d10b1f
RW
9682 (build-system python-build-system)
9683 (arguments
40bd0aa3 9684 `( ;; Many tests are failing with Python 3.7.x as of version 0.13.2 (see:
44d10b1f
RW
9685 ;; https://github.com/davidhalter/jedi/issues/1263)
9686 #:tests? #f
9687 #:phases
9688 (modify-phases %standard-phases
9689 (replace 'check
9690 (lambda* (#:key tests? #:allow-other-keys)
9691 (when tests?
9692 (invoke "py.test" "-vv")))))))
9693 (native-inputs
9694 `(("python-pytest" ,python-pytest)
9695 ("python-docopt" ,python-docopt)))
9696 (propagated-inputs
9697 `(("python-parso" ,python-parso)))
9698 (home-page "https://github.com/davidhalter/jedi")
9699 (synopsis "Autocompletion and static analysis library for Python")
9700 (description
9701 "Jedi is a static analysis tool for Python that can be used in Integrated
9702Development Environments (@dfn{IDE}s) and text editors. It understands Python
9703on a deeper level than many other static analysis frameworks for Python.
9704
9705Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
9706well.")
9707 (license license:expat)))
9708
9709(define-public python2-jedi
9710 (package-with-python2 python-jedi))
9711
9712(define-public ptpython
9713 (package
9714 (name "ptpython")
9715 (version "0.34")
9716 (source (origin
9717 (method url-fetch)
9718 (uri (pypi-uri "ptpython" version))
9719 (sha256
9720 (base32
9721 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
9722 (build-system python-build-system)
9723 (arguments
9724 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
9725 (propagated-inputs
9726 `(("python-docopt" ,python-docopt)
9727 ("python-jedi" ,python-jedi)
9728 ("python-prompt-toolkit" ,python-prompt-toolkit)
9729 ("python-pygments" ,python-pygments)))
9730 (home-page "https://github.com/jonathanslenders/ptpython")
9731 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
9732 (description
9733 "ptpython is a Python read-eval-print loop with IDE-like features.
9734It supports syntax highlighting, multiline editing, autocompletion, mouse,
9735color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
9736etc.")
9737 (license license:bsd-3)
9738 (properties `((python2-variant . ,(delay ptpython-2))))))
9739
9740(define-public ptpython-2
9741 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
9742 (package
9743 (inherit base)
9744 (name "ptpython2"))))
9745
9746(define-public python-stem
9747 (package
9748 (name "python-stem")
9749 (version "1.7.0")
9750 (source
9751 (origin
9752 (method url-fetch)
9753 (uri (pypi-uri "stem" version))
9754 (sha256
9755 (base32
9756 "1awiglfiajnx2hva9aqpj3fmdvdb4qg7cwnlfyih827m68y3cq8v"))))
9757 (build-system python-build-system)
9758 (arguments
9759 `(#:phases
9760 (modify-phases %standard-phases
9761 (replace 'check
9762 (lambda _
9763 (invoke "./run_tests.py" "--unit")
9764 #t)))))
9765 (native-inputs
9766 `(("python-mock" ,python-mock)
9767 ("python-pycodestyle" ,python-pycodestyle)
9768 ("python-pyflakes" ,python-pyflakes)))
9769 (home-page "https://stem.torproject.org/")
9770 (synopsis
9771 "Python controller library that allows applications to interact with Tor")
9772 (description
9773 "Stem is a Python controller library for Tor. With it you can use Tor's
9774control protocol to script against the Tor process and read descriptor data
9775relays publish about themselves.")
9776 (license license:lgpl3)))
9777
9778(define-public python2-stem
9779 (package-with-python2 python-stem))
9780
9781(define-public python-pyserial
9782 (package
9783 (name "python-pyserial")
9784 (version "3.1.1")
9785 (source
9786 (origin
9787 (method url-fetch)
9788 (uri (pypi-uri "pyserial" version))
9789 (sha256
9790 (base32
9791 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
9792 (build-system python-build-system)
9793 (arguments
9794 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
9795 ;; #:phases
9796 ;; (modify-phases %standard-phases
9797 ;; (replace 'check
9798 ;; (lambda _
9799 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
9800 (home-page
9801 "https://github.com/pyserial/pyserial")
9802 (synopsis "Python Serial Port Bindings")
9803 (description "@code{pyserial} provide serial port bindings for Python. It
9804supports different byte sizes, stop bits, parity and flow control with RTS/CTS
9805and/or Xon/Xoff. The port is accessed in RAW mode.")
9806 (license license:bsd-3)))
9807
9808(define-public python2-pyserial
9809 (package-with-python2 python-pyserial))
9810
9811(define-public python-kivy
9812 (package
9813 (name "python-kivy")
9814 (version "1.10.1")
9815 (source
9816 (origin
9817 (method url-fetch)
9818 (uri (pypi-uri "Kivy" version))
9819 (file-name (string-append name "-" version ".tar.gz"))
9820 (sha256
9821 (base32
9822 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
9823 (build-system python-build-system)
9824 (arguments
9825 `(#:tests? #f ; Tests require many optional packages
9826 #:phases
9827 (modify-phases %standard-phases
9828 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
9829 (lambda* (#:key inputs #:allow-other-keys)
9830 (setenv "KIVY_SDL2_PATH"
9831 (string-append (assoc-ref inputs "sdl-union")
9832 "/include/SDL2"))
9833 #t)))))
9834 (native-inputs
9835 `(("git" ,git)
9836 ("pkg-config" ,pkg-config)
9837 ("python-cython" ,python-cython)))
9838 (inputs
9839 `(("gstreamer" ,gstreamer)
9840 ("mesa" ,mesa)
9841 ("sdl-union"
9842 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
9843 (home-page "http://kivy.org")
9844 (synopsis
9845 "Multitouch application framework")
9846 (description
9847 "A software library for rapid development of
9848hardware-accelerated multitouch applications.")
9849 (license license:expat)))
9850
9851(define-public python2-kivy
9852 (package-with-python2 python-kivy))
9853
9854(define-public python-kivy-next
9855 (deprecated-package "python-kivy-next" python-kivy))
9856
9857(define-public python2-kivy-next
9858 (deprecated-package "python2-kivy-next" python2-kivy))
9859
9860(define-public python-binaryornot
9861 (package
9862 (name "python-binaryornot")
9863 (version "0.4.4")
9864 (source (origin
9865 (method url-fetch)
9866 (uri (pypi-uri "binaryornot" version))
9867 (sha256
9868 (base32
9869 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
9870 (build-system python-build-system)
9871 (propagated-inputs
9872 `(("python-chardet" ,python-chardet)
9873 ("python-hypothesis" ,python-hypothesis)))
9874 (home-page "https://github.com/audreyr/binaryornot")
9875 (synopsis "Package to check if a file is binary or text")
9876 (description "Ultra-lightweight pure Python package to check if a file is
9877binary or text.")
9878 (license license:bsd-3)
9879 (properties `((python2-variant . ,(delay python2-binaryornot))))))
9880
9881(define-public python2-binaryornot
9882 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
9883 (package (inherit base)
9884 (propagated-inputs
9885 `(("python2-enum34" ,python2-enum34)
9886 ,@(package-propagated-inputs base))))))
9887
9888(define-public python-nltk
9889 (package
9890 (name "python-nltk")
9891 (version "3.2.1")
9892 (source (origin
9893 (method url-fetch)
9894 (uri (pypi-uri "nltk" version))
9895 (sha256
9896 (base32
9897 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
9898 (build-system python-build-system)
9899 (arguments
9900 '(;; The tests require some extra resources to be downloaded.
9901 ;; TODO Try packaging these resources.
9902 #:tests? #f))
9903 (home-page "http://nltk.org/")
9904 (synopsis "Natural Language Toolkit")
9905 (description "It provides interfaces to over 50 corpora and lexical
9906resources such as WordNet, along with a suite of text processing libraries
9907for classification, tokenization, stemming, tagging, parsing, and semantic
9908reasoning, wrappers for natural language processing libraries.")
9909 (license license:asl2.0)))
9910
9911(define-public python2-nltk
9912 (package-with-python2 python-nltk))
9913
9914(define-public python-pymongo
9915 (package
9916 (name "python-pymongo")
9917 (version "3.7.2")
9918 (source (origin
9919 (method url-fetch)
9920 (uri (pypi-uri "pymongo" version))
9921 (sha256
9922 (base32
9923 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
9924 (build-system python-build-system)
9925 (propagated-inputs
9926 `(("python-certifi" ,python-certifi)))
9927 (home-page "https://github.com/mongodb/mongo-python-driver")
9928 (synopsis "Python driver for MongoDB")
9929 (description "Python driver for MongoDB.")
9930 (license license:asl2.0)))
9931
9932(define-public python2-pymongo
9933 (package-with-python2 python-pymongo))
9934
9935(define-public python-sh
9936 (package
9937 (name "python-sh")
9938 (version "1.11")
9939 (source (origin
9940 (method url-fetch)
9941 (uri (pypi-uri "sh" version))
9942 (sha256
9943 (base32
9944 "192r0mpv6dmkysjzhc43ddffiwb5g7c76bgr1mb1z2xz9awbj3sr"))))
9945 (build-system python-build-system)
9946 (arguments
9947 `(#:tests? #f)) ; no tests
9948 (home-page "https://github.com/amoffat/sh")
9949 (synopsis "Python subprocess interface")
9950 (description "Abstracts process invocation by providing a function
9951interface for programs.")
9952 (license license:expat)))
9953
9954(define-public python2-sh
9955 (package-with-python2 python-sh))
9956
9957(define-public python-consul
9958 (package
9959 (name "python-consul")
9960 (version "0.6.1")
9961 (source
9962 (origin
9963 (method url-fetch)
9964 (uri (pypi-uri "python-consul" version))
9965 (sha256
9966 (base32
9967 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
9968 (build-system python-build-system)
9969 (arguments
9970 '(#:tests? #f)) ; The tests are not distributed
9971 (propagated-inputs
9972 `(("python-requests" ,python-requests)
9973 ("python-six" ,python-six)))
9974 (home-page "https://github.com/cablehead/python-consul")
9975 (synopsis "Python client for Consul")
9976 (description
9977 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
9978discovery, monitoring and configuration.")
9979 (license license:expat)))
9980
9981(define-public python2-consul
9982 (package-with-python2 python-consul))
9983
9984(define-public python-schematics
9985 (package
9986 (name "python-schematics")
9987 (version "1.1.1")
9988 (source
9989 (origin
9990 (method url-fetch)
9991 (uri (string-append
9992 "https://github.com/schematics/schematics/archive/v" version ".tar.gz"))
9993 (file-name (string-append name "-" version ".tar.gz"))
9994 (sha256
9995 (base32
9996 "19v1i69bf3bzarfxmbv0v6ivpcn758x3shvbiy9l2hy0lvqwnp6l"))))
9997 (build-system python-build-system)
9998 (propagated-inputs
9999 `(("python-six" ,python-six)))
10000 (arguments
10001 `(#:tests? #f)) ; requires a bunch of not very nice packages with fixed
10002 ; version requirements (eg python-coveralls)
10003 (home-page "https://github.com/schematics/schematics")
10004 (synopsis "Python Data Structures for Humans")
10005 (description "Python Data Structures for Humans.")
10006 (license license:bsd-3)))
10007
10008(define-public python2-schematics
10009 (package-with-python2 python-schematics))
10010
10011(define-public python-odfpy
10012 (package
10013 (name "python-odfpy")
10014 (version "1.3.3")
10015 (source (origin
10016 (method url-fetch)
10017 (uri (pypi-uri "odfpy" version))
10018 (sha256
10019 (base32
10020 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
10021 (arguments
10022 `(#:modules ((srfi srfi-1)
10023 (guix build python-build-system)
10024 (guix build utils))
10025 #:phases
10026 (modify-phases %standard-phases
10027 (replace 'check
10028 ;; The test runner invokes python2 and python3 for test*.py.
10029 ;; To avoid having both in inputs, we replicate it here.
10030 (lambda _
21ccc01d
RW
10031 (for-each (lambda (test-file) (invoke "python" test-file))
10032 (find-files "tests" "^test.*\\.py$"))
10033 #t)))))
44d10b1f
RW
10034 (build-system python-build-system)
10035 (home-page "https://github.com/eea/odfpy")
10036 (synopsis "Python API and tools to manipulate OpenDocument files")
10037 (description "Collection of libraries and utility programs written in
10038Python to manipulate OpenDocument 1.2 files.")
10039 (license
10040 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
10041 ;; number of files with other licenses.
10042 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
10043
10044(define-public python2-odfpy
10045 (package-with-python2 python-odfpy))
10046
10047(define-public python-natsort
10048 (package
10049 (name "python-natsort")
10050 (version "5.4.1")
10051 (source (origin
10052 (method url-fetch)
10053 (uri (pypi-uri "natsort" version))
10054 (sha256
10055 (base32
10056 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
10057 (build-system python-build-system)
10058 (arguments
10059 `(#:modules ((guix build utils)
10060 (guix build python-build-system)
10061 (srfi srfi-1)
10062 (srfi srfi-26)
10063 (ice-9 ftw))
10064 #:phases
10065 (modify-phases %standard-phases
10066 (add-before 'check 'set-cachedir
10067 ;; Tests require write access to $HOME by default
10068 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
10069 (replace 'check
10070 (lambda _
10071 (let ((cwd (getcwd)))
10072 (setenv "PYTHONPATH"
10073 (string-append
10074 cwd "/build/"
10075 (find (cut string-prefix? "lib" <>)
10076 (scandir (string-append cwd "/build")))
10077 ":"
10078 (getenv "PYTHONPATH")))
10079 (invoke "pytest" "-v")))))))
10080 (native-inputs
10081 `(("python-hypothesis" ,python-hypothesis)
10082 ("python-pytest-cov" ,python-pytest-cov)
10083 ("python-pytest-mock" ,python-pytest-mock)
10084 ("python-pytest" ,python-pytest)))
10085 (propagated-inputs ; TODO: Add python-fastnumbers.
10086 `(("python-pyicu" ,python-pyicu)))
10087 (home-page "https://github.com/SethMMorton/natsort")
10088 (synopsis "Natural sorting for python and shell")
10089 (description
10090 "Natsort lets you apply natural sorting on lists instead of
10091lexicographical. If you use the built-in @code{sorted} method in python
10092on a list such as @code{['a20', 'a9', 'a1', 'a4', 'a10']}, it would be
10093returned as @code{['a1', 'a10', 'a20', 'a4', 'a9']}. Natsort provides a
10094function @code{natsorted} that identifies numbers and sorts them separately
10095from strings. It can also sort version numbers, real numbers, mixed types
10096and more, and comes with a shell command @command{natsort} that exposes this
10097functionality in the command line.")
10098 (license license:expat)
10099 (properties `((python2-variant . ,(delay python2-natsort))))))
10100
10101(define-public python2-natsort
10102 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
10103 (package (inherit base)
10104 (native-inputs
10105 `(("python2-pathlib" ,python2-pathlib)
10106 ,@(package-native-inputs base))))))
10107
10108(define-public python-glances
10109 (package
10110 (name "python-glances")
10111 (version "3.0.2")
10112 (source
10113 (origin
10114 (method url-fetch)
10115 (uri (pypi-uri "Glances" version))
10116 (sha256
10117 (base32
10118 "09fxysfp1n16csqvzvawy74qm6a94nvwjf3vcf5gkqp4i6k4vjjy"))))
10119 (build-system python-build-system)
10120 (propagated-inputs
10121 `(("python-psutil" ,python-psutil)))
10122 (home-page
10123 "https://github.com/nicolargo/glances")
10124 (synopsis
10125 "A cross-platform curses-based monitoring tool")
10126 (description
10127 "Glances is a curses-based monitoring tool for a wide variety of platforms.
10128Glances uses the PsUtil library to get information from your system. It monitors
10129CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
10130 (license license:lgpl3+)))
10131
10132(define-public python2-glances
10133 (package-with-python2 python-glances))
10134
10135(define-public python-graphql-core
10136 (package
10137 (name "python-graphql-core")
10138 (version "0.5.3")
10139 (source
10140 (origin
10141 (method url-fetch)
10142 (uri (pypi-uri "graphql-core" version))
10143 (sha256
10144 (base32
10145 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
10146 (build-system python-build-system)
10147 (arguments
10148 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
10149 #:phases
10150 (modify-phases %standard-phases
10151 (add-after 'unpack 'patch-hardcoded-version
10152 (lambda _ (substitute*
10153 "setup.py"
10154 (("'gevent==1.1rc1'") "'gevent'"))
10155 #t)))))
10156 (native-inputs
10157 `(("python-gevent" ,python-gevent)
10158 ("python-mock" ,python-mock)
10159 ("python-pytest-mock" ,python-pytest-mock)))
10160 (propagated-inputs
10161 `(("python-promise" ,python-promise)
10162 ("python-six" ,python-six)))
10163 (home-page "https://github.com/graphql-python/graphql-core")
10164 (synopsis "GraphQL implementation for Python")
10165 (description
10166 "GraphQL implementation for Python. GraphQL is a data query language and
10167runtime designed and used to request and deliver data to mobile and web apps.
10168This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
10169to Python.")
10170 (license license:expat)))
10171
10172(define-public python2-graphql-core
10173 (package-with-python2 python-graphql-core))
10174
10175(define-public python-graphql-relay
10176 (package
10177 (name "python-graphql-relay")
10178 (version "0.4.5")
10179 (source
10180 (origin
10181 (method url-fetch)
10182 (uri (pypi-uri "graphql-relay" version))
10183 (sha256
10184 (base32
10185 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
10186 (build-system python-build-system)
10187 (arguments
10188 '(#:tests? #f)) ; The tests are not distributed
10189 (propagated-inputs
10190 `(("python-graphql-core" ,python-graphql-core)
10191 ("python-promise" ,python-promise)
10192 ("python-six" ,python-six)))
10193 (home-page "https://github.com/graphql-python/graphql-relay-py")
10194 (synopsis "Relay implementation for Python")
10195 (description
10196 "This is a library to allow the easy creation of Relay-compliant servers
10197using the GraphQL Python reference implementation of a GraphQL server. It
10198should be noted that the code is a exact port of the original
10199@url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
10200from Facebook.")
10201 (license license:expat)))
10202
10203(define-public python2-graphql-relay
10204 (package-with-python2 python-graphql-relay))
10205
10206(define-public python-graphene
10207 (package
10208 (name "python-graphene")
10209 (version "0.10.2")
10210 (source
10211 (origin
10212 (method url-fetch)
10213 (uri (pypi-uri "graphene" version))
10214 (sha256
10215 (base32
10216 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
10217 (build-system python-build-system)
10218 (propagated-inputs
10219 `(("python-graphql-core" ,python-graphql-core)
10220 ("python-graphql-relay" ,python-graphql-relay)
10221 ("python-iso8601" ,python-iso8601)
10222 ("python-promise" ,python-promise)
10223 ("python-six" ,python-six)))
10224 (arguments
10225 `(#:tests? #f)) ; no tests/ in the PyPI tarball
10226 (home-page "http://graphene-python.org/")
10227 (synopsis "GraphQL Framework for Python")
10228 (description
10229 "Graphene is a Python library for building GraphQL schemas/types.
10230A GraphQL schema describes your data model, and provides a GraphQL server
10231with an associated set of resolve methods that know how to fetch data.")
10232 (properties `((python2-variant . ,(delay python2-graphene))))
10233 (license license:expat)))
10234
10235(define-public python2-graphene
10236 (let ((base (package-with-python2
10237 (strip-python2-variant python-graphene))))
10238 (package (inherit base)
10239 (native-inputs
10240 `(("python2-sqlalchemy" ,python2-sqlalchemy)
10241 ,@(package-native-inputs base))))))
10242
10243(define-public python-nautilus
10244 (package
10245 (name "python-nautilus")
10246 (version "0.4.9")
10247 (source
10248 (origin
10249 (method url-fetch)
10250 (uri (pypi-uri "nautilus" version))
10251 (sha256
10252 (base32
10253 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
10254 (build-system python-build-system)
10255 (arguments `(#:tests? #f)) ; fails to import test modules
10256 (propagated-inputs
10257 `(("python-bcrypt" ,python-bcrypt)
10258 ("python-click" ,python-click)
10259 ("python-consul" ,python-consul)
10260 ("python-graphene" ,python-graphene)
10261 ("python-jinja2" ,python-jinja2)
10262 ("python-peewee" ,python-peewee)
10263 ("python-pika" ,python-pika)
10264 ("python-tornado" ,python-tornado)
10265 ("python-wtforms" ,python-wtforms)))
10266 (native-inputs
10267 `(("python-nose2" ,python-nose2)))
10268 (home-page "https://github.com/AlecAivazis/nautilus")
10269 (synopsis "Library for creating microservice applications")
10270 (description
10271 "Nautilus is a framework for flux based microservices that looks to
10272provide extendible implementations of common aspects of a cloud so that you can
10273focus on building massively scalable web applications.")
10274 (license license:expat)))
10275
10276(define-public python-snowballstemmer
10277 (package
10278 (name "python-snowballstemmer")
10279 (version "1.2.1")
10280 (source (origin
10281 (method url-fetch)
10282 (uri (pypi-uri "snowballstemmer" version))
10283 (sha256
10284 (base32
10285 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
10286 (build-system python-build-system)
10287 (arguments
10288 `(;; No tests exist
10289 #:tests? #f))
10290 (home-page "https://github.com/shibukawa/snowball_py")
10291 (synopsis "Snowball stemming library collection for Python")
10292 (description "This package provides 16 word stemmer algorithms generated
10293from Snowball algorithms. It includes the 15 original ones plus the Poerter
10294English stemmer.")
10295 (license license:bsd-3)))
10296
10297(define-public python2-snowballstemmer
10298 (package-with-python2 python-snowballstemmer))
10299
10300(define-public python-sphinx-cloud-sptheme
10301 (package
10302 (name "python-sphinx-cloud-sptheme")
10303 (version "1.8.0")
10304 (source (origin
10305 (method url-fetch)
10306 (uri (pypi-uri "cloud_sptheme" version))
10307 (sha256
10308 (base32
10309 "1dniqb6a39yh786f86c4jn666rwnyi1jvzn4616zhcchb7sfdshd"))))
10310 (build-system python-build-system)
10311 ;; FIXME: The 'pypi' release archive does not contain tests.
10312 (arguments '(#:tests? #f))
10313 (native-inputs
10314 `(("python-sphinx" ,python-sphinx)))
10315 (home-page "https://bitbucket.org/ecollins/cloud_sptheme")
10316 (synopsis "'Cloud' theme for Sphinx documenter")
10317 (description "This package contains the \"Cloud\" theme for Sphinx and some
10318related extensions.")
10319 (license license:bsd-3)))
10320
10321(define-public python2-sphinx-cloud-sptheme
10322 (package-with-python2 python-sphinx-cloud-sptheme))
10323
10324(define-public python-sphinx-alabaster-theme
10325 (package
10326 (name "python-sphinx-alabaster-theme")
10327 (version "0.7.12")
10328 (source (origin
10329 (method url-fetch)
10330 (uri (pypi-uri "alabaster" version))
10331 (sha256
10332 (base32
10333 "00nwwjj2d2ym4s2kk217x7jkx1hnczc3fvm8yxbqmsp6b0nxfqd6"))))
10334 (build-system python-build-system)
10335 (propagated-inputs
10336 `(("python-pygments" ,python-pygments)))
10337 (home-page "https://alabaster.readthedocs.io/")
10338 (synopsis "Configurable sidebar-enabled Sphinx theme")
10339 (description "Alabaster is a visually (c)lean, responsive, configurable
10340theme for the Sphinx documentation system. It's the default theme of Sphinx.")
10341 (license license:bsd-3)))
10342
10343(define-public python2-sphinx-alabaster-theme
10344 (package-with-python2 python-sphinx-alabaster-theme))
10345
10346(define-public python-setproctitle
10347(package
10348 (name "python-setproctitle")
10349 (version "1.1.10")
10350 (source
10351 (origin
10352 (method url-fetch)
10353 (uri (pypi-uri "setproctitle" version))
10354 (sha256
10355 (base32
10356 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
10357 (build-system python-build-system)
10358 (arguments
10359 '(#:phases
10360 (modify-phases %standard-phases
10361 (add-before 'check 'patch-Makefile
10362 ;; Stricly this is only required for the python2 variant.
10363 ;; But adding a phase in an inherited package seems to be
10364 ;; cumbersum. So we patch even for python3.
10365 (lambda _
10366 (let ((nose (assoc-ref %build-inputs "python2-nose")))
10367 (when nose
10368 (substitute* "Makefile"
10369 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
10370 (string-append nose "/bin/nosetests "))))
10371 #t)))
10372 (replace 'check
10373 (lambda _
10374 (setenv "PYTHON" (or (which "python3") (which "python")))
10375 (setenv "PYCONFIG" (or (which "python3-config")
10376 (which "python-config")))
10377 (setenv "CC" "gcc")
10378 ;; No need to extend PYTHONPATH to find the built package, since
10379 ;; the Makefile will build anyway
10380 (invoke "make" "check"))))))
10381 (native-inputs
10382 `(("procps" ,procps))) ; required for tests
10383 (home-page
10384 "https://github.com/dvarrazzo/py-setproctitle")
10385 (synopsis
10386 "Setproctitle implementation for Python to customize the process title")
10387 (description "The library allows a process to change its title (as displayed
10388by system tools such as ps and top).
10389
10390Changing the title is mostly useful in multi-process systems, for
10391example when a master process is forked: changing the children's title
10392allows to identify the task each process is busy with. The technique
10393is used by PostgreSQL and the OpenSSH Server for example.")
10394 (license license:bsd-3)
10395 (properties `((python2-variant . ,(delay python2-setproctitle))))))
10396
10397(define-public python2-setproctitle
10398 (let ((base (package-with-python2
10399 (strip-python2-variant python-setproctitle))))
10400 (package
10401 (inherit base)
10402 (native-inputs `(("python2-nose" ,python2-nose)
10403 ,@(package-native-inputs base))))))
10404
10405(define-public python-validictory
10406 (package
10407 (name "python-validictory")
10408 (version "1.0.1")
10409 (source
10410 (origin
10411 (method url-fetch)
10412 (uri (pypi-uri "validictory" version))
10413 (sha256
10414 (base32
10415 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
10416 (build-system python-build-system)
10417 (arguments
10418 '(#:phases
10419 (modify-phases %standard-phases
10420 (add-after 'unpack 'bootstrap
10421 ;; Move the tests out of the package directory to avoid
10422 ;; packaging them.
10423 (lambda* _
10424 (rename-file "validictory/tests" "tests")
10425 (delete-file "tests/__init__.py")))
10426 (replace 'check
10427 (lambda _
10428 ;; Extend PYTHONPATH so the built package will be found.
10429 (setenv "PYTHONPATH"
10430 (string-append (getcwd) "/build/lib:"
10431 (getenv "PYTHONPATH")))
6568bd5d 10432 (invoke "py.test" "-vv" ))))))
44d10b1f
RW
10433 (native-inputs
10434 `(("python-pytest" ,python-pytest)))
10435 (home-page
10436 "https://github.com/jamesturk/validictory")
10437 (synopsis "General purpose Python data validator")
10438 (description "It allows validation of arbitrary Python data structures.
10439
10440The schema format is based on the JSON Schema
10441proposal (http://json-schema.org), so combined with json the library is also
10442useful as a validator for JSON data.")
10443 (license license:expat)))
10444
10445(define-public python2-validictory
10446 (package-with-python2 python-validictory))
10447
10448(define-public python-pyelftools
10449 (package
10450 (name "python-pyelftools")
10451 (version "0.25")
10452 (source
10453 (origin
10454 (method url-fetch)
10455 (uri (pypi-uri "pyelftools" version))
10456 (sha256
10457 (base32
10458 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
10459 (build-system python-build-system)
10460 (arguments
10461 `(#:phases
10462 (modify-phases %standard-phases
10463 (add-before 'check 'set-pythonpath
10464 (lambda _
10465 (setenv "PYTHONPATH"
10466 (string-append
10467 (getcwd) "/test/"
10468 ":" (getenv "PYTHONPATH")))
10469 #t)))))
10470 (home-page
10471 "https://github.com/eliben/pyelftools")
10472 (synopsis
10473 "Analyze binary and library file information")
10474 (description "This Python library provides interfaces for parsing and
10475analyzing two binary and library file formats; the Executable and Linking
10476Format (ELF), and debugging information in the Debugging With Attributed
10477Record Format (DWARF).")
10478 (license license:public-domain)))
10479
10480(define-public python-pyev
10481 (package
10482 (name "python-pyev")
10483 (version "0.9.0")
10484 (source
10485 (origin
10486 (method url-fetch)
10487 (uri (pypi-uri "pyev" version))
10488 (sha256
10489 (base32
10490 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
10491 (build-system python-build-system)
10492 (arguments
10493 `(#:tests? #f ; no test suite
10494 #:phases
10495 (modify-phases %standard-phases
10496 (add-after 'unpack 'patch
10497 (lambda* (#:key inputs #:allow-other-keys)
10498 (let ((libev (string-append (assoc-ref inputs "libev")
10499 "/lib/libev.so.4")))
10500 (substitute* "setup.py"
10501 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
10502 (string-append "libev_dll_name = \"" libev "\"")))))))))
10503 (inputs
10504 `(("libev" ,libev)))
10505 (home-page "http://pythonhosted.org/pyev/")
10506 (synopsis "Python libev interface")
10507 (description "Pyev provides a Python interface to libev.")
10508 (license license:gpl3)))
10509
10510(define-public python2-pyev
10511 (package-with-python2 python-pyev))
10512
10513(define-public python-imagesize
10514 (package
10515 (name "python-imagesize")
10516 (version "1.1.0")
10517 (source
10518 (origin
10519 (method url-fetch)
10520 (uri (pypi-uri "imagesize" version))
10521 (sha256
10522 (base32
10523 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
10524 (build-system python-build-system)
10525 (home-page "https://github.com/shibukawa/imagesize_py")
10526 (synopsis "Gets image size of files in various formats in Python")
10527 (description
10528 "This package allows determination of image size from
10529PNG, JPEG, JPEG2000 and GIF files in pure Python.")
10530 (license license:expat)))
10531
10532(define-public python2-imagesize
10533 (package-with-python2 python-imagesize))
10534
10535(define-public python-termstyle
10536 (package
10537 (name "python-termstyle")
10538 (version "0.1.11")
10539 (source
10540 (origin
10541 (method url-fetch)
10542 (uri (pypi-uri "termstyle" version))
10543 (sha256
10544 (base32
10545 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
10546 (build-system python-build-system)
10547 (arguments
10548 '(#:phases
10549 (modify-phases %standard-phases
10550 (replace 'check
10551 (lambda _
10552 (zero? (system* "python" "test3.py")))))))
10553 (home-page "https://github.com/gfxmonk/termstyle")
10554 (synopsis "Console text coloring for Python")
10555 (description "This package provides console text coloring for Python.")
10556 (license license:bsd-3)))
10557
10558(define-public python-argcomplete
10559 (package
10560 (name "python-argcomplete")
10561 (version "1.7.0")
10562 (source
10563 (origin
10564 (method url-fetch)
10565 (uri (pypi-uri "argcomplete" version))
10566 (sha256
10567 (base32
10568 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
10569 (build-system python-build-system)
10570 (native-inputs
10571 `(("python-pexpect" ,python-pexpect)
10572 ("tcsh" ,tcsh)
10573 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
10574 (home-page "https://github.com/kislyuk/argcomplete")
10575 (synopsis "Shell tab completion for Python argparse")
10576 (description "argcomplete provides extensible command line tab completion
10577of arguments and options for Python scripts using @code{argparse}. It's
10578particularly useful for programs with many options or sub-parsers that can
10579dynamically suggest completions; for example, when browsing resources over the
10580network.")
10581 (license license:asl2.0)))
10582
10583(define-public python2-argcomplete
10584 (package-with-python2 python-argcomplete))
10585
10586(define-public python-xopen
10587 (package
10588 (name "python-xopen")
10589 (version "0.3.3")
10590 (source
10591 (origin
10592 (method url-fetch)
10593 (uri (pypi-uri "xopen" version))
10594 (sha256
10595 (base32
10596 "1a0wbil552wsmklwd89ssmgz3pjd86qa9i7jh8wqb9wslc8a2qjr"))
10597 (file-name (string-append name "-" version ".tar.gz"))))
10598 (build-system python-build-system)
10599 (home-page "https://github.com/marcelm/xopen/")
10600 (synopsis "Open compressed files transparently")
10601 (description "This module provides an @code{xopen} function that works like
10602Python's built-in @code{open} function, but can also deal with compressed files.
10603Supported compression formats are gzip, bzip2 and, xz, and are automatically
10604recognized by their file extensions. The focus is on being as efficient as
10605possible on all supported Python versions.")
10606 (license license:expat)))
10607
10608(define-public python2-xopen
10609 (let ((base (package-with-python2
10610 (strip-python2-variant python-xopen))))
10611 (package
10612 (inherit base)
10613 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
10614 ,@(package-propagated-inputs base))))))
10615
10616(define-public python-cheetah
10617 (package
10618 (name "python-cheetah")
10619 (version "3.1.0")
10620 (source
10621 (origin
10622 (method url-fetch)
10623 (uri (pypi-uri "Cheetah3" version))
10624 (sha256
10625 (base32
10626 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
10627 (build-system python-build-system)
10628 (arguments
10629 `(#:modules ((guix build utils)
10630 (guix build python-build-system)
10631 (ice-9 ftw)
10632 (srfi srfi-1)
10633 (srfi srfi-26))
10634 #:phases (modify-phases %standard-phases
10635 (add-after 'unpack 'use-absolute-python
10636 (lambda _
10637 (substitute* "Cheetah/CheetahWrapper.py"
10638 (("#!/usr/bin/env python")
10639 (string-append "#!" (which "python"))))
10640 #t))
10641 (replace 'check
10642 (lambda _
10643 (let ((cwd (getcwd)))
10644 (setenv "PYTHONPATH"
10645 (string-append
10646 cwd "/build/"
10647 (find (cut string-prefix? "lib" <>)
10648 (scandir (string-append cwd "/build")))
10649 ":" (getenv "PYTHONPATH")))
10650 (setenv "PATH"
10651 (string-append (getenv "PATH")
10652 ":" cwd "/bin"))
10653 (setenv "TMPDIR" "/tmp")
10654
10655 (substitute* "Cheetah/Tests/Test.py"
10656 (("unittest.TextTestRunner\\(\\)")
10657 "unittest.TextTestRunner(verbosity=2)"))
10658
10659 (invoke "python" "Cheetah/Tests/Test.py")))))))
10660 (propagated-inputs
10661 `(("python-markdown" ,python-markdown))) ;optional
10662 (home-page "http://cheetahtemplate.org/")
10663 (synopsis "Template engine")
10664 (description "Cheetah is a text-based template engine and Python code
10665generator.
10666
10667Cheetah can be used as a standalone templating utility or referenced as
10668a library from other Python applications. It has many potential uses,
10669but web developers looking for a viable alternative to ASP, JSP, PHP and
10670PSP are expected to be its principle user group.
10671
10672Features:
10673@enumerate
10674@item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
10675 text-based format.
10676@item Cleanly separates content, graphic design, and program code.
10677@item Blends the power and flexibility of Python with a simple template language
10678 that non-programmers can understand.
10679@item Gives template writers full access to any Python data structure, module,
10680 function, object, or method in their templates.
10681@item Makes code reuse easy by providing an object-orientated interface to
10682 templates that is accessible from Python code or other Cheetah templates.
10683 One template can subclass another and selectively reimplement sections of it.
10684@item Provides a simple, yet powerful, caching mechanism that can dramatically
10685 improve the performance of a dynamic website.
10686@item Compiles templates into optimized, yet readable, Python code.
10687@end enumerate")
10688 (license (license:x11-style "file://LICENSE"))))
10689
10690(define-public python2-cheetah
10691 (package-with-python2 python-cheetah))
10692
10693(define-public python-dulwich
10694 (package
10695 (name "python-dulwich")
10696 (version "0.18.6")
10697 (source
10698 (origin
10699 (method url-fetch)
10700 (uri (list (string-append "https://www.dulwich.io/releases/"
10701 "dulwich-" version ".tar.gz")
10702 (pypi-uri "dulwich" version)))
10703 (sha256
10704 (base32
10705 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
10706 (build-system python-build-system)
10707 (arguments
10708 `(#:phases
10709 (modify-phases %standard-phases
10710 (add-before 'check 'fix-tests
10711 (lambda* (#:key inputs #:allow-other-keys)
10712 ;; The tests use Popen with a custom environment which doesn't
10713 ;; include PATH.
10714 (substitute* "dulwich/tests/compat/utils.py"
10715 (("'git'") (string-append "'"
10716 (which "git")
10717 "'")))
10718 (substitute* '("dulwich/tests/test_repository.py"
10719 "dulwich/tests/test_hooks.py")
10720 (("#!/bin/sh") (string-append "#!" (which "sh"))))
10721 (setenv "TEST_RUNNER" "unittest")
10722 (setenv "PYTHONHASHSEED" "random")
10723 #t)))))
10724 (propagated-inputs
10725 `(("python-fastimport" ,python-fastimport)))
10726 (native-inputs
10727 `(("python-mock" ,python-mock)
10728 ("python-geventhttpclient" ,python-geventhttpclient)
10729 ("git" ,git)))
10730 (home-page "https://www.dulwich.io/")
10731 (synopsis "Git implementation in Python")
10732 (description "Dulwich is an implementation of the Git file formats and
10733protocols written in pure Python.")
10734 ;; Can be used with either license.
10735 (license (list license:asl2.0 license:gpl2+))))
10736
10737(define-public python2-dulwich
10738 (package-with-python2 python-dulwich))
10739
10740(define-public python-pbkdf2
10741 (package
10742 (name "python-pbkdf2")
10743 (version "1.3")
10744 (source
10745 (origin
10746 (method url-fetch)
10747 (uri (pypi-uri "pbkdf2" version))
10748 (sha256
10749 (base32
10750 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
10751 (build-system python-build-system)
10752 (arguments
10753 '(#:phases
10754 (modify-phases %standard-phases
10755 (replace 'check
10756 (lambda _
10757 (setenv "PYTHONPATH"
10758 (string-append (getcwd) "/build/lib:"
10759 (getenv "PYTHONPATH")))
10760 (zero? (system* "python" "test/test_pbkdf2.py")))))))
10761 (propagated-inputs
10762 `(("python-pycrypto" ,python-pycrypto))) ; optional
10763 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
10764 (synopsis "Password-based key derivation")
10765 (description "This module implements the password-based key derivation
10766function, PBKDF2, specified in RSA PKCS#5 v2.0.
10767
10768PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
10769is part of the RSA Public Key Cryptography Standards series. The provided
10770implementation takes a password or a passphrase and a salt value (and
10771optionally a iteration count, a digest module, and a MAC module) and provides
10772a file-like object from which an arbitrarly-sized key can be read.")
10773 (license license:expat)))
10774
10775(define-public python2-pbkdf2
10776 (package-with-python2 python-pbkdf2))
10777
10778(define-public python-qrcode
10779 (package
10780 (name "python-qrcode")
10781 (version "6.0")
10782 (source
10783 (origin
10784 (method url-fetch)
10785 (uri (pypi-uri "qrcode" version))
10786 (sha256
10787 (base32
10788 "1gz1g2n9kqwqkak78aavr354z1v3yyiksk7q6xp5hi1zr6s0syq3"))))
10789 (build-system python-build-system)
10790 (arguments
10791 ;; FIXME: Tests require packaging 'pymaging'.
10792 '(#:tests? #f))
10793 (propagated-inputs
10794 `(("python-lxml" ,python-lxml) ; for SVG output
10795 ("python-pillow" ,python-pillow) ; for PNG output
10796 ("python-six" ,python-six)))
10797 (inputs
10798 `(;; The setup.cfg file needs to be used, and support for this requires
10799 ;; at least version 30.3.0 of setuptools
10800 ("python-setuptools" ,python-setuptools)))
10801 (home-page "https://github.com/lincolnloop/python-qrcode")
10802 (synopsis "QR Code image generator")
10803 (description "This package provides a pure Python QR Code generator
10804module. It uses the Python Imaging Library (PIL) to allow for the generation
10805of QR Codes.
10806
10807In addition this package provides a command line tool to generate QR codes and
10808either write these QR codes to a file or do the output as ascii art at the
10809console.")
10810 (license license:bsd-3)))
10811
10812(define-public python2-qrcode
10813 (package-with-python2 python-qrcode))
10814
10815(define-public python-rst2ansi
10816 (package
10817 (name "python-rst2ansi")
10818 (version "0.1.5")
10819 (source
10820 (origin
10821 (method url-fetch)
10822 (uri (pypi-uri "rst2ansi" version))
10823 (sha256
10824 (base32
10825 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
10826 (build-system python-build-system)
10827 (propagated-inputs
10828 `(("python-docutils" ,python-docutils)))
10829 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
10830 (synopsis "Convert RST to ANSI-decorated console output")
10831 (description
10832 "Python module dedicated to rendering RST (reStructuredText) documents
10833to ansi-escaped strings suitable for display in a terminal.")
10834 (license license:expat)))
10835
10836(define-public python-ansi2html
10837 (package
10838 (name "python-ansi2html")
10839 (version "1.2.0")
10840 (source
10841 (origin
10842 (method url-fetch)
10843 (uri (pypi-uri "ansi2html" version))
10844 (sha256
10845 (base32
10846 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
10847 (build-system python-build-system)
10848 (native-inputs
10849 `(("python-mock" ,python-mock)
10850 ("python-nose" ,python-nose)))
10851 (propagated-inputs
10852 `(("python-six" ,python-six)))
10853 (home-page "https://github.com/ralphbean/ansi2html")
10854 (synopsis "Convert ANSI-decorated console output to HTML")
10855 (description
10856 "@command{ansi2html} is a Python library and command line utility for
10857convering text with ANSI color codes to HTML or LaTeX.")
10858 (license license:gpl3+)))
10859
10860(define-public python2-ansi2html
10861 (package-with-python2 python-ansi2html))
10862
10863(define-public python-ddt
10864 (package
10865 (name "python-ddt")
10866 (version "1.1.3")
10867 (source
10868 (origin
10869 (method url-fetch)
10870 (uri (pypi-uri "ddt" version))
10871 (sha256
10872 (base32
10873 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
10874 (build-system python-build-system)
10875 (native-inputs
10876 `(("python-mock" ,python-mock)
10877 ("python-nose" ,python-nose)))
10878 (propagated-inputs
10879 `(("python-six" ,python-six)
10880 ("python-pyyaml" ,python-pyyaml)))
10881 (home-page "https://github.com/txels/ddt")
10882 (synopsis "Data-Driven Tests")
10883 (description
10884 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
10885running it with different test data, and make it appear as multiple test
10886cases.")
10887 (license license:expat)))
10888
10889(define-public python2-ddt
10890 (package-with-python2 python-ddt))
10891
10892(define-public python-pycountry
10893 (package
10894 (name "python-pycountry")
10895 (version "18.5.26")
10896 (source
10897 (origin
10898 (method url-fetch)
10899 (uri (pypi-uri "pycountry" version))
10900 (sha256
10901 (base32
10902 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
10903 (build-system python-build-system)
10904 (home-page "https://bitbucket.org/flyingcircus/pycountry")
10905 (synopsis "ISO databases for languages, countries, currencies, etc.")
10906 (description
10907 "@code{pycountry} provides the ISO databases for the standards:
10908@enumerate
10909@item 639-3 (Languages)
10910@item 3166 (Countries)
10911@item 3166-3 (Deleted Countries)
10912@item 3166-2 (Subdivisions of countries)
10913@item 4217 (Currencies)
10914@item 15924 (Scripts)
10915@end enumerate
10916It includes a copy from Debian’s pkg-isocodes and makes the data accessible
10917through a Python API.")
10918 (license license:lgpl2.1+)))
10919
10920(define-public python2-pycountry
10921 (package-with-python2 python-pycountry))
10922
10923(define-public python-pycosat
10924 (package
10925 (name "python-pycosat")
10926 (version "0.6.1")
10927 (source
10928 (origin
10929 (method url-fetch)
10930 (uri (pypi-uri "pycosat" version))
10931 (sha256
10932 (base32
10933 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
10934 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
10935 (build-system python-build-system)
10936 (home-page "https://github.com/ContinuumIO/pycosat")
10937 (synopsis "Bindings to picosat (a SAT solver)")
10938 (description
10939 "This package provides efficient Python bindings to @code{picosat} on
10940the C level. When importing pycosat, the @code{picosat} solver becomes part
10941of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
10942Problem} (SAT) solver.")
10943 (license license:expat)))
10944
10945(define-public python2-pycosat
10946 (package-with-python2 python-pycosat))
10947
10948(define-public python2-ruamel.ordereddict
10949 (package
10950 (name "python2-ruamel.ordereddict")
10951 (version "0.4.9")
10952 (source
10953 (origin
10954 (method url-fetch)
10955 (uri (pypi-uri "ruamel.ordereddict" version))
10956 (sha256
10957 (base32
10958 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
10959 (build-system python-build-system)
10960 (arguments
10961 `(#:python ,python-2
10962 #:phases
10963 (modify-phases %standard-phases
10964 (delete 'check)
10965 (add-after 'install 'check
10966 (lambda* (#:key inputs outputs #:allow-other-keys)
10967 (add-installed-pythonpath inputs outputs)
10968 (zero? (system* "python" "test/testordereddict.py")))))))
10969 (home-page "https://bitbucket.org/ruamel/ordereddict")
10970 (synopsis "Version of dict that keeps keys in insertion order")
10971 (description
10972 "This is an implementation of an ordered dictionary with @dfn{Key
10973Insertion Order} (KIO: updates of values do not affect the position of the
10974key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
10975removed and put at the back). The standard library module @code{OrderedDict},
10976implemented later, implements a subset of @code{ordereddict} functionality.
10977Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
10978Order} (KSO, no sorting function can be specified, but a transform can be
10979specified to apply on the key before comparison (e.g. @code{string.lower})).")
10980 (license license:expat)))
10981
10982(define-public python-pypeg2
10983 (package
10984 (name "python-pypeg2")
10985 (version "2.15.2")
10986 (source
10987 (origin
10988 (method url-fetch)
10989 (uri (pypi-uri "pyPEG2" version))
10990 (sha256
10991 (base32
10992 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
10993 (build-system python-build-system)
10994 (propagated-inputs `(("python-lxml" ,python-lxml)))
10995 (arguments
10996 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
10997 '(#:tests? #f))
10998 (home-page "https://fdik.org/pyPEG/")
10999 (synopsis "Parsering Expression Grammars in Python")
11000 (description "PyPEG is an intrinsic parser interpreter framework for
11001Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
11002parse many formal languages.")
11003 (license license:gpl2)))
11004
11005(define-public python-incremental
11006 (package
11007 (name "python-incremental")
11008 (version "17.5.0")
11009 (source
11010 (origin
11011 (method url-fetch)
11012 (uri (pypi-uri "incremental" version))
11013 (sha256
11014 (base32
11015 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
11016 (build-system python-build-system)
11017 (home-page "https://github.com/hawkowl/incremental")
11018 (synopsis "Library for versioning Python projects")
11019 (description "Incremental is a small library that versions your Python
11020projects.")
11021 (license license:expat)))
11022
11023(define-public python2-incremental
11024 (package-with-python2 python-incremental))
11025
11026(define-public python-invoke
11027 (package
11028 (name "python-invoke")
11029 (home-page "http://www.pyinvoke.org/")
11030 (version "1.1.0")
11031 (source (origin
11032 (method url-fetch)
11033 (uri (pypi-uri "invoke" version))
11034 (sha256
11035 (base32
11036 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
11037 (build-system python-build-system)
11038 (arguments
11039 ;; XXX: Requires many dependencies that are not yet in Guix.
11040 `(#:tests? #f))
11041 (synopsis "Pythonic task execution")
11042 (description
11043 "Invoke is a Python task execution tool and library, drawing inspiration
11044from various sources to arrive at a powerful and clean feature set. It is
11045evolved from the Fabric project, but focuses on local and abstract concerns
11046instead of servers and network commands.")
11047 (license license:bsd-3)))
11048
11049(define-public python2-invoke
11050 (package-with-python2 python-invoke))
11051
11052(define-public python-automat
11053 (package
11054 (name "python-automat")
11055 (version "0.6.0")
11056 (source (origin
11057 (method url-fetch)
11058 (uri (pypi-uri "Automat" version))
11059 (sha256
11060 (base32
11061 "1a7nsrljysfmdqmpn2apfa1gg6rfah4y9sizvns8gb08rx7d07rw"))))
11062 (build-system python-build-system)
11063 ;; We disable the tests because they require python-twisted, while
11064 ;; python-twisted depends on python-automat. Twisted is optional, but the
11065 ;; tests fail if it is not available. Also see
11066 ;; <https://github.com/glyph/automat/issues/71>.
11067 (arguments '(#:tests? #f))
11068 (native-inputs
11069 `(("python-m2r" ,python-m2r)
11070 ("python-setuptools-scm" ,python-setuptools-scm)
11071 ("python-graphviz" ,python-graphviz)))
11072 (propagated-inputs
11073 `(("python-six" ,python-six)
11074 ("python-attrs" ,python-attrs)))
11075 (home-page "https://github.com/glyph/Automat")
11076 (synopsis "Self-service finite-state machines")
11077 (description "Automat is a library for concise, idiomatic Python
11078expression of finite-state automata (particularly deterministic finite-state
11079transducers).")
11080 (license license:expat)))
11081
11082(define-public python2-automat
11083 (package-with-python2 python-automat))
11084
11085(define-public python-m2r
11086 (package
11087 (name "python-m2r")
11088 (version "0.1.12")
11089 (source (origin
11090 (method url-fetch)
11091 (uri (pypi-uri "m2r" version))
11092 (sha256
11093 (base32
11094 "1axrwnf425sz4qz3c0qc7yhhki4myzb8rki7pczcsgzznzmqdyxd"))))
11095 (build-system python-build-system)
11096 (propagated-inputs
11097 `(("python-docutils" ,python-docutils)
11098 ("python-mistune" ,python-mistune)))
11099 (native-inputs
11100 `(("python-pygments" ,python-pygments)
11101 ("python-mock" ,python-mock)))
11102 (home-page "https://github.com/miyakogi/m2r")
11103 (synopsis "Markdown to reStructuredText converter")
11104 (description "M2R converts a markdown file including reST markups to valid
11105reST format.")
11106 (license license:expat)))
11107
11108(define-public python2-m2r
11109 (package-with-python2 python-m2r))
11110
11111(define-public python-constantly
11112 (package
11113 (name "python-constantly")
11114 (version "15.1.0")
11115 (source (origin
11116 (method url-fetch)
11117 (uri (pypi-uri "constantly" version))
11118 (sha256
11119 (base32
11120 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
11121 (build-system python-build-system)
11122 (home-page "https://github.com/twisted/constantly")
11123 (synopsis "Symbolic constants in Python")
11124 (description "Constantly is a Python library that provides symbolic
11125constant support. It includes collections and constants with text, numeric,
11126and bit flag values.")
11127 (license license:expat)))
11128
11129(define-public python2-constantly
11130 (package-with-python2 python-constantly))
11131
11132(define-public python-attrs
11133 (package
11134 (name "python-attrs")
11135 (version "18.2.0")
11136 (source (origin
11137 (method url-fetch)
11138 (uri (pypi-uri "attrs" version))
11139 (sha256
11140 (base32
11141 "0s9ydh058wmmf5v391pym877x4ahxg45dw6a0w4c7s5wgpigdjqh"))))
11142 (build-system python-build-system)
11143 (arguments
11144 `(#:modules ((guix build utils)
11145 (guix build python-build-system)
11146 (ice-9 ftw)
11147 (srfi srfi-1)
11148 (srfi srfi-26))
11149 #:phases (modify-phases %standard-phases
11150 (replace 'check
11151 (lambda _
11152 (let ((cwd (getcwd)))
11153 (setenv "PYTHONPATH"
11154 (string-append
11155 cwd "/build/"
11156 (find (cut string-prefix? "lib" <>)
11157 (scandir (string-append cwd "/build")))
11158 ":"
11159 (getenv "PYTHONPATH")))
11160 (invoke "python" "-m" "pytest")))))))
11161 (native-inputs
11162 `(("python-coverage" ,python-coverage)
11163 ("python-hypothesis" ,python-hypothesis)
11164 ("python-pympler" ,python-pympler)
11165 ("python-pytest" ,python-pytest)
11166 ("python-six" ,python-six)
11167 ("python-sphinx" ,python-sphinx)
11168 ("python-zope-interface" ,python-zope-interface)))
11169 (home-page "https://github.com/python-attrs/attrs/")
11170 (synopsis "Attributes without boilerplate")
11171 (description "@code{attrs} is a Python package with class decorators that
11172ease the chores of implementing the most common attribute-related object
11173protocols.")
11174 (license license:expat)))
11175
11176(define-public python2-attrs
11177 (package-with-python2 python-attrs))
11178
11179(define-public python-attrs-bootstrap
11180 (package
11181 (inherit python-attrs)
11182 (name "python-attrs-bootstrap")
11183 ;; Keep this on a fixed version so python-attrs can be updated without
11184 ;; triggering a mass-rebuild. FIXME: Update this in the next rebuild cycle.
11185 (version "17.4.0")
11186 (source (origin
11187 (method url-fetch)
11188 (uri (pypi-uri "attrs" version))
11189 (sha256
11190 (base32
11191 "1jafnn1kzd6qhxgprhx6y6ik1r5m2rilx25syzcmq03azp660y8w"))))
11192 (native-inputs `())
11193 (arguments `(#:tests? #f))))
11194
11195(define-public python2-attrs-bootstrap
11196 (package-with-python2 python-attrs-bootstrap))
11197
11198(define-public python2-cliapp
11199 (package
11200 (name "python2-cliapp")
11201 (version "1.20170823")
11202 (source
11203 (origin
11204 (method url-fetch)
11205 (uri (string-append
11206 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
11207 version ".tar.gz"))
11208 (sha256
11209 (base32
11210 "1i9gik0xrj6jmi95s5w988jl1y265baz5xm5pbqdyvsh8h9ln6yq"))))
11211 (build-system python-build-system)
11212 (arguments
11213 `(#:python ,python-2
11214 #:phases
11215 (modify-phases %standard-phases
11216 ;; check phase needs to be run before the build phase. If not,
11217 ;; coverage-test-runner looks for tests for the built source files,
11218 ;; and fails.
11219 (delete 'check)
11220 (add-before 'build 'check
11221 (lambda _
11222 ;; Disable python3 tests
11223 (substitute* "check"
11224 (("python3") "# python3"))
11225 (zero? (system* "./check")))))))
11226 (native-inputs
11227 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11228 ("python2-pep8" ,python2-pep8)))
11229 (propagated-inputs
11230 `(("python2-pyaml" ,python2-pyaml)))
11231 (home-page "https://liw.fi/cliapp/")
11232 (synopsis "Python framework for command line programs")
11233 (description "@code{python2-cliapp} is a python framework for
11234command line programs. It contains the typical stuff such programs
11235need to do, such as parsing the command line for options, and
11236iterating over input files.")
11237 (license license:gpl2+)))
11238
11239(define-public python2-ttystatus
11240 (package
11241 (name "python2-ttystatus")
11242 (version "0.35")
11243 (source
11244 (origin
11245 (method url-fetch)
11246 (uri (string-append
11247 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
11248 version ".tar.gz"))
11249 (sha256
11250 (base32
11251 "0vivqbw7ddhsq1zj3g9cvvv4f0phl0pis2smsnwcr2szz2fk3hl6"))))
11252 (build-system python-build-system)
11253 (native-inputs
11254 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
11255 ("python2-pep8" ,python2-pep8)))
11256 (arguments
11257 `(#:python ,python-2
11258 #:phases
11259 (modify-phases %standard-phases
11260 ;; check phase needs to be run before the build phase. If not,
11261 ;; coverage-test-runner looks for tests for the built source files,
11262 ;; and fails.
11263 (delete 'check)
11264 (add-before 'build 'check
11265 (lambda _
11266 (zero? (system* "make" "check")))))))
11267 (home-page "https://liw.fi/ttystatus/")
11268 (synopsis "Python library for showing progress reporting and
11269status updates on terminals")
11270 (description "@code{python2-ttystatus} is a python library for
11271showing progress reporting and status updates on terminals, for
11272command line programs. Output is automatically adapted to the width
11273of the terminal: truncated if it does not fit, and resized if the
11274terminal size changes.")
11275 (license license:gpl3+)))
11276
11277(define-public python2-tracing
11278 (package
11279 (name "python2-tracing")
11280 (version "0.10")
11281 (source
11282 (origin
11283 (method url-fetch)
11284 (uri (string-append
11285 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
11286 version ".tar.gz"))
11287 (sha256
11288 (base32
11289 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
11290 (build-system python-build-system)
11291 (arguments
11292 `(#:python ,python-2))
11293 (home-page "https://liw.fi/tracing/")
11294 (synopsis "Python debug logging helper")
11295 (description "@code{python2-tracing} is a python library for
11296logging debug messages. It provides a way to turn debugging messages
11297on and off, based on the filename they occur in. It is much faster
11298than using @code{logging.Filter} to accomplish the same thing, which
11299matters when code is run in production mode. The actual logging still
11300happens using the @code{logging} library.")
11301 (license license:gpl3+)))
11302
11303(define-public python2-larch
11304 (package
11305 (name "python2-larch")
11306 (version "1.20151025")
11307 (source
11308 (origin
11309 (method url-fetch)
11310 (uri (string-append
11311 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
11312 version ".tar.gz"))
11313 (patches (search-patches
11314 "python2-larch-coverage-4.0a6-compatibility.patch"))
11315 (sha256
11316 (base32
11317 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
11318 (build-system python-build-system)
11319 (arguments
11320 `(#:python ,python-2
11321 #:phases
11322 (modify-phases %standard-phases
11323 ;; check phase needs to be run before the build phase. If not,
11324 ;; coverage-test-runner looks for tests for the built source files,
11325 ;; and fails.
11326 (delete 'check)
11327 (add-before 'build 'check
11328 (lambda _
11329 (zero? (system* "make" "check")))))))
11330 (native-inputs
11331 `(("cmdtest" ,cmdtest)
11332 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
11333 (propagated-inputs
11334 `(("python2-tracing" ,python2-tracing)))
11335 (home-page "https://liw.fi/larch/")
11336 (synopsis "Python copy-on-write B-tree library")
11337 (description "@code{python2-larch} is an implementation of
11338particular kind of B-tree, based on research by Ohad Rodeh. See
11339@url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
11340on the data structure.
11341
11342The distinctive feature of this B-tree is that a node is never
11343(conceptually) modified. Instead, all updates are done by
11344copy-on-write. This makes it easy to clone a tree, and modify only the
11345clone, while other processes access the original tree.")
11346 (license license:gpl3+)))
11347
11348(define-public python-astroid
11349 (package
11350 (name "python-astroid")
11351 (version "2.1.0")
11352 (source
11353 (origin
11354 (method url-fetch)
11355 (uri (pypi-uri "astroid" version))
11356 (sha256
11357 (base32
11358 "08hz675knh4294bancdapql392fmbjyimhbyrmfkz1ka7l035c1m"))))
11359 (build-system python-build-system)
11360 (propagated-inputs
11361 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
11362 ("python-six" ,python-six)
11363 ("python-wrapt" ,python-wrapt)))
11364 (native-inputs
11365 `(("python-dateutil" ,python-dateutil)
11366 ("python-nose" ,python-nose)
11367 ("python-pytest" ,python-pytest)
11368 ("python-pytest-runner" ,python-pytest-runner)))
11369 (arguments
11370 `(#:phases
11371 (modify-phases %standard-phases
11372 (add-after 'unpack 'remove-spurious-test
11373 (lambda _
11374 ;; This can be removed after upgrading from python-3.7
11375 ;; https://github.com/PyCQA/astroid/issues/593
11376 ;; https://bugs.python.org/issue34056
11377 (delete-file "astroid/tests/unittest_modutils.py")
11378 #t))
11379 (replace 'check
11380 (lambda _
11381 (invoke "pytest" "astroid"))))))
11382 (home-page "https://github.com/PyCQA/astroid")
11383 (synopsis "Common base representation of python source code for pylint and
11384other projects")
11385 (description "@code{python-astroid} provides a common base representation
11386of python source code for projects such as pychecker, pyreverse, pylint, etc.
11387
11388It provides a compatible representation which comes from the _ast module. It
11389rebuilds the tree generated by the builtin _ast module by recursively walking
11390down the AST and building an extended ast. The new node classes have
11391additional methods and attributes for different usages. They include some
11392support for static inference and local name scopes. Furthermore, astroid
11393builds partial trees by inspecting living objects.")
11394 (license license:lgpl2.1+)
11395 (properties `((python2-variant . ,(delay python2-astroid))))))
11396
11397(define-public python2-astroid
11398 (let ((base (package-with-python2
11399 (strip-python2-variant python-astroid))))
11400 (package (inherit base)
11401 ;; Version 2.x removes python2 support.
11402 (version "1.6.5")
11403 (source
11404 (origin
11405 (method url-fetch)
11406 (uri (pypi-uri "astroid" version))
11407 (sha256
11408 (base32
11409 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
11410 (arguments
11411 (substitute-keyword-arguments (package-arguments base)
11412 ((#:phases phases)
11413 `(modify-phases ,phases
11414 (add-after 'unpack 'remove-spurious-test
11415 (lambda _
11416 ;; https://github.com/PyCQA/astroid/issues/276
11417 (delete-file "astroid/tests/unittest_brain.py")
11418 #t))
11419 (replace 'check
11420 (lambda _
11421 (invoke"python" "-m" "unittest" "discover"
11422 "-p" "unittest*.py")))))))
11423 (native-inputs `())
11424 (propagated-inputs
11425 `(("python2-backports-functools-lru-cache"
11426 ,python2-backports-functools-lru-cache)
11427 ("python2-enum34" ,python2-enum34)
11428 ("python2-singledispatch" ,python2-singledispatch)
11429 ,@(package-propagated-inputs base))))))
11430
11431(define-public python-isort
11432 (package
11433 (name "python-isort")
e2227b6a 11434 (version "4.3.4")
44d10b1f
RW
11435 (source
11436 (origin
e2227b6a
EF
11437 (method git-fetch)
11438 (uri (git-reference
11439 ;; Tests pass only from the Github sources
11440 (url "https://github.com/timothycrosley/isort")
11441 (commit version)))
11442 (file-name (git-file-name name version))
44d10b1f
RW
11443 (sha256
11444 (base32
e2227b6a 11445 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
44d10b1f
RW
11446 (build-system python-build-system)
11447 (native-inputs
11448 `(("python-mock" ,python-mock)
11449 ("python-pytest" ,python-pytest)))
11450 (home-page "https://github.com/timothycrosley/isort")
11451 (synopsis "Python utility/library to sort python imports")
11452 (description "@code{python-isort} is a python utility/library to sort
11453imports alphabetically, and automatically separated into sections. It
11454provides a command line utility, a python library and plugins for various
11455editors.")
e2227b6a
EF
11456 (license license:expat)
11457 (properties `((python2-variant . ,(delay python2-isort))))))
44d10b1f
RW
11458
11459(define-public python2-isort
e2227b6a
EF
11460 (let ((base (package-with-python2
11461 (strip-python2-variant python-isort))))
11462 (package (inherit base)
11463 (native-inputs
11464 `(("python2-futures" ,python2-futures)
11465 ,@(package-native-inputs base))))))
44d10b1f
RW
11466
11467(define-public python2-backports-functools-lru-cache
11468 (package
11469 (name "python2-backports-functools-lru-cache")
11470 (version "1.5")
11471 (source
11472 (origin
11473 (method url-fetch)
11474 ;; only the pypi tarballs contain the necessary metadata
11475 (uri (pypi-uri "backports.functools_lru_cache" version))
11476 (sha256
11477 (base32
11478 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
11479 (build-system python-build-system)
11480 (native-inputs
11481 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
11482 (arguments
11483 `(#:python ,python-2))
11484 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
11485 (synopsis "Backport of functools.lru_cache from Python 3.3")
11486 (description "@code{python2-backports-functools-lru-cache} is a backport
11487of @code{functools.lru_cache} from python 3.3.")
11488 (license license:expat)))
11489
11490(define-public python-configparser
11491 (package
11492 (name "python-configparser")
11493 (version "3.5.0")
11494 (source
11495 (origin
11496 (method url-fetch)
11497 (uri (string-append
11498 "https://bitbucket.org/ambv/configparser/get/"
11499 version ".tar.bz2"))
11500 (file-name (string-append name "-" version ".tar.gz"))
11501 (sha256
11502 (base32
11503 "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa"))))
11504 (build-system python-build-system)
11505 (home-page "http://docs.python.org/py3k/library/configparser.html")
11506 (synopsis "Backport of configparser from python 3.5")
11507 (description "@code{python-configparser} is a backport of
11508@code{configparser} from Python 3.5 so that it can be used directly
11509in other versions.")
11510 (license license:expat)))
11511
11512(define-public python2-configparser
11513 (package-with-python2 python-configparser))
11514
11515(define-public python-mando
11516 (package
11517 (name "python-mando")
11518 (version "0.6.4")
11519 (source (origin
11520 (method url-fetch)
11521 (uri (pypi-uri "mando" version))
11522 (sha256
11523 (base32
11524 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
11525 (build-system python-build-system)
11526 (propagated-inputs
11527 `(("python-rst2ansi" ,python-rst2ansi)
11528 ("python-six" ,python-six)))
11529 (native-inputs
11530 `(("python-pytest" ,python-pytest)))
11531 (home-page "https://mando.readthedocs.org/")
11532 (synopsis
11533 "Wrapper around argparse, allowing creation of complete CLI applications")
11534 (description
11535 "This package is a wrapper around argparse, allowing you to write complete CLI
11536applications in seconds while maintaining all the flexibility.")
11537 (license license:expat)))
11538
11539(define-public python2-mando
11540 (package-with-python2 python-mando))
11541
11542(define-public python-fudge
11543 (package
11544 (name "python-fudge")
11545 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
11546 ;; package, which is currently the only use of this package.
11547 (version "0.9.6")
11548 (source
11549 (origin
11550 (method url-fetch)
11551 (uri (pypi-uri "fudge" version))
11552 (sha256
11553 (base32
11554 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
11555 (build-system python-build-system)
11556 (arguments
11557 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
11558 (home-page "https://github.com/fudge-py/fudge")
11559 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
11560 (description
11561 "Fudge is a Python module for using fake objects (mocks and stubs) to
11562test real ones.
11563
11564In readable Python code, you declare the methods available on your fake object
11565and how they should be called. Then you inject that into your application and
11566start testing. This declarative approach means you don’t have to record and
11567playback actions and you don’t have to inspect your fakes after running code.
11568If the fake object was used incorrectly then you’ll see an informative
11569exception message with a traceback that points to the culprit.")
11570 (license license:expat)))
11571
11572(define-public python2-fudge
11573 (package-with-python2 python-fudge))
11574
11575(define-public python-mwclient
11576 (package
11577 (name "python-mwclient")
11578 (version "0.8.4")
11579 (source
11580 (origin
11581 (method url-fetch)
11582 ;; The PyPI version wouldn't contain tests.
11583 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
11584 "v" version ".tar.gz"))
11585 (file-name (string-append name "-" version ".tar.gz"))
11586 (sha256
11587 (base32
11588 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
11589 (build-system python-build-system)
11590 (propagated-inputs
11591 `(("python-requests" ,python-requests)
11592 ("python-requests-oauthlib"
11593 ,python-requests-oauthlib)
11594 ("python-six" ,python-six)))
11595 (native-inputs
11596 `(("python-mock" ,python-mock)
11597 ("python-pytest" ,python-pytest)
11598 ("python-pytest-pep8" ,python-pytest-pep8)
11599 ("python-pytest-cache" ,python-pytest-cache)
11600 ("python-pytest-cov" ,python-pytest-cov)
11601 ("python-responses" ,python-responses)))
11602 (home-page "https://github.com/btongminh/mwclient")
11603 (synopsis "MediaWiki API client")
11604 (description "This package provides a MediaWiki API client.")
11605 (license license:expat)))
11606
11607(define-public python2-mwclient
11608 (package-with-python2 python-mwclient))
11609
11610(define-public python-utils
11611 (package
11612 (name "python-utils")
11613 (version "2.1.0")
11614 (source (origin
11615 (method url-fetch)
11616 (uri (pypi-uri "python-utils" version))
11617 (sha256
11618 (base32
11619 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
11620 (build-system python-build-system)
11621 (native-inputs
11622 `(("pytest-runner" ,python-pytest-runner)
11623 ("pytest" ,python-pytest)
11624 ("six" ,python-six)))
11625 (home-page "https://github.com/WoLpH/python-utils")
11626 (synopsis "Convenient utilities not included with the standard Python install")
11627 (description
11628 "Python Utils is a collection of small Python functions and classes which
11629make common patterns shorter and easier.")
11630 (license license:bsd-2)))
11631
11632(define-public python2-utils
11633 (package-with-python2 python-utils))
11634
11635(define-public python-sphinx-me
11636 (package
11637 (name "python-sphinx-me")
11638 (version "0.3")
11639 (source
11640 (origin
11641 (method url-fetch)
11642 (uri (pypi-uri "sphinx-me" version))
11643 (sha256
11644 (base32
11645 "06jzgp213zihnvpcy2y5jy3ykid3apc2ncp2pg6a2g05lhiziglq"))))
11646 (build-system python-build-system)
11647 (home-page "https://github.com/stephenmcd/sphinx-me")
11648 (synopsis "Create a Sphinx documentation shell")
11649 (description
11650 "Create a Sphinx documentation shell for your project and include the
11651README file as the documentation index. It handles extracting the required
11652meta data such as the project name, author and version from your project for
11653use in your Sphinx docs.")
11654 (license license:bsd-2)))
11655
11656(define-public python2-sphinx-me
11657 (package-with-python2 python-sphinx-me))
11658
11659(define-public python-diff-match-patch
11660 (package
11661 (name "python-diff-match-patch")
11662 (version "20121119")
11663 (source
11664 (origin
11665 (method url-fetch)
11666 (uri (pypi-uri "diff-match-patch" version))
11667 (sha256
11668 (base32
11669 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
11670 (build-system python-build-system)
11671 (home-page "https://code.google.com/p/google-diff-match-patch")
11672 (synopsis "Synchronize plain text")
11673 (description "Diff Match and Patch libraries offer robust algorithms to
11674perform the operations required for synchronizing plain text.")
11675 (license license:asl2.0)))
11676
11677(define-public python2-diff-match-patch
11678 (package-with-python2 python-diff-match-patch))
11679
11680(define-public python-dirsync
11681 (package
11682 (name "python-dirsync")
11683 (version "2.2.3")
11684 (source
11685 (origin
11686 (method url-fetch)
11687 (uri (pypi-uri "dirsync" version))
11688 (sha256
11689 (base32
11690 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
11691 (build-system python-build-system)
11692 (propagated-inputs
11693 `(("six" ,python-six)))
11694 (home-page "https://bitbucket.org/tkhyn/dirsync")
11695 (synopsis "Advanced directory tree synchronisation tool")
11696 (description "Advanced directory tree synchronisation tool.")
11697 (license license:expat)))
11698
11699(define-public python2-dirsync
11700 (package-with-python2 python-dirsync))
11701
11702(define-public python-levenshtein
11703 (package
11704 (name "python-levenshtein")
11705 (version "0.12.0")
11706 (source
11707 (origin
11708 (method url-fetch)
11709 (uri (pypi-uri "python-Levenshtein" version))
11710 (sha256
11711 (base32
11712 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
11713 (build-system python-build-system)
11714 (home-page "https://github.com/ztane/python-Levenshtein")
11715 (synopsis "Fast computation of Levenshtein distance and string similarity")
11716 (description
11717 "The Levenshtein Python C extension module contains functions for fast computation of
11718@enumerate
11719@item Levenshtein (edit) distance, and edit operations
11720@item string similarity
11721@item approximate median strings, and generally string averaging
11722@item string sequence and set similarity
11723@end enumerate
11724It supports both normal and Unicode strings.")
11725 (license license:gpl2+)))
11726
11727(define-public python2-levenshtein
11728 (package-with-python2 python-levenshtein))
11729
11730(define-public python-scandir
11731 (package
11732 (name "python-scandir")
11733 (version "1.9.0")
11734 (source
11735 (origin
11736 (method url-fetch)
11737 (uri (pypi-uri "scandir" version))
11738 (sha256
11739 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
11740 (build-system python-build-system)
11741 (arguments
11742 `(#:phases (modify-phases %standard-phases
11743 (replace 'check
11744 (lambda _
11745 (invoke "python" "test/run_tests.py"))))))
11746 (home-page "https://github.com/benhoyt/scandir")
11747 (synopsis "Directory iteration function")
11748 (description
11749 "Directory iteration function like os.listdir(), except that instead of
11750returning a list of bare filenames, it yields DirEntry objects that include
11751file type and stat information along with the name. Using scandir() increases
11752the speed of os.walk() by 2-20 times (depending on the platform and file
11753system) by avoiding unnecessary calls to os.stat() in most cases.
11754
11755This package is part of the Python standard library since version 3.5.")
11756 (license license:bsd-3)))
11757
11758(define-public python2-scandir
11759 (package-with-python2 python-scandir))
11760
11761(define-public python2-stemming
11762 (package
11763 (name "python2-stemming")
11764 (version "1.0.1")
11765 (source
11766 (origin
11767 (method url-fetch)
11768 (uri (pypi-uri "stemming" version))
11769 (sha256
11770 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
11771 (build-system python-build-system)
11772 (arguments
11773 `(#:python ,python-2))
11774 (home-page "https://bitbucket.org/mchaput/stemming/overview")
11775 (synopsis "Python implementations of various stemming algorithms")
11776 (description
11777 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
11778stemming algorithms for English. These implementations are straightforward and
11779efficient, unlike some Python versions of the same algorithms available on the
11780Web. This package is an extraction of the stemming code included in the Whoosh
11781search engine.")
11782 (license license:public-domain)))
11783
11784(define-public python-factory-boy
11785 (package
11786 (name "python-factory-boy")
11787 (version "2.8.1")
11788 (source
11789 (origin
11790 (method url-fetch)
11791 (uri (pypi-uri "factory_boy" version))
11792 (sha256
11793 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
11794 (build-system python-build-system)
11795 (arguments
11796 ;; Tests are not included in the tarball.
11797 `(#:tests? #f))
11798 (propagated-inputs
11799 `(("faker" ,python-faker)))
11800 (home-page "https://github.com/benhoyt/scandir")
11801 (synopsis "Versatile test fixtures replacement")
11802 (description
11803 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
11804
11805As a fixtures replacement tool, it aims to replace static, hard to maintain
11806fixtures with easy-to-use factories for complex object.
11807
11808Instead of building an exhaustive test setup with every possible combination
11809of corner cases, factory_boy allows you to use objects customized for the
11810current test, while only declaring the test-specific fields")
11811 (license license:expat)))
11812
11813(define-public python2-factory-boy
11814 (package-with-python2 python-factory-boy))
11815
11816(define-public python-translate-toolkit
11817 (package
11818 (name "python-translate-toolkit")
11819 (version "2.1.0")
11820 (source
11821 (origin
11822 (method url-fetch)
11823 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
11824 (sha256
11825 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
11826 (build-system python-build-system)
11827 (native-inputs
11828 `(("python-pytest" ,python-pytest)
11829 ("python-sphinx" ,python-sphinx)))
11830 (propagated-inputs
11831 `(("python-babel" ,python-babel)
11832 ("python-beautifulsoup4" ,python-beautifulsoup4)
11833 ("python-chardet" ,python-chardet)
11834 ("python-diff-match-patch" ,python-diff-match-patch)
11835 ("python-levenshtein" ,python-levenshtein)
11836 ("python-lxml" ,python-lxml)
11837 ("python-six" ,python-six)
11838 ("python-vobject" ,python-vobject)
11839 ("python-pyyaml" ,python-pyyaml)))
11840 (arguments
11841 ;; TODO: tests are not run, because they end with
11842 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
11843 ;; 'parse_funcs'
11844 ;; during test setup.
11845 `(#:tests? #f))
11846 (home-page "http://toolkit.translatehouse.org")
11847 (synopsis "Tools and API for translation and localization engineering")
11848 (description
11849 "Tools and API for translation and localization engineering. It contains
11850several utilities, as well as an API for building localization tools.")
11851 (license license:gpl2+)))
11852
11853(define-public python2-translate-toolkit
11854 (package-with-python2 python-translate-toolkit))
11855
11856(define-public python-packaging
11857 (package
11858 (name "python-packaging")
11859 (version "18.0")
11860 (source
11861 (origin
11862 (method url-fetch)
11863 (uri (pypi-uri "packaging" version))
11864 (sha256
11865 (base32
11866 "01wq9c53ix5rz6qg2c98gy8n4ff768rmanifm8m5jpjiaizj51h8"))))
11867 (build-system python-build-system)
11868 (arguments
11869 `(#:phases (modify-phases %standard-phases
11870 (replace 'check
11871 (lambda _ (invoke "py.test" "-vv"))))))
11872 (native-inputs
11873 `(("python-pretend" ,python-pretend)
11874 ("python-pytest" ,python-pytest)))
11875 (propagated-inputs
11876 `(("python-pyparsing" ,python-pyparsing)
11877 ("python-six" ,python-six)))
11878 (home-page "https://github.com/pypa/packaging")
11879 (synopsis "Core utilities for Python packages")
11880 (description "Packaging is a Python module for dealing with Python packages.
11881It offers an interface for working with package versions, names, and dependency
11882information.")
11883 ;; From 'LICENSE': This software is made available under the terms of
11884 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
11885 ;; Contributions to this software is made under the terms of *both* these
11886 ;; licenses.
11887 (license (list license:asl2.0 license:bsd-2))))
11888
11889(define-public python2-packaging
11890 (package-with-python2 python-packaging))
11891
11892(define-public python-relatorio
11893 (package
11894 (name "python-relatorio")
11895 (version "0.8.0")
11896 (source
11897 (origin
11898 (method url-fetch)
11899 (uri (pypi-uri "relatorio" version))
11900 (sha256
11901 (base32
11902 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
11903 (build-system python-build-system)
11904 (propagated-inputs
11905 `(("python-lxml" ,python-lxml)
11906 ("python-genshi" ,python-genshi)))
11907 (native-inputs
11908 `(("python-magic" ,python-magic)))
11909 (home-page "https://relatorio.tryton.org/")
11910 (synopsis "Templating library able to output ODT and PDF files")
11911 (description "Relatorio is a templating library which provides a way to
11912easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
11913for more filetypes can be easily added by creating plugins for them.")
11914 (license license:gpl3+)))
11915
11916(define-public python2-relatorio
11917 (package-with-python2 python-relatorio))
11918
11919(define-public python-radon
11920 (package
11921 (name "python-radon")
11922 (version "2.2.0")
11923 (source
11924 (origin
11925 (method url-fetch)
11926 (uri (pypi-uri "radon" version))
11927 (sha256
11928 (base32
11929 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
11930 (build-system python-build-system)
11931 (arguments
11932 `(#:phases (modify-phases %standard-phases
11933 (replace 'check
11934 (lambda _
11935 (invoke "python" "radon/tests/run.py"))))))
11936 (propagated-inputs
11937 `(("python-colorama" ,python-colorama)
11938 ("python-flake8-polyfill" ,python-flake8-polyfill)
11939 ("python-mando" ,python-mando)))
11940 (native-inputs
11941 `(("python-pytest" ,python-pytest)
11942 ("python-pytest-mock" ,python-pytest-mock)))
11943 (home-page "https://radon.readthedocs.org/")
11944 (synopsis "Code Metrics in Python")
11945 (description "Radon is a Python tool which computes various code metrics.
11946Supported metrics are:
11947@itemize @bullet
11948@item raw metrics: SLOC, comment lines, blank lines, &c.
11949@item Cyclomatic Complexity (i.e. McCabe’s Complexity)
11950@item Halstead metrics (all of them)
11951@item the Maintainability Index (a Visual Studio metric)
11952@end itemize")
11953 (license license:expat)))
11954
11955(define-public python2-radon
11956 (package-with-python2 python-radon))
11957
11958(define-public python-sure
11959 (package
11960 (name "python-sure")
11961 (version "1.4.11")
11962 (source
11963 (origin
11964 (method url-fetch)
11965 (uri (pypi-uri "sure" version))
11966 (sha256
11967 (base32
11968 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
11969 (build-system python-build-system)
11970 (propagated-inputs
11971 `(("python-mock" ,python-mock)
11972 ("python-six" ,python-six)))
11973 (native-inputs
11974 `(("python-nose" ,python-nose)))
11975 (home-page "https://github.com/gabrielfalcao/sure")
11976 (synopsis "Automated testing library in python for python")
11977 (description
11978 "Sure is a python library that leverages a DSL for writing assertions.
11979Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
11980 (license license:gpl3+)))
11981
11982(define-public python2-sure
11983 (package-with-python2 python-sure))
11984
11985(define-public python2-couleur
11986 ;; This package does not seem to support python3 at all, hence,
11987 ;; only the python2 variant definition is provided.
11988 (package
11989 (name "python2-couleur")
11990 (version "0.6.2")
11991 (source
11992 (origin
11993 (method url-fetch)
11994 (uri (pypi-uri "couleur" version))
11995 (sha256
11996 (base32
11997 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
11998 (build-system python-build-system)
11999 (arguments
12000 `(#:python ,python-2))
12001 (home-page "https://github.com/gabrielfalcao/couleur")
12002 (synopsis
12003 "ANSI terminal tool for python, colored shell and other handy fancy features")
12004 (description
12005 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
12006terminal such as coloured output in the shell, overwriting output, indentation, etc.")
12007 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
12008 ;; https://github.com/gabrielfalcao/couleur/issues/11
12009 (license license:lgpl3+)))
12010
12011(define-public python-misaka
12012 (package
12013 (name "python-misaka")
12014 (version "2.1.0")
12015 (source
12016 (origin
12017 (method url-fetch)
12018 (uri (pypi-uri "misaka" version))
12019 (sha256
12020 (base32
12021 "1yqrq3a5rracirmvk52n28nn6ckdaz897gnigv89a9gmyn87sqw7"))))
12022 (build-system python-build-system)
12023 (arguments
12024 `(;; Line 37 of setup.py calls self.run_command('develop')
12025 ;; in the 'check' phase. This command seems to be trying
12026 ;; to write to
12027 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
12028 ;; for which it does not have the permission to write.
12029 #:tests? #f))
12030 (propagated-inputs
12031 `(("python-cffi" ,python-cffi)))
12032 (home-page "https://github.com/FSX/misaka")
12033 (synopsis "Python binding for Hoedown")
12034 (description
12035 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
12036library written in C. It features a fast HTML renderer and functionality to make custom
12037renderers (e.g. man pages or LaTeX).")
12038 (license license:expat)))
12039
12040(define-public python2-misaka
12041 (package-with-python2 python-misaka))
12042
12043(define-public python2-steadymark
12044 ;; This is forced into being a python2 only variant
12045 ;; due to its dependence on couleur that has no support
12046 ;; for python3
12047 (package
12048 (name "python2-steadymark")
12049 (version "0.7.3")
12050 (source
12051 (origin
12052 (method url-fetch)
12053 (uri (pypi-uri "steadymark" version))
12054 (sha256
12055 (base32
12056 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
12057 (build-system python-build-system)
12058 (native-inputs
12059 `(("python-couleur" ,python2-couleur)
12060 ("python-sure" ,python2-sure)
12061 ("python-misaka" ,python2-misaka)))
12062 (arguments
12063 `(#:python ,python-2
12064 #:phases
12065 (modify-phases %standard-phases
12066 (add-before 'build 'patch-setup-py
12067 (lambda _
12068 ;; Update requirements from dependency==version
12069 ;; to dependency>=version
12070 (substitute* "setup.py"
12071 (("==") ">="))
12072 #t)))))
12073 (home-page "https://github.com/gabrielfalcao/steadymark")
12074 (synopsis "Markdown-based test runner for python")
12075 (description
12076 "@code{Steadymark} allows documentation to be written in github-flavoured
12077markdown. The documentation may contain snippets of code surrounded by python
12078code blocks and @code{Steadymark} will find these snippets and run them, making
12079sure that there are no old malfunctional examples in the documentation examples.")
12080 (license license:expat)))
12081
12082(define-public python-jsonpointer
12083 (package
12084 (name "python-jsonpointer")
12085 (version "1.10")
12086 (source
12087 (origin
12088 (method url-fetch)
12089 (uri (pypi-uri "jsonpointer" version))
12090 (sha256
12091 (base32
12092 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
12093 (build-system python-build-system)
12094 (home-page "https://github.com/stefankoegl/python-json-pointer")
12095 (synopsis "Identify specific nodes in a JSON document")
12096 (description "@code{jsonpointer} allows you to access specific nodes
12097by path in a JSON document (see RFC 6901).")
12098 (license license:bsd-3)))
12099
12100(define-public python2-jsonpointer
12101 (package-with-python2 python-jsonpointer))
12102
12103(define-public python-jsonpatch
12104 (package
12105 (name "python-jsonpatch")
12106 (version "1.16")
12107 (source
12108 (origin
12109 (method url-fetch)
12110 ;; pypi version lacks tests.js
12111 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12112 "archive/v" version ".tar.gz"))
12113 (file-name (string-append name "-" version ".tar.gz"))
12114 (sha256
12115 (base32
12116 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
12117 (build-system python-build-system)
12118 (native-inputs
12119 `(("python-jsonpointer" ,python-jsonpointer)))
12120 (home-page "https://github.com/stefankoegl/python-json-patch")
12121 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
12122 (description "@code{jsonpatch} is a library and program that allows
12123applying JSON Patches according to RFC 6902.")
12124 (license license:bsd-3)))
12125
12126(define-public python2-jsonpatch
12127 (package-with-python2 python-jsonpatch))
12128
12129(define-public python-jsonpatch-0.4
12130 (package (inherit python-jsonpatch)
12131 (name "python-jsonpatch")
12132 (version "0.4")
12133 (source
12134 (origin
12135 (method url-fetch)
12136 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
12137 "archive/v" version ".tar.gz"))
12138 (file-name (string-append name "-" version ".tar.gz"))
12139 (sha256
12140 (base32
12141 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
12142
12143(define-public python2-jsonpatch-0.4
12144 (package-with-python2 python-jsonpatch-0.4))
12145
12146(define-public python-rfc3986
12147 (package
12148 (name "python-rfc3986")
12149 (version "1.1.0")
12150 (source (origin
12151 (method url-fetch)
12152 (uri (pypi-uri "rfc3986" version))
12153 (sha256
12154 (base32
12155 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
12156 (build-system python-build-system)
12157 (arguments
12158 `(#:modules ((guix build utils)
12159 (guix build python-build-system)
12160 (ice-9 ftw)
12161 (srfi srfi-1)
12162 (srfi srfi-26))
12163 #:phases
12164 (modify-phases %standard-phases
12165 (replace 'check
12166 (lambda _
12167 (let ((cwd (getcwd)))
12168 (setenv "PYTHONPATH"
12169 (string-append cwd "/build/"
12170 (find (cut string-prefix? "lib" <>)
12171 (scandir (string-append cwd "/build")))
12172 ":"
12173 (getenv "PYTHONPATH")))
12174 (invoke "pytest" "-v")))))))
12175 (native-inputs
12176 `(("python-pytest" ,python-pytest)))
12177 (home-page "https://rfc3986.readthedocs.io/")
12178 (synopsis "Parse and validate URI references")
12179 (description
12180 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
12181validation and authority parsing. This module also supports RFC@tie{}6874
12182which adds support for zone identifiers to IPv6 addresses.")
12183 (license license:asl2.0)))
12184
12185(define-public python2-rfc3986
12186 (package-with-python2 python-rfc3986))
12187
12188(define-public python-rfc3987
12189 (package
12190 (name "python-rfc3987")
12191 (version "1.3.7")
12192 (source
12193 (origin
12194 (method url-fetch)
12195 (uri (pypi-uri "rfc3987" version))
12196 (sha256
12197 (base32
12198 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
12199 (build-system python-build-system)
12200 (home-page "https://pypi.python.org/pypi/rfc3987")
12201 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
12202 (description "@code{rfc3987} provides routines for parsing and
12203validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
12204 (license license:gpl3+)))
12205
12206(define-public python2-rfc3987
12207 (package-with-python2 python-rfc3987))
12208
12209(define-public python-validate-email
12210 (package
12211 (name "python-validate-email")
12212 (version "1.3")
12213 (source
12214 (origin
12215 (method url-fetch)
12216 (uri (pypi-uri "validate_email" version))
12217 (sha256
12218 (base32
12219 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
12220 (build-system python-build-system)
12221 (home-page "https://github.com/syrusakbary/validate_email")
12222 (synopsis "Verifies if an email address is valid and really exists")
12223 (description "@code{validate_email} can be used to verify if an email
12224address is valid and really exists.")
12225 (license license:lgpl3+)))
12226
12227(define-public python2-validate-email
12228 (package-with-python2 python-validate-email))
12229
12230(define-public python-flex
12231 (package
12232 (name "python-flex")
12233 (version "6.10.0")
12234 (source
12235 (origin
12236 (method url-fetch)
12237 (uri (pypi-uri "flex" version))
12238 (sha256
12239 (base32
12240 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
12241 (build-system python-build-system)
12242 (propagated-inputs
12243 `(("python-click" ,python-click)
12244 ("python-iso8601" ,python-iso8601)
12245 ("python-jsonpointer" ,python-jsonpointer)
12246 ("python-pyyaml" ,python-pyyaml)
12247 ("python-requests" ,python-requests)
12248 ("python-rfc3987" ,python-rfc3987)
12249 ("python-six" ,python-six)
12250 ("python-validate-email" ,python-validate-email)))
12251 (home-page "https://github.com/pipermerriam/flex")
12252 (synopsis "Validates Swagger schemata")
12253 (description "@code{flex} can be used to validate Swagger schemata.")
12254 (license license:bsd-3)))
12255
12256(define-public python2-flex
12257 (package-with-python2 python-flex))
12258
12259(define-public python-marshmallow
12260 (package
12261 (name "python-marshmallow")
12262 (version "3.0.0b14")
12263 (source
12264 (origin
12265 (method url-fetch)
12266 (uri (pypi-uri "marshmallow" version))
12267 (sha256
12268 (base32
12269 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
12270 (build-system python-build-system)
12271 (propagated-inputs
12272 `(("python-dateutil" ,python-dateutil)
12273 ("python-simplejson" ,python-simplejson)))
12274 (native-inputs
12275 `(("python-pytest" ,python-pytest)
12276 ("python-pytz" ,python-pytz)))
12277 (home-page "https://github.com/marshmallow-code/marshmallow")
12278 (synopsis "Convert complex datatypes to and from native
12279Python datatypes.")
12280 (description "@code{marshmallow} provides a library for converting
12281complex datatypes to and from native Python datatypes.")
12282 (license license:expat)))
12283
12284(define-public python2-marshmallow
12285 (package-with-python2 python-marshmallow))
12286
12287(define-public python-apispec
12288 (package
12289 (name "python-apispec")
12290 (version "0.25.3")
12291 (source
12292 (origin
12293 (method url-fetch)
12294 (uri (pypi-uri "apispec" version))
12295 (sha256
12296 (base32
12297 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
12298 (build-system python-build-system)
12299 (propagated-inputs
12300 `(("python-pyyaml" ,python-pyyaml)))
12301 (native-inputs
12302 `(("python-pytest" ,python-pytest)
12303 ("python-flask" ,python-flask)
12304 ("python-marshmallow" ,python-marshmallow)
12305 ("python-tornado" ,python-tornado)
12306 ("python-bottle" ,python-bottle)
12307 ("python-mock" ,python-mock)))
12308 (home-page "https://github.com/marshmallow-code/apispec")
12309 (synopsis "Swagger 2.0 API specification generator")
12310 (description "@code{python-apispec} is a pluggable API specification
12311generator. Currently supports the OpenAPI specification (f.k.a.
12312Swagger 2.0).")
12313 (license license:expat)))
12314
12315(define-public python2-apispec
12316 (package-with-python2 python-apispec))
12317
12318(define-public python-flasgger
12319 (package
12320 (name "python-flasgger")
12321 (version "0.6.3")
12322 (source
12323 (origin
12324 (method url-fetch)
12325 (uri (string-append "https://github.com/rochacbruno/flasgger/archive/"
12326 version ".tar.gz"))
12327 (file-name (string-append name "-" version ".tar.gz"))
12328 (sha256
12329 (base32
12330 "1gqzlm0rb55fdpsy5ipkganlx9cnpi454fqyycr03jm22zql14ay"))))
12331 (build-system python-build-system)
12332 (arguments
12333 `(#:phases
12334 (modify-phases %standard-phases
12335 (replace 'check
12336 (lambda* (#:key inputs outputs #:allow-other-keys)
12337 (substitute* "Makefile"
12338 (("flake8 flasgger --ignore=F403")
12339 "flake8 flasgger --ignore=E731,F403"))
12340 (setenv "PYTHONPATH" (string-append (getcwd)
12341 ":"
12342 (getenv "PYTHONPATH")))
12343 (zero? (system* "py.test")))))))
12344 (propagated-inputs
12345 `(("python-flask" ,python-flask)
12346 ("python-pyyaml" ,python-pyyaml)
12347 ("python-jsonschema" ,python-jsonschema)
12348 ("python-mistune" ,python-mistune)
12349 ("python-six" ,python-six)))
12350 (native-inputs
12351 `(("python-decorator" ,python-decorator)
12352 ("python-flake8" ,python-flake8)
12353 ("python-flask-restful" ,python-flask-restful)
12354 ("python-flex" ,python-flex)
12355 ("python-pytest" ,python-pytest)
12356 ("python-pytest-cov" ,python-pytest-cov)
12357 ("python-marshmallow" ,python-marshmallow)
12358 ("python-apispec" ,python-apispec)))
12359 (home-page "https://github.com/rochacbruno/flasgger/")
12360 (synopsis "Extract Swagger specs from your Flask project")
12361 (description "@code{python-flasgger} allows extracting Swagger specs
12362from your Flask project. It is a fork of Flask-Swagger.")
12363 (license license:expat)))
12364
12365(define-public python2-flasgger
12366 (package-with-python2 python-flasgger))
12367
12368(define-public python-swagger-spec-validator
12369 (package
12370 (name "python-swagger-spec-validator")
12371 (version "2.1.0")
12372 (source
12373 (origin
12374 (method url-fetch)
12375 (uri (pypi-uri "swagger-spec-validator" version))
12376 (sha256
12377 (base32
12378 "13hkpn2lycwr0468yqhjb3kwszqf7hjwlq61w7vdxq1caz31k4nw"))))
12379 (build-system python-build-system)
12380 (propagated-inputs
12381 `(("python-jsonschema" ,python-jsonschema)
12382 ("python-six" ,python-six)))
12383 (home-page
12384 "https://github.com/Yelp/swagger_spec_validator")
12385 (synopsis "Validation of Swagger specifications")
12386 (description "@code{swagger_spec_validator} provides a library for
12387validating Swagger API specifications.")
12388 (license license:asl2.0)))
12389
12390(define-public python2-swagger-spec-validator
12391 (package-with-python2 python-swagger-spec-validator))
12392
12393(define-public python-apache-libcloud
12394 (package
12395 (name "python-apache-libcloud")
12396 (version "2.4.0")
12397 (source
12398 (origin
12399 (method url-fetch)
12400 (uri (pypi-uri "apache-libcloud" version))
12401 (sha256
12402 (base32
12403 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
12404 (build-system python-build-system)
12405 (arguments
12406 `(#:phases
12407 (modify-phases %standard-phases
12408 (add-after 'unpack 'patch-ssh
12409 (lambda* (#:key inputs #:allow-other-keys)
12410 (substitute* "libcloud/compute/ssh.py"
12411 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
12412 "/bin/ssh" "'")))
12413 #t))
12414 (add-after 'unpack 'patch-tests
12415 (lambda _
12416 (substitute* "./libcloud/test/test_file_fixtures.py"
12417 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
12418 (("def _ascii") "def _raw_data(self, method, url, body, headers):
12419 return (httplib.OK,
12420 \"1234abcd\",
12421 {\"test\": \"value\"},
12422 httplib.responses[httplib.OK])
12423 def _ascii"))
12424 (substitute* "libcloud/test/compute/test_ssh_client.py"
12425 (("class ShellOutSSHClientTests")
12426 "@unittest.skip(\"Guix container doesn't have ssh service\")
12427class ShellOutSSHClientTests")
12428 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
12429 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
12430 (("'.xF0', '.x90', '.x8D', '.x88'")
12431 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
12432 #t))
12433 (add-before 'check 'copy-secret
12434 (lambda _
12435 (copy-file "libcloud/test/secrets.py-dist"
12436 "libcloud/test/secrets.py")
12437 #t)))))
12438 (inputs
12439 `(("openssh" ,openssh)))
12440 (propagated-inputs
12441 `(("python-paramiko" ,python-paramiko)
12442 ("python-requests" ,python-requests)))
12443 (native-inputs
12444 `(("python-lockfile" ,python-lockfile)
12445 ("python-mock" ,python-mock)
12446 ("python-pytest" ,python-pytest)
12447 ("python-pytest-runner" ,python-pytest-runner)
12448 ("python-requests-mock" ,python-requests-mock)))
12449 (home-page "https://libcloud.apache.org/")
12450 (synopsis "Unified Cloud API")
12451 (description "@code{libcloud} is a Python library for interacting with
12452many of the popular cloud service providers using a unified API.")
12453 (license license:asl2.0)))
12454
12455(define-public python2-apache-libcloud
12456 (package-with-python2 python-apache-libcloud))
12457
12458(define-public python-smmap2
12459 (package
12460 (name "python-smmap2")
12461 (version "2.0.3")
12462 (source
12463 (origin
12464 (method url-fetch)
12465 (uri (pypi-uri "smmap2" version))
12466 (sha256
12467 (base32
12468 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
12469 (build-system python-build-system)
12470 (native-inputs
12471 `(("python-nosexcover" ,python-nosexcover)))
12472 (home-page "https://github.com/Byron/smmap")
12473 (synopsis "Python sliding window memory map manager")
12474 (description "@code{smmap2} is a pure Python implementation of a sliding
12475window memory map manager.")
12476 (license license:bsd-3)))
12477
12478(define-public python2-smmap2
12479 (package-with-python2 python-smmap2))
12480
12481(define-public python-regex
12482 (package
12483 (name "python-regex")
12484 (version "2017.06.07")
12485 (source (origin
12486 (method url-fetch)
12487 (uri (pypi-uri "regex" version))
12488 (sha256
12489 (base32
12490 "06r6b7yigikbj3a72whl85r2b64pj1r0ypmw9yalmkm0wnxq8mz4"))))
12491 (build-system python-build-system)
12492 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
12493 (synopsis "Alternative regular expression module")
12494 (description "This regular expression implementation is backwards-
12495compatible with the standard @code{re} module, but offers additional
12496functionality like full case-folding for case-insensitive matches in Unicode.")
12497 (license license:psfl)))
12498
12499(define-public python2-regex
12500 (package-with-python2 python-regex))
12501
12502(define-public python2-pyopengl
12503 (package
12504 (name "python2-pyopengl")
12505 (version "3.1.0")
12506 (source
12507 (origin
12508 (method url-fetch)
12509 (uri (pypi-uri "PyOpenGL" version))
12510 (sha256
12511 (base32
12512 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
12513 (arguments
12514 `(#:python ,python-2))
12515 (build-system python-build-system)
12516 (home-page "http://pyopengl.sourceforge.net")
12517 (synopsis "Standard OpenGL bindings for Python")
12518 (description
12519 "PyOpenGL is the most common cross platform Python binding to OpenGL and
12520related APIs. The binding is created using the standard @code{ctypes}
12521library.")
12522 (license license:bsd-3)))
12523
12524(define-public python2-pyopengl-accelerate
12525 (package
12526 (inherit python2-pyopengl)
12527 (name "python2-pyopengl-accelerate")
12528 (version "3.1.0")
12529 (source
12530 (origin
12531 (method url-fetch)
12532 (uri (pypi-uri "PyOpenGL-accelerate" version))
12533 (sha256
12534 (base32
12535 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
12536 (synopsis "Acceleration code for PyOpenGL")
12537 (description
12538 "This is the Cython-coded accelerator module for PyOpenGL.")))
12539
12540(define-public python-rencode
12541 (package
12542 (name "python-rencode")
12543 (version "1.0.5")
12544 (source
12545 (origin
12546 (method url-fetch)
12547 (uri (pypi-uri "rencode" version))
12548 (sha256
12549 (base32
12550 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
12551 (build-system python-build-system)
12552 (arguments
12553 `(#:phases
12554 (modify-phases %standard-phases
12555 (add-before 'check 'delete-bogus-test
12556 ;; This test requires /home/aresch/Downloads, which is not provided by
12557 ;; the build environment.
12558 (lambda _
12559 (delete-file "rencode/t.py")
12560 #t)))))
12561 (native-inputs `(("pkg-config" ,pkg-config)
12562 ("python-cython" ,python-cython)))
12563 (home-page "https://github.com/aresch/rencode")
12564 (synopsis "Serialization of heterogeneous data structures")
12565 (description
12566 "The @code{rencode} module is a data structure serialization library,
12567similar to @code{bencode} from the BitTorrent project. For complex,
12568heterogeneous data structures with many small elements, r-encoding stake up
12569significantly less space than b-encodings. This version of rencode is a
12570complete rewrite in Cython to attempt to increase the performance over the
12571pure Python module.")
12572 (license license:bsd-3)))
12573
12574(define-public python2-rencode
12575 (package-with-python2 python-rencode))
12576
12577(define-public python-xenon
12578 (package
12579 (name "python-xenon")
12580 (version "0.5.4")
12581 (source
12582 (origin
12583 (method url-fetch)
12584 (uri (pypi-uri "xenon" version))
12585 (sha256
12586 (base32
12587 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
12588 (build-system python-build-system)
12589 (native-inputs
12590 `(("python-pyyaml" ,python-pyyaml)
12591 ("python-radon" ,python-radon)
12592 ("python-requests" ,python-requests)
12593 ("python-flake8" ,python-flake8)
12594 ("python-tox" ,python-tox)))
12595 (arguments
12596 `(#:phases
12597 (modify-phases %standard-phases
12598 (add-before 'build 'patch-test-requirements
12599 (lambda _
12600 ;; Remove httpretty dependency for tests.
12601 (substitute* "setup.py"
12602 (("httpretty") ""))
12603 #t)))))
12604 (home-page "https://xenon.readthedocs.org/")
12605 (synopsis "Monitor code metrics for Python on your CI server")
12606 (description
12607 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
12608Ideally, @code{xenon} is run every time code is committed. Through command
12609line options, various thresholds can be set for the complexity of code. It
12610will fail (i.e. it will exit with a non-zero exit code) when any of these
12611requirements is not met.")
12612 (license license:expat)))
12613
12614(define-public python2-xenon
12615 (package-with-python2 python-xenon))
12616
12617(define-public python-pysocks
12618 (package
12619 (name "python-pysocks")
12620 (version "1.6.8")
12621 (source
12622 (origin
12623 (method url-fetch)
12624 (uri (pypi-uri "PySocks" version))
12625 (sha256
12626 (base32
12627 "0wn6xafwy9c1gamwljw3fyvih5w19qy9xp39zmv8c90ai5ajrr9z"))))
12628 (build-system python-build-system)
12629 (arguments `(#:tests? #f))
12630 (home-page "https://github.com/Anorov/PySocks")
12631 (synopsis "SOCKS client module")
12632 (description "@code{pysocks} is an updated and semi-actively maintained
12633version of @code{SocksiPy} with bug fixes and extra features.")
12634 (license license:bsd-3)))
12635
12636(define-public python2-pysocks
12637 (package-with-python2 python-pysocks))
12638
12639(define-public python-pydiff
12640 (package
12641 (name "python-pydiff")
12642 (version "0.2")
12643 (source
12644 (origin
12645 (method url-fetch)
12646 (uri (pypi-uri "pydiff" version))
12647 (sha256
12648 (base32
12649 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
12650 (build-system python-build-system)
12651 (home-page "https://github.com/myint/pydiff")
12652 (synopsis "Library to diff two Python files at the bytecode level")
12653 (description
12654 "@code{pydiff} makes it easy to look for actual code changes while
12655ignoring formatting changes.")
12656 (license license:expat)))
12657
12658(define-public python2-pydiff
12659 (package-with-python2 python-pydiff))
12660
12661(define-public python-tqdm
12662 (package
12663 (name "python-tqdm")
12664 (version "4.19.6")
12665 (source
12666 (origin
12667 (method url-fetch)
12668 (uri (pypi-uri "tqdm" version))
12669 (sha256
12670 (base32
12671 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
12672 (build-system python-build-system)
12673 (native-inputs
12674 `(("python-flake8" ,python-flake8)
12675 ("python-nose" ,python-nose)
12676 ("python-coverage" ,python-coverage)))
12677 (home-page "https://github.com/tqdm/tqdm")
12678 (synopsis "Fast, extensible progress meter")
12679 (description
12680 "Make loops show a progress bar on the console by just wrapping any
12681iterable with @code{|tqdm(iterable)|}. Offers many options to define
12682design and layout.")
12683 (license (list license:mpl2.0 license:expat))))
12684
12685(define-public python2-tqdm
12686 (package-with-python2 python-tqdm))
12687
12688(define-public python-pkginfo
12689 (package
12690 (name "python-pkginfo")
12691 (version "1.4.2")
12692 (source
12693 (origin
12694 (method url-fetch)
12695 (uri (pypi-uri "pkginfo" version))
12696 (sha256
12697 (base32
12698 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
12699 (build-system python-build-system)
12700 (arguments
12701 ;; The tests are broken upstream.
12702 '(#:tests? #f))
12703 (home-page
12704 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
12705 (synopsis
12706 "Query metadatdata from sdists, bdists, and installed packages")
12707 (description
12708 "API to query the distutils metadata written in @file{PKG-INFO} inside a
12709source distriubtion (an sdist) or a binary distribution (e.g., created by
12710running bdist_egg). It can also query the EGG-INFO directory of an installed
12711distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
12712created by running @code{python setup.py develop}).")
12713 (license license:expat)))
12714
12715(define-public python2-pkginfo
12716 (package-with-python2 python-pkginfo))
12717
12718(define-public python-twine
12719 (package
12720 (name "python-twine")
12721 (version "1.9.1")
12722 (source
12723 (origin
12724 (method url-fetch)
12725 (uri (pypi-uri "twine" version))
12726 (sha256
12727 (base32
12728 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
12729 (build-system python-build-system)
12730 (propagated-inputs
12731 `(("python-tqdm" ,python-tqdm)
12732 ("python-pkginfo" ,python-pkginfo)
12733 ("python-requests" ,python-requests)
12734 ("python-requests-toolbelt" ,python-requests-toolbelt)))
12735 (home-page "https://github.com/pypa/twine")
12736 (synopsis "Collection of utilities for interacting with PyPI")
12737 (description
12738 "@code{twine} currently supports registering projects and uploading
12739distributions. It authenticates the user over HTTPS, allows them to pre-sign
12740their files and supports any packaging format (including wheels).")
12741 (license license:asl2.0)))
12742
12743(define-public python2-twine
12744 (package-with-python2 python-twine))
12745
12746(define-public python-linecache2
12747 (package
12748 (name "python-linecache2")
12749 (version "1.0.0")
12750 (source
12751 (origin
12752 (method url-fetch)
12753 (uri (pypi-uri "linecache2" version))
12754 (sha256
12755 (base32
12756 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
12757 (build-system python-build-system)
12758 (arguments
12759 `(;; The tests depend on unittest2, and our version is a bit too old.
12760 #:tests? #f))
12761 (native-inputs
12762 `(("python-pbr" ,python-pbr-minimal)))
12763 (home-page
12764 "https://github.com/testing-cabal/linecache2")
12765 (synopsis "Backports of the linecache module")
12766 (description
12767 "The linecache module allows one to get any line from any file, while
12768attempting to optimize internally, using a cache, the common case where many
12769lines are read from a single file.")
12770 (license license:psfl)))
12771
12772(define-public python2-linecache2
12773 (package-with-python2 python-linecache2))
12774
12775(define-public python-traceback2
12776 (package
12777 (name "python-traceback2")
12778 (version "1.4.0")
12779 (source
12780 (origin
12781 (method url-fetch)
12782 (uri (pypi-uri "traceback2" version))
12783 (sha256
12784 (base32
12785 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
12786 (build-system python-build-system)
12787 (arguments
12788 `(;; python-traceback2 and python-unittest2 depend on one another.
12789 #:tests? #f))
12790 (native-inputs
12791 `(("python-pbr" ,python-pbr-minimal)))
12792 (propagated-inputs
12793 `(("python-linecache2" ,python-linecache2)))
12794 (home-page
12795 "https://github.com/testing-cabal/traceback2")
12796 (synopsis "Backports of the traceback module")
12797 (description
12798 "This module provides a standard interface to extract, format and print
12799stack traces of Python programs. It exactly mimics the behavior of the Python
12800interpreter when it prints a stack trace.")
12801 (license license:psfl)))
12802
12803(define-public python2-traceback2
12804 (package-with-python2 python-traceback2))
12805
12806(define-public python-ratelimiter
12807 (package
12808 (name "python-ratelimiter")
12809 (version "1.2.0")
12810 (source
12811 (origin
12812 (method url-fetch)
12813 (uri (pypi-uri "ratelimiter" version))
12814 (sha256
12815 (base32
12816 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
12817 (build-system python-build-system)
12818 (arguments
12819 '(#:tests? #f)) ; There are no tests in the pypi archive.
12820 (home-page "https://github.com/RazerM/ratelimiter")
12821 (synopsis "Simple rate limiting object")
12822 (description
12823 "The @code{ratelimiter} module ensures that an operation will not be
12824executed more than a given number of times during a given period.")
12825 (license license:asl2.0)))
12826
12827(define-public python2-ratelimiter
12828 (package-with-python2 python-ratelimiter))
12829
12830(define-public python-dukpy
12831 (package
12832 (name "python-dukpy")
12833 (version "0.3")
12834 (source
12835 (origin
12836 (method url-fetch)
12837 (uri (string-append "https://github.com/kovidgoyal/dukpy/archive/v"
12838 version ".tar.gz"))
12839 (file-name (string-append name "-" version ".tar.gz"))
12840 (sha256
12841 (base32
12842 "0pj39rfwlzivqm5hkrsza7gssg6ggpxlq5ivc8f3h7x5pfgc6y6c"))))
12843 (build-system python-build-system)
12844 (home-page "https://github.com/kovidgoyal/dukpy")
12845 (synopsis "Run JavaScript in python")
12846 (description
12847 "dukpy is a JavaScript runtime environment for Python using the duktape
12848embeddable JavaScript engine.")
12849 ;; Dukpy is licensed under MIT like the embedded duktape library,
12850 ;; with 'errors.c' as GPL3.
12851 (license (list license:expat license:gpl3))))
12852
12853(define-public python2-dukpy
12854 (package-with-python2 python-dukpy))
12855
12856(define-public python-jsonrpclib-pelix
12857 (package
12858 (name "python-jsonrpclib-pelix")
12859 (version "0.3.2")
12860 (source
12861 (origin
12862 (method url-fetch)
12863 (uri (pypi-uri "jsonrpclib-pelix" version))
12864 (sha256
12865 (base32
12866 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
12867 (build-system python-build-system)
12868 (arguments
12869 `(#:tests? #f)) ; no tests in PyPI tarball
12870 (home-page "https://github.com/tcalmant/jsonrpclib/")
12871 (synopsis "JSON-RPC 2.0 client library for Python")
12872 (description
12873 "This library implements the JSON-RPC v2.0
12874specification (backwards-compatible) as a client library for Python. This
12875version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
12876services.")
12877 (license license:asl2.0)))
12878
12879(define-public python2-jsonrpclib-pelix
12880 (package-with-python2 python-jsonrpclib-pelix))
12881
12882(define-public python-setuptools-scm-git-archive
12883 (package
12884 (name "python-setuptools-scm-git-archive")
12885 (version "1.0")
12886 (source
12887 (origin
12888 (method url-fetch)
12889 (uri (pypi-uri "setuptools_scm_git_archive" version))
12890 (sha256
12891 (base32
12892 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
12893 (build-system python-build-system)
12894 (native-inputs
12895 `(("python-pytest" ,python-pytest)))
12896 (propagated-inputs
12897 `(("python-setuptools-scm" ,python-setuptools-scm)))
12898 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
12899 (synopsis "Setuptools_scm plugin for git archives")
12900 (description
12901 "The setuptools_scm_git_archive package is a plugin to
12902setuptools_scm, which supports obtaining versions from git archives that
12903belong to tagged versions.")
12904 (license license:expat)))
12905
12906(define-public python2-setuptools-scm-git-archive
12907 (package-with-python2 python-setuptools-scm-git-archive))
12908
12909(define-public python-pyclipper
12910 (package
12911 (name "python-pyclipper")
12912 (version "1.1.0.post1")
12913 (source
12914 (origin
12915 (method url-fetch)
12916 (uri (pypi-uri "pyclipper" version ".zip"))
12917 (sha256
12918 (base32
12919 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
12920 (modules '((guix build utils)))
12921 (snippet
12922 '(begin
12923 ;; This file is generated by Cython.
12924 (delete-file "pyclipper/pyclipper.cpp") #t))))
12925 (build-system python-build-system)
12926 (arguments
12927 `(#:phases
12928 (modify-phases %standard-phases
12929 (add-before 'build 'cythonize-sources
12930 (lambda _
12931 (with-directory-excursion "pyclipper"
12932 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
12933 (propagated-inputs
12934 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
12935 (native-inputs
12936 `(("python-cython" ,python-cython)
12937 ("python-pytest" ,python-pytest)
12938 ("python-pytest-runner" ,python-pytest-runner)
12939 ("python-unittest2" ,python-unittest2)
12940 ("unzip" ,unzip)))
12941 (home-page "https://github.com/greginvm/pyclipper")
12942 (synopsis "Wrapper for Angus Johnson's Clipper library")
12943 (description
12944 "Pyclipper is a Cython wrapper for the C++ translation of the
12945Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
12946 (license license:expat)))
12947
12948(define-public python2-pyclipper
12949 (package-with-python2 python-pyclipper))
12950
12951(define-public python2-booleanoperations
12952 (package
12953 (name "python2-booleanoperations")
12954 (version "0.7.1")
12955 (source
12956 (origin
12957 (method url-fetch)
12958 (uri (pypi-uri "booleanOperations" version ".zip"))
12959 (sha256
12960 (base32
12961 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
12962 (build-system python-build-system)
12963 (arguments
12964 `(#:python ,python-2))
12965 (native-inputs
12966 `(("unzip" ,unzip)
12967 ("python2-pytest" ,python2-pytest)
12968 ("python2-pytest-runner" ,python2-pytest-runner)))
12969 (propagated-inputs
12970 `(("python-fonttools" ,python2-fonttools)
12971 ("python-pyclipper" ,python2-pyclipper)
12972 ("python-ufolib" ,python2-ufolib)))
12973 (home-page "https://github.com/typemytype/booleanOperations")
12974 (synopsis "Boolean operations on paths")
12975 (description
12976 "BooleanOperations provides a Python library that enables
12977boolean operations on paths.")
12978 (license license:expat)))
12979
12980(define-public python-tempdir
12981 (package
12982 (name "python-tempdir")
12983 (version "0.7.1")
12984 (source
12985 (origin
12986 (method url-fetch)
12987 (uri (pypi-uri "tempdir" version))
12988 (sha256
12989 (base32
12990 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
12991 (build-system python-build-system)
12992 (home-page "https://pypi.org/project/tempdir/")
12993 (arguments
12994 ;; the package has no tests
12995 '(#:tests? #f))
12996 (synopsis "Python library for managing temporary directories")
12997 (description
12998 "This library manages temporary directories that are automatically
12999deleted with all their contents when they are no longer needed. It is
13000particularly convenient for use in tests.")
13001 (license license:expat)))
13002
13003(define-public python2-tempdir
13004 (package-with-python2 python-tempdir))
13005
13006(define-public python-activepapers
13007 (package
13008 (name "python-activepapers")
13009 (version "0.2.2")
13010 (source
13011 (origin
13012 (method url-fetch)
13013 (uri (pypi-uri "ActivePapers.Py" version))
13014 (sha256
13015 (base32
13016 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
13017 (build-system python-build-system)
13018 (arguments
13019 `(#:modules ((ice-9 ftw)
13020 (srfi srfi-1)
13021 (guix build utils)
13022 (guix build python-build-system))
13023
13024 #:phases
13025 (modify-phases %standard-phases
13026 (add-after 'unpack 'delete-python2-code
13027 (lambda _
13028 (for-each delete-file
13029 '("lib/activepapers/builtins2.py"
13030 "lib/activepapers/standardlib2.py"
13031 "lib/activepapers/utility2.py"))))
13032 (replace 'check
13033 (lambda _
13034 ;; Deactivate the test cases that download files
13035 (setenv "NO_NETWORK_ACCESS" "1")
13036 ;; For some strange reason, some tests fail if nosetests runs all
13037 ;; test modules in a single execution. They pass if each test
13038 ;; module is run individually.
13039 (for-each (lambda (filename)
13040 (invoke "nosetests"
13041 (string-append "tests/" filename)))
13042 (scandir "tests"
13043 (lambda (filename)
13044 (string-suffix? ".py" filename)))))))))
13045 (native-inputs
13046 `(("python-tempdir" ,python-tempdir)
13047 ("python-nose" ,python-nose)))
13048 (propagated-inputs
13049 `(("python-h5py" ,python-h5py)))
13050 (home-page "http://www.activepapers.org/")
13051 (synopsis "Executable papers for scientific computing")
13052 (description
13053 "ActivePapers is a tool for working with executable papers, which
13054combine data, code, and documentation in single-file packages,
13055suitable for publication as supplementary material or on repositories
13056such as figshare or Zenodo.")
13057 (properties `((python2-variant . ,(delay python2-activepapers))))
13058 (license license:bsd-3)))
13059
13060(define-public python2-activepapers
13061 (let ((base (package-with-python2
13062 (strip-python2-variant python-activepapers))))
13063 (package
13064 (inherit base)
13065 (arguments
13066 (substitute-keyword-arguments (package-arguments base)
13067 ((#:phases phases)
13068 `(modify-phases ,phases
13069 (delete 'delete-python2-code)
13070 (add-after 'unpack 'delete-python3-code
13071 (lambda _
13072 (for-each delete-file
13073 '("lib/activepapers/builtins3.py"
13074 "lib/activepapers/standardlib3.py"
13075 "lib/activepapers/utility3.py")))))))))))
13076
13077(define-public python-semver
13078 (package
13079 (name "python-semver")
13080 (version "2.7.9")
13081 (source
13082 (origin
13083 (method url-fetch)
13084 (uri (pypi-uri "semver" version))
13085 (sha256
13086 (base32
13087 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
13088 (build-system python-build-system)
13089 (arguments
13090 `(#:phases
13091 (modify-phases %standard-phases
13092 (add-after 'unpack 'patch-test-requirements
13093 (lambda _
13094 (substitute* "setup.py"
13095 ;; Our Python is new enough.
13096 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
13097 #t)))))
13098 (native-inputs
13099 `(("python-tox" ,python-tox)
13100 ("python-virtualenv" ,python-virtualenv)))
13101 (home-page "https://github.com/k-bx/python-semver")
13102 (synopsis "Python helper for Semantic Versioning")
13103 (description "This package provides a Python library for
13104@url{Semantic Versioning, http://semver.org/}.")
13105 (license license:bsd-3)))
13106
13107(define-public python2-semver
13108 (package-with-python2 python-semver))
13109
13110(define-public python-pyro4
13111 (package
13112 (name "python-pyro4")
13113 (version "4.74")
13114 (source
13115 (origin
13116 (method url-fetch)
13117 (uri (pypi-uri "Pyro4" version))
13118 (sha256
13119 (base32
13120 "0pzp7c6q3vvkxq0wy9lr6wd5wky40sajz69g697i5rb2q497pvc9"))))
13121 (build-system python-build-system)
13122 (propagated-inputs
13123 `(("python-serpent" ,python-serpent)))
13124 (home-page "https://pyro4.readthedocs.io")
13125 (synopsis "Distributed object middleware for Python")
13126 (description
13127 "Pyro enables you to build applications in which objects can talk to each
13128other over the network. You can just use normal Python method calls to call
13129objects on other machines, also known as remote procedure calls (RPC).")
13130 (license license:expat)))
13131
13132(define-public python2-pyro
13133 (package
13134 (name "python2-pyro")
13135 (version "3.16")
13136 (source
13137 (origin
13138 (method url-fetch)
13139 (uri (pypi-uri "Pyro" version))
13140 (file-name (string-append "Pyro-" version ".tar.gz"))
13141 (sha256
13142 (base32
13143 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
13144 (build-system python-build-system)
13145 (arguments
13146 ;; Pyro is not compatible with Python 3
13147 `(#:python ,python-2
13148 ;; Pyro has no test cases for automatic execution
13149 #:tests? #f))
13150 (home-page "http://pythonhosted.org/Pyro/")
13151 (synopsis "Distributed object manager for Python")
13152 (description "Pyro is a Distributed Object Technology system
13153written in Python that is designed to be easy to use. It resembles
13154Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
13155which is a system and language independent Distributed Object Technology
13156and has much more to offer than Pyro or RMI. Pyro 3.x is no
13157longer maintained. New projects should use Pyro4 instead, which
13158is the new Pyro version that is actively developed.")
13159 (license license:expat)))
13160
13161(define-public python2-scientific
13162 (package
13163 (name "python2-scientific")
13164 (version "2.9.4")
13165 (source
13166 (origin
13167 (method url-fetch)
13168 (uri (string-append "https://bitbucket.org/khinsen/"
13169 "scientificpython/downloads/ScientificPython-"
13170 version ".tar.gz"))
13171 (file-name (string-append "ScientificPython-" version ".tar.gz"))
13172 (sha256
13173 (base32
13174 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
13175 (build-system python-build-system)
13176 (inputs
13177 `(("netcdf" ,netcdf)))
13178 (propagated-inputs
13179 `(("python-numpy" ,python2-numpy-1.8)
13180 ("python-pyro" ,python2-pyro)))
13181 (arguments
13182 ;; ScientificPython is not compatible with Python 3
13183 `(#:python ,python-2
13184 #:tests? #f ; No test suite
13185 #:phases
13186 (modify-phases %standard-phases
13187 (replace 'build
13188 (lambda* (#:key inputs #:allow-other-keys)
13189 (zero? (system* "python" "setup.py" "build"
13190 (string-append "--netcdf_prefix="
13191 (assoc-ref inputs "netcdf")))))))))
13192 (home-page "https://bitbucket.org/khinsen/scientificpython")
13193 (synopsis "Python modules for scientific computing")
13194 (description "ScientificPython is a collection of Python modules that are
13195useful for scientific computing. Most modules are rather general (Geometry,
13196physical units, automatic derivatives, ...) whereas others are more
13197domain-specific (e.g. netCDF and PDB support). The library is currently
13198not actively maintained and works only with Python 2 and NumPy < 1.9.")
13199 (license license:cecill-c)))
13200
13201(define-public python2-mmtk
13202 (package
13203 (name "python2-mmtk")
13204 (version "2.7.11")
13205 (source
13206 (origin
13207 (method url-fetch)
13208 (uri (string-append "https://bitbucket.org/khinsen/"
13209 "mmtk/downloads/MMTK-" version ".tar.gz"))
13210 (file-name (string-append "MMTK-" version ".tar.gz"))
13211 (sha256
13212 (base32
13213 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
13214 (build-system python-build-system)
13215 (native-inputs
13216 `(("netcdf" ,netcdf)))
13217 (propagated-inputs
13218 `(("python-scientific" ,python2-scientific)
13219 ("python-tkinter" ,python-2 "tk")))
13220 (arguments
13221 `(#:python ,python-2
13222 #:tests? #f
13223 #:phases
13224 (modify-phases %standard-phases
13225 (add-before 'build 'includes-from-scientific
13226 (lambda* (#:key inputs #:allow-other-keys)
13227 (mkdir-p "Include/Scientific")
13228 (copy-recursively
13229 (string-append
13230 (assoc-ref inputs "python-scientific")
13231 "/include/python2.7/Scientific")
13232 "Include/Scientific"))))))
13233 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
13234 (synopsis "Python library for molecular simulation")
13235 (description "MMTK is a library for molecular simulations with an emphasis
13236on biomolecules. It provides widely used methods such as Molecular Dynamics
13237and normal mode analysis, but also basic routines for implementing new methods
13238for simulation and analysis. The library is currently not actively maintained
13239and works only with Python 2 and NumPy < 1.9.")
13240 (license license:cecill-c)))
13241
13242(define-public python-phonenumbers
13243 (package
13244 (name "python-phonenumbers")
13245 (version "8.9.1")
13246 (source
13247 (origin
13248 (method url-fetch)
13249 (uri (pypi-uri "phonenumbers" version))
13250 (sha256
13251 (base32
13252 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
13253 (build-system python-build-system)
13254 (home-page
13255 "https://github.com/daviddrysdale/python-phonenumbers")
13256 (synopsis
13257 "Python library for dealing with international phone numbers")
13258 (description
13259 "This package provides a Python port of Google's libphonenumber library.")
13260 (license license:asl2.0)))
13261
13262(define-public python2-phonenumbers
13263 (package-with-python2 python-phonenumbers))
13264
13265(define-public python-send2trash
13266 (package
13267 (name "python-send2trash")
13268 (version "1.4.2")
13269 (source
13270 (origin (method url-fetch)
13271 ;; Source tarball on PyPI doesn't include tests.
13272 (uri (string-append "https://github.com/hsoft/send2trash/archive/"
13273 version ".tar.gz"))
13274 (file-name (string-append name "-" version ".tar.gz"))
13275 (sha256
13276 (base32
13277 "0ffyhwjyx61slkdy38iwjc4gmj7fj9gs2q58f075gwvq630pzm9z"))))
13278 (build-system python-build-system)
13279 (arguments
13280 '(#:phases
13281 (modify-phases %standard-phases
13282 (add-before 'check 'pre-check
13283 (lambda _
13284 (mkdir-p "/tmp/foo")
13285 (setenv "HOME" "/tmp/foo")
13286 #t)))))
13287 (home-page "https://github.com/hsoft/send2trash")
13288 (synopsis "Send files to the user's @file{~/Trash} directory")
13289 (description "This package provides a Python library to send files to the
13290user's @file{~/Trash} directory.")
13291 (license license:bsd-3)))
13292
13293(define-public python2-send2trash
13294 (package
13295 (inherit (package-with-python2 python-send2trash))
13296 (arguments
13297 (substitute-keyword-arguments (package-arguments python-send2trash)
13298 ((#:phases phases)
13299 `(modify-phases ,phases
13300 (add-before 'check 'setenv
13301 (lambda _
13302 (setenv "PYTHONPATH"
13303 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
13304 #t))))))
13305 (properties `((python2-variant . ,(delay python-send2trash))))))
13306
13307(define-public python-yapf
13308 (package
13309 (name "python-yapf")
13310 (version "0.24.0")
13311 (source
13312 (origin
13313 (method url-fetch)
13314 (uri (pypi-uri "yapf" version))
13315 (sha256
13316 (base32
13317 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
13318 (build-system python-build-system)
13319 (home-page "https://github.com/google/yapf")
13320 (synopsis "Formatter for Python code")
13321 (description "YAPF is a formatter for Python code. It's based off of
13322@dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
13323takes the code and reformats it to the best formatting that conforms to the
13324style guide, even if the original code didn't violate the style guide.")
13325 (license license:asl2.0)))
13326
13327(define-public python2-yapf
13328 (package-with-python2 python-yapf))
13329
13330(define-public python-gyp
13331 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
13332 (revision "0"))
13333 (package
13334 (name "python-gyp")
13335 ;; Google does not release versions,
13336 ;; based on second most recent commit date.
13337 (version (git-version "0.0.0" revision commit))
13338 (source
13339 (origin
13340 ;; Google does not release tarballs,
13341 ;; git checkout is needed.
13342 (method git-fetch)
13343 (uri (git-reference
13344 (url "https://chromium.googlesource.com/external/gyp")
13345 (commit commit)))
13346 (file-name (git-file-name name version))
13347 (sha256
13348 (base32
13349 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
13350 (build-system python-build-system)
13351 (home-page "https://gyp.gsrc.io/")
13352 (synopsis "GYP is a Meta-Build system")
13353 (description
13354 "GYP builds build systems for large, cross platform applications.
13355It can be used to generate XCode projects, Visual Studio projects, Ninja build
13356files, and Makefiles.")
13357 (license license:bsd-3))))
13358
13359(define-public python2-gyp
13360 (package-with-python2 python-gyp))
13361
13362(define-public python-whatever
13363 (package
13364 (name "python-whatever")
13365 (version "0.5")
13366 (source
13367 (origin
13368 (method url-fetch)
13369 (uri (string-append "https://github.com/Suor/whatever/archive/" version
13370 ".tar.gz"))
13371 (sha256
13372 (base32
13373 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
13374 (file-name (string-append name "-" version ".tar.gz"))))
13375 (build-system python-build-system)
13376 (arguments
13377 `(#:phases
13378 (modify-phases %standard-phases
13379 (replace 'check
13380 (lambda _
13381 (invoke "py.test"))))))
13382 (native-inputs
13383 `(("python-pytest" ,python-pytest)))
13384 (home-page "http://github.com/Suor/whatever")
13385 (synopsis "Make anonymous functions by partial application of operators")
13386 (description "@code{whatever} provides an easy way to make anonymous
13387functions by partial application of operators.")
13388 (license license:bsd-3)))
13389
13390(define-public python2-whatever
13391 (package-with-python2 python-whatever))
13392
13393(define-public python-funcy
13394 (package
13395 (name "python-funcy")
13396 (version "1.10")
13397 (source
13398 (origin
13399 (method url-fetch)
13400 (uri (string-append "https://github.com/Suor/funcy/archive/" version
13401 ".tar.gz"))
13402 (sha256
13403 (base32
13404 "1fanxivsip29vgarw6dn39xym3q4pbxcpa11plpp548lvxajpahz"))
13405 (file-name (string-append name "-" version ".tar.gz"))))
13406 (build-system python-build-system)
13407 (arguments
13408 `(#:phases
13409 (modify-phases %standard-phases
13410 (replace 'check
13411 (lambda _
13412 (invoke "py.test"))))))
13413 (native-inputs
13414 `(("python-pytest" ,python-pytest)
13415 ("python-whatever" ,python-whatever)))
13416 (home-page "http://github.com/Suor/funcy")
13417 (synopsis "Functional tools")
13418 (description "@code{funcy} is a library that provides functional tools.
13419Examples are:
13420@enumerate
13421@item merge - Merges collections of the same type
13422@item walk - Type-preserving map
13423@item select - Selects a part of a collection
13424@item take - Takes the first n items of a collection
13425@item first - Takes the first item of a collection
13426@item remove - Predicated-removes items of a collection
13427@item concat - Concatenates two collections
13428@item flatten - Flattens a collection with subcollections
13429@item distinct - Returns only distinct items
13430@item split - Predicated-splits a collection
13431@item split_at - Splits a collection at a given item
13432@item group_by - Groups items by group
13433@item pairwise - Pairs off adjacent items
13434@item partial - Partially-applies a function
13435@item curry - Curries a function
13436@item compose - Composes functions
13437@item complement - Complements a predicate
13438@item all_fn - \"all\" with predicate
13439@end enumerate")
13440 (license license:bsd-3)))
13441
13442(define-public python2-funcy
13443 (package-with-python2 python-funcy))
13444
13445(define-public python-isoweek
13446 (package
13447 (name "python-isoweek")
13448 (version "1.3.3")
13449 (source
13450 (origin
13451 (method url-fetch)
13452 (uri (pypi-uri "isoweek" version))
13453 (sha256
13454 (base32
13455 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
13456 (build-system python-build-system)
13457 (home-page "https://github.com/gisle/isoweek")
13458 (synopsis "Objects representing a week")
13459 (description "The @code{isoweek} module provide the class Week that
13460implements the week definition of ISO 8601. This standard also defines
13461a notation for identifying weeks; yyyyWww (where the W is a literal).
13462Week instances stringify to this form.")
13463 (license license:bsd-3)))
13464
13465(define-public python2-isoweek
13466 (package-with-python2 python-isoweek))
13467
13468(define-public python-tokenize-rt
13469 (package
13470 (name "python-tokenize-rt")
13471 (version "2.0.1")
13472 (source
13473 (origin
13474 (method url-fetch)
13475 (uri (pypi-uri "tokenize-rt" version))
13476 (sha256
13477 (base32
13478 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
13479 (build-system python-build-system)
13480 (home-page "https://github.com/asottile/tokenize-rt")
13481 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
13482 (description
13483 "This Python library is a wrapper around @code{tokenize} from the Python
13484standard library. It provides two additional tokens @code{ESCAPED_NL} and
13485@code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
13486and @code{tokens_to_src} to roundtrip.")
13487 (license license:expat)))
13488
13489(define-public python-future-fstrings
13490 (package
13491 (name "python-future-fstrings")
13492 (version "0.4.1")
13493 (source
13494 (origin
13495 (method url-fetch)
13496 (uri (pypi-uri "future_fstrings" version))
13497 (sha256
13498 (base32
13499 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
13500 (build-system python-build-system)
13501 (propagated-inputs
13502 `(("python-tokenize-rt" ,python-tokenize-rt)))
13503 (home-page "https://github.com/asottile/future-fstrings")
13504 (synopsis "Backport of fstrings to Python < 3.6")
13505 (description
13506 "This package provides a UTF-8 compatible encoding
13507@code{future_fstrings}, which performs source manipulation. It decodes the
13508source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
13509@code{f} strings.")
13510 (license license:expat)))
13511
13512(define-public python-typing
13513 (package
13514 (name "python-typing")
13515 (version "3.6.6")
13516 (source
13517 (origin
13518 (method url-fetch)
13519 (uri (pypi-uri "typing" version))
13520 (sha256
13521 (base32
13522 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
13523 (build-system python-build-system)
13524 (home-page "https://docs.python.org/3/library/typing.html")
13525 (synopsis "Type hints for Python")
13526 (description "This is a backport of the standard library @code{typing}
13527module to Python versions older than 3.5. Typing defines a standard notation
13528for Python function and variable type annotations. The notation can be used
13529for documenting code in a concise, standard format, and it has been designed
13530to also be used by static and runtime type checkers, static analyzers, IDEs
13531and other tools.")
13532 (license license:psfl)))
13533
13534(define-public python2-typing
13535 (package-with-python2 python-typing))
13536
13537(define-public bpython
13538 (package
13539 (name "bpython")
13540 (version "0.17.1")
13541 (source
13542 (origin
13543 (method url-fetch)
13544 (uri (pypi-uri "bpython" version))
13545 (sha256
13546 (base32
13547 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
13548 (build-system python-build-system)
13549 (arguments
13550 `(#:phases
13551 (modify-phases %standard-phases
13552 (add-after 'unpack 'remove-failing-test
13553 (lambda _
13554 ;; Remove failing test. FIXME: make it pass
13555 (delete-file "bpython/test/test_args.py")
13556 #t))
13557 (add-after 'wrap 'add-aliases
13558 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
13559 (lambda* (#:key outputs #:allow-other-keys)
13560 (let ((out (assoc-ref outputs "out")))
13561 (for-each
13562 (lambda (old new)
13563 (symlink old (string-append out "/bin/" new)))
13564 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
13565 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
13566 #t)))))
13567 (propagated-inputs
13568 `(("python-pygments" ,python-pygments)
13569 ("python-requests" ,python-requests)
13570 ("python-babel" ,python-babel) ; optional, for internationalization
13571 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
13572 ("python-greenlet" ,python-greenlet)
13573 ("python-urwid" ,python-urwid) ; for bpython-urwid only
13574 ("python-six" ,python-six)))
13575 (native-inputs
13576 `(("python-sphinx" ,python-sphinx)
13577 ("python-mock" ,python-mock)))
13578 (home-page "https://bpython-interpreter.org/")
13579 (synopsis "Fancy interface to the Python interpreter")
13580 (description "Bpython is a fancy interface to the Python
13581interpreter. bpython's main features are
13582
13583@enumerate
13584@item in-line syntax highlighting,
13585@item readline-like autocomplete with suggestions displayed as you type,
13586@item expected parameter list for any Python function,
13587@item \"rewind\" function to pop the last line of code from memory and
13588 re-evaluate,
13589@item send the code you've entered off to a pastebin,
13590@item save the code you've entered to a file, and
13591@item auto-indentation.
13592@end enumerate")
13593 (license license:expat)))
13594
13595(define-public bpython2
13596 (let ((base (package-with-python2
13597 (strip-python2-variant bpython))))
13598 (package (inherit base)
13599 (name "bpython2")
13600 (arguments
13601 `(#:python ,python-2
13602 #:phases
13603 (modify-phases %standard-phases
13604 (add-after 'unpack 'remove-failing-test
13605 (lambda _
13606 ;; Remove failing test. FIXME: make it pass
13607 (delete-file "bpython/test/test_args.py")
13608 ;; Disable failing test-cases (renaming inhibits they are
13609 ;; discovered)
13610 (substitute* "bpython/test/test_curtsies_repl.py"
13611 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
13612 (string-append a "xxx_off_" b))
13613 (("^(\\s*def )(test_complex\\W)" _ a b)
13614 (string-append a "xxx_off_" b)))
13615 #t))
13616 (add-before 'build 'rename-scripts
13617 ;; rename the scripts to bypthon2, bpdb2, etc.
13618 (lambda _
13619 (substitute* "setup.py"
13620 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
13621 (string-append name "2" rest "\n"))
13622 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
13623 (string-append name "2" (or sub "") rest "\n")))
13624 #t))))))))
13625
13626(define-public python-pyinotify
13627 (package
13628 (name "python-pyinotify")
13629 (version "0.9.6")
13630 (source (origin
13631 (method url-fetch)
13632 (uri (pypi-uri "pyinotify" version))
13633 (sha256
13634 (base32
13635 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
13636 (build-system python-build-system)
13637 (arguments `(#:tests? #f)) ;no tests
13638 (home-page "https://github.com/seb-m/pyinotify")
13639 (synopsis "Python library for monitoring inotify events")
13640 (description
13641 "@code{pyinotify} provides a Python interface for monitoring
13642file system events on Linux.")
13643 (license license:expat)))
13644
13645(define-public python2-pyinotify
13646 (package-with-python2 python-pyinotify))
13647
13648;; Ada parser uses this version.
13649(define-public python2-quex-0.67.3
13650 (package
13651 (name "python2-quex")
13652 (version "0.67.3")
13653 (source
13654 (origin
13655 (method url-fetch)
13656 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
13657 (version-major+minor version)
13658 "/quex-" version ".zip"))
13659 (sha256
13660 (base32
13661 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
13662 (build-system python-build-system)
13663 (native-inputs
13664 `(("unzip" ,unzip)))
13665 (arguments
13666 `(#:python ,python-2
13667 #:tests? #f
13668 #:phases
13669 (modify-phases %standard-phases
13670 (delete 'configure)
13671 (delete 'build)
13672 (replace 'install
13673 (lambda* (#:key outputs #:allow-other-keys)
13674 (let* ((out (assoc-ref outputs "out"))
13675 (share/quex (string-append out "/share/quex"))
13676 (bin (string-append out "/bin")))
13677 (copy-recursively "." share/quex)
13678 (mkdir-p bin)
13679 (symlink (string-append share/quex "/quex-exe.py")
13680 (string-append bin "/quex"))
13681 #t))))))
13682 (native-search-paths
13683 (list (search-path-specification
13684 (variable "QUEX_PATH")
13685 (files '("share/quex")))))
13686 (home-page "http://quex.sourceforge.net/")
13687 (synopsis "Lexical analyzer generator in Python")
13688 (description "@code{quex} is a lexical analyzer generator in Python.")
13689 (license license:lgpl2.1+))) ; Non-military
13690
13691(define-public python2-quex
13692 (package (inherit python2-quex-0.67.3)
13693 (name "python2-quex")
13694 (version "0.68.1")
13695 (source
13696 (origin
13697 (method url-fetch)
13698 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
13699 (sha256
13700 (base32
13701 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
13702 (file-name (string-append name "-" version ".tar.gz"))))))
13703
13704(define-public python-more-itertools
13705 (package
13706 (name "python-more-itertools")
13707 (version "4.3.0")
13708 (source
13709 (origin
13710 (method url-fetch)
13711 (uri (pypi-uri "more-itertools" version))
13712 (sha256
13713 (base32
13714 "17h3na0rdh8xq30w4b9pizgkdxmm51896bxw600x84jflg9vaxn4"))))
13715 (build-system python-build-system)
13716 (arguments
13717 `(,@(if (any (cute string-prefix? <> (or (%current-system)
13718 (%current-target-system)))
13719 '("armhf" "i686"))
13720 '(#:phases
13721 (modify-phases %standard-phases
13722 ;; This is required for 32-bit hardware.
13723 ;; TODO: Try to remove this when upgrading.
13724 (add-after 'unpack 'patch-test
13725 (lambda _
13726 (substitute* "more_itertools/tests/test_more.py"
13727 (("10 \\*\\* 10") "9 ** 9"))
13728 #t))))
13729 '())))
13730 (propagated-inputs
13731 `(("python-six" ,python-six-bootstrap)))
13732 (home-page "https://github.com/erikrose/more-itertools")
13733 (synopsis "More routines for operating on iterables, beyond itertools")
13734 (description "Python's built-in @code{itertools} module implements a
13735number of iterator building blocks inspired by constructs from APL, Haskell,
13736and SML. @code{more-itertools} includes additional building blocks for
13737working with iterables.")
13738 (license license:expat)))
13739
13740(define-public python2-more-itertools
13741 (package-with-python2 python-more-itertools))
13742
13743(define-public python-latexcodec
13744 (package
13745 (name "python-latexcodec")
13746 (version "1.0.5")
13747 (source
13748 (origin
13749 (method url-fetch)
13750 (uri (pypi-uri "latexcodec" version))
13751 (sha256
13752 (base32
13753 "0zdd1gf24i83ykadx0y30n3001j43scqr2saql3vckk5c39dj1wn"))))
13754 (build-system python-build-system)
13755 (inputs
13756 `(("python-six" ,python-six)))
13757 (home-page "https://readthedocs.org/projects/latexcodec/")
13758 (synopsis "Work with LaTeX code in Python")
13759 (description "Lexer and codec to work with LaTeX code in Python.")
13760 (license license:expat)))
13761
13762(define-public python-pybtex
13763 (package
13764 (name "python-pybtex")
13765 (version "0.21")
13766 (source
13767 (origin
13768 (method url-fetch)
13769 (uri (pypi-uri "pybtex" version))
13770 (sha256
13771 (base32
13772 "00300j8dn5pxq4ndxmfmbmycg2znawkqs49val2x6jlmfiy6r2mg"))))
13773 (build-system python-build-system)
13774 (native-inputs
13775 `(("python-nose" ,python-nose)))
13776 (inputs
13777 `(("python-latexcodec" ,python-latexcodec)
13778 ("python-pyyaml" ,python-pyyaml)
13779 ("python-six" ,python-six)))
13780 (arguments
13781 `(#:test-target "nosetests"))
13782 (home-page "https://pybtex.org/")
13783 (synopsis "BibTeX-compatible bibliography processor")
13784 (description "Pybtex is a BibTeX-compatible bibliography processor written
13785in Python. You can simply type pybtex instead of bibtex.")
13786 (license license:expat)))
13787
13788(define-public python-onetimepass
13789 (package
13790 (name "python-onetimepass")
13791 (version "1.0.1")
13792 (source
13793 (origin
13794 (method url-fetch)
13795 (uri (pypi-uri "onetimepass" version))
13796 (sha256
13797 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
13798 (build-system python-build-system)
13799 (propagated-inputs `(("python-six" ,python-six)))
13800 (home-page "https://github.com/tadeck/onetimepass/")
13801 (synopsis "One-time password library")
13802 (description "Python one-time password library for HMAC-based (HOTP) and
13803time-based (TOTP) passwords.")
13804 (license license:expat)))
13805
13806(define-public python-parso
13807 (package
13808 (name "python-parso")
13809 (version "0.3.1")
13810 (source
13811 (origin
13812 (method url-fetch)
13813 (uri (pypi-uri "parso" version))
13814 (sha256
13815 (base32
13816 "18p89iwcm8mnf380f92g9w0bhx5km8wxp392vvjcq4y1ld1llw1m"))))
13817 (native-inputs
13818 `(("python-pytest" ,python-pytest)))
13819 (build-system python-build-system)
13820 (home-page "https://github.com/davidhalter/parso")
13821 (synopsis "Python Parser")
13822 (description "Parso is a Python parser that supports error recovery and
13823round-trip parsing for different Python versions (in multiple Python versions).
13824Parso is also able to list multiple syntax errors in your Python file.")
13825 (license license:expat)))
13826
13827(define-public python2-parso
13828 (package-with-python2 python-parso))
13829
13830(define-public python-async-generator
13831 (package
13832 (name "python-async-generator")
13833 (version "1.9")
13834 (source
13835 (origin
13836 (method url-fetch)
13837 (uri (pypi-uri "async_generator" version))
13838 (sha256
13839 (base32
13840 "0wc3hidz1q85cja93k5pzybn0fprfnqyrv4qlkdqdzklc5f4dmdp"))))
13841 (build-system python-build-system)
13842 (native-inputs
13843 `(("python-pytest" ,python-pytest)))
13844 (home-page "https://github.com/python-trio/async_generator")
13845 (synopsis "Async generators and context managers for Python 3.5+")
13846 (description "@code{async_generator} back-ports Python 3.6's native async
13847generators and Python 3.7's context managers into Python 3.5.")
13848 ;; Dual licensed.
13849 (license (list license:expat license:asl2.0))))
13850
13851(define-public python-async-timeout
13852 (package
13853 (name "python-async-timeout")
13854 (version "3.0.1")
13855 (source
13856 (origin
13857 (method url-fetch)
13858 (uri (pypi-uri "async-timeout" version))
13859 (sha256
13860 (base32
13861 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
13862 (build-system python-build-system)
13863 (home-page "https://github.com/aio-libs/async_timeout/")
13864 (synopsis "Timeout context manager for asyncio programs")
13865 (description "@code{async-timeout} provides a timeout timeout context
13866manager compatible with @code{asyncio}.")
13867 (license license:asl2.0)))
13868
13869(define-public python-glob2
13870 (package
13871 (name "python-glob2")
13872 (version "0.6")
13873 (source (origin
13874 (method url-fetch)
13875 (uri (string-append
13876 "https://github.com/miracle2k/python-glob2/archive/"
13877 version
13878 ".tar.gz"))
13879 (sha256
13880 (base32
13881 "0ja168f0dz4kbz4m06dm0rd3acaypk6hjx2km541pw22y9s40mag"))
13882 (file-name (string-append name "-" version ".tar.gz"))))
13883 (build-system python-build-system)
13884 (home-page "https://github.com/miracle2k/python-glob2/")
13885 (synopsis "Extended Version of the python buildin glob module")
13886 (description "This is an extended version of the Python
13887@url{http://docs.python.org/library/glob.html, built-in glob module} which
13888adds:
13889
13890@itemize
13891@item The ability to capture the text matched by glob patterns, and return
13892those matches alongside the file names.
13893@item A recursive @code{**} globbing syntax, akin for example to the
13894@code{globstar} option of Bash.
13895@item The ability to replace the file system functions used, in order to glob
13896on virtual file systems.
13897@item Compatible with Python 2 and Python 3 (tested with 3.3).
13898@end itemize
13899
13900Glob2 currently based on the glob code from Python 3.3.1.")
13901 (license license:bsd-2)))
13902
13903(define-public python2-glob2
13904 (package-with-python2 python-glob2))
13905
13906(define-public python-gipc
13907 (package
13908 (name "python-gipc")
13909 (version "0.6.0")
13910 (source
13911 (origin
13912 (method url-fetch)
13913 (uri (pypi-uri "gipc" version ".zip"))
13914 (sha256
13915 (base32
13916 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
13917 (build-system python-build-system)
13918 (native-inputs
13919 `(("unzip" ,unzip)))
13920 (propagated-inputs
13921 `(("python-gevent" ,python-gevent)))
13922 (home-page "http://gehrcke.de/gipc")
13923 (synopsis "Child process management in the context of gevent")
13924 (description "Usage of Python's multiprocessing package in a
13925gevent-powered application may raise problems. With @code{gipc},
13926process-based child processes can safely be created anywhere within a
13927gevent-powered application.")
13928 (license license:expat)))
13929
13930(define-public python2-gipc
13931 (package-with-python2 python-gipc))
13932
13933(define-public python-fusepy
13934 (package
13935 (name "python-fusepy")
13936 (version "2.0.4")
13937 (source
13938 (origin
13939 (method url-fetch)
13940 (uri (pypi-uri "fusepy" version))
13941 (sha256
13942 (base32
13943 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
13944 (build-system python-build-system)
13945 (arguments
13946 `(#:phases
13947 (modify-phases %standard-phases
13948 (add-before 'build 'set-library-file-name
13949 (lambda* (#:key inputs #:allow-other-keys)
13950 (let ((fuse (assoc-ref inputs "fuse")))
13951 (substitute* "fuse.py"
13952 (("find_library\\('fuse'\\)")
13953 (string-append "'" fuse "/lib/libfuse.so'")))
13954 #t))))))
13955 (propagated-inputs
13956 `(("fuse" ,fuse)))
13957 (home-page "https://github.com/fusepy/fusepy")
13958 (synopsis "Simple ctypes bindings for FUSE")
13959 (description "Python module that provides a simple interface to FUSE and
13960MacFUSE. The binding is created using the standard @code{ctypes} library.")
13961 (license license:isc)))
13962
13963(define-public python2-fusepy
13964 (package-with-python2 python-fusepy))
13965
13966(define-public python2-gdrivefs
13967 (package
13968 (name "python2-gdrivefs")
13969 (version "0.14.9")
13970 (source
13971 (origin
13972 (method url-fetch)
13973 (uri (pypi-uri "gdrivefs" version))
13974 (sha256
13975 (base32
13976 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
13977 (build-system python-build-system)
13978 (arguments
13979 `(#:python ,python-2
13980 #:phases
13981 (modify-phases %standard-phases
13982 (add-before 'build 'patch-setup-py
13983 (lambda _
13984 ;; Update requirements from dependency==version
13985 ;; to dependency>=version
13986 (substitute* "gdrivefs/resources/requirements.txt"
13987 (("==") ">="))
13988 #t)))))
13989 (native-inputs
13990 `(("python2-gipc" ,python2-gipc)
13991 ("python2-gevent" ,python2-gevent)
13992 ("python2-greenlet" ,python2-greenlet)
13993 ("python2-httplib2" ,python2-httplib2)
13994 ("python2-uritemplate" ,python2-uritemplate)
13995 ("python2-oauth2client" ,python2-oauth2client)
13996 ("python2-six" ,python2-six)))
13997 (propagated-inputs
13998 `(("python2-dateutil" ,python2-dateutil)
13999 ("python2-fusepy" ,python2-fusepy)
14000 ("python2-google-api-client" ,python2-google-api-client)))
14001 (home-page "https://github.com/dsoprea/GDriveFS")
14002 (synopsis "Mount Google Drive as a local file system")
14003 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
14004under Python 2.7.")
14005 (license license:gpl2)))
14006
14007(define-public pybind11
14008 (package
14009 (name "pybind11")
14010 (version "2.2.4")
14011 (source (origin
14012 (method git-fetch)
14013 (uri (git-reference
14014 (url "https://github.com/pybind/pybind11.git")
14015 (commit (string-append "v" version))))
14016 (sha256
14017 (base32
14018 "0pa79ymcasv8br5ifbx7878id5py2jpjac3i20cqxr6gs9l6ivlv"))
14019 (file-name (git-file-name name version))))
14020 (build-system cmake-build-system)
14021 (native-inputs
14022 `(("python" ,python)
14023 ("python-pytest" ,python-pytest)))
14024 (arguments
14025 `(#:test-target "check"))
14026 (home-page "https://github.com/pybind/pybind11/")
14027 (synopsis "Seamless operability between C++11 and Python")
14028 (description "pybind11 is a lightweight header-only library that exposes
14029C++ types in Python and vice versa, mainly to create Python bindings of
14030existing C++ code. Its goals and syntax are similar to the excellent
14031Boost.Python library by David Abrahams: to minimize boilerplate code in
14032traditional extension modules by inferring type information using compile-time
14033introspection.")
14034 (license license:expat)))
14035
14036(define-public python-fasteners
14037 (package
14038 (name "python-fasteners")
14039 (version "0.14.1")
14040 (source
14041 (origin
14042 (method url-fetch)
14043 (uri (pypi-uri "fasteners" version))
14044 (sha256
14045 (base32
14046 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
14047 (build-system python-build-system)
14048 (propagated-inputs
14049 `(("python-monotonic" ,python-monotonic)
14050 ("python-six" ,python-six)
14051 ("python-testtools" ,python-testtools)))
14052 (home-page "https://github.com/harlowja/fasteners")
14053 (synopsis "Python package that provides useful locks")
14054 (description
14055 "This package provides a Python program that provides following locks:
14056
14057@itemize
14058@item Locking decorator
14059@item Reader-writer locks
14060@item Inter-process locks
14061@item Generic helpers
14062@end itemize\n")
14063 (properties `((python2-variant . ,(delay python2-fasteners))))
14064 (license license:asl2.0)))
14065
14066(define-public python2-fasteners
14067 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
14068 (package
14069 (inherit base)
14070 (propagated-inputs
14071 `(("python2-futures" ,python2-futures)
14072 ,@(package-propagated-inputs base))))))
14073
14074(define-public python-requests-file
14075 (package
14076 (name "python-requests-file")
14077 (version "1.4.3")
14078 (source
14079 (origin
14080 (method url-fetch)
14081 (uri (pypi-uri "requests-file" version))
14082 (sha256
14083 (base32
14084 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
14085 (build-system python-build-system)
14086 (propagated-inputs
14087 `(("python-requests" ,python-requests)
14088 ("python-six" ,python-six)))
14089 (home-page
14090 "https://github.com/dashea/requests-file")
14091 (synopsis "File transport adapter for Requests")
14092 (description
14093 "Requests-File is a transport adapter for use with the Requests Python
14094library to allow local filesystem access via file:// URLs.")
14095 (license license:asl2.0)))
14096
14097(define-public python2-requests-file
14098 (package-with-python2 python-requests-file))
14099
14100(define-public python-tldextract
14101 (package
14102 (name "python-tldextract")
14103 (version "2.2.0")
14104 (source
14105 (origin
14106 (method url-fetch)
14107 (uri (pypi-uri "tldextract" version))
14108 (sha256
14109 (base32
14110 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
14111 (build-system python-build-system)
14112 (native-inputs
14113 `(("python-pytest" ,python-pytest)
14114 ("python-responses" ,python-responses)))
14115 (propagated-inputs
14116 `(("python-idna" ,python-idna)
14117 ("python-requests" ,python-requests)
14118 ("python-requests-file" ,python-requests-file)))
14119 (home-page
14120 "https://github.com/john-kurkowski/tldextract")
14121 (synopsis
14122 "Separate the TLD from the registered domain and subdomains of a URL")
14123 (description
14124 "TLDExtract accurately separates the TLD from the registered domain and
14125subdomains of a URL, using the Public Suffix List. By default, this includes
14126the public ICANN TLDs and their exceptions. It can optionally support the
14127Public Suffix List's private domains as well.")
14128 (license license:bsd-3)))
14129
14130(define-public python2-tldextract
14131 (package-with-python2 python-tldextract))
14132
14133(define-public python-pynamecheap
14134 (package
14135 (name "python-pynamecheap")
14136 (version "0.0.3")
14137 (source
14138 (origin
14139 (method url-fetch)
14140 (uri (pypi-uri "PyNamecheap" version))
14141 (sha256
14142 (base32
14143 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
14144 (build-system python-build-system)
14145 (propagated-inputs
14146 `(("python-requests" ,python-requests)))
14147 (home-page
14148 "https://github.com/Bemmu/PyNamecheap")
14149 (synopsis
14150 "Namecheap API client in Python")
14151 (description
14152 "PyNamecheap is a Namecheap API client in Python.")
14153 (license license:expat)))
14154
14155(define-public python2-pynamecheap
14156 (package-with-python2 python-pynamecheap))
14157
14158(define-public python-dns-lexicon
14159 (package
14160 (name "python-dns-lexicon")
14161 (version "2.4.0")
14162 (source
14163 (origin
14164 (method url-fetch)
14165 (uri (pypi-uri "dns-lexicon" version))
14166 (sha256
14167 (base32
14168 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
14169 (build-system python-build-system)
14170 (arguments
14171 `(#:tests? #f)) ;requires internet access
14172 (propagated-inputs
14173 `(("python-future" ,python-future)
14174 ("python-pynamecheap" ,python-pynamecheap)
14175 ("python-requests" ,python-requests)
14176 ("python-tldextract" ,python-tldextract)
14177 ("python-urllib3" ,python-urllib3)))
14178 (home-page "https://github.com/AnalogJ/lexicon")
14179 (synopsis
14180 "Manipulate DNS records on various DNS providers")
14181 (description
14182 "Lexicon provides a way to manipulate DNS records on multiple DNS
14183providers in a standardized way. It has a CLI but it can also be used as a
14184Python library. It was designed to be used in automation, specifically with
14185Let's Encrypt.")
14186 (license license:expat)))
14187
14188(define-public python2-dns-lexicon
14189 (package-with-python2 python-dns-lexicon))
14190
14191(define-public python-commandlines
14192 (package
14193 (name "python-commandlines")
14194 (version "0.4.1")
14195 (source
14196 (origin
14197 (method url-fetch)
14198 (uri (pypi-uri "commandlines" version))
14199 (sha256
14200 (base32
14201 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
14202 (build-system python-build-system)
14203 (home-page "https://github.com/chrissimpkins/commandlines")
14204 (synopsis "Command line argument to object parsing library")
14205 (description
14206 "@code{Commandlines} is a Python library for command line application
14207development that supports command line argument parsing, command string
14208validation testing and application logic.")
14209 (license license:expat)))
14210
14211;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
14212;; python-numba. They have a very unflexible relationship.
14213(define-public python-numba
14214 (package
14215 (name "python-numba")
14216 (version "0.39.0")
14217 (source
14218 (origin
14219 (method url-fetch)
14220 (uri (pypi-uri "numba" version))
14221 (sha256
14222 (base32
14223 "1bibvkwga1v8293i9ivl469d8bzgabn3vgr2ig7c1i68v8frsx07"))))
14224 (build-system python-build-system)
14225 (arguments
14226 `(#:modules ((guix build utils)
14227 (guix build python-build-system)
14228 (ice-9 ftw)
14229 (srfi srfi-1)
14230 (srfi srfi-26))
14231 #:phases
14232 (modify-phases %standard-phases
14233 (add-after 'unpack 'disable-proprietary-features
14234 (lambda _
14235 (setenv "NUMBA_DISABLE_HSA" "1")
14236 (setenv "NUMBA_DISABLE_CUDA" "1")
14237 #t))
14238 (add-after 'unpack 'remove-failing-tests
14239 (lambda _
14240 ;; FIXME: these tests fail for unknown reasons:
14241 ;; test_non_writable_pycache, test_non_creatable_pycache, and
14242 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
14243 (substitute* "numba/tests/test_dispatcher.py"
14244 (("def test(_non_writable_pycache)" _ m)
14245 (string-append "def guix_skip" m))
14246 (("def test(_non_creatable_pycache)" _ m)
14247 (string-append "def guix_skip" m))
14248 (("def test(_frozen)" _ m)
14249 (string-append "def guix_skip" m)))
14250
14251 ;; These tests fail because we don't run the tests from the build
14252 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
14253 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
14254 (substitute* "numba/tests/test_pycc.py"
14255 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
14256 (string-append "def guix_skip" m)))
14257 #t))
14258 (replace 'check
14259 (lambda _
14260 (let ((cwd (getcwd)))
14261 (setenv "PYTHONPATH"
14262 (string-append cwd "/build/"
14263 (find (cut string-prefix? "lib" <>)
14264 (scandir (string-append cwd "/build")))
14265 ":"
14266 (getenv "PYTHONPATH")))
14267 ;; Something is wrong with the PYTHONPATH when running the
14268 ;; tests from the build directory, as it complains about not being
14269 ;; able to import certain modules.
14270 (with-directory-excursion "/tmp"
14271 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
14272 #t)))))
14273 (propagated-inputs
14274 `(("python-llvmlite" ,python-llvmlite)
14275 ("python-numpy" ,python-numpy)
14276 ("python-singledispatch" ,python-singledispatch)))
14277 ;; Needed for tests.
14278 (inputs
14279 `(("python-jinja2" ,python-jinja2)
14280 ("python-pygments" ,python-pygments)))
14281 (home-page "https://numba.pydata.org")
14282 (synopsis "Compile Python code using LLVM")
14283 (description "Numba gives you the power to speed up your applications with
14284high performance functions written directly in Python. With a few
14285annotations, array-oriented and math-heavy Python code can be just-in-time
14286compiled to native machine instructions, similar in performance to C, C++ and
14287Fortran, without having to switch languages or Python interpreters.
14288
14289Numba works by generating optimized machine code using the LLVM compiler
14290infrastructure at import time, runtime, or statically (using the included pycc
14291tool).")
14292 (license license:bsd-3)))
14293
14294(define-public python-anndata
14295 (package
14296 (name "python-anndata")
14297 (version "0.6.9")
14298 (source
14299 (origin
14300 (method url-fetch)
14301 (uri (pypi-uri "anndata" version))
14302 (sha256
14303 (base32
14304 "1fh461xyyc7pcrjfgd013bdc2alf53r46ss3gfw3431mbb1gappi"))))
14305 (build-system python-build-system)
14306 (propagated-inputs
14307 `(("python-h5py" ,python-h5py)
14308 ("python-natsort" ,python-natsort)
14309 ("python-pandas" ,python-pandas)
14310 ("python-scipy" ,python-scipy)))
14311 (home-page "https://github.com/theislab/anndata")
14312 (synopsis "Annotated data for data analysis pipelines")
14313 (description "Anndata is a package for simple (functional) high-level APIs
14314for data analysis pipelines. In this context, it provides an efficient,
14315scalable way of keeping track of data together with learned annotations and
14316reduces the code overhead typically encountered when using a mostly
14317object-oriented library such as @code{scikit-learn}.")
14318 (license license:bsd-3)))
14319
14320(define-public python-dill
14321 (package
14322 (name "python-dill")
14323 (version "0.2.8.2")
14324 (source
14325 (origin
14326 (method url-fetch)
14327 (uri (pypi-uri "dill" version))
14328 (sha256
14329 (base32
14330 "1cymzn9fxwdy33h21zkk4gqgzvd25110hh3zdqnvnwa3p52c4kb2"))))
14331 (build-system python-build-system)
14332 ;; FIXME: The check phase fails with "don't know how to make test".
14333 (arguments '(#:tests? #f))
14334 (home-page "https://pypi.org/project/dill")
14335 (synopsis "Serialize all of Python")
14336 (description "Dill extends Python's @code{pickle} module for serializing
14337and de-serializing Python objects to the majority of the built-in Python
14338types. Dill provides the user the same interface as the @code{pickle} module,
14339and also includes some additional features. In addition to pickling Python
14340objects, @code{dill} provides the ability to save the state of an interpreter
14341session in a single command. Hence, it would be feasable to save a
14342interpreter session, close the interpreter, ship the pickled file to another
14343computer, open a new interpreter, unpickle the session and thus continue from
14344the saved state of the original interpreter session.")
14345 (license license:bsd-3)))
14346
14347(define-public python-multiprocess
14348 (package
14349 (name "python-multiprocess")
14350 (version "0.70.6.1")
14351 (source
14352 (origin
14353 (method url-fetch)
14354 (uri (pypi-uri "multiprocess" version))
14355 (sha256
14356 (base32
14357 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
14358 (build-system python-build-system)
14359 (propagated-inputs
14360 `(("python-dill" ,python-dill)))
14361 (home-page "https://pypi.org/project/multiprocess")
14362 (synopsis "Multiprocessing and multithreading in Python")
14363 (description
14364 "This package is a fork of the multiprocessing Python package, a package
14365which supports the spawning of processes using the API of the standard
14366library's @code{threading} module.")
14367 (license license:bsd-3)))
14368
14369(define-public python-toolz
14370 (package
14371 (name "python-toolz")
14372 (version "0.9.0")
14373 (source
14374 (origin
14375 (method url-fetch)
14376 (uri (pypi-uri "toolz" version))
14377 (sha256
14378 (base32
14379 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
14380 (build-system python-build-system)
14381 ;; FIXME: tests cannot be computed: "Can't perform this operation for
14382 ;; unregistered loader type"
14383 (arguments '(#:tests? #f))
14384 (home-page "https://github.com/pytoolz/toolz/")
14385 (synopsis "List processing tools and functional utilities")
14386 (description
14387 "This package provides a set of utility functions for iterators,
14388functions, and dictionaries.")
14389 (license license:bsd-3)))
14390
14391(define-public python2-toolz
14392 (package-with-python2 python-toolz))
14393
14394(define-public python-cytoolz
14395 (package
14396 (name "python-cytoolz")
14397 (version "0.9.0.1")
14398 (source
14399 (origin
14400 (method url-fetch)
14401 (uri (pypi-uri "cytoolz" version))
14402 (sha256
14403 (base32
14404 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
14405 (build-system python-build-system)
14406 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
14407 ;; 'exceptions'"
14408 (arguments '(#:tests? #f))
14409 (propagated-inputs
14410 `(("python-toolz" ,python-toolz)))
14411 (native-inputs
14412 `(("python-cython" ,python-cython)))
14413 (home-page "https://github.com/pytoolz/cytoolz")
14414 (synopsis "High performance functional utilities")
14415 (description
14416 "The cytoolz package implements the same API as provided by toolz. The
14417main differences are that @code{cytoolz} is faster and cytoolz offers a C API
14418that is accessible to other projects developed in Cython.")
14419 (license license:bsd-3)))
14420
14421(define-public python-sortedcontainers
14422 (package
14423 (name "python-sortedcontainers")
14424 (version "2.0.4")
14425 (source
14426 (origin
14427 (method url-fetch)
14428 (uri (pypi-uri "sortedcontainers" version))
14429 (sha256
14430 (base32
14431 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
14432 (build-system python-build-system)
14433 (native-inputs
14434 `(("python-tox" ,python-tox)))
14435 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
14436 (synopsis "Sorted List, Sorted Dict, Sorted Set")
14437 (description
14438 "This package provides a sorted collections library, written in
14439pure-Python.")
14440 (license license:asl2.0)))
14441
14442(define-public python-cloudpickle
14443 (package
14444 (name "python-cloudpickle")
14445 (version "0.6.1")
14446 (source
14447 (origin
14448 (method url-fetch)
14449 (uri (pypi-uri "cloudpickle" version))
14450 (sha256
14451 (base32
14452 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
14453 (build-system python-build-system)
14454 ;; FIXME: there are 5 errors in 122 tests:
14455 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
14456 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
14457 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
14458 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
14459 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
14460 ;; TypeError: cannot serialize '_io.BufferedRandom' object
14461 (arguments '(#:tests? #f))
14462 (native-inputs
14463 `(("python-pytest" ,python-pytest)
14464 ("python-mock" ,python-mock)
14465 ("python-tornado" ,python-tornado)))
14466 (home-page "https://github.com/cloudpipe/cloudpickle")
14467 (synopsis "Extended pickling support for Python objects")
14468 (description
14469 "Cloudpickle makes it possible to serialize Python constructs not
14470supported by the default pickle module from the Python standard library. It
14471is especially useful for cluster computing where Python expressions are
14472shipped over the network to execute on remote hosts, possibly close to the
14473data.")
14474 (license license:bsd-3)))
14475
14476(define-public python2-cloudpickle
14477 (package-with-python2 python-cloudpickle))
14478
14479(define-public python-locket
14480 (package
14481 (name "python-locket")
14482 (version "0.2.0")
14483 (source
14484 (origin
14485 (method url-fetch)
14486 (uri (pypi-uri "locket" version))
14487 (sha256
14488 (base32
14489 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
14490 (build-system python-build-system)
14491 (home-page "https://github.com/mwilliamson/locket.py")
14492 (synopsis "File-based locks for Python")
14493 (description
14494 "Locket implements a lock that can be used by multiple processes provided
14495they use the same path.")
14496 (license license:bsd-2)))
14497
14498(define-public python2-locket
14499 (package-with-python2 python-locket))
14500
14501(define-public python-blosc
14502 (package
14503 (name "python-blosc")
14504 (version "1.5.1")
14505 (source
14506 (origin
14507 (method url-fetch)
14508 (uri (pypi-uri "blosc" version))
14509 (sha256
14510 (base32
14511 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
14512 (build-system python-build-system)
14513 ;; FIXME: all tests pass, but then this error is printed:
14514 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
14515 (arguments '(#:tests? #f))
14516 (propagated-inputs
14517 `(("python-numpy" ,python-numpy)))
14518 (home-page "https://github.com/blosc/python-blosc")
14519 (synopsis "Python wrapper for the Blosc data compressor library")
14520 (description "Blosc is a high performance compressor optimized for binary
14521data. It has been designed to transmit data to the processor cache faster
14522than the traditional, non-compressed, direct memory fetch approach via a
14523@code{memcpy()} system call.
14524
14525Blosc works well for compressing numerical arrays that contains data with
14526relatively low entropy, like sparse data, time series, grids with
14527regular-spaced values, etc.
14528
14529This Python package wraps the Blosc library.")
14530 (license license:bsd-3)))
14531
14532(define-public python2-blosc
14533 (package-with-python2 python-blosc))
14534
14535(define-public python-partd
14536 (package
14537 (name "python-partd")
14538 (version "0.3.9")
14539 (source
14540 (origin
14541 (method url-fetch)
14542 (uri (pypi-uri "partd" version))
14543 (sha256
14544 (base32
14545 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
14546 (build-system python-build-system)
14547 (propagated-inputs
14548 `(("python-blosc" ,python-blosc)
14549 ("python-locket" ,python-locket)
14550 ("python-numpy" ,python-numpy)
14551 ("python-pandas" ,python-pandas)
14552 ("python-pyzmq" ,python-pyzmq)
14553 ("python-toolz" ,python-toolz)))
14554 (home-page "https://github.com/dask/partd/")
14555 (synopsis "Appendable key-value storage")
14556 (description "Partd stores key-value pairs. Values are raw bytes. We
14557append on old values. Partd excels at shuffling operations.")
14558 (license license:bsd-3)))
14559
14560(define-public python2-partd
14561 (package-with-python2 python-partd))
14562
14563(define-public python-dask
14564 (package
14565 (name "python-dask")
14566 (version "1.0.0")
14567 (source
14568 (origin
14569 (method url-fetch)
14570 (uri (pypi-uri "dask" version))
14571 (sha256
14572 (base32
14573 "1xwz8h020ipwav2p5gcq9pskya1cvzd6hjyvd06dvr3w5lxlmym1"))))
14574 (build-system python-build-system)
14575 ;; A single test out of 5000+ fails. This test is marked as xfail when
14576 ;; pytest-xdist is used.
14577 (arguments
14578 `(#:phases
14579 (modify-phases %standard-phases
14580 (add-after 'unpack 'disable-broken-test
14581 (lambda _
14582 (substitute* "dask/tests/test_threaded.py"
14583 (("def test_interrupt\\(\\)" m)
14584 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
14585 m)))
14586 (when (which "python2")
14587 ;; This test fails with recent Pandas:
14588 ;; <https://github.com/dask/dask/issues/3794>.
14589 (substitute* "dask/dataframe/tests/test_dataframe.py"
14590 (("def test_info\\(\\)" m)
14591 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
14592 m))))
14593 #t))
14594 (replace 'check
14595 (lambda _ (invoke "pytest" "-vv"))))))
14596 (propagated-inputs
14597 `(("python-cloudpickle" ,python-cloudpickle)
14598 ("python-numpy" ,python-numpy)
14599 ("python-pandas" ,python-pandas)
14600 ("python-partd" ,python-partd)
14601 ("python-toolz" ,python-toolz)
14602 ("python-pyyaml" ,python-pyyaml)))
14603 (native-inputs
14604 `(("python-pytest" ,python-pytest)
14605 ("python-pytest-runner" ,python-pytest-runner)))
14606 (home-page "https://github.com/dask/dask/")
14607 (synopsis "Parallel computing with task scheduling")
14608 (description
14609 "Dask is a flexible parallel computing library for analytics. It
14610consists of two components: dynamic task scheduling optimized for computation,
14611and large data collections like parallel arrays, dataframes, and lists that
14612extend common interfaces like NumPy, Pandas, or Python iterators to
14613larger-than-memory or distributed environments. These parallel collections
14614run on top of the dynamic task schedulers. ")
14615 (license license:bsd-3)))
14616
14617(define-public python2-dask
14618 (package-with-python2 python-dask))
14619
14620(define-public python-ilinkedlist
14621 (package
14622 (name "python-ilinkedlist")
14623 (version "0.4.0")
14624 (source
14625 (origin
14626 (method url-fetch)
14627 (uri (pypi-uri "ilinkedlist" version))
14628 (sha256
14629 (base32
14630 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
14631 (build-system python-build-system)
14632 (native-inputs `(("python-pytest" ,python-pytest)))
14633 (inputs `(("python" ,python)))
14634 (home-page "https://github.com/luther9/ilinkedlist-py")
14635 (synopsis "Immutable linked list library")
14636 (description
14637 "This is a implementation of immutable linked lists for Python. It
14638contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
14639Since a linked list is treated as immutable, it is hashable, and its length
14640can be retrieved in constant time. Some of the terminology is inspired by
14641LISP. It is possible to create an improper list by creating a @code{Pair}
14642with a non-list @code{cdr}.")
14643 (license license:gpl3+)))
14644
14645(define-public python-readlike
14646 (package
14647 (name "python-readlike")
14648 (version "0.1.3")
14649 (source
14650 (origin
14651 (method url-fetch)
14652 (uri (pypi-uri "readlike" version))
14653 (sha256
14654 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
14655 (build-system python-build-system)
14656 (home-page "https://github.com/jangler/readlike")
14657 (synopsis "GNU Readline-like line editing module")
14658 (description
14659 "This Python module provides line editing functions similar to the default
14660Emacs-style ones of GNU Readline. Unlike the Python standard library's
14661@code{readline} package, this one allows access to those capabilties in settings
14662outside of a standard command-line interface. It is especially well-suited to
14663interfacing with Urwid, due to a shared syntax for describing key inputs.
14664
14665Currently, all stateless Readline commands are implemented. Yanking and history
14666are not supported.")
14667 (license license:expat)))
14668
14669(define-public python2-readlike
14670 (package-with-python2 python-readlike))
14671
14672(define-public python-reparser
14673 (package
14674 (name "python-reparser")
14675 (version "1.4.3")
14676 (source
14677 (origin
14678 (method url-fetch)
14679 (uri (pypi-uri "ReParser" version))
14680 (sha256
14681 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
14682 (build-system python-build-system)
14683 (home-page "https://github.com/xmikos/reparser")
14684 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
14685 (description
14686 "This Python library provides a simple lexer/parser for inline markup based
14687on regular expressions.")
14688 (license license:expat)))
14689
14690(define-public python2-reparser
14691 (let ((reparser (package-with-python2
14692 (strip-python2-variant python-reparser))))
14693 (package (inherit reparser)
14694 (propagated-inputs
14695 `(("python2-enum34" ,python2-enum34)
14696 ,@(package-propagated-inputs reparser))))))
14697
14698(define-public python-precis-i18n
14699 (package
14700 (name "python-precis-i18n")
14701 (version "1.0.0")
14702 (source
14703 (origin
14704 (method url-fetch)
14705 (uri (pypi-uri "precis_i18n" version))
14706 (sha256
14707 (base32
14708 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
14709 (build-system python-build-system)
14710 (home-page "https://github.com/byllyfish/precis_i18n")
14711 (synopsis "Implementation of the PRECIS framework")
14712 (description
14713 "This module implements the PRECIS Framework as described in RFC 8264,
14714RFC 8265 and RFC 8266.")
14715 (license license:expat)))
14716
d0446c4b
RW
14717(define-public python-absl-py
14718 (package
14719 (name "python-absl-py")
14720 (version "0.6.1")
14721 (source
14722 (origin
14723 (method url-fetch)
14724 (uri (pypi-uri "absl-py" version))
14725 (sha256
14726 (base32
14727 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
14728 (build-system python-build-system)
14729 (propagated-inputs
14730 `(("python-six" ,python-six)))
14731 (home-page "https://github.com/abseil/abseil-py")
14732 (synopsis "Abseil Python common libraries")
14733 (description
14734 "This package provides the Abseil Python Common Libraries, a collection
14735of Python libraries for building Python applications.")
14736 (license license:asl2.0)))
14737
81bed4e9
RW
14738(define-public python-astor
14739 (package
14740 (name "python-astor")
14741 (version "0.7.1")
14742 (source
14743 (origin
14744 (method url-fetch)
14745 (uri (pypi-uri "astor" version))
14746 (sha256
14747 (base32
14748 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
14749 (build-system python-build-system)
14750 ;; FIXME: There are two errors and two test failures.
14751 (arguments `(#:tests? #f))
14752 (home-page "https://github.com/berkerpeksag/astor")
14753 (synopsis "Read/rewrite/write Python ASTs")
14754 (description "Astor is designed to allow easy manipulation of Python
14755source via the AST.")
14756 (license license:bsd-3)))
14757
22e623ae
RW
14758(define-public python-grpcio
14759 (package
14760 (name "python-grpcio")
14761 (version "1.17.1")
14762 (source
14763 (origin
14764 (method url-fetch)
14765 (uri (pypi-uri "grpcio" version))
14766 (sha256
14767 (base32
14768 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
14769 (build-system python-build-system)
14770 (propagated-inputs
14771 `(("python-six" ,python-six)))
14772 (home-page "https://grpc.io")
14773 (synopsis "HTTP/2-based RPC framework")
14774 (description "This package provides a Python library for communicating
14775with the HTTP/2-based RPC framework gRPC.")
14776 (license license:asl2.0)))
14777
79869f80
RW
14778(define-public python-astunparse
14779 (package
14780 (name "python-astunparse")
14781 (version "1.6.1")
14782 (source
14783 (origin
14784 (method url-fetch)
14785 (uri (pypi-uri "astunparse" version))
14786 (sha256
14787 (base32
14788 "1jhidwyrqn17avqh9xnnm3wd7q7aahaq009cba67g86y6gxicyyj"))))
14789 (build-system python-build-system)
14790 (arguments '(#:tests? #f)) ; there are none
14791 (propagated-inputs
14792 `(("python-six" ,python-six)
14793 ("python-wheel" ,python-wheel)))
14794 (home-page "https://github.com/simonpercivall/astunparse")
14795 (synopsis "AST unparser for Python")
14796 (description "This package provides an AST unparser for Python. It is a
14797factored out version of @code{unparse} found in the Python source
14798distribution.")
14799 (license license:bsd-3)))
14800
2884aac0
RW
14801(define-public python-gast
14802 (package
14803 (name "python-gast")
14804 (version "0.2.0")
14805 (source
14806 (origin
14807 (method url-fetch)
14808 (uri (pypi-uri "gast" version))
14809 (sha256
14810 (base32
14811 "0c296xm1vz9x4w4inmdl0k8mnc0i9arw94si2i7pglpc461r0s3h"))))
14812 (build-system python-build-system)
14813 (propagated-inputs
14814 `(("python-astunparse" ,python-astunparse)))
14815 (home-page "https://pypi.org/project/gast/")
14816 (synopsis "Generic Python AST that abstracts the underlying Python version")
14817 (description
14818 "GAST provides a compatibility layer between the AST of various Python
14819versions, as produced by @code{ast.parse} from the standard @code{ast}
14820module.")
14821 (license license:bsd-3)))
14822
44d10b1f
RW
14823(define-public python-wikidata
14824 (package
14825 (name "python-wikidata")
14826 (version "0.6.1")
14827 (source
14828 (origin
14829 (method url-fetch)
14830 (uri (pypi-uri "Wikidata" version))
14831 (sha256
14832 (base32
14833 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
14834 (build-system python-build-system)
14835 (propagated-inputs
14836 `(("python-babel" ,python-babel)))
14837 (home-page "https://github.com/dahlia/wikidata")
14838 (synopsis "Wikidata client library")
14839 (description
14840 "This package provides a Python interface to
14841@url{https://www.wikidata.org/, Wikidata}.")
14842 (properties '((upstream-name . "Wikidata")))
14843 (license license:gpl3+)))
14844
14845(define-public python-doctest-ignore-unicode
14846 (package
14847 (name "python-doctest-ignore-unicode")
14848 (version "0.1.2")
14849 (source
14850 (origin
14851 (method url-fetch)
14852 (uri (pypi-uri "doctest-ignore-unicode" version))
14853 (sha256
14854 (base32
14855 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
14856 (build-system python-build-system)
14857 (native-inputs
14858 `(("python-nose" ,python-nose)))
14859 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
14860 (synopsis "Ignore Unicode literal prefixes in doctests")
14861 (description
14862 "This package adds support for a flag to ignore Unicode literal prefixes
14863in doctests.")
14864 (license license:asl2.0)))
14865
14866(define-public python-attr
14867 (package
14868 (name "python-attr")
14869 (version "0.3.1")
14870 (source
14871 (origin
14872 (method url-fetch)
14873 (uri (pypi-uri "attr" version))
14874 (sha256
14875 (base32
14876 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
14877 (build-system python-build-system)
14878 (home-page "https://github.com/denis-ryzhkov/attr")
14879 (synopsis "Decorator for attributes of target function or class")
14880 (description "Simple decorator to set attributes of target function or
14881class in a @acronym{DRY, Don't Repeat Yourself} way.")
14882 (license license:expat)))