gnu: python-coloredlogs: Update to 10.0.
[jackhill/guix/guix.git] / gnu / packages / python-xyz.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2013, 2014, 2015, 2016, 2019 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, 2019 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-2019 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 ng0 <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, 2019 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, 2019 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, 2019 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, 2019 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, 2019 Brendan Tildesley <mail@brendan.scot>
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, 2019 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, 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
58 ;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
59 ;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
60 ;;; Copyright © 2019 Brett Gilio <brettg@posteo.net>
61 ;;; Copyright © 2019 Sam <smbaines8@gmail.com>
62 ;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us>
63 ;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
64 ;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
65 ;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
66 ;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
67 ;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
68 ;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
69 ;;; Copyright © 2019 Tanguy Le Carrour <tanguy@bioneland.org>
70 ;;;
71 ;;; This file is part of GNU Guix.
72 ;;;
73 ;;; GNU Guix is free software; you can redistribute it and/or modify it
74 ;;; under the terms of the GNU General Public License as published by
75 ;;; the Free Software Foundation; either version 3 of the License, or (at
76 ;;; your option) any later version.
77 ;;;
78 ;;; GNU Guix is distributed in the hope that it will be useful, but
79 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
80 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
81 ;;; GNU General Public License for more details.
82 ;;;
83 ;;; You should have received a copy of the GNU General Public License
84 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
85
86 (define-module (gnu packages python-xyz)
87 #:use-module ((guix licenses) #:prefix license:)
88 #:use-module (gnu packages)
89 #:use-module (gnu packages algebra)
90 #:use-module (gnu packages adns)
91 #:use-module (gnu packages attr)
92 #:use-module (gnu packages backup)
93 #:use-module (gnu packages bash)
94 #:use-module (gnu packages check)
95 #:use-module (gnu packages compression)
96 #:use-module (gnu packages crypto)
97 #:use-module (gnu packages databases)
98 #:use-module (gnu packages dbm)
99 #:use-module (gnu packages file)
100 #:use-module (gnu packages fontutils)
101 #:use-module (gnu packages gcc)
102 #:use-module (gnu packages geo)
103 #:use-module (gnu packages ghostscript)
104 #:use-module (gnu packages gl)
105 #:use-module (gnu packages glib)
106 #:use-module (gnu packages graphviz)
107 #:use-module (gnu packages graphics)
108 #:use-module (gnu packages gstreamer)
109 #:use-module (gnu packages gtk)
110 #:use-module (gnu packages icu4c)
111 #:use-module (gnu packages image)
112 #:use-module (gnu packages imagemagick)
113 #:use-module (gnu packages libevent)
114 #:use-module (gnu packages libffi)
115 #:use-module (gnu packages linux)
116 #:use-module (gnu packages llvm)
117 #:use-module (gnu packages man)
118 #:use-module (gnu packages maths)
119 #:use-module (gnu packages monitoring)
120 #:use-module (gnu packages multiprecision)
121 #:use-module (gnu packages networking)
122 #:use-module (gnu packages ncurses)
123 #:use-module (gnu packages openstack)
124 #:use-module (gnu packages pcre)
125 #:use-module (gnu packages perl)
126 #:use-module (gnu packages pkg-config)
127 #:use-module (gnu packages python)
128 #:use-module (gnu packages python-check)
129 #:use-module (gnu packages python-compression)
130 #:use-module (gnu packages python-crypto)
131 #:use-module (gnu packages python-web)
132 #:use-module (gnu packages qt)
133 #:use-module (gnu packages readline)
134 #:use-module (gnu packages sdl)
135 #:use-module (gnu packages search)
136 #:use-module (gnu packages shells)
137 #:use-module (gnu packages sphinx)
138 #:use-module (gnu packages ssh)
139 #:use-module (gnu packages terminals)
140 #:use-module (gnu packages tex)
141 #:use-module (gnu packages texinfo)
142 #:use-module (gnu packages time)
143 #:use-module (gnu packages tls)
144 #:use-module (gnu packages version-control)
145 #:use-module (gnu packages video)
146 #:use-module (gnu packages web)
147 #:use-module (gnu packages base)
148 #:use-module (gnu packages xml)
149 #:use-module (gnu packages xorg)
150 #:use-module (gnu packages xdisorg)
151 #:use-module (gnu packages tcl)
152 #:use-module (gnu packages bdw-gc)
153 #:use-module (gnu packages serialization)
154 #:use-module (guix packages)
155 #:use-module (guix download)
156 #:use-module (guix git-download)
157 #:use-module (guix hg-download)
158 #:use-module (guix utils)
159 #:use-module (guix build-system gnu)
160 #:use-module (guix build-system cmake)
161 #:use-module (guix build-system python)
162 #:use-module (guix build-system trivial)
163 #:use-module (srfi srfi-1)
164 #:use-module (srfi srfi-26))
165
166 (define-public python-psutil
167 (package
168 (name "python-psutil")
169 (version "5.6.3")
170 (source
171 (origin
172 (method url-fetch)
173 (uri (pypi-uri "psutil" version))
174 (sha256
175 (base32 "1wv31zly44qj0rp2acg58xbnc7bf6ffyadasq093l455q30qafl6"))))
176 (build-system python-build-system)
177 (arguments
178 ;; FIXME: some tests does not return and times out.
179 '(#:tests? #f))
180 (home-page "https://www.github.com/giampaolo/psutil")
181 (synopsis "Library for retrieving information on running processes")
182 (description
183 "psutil (Python system and process utilities) is a library for retrieving
184 information on running processes and system utilization (CPU, memory, disks,
185 network) in Python. It is useful mainly for system monitoring, profiling and
186 limiting process resources and management of running processes. It implements
187 many functionalities offered by command line tools such as: ps, top, lsof,
188 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
189 pidof, tty, taskset, pmap.")
190 (properties `((python2-variant . ,(delay python2-psutil))))
191 (license license:bsd-3)))
192
193 (define-public python2-psutil
194 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
195 (package
196 (inherit base)
197 (propagated-inputs
198 `(("python2-enum34" ,python2-enum34) ;optional
199 ,@(package-propagated-inputs base))))))
200
201 (define-public python-shapely
202 (package
203 (name "python-shapely")
204 (version "1.6.4.post2")
205 (source
206 (origin
207 (method url-fetch)
208 (uri (pypi-uri "Shapely" version))
209 (sha256
210 (base32
211 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
212 (build-system python-build-system)
213 (native-inputs
214 `(("python-cython" ,python-cython)
215 ("python-matplotlib" ,python-matplotlib)
216 ("python-pytest" ,python-pytest)
217 ("python-pytest-cov" ,python-pytest-cov)))
218 (inputs
219 `(("geos" ,geos)))
220 (propagated-inputs
221 `(("python-numpy" ,python-numpy)))
222 (arguments
223 `(#:phases
224 (modify-phases %standard-phases
225 (add-after 'unpack 'patch-geos-path
226 (lambda* (#:key inputs #:allow-other-keys)
227 (let ((geos (assoc-ref inputs "geos"))
228 (glibc (assoc-ref inputs ,(if (%current-target-system)
229 "cross-libc" "libc"))))
230 (substitute* "shapely/geos.py"
231 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
232 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
233 geos "/lib/libgeos_c.so'])"))
234 (("free = load_dll\\('c'\\)\\.free")
235 (string-append "free = load_dll('c', fallbacks=['"
236 glibc "/lib/libc.so.6']).free"))))
237 #t)))))
238 (home-page "https://github.com/Toblerity/Shapely")
239 (synopsis "Library for the manipulation and analysis of geometric objects")
240 (description "Shapely is a Python package for manipulation and analysis of
241 planar geometric objects. It is based on the @code{GEOS} library.")
242 (license license:bsd-3)))
243
244 (define-public python-shortuuid
245 (package
246 (name "python-shortuuid")
247 (version "0.5.0")
248 (source
249 (origin
250 (method url-fetch)
251 (uri (pypi-uri "shortuuid" version))
252 (sha256
253 (base32
254 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
255 (build-system python-build-system)
256 (native-inputs
257 `(("python-pep8" ,python-pep8)))
258 (home-page "https://github.com/skorokithakis/shortuuid")
259 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
260 (description
261 "@code{shortuuid} is a Python library for generating concise, unambiguous
262 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
263 module and then similar looking characters are removed.")
264 (license license:bsd-3)))
265
266 (define-public python-logwrap
267 (package
268 (name "python-logwrap")
269 (version "3.2.1")
270 (source
271 (origin
272 (method url-fetch)
273 (uri (pypi-uri "logwrap" version ".zip"))
274 (sha256
275 (base32
276 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
277 (build-system python-build-system)
278 (propagated-inputs
279 `(("python-six" ,python-six)
280 ("python-typing" ,python-typing)))
281 (native-inputs
282 `(("unzip" ,unzip)
283 ("python-cython" ,python-cython)
284 ("python-pytest" ,python-pytest)
285 ("python-pytest-cov" ,python-pytest-cov)
286 ("python-pytest-runner" ,python-pytest-runner)))
287 (home-page "https://github.com/penguinolog/logwrap")
288 (synopsis "Decorator for logging function arguments")
289 (description "This package provides a decorator to log function arguments
290 and function call return values in a human-readable way.")
291 (license license:asl2.0)))
292
293 (define-public python2-shapely
294 (package-with-python2 python-shapely))
295
296 (define-public python-clyent
297 (package
298 (name "python-clyent")
299 (version "1.2.1")
300 (source
301 (origin
302 (method url-fetch)
303 (uri (pypi-uri "clyent" version))
304 (sha256
305 (base32
306 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
307 (build-system python-build-system)
308 (native-inputs
309 `(("python-mock" ,python-mock)))
310 (home-page "https://github.com/binstar/clyent")
311 (synopsis "Command line client library")
312 (description "Clyent is a Python command line utiliy library. It is used
313 by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
314 (license license:bsd-3)))
315
316 (define-public python2-clyent
317 (package-with-python2 python-clyent))
318
319 (define-public python-babel
320 (package
321 (name "python-babel")
322 (version "2.7.0")
323 (source
324 (origin
325 (method url-fetch)
326 (uri (pypi-uri "Babel" version))
327 (sha256
328 (base32
329 "0a7wawx8vsg7igvz6p3x909fskhg4b2y1910xk4f4c8y22p3aqg8"))))
330 (build-system python-build-system)
331 (native-inputs
332 `(("python-freezegun" ,python-freezegun)
333 ("python-pytest" ,python-pytest)))
334 (propagated-inputs
335 `(("python-pytz" ,python-pytz)))
336 (arguments
337 `(#:phases (modify-phases %standard-phases
338 (replace 'check
339 (lambda _
340 (invoke "pytest" "-vv" "-k"
341 (string-append
342 ;; XXX: These tests fail when using Pytest 4.x and
343 ;; Babel 2.6.0. Try removing this for later versions.
344 "not test_no_inherit_metazone_marker_never_in_output"
345 " and not test_smoke_dates"
346 " and not test_smoke_numbers")))))))
347 (home-page "http://babel.pocoo.org/")
348 (synopsis
349 "Tools for internationalizing Python applications")
350 (description
351 "Babel is composed of two major parts:
352 - tools to build and work with gettext message catalogs
353 - a Python interface to the CLDR (Common Locale Data Repository), providing
354 access to various locale display names, localized number and date formatting,
355 etc. ")
356 (license license:bsd-3)))
357
358 (define-public python2-babel
359 (package-with-python2 python-babel))
360
361 ;; Sphinx < 2.0 requires this version. Remove once no longer needed.
362 (define-public python2-babel-2.6
363 (package
364 (inherit python2-babel)
365 (version "2.6.0")
366 (source (origin
367 (method url-fetch)
368 (uri (pypi-uri "Babel" version))
369 (sha256
370 (base32
371 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
372
373 (define-public python2-backport-ssl-match-hostname
374 (package
375 (name "python2-backport-ssl-match-hostname")
376 (version "3.5.0.1")
377 (source
378 (origin
379 (method url-fetch)
380 (uri (pypi-uri "backports.ssl_match_hostname" version))
381 (sha256
382 (base32
383 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
384 (build-system python-build-system)
385 (arguments
386 `(#:python ,python-2
387 #:tests? #f)) ; no test target
388 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
389 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
390 (description
391 "This backport brings the ssl.match_hostname() function to users of
392 earlier versions of Python. The function checks the hostname in the
393 certificate returned by the server to which a connection has been established,
394 and verifies that it matches the intended target hostname.")
395 (license license:psfl)))
396
397 (define-public python-boolean.py
398 (package
399 (name "python-boolean.py")
400 (version "3.6")
401 (source
402 (origin
403 ;; There's no source tarball on PyPI.
404 (method git-fetch)
405 (uri (git-reference
406 (url "https://github.com/bastikr/boolean.py")
407 (commit (string-append "v" version))))
408 (file-name (git-file-name name version))
409 (sha256
410 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
411 (build-system python-build-system)
412 (home-page "https://github.com/bastikr/boolean.py")
413 (synopsis "Boolean algebra in one Python module")
414 (description
415 "This is a small Python library that implements boolean algebra.
416 It defines two base elements, @code{TRUE} and @code{FALSE}, and a
417 @code{Symbol} class that can take on one of these two values. Calculations
418 are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
419 compositions like @code{XOR} and @code{NAND} are emulated on top of them.
420 Expressions are constructed from parsed strings or directly in Python.")
421 (license license:bsd-2)))
422
423 (define-public python-hdf4
424 (package
425 (name "python-hdf4")
426 (version "0.9")
427 (source
428 (origin
429 (method url-fetch)
430 (uri (pypi-uri name version))
431 (sha256
432 (base32
433 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
434 (build-system python-build-system)
435 (native-inputs `(("nose" ,python-nose)))
436 (propagated-inputs `(("numpy" ,python-numpy)))
437 (inputs
438 `(("hdf4" ,hdf4)
439 ("libjpeg" ,libjpeg)
440 ("zlib" ,zlib)))
441 (arguments
442 `(#:phases
443 (modify-phases %standard-phases
444 (replace 'check
445 (lambda _
446 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
447 ;; on to import numpy. Somehow this works on their CI system.
448 ;; Let's just manage PYTHONPATH here instead.
449 (substitute* "runexamples.sh"
450 (("export PYTHONPATH=.*") ""))
451 (setenv "PYTHONPATH"
452 (string-append (getcwd) ":"
453 (getenv "PYTHONPATH")))
454 (invoke "./runexamples.sh")
455 (invoke "nosetests" "-v"))))))
456 (home-page "https://github.com/fhs/python-hdf4")
457 (synopsis "Python interface to the NCSA HDF4 library")
458 (description
459 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
460 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
461 NetCDF files can also be read and modified. Python-HDF4 is a fork of
462 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
463 (license license:expat)))
464
465 (define-public python2-hdf4
466 (package-with-python2 python-hdf4))
467
468 (define-public python-h5py
469 (package
470 (name "python-h5py")
471 (version "2.8.0")
472 (source
473 (origin
474 (method url-fetch)
475 (uri (pypi-uri "h5py" version))
476 (sha256
477 (base32
478 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
479 (build-system python-build-system)
480 (arguments
481 `(#:tests? #f ; no test target
482 #:phases
483 (modify-phases %standard-phases
484 (add-after 'unpack 'fix-hdf5-paths
485 (lambda* (#:key inputs #:allow-other-keys)
486 (let ((prefix (assoc-ref inputs "hdf5")))
487 (substitute* "setup_build.py"
488 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
489 (string-append "['" prefix "/lib" "']"))
490 (("'/opt/local/include', '/usr/local/include'")
491 (string-append "'" prefix "/include" "'")))
492 (substitute* "setup_configure.py"
493 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
494 (string-append "['" prefix "/lib" "']")))
495 #t))))))
496 (propagated-inputs
497 `(("python-six" ,python-six)
498 ("python-numpy" ,python-numpy)))
499 (inputs
500 `(("hdf5" ,hdf5)))
501 (native-inputs
502 `(("python-cython" ,python-cython)
503 ("python-pkgconfig" ,python-pkgconfig)))
504 (home-page "http://www.h5py.org/")
505 (synopsis "Read and write HDF5 files from Python")
506 (description
507 "The h5py package provides both a high- and low-level interface to the
508 HDF5 library from Python. The low-level interface is intended to be a
509 complete wrapping of the HDF5 API, while the high-level component supports
510 access to HDF5 files, datasets and groups using established Python and NumPy
511 concepts.")
512 (license license:bsd-3)))
513
514 (define-public python2-h5py
515 (package-with-python2 python-h5py))
516
517 (define-public python-sh
518 (package
519 (name "python-sh")
520 (version "1.12.14")
521 (source
522 (origin
523 (method url-fetch)
524 (uri (pypi-uri "sh" version))
525 (sha256
526 (base32
527 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
528 (build-system python-build-system)
529 (arguments
530 '(#:phases
531 (modify-phases %standard-phases
532 (replace 'check
533 (lambda _
534 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
535 (setenv "HOME" "/tmp")
536 (invoke "python" "sh.py" "test"))))))
537 (native-inputs
538 `(("python-coverage" ,python-coverage)))
539 (home-page "https://github.com/amoffat/sh")
540 (synopsis "Python subprocess replacement")
541 (description "This package provides a replacement for Python's
542 @code{subprocess} feature.")
543 (license license:expat)))
544
545 (define-public python2-sh
546 (package-with-python2 python-sh))
547
548 (define-public python-cftime
549 (package
550 (name "python-cftime")
551 (version "1.0.4.2")
552 (source
553 (origin
554 (method url-fetch)
555 (uri (pypi-uri "cftime" version))
556 (sha256
557 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
558 (build-system python-build-system)
559 (propagated-inputs
560 `(("python-numpy" ,python-numpy)))
561 (native-inputs
562 `(("python-coveralls" ,python-coveralls)
563 ("python-cython" ,python-cython)
564 ("python-pytest-cov" ,python-pytest-cov)))
565 (home-page "https://github.com/Unidata/cftime")
566 (synopsis "Library for time handling")
567 (description
568 "This package provides time-handling functionality that used to be part
569 of the netcdf4 package before.")
570 ;; This package claims to include code under the GPLv3 but is released
571 ;; under ISC.
572 (license (list license:isc license:gpl3+))))
573
574 (define-public python-netcdf4
575 (package
576 (name "python-netcdf4")
577 (version "1.4.2")
578 (source
579 (origin
580 (method url-fetch)
581 (uri (pypi-uri "netCDF4" version))
582 (sha256
583 (base32
584 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
585 (build-system python-build-system)
586 (arguments
587 '(#:phases
588 (modify-phases %standard-phases
589 (add-after 'unpack 'configure-locations
590 (lambda* (#:key inputs #:allow-other-keys)
591 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
592 #t)))))
593 (native-inputs
594 `(("python-cython" ,python-cython)))
595 (propagated-inputs
596 `(("python-numpy" ,python-numpy)
597 ("python-cftime" ,python-cftime)))
598 (inputs
599 `(("netcdf" ,netcdf)
600 ("hdf4" ,hdf4)
601 ("hdf5" ,hdf5)))
602 (home-page "https://github.com/Unidata/netcdf4-python")
603 (synopsis "Python/numpy interface to the netCDF library")
604 (description "Netcdf4-python is a Python interface to the netCDF C
605 library. netCDF version 4 has many features not found in earlier
606 versions of the library and is implemented on top of HDF5. This module
607 can read and write files in both the new netCDF 4 and the old netCDF 3
608 format, and can create files that are readable by HDF5 clients. The
609 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
610 to users of that module.")
611 ;; The software is mainly ISC, but includes some files covered
612 ;; by the Expat license.
613 (license (list license:isc license:expat))))
614
615 (define-public python2-netcdf4
616 (package-with-python2 python-netcdf4))
617
618 (define-public python-license-expression
619 (package
620 (name "python-license-expression")
621 (version "0.999")
622 (source
623 (origin
624 (method url-fetch)
625 (uri (pypi-uri "license-expression" version))
626 (sha256
627 (base32 "08ppb0bxbrsxazy88sgpl9yffvdsabw6dkk1nc332wcz2mphwwyf"))))
628 (build-system python-build-system)
629 (propagated-inputs
630 `(("python-boolean.py" ,python-boolean.py)))
631 (home-page "https://github.com/nexB/license-expression")
632 (synopsis "Apply boolean logic to license expressions")
633 (description
634 "This Python module defines a tiny language to evaluate and compare
635 license expressions using boolean logic. Logical combinations of licenses can
636 be tested for equality, containment, and equivalence. They can be normalised
637 and simplified. It supports SPDX license expressions as well as other naming
638 conventions and aliases in the same expression.")
639 (license license:gpl2+)))
640
641 (define-public python-lockfile
642 (package
643 (name "python-lockfile")
644 (version "0.12.2")
645 (source
646 (origin
647 (method url-fetch)
648 (uri (pypi-uri "lockfile" version))
649 (sha256
650 (base32
651 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
652 (build-system python-build-system)
653 (arguments '(#:test-target "check"))
654 (native-inputs
655 `(("python-pbr" ,python-pbr)))
656 (home-page "https://launchpad.net/pylockfile")
657 (synopsis "Platform-independent file locking module")
658 (description
659 "The lockfile package exports a LockFile class which provides a simple
660 API for locking files.")
661 (license license:expat)))
662
663 (define-public python2-lockfile
664 (package-with-python2 python-lockfile))
665
666 (define-public python-semantic-version
667 (package
668 (name "python-semantic-version")
669 (version "2.6.0")
670 (source
671 (origin
672 (method url-fetch)
673 (uri (pypi-uri "semantic_version" version))
674 (sha256
675 (base32
676 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
677 (build-system python-build-system)
678 (arguments
679 `(#:tests? #f)) ; PyPI tarball lacks tests
680 (home-page "https://github.com/rbarrois/python-semanticversion")
681 (synopsis "Semantic versioning module for Python")
682 (description
683 "The @code{semantic_version} class is a small library for handling
684 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
685
686 It can compare versions, generate a new version that represents a bump in one of
687 the version levels, and check whether any given string is a proper semantic
688 version identifier.")
689 (license license:bsd-3)))
690
691 (define-public python2-semantic-version
692 (package-with-python2 python-semantic-version))
693
694 (define-public python-serpent
695 (package
696 (name "python-serpent")
697 (version "1.28")
698 (source
699 (origin
700 (method url-fetch)
701 (uri (pypi-uri "serpent" version))
702 (sha256
703 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
704 (build-system python-build-system)
705 (native-inputs
706 `(("python-attrs" ,python-attrs)
707 ("python-pytz" ,python-pytz)))
708 (home-page "https://github.com/irmen/Serpent")
709 (synopsis "Serializer for literal Python expressions")
710 (description
711 "Serpent provides @code{ast.literal_eval()}-compatible object tree
712 serialization. It serializes an object tree into bytes (an utf-8 encoded
713 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
714 to rebuild the original object tree.
715
716 Because only safe literals are encoded, it is safe to send serpent data to
717 other machines, such as over the network.")
718 (license license:expat)))
719
720 (define-public python-setuptools
721 (package
722 (name "python-setuptools")
723 (version "41.0.1")
724 (source
725 (origin
726 (method url-fetch)
727 (uri (pypi-uri "setuptools" version ".zip"))
728 (sha256
729 (base32
730 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
731 (modules '((guix build utils)))
732 (snippet
733 '(begin
734 ;; Remove included binaries which are used to build self-extracting
735 ;; installers for Windows.
736 ;; TODO: Find some way to build them ourself so we can include them.
737 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
738 #t))))
739 (build-system python-build-system)
740 ;; FIXME: Tests require pytest, which itself relies on setuptools.
741 ;; One could bootstrap with an internal untested setuptools.
742 (arguments
743 `(#:tests? #f))
744 (home-page "https://pypi.python.org/pypi/setuptools")
745 (synopsis
746 "Library designed to facilitate packaging Python projects")
747 (description
748 "Setuptools is a fully-featured, stable library designed to facilitate
749 packaging Python projects, where packaging includes:
750 Python package and module definitions,
751 distribution package metadata,
752 test hooks,
753 project installation,
754 platform-specific details,
755 Python 3 support.")
756 ;; TODO: setuptools now bundles the following libraries:
757 ;; packaging, pyparsing, six and appdirs. How to unbundle?
758 (license (list license:psfl ; setuptools itself
759 license:expat ; six, appdirs, pyparsing
760 license:asl2.0 ; packaging is dual ASL2/BSD-2
761 license:bsd-2))))
762
763 (define-public python2-setuptools
764 (package-with-python2 python-setuptools))
765
766 ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
767 (define-public python-setuptools-for-tensorflow
768 (hidden-package
769 (package
770 (inherit python-setuptools)
771 (version "39.1.0")
772 (source (origin
773 (inherit (package-source python-setuptools))
774 (uri (pypi-uri "setuptools" version ".zip"))
775 (sha256
776 (base32
777 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
778
779 (define-public python-uniseg
780 (package
781 (name "python-uniseg")
782 (version "0.7.1")
783 (source
784 (origin
785 (method url-fetch)
786 (uri (pypi-uri "uniseg" version ".zip"))
787 (sha256
788 (base32
789 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
790 (build-system python-build-system)
791 (arguments
792 '(#:tests? #f)) ; The test suite requires network access.
793 (native-inputs
794 `(("unzip" ,unzip)))
795 (home-page
796 "https://bitbucket.org/emptypage/uniseg-python")
797 (synopsis
798 "Python library to determine Unicode text segmentations")
799 (description
800 "Uniseg is a Python package used to determine Unicode text segmentations.
801 Supported segmentations include:
802 @enumerate
803 @item @dfn{Code point} (any value in the Unicode codespace)
804 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
805 multiple Unicode code points, e.g. \"G\" + acute-accent)
806 @item Word break
807 @item Sentence break
808 @item Line break
809 @end enumerate")
810 (license license:expat)))
811
812 (define-public python2-uniseg
813 (package-with-python2 python-uniseg))
814
815 (define-public python-humanfriendly
816 (package
817 (name "python-humanfriendly")
818 (version "4.4.1")
819 (source
820 (origin
821 (method url-fetch)
822 (uri (pypi-uri "humanfriendly" version))
823 (sha256
824 (base32
825 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
826 (build-system python-build-system)
827 (arguments
828 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
829 #:tests? #f))
830 (propagated-inputs
831 `(("python-monotonic" ,python-monotonic)))
832 (home-page "https://humanfriendly.readthedocs.io")
833 (synopsis "Human-friendly input and output in Python")
834 (description
835 "The functions and classes in @code{humanfriendly} can be used to make
836 text interfaces more user-friendly. It includes tools to parse and format
837 numbers, file sizes, and timespans, timers for long-running operations, menus
838 to allow the user to choose from a list of options, and terminal interaction
839 helpers.")
840 (license license:expat)))
841
842 (define-public python2-humanfriendly
843 (package-with-python2 python-humanfriendly))
844
845 (define-public python-capturer
846 (package
847 (name "python-capturer")
848 (version "2.4")
849 (source
850 (origin
851 (method url-fetch)
852 (uri (pypi-uri "capturer" version))
853 (sha256
854 (base32
855 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
856 (build-system python-build-system)
857 (arguments
858 `(#:tests? #f))
859 (propagated-inputs
860 `(("python-humanfriendly" ,python-humanfriendly)))
861 (home-page "https://capturer.readthedocs.io")
862 (synopsis "Capture stdout and stderr streams of the current process")
863 (description
864 "The capturer package makes it easy to capture the stdout and stderr
865 streams of the current process and subprocesses. Output can be relayed
866 to the terminal in real time but is also available to the Python program
867 for additional processing.")
868 (license license:expat)))
869
870 (define-public python2-capturer
871 (package-with-python2 python-capturer))
872
873 (define-public python-case
874 (package
875 (name "python-case")
876 (version "1.5.3")
877 (source
878 (origin
879 (method url-fetch)
880 (uri (pypi-uri "case" version))
881 (sha256
882 (base32
883 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
884 (build-system python-build-system)
885 (propagated-inputs
886 `(("python-mock" ,python-mock)
887 ("python-nose" ,python-nose)
888 ("python-six" ,python-six)
889 ("python-unittest2" ,python-unittest2)))
890 (native-inputs
891 `(("python-coverage" ,python-coverage)))
892 (home-page "https://github.com/celery/case")
893 (synopsis "Unittest utilities and convenience methods")
894 (description
895 "The @code{case} package provides utilities on top of unittest, including
896 some helpful Python 2 compatibility convenience methods.")
897 (license license:bsd-3)))
898
899 (define-public python-verboselogs
900 (package
901 (name "python-verboselogs")
902 (version "1.7")
903 (source
904 (origin
905 (method url-fetch)
906 (uri (pypi-uri "verboselogs" version))
907 (sha256
908 (base32
909 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
910 (build-system python-build-system)
911 (arguments
912 `(#:phases
913 (modify-phases %standard-phases
914 (replace 'check
915 (lambda _
916 ;; Do not run pylint plugin test, as astroid is an old
917 ;; unsupported version.
918 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
919 "verboselogs/tests.py"))))))
920 (native-inputs
921 `(("python-mock" ,python-mock)
922 ("python-pytest" ,python-pytest)))
923 (home-page "https://verboselogs.readthedocs.io")
924 (synopsis "Verbose logging level for Python's logging module")
925 (description
926 "The @code{verboselogs} package extends Python's @code{logging} module to
927 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
928 (license license:expat)))
929
930 (define-public python2-verboselogs
931 (package-with-python2 python-verboselogs))
932
933 (define-public python-coloredlogs
934 (package
935 (name "python-coloredlogs")
936 (version "10.0")
937 (source
938 (origin
939 (method url-fetch)
940 (uri (pypi-uri "coloredlogs" version))
941 (sha256
942 (base32
943 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
944 (build-system python-build-system)
945 (arguments
946 `(;Tests require some updated modules
947 #:tests? #f))
948 (propagated-inputs
949 `(("python-capturer" ,python-capturer)))
950 (home-page "https://coloredlogs.readthedocs.io")
951 (synopsis "Colored stream handler for Python's logging module")
952 (description
953 "The @code{coloredlogs} package enables colored terminal output for
954 Python's logging module. The @code{ColoredFormatter} class inherits from
955 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
956 messages in color.")
957 (license license:expat)))
958
959 (define-public python2-coloredlogs
960 (package-with-python2 python-coloredlogs))
961
962 (define-public python-editorconfig
963 (package
964 (name "python-editorconfig")
965 (version "0.12.2")
966 (source
967 (origin
968 (method url-fetch)
969 (uri (pypi-uri "EditorConfig" version))
970 (sha256
971 (base32
972 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
973 (build-system python-build-system)
974 (home-page "https://editorconfig.org/")
975 (synopsis "EditorConfig bindings for python")
976 (description "The EditorConfig project consists of a file format for
977 defining coding styles and a collection of text editor plugins that enable
978 editors to read the file format and adhere to defined styles. EditorConfig
979 files are easily readable and they work nicely with version control systems.")
980 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
981 (license (list license:bsd-2 license:psfl))))
982
983 (define-public python-et-xmlfile
984 (package
985 (name "python-et-xmlfile")
986 (version "1.0.1")
987 (source
988 (origin
989 (method url-fetch)
990 (uri (pypi-uri "et_xmlfile" version))
991 (sha256
992 (base32
993 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
994 (build-system python-build-system)
995 (arguments
996 `(#:phases (modify-phases %standard-phases
997 (replace 'check
998 (lambda _
999 (invoke "pytest"))))))
1000 (native-inputs
1001 `(("python-pytest" ,python-pytest)
1002 ("python-lxml" ,python-lxml))) ;used for the tests
1003 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
1004 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
1005 (description "This Python library is based upon the @code{xmlfile} module
1006 from @code{lxml}. It aims to provide a low memory, compatible implementation
1007 of @code{xmlfile}.")
1008 (license license:expat)))
1009
1010 (define-public python2-et-xmlfile
1011 (package-with-python2 python-et-xmlfile))
1012
1013 (define-public python-openpyxl
1014 (package
1015 (name "python-openpyxl")
1016 (version "2.6.2")
1017 (source
1018 (origin
1019 ;; We use the upstream repository, as the tests are not included in the
1020 ;; PyPI releases.
1021 (method hg-fetch)
1022 (uri (hg-reference
1023 (url "https://bitbucket.org/openpyxl/openpyxl")
1024 (changeset version)))
1025 (file-name (string-append name "-" version "-checkout"))
1026 (sha256
1027 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
1028 (build-system python-build-system)
1029 (arguments
1030 `(#:phases (modify-phases %standard-phases
1031 (replace 'check
1032 (lambda _
1033 (invoke "pytest"))))))
1034 (native-inputs
1035 ;; For the test suite.
1036 `(("python-lxml" ,python-lxml)
1037 ("python-pillow" ,python-pillow)
1038 ("python-pytest" ,python-pytest)))
1039 (propagated-inputs
1040 `(("python-et-xmlfile" ,python-et-xmlfile)
1041 ("python-jdcal" ,python-jdcal)))
1042 (home-page "https://openpyxl.readthedocs.io")
1043 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1044 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1045 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1046 standard.")
1047 (license license:expat)))
1048
1049 (define-public python-eventlet
1050 (package
1051 (name "python-eventlet")
1052 (version "0.20.1")
1053 (source
1054 (origin
1055 (method url-fetch)
1056 (uri (pypi-uri "eventlet" version))
1057 (sha256
1058 (base32
1059 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
1060 (build-system python-build-system)
1061 (propagated-inputs
1062 `(("python-greenlet" ,python-greenlet)))
1063 (arguments
1064 ;; TODO: Requires unpackaged 'enum-compat'.
1065 '(#:tests? #f))
1066 (home-page "http://eventlet.net")
1067 (synopsis "Concurrent networking library for Python")
1068 (description
1069 "Eventlet is a concurrent networking library for Python that
1070 allows you to change how you run your code, not how you write it.
1071 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1072 Coroutines ensure that the developer uses a blocking style of programming
1073 that is similar to threading, but provide the benefits of non-blocking I/O.
1074 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1075 from the Python interpreter, or as a small part of a larger application.")
1076 (license license:expat)))
1077
1078 (define-public python2-eventlet
1079 (let ((base (package-with-python2
1080 (strip-python2-variant python-eventlet))))
1081 (package (inherit base)
1082 (propagated-inputs
1083 `(("python2-enum34" ,python2-enum34)
1084 ,@(package-propagated-inputs base))))))
1085
1086 (define-public python-six
1087 (package
1088 (name "python-six")
1089 (version "1.12.0")
1090 (source
1091 (origin
1092 (method url-fetch)
1093 (uri (pypi-uri "six" version))
1094 (sha256
1095 (base32
1096 "0wxs1q74v07ssjywbbm7x6h5v9qx209ld2yfsif4060sxi0h2sni"))))
1097 (build-system python-build-system)
1098 (arguments
1099 `(#:phases
1100 (modify-phases %standard-phases
1101 (replace 'check
1102 (lambda _
1103 (invoke "py.test" "-v"))))))
1104 (native-inputs
1105 `(("python-py" ,python-py)
1106 ("python-pytest" ,python-pytest-bootstrap)))
1107 (home-page "https://pypi.python.org/pypi/six/")
1108 (synopsis "Python 2 and 3 compatibility utilities")
1109 (description
1110 "Six is a Python 2 and 3 compatibility library. It provides utility
1111 functions for smoothing over the differences between the Python versions with
1112 the goal of writing Python code that is compatible on both Python versions.
1113 Six supports every Python version since 2.5. It is contained in only one
1114 Python file, so it can be easily copied into your project.")
1115 (license license:x11)))
1116
1117 (define-public python2-six
1118 (package-with-python2 python-six))
1119
1120 (define-public python-six-bootstrap
1121 (package
1122 (inherit python-six)
1123 (name "python-six-bootstrap")
1124 (native-inputs `())
1125 (arguments `(#:tests? #f))))
1126
1127 (define-public python2-six-bootstrap
1128 (package-with-python2 python-six-bootstrap))
1129
1130 (define-public python-schedule
1131 (package
1132 (name "python-schedule")
1133 (version "0.4.3")
1134 (source
1135 (origin
1136 (method url-fetch)
1137 (uri (pypi-uri "schedule" version))
1138 (sha256
1139 (base32
1140 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1141 (build-system python-build-system)
1142 (native-inputs
1143 `(("python-pytest" ,python-pytest)
1144 ("python-mock" ,python-mock)))
1145 (home-page "https://github.com/dbader/schedule")
1146 (synopsis "Schedule periodic function calls in Python")
1147 (description
1148 "Schedule is an in-process scheduler for periodic jobs that uses the
1149 builder pattern for configuration. Schedule lets you run Python functions (or
1150 any other callable) periodically at pre-determined intervals using a simple,
1151 human-friendly syntax.")
1152 (license license:expat)))
1153
1154 (define-public python2-schedule
1155 (package-with-python2 python-schedule))
1156
1157 (define-public python-pandas
1158 (package
1159 (name "python-pandas")
1160 (version "0.24.2")
1161 (source
1162 (origin
1163 (method url-fetch)
1164 (uri (pypi-uri "pandas" version))
1165 (sha256
1166 (base32 "18imlm8xbhcbwy4wa957a1fkamrcb0z988z006jpfda3ki09z4ag"))))
1167 (build-system python-build-system)
1168 (arguments
1169 `(#:modules ((guix build utils)
1170 (guix build python-build-system)
1171 (ice-9 ftw)
1172 (srfi srfi-26))
1173 #:phases (modify-phases %standard-phases
1174 (add-after 'unpack 'patch-which
1175 (lambda* (#:key inputs #:allow-other-keys)
1176 (let ((which (assoc-ref inputs "which")))
1177 (substitute* "pandas/io/clipboard/__init__.py"
1178 (("^CHECK_CMD = .*")
1179 (string-append "CHECK_CMD = \"" which "\"\n"))))
1180 #t))
1181 (replace 'check
1182 (lambda _
1183 (let ((build-directory
1184 (string-append
1185 (getcwd) "/build/"
1186 (car (scandir "build"
1187 (cut string-prefix? "lib." <>))))))
1188 ;; Disable the "strict data files" option which causes
1189 ;; the build to error out if required data files are
1190 ;; not available (as is the case with PyPI archives).
1191 (substitute* "setup.cfg"
1192 (("addopts = --strict-data-files") "addopts = "))
1193 (with-directory-excursion build-directory
1194 ;; Delete tests that require "moto" which is not yet
1195 ;; in Guix.
1196 (for-each delete-file
1197 '("pandas/tests/io/conftest.py"
1198 "pandas/tests/io/json/test_compression.py"
1199 "pandas/tests/io/parser/test_network.py"
1200 "pandas/tests/io/test_parquet.py"))
1201 (invoke "pytest" "-vv" "pandas" "--skip-slow"
1202 "--skip-network" "-k"
1203 ;; XXX: Due to the deleted tests above.
1204 "not test_read_s3_jsonl"))))))))
1205 (propagated-inputs
1206 `(("python-numpy" ,python-numpy)
1207 ("python-openpyxl" ,python-openpyxl)
1208 ("python-pytz" ,python-pytz)
1209 ("python-dateutil" ,python-dateutil)
1210 ("python-xlrd" ,python-xlrd)))
1211 (inputs
1212 `(("which" ,which)))
1213 (native-inputs
1214 `(("python-cython" ,python-cython)
1215 ("python-beautifulsoup4" ,python-beautifulsoup4)
1216 ("python-lxml" ,python-lxml)
1217 ("python-html5lib" ,python-html5lib)
1218 ("python-nose" ,python-nose)
1219 ("python-pytest" ,python-pytest)
1220 ("python-pytest-mock" ,python-pytest-mock)))
1221 (home-page "https://pandas.pydata.org")
1222 (synopsis "Data structures for data analysis, time series, and statistics")
1223 (description
1224 "Pandas is a Python package providing fast, flexible, and expressive data
1225 structures designed to make working with structured (tabular,
1226 multidimensional, potentially heterogeneous) and time series data both easy
1227 and intuitive. It aims to be the fundamental high-level building block for
1228 doing practical, real world data analysis in Python.")
1229 (license license:bsd-3)))
1230
1231 (define-public python2-pandas
1232 (package-with-python2 python-pandas))
1233
1234 (define-public python2-mechanize
1235 (package
1236 (name "python2-mechanize")
1237 (version "0.2.5")
1238 (source
1239 (origin
1240 (method url-fetch)
1241 (uri (pypi-uri "mechanize" version))
1242 (sha256
1243 (base32
1244 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1245 (build-system python-build-system)
1246 (arguments
1247 `(#:python ,python-2 ; apparently incompatible with Python 3
1248 #:tests? #f))
1249 ;; test fails with message
1250 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1251 ;; (python-3.3.2) or
1252 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1253 ;; (python-2.7.5).
1254 ;; The source code is from March 2011 and probably not up-to-date
1255 ;; with respect to python unit tests.
1256 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1257 (synopsis
1258 "Stateful programmatic web browsing in Python")
1259 (description
1260 "Mechanize implements stateful programmatic web browsing in Python,
1261 after Andy Lester’s Perl module WWW::Mechanize.")
1262 (license (license:non-copyleft
1263 "file://COPYING"
1264 "See COPYING in the distribution."))))
1265
1266
1267 (define-public python-simplejson
1268 (package
1269 (name "python-simplejson")
1270 (version "3.14.0")
1271 (source
1272 (origin
1273 (method url-fetch)
1274 (uri (pypi-uri "simplejson" version))
1275 (sha256
1276 (base32
1277 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1278 (build-system python-build-system)
1279 (home-page "http://simplejson.readthedocs.org/en/latest/")
1280 (synopsis
1281 "Json library for Python")
1282 (description
1283 "JSON (JavaScript Object Notation) is a subset of JavaScript
1284 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1285 format.
1286
1287 Simplejson exposes an API familiar to users of the standard library marshal
1288 and pickle modules. It is the externally maintained version of the json
1289 library contained in Python 2.6, but maintains compatibility with Python 2.5
1290 and (currently) has significant performance advantages, even without using
1291 the optional C extension for speedups. Simplejson is also supported on
1292 Python 3.3+.")
1293 (license license:x11)))
1294
1295 (define-public python2-simplejson
1296 (package-with-python2 python-simplejson))
1297
1298
1299 (define-public python-pyicu
1300 (package
1301 (name "python-pyicu")
1302 (version "2.3.1")
1303 (source
1304 (origin
1305 (method url-fetch)
1306 (uri (pypi-uri "PyICU" version))
1307 (sha256
1308 (base32
1309 "1x4w8m7ifki9z2a187pgjr33z6z0rp2fii9b73djak1vhm9v9cnx"))))
1310 (build-system python-build-system)
1311 (inputs
1312 `(("icu4c" ,icu4c)))
1313 (native-inputs
1314 `(("python-pytest" ,python-pytest)
1315 ("python-six" ,python-six)))
1316 (home-page "https://github.com/ovalhub/pyicu")
1317 (synopsis "Python extension wrapping the ICU C++ API")
1318 (description
1319 "PyICU is a python extension wrapping the ICU C++ API.")
1320 (properties `((python2-variant . ,(delay python2-pyicu))))
1321 (license license:x11)))
1322
1323 (define-public python2-pyicu
1324 (let ((base (package-with-python2
1325 (strip-python2-variant python-pyicu))))
1326 (package
1327 (inherit base)
1328 (arguments
1329 `(,@(package-arguments base)
1330 #:phases
1331 (modify-phases %standard-phases
1332 (add-before 'check 'delete-failing-test
1333 (λ _
1334 ;; XXX: This fails due to Unicode issues unique to Python 2,
1335 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1336 (delete-file "test/test_Script.py")
1337 #t))))))))
1338
1339 (define-public python2-dogtail
1340 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1341 ;; spaces in indentation" with Python 3.
1342 (package
1343 (name "python2-dogtail")
1344 (version "0.9.9")
1345 (source (origin
1346 (method url-fetch)
1347 (uri (pypi-uri "dogtail" version))
1348 (sha256
1349 (base32
1350 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1351 (build-system python-build-system)
1352 (arguments `(#:python ,python-2
1353 #:tests? #f)) ; invalid command "test"
1354 ;; Currently no offical homepage.
1355 (home-page "https://pypi.python.org/pypi/dogtail/")
1356 (synopsis "GUI test tool and automation framework written in Python")
1357 (description
1358 "Dogtail is a GUI test tool and automation framework written in Python.
1359 It uses Accessibility (a11y) technologies to communicate with desktop
1360 applications. dogtail scripts are written in Python and executed like any
1361 other Python program.")
1362 (license license:gpl2+)))
1363
1364 (define-public python-empy
1365 (package
1366 (name "python-empy")
1367 (version "3.3.3")
1368 (source (origin
1369 (method url-fetch)
1370 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1371 version ".tar.gz"))
1372 (sha256
1373 (base32
1374 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
1375 (build-system python-build-system)
1376 (arguments
1377 `(#:tests? #f)) ; python2 only
1378 (home-page "http://www.alcyone.com/software/empy/")
1379 (synopsis "Templating system for Python")
1380 (description
1381 "EmPy is a system for embedding Python expressions and statements in
1382 template text; it takes an EmPy source file, processes it, and produces
1383 output. This is accomplished via expansions, which are special signals to the
1384 EmPy system and are set off by a special prefix (by default the at sign, @@).
1385 EmPy can expand arbitrary Python expressions and statements in this way, as
1386 well as a variety of special forms. Textual data not explicitly delimited in
1387 this way is sent unaffected to the output, allowing Python to be used in
1388 effect as a markup language. Also supported are callbacks via hooks,
1389 recording and playback via diversions, and dynamic, chainable filters. The
1390 system is highly configurable via command line options and embedded
1391 commands.")
1392 (license license:lgpl2.1+)))
1393
1394 (define-public python2-empy
1395 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1396 (package
1397 (inherit base)
1398 (arguments `(,@(package-arguments base)
1399 #:tests? #t)))))
1400
1401 (define-public python2-element-tree
1402 (package
1403 (name "python2-element-tree")
1404 (version "1.2.6")
1405 (source (origin
1406 (method url-fetch)
1407 (uri (string-append
1408 "http://effbot.org/media/downloads/elementtree-"
1409 version "-20050316.tar.gz"))
1410 (sha256
1411 (base32
1412 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1413 (build-system python-build-system)
1414 (arguments
1415 `(#:python ,python-2 ; seems to be part of Python 3
1416 #:tests? #f)) ; no 'test' sub-command
1417 (synopsis "Toolkit for XML processing in Python")
1418 (description
1419 "ElementTree is a Python library supporting lightweight XML processing.")
1420 (home-page "http://effbot.org/zone/element-index.htm")
1421 (license (license:x11-style
1422 "http://docs.python.org/2/license.html"
1423 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1424
1425 (define-public python2-pybugz
1426 (package
1427 (name "python2-pybugz")
1428 (version "0.6.11")
1429 (source (origin
1430 (method url-fetch)
1431 (uri (string-append
1432 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1433 version ".tar.gz"))
1434 (sha256
1435 (base32
1436 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1437 (patches (search-patches "pybugz-stty.patch"
1438 "pybugz-encode-error.patch"))))
1439 (build-system python-build-system)
1440 (arguments
1441 `(#:python ,python-2 ; SyntaxError with Python 3
1442 #:tests? #f)) ; no 'test' sub-command
1443 (propagated-inputs
1444 `(("element-tree" ,python2-element-tree)))
1445 (synopsis "Python and command-line interface to Bugzilla")
1446 (description
1447 "PyBugz is a Python library and command-line tool to query the Bugzilla
1448 bug tracking system. It is meant as an aid to speed up interaction with the
1449 bug tracker.")
1450 (home-page "http://www.liquidx.net/pybugz/")
1451 (license license:gpl2)))
1452
1453 (define-public python2-enum
1454 (package
1455 (name "python2-enum")
1456 (version "0.4.6")
1457 (source (origin
1458 (method url-fetch)
1459 (uri (pypi-uri "enum" version))
1460 (sha256
1461 (base32
1462 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1463 (build-system python-build-system)
1464 (arguments
1465 `(#:python ,python-2))
1466 (home-page "http://pypi.python.org/pypi/enum/")
1467 (synopsis "Robust enumerated type support in Python")
1468 (description
1469 "This provides a module for robust enumerations in Python. It has
1470 been superseded by the Python standard library and is provided only for
1471 compatibility.")
1472 ;; Choice of either license.
1473 (license (list license:gpl3+ license:psfl))))
1474
1475 (define-public python-enum34
1476 (package
1477 (name "python-enum34")
1478 (version "1.1.6")
1479 (source
1480 (origin
1481 (method url-fetch)
1482 (uri (pypi-uri "enum34" version))
1483 (sha256
1484 (base32
1485 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1486 (build-system python-build-system)
1487 (home-page "https://pypi.python.org/pypi/enum34")
1488 (synopsis "Backported Python 3.4 Enum")
1489 (description
1490 "Enum34 is the new Python stdlib enum module available in Python 3.4
1491 backported for previous versions of Python from 2.4 to 3.3.")
1492 (license license:bsd-3)))
1493
1494 (define-public python2-enum34
1495 (package-with-python2 python-enum34))
1496
1497 (define-public python-parse-type
1498 (package
1499 (name "python-parse-type")
1500 (version "0.4.2")
1501 (source
1502 (origin
1503 (method url-fetch)
1504 (uri (pypi-uri "parse_type" version))
1505 (sha256
1506 (base32
1507 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1508 (build-system python-build-system)
1509 (propagated-inputs
1510 `(("python-six" ,python-six)
1511 ("python-parse" ,python-parse)))
1512 (native-inputs
1513 `(("python-pytest" ,python-pytest)
1514 ("python-pytest-runner" ,python-pytest-runner)))
1515 (home-page "https://github.com/jenisys/parse_type")
1516 (synopsis "Extended parse module")
1517 (description
1518 "Parse_type extends the python parse module.")
1519 (properties
1520 `((python2-variant . ,(delay python2-parse-type))))
1521 (license license:bsd-3)))
1522
1523 (define-public python2-parse-type
1524 (let ((base (package-with-python2
1525 (strip-python2-variant python-parse-type))))
1526 (package (inherit base)
1527 (propagated-inputs
1528 `(("python2-enum34" ,python2-enum34)
1529 ,@(package-propagated-inputs base))))))
1530
1531 (define-public python-parse
1532 (package
1533 (name "python-parse")
1534 (version "1.8.4")
1535 (source
1536 (origin
1537 (method url-fetch)
1538 (uri (pypi-uri "parse" version))
1539 (sha256
1540 (base32
1541 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1542 (build-system python-build-system)
1543 (arguments
1544 `(#:phases
1545 (modify-phases %standard-phases
1546 (replace 'check
1547 (lambda _ (invoke "python" "test_parse.py"))))))
1548 (home-page "https://github.com/r1chardj0n3s/parse")
1549 (synopsis "Parse strings")
1550 (description
1551 "Parse strings using a specification based on the Python @code{format()}
1552 syntax.")
1553 (license license:x11)))
1554
1555 (define-public python-polib
1556 (package
1557 (name "python-polib")
1558 (version "1.0.8")
1559 (source (origin
1560 (method url-fetch)
1561 (uri (pypi-uri "polib" version))
1562 (sha256
1563 (base32
1564 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1565 (build-system python-build-system)
1566 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1567 (synopsis "Manipulate, create and modify gettext files")
1568 (description "Polib can manipulate any gettext format (po, pot and mo)
1569 files. It can be used to create po files from scratch or to modify
1570 existing ones.")
1571 (license license:expat)))
1572
1573 (define-public python2-polib
1574 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1575 (package
1576 (inherit base)
1577 (arguments `(,@(package-arguments base)
1578 ;; Tests don't work with python2.
1579 #:tests? #f)))))
1580
1581 (define-public python-poyo
1582 (package
1583 (name "python-poyo")
1584 (version "0.5.0")
1585 (source
1586 (origin
1587 (method url-fetch)
1588 (uri (pypi-uri "poyo" version))
1589 (sha256
1590 (base32
1591 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
1592 (build-system python-build-system)
1593 (home-page "https://github.com/hackebrot/poyo")
1594 (synopsis "Lightweight YAML Parser for Python")
1595 (description
1596 "This package provides a lightweight YAML Parser for Python. It supports
1597 only a chosen subset of the YAML format that is required to parse cookiecutter
1598 user configuration files. It does not have support for serializing into YAML
1599 and is not compatible with JSON.")
1600 (license license:expat)))
1601
1602 (define-public scons
1603 (package
1604 (name "scons")
1605 (version "3.0.4")
1606 (source (origin
1607 (method git-fetch)
1608 (uri (git-reference
1609 (url "https://github.com/SCons/scons.git")
1610 (commit version)))
1611 (file-name (git-file-name name version))
1612 (sha256
1613 (base32
1614 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
1615 (build-system python-build-system)
1616 (arguments
1617 `(#:use-setuptools? #f ; still relies on distutils
1618 #:tests? #f ; no 'python setup.py test' command
1619 #:phases
1620 (modify-phases %standard-phases
1621 (add-before 'build 'bootstrap
1622 (lambda _
1623 (substitute* "src/engine/SCons/compat/__init__.py"
1624 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1625 "sys.modules[new] = __import__(old)"))
1626 (substitute* "src/engine/SCons/Platform/__init__.py"
1627 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1628 "mod = __import__(full_name)"))
1629 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1630 (chdir "build/scons")
1631 #t)))))
1632 (home-page "http://scons.org/")
1633 (synopsis "Software construction tool written in Python")
1634 (description
1635 "SCons is a software construction tool. Think of SCons as an improved,
1636 cross-platform substitute for the classic Make utility with integrated
1637 functionality similar to autoconf/automake and compiler caches such as ccache.
1638 In short, SCons is an easier, more reliable and faster way to build
1639 software.")
1640 (license license:x11)))
1641
1642 (define-public scons-python2
1643 (package
1644 (inherit (package-with-python2 scons))
1645 (name "scons-python2")))
1646
1647 (define-public python-extras
1648 (package
1649 (name "python-extras")
1650 (version "1.0.0")
1651 (source
1652 (origin
1653 (method url-fetch)
1654 (uri (pypi-uri "extras" version))
1655 (sha256
1656 (base32
1657 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1658 (build-system python-build-system)
1659 (arguments
1660 ;; FIXME: Circular dependency on testtools.
1661 '(#:tests? #f))
1662 (home-page "https://github.com/testing-cabal/extras")
1663 (synopsis "Useful extensions to the Python standard library")
1664 (description
1665 "Extras is a set of extensions to the Python standard library.")
1666 (license license:expat)))
1667
1668 (define-public python2-extras
1669 (package-with-python2 python-extras))
1670
1671 (define-public python-mimeparse
1672 (package
1673 (name "python-mimeparse")
1674 (version "1.6.0")
1675 (source
1676 (origin
1677 (method url-fetch)
1678 (uri (pypi-uri "python-mimeparse" version))
1679 (sha256
1680 (base32
1681 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1682 (build-system python-build-system)
1683 (arguments
1684 '(#:phases
1685 (modify-phases %standard-phases
1686 (replace 'check
1687 (lambda _
1688 (invoke "./mimeparse_test.py"))))))
1689 (home-page
1690 "https://github.com/dbtsai/python-mimeparse")
1691 (synopsis "Python library for parsing MIME types")
1692 (description
1693 "Mimeparse provides basic functions for parsing MIME type names and
1694 matching them against a list of media-ranges.")
1695 (license license:expat)))
1696
1697 (define-public python2-mimeparse
1698 (package-with-python2 python-mimeparse))
1699
1700 (define-public python-miniboa
1701 (package
1702 (name "python-miniboa")
1703 (version "1.0.7")
1704 (source
1705 (origin
1706 (method url-fetch)
1707 (uri (pypi-uri "miniboa" version))
1708 (sha256
1709 (base32
1710 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1711 (build-system python-build-system)
1712 (home-page "https://github.com/shmup/miniboa")
1713 (synopsis "Simple, single-threaded Telnet server")
1714 (description
1715 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1716 server.")
1717 (license license:asl2.0)))
1718
1719 (define-public python2-miniboa
1720 (package-with-python2 python-miniboa))
1721
1722 (define-public python-pafy
1723 (package
1724 (name "python-pafy")
1725 (version "0.5.3.1")
1726 (source
1727 (origin
1728 (method url-fetch)
1729 (uri (pypi-uri "pafy" version))
1730 (sha256
1731 (base32
1732 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1733 (build-system python-build-system)
1734 (arguments
1735 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1736 (propagated-inputs
1737 ;; Youtube-dl is a python package which is imported in the file
1738 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1739 `(("youtube-dl" ,youtube-dl)))
1740 (home-page "https://np1.github.io/pafy/")
1741 (synopsis "Retrieve YouTube content and metadata")
1742 (description
1743 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1744 (license license:lgpl3+)))
1745
1746 (define-public python2-funcsigs
1747 (package
1748 (name "python2-funcsigs")
1749 (version "1.0.2")
1750 (source (origin
1751 (method url-fetch)
1752 (uri (pypi-uri "funcsigs" version))
1753 (sha256
1754 (base32
1755 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1756 (build-system python-build-system)
1757 (arguments
1758 `(#:python ,python-2))
1759 (native-inputs
1760 `(("python2-unittest2" ,python2-unittest2)))
1761 (home-page "http://funcsigs.readthedocs.org")
1762 (synopsis "Python function signatures from PEP362")
1763 (description
1764 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1765 (license license:asl2.0)))
1766
1767 (define-public python2-funcsigs-bootstrap
1768 (package
1769 (inherit python2-funcsigs)
1770 (name "python2-funcsigs-bootstrap")
1771 (native-inputs `())
1772 (arguments
1773 `(#:tests? #f
1774 ,@(package-arguments python2-funcsigs)))))
1775
1776 (define-public python-py
1777 (package
1778 (name "python-py")
1779 (version "1.8.0")
1780 (source
1781 (origin
1782 (method url-fetch)
1783 (uri (pypi-uri "py" version))
1784 (sha256
1785 (base32
1786 "0lsy1gajva083pzc7csj1cvbmminb7b4l6a0prdzyb3fd829nqyw"))))
1787 (build-system python-build-system)
1788 (arguments
1789 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1790 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1791 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1792 ;; Is this module globally installed?"
1793 '(#:tests? #f))
1794 (native-inputs
1795 `(("python-setuptools-scm" ,python-setuptools-scm)))
1796 (home-page "https://github.com/pytest-dev/py")
1797 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1798 (description
1799 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1800 code introspection, and logging.")
1801 (license license:expat)))
1802
1803 (define-public python2-py
1804 (package-with-python2 python-py))
1805
1806 ;; Recent versions of python-fixtures and python-testrepository need
1807 ;; python-pbr for packaging, which itself needs these two packages for
1808 ;; testing.
1809 ;; To fix this circular dependency, we use a build of python-pbr, based on the
1810 ;; same source, just without any test dependencies and with tests disabled.
1811 ;; python-pbr-minmal is then used to package python-fixtures and
1812 ;; python-testrepository.
1813 ;; Strictly speaking we currently could remove the test-requirements from the
1814 ;; normal python-pbr package (and save this package) since test are disabled
1815 ;; there anyway. But this may change in future.
1816 (define-public python-pbr-minimal
1817 (package
1818 (name "python-pbr-minimal")
1819 (version "3.0.1")
1820 (source
1821 (origin
1822 (method url-fetch)
1823 (uri (pypi-uri "pbr" version))
1824 (sha256
1825 (base32
1826 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1827 (build-system python-build-system)
1828 (arguments
1829 `(#:tests? #f))
1830 (home-page "http://docs.openstack.org/developer/pbr/")
1831 (synopsis "Minimal build of python-pbr used for bootstrapping")
1832 (description
1833 "Used only for bootstrapping python2-pbr, you should not need this.")
1834 (license license:asl2.0)))
1835
1836 (define-public python2-pbr-minimal
1837 (package-with-python2 python-pbr-minimal))
1838
1839 (define-public python-pbr
1840 (package
1841 (inherit python-pbr-minimal)
1842 (name "python-pbr")
1843 (arguments
1844 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1845 (propagated-inputs
1846 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1847 (native-inputs
1848 `(("python-fixtures" ,python-fixtures-bootstrap)
1849 ;; discover, coverage, hacking, subunit
1850 ("python-mock" ,python-mock)
1851 ("python-six" ,python-six)
1852 ("python-sphinx" ,python-sphinx)
1853 ("python-testrepository" ,python-testrepository-bootstrap)
1854 ("python-testresources" ,python-testresources-bootstrap)
1855 ("python-testscenarios" ,python-testscenarios-bootstrap)
1856 ("python-testtools" ,python-testtools-bootstrap)
1857 ("python-virtualenv" ,python-virtualenv)))
1858 (synopsis "Enhance the default behavior of Python’s setuptools")
1859 (description
1860 "Python Build Reasonableness (PBR) is a library that injects some useful
1861 and sensible default behaviors into your setuptools run. It will set
1862 versions, process requirements files and generate AUTHORS and ChangeLog file
1863 from git information.
1864 ")))
1865
1866 (define-public python2-pbr
1867 (package-with-python2 python-pbr))
1868
1869 (define-public python-pyrsistent
1870 (package
1871 (name "python-pyrsistent")
1872 (version "0.14.11")
1873 (home-page "https://github.com/tobgu/pyrsistent")
1874 (source (origin
1875 (method url-fetch)
1876 (uri (pypi-uri "pyrsistent" version))
1877 (sha256
1878 (base32
1879 "1qkh74bm296mp5g3r11lgsksr6bh4w1bf8pji4nmxdlfj542ga1w"))))
1880 (build-system python-build-system)
1881 (native-inputs
1882 `(("python-hypothesis" ,python-hypothesis)
1883 ("python-pytest" ,python-pytest)
1884 ("python-pytest-runner" ,python-pytest-runner)))
1885 (propagated-inputs
1886 `(("python-six" ,python-six)))
1887 (synopsis "Persistent data structures for Python")
1888 (description
1889 "Pyrsistent is a number of persistent collections (by some referred to as
1890 functional data structures). Persistent in the sense that they are immutable.
1891
1892 All methods on a data structure that would normally mutate it instead return a
1893 new copy of the structure containing the requested updates. The original
1894 structure is left untouched.")
1895 (license license:expat)))
1896
1897 (define-public python2-pyrsistent
1898 (package-with-python2 python-pyrsistent))
1899
1900 (define-public python-exif-read
1901 (package
1902 (name "python-exif-read")
1903 (version "2.1.2")
1904 (source (origin
1905 (method url-fetch)
1906 (uri (pypi-uri "ExifRead" version))
1907 (sha256
1908 (base32
1909 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1910 (build-system python-build-system)
1911 (arguments `(#:tests? #f)) ; no tests
1912 (home-page "https://github.com/ianare/exif-py")
1913 (synopsis "Python library to extract EXIF data from image files")
1914 (description
1915 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1916 files.")
1917 (license license:bsd-3)))
1918
1919 (define-public python2-exif-read
1920 (package-with-python2 python-exif-read))
1921
1922 (define-public python-pyld
1923 (package
1924 (name "python-pyld")
1925 (version "1.0.5")
1926 (source (origin
1927 (method url-fetch)
1928 (uri (pypi-uri "PyLD" version))
1929 (sha256
1930 (base32
1931 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
1932 (build-system python-build-system)
1933 (home-page "https://github.com/digitalbazaar/pyld")
1934 (synopsis "Python implementation of the JSON-LD specification")
1935 (description
1936 "PyLD is an implementation of the JSON-LD specification.")
1937 (license license:bsd-3)))
1938
1939 (define-public python2-pyld
1940 (package-with-python2 python-pyld))
1941
1942 (define-public python-click
1943 (package
1944 (name "python-click")
1945 (version "7.0")
1946 (source
1947 (origin
1948 (method url-fetch)
1949 (uri (pypi-uri "click" version))
1950 (sha256
1951 (base32
1952 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
1953 (build-system python-build-system)
1954 (arguments
1955 `(#:phases
1956 (modify-phases %standard-phases
1957 (add-after 'unpack 'fix-paths
1958 (lambda* (#:key inputs #:allow-other-keys)
1959 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1960 "cross-libc" "libc"))))
1961 (substitute* "click/_unicodefun.py"
1962 (("'locale'")
1963 (string-append "'" glibc "/bin/locale'"))))
1964 #t))
1965 (replace 'check
1966 (lambda _
1967 (invoke "python" "-m" "pytest"))))))
1968 (native-inputs
1969 `(("python-pytest" ,python-pytest)))
1970 (home-page "https://palletsprojects.com/p/click/")
1971 (synopsis "Command line library for Python")
1972 (description
1973 "Click is a Python package for creating command line interfaces in a
1974 composable way with as little code as necessary. Its name stands for
1975 \"Command Line Interface Creation Kit\". It's highly configurable but comes
1976 with sensible defaults out of the box.")
1977 (license license:bsd-3)))
1978
1979 (define-public python2-click
1980 (package-with-python2 python-click))
1981
1982 (define-public python-wheel
1983 (package
1984 (name "python-wheel")
1985 (version "0.32.3")
1986 (source
1987 (origin
1988 (method url-fetch)
1989 (uri (pypi-uri "wheel" version))
1990 (sha256
1991 (base32
1992 "1dhxl1bf18bx9szmqcnxbg6204hp3im8089q3hkwh5jfa6zh75q2"))))
1993 (build-system python-build-system)
1994 (native-inputs
1995 `(("python-jsonschema" ,python-jsonschema)
1996 ("python-pytest-cov" ,python-pytest-cov)))
1997 (home-page "https://bitbucket.org/pypa/wheel/")
1998 (synopsis "Format for built Python packages")
1999 (description
2000 "A wheel is a ZIP-format archive with a specially formatted filename and
2001 the @code{.whl} extension. It is designed to contain all the files for a PEP
2002 376 compatible install in a way that is very close to the on-disk format. Many
2003 packages will be properly installed with only the @code{Unpack} step and the
2004 unpacked archive preserves enough information to @code{Spread} (copy data and
2005 scripts to their final locations) at any later time. Wheel files can be
2006 installed with a newer @code{pip} or with wheel's own command line utility.")
2007 (license license:expat)
2008 (properties `((python2-variant . ,(delay python2-wheel))))))
2009
2010 (define-public python2-wheel
2011 (let ((wheel (package-with-python2
2012 (strip-python2-variant python-wheel))))
2013 (package (inherit wheel)
2014 (native-inputs `(("python2-functools32" ,python2-functools32)
2015 ,@(package-native-inputs wheel))))))
2016
2017 (define-public python-vcversioner
2018 (package
2019 (name "python-vcversioner")
2020 (version "2.16.0.0")
2021 (source
2022 (origin
2023 (method url-fetch)
2024 (uri (pypi-uri "vcversioner" version))
2025 (sha256
2026 (base32
2027 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2028 (build-system python-build-system)
2029 (synopsis "Python library for version number discovery")
2030 (description "Vcversioner is a Python library that inspects tagging
2031 information in a variety of version control systems in order to discover
2032 version numbers.")
2033 (home-page "https://github.com/habnabit/vcversioner")
2034 (license license:isc)))
2035
2036 (define-public python2-vcversioner
2037 (package-with-python2 python-vcversioner))
2038
2039 (define-public python-jdcal
2040 (package
2041 (name "python-jdcal")
2042 (version "1.4")
2043 (source
2044 (origin
2045 (method url-fetch)
2046 (uri (pypi-uri "jdcal" version))
2047 (sha256
2048 (base32
2049 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
2050 (build-system python-build-system)
2051 (arguments
2052 `(#:phases (modify-phases %standard-phases
2053 (replace 'check
2054 (lambda _
2055 (invoke "pytest"))))))
2056 (native-inputs
2057 `(("python-pytest" ,python-pytest)))
2058 (home-page "https://github.com/phn/jdcal")
2059 (synopsis "Functions to convert between Julian dates Gregorian dates")
2060 (description "This Python library provides functions for converting
2061 between Julian dates and Gregorian dates.")
2062 (license license:bsd-2)))
2063
2064 (define-public python2-jdcal
2065 (package-with-python2 python-jdcal))
2066
2067 (define-public python-jsonschema
2068 (package
2069 (name "python-jsonschema")
2070 (version "3.0.1")
2071 (source (origin
2072 (method url-fetch)
2073 (uri (pypi-uri "jsonschema" version))
2074 (sha256
2075 (base32
2076 "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc"))))
2077 (build-system python-build-system)
2078 (arguments
2079 '(#:phases
2080 (modify-phases %standard-phases
2081 (replace 'check
2082 (lambda _
2083 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2084 (invoke "trial" "jsonschema"))))))
2085 (native-inputs
2086 `(("python-setuptools_scm" ,python-setuptools-scm)
2087 ("python-twisted" ,python-twisted)))
2088 (propagated-inputs
2089 `(("python-attrs" ,python-attrs)
2090 ("python-pyrsistent" ,python-pyrsistent)
2091 ("python-six" ,python-six)))
2092 (home-page "https://github.com/Julian/jsonschema")
2093 (synopsis "Implementation of JSON Schema for Python")
2094 (description
2095 "Jsonschema is an implementation of JSON Schema for Python.")
2096 (license license:expat)
2097 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2098
2099 (define-public python2-jsonschema
2100 (let ((jsonschema (package-with-python2
2101 (strip-python2-variant python-jsonschema))))
2102 (package (inherit jsonschema)
2103 (propagated-inputs
2104 `(("python2-functools32" ,python2-functools32)
2105 ,@(package-propagated-inputs jsonschema))))))
2106
2107 ;; This old version is still required by docker-compose as of 1.24.0.
2108 (define-public python-jsonschema-2.6
2109 (package
2110 (name "python-jsonschema")
2111 (version "2.6.0")
2112 (source (origin
2113 (method url-fetch)
2114 (uri (pypi-uri "jsonschema" version))
2115 (sha256
2116 (base32
2117 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
2118 (build-system python-build-system)
2119 (arguments
2120 '(#:phases
2121 (modify-phases %standard-phases
2122 (replace 'check (lambda _ (invoke "nosetests"))))))
2123 (native-inputs
2124 `(("python-nose" ,python-nose)
2125 ("python-vcversioner" ,python-vcversioner)))
2126 (home-page "https://github.com/Julian/jsonschema")
2127 (synopsis "Implementation of JSON Schema for Python")
2128 (description
2129 "Jsonschema is an implementation of JSON Schema for Python.")
2130 (license license:expat)
2131 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2132
2133 (define-public python-schema
2134 (package
2135 (name "python-schema")
2136 (version "0.6.6")
2137 (source
2138 (origin
2139 (method url-fetch)
2140 (uri (pypi-uri "schema" version))
2141 (sha256
2142 (base32
2143 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2144 (build-system python-build-system)
2145 (native-inputs
2146 `(("python-pytest" ,python-pytest)))
2147 (home-page "https://github.com/keleshev/schema")
2148 (synopsis "Simple data validation library")
2149 (description
2150 "@code{python-schema} is a library for validating Python data
2151 structures, such as those obtained from config-files, forms, external
2152 services or command-line parsing, converted from JSON/YAML (or
2153 something else) to Python data-types.")
2154 (license license:psfl)))
2155
2156 (define-public python2-schema
2157 (package-with-python2 python-schema))
2158
2159 (define-public python-schema-0.5
2160 (package (inherit python-schema)
2161 (version "0.5.0")
2162 (source
2163 (origin
2164 (method url-fetch)
2165 (uri (pypi-uri "schema" version))
2166 (sha256
2167 (base32
2168 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2169
2170 (define-public python2-schema-0.5
2171 (package-with-python2 python-schema-0.5))
2172
2173 (define-public python-kitchen
2174 (package
2175 (name "python-kitchen")
2176 (version "1.2.5")
2177 (source
2178 (origin
2179 (method url-fetch)
2180 (uri (pypi-uri "kitchen" version))
2181 (sha256
2182 (base32
2183 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2184 (build-system python-build-system)
2185 (propagated-inputs
2186 `(("python-chardet" ,python-chardet)))
2187 (home-page "https://github.com/fedora-infra/kitchen")
2188 (synopsis "Python API for snippets")
2189 (description "@code{kitchen} module provides a python API for all sorts of
2190 little useful snippets of code that everybody ends up writing for their projects
2191 but never seem big enough to build an independent release. Use kitchen and stop
2192 cutting and pasting that code over and over.")
2193 (license (list license:lgpl2.1+
2194 ;; subprocess.py, test_subprocess.py,
2195 ;; kitchen/pycompat25/defaultdict.py:
2196 license:psfl))))
2197
2198 (define-public python2-kitchen
2199 (package-with-python2 python-kitchen))
2200
2201 (define-public python-unidecode
2202 (package
2203 (name "python-unidecode")
2204 (version "1.1.1")
2205 (source (origin
2206 (method url-fetch)
2207 (uri (pypi-uri "Unidecode" version))
2208 (sha256
2209 (base32
2210 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
2211 (build-system python-build-system)
2212 (home-page "https://pypi.python.org/pypi/Unidecode")
2213 (synopsis "ASCII transliterations of Unicode text")
2214 (description
2215 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2216 useful when integrating with legacy code that doesn't support Unicode, or for
2217 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2218 machine identifiers from human-readable Unicode strings that should still be
2219 somewhat intelligible.")
2220 (license license:gpl2+)))
2221
2222 (define-public python2-unidecode
2223 (package-with-python2 python-unidecode))
2224
2225 (define-public python-pyjwt
2226 (package
2227 (name "python-pyjwt")
2228 (version "1.7.1")
2229 (source
2230 (origin
2231 (method url-fetch)
2232 (uri (pypi-uri "PyJWT" version))
2233 (sha256
2234 (base32
2235 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
2236 (modules '((guix build utils)))
2237 (snippet
2238 '(begin
2239 (for-each delete-file-recursively
2240 (find-files "." "\\.pyc$"))
2241 #t))))
2242 (build-system python-build-system)
2243 (native-inputs
2244 `(("python-pytest" ,python-pytest)
2245 ("python-pytest-cov" ,python-pytest-cov)
2246 ("python-pytest-runner" ,python-pytest-runner)))
2247 (home-page "https://github.com/progrium/pyjwt")
2248 (synopsis "JSON Web Token implementation in Python")
2249 (description
2250 "PyJWT is a JSON Web Token implementation written in Python.")
2251 (license license:expat)))
2252
2253 (define-public python2-pyjwt
2254 (package-with-python2 python-pyjwt))
2255
2256 (define-public python-pykka
2257 (package
2258 (name "python-pykka")
2259 (version "1.2.1")
2260 (source
2261 (origin
2262 (method url-fetch)
2263 (uri (pypi-uri "Pykka" version))
2264 (sha256
2265 (base32
2266 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2267 (build-system python-build-system)
2268 (native-inputs
2269 `(("python-mock" ,python-mock)
2270 ("python-nose" ,python-nose)
2271 ("python-gevent" ,python-gevent)
2272 ("python-eventlet" ,python-eventlet)))
2273 (home-page "https://www.pykka.org/")
2274 (synopsis "Pykka is a Python implementation of the actor model")
2275 (description
2276 "Pykka is a Python implementation of the actor model.
2277 The actor model introduces some simple rules to control the sharing
2278 of state and cooperation between execution units, which makes it
2279 easier to build concurrent applications.")
2280 (license license:asl2.0)))
2281
2282 (define-public python2-pykka
2283 (package-with-python2 python-pykka))
2284
2285 (define-public python-pymsgbox
2286 (package
2287 (name "python-pymsgbox")
2288 (version "1.0.6")
2289 (source
2290 (origin
2291 (method git-fetch)
2292 (uri (git-reference
2293 ;; LICENSE.txt is not present on pypi
2294 (url "https://github.com/asweigart/PyMsgBox")
2295 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2296 (file-name (git-file-name name version))
2297 (sha256
2298 (base32
2299 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2300 (arguments
2301 ;; Circular dependency to run tests:
2302 ;; Tests need pyautogui, which depends on pymsgbox.
2303 '(#:tests? #f))
2304 (build-system python-build-system)
2305 (home-page "https://github.com/asweigart/PyMsgBox")
2306 (synopsis "Python module for JavaScript-like message boxes")
2307 (description
2308 "PyMsgBox is a simple, cross-platform, pure Python module for
2309 JavaScript-like message boxes. Types of dialog boxes include:
2310 @enumerate
2311 @item alert
2312 @item confirm
2313 @item prompt
2314 @item password
2315 @end enumerate
2316 ")
2317 (license license:bsd-3)))
2318
2319 (define-public python-pympler
2320 (package
2321 (name "python-pympler")
2322 (home-page "https://pythonhosted.org/Pympler/")
2323 (version "0.7")
2324 (source (origin
2325 (method url-fetch)
2326 (uri (pypi-uri "Pympler" version))
2327 (sha256
2328 (base32
2329 "0ki7bqp1h9l1xc2k1h4vjyzsgs20i8ingvcdhszyi72s28wyf4bs"))))
2330 (build-system python-build-system)
2331 (arguments
2332 `(#:phases (modify-phases %standard-phases
2333 (delete 'check)
2334 (add-after 'install 'check
2335 (lambda* (#:key inputs outputs #:allow-other-keys)
2336 (add-installed-pythonpath inputs outputs)
2337 (invoke "python" "setup.py" "test"))))))
2338 (synopsis "Measure, monitor and analyze memory behavior")
2339 (description
2340 "Pympler is a development tool to measure, monitor and analyze
2341 the memory behavior of Python objects in a running Python application.
2342
2343 By pympling a Python application, detailed insight in the size and the
2344 lifetime of Python objects can be obtained. Undesirable or unexpected
2345 runtime behavior like memory bloat and other @samp{pymples} can easily
2346 be identified.
2347
2348 A web profiling frontend exposes process statistics, garbage
2349 visualisation and class tracker statistics.")
2350 (license license:asl2.0)))
2351
2352 (define-public python2-pympler
2353 (package-with-python2 python-pympler))
2354
2355 (define-public python-itsdangerous
2356 (package
2357 (name "python-itsdangerous")
2358 (version "1.1.0")
2359 (source
2360 (origin
2361 (method url-fetch)
2362 (uri (pypi-uri "itsdangerous" version))
2363 (sha256
2364 (base32
2365 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
2366 (build-system python-build-system)
2367 (home-page "https://palletsprojects.com/p/itsdangerous/")
2368 (synopsis "Python library for passing data to/from untrusted environments")
2369 (description
2370 "Itsdangerous provides various helpers to pass trusted data to untrusted
2371 environments and back.")
2372 (license license:bsd-3)))
2373
2374 (define-public python2-itsdangerous
2375 (package-with-python2 python-itsdangerous))
2376
2377 (define-public python-pyyaml
2378 (package
2379 (name "python-pyyaml")
2380 (version "3.13")
2381 (source
2382 (origin
2383 (method url-fetch)
2384 (uri (pypi-uri "PyYAML" version))
2385 (sha256
2386 (base32
2387 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2388 (build-system python-build-system)
2389 (inputs
2390 `(("libyaml" ,libyaml)))
2391 (home-page "http://pyyaml.org/wiki/PyYAML")
2392 (synopsis "YAML parser and emitter for Python")
2393 (description
2394 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2395 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2396 API, and sensible error messages. PyYAML supports standard YAML tags and
2397 provides Python-specific tags that allow to represent an arbitrary Python
2398 object.")
2399 (license license:expat)))
2400
2401 (define-public python2-pyyaml
2402 (package-with-python2 python-pyyaml))
2403
2404 (define-public python-vine
2405 (package
2406 (name "python-vine")
2407 (version "1.1.4")
2408 (source
2409 (origin
2410 (method url-fetch)
2411 (uri (pypi-uri "vine" version))
2412 (sha256
2413 (base32
2414 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2415 (build-system python-build-system)
2416 (native-inputs
2417 `(("python-pytest" ,python-pytest)
2418 ("python-case" ,python-case)))
2419 (home-page "https://github.com/celery/vine")
2420 (synopsis "Promises for Python")
2421 (description
2422 "@code{vine} provides a special implementation of promises in that it can
2423 be used both for \"promise of a value\" and lazy evaluation. The biggest
2424 upside for this is that everything in a promise can also be a promise,
2425 e.g. filters, callbacks and errbacks can all be promises.")
2426 (license license:bsd-3)))
2427
2428 (define-public python-virtualenv
2429 (package
2430 (name "python-virtualenv")
2431 (version "16.1.0")
2432 (source
2433 (origin
2434 (method url-fetch)
2435 (uri (pypi-uri "virtualenv" version))
2436 (sha256
2437 (base32
2438 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
2439 (build-system python-build-system)
2440 (arguments
2441 `(#:phases
2442 (modify-phases %standard-phases
2443 (add-before 'check 'disable-failing-test
2444 (lambda _
2445 ;; Disable failing test. See upstream bug report
2446 ;; https://github.com/pypa/virtualenv/issues/957
2447 (substitute* "tests/test_virtualenv.py"
2448 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2449 #t)))))
2450 (native-inputs
2451 `(("python-mock" ,python-mock)
2452 ("python-pytest" ,python-pytest)))
2453 (home-page "https://virtualenv.pypa.io/")
2454 (synopsis "Virtual Python environment builder")
2455 (description
2456 "Virtualenv is a tool to create isolated Python environments.")
2457 (license license:expat)))
2458
2459 (define-public python2-virtualenv
2460 (package-with-python2 python-virtualenv))
2461
2462 (define-public python-markupsafe
2463 (package
2464 (name "python-markupsafe")
2465 (version "1.1.1")
2466 (source
2467 (origin
2468 (method url-fetch)
2469 (uri (pypi-uri "MarkupSafe" version))
2470 (sha256
2471 (base32
2472 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
2473 (build-system python-build-system)
2474 (arguments
2475 `(#:modules ((ice-9 ftw)
2476 (srfi srfi-1)
2477 (srfi srfi-26)
2478 (guix build utils)
2479 (guix build python-build-system))
2480 #:phases (modify-phases %standard-phases
2481 (replace 'check
2482 (lambda _
2483 (let ((cwd (getcwd))
2484 (libdir (find (cut string-prefix? "lib." <>)
2485 (scandir "build"))))
2486 (setenv "PYTHONPATH"
2487 (string-append cwd "/build/" libdir ":"
2488 (getenv "PYTHONPATH")))
2489 (invoke "pytest" "-vv")))))))
2490 (native-inputs
2491 `(("python-pytest" ,python-pytest)))
2492 (home-page "https://github.com/mitsuhiko/markupsafe")
2493 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2494 (description
2495 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2496 for Python.")
2497 (license license:bsd-3)))
2498
2499 (define-public python2-markupsafe
2500 (package-with-python2 python-markupsafe))
2501
2502 (define-public python-jinja2
2503 (package
2504 (name "python-jinja2")
2505 (version "2.10.1")
2506 (source
2507 (origin
2508 (method url-fetch)
2509 (uri (pypi-uri "Jinja2" version))
2510 (sha256
2511 (base32
2512 "04shqrs56aj04ipyqykj512rw2l0zfammvj9krawzxz7xc14yp06"))))
2513 (build-system python-build-system)
2514 (propagated-inputs
2515 `(("python-markupsafe" ,python-markupsafe)))
2516 (home-page "http://jinja.pocoo.org/")
2517 (synopsis "Python template engine")
2518 (description
2519 "Jinja2 is a small but fast and easy to use stand-alone template engine
2520 written in pure Python.")
2521 (license license:bsd-3)))
2522
2523 (define-public python2-jinja2
2524 (package-with-python2 python-jinja2))
2525
2526 (define-public python-jinja2-time
2527 (package
2528 (name "python-jinja2-time")
2529 (version "0.2.0")
2530 (source
2531 (origin
2532 (method url-fetch)
2533 (uri (pypi-uri "jinja2-time" version))
2534 (sha256
2535 (base32
2536 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
2537 (build-system python-build-system)
2538 (propagated-inputs
2539 `(("python-arrow" ,python-arrow)
2540 ("python-jinja2" ,python-jinja2)))
2541 (home-page
2542 "https://github.com/hackebrot/jinja2-time")
2543 (synopsis "Jinja2 Extension for Dates and Times")
2544 (description
2545 "This package provides an extension for the template engine Jinja2. It
2546 adds a 'now' tag providing a convenient access to the arrow.now() API from
2547 templates. A format string can be provided to control the output.")
2548 (license license:expat)))
2549
2550 (define-public python-pystache
2551 (package
2552 (name "python-pystache")
2553 (version "0.5.4")
2554 (source (origin
2555 (method url-fetch)
2556 (uri (pypi-uri "pystache" version))
2557 (sha256
2558 (base32
2559 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2560 (build-system python-build-system)
2561 (arguments
2562 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2563 (home-page "http://defunkt.io/pystache/")
2564 (synopsis "Python logic-less template engine")
2565 (description
2566 "Pystache is a Python implementation of the framework agnostic,
2567 logic-free templating system Mustache.")
2568 (license license:expat)
2569 (properties `((python2-variant . ,(delay python2-pystache))))))
2570
2571 (define-public python2-pystache
2572 (package (inherit (package-with-python2
2573 (strip-python2-variant python-pystache)))
2574 (arguments
2575 `(#:python ,python-2
2576 #:phases
2577 (modify-phases %standard-phases
2578 (replace 'check
2579 (lambda _
2580 (invoke "python" "test_pystache.py"))))))))
2581
2582 (define-public python-joblib
2583 (package
2584 (name "python-joblib")
2585 (version "0.13.0")
2586 (source (origin
2587 (method url-fetch)
2588 (uri (pypi-uri "joblib" version))
2589 (sha256
2590 (base32
2591 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2592 (build-system python-build-system)
2593 (arguments
2594 `(#:phases
2595 (modify-phases %standard-phases
2596 (replace 'check
2597 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2598 (native-inputs
2599 `(("python-pytest" ,python-pytest)))
2600 (home-page "https://joblib.readthedocs.io/")
2601 (synopsis "Using Python functions as pipeline jobs")
2602 (description
2603 "Joblib is a set of tools to provide lightweight pipelining in Python.
2604 In particular, joblib offers: transparent disk-caching of the output values
2605 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2606 logging and tracing of the execution.")
2607 (license license:bsd-3)))
2608
2609 (define-public python2-joblib
2610 (package-with-python2 python-joblib))
2611
2612 (define-public python-daemon
2613 (package
2614 (name "python-daemon")
2615 (version "2.2.3")
2616 (source
2617 (origin
2618 (method url-fetch)
2619 (uri (pypi-uri "python-daemon" version))
2620 (sha256
2621 (base32
2622 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2623 (build-system python-build-system)
2624 (arguments
2625 `(#:phases
2626 (modify-phases %standard-phases
2627 (add-before 'check 'disable-tests
2628 (lambda _
2629 ;; FIXME: Determine why test fails
2630 (substitute* "test/test_daemon.py"
2631 (("test_detaches_process_context")
2632 "skip_test_detaches_process_context"))
2633 #t)))))
2634 (propagated-inputs
2635 `(("python-lockfile" ,python-lockfile)))
2636 (native-inputs
2637 `(("python-unittest2" ,python-unittest2)
2638 ("python-testtools" ,python-testtools)
2639 ("python-testscenarios" ,python-testscenarios)
2640 ("python-mock" ,python-mock)
2641 ("python-docutils" ,python-docutils)))
2642 (home-page "https://pagure.io/python-daemon/")
2643 (synopsis "Python library for making a Unix daemon process")
2644 (description "Python-daemon is a library that assists a Python program to
2645 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2646
2647 This library provides a @code{DaemonContext} class that manages the following
2648 important tasks for becoming a daemon process:
2649 @enumerate
2650 @item Detach the process into its own process group.
2651 @item Set process environment appropriate for running inside a chroot.
2652 @item Renounce suid and sgid privileges.
2653 @item Close all open file descriptors.
2654 @item Change the working directory, uid, gid, and umask.
2655 @item Set appropriate signal handlers.
2656 @item Open new file descriptors for stdin, stdout, and stderr.
2657 @item Manage a specified PID lock file.
2658 @item Register cleanup functions for at-exit processing.
2659 @end enumerate")
2660 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2661 (license (list license:asl2.0 license:gpl3+))))
2662
2663 (define-public python-docutils
2664 (package
2665 (name "python-docutils")
2666 (version "0.14")
2667 (source
2668 (origin
2669 (method url-fetch)
2670 (uri (pypi-uri "docutils" version))
2671 (sha256
2672 (base32
2673 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2674 (build-system python-build-system)
2675 (arguments
2676 '(#:tests? #f)) ; no setup.py test command
2677 (home-page "http://docutils.sourceforge.net/")
2678 (synopsis "Python Documentation Utilities")
2679 (description
2680 "Docutils is a modular system for processing documentation into useful
2681 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2682 reStructuredText.")
2683 ;; Most of the source code is public domain, but some source files are
2684 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2685 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2686
2687 (define-public python2-docutils
2688 (package-with-python2 python-docutils))
2689
2690 (define-public python-pygments
2691 (package
2692 (name "python-pygments")
2693 (version "2.4.2")
2694 (source
2695 (origin
2696 (method url-fetch)
2697 (uri (pypi-uri "Pygments" version))
2698 (sha256
2699 (base32
2700 "15v2sqm5g12bqa0c7wikfh9ck2nl97ayizy1hpqhmws5gqalq748"))))
2701 (build-system python-build-system)
2702 (arguments
2703 ;; FIXME: Tests require sphinx, which depends on this.
2704 '(#:tests? #f))
2705 (home-page "http://pygments.org/")
2706 (synopsis "Syntax highlighting")
2707 (description
2708 "Pygments is a syntax highlighting package written in Python.")
2709 (license license:bsd-2)))
2710
2711 (define-public python2-pygments
2712 (package-with-python2 python-pygments))
2713
2714 (define-public python-bumpversion
2715 (package
2716 (name "python-bumpversion")
2717 (version "0.5.3")
2718 (source
2719 (origin
2720 (method url-fetch)
2721 (uri (pypi-uri "bumpversion" version))
2722 (sha256
2723 (base32
2724 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
2725 (build-system python-build-system)
2726 (home-page "https://github.com/peritus/bumpversion")
2727 (synopsis "Tool to bump software version")
2728 (description "This tool provides a command-line interface (CLI) to bump a
2729 software version simply.")
2730 (license license:expat)))
2731
2732 (define-public python-deprecated
2733 (package
2734 (name "python-deprecated")
2735 (version "1.2.5")
2736 (source
2737 (origin
2738 (method git-fetch)
2739 (uri (git-reference
2740 (url "https://github.com/tantale/deprecated.git")
2741 (commit (string-append "v" version))))
2742 (file-name (git-file-name name version))
2743 (sha256
2744 (base32
2745 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
2746 (build-system python-build-system)
2747 (arguments
2748 `(#:phases (modify-phases %standard-phases
2749 (replace 'check
2750 (lambda _
2751 (invoke "pytest"))))))
2752 (propagated-inputs
2753 `(("python-wrapt" ,python-wrapt)))
2754 (native-inputs
2755 `(("python-bumpversion" ,python-bumpversion)
2756 ("python-pytest" ,python-pytest)
2757 ("python-pytest-cov" ,python-pytest-cov)
2758 ("python-sphinx" ,python-sphinx)
2759 ("python-tox" ,python-tox)))
2760 (home-page "https://github.com/tantale/deprecated")
2761 (synopsis "Python decorator to deprecate classes, functions or methods")
2762 (description "The @code{deprecated} decorator provides a convenient way to deprecate
2763 to deprecate classes, functions or methods.")
2764 (license license:expat)))
2765
2766 (define-public python-pygithub
2767 (package
2768 (name "python-pygithub")
2769 (version "1.43.8")
2770 (source
2771 ;; We fetch from the Git repo because there are no tests in the PyPI
2772 ;; archive.
2773 (origin
2774 (method git-fetch)
2775 (uri (git-reference
2776 (url "https://github.com/PyGithub/PyGithub.git")
2777 (commit (string-append "v" version))))
2778 (file-name (git-file-name name version))
2779 (sha256
2780 (base32 "1625v558xga5mwhl9jqmibywy5qafmg1vqrirqz6zfq1la1d22mw"))))
2781 (build-system python-build-system)
2782 (arguments
2783 `(#:phases (modify-phases %standard-phases
2784 ;; Some tests rely on the network.
2785 (add-after 'unpack 'disable-failing-tests
2786 (lambda _
2787 (substitute* "tests/Issue142.py"
2788 (("testDecodeJson") "disabled_testDecodeJson"))
2789 #t))
2790 (add-before 'check 'prepare-for-tests
2791 (lambda _
2792 (for-each (lambda (f)
2793 (chmod f #o666))
2794 (find-files "./tests"))
2795 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
2796 (setenv "PYTHONPATH"
2797 (string-append "./tests:" (getenv "PYTHONPATH")))
2798 #t)))))
2799 (propagated-inputs
2800 `(("python-deprecated" ,python-deprecated)
2801 ("python-pyjwt" ,python-pyjwt)
2802 ("python-requests" ,python-requests)))
2803 (native-inputs `(("python-httpretty" ,python-httpretty)))
2804 (home-page "https://pygithub.readthedocs.io/en/latest/")
2805 (synopsis "Python library for the GitHub API")
2806 (description "This library allows managing GitHub resources such as
2807 repositories, user profiles, and organizations in your Python applications,
2808 using version 3 of the GitHub application programming interface (API).")
2809 (license license:lgpl3+)))
2810
2811 (define-public python-rellu
2812 (package
2813 (name "python-rellu")
2814 (version "0.7")
2815 (source
2816 (origin
2817 (method url-fetch)
2818 (uri (pypi-uri "rellu" version))
2819 (sha256
2820 (base32
2821 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
2822 (build-system python-build-system)
2823 (propagated-inputs
2824 `(("python-invoke" ,python-invoke)
2825 ("python-pygithub" ,python-pygithub)))
2826 (home-page "https://github.com/robotframework/rellu")
2827 (synopsis "Utilities to create PyPI releases")
2828 (description "This collection of utilities contains tooling and templates
2829 to assist in creating releases on GitHub and publishing them on PyPI. It is
2830 designed to be used by Robot Framework and tools and libraries in its
2831 ecosystem, but can naturally be used also by other projects.")
2832 (license license:asl2.0)))
2833
2834 (define-public python-robotframework
2835 (package
2836 (name "python-robotframework")
2837 (version "3.1.2")
2838 ;; There are no tests in the PyPI archive.
2839 (source
2840 (origin
2841 (method git-fetch)
2842 (uri (git-reference
2843 (url "https://github.com/robotframework/robotframework.git")
2844 (commit (string-append "v" version))))
2845 (file-name (git-file-name name version))
2846 (sha256
2847 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
2848 (patches (search-patches
2849 "python-robotframework-honor-source-date-epoch.patch"))))
2850 (build-system python-build-system)
2851 (arguments
2852 `(#:phases (modify-phases %standard-phases
2853 (add-before 'build 'build-and-install-doc
2854 (lambda* (#:key outputs #:allow-other-keys)
2855 (let* ((doc-output (assoc-ref outputs "doc"))
2856 (doc (string-append doc-output "/share/"
2857 ,name "-" ,version "/")))
2858 (invoke "invoke" "library-docs" "all")
2859 (mkdir-p doc)
2860 (copy-recursively "doc/libraries"
2861 (string-append doc "/libraries"))
2862 #t)))
2863 (replace 'check
2864 (lambda _
2865 (invoke "python" "utest/run.py"))))))
2866 (native-inputs
2867 `(("python-invoke" ,python-invoke)
2868 ("python-rellu" ,python-rellu)
2869 ("python:tk" ,python "tk"))) ;used when building the HTML doc
2870 (outputs '("out" "doc"))
2871 (home-page "https://robotframework.org")
2872 (synopsis "Generic automation framework")
2873 (description "Robot Framework is a generic automation framework for
2874 acceptance testing, acceptance test driven development (ATDD), and robotic
2875 process automation (RPA).")
2876 (license license:asl2.0)))
2877
2878 (define-public python-robotframework-lint
2879 ;; There is no properly tagged release; the commit below seems to correspond
2880 ;; to the 0.9 stable release available from PyPI. The tests are not
2881 ;; included in the PyPI archive, so we fetch the sources from the upstream
2882 ;; Git repo.
2883 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
2884 (revision "1"))
2885 (package
2886 (name "python-robotframework-lint")
2887 (version (git-version "0.9.0" revision commit))
2888 (source
2889 (origin
2890 (method git-fetch)
2891 (uri (git-reference
2892 (url "https://github.com/boakley/robotframework-lint.git")
2893 (commit commit)))
2894 (file-name (git-file-name name version))
2895 (sha256
2896 (base32
2897 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
2898 (build-system python-build-system)
2899 (arguments
2900 `(#:phases
2901 (modify-phases %standard-phases
2902 (replace 'check
2903 (lambda _
2904 (invoke "python" "-m" "robot" "-A"
2905 "tests/conf/default.args" "tests"))))))
2906 (propagated-inputs
2907 `(("python-robotframework" ,python-robotframework)))
2908 (home-page "https://github.com/boakley/robotframework-lint/")
2909 (synopsis "Static analysis tool (linter) for Robot Framework")
2910 (description "This package provides the @code{rflint} command-line
2911 utility, a static analysis tool (linter) for Robot Framework source files.")
2912 (license license:asl2.0))))
2913
2914 (define-public python-robotframework-sshlibrary
2915 (package
2916 (name "python-robotframework-sshlibrary")
2917 (version "3.3.0")
2918 ;; There are no tests in the PyPI archive.
2919 (source
2920 (origin
2921 (method git-fetch)
2922 (uri (git-reference
2923 (url "https://github.com/robotframework/SSHLibrary.git")
2924 (commit (string-append "v" version))))
2925 (file-name (git-file-name name version))
2926 (sha256
2927 (base32
2928 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
2929 (build-system python-build-system)
2930 (arguments
2931 `(#:phases
2932 (modify-phases %standard-phases
2933 (add-before 'build 'build-and-install-doc
2934 (lambda* (#:key outputs #:allow-other-keys)
2935 (let* ((doc-output (assoc-ref outputs "doc"))
2936 (doc (string-append doc-output "/share/"
2937 ,name "-" ,version "/")))
2938 (invoke "chmod" "-R" "+w" "docs")
2939 (invoke "invoke" "kw-docs" "project-docs")
2940 (mkdir-p doc)
2941 (for-each delete-file (find-files "docs" "\\.rst"))
2942 (copy-recursively "docs" doc)
2943 #t)))
2944 (replace 'check
2945 (lambda _
2946 ;; Some tests require an SSH server; we remove them.
2947 (delete-file "utest/test_client_api.py")
2948 (delete-file "utest/test_scp.py")
2949 (invoke "python" "utest/run.py"))))))
2950 (propagated-inputs
2951 `(("python-robotframework" ,python-robotframework)
2952 ("python-paramiko" ,python-paramiko)
2953 ("python-scp" ,python-scp)))
2954 (native-inputs
2955 `(("openssh" ,openssh)
2956 ("which" ,which)
2957 ;; To generate the documentation
2958 ("python-docutils" ,python-docutils)
2959 ("python-invoke" ,python-invoke)
2960 ("python-pygments" ,python-pygments)
2961 ("python-rellu" ,python-rellu)))
2962 (outputs '("out" "doc"))
2963 (home-page "https://github.com/robotframework/SSHLibrary")
2964 (synopsis "Robot Framework library for SSH and SFTP")
2965 (description "SSHLibrary is a Robot Framework library providing support
2966 for SSH and SFTP. It has the following main usages:
2967 @itemize @bullet
2968 @item Executing commands on the remote machine, either blocking or non-blocking.
2969 @item Writing and reading in an interactive shell.
2970 @item Transferring files and directories over SFTP.
2971 @item Ensuring that files and directories exist on the remote machine.
2972 @end itemize")
2973 (license license:asl2.0)))
2974
2975 (define-public python-scp
2976 (package
2977 (name "python-scp")
2978 (version "0.13.2")
2979 (source
2980 (origin
2981 (method url-fetch)
2982 (uri (pypi-uri "scp" version))
2983 (sha256
2984 (base32
2985 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
2986 (build-system python-build-system)
2987 (arguments
2988 '(#:tests? #f)) ;tests require an SSH server
2989 (propagated-inputs
2990 `(("python-paramiko" ,python-paramiko)))
2991 (home-page "https://github.com/jbardin/scp.py")
2992 (synopsis "SCP protocol module for Python and Paramiko")
2993 (description "The scp module extends the Paramiko library to send and
2994 receive files via the SCP1 protocol, as implemented by the OpenSSH
2995 @command{scp} program.")
2996 (license license:gpl2+)))
2997
2998 (define-public python-rst.linker
2999 (package
3000 (name "python-rst.linker")
3001 (version "1.11")
3002 (source
3003 (origin
3004 (method url-fetch)
3005 (uri (pypi-uri "rst.linker" version))
3006 (sha256
3007 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
3008 (build-system python-build-system)
3009 (propagated-inputs
3010 `(("python-dateutil" ,python-dateutil)
3011 ("python-six" ,python-six)))
3012 (native-inputs
3013 `(("python-setuptools-scm" ,python-setuptools-scm)))
3014 ;; Test would require path.py, which would introduce a cyclic dependence.
3015 (arguments `(#:tests? #f))
3016 ;; Note: As of version 1.7 the documentation is not worth building.
3017 (home-page "https://github.com/jaraco/rst.linker")
3018 (synopsis "Sphinx plugin to add links and timestamps")
3019 (description "rst.linker allows to automatically replace text by a
3020 reStructuredText external reference or timestamps. It's primary purpose is to
3021 augment the changelog, but it can be used for other documents, too.")
3022 (license license:expat)))
3023
3024 (define-public python2-rst.linker
3025 (package-with-python2 python-rst.linker))
3026
3027 (define-public python-feedgenerator
3028 (package
3029 (name "python-feedgenerator")
3030 (version "1.9")
3031 (source
3032 (origin
3033 (method url-fetch)
3034 (uri (pypi-uri "feedgenerator" version))
3035 (sha256
3036 (base32
3037 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
3038 (modules '((guix build utils)))
3039 (snippet
3040 '(begin
3041 ;; Remove pre-compiled .pyc files from source.
3042 (for-each delete-file-recursively
3043 (find-files "." "__pycache__" #:directories? #t))
3044 (for-each delete-file (find-files "." "\\.pyc$"))
3045 #t))))
3046 (build-system python-build-system)
3047 (propagated-inputs
3048 `(("python-pytz" ,python-pytz)
3049 ("python-six" ,python-six)))
3050 (home-page "https://github.com/getpelican/feedgenerator")
3051 (synopsis
3052 "Standalone version of Django's Atom/RSS feed generator")
3053 (description
3054 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3055 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3056 (license license:bsd-3)))
3057
3058 (define-public python2-feedgenerator
3059 (package-with-python2 python-feedgenerator))
3060
3061 (define-public python-toml
3062 (package
3063 (name "python-toml")
3064 (version "0.9.4")
3065 (source
3066 (origin
3067 (method url-fetch)
3068 (uri (pypi-uri "toml" version))
3069 (sha256
3070 (base32
3071 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
3072 (build-system python-build-system)
3073 (arguments
3074 `(#:tests? #f)) ;no tests suite in release
3075 (home-page "https://github.com/uiri/toml")
3076 (synopsis "Library for TOML")
3077 (description
3078 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
3079 Language (TOML) configuration files.")
3080 (license license:expat)))
3081
3082 (define-public python-jsonrpc-server
3083 (package
3084 (name "python-jsonrpc-server")
3085 (version "0.1.2")
3086 (source
3087 (origin
3088 (method url-fetch)
3089 (uri (pypi-uri "python-jsonrpc-server" version))
3090 (sha256
3091 (base32
3092 "0m4ykpcdy52x37n1ikysp07j7p8ialcdvvvsrjp3545sn7iiid09"))))
3093 (build-system python-build-system)
3094 (propagated-inputs
3095 `(("python-future" ,python-future)
3096 ("python-mock" ,python-mock)
3097 ("python-pytest" ,python-pytest)))
3098 (home-page
3099 "https://github.com/palantir/python-jsonrpc-server")
3100 (synopsis "JSON RPC 2.0 server library")
3101 (description
3102 "This package provides a JSON RPC 2.0 server library for Python.")
3103 (license license:expat)))
3104
3105 (define-public python-pydocstyle
3106 (package
3107 (name "python-pydocstyle")
3108 (version "3.0.0")
3109 (source
3110 (origin
3111 (method url-fetch)
3112 (uri (pypi-uri "pydocstyle" version))
3113 (sha256
3114 (base32
3115 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
3116 (build-system python-build-system)
3117 (propagated-inputs
3118 `(("python-six" ,python-six)
3119 ("python-snowballstemmer" ,python-snowballstemmer)))
3120 (home-page
3121 "https://github.com/PyCQA/pydocstyle/")
3122 (synopsis "Python docstring style checker")
3123 (description
3124 "This package provides a style checker for the Python Language
3125 Server (PLS).")
3126 (license license:expat)))
3127
3128 (define-public python-language-server
3129 (package
3130 (name "python-language-server")
3131 (version "0.29.1")
3132 (source
3133 (origin
3134 (method url-fetch)
3135 (uri (pypi-uri "python-language-server" version))
3136 (sha256
3137 (base32
3138 "1f8qlflh6j3s7qfmzhirpl8fgidl6f0qbakdmiml96wdxzvka0s3"))))
3139 (build-system python-build-system)
3140 (propagated-inputs
3141 `(("python-pluggy" ,python-pluggy)
3142 ("python-jsonrpc-server" ,python-jsonrpc-server)
3143 ("python-jedi" ,python-jedi)
3144 ("python-yapf" ,python-yapf)
3145 ("python-pyflakes" ,python-pyflakes)
3146 ("python-pydocstyle" ,python-pydocstyle)
3147 ("python-pycodestyle" ,python-pycodestyle)
3148 ("python-mccabe" ,python-mccabe)
3149 ("python-rope" ,python-rope)
3150 ("python-autopep8" ,python-autopep8)
3151 ("python-flake8" ,python-flake8)
3152 ("python-pylint" ,python-pylint)))
3153 (home-page "https://github.com/palantir/python-language-server")
3154 (synopsis "Python implementation of the Language Server Protocol")
3155 (description
3156 "The Python Language Server (pyls) is an implementation of the Python 3
3157 language specification for the Language Server Protocol (LSP). This tool is
3158 used in text editing environments to provide a complete and integrated
3159 feature-set for programming Python effectively.")
3160 (license license:expat)))
3161
3162 (define-public python-black
3163 (package
3164 (name "python-black")
3165 (version "18.6b4")
3166 (source
3167 (origin
3168 (method url-fetch)
3169 (uri (pypi-uri "black" version))
3170 (sha256
3171 (base32
3172 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
3173 (build-system python-build-system)
3174 (arguments
3175 `(#:phases
3176 (modify-phases %standard-phases
3177 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3178 (lambda _
3179 (let ((python3 (which "python3")))
3180 (substitute* '("tests/data/fmtonoff.py"
3181 "tests/data/string_prefixes.py"
3182 "tests/data/function.py")
3183 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3184 (string-append "#!" python3 (if (string? minor-version)
3185 minor-version
3186 ""))))))))))
3187 (propagated-inputs
3188 `(("python-click" ,python-click)
3189 ("python-attrs" ,python-attrs)
3190 ("python-appdirs" ,python-appdirs)
3191 ("python-toml" ,python-toml)))
3192 (home-page "https://github.com/ambv/black")
3193 (synopsis "The uncompromising code formatter")
3194 (description "Black is the uncompromising Python code formatter.")
3195 (license license:expat)))
3196
3197 (define-public python-blinker
3198 (package
3199 (name "python-blinker")
3200 (version "1.4")
3201 (source
3202 (origin
3203 (method url-fetch)
3204 (uri (pypi-uri "blinker" version))
3205 (sha256
3206 (base32
3207 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3208 (build-system python-build-system)
3209 (home-page "http://pythonhosted.org/blinker/")
3210 (synopsis "Fast, simple object-to-object and broadcast signaling")
3211 (description
3212 "Blinker provides a fast dispatching system that allows any number of
3213 interested parties to subscribe to events, or \"signals\".")
3214 (license license:expat)))
3215
3216 (define-public python2-blinker
3217 (package-with-python2 python-blinker))
3218
3219 (define-public pelican
3220 (package
3221 (name "pelican")
3222 (version "4.0.1")
3223 (source
3224 (origin
3225 (method url-fetch)
3226 (uri (pypi-uri "pelican" version))
3227 (sha256
3228 (base32
3229 "05yda7n6r0ll18fpdjzkzyr0ls8hbb86fnjyb33k9jvv5avah2lr"))))
3230 (build-system python-build-system)
3231 (propagated-inputs
3232 `(("python-feedgenerator" ,python-feedgenerator)
3233 ("python-jinja2" ,python-jinja2)
3234 ("python-pygments" ,python-pygments)
3235 ("python-docutils" ,python-docutils)
3236 ("python-pytz" ,python-pytz)
3237 ("python-blinker" ,python-blinker)
3238 ("python-unidecode" ,python-unidecode)
3239 ("python-six" ,python-six)
3240 ("python-dateutil" ,python-dateutil)
3241 ("python-markdown" ,python-markdown)))
3242 (home-page "https://getpelican.com/")
3243 (arguments
3244 `(;; XXX Requires a lot more packages to do unit tests :P
3245 #:tests? #f
3246 #:phases (modify-phases %standard-phases
3247 (add-before
3248 'install 'adjust-requires
3249 ;; Since feedgenerator is installed from git, it doesn't
3250 ;; conform to the version requirements.
3251 ;;
3252 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3253 ;; version requirement so setuptools doesn't get confused.
3254 (lambda _
3255 (substitute* "setup.py"
3256 (("['\"]feedgenerator.*?['\"]")
3257 "'feedgenerator'")))))))
3258 (synopsis "Python-based static site publishing system")
3259 (description
3260 "Pelican is a tool to generate a static blog from reStructuredText,
3261 Markdown input files, and more. Pelican uses Jinja2 for templating
3262 and is very extensible.")
3263 (license license:agpl3+)))
3264
3265 (define-public mallard-ducktype
3266 (package
3267 (name "mallard-ducktype")
3268 (version "1.0.2")
3269 (source
3270 (origin
3271 (method git-fetch)
3272 ;; git-reference because tests are not included in pypi source tarball
3273 ;; https://issues.guix.gnu.org/issue/36755#2
3274 (uri (git-reference
3275 (url "https://github.com/projectmallard/mallard-ducktype.git")
3276 (commit version)))
3277 (file-name (git-file-name name version))
3278 (sha256
3279 (base32
3280 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
3281 (build-system python-build-system)
3282 (arguments
3283 '(#:phases
3284 (modify-phases %standard-phases
3285 (replace 'check
3286 (lambda _
3287 (with-directory-excursion "tests"
3288 (invoke "sh" "runtests")))))))
3289 (home-page "http://projectmallard.org")
3290 (synopsis "Convert Ducktype to Mallard documentation markup")
3291 (description
3292 "Ducktype is a lightweight syntax that can represent all the semantics
3293 of the Mallard XML documentation system. Ducktype files can be converted to
3294 Mallard using the @command{ducktype} tool. The yelp-tools package
3295 provides additional functionality on the produced Mallard documents.")
3296 (license license:expat)))
3297
3298 (define-public python-scikit-image
3299 (package
3300 (name "python-scikit-image")
3301 (version "0.14.2")
3302 (source
3303 (origin
3304 (method url-fetch)
3305 (uri (pypi-uri "scikit-image" version))
3306 (sha256
3307 (base32 "07qchljkyxvg5nrm12fvszi7pmjk4m01qp0w0z8syxzxxs20pz8s"))))
3308 (build-system python-build-system)
3309 (arguments
3310 ;; TODO: Some tests require running X11 server. Disable them?
3311 '(#:tests? #f))
3312 ;; See DEPENDS.txt for the list of build and run time requiremnts
3313 (propagated-inputs
3314 `(("python-cloudpickle" ,python-cloudpickle)
3315 ("python-dask" ,python-dask)
3316 ("python-matplotlib" ,python-matplotlib)
3317 ("python-networkx" ,python-networkx)
3318 ("python-numpy" ,python-numpy)
3319 ("python-pillow" ,python-pillow)
3320 ("python-pywavelets" ,python-pywavelets)
3321 ("python-scipy" ,python-scipy)
3322 ("python-six" ,python-six)))
3323 (native-inputs
3324 `(("python-cython" ,python-cython)))
3325 (home-page "http://scikit-image.org/")
3326 (synopsis "Image processing in Python")
3327 (description
3328 "Scikit-image is a collection of algorithms for image processing.")
3329 (license license:bsd-3)))
3330
3331 (define-public python2-scikit-image
3332 (package-with-python2 python-scikit-image))
3333
3334 (define-public python-cython
3335 (package
3336 (name "python-cython")
3337 (version "0.29.13")
3338 (source
3339 (origin
3340 (method url-fetch)
3341 (uri (pypi-uri "Cython" version))
3342 (sha256
3343 (base32
3344 "13k37lrcgagwwnzr5bzririsscb793vndj234d475x1h9ad0d7f2"))))
3345 (build-system python-build-system)
3346 ;; we need the full python package and not just the python-wrapper
3347 ;; because we need libpython3.3m.so
3348 (inputs
3349 `(("python" ,python)))
3350 (arguments
3351 `(#:phases
3352 (modify-phases %standard-phases
3353 (add-before 'check 'set-HOME
3354 ;; some tests require access to "$HOME/.cython"
3355 (lambda _ (setenv "HOME" "/tmp") #t))
3356
3357 ;; FIXME: These tests started failing on armhf after the 0.28 update
3358 ;; (commit c69d11c5930), both with an error such as this:
3359 ;; compiling (cpp) and running dictcomp ...
3360 ;; === C/C++ compiler error output: ===
3361 ;; ‘
3362 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
3363 ;; See <https://hydra.gnu.org/build/2948724> for logs.
3364 ,@(if (target-arm32?)
3365 `((add-before 'check 'disable-failing-tests
3366 (lambda _
3367 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
3368 (for-each (lambda (test)
3369 (format disabled-tests "~a\n" test))
3370 '("memslice" "dictcomp"))
3371 (close-port disabled-tests)))))
3372 '())
3373
3374 (replace 'check
3375 (lambda _
3376 ;; Disable compiler optimizations to greatly reduce the running
3377 ;; time of the test suite.
3378 (setenv "CFLAGS" "-O0")
3379
3380 (invoke "python" "runtests.py" "-vv"
3381 "-j" (number->string (parallel-job-count))))))))
3382 (home-page "https://cython.org/")
3383 (synopsis "C extensions for Python")
3384 (description "Cython is an optimising static compiler for both the Python
3385 programming language and the extended Cython programming language. It makes
3386 writing C extensions for Python as easy as Python itself.")
3387 (license license:asl2.0)
3388 (properties `((python2-variant . ,(delay python2-cython))))))
3389
3390 (define-public python2-cython
3391 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
3392 (package
3393 (inherit base)
3394 (name "python2-cython")
3395 (inputs
3396 `(("python-2" ,python-2))) ;this is not automatically changed
3397 (arguments
3398 (substitute-keyword-arguments (package-arguments base)
3399 ((#:phases phases)
3400 `(modify-phases ,phases
3401 (add-before 'check 'adjust-test_embed
3402 (lambda _
3403 (substitute* "runtests.py"
3404 ;; test_embed goes great lengths to find the static libpythonX.Y.a
3405 ;; so it can give the right -L flag to GCC when embedding static
3406 ;; builds of Python. It is unaware that the Python "config"
3407 ;; directory (where the static library lives) was renamed in
3408 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
3409 ;; which works fine, because that is where the shared library is.
3410 ;;
3411 ;; It also appears to be unaware that the Makefile in Demos/embed
3412 ;; already unconditionally pass the static library location to GCC,
3413 ;; after checking sysconfig.get_config_var('LIBPL).
3414 ;;
3415 ;; The effect is that the linker is unable to resolve libexpat
3416 ;; symbols when building for Python 2, because neither the Python 2
3417 ;; shared library nor Expat is available. To fix it, we can either
3418 ;; add Expat as an input and make it visible to the linker, or just
3419 ;; prevent it from overriding the Python shared library location.
3420 ;; The end result is identical, so we take the easy route.
3421 ((" or libname not in os\\.listdir\\(libdir\\)")
3422 ""))
3423 #t)))))))))
3424
3425 ;; The RPython toolchain currently does not support Python 3.
3426 (define-public python2-rpython
3427 (package
3428 (name "python2-rpython")
3429 (version "0.2.1")
3430 (source
3431 (origin
3432 (method url-fetch)
3433 (uri (pypi-uri "rpython" version))
3434 (sha256
3435 (base32
3436 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3437 (build-system python-build-system)
3438 (arguments `(#:python ,python-2))
3439 (native-inputs
3440 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3441 (home-page "https://rpython.readthedocs.org")
3442 (synopsis "Framework for implementing interpreters and virtual machines")
3443 (description "RPython is a translation and support framework for
3444 producing implementations of dynamic languages, emphasizing a clean separation
3445 between language specification and implementation aspects.")
3446 (license license:expat)))
3447
3448 ;; NOTE: when upgrading numpy please make sure that python-pandas and
3449 ;; python-scipy still build, as these three packages are often used together.
3450 (define-public python-numpy
3451 (package
3452 (name "python-numpy")
3453 (version "1.15.4")
3454 (source
3455 (origin
3456 (method url-fetch)
3457 (uri (string-append
3458 "https://github.com/numpy/numpy/releases/download/v"
3459 version "/numpy-" version ".tar.gz"))
3460 (sha256
3461 (base32
3462 "102vcl2qq4pjbm7a3d67vkkvn4466ngia1d8wi5avqwqh8j0jvkn"))))
3463 (build-system python-build-system)
3464 (inputs
3465 `(("openblas" ,openblas)
3466 ("lapack" ,lapack)))
3467 (native-inputs
3468 `(("python-cython" ,python-cython)
3469 ("python-pytest" ,python-pytest)
3470 ("gfortran" ,gfortran)))
3471 (arguments
3472 `(#:phases
3473 (modify-phases %standard-phases
3474 (add-before 'build 'configure-blas-lapack
3475 (lambda* (#:key inputs #:allow-other-keys)
3476 (call-with-output-file "site.cfg"
3477 (lambda (port)
3478 (format port
3479 "[openblas]
3480 libraries = openblas
3481 library_dirs = ~a/lib
3482 include_dirs = ~a/include
3483
3484 # backslash-n to make emacs happy
3485 \n[lapack]
3486 lapack_libs = lapack
3487 library_dirs = ~a/lib
3488 include_dirs = ~a/include
3489 "
3490 (assoc-ref inputs "openblas")
3491 (assoc-ref inputs "openblas")
3492 (assoc-ref inputs "lapack")
3493 (assoc-ref inputs "lapack"))))
3494 #t))
3495 (add-before 'build 'fix-executable-paths
3496 (lambda* (#:key inputs #:allow-other-keys)
3497 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3498 ;; instead of /bin/sh.
3499 (substitute* "numpy/distutils/exec_command.py"
3500 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3501 (string-append match-start (assoc-ref inputs "bash") match-end)))
3502 ;; Use "gcc" executable, not "cc".
3503 (substitute* "numpy/distutils/system_info.py"
3504 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3505 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3506 #t))
3507 ;; Tests can only be run after the library has been installed and not
3508 ;; within the source directory.
3509 (delete 'check)
3510 (add-after 'install 'check
3511 (lambda* (#:key outputs inputs #:allow-other-keys)
3512 ;; Make installed package available for running the tests
3513 (add-installed-pythonpath inputs outputs)
3514 ;; Make sure "f2py" etc is found.
3515 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3516 ":" (getenv "PATH")))
3517 (with-directory-excursion "/tmp"
3518 (invoke "python" "-c"
3519 "import numpy; numpy.test(verbose=2)")))))))
3520 (home-page "http://www.numpy.org/")
3521 (synopsis "Fundamental package for scientific computing with Python")
3522 (description "NumPy is the fundamental package for scientific computing
3523 with Python. It contains among other things: a powerful N-dimensional array
3524 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3525 and Fortran code, useful linear algebra, Fourier transform, and random number
3526 capabilities.")
3527 (license license:bsd-3)))
3528
3529 (define-public python2-numpy
3530 (package-with-python2 python-numpy))
3531
3532 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3533 ;; interest only for legacy code going back to NumPy's predecessor
3534 ;; Numeric.
3535 (define-public python2-numpy-1.8
3536 (package (inherit python2-numpy)
3537 (version "1.8.2")
3538 (source
3539 (origin
3540 (method url-fetch)
3541 (uri (string-append
3542 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3543 (file-name (string-append "python2-numpy-" version ".tar.gz"))
3544 (sha256
3545 (base32
3546 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
3547 (arguments
3548 (substitute-keyword-arguments (package-arguments python2-numpy)
3549 ((#:phases phases)
3550 `(modify-phases ,phases
3551 (replace 'configure-blas-lapack
3552 (lambda* (#:key inputs #:allow-other-keys)
3553 (call-with-output-file "site.cfg"
3554 (lambda (port)
3555 (format port
3556 "[openblas]
3557 libraries = openblas,lapack
3558 library_dirs = ~a/lib:~a/lib
3559 include_dirs = ~a/include:~a/include
3560 "
3561 (assoc-ref inputs "openblas")
3562 (assoc-ref inputs "lapack")
3563 (assoc-ref inputs "openblas")
3564 (assoc-ref inputs "lapack"))))
3565 #t))))))
3566 (native-inputs
3567 `(("python2-nose" ,python2-nose)))
3568 (description "NumPy is the fundamental package for scientific computing
3569 with Python. It contains among other things: a powerful N-dimensional array
3570 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3571 and Fortran code, useful linear algebra, Fourier transform, and random number
3572 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3573 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3574 Numeric.")
3575 (license license:bsd-3)))
3576
3577 (define-public python-munch
3578 (package
3579 (name "python-munch")
3580 (version "2.0.4")
3581 (source
3582 (origin
3583 (method url-fetch)
3584 (uri (pypi-uri "munch" version))
3585 (sha256
3586 (base32
3587 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3588 (build-system python-build-system)
3589 (home-page "https://github.com/Infinidat/munch")
3590 (synopsis "Dot-accessible dictionary")
3591 (description "Munch is a dot-accessible dictionary similar to JavaScript
3592 objects.")
3593 (license license:expat)))
3594
3595 (define-public python2-munch
3596 (package-with-python2 python-munch))
3597
3598 (define-public python-colormath
3599 (package
3600 (name "python-colormath")
3601 (version "3.0.0")
3602 (source
3603 (origin
3604 (method url-fetch)
3605 (uri (pypi-uri "colormath" version))
3606 (sha256
3607 (base32
3608 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3609 (build-system python-build-system)
3610 (propagated-inputs
3611 `(("python-networkx" ,python-networkx)
3612 ("python-numpy" ,python-numpy)))
3613 (home-page "https://github.com/gtaylor/python-colormath")
3614 (synopsis "Color math and conversion library")
3615 (description
3616 "This is a Python library for color math and conversions.")
3617 (license license:bsd-3)))
3618
3619 (define-public python2-colormath
3620 (package-with-python2 python-colormath))
3621
3622 (define-public python-spectra
3623 (package
3624 (name "python-spectra")
3625 (version "0.0.11")
3626 (source
3627 (origin
3628 (method url-fetch)
3629 (uri (pypi-uri "spectra" version))
3630 (sha256
3631 (base32
3632 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3633 (build-system python-build-system)
3634 (arguments
3635 `(#:phases
3636 (modify-phases %standard-phases
3637 (replace 'check
3638 (lambda _ (invoke "nosetests" "-v"))))))
3639 (propagated-inputs
3640 `(("python-colormath" ,python-colormath)))
3641 (native-inputs
3642 `(("python-nose" ,python-nose)))
3643 (home-page "https://github.com/jsvine/spectra")
3644 (synopsis "Color scales and color conversion")
3645 (description
3646 "This package provides a Python library intended to make color math,
3647 color scales, and color space conversion easy. It has support for:
3648
3649 @enumerate
3650 @item Color scales
3651 @item Color ranges
3652 @item Color blending
3653 @item Brightening/darkening colors
3654 @item Saturating/desaturating colors
3655 @item Conversion to/from multiple color spaces.
3656 @end enumerate\n")
3657 (license license:expat)))
3658
3659 (define-public python2-spectra
3660 (package-with-python2 python-spectra))
3661
3662 (define-public python-numpy-documentation
3663 (package
3664 (name "python-numpy-documentation")
3665 (version (package-version python-numpy))
3666 (source (package-source python-numpy))
3667 (build-system python-build-system)
3668 (native-inputs
3669 `(("python-matplotlib" ,python-matplotlib)
3670 ("python-numpy" ,python-numpy)
3671 ("pkg-config" ,pkg-config)
3672 ("python-sphinx" ,python-sphinx)
3673 ("python-numpydoc" ,python-numpydoc)
3674 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
3675 texlive-fonts-ec
3676 texlive-generic-ifxetex
3677 texlive-generic-pdftex
3678 texlive-amsfonts
3679 texlive-latex-capt-of
3680 texlive-latex-cmap
3681 texlive-latex-environ
3682 texlive-latex-eqparbox
3683 texlive-latex-etoolbox
3684 texlive-latex-expdlist
3685 texlive-latex-fancyhdr
3686 texlive-latex-fancyvrb
3687 texlive-latex-fncychap
3688 texlive-latex-float
3689 texlive-latex-framed
3690 texlive-latex-geometry
3691 texlive-latex-graphics
3692 texlive-latex-hyperref
3693 texlive-latex-mdwtools
3694 texlive-latex-multirow
3695 texlive-latex-needspace
3696 texlive-latex-oberdiek
3697 texlive-latex-parskip
3698 texlive-latex-preview
3699 texlive-latex-tabulary
3700 texlive-latex-threeparttable
3701 texlive-latex-titlesec
3702 texlive-latex-trimspaces
3703 texlive-latex-ucs
3704 texlive-latex-upquote
3705 texlive-latex-url
3706 texlive-latex-varwidth
3707 texlive-latex-wrapfig)))
3708 ("texinfo" ,texinfo)
3709 ("perl" ,perl)
3710 ("scipy-sphinx-theme"
3711 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3712 (method git-fetch)
3713 (uri (git-reference
3714 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3715 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3716 (sha256
3717 (base32
3718 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3719 ,@(package-native-inputs python-numpy)))
3720 (arguments
3721 `(#:tests? #f ; we're only generating the documentation
3722 #:phases
3723 (modify-phases %standard-phases
3724 (delete 'build)
3725 (replace 'install
3726 (lambda* (#:key inputs outputs #:allow-other-keys)
3727 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3728 (doc (string-append
3729 data "/doc/" ,name "-"
3730 ,(package-version python-numpy)))
3731 (info-reader (string-append data "/info"))
3732 (html (string-append doc "/html"))
3733 (scipy-sphinx-theme "scipy-sphinx-theme")
3734 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3735 (pyver ,(string-append "PYVER=")))
3736
3737 ;; FIXME: this is needed to for texlive-union to generate
3738 ;; fonts, which are not found.
3739 (setenv "HOME" "/tmp")
3740
3741 (with-directory-excursion "doc"
3742 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3743 (mkdir-p html)
3744 (invoke "make" "html" pyver)
3745 (invoke "make" "latex" "PAPER=a4" pyver)
3746 (invoke "make" "-C" "build/latex"
3747 "all-pdf" "PAPER=a4" pyver)
3748 ;; FIXME: Generation of the info file fails.
3749 ;; (invoke "make" "info" pyver)
3750 ;; (mkdir-p info)
3751 ;; (copy-file "build/texinfo/numpy.info"
3752 ;; (string-append info "/numpy.info"))
3753 (for-each (lambda (file)
3754 (copy-file (string-append "build/latex" file)
3755 (string-append doc file)))
3756 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3757 (with-directory-excursion "build/html"
3758 (for-each (lambda (file)
3759 (let* ((dir (dirname file))
3760 (tgt-dir (string-append html "/" dir)))
3761 (unless (equal? "." dir)
3762 (mkdir-p tgt-dir))
3763 (install-file file html)))
3764 (find-files "." ".*")))))
3765 #t)))))
3766 (home-page (package-home-page python-numpy))
3767 (synopsis "Documentation for the python-numpy package")
3768 (description (package-description python-numpy))
3769 (license (package-license python-numpy))))
3770
3771 (define-public python2-numpy-documentation
3772 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3773 (package
3774 (inherit numpy-documentation)
3775 (native-inputs `(("python2-functools32" ,python2-functools32)
3776 ,@(package-native-inputs numpy-documentation))))))
3777
3778 (define-public python-pygit2
3779 (package
3780 (name "python-pygit2")
3781 (version "0.28.2")
3782 (source
3783 (origin
3784 (method url-fetch)
3785 (uri (pypi-uri "pygit2" version))
3786 (sha256
3787 (base32 "11kzj5mjkspvplnpdb6bj8dcj6rgmkk986k8hjcklyg5yaxkz32d"))))
3788 (build-system python-build-system)
3789 (arguments
3790 '(#:tests? #f)) ; tests don't run correctly in our environment
3791 (propagated-inputs
3792 `(("python-six" ,python-six)
3793 ("python-cffi" ,python-cffi)
3794 ("libgit2" ,libgit2)
3795 ("python-tox" ,python-tox)))
3796 (native-inputs
3797 `(("python-pytest" ,python-pytest)))
3798 (home-page "https://github.com/libgit2/pygit2")
3799 (synopsis "Python bindings for libgit2")
3800 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3801 library, libgit2 implements Git plumbing.")
3802 ;; GPL2.0 only, with linking exception.
3803 (license license:gpl2)))
3804
3805 (define-public python2-pygit2
3806 (package-with-python2 python-pygit2))
3807
3808 (define-public python-pyparsing
3809 (package
3810 (name "python-pyparsing")
3811 (version "2.3.1")
3812 (source
3813 (origin
3814 (method url-fetch)
3815 (uri (pypi-uri "pyparsing" version))
3816 (sha256
3817 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
3818 (build-system python-build-system)
3819 (outputs '("out" "doc"))
3820 (arguments
3821 `(#:tests? #f ; no test target
3822 #:phases
3823 (modify-phases %standard-phases
3824 (add-after 'install 'install-doc
3825 (lambda* (#:key outputs #:allow-other-keys)
3826 (let* ((doc (string-append (assoc-ref outputs "doc")
3827 "/share/doc/" ,name "-" ,version))
3828 (html-doc (string-append doc "/html"))
3829 (examples (string-append doc "/examples")))
3830 (mkdir-p html-doc)
3831 (mkdir-p examples)
3832 (for-each
3833 (lambda (dir tgt)
3834 (map (lambda (file)
3835 (install-file file tgt))
3836 (find-files dir ".*")))
3837 (list "docs" "htmldoc" "examples")
3838 (list doc html-doc examples))
3839 #t))))))
3840 (home-page "https://github.com/pyparsing/pyparsing")
3841 (synopsis "Python parsing class library")
3842 (description
3843 "The pyparsing module is an alternative approach to creating and
3844 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3845 of regular expressions. The pyparsing module provides a library of classes
3846 that client code uses to construct the grammar directly in Python code.")
3847 (license license:expat)))
3848
3849 (define-public python2-pyparsing
3850 (package-with-python2 python-pyparsing))
3851
3852 (define-public python-numpydoc
3853 (package
3854 (name "python-numpydoc")
3855 (version "0.8.0")
3856 (source
3857 (origin
3858 (method url-fetch)
3859 (uri (pypi-uri "numpydoc" version))
3860 (sha256
3861 (base32
3862 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3863 (build-system python-build-system)
3864 (propagated-inputs
3865 `(("python-sphinx" ,python-sphinx)))
3866 (native-inputs
3867 `(("python-nose" ,python-nose)))
3868 (home-page "https://pypi.python.org/pypi/numpydoc")
3869 (synopsis
3870 "Numpy's Sphinx extensions")
3871 (description
3872 "Sphinx extension to support docstrings in Numpy format.")
3873 (license license:bsd-2)))
3874
3875 (define-public python2-numpydoc
3876 (package-with-python2 python-numpydoc))
3877
3878 (define-public python-numexpr
3879 (package
3880 (name "python-numexpr")
3881 (version "2.6.5")
3882 (source
3883 (origin
3884 (method url-fetch)
3885 (uri (pypi-uri "numexpr" version))
3886 (sha256
3887 (base32
3888 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3889 (build-system python-build-system)
3890 (arguments `(#:tests? #f)) ; no tests included
3891 (propagated-inputs
3892 `(("python-numpy" ,python-numpy)))
3893 (home-page "https://github.com/pydata/numexpr")
3894 (synopsis "Fast numerical expression evaluator for NumPy")
3895 (description
3896 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3897 expressions that operate on arrays are accelerated and use less memory than
3898 doing the same calculation in Python. In addition, its multi-threaded
3899 capabilities can make use of all your cores, which may accelerate
3900 computations, most specially if they are not memory-bounded (e.g. those using
3901 transcendental functions).")
3902 (license license:expat)))
3903
3904 (define-public python2-numexpr
3905 (package-with-python2 python-numexpr))
3906
3907 (define-public python-cycler
3908 (package
3909 (name "python-cycler")
3910 (version "0.10.0")
3911 (source (origin
3912 (method url-fetch)
3913 (uri (pypi-uri "cycler" version))
3914 (sha256
3915 (base32
3916 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3917 (build-system python-build-system)
3918 (arguments
3919 ;; XXX: The current version requires 'coveralls' which we don't have.
3920 ;; Enable this for the next release which uses 'python-pytest'.
3921 '(#:tests? #f))
3922 (propagated-inputs
3923 `(("python-six" ,python-six)))
3924 (home-page "http://matplotlib.org/cycler/")
3925 (synopsis "Composable keyword argument iterator")
3926 (description
3927 "When using @code{matplotlib} and plotting more than one line, it is
3928 common to want to be able to want to be able to cycle over one or more artist
3929 styles; but the plotting logic can quickly become involved.
3930 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3931 @code{Cycler} class was developed.")
3932 (license license:bsd-3)))
3933
3934 (define-public python2-cycler
3935 (package-with-python2 python-cycler))
3936
3937 (define-public python-colorspacious
3938 (package
3939 (name "python-colorspacious")
3940 (version "1.1.2")
3941 (source
3942 (origin
3943 (method git-fetch)
3944 (uri (git-reference
3945 (url "https://github.com/njsmith/colorspacious.git")
3946 (commit (string-append "v" version))))
3947 (file-name (git-file-name name version))
3948 (sha256
3949 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
3950 (build-system python-build-system)
3951 (propagated-inputs
3952 `(("python-numpy" ,python-numpy)))
3953 (native-inputs
3954 `(("python-nose" ,python-nose)))
3955 (arguments
3956 `(#:phases
3957 (modify-phases %standard-phases
3958 (replace 'check
3959 (lambda _
3960 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
3961 (home-page "https://github.com/njsmith/colorspacious")
3962 (synopsis "Python library for colorspace conversions")
3963 (description "@code{colorspacious} is a Python library that lets you
3964 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3965 (license license:expat)))
3966
3967 (define-public python2-colorspacious
3968 (package-with-python2 python-colorspacious))
3969
3970 (define-public python-matplotlib
3971 (package
3972 (name "python-matplotlib")
3973 (version "3.1.1")
3974 (source
3975 (origin
3976 (method url-fetch)
3977 (uri (pypi-uri "matplotlib" version))
3978 (sha256
3979 (base32
3980 "14qc109dibp32xfd9lah54djc0rc76fhbsj9cwyb328lzqmd5sqz"))))
3981 (build-system python-build-system)
3982 (propagated-inputs ; the following packages are all needed at run time
3983 `(("python-cycler" ,python-cycler)
3984 ("python-kiwisolver" ,python-kiwisolver)
3985 ("python-pyparsing" ,python-pyparsing)
3986 ("python-pygobject" ,python-pygobject)
3987 ("gobject-introspection" ,gobject-introspection)
3988 ("python-tkinter" ,python "tk")
3989 ("python-dateutil" ,python-dateutil)
3990 ("python-numpy" ,python-numpy)
3991 ("python-pillow" ,python-pillow)
3992 ("python-pytz" ,python-pytz)
3993 ("python-six" ,python-six)
3994 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3995 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3996 ;; object. For this reason we need to import both libraries.
3997 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
3998 ("python-pycairo" ,python-pycairo)
3999 ("python-cairocffi" ,python-cairocffi)))
4000 (inputs
4001 `(("libpng" ,libpng)
4002 ("imagemagick" ,imagemagick)
4003 ("freetype" ,freetype)
4004 ("cairo" ,cairo)
4005 ("glib" ,glib)
4006 ;; FIXME: Add backends when available.
4007 ;("python-wxpython" ,python-wxpython)
4008 ("tcl" ,tcl)
4009 ("tk" ,tk)))
4010 (native-inputs
4011 `(("pkg-config" ,pkg-config)
4012 ("python-pytest" ,python-pytest)
4013 ("python-mock" ,python-mock)
4014 ("unzip" ,unzip)
4015 ("jquery-ui"
4016 ,(origin
4017 (method url-fetch)
4018 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
4019 (sha256
4020 (base32
4021 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
4022 (arguments
4023 `(#:phases
4024 (modify-phases %standard-phases
4025 ;; XXX We disable all image comparison tests because we're using a
4026 ;; newer version of FreeType than matplotlib expects. This leads to
4027 ;; minor differences throughout the tests.
4028 (add-after 'unpack 'fix-and-disable-failing-tests
4029 (lambda _
4030 (substitute* (append (find-files "lib/matplotlib/tests/"
4031 "test_.*\\.py$")
4032 (find-files "lib/mpl_toolkits/tests"
4033 "test_.*\\.py$"))
4034 (("^from matplotlib" match)
4035 (string-append "import pytest\n" match))
4036 (("( *)@image_comparison" match indent)
4037 (string-append indent
4038 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
4039 match)))
4040 (substitute* "lib/matplotlib/tests/test_animation.py"
4041 (("/bin/sh") (which "sh")))
4042 (for-each delete-file
4043 ;; test_normal_axes, test_get_tightbbox_polar
4044 '("lib/matplotlib/tests/test_axes.py"
4045 ;; test_outward_ticks
4046 "lib/matplotlib/tests/test_tightlayout.py"
4047 ;; Fontconfig returns no fonts.
4048 "lib/matplotlib/tests/test_font_manager.py"))
4049 #t))
4050 (add-before 'install 'install-jquery-ui
4051 (lambda* (#:key outputs inputs #:allow-other-keys)
4052 (let ((dir (string-append (assoc-ref outputs "out")
4053 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
4054 (mkdir-p dir)
4055 (invoke "unzip"
4056 (assoc-ref inputs "jquery-ui")
4057 "-d" dir))
4058 #t))
4059 (delete 'check)
4060 (add-after 'install 'check
4061 (lambda* (#:key outputs inputs #:allow-other-keys)
4062 (add-installed-pythonpath inputs outputs)
4063 (invoke "python" "tests.py" "-v"
4064 "-m" "not network")))
4065 (add-before 'build 'configure-environment
4066 (lambda* (#:key outputs inputs #:allow-other-keys)
4067 (let ((cairo (assoc-ref inputs "cairo")))
4068 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
4069 ;; has not effect.
4070 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
4071 (setenv "HOME" (getcwd))
4072 (call-with-output-file "setup.cfg"
4073 (lambda (port)
4074 (format port "[directories]~%
4075 basedirlist = ~a,~a~%
4076 [packages]~%
4077 tests = True~%"
4078 (assoc-ref inputs "tcl")
4079 (assoc-ref inputs "tk")))))
4080 #t)))))
4081 (home-page "https://matplotlib.org/")
4082 (synopsis "2D plotting library for Python")
4083 (description
4084 "Matplotlib is a Python 2D plotting library which produces publication
4085 quality figures in a variety of hardcopy formats and interactive environments
4086 across platforms. Matplotlib can be used in Python scripts, the python and
4087 ipython shell, web application servers, and six graphical user interface
4088 toolkits.")
4089 (license license:psfl)
4090 (properties `((python2-variant . ,(delay python2-matplotlib))))))
4091
4092 (define-public python2-matplotlib
4093 (let ((matplotlib (package-with-python2
4094 (strip-python2-variant python-matplotlib))))
4095 (package (inherit matplotlib)
4096 (version "2.2.4")
4097 (source
4098 (origin
4099 (method url-fetch)
4100 (uri (pypi-uri "matplotlib" version))
4101 (sha256
4102 (base32
4103 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
4104 (arguments
4105 (substitute-keyword-arguments (package-arguments matplotlib)
4106 ((#:phases phases)
4107 `(modify-phases ,phases
4108 (replace 'install-jquery-ui
4109 (lambda* (#:key outputs inputs #:allow-other-keys)
4110 (let ((dir (string-append (assoc-ref outputs "out")
4111 "/lib/python2.7/site-packages/"
4112 "matplotlib/backends/web_backend/")))
4113 (mkdir-p dir)
4114 (invoke "unzip"
4115 (assoc-ref inputs "jquery-ui")
4116 "-d" dir))
4117 #t))
4118 (delete 'check))))) ; These tests weren't run the the past.
4119 ;; Make sure to use special packages for Python 2 instead
4120 ;; of those automatically rewritten by package-with-python2.
4121 (propagated-inputs
4122 `(("python2-pycairo" ,python2-pycairo)
4123 ("python2-backports-functools-lru-cache"
4124 ,python2-backports-functools-lru-cache)
4125 ("python2-functools32" ,python2-functools32)
4126 ("python2-pygobject-2" ,python2-pygobject-2)
4127 ("python2-subprocess32" ,python2-subprocess32)
4128 ("python2-tkinter" ,python-2 "tk")
4129 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4130 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4131
4132 (define-public python-matplotlib-documentation
4133 (package
4134 (name "python-matplotlib-documentation")
4135 (version (package-version python-matplotlib))
4136 (source (package-source python-matplotlib))
4137 (build-system python-build-system)
4138 (native-inputs
4139 `(("python-matplotlib" ,python-matplotlib)
4140 ("python-colorspacious" ,python-colorspacious)
4141 ("python-sphinx" ,python-sphinx)
4142 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
4143 ("python-sphinx-gallery" ,python-sphinx-gallery)
4144 ("python-numpydoc" ,python-numpydoc)
4145 ("python-ipython" ,python-ipython)
4146 ("python-ipykernel" ,python-ipykernel)
4147 ("python-mock" ,python-mock)
4148 ("graphviz" ,graphviz)
4149 ("texlive" ,(texlive-union (list texlive-amsfonts
4150 texlive-latex-amsmath
4151 texlive-latex-enumitem
4152 texlive-latex-expdlist
4153 texlive-latex-geometry
4154 texlive-latex-preview
4155 texlive-latex-type1cm
4156 texlive-latex-ucs
4157
4158 texlive-generic-pdftex
4159
4160 texlive-fonts-ec
4161 texlive-fonts-adobe-times
4162 texlive-fonts-txfonts)))
4163 ("texinfo" ,texinfo)
4164 ,@(package-native-inputs python-matplotlib)))
4165 (arguments
4166 `(#:tests? #f ; we're only generating documentation
4167 #:phases
4168 (modify-phases %standard-phases
4169 ;; The tests in python-matplotlib are run after the install phase, so
4170 ;; we need to delete the extra phase here.
4171 (delete 'check)
4172 (replace 'build
4173 (lambda _
4174 (chdir "doc")
4175 (setenv "PYTHONPATH"
4176 (string-append (getenv "PYTHONPATH")
4177 ":" (getcwd) "/../examples/units"))
4178 (substitute* "conf.py"
4179 ;; Don't use git.
4180 (("^SHA = check_output.*")
4181 (string-append "SHA = \"" ,version "\"\n"))
4182 ;; Don't fetch intersphinx files from the Internet
4183 (("^explicit_order_folders" m)
4184 (string-append "intersphinx_mapping = {}\n" m))
4185 (("'sphinx.ext.intersphinx',") "")
4186 ;; Disable URL embedding which requires internet access.
4187 (("'https://docs.scipy.org/doc/numpy'") "None")
4188 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
4189 (invoke "make"
4190 "SPHINXBUILD=sphinx-build"
4191 "SPHINXOPTS=" ; don't abort on warnings
4192 "html" "texinfo")))
4193 (replace 'install
4194 (lambda* (#:key inputs outputs #:allow-other-keys)
4195 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4196 (doc (string-append data "/doc/python-matplotlib-" ,version))
4197 (info (string-append data "/info"))
4198 (html (string-append doc "/html")))
4199 (mkdir-p html)
4200 (mkdir-p info)
4201 (copy-recursively "build/html" html)
4202 (symlink (string-append html "/_images")
4203 (string-append info "/matplotlib-figures"))
4204 (with-directory-excursion "build/texinfo"
4205 (substitute* "matplotlib.texi"
4206 (("@image\\{([^,]*)" all file)
4207 (string-append "@image{matplotlib-figures/" file)))
4208 (symlink (string-append html "/_images")
4209 "./matplotlib-figures")
4210 (invoke "makeinfo" "--no-split"
4211 "-o" "matplotlib.info" "matplotlib.texi"))
4212 (install-file "build/texinfo/matplotlib.info" info))
4213 #t)))))
4214 (home-page (package-home-page python-matplotlib))
4215 (synopsis "Documentation for the python-matplotlib package")
4216 (description (package-description python-matplotlib))
4217 (license (package-license python-matplotlib))))
4218
4219 (define-public python2-matplotlib-documentation
4220 (let ((parent (package-with-python2 python-matplotlib-documentation)))
4221 (package
4222 (inherit parent)
4223 (native-inputs
4224 (alist-delete "python-sphinx-copybutton"
4225 (package-native-inputs parent))))))
4226
4227 (define-public python-matplotlib-venn
4228 (package
4229 (name "python-matplotlib-venn")
4230 (version "0.11.5")
4231 (source
4232 (origin
4233 (method url-fetch)
4234 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4235 (sha256
4236 (base32
4237 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4238 (build-system python-build-system)
4239 (arguments '(#:tests? #f)) ; tests are not included
4240 (propagated-inputs
4241 `(("python-matplotlib" ,python-matplotlib)
4242 ("python-numpy" ,python-numpy)
4243 ("python-scipy" ,python-scipy)))
4244 (native-inputs
4245 `(("unzip" ,unzip)))
4246 (home-page "https://github.com/konstantint/matplotlib-venn")
4247 (synopsis "Plot area-proportional Venn diagrams")
4248 (description
4249 "This package provides tools for plotting area-proportional two- and
4250 three-way Venn diagrams in @code{matplotlib}.")
4251 (license license:expat)))
4252
4253 (define-public python2-pysnptools
4254 (package
4255 (name "python2-pysnptools")
4256 (version "0.3.13")
4257 (source
4258 (origin
4259 (method url-fetch)
4260 (uri (pypi-uri "pysnptools" version))
4261 (sha256
4262 (base32
4263 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
4264 (build-system python-build-system)
4265 (arguments
4266 `(#:python ,python-2 ; only Python 2.7 is supported
4267 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
4268 (propagated-inputs
4269 `(("python2-numpy" ,python2-numpy)
4270 ("python2-scipy" ,python2-scipy)
4271 ("python2-pandas" ,python2-pandas)))
4272 (native-inputs
4273 `(("python2-cython" ,python2-cython)))
4274 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
4275 (synopsis "Library for reading and manipulating genetic data")
4276 (description
4277 "PySnpTools is a library for reading and manipulating genetic data. It
4278 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4279 those files. It can also efficiently manipulate ranges of integers using set
4280 operators such as union, intersection, and difference.")
4281 (license license:asl2.0)))
4282
4283 (define-public python-scipy
4284 (package
4285 (name "python-scipy")
4286 (version "1.3.1")
4287 (source
4288 (origin
4289 (method url-fetch)
4290 (uri (pypi-uri "scipy" version))
4291 (sha256
4292 (base32
4293 "1df113c9i6vazsn6y3n9wc22jh737z1g7dmx3mypkdwpdnscyhr6"))))
4294 (build-system python-build-system)
4295 (propagated-inputs
4296 `(("python-numpy" ,python-numpy)
4297 ("python-matplotlib" ,python-matplotlib)
4298 ("python-pyparsing" ,python-pyparsing)))
4299 (inputs
4300 `(("lapack" ,lapack)
4301 ("openblas" ,openblas)))
4302 (native-inputs
4303 `(("python-cython" ,python-cython)
4304 ("python-pytest" ,python-pytest)
4305 ("python-sphinx" ,python-sphinx)
4306 ("python-numpydoc" ,python-numpydoc)
4307 ("gfortran" ,gfortran)
4308 ("perl" ,perl)
4309 ("which" ,which)))
4310 (outputs '("out" "doc"))
4311 (arguments
4312 `(#:phases
4313 (modify-phases %standard-phases
4314 (add-after 'unpack 'disable-broken-tests
4315 (lambda _
4316 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
4317 (("^( +)def test_threads_parallel\\(self\\):" m indent)
4318 (string-append indent
4319 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4320 m)))
4321 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
4322 (("^def test_parallel_threads\\(\\):" m)
4323 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4324 m)))
4325 #t))
4326 (add-before 'build 'configure-openblas
4327 (lambda* (#:key inputs #:allow-other-keys)
4328 (call-with-output-file "site.cfg"
4329 (lambda (port)
4330 (format port
4331 "[blas]
4332 libraries = openblas
4333 library_dirs = ~a/lib
4334 include_dirs = ~a/include
4335
4336 # backslash-n to make emacs happy
4337 \n[atlas]
4338 library_dirs = ~a/lib
4339 atlas_libs = openblas
4340 "
4341 (assoc-ref inputs "openblas")
4342 (assoc-ref inputs "openblas")
4343 (assoc-ref inputs "openblas"))))
4344 #t))
4345 (add-after 'install 'install-doc
4346 (lambda* (#:key inputs outputs #:allow-other-keys)
4347 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4348 (doc (string-append data "/doc/" ,name "-" ,version))
4349 (html (string-append doc "/html"))
4350 (pyver ,(string-append "PYVER=" (version-major+minor
4351 (package-version python))))
4352 ;; By default it tries to run sphinx-build through the Python
4353 ;; interpreter which won't work with our shell wrapper.
4354 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
4355 ;; Make installed package available for building the
4356 ;; documentation
4357 (add-installed-pythonpath inputs outputs)
4358 (with-directory-excursion "doc"
4359 ;; Fix generation of images for mathematical expressions.
4360 (substitute* (find-files "source" "conf\\.py")
4361 (("pngmath_use_preview = True")
4362 "pngmath_use_preview = False"))
4363 (mkdir-p html)
4364 (invoke "make" "html" pyver sphinxbuild)
4365 (with-directory-excursion "build/html"
4366 (for-each (lambda (file)
4367 (let* ((dir (dirname file))
4368 (tgt-dir (string-append html "/" dir)))
4369 (install-file file html)))
4370 (find-files "." ".*")))))
4371 #t))
4372 ;; Tests can only be run after the library has been installed and not
4373 ;; within the source directory.
4374 (delete 'check)
4375 (add-after 'install 'check
4376 (lambda* (#:key inputs outputs #:allow-other-keys)
4377 (add-installed-pythonpath inputs outputs)
4378 (with-directory-excursion "/tmp"
4379 (invoke "python" "-c"
4380 "import scipy; scipy.test(verbose=2)")))))))
4381 (home-page "https://www.scipy.org/")
4382 (synopsis "The Scipy library provides efficient numerical routines")
4383 (description "The SciPy library is one of the core packages that make up
4384 the SciPy stack. It provides many user-friendly and efficient numerical
4385 routines such as routines for numerical integration and optimization.")
4386 (properties `((python2-variant . ,(delay python2-scipy))))
4387 (license license:bsd-3)))
4388
4389 ;; Version 1.2.2 is the last version to support Python 2
4390 (define-public python2-scipy
4391 (package
4392 (inherit (package-with-python2
4393 (strip-python2-variant python-scipy)))
4394 (version "1.2.2")
4395 (source
4396 (origin
4397 (method url-fetch)
4398 (uri (pypi-uri "scipy" version))
4399 (sha256
4400 (base32
4401 "1cgvgin8fvckv96hjh3ikmwkra5rif51bdb75ifzf7xbil5iwcx4"))))))
4402
4403 (define-public python-socksipy-branch
4404 (package
4405 (name "python-socksipy-branch")
4406 (version "1.01")
4407 (source
4408 (origin
4409 (method url-fetch)
4410 (uri (pypi-uri "SocksiPy-branch" version))
4411 (sha256
4412 (base32
4413 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4414 (build-system python-build-system)
4415 (arguments
4416 `(#:tests? #f)) ; There are no tests
4417 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4418 (synopsis "Python SOCKS module")
4419 (description
4420 "SocksiPy - A Python SOCKS client module. It provides a
4421 socket-like interface that supports connections to any TCP
4422 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4423 The original version was developed by Dan Haim, this is a
4424 branch created by Mario Vilas to address some open issues,
4425 as the original project seems to have been abandoned circa 2007.")
4426 (license license:bsd-3)))
4427
4428 (define-public python2-socksipy-branch
4429 (package-with-python2 python-socksipy-branch))
4430
4431 (define-public python-pycodestyle
4432 (package
4433 (name "python-pycodestyle")
4434 (version "2.5.0")
4435 (source
4436 (origin
4437 (method url-fetch)
4438 (uri (pypi-uri "pycodestyle" version))
4439 (sha256
4440 (base32
4441 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
4442 (build-system python-build-system)
4443 (home-page "https://pycodestyle.readthedocs.io/")
4444 (synopsis "Python style guide checker")
4445 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4446 Python code against some of the style conventions in
4447 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4448 (license license:expat)))
4449
4450 (define-public python2-pycodestyle
4451 (package-with-python2 python-pycodestyle))
4452
4453 (define-public python-multidict
4454 (package
4455 (name "python-multidict")
4456 (version "4.2.0")
4457 (source
4458 (origin
4459 (method url-fetch)
4460 (uri (pypi-uri "multidict" version))
4461 (sha256
4462 (base32
4463 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4464 (build-system python-build-system)
4465 (native-inputs
4466 `(("python-pytest" ,python-pytest)
4467 ("python-pytest-runner" ,python-pytest-runner)))
4468 (home-page "https://github.com/aio-libs/multidict/")
4469 (synopsis "Multidict implementation")
4470 (description "Multidict is dict-like collection of key-value pairs
4471 where key might be occurred more than once in the container.")
4472 (license license:asl2.0)))
4473
4474 (define-public python-orderedmultidict
4475 (package
4476 (name "python-orderedmultidict")
4477 (version "0.7.11")
4478 (source
4479 (origin
4480 (method url-fetch)
4481 (uri (pypi-uri "orderedmultidict" version))
4482 (sha256
4483 (base32
4484 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4485 (build-system python-build-system)
4486 (arguments
4487 `(#:phases
4488 (modify-phases %standard-phases
4489 (add-after 'unpack 'fix-tests
4490 (lambda _
4491 ;; The package uses nosetest for running the tests.
4492 ;; Adding this initfile allows to run the test suite
4493 ;; without requiring nosetest.
4494 (with-output-to-file "tests/__init__.py" newline)
4495 #t)))))
4496 (propagated-inputs
4497 `(("python-six" ,python-six)))
4498 (native-inputs
4499 `(("python-pycodestyle" ,python-pycodestyle)))
4500 (home-page "https://github.com/gruns/orderedmultidict")
4501 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4502 (description "This package contains a library for ordered multivalue
4503 dictionaries. A multivalue dictionary is a dictionary that can store
4504 multiple values for the same key. An ordered multivalue dictionary is a
4505 multivalue dictionary that retains the order of insertions and deletions.")
4506 (license license:unlicense)))
4507
4508 (define-public python2-orderedmultidict
4509 (package-with-python2 python-orderedmultidict))
4510
4511 (define-public python-autopep8
4512 (package
4513 (name "python-autopep8")
4514 (version "1.3.5")
4515 (source
4516 (origin
4517 (method url-fetch)
4518 (uri (pypi-uri "autopep8" version))
4519 (sha256
4520 (base32
4521 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4522 (build-system python-build-system)
4523 (propagated-inputs
4524 `(("python-pycodestyle" ,python-pycodestyle)))
4525 (home-page "https://github.com/hhatto/autopep8")
4526 (synopsis "Format Python code according to the PEP 8 style guide")
4527 (description
4528 "@code{autopep8} automatically formats Python code to conform to
4529 the PEP 8 style guide. It uses the pycodestyle utility to determine
4530 what parts of the code needs to be formatted. @code{autopep8} is
4531 capable of fixing most of the formatting issues that can be reported
4532 by pycodestyle.")
4533 (license (license:non-copyleft
4534 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4535
4536 (define-public python2-autopep8
4537 (package-with-python2 python-autopep8))
4538
4539 (define-public python-distutils-extra
4540 (package
4541 (name "python-distutils-extra")
4542 (version "2.38")
4543 (source
4544 (origin
4545 (method url-fetch)
4546 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4547 version "/+download/python-distutils-extra-"
4548 version ".tar.gz"))
4549 (sha256
4550 (base32
4551 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4552 (build-system python-build-system)
4553 (home-page "https://launchpad.net/python-distutils-extra/")
4554 (synopsis "Enhancements to Python's distutils")
4555 (description
4556 "The python-distutils-extra module enables you to easily integrate
4557 gettext support, themed icons, and scrollkeeper-based documentation into
4558 Python's distutils.")
4559 (license license:gpl2)))
4560
4561 (define-public python2-distutils-extra
4562 (package-with-python2 python-distutils-extra))
4563
4564 (define-public python2-elib.intl
4565 (package
4566 (name "python2-elib.intl")
4567 (version "0.0.3")
4568 (source
4569 (origin
4570 ;; This project doesn't tag releases or publish tarballs, so we take
4571 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4572 (method git-fetch)
4573 (uri (git-reference
4574 (url "https://github.com/dieterv/elib.intl.git")
4575 (commit "d09997cfef")))
4576 (file-name (string-append name "-" version "-checkout"))
4577 (sha256
4578 (base32
4579 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4580 (build-system python-build-system)
4581 (arguments
4582 ;; incompatible with Python 3 (exception syntax)
4583 `(#:python ,python-2
4584 #:tests? #f))
4585 (home-page "https://github.com/dieterv/elib.intl")
4586 (synopsis "Enhanced internationalization for Python")
4587 (description
4588 "The elib.intl module provides enhanced internationalization (I18N)
4589 services for your Python modules and applications.")
4590 (license license:lgpl3+)))
4591
4592 (define-public python-olefile
4593 (package
4594 (name "python-olefile")
4595 (version "0.46")
4596 (source
4597 (origin
4598 (method url-fetch)
4599 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4600 "download/v" version "/olefile-" version ".tar.gz"))
4601 (file-name (string-append name "-" version ".tar.gz"))
4602 (sha256
4603 (base32
4604 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
4605 (build-system python-build-system)
4606 (home-page "https://www.decalage.info/python/olefileio")
4607 (synopsis "Read and write Microsoft OLE2 files.")
4608 (description
4609 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4610 Storage or Compound Document, Microsoft Office). It is an improved version of
4611 the OleFileIO module from PIL, the Python Image Library.")
4612 (license license:bsd-3)))
4613
4614 (define-public python2-olefile
4615 (package-with-python2 python-olefile))
4616
4617 (define-public python-pillow
4618 (package
4619 (name "python-pillow")
4620 (version "6.1.0")
4621 (source
4622 (origin
4623 (method url-fetch)
4624 (uri (pypi-uri "Pillow" version))
4625 (sha256
4626 (base32
4627 "1pnrsz0f0n0c819v1pdr8j6rm8xvhc9f3kh1fv9xpdp9n5ygf108"))))
4628 (build-system python-build-system)
4629 (native-inputs
4630 `(("python-pytest" ,python-pytest)))
4631 (inputs
4632 `(("freetype" ,freetype)
4633 ("lcms" ,lcms)
4634 ("zlib" ,zlib)
4635 ("libjpeg" ,libjpeg)
4636 ("openjpeg" ,openjpeg)
4637 ("libtiff" ,libtiff)
4638 ("libwebp" ,libwebp)))
4639 (propagated-inputs
4640 `(("python-olefile" ,python-olefile)))
4641 (arguments
4642 `(#:phases
4643 (modify-phases %standard-phases
4644 (add-after 'unpack 'patch-ldconfig
4645 (lambda _
4646 (substitute* "setup.py"
4647 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4648 (delete 'check) ; We must run checks after python-pillow is installed.
4649 (add-after 'install 'check-installed
4650 (lambda* (#:key outputs inputs #:allow-other-keys)
4651 (begin
4652 (setenv "HOME" (getcwd))
4653 ;; Make installed package available for running the tests.
4654 (add-installed-pythonpath inputs outputs)
4655 (invoke "python" "selftest.py" "--installed")
4656 (invoke "python" "-m" "pytest" "-vv")))))))
4657 (home-page "https://python-pillow.org")
4658 (synopsis "Fork of the Python Imaging Library")
4659 (description
4660 "The Python Imaging Library adds image processing capabilities to your
4661 Python interpreter. This library provides extensive file format support, an
4662 efficient internal representation, and fairly powerful image processing
4663 capabilities. The core image library is designed for fast access to data
4664 stored in a few basic pixel formats. It should provide a solid foundation for
4665 a general image processing tool.")
4666 (license (license:x11-style
4667 "http://www.pythonware.com/products/pil/license.htm"
4668 "The PIL Software License"))))
4669
4670 (define-public python2-pillow
4671 (package-with-python2 python-pillow))
4672
4673 (define-public python-pycparser
4674 (package
4675 (name "python-pycparser")
4676 (version "2.19")
4677 (source
4678 (origin
4679 (method url-fetch)
4680 (uri (pypi-uri "pycparser" version))
4681 (sha256
4682 (base32
4683 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
4684 (outputs '("out" "doc"))
4685 (build-system python-build-system)
4686 (native-inputs
4687 `(("pkg-config" ,pkg-config)))
4688 (arguments
4689 `(#:phases
4690 (modify-phases %standard-phases
4691 (replace 'check
4692 (lambda _
4693 (with-directory-excursion "tests"
4694 (invoke "python" "all_tests.py"))
4695 #t))
4696 (add-after 'install 'install-doc
4697 (lambda* (#:key outputs #:allow-other-keys)
4698 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4699 (doc (string-append data "/doc/" ,name "-" ,version))
4700 (examples (string-append doc "/examples")))
4701 (mkdir-p examples)
4702 (for-each (lambda (file)
4703 (copy-file (string-append "." file)
4704 (string-append doc file)))
4705 '("/README.rst" "/CHANGES" "/LICENSE"))
4706 (copy-recursively "examples" examples)
4707 #t))))))
4708 (home-page "https://github.com/eliben/pycparser")
4709 (synopsis "C parser in Python")
4710 (description
4711 "Pycparser is a complete parser of the C language, written in pure Python
4712 using the PLY parsing library. It parses C code into an AST and can serve as
4713 a front-end for C compilers or analysis tools.")
4714 (license license:bsd-3)))
4715
4716 (define-public python2-pycparser
4717 (package-with-python2 python-pycparser))
4718
4719 (define-public python-pywavelets
4720 (package
4721 (name "python-pywavelets")
4722 (version "1.0.1")
4723 (home-page "https://github.com/PyWavelets/pywt")
4724 (source (origin
4725 (method url-fetch)
4726 (uri (pypi-uri "PyWavelets" version))
4727 (sha256
4728 (base32
4729 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4730 (build-system python-build-system)
4731 (arguments
4732 '(#:modules ((ice-9 ftw)
4733 (srfi srfi-1)
4734 (srfi srfi-26)
4735 (guix build utils)
4736 (guix build python-build-system))
4737 #:phases (modify-phases %standard-phases
4738 (replace 'check
4739 (lambda _
4740 (let ((cwd (getcwd))
4741 (libdir (find (cut string-prefix? "lib." <>)
4742 (scandir "build"))))
4743 (with-directory-excursion (string-append cwd "/build/" libdir)
4744 (invoke "nosetests" "-v" "."))))))))
4745 (native-inputs
4746 `(("python-matplotlib" ,python-matplotlib) ;for tests
4747 ("python-nose" ,python-nose)))
4748 (propagated-inputs
4749 `(("python-numpy" ,python-numpy)))
4750 (synopsis "Wavelet transforms in Python")
4751 (description
4752 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4753 mathematical basis functions that are localized in both time and frequency.
4754 Wavelet transforms are time-frequency transforms employing wavelets. They are
4755 similar to Fourier transforms, the difference being that Fourier transforms are
4756 localized only in frequency instead of in time and frequency.")
4757 (license license:expat)))
4758
4759 (define-public python2-pywavelets
4760 (package-with-python2 python-pywavelets))
4761
4762 (define-public python-xcffib
4763 (package
4764 (name "python-xcffib")
4765 (version "0.6.0")
4766 (source
4767 (origin
4768 (method url-fetch)
4769 (uri (pypi-uri "xcffib" version))
4770 (sha256
4771 (base32
4772 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4773 (build-system python-build-system)
4774 (inputs
4775 `(("libxcb" ,libxcb)))
4776 (propagated-inputs
4777 `(("python-cffi" ,python-cffi) ; used at run time
4778 ("python-six" ,python-six)))
4779 (arguments
4780 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4781 #:tests? #f
4782 #:phases
4783 (modify-phases %standard-phases
4784 (add-after 'unpack 'fix-libxcb-path
4785 (lambda* (#:key inputs #:allow-other-keys)
4786 (let ((libxcb (assoc-ref inputs "libxcb")))
4787 (substitute* '("xcffib/__init__.py")
4788 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4789 #t)))
4790 (add-after 'install 'install-doc
4791 (lambda* (#:key outputs #:allow-other-keys)
4792 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4793 "/doc/" ,name "-" ,version)))
4794 (mkdir-p doc)
4795 (copy-file "README.md"
4796 (string-append doc "/README.md"))
4797 #t))))))
4798 (home-page "https://github.com/tych0/xcffib")
4799 (synopsis "XCB Python bindings")
4800 (description
4801 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4802 support for Python 3 and PyPy. It is based on cffi.")
4803 (license license:expat)))
4804
4805 (define-public python2-xcffib
4806 (package-with-python2 python-xcffib))
4807
4808 (define-public python-cairocffi
4809 (package
4810 (name "python-cairocffi")
4811 (version "0.9.0")
4812 (source
4813 (origin
4814 (method url-fetch)
4815 (uri (pypi-uri "cairocffi" version))
4816 (sha256
4817 (base32
4818 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4819 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4820 (build-system python-build-system)
4821 (outputs '("out" "doc"))
4822 (inputs
4823 `(("glib" ,glib)
4824 ("gtk+" ,gtk+)
4825 ("gdk-pixbuf" ,gdk-pixbuf)
4826 ("cairo" ,cairo)
4827 ("pango" ,pango)))
4828 (native-inputs
4829 `(("pkg-config" ,pkg-config)
4830 ("python-pytest" ,python-pytest)
4831 ("python-pytest-cov" ,python-pytest-cov)
4832 ("python-pytest-runner" ,python-pytest-runner)
4833 ("python-sphinx" ,python-sphinx)
4834 ("python-docutils" ,python-docutils)))
4835 (propagated-inputs
4836 `(("python-xcffib" ,python-xcffib))) ; used at run time
4837 (arguments
4838 `(#:phases
4839 (modify-phases %standard-phases
4840 (add-after 'unpack 'patch-paths
4841 (lambda* (#:key inputs outputs #:allow-other-keys)
4842 (substitute* (find-files "." "\\.py$")
4843 (("dlopen\\(ffi, 'cairo'")
4844 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4845 "/lib/libcairo.so.2'"))
4846 (("dlopen\\(ffi, 'gdk-3'")
4847 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4848 "/lib/libgtk-3.so.0'"))
4849 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4850 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4851 "/lib/libgdk_pixbuf-2.0.so.0'"))
4852 (("dlopen\\(ffi, 'glib-2.0'")
4853 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4854 "/lib/libglib-2.0.so.0'"))
4855 (("dlopen\\(ffi, 'gobject-2.0'")
4856 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4857 "/lib/libgobject-2.0.so.0'"))
4858 (("dlopen\\(ffi, 'pangocairo-1.0'")
4859 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4860 "/lib/libpangocairo-1.0.so.0'"))
4861 (("dlopen\\(ffi, 'pango-1.0'")
4862 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4863 "/lib/libpango-1.0.so.0'")))
4864 #t))
4865 (add-after 'install 'install-doc
4866 (lambda* (#:key inputs outputs #:allow-other-keys)
4867 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4868 (doc (string-append data "/doc/" ,name "-" ,version))
4869 (html (string-append doc "/html")))
4870 (setenv "LD_LIBRARY_PATH"
4871 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4872 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4873 (setenv "LANG" "en_US.UTF-8")
4874 (mkdir-p html)
4875 (for-each (lambda (file)
4876 (copy-file (string-append "." file)
4877 (string-append doc file)))
4878 '("/README.rst" "/CHANGES" "/LICENSE"))
4879 (system* "python" "setup.py" "build_sphinx")
4880 (copy-recursively "docs/_build/html" html)
4881 #t))))))
4882 (home-page "https://github.com/Kozea/cairocffi")
4883 (synopsis "Python bindings and object-oriented API for Cairo")
4884 (description
4885 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4886 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4887 graphics library with support for multiple backends including image buffers,
4888 PNG, PostScript, PDF, and SVG file output.")
4889 (license license:bsd-3)))
4890
4891 (define-public python2-cairocffi
4892 (package-with-python2 python-cairocffi))
4893
4894 (define-public python-decorator
4895 (package
4896 (name "python-decorator")
4897 (version "4.3.0")
4898 (source
4899 (origin
4900 (method url-fetch)
4901 (uri (pypi-uri "decorator" version))
4902 (sha256
4903 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4904 (build-system python-build-system)
4905 (home-page "https://pypi.python.org/pypi/decorator/")
4906 (synopsis "Python module to simplify usage of decorators")
4907 (description
4908 "The aim of the decorator module is to simplify the usage of decorators
4909 for the average programmer, and to popularize decorators usage giving examples
4910 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4911 etc. The core of this module is a decorator factory.")
4912 (license license:expat)))
4913
4914 (define-public python2-decorator
4915 (package-with-python2 python-decorator))
4916
4917 (define-public python-drmaa
4918 (package
4919 (name "python-drmaa")
4920 (version "0.7.7")
4921 (source
4922 (origin
4923 (method url-fetch)
4924 (uri (pypi-uri "drmaa" version))
4925 (sha256
4926 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4927 (build-system python-build-system)
4928 ;; The test suite requires libdrmaa which is provided by the cluster
4929 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4930 ;; should be set to the path of the libdrmaa library.
4931 (arguments '(#:tests? #f))
4932 (native-inputs
4933 `(("python-nose" ,python-nose)))
4934 (home-page "https://pypi.python.org/pypi/drmaa")
4935 (synopsis "Python bindings for the DRMAA library")
4936 (description
4937 "A Python package for Distributed Resource Management (DRM) job
4938 submission and control. This package is an implementation of the DRMAA 1.0
4939 Python language binding specification.")
4940 (license license:bsd-3)))
4941
4942 (define-public python2-drmaa
4943 (package-with-python2 python-drmaa))
4944
4945 (define-public python-grako
4946 (package
4947 (name "python-grako")
4948 (version "3.99.9")
4949 (source
4950 (origin
4951 (method url-fetch)
4952 (uri
4953 (pypi-uri "grako" version ".zip"))
4954 (sha256
4955 (base32
4956 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4957 (build-system python-build-system)
4958 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4959 (native-inputs
4960 `(("unzip" ,unzip)
4961 ("python-pytest" ,python-pytest)
4962 ("python-pytest-runner" ,python-pytest-runner)))
4963 (home-page "https://bitbucket.org/neogeny/grako")
4964 (synopsis "EBNF parser generator")
4965 (description
4966 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4967 memoizing PEG/Packrat parser in Python.")
4968 (license license:bsd-3)))
4969
4970 (define-public python2-grako
4971 (package-with-python2 python-grako))
4972
4973 (define-public python-gridmap
4974 (package
4975 (name "python-gridmap")
4976 (version "0.13.0")
4977 (source
4978 (origin
4979 (method git-fetch)
4980 (uri (git-reference
4981 (url "https://github.com/pygridtools/gridmap.git")
4982 (commit (string-append "v" version))))
4983 (file-name (git-file-name name version))
4984 (sha256
4985 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
4986 (build-system python-build-system)
4987 (arguments
4988 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4989 (propagated-inputs
4990 `(("python-psutil" ,python-psutil)
4991 ("python-drmaa" ,python-drmaa)
4992 ("python-pyzmq" ,python-pyzmq)))
4993 (home-page "https://github.com/pygridtools/gridmap")
4994 (synopsis "Create jobs on a cluster directly from Python")
4995 (description
4996 "Gridmap is a Python package to allow you to easily create jobs on the
4997 cluster directly from Python. You can directly map Python functions onto the
4998 cluster without needing to write any wrapper code yourself.")
4999 (license license:gpl3+)))
5000
5001 (define-public python2-gridmap
5002 (package-with-python2 python-gridmap))
5003
5004 (define-public python-honcho
5005 (package
5006 (name "python-honcho")
5007 (version "1.0.1")
5008 (source
5009 (origin
5010 (method git-fetch)
5011 (uri (git-reference
5012 (url "https://github.com/nickstenning/honcho.git")
5013 (commit (string-append "v" version))))
5014 (file-name (git-file-name name version))
5015 (sha256
5016 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
5017 (build-system python-build-system)
5018 (native-inputs
5019 `(("python-pytest" ,python-pytest)
5020 ("python-mock" ,python-mock)
5021 ("python-tox" ,python-tox)
5022 ("which" ,which))) ;for tests
5023 (propagated-inputs
5024 `(("python-jinja2" ,python-jinja2)))
5025 (arguments
5026 `(#:phases
5027 (modify-phases %standard-phases
5028 (delete 'check)
5029 (add-after 'install 'check
5030 (lambda* (#:key outputs inputs #:allow-other-keys)
5031 ;; fix honcho path in testsuite
5032 (substitute* "tests/conftest.py"
5033 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
5034 "/bin/honcho" "'")))
5035 ;; It's easier to run tests after install.
5036 ;; Make installed package available for running the tests
5037 (add-installed-pythonpath inputs outputs)
5038 (invoke "py.test" "-v"))))))
5039 (home-page "https://github.com/nickstenning/honcho")
5040 (synopsis "Manage Procfile-based applications")
5041 (description
5042 "A Procfile is a file which describes how to run an application
5043 consisting of several processes. honcho starts all listed processes.
5044 The output of all running processes is collected by honcho and
5045 displayed.")
5046 (license license:expat)))
5047
5048 (define-public python2-honcho
5049 (package-with-python2 python-honcho))
5050
5051 (define-public python-pexpect
5052 (package
5053 (name "python-pexpect")
5054 (version "4.6.0")
5055 (source
5056 (origin
5057 (method url-fetch)
5058 (uri (pypi-uri "pexpect" version))
5059 (sha256
5060 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
5061 (build-system python-build-system)
5062 (arguments
5063 `(#:phases
5064 (modify-phases %standard-phases
5065 (add-before 'check 'prepare-tests
5066 (lambda _
5067 (substitute* (find-files "tests")
5068 (("/bin/ls") (which "ls"))
5069 (("/bin/echo") (which "echo"))
5070 (("/bin/which") (which "which"))
5071 ;; Many tests try to use the /bin directory which
5072 ;; is not present in the build environment.
5073 ;; Use one that's non-empty and unlikely to change.
5074 (("/bin'") "/dev'"))
5075 ;; XXX: Socket connection test gets "Connection reset by peer".
5076 ;; Why does it not work? Delete for now.
5077 (delete-file "tests/test_socket.py")
5078 #t))
5079 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
5080 (native-inputs
5081 `(("python-nose" ,python-nose)
5082 ("python-pytest" ,python-pytest)
5083 ("man-db" ,man-db)
5084 ("which" ,which)
5085 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
5086 (propagated-inputs
5087 `(("python-ptyprocess" ,python-ptyprocess)))
5088 (home-page "http://pexpect.readthedocs.org/")
5089 (synopsis "Controlling interactive console applications")
5090 (description
5091 "Pexpect is a pure Python module for spawning child applications;
5092 controlling them; and responding to expected patterns in their output.
5093 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
5094 child application and control it as if a human were typing commands.")
5095 (license license:isc)))
5096
5097 (define-public python2-pexpect
5098 (package-with-python2 python-pexpect))
5099
5100 (define-public python-setuptools-scm
5101 (package
5102 (name "python-setuptools-scm")
5103 (version "3.2.0")
5104 (source (origin
5105 (method url-fetch)
5106 (uri (pypi-uri "setuptools_scm" version))
5107 (sha256
5108 (base32
5109 "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj"))))
5110 (build-system python-build-system)
5111 (home-page "https://github.com/pypa/setuptools_scm/")
5112 (synopsis "Manage Python package versions in SCM metadata")
5113 (description
5114 "Setuptools_scm handles managing your Python package versions in
5115 @dfn{software configuration management} (SCM) metadata instead of declaring
5116 them as the version argument or in a SCM managed file.")
5117 (license license:expat)))
5118
5119 ;; Needed by python-lazy-object-proxy, remove on next update cycle.
5120 (define-public python-setuptools-scm-3.3
5121 (package
5122 (inherit python-setuptools-scm)
5123 (version "3.3.3")
5124 (source (origin
5125 (method url-fetch)
5126 (uri (pypi-uri "setuptools_scm" version))
5127 (sha256
5128 (base32
5129 "19cyndx23xmpbhz4qrwmfwsmnnaczd0dw7qg977ksq2dbvxy29dx"))))))
5130
5131 (define-public python2-setuptools-scm
5132 (package-with-python2 python-setuptools-scm))
5133
5134 (define-public python-pathlib2
5135 (package
5136 (name "python-pathlib2")
5137 (version "2.3.3")
5138 (source
5139 (origin
5140 (method url-fetch)
5141 (uri (pypi-uri "pathlib2" version))
5142 (sha256
5143 (base32
5144 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
5145 (build-system python-build-system)
5146 (propagated-inputs
5147 `(("python-scandir" ,python-scandir)
5148 ("python-six" ,python-six)))
5149 (home-page "https://pypi.python.org/pypi/pathlib2/")
5150 (synopsis "Object-oriented file system paths")
5151 (description "The goal of pathlib2 is to provide a backport of the
5152 standard @code{pathlib} module which tracks the standard library module, so
5153 all the newest features of the standard @code{pathlib} can be used also on
5154 older Python versions.")
5155 (license license:expat)))
5156
5157 (define-public python-importlib-metadata
5158 (package
5159 (name "python-importlib-metadata")
5160 (version "0.23")
5161 (source
5162 (origin
5163 (method url-fetch)
5164 (uri (pypi-uri "importlib_metadata" version))
5165 (sha256
5166 (base32 "09mdqdfv5rdrwz80jh9m379gxmvk2vhjfz0fg53hid00icvxf65a"))))
5167 (build-system python-build-system)
5168 (propagated-inputs
5169 `(("python-configparser" ,python-configparser)
5170 ("python-contextlib2" ,python-contextlib2)
5171 ("python-docutils" ,python-docutils)
5172 ("python-pathlib2" ,python-pathlib2)
5173 ("python-rst.linker" ,python-rst.linker)
5174 ("python-zipp" ,python-zipp)))
5175 (native-inputs
5176 `(("python-setuptools-scm" ,python-setuptools-scm)
5177 ("python-sphinx" ,python-sphinx)))
5178 (home-page "https://importlib-metadata.readthedocs.io/")
5179 (synopsis "Read metadata from Python packages")
5180 (description
5181 "@code{importlib_metadata} is a library which provides an API for
5182 accessing an installed Python package's metadata, such as its entry points or
5183 its top-level name. This functionality intends to replace most uses of
5184 @code{pkg_resources} entry point API and metadata API. Along with
5185 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
5186 need to use the older and less efficient @code{pkg_resources} package.")
5187 (license license:asl2.0)))
5188
5189 (define-public python-jaraco-packaging
5190 (package
5191 (name "python-jaraco-packaging")
5192 (version "6.1")
5193 (source
5194 (origin
5195 (method url-fetch)
5196 (uri (pypi-uri "jaraco.packaging" version))
5197 (sha256
5198 (base32
5199 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
5200 (build-system python-build-system)
5201 (propagated-inputs
5202 `(("python-pytest" ,python-pytest)
5203 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
5204 ("python-pytest-flake8" ,python-pytest-flake8)
5205 ("python-rst.linker" ,python-rst.linker)
5206 ("python-setuptools" ,python-setuptools)
5207 ("python-setuptools-scm" ,python-setuptools-scm)
5208 ("python-six" ,python-six)
5209 ("python-sphinx" ,python-sphinx)))
5210 (home-page "https://github.com/jaraco/jaraco.packaging")
5211 (synopsis "Tools to supplement packaging Python releases")
5212 (description
5213 "This package provides various tools to supplement packaging Python
5214 releases.")
5215 (license license:expat)))
5216
5217 (define-public python-pathpy
5218 (package
5219 (name "python-pathpy")
5220 (version "11.5.1")
5221 (source
5222 (origin
5223 (method url-fetch)
5224 (uri (pypi-uri "path.py" version))
5225 (sha256
5226 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
5227 (outputs '("out" "doc"))
5228 (build-system python-build-system)
5229 (propagated-inputs
5230 `(("python-appdirs" ,python-appdirs)
5231 ("python-importlib-metadata" ,python-importlib-metadata)))
5232 (native-inputs
5233 `(("python-setuptools-scm" ,python-setuptools-scm)
5234 ("python-sphinx" ,python-sphinx)
5235 ("python-rst.linker" ,python-rst.linker)
5236 ("python-pytest" ,python-pytest)
5237 ("python-pytest-runner" ,python-pytest-runner)
5238 ("python-jaraco-packaging" ,python-jaraco-packaging)))
5239 (arguments
5240 `(#:phases
5241 (modify-phases %standard-phases
5242 (add-after 'build 'build-doc
5243 (lambda _
5244 (setenv "LANG" "en_US.UTF-8")
5245 (invoke "python" "setup.py" "build_sphinx")))
5246 (add-after 'install 'install-doc
5247 (lambda* (#:key outputs #:allow-other-keys)
5248 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5249 (doc (string-append data "/doc/" ,name "-" ,version))
5250 (html (string-append doc "/html")))
5251 (mkdir-p html)
5252 (for-each (lambda (file)
5253 (copy-file file (string-append doc "/" file)))
5254 '("README.rst" "CHANGES.rst"))
5255 (copy-recursively "build/sphinx/html" html)
5256 #t)))
5257 (replace 'check
5258 (lambda _
5259 ;; The import time test aborts if an import takes longer than
5260 ;; 100ms. It may very well take a little longer than that.
5261 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
5262 (home-page "https://github.com/jaraco/path.py")
5263 (synopsis "Python module wrapper for built-in os.path")
5264 (description
5265 "@code{path.py} implements path objects as first-class entities, allowing
5266 common operations on files to be invoked on those path objects directly.")
5267 (license license:expat)))
5268
5269 (define-public python2-pathpy
5270 (package-with-python2 python-pathpy))
5271
5272 (define-public python-simplegeneric
5273 (package
5274 (name "python-simplegeneric")
5275 (version "0.8.1")
5276 (source
5277 (origin
5278 (method url-fetch)
5279 (uri (pypi-uri "simplegeneric" version ".zip"))
5280 (sha256
5281 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5282 (build-system python-build-system)
5283 (native-inputs
5284 `(("unzip" ,unzip)))
5285 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5286 (synopsis "Python module for simple generic functions")
5287 (description
5288 "The simplegeneric module lets you define simple single-dispatch generic
5289 functions, akin to Python’s built-in generic functions like @code{len()},
5290 @code{iter()} and so on. However, instead of using specially-named methods,
5291 these generic functions use simple lookup tables, akin to those used by
5292 e.g. @code{pickle.dump()} and other generic functions found in the Python
5293 standard library.")
5294 (license license:zpl2.1)))
5295
5296 (define-public python2-simplegeneric
5297 (package-with-python2 python-simplegeneric))
5298
5299 (define-public python-ipython-genutils
5300 ;; TODO: This package is retired, check if can be removed, see description.
5301 (package
5302 (name "python-ipython-genutils")
5303 (version "0.1.0")
5304 (source
5305 (origin
5306 (method url-fetch)
5307 (uri (pypi-uri "ipython_genutils" version))
5308 (sha256
5309 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5310 (build-system python-build-system)
5311 (arguments `(#:tests? #f)) ; no tests
5312 (home-page "https://ipython.org")
5313 (synopsis "Vestigial utilities from IPython")
5314 (description
5315 "This package provides retired utilities from IPython. No packages
5316 outside IPython/Jupyter should depend on it.
5317
5318 This package shouldn't exist. It contains some common utilities shared by
5319 Jupyter and IPython projects during The Big Split. As soon as possible, those
5320 packages will remove their dependency on this, and this package will go
5321 away.")
5322 (license license:bsd-3)))
5323
5324 (define-public python2-ipython-genutils
5325 (package-with-python2 python-ipython-genutils))
5326
5327 (define-public python-traitlets
5328 (package
5329 (name "python-traitlets")
5330 (version "4.3.3")
5331 (source
5332 (origin
5333 (method url-fetch)
5334 (uri (pypi-uri "traitlets" version))
5335 (sha256
5336 (base32
5337 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
5338 (build-system python-build-system)
5339 (arguments
5340 `(#:phases
5341 (modify-phases %standard-phases
5342 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5343 (propagated-inputs
5344 `(("python-ipython-genutils" ,python-ipython-genutils)
5345 ("python-decorator" ,python-decorator)))
5346 (native-inputs
5347 `(("python-pytest" ,python-pytest)))
5348 (properties `((python2-variant . ,(delay python2-traitlets))))
5349 (home-page "https://ipython.org")
5350 (synopsis "Configuration system for Python applications")
5351 (description
5352 "Traitlets is a framework that lets Python classes have attributes with
5353 type checking, dynamically calculated default values, and ‘on change’
5354 callbacks. The package also includes a mechanism to use traitlets for
5355 configuration, loading values from files or from command line arguments. This
5356 is a distinct layer on top of traitlets, so you can use traitlets in your code
5357 without using the configuration machinery.")
5358 (license license:bsd-3)))
5359
5360 (define-public python2-traitlets
5361 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5362 (package
5363 (inherit traitlets)
5364 (propagated-inputs
5365 `(("python2-enum34" ,python2-enum34)
5366 ,@(package-propagated-inputs traitlets))))))
5367
5368 (define-public python-jupyter-core
5369 (package
5370 (name "python-jupyter-core")
5371 (version "4.4.0")
5372 (source
5373 (origin
5374 (method url-fetch)
5375 (uri (string-append (pypi-uri "jupyter_core" version)))
5376 (sha256
5377 (base32
5378 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5379 (build-system python-build-system)
5380 ;; FIXME: not sure how to run the tests
5381 (arguments `(#:tests? #f))
5382 (propagated-inputs
5383 `(("python-traitlets" ,python-traitlets)))
5384 (home-page "http://jupyter.org/")
5385 (synopsis "Jupyter base package")
5386 (description
5387 "Jupyter core is the base package on which Jupyter projects rely.")
5388 (license license:bsd-3)))
5389
5390 (define-public python2-jupyter-core
5391 (package-with-python2 python-jupyter-core))
5392
5393 (define-public python-jupyter-client
5394 (package
5395 (name "python-jupyter-client")
5396 (version "5.2.4")
5397 (source
5398 (origin
5399 (method url-fetch)
5400 (uri (pypi-uri "jupyter_client" version))
5401 (sha256
5402 (base32
5403 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5404 (build-system python-build-system)
5405 ;; Tests fail because of missing native python kernel which I assume is
5406 ;; provided by the ipython package, which we cannot use because it would
5407 ;; cause a dependency cycle.
5408 (arguments
5409 `(#:tests? #f
5410
5411 #:phases (modify-phases %standard-phases
5412 (add-after 'unpack 'set-tool-file-names
5413 (lambda* (#:key inputs #:allow-other-keys)
5414 (let ((iproute (assoc-ref inputs "iproute")))
5415 (substitute* "jupyter_client/localinterfaces.py"
5416 (("'ip'")
5417 (string-append "'" iproute "/sbin/ip'")))
5418 #t))))))
5419 (inputs
5420 `(("iproute" ,iproute)))
5421 (propagated-inputs
5422 `(("python-pyzmq" ,python-pyzmq)
5423 ("python-traitlets" ,python-traitlets)
5424 ("python-jupyter-core" ,python-jupyter-core)))
5425 (home-page "http://jupyter.org/")
5426 (synopsis "Jupyter protocol implementation and client libraries")
5427 (description
5428 "The @code{jupyter_client} package contains the reference implementation
5429 of the Jupyter protocol. It also provides client and kernel management APIs
5430 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5431 installing @code{kernelspec}s for use with Jupyter frontends.")
5432 (license license:bsd-3)))
5433
5434 (define-public python2-jupyter-client
5435 (package-with-python2 python-jupyter-client))
5436
5437 (define-public python-ipykernel
5438 (package
5439 (name "python-ipykernel")
5440 (version "5.1.3")
5441 (source
5442 (origin
5443 (method url-fetch)
5444 (uri (pypi-uri "ipykernel" version))
5445 (sha256
5446 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
5447 (build-system python-build-system)
5448 (arguments
5449 `(#:phases
5450 (modify-phases %standard-phases
5451 (replace 'check
5452 (lambda _
5453 (setenv "HOME" "/tmp")
5454 (invoke "pytest" "-v")
5455 #t))
5456 (add-after 'install 'set-python-file-name
5457 (lambda* (#:key outputs #:allow-other-keys)
5458 ;; Record the absolute file name of the 'python' executable in
5459 ;; 'kernel.json'.
5460 (let ((out (assoc-ref outputs "out")))
5461 (substitute* (string-append out "/share/jupyter"
5462 "/kernels/python3/kernel.json")
5463 (("\"python\"")
5464 (string-append "\"" (which "python") "\"")))
5465 #t))))))
5466 (propagated-inputs
5467 `(("python-ipython" ,python-ipython)
5468 ;; imported at runtime during connect
5469 ("python-jupyter-client" ,python-jupyter-client)))
5470 (native-inputs
5471 `(("python-flaky" ,python-flaky)
5472 ("python-nose" ,python-nose)
5473 ("python-pytest" ,python-pytest)))
5474 (home-page "https://ipython.org")
5475 (synopsis "IPython Kernel for Jupyter")
5476 (description
5477 "This package provides the IPython kernel for Jupyter.")
5478 (license license:bsd-3)))
5479
5480 ;; Version 5.1.1 and above no longer support Python 2.
5481 (define-public python2-ipykernel
5482 (package
5483 (name "python2-ipykernel")
5484 (version "5.1.0")
5485 (source
5486 (origin
5487 (method url-fetch)
5488 (uri (pypi-uri "ipykernel" version))
5489 (sha256
5490 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5491 (build-system python-build-system)
5492 (arguments
5493 `(#:python ,python-2
5494 #:phases
5495 (modify-phases %standard-phases
5496 (replace 'check
5497 (lambda _
5498 (setenv "HOME" "/tmp")
5499 (invoke "pytest" "-v")
5500 #t)))))
5501 (propagated-inputs
5502 `(("python2-ipython" ,python2-ipython)
5503 ;; imported at runtime during connect
5504 ("python2-jupyter-client" ,python2-jupyter-client)))
5505 (native-inputs
5506 `(("python2-pytest" ,python2-pytest)
5507 ("python2-nose" ,python2-nose)))
5508 (home-page "https://ipython.org")
5509 (synopsis "IPython Kernel for Jupyter")
5510 (description
5511 "This package provides the IPython kernel for Jupyter.")
5512 (license license:bsd-3)))
5513
5514 (define-public python-pari-jupyter
5515 (package
5516 (name "python-pari-jupyter")
5517 (version "1.3.2")
5518 (source
5519 (origin
5520 (method url-fetch)
5521 (uri (pypi-uri "pari_jupyter" version))
5522 (sha256
5523 (base32
5524 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5525 (build-system python-build-system)
5526 (propagated-inputs
5527 `(("python-ipykernel" ,python-ipykernel)))
5528 (inputs
5529 `(("pari-gp" ,pari-gp)
5530 ("readline" ,readline)))
5531 (arguments
5532 `(#:tests? #f)) ; no test suite
5533 (home-page
5534 "https://github.com/jdemeyer/pari_jupyter")
5535 (synopsis "A Jupyter kernel for PARI/GP")
5536 (description "The package provides a PARI/GP kernel for Jupyter.")
5537 (license license:gpl3+)))
5538
5539 (define-public python-backcall
5540 (package
5541 (name "python-backcall")
5542 (version "0.1.0")
5543 (source
5544 (origin
5545 (method url-fetch)
5546 (uri (pypi-uri "backcall" version))
5547 (sha256
5548 (base32
5549 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5550 (build-system python-build-system)
5551 (home-page "https://github.com/takluyver/backcall/")
5552 (synopsis "Specifications for callback functions passed in to an API")
5553 (description
5554 "If your code lets other people supply callback functions, it's important
5555 to specify the function signature you expect, and check that functions support
5556 that. Adding extra parameters later would break other peoples code unless
5557 you're careful. The @code{backcall} package provides a way of specifying the
5558 callback signature using a prototype function.")
5559 (license license:bsd-3)))
5560
5561 ;; This is the latest release of the LTS version of ipython with support for
5562 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
5563 ;; dropped support for Python 2.7.
5564 (define-public python2-ipython
5565 (package
5566 (name "python2-ipython")
5567 (version "5.8.0")
5568 (source
5569 (origin
5570 (method url-fetch)
5571 (uri (pypi-uri "ipython" version ".tar.gz"))
5572 (sha256
5573 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5574 (build-system python-build-system)
5575 (propagated-inputs
5576 `(("python2-backports-shutil-get-terminal-size"
5577 ,python2-backports-shutil-get-terminal-size)
5578 ("python2-pathlib2" ,python2-pathlib2)
5579 ("python2-pyzmq" ,python2-pyzmq)
5580 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5581 ("python2-terminado" ,python2-terminado)
5582 ("python2-matplotlib" ,python2-matplotlib)
5583 ("python2-numpy" ,python2-numpy)
5584 ("python2-numpydoc" ,python2-numpydoc)
5585 ("python2-jinja2" ,python2-jinja2)
5586 ("python2-mistune" ,python2-mistune)
5587 ("python2-pexpect" ,python2-pexpect)
5588 ("python2-pickleshare" ,python2-pickleshare)
5589 ("python2-simplegeneric" ,python2-simplegeneric)
5590 ("python2-jsonschema" ,python2-jsonschema)
5591 ("python2-traitlets" ,python2-traitlets)
5592 ("python2-nbformat" ,python2-nbformat)
5593 ("python2-pygments" ,python2-pygments)))
5594 (inputs
5595 `(("readline" ,readline)
5596 ("which" ,which)))
5597 (native-inputs
5598 `(("graphviz" ,graphviz)
5599 ("pkg-config" ,pkg-config)
5600 ("python2-requests" ,python2-requests) ;; for tests
5601 ("python2-testpath" ,python2-testpath)
5602 ("python2-mock" ,python2-mock)
5603 ("python2-nose" ,python2-nose)))
5604 (arguments
5605 `(#:python ,python-2
5606 #:phases
5607 (modify-phases %standard-phases
5608 (add-before 'check 'delete-broken-tests
5609 (lambda* (#:key inputs #:allow-other-keys)
5610 ;; These tests throw errors for unknown reasons.
5611 (delete-file "IPython/core/tests/test_profile.py")
5612 (delete-file "IPython/core/tests/test_interactiveshell.py")
5613 (delete-file "IPython/core/tests/test_magic.py")
5614 #t)))))
5615 (home-page "https://ipython.org")
5616 (synopsis "IPython is a tool for interactive computing in Python")
5617 (description
5618 "IPython provides a rich architecture for interactive computing with:
5619 Powerful interactive shells, a browser-based notebook, support for interactive
5620 data visualization, embeddable interpreters and tools for parallel
5621 computing.")
5622 (license license:bsd-3)))
5623
5624 (define-public python-ipython
5625 (package
5626 (name "python-ipython")
5627 (version "7.9.0")
5628 (source
5629 (origin
5630 (method url-fetch)
5631 (uri (pypi-uri "ipython" version ".tar.gz"))
5632 (sha256
5633 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
5634 (build-system python-build-system)
5635 (propagated-inputs
5636 `(("python-backcall" ,python-backcall)
5637 ("python-pyzmq" ,python-pyzmq)
5638 ("python-prompt-toolkit" ,python-prompt-toolkit)
5639 ("python-terminado" ,python-terminado)
5640 ("python-matplotlib" ,python-matplotlib)
5641 ("python-numpy" ,python-numpy)
5642 ("python-numpydoc" ,python-numpydoc)
5643 ("python-jedi" ,python-jedi)
5644 ("python-jinja2" ,python-jinja2)
5645 ("python-mistune" ,python-mistune)
5646 ("python-pexpect" ,python-pexpect)
5647 ("python-pickleshare" ,python-pickleshare)
5648 ("python-simplegeneric" ,python-simplegeneric)
5649 ("python-jsonschema" ,python-jsonschema)
5650 ("python-traitlets" ,python-traitlets)
5651 ("python-nbformat" ,python-nbformat)
5652 ("python-pygments" ,python-pygments)))
5653 (inputs
5654 `(("readline" ,readline)
5655 ("which" ,which)))
5656 (native-inputs
5657 `(("graphviz" ,graphviz)
5658 ("pkg-config" ,pkg-config)
5659 ("python-requests" ,python-requests) ;; for tests
5660 ("python-testpath" ,python-testpath)
5661 ("python-nose" ,python-nose)))
5662 (arguments
5663 `(#:phases
5664 (modify-phases %standard-phases
5665 (add-after 'unpack 'make-docs-reproducible
5666 (lambda _
5667 (substitute* "IPython/sphinxext/ipython_directive.py"
5668 ((".*import datetime") "")
5669 ((".*datetime.datetime.now\\(\\)") "")
5670 (("%timeit") "# %timeit"))
5671 #t))
5672 ;; Tests can only be run after the library has been installed and not
5673 ;; within the source directory.
5674 (delete 'check)
5675 (add-after 'install 'check
5676 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5677 (if tests?
5678 (begin
5679 ;; Make installed package available for running the tests
5680 (add-installed-pythonpath inputs outputs)
5681 (setenv "HOME" "/tmp/") ;; required by a test
5682 ;; We only test the core because one of the other tests
5683 ;; tries to import ipykernel.
5684 (invoke "python" "IPython/testing/iptest.py"
5685 "-v" "IPython/core/tests"))
5686 #t)))
5687 (add-before 'check 'fix-tests
5688 (lambda* (#:key inputs #:allow-other-keys)
5689 (substitute* "./IPython/utils/_process_posix.py"
5690 (("/usr/bin/env', 'which") (which "which")))
5691 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5692 (("#!/usr/bin/env python")
5693 (string-append "#!" (which "python"))))
5694 ;; This test introduces a circular dependency on ipykernel
5695 ;; (which depends on ipython).
5696 (delete-file "IPython/core/tests/test_display.py")
5697 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
5698 (delete-file "IPython/core/tests/test_interactiveshell.py")
5699 #t)))))
5700 (home-page "https://ipython.org")
5701 (synopsis "IPython is a tool for interactive computing in Python")
5702 (description
5703 "IPython provides a rich architecture for interactive computing with:
5704 Powerful interactive shells, a browser-based notebook, support for interactive
5705 data visualization, embeddable interpreters and tools for parallel
5706 computing.")
5707 (license license:bsd-3)))
5708
5709 (define-public python-ipython-documentation
5710 (package
5711 (inherit python-ipython)
5712 (name "python-ipython-documentation")
5713 (version (package-version python-ipython))
5714 (arguments
5715 `(#:phases
5716 (modify-phases %standard-phases
5717 (delete 'build)
5718 (delete 'check)
5719 (replace 'install
5720 (lambda* (#:key outputs #:allow-other-keys)
5721 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5722 (doc (string-append data "/doc/" ,name "-" ,version))
5723 (html (string-append doc "/html"))
5724 (man1 (string-append data "/man/man1"))
5725 (info (string-append data "/info"))
5726 (examples (string-append doc "/examples"))
5727 (python-arg (string-append "PYTHON=" (which "python"))))
5728 (setenv "LANG" "en_US.utf8")
5729 (with-directory-excursion "docs"
5730 ;; FIXME: pdf fails to build
5731 ;;(system* "make" "pdf" "PAPER=a4")
5732 (system* "make" python-arg "html")
5733 ;; FIXME: the generated texi file contains ^@^@, which trips
5734 ;; up the parser.
5735 ;; (system* "make" python-arg "info")
5736 )
5737 (copy-recursively "docs/man" man1)
5738 (copy-recursively "examples" examples)
5739 (copy-recursively "docs/build/html" html)
5740 ;; (copy-file "docs/build/latex/ipython.pdf"
5741 ;; (string-append doc "/ipython.pdf"))
5742 (mkdir-p info)
5743 ;; (copy-file "docs/build/texinfo/ipython.info"
5744 ;; (string-append info "/ipython.info"))
5745 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5746 #t)))))
5747 (inputs
5748 `(("python-ipython" ,python-ipython)
5749 ("python-ipykernel" ,python-ipykernel)))
5750 (native-inputs
5751 `(("python-sphinx" ,python-sphinx)
5752 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
5753 ;; FIXME: It's possible that a smaller union would work just as well.
5754 ("texlive" ,(texlive-union (list texlive-amsfonts
5755 texlive-fonts-ec
5756 texlive-generic-ifxetex
5757 texlive-generic-pdftex
5758 texlive-latex-capt-of
5759 texlive-latex-cmap
5760 texlive-latex-environ
5761 texlive-latex-eqparbox
5762 texlive-latex-etoolbox
5763 texlive-latex-expdlist
5764 texlive-latex-fancyhdr
5765 texlive-latex-fancyvrb
5766 texlive-latex-fncychap
5767 texlive-latex-float
5768 texlive-latex-framed
5769 texlive-latex-geometry
5770 texlive-latex-graphics
5771 texlive-latex-hyperref
5772 texlive-latex-mdwtools
5773 texlive-latex-multirow
5774 texlive-latex-needspace
5775 texlive-latex-oberdiek
5776 texlive-latex-parskip
5777 texlive-latex-preview
5778 texlive-latex-tabulary
5779 texlive-latex-threeparttable
5780 texlive-latex-titlesec
5781 texlive-latex-trimspaces
5782 texlive-latex-ucs
5783 texlive-latex-upquote
5784 texlive-latex-url
5785 texlive-latex-varwidth
5786 texlive-latex-wrapfig)))
5787 ("texinfo" ,texinfo)))))
5788
5789 (define-public python-urwid
5790 (package
5791 (name "python-urwid")
5792 (version "2.0.1")
5793 (source
5794 (origin
5795 (method url-fetch)
5796 (uri (pypi-uri "urwid" version))
5797 (sha256
5798 (base32
5799 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5800 (build-system python-build-system)
5801 (home-page "http://urwid.org")
5802 (synopsis "Console user interface library for Python")
5803 (description
5804 "Urwid is a curses-based UI/widget library for Python. It includes many
5805 features useful for text console applications.")
5806 (license license:lgpl2.1+)))
5807
5808 (define-public python2-urwid
5809 (package-with-python2 python-urwid))
5810
5811 (define-public python-urwidtrees
5812 (package
5813 (name "python-urwidtrees")
5814 (version "1.0.2")
5815 (source
5816 (origin
5817 (method url-fetch)
5818 ;; package author intends on distributing via github rather than pypi:
5819 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5820 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5821 version ".tar.gz"))
5822 (file-name (string-append name "-" version ".tar.gz"))
5823 (sha256
5824 (base32
5825 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5826 (build-system python-build-system)
5827 (arguments
5828 '(#:tests? #f)) ; no tests
5829 (propagated-inputs `(("python-urwid" ,python-urwid)))
5830 (home-page "https://github.com/pazz/urwidtrees")
5831 (synopsis "Tree widgets for urwid")
5832 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5833 toolkit. Use it to build trees of widgets.")
5834 (license license:gpl3+)))
5835
5836 (define-public python2-urwidtrees
5837 (package-with-python2 python-urwidtrees))
5838
5839 (define-public python-ua-parser
5840 (package
5841 (name "python-ua-parser")
5842 (version "0.8.0")
5843 (source
5844 (origin
5845 (method url-fetch)
5846 (uri (pypi-uri "ua-parser" version))
5847 (sha256
5848 (base32
5849 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5850 (build-system python-build-system)
5851 (arguments
5852 `(#:tests? #f)) ;no test suite in release
5853 (native-inputs
5854 `(("python-pyyaml" ,python-pyyaml)))
5855 (home-page "https://github.com/ua-parser/uap-python")
5856 (synopsis "User agent parser")
5857 (description
5858 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5859 (license license:asl2.0)))
5860
5861 (define-public python2-ua-parser
5862 (package-with-python2 python-ua-parser))
5863
5864 (define-public python-user-agents
5865 (package
5866 (name "python-user-agents")
5867 (version "1.1.0")
5868 (source
5869 (origin
5870 (method url-fetch)
5871 (uri (pypi-uri "user-agents" version))
5872 (sha256
5873 (base32
5874 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5875 (build-system python-build-system)
5876 (arguments
5877 `(#:tests? #f)) ;missing devices.json test file in release
5878 (propagated-inputs
5879 `(("python-ua-parser" ,python-ua-parser)))
5880 (home-page "https://github.com/selwin/python-user-agents")
5881 (synopsis "User Agent strings parsing library")
5882 (description
5883 "A library to identify devices (phones, tablets) and their capabilities by
5884 parsing (browser/HTTP) user agent strings.")
5885 (license license:expat)))
5886
5887 (define-public python2-user-agents
5888 (package-with-python2 python-user-agents))
5889
5890 (define-public python-dbus
5891 (package
5892 (name "python-dbus")
5893 (version "1.2.8")
5894 (source
5895 (origin
5896 (method url-fetch)
5897 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5898 "dbus-python-" version ".tar.gz"))
5899 (sha256
5900 (base32
5901 "0vvvjmiwnc9cjlks3gcdk43ap7llhlpz7cm1wbw0nc2yfsxjpwdb"))))
5902 (build-system gnu-build-system)
5903 (arguments
5904 '(#:phases
5905 (modify-phases %standard-phases
5906 (add-before
5907 'check 'pre-check
5908 (lambda _
5909 ;; XXX: For the missing '/etc/machine-id'.
5910 (substitute* "test/run-test.sh"
5911 (("DBUS_FATAL_WARNINGS=1")
5912 "DBUS_FATAL_WARNINGS=0"))
5913 #t)))))
5914 (native-inputs
5915 `(("pkg-config" ,pkg-config)))
5916 (inputs
5917 `(("python" ,python-wrapper)
5918 ("dbus-glib" ,dbus-glib)))
5919 (synopsis "Python bindings for D-bus")
5920 (description "python-dbus provides bindings for libdbus, the reference
5921 implementation of D-Bus.")
5922 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5923 (license license:expat)))
5924
5925 (define-public python2-dbus
5926 (package (inherit python-dbus)
5927 (name "python2-dbus")
5928 (inputs `(("python" ,python-2)
5929 ,@(alist-delete "python"
5930 (package-inputs python-dbus)
5931 equal?)))
5932 ;; FIXME: on Python 2, the test_utf8 fails with:
5933 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5934 (arguments `(#:tests? #f))))
5935
5936 (define-public python-notify2
5937 (package
5938 (name "python-notify2")
5939 (version "0.3.1")
5940 (source
5941 (origin
5942 (method url-fetch)
5943 (uri (pypi-uri "notify2" version))
5944 (sha256
5945 (base32
5946 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
5947 (build-system python-build-system)
5948 (arguments `(#:tests? #f)) ; tests depend on system state
5949 (native-inputs
5950 `(("python-dbus" ,python-dbus)))
5951 (home-page "https://bitbucket.org/takluyver/pynotify2")
5952 (synopsis "Python interface to D-Bus notifications")
5953 (description
5954 "Pynotify2 provides a Python interface for sending D-Bus notifications.
5955 It is a reimplementation of pynotify in pure Python, and an alternative to
5956 the GObject Introspection bindings to libnotify for non-GTK applications.")
5957 (license (list license:bsd-2
5958 license:lgpl2.1+))))
5959
5960 (define-public python2-notify2
5961 (package-with-python2 python-notify2))
5962
5963 (define-public python-lxml
5964 (package
5965 (name "python-lxml")
5966 (version "4.4.1")
5967 (source
5968 (origin
5969 (method url-fetch)
5970 (uri (pypi-uri "lxml" version))
5971 (sha256
5972 (base32
5973 "14jnpfcpgqr9sx8ppd286jzcbk0b36hbqsvd8jkvffipzw5v8768"))))
5974 (build-system python-build-system)
5975 (arguments
5976 `(#:phases (modify-phases %standard-phases
5977 (replace 'check
5978 (lambda _
5979 (invoke "make" "test"))))))
5980 (inputs
5981 `(("libxml2" ,libxml2)
5982 ("libxslt" ,libxslt)))
5983 (home-page "http://lxml.de/")
5984 (synopsis
5985 "Python XML processing library")
5986 (description
5987 "The lxml XML toolkit is a Pythonic binding for the C libraries
5988 libxml2 and libxslt.")
5989 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5990
5991 (define-public python2-lxml
5992 (package-with-python2 python-lxml))
5993
5994 ;; beautifulsoup4 has a totally different namespace than 3.x,
5995 ;; and pypi seems to put it under its own name, so I guess we should too
5996 (define-public python-beautifulsoup4
5997 (package
5998 (name "python-beautifulsoup4")
5999 (version "4.7.1")
6000 (source
6001 (origin
6002 (method url-fetch)
6003 (uri (pypi-uri "beautifulsoup4" version))
6004 (sha256
6005 (base32
6006 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
6007 (build-system python-build-system)
6008 (arguments
6009 `(#:phases
6010 (modify-phases %standard-phases
6011 ;; The Python 2 source is the definitive source of beautifulsoup4. We
6012 ;; must use this conversion script when building with Python 3. The
6013 ;; conversion script also runs the tests.
6014 ;; For more information, see the file 'convert-py3k' in the source
6015 ;; distribution.
6016 (replace 'check
6017 (lambda _ (invoke "./convert-py3k"))))))
6018 (propagated-inputs
6019 `(("python-soupsieve" ,python-soupsieve)))
6020 (home-page
6021 "https://www.crummy.com/software/BeautifulSoup/bs4/")
6022 (synopsis
6023 "Python screen-scraping library")
6024 (description
6025 "Beautiful Soup is a Python library designed for rapidly setting up
6026 screen-scraping projects. It offers Pythonic idioms for navigating,
6027 searching, and modifying a parse tree, providing a toolkit for
6028 dissecting a document and extracting what you need. It automatically
6029 converts incoming documents to Unicode and outgoing documents to UTF-8.")
6030 (license license:expat)
6031 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
6032
6033 (define-public python2-beautifulsoup4
6034 (package
6035 (inherit (package-with-python2
6036 (strip-python2-variant python-beautifulsoup4)))
6037 (arguments `(#:python ,python-2))))
6038
6039 (define-public python-soupsieve
6040 (package
6041 (name "python-soupsieve")
6042 (version "1.9.2")
6043 (source
6044 (origin
6045 (method url-fetch)
6046 (uri (pypi-uri "soupsieve" version))
6047 (sha256
6048 (base32
6049 "0in9rc9q3h8w5b4qf7kvl3qxcvw6vrz35ckblchgf70hm6pg3dbj"))))
6050 (build-system python-build-system)
6051 (arguments `(#:tests? #f))
6052 ;;XXX: 2 tests fail currently despite claming they were to be
6053 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
6054 ;;don't want to create a circular dependency.
6055 (home-page "https://github.com/facelessuser/soupsieve")
6056 (synopsis "CSS selector library")
6057 (description
6058 "Soup Sieve is a CSS selector library designed to be used with Beautiful
6059 Soup 4. It aims to provide selecting, matching, and filtering using modern
6060 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
6061 specifications up through the latest CSS level 4 drafts and beyond (though
6062 some are not yet implemented).")
6063 (properties `((python2-variant . ,(delay python2-soupsieve))))
6064 (license license:expat)))
6065
6066 (define-public python2-soupsieve
6067 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
6068 (package
6069 (inherit base)
6070 (propagated-inputs
6071 `(("python2-backports-functools-lru-cache"
6072 ,python2-backports-functools-lru-cache)
6073 ,@(package-propagated-inputs base))))))
6074
6075 (define-public python-netifaces
6076 (package
6077 (name "python-netifaces")
6078 (version "0.10.7")
6079 (source
6080 (origin
6081 (method url-fetch)
6082 (uri (pypi-uri "netifaces" version))
6083 (sha256
6084 (base32
6085 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
6086 (build-system python-build-system)
6087 (home-page "https://github.com/al45tair/netifaces")
6088 (synopsis
6089 "Python module for portable network interface information")
6090 (description
6091 "Netifaces is a Python module providing information on network
6092 interfaces in an easy and portable manner.")
6093 (license license:expat)))
6094
6095 (define-public python2-netifaces
6096 (package-with-python2 python-netifaces))
6097
6098 (define-public python-networkx
6099 (package
6100 (name "python-networkx")
6101 (version "2.2")
6102 (source
6103 (origin
6104 (method url-fetch)
6105 (uri (pypi-uri "networkx" version ".zip"))
6106 (sha256
6107 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
6108 (build-system python-build-system)
6109 ;; python-decorator is needed at runtime.
6110 (propagated-inputs
6111 `(("python-decorator" ,python-decorator)))
6112 (native-inputs
6113 `(("python-nose" ,python-nose)
6114 ("unzip" ,unzip)))
6115 (home-page "https://networkx.github.io/")
6116 (synopsis "Python module for creating and manipulating graphs and networks")
6117 (description
6118 "NetworkX is a Python package for the creation, manipulation, and study
6119 of the structure, dynamics, and functions of complex networks.")
6120 (license license:bsd-3)))
6121
6122 (define-public python2-networkx
6123 (package-with-python2 python-networkx))
6124
6125 (define-public python-datrie
6126 (package
6127 (name "python-datrie")
6128 (version "0.8")
6129 (source
6130 (origin
6131 (method url-fetch)
6132 (uri (pypi-uri "datrie" version))
6133 (sha256
6134 (base32
6135 "0338r8xgmpy78556jhms0h6qkvyjr10p8bpgdvcpqzm9lrmxmmdx"))))
6136 (build-system python-build-system)
6137 (native-inputs
6138 `(("python-cython" ,python-cython)
6139 ("python-hypothesis" ,python-hypothesis)
6140 ("python-pytest" ,python-pytest)
6141 ("python-pytest-runner" ,python-pytest-runner)))
6142 (home-page "https://github.com/kmike/datrie")
6143 (synopsis "Fast, efficiently stored trie for Python")
6144 (description
6145 "This package provides a fast, efficiently stored trie implementation for
6146 Python.")
6147 (license license:lgpl2.1+)))
6148
6149 (define-public snakemake
6150 (package
6151 (name "snakemake")
6152 (version "5.7.1")
6153 (source
6154 (origin
6155 (method url-fetch)
6156 (uri (pypi-uri "snakemake" version))
6157 (sha256
6158 (base32 "1pnpvvn8n2a78cg360wz3ldmpqrsm2wzi0c0dmvki9fnsw6fxdas"))))
6159 (build-system python-build-system)
6160 (arguments
6161 ;; TODO: Package missing test dependencies.
6162 '(#:tests? #f
6163 #:phases
6164 (modify-phases %standard-phases
6165 ;; For cluster execution Snakemake will call Python. Since there is
6166 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
6167 ;; this by calling the snakemake wrapper instead.
6168 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
6169 (lambda* (#:key outputs #:allow-other-keys)
6170 (substitute* "snakemake/executors.py"
6171 (("\\{sys.executable\\} -m snakemake")
6172 (string-append (assoc-ref outputs "out")
6173 "/bin/snakemake")))
6174 #t)))))
6175 (propagated-inputs
6176 `(("python-appdirs" ,python-appdirs)
6177 ("python-configargparse" ,python-configargparse)
6178 ("python-datrie" ,python-datrie)
6179 ("python-docutils" ,python-docutils)
6180 ("python-gitpython" ,python-gitpython)
6181 ("python-jinja2" ,python-jinja2)
6182 ("python-jsonschema" ,python-jsonschema)
6183 ("python-networkx" ,python-networkx)
6184 ("python-psutil" ,python-psutil)
6185 ("python-pyyaml" ,python-pyyaml)
6186 ("python-ratelimiter" ,python-ratelimiter)
6187 ("python-requests" ,python-requests)
6188 ("python-wrapt" ,python-wrapt)))
6189 (home-page "https://snakemake.readthedocs.io")
6190 (synopsis "Python-based execution environment for make-like workflows")
6191 (description
6192 "Snakemake aims to reduce the complexity of creating workflows by
6193 providing a clean and modern domain specific specification language (DSL) in
6194 Python style, together with a fast and comfortable execution environment.")
6195 (license license:expat)))
6196
6197 (define-public python-pyqrcode
6198 (package
6199 (name "python-pyqrcode")
6200 (version "1.2.1")
6201 (source
6202 (origin
6203 (method url-fetch)
6204 (uri (pypi-uri "PyQRCode" version))
6205 (sha256
6206 (base32
6207 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
6208 (build-system python-build-system)
6209 (home-page
6210 "https://github.com/mnooner256/pyqrcode")
6211 (synopsis "QR code generator")
6212 (description
6213 "Pyqrcode is a QR code generator written purely in Python with
6214 SVG, EPS, PNG and terminal output.")
6215 (license license:bsd-3)))
6216
6217 (define-public python-seaborn
6218 (package
6219 (name "python-seaborn")
6220 (version "0.9.0")
6221 (source
6222 (origin
6223 (method url-fetch)
6224 (uri (pypi-uri "seaborn" version))
6225 (sha256
6226 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
6227 (build-system python-build-system)
6228 (arguments
6229 `(#:phases
6230 (modify-phases %standard-phases
6231 (add-before 'check 'start-xserver
6232 (lambda* (#:key inputs #:allow-other-keys)
6233 (let ((xorg-server (assoc-ref inputs "xorg-server")))
6234 ;; There must be a running X server and make check doesn't
6235 ;; start one. Therefore we must do it.
6236 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
6237 (setenv "DISPLAY" ":1")
6238 #t)))
6239 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
6240 (propagated-inputs
6241 `(("python-pandas" ,python-pandas)
6242 ("python-matplotlib" ,python-matplotlib)
6243 ("python-numpy" ,python-numpy)
6244 ("python-scipy" ,python-scipy)))
6245 (native-inputs
6246 `(("python-pytest" ,python-pytest)
6247 ("xorg-server" ,xorg-server)))
6248 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6249 (synopsis "Statistical data visualization")
6250 (description
6251 "Seaborn is a library for making attractive and informative statistical
6252 graphics in Python. It is built on top of matplotlib and tightly integrated
6253 with the PyData stack, including support for numpy and pandas data structures
6254 and statistical routines from scipy and statsmodels.")
6255 (license license:bsd-3)))
6256
6257 (define-public python2-seaborn
6258 (package-with-python2 python-seaborn))
6259
6260 (define-public python-mpmath
6261 (package
6262 (name "python-mpmath")
6263 (version "0.19")
6264 (source (origin
6265 (method url-fetch)
6266 (uri (string-append "http://mpmath.org/files/mpmath-"
6267 version ".tar.gz"))
6268 (sha256
6269 (base32
6270 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6271 (build-system python-build-system)
6272 (arguments
6273 '(#:phases
6274 (modify-phases %standard-phases
6275 (replace 'check
6276 (lambda _
6277 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
6278 (home-page "http://mpmath.org")
6279 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6280 (description
6281 "@code{mpmath} can be used as an arbitrary-precision substitute for
6282 Python's float/complex types and math/cmath modules, but also does much
6283 more advanced mathematics.")
6284 (license license:bsd-3)))
6285
6286 (define-public python2-mpmath
6287 (package-with-python2 python-mpmath))
6288
6289 (define-public python-bigfloat
6290 (package
6291 (name "python-bigfloat")
6292 (version "0.3.0")
6293 (source
6294 (origin
6295 (method url-fetch)
6296 (uri (pypi-uri "bigfloat" version))
6297 (sha256
6298 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6299 (build-system python-build-system)
6300 (inputs
6301 `(("mpfr" ,mpfr)))
6302 (home-page "https://github.com/mdickinson/bigfloat")
6303 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6304 (description
6305 "This package provides a Python interface to the MPFR library for
6306 multiprecision arithmetic.")
6307 (license license:lgpl3+)))
6308
6309 (define-public python2-bigfloat
6310 (package-with-python2 python-bigfloat))
6311
6312 (define-public python-sympy
6313 (package
6314 (name "python-sympy")
6315 (version "1.1.1")
6316 (source
6317 (origin
6318 (method url-fetch)
6319 (uri (string-append
6320 "https://github.com/sympy/sympy/releases/download/sympy-"
6321 version "/sympy-" version ".tar.gz"))
6322 (sha256
6323 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6324 (build-system python-build-system)
6325 (arguments
6326 `(#:phases
6327 (modify-phases %standard-phases
6328 ;; Run the core tests after installation. By default it would run
6329 ;; *all* tests, which take a very long time to complete and are known
6330 ;; to be flaky.
6331 (delete 'check)
6332 (add-after 'install 'check
6333 (lambda* (#:key outputs #:allow-other-keys)
6334 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6335 #t)))))
6336 (propagated-inputs
6337 `(("python-mpmath" ,python-mpmath)))
6338 (home-page "http://www.sympy.org/")
6339 (synopsis "Python library for symbolic mathematics")
6340 (description
6341 "SymPy is a Python library for symbolic mathematics. It aims to become a
6342 full-featured computer algebra system (CAS) while keeping the code as simple
6343 as possible in order to be comprehensible and easily extensible.")
6344 (license license:bsd-3)))
6345
6346 (define-public python2-sympy
6347 (package
6348 (inherit (package-with-python2 python-sympy))
6349 (arguments
6350 `(#:phases
6351 (modify-phases %standard-phases
6352 ;; Run the core tests after installation. By default it would run
6353 ;; *all* tests, which take a very long time to complete and are known
6354 ;; to be flaky.
6355 (delete 'check)
6356 (add-after 'install 'check
6357 (lambda* (#:key outputs #:allow-other-keys)
6358 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6359 #t)))))))
6360
6361 (define-public python-q
6362 (package
6363 (name "python-q")
6364 (version "2.6")
6365 (source
6366 (origin
6367 (method url-fetch)
6368 (uri (pypi-uri "q" version))
6369 (sha256
6370 (base32
6371 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6372 (build-system python-build-system)
6373 (home-page "https://github.com/zestyping/q")
6374 (synopsis "Quick-and-dirty debugging output for tired programmers")
6375 (description
6376 "q is a Python module for \"print\" style of debugging Python code. It
6377 provides convenient short API for print out of values, tracebacks, and
6378 falling into the Python interpreter.")
6379 (license license:asl2.0)))
6380
6381 (define-public python2-q
6382 (package-with-python2 python-q))
6383
6384 (define-public python2-xlib
6385 (package
6386 (name "python2-xlib")
6387 (version "0.14")
6388 (source (origin
6389 (method url-fetch)
6390 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6391 "/" version "/"
6392 "python-xlib-" version ".tar.gz"))
6393 (sha256
6394 (base32
6395 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6396 (build-system python-build-system)
6397 (arguments
6398 `(#:python ,python-2 ;Python 2 only
6399 #:tests? #f)) ;no tests
6400 (home-page "http://python-xlib.sourceforge.net/")
6401 (synopsis "Python X11 client library")
6402 (description
6403 "The Python X Library is intended to be a fully functional X client
6404 library for Python programs. It is useful to implement low-level X clients.
6405 It is written entirely in Python.")
6406 (license license:gpl2+)))
6407
6408 (define-public python-singledispatch
6409 (package
6410 (name "python-singledispatch")
6411 (version "3.4.0.3")
6412 (source
6413 (origin
6414 (method url-fetch)
6415 (uri (pypi-uri "singledispatch" version))
6416 (sha256
6417 (base32
6418 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6419 (build-system python-build-system)
6420 (native-inputs
6421 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6422 (home-page
6423 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6424 (synopsis "Backport of singledispatch feature from Python 3.4")
6425 (description
6426 "This library brings functools.singledispatch from Python 3.4 to Python
6427 2.6-3.3.")
6428 (license license:expat)))
6429
6430 (define-public python2-singledispatch
6431 (package-with-python2 python-singledispatch))
6432
6433 ;; the python- version can be removed with python-3.5
6434 (define-public python-backports-abc
6435 (package
6436 (name "python-backports-abc")
6437 (version "0.5")
6438 (source
6439 (origin
6440 (method url-fetch)
6441 (uri (pypi-uri "backports_abc" version))
6442 (sha256
6443 (base32
6444 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6445 (build-system python-build-system)
6446 (home-page "https://github.com/cython/backports_abc")
6447 (synopsis "Backport of additions to the 'collections.abc' module")
6448 (description
6449 "Python-backports-abc provides a backport of additions to the
6450 @code{collections.abc} module in Python-3.5.")
6451 (license license:psfl)))
6452
6453 (define-public python2-backports-abc
6454 (package-with-python2 python-backports-abc))
6455
6456 (define-public python-backports-csv
6457 (package
6458 (name "python-backports-csv")
6459 (version "1.0.5")
6460 (source
6461 (origin
6462 (method url-fetch)
6463 (uri (pypi-uri "backports.csv" version))
6464 (sha256
6465 (base32
6466 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6467 (build-system python-build-system)
6468 (home-page "https://github.com/ryanhiebert/backports.csv")
6469 (synopsis "Backport of Python 3's csv module for Python 2")
6470 (description
6471 "Provides a backport of Python 3's @code{csv} module for parsing
6472 comma separated values. The API of the @code{csv} module in Python 2
6473 is drastically different from the @code{csv} module in Python 3.
6474 This is due, for the most part, to the difference between str in
6475 Python 2 and Python 3.")
6476 (license license:psfl)))
6477
6478 (define-public python2-backports-csv
6479 (package-with-python2 python-backports-csv))
6480
6481 (define-public python2-backports-shutil-get-terminal-size
6482 (package
6483 (name "python2-backports-shutil-get-terminal-size")
6484 (version "1.0.0")
6485 (source
6486 (origin
6487 (method url-fetch)
6488 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6489 (sha256
6490 (base32
6491 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6492 (build-system python-build-system)
6493 (arguments
6494 `(#:python ,python-2
6495 #:phases
6496 (modify-phases %standard-phases
6497 (replace 'check
6498 (lambda _
6499 (invoke "py.test" "-v"))))))
6500 (native-inputs
6501 `(("python2-pytest" ,python2-pytest)))
6502 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6503 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6504 (description
6505 "This package provides a backport of the @code{get_terminal_size
6506 function} from Python 3.3's @code{shutil}.
6507 Unlike the original version it is written in pure Python rather than C,
6508 so it might be a tiny bit slower.")
6509 (license license:expat)))
6510
6511 (define-public python-waf
6512 (package
6513 (name "python-waf")
6514 (version "2.0.11")
6515 (source (origin
6516 (method url-fetch)
6517 (uri (string-append "https://waf.io/"
6518 "waf-" version ".tar.bz2"))
6519 (sha256
6520 (base32
6521 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
6522 (build-system python-build-system)
6523 (arguments
6524 '(#:phases
6525 (modify-phases %standard-phases
6526 (replace 'build
6527 (lambda _
6528 (invoke "python" "waf-light" "configure" "build")))
6529 (replace 'check
6530 (lambda _
6531 (invoke "python" "waf" "--version")))
6532 (replace 'install
6533 (lambda* (#:key outputs #:allow-other-keys)
6534 (let ((out (assoc-ref outputs "out")))
6535 (install-file "waf" (string-append out "/bin")))
6536 #t))
6537 ;; waf breaks when it is wrapped.
6538 (delete 'wrap))))
6539 (home-page "https://waf.io/")
6540 (synopsis "Python-based build system")
6541 (description
6542 "Waf is a Python-based framework for configuring, compiling and installing
6543 applications.")
6544 (license license:bsd-3)))
6545
6546 (define-public python2-waf
6547 (package-with-python2 python-waf))
6548
6549 (define-public python-pyzmq
6550 (package
6551 (name "python-pyzmq")
6552 (version "17.1.2")
6553 (source
6554 (origin
6555 (method url-fetch)
6556 (uri (pypi-uri "pyzmq" version))
6557 (sha256
6558 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6559 (build-system python-build-system)
6560 (arguments
6561 `(#:configure-flags
6562 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6563 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6564 ;; --inplace' for 'python setup.py test' to work.
6565 #:tests? #f))
6566 (inputs
6567 `(("zeromq" ,zeromq)))
6568 (native-inputs
6569 `(("pkg-config" ,pkg-config)
6570 ("python-nose" ,python-nose)))
6571 (home-page "https://github.com/zeromq/pyzmq")
6572 (synopsis "Python bindings for 0MQ")
6573 (description
6574 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6575 (license license:bsd-4)))
6576
6577 (define-public python2-pyzmq
6578 (package-with-python2 python-pyzmq))
6579
6580 (define-public python-pep8
6581 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6582 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6583 ;; some dependents' test suites, and nothing more.
6584 (package
6585 (name "python-pep8")
6586 (version "1.7.0")
6587 (source
6588 (origin
6589 (method url-fetch)
6590 (uri (pypi-uri "pep8" version))
6591 (sha256
6592 (base32
6593 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
6594 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
6595 (build-system python-build-system)
6596 (home-page "https://pep8.readthedocs.org/")
6597 (synopsis "Python style guide checker")
6598 (description
6599 "This tools checks Python code against some of the style conventions in
6600 PEP 8.")
6601 (license license:expat)))
6602
6603 (define-public python2-pep8
6604 (package-with-python2 python-pep8))
6605
6606 (define-public python-pyflakes
6607 (package
6608 (name "python-pyflakes")
6609 (version "2.1.1")
6610 (source
6611 (origin
6612 (method url-fetch)
6613 (uri (pypi-uri "pyflakes" version))
6614 (sha256
6615 (base32
6616 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
6617 (build-system python-build-system)
6618 (home-page
6619 "https://github.com/pyflakes/pyflakes")
6620 (synopsis "Passive checker of Python programs")
6621 (description
6622 "Pyflakes statically checks Python source code for common errors.")
6623 (license license:expat)))
6624
6625 (define-public python2-pyflakes
6626 (package-with-python2 python-pyflakes))
6627
6628 (define-public python-mccabe
6629 (package
6630 (name "python-mccabe")
6631 (version "0.6.1")
6632 (source
6633 (origin
6634 (method url-fetch)
6635 (uri (pypi-uri "mccabe" version))
6636 (sha256
6637 (base32
6638 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6639 (build-system python-build-system)
6640 (native-inputs
6641 `(("python-pytest" ,python-pytest-bootstrap)
6642 ("python-pytest-runner" ,python-pytest-runner)))
6643 (home-page "https://github.com/flintwork/mccabe")
6644 (synopsis "McCabe checker, plugin for flake8")
6645 (description
6646 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6647 complexity of Python source code.")
6648 (license license:expat)))
6649
6650 (define-public python2-mccabe
6651 (package-with-python2 python-mccabe))
6652
6653 (define-public python-mccabe-0.2.1
6654 (package (inherit python-mccabe)
6655 (version "0.2.1")
6656 (source
6657 (origin
6658 (method url-fetch)
6659 (uri (pypi-uri "mccabe" version))
6660 (sha256
6661 (base32
6662 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6663
6664 (define-public python2-mccabe-0.2.1
6665 (package-with-python2 python-mccabe-0.2.1))
6666
6667 ;; Flake8 2.4.1 requires an older version of pep8.
6668 ;; This should be removed ASAP.
6669 (define-public python-pep8-1.5.7
6670 (package (inherit python-pep8)
6671 (version "1.5.7")
6672 (source
6673 (origin
6674 (method url-fetch)
6675 (uri (pypi-uri "pep8" version))
6676 (sha256
6677 (base32
6678 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6679 (arguments
6680 ;; XXX Tests not compatible with Python 3.5.
6681 '(#:tests? #f))))
6682
6683 (define-public python2-pep8-1.5.7
6684 (package-with-python2 python-pep8-1.5.7))
6685
6686 ;; Flake8 2.4.1 requires an older version of pyflakes.
6687 ;; This should be removed ASAP.
6688 (define-public python-pyflakes-0.8.1
6689 (package (inherit python-pyflakes)
6690 (version "0.8.1")
6691 (source
6692 (origin
6693 (method url-fetch)
6694 (uri (pypi-uri "pyflakes" version))
6695 (sha256
6696 (base32
6697 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6698 (arguments
6699 ;; XXX Tests not compatible with Python 3.5.
6700 '(#:tests? #f))))
6701
6702 (define-public python2-pyflakes-0.8.1
6703 (package-with-python2 python-pyflakes-0.8.1))
6704
6705 (define-public python-flake8
6706 (package
6707 (name "python-flake8")
6708 (version "3.7.7")
6709 (source (origin
6710 (method url-fetch)
6711 (uri (pypi-uri "flake8" version))
6712 (sha256
6713 (base32
6714 "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5"))))
6715 (build-system python-build-system)
6716 (arguments
6717 `(#:phases
6718 (modify-phases %standard-phases
6719 (delete 'check)
6720 (add-after 'install 'check
6721 (lambda* (#:key inputs outputs #:allow-other-keys)
6722 (add-installed-pythonpath inputs outputs)
6723 (invoke "pytest" "-v")
6724 #t)))))
6725 (propagated-inputs
6726 `(("python-pycodestyle" ,python-pycodestyle)
6727 ("python-entrypoints" ,python-entrypoints)
6728 ("python-pyflakes" ,python-pyflakes)
6729 ("python-mccabe" ,python-mccabe)))
6730 (native-inputs
6731 `(("python-mock" ,python-mock)
6732 ("python-pytest" ,python-pytest-bootstrap)
6733 ("python-pytest-runner" ,python-pytest-runner)))
6734 (home-page "https://gitlab.com/pycqa/flake8")
6735 (synopsis
6736 "The modular source code checker: pep8, pyflakes and co")
6737 (description
6738 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6739 (properties `((python2-variant . ,(delay python2-flake8))))
6740 (license license:expat)))
6741
6742 (define-public python2-flake8
6743 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
6744 (package (inherit base)
6745 (propagated-inputs
6746 `(("python2-configparser" ,python2-configparser)
6747 ("python2-enum34" ,python2-enum34)
6748 ("python2-typing" ,python2-typing)
6749 ,@(package-propagated-inputs base))))))
6750
6751 ;; python-hacking requires flake8 <2.6.0.
6752 (define-public python-flake8-2.5
6753 (package
6754 (inherit python-flake8)
6755 (version "2.5.5")
6756 (source (origin
6757 (method url-fetch)
6758 (uri (pypi-uri "flake8" version))
6759 (sha256
6760 (base32
6761 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6762 (propagated-inputs
6763 `(("python-pep8" ,python-pep8)
6764 ,@(package-propagated-inputs python-flake8)))
6765 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6766
6767 (define-public python2-flake8-2.5
6768 (package
6769 (inherit python2-flake8)
6770 (version (package-version python-flake8-2.5))
6771 (source (origin
6772 (inherit (package-source python-flake8-2.5))))
6773 (propagated-inputs
6774 `(("python2-pep8" ,python2-pep8)
6775 ,@(package-propagated-inputs python2-flake8)))))
6776
6777 (define-public python-flake8-polyfill
6778 (package
6779 (name "python-flake8-polyfill")
6780 (version "1.0.2")
6781 (source
6782 (origin
6783 (method url-fetch)
6784 (uri (pypi-uri "flake8-polyfill" version))
6785 (sha256
6786 (base32
6787 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6788 (build-system python-build-system)
6789 (arguments
6790 '(#:phases
6791 (modify-phases %standard-phases
6792 (replace 'check
6793 (lambda _
6794 ;; Be compatible with Pytest 4:
6795 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
6796 (substitute* "setup.cfg"
6797 (("\\[pytest\\]")
6798 "[tool:pytest]"))
6799
6800 (setenv "PYTHONPATH"
6801 (string-append (getcwd) "/build/lib:"
6802 (getenv "PYTHONPATH")))
6803 (invoke "py.test" "-v"))))))
6804 (native-inputs
6805 `(("python-flake8" ,python-flake8)
6806 ("python-mock" ,python-mock)
6807 ("python-pep8" ,python-pep8)
6808 ("python-pycodestyle" ,python-pycodestyle)
6809 ("python-pytest" ,python-pytest)))
6810 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6811 (synopsis "Polyfill package for Flake8 plugins")
6812 (description
6813 "This package that provides some compatibility helpers for Flake8
6814 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6815 (license license:expat)))
6816
6817 (define-public python2-flake8-polyfill
6818 (package-with-python2 python-flake8-polyfill))
6819
6820 (define-public python-mistune
6821 (package
6822 (name "python-mistune")
6823 (version "0.8.4")
6824 (source
6825 (origin
6826 (method url-fetch)
6827 (uri (pypi-uri "mistune" version))
6828 (sha256
6829 (base32
6830 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6831 (build-system python-build-system)
6832 (native-inputs
6833 `(("python-nose" ,python-nose)
6834 ("python-cython" ,python-cython)))
6835 (home-page "https://github.com/lepture/mistune")
6836 (synopsis "Markdown parser in pure Python")
6837 (description "This package provides a fast markdown parser in pure
6838 Python.")
6839 (license license:bsd-3)))
6840
6841 (define-public python2-mistune
6842 (package-with-python2 python-mistune))
6843
6844 (define-public python-markdown
6845 (package
6846 (name "python-markdown")
6847 (version "3.1.1")
6848 (source
6849 (origin
6850 (method url-fetch)
6851 (uri (pypi-uri "Markdown" version))
6852 (sha256
6853 (base32
6854 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f"))))
6855 (build-system python-build-system)
6856 (native-inputs
6857 `(("python-nose" ,python-nose)
6858 ("python-pyyaml" ,python-pyyaml)))
6859 (home-page "https://python-markdown.github.io/")
6860 (synopsis "Python implementation of Markdown")
6861 (description
6862 "This package provides a Python implementation of John Gruber's
6863 Markdown. The library features international input, various Markdown
6864 extensions, and several HTML output formats. A command line wrapper
6865 markdown_py is also provided to convert Markdown files to HTML.")
6866 (license license:bsd-3)))
6867
6868 (define-public python2-markdown
6869 (package-with-python2 python-markdown))
6870
6871 (define-public python-ptyprocess
6872 (package
6873 (name "python-ptyprocess")
6874 (version "0.5.2")
6875 (source
6876 (origin
6877 (method url-fetch)
6878 (uri (pypi-uri "ptyprocess" version))
6879 (sha256
6880 (base32
6881 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6882 (build-system python-build-system)
6883 (native-inputs
6884 `(("python-nose" ,python-nose)))
6885 (arguments
6886 `(#:phases
6887 (modify-phases %standard-phases
6888 (replace 'check
6889 (lambda _ (invoke "nosetests"))))))
6890 (home-page "https://github.com/pexpect/ptyprocess")
6891 (synopsis "Run a subprocess in a pseudo terminal")
6892 (description
6893 "This package provides a Python library used to launch a subprocess in a
6894 pseudo terminal (pty), and interact with both the process and its pty.")
6895 (license license:isc)))
6896
6897 (define-public python2-ptyprocess
6898 (package-with-python2 python-ptyprocess))
6899
6900 (define-public python-cram
6901 (package
6902 (name "python-cram")
6903 (version "0.7")
6904 (home-page "https://bitheap.org/cram/")
6905 (source (origin
6906 (method url-fetch)
6907 (uri (list (string-append home-page "cram-"
6908 version ".tar.gz")
6909 (pypi-uri "cram" version)))
6910 (sha256
6911 (base32
6912 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6913 (arguments
6914 '(#:phases
6915 (modify-phases %standard-phases
6916 (add-after 'unpack 'patch-source
6917 (lambda _
6918 (substitute* (find-files "cram" ".*\\.py$")
6919 ;; Replace default shell path.
6920 (("/bin/sh") (which "sh")))
6921 (substitute* (find-files "tests" ".*\\.t$")
6922 (("md5") "md5sum")
6923 (("/bin/bash") (which "bash"))
6924 (("/bin/sh") (which "sh")))
6925 (substitute* "cram/_test.py"
6926 ;; This hack works around a bug triggered by substituting
6927 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6928 ;; "cram -h", which breaks the output at 80 characters. This
6929 ;; causes the line showing the default shell to break into two
6930 ;; lines, but the test expects a single line...
6931 (("env\\['COLUMNS'\\] = '80'")
6932 "env['COLUMNS'] = '160'"))
6933
6934 (substitute* "Makefile"
6935 ;; Recent versions of python-coverage have caused the test
6936 ;; coverage to decrease (as of version 0.7). Allow that.
6937 (("--fail-under=100")
6938 "--fail-under=90"))
6939
6940 #t))
6941 (replace 'check
6942 ;; The test phase uses the built library and executable.
6943 (lambda* (#:key inputs outputs #:allow-other-keys)
6944 (add-installed-pythonpath inputs outputs)
6945 (setenv "PATH" (string-append (getenv "PATH") ":"
6946 (assoc-ref outputs "out") "/bin"))
6947 (invoke "make" "test"))))))
6948 (build-system python-build-system)
6949 (native-inputs
6950 `(("python-coverage" ,python-coverage)
6951 ("which" ,which)))
6952 (synopsis "Simple testing framework for command line applications")
6953 (description
6954 "Cram is a functional testing framework for command line applications.
6955 Cram tests look like snippets of interactive shell sessions. Cram runs each
6956 command and compares the command output in the test with the command’s actual
6957 output.")
6958 (license license:gpl2+)))
6959
6960 (define-public python2-cram
6961 (package-with-python2 python-cram))
6962
6963 (define-public python-straight-plugin
6964 (package
6965 (name "python-straight-plugin")
6966 (version "1.4.1")
6967 (source
6968 (origin
6969 (method url-fetch)
6970 (uri (pypi-uri "straight.plugin" version))
6971 (sha256
6972 (base32
6973 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6974 (build-system python-build-system)
6975 (home-page "https://github.com/ironfroggy/straight.plugin")
6976 (synopsis "Simple namespaced plugin facility")
6977 (description "Straight Plugin provides a type of plugin you can create from
6978 almost any existing Python modules, and an easy way for outside developers to
6979 add functionality and customization to your projects with their own plugins.")
6980 (license license:expat)))
6981
6982 (define-public python2-straight-plugin
6983 (package-with-python2 python-straight-plugin))
6984
6985 (define-public python-fonttools
6986 (package
6987 (name "python-fonttools")
6988 (version "3.38.0")
6989 (source (origin
6990 (method url-fetch)
6991 (uri (pypi-uri "fonttools" version ".zip"))
6992 (sha256
6993 (base32
6994 "12ripk3s7skgxr1bs9r8n13r94ym3s8iir7ivfixls9fa4dabmlh"))))
6995 (build-system python-build-system)
6996 (native-inputs
6997 `(("unzip" ,unzip)
6998 ("python-pytest" ,python-pytest)
6999 ("python-pytest-runner" ,python-pytest-runner)))
7000 (home-page "https://github.com/behdad/fonttools")
7001 (synopsis "Tools to manipulate font files")
7002 (description
7003 "FontTools/TTX is a library to manipulate font files from Python. It
7004 supports reading and writing of TrueType/OpenType fonts, reading and writing
7005 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
7006 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
7007 from an XML-based format.")
7008 (license license:expat)))
7009
7010 (define-public python2-fonttools
7011 (package-with-python2 python-fonttools))
7012
7013 (define-public python-ly
7014 (package
7015 (name "python-ly")
7016 (version "0.9.5")
7017 (source
7018 (origin
7019 (method url-fetch)
7020 (uri (pypi-uri name version))
7021 (sha256
7022 (base32
7023 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
7024 (build-system python-build-system)
7025 (arguments
7026 ;; FIXME: Some tests need network access.
7027 '(#:tests? #f))
7028 (synopsis "Tool and library for manipulating LilyPond files")
7029 (description "This package provides a Python library to parse, manipulate
7030 or create documents in LilyPond format. A command line program ly is also
7031 provided that can be used to do various manipulations with LilyPond files.")
7032 (home-page "https://pypi.python.org/pypi/python-ly")
7033 (license license:gpl2+)))
7034
7035 (define-public python-appdirs
7036 (package
7037 (name "python-appdirs")
7038 (version "1.4.3")
7039 (source
7040 (origin
7041 (method url-fetch)
7042 (uri (pypi-uri "appdirs" version))
7043 (sha256
7044 (base32
7045 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
7046 (build-system python-build-system)
7047 (home-page "https://github.com/ActiveState/appdirs")
7048 (synopsis
7049 "Determine platform-specific dirs, e.g. a \"user data dir\"")
7050 (description
7051 "This module provides a portable way of finding out where user data
7052 should be stored on various operating systems.")
7053 (license license:expat)))
7054
7055 (define-public python2-appdirs
7056 (package-with-python2 python-appdirs))
7057
7058 (define-public python-llfuse
7059 (package
7060 (name "python-llfuse")
7061 (version "1.3.5")
7062 (source (origin
7063 (method url-fetch)
7064 (uri (pypi-uri "llfuse" version ".tar.bz2"))
7065 (sha256
7066 (base32
7067 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
7068 (build-system python-build-system)
7069 (inputs
7070 `(("fuse" ,fuse)
7071 ("attr" ,attr)))
7072 (native-inputs
7073 `(("pkg-config" ,pkg-config)))
7074 (synopsis "Python bindings for FUSE")
7075 (description
7076 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
7077 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
7078 (license license:lgpl2.0+)
7079 (properties `((python2-variant . ,(delay python2-llfuse))))))
7080
7081 (define-public python2-llfuse
7082 (package (inherit (package-with-python2
7083 (strip-python2-variant python-llfuse)))
7084 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
7085
7086 ;; For attic-0.16
7087 (define-public python-llfuse-0.41
7088 (package (inherit python-llfuse)
7089 (version "0.41.1")
7090 (source (origin
7091 (method url-fetch)
7092 (uri (string-append
7093 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
7094 "llfuse-" version ".tar.bz2"))
7095 (sha256
7096 (base32
7097 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
7098 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
7099 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
7100 (license (list license:expat license:lgpl2.0+))))
7101
7102 (define-public python-msgpack
7103 (package
7104 (name "python-msgpack")
7105 (version "0.5.6")
7106 (source (origin
7107 (method url-fetch)
7108 (uri (pypi-uri "msgpack" version))
7109 (sha256
7110 (base32
7111 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
7112 (build-system python-build-system)
7113 (arguments
7114 `(#:modules ((guix build utils)
7115 (guix build python-build-system)
7116 (ice-9 ftw)
7117 (srfi srfi-1)
7118 (srfi srfi-26))
7119 #:phases
7120 (modify-phases %standard-phases
7121 (replace 'check
7122 (lambda _
7123 (let ((cwd (getcwd)))
7124 (setenv "PYTHONPATH"
7125 (string-append cwd "/build/"
7126 (find (cut string-prefix? "lib" <>)
7127 (scandir (string-append cwd "/build")))
7128 ":"
7129 (getenv "PYTHONPATH")))
7130 (invoke "pytest" "-v" "test")))))))
7131 (native-inputs
7132 `(("python-pytest" ,python-pytest)))
7133 (synopsis "MessagePack (de)serializer")
7134 (description "MessagePack is a fast, compact binary serialization format,
7135 suitable for similar data to JSON. This package provides CPython bindings for
7136 reading and writing MessagePack data.")
7137 (home-page "https://pypi.python.org/pypi/msgpack/")
7138 (license license:asl2.0)))
7139
7140 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
7141 ;; release 0.5. Some packages like borg still call it by the old name for now.
7142 ;; <https://bugs.gnu.org/30662>
7143 (define-public python-msgpack-transitional
7144 (package
7145 (inherit python-msgpack)
7146 (name "python-msgpack-transitional")
7147 (arguments
7148 (substitute-keyword-arguments (package-arguments python-msgpack)
7149 ((#:phases phases)
7150 `(modify-phases ,phases
7151 (add-after 'unpack 'configure-transitional
7152 (lambda _
7153 ;; Keep using the old name.
7154 (substitute* "setup.py"
7155 (("TRANSITIONAL = False")
7156 "TRANSITIONAL = 1"))
7157 #t))))))))
7158
7159 (define-public python2-msgpack
7160 (package-with-python2 python-msgpack))
7161
7162 (define-public python-netaddr
7163 (package
7164 (name "python-netaddr")
7165 (version "0.7.19")
7166 (source
7167 (origin
7168 (method url-fetch)
7169 (uri (pypi-uri "netaddr" version))
7170 (sha256
7171 (base32
7172 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
7173 (build-system python-build-system)
7174 (arguments `(#:tests? #f)) ;; No tests.
7175 (home-page "https://github.com/drkjam/netaddr/")
7176 (synopsis "Pythonic manipulation of network addresses")
7177 (description
7178 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
7179 and MAC network addresses.")
7180 (license license:bsd-3)))
7181
7182 (define-public python2-netaddr
7183 (package-with-python2 python-netaddr))
7184
7185 (define-public python2-pyroute2
7186 (package
7187 (name "python2-pyroute2")
7188 (version "0.5.6")
7189 (source
7190 (origin
7191 (method url-fetch)
7192 (uri (pypi-uri "pyroute2" version))
7193 (sha256
7194 (base32
7195 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
7196 (build-system python-build-system)
7197 (arguments
7198 `(#:python ,python-2)) ;Python 3.x is not supported
7199 (home-page "https://github.com/svinota/pyroute2")
7200 (synopsis "Python netlink library")
7201 (description
7202 "Pyroute2 is a pure Python netlink library with minimal dependencies.
7203 Supported netlink families and protocols include:
7204 @itemize
7205 @item rtnl, network settings - addresses, routes, traffic controls
7206 @item nfnetlink - netfilter API: ipset, nftables, ...
7207 @item ipq - simplest userspace packet filtering, iptables QUEUE target
7208 @item devlink - manage and monitor devlink-enabled hardware
7209 @item generic - generic netlink families
7210 @itemize
7211 @item nl80211 - wireless functions API (basic support)
7212 @item taskstats - extended process statistics
7213 @item acpi_events - ACPI events monitoring
7214 @item thermal_events - thermal events monitoring
7215 @item VFS_DQUOT - disk quota events monitoring
7216 @end itemize
7217 @end itemize")
7218 (license license:gpl2+)))
7219
7220 (define-public python-wrapt
7221 (package
7222 (name "python-wrapt")
7223 (version "1.11.2")
7224 (source
7225 (origin
7226 (method url-fetch)
7227 (uri (pypi-uri "wrapt" version))
7228 (sha256
7229 (base32
7230 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
7231 (build-system python-build-system)
7232 (arguments
7233 ;; Tests are not included in the tarball, they are only available in the
7234 ;; git repository.
7235 `(#:tests? #f))
7236 (home-page "https://github.com/GrahamDumpleton/wrapt")
7237 (synopsis "Module for decorators, wrappers and monkey patching")
7238 (description
7239 "The aim of the wrapt module is to provide a transparent object proxy for
7240 Python, which can be used as the basis for the construction of function
7241 wrappers and decorator functions.")
7242 (license license:bsd-2)))
7243
7244 (define-public python2-wrapt
7245 (package-with-python2 python-wrapt))
7246
7247 (define-public python-xlrd
7248 (package
7249 (name "python-xlrd")
7250 (version "1.0.0")
7251 (source (origin
7252 (method url-fetch)
7253 (uri (pypi-uri "xlrd" version))
7254 (sha256
7255 (base32
7256 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
7257 (build-system python-build-system)
7258 (arguments
7259 `(#:phases
7260 (modify-phases %standard-phases
7261 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
7262 ;; run tests instead for now.
7263 (replace 'check (lambda _ (invoke "nosetests"))))))
7264 (native-inputs `(("python-nose" ,python-nose)))
7265 (home-page "http://www.python-excel.org/")
7266 (synopsis "Library for extracting data from Excel files")
7267 (description "This package provides a library to extract data from
7268 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7269 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7270 Unicode-aware. It is not intended as an end-user tool.")
7271 (license license:bsd-3)))
7272
7273 (define-public python2-xlrd
7274 (package-with-python2 python-xlrd))
7275
7276 (define-public python-prettytable
7277 (package
7278 (name "python-prettytable")
7279 (version "0.7.2")
7280 (source
7281 (origin
7282 (method url-fetch)
7283 (uri (pypi-uri "prettytable" version ".tar.bz2"))
7284 (sha256
7285 (base32
7286 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7287 (build-system python-build-system)
7288 (home-page "http://code.google.com/p/prettytable/")
7289 (synopsis "Display tabular data in an ASCII table format")
7290 (description
7291 "A library designed to represent tabular data in visually appealing ASCII
7292 tables. PrettyTable allows for selection of which columns are to be printed,
7293 independent alignment of columns (left or right justified or centred) and
7294 printing of sub-tables by specifying a row range.")
7295 (license license:bsd-3)))
7296
7297 (define-public python2-prettytable
7298 (package-with-python2 python-prettytable))
7299
7300 (define-public python-tables
7301 (package
7302 (name "python-tables")
7303 (version "3.4.4")
7304 (source
7305 (origin
7306 (method url-fetch)
7307 (uri (pypi-uri "tables" version))
7308 (sha256
7309 (base32
7310 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7311 (modules '((guix build utils)))
7312 (snippet
7313 '(begin
7314 ;; Remove pre-compiled .pyc files from source.
7315 (for-each delete-file-recursively
7316 (find-files "." "__pycache__" #:directories? #t))
7317 (for-each delete-file (find-files "." "\\.pyc$"))
7318 #t))))
7319 (build-system python-build-system)
7320 (arguments
7321 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7322 ;; or "check", so we must override the build and check phases.
7323 #:phases
7324 (modify-phases %standard-phases
7325 (add-after 'unpack 'use-gcc
7326 (lambda _
7327 (substitute* "setup.py"
7328 (("compiler = new_compiler\\(\\)" line)
7329 (string-append line
7330 "\ncompiler.set_executables(compiler='gcc',"
7331 "compiler_so='gcc',"
7332 "linker_exe='gcc',"
7333 "linker_so='gcc -shared')")))
7334 #t))
7335 (replace 'build
7336 (lambda* (#:key inputs #:allow-other-keys)
7337 (invoke "python" "setup.py" "build"
7338 (string-append "--hdf5="
7339 (assoc-ref inputs "hdf5")))))
7340 (replace 'check
7341 (lambda* (#:key inputs #:allow-other-keys)
7342 (invoke "python" "setup.py" "check"
7343 (string-append "--hdf5="
7344 (assoc-ref inputs "hdf5"))))))))
7345 (propagated-inputs
7346 `(("python-numexpr" ,python-numexpr)
7347 ("python-numpy" ,python-numpy)))
7348 (native-inputs
7349 `(("python-cython" ,python-cython)
7350 ("pkg-config" ,pkg-config)))
7351 (inputs
7352 `(("hdf5" ,hdf5)
7353 ("bzip2" ,bzip2)
7354 ("zlib" ,zlib)))
7355 (home-page "http://www.pytables.org/")
7356 (synopsis "Hierarchical datasets for Python")
7357 (description "PyTables is a package for managing hierarchical datasets and
7358 designed to efficiently cope with extremely large amounts of data.")
7359 (license license:bsd-3)))
7360
7361 (define-public python2-tables
7362 (package-with-python2 python-tables))
7363
7364 (define-public python-pyasn1
7365 (package
7366 (name "python-pyasn1")
7367 (version "0.4.3")
7368 (source
7369 (origin
7370 (method url-fetch)
7371 (uri (pypi-uri "pyasn1" version))
7372 (sha256
7373 (base32
7374 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7375 (build-system python-build-system)
7376 (home-page "http://pyasn1.sourceforge.net/")
7377 (synopsis "ASN.1 types and codecs")
7378 (description
7379 "This is an implementation of ASN.1 types and codecs in Python. It is
7380 suitable for a wide range of protocols based on the ASN.1 specification.")
7381 (license license:bsd-2)))
7382
7383 (define-public python2-pyasn1
7384 (package-with-python2 python-pyasn1))
7385
7386 (define-public python-pyasn1-modules
7387 (package
7388 (name "python-pyasn1-modules")
7389 (version "0.2.2")
7390 (source
7391 (origin
7392 (method url-fetch)
7393 (uri (pypi-uri "pyasn1-modules" version))
7394 (sha256
7395 (base32
7396 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7397 (build-system python-build-system)
7398 (propagated-inputs
7399 `(("python-pyasn1" ,python-pyasn1)))
7400 (home-page "https://sourceforge.net/projects/pyasn1/")
7401 (synopsis "ASN.1 codec implementations")
7402 (description
7403 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7404 implementations of ASN.1-based codecs and protocols.")
7405 (license license:bsd-3)))
7406
7407 (define-public python2-pyasn1-modules
7408 (package-with-python2 python-pyasn1-modules))
7409
7410 (define-public python-ipaddress
7411 (package
7412 (name "python-ipaddress")
7413 (version "1.0.22")
7414 (source (origin
7415 (method url-fetch)
7416 (uri (pypi-uri "ipaddress" version))
7417 (sha256
7418 (base32
7419 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7420 (build-system python-build-system)
7421 (home-page "https://github.com/phihag/ipaddress")
7422 (synopsis "IP address manipulation library")
7423 (description
7424 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7425 in Python. This library is used to create, poke at, and manipulate IPv4 and
7426 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7427 module to older versions of Python.")
7428 (license license:psfl)))
7429
7430 (define-public python2-ipaddress
7431 (package-with-python2 python-ipaddress))
7432
7433 (define-public python2-ipaddr
7434 (package
7435 (name "python2-ipaddr")
7436 (version "2.1.11")
7437 (source
7438 (origin
7439 (method url-fetch)
7440 (uri (pypi-uri "ipaddr" version))
7441 (sha256
7442 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7443 (build-system python-build-system)
7444 (arguments
7445 `(#:python ,python-2 ;version 2 only
7446 #:phases
7447 (modify-phases %standard-phases
7448 (replace 'check
7449 (lambda _ (invoke "python" "ipaddr_test.py"))))))
7450 (home-page "https://github.com/google/ipaddr-py")
7451 (synopsis "IP address manipulation library")
7452 (description
7453 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7454 IPv6 addresses and networks.
7455
7456 For new implementations you may prefer to use the standard module
7457 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
7458 versions of Python.")
7459 (license license:asl2.0)))
7460
7461 (define-public python-idna
7462 (package
7463 (name "python-idna")
7464 (version "2.8")
7465 (source
7466 (origin
7467 (method url-fetch)
7468 (uri (pypi-uri "idna" version))
7469 (sha256
7470 (base32
7471 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
7472 (build-system python-build-system)
7473 (home-page "https://github.com/kjd/idna")
7474 (synopsis "Internationalized domain names in applications")
7475 (description
7476 "This is a library to support the Internationalised Domain Names in
7477 Applications (IDNA) protocol as specified in RFC 5891. This version of the
7478 protocol is often referred to as “IDNA2008” and can produce different results
7479 from the earlier standard from 2003. The library is also intended to act as a
7480 suitable drop-in replacement for the “encodings.idna” module that comes with
7481 the Python standard library but currently only supports the older 2003
7482 specification.")
7483 (license license:bsd-4)))
7484
7485 (define-public python-idna-2.7
7486 (package (inherit python-idna)
7487 (version "2.7")
7488 (source (origin
7489 (method url-fetch)
7490 (uri (pypi-uri "idna" version))
7491 (sha256
7492 (base32
7493 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7494
7495
7496 (define-public python2-idna
7497 (package-with-python2 python-idna))
7498
7499 (define-public python-idna-ssl
7500 (package
7501 (name "python-idna-ssl")
7502 (version "1.0.1")
7503 (source
7504 (origin
7505 (method url-fetch)
7506 (uri (pypi-uri "idna-ssl" version))
7507 (sha256
7508 (base32
7509 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7510 (build-system python-build-system)
7511 (arguments
7512 `(#:tests? #f)) ;circular dependency with python-aiohttp
7513 (home-page "https://github.com/aio-libs/idna-ssl")
7514 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7515 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7516 domains support.")
7517 (license license:expat)))
7518
7519 (define-public python-pretend
7520 (package
7521 (name "python-pretend")
7522 (version "1.0.9")
7523 (source
7524 (origin
7525 (method url-fetch)
7526 (uri (pypi-uri "pretend" version))
7527 (sha256
7528 (base32
7529 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7530 (build-system python-build-system)
7531 (home-page "https://github.com/alex/pretend")
7532 (synopsis "Library for stubbing in Python")
7533 (description
7534 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7535 technique for writing tests. You may hear the term mixed up with mocks,
7536 fakes, or doubles. Basically, a stub is an object that returns pre-canned
7537 responses, rather than doing any computation.")
7538 (license license:bsd-3)))
7539
7540 (define-public python2-pretend
7541 (package-with-python2 python-pretend))
7542
7543 (define-public python-pip
7544 (package
7545 (name "python-pip")
7546 (version "19.2.1")
7547 (source
7548 (origin
7549 (method url-fetch)
7550 (uri (pypi-uri "pip" version))
7551 (sha256
7552 (base32
7553 "100sd12ss4mbdj5lf3wawad29cm573b27765mq098x6xhcj71395"))))
7554 (build-system python-build-system)
7555 (arguments
7556 '(#:tests? #f)) ; there are no tests in the pypi archive.
7557 (home-page "https://pip.pypa.io/")
7558 (synopsis "Package manager for Python software")
7559 (description
7560 "Pip is a package manager for Python software, that finds packages on the
7561 Python Package Index (PyPI).")
7562 (license license:expat)))
7563
7564 (define-public python2-pip
7565 (package-with-python2 python-pip))
7566
7567 (define-public python-tlsh
7568 (package
7569 (name "python-tlsh")
7570 (version "3.4.5")
7571 (home-page "https://github.com/trendmicro/tlsh")
7572 (source
7573 (origin
7574 (method git-fetch)
7575 (uri (git-reference
7576 (url "https://github.com/trendmicro/tlsh.git")
7577 (commit (string-append "v" version))))
7578 (file-name (git-file-name name version))
7579 (sha256
7580 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
7581 (build-system cmake-build-system)
7582 (arguments
7583 '(#:out-of-source? #f
7584 #:phases (modify-phases %standard-phases
7585 (replace
7586 'install
7587 (lambda* (#:key outputs #:allow-other-keys)
7588 ;; Build and install the Python bindings. The underlying
7589 ;; C++ library is apparently not meant to be installed.
7590 (let ((out (assoc-ref outputs "out")))
7591 (with-directory-excursion "py_ext"
7592 (and (system* "python" "setup.py" "build")
7593 (system* "python" "setup.py" "install"
7594 (string-append "--prefix=" out))))))))))
7595 (inputs `(("python" ,python-wrapper))) ;for the bindings
7596 (synopsis "Fuzzy matching library for Python")
7597 (description
7598 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7599 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7600 value which can be used for similarity comparisons. Similar objects have
7601 similar hash values, which allows for the detection of similar objects by
7602 comparing their hash values. The byte stream should have a sufficient amount
7603 of complexity; for example, a byte stream of identical bytes will not generate
7604 a hash value.")
7605 (license license:asl2.0)))
7606
7607 (define-public python2-tlsh
7608 (package
7609 (inherit python-tlsh)
7610 (name "python2-tlsh")
7611 (inputs `(("python" ,python-2)))))
7612
7613 (define-public python-termcolor
7614 (package
7615 (name "python-termcolor")
7616 (version "1.1.0")
7617 (source
7618 (origin
7619 (method url-fetch)
7620 (uri (pypi-uri "termcolor" version))
7621 (sha256
7622 (base32
7623 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7624 (build-system python-build-system)
7625 (arguments
7626 ;; There are no tests.
7627 `(#:tests? #f))
7628 (home-page "https://pypi.python.org/pypi/termcolor")
7629 (synopsis "ANSII Color formatting for terminal output")
7630 (description
7631 "This package provides ANSII Color formatting for output in terminals.")
7632 (license license:expat)))
7633
7634 (define-public python2-termcolor
7635 (package-with-python2 python-termcolor))
7636
7637 (define-public python-libarchive-c
7638 (package
7639 (name "python-libarchive-c")
7640 (version "2.8")
7641 (source (origin
7642 (method url-fetch)
7643 (uri (pypi-uri "libarchive-c" version))
7644 (sha256
7645 (base32
7646 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
7647 (build-system python-build-system)
7648 (arguments
7649 '(#:phases (modify-phases %standard-phases
7650 (add-before
7651 'build 'reference-libarchive
7652 (lambda* (#:key inputs #:allow-other-keys)
7653 ;; Retain the absolute file name of libarchive.so.
7654 (let ((libarchive (assoc-ref inputs "libarchive")))
7655 (substitute* "libarchive/ffi.py"
7656 (("find_library\\('archive'\\)")
7657 (string-append "'" libarchive
7658 "/lib/libarchive.so'"))))))
7659 (replace 'check
7660 (lambda _ (invoke "pytest" "-vv"))))))
7661 (native-inputs
7662 `(("python-mock" ,python-mock)
7663 ("python-pytest" ,python-pytest)))
7664 (inputs
7665 `(("libarchive" ,libarchive)))
7666 (home-page "https://github.com/Changaco/python-libarchive-c")
7667 (synopsis "Python interface to libarchive")
7668 (description
7669 "This package provides Python bindings to libarchive, a C library to
7670 access possibly compressed archives in many different formats. It uses
7671 Python's @code{ctypes} foreign function interface (FFI).")
7672 (license license:lgpl2.0+)))
7673
7674 (define-public python2-libarchive-c
7675 (package-with-python2 python-libarchive-c))
7676
7677 (define-public python-file
7678 (package
7679 (inherit file)
7680 (name "python-file")
7681 (build-system python-build-system)
7682 (arguments
7683 '(#:tests? #f ;no tests
7684 #:configure-flags '("--single-version-externally-managed" "--root=/")
7685 #:phases (modify-phases %standard-phases
7686 (add-before 'build 'change-directory
7687 (lambda _
7688 (chdir "python")
7689 #t))
7690 (add-before 'build 'set-library-file-name
7691 (lambda* (#:key inputs #:allow-other-keys)
7692 (let ((file (assoc-ref inputs "file")))
7693 (substitute* "magic.py"
7694 (("find_library\\('magic'\\)")
7695 (string-append "'" file "/lib/libmagic.so'")))
7696 #t))))))
7697 (inputs `(("file" ,file)))
7698 (native-inputs (if (%current-target-system)
7699 `(("self" ,this-package))
7700 '()))
7701 (synopsis "Python bindings to the libmagic file type guesser. Note that
7702 this module and the python-magic module both provide a \"magic.py\" file;
7703 these two modules, which are different and were developed separately, both
7704 serve the same purpose: provide Python bindings for libmagic.")))
7705
7706 (define-public python2-file
7707 (package-with-python2 python-file))
7708
7709 (define-public python-debian
7710 (package
7711 (name "python-debian")
7712 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
7713 (version "0.1.36")
7714 (source
7715 (origin
7716 ;; Use git-fetch, as pypi doesn't include test suite.
7717 (method git-fetch)
7718 (uri (git-reference
7719 (url home-page)
7720 (commit version)))
7721 (file-name (git-file-name name version))
7722 (sha256
7723 (base32
7724 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
7725 (build-system python-build-system)
7726 (arguments
7727 `(#:phases (modify-phases %standard-phases
7728 (add-after 'unpack 'remove-debian-specific-tests
7729 ;; python-apt, apt and dpkg are not yet available in guix,
7730 ;; and these tests heavily depend on them.
7731 (lambda _
7732 (delete-file "lib/debian/tests/test_deb822.py")
7733 (delete-file "lib/debian/tests/test_debfile.py")
7734 #t)))))
7735 (propagated-inputs
7736 `(("python-six" ,python-six)
7737 ("python-chardet" ,python-chardet)))
7738 (synopsis "Debian package related modules")
7739 (description
7740 ;; XXX: Use @enumerate instead of @itemize to work around
7741 ;; <http://bugs.gnu.org/21772>.
7742 "This package provides Python modules that abstract many formats of
7743 Debian-related files, such as:
7744
7745 @enumerate
7746 @item Debtags information;
7747 @item @file{debian/changelog} files;
7748 @item packages files, pdiffs;
7749 @item control files of single or multiple RFC822-style paragraphs---e.g.
7750 @file{debian/control}, @file{.changes}, @file{.dsc};
7751 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7752 contained files and meta-information.
7753 @end enumerate\n")
7754
7755 ;; Modules are either GPLv2+ or GPLv3+.
7756 (license license:gpl3+)))
7757
7758 (define-public python2-debian
7759 (package-with-python2 python-debian))
7760
7761 (define-public python-nbformat
7762 (package
7763 (name "python-nbformat")
7764 (version "4.4.0")
7765 (source
7766 (origin
7767 (method url-fetch)
7768 (uri (pypi-uri "nbformat" version))
7769 (sha256
7770 (base32
7771 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7772 (build-system python-build-system)
7773 (arguments `(#:tests? #f)) ; no test target
7774 (propagated-inputs
7775 `(("python-ipython-genutils" ,python-ipython-genutils)
7776 ("python-jsonschema" ,python-jsonschema)
7777 ("python-jupyter-core" ,python-jupyter-core)
7778 ("python-traitlets" ,python-traitlets)))
7779 (home-page "http://jupyter.org")
7780 (synopsis "Jupyter Notebook format")
7781 (description "This package provides the reference implementation of the
7782 Jupyter Notebook format and Python APIs for working with notebooks.")
7783 (license license:bsd-3)))
7784
7785 (define-public python2-nbformat
7786 (package-with-python2 python-nbformat))
7787
7788 (define-public python-bleach
7789 (package
7790 (name "python-bleach")
7791 (version "3.1.0")
7792 (source
7793 (origin
7794 (method url-fetch)
7795 (uri (pypi-uri "bleach" version))
7796 (sha256
7797 (base32
7798 "1yhrgrhkln8bd6gn3imj69g1h4xqah9gaz9q26crqr6gmmvpzprz"))))
7799 (build-system python-build-system)
7800 (propagated-inputs
7801 `(("python-webencodings" ,python-webencodings)
7802 ("python-six" ,python-six)))
7803 (native-inputs
7804 `(("python-pytest" ,python-pytest)
7805 ("python-pytest-runner" ,python-pytest-runner-2)))
7806 (home-page "https://github.com/jsocol/bleach")
7807 (synopsis "Whitelist-based HTML-sanitizing tool")
7808 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7809 (license license:asl2.0)))
7810
7811 (define-public python2-bleach
7812 (package-with-python2 python-bleach))
7813
7814 (define-public python-entrypoints
7815 (package
7816 (name "python-entrypoints")
7817 (version "0.3")
7818 (source
7819 (origin
7820 (method url-fetch)
7821 (uri (pypi-uri "entrypoints" version))
7822 (sha256
7823 (base32
7824 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
7825 (build-system python-build-system)
7826 ;; The package does not come with a setup.py file, so we have to generate
7827 ;; one ourselves.
7828 (arguments
7829 `(#:tests? #f
7830 #:phases
7831 (modify-phases %standard-phases
7832 (add-after 'unpack 'create-setup.py
7833 (lambda _
7834 (call-with-output-file "setup.py"
7835 (lambda (port)
7836 (format port "\
7837 from setuptools import setup
7838 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7839 " ,version))))))))
7840 (home-page "https://github.com/takluyver/entrypoints")
7841 (synopsis "Discover and load entry points from installed Python packages")
7842 (description "Entry points are a way for Python packages to advertise
7843 objects with some common interface. The most common examples are
7844 @code{console_scripts} entry points, which define shell commands by
7845 identifying a Python function to run. The @code{entrypoints} module contains
7846 functions to find and load entry points.")
7847 (license license:expat)))
7848
7849 (define-public python2-entrypoints
7850 (package-with-python2 python-entrypoints))
7851
7852 (define-public python-nbconvert
7853 (package
7854 (name "python-nbconvert")
7855 (version "5.0.0b1")
7856 (source
7857 (origin
7858 (method url-fetch)
7859 (uri (pypi-uri "nbconvert" version))
7860 (sha256
7861 (base32
7862 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7863 (build-system python-build-system)
7864 (arguments
7865 `(;; The "bdist_egg" target is disabled by default, causing the installation
7866 ;; to fail.
7867 #:configure-flags (list "bdist_egg")
7868 ;; FIXME: 5 failures, 40 errors.
7869 #:tests? #f))
7870 ;; #:phases
7871 ;; (modify-phases %standard-phases
7872 ;; (replace 'check
7873 ;; (lambda _
7874 ;; (zero? (system* "py.test" "-v")))))
7875 (native-inputs
7876 `(("python-pytest" ,python-pytest)))
7877 (propagated-inputs
7878 `(("python-bleach" ,python-bleach)
7879 ("python-entrypoints" ,python-entrypoints)
7880 ("python-jinja2" ,python-jinja2)
7881 ("python-jupyter-core" ,python-jupyter-core)
7882 ("python-mistune" ,python-mistune)
7883 ("python-nbformat" ,python-nbformat)
7884 ("python-pygments" ,python-pygments)
7885 ("python-traitlets" ,python-traitlets)))
7886 (home-page "http://jupyter.org")
7887 (synopsis "Converting Jupyter Notebooks")
7888 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7889 notebooks to various other formats via Jinja templates. It allows you to
7890 convert an @code{.ipynb} notebook file into various static formats including:
7891
7892 @enumerate
7893 @item HTML
7894 @item LaTeX
7895 @item PDF
7896 @item Reveal JS
7897 @item Markdown (md)
7898 @item ReStructured Text (rst)
7899 @item executable script
7900 @end enumerate\n")
7901 (license license:bsd-3)))
7902
7903 (define-public python2-nbconvert
7904 (package-with-python2 python-nbconvert))
7905
7906 (define-public python-notebook
7907 (package
7908 (name "python-notebook")
7909 (version "5.7.4")
7910 (source (origin
7911 (method url-fetch)
7912 (uri (pypi-uri "notebook" version))
7913 (sha256
7914 (base32
7915 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7916 (build-system python-build-system)
7917 (arguments
7918 `(#:phases
7919 (modify-phases %standard-phases
7920 (replace 'check
7921 (lambda _
7922 ;; These tests require a browser
7923 (delete-file-recursively "notebook/tests/selenium")
7924 ;; Some tests need HOME
7925 (setenv "HOME" "/tmp")
7926 ;; This file contains "warningfilters", which are not supported
7927 ;; by this version of nose.
7928 (delete-file "setup.cfg")
7929 (with-directory-excursion "/tmp"
7930 (invoke "nosetests" "-v"))
7931 #t)))))
7932 (propagated-inputs
7933 `(("python-jupyter-core" ,python-jupyter-core)
7934 ("python-nbformat" ,python-nbformat)
7935 ("python-nbconvert" ,python-nbconvert)
7936 ("python-prometheus-client" ,python-prometheus-client)
7937 ("python-send2trash" ,python-send2trash)
7938 ("python-terminado" ,python-terminado)))
7939 (native-inputs
7940 `(("python-nose" ,python-nose)
7941 ("python-sphinx" ,python-sphinx)
7942 ("python-requests" ,python-requests)))
7943 (home-page "http://jupyter.org/")
7944 (synopsis "Web-based notebook environment for interactive computing")
7945 (description
7946 "The Jupyter HTML notebook is a web-based notebook environment for
7947 interactive computing.")
7948 (properties `((python2-variant . ,(delay python2-notebook))))
7949 (license license:bsd-3)))
7950
7951 (define-public python2-notebook
7952 (let ((base (package-with-python2
7953 (strip-python2-variant python-notebook))))
7954 (package (inherit base)
7955 (native-inputs
7956 `(("python2-mock" ,python2-mock)
7957 ,@(package-native-inputs base)))
7958 (arguments
7959 (substitute-keyword-arguments (package-arguments base)
7960 ((#:phases phases)
7961 `(modify-phases ,phases
7962 (add-before 'check 'disable-test-case
7963 ;; The test requires network access to localhost. Curiously it
7964 ;; fails with Python 2 only. Simply make the test-case return
7965 ;; immediately.
7966 (lambda _
7967 (substitute*
7968 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7969 (("formats = self.nbconvert_api") "return #")))))))))))
7970
7971 (define-public python-widgetsnbextension
7972 (package
7973 (name "python-widgetsnbextension")
7974 (version "3.4.2")
7975 (source
7976 (origin
7977 (method url-fetch)
7978 (uri (pypi-uri "widgetsnbextension" version))
7979 (sha256
7980 (base32
7981 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7982 (build-system python-build-system)
7983 (propagated-inputs
7984 `(("python-ipykernel" ,python-ipykernel)
7985 ("python-notebook" ,python-notebook)))
7986 (native-inputs
7987 `(("python-certifi" ,python-certifi)
7988 ("python-nose" ,python-nose)))
7989 (home-page "https://ipython.org")
7990 (synopsis "IPython HTML widgets for Jupyter")
7991 (description "This package provides interactive HTML widgets for Jupyter
7992 notebooks.")
7993 (license license:bsd-3)))
7994
7995 (define-public python2-widgetsnbextension
7996 (package-with-python2 python-widgetsnbextension))
7997
7998 (define-public python-ipywidgets
7999 (package
8000 (name "python-ipywidgets")
8001 (version "5.2.2")
8002 (source
8003 (origin
8004 (method url-fetch)
8005 (uri (pypi-uri "ipywidgets" version))
8006 (sha256
8007 (base32
8008 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
8009 (build-system python-build-system)
8010 (propagated-inputs
8011 `(("python-ipython" ,python-ipython)
8012 ("python-traitlets" ,python-traitlets)
8013 ("python-widgetsnbextension" ,python-widgetsnbextension)))
8014 (native-inputs
8015 `(("python-nose" ,python-nose)
8016 ("python-pytest" ,python-pytest)))
8017 (home-page "https://ipython.org")
8018 (synopsis "IPython HTML widgets for Jupyter")
8019 (description "Ipywidgets are interactive HTML widgets for Jupyter
8020 notebooks and the IPython kernel. Notebooks come alive when interactive
8021 widgets are used. Users gain control of their data and can visualize changes
8022 in the data.")
8023 (license license:bsd-3)))
8024
8025 (define-public python2-ipywidgets
8026 (package-with-python2 python-ipywidgets))
8027
8028 (define-public python-jupyter-console
8029 (package
8030 (name "python-jupyter-console")
8031 (version "6.0.0")
8032 (source
8033 (origin
8034 (method url-fetch)
8035 (uri (pypi-uri "jupyter_console" version))
8036 (sha256
8037 (base32
8038 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
8039 (build-system python-build-system)
8040 (propagated-inputs
8041 `(("python-ipykernel" ,python-ipykernel)
8042 ("python-jupyter-client" ,python-jupyter-client)
8043 ("python-prompt-toolkit" ,python-prompt-toolkit)
8044 ("python-pygments" ,python-pygments)))
8045 (native-inputs
8046 `(("python-nose" ,python-nose)))
8047 (home-page "https://jupyter.org")
8048 (synopsis "Jupyter terminal console")
8049 (description "This package provides a terminal-based console frontend for
8050 Jupyter kernels. It also allows for console-based interaction with non-Python
8051 Jupyter kernels such as IJulia and IRKernel.")
8052 (license license:bsd-3)))
8053
8054 (define-public python2-jupyter-console
8055 (package
8056 (name "python2-jupyter-console")
8057 (version "5.2.0")
8058 (source
8059 (origin
8060 (method url-fetch)
8061 (uri (pypi-uri "jupyter_console" version))
8062 (sha256
8063 (base32
8064 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
8065 (build-system python-build-system)
8066 ;; Tests only run in an TTY.
8067 (arguments `(#:tests? #f))
8068 (propagated-inputs
8069 `(("python2-ipykernel" ,python2-ipykernel)
8070 ("python2-jupyter-client" ,python2-jupyter-client)
8071 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
8072 ("python2-pygments" ,python2-pygments)))
8073 (native-inputs
8074 `(("python2-nose" ,python2-nose)))
8075 (home-page "https://jupyter.org")
8076 (synopsis "Jupyter terminal console")
8077 (description "This package provides a terminal-based console frontend for
8078 Jupyter kernels. It also allows for console-based interaction with non-Python
8079 Jupyter kernels such as IJulia and IRKernel.")
8080 (license license:bsd-3)))
8081
8082 ;; The python-ipython and python-jupyter-console require each other. To get
8083 ;; the functionality in both packages working, strip down the
8084 ;; python-jupyter-console package when using it as an input to python-ipython.
8085 (define python-jupyter-console-minimal
8086 (package
8087 (inherit python-jupyter-console)
8088 (name "python-jupyter-console-minimal")
8089 (arguments
8090 (substitute-keyword-arguments
8091 (package-arguments python-jupyter-console)
8092 ((#:phases phases)
8093 `(modify-phases ,phases
8094 (add-after 'install 'delete-bin
8095 (lambda* (#:key outputs #:allow-other-keys)
8096 ;; Delete the bin files, to avoid conflicts in profiles
8097 ;; where python-ipython and python-jupyter-console are
8098 ;; both present.
8099 (delete-file-recursively
8100 (string-append
8101 (assoc-ref outputs "out") "/bin"))))))))
8102 ;; Remove the python-ipython propagated input, to avoid the cycle
8103 (propagated-inputs
8104 (alist-delete
8105 "python-ipython"
8106 (package-propagated-inputs python-jupyter-console)))))
8107
8108 (define-public python-qtconsole
8109 (package
8110 (name "python-qtconsole")
8111 (version "4.4.3")
8112 (source
8113 (origin
8114 (method url-fetch)
8115 (uri (pypi-uri "qtconsole" version))
8116 (sha256
8117 (base32
8118 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
8119 (build-system python-build-system)
8120 (arguments
8121 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
8122 ;; but we only have the LTS version 5.x. This means that there might be
8123 ;; runtime errors, but since this is a dependency of the Jupyter package,
8124 ;; and Jupyter can be used without the qtconsole we can overlook this for
8125 ;; now.
8126 `(#:tests? #f
8127 #:phases
8128 (modify-phases %standard-phases
8129 (add-before 'check 'pre-check
8130 (lambda _
8131 (setenv "QT_QPA_PLATFORM" "offscreen")
8132 #t)))))
8133 (propagated-inputs
8134 `(("python-ipykernel" ,python-ipykernel)
8135 ("python-ipython" ,python-ipython)))
8136 (native-inputs
8137 `(("python-pytest" ,python-pytest)))
8138 (home-page "http://jupyter.org")
8139 (synopsis "Jupyter Qt console")
8140 (description "This package provides a Qt-based console for Jupyter with
8141 support for rich media output.")
8142 (license license:bsd-3)))
8143
8144 (define-public python-jsbeautifier
8145 (package
8146 (name "python-jsbeautifier")
8147 (version "1.10.2")
8148 (home-page "https://github.com/beautify-web/js-beautify")
8149 (source (origin
8150 (method git-fetch)
8151 (uri (git-reference
8152 (url home-page)
8153 (commit (string-append "v" version))))
8154 (file-name (git-file-name name version))
8155 (sha256
8156 (base32
8157 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
8158 (build-system python-build-system)
8159 (arguments
8160 `(#:phases (modify-phases %standard-phases
8161 (add-after 'unpack 'chdir
8162 (lambda _
8163 ;; The upstream Git repository contains all the code,
8164 ;; but this package only builds the python code.
8165 (chdir "python")
8166 #t))
8167 (add-after 'unpack 'patch-python-six-requirements
8168 (lambda _
8169 (substitute* "python/setup.py"
8170 (("six>=1.12.0")
8171 "six>=1.11.0"))
8172 #t)))))
8173 (propagated-inputs
8174 `(("python-editorconfig" ,python-editorconfig)
8175 ("python-six" ,python-six)))
8176 (native-inputs
8177 `(("python-pytest" ,python-pytest)))
8178 (synopsis "JavaScript unobfuscator and beautifier")
8179 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
8180 popular online obfuscators.")
8181 (license license:expat)))
8182
8183 (define-public jupyter
8184 (package
8185 (name "jupyter")
8186 (version "1.0.0")
8187 (source
8188 (origin
8189 (method url-fetch)
8190 (uri (pypi-uri "jupyter" version))
8191 (sha256
8192 (base32
8193 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8194 (build-system python-build-system)
8195 (arguments '(#:tests? #f)) ; there are none.
8196 (propagated-inputs
8197 `(("python-ipykernel" ,python-ipykernel)
8198 ("python-ipywidgets" ,python-ipywidgets)
8199 ("python-jupyter-console" ,python-jupyter-console)
8200 ("python-nbconvert" ,python-nbconvert)
8201 ("python-notebook" ,python-notebook)
8202 ("python-qtconsole" ,python-qtconsole)))
8203 (native-search-paths
8204 (list (search-path-specification
8205 (variable "JUPYTER_PATH")
8206 (files '("share/jupyter")))))
8207 (home-page "https://jupyter.org")
8208 (synopsis "Web application for interactive documents")
8209 (description
8210 "The Jupyter Notebook is a web application that allows you to create and
8211 share documents that contain live code, equations, visualizations and
8212 explanatory text. Uses include: data cleaning and transformation, numerical
8213 simulation, statistical modeling, machine learning and much more.")
8214 (license license:bsd-3)))
8215
8216 (define-public python-chardet
8217 (package
8218 (name "python-chardet")
8219 (version "3.0.4")
8220 (source
8221 (origin
8222 (method url-fetch)
8223 (uri (pypi-uri "chardet" version))
8224 (sha256
8225 (base32
8226 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
8227 (native-inputs
8228 `(("python-hypothesis" ,python-hypothesis)
8229 ("python-pytest" ,python-pytest)
8230 ("python-pytest-runner" ,python-pytest-runner)))
8231 (build-system python-build-system)
8232 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
8233 (arguments `(#:tests? #f))
8234 (home-page "https://github.com/chardet/chardet")
8235 (synopsis "Universal encoding detector for Python 2 and 3")
8236 (description
8237 "This package provides @code{chardet}, a Python module that can
8238 automatically detect a wide range of file encodings.")
8239 (license license:lgpl2.1+)))
8240
8241 (define-public python2-chardet
8242 (package-with-python2 python-chardet))
8243
8244 (define-public python-docopt
8245 (package
8246 (name "python-docopt")
8247 (version "0.6.2")
8248 (source
8249 (origin
8250 (method url-fetch)
8251 ;; The release on PyPI does not include tests.
8252 (uri (string-append
8253 "https://github.com/docopt/docopt/archive/"
8254 version ".tar.gz"))
8255 (file-name (string-append name "-" version ".tar.gz"))
8256 (sha256
8257 (base32
8258 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
8259 (build-system python-build-system)
8260 (native-inputs
8261 `(("python-pytest" ,python-pytest)))
8262 (arguments
8263 `(#:phases
8264 (modify-phases %standard-phases
8265 (replace 'check
8266 (lambda _ (invoke "py.test"))))))
8267 (home-page "http://docopt.org")
8268 (synopsis "Command-line interface description language for Python")
8269 (description "This library allows the user to define a command-line
8270 interface from a program's help message rather than specifying it
8271 programmatically with command-line parsers like @code{getopt} and
8272 @code{argparse}.")
8273 (license license:expat)))
8274
8275 (define-public python2-docopt
8276 (package-with-python2 python-docopt))
8277
8278 (define-public python-pythondialog
8279 (package
8280 (name "python-pythondialog")
8281 (version "3.4.0")
8282 (source
8283 (origin
8284 (method url-fetch)
8285 (uri (pypi-uri "pythondialog" version))
8286 (sha256
8287 (base32
8288 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8289 (build-system python-build-system)
8290 (arguments
8291 `(#:phases
8292 (modify-phases %standard-phases
8293 (add-after 'unpack 'patch-path
8294 (lambda* (#:key inputs #:allow-other-keys)
8295 (let* ((dialog (assoc-ref inputs "dialog")))
8296 ;; Since this library really wants to grovel the search path, we
8297 ;; must hardcode dialog's store path into it.
8298 (substitute* "dialog.py"
8299 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8300 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8301 #t))))
8302 #:tests? #f)) ; no test suite
8303 (propagated-inputs
8304 `(("dialog" ,dialog)))
8305 (home-page "http://pythondialog.sourceforge.net/")
8306 (synopsis "Python interface to the UNIX dialog utility")
8307 (description "A Python wrapper for the dialog utility. Its purpose is to
8308 provide an easy to use, pythonic and comprehensive Python interface to dialog.
8309 This allows one to make simple text-mode user interfaces on Unix-like systems")
8310 (license license:lgpl2.1)
8311 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8312
8313 (define-public python2-pythondialog
8314 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8315 (package
8316 (inherit base)
8317 (version (package-version python-pythondialog))
8318 (source (origin
8319 (method url-fetch)
8320 (uri (pypi-uri "python2-pythondialog" version))
8321 (sha256
8322 (base32
8323 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8324
8325 (define-public python-configobj
8326 (package
8327 (name "python-configobj")
8328 (version "5.0.6")
8329 (source (origin
8330 (method url-fetch)
8331 (uri (pypi-uri "configobj" version))
8332 (sha256
8333 (base32
8334 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8335 ;; Patch setup.py so it looks for python-setuptools, which is
8336 ;; required to parse the keyword 'install_requires' in setup.py.
8337 (patches (search-patches "python-configobj-setuptools.patch"))))
8338 (build-system python-build-system)
8339 (propagated-inputs
8340 `(("python-six" ,python-six)))
8341 (synopsis "Config file reading, writing and validation")
8342 (description "ConfigObj is a simple but powerful config file reader and
8343 writer: an ini file round tripper. Its main feature is that it is very easy to
8344 use, with a straightforward programmer’s interface and a simple syntax for
8345 config files.")
8346 (home-page "https://github.com/DiffSK/configobj")
8347 (license license:bsd-3)))
8348
8349 (define-public python2-configobj
8350 (package-with-python2 python-configobj))
8351
8352 (define-public python-configargparse
8353 (package
8354 (name "python-configargparse")
8355 (version "0.14.0")
8356 (source (origin
8357 (method url-fetch)
8358 (uri (pypi-uri "ConfigArgParse" version))
8359 (sha256
8360 (base32
8361 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
8362 (build-system python-build-system)
8363 (native-inputs
8364 `(("python-pyyaml" ,python-pyyaml)))
8365 (arguments
8366 `(#:phases
8367 (modify-phases %standard-phases
8368 (replace 'check
8369 (lambda _
8370 ;; Bypass setuptools-shim because one test relies on "setup.py"
8371 ;; being the first argument passed to the python call.
8372 ;;
8373 ;; NOTE: Many tests do not run because they rely on Python's
8374 ;; built-in test.test_argparse, but we remove the unit tests from
8375 ;; our Python installation.
8376 (invoke "python" "setup.py" "test"))))))
8377 (synopsis "Replacement for argparse")
8378 (description "A drop-in replacement for argparse that allows options to also
8379 be set via config files and/or environment variables.")
8380 (home-page "https://github.com/bw2/ConfigArgParse")
8381 (license license:expat)))
8382
8383 (define-public python2-configargparse
8384 (package-with-python2 python-configargparse))
8385
8386 (define-public python-argparse-manpage
8387 (package
8388 (name "python-argparse-manpage")
8389 (version "1.1")
8390 (source
8391 (origin
8392 (method url-fetch)
8393 (uri (pypi-uri "argparse-manpage" version))
8394 (sha256
8395 (base32
8396 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8397 (build-system python-build-system)
8398 (home-page "https://github.com/praiskup/argparse-manpage")
8399 (synopsis "Build manual page from Python's ArgumentParser object")
8400 (description
8401 "This package provides tools to build manual pages from Python's
8402 @code{ArgumentParser} object.")
8403 (license license:asl2.0)))
8404
8405 (define-public python-contextlib2
8406 (package
8407 (name "python-contextlib2")
8408 (version "0.5.5")
8409 (source
8410 (origin
8411 (method url-fetch)
8412 (uri (pypi-uri "contextlib2" version))
8413 (sha256
8414 (base32
8415 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8416 (build-system python-build-system)
8417 (home-page "http://contextlib2.readthedocs.org/")
8418 (synopsis "Tools for decorators and context managers")
8419 (description "This module is primarily a backport of the Python
8420 3.2 contextlib to earlier Python versions. Like contextlib, it
8421 provides utilities for common tasks involving decorators and context
8422 managers. It also contains additional features that are not part of
8423 the standard library.")
8424 (license license:psfl)))
8425
8426 (define-public python2-contextlib2
8427 (package
8428 (name "python2-contextlib2")
8429 (version "0.5.5")
8430 (source
8431 (origin
8432 (method url-fetch)
8433 (uri (pypi-uri "contextlib2" version))
8434 (sha256
8435 (base32
8436 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8437 (build-system python-build-system)
8438 (arguments
8439 `(#:python ,python-2
8440 #:phases
8441 (modify-phases %standard-phases
8442 (replace 'check
8443 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
8444 (native-inputs
8445 `(("python2-unittest2" ,python2-unittest2)))
8446 (home-page "http://contextlib2.readthedocs.org/")
8447 (synopsis "Tools for decorators and context managers")
8448 (description "This module is primarily a backport of the Python
8449 3.2 contextlib to earlier Python versions. Like contextlib, it
8450 provides utilities for common tasks involving decorators and context
8451 managers. It also contains additional features that are not part of
8452 the standard library.")
8453 (license license:psfl)))
8454
8455 (define-public python-texttable
8456 (package
8457 (name "python-texttable")
8458 (version "0.9.1")
8459 (source
8460 (origin
8461 (method url-fetch)
8462 (uri (pypi-uri "texttable" version))
8463 (sha256
8464 (base32
8465 "0yawv64c0zbawwv6zz84whb32fnb2n9jylwjcfsrcdgh7xvl340i"))))
8466 (build-system python-build-system)
8467 (arguments '(#:tests? #f)) ; no tests
8468 (home-page "https://github.com/foutaise/texttable/")
8469 (synopsis "Python module for creating simple ASCII tables")
8470 (description "Texttable is a Python module for creating simple ASCII
8471 tables.")
8472 (license license:lgpl2.1+)))
8473
8474 (define-public python2-texttable
8475 (package-with-python2 python-texttable))
8476
8477 (define-public python-atomicwrites
8478 (package
8479 (name "python-atomicwrites")
8480 (version "1.3.0")
8481 (source (origin
8482 (method url-fetch)
8483 (uri (pypi-uri "atomicwrites" version))
8484 (sha256
8485 (base32
8486 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
8487 (build-system python-build-system)
8488 (synopsis "Atomic file writes in Python")
8489 (description "Library for atomic file writes using platform dependent tools
8490 for atomic file system operations.")
8491 (home-page "https://github.com/untitaker/python-atomicwrites")
8492 (license license:expat)))
8493
8494 (define-public python2-atomicwrites
8495 (package-with-python2 python-atomicwrites))
8496
8497 (define-public python-click-threading
8498 (package
8499 (name "python-click-threading")
8500 (version "0.4.4")
8501 (source (origin
8502 (method url-fetch)
8503 (uri (pypi-uri "click-threading" version))
8504 (sha256
8505 (base32
8506 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8507 (build-system python-build-system)
8508 (propagated-inputs
8509 `(("python-click" ,python-click)))
8510 (synopsis "Utilities for multithreading in Click")
8511 (description "This package provides utilities for multithreading in Click
8512 applications.")
8513 (home-page "https://github.com/click-contrib/click-threading")
8514 (license license:expat)))
8515
8516 (define-public python-click-log
8517 (package
8518 (name "python-click-log")
8519 (version "0.3.2")
8520 (source (origin
8521 (method url-fetch)
8522 (uri (pypi-uri "click-log" version))
8523 (sha256
8524 (base32
8525 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8526 (build-system python-build-system)
8527 (propagated-inputs
8528 `(("python-click" ,python-click)))
8529 (synopsis "Logging for click applications")
8530 (description "This package provides a Python library for logging Click
8531 applications.")
8532 (home-page "https://github.com/click-contrib/click-log")
8533 (license license:expat)))
8534
8535 (define-public python-apipkg
8536 (package
8537 (name "python-apipkg")
8538 (version "1.4")
8539 (source (origin
8540 (method url-fetch)
8541 (uri (pypi-uri "apipkg" version))
8542 (sha256
8543 (base32
8544 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8545 (build-system python-build-system)
8546 (native-inputs
8547 `(("python-pytest" ,python-pytest)))
8548 (synopsis "Namespace control and lazy-import mechanism")
8549 (description "With apipkg you can control the exported namespace of a Python
8550 package and greatly reduce the number of imports for your users. It is a small
8551 pure Python module that works on virtually all Python versions.")
8552 (home-page "https://github.com/pytest-dev/apipkg")
8553 (license license:expat)))
8554
8555 (define-public python2-apipkg
8556 (package-with-python2 python-apipkg))
8557
8558 (define-public python-execnet
8559 (package
8560 (name "python-execnet")
8561 (version "1.4.1")
8562 (source (origin
8563 (method url-fetch)
8564 (uri (pypi-uri "execnet" version))
8565 (sha256
8566 (base32
8567 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8568 (build-system python-build-system)
8569 (arguments
8570 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8571 ;; The two test failures are caused by the lack of an `ssh` executable.
8572 ;; The test suite can be run with pytest after the 'install' phase.
8573 #:tests? #f))
8574 (native-inputs
8575 `(("python-pytest" ,python-pytest)
8576 ("python-setuptools-scm" ,python-setuptools-scm)))
8577 (propagated-inputs
8578 `(("python-apipkg" ,python-apipkg)))
8579 (synopsis "Rapid multi-Python deployment")
8580 (description "Execnet provides a share-nothing model with
8581 channel-send/receive communication for distributing execution across many
8582 Python interpreters across version, platform and network barriers. It has a
8583 minimal and fast API targeting the following uses:
8584 @enumerate
8585 @item distribute tasks to (many) local or remote CPUs
8586 @item write and deploy hybrid multi-process applications
8587 @item write scripts to administer multiple environments
8588 @end enumerate")
8589 (home-page "http://codespeak.net/execnet/")
8590 (license license:expat)))
8591
8592 (define-public python2-execnet
8593 (package-with-python2 python-execnet))
8594
8595 (define-public python-icalendar
8596 (package
8597 (name "python-icalendar")
8598 (version "4.0.3")
8599 (source (origin
8600 (method url-fetch)
8601 (uri (pypi-uri "icalendar" version))
8602 (sha256
8603 (base32
8604 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
8605 (build-system python-build-system)
8606 (propagated-inputs
8607 `(("python-dateutil" ,python-dateutil)
8608 ("python-pytz" ,python-pytz)))
8609 (synopsis "Python library for parsing iCalendar files")
8610 (description "The icalendar package is a parser/generator of iCalendar
8611 files for use with Python.")
8612 (home-page "https://github.com/collective/icalendar")
8613 (license license:bsd-2)))
8614
8615 (define-public python-args
8616 (package
8617 (name "python-args")
8618 (version "0.1.0")
8619 (source (origin
8620 (method url-fetch)
8621 (uri (pypi-uri "args" version))
8622 (sha256
8623 (base32
8624 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8625 (build-system python-build-system)
8626 (home-page "https://github.com/kennethreitz/args")
8627 (synopsis "Command-line argument parser")
8628 (description
8629 "This library provides a Python module to parse command-line arguments.")
8630 (license license:bsd-3)))
8631
8632 (define-public python2-args
8633 (package-with-python2 python-args))
8634
8635 (define-public python-clint
8636 (package
8637 (name "python-clint")
8638 (version "0.5.1")
8639 (source (origin
8640 (method url-fetch)
8641 (uri (pypi-uri "clint" version))
8642 (sha256
8643 (base32
8644 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8645 (build-system python-build-system)
8646 (arguments
8647 '(#:phases
8648 (modify-phases %standard-phases
8649 (replace 'check
8650 (lambda _ (invoke "py.test" "-v"))))))
8651 (native-inputs
8652 `(("python-pytest" ,python-pytest)))
8653 (propagated-inputs
8654 `(("python-args" ,python-args)))
8655 (home-page "https://github.com/kennethreitz/clint")
8656 (synopsis "Command-line interface tools")
8657 (description
8658 "Clint is a Python module filled with a set of tools for developing
8659 command-line applications, including tools for colored and indented
8660 output, progress bar display, and pipes.")
8661 (license license:isc)))
8662
8663 (define-public python2-clint
8664 (package-with-python2 python-clint))
8665
8666 (define-public python-rply
8667 (package
8668 (name "python-rply")
8669 (version "0.7.5")
8670 (source (origin
8671 (method url-fetch)
8672 (uri (pypi-uri "rply" version))
8673 (sha256
8674 (base32
8675 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8676 (build-system python-build-system)
8677 (propagated-inputs
8678 `(("python-appdirs" ,python-appdirs)))
8679 (home-page "https://github.com/alex/rply")
8680 (synopsis "Parser generator for Python")
8681 (description
8682 "This package provides a pure Python based parser generator, that also
8683 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8684 with a new public API, and RPython support.")
8685 (license license:bsd-3)))
8686
8687 (define-public python2-rply
8688 (package-with-python2 python-rply))
8689
8690 (define-public python-hy
8691 (package
8692 (name "python-hy")
8693 (version "0.13.0")
8694 (source (origin
8695 (method url-fetch)
8696 (uri (pypi-uri "hy" version))
8697 (sha256
8698 (base32
8699 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
8700 (build-system python-build-system)
8701 (arguments
8702 '(#:phases
8703 (modify-phases %standard-phases
8704 (replace 'check
8705 (lambda _
8706 ;; Tests require write access to HOME.
8707 (setenv "HOME" "/tmp")
8708 (invoke "nosetests"))))))
8709 (native-inputs
8710 `(("python-coverage" ,python-coverage)
8711 ("python-nose" ,python-nose)))
8712 (propagated-inputs
8713 `(("python-astor" ,python-astor)
8714 ("python-clint" ,python-clint)
8715 ("python-rply" ,python-rply)))
8716 (home-page "http://hylang.org/")
8717 (synopsis "Lisp frontend to Python")
8718 (description
8719 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8720 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8721 Python at your fingertips, in Lisp form.")
8722 (license license:expat)))
8723
8724 (define-public python2-hy
8725 (package-with-python2 python-hy))
8726
8727 (define-public python2-functools32
8728 (package
8729 (name "python2-functools32")
8730 (version "3.2.3-2")
8731 (source
8732 (origin
8733 (method url-fetch)
8734 (uri (pypi-uri "functools32" version))
8735 (sha256
8736 (base32
8737 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8738 (build-system python-build-system)
8739 (arguments
8740 `(#:python ,python-2
8741 #:tests? #f)) ; no test target
8742 (home-page "https://github.com/MiCHiLU/python-functools32")
8743 (synopsis
8744 "Backport of the functools module from Python 3.2.3")
8745 (description
8746 "This package is a backport of the @code{functools} module from Python
8747 3.2.3 for use with older versions of Python and PyPy.")
8748 (license license:expat)))
8749
8750 (define-public python2-subprocess32
8751 (package
8752 (name "python2-subprocess32")
8753 (version "3.2.7")
8754 (source (origin
8755 (method url-fetch)
8756 (uri (pypi-uri "subprocess32" version))
8757 (sha256
8758 (base32
8759 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8760 (patches
8761 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8762 (build-system python-build-system)
8763 (arguments
8764 `(#:python ,python-2
8765 ;; The test suite fails with Python > 2.7.13:
8766 ;; import test.support
8767 ;; ImportError: No module named support
8768 #:tests? #f
8769 #:phases
8770 (modify-phases %standard-phases
8771 (add-after 'unpack 'patch-/bin/sh
8772 (lambda _
8773 (substitute* '("subprocess32.py"
8774 "test_subprocess32.py")
8775 (("/bin/sh") (which "sh")))
8776 #t)))))
8777 (home-page "https://github.com/google/python-subprocess32")
8778 (synopsis "Backport of the subprocess module from Python 3.2")
8779 (description
8780 "This is a backport of the @code{subprocess} standard library module
8781 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8782 new features. On POSIX systems it is guaranteed to be reliable when used
8783 in threaded applications. It includes timeout support from Python 3.3 but
8784 otherwise matches 3.2’s API.")
8785 (license license:psfl)))
8786
8787 (define-public python2-futures
8788 (package
8789 (name "python2-futures")
8790 (version "3.2.0")
8791 (source
8792 (origin
8793 (method url-fetch)
8794 (uri (pypi-uri "futures" version))
8795 (sha256
8796 (base32
8797 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8798 (build-system python-build-system)
8799 (arguments
8800 `(#:python ,python-2
8801 #:phases
8802 (modify-phases %standard-phases
8803 (replace 'check
8804 (lambda _
8805 (invoke "python" "test_futures.py")
8806 #t)))))
8807 (home-page "https://github.com/agronholm/pythonfutures")
8808 (synopsis
8809 "Backport of the concurrent.futures package from Python 3.2")
8810 (description
8811 "The concurrent.futures module provides a high-level interface for
8812 asynchronously executing callables. This package backports the
8813 concurrent.futures package from Python 3.2")
8814 (license license:bsd-3)))
8815
8816 (define-public python-promise
8817 (package
8818 (name "python-promise")
8819 (version "0.4.2")
8820 (source
8821 (origin
8822 (method url-fetch)
8823 (uri (pypi-uri "promise" version))
8824 (sha256
8825 (base32
8826 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8827 (build-system python-build-system)
8828 ;; Tests wants python-futures, which is a python2 only program, and
8829 ;; can't be found by python-promise at test time.
8830 (arguments `(#:tests? #f))
8831 (home-page "https://github.com/syrusakbary/promise")
8832 (synopsis "Promises/A+ implementation for Python")
8833 (description
8834 "Promises/A+ implementation for Python")
8835 (properties `((python2-variant . ,(delay python2-promise))))
8836 (license license:expat)))
8837
8838 (define-public python2-promise
8839 (let ((promise (package-with-python2
8840 (strip-python2-variant python-promise))))
8841 (package (inherit promise)
8842 (arguments (substitute-keyword-arguments (package-arguments promise)
8843 ((#:tests? _) #t)))
8844 (native-inputs
8845 `(("python2-futures" ,python2-futures)
8846 ("python2-pytest" ,python2-pytest)
8847 ,@(package-native-inputs promise))))))
8848
8849 (define-public python-progressbar33
8850 (package
8851 (name "python-progressbar33")
8852 (version "2.4")
8853 (source
8854 (origin
8855 (method url-fetch)
8856 (uri (pypi-uri "progressbar33" version))
8857 (sha256
8858 (base32
8859 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
8860 (build-system python-build-system)
8861 (home-page "http://github.com/germangh/python-progressbar")
8862 (synopsis "Text progress bar library for Python")
8863 (description
8864 "This package provides a text progress bar library for Python. This
8865 version only differs from the original @code{progressbar} package in that it
8866 uses relative package imports instead of absolute imports, which is necessary
8867 for the module to work under Python 3.3.")
8868 ;; Either or both of these licenses may be selected.
8869 (license (list license:lgpl2.1+ license:bsd-3))))
8870
8871 (define-public python-colorama
8872 (package
8873 (name "python-colorama")
8874 (version "0.3.9")
8875 (source
8876 (origin
8877 (method url-fetch)
8878 (uri (pypi-uri "colorama" version))
8879 (sha256
8880 (base32
8881 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
8882 (build-system python-build-system)
8883 (synopsis "Colored terminal text rendering for Python")
8884 (description "Colorama is a Python library for rendering colored terminal
8885 text.")
8886 (home-page "https://pypi.python.org/pypi/colorama")
8887 (license license:bsd-3)))
8888
8889 (define-public python2-colorama
8890 (package-with-python2 python-colorama))
8891
8892 (define-public python-rsa
8893 (package
8894 (name "python-rsa")
8895 (version "3.4.2")
8896 (source
8897 (origin
8898 (method url-fetch)
8899 (uri (pypi-uri "rsa" version))
8900 (sha256
8901 (base32
8902 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8903 (build-system python-build-system)
8904 (propagated-inputs
8905 `(("python-pyasn1" ,python-pyasn1)))
8906 (synopsis "Pure-Python RSA implementation")
8907 (description "Python-RSA is a pure-Python RSA implementation. It supports
8908 encryption and decryption, signing and verifying signatures, and key
8909 generation according to PKCS#1 version 1.5. It can be used as a Python
8910 library as well as on the command line.")
8911 (home-page "https://stuvel.eu/rsa")
8912 (license license:asl2.0)))
8913
8914 (define-public python2-rsa
8915 (package-with-python2 python-rsa))
8916
8917 (define-public python-pluggy
8918 (package
8919 (name "python-pluggy")
8920 (version "0.11.0")
8921 (source
8922 (origin
8923 (method url-fetch)
8924 (uri (pypi-uri "pluggy" version))
8925 (sha256
8926 (base32
8927 "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895"))))
8928 (build-system python-build-system)
8929 (native-inputs
8930 `(("python-setuptools-scm" ,python-setuptools-scm)))
8931 (synopsis "Plugin and hook calling mechanism for Python")
8932 (description "Pluggy is an extraction of the plugin manager as used by
8933 Pytest but stripped of Pytest specific details.")
8934 (home-page "https://pypi.python.org/pypi/pluggy")
8935 (license license:expat)))
8936
8937 (define-public python2-pluggy
8938 (package-with-python2 python-pluggy))
8939
8940 (define-public python-tox
8941 (package
8942 (name "python-tox")
8943 (version "2.8.1")
8944 (source
8945 (origin
8946 (method url-fetch)
8947 (uri (pypi-uri "tox" version))
8948 (sha256
8949 (base32
8950 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8951 (build-system python-build-system)
8952 (arguments
8953 ;; FIXME: Tests require pytest-timeout, which itself requires
8954 ;; pytest>=2.8.0 for installation.
8955 '(#:tests? #f))
8956 (propagated-inputs
8957 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8958 ("python-py" ,python-py)
8959 ("python-virtualenv" ,python-virtualenv)))
8960 (native-inputs
8961 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8962 ("python-pytest" ,python-pytest) ; >= 2.3.5
8963 ("python-setuptools-scm" ,python-setuptools-scm)))
8964 (home-page "http://tox.testrun.org/")
8965 (synopsis "Virtualenv-based automation of test activities")
8966 (description "Tox is a generic virtualenv management and test command line
8967 tool. It can be used to check that a package installs correctly with
8968 different Python versions and interpreters, or run tests in each type of
8969 supported environment, or act as a frontend to continuous integration
8970 servers.")
8971 (license license:expat)))
8972
8973 (define-public python2-tox
8974 (package-with-python2 python-tox))
8975
8976 (define-public python-jmespath
8977 (package
8978 (name "python-jmespath")
8979 (version "0.9.3")
8980 (source
8981 (origin
8982 (method url-fetch)
8983 (uri (pypi-uri "jmespath" version))
8984 (sha256
8985 (base32
8986 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
8987 (build-system python-build-system)
8988 (native-inputs
8989 `(("python-nose" ,python-nose)))
8990 (synopsis "JSON Matching Expressions")
8991 (description "JMESPath (pronounced “james path”) is a Python library that
8992 allows one to declaratively specify how to extract elements from a JSON
8993 document.")
8994 (home-page "https://github.com/jmespath/jmespath.py")
8995 (license license:expat)))
8996
8997 (define-public python2-jmespath
8998 (package-with-python2 python-jmespath))
8999
9000 (define-public python-botocore
9001 (package
9002 (name "python-botocore")
9003 (version "1.12.149")
9004 (source
9005 (origin
9006 (method url-fetch)
9007 (uri (pypi-uri "botocore" version))
9008 (sha256
9009 (base32
9010 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
9011 (build-system python-build-system)
9012 (arguments
9013 ;; FIXME: Many tests are failing.
9014 '(#:tests? #f))
9015 (propagated-inputs
9016 `(("python-dateutil" ,python-dateutil)
9017 ("python-docutils" ,python-docutils)
9018 ("python-jmespath" ,python-jmespath)))
9019 (native-inputs
9020 `(("python-mock" ,python-mock)
9021 ("python-nose" ,python-nose)
9022 ("behave" ,behave)
9023 ("python-tox" ,python-tox)
9024 ("python-urllib3" ,python-urllib3)
9025 ("python-wheel" ,python-wheel)))
9026 (home-page "https://github.com/boto/botocore")
9027 (synopsis "Low-level interface to AWS")
9028 (description "Botocore is a Python library that provides a low-level
9029 interface to the Amazon Web Services (AWS) API.")
9030 (license license:asl2.0)))
9031
9032 (define-public python2-botocore
9033 (package-with-python2 python-botocore))
9034
9035 (define-public python-xdo
9036 (package
9037 (name "python-xdo")
9038 (version "0.3")
9039 (source (origin
9040 (method url-fetch)
9041 (uri (string-append
9042 "http://http.debian.net/debian/pool/main/p/python-xdo/"
9043 "python-xdo_" version ".orig.tar.gz"))
9044 (sha256
9045 (base32
9046 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
9047 (build-system python-build-system)
9048 (arguments
9049 '(#:phases
9050 (modify-phases %standard-phases
9051 (add-before 'install 'patch-libxdo-path
9052 ;; Hardcode the path of dynamically loaded libxdo library.
9053 (lambda* (#:key inputs #:allow-other-keys)
9054 (let ((libxdo (string-append
9055 (assoc-ref inputs "xdotool")
9056 "/lib/libxdo.so")))
9057 (substitute* "xdo/_xdo.py"
9058 (("find_library\\(\"xdo\"\\)")
9059 (simple-format #f "\"~a\"" libxdo)))
9060 #t))))
9061 #:tests? #f)) ; no tests provided
9062 (propagated-inputs
9063 `(("python-six" ,python-six)))
9064 (inputs
9065 `(("xdotool" ,xdotool)
9066 ("libX11" ,libx11)))
9067 (home-page "https://tracker.debian.org/pkg/python-xdo")
9068 (synopsis "Python library for simulating X11 keyboard/mouse input")
9069 (description "Provides bindings to libxdo for manipulating X11 via simulated
9070 input. (Note that this is mostly a legacy library; you may wish to look at
9071 python-xdo for newer bindings.)")
9072 (license license:bsd-3)))
9073
9074 (define-public python2-xdo
9075 (package-with-python2 python-xdo))
9076
9077 (define-public python-mako
9078 (package
9079 (name "python-mako")
9080 (version "1.1.0")
9081 (source
9082 (origin
9083 (method url-fetch)
9084 (uri (pypi-uri "Mako" version))
9085 (sha256
9086 (base32
9087 "0jqa3qfpykyn4fmkn0kh6043sfls7br8i2bsdbccazcvk9cijsd3"))))
9088 (build-system python-build-system)
9089 (arguments
9090 `(#:phases (modify-phases %standard-phases
9091 (replace 'check
9092 (lambda _
9093 (invoke "pytest" "-vv"))))))
9094 (propagated-inputs
9095 `(("python-markupsafe" ,python-markupsafe)))
9096 (native-inputs
9097 `(("python-mock" ,python-mock)
9098 ("python-pytest" ,python-pytest)))
9099 (home-page "https://www.makotemplates.org/")
9100 (synopsis "Templating language for Python")
9101 (description "Mako is a templating language for Python that compiles
9102 templates into Python modules.")
9103 (license license:expat)))
9104
9105 (define-public python2-mako
9106 (package-with-python2 python-mako))
9107
9108 (define-public python-waitress
9109 (package
9110 (name "python-waitress")
9111 (version "1.1.0")
9112 (source
9113 (origin
9114 (method url-fetch)
9115 (uri (pypi-uri "waitress" version))
9116 (patches (search-patches "python-waitress-fix-tests.patch"))
9117 (sha256
9118 (base32
9119 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
9120 (build-system python-build-system)
9121 (home-page "https://github.com/Pylons/waitress")
9122 (synopsis "Waitress WSGI server")
9123 (description "Waitress is meant to be a production-quality pure-Python WSGI
9124 server with very acceptable performance.")
9125 (license license:zpl2.1)))
9126
9127 (define-public python2-waitress
9128 (package-with-python2 python-waitress))
9129
9130 (define-public python-whichcraft
9131 (package
9132 (name "python-whichcraft")
9133 (version "0.6.1")
9134 (source
9135 (origin
9136 (method url-fetch)
9137 (uri (pypi-uri "whichcraft" version))
9138 (sha256
9139 (base32
9140 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
9141 (build-system python-build-system)
9142 (native-inputs
9143 `(("python-pytest" ,python-pytest)))
9144 (home-page "https://github.com/pydanny/whichcraft")
9145 (synopsis "Cross-platform cross-python shutil.which functionality")
9146 (description
9147 "This package provides a shim of the shutil.which function that's
9148 designed to work across multiple versions of Python.")
9149 (license license:bsd-3)))
9150
9151 (define-public python-cookiecutter
9152 (package
9153 (name "python-cookiecutter")
9154 (version "1.6.0")
9155 (source
9156 (origin
9157 (method url-fetch)
9158 (uri (pypi-uri "cookiecutter" version))
9159 (sha256
9160 (base32
9161 "0glsvaz8igi2wy1hsnhm9fkn6560vdvdixzvkq6dn20z3hpaa5hk"))))
9162 (build-system python-build-system)
9163 (native-inputs
9164 `(("python-freezegun" ,python-freezegun)
9165 ("python-pytest" ,python-pytest)
9166 ("python-pytest-catchlog" ,python-pytest-catchlog)
9167 ("python-pytest-cov" ,python-pytest-cov)
9168 ("python-pytest-mock" ,python-pytest-mock)))
9169 (propagated-inputs
9170 `(("python-binaryornot" ,python-binaryornot)
9171 ("python-click" ,python-click)
9172 ("python-future" ,python-future)
9173 ("python-jinja2" ,python-jinja2)
9174 ("python-jinja2-time" ,python-jinja2-time)
9175 ("python-poyo" ,python-poyo)
9176 ("python-requests" ,python-requests)
9177 ("python-whichcraft" ,python-whichcraft)))
9178 (home-page "https://github.com/audreyr/cookiecutter")
9179 (synopsis
9180 "Command-line utility that creates projects from project templates")
9181 (description
9182 "This package provides a command-line utility that creates projects from
9183 project templates, e.g. creating a Python package project from a Python package
9184 project template.")
9185 (license license:bsd-3)))
9186
9187 (define-public python-pyquery
9188 (package
9189 (name "python-pyquery")
9190 (version "1.2.17")
9191 (source
9192 (origin
9193 (method url-fetch)
9194 (uri (pypi-uri "pyquery" version))
9195 (sha256
9196 (base32
9197 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9198 (build-system python-build-system)
9199 (native-inputs
9200 `(("python-webob" ,python-webob)
9201 ("python-webtest" ,python-webtest)))
9202 (propagated-inputs
9203 `(("python-lxml" ,python-lxml)
9204 ("python-cssselect" ,python-cssselect)))
9205 (home-page "https://github.com/gawel/pyquery")
9206 (synopsis "Make jQuery-like queries on xml documents")
9207 (description "pyquery allows you to make jQuery queries on xml documents.
9208 The API is as much as possible the similar to jQuery. pyquery uses lxml for
9209 fast xml and html manipulation.")
9210 (license license:bsd-3)))
9211
9212 (define-public python-anyjson
9213 (package
9214 (name "python-anyjson")
9215 (version "0.3.3")
9216 (source
9217 (origin
9218 (method url-fetch)
9219 (uri (pypi-uri "anyjson" version))
9220 (sha256
9221 (base32
9222 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9223 (build-system python-build-system)
9224 (arguments
9225 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9226 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9227 ;; whatever) so this transformation needs to be done before the tests
9228 ;; can be run. Maybe we could add a build step to transform beforehand
9229 ;; but it could be annoying/difficult.
9230 ;; We can enable tests for the Python 2 version, though, and do below.
9231 #:tests? #f))
9232 (home-page "https://bitbucket.org/runeh/anyjson/")
9233 (synopsis
9234 "Wraps best available JSON implementation in a common interface")
9235 (description
9236 "Anyjson loads whichever is the fastest JSON module installed
9237 and provides a uniform API regardless of which JSON implementation is used.")
9238 (license license:bsd-3)
9239 (properties `((python2-variant . ,(delay python2-anyjson))))))
9240
9241 (define-public python2-anyjson
9242 (let ((anyjson (package-with-python2
9243 (strip-python2-variant python-anyjson))))
9244 (package
9245 (inherit anyjson)
9246 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9247 #:tests? #t
9248 ,@(package-arguments anyjson)))
9249 (native-inputs `(("python2-nose" ,python2-nose))))))
9250
9251 (define-public python-amqp
9252 (package
9253 (name "python-amqp")
9254 (version "2.3.2")
9255 (source
9256 (origin
9257 (method url-fetch)
9258 (uri (pypi-uri "amqp" version))
9259 (sha256
9260 (base32
9261 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
9262 (build-system python-build-system)
9263 (native-inputs
9264 `(("python-case" ,python-case)
9265 ("python-pytest-sugar" ,python-pytest-sugar)
9266 ("python-mock" ,python-mock)))
9267 (propagated-inputs
9268 `(("python-vine" ,python-vine)))
9269 (home-page "https://github.com/celery/py-amqp")
9270 (synopsis
9271 "Low-level AMQP client for Python (fork of amqplib)")
9272 (description
9273 "This is a fork of amqplib which was originally written by Barry Pederson.
9274 It is maintained by the Celery project, and used by kombu as a pure python
9275 alternative when librabbitmq is not available.")
9276 (license license:lgpl2.1+)
9277 (properties `((python2-variant . ,(delay python2-amqp))))))
9278
9279 (define-public python2-amqp
9280 (let ((amqp (package-with-python2
9281 (strip-python2-variant python-amqp))))
9282 (package
9283 (inherit amqp)
9284 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9285 ;; unmaintained. Weirdly, does not do this on the python 3
9286 ;; version?
9287 #:tests? #f
9288 ,@(package-arguments amqp))))))
9289
9290 (define-public python-txamqp
9291 (package
9292 (name "python-txamqp")
9293 (version "0.8.2")
9294 (source
9295 (origin
9296 (method url-fetch)
9297 (uri (pypi-uri "txAMQP" version))
9298 (sha256
9299 (base32
9300 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
9301 (build-system python-build-system)
9302 (propagated-inputs
9303 `(("python-six" ,python-six)
9304 ("python-twisted" ,python-twisted)))
9305 (home-page "https://github.com/txamqp/txamqp")
9306 (synopsis "Communicate with AMQP peers and brokers using Twisted")
9307 (description
9308 "This package provides a Python library for communicating with AMQP peers
9309 and brokers using the asynchronous networking framework Twisted. It contains
9310 all the necessary code to connect, send and receive messages to/from an
9311 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
9312 also includes support for using Thrift RPC over AMQP in Twisted
9313 applications.")
9314 (license license:asl2.0)))
9315
9316 (define-public python2-txamqp
9317 (package-with-python2 python-txamqp))
9318
9319 (define-public python-kombu
9320 (package
9321 (name "python-kombu")
9322 (version "4.2.2")
9323 (source
9324 (origin
9325 (method url-fetch)
9326 (uri (pypi-uri "kombu" version))
9327 (sha256
9328 (base32
9329 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
9330 (build-system python-build-system)
9331 (native-inputs
9332 `(("python-mock" ,python-mock)
9333 ("python-case" ,python-case)
9334 ("python-pyro4" ,python-pyro4)
9335 ("python-pytest-sugar" ,python-pytest-sugar)
9336 ("python-pytz" ,python-pytz)))
9337 (propagated-inputs
9338 `(("python-anyjson" ,python-anyjson)
9339 ("python-amqp" ,python-amqp)
9340 ("python-redis" ,python-redis)))
9341 (home-page "https://kombu.readthedocs.io")
9342 (synopsis "Message passing library for Python")
9343 (description "The aim of Kombu is to make messaging in Python as easy as
9344 possible by providing an idiomatic high-level interface for the AMQ protocol,
9345 and also provide proven and tested solutions to common messaging problems.
9346 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9347 message orientation, queuing, routing, reliability and security, for which the
9348 RabbitMQ messaging server is the most popular implementation.")
9349 (license license:bsd-3)
9350 (properties `((python2-variant . ,(delay python2-kombu))))))
9351
9352 (define-public python2-kombu
9353 (let ((kombu (package-with-python2
9354 (strip-python2-variant python-kombu))))
9355 (package
9356 (inherit kombu)
9357 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9358 ;; It works fine on the python3 variant.
9359 #:tests? #f
9360 ,@(package-arguments kombu)))
9361 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9362 ,@(package-native-inputs kombu))))))
9363
9364 (define-public python-billiard
9365 (package
9366 (name "python-billiard")
9367 (version "3.5.0.5")
9368 (source
9369 (origin
9370 (method url-fetch)
9371 (uri (pypi-uri "billiard" version))
9372 (sha256
9373 (base32
9374 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9375 (build-system python-build-system)
9376 (native-inputs
9377 `(("python-case" ,python-case)
9378 ("python-pytest" ,python-pytest)))
9379 (home-page "https://github.com/celery/billiard")
9380 (synopsis
9381 "Python multiprocessing fork with improvements and bugfixes")
9382 (description
9383 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9384 multiprocessing package itself is a renamed and updated version of R Oudkerk's
9385 pyprocessing package. This standalone variant is intended to be compatible with
9386 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9387 (license license:bsd-3)
9388 (properties `((python2-variant . ,(delay python2-billiard))))))
9389
9390 (define-public python2-billiard
9391 (let ((billiard (package-with-python2
9392 (strip-python2-variant python-billiard))))
9393 (package
9394 (inherit billiard)
9395 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9396 ("python2-mock" ,python2-mock)
9397 ,@(package-native-inputs billiard))))))
9398
9399 (define-public python-celery
9400 (package
9401 (name "python-celery")
9402 (version "4.2.1")
9403 (source
9404 (origin
9405 (method url-fetch)
9406 (uri (pypi-uri "celery" version))
9407 (sha256
9408 (base32
9409 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9410 (build-system python-build-system)
9411 (arguments
9412 '(;; TODO The tests fail with Python 3.7
9413 ;; https://github.com/celery/celery/issues/4849
9414 #:tests? #f
9415 #:phases
9416 (modify-phases %standard-phases
9417 (add-after 'unpack 'patch-requirements
9418 (lambda _
9419 (substitute* "requirements/test.txt"
9420 (("pytest>=3\\.0,<3\\.3")
9421 "pytest>=3.0"))
9422 #t)))))
9423 (native-inputs
9424 `(("python-case" ,python-case)
9425 ("python-pytest" ,python-pytest)))
9426 (propagated-inputs
9427 `(("python-pytz" ,python-pytz)
9428 ("python-billiard" ,python-billiard)
9429 ("python-kombu" ,python-kombu)))
9430 (home-page "https://celeryproject.org")
9431 (synopsis "Distributed Task Queue")
9432 (description "Celery is an asynchronous task queue/job queue based on
9433 distributed message passing. It is focused on real-time operation, but
9434 supports scheduling as well. The execution units, called tasks, are executed
9435 concurrently on a single or more worker servers using multiprocessing,
9436 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9437 synchronously (wait until ready).")
9438 (license license:bsd-3)
9439 (properties `((python2-variant . ,(delay python2-celery))))))
9440
9441 (define-public python2-celery
9442 (let ((celery (package-with-python2
9443 (strip-python2-variant python-celery))))
9444 (package
9445 (inherit celery)
9446 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9447 ("python2-mock" ,python2-mock)
9448 ,@(package-native-inputs celery))))))
9449
9450 (define-public python-translitcodec
9451 (package
9452 (name "python-translitcodec")
9453 (version "0.4.0")
9454 (source
9455 (origin
9456 (method url-fetch)
9457 (uri (pypi-uri "translitcodec" version))
9458 (sha256
9459 (base32
9460 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9461 (build-system python-build-system)
9462 (arguments
9463 `(#:tests? #f)) ; no tests provided
9464 (home-page
9465 "https://github.com/claudep/translitcodec")
9466 (synopsis
9467 "Unicode to 8-bit charset transliteration codec")
9468 (description
9469 "This package contains codecs for transliterating ISO 10646 texts into
9470 best-effort representations using smaller coded character sets (ASCII,
9471 ISO 8859, etc.).")
9472 (license license:expat)))
9473
9474 (define-public python2-translitcodec
9475 (package-with-python2 python-translitcodec))
9476
9477 (define-public python-editor
9478 (package
9479 (name "python-editor")
9480 (version "0.5")
9481 (source
9482 (origin
9483 (method url-fetch)
9484 (uri (pypi-uri "python-editor" version))
9485 (sha256
9486 (base32
9487 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9488 (build-system python-build-system)
9489 (home-page
9490 "https://github.com/fmoo/python-editor")
9491 (synopsis
9492 "Programmatically open an editor, capture the result")
9493 (description
9494 "python-editor is a library that provides the editor module for
9495 programmatically interfacing with your system's $EDITOR.")
9496 (license license:asl2.0)))
9497
9498 (define-public python2-editor
9499 (package-with-python2 python-editor))
9500
9501 (define-public python-vobject
9502 (package
9503 (name "python-vobject")
9504 (version "0.9.5")
9505 (source (origin
9506 (method url-fetch)
9507 (uri (pypi-uri "vobject" version))
9508 (sha256
9509 (base32
9510 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9511 (build-system python-build-system)
9512 (arguments
9513 '(;; The test suite relies on some non-portable Windows interfaces.
9514 #:tests? #f))
9515 (propagated-inputs
9516 `(("python-dateutil" ,python-dateutil)
9517 ("python-pyicu" ,python-pyicu)))
9518 (synopsis "Parse and generate vCard and vCalendar files")
9519 (description "Vobject is intended to be a full featured Python package for
9520 parsing and generating vCard and vCalendar files. Currently, iCalendar files
9521 are supported and well tested. vCard 3.0 files are supported, and all data
9522 should be imported, but only a few components are understood in a sophisticated
9523 way.")
9524 (home-page "http://eventable.github.io/vobject/")
9525 (license license:asl2.0)))
9526
9527 (define-public python2-vobject
9528 (package-with-python2 python-vobject))
9529
9530 (define-public python-munkres
9531 (package
9532 (name "python-munkres")
9533 (version "1.0.8")
9534 (source (origin
9535 (method url-fetch)
9536 (uri (pypi-uri "munkres" version))
9537 (sha256
9538 (base32
9539 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9540 (build-system python-build-system)
9541 (arguments
9542 '(#:tests? #f)) ; no test suite
9543 (home-page "http://software.clapper.org/munkres/")
9544 (synopsis "Implementation of the Munkres algorithm")
9545 (description "The Munkres module provides an implementation of the Munkres
9546 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9547 useful for solving the Assignment Problem.")
9548 (license license:bsd-3)))
9549
9550 (define-public python2-munkres
9551 (package-with-python2 python-munkres))
9552
9553 (define-public python-whoosh
9554 (package
9555 (name "python-whoosh")
9556 (version "2.7.4")
9557 (source
9558 (origin
9559 (method url-fetch)
9560 (uri (pypi-uri "Whoosh" version))
9561 (sha256
9562 (base32
9563 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9564 (build-system python-build-system)
9565 (native-inputs
9566 `(("python-pytest" ,python-pytest)))
9567 (home-page "https://bitbucket.org/mchaput/whoosh")
9568 (synopsis "Full text indexing, search, and spell checking library")
9569 (description
9570 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9571 checking library.")
9572 (license license:bsd-2)))
9573
9574 (define-public python2-whoosh
9575 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9576 (package (inherit whoosh)
9577 (propagated-inputs
9578 `(("python2-backport-ssl-match-hostname"
9579 ,python2-backport-ssl-match-hostname)
9580 ,@(package-propagated-inputs whoosh))))))
9581
9582 (define-public python-pathlib
9583 (package
9584 (name "python-pathlib")
9585 (version "1.0.1")
9586 (source (origin
9587 (method url-fetch)
9588 (uri (pypi-uri "pathlib" version))
9589 (sha256
9590 (base32
9591 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9592 (build-system python-build-system)
9593 ;; The tests depend on the internal "test" module, which does not provide
9594 ;; a stable interface.
9595 (arguments `(#:tests? #f))
9596 (home-page "https://pathlib.readthedocs.org/")
9597 (synopsis "Object-oriented file system paths")
9598 (description "Pathlib offers a set of classes to handle file system paths.
9599 It offers the following advantages over using string objects:
9600
9601 @enumerate
9602 @item No more cumbersome use of os and os.path functions. Everything can
9603 be done easily through operators, attribute accesses, and method calls.
9604 @item Embodies the semantics of different path types. For example,
9605 comparing Windows paths ignores casing.
9606 @item Well-defined semantics, eliminating any inconsistencies or
9607 ambiguities (forward vs. backward slashes, etc.).
9608 @end enumerate
9609
9610 Note: In Python 3.4, pathlib is now part of the standard library. For other
9611 Python versions please consider python-pathlib2 instead, which tracks the
9612 standard library module. This module (python-pathlib) isn't maintained
9613 anymore.")
9614 (license license:expat)))
9615
9616 (define-public python2-pathlib
9617 (package-with-python2 python-pathlib))
9618
9619 (define-public python2-pathlib2
9620 (package
9621 (name "python2-pathlib2")
9622 (version "2.3.3")
9623 (source (origin
9624 (method url-fetch)
9625 (uri (pypi-uri "pathlib2" version))
9626 (sha256
9627 (base32
9628 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
9629 (build-system python-build-system)
9630 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9631 ;; version is 3.4 which already includes this package as part of the
9632 ;; standard library.
9633 (arguments
9634 `(#:python ,python-2))
9635 (propagated-inputs
9636 `(("python2-scandir" ,python2-scandir)
9637 ("python2-six" ,python2-six)))
9638 (home-page "https://pypi.python.org/pypi/pathlib2/")
9639 (synopsis "Object-oriented file system paths - backport of standard
9640 pathlib module")
9641 (description "The goal of pathlib2 is to provide a backport of standard
9642 pathlib module which tracks the standard library module, so all the newest
9643 features of the standard pathlib can be used also on older Python versions.
9644
9645 Pathlib offers a set of classes to handle file system paths. It offers the
9646 following advantages over using string objects:
9647
9648 @enumerate
9649 @item No more cumbersome use of os and os.path functions. Everything can
9650 be done easily through operators, attribute accesses, and method calls.
9651 @item Embodies the semantics of different path types. For example,
9652 comparing Windows paths ignores casing.
9653 @item Well-defined semantics, eliminating any inconsistencies or
9654 ambiguities (forward vs. backward slashes, etc.).
9655 @end enumerate")
9656 (license license:expat)))
9657
9658 (define-public python2-pathlib2-bootstrap
9659 (hidden-package
9660 (package
9661 (inherit python2-pathlib2)
9662 (name "python2-pathlib2-bootstrap")
9663 (propagated-inputs
9664 `(("python2-scandir" ,python2-scandir)
9665 ("python2-six" ,python2-six-bootstrap))))))
9666
9667 (define-public python-jellyfish
9668 (package
9669 (name "python-jellyfish")
9670 (version "0.5.6")
9671 (source (origin
9672 (method url-fetch)
9673 (uri (pypi-uri "jellyfish" version))
9674 (sha256
9675 (base32
9676 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9677 (build-system python-build-system)
9678 (native-inputs
9679 `(("python-pytest" ,python-pytest)))
9680 (home-page "https://github.com/jamesturk/jellyfish")
9681 (synopsis "Approximate and phonetic matching of strings")
9682 (description "Jellyfish uses a variety of string comparison and phonetic
9683 encoding algorithms to do fuzzy string matching.")
9684 (license license:bsd-2)
9685 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9686
9687 (define-public python2-jellyfish
9688 (let ((jellyfish (package-with-python2
9689 (strip-python2-variant python-jellyfish))))
9690 (package (inherit jellyfish)
9691 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9692 ,@(package-native-inputs jellyfish))))))
9693
9694 (define-public python2-unicodecsv
9695 (package
9696 (name "python2-unicodecsv")
9697 (version "0.14.1")
9698 (source (origin
9699 (method url-fetch)
9700 ;; The test suite is not included in the PyPi release.
9701 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9702 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9703 "archive/" version ".tar.gz"))
9704 (file-name (string-append name "-" version ".tar.gz"))
9705 (sha256
9706 (base32
9707 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9708 (build-system python-build-system)
9709 (arguments
9710 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9711 #:python ,python-2))
9712 (native-inputs
9713 `(("python2-unittest2" ,python2-unittest2)))
9714 (home-page "https://github.com/jdunck/python-unicodecsv")
9715 (synopsis "Unicode CSV module for Python 2")
9716 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9717 module, adding support for Unicode strings.")
9718 (license license:bsd-2)))
9719
9720 (define-public python-rarfile
9721 (package
9722 (name "python-rarfile")
9723 (version "2.8")
9724 (source (origin
9725 (method url-fetch)
9726 (uri (pypi-uri "rarfile" version))
9727 (sha256
9728 (base32
9729 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9730 (build-system python-build-system)
9731 (arguments
9732 '(#:phases
9733 (modify-phases %standard-phases
9734 (replace 'check
9735 ;; Many tests fail, but the installation proceeds.
9736 (lambda _ (invoke "make" "-C" "test" "test"))))))
9737 (native-inputs
9738 `(("which" ,which))) ; required for tests
9739 (propagated-inputs
9740 `(("libarchive" ,libarchive)))
9741 (home-page "https://github.com/markokr/rarfile")
9742 (synopsis "RAR archive reader for Python")
9743 (description "This is Python module for RAR archive reading. The interface
9744 is made as zipfile like as possible.")
9745 (license license:isc)))
9746
9747 (define-public python2-rarfile
9748 (package-with-python2 python-rarfile))
9749
9750 (define-public python-magic
9751 (package
9752 (name "python-magic")
9753 (version "0.4.15")
9754 (source
9755 (origin
9756 (method url-fetch)
9757 (uri (pypi-uri "python-magic" version))
9758 (sha256
9759 (base32
9760 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9761 (file-name (string-append name "-" version "-checkout"))))
9762 (build-system python-build-system)
9763 (arguments
9764 ;; The tests are unreliable, so don't run them. The tests fail
9765 ;; under Python3 because they were written for Python2 and
9766 ;; contain import statements that do not work in Python3. One of
9767 ;; the tests fails under Python2 because its assertions are
9768 ;; overly stringent; it relies on comparing output strings which
9769 ;; are brittle and can change depending on the version of
9770 ;; libmagic being used and the system on which the test is
9771 ;; running. In my case, under GuixSD 0.10.0, only one test
9772 ;; failed, and it seems to have failed only because the version
9773 ;; of libmagic that is packaged in Guix outputs a slightly
9774 ;; different (but not wrong) string than the one that the test
9775 ;; expected.
9776 '(#:tests? #f
9777 #:phases (modify-phases %standard-phases
9778 ;; Replace a specific method call with a hard-coded
9779 ;; path to the necessary libmagic.so file in the
9780 ;; store. If we don't do this, then the method call
9781 ;; will fail to find the libmagic.so file, which in
9782 ;; turn will cause any application using
9783 ;; python-magic to fail.
9784 (add-before 'build 'hard-code-path-to-libmagic
9785 (lambda* (#:key inputs #:allow-other-keys)
9786 (let ((file (assoc-ref inputs "file")))
9787 (substitute* "magic.py"
9788 (("ctypes.util.find_library\\('magic'\\)")
9789 (string-append "'" file "/lib/libmagic.so'")))
9790 #t)))
9791 (add-before 'install 'disable-egg-compression
9792 (lambda _
9793 (let ((port (open-file "setup.cfg" "a")))
9794 (display "\n[easy_install]\nzip_ok = 0\n"
9795 port)
9796 (close-port port)
9797 #t))))))
9798 (inputs
9799 ;; python-magic needs to be able to find libmagic.so.
9800 `(("file" ,file)))
9801 (home-page
9802 "https://github.com/ahupp/python-magic")
9803 (synopsis
9804 "File type identification using libmagic")
9805 (description
9806 "This module uses ctypes to access the libmagic file type
9807 identification library. It makes use of the local magic database and
9808 supports both textual and MIME-type output. Note that this module and
9809 the python-file module both provide a \"magic.py\" file; these two
9810 modules, which are different and were developed separately, both serve
9811 the same purpose: to provide Python bindings for libmagic.")
9812 (license license:expat)))
9813
9814 (define-public python2-magic
9815 (package-with-python2 python-magic))
9816
9817 (define-public python2-s3cmd
9818 (package
9819 (name "python2-s3cmd")
9820 (version "1.6.1")
9821 (source
9822 (origin
9823 (method url-fetch)
9824 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9825 "s3cmd-" version ".tar.gz"))
9826 (sha256
9827 (base32
9828 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9829 (build-system python-build-system)
9830 (arguments
9831 ;; s3cmd is written for python2 only and contains no tests.
9832 `(#:python ,python-2
9833 #:tests? #f))
9834 (propagated-inputs
9835 `(("python2-dateutil" ,python2-dateutil)
9836 ;; The python-file package also provides a magic.py module.
9837 ;; This is an unfortunate state of affairs; however, s3cmd
9838 ;; fails to install if it cannot find specifically the
9839 ;; python-magic package. Thus we include it, instead of using
9840 ;; python-file. Ironically, s3cmd sometimes works better
9841 ;; without libmagic bindings at all:
9842 ;; https://github.com/s3tools/s3cmd/issues/198
9843 ("python2-magic" ,python2-magic)))
9844 (home-page "http://s3tools.org/s3cmd")
9845 (synopsis "Command line tool for S3-compatible storage services")
9846 (description
9847 "S3cmd is a command line tool for uploading, retrieving and managing data
9848 in storage services that are compatible with the Amazon Simple Storage
9849 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9850 GnuPG encryption, and more. It also supports management of Amazon's
9851 CloudFront content delivery network.")
9852 (license license:gpl2+)))
9853
9854 (define-public python-pkgconfig
9855 (package
9856 (name "python-pkgconfig")
9857 (version "1.3.1")
9858 (source
9859 (origin
9860 (method url-fetch)
9861 (uri (pypi-uri "pkgconfig" version))
9862 (sha256
9863 (base32
9864 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9865 (build-system python-build-system)
9866 (native-inputs
9867 `(("python-nose" ,python-nose)))
9868 (inputs
9869 `(("pkg-config" ,pkg-config)))
9870 (arguments
9871 `(#:phases
9872 (modify-phases %standard-phases
9873 (add-before 'build 'patch
9874 ;; Hard-code the path to pkg-config.
9875 (lambda _
9876 (substitute* "pkgconfig/pkgconfig.py"
9877 (("cmd = 'pkg-config")
9878 (string-append "cmd = '" (which "pkg-config"))))
9879 #t))
9880 (replace 'check
9881 (lambda _
9882 (invoke "nosetests" "test.py"))))))
9883 (home-page "https://github.com/matze/pkgconfig")
9884 (synopsis "Python interface for pkg-config")
9885 (description "This module provides a Python interface to pkg-config. It
9886 can be used to find all pkg-config packages, check if a package exists,
9887 check if a package meets certain version requirements, query CFLAGS and
9888 LDFLAGS and parse the output to build extensions with setup.py.")
9889 (license license:expat)))
9890
9891 (define-public python2-pkgconfig
9892 (package-with-python2 python-pkgconfig))
9893
9894 (define-public python-bz2file
9895 (package
9896 (name "python-bz2file")
9897 (version "0.98")
9898 (source
9899 (origin
9900 (method url-fetch)
9901 (uri (pypi-uri "bz2file" version))
9902 (sha256
9903 (base32
9904 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9905 (build-system python-build-system)
9906 (arguments
9907 `(#:tests? #f)) ; Tests use deprecated python modules.
9908 (home-page "https://github.com/nvawda/bz2file")
9909 (synopsis "Read and write bzip2-compressed files")
9910 (description
9911 "Bz2file is a Python library for reading and writing bzip2-compressed
9912 files. It contains a drop-in replacement for the I/O interface in the
9913 standard library's @code{bz2} module, including features from the latest
9914 development version of CPython that are not available in older releases.")
9915 (license license:asl2.0)))
9916
9917 (define-public python2-bz2file
9918 (package-with-python2 python-bz2file))
9919
9920 (define-public python-future
9921 (package
9922 (name "python-future")
9923 (version "0.17.1")
9924 (source
9925 (origin
9926 (method url-fetch)
9927 (uri (pypi-uri "future" version))
9928 (sha256
9929 (base32
9930 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
9931 (build-system python-build-system)
9932 ;; Many tests connect to the network or are otherwise flawed.
9933 ;; https://github.com/PythonCharmers/python-future/issues/210
9934 (arguments
9935 `(#:tests? #f))
9936 (home-page "http://python-future.org")
9937 (synopsis "Single-source support for Python 3 and 2")
9938 (description
9939 "@code{python-future} is the missing compatibility layer between Python 2 and
9940 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9941 to support both Python 2 and Python 3 with minimal overhead.")
9942 (license license:expat)))
9943
9944 (define-public python2-future
9945 (package-with-python2 python-future))
9946
9947 (define-public python-cysignals
9948 (package
9949 (name "python-cysignals")
9950 (version "1.9.0")
9951 (source
9952 (origin
9953 (method url-fetch)
9954 (uri (pypi-uri "cysignals" version))
9955 (sha256
9956 (base32
9957 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
9958 (build-system python-build-system)
9959 (native-inputs
9960 `(("python-cython" ,python-cython)
9961 ("python-sphinx" ,python-sphinx)))
9962 (inputs
9963 `(("pari-gp" ,pari-gp)))
9964 (arguments
9965 `(#:modules ((guix build python-build-system)
9966 ((guix build gnu-build-system) #:prefix gnu:)
9967 (guix build utils))
9968 ;; FIXME: Tests are executed after installation and currently fail
9969 ;; when not installing into standard locations; the author is working
9970 ;; on a fix.
9971 #:tests? #f
9972 #:phases
9973 (modify-phases %standard-phases
9974 (add-before
9975 'build 'configure
9976 (assoc-ref gnu:%standard-phases 'configure)))))
9977 (home-page
9978 "https://github.com/sagemath/cysignals")
9979 (synopsis
9980 "Handling of interrupts and signals for Cython")
9981 (description
9982 "The cysignals package provides mechanisms to handle interrupts (and
9983 other signals and errors) in Cython code, using two related approaches,
9984 for mixed Cython/Python code or external C libraries and pure Cython code,
9985 respectively.")
9986 (license license:lgpl3+)))
9987
9988 (define-public python2-cysignals
9989 (package-with-python2 python-cysignals))
9990
9991 (define-public python2-shedskin
9992 (package
9993 (name "python2-shedskin")
9994 (version "0.9.4")
9995 (source
9996 (origin
9997 (method url-fetch)
9998 (uri (string-append "https://github.com/shedskin/shedskin/"
9999 "releases/download/v" version
10000 "/shedskin-" version ".tgz"))
10001 (sha256
10002 (base32
10003 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
10004 (build-system python-build-system)
10005 (arguments
10006 `(#:python ,python-2
10007 #:phases (modify-phases %standard-phases
10008 (add-after 'unpack 'fix-resulting-include-libs
10009 (lambda* (#:key inputs #:allow-other-keys)
10010 (let ((libgc (assoc-ref inputs "libgc"))
10011 (pcre (assoc-ref inputs "pcre")))
10012 (substitute* "shedskin/makefile.py"
10013 (("variable == 'CCFLAGS':[ ]*")
10014 (string-append "variable == 'CCFLAGS':\n"
10015 " line += ' -I " pcre "/include"
10016 " -I " libgc "/include'"))
10017 (("variable == 'LFLAGS':[ ]*")
10018 (string-append "variable == 'LFLAGS':\n"
10019 " line += ' -L" pcre "/lib"
10020 " -L " libgc "/lib'")))
10021 #t))))))
10022 (inputs `(("pcre" ,pcre)
10023 ("libgc" ,libgc)))
10024 (home-page "https://shedskin.github.io/")
10025 (synopsis "Experimental Python-2 to C++ Compiler")
10026 (description (string-append "This is an experimental compiler for a subset of
10027 Python. It generates C++ code and a Makefile."))
10028 (license (list license:gpl3 license:bsd-3 license:expat))))
10029
10030 (define-public python2-rope
10031 (package
10032 (name "python2-rope")
10033 (version "0.11.0")
10034 (source
10035 (origin
10036 (method url-fetch)
10037 (uri (pypi-uri "rope" version))
10038 (sha256
10039 (base32
10040 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
10041 (arguments
10042 ;; Rope has only partial python3 support, see `python-rope'
10043 `(#:python ,python-2))
10044 (build-system python-build-system)
10045 (native-inputs
10046 `(("python2-unittest2" ,python2-unittest2)))
10047 (home-page "https://github.com/python-rope/rope")
10048 (synopsis "Refactoring library for Python")
10049 (description "Rope is a refactoring library for Python. It facilitates
10050 the renaming, moving and extracting of attributes, functions, modules, fields
10051 and parameters in Python 2 source code. These refactorings can also be applied
10052 to occurrences in strings and comments.")
10053 (license license:gpl2)))
10054
10055 (define-public python-rope
10056 (package
10057 (inherit python2-rope)
10058 (name "python-rope")
10059 (arguments `(#:python ,python-wrapper
10060 ;; XXX: Only partial python3 support, results in some failing
10061 ;; tests: <https://github.com/python-rope/rope/issues/247>.
10062 #:tests? #f))
10063 (properties `((python2-variant . ,(delay python2-rope))))))
10064
10065 (define-public python-py3status
10066 (package
10067 (name "python-py3status")
10068 (version "3.21")
10069 (source
10070 (origin
10071 (method url-fetch)
10072 (uri (pypi-uri "py3status" version))
10073 (sha256
10074 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
10075 (build-system python-build-system)
10076 (inputs
10077 `(("file" ,file)))
10078 (arguments
10079 '(#:phases
10080 (modify-phases %standard-phases
10081 ;; 'file' is used for detection of configuration file encoding
10082 ;; let's make link the dependency to particular input
10083 (add-before 'build 'patch-file-path
10084 (lambda* (#:key inputs #:allow-other-keys)
10085 (let ((file-path (assoc-ref inputs "file")))
10086 (substitute* "py3status/parse_config.py"
10087 (("\\['file', '-b'")
10088 (string-append "['" file-path "/bin/file', '-b'")))
10089 #t))))
10090 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
10091 (home-page "https://github.com/ultrabug/py3status")
10092 (synopsis "Extensible i3status wrapper written in Python")
10093 (description "py3status is an i3status wrapper which extends i3status
10094 functionality in a modular way, allowing you to extend your panel with your
10095 own code, responding to click events and updating clock every second.")
10096 (license license:bsd-3)))
10097
10098 (define-public python-tblib
10099 (package
10100 (name "python-tblib")
10101 (version "1.3.2")
10102 (source (origin
10103 (method url-fetch)
10104 (uri (pypi-uri "tblib" version))
10105 (sha256 (base32
10106 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
10107 (build-system python-build-system)
10108 (arguments
10109 `(#:phases
10110 (modify-phases %standard-phases
10111 (add-before 'check 'adjust-tests
10112 (lambda _
10113 (when (which "python3")
10114 ;; Adjust the example output to match that of Python 3.7:
10115 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
10116 (substitute* "README.rst"
10117 (("Exception\\('fail',") "Exception('fail'"))
10118 #t)))
10119 (replace 'check
10120 (lambda _
10121 ;; Upstream runs tests after installation and the package itself
10122 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
10123 ;; found.
10124 (setenv "PYTHONPATH"
10125 (string-append (getcwd) "/build/lib:"
10126 (getenv "PYTHONPATH")))
10127 (invoke "py.test" "-vv" "tests" "README.rst"))))))
10128 (native-inputs
10129 `(("python-pytest" ,python-pytest)
10130 ("python-six" ,python-six)))
10131 (home-page "https://github.com/ionelmc/python-tblib")
10132 (synopsis "Traceback serialization library")
10133 (description
10134 "Traceback serialization allows you to:
10135
10136 @enumerate
10137 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
10138 different processes. This allows better error handling when running code over
10139 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
10140
10141 @item Parse traceback strings and raise with the parsed tracebacks.
10142 @end enumerate\n")
10143 (license license:bsd-3)))
10144
10145 (define-public python2-tblib
10146 (package-with-python2 python-tblib))
10147
10148 (define-public python-greenlet
10149 (package
10150 (name "python-greenlet")
10151 (version "0.4.15")
10152 (source (origin
10153 (method url-fetch)
10154 (uri (pypi-uri "greenlet" version))
10155 (sha256
10156 (base32
10157 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
10158 (build-system python-build-system)
10159 (home-page "https://greenlet.readthedocs.io/")
10160 (synopsis "Lightweight in-process concurrent programming")
10161 (description
10162 "Greenlet package is a spin-off of Stackless, a version of CPython
10163 that supports micro-threads called \"tasklets\". Tasklets run
10164 pseudo-concurrently (typically in a single or a few OS-level threads) and
10165 are synchronized with data exchanges on \"channels\".")
10166 (license (list license:psfl license:expat))))
10167
10168 (define-public python2-greenlet
10169 (package-with-python2 python-greenlet))
10170
10171 (define-public python-objgraph
10172 (package
10173 (name "python-objgraph")
10174 (version "3.4.0")
10175 (source
10176 (origin
10177 (method url-fetch)
10178 (uri (pypi-uri "objgraph" version))
10179 (sha256
10180 (base32
10181 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
10182 (build-system python-build-system)
10183 (propagated-inputs
10184 `(("python-graphviz" ,python-graphviz)))
10185 (native-inputs
10186 `(("python-mock" ,python-mock)
10187 ("graphviz" ,graphviz)))
10188 (home-page "https://mg.pov.lt/objgraph/")
10189 (synopsis "Draw Python object reference graphs with graphviz")
10190 (description
10191 "This package provides tools to draw Python object reference graphs with
10192 graphviz.")
10193 (license license:expat)))
10194
10195 (define-public python-gevent
10196 (package
10197 (name "python-gevent")
10198 (version "1.3.7")
10199 (source (origin
10200 (method url-fetch)
10201 (uri (pypi-uri "gevent" version))
10202 (sha256
10203 (base32
10204 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
10205 (modules '((guix build utils)))
10206 (snippet
10207 '(begin
10208 ;; unbunding libev and c-ares
10209 (delete-file-recursively "deps")
10210 #t))))
10211 (build-system python-build-system)
10212 (arguments
10213 `(#:modules ((ice-9 ftw)
10214 (ice-9 match)
10215 (srfi srfi-26)
10216 (guix build utils)
10217 (guix build python-build-system))
10218 #:phases (modify-phases %standard-phases
10219 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
10220 (lambda _
10221 (substitute* "src/gevent/subprocess.py"
10222 (("/bin/sh") (which "sh")))
10223 (for-each (lambda (file)
10224 (substitute* file
10225 (("/bin/sh") (which "sh"))
10226 (("/bin/true") (which "true"))))
10227 (find-files "src/greentest" "\\.py$"))
10228 #t))
10229 (add-before 'build 'do-not-use-bundled-sources
10230 (lambda* (#:key inputs #:allow-other-keys)
10231 (setenv "CONFIG_SHELL" (which "bash"))
10232 (setenv "LIBEV_EMBED" "false")
10233 (setenv "CARES_EMBED" "false")
10234 (setenv "EMBED" "false")
10235
10236 ;; Prevent building bundled libev.
10237 (substitute* "setup.py"
10238 (("run_make=_BUILDING")
10239 "run_make=False"))
10240
10241 (let ((greenlet (string-append
10242 (assoc-ref inputs "python-greenlet")
10243 "/include")))
10244 (match (scandir greenlet
10245 (lambda (item)
10246 (string-prefix? "python" item)))
10247 ((python)
10248 (setenv "C_INCLUDE_PATH"
10249 (string-append greenlet "/" python)))))
10250 #t))
10251 (add-before 'check 'skip-timer-test
10252 (lambda _
10253 ;; XXX: Skip 'TestTimerResolution', which appears to be
10254 ;; unreliable.
10255 (substitute* "src/greentest/test__core_timer.py"
10256 (("not greentest.RUNNING_ON_CI") "False"))
10257 #t))
10258 (replace 'check
10259 (lambda _
10260 ;; Make sure the build directory is on PYTHONPATH.
10261 (setenv "PYTHONPATH"
10262 (string-append
10263 (getenv "PYTHONPATH") ":"
10264 (getcwd) "/build/"
10265 (car (scandir "build" (cut string-prefix? "lib." <>)))))
10266 (with-directory-excursion "src/greentest"
10267 ;; XXX: Many tests require network access. Instead we only
10268 ;; run known-good tests. Unfortunately we cannot use
10269 ;; recursion here since this directory also contains
10270 ;; Python-version-specific subfolders.
10271 (apply invoke "python" "testrunner.py" "--config"
10272 "known_failures.py"
10273 (scandir "." (cut regexp-exec
10274 (make-regexp "test_+(subprocess|core)")
10275 <>)))))))))
10276 (propagated-inputs
10277 `(("python-greenlet" ,python-greenlet)
10278 ("python-objgraph" ,python-objgraph)))
10279 (native-inputs
10280 `(("python-six" ,python-six)))
10281 (inputs
10282 `(("c-ares" ,c-ares)
10283 ("libev" ,libev)))
10284 (home-page "http://www.gevent.org/")
10285 (synopsis "Coroutine-based network library")
10286 (description
10287 "gevent is a coroutine-based Python networking library that uses greenlet
10288 to provide a high-level synchronous API on top of the libev event loop.")
10289 (license license:expat)
10290 (properties `((python2-variant . ,(delay python2-gevent))))))
10291
10292 (define-public python2-gevent
10293 (let ((base (package-with-python2
10294 (strip-python2-variant python-gevent))))
10295 (package
10296 (inherit base)
10297 (native-inputs `(,@(package-native-inputs python-gevent)
10298 ("python-mock" ,python2-mock))))))
10299
10300 (define-public python-fastimport
10301 (package
10302 (name "python-fastimport")
10303 (version "0.9.6")
10304 (source
10305 (origin
10306 (method url-fetch)
10307 (uri (pypi-uri "fastimport" version))
10308 (sha256
10309 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10310 (build-system python-build-system)
10311 (home-page "https://github.com/jelmer/python-fastimport")
10312 (synopsis "VCS fastimport parser and generator in Python")
10313 (description "This package provides a parser for and generator of the Git
10314 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
10315 format.")
10316 (license license:gpl2+)))
10317
10318 (define-public python2-fastimport
10319 (package-with-python2 python-fastimport))
10320
10321 (define-public python-twisted
10322 (package
10323 (name "python-twisted")
10324 (version "19.7.0")
10325 (source (origin
10326 (method url-fetch)
10327 (uri (pypi-uri "Twisted" version ".tar.bz2"))
10328 (sha256
10329 (base32
10330 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
10331 (build-system python-build-system)
10332 (arguments
10333 '(#:tests? #f)) ; FIXME: some tests fail
10334 (propagated-inputs
10335 `(("python-zope-interface" ,python-zope-interface)
10336 ("python-pyhamcrest" ,python-pyhamcrest)
10337 ("python-incremental" ,python-incremental)
10338 ("python-hyperlink" ,python-hyperlink)
10339 ("python-constantly" ,python-constantly)
10340 ("python-automat" ,python-automat)))
10341 (home-page "https://twistedmatrix.com/")
10342 (synopsis "Asynchronous networking framework written in Python")
10343 (description
10344 "Twisted is an extensible framework for Python programming, with special
10345 focus on event-based network programming and multiprotocol integration.")
10346 (license license:expat)))
10347
10348 (define-public python2-twisted
10349 (package-with-python2 python-twisted))
10350
10351 (define-public python-pika
10352 (package
10353 (name "python-pika")
10354 (version "0.12.0")
10355 (source
10356 (origin
10357 (method url-fetch)
10358 (uri (pypi-uri "pika" version))
10359 (sha256
10360 (base32
10361 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10362 (build-system python-build-system)
10363 (native-inputs
10364 `(("python-pyev" ,python-pyev)
10365 ("python-tornado" ,python-tornado)
10366 ("python-twisted" ,python-twisted)))
10367 (home-page "https://pika.readthedocs.org")
10368 (synopsis "Pure Python AMQP Client Library")
10369 (description
10370 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10371 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10372 network support library.")
10373 (license license:bsd-3)))
10374
10375 (define-public python2-pika
10376 (package-with-python2 python-pika))
10377
10378 (define-public python-ply
10379 (package
10380 (name "python-ply")
10381 (version "3.10")
10382 (source
10383 (origin
10384 (method url-fetch)
10385 (uri (pypi-uri "ply" version))
10386 (sha256
10387 (base32
10388 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10389 (build-system python-build-system)
10390 (home-page "http://www.dabeaz.com/ply/")
10391 (synopsis "Python Lex & Yacc")
10392 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10393 It uses LR parsing and does extensive error checking.")
10394 (license license:bsd-3)))
10395
10396 (define-public python2-ply
10397 (package-with-python2 python-ply))
10398
10399 (define-public python-tabulate
10400 (package
10401 (name "python-tabulate")
10402 (version "0.7.7")
10403 (source (origin
10404 (method url-fetch)
10405 (uri (pypi-uri "tabulate" version))
10406 (sha256
10407 (base32
10408 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10409 (build-system python-build-system)
10410 (arguments
10411 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10412 ;; and the latest release is not tagged in the upstream repository.
10413 '(#:tests? #f))
10414 (home-page "https://bitbucket.org/astanin/python-tabulate")
10415 (synopsis "Pretty-print tabular data")
10416 (description
10417 "Tabulate is a library and command-line utility to pretty-print tabular
10418 data in Python.")
10419 (license license:expat)))
10420
10421 (define-public python2-tabulate
10422 (package-with-python2 python-tabulate))
10423
10424 (define-public python-kazoo
10425 (package
10426 (name "python-kazoo")
10427 (version "2.4.0")
10428 (source
10429 (origin
10430 (method url-fetch)
10431 (uri (pypi-uri "kazoo" version))
10432 (sha256
10433 (base32
10434 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10435 (build-system python-build-system)
10436 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10437 (propagated-inputs
10438 `(("python-six" ,python-six)))
10439 (home-page "https://kazoo.readthedocs.org")
10440 (synopsis "High-level Zookeeper client library")
10441 (description
10442 "Kazoo is a Python client library for the Apache Zookeeper distributed
10443 application service. It is designed to be easy to use and to avoid common
10444 programming errors.")
10445 (license license:asl2.0)))
10446
10447 (define-public python2-kazoo
10448 (package-with-python2 python-kazoo))
10449
10450 (define-public python-pykafka
10451 (package
10452 (name "python-pykafka")
10453 (version "2.4.0")
10454 (source (origin
10455 (method url-fetch)
10456 (uri (pypi-uri "pykafka" version))
10457 (sha256
10458 (base32
10459 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10460 (build-system python-build-system)
10461 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10462 (propagated-inputs
10463 `(("python-gevent" ,python-gevent)
10464 ("python-kazoo" ,python-kazoo)
10465 ("python-tabulate" ,python-tabulate)))
10466 (inputs
10467 `(("librdkafka" ,librdkafka)))
10468 (home-page "https://pykafka.readthedocs.io/")
10469 (synopsis "Apache Kafka client for Python")
10470 (description
10471 "PyKafka is a client for the Apache Kafka distributed messaging system.
10472 It includes Python implementations of Kafka producers and consumers, which
10473 are optionally backed by a C extension built on librdkafka.")
10474 (license license:asl2.0)))
10475
10476 (define-public python2-pykafka
10477 (package-with-python2 python-pykafka))
10478
10479 (define-public python-wcwidth
10480 (package
10481 (name "python-wcwidth")
10482 (version "0.1.7")
10483 (source
10484 (origin
10485 (method url-fetch)
10486 (uri (pypi-uri "wcwidth" version))
10487 (sha256
10488 (base32
10489 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
10490 (build-system python-build-system)
10491 (home-page "https://github.com/jquast/wcwidth")
10492 (synopsis "Measure number of terminal column cells of wide-character codes")
10493 (description "Wcwidth measures the number of terminal column cells of
10494 wide-character codes. It is useful for those implementing a terminal emulator,
10495 or programs that carefully produce output to be interpreted by one. It is a
10496 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10497 specified in POSIX.1-2001 and POSIX.1-2008.")
10498 (license license:expat)))
10499
10500 (define-public python2-wcwidth
10501 (package-with-python2 python-wcwidth))
10502
10503 (define-public python2-jsonrpclib
10504 (package
10505 (name "python2-jsonrpclib")
10506 (version "0.1.7")
10507 (source (origin
10508 (method url-fetch)
10509 (uri (pypi-uri "jsonrpclib" version))
10510 (sha256
10511 (base32
10512 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10513 (build-system python-build-system)
10514 (arguments
10515 `(#:tests? #f
10516 #:python ,python-2))
10517 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10518 (synopsis "Implementation of JSON-RPC specification for Python")
10519 (description
10520 "This library is an implementation of the JSON-RPC specification.
10521 It supports both the original 1.0 specification, as well as the
10522 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10523 etc.")
10524 (license license:asl2.0)))
10525
10526 (define-public python-chai
10527 (package
10528 (name "python-chai")
10529 (version "1.1.2")
10530 (source (origin
10531 (method url-fetch)
10532 (uri (pypi-uri "chai" version))
10533 (sha256
10534 (base32
10535 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10536 (build-system python-build-system)
10537 (home-page "https://github.com/agoragames/chai")
10538 (synopsis "Mocking framework for Python")
10539 (description
10540 "Chai provides an api for mocking, stubbing and spying your python
10541 objects, patterned after the Mocha library for Ruby.")
10542 (license license:bsd-3)))
10543
10544 (define-public python2-chai
10545 (package-with-python2 python-chai))
10546
10547 (define-public python-inflection
10548 (package
10549 (name "python-inflection")
10550 (version "0.3.1")
10551 (source
10552 (origin (method url-fetch)
10553 (uri (pypi-uri "inflection" version))
10554 (sha256
10555 (base32
10556 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10557 (build-system python-build-system)
10558 (native-inputs
10559 `(("python-pytest" ,python-pytest)))
10560 (home-page "https://github.com/jpvanhal/inflection")
10561 (synopsis "Python string transformation library")
10562 (description
10563 "Inflection is a string transformation library. It singularizes
10564 and pluralizes English words, and transforms strings from CamelCase to
10565 underscored string.")
10566 (license license:expat)))
10567
10568 (define-public python2-inflection
10569 (package-with-python2 python-inflection))
10570
10571 (define-public python-pylev
10572 (package
10573 (name "python-pylev")
10574 (version "1.3.0")
10575 (source (origin
10576 (method url-fetch)
10577 (uri (pypi-uri "pylev" version))
10578 (sha256
10579 (base32
10580 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10581 (build-system python-build-system)
10582 (home-page "https://github.com/toastdriven/pylev")
10583 (synopsis "Levenshtein distance implementation in Python")
10584 (description "Pure Python Levenshtein implementation, based off the
10585 Wikipedia code samples at
10586 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10587 (license license:bsd-3)))
10588
10589 (define-public python2-pylev
10590 (package-with-python2 python-pylev))
10591
10592 (define-public python-cleo
10593 (package
10594 (name "python-cleo")
10595 (version "0.6.1")
10596 (source (origin
10597 (method url-fetch)
10598 (uri (pypi-uri "cleo" version))
10599 (sha256
10600 (base32
10601 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
10602 (build-system python-build-system)
10603 (native-inputs
10604 `(;; For testing
10605 ("python-mock" ,python-mock)
10606 ("python-pytest-mock" ,python-pytest-mock)
10607 ("python-pytest" ,python-pytest)))
10608 (propagated-inputs
10609 `(("python-backpack" ,python-backpack)
10610 ("python-pastel" ,python-pastel)
10611 ("python-pylev" ,python-pylev)))
10612 (home-page "https://github.com/sdispater/cleo")
10613 (synopsis "Command-line arguments library for Python")
10614 (description
10615 "Cleo allows you to create command-line commands with signature in
10616 docstring and colored output.")
10617 (license license:expat)))
10618
10619 (define-public python2-cleo
10620 (package-with-python2 python-cleo))
10621
10622 (define-public python-lazy-object-proxy
10623 (package
10624 (name "python-lazy-object-proxy")
10625 (version "1.4.2")
10626 (source (origin
10627 (method url-fetch)
10628 (uri (pypi-uri "lazy-object-proxy" version))
10629 (sha256
10630 (base32
10631 "1wgl0fmddi0ind78a74yyk2qrr9pb5llvj1892cdpp6z6n6mn4zx"))))
10632 (native-inputs
10633 `(("python-setuptools-scm" ,python-setuptools-scm-3.3)))
10634 (build-system python-build-system)
10635 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10636 (synopsis "Lazy object proxy for python")
10637 (description
10638 "Lazy object proxy is an object that wraps a callable but defers the call
10639 until the object is actually required, and caches the result of said call.")
10640 (license license:bsd-2)))
10641
10642 (define-public python2-lazy-object-proxy
10643 (package-with-python2 python-lazy-object-proxy))
10644
10645 (define-public python-dnspython
10646 (package
10647 (name "python-dnspython")
10648 (version "1.15.0")
10649 (source (origin
10650 (method url-fetch)
10651 (uri (string-append "http://www.dnspython.org/kits/"
10652 version "/dnspython-" version ".tar.gz"))
10653 (sha256
10654 (base32
10655 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10656 (build-system python-build-system)
10657 (arguments '(#:tests? #f)) ; XXX: requires internet access
10658 (home-page "http://www.dnspython.org")
10659 (synopsis "DNS toolkit for Python")
10660 (description
10661 "dnspython is a DNS toolkit for Python. It supports almost all record
10662 types. It can be used for queries, zone transfers, and dynamic updates.
10663 It supports TSIG authenticated messages and EDNS0.")
10664 (license license:expat)))
10665
10666 (define-public python2-dnspython
10667 (package-with-python2 python-dnspython))
10668
10669 (define-public python-email-validator
10670 (package
10671 (name "python-email-validator")
10672 (version "1.0.2")
10673 (source
10674 (origin (method url-fetch)
10675 (uri (pypi-uri "email_validator" version))
10676 (sha256
10677 (base32
10678 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10679 (build-system python-build-system)
10680 (arguments
10681 '(#:phases
10682 (modify-phases %standard-phases
10683 (add-before 'build 'use-dnspython
10684 (lambda _
10685 (substitute* "setup.py"
10686 (("dnspython3") "dnspython"))
10687 #t)))))
10688 (propagated-inputs
10689 `(("python-dnspython" ,python-dnspython)
10690 ("python-idna" ,python-idna)))
10691 (home-page "https://github.com/JoshData/python-email-validator")
10692 (synopsis "Email address validation library for Python")
10693 (description
10694 "This library validates email address syntax and deliverability.")
10695 (license license:cc0)))
10696
10697 (define-public python2-email-validator
10698 (package-with-python2 python-email-validator))
10699
10700 (define-public python-ukpostcodeparser
10701 (package
10702 (name "python-ukpostcodeparser")
10703 (version "1.0.3")
10704 (source (origin
10705 (method url-fetch)
10706 (uri (pypi-uri "UkPostcodeParser" version))
10707 (sha256
10708 (base32
10709 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10710 (build-system python-build-system)
10711 (home-page "https://github.com/hamstah/ukpostcodeparser")
10712 (synopsis "UK Postcode parser for Python")
10713 (description
10714 "This library provides the @code{parse_uk_postcode} function for
10715 parsing UK postcodes.")
10716 (license license:expat)))
10717
10718 (define-public python2-ukpostcodeparser
10719 (package-with-python2 python-ukpostcodeparser))
10720
10721 (define-public python-faker
10722 (package
10723 (name "python-faker")
10724 (version "0.7.9")
10725 (source (origin
10726 (method url-fetch)
10727 (uri (pypi-uri "Faker" version))
10728 (sha256
10729 (base32
10730 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10731 (patches
10732 (search-patches "python-faker-fix-build-32bit.patch"))
10733 (modules '((guix build utils)))
10734 (snippet
10735 '(begin
10736 (for-each delete-file (find-files "." "\\.pyc$"))
10737 #t))))
10738 (build-system python-build-system)
10739 (arguments
10740 '(#:phases
10741 (modify-phases %standard-phases
10742 (replace 'check
10743 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
10744 (native-inputs
10745 `(;; For testing
10746 ("python-email-validator" ,python-email-validator)
10747 ("python-mock" ,python-mock)
10748 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10749 (propagated-inputs
10750 `(("python-dateutil" ,python-dateutil)
10751 ("python-six" ,python-six)))
10752 (home-page "https://github.com/joke2k/faker")
10753 (synopsis "Python package that generates fake data")
10754 (description
10755 "Faker is a Python package that generates fake data such as names,
10756 addresses, and phone numbers.")
10757 (license license:expat)
10758 (properties `((python2-variant . ,(delay python2-faker))))))
10759
10760 (define-public python2-faker
10761 (let ((base (package-with-python2 (strip-python2-variant
10762 python-faker))))
10763 (package
10764 (inherit base)
10765 (propagated-inputs
10766 `(("python2-ipaddress" ,python2-ipaddress)
10767 ,@(package-propagated-inputs base))))))
10768
10769 (define-public python-pyaml
10770 (package
10771 (name "python-pyaml")
10772 (version "18.11.0")
10773 (source (origin
10774 (method url-fetch)
10775 (uri (pypi-uri "pyaml" version))
10776 (sha256
10777 (base32
10778 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
10779 (build-system python-build-system)
10780 (native-inputs
10781 `(("python-unidecode" ,python-unidecode)))
10782 (propagated-inputs
10783 `(("python-pyyaml" ,python-pyyaml)))
10784 (home-page "https://github.com/mk-fg/pretty-yaml")
10785 (synopsis "YAML pretty-print library for Python")
10786 (description
10787 "pyaml is a PyYAML based python module to produce pretty and readable
10788 YAML-serialized data.")
10789 (license license:wtfpl2)))
10790
10791 (define-public python2-pyaml
10792 (package-with-python2 python-pyaml))
10793
10794 (define-public python-backpack
10795 (package
10796 (name "python-backpack")
10797 (version "0.1")
10798 (source
10799 (origin
10800 (method url-fetch)
10801 (uri (pypi-uri "backpack" version))
10802 (sha256
10803 (base32
10804 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10805 (build-system python-build-system)
10806 (native-inputs
10807 `(("python-pytest" ,python-pytest)
10808 ("python-nose" ,python-nose)))
10809 (propagated-inputs
10810 `(("python-simplejson" ,python-simplejson)))
10811 (home-page "https://github.com/sdispater/backpack")
10812 (synopsis "Utilities for working with Python collections")
10813 (description "Backpack provides some useful utilities for working with
10814 collections of data.")
10815 (license license:expat)))
10816
10817 (define-public python2-backpack
10818 (package-with-python2 python-backpack))
10819
10820 (define-public python-prompt-toolkit
10821 (package
10822 (name "python-prompt-toolkit")
10823 (version "2.0.7")
10824 (source
10825 (origin
10826 (method url-fetch)
10827 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10828 (sha256
10829 (base32
10830 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10831 (build-system python-build-system)
10832 (arguments
10833 `(#:phases
10834 (modify-phases %standard-phases
10835 (delete 'check)
10836 (add-after 'install 'post-install-check
10837 (lambda* (#:key inputs outputs #:allow-other-keys)
10838 ;; HOME is needed for the test
10839 ;; "test_pathcompleter_can_expanduser".
10840 (setenv "HOME" "/tmp")
10841 (add-installed-pythonpath inputs outputs)
10842 (invoke "py.test"))))))
10843 (propagated-inputs
10844 `(("python-wcwidth" ,python-wcwidth)
10845 ("python-six" ,python-six)
10846 ("python-pygments" ,python-pygments)))
10847 (native-inputs
10848 `(("python-pytest" ,python-pytest)))
10849 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10850 (synopsis "Library for building command line interfaces in Python")
10851 (description
10852 "Prompt-Toolkit is a library for building interactive command line
10853 interfaces in Python. It's like GNU Readline but it also features syntax
10854 highlighting while typing, out-of-the-box multi-line input editing, advanced
10855 code completion, incremental search, support for Chinese double-width
10856 characters, mouse support, and auto suggestions.")
10857 (license license:bsd-3)))
10858
10859 (define-public python2-prompt-toolkit
10860 (package-with-python2 python-prompt-toolkit))
10861
10862 (define-public python-prompt-toolkit-1
10863 (package (inherit python-prompt-toolkit)
10864 (version "1.0.15")
10865 (source
10866 (origin
10867 (method url-fetch)
10868 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10869 (sha256
10870 (base32
10871 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
10872
10873 (define-public python2-prompt-toolkit-1
10874 (package-with-python2 python-prompt-toolkit-1))
10875
10876 (define-public python-jedi
10877 (package
10878 (name "python-jedi")
10879 (version "0.15.1")
10880 (source
10881 (origin
10882 (method url-fetch)
10883 (uri (pypi-uri "jedi" version))
10884 (sha256
10885 (base32
10886 "0bp4pxhsynaarbvzblsn5x32lzp29svy3sxfy8i6m5iwz9s9r1ds"))))
10887 (build-system python-build-system)
10888 (arguments
10889 `(#:phases
10890 (modify-phases %standard-phases
10891 (add-after 'unpack 'disable-file-completion-test
10892 ;; A single parameterized test currently fail (see:
10893 ;; https://github.com/davidhalter/jedi/issues/1395). Remove it.
10894 (lambda _
10895 (substitute* "test/test_api/test_completion.py"
10896 ((".*'example.py', 'rb\"' \\+ join\\('\\.\\.'.*") ""))
10897 #t))
10898 (replace 'check
10899 (lambda _
10900 (setenv "HOME" "/tmp")
10901 (invoke "python" "-m" "pytest"))))))
10902 (native-inputs
10903 `(("python-pytest" ,python-pytest)
10904 ("python-docopt" ,python-docopt)))
10905 (propagated-inputs
10906 `(("python-parso" ,python-parso)))
10907 (home-page "https://github.com/davidhalter/jedi")
10908 (synopsis "Autocompletion and static analysis library for Python")
10909 (description
10910 "Jedi is a static analysis tool for Python that can be used in Integrated
10911 Development Environments (@dfn{IDE}s) and text editors. It understands Python
10912 on a deeper level than many other static analysis frameworks for Python.
10913
10914 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
10915 well.")
10916 (license license:expat)))
10917
10918 (define-public python2-jedi
10919 (package-with-python2 python-jedi))
10920
10921 (define-public ptpython
10922 (package
10923 (name "ptpython")
10924 (version "0.34")
10925 (source (origin
10926 (method url-fetch)
10927 (uri (pypi-uri "ptpython" version))
10928 (sha256
10929 (base32
10930 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10931 (build-system python-build-system)
10932 (arguments
10933 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
10934 (propagated-inputs
10935 `(("python-docopt" ,python-docopt)
10936 ("python-jedi" ,python-jedi)
10937 ("python-prompt-toolkit" ,python-prompt-toolkit)
10938 ("python-pygments" ,python-pygments)))
10939 (home-page "https://github.com/jonathanslenders/ptpython")
10940 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10941 (description
10942 "ptpython is a Python read-eval-print loop with IDE-like features.
10943 It supports syntax highlighting, multiline editing, autocompletion, mouse,
10944 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10945 etc.")
10946 (license license:bsd-3)
10947 (properties `((python2-variant . ,(delay ptpython-2))))))
10948
10949 (define-public ptpython-2
10950 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10951 (package
10952 (inherit base)
10953 (name "ptpython2"))))
10954
10955 (define-public python-stem
10956 (package
10957 (name "python-stem")
10958 (version "1.7.1")
10959 (source
10960 (origin
10961 (method url-fetch)
10962 (uri (pypi-uri "stem" version))
10963 (sha256
10964 (base32
10965 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
10966 (build-system python-build-system)
10967 (arguments
10968 `(#:phases
10969 (modify-phases %standard-phases
10970 (replace 'check
10971 (lambda _
10972 (invoke "./run_tests.py" "--unit")
10973 #t)))))
10974 (native-inputs
10975 `(("python-mock" ,python-mock)
10976 ("python-pycodestyle" ,python-pycodestyle)
10977 ("python-pyflakes" ,python-pyflakes)))
10978 (home-page "https://stem.torproject.org/")
10979 (synopsis
10980 "Python controller library that allows applications to interact with Tor")
10981 (description
10982 "Stem is a Python controller library for Tor. With it you can use Tor's
10983 control protocol to script against the Tor process and read descriptor data
10984 relays publish about themselves.")
10985 (license license:lgpl3)))
10986
10987 (define-public python2-stem
10988 (package-with-python2 python-stem))
10989
10990 (define-public python-pyserial
10991 (package
10992 (name "python-pyserial")
10993 (version "3.1.1")
10994 (source
10995 (origin
10996 (method url-fetch)
10997 (uri (pypi-uri "pyserial" version))
10998 (sha256
10999 (base32
11000 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
11001 (build-system python-build-system)
11002 (arguments
11003 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
11004 ;; #:phases
11005 ;; (modify-phases %standard-phases
11006 ;; (replace 'check
11007 ;; (lambda _
11008 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
11009 (home-page
11010 "https://github.com/pyserial/pyserial")
11011 (synopsis "Python Serial Port Bindings")
11012 (description "@code{pyserial} provide serial port bindings for Python. It
11013 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11014 and/or Xon/Xoff. The port is accessed in RAW mode.")
11015 (license license:bsd-3)))
11016
11017 (define-public python2-pyserial
11018 (package-with-python2 python-pyserial))
11019
11020 (define-public python-kivy
11021 (package
11022 (name "python-kivy")
11023 (version "1.10.1")
11024 (source
11025 (origin
11026 (method url-fetch)
11027 (uri (pypi-uri "Kivy" version))
11028 (file-name (string-append name "-" version ".tar.gz"))
11029 (sha256
11030 (base32
11031 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
11032 (build-system python-build-system)
11033 (arguments
11034 `(#:tests? #f ; Tests require many optional packages
11035 #:phases
11036 (modify-phases %standard-phases
11037 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11038 (lambda* (#:key inputs #:allow-other-keys)
11039 (setenv "KIVY_SDL2_PATH"
11040 (string-append (assoc-ref inputs "sdl-union")
11041 "/include/SDL2"))
11042 #t)))))
11043 (native-inputs
11044 `(("git" ,git)
11045 ("pkg-config" ,pkg-config)
11046 ("python-cython" ,python-cython)))
11047 (inputs
11048 `(("gstreamer" ,gstreamer)
11049 ("mesa" ,mesa)
11050 ("sdl-union"
11051 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11052 (home-page "http://kivy.org")
11053 (synopsis
11054 "Multitouch application framework")
11055 (description
11056 "A software library for rapid development of
11057 hardware-accelerated multitouch applications.")
11058 (license license:expat)))
11059
11060 (define-public python2-kivy
11061 (package-with-python2 python-kivy))
11062
11063 (define-public python-kivy-next
11064 (deprecated-package "python-kivy-next" python-kivy))
11065
11066 (define-public python2-kivy-next
11067 (deprecated-package "python2-kivy-next" python2-kivy))
11068
11069 (define-public python-binaryornot
11070 (package
11071 (name "python-binaryornot")
11072 (version "0.4.4")
11073 (source (origin
11074 (method url-fetch)
11075 (uri (pypi-uri "binaryornot" version))
11076 (sha256
11077 (base32
11078 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
11079 (build-system python-build-system)
11080 (arguments
11081 `(#:phases
11082 (modify-phases %standard-phases
11083 (add-after 'unpack 'patch-tests
11084 (lambda _
11085 ;; TypeError: binary() got an unexpected keyword argument
11086 ;; 'average_size'.
11087 (substitute* "tests/test_check.py"
11088 (("average_size=512") ""))
11089 #t)))))
11090 (propagated-inputs
11091 `(("python-chardet" ,python-chardet)
11092 ("python-hypothesis" ,python-hypothesis)))
11093 (home-page "https://github.com/audreyr/binaryornot")
11094 (synopsis "Package to check if a file is binary or text")
11095 (description "Ultra-lightweight pure Python package to check if a file is
11096 binary or text.")
11097 (license license:bsd-3)
11098 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11099
11100 (define-public python2-binaryornot
11101 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11102 (package (inherit base)
11103 (propagated-inputs
11104 `(("python2-enum34" ,python2-enum34)
11105 ,@(package-propagated-inputs base))))))
11106
11107 (define-public python-binwalk
11108 (let ((commit "64201acfb5b0a9cdd9faa58c40a36dcff8612e29")
11109 (revision "0"))
11110 (package
11111 (name "python-binwalk")
11112 (version (git-version "2.1.1" revision commit))
11113 (source
11114 (origin
11115 (method git-fetch)
11116 (uri (git-reference
11117 (url "https://github.com/ReFirmLabs/binwalk")
11118 (commit commit)))
11119 (file-name (git-file-name name version))
11120 (sha256
11121 (base32
11122 "1z7ca6rfp887hw5jc3sb45mm4fa0xid4lsp2z8g4r590dr7k7w15"))))
11123 (build-system python-build-system)
11124 (arguments
11125 `(#:phases
11126 (modify-phases %standard-phases
11127 (add-before 'check 'set-pythonpath
11128 (lambda _
11129 (setenv "PYTHONPATH"
11130 (string-append
11131 (getcwd) "/src/"
11132 ":" (getenv "PYTHONPATH")))
11133 (setenv "HOME" "")
11134 #t)))))
11135 (native-inputs
11136 `(("python-coverage" ,python-coverage)
11137 ("python-nose" ,python-nose)))
11138 (home-page "https://github.com/ReFirmLabs/binwalk")
11139 (synopsis "Firmware analysis tool")
11140 (description "Binwalk is a tool for analyzing, reverse engineering, and extracting firmware images")
11141 (license license:expat))))
11142
11143 (define-public python-nltk
11144 (package
11145 (name "python-nltk")
11146 (version "3.2.1")
11147 (source (origin
11148 (method url-fetch)
11149 (uri (pypi-uri "nltk" version))
11150 (sha256
11151 (base32
11152 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11153 (build-system python-build-system)
11154 (arguments
11155 '(;; The tests require some extra resources to be downloaded.
11156 ;; TODO Try packaging these resources.
11157 #:tests? #f))
11158 (home-page "http://nltk.org/")
11159 (synopsis "Natural Language Toolkit")
11160 (description "It provides interfaces to over 50 corpora and lexical
11161 resources such as WordNet, along with a suite of text processing libraries
11162 for classification, tokenization, stemming, tagging, parsing, and semantic
11163 reasoning, wrappers for natural language processing libraries.")
11164 (license license:asl2.0)))
11165
11166 (define-public python2-nltk
11167 (package-with-python2 python-nltk))
11168
11169 (define-public python-pymongo
11170 (package
11171 (name "python-pymongo")
11172 (version "3.7.2")
11173 (source (origin
11174 (method url-fetch)
11175 (uri (pypi-uri "pymongo" version))
11176 (sha256
11177 (base32
11178 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
11179 (build-system python-build-system)
11180 (propagated-inputs
11181 `(("python-certifi" ,python-certifi)))
11182 (home-page "https://github.com/mongodb/mongo-python-driver")
11183 (synopsis "Python driver for MongoDB")
11184 (description "Python driver for MongoDB.")
11185 (license license:asl2.0)))
11186
11187 (define-public python2-pymongo
11188 (package-with-python2 python-pymongo))
11189
11190 (define-public python-consul
11191 (package
11192 (name "python-consul")
11193 (version "0.6.1")
11194 (source
11195 (origin
11196 (method url-fetch)
11197 (uri (pypi-uri "python-consul" version))
11198 (sha256
11199 (base32
11200 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11201 (build-system python-build-system)
11202 (arguments
11203 '(#:tests? #f)) ; The tests are not distributed
11204 (propagated-inputs
11205 `(("python-requests" ,python-requests)
11206 ("python-six" ,python-six)))
11207 (home-page "https://github.com/cablehead/python-consul")
11208 (synopsis "Python client for Consul")
11209 (description
11210 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11211 discovery, monitoring and configuration.")
11212 (license license:expat)))
11213
11214 (define-public python2-consul
11215 (package-with-python2 python-consul))
11216
11217 (define-public python-schematics
11218 (package
11219 (name "python-schematics")
11220 (version "1.1.1")
11221 (source
11222 (origin
11223 (method git-fetch)
11224 (uri (git-reference
11225 (url "https://github.com/schematics/schematics.git")
11226 (commit (string-append "v" version))))
11227 (file-name (git-file-name name version))
11228 (sha256
11229 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
11230 (build-system python-build-system)
11231 (propagated-inputs
11232 `(("python-six" ,python-six)))
11233 (arguments
11234 ;; The tests require a bunch of not very nice packages with fixed
11235 ;; version requirements (e.g. python-coveralls).
11236 `(#:tests? #f))
11237 (home-page "https://github.com/schematics/schematics")
11238 (synopsis "Python Data Structures for Humans")
11239 (description "Python Data Structures for Humans.")
11240 (license license:bsd-3)))
11241
11242 (define-public python2-schematics
11243 (package-with-python2 python-schematics))
11244
11245 (define-public python-odfpy
11246 (package
11247 (name "python-odfpy")
11248 (version "1.3.3")
11249 (source (origin
11250 (method url-fetch)
11251 (uri (pypi-uri "odfpy" version))
11252 (sha256
11253 (base32
11254 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11255 (arguments
11256 `(#:modules ((srfi srfi-1)
11257 (guix build python-build-system)
11258 (guix build utils))
11259 #:phases
11260 (modify-phases %standard-phases
11261 (replace 'check
11262 ;; The test runner invokes python2 and python3 for test*.py.
11263 ;; To avoid having both in inputs, we replicate it here.
11264 (lambda _
11265 (for-each (lambda (test-file) (invoke "python" test-file))
11266 (find-files "tests" "^test.*\\.py$"))
11267 #t)))))
11268 (build-system python-build-system)
11269 (home-page "https://github.com/eea/odfpy")
11270 (synopsis "Python API and tools to manipulate OpenDocument files")
11271 (description "Collection of libraries and utility programs written in
11272 Python to manipulate OpenDocument 1.2 files.")
11273 (license
11274 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11275 ;; number of files with other licenses.
11276 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11277
11278 (define-public python2-odfpy
11279 (package-with-python2 python-odfpy))
11280
11281 (define-public python-natsort
11282 (package
11283 (name "python-natsort")
11284 (version "5.4.1")
11285 (source (origin
11286 (method url-fetch)
11287 (uri (pypi-uri "natsort" version))
11288 (sha256
11289 (base32
11290 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
11291 (build-system python-build-system)
11292 (arguments
11293 `(#:modules ((guix build utils)
11294 (guix build python-build-system)
11295 (srfi srfi-1)
11296 (srfi srfi-26)
11297 (ice-9 ftw))
11298 #:phases
11299 (modify-phases %standard-phases
11300 (add-before 'check 'set-cachedir
11301 ;; Tests require write access to $HOME by default
11302 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
11303 (replace 'check
11304 (lambda _
11305 (let ((cwd (getcwd)))
11306 (setenv "PYTHONPATH"
11307 (string-append
11308 cwd "/build/"
11309 (find (cut string-prefix? "lib" <>)
11310 (scandir (string-append cwd "/build")))
11311 ":"
11312 (getenv "PYTHONPATH")))
11313 (invoke "pytest" "-v")))))))
11314 (native-inputs
11315 `(("python-hypothesis" ,python-hypothesis)
11316 ("python-pytest-cov" ,python-pytest-cov)
11317 ("python-pytest-mock" ,python-pytest-mock)
11318 ("python-pytest" ,python-pytest)))
11319 (propagated-inputs ; TODO: Add python-fastnumbers.
11320 `(("python-pyicu" ,python-pyicu)))
11321 (home-page "https://github.com/SethMMorton/natsort")
11322 (synopsis "Natural sorting for python and shell")
11323 (description
11324 "Natsort lets you apply natural sorting on lists instead of
11325 lexicographical. If you use the built-in @code{sorted} method in python
11326 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
11327 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
11328 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
11329 identifies numbers and sorts them separately from strings. It can also sort
11330 version numbers, real numbers, mixed types and more, and comes with a shell
11331 command @command{natsort} that exposes this functionality in the command line.")
11332 (license license:expat)
11333 (properties `((python2-variant . ,(delay python2-natsort))))))
11334
11335 (define-public python2-natsort
11336 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11337 (package (inherit base)
11338 (native-inputs
11339 `(("python2-pathlib" ,python2-pathlib)
11340 ,@(package-native-inputs base))))))
11341
11342 (define-public python-glances
11343 (package
11344 (name "python-glances")
11345 (version "3.1.1")
11346 (source
11347 (origin
11348 (method url-fetch)
11349 (uri (pypi-uri "Glances" version))
11350 (sha256
11351 (base32
11352 "07j1ggzsqiskyz1i4mrnyr9i95v0dqi0i0hibnv1l188km8shmi8"))
11353 (modules '((guix build utils)))
11354 (snippet
11355 '(begin
11356 ;; Glances phones PyPI for weekly update checks by default.
11357 ;; Disable these. The user can re-enable them if desired.
11358 (substitute* "glances/outdated.py"
11359 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
11360 (string-append indentation
11361 "self.args.disable_check_update = True\n"
11362 line)))
11363 #t))))
11364 (build-system python-build-system)
11365 (propagated-inputs
11366 `(("python-future" ,python-future)
11367 ("python-psutil" ,python-psutil)))
11368 (home-page
11369 "https://github.com/nicolargo/glances")
11370 (synopsis "Cross-platform curses-based monitoring tool")
11371 (description
11372 "Glances is a curses-based monitoring tool for a wide variety of platforms.
11373 Glances uses the PsUtil library to get information from your system. It
11374 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
11375 (license license:lgpl3+)))
11376
11377 (define-public python2-glances
11378 (package-with-python2 python-glances))
11379
11380 (define-public python-graphql-core
11381 (package
11382 (name "python-graphql-core")
11383 (version "0.5.3")
11384 (source
11385 (origin
11386 (method url-fetch)
11387 (uri (pypi-uri "graphql-core" version))
11388 (sha256
11389 (base32
11390 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11391 (build-system python-build-system)
11392 (arguments
11393 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11394 #:phases
11395 (modify-phases %standard-phases
11396 (add-after 'unpack 'patch-hardcoded-version
11397 (lambda _ (substitute*
11398 "setup.py"
11399 (("'gevent==1.1rc1'") "'gevent'"))
11400 #t)))))
11401 (native-inputs
11402 `(("python-gevent" ,python-gevent)
11403 ("python-mock" ,python-mock)
11404 ("python-pytest-mock" ,python-pytest-mock)))
11405 (propagated-inputs
11406 `(("python-promise" ,python-promise)
11407 ("python-six" ,python-six)))
11408 (home-page "https://github.com/graphql-python/graphql-core")
11409 (synopsis "GraphQL implementation for Python")
11410 (description
11411 "GraphQL implementation for Python. GraphQL is a data query language and
11412 runtime designed and used to request and deliver data to mobile and web apps.
11413 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11414 to Python.")
11415 (license license:expat)))
11416
11417 (define-public python2-graphql-core
11418 (package-with-python2 python-graphql-core))
11419
11420 (define-public python-graphql-relay
11421 (package
11422 (name "python-graphql-relay")
11423 (version "0.4.5")
11424 (source
11425 (origin
11426 (method url-fetch)
11427 (uri (pypi-uri "graphql-relay" version))
11428 (sha256
11429 (base32
11430 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
11431 (build-system python-build-system)
11432 (arguments
11433 '(#:tests? #f)) ; The tests are not distributed
11434 (propagated-inputs
11435 `(("python-graphql-core" ,python-graphql-core)
11436 ("python-promise" ,python-promise)
11437 ("python-six" ,python-six)))
11438 (home-page "https://github.com/graphql-python/graphql-relay-py")
11439 (synopsis "Relay implementation for Python")
11440 (description
11441 "This is a library to allow the easy creation of Relay-compliant servers
11442 using the GraphQL Python reference implementation of a GraphQL server. It
11443 should be noted that the code is a exact port of the original
11444 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11445 from Facebook.")
11446 (license license:expat)))
11447
11448 (define-public python2-graphql-relay
11449 (package-with-python2 python-graphql-relay))
11450
11451 (define-public python-graphene
11452 (package
11453 (name "python-graphene")
11454 (version "0.10.2")
11455 (source
11456 (origin
11457 (method url-fetch)
11458 (uri (pypi-uri "graphene" version))
11459 (sha256
11460 (base32
11461 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11462 (build-system python-build-system)
11463 (propagated-inputs
11464 `(("python-graphql-core" ,python-graphql-core)
11465 ("python-graphql-relay" ,python-graphql-relay)
11466 ("python-iso8601" ,python-iso8601)
11467 ("python-promise" ,python-promise)
11468 ("python-six" ,python-six)))
11469 (arguments
11470 `(#:tests? #f)) ; no tests/ in the PyPI tarball
11471 (home-page "http://graphene-python.org/")
11472 (synopsis "GraphQL Framework for Python")
11473 (description
11474 "Graphene is a Python library for building GraphQL schemas/types.
11475 A GraphQL schema describes your data model, and provides a GraphQL server
11476 with an associated set of resolve methods that know how to fetch data.")
11477 (properties `((python2-variant . ,(delay python2-graphene))))
11478 (license license:expat)))
11479
11480 (define-public python2-graphene
11481 (let ((base (package-with-python2
11482 (strip-python2-variant python-graphene))))
11483 (package (inherit base)
11484 (native-inputs
11485 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11486 ,@(package-native-inputs base))))))
11487
11488 (define-public python-nautilus
11489 (package
11490 (name "python-nautilus")
11491 (version "0.4.9")
11492 (source
11493 (origin
11494 (method url-fetch)
11495 (uri (pypi-uri "nautilus" version))
11496 (sha256
11497 (base32
11498 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11499 (build-system python-build-system)
11500 (arguments `(#:tests? #f)) ; fails to import test modules
11501 (propagated-inputs
11502 `(("python-bcrypt" ,python-bcrypt)
11503 ("python-click" ,python-click)
11504 ("python-consul" ,python-consul)
11505 ("python-graphene" ,python-graphene)
11506 ("python-jinja2" ,python-jinja2)
11507 ("python-peewee" ,python-peewee)
11508 ("python-pika" ,python-pika)
11509 ("python-tornado" ,python-tornado)
11510 ("python-wtforms" ,python-wtforms)))
11511 (native-inputs
11512 `(("python-nose2" ,python-nose2)))
11513 (home-page "https://github.com/AlecAivazis/nautilus")
11514 (synopsis "Library for creating microservice applications")
11515 (description
11516 "Nautilus is a framework for flux based microservices that looks to
11517 provide extendible implementations of common aspects of a cloud so that you can
11518 focus on building massively scalable web applications.")
11519 (license license:expat)))
11520
11521 (define-public python-snowballstemmer
11522 (package
11523 (name "python-snowballstemmer")
11524 (version "1.2.1")
11525 (source (origin
11526 (method url-fetch)
11527 (uri (pypi-uri "snowballstemmer" version))
11528 (sha256
11529 (base32
11530 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11531 (build-system python-build-system)
11532 (arguments
11533 `(;; No tests exist
11534 #:tests? #f))
11535 (home-page "https://github.com/shibukawa/snowball_py")
11536 (synopsis "Snowball stemming library collection for Python")
11537 (description "This package provides 16 word stemmer algorithms generated
11538 from Snowball algorithms. It includes the 15 original ones plus the Poerter
11539 English stemmer.")
11540 (license license:bsd-3)))
11541
11542 (define-public python2-snowballstemmer
11543 (package-with-python2 python-snowballstemmer))
11544
11545 (define-public python-setproctitle
11546 (package
11547 (name "python-setproctitle")
11548 (version "1.1.10")
11549 (source
11550 (origin
11551 (method url-fetch)
11552 (uri (pypi-uri "setproctitle" version))
11553 (sha256
11554 (base32
11555 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11556 (build-system python-build-system)
11557 (arguments
11558 '(#:phases
11559 (modify-phases %standard-phases
11560 (add-before 'check 'patch-Makefile
11561 ;; Stricly this is only required for the python2 variant.
11562 ;; But adding a phase in an inherited package seems to be
11563 ;; cumbersum. So we patch even for python3.
11564 (lambda _
11565 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11566 (when nose
11567 (substitute* "Makefile"
11568 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11569 (string-append nose "/bin/nosetests "))))
11570 #t)))
11571 (replace 'check
11572 (lambda _
11573 (setenv "PYTHON" (or (which "python3") (which "python")))
11574 (setenv "PYCONFIG" (or (which "python3-config")
11575 (which "python-config")))
11576 (setenv "CC" "gcc")
11577 ;; No need to extend PYTHONPATH to find the built package, since
11578 ;; the Makefile will build anyway
11579 (invoke "make" "check"))))))
11580 (native-inputs
11581 `(("procps" ,procps))) ; required for tests
11582 (home-page
11583 "https://github.com/dvarrazzo/py-setproctitle")
11584 (synopsis
11585 "Setproctitle implementation for Python to customize the process title")
11586 (description "The library allows a process to change its title (as displayed
11587 by system tools such as ps and top).
11588
11589 Changing the title is mostly useful in multi-process systems, for
11590 example when a master process is forked: changing the children's title
11591 allows to identify the task each process is busy with. The technique
11592 is used by PostgreSQL and the OpenSSH Server for example.")
11593 (license license:bsd-3)
11594 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11595
11596 (define-public python2-setproctitle
11597 (let ((base (package-with-python2
11598 (strip-python2-variant python-setproctitle))))
11599 (package
11600 (inherit base)
11601 (native-inputs `(("python2-nose" ,python2-nose)
11602 ,@(package-native-inputs base))))))
11603
11604 (define-public python-validictory
11605 (package
11606 (name "python-validictory")
11607 (version "1.0.1")
11608 (source
11609 (origin
11610 (method url-fetch)
11611 (uri (pypi-uri "validictory" version))
11612 (sha256
11613 (base32
11614 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11615 (build-system python-build-system)
11616 (arguments
11617 '(#:phases
11618 (modify-phases %standard-phases
11619 (add-after 'unpack 'bootstrap
11620 ;; Move the tests out of the package directory to avoid
11621 ;; packaging them.
11622 (lambda* _
11623 (rename-file "validictory/tests" "tests")
11624 (delete-file "tests/__init__.py")))
11625 (replace 'check
11626 (lambda _
11627 ;; Extend PYTHONPATH so the built package will be found.
11628 (setenv "PYTHONPATH"
11629 (string-append (getcwd) "/build/lib:"
11630 (getenv "PYTHONPATH")))
11631 (invoke "py.test" "-vv" ))))))
11632 (native-inputs
11633 `(("python-pytest" ,python-pytest)))
11634 (home-page
11635 "https://github.com/jamesturk/validictory")
11636 (synopsis "General purpose Python data validator")
11637 (description "It allows validation of arbitrary Python data structures.
11638
11639 The schema format is based on the JSON Schema
11640 proposal (http://json-schema.org), so combined with json the library is also
11641 useful as a validator for JSON data.")
11642 (license license:expat)))
11643
11644 (define-public python2-validictory
11645 (package-with-python2 python-validictory))
11646
11647 (define-public python-pyelftools
11648 (package
11649 (name "python-pyelftools")
11650 (version "0.25")
11651 (source
11652 (origin
11653 (method url-fetch)
11654 (uri (pypi-uri "pyelftools" version))
11655 (sha256
11656 (base32
11657 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11658 (build-system python-build-system)
11659 (arguments
11660 `(#:phases
11661 (modify-phases %standard-phases
11662 (add-before 'check 'set-pythonpath
11663 (lambda _
11664 (setenv "PYTHONPATH"
11665 (string-append
11666 (getcwd) "/test/"
11667 ":" (getenv "PYTHONPATH")))
11668 #t)))))
11669 (home-page
11670 "https://github.com/eliben/pyelftools")
11671 (synopsis
11672 "Analyze binary and library file information")
11673 (description "This Python library provides interfaces for parsing and
11674 analyzing two binary and library file formats; the Executable and Linking
11675 Format (ELF), and debugging information in the Debugging With Attributed
11676 Record Format (DWARF).")
11677 (license license:public-domain)))
11678
11679 (define-public python-pyev
11680 (package
11681 (name "python-pyev")
11682 (version "0.9.0")
11683 (source
11684 (origin
11685 (method url-fetch)
11686 (uri (pypi-uri "pyev" version))
11687 (sha256
11688 (base32
11689 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11690 (build-system python-build-system)
11691 (arguments
11692 `(#:tests? #f ; no test suite
11693 #:phases
11694 (modify-phases %standard-phases
11695 (add-after 'unpack 'patch
11696 (lambda* (#:key inputs #:allow-other-keys)
11697 (let ((libev (string-append (assoc-ref inputs "libev")
11698 "/lib/libev.so.4")))
11699 (substitute* "setup.py"
11700 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11701 (string-append "libev_dll_name = \"" libev "\"")))))))))
11702 (inputs
11703 `(("libev" ,libev)))
11704 (home-page "http://pythonhosted.org/pyev/")
11705 (synopsis "Python libev interface")
11706 (description "Pyev provides a Python interface to libev.")
11707 (license license:gpl3)))
11708
11709 (define-public python2-pyev
11710 (package-with-python2 python-pyev))
11711
11712 (define-public python-imagesize
11713 (package
11714 (name "python-imagesize")
11715 (version "1.1.0")
11716 (source
11717 (origin
11718 (method url-fetch)
11719 (uri (pypi-uri "imagesize" version))
11720 (sha256
11721 (base32
11722 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11723 (build-system python-build-system)
11724 (home-page "https://github.com/shibukawa/imagesize_py")
11725 (synopsis "Gets image size of files in various formats in Python")
11726 (description
11727 "This package allows determination of image size from
11728 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11729 (license license:expat)))
11730
11731 (define-public python2-imagesize
11732 (package-with-python2 python-imagesize))
11733
11734 (define-public python-termstyle
11735 (package
11736 (name "python-termstyle")
11737 (version "0.1.11")
11738 (source
11739 (origin
11740 (method url-fetch)
11741 (uri (pypi-uri "termstyle" version))
11742 (sha256
11743 (base32
11744 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11745 (build-system python-build-system)
11746 (arguments
11747 '(#:phases
11748 (modify-phases %standard-phases
11749 (replace 'check
11750 (lambda _
11751 (invoke "python" "test3.py"))))))
11752 (home-page "https://github.com/gfxmonk/termstyle")
11753 (synopsis "Console text coloring for Python")
11754 (description "This package provides console text coloring for Python.")
11755 (license license:bsd-3)))
11756
11757 (define-public python-argcomplete
11758 (package
11759 (name "python-argcomplete")
11760 (version "1.7.0")
11761 (source
11762 (origin
11763 (method url-fetch)
11764 (uri (pypi-uri "argcomplete" version))
11765 (sha256
11766 (base32
11767 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
11768 (build-system python-build-system)
11769 (native-inputs
11770 `(("python-pexpect" ,python-pexpect)
11771 ("tcsh" ,tcsh)
11772 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
11773 (home-page "https://github.com/kislyuk/argcomplete")
11774 (synopsis "Shell tab completion for Python argparse")
11775 (description "argcomplete provides extensible command line tab completion
11776 of arguments and options for Python scripts using @code{argparse}. It's
11777 particularly useful for programs with many options or sub-parsers that can
11778 dynamically suggest completions; for example, when browsing resources over the
11779 network.")
11780 (license license:asl2.0)))
11781
11782 (define-public python2-argcomplete
11783 (package-with-python2 python-argcomplete))
11784
11785 (define-public python-xopen
11786 (package
11787 (name "python-xopen")
11788 (version "0.5.0")
11789 (source
11790 (origin
11791 (method url-fetch)
11792 (uri (pypi-uri "xopen" version))
11793 (sha256
11794 (base32
11795 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
11796 (build-system python-build-system)
11797 (propagated-inputs
11798 `(("python-setuptools-scm" ,python-setuptools-scm)))
11799 (home-page "https://github.com/marcelm/xopen/")
11800 (synopsis "Open compressed files transparently")
11801 (description "This module provides an @code{xopen} function that works like
11802 Python's built-in @code{open} function, but can also deal with compressed files.
11803 Supported compression formats are gzip, bzip2 and, xz, and are automatically
11804 recognized by their file extensions. The focus is on being as efficient as
11805 possible on all supported Python versions.")
11806 (license license:expat)))
11807
11808 (define-public python2-xopen
11809 (let ((base (package-with-python2
11810 (strip-python2-variant python-xopen))))
11811 (package
11812 (inherit base)
11813 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
11814 ,@(package-propagated-inputs base))))))
11815
11816 (define-public python-cheetah
11817 (package
11818 (name "python-cheetah")
11819 (version "3.1.0")
11820 (source
11821 (origin
11822 (method url-fetch)
11823 (uri (pypi-uri "Cheetah3" version))
11824 (sha256
11825 (base32
11826 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
11827 (build-system python-build-system)
11828 (arguments
11829 `(#:modules ((guix build utils)
11830 (guix build python-build-system)
11831 (ice-9 ftw)
11832 (srfi srfi-1)
11833 (srfi srfi-26))
11834 #:phases (modify-phases %standard-phases
11835 (add-after 'unpack 'use-absolute-python
11836 (lambda _
11837 (substitute* "Cheetah/CheetahWrapper.py"
11838 (("#!/usr/bin/env python")
11839 (string-append "#!" (which "python"))))
11840 #t))
11841 (replace 'check
11842 (lambda _
11843 (let ((cwd (getcwd)))
11844 (setenv "PYTHONPATH"
11845 (string-append
11846 cwd "/build/"
11847 (find (cut string-prefix? "lib" <>)
11848 (scandir (string-append cwd "/build")))
11849 ":" (getenv "PYTHONPATH")))
11850 (setenv "PATH"
11851 (string-append (getenv "PATH")
11852 ":" cwd "/bin"))
11853 (setenv "TMPDIR" "/tmp")
11854
11855 (substitute* "Cheetah/Tests/Test.py"
11856 (("unittest.TextTestRunner\\(\\)")
11857 "unittest.TextTestRunner(verbosity=2)"))
11858
11859 (invoke "python" "Cheetah/Tests/Test.py")))))))
11860 (propagated-inputs
11861 `(("python-markdown" ,python-markdown))) ;optional
11862 (home-page "http://cheetahtemplate.org/")
11863 (synopsis "Template engine")
11864 (description "Cheetah is a text-based template engine and Python code
11865 generator.
11866
11867 Cheetah can be used as a standalone templating utility or referenced as
11868 a library from other Python applications. It has many potential uses,
11869 but web developers looking for a viable alternative to ASP, JSP, PHP and
11870 PSP are expected to be its principle user group.
11871
11872 Features:
11873 @enumerate
11874 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
11875 text-based format.
11876 @item Cleanly separates content, graphic design, and program code.
11877 @item Blends the power and flexibility of Python with a simple template language
11878 that non-programmers can understand.
11879 @item Gives template writers full access to any Python data structure, module,
11880 function, object, or method in their templates.
11881 @item Makes code reuse easy by providing an object-orientated interface to
11882 templates that is accessible from Python code or other Cheetah templates.
11883 One template can subclass another and selectively reimplement sections of it.
11884 @item Provides a simple, yet powerful, caching mechanism that can dramatically
11885 improve the performance of a dynamic website.
11886 @item Compiles templates into optimized, yet readable, Python code.
11887 @end enumerate")
11888 (license (license:x11-style "file://LICENSE"))))
11889
11890 (define-public python2-cheetah
11891 (package-with-python2 python-cheetah))
11892
11893 (define-public python-dulwich
11894 (package
11895 (name "python-dulwich")
11896 (version "0.18.6")
11897 (source
11898 (origin
11899 (method url-fetch)
11900 (uri (list (string-append "https://www.dulwich.io/releases/"
11901 "dulwich-" version ".tar.gz")
11902 (pypi-uri "dulwich" version)))
11903 (sha256
11904 (base32
11905 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
11906 (build-system python-build-system)
11907 (arguments
11908 `(#:phases
11909 (modify-phases %standard-phases
11910 (add-before 'check 'fix-tests
11911 (lambda* (#:key inputs #:allow-other-keys)
11912 ;; The tests use Popen with a custom environment which doesn't
11913 ;; include PATH.
11914 (substitute* "dulwich/tests/compat/utils.py"
11915 (("'git'") (string-append "'"
11916 (which "git")
11917 "'")))
11918 (substitute* '("dulwich/tests/test_repository.py"
11919 "dulwich/tests/test_hooks.py")
11920 (("#!/bin/sh") (string-append "#!" (which "sh"))))
11921 (setenv "TEST_RUNNER" "unittest")
11922 (setenv "PYTHONHASHSEED" "random")
11923 #t)))))
11924 (propagated-inputs
11925 `(("python-fastimport" ,python-fastimport)))
11926 (native-inputs
11927 `(("python-mock" ,python-mock)
11928 ("python-geventhttpclient" ,python-geventhttpclient)
11929 ("git" ,git)))
11930 (home-page "https://www.dulwich.io/")
11931 (synopsis "Git implementation in Python")
11932 (description "Dulwich is an implementation of the Git file formats and
11933 protocols written in pure Python.")
11934 ;; Can be used with either license.
11935 (license (list license:asl2.0 license:gpl2+))))
11936
11937 (define-public python2-dulwich
11938 (package-with-python2 python-dulwich))
11939
11940 (define-public python-pbkdf2
11941 (package
11942 (name "python-pbkdf2")
11943 (version "1.3")
11944 (source
11945 (origin
11946 (method url-fetch)
11947 (uri (pypi-uri "pbkdf2" version))
11948 (sha256
11949 (base32
11950 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
11951 (build-system python-build-system)
11952 (arguments
11953 '(#:phases
11954 (modify-phases %standard-phases
11955 (replace 'check
11956 (lambda _
11957 (setenv "PYTHONPATH"
11958 (string-append (getcwd) "/build/lib:"
11959 (getenv "PYTHONPATH")))
11960 (invoke "python" "test/test_pbkdf2.py"))))))
11961 (propagated-inputs
11962 `(("python-pycrypto" ,python-pycrypto))) ; optional
11963 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
11964 (synopsis "Password-based key derivation")
11965 (description "This module implements the password-based key derivation
11966 function, PBKDF2, specified in RSA PKCS#5 v2.0.
11967
11968 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
11969 is part of the RSA Public Key Cryptography Standards series. The provided
11970 implementation takes a password or a passphrase and a salt value (and
11971 optionally a iteration count, a digest module, and a MAC module) and provides
11972 a file-like object from which an arbitrarly-sized key can be read.")
11973 (license license:expat)))
11974
11975 (define-public python2-pbkdf2
11976 (package-with-python2 python-pbkdf2))
11977
11978 (define-public python-qrcode
11979 (package
11980 (name "python-qrcode")
11981 (version "6.1")
11982 (source
11983 (origin
11984 (method url-fetch)
11985 (uri (pypi-uri "qrcode" version))
11986 (sha256
11987 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
11988 (build-system python-build-system)
11989 (arguments
11990 ;; FIXME: Tests require packaging 'pymaging'.
11991 '(#:tests? #f))
11992 (propagated-inputs
11993 `(("python-lxml" ,python-lxml) ; for SVG output
11994 ("python-pillow" ,python-pillow) ; for PNG output
11995 ("python-six" ,python-six)))
11996 (home-page "https://github.com/lincolnloop/python-qrcode")
11997 (synopsis "QR Code image generator")
11998 (description "This package provides a pure Python QR Code generator
11999 module. It uses the Python Imaging Library (PIL) to allow for the generation
12000 of QR Codes.
12001
12002 In addition this package provides a command line tool to generate QR codes and
12003 either write these QR codes to a file or do the output as ascii art at the
12004 console.")
12005 (license license:bsd-3)))
12006
12007 (define-public python2-qrcode
12008 (package-with-python2 python-qrcode))
12009
12010 (define-public python-rst2ansi
12011 (package
12012 (name "python-rst2ansi")
12013 (version "0.1.5")
12014 (source
12015 (origin
12016 (method url-fetch)
12017 (uri (pypi-uri "rst2ansi" version))
12018 (sha256
12019 (base32
12020 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
12021 (build-system python-build-system)
12022 (propagated-inputs
12023 `(("python-docutils" ,python-docutils)))
12024 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
12025 (synopsis "Convert RST to ANSI-decorated console output")
12026 (description
12027 "Python module dedicated to rendering RST (reStructuredText) documents
12028 to ansi-escaped strings suitable for display in a terminal.")
12029 (license license:expat)))
12030
12031 (define-public python-ansi2html
12032 (package
12033 (name "python-ansi2html")
12034 (version "1.2.0")
12035 (source
12036 (origin
12037 (method url-fetch)
12038 (uri (pypi-uri "ansi2html" version))
12039 (sha256
12040 (base32
12041 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
12042 (build-system python-build-system)
12043 (native-inputs
12044 `(("python-mock" ,python-mock)
12045 ("python-nose" ,python-nose)))
12046 (propagated-inputs
12047 `(("python-six" ,python-six)))
12048 (home-page "https://github.com/ralphbean/ansi2html")
12049 (synopsis "Convert ANSI-decorated console output to HTML")
12050 (description
12051 "@command{ansi2html} is a Python library and command line utility for
12052 convering text with ANSI color codes to HTML or LaTeX.")
12053 (license license:gpl3+)))
12054
12055 (define-public python2-ansi2html
12056 (package-with-python2 python-ansi2html))
12057
12058 (define-public python-ddt
12059 (package
12060 (name "python-ddt")
12061 (version "1.1.3")
12062 (source
12063 (origin
12064 (method url-fetch)
12065 (uri (pypi-uri "ddt" version))
12066 (sha256
12067 (base32
12068 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
12069 (build-system python-build-system)
12070 (native-inputs
12071 `(("python-mock" ,python-mock)
12072 ("python-nose" ,python-nose)))
12073 (propagated-inputs
12074 `(("python-six" ,python-six)
12075 ("python-pyyaml" ,python-pyyaml)))
12076 (home-page "https://github.com/txels/ddt")
12077 (synopsis "Data-Driven Tests")
12078 (description
12079 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
12080 running it with different test data, and make it appear as multiple test
12081 cases.")
12082 (license license:expat)))
12083
12084 (define-public python2-ddt
12085 (package-with-python2 python-ddt))
12086
12087 (define-public python-pycountry
12088 (package
12089 (name "python-pycountry")
12090 (version "18.5.26")
12091 (source
12092 (origin
12093 (method url-fetch)
12094 (uri (pypi-uri "pycountry" version))
12095 (sha256
12096 (base32
12097 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
12098 (build-system python-build-system)
12099 (home-page "https://bitbucket.org/flyingcircus/pycountry")
12100 (synopsis "ISO databases for languages, countries, currencies, etc.")
12101 (description
12102 "@code{pycountry} provides the ISO databases for the standards:
12103 @enumerate
12104 @item 639-3 (Languages)
12105 @item 3166 (Countries)
12106 @item 3166-3 (Deleted Countries)
12107 @item 3166-2 (Subdivisions of countries)
12108 @item 4217 (Currencies)
12109 @item 15924 (Scripts)
12110 @end enumerate
12111 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
12112 through a Python API.")
12113 (license license:lgpl2.1+)))
12114
12115 (define-public python2-pycountry
12116 (package-with-python2 python-pycountry))
12117
12118 (define-public python-pycosat
12119 (package
12120 (name "python-pycosat")
12121 (version "0.6.1")
12122 (source
12123 (origin
12124 (method url-fetch)
12125 (uri (pypi-uri "pycosat" version))
12126 (sha256
12127 (base32
12128 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
12129 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
12130 (build-system python-build-system)
12131 (home-page "https://github.com/ContinuumIO/pycosat")
12132 (synopsis "Bindings to picosat (a SAT solver)")
12133 (description
12134 "This package provides efficient Python bindings to @code{picosat} on
12135 the C level. When importing pycosat, the @code{picosat} solver becomes part
12136 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
12137 Problem} (SAT) solver.")
12138 (license license:expat)))
12139
12140 (define-public python2-pycosat
12141 (package-with-python2 python-pycosat))
12142
12143 (define-public python2-ruamel.ordereddict
12144 (package
12145 (name "python2-ruamel.ordereddict")
12146 (version "0.4.9")
12147 (source
12148 (origin
12149 (method url-fetch)
12150 (uri (pypi-uri "ruamel.ordereddict" version))
12151 (sha256
12152 (base32
12153 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
12154 (build-system python-build-system)
12155 (arguments
12156 `(#:python ,python-2
12157 #:phases
12158 (modify-phases %standard-phases
12159 (delete 'check)
12160 (add-after 'install 'check
12161 (lambda* (#:key inputs outputs #:allow-other-keys)
12162 (add-installed-pythonpath inputs outputs)
12163 (invoke "python" "test/testordereddict.py"))))))
12164 (home-page "https://bitbucket.org/ruamel/ordereddict")
12165 (synopsis "Version of dict that keeps keys in insertion order")
12166 (description
12167 "This is an implementation of an ordered dictionary with @dfn{Key
12168 Insertion Order} (KIO: updates of values do not affect the position of the
12169 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
12170 removed and put at the back). The standard library module @code{OrderedDict},
12171 implemented later, implements a subset of @code{ordereddict} functionality.
12172 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
12173 Order} (KSO, no sorting function can be specified, but a transform can be
12174 specified to apply on the key before comparison (e.g. @code{string.lower})).")
12175 (license license:expat)))
12176
12177 (define-public python-pypeg2
12178 (package
12179 (name "python-pypeg2")
12180 (version "2.15.2")
12181 (source
12182 (origin
12183 (method url-fetch)
12184 (uri (pypi-uri "pyPEG2" version))
12185 (sha256
12186 (base32
12187 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
12188 (build-system python-build-system)
12189 (propagated-inputs `(("python-lxml" ,python-lxml)))
12190 (arguments
12191 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
12192 '(#:tests? #f))
12193 (home-page "https://fdik.org/pyPEG/")
12194 (synopsis "Parsering Expression Grammars in Python")
12195 (description "PyPEG is an intrinsic parser interpreter framework for
12196 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
12197 parse many formal languages.")
12198 (license license:gpl2)))
12199
12200 (define-public python-incremental
12201 (package
12202 (name "python-incremental")
12203 (version "17.5.0")
12204 (source
12205 (origin
12206 (method url-fetch)
12207 (uri (pypi-uri "incremental" version))
12208 (sha256
12209 (base32
12210 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
12211 (build-system python-build-system)
12212 (home-page "https://github.com/hawkowl/incremental")
12213 (synopsis "Library for versioning Python projects")
12214 (description "Incremental is a small library that versions your Python
12215 projects.")
12216 (license license:expat)))
12217
12218 (define-public python2-incremental
12219 (package-with-python2 python-incremental))
12220
12221 (define-public python-invoke
12222 (package
12223 (name "python-invoke")
12224 (home-page "http://www.pyinvoke.org/")
12225 (version "1.1.0")
12226 (source (origin
12227 (method url-fetch)
12228 (uri (pypi-uri "invoke" version))
12229 (sha256
12230 (base32
12231 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
12232 (build-system python-build-system)
12233 (arguments
12234 ;; XXX: Requires many dependencies that are not yet in Guix.
12235 `(#:tests? #f))
12236 (synopsis "Pythonic task execution")
12237 (description
12238 "Invoke is a Python task execution tool and library, drawing inspiration
12239 from various sources to arrive at a powerful and clean feature set. It is
12240 evolved from the Fabric project, but focuses on local and abstract concerns
12241 instead of servers and network commands.")
12242 (license license:bsd-3)))
12243
12244 (define-public python2-invoke
12245 (package-with-python2 python-invoke))
12246
12247 (define-public python-automat
12248 (package
12249 (name "python-automat")
12250 (version "0.7.0")
12251 (source (origin
12252 (method url-fetch)
12253 (uri (pypi-uri "Automat" version))
12254 (sha256
12255 (base32
12256 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
12257 (build-system python-build-system)
12258 ;; We disable the tests because they require python-twisted, while
12259 ;; python-twisted depends on python-automat. Twisted is optional, but the
12260 ;; tests fail if it is not available. Also see
12261 ;; <https://github.com/glyph/automat/issues/71>.
12262 (arguments '(#:tests? #f))
12263 (native-inputs
12264 `(("python-m2r" ,python-m2r)
12265 ("python-setuptools-scm" ,python-setuptools-scm)
12266 ("python-graphviz" ,python-graphviz)))
12267 (propagated-inputs
12268 `(("python-six" ,python-six)
12269 ("python-attrs" ,python-attrs)))
12270 (home-page "https://github.com/glyph/Automat")
12271 (synopsis "Self-service finite-state machines")
12272 (description "Automat is a library for concise, idiomatic Python
12273 expression of finite-state automata (particularly deterministic finite-state
12274 transducers).")
12275 (license license:expat)))
12276
12277 (define-public python2-automat
12278 (package-with-python2 python-automat))
12279
12280 (define-public python-m2r
12281 (package
12282 (name "python-m2r")
12283 (version "0.2.1")
12284 (source (origin
12285 (method url-fetch)
12286 (uri (pypi-uri "m2r" version))
12287 (sha256
12288 (base32
12289 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
12290 (build-system python-build-system)
12291 (propagated-inputs
12292 `(("python-docutils" ,python-docutils)
12293 ("python-mistune" ,python-mistune)))
12294 (native-inputs
12295 `(("python-pygments" ,python-pygments)
12296 ("python-mock" ,python-mock)))
12297 (home-page "https://github.com/miyakogi/m2r")
12298 (synopsis "Markdown to reStructuredText converter")
12299 (description "M2R converts a markdown file including reST markups to valid
12300 reST format.")
12301 (license license:expat)))
12302
12303 (define-public python2-m2r
12304 (package-with-python2 python-m2r))
12305
12306 (define-public python-constantly
12307 (package
12308 (name "python-constantly")
12309 (version "15.1.0")
12310 (source (origin
12311 (method url-fetch)
12312 (uri (pypi-uri "constantly" version))
12313 (sha256
12314 (base32
12315 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
12316 (build-system python-build-system)
12317 (home-page "https://github.com/twisted/constantly")
12318 (synopsis "Symbolic constants in Python")
12319 (description "Constantly is a Python library that provides symbolic
12320 constant support. It includes collections and constants with text, numeric,
12321 and bit flag values.")
12322 (license license:expat)))
12323
12324 (define-public python2-constantly
12325 (package-with-python2 python-constantly))
12326
12327 (define-public python-attrs
12328 (package
12329 (name "python-attrs")
12330 (version "19.1.0")
12331 (source (origin
12332 (method url-fetch)
12333 (uri (pypi-uri "attrs" version))
12334 (sha256
12335 (base32
12336 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
12337 (build-system python-build-system)
12338 (arguments
12339 `(#:modules ((guix build utils)
12340 (guix build python-build-system)
12341 (ice-9 ftw)
12342 (srfi srfi-1)
12343 (srfi srfi-26))
12344 #:phases (modify-phases %standard-phases
12345 (replace 'check
12346 (lambda _
12347 (let ((cwd (getcwd)))
12348 (setenv "PYTHONPATH"
12349 (string-append
12350 cwd "/build/"
12351 (find (cut string-prefix? "lib" <>)
12352 (scandir (string-append cwd "/build")))
12353 ":"
12354 (getenv "PYTHONPATH")))
12355 (invoke "python" "-m" "pytest")))))))
12356 (native-inputs
12357 `(("python-coverage" ,python-coverage)
12358 ("python-hypothesis" ,python-hypothesis)
12359 ("python-pympler" ,python-pympler)
12360 ("python-pytest" ,python-pytest)
12361 ("python-six" ,python-six)
12362 ("python-sphinx" ,python-sphinx)
12363 ("python-zope-interface" ,python-zope-interface)))
12364 (home-page "https://github.com/python-attrs/attrs/")
12365 (synopsis "Attributes without boilerplate")
12366 (description "@code{attrs} is a Python package with class decorators that
12367 ease the chores of implementing the most common attribute-related object
12368 protocols.")
12369 (license license:expat)))
12370
12371 (define-public python2-attrs
12372 (package-with-python2 python-attrs))
12373
12374 (define-public python-attrs-bootstrap
12375 (package
12376 (inherit python-attrs)
12377 (name "python-attrs-bootstrap")
12378 (native-inputs `())
12379 (arguments `(#:tests? #f))))
12380
12381 (define-public python2-attrs-bootstrap
12382 (package-with-python2 python-attrs-bootstrap))
12383
12384 (define-public python2-cliapp
12385 (package
12386 (name "python2-cliapp")
12387 (version "1.20180812.1")
12388 (source
12389 (origin
12390 (method url-fetch)
12391 (uri (string-append
12392 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
12393 version ".tar.gz"))
12394 (sha256
12395 (base32
12396 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
12397 (build-system python-build-system)
12398 (arguments
12399 `(#:python ,python-2
12400 #:phases
12401 (modify-phases %standard-phases
12402 ;; check phase needs to be run before the build phase. If not,
12403 ;; coverage-test-runner looks for tests for the built source files,
12404 ;; and fails.
12405 (delete 'check)
12406 (add-before 'build 'check
12407 (lambda _
12408 ;; Disable python3 tests
12409 (substitute* "check"
12410 (("python3") "# python3"))
12411 (invoke "./check"))))))
12412 (native-inputs
12413 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12414 ("python2-pep8" ,python2-pep8)))
12415 (propagated-inputs
12416 `(("python2-pyaml" ,python2-pyaml)))
12417 (home-page "https://liw.fi/cliapp/")
12418 (synopsis "Python framework for command line programs")
12419 (description "@code{python2-cliapp} is a python framework for
12420 command line programs. It contains the typical stuff such programs
12421 need to do, such as parsing the command line for options, and
12422 iterating over input files.")
12423 (license license:gpl2+)))
12424
12425 (define-public python2-ttystatus
12426 (package
12427 (name "python2-ttystatus")
12428 (version "0.36")
12429 (source
12430 (origin
12431 (method url-fetch)
12432 (uri (string-append
12433 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
12434 version ".tar.gz"))
12435 (sha256
12436 (base32
12437 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
12438 (build-system python-build-system)
12439 (native-inputs
12440 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12441 ("python2-pep8" ,python2-pep8)))
12442 (arguments
12443 `(#:python ,python-2
12444 #:phases
12445 (modify-phases %standard-phases
12446 ;; check phase needs to be run before the build phase. If not,
12447 ;; coverage-test-runner looks for tests for the built source files,
12448 ;; and fails.
12449 (delete 'check)
12450 (add-before 'build 'check
12451 (lambda _ (invoke "make" "check"))))))
12452 (home-page "https://liw.fi/ttystatus/")
12453 (synopsis "Python library for showing progress reporting and
12454 status updates on terminals")
12455 (description "@code{python2-ttystatus} is a python library for
12456 showing progress reporting and status updates on terminals, for
12457 command line programs. Output is automatically adapted to the width
12458 of the terminal: truncated if it does not fit, and resized if the
12459 terminal size changes.")
12460 (license license:gpl3+)))
12461
12462 (define-public python2-tracing
12463 (package
12464 (name "python2-tracing")
12465 (version "0.10")
12466 (source
12467 (origin
12468 (method url-fetch)
12469 (uri (string-append
12470 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
12471 version ".tar.gz"))
12472 (sha256
12473 (base32
12474 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
12475 (build-system python-build-system)
12476 (arguments
12477 `(#:python ,python-2))
12478 (home-page "https://liw.fi/tracing/")
12479 (synopsis "Python debug logging helper")
12480 (description "@code{python2-tracing} is a python library for
12481 logging debug messages. It provides a way to turn debugging messages
12482 on and off, based on the filename they occur in. It is much faster
12483 than using @code{logging.Filter} to accomplish the same thing, which
12484 matters when code is run in production mode. The actual logging still
12485 happens using the @code{logging} library.")
12486 (license license:gpl3+)))
12487
12488 (define-public python2-larch
12489 (package
12490 (name "python2-larch")
12491 (version "1.20151025")
12492 (source
12493 (origin
12494 (method url-fetch)
12495 (uri (string-append
12496 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12497 version ".tar.gz"))
12498 (patches (search-patches
12499 "python2-larch-coverage-4.0a6-compatibility.patch"))
12500 (sha256
12501 (base32
12502 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12503 (build-system python-build-system)
12504 (arguments
12505 `(#:python ,python-2
12506 #:phases
12507 (modify-phases %standard-phases
12508 ;; check phase needs to be run before the build phase. If not,
12509 ;; coverage-test-runner looks for tests for the built source files,
12510 ;; and fails.
12511 (delete 'check)
12512 (add-before 'build 'check
12513 (lambda _ (invoke "make" "check"))))))
12514 (native-inputs
12515 `(("cmdtest" ,cmdtest)
12516 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12517 (propagated-inputs
12518 `(("python2-tracing" ,python2-tracing)))
12519 (home-page "https://liw.fi/larch/")
12520 (synopsis "Python copy-on-write B-tree library")
12521 (description "@code{python2-larch} is an implementation of
12522 particular kind of B-tree, based on research by Ohad Rodeh. See
12523 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12524 on the data structure.
12525
12526 The distinctive feature of this B-tree is that a node is never
12527 (conceptually) modified. Instead, all updates are done by
12528 copy-on-write. This makes it easy to clone a tree, and modify only the
12529 clone, while other processes access the original tree.")
12530 (license license:gpl3+)))
12531
12532 (define-public python-astroid
12533 (package
12534 (name "python-astroid")
12535 (version "2.3.2")
12536 (source
12537 (origin
12538 (method url-fetch)
12539 (uri (pypi-uri "astroid" version))
12540 (sha256
12541 (base32
12542 "0crfhpblcy5a6nh694hc2073gw389f01yilamzqi34si2skgp8q9"))))
12543 (build-system python-build-system)
12544 (propagated-inputs
12545 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12546 ("python-six" ,python-six)
12547 ("python-typed-ast" ,python-typed-ast)
12548 ("python-wrapt" ,python-wrapt)))
12549 (native-inputs
12550 `(("python-dateutil" ,python-dateutil)
12551 ("python-nose" ,python-nose)
12552 ("python-pytest" ,python-pytest)
12553 ("python-pytest-runner" ,python-pytest-runner)))
12554 (arguments
12555 `(#:phases
12556 (modify-phases %standard-phases
12557 (add-after 'unpack 'remove-spurious-test
12558 (lambda _
12559 ;; This can be removed after upgrading from python-3.7
12560 ;; https://github.com/PyCQA/astroid/issues/593
12561 ;; https://bugs.python.org/issue34056
12562 (delete-file "astroid/tests/unittest_modutils.py")
12563 #t))
12564 (replace 'check
12565 (lambda _
12566 (invoke "pytest" "astroid"))))))
12567 (home-page "https://github.com/PyCQA/astroid")
12568 (synopsis "Common base representation of python source code for pylint and
12569 other projects")
12570 (description "@code{python-astroid} provides a common base representation
12571 of python source code for projects such as pychecker, pyreverse, pylint, etc.
12572
12573 It provides a compatible representation which comes from the _ast module. It
12574 rebuilds the tree generated by the builtin _ast module by recursively walking
12575 down the AST and building an extended ast. The new node classes have
12576 additional methods and attributes for different usages. They include some
12577 support for static inference and local name scopes. Furthermore, astroid
12578 builds partial trees by inspecting living objects.")
12579 (license license:lgpl2.1+)
12580 (properties `((python2-variant . ,(delay python2-astroid))))))
12581
12582 (define-public python2-astroid
12583 (let ((base (package-with-python2
12584 (strip-python2-variant python-astroid))))
12585 (package (inherit base)
12586 ;; Version 2.x removes python2 support.
12587 (version "1.6.5")
12588 (source
12589 (origin
12590 (method url-fetch)
12591 (uri (pypi-uri "astroid" version))
12592 (sha256
12593 (base32
12594 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12595 (arguments
12596 (substitute-keyword-arguments (package-arguments base)
12597 ((#:phases phases)
12598 `(modify-phases ,phases
12599 (add-after 'unpack 'remove-spurious-test
12600 (lambda _
12601 ;; https://github.com/PyCQA/astroid/issues/276
12602 (delete-file "astroid/tests/unittest_brain.py")
12603 #t))
12604 (replace 'check
12605 (lambda _
12606 (invoke"python" "-m" "unittest" "discover"
12607 "-p" "unittest*.py")))))))
12608 (native-inputs `())
12609 (propagated-inputs
12610 `(("python2-backports-functools-lru-cache"
12611 ,python2-backports-functools-lru-cache)
12612 ("python2-enum34" ,python2-enum34)
12613 ("python2-singledispatch" ,python2-singledispatch)
12614 ,@(alist-delete "python-typed-ast"
12615 (package-propagated-inputs base)))))))
12616
12617 (define-public python-isort
12618 (package
12619 (name "python-isort")
12620 (version "4.3.4")
12621 (source
12622 (origin
12623 (method git-fetch)
12624 (uri (git-reference
12625 ;; Tests pass only from the Github sources
12626 (url "https://github.com/timothycrosley/isort")
12627 (commit version)))
12628 (file-name (git-file-name name version))
12629 (sha256
12630 (base32
12631 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
12632 (build-system python-build-system)
12633 (native-inputs
12634 `(("python-mock" ,python-mock)
12635 ("python-pytest" ,python-pytest)))
12636 (home-page "https://github.com/timothycrosley/isort")
12637 (synopsis "Python utility/library to sort python imports")
12638 (description "@code{python-isort} is a python utility/library to sort
12639 imports alphabetically, and automatically separated into sections. It
12640 provides a command line utility, a python library and plugins for various
12641 editors.")
12642 (license license:expat)
12643 (properties `((python2-variant . ,(delay python2-isort))))))
12644
12645 (define-public python2-isort
12646 (let ((base (package-with-python2
12647 (strip-python2-variant python-isort))))
12648 (package (inherit base)
12649 (native-inputs
12650 `(("python2-futures" ,python2-futures)
12651 ,@(package-native-inputs base))))))
12652
12653 (define-public python2-backports-functools-lru-cache
12654 (package
12655 (name "python2-backports-functools-lru-cache")
12656 (version "1.5")
12657 (source
12658 (origin
12659 (method url-fetch)
12660 ;; only the pypi tarballs contain the necessary metadata
12661 (uri (pypi-uri "backports.functools_lru_cache" version))
12662 (sha256
12663 (base32
12664 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12665 (build-system python-build-system)
12666 (native-inputs
12667 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12668 (arguments
12669 `(#:python ,python-2))
12670 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12671 (synopsis "Backport of functools.lru_cache from Python 3.3")
12672 (description "@code{python2-backports-functools-lru-cache} is a backport
12673 of @code{functools.lru_cache} from python 3.3.")
12674 (license license:expat)))
12675
12676 (define-public python-configparser
12677 (package
12678 (name "python-configparser")
12679 (version "3.7.1")
12680 (source
12681 (origin
12682 (method url-fetch)
12683 (uri (pypi-uri "configparser" version))
12684 (sha256
12685 (base32
12686 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
12687 (build-system python-build-system)
12688 (home-page "https://github.com/jaraco/configparser/")
12689 (synopsis "Backport of configparser from python 3.5")
12690 (description "@code{python-configparser} is a backport of
12691 @code{configparser} from Python 3.5 so that it can be used directly
12692 in other versions.")
12693 (license license:expat)))
12694
12695 (define-public python2-configparser
12696 (package-with-python2 python-configparser))
12697
12698 (define-public python-mando
12699 (package
12700 (name "python-mando")
12701 (version "0.6.4")
12702 (source (origin
12703 (method url-fetch)
12704 (uri (pypi-uri "mando" version))
12705 (sha256
12706 (base32
12707 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12708 (build-system python-build-system)
12709 (propagated-inputs
12710 `(("python-rst2ansi" ,python-rst2ansi)
12711 ("python-six" ,python-six)))
12712 (native-inputs
12713 `(("python-pytest" ,python-pytest)))
12714 (home-page "https://mando.readthedocs.org/")
12715 (synopsis
12716 "Wrapper around argparse, allowing creation of complete CLI applications")
12717 (description
12718 "This package is a wrapper around argparse, allowing you to write complete CLI
12719 applications in seconds while maintaining all the flexibility.")
12720 (license license:expat)))
12721
12722 (define-public python2-mando
12723 (package-with-python2 python-mando))
12724
12725 (define-public python2-argparse
12726 (package
12727 (name "python2-argparse")
12728 (version "1.4.0")
12729 (source
12730 (origin
12731 (method url-fetch)
12732 (uri (pypi-uri "argparse" version))
12733 (sha256
12734 (base32
12735 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12736 (build-system python-build-system)
12737 (arguments
12738 `(#:python ,python-2))
12739 (home-page "https://github.com/ThomasWaldmann/argparse/")
12740 (synopsis "Python command-line parsing library")
12741 (description
12742 "This package is mostly for people who want to have @code{argparse} on
12743 older Pythons because it was not part of the standard library back then.")
12744 (license license:psfl)))
12745
12746 (define-public python-fudge
12747 (package
12748 (name "python-fudge")
12749 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
12750 ;; package, which is currently the only use of this package.
12751 (version "0.9.6")
12752 (source
12753 (origin
12754 (method url-fetch)
12755 (uri (pypi-uri "fudge" version))
12756 (sha256
12757 (base32
12758 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
12759 (build-system python-build-system)
12760 (arguments
12761 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
12762 (home-page "https://github.com/fudge-py/fudge")
12763 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
12764 (description
12765 "Fudge is a Python module for using fake objects (mocks and stubs) to
12766 test real ones.
12767
12768 In readable Python code, you declare the methods available on your fake object
12769 and how they should be called. Then you inject that into your application and
12770 start testing. This declarative approach means you don’t have to record and
12771 playback actions and you don’t have to inspect your fakes after running code.
12772 If the fake object was used incorrectly then you’ll see an informative
12773 exception message with a traceback that points to the culprit.")
12774 (license license:expat)))
12775
12776 (define-public python2-fudge
12777 (package-with-python2 python-fudge))
12778
12779 (define-public python-mwclient
12780 (package
12781 (name "python-mwclient")
12782 (version "0.8.4")
12783 (source
12784 (origin
12785 (method url-fetch)
12786 ;; The PyPI version wouldn't contain tests.
12787 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
12788 "v" version ".tar.gz"))
12789 (file-name (string-append name "-" version ".tar.gz"))
12790 (sha256
12791 (base32
12792 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
12793 (build-system python-build-system)
12794 (propagated-inputs
12795 `(("python-requests" ,python-requests)
12796 ("python-requests-oauthlib"
12797 ,python-requests-oauthlib)
12798 ("python-six" ,python-six)))
12799 (native-inputs
12800 `(("python-mock" ,python-mock)
12801 ("python-pytest" ,python-pytest)
12802 ("python-pytest-pep8" ,python-pytest-pep8)
12803 ("python-pytest-cache" ,python-pytest-cache)
12804 ("python-pytest-cov" ,python-pytest-cov)
12805 ("python-responses" ,python-responses)))
12806 (home-page "https://github.com/btongminh/mwclient")
12807 (synopsis "MediaWiki API client")
12808 (description "This package provides a MediaWiki API client.")
12809 (license license:expat)))
12810
12811 (define-public python2-mwclient
12812 (package-with-python2 python-mwclient))
12813
12814 (define-public python-utils
12815 (package
12816 (name "python-utils")
12817 (version "2.1.0")
12818 (source (origin
12819 (method url-fetch)
12820 (uri (pypi-uri "python-utils" version))
12821 (sha256
12822 (base32
12823 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
12824 (build-system python-build-system)
12825 (native-inputs
12826 `(("pytest-runner" ,python-pytest-runner)
12827 ("pytest" ,python-pytest)
12828 ("six" ,python-six)))
12829 (home-page "https://github.com/WoLpH/python-utils")
12830 (synopsis "Convenient utilities not included with the standard Python install")
12831 (description
12832 "Python Utils is a collection of small Python functions and classes which
12833 make common patterns shorter and easier.")
12834 (license license:bsd-2)))
12835
12836 (define-public python2-utils
12837 (package-with-python2 python-utils))
12838
12839 (define-public python-diff-match-patch
12840 (package
12841 (name "python-diff-match-patch")
12842 (version "20121119")
12843 (source
12844 (origin
12845 (method url-fetch)
12846 (uri (pypi-uri "diff-match-patch" version))
12847 (sha256
12848 (base32
12849 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
12850 (build-system python-build-system)
12851 (home-page "https://code.google.com/p/google-diff-match-patch")
12852 (synopsis "Synchronize plain text")
12853 (description "Diff Match and Patch libraries offer robust algorithms to
12854 perform the operations required for synchronizing plain text.")
12855 (license license:asl2.0)))
12856
12857 (define-public python2-diff-match-patch
12858 (package-with-python2 python-diff-match-patch))
12859
12860 (define-public python-dirsync
12861 (package
12862 (name "python-dirsync")
12863 (version "2.2.3")
12864 (source
12865 (origin
12866 (method url-fetch)
12867 (uri (pypi-uri "dirsync" version))
12868 (sha256
12869 (base32
12870 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
12871 (build-system python-build-system)
12872 (propagated-inputs
12873 `(("six" ,python-six)))
12874 (home-page "https://bitbucket.org/tkhyn/dirsync")
12875 (synopsis "Advanced directory tree synchronisation tool")
12876 (description "Advanced directory tree synchronisation tool.")
12877 (license license:expat)))
12878
12879 (define-public python2-dirsync
12880 (package-with-python2 python-dirsync))
12881
12882 (define-public python-levenshtein
12883 (package
12884 (name "python-levenshtein")
12885 (version "0.12.0")
12886 (source
12887 (origin
12888 (method url-fetch)
12889 (uri (pypi-uri "python-Levenshtein" version))
12890 (sha256
12891 (base32
12892 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
12893 (build-system python-build-system)
12894 (home-page "https://github.com/ztane/python-Levenshtein")
12895 (synopsis "Fast computation of Levenshtein distance and string similarity")
12896 (description
12897 "The Levenshtein Python C extension module contains functions for fast computation of
12898 @enumerate
12899 @item Levenshtein (edit) distance, and edit operations
12900 @item string similarity
12901 @item approximate median strings, and generally string averaging
12902 @item string sequence and set similarity
12903 @end enumerate
12904 It supports both normal and Unicode strings.")
12905 (license license:gpl2+)))
12906
12907 (define-public python2-levenshtein
12908 (package-with-python2 python-levenshtein))
12909
12910 (define-public python-scandir
12911 (package
12912 (name "python-scandir")
12913 (version "1.9.0")
12914 (source
12915 (origin
12916 (method url-fetch)
12917 (uri (pypi-uri "scandir" version))
12918 (sha256
12919 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
12920 (build-system python-build-system)
12921 (arguments
12922 `(#:phases (modify-phases %standard-phases
12923 (replace 'check
12924 (lambda _
12925 (invoke "python" "test/run_tests.py"))))))
12926 (home-page "https://github.com/benhoyt/scandir")
12927 (synopsis "Directory iteration function")
12928 (description
12929 "Directory iteration function like os.listdir(), except that instead of
12930 returning a list of bare filenames, it yields DirEntry objects that include
12931 file type and stat information along with the name. Using scandir() increases
12932 the speed of os.walk() by 2-20 times (depending on the platform and file
12933 system) by avoiding unnecessary calls to os.stat() in most cases.
12934
12935 This package is part of the Python standard library since version 3.5.")
12936 (license license:bsd-3)))
12937
12938 (define-public python2-scandir
12939 (package-with-python2 python-scandir))
12940
12941 (define-public python2-stemming
12942 (package
12943 (name "python2-stemming")
12944 (version "1.0.1")
12945 (source
12946 (origin
12947 (method url-fetch)
12948 (uri (pypi-uri "stemming" version))
12949 (sha256
12950 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
12951 (build-system python-build-system)
12952 (arguments
12953 `(#:python ,python-2))
12954 (home-page "https://bitbucket.org/mchaput/stemming/overview")
12955 (synopsis "Python implementations of various stemming algorithms")
12956 (description
12957 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
12958 stemming algorithms for English. These implementations are straightforward and
12959 efficient, unlike some Python versions of the same algorithms available on the
12960 Web. This package is an extraction of the stemming code included in the Whoosh
12961 search engine.")
12962 (license license:public-domain)))
12963
12964 (define-public python-factory-boy
12965 (package
12966 (name "python-factory-boy")
12967 (version "2.8.1")
12968 (source
12969 (origin
12970 (method url-fetch)
12971 (uri (pypi-uri "factory_boy" version))
12972 (sha256
12973 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
12974 (build-system python-build-system)
12975 (arguments
12976 ;; Tests are not included in the tarball.
12977 `(#:tests? #f))
12978 (propagated-inputs
12979 `(("faker" ,python-faker)))
12980 (home-page "https://github.com/benhoyt/scandir")
12981 (synopsis "Versatile test fixtures replacement")
12982 (description
12983 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
12984
12985 As a fixtures replacement tool, it aims to replace static, hard to maintain
12986 fixtures with easy-to-use factories for complex object.
12987
12988 Instead of building an exhaustive test setup with every possible combination
12989 of corner cases, factory_boy allows you to use objects customized for the
12990 current test, while only declaring the test-specific fields")
12991 (license license:expat)))
12992
12993 (define-public python2-factory-boy
12994 (package-with-python2 python-factory-boy))
12995
12996 (define-public python-translate-toolkit
12997 (package
12998 (name "python-translate-toolkit")
12999 (version "2.1.0")
13000 (source
13001 (origin
13002 (method url-fetch)
13003 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
13004 (sha256
13005 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
13006 (build-system python-build-system)
13007 (native-inputs
13008 `(("python-pytest" ,python-pytest)
13009 ("python-sphinx" ,python-sphinx)))
13010 (propagated-inputs
13011 `(("python-babel" ,python-babel)
13012 ("python-beautifulsoup4" ,python-beautifulsoup4)
13013 ("python-chardet" ,python-chardet)
13014 ("python-diff-match-patch" ,python-diff-match-patch)
13015 ("python-levenshtein" ,python-levenshtein)
13016 ("python-lxml" ,python-lxml)
13017 ("python-six" ,python-six)
13018 ("python-vobject" ,python-vobject)
13019 ("python-pyyaml" ,python-pyyaml)))
13020 (arguments
13021 ;; TODO: tests are not run, because they end with
13022 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
13023 ;; 'parse_funcs'
13024 ;; during test setup.
13025 `(#:tests? #f))
13026 (home-page "https://toolkit.translatehouse.org")
13027 (synopsis "Tools and API for translation and localization engineering")
13028 (description
13029 "Tools and API for translation and localization engineering. It contains
13030 several utilities, as well as an API for building localization tools.")
13031 (license license:gpl2+)))
13032
13033 (define-public python2-translate-toolkit
13034 (package-with-python2 python-translate-toolkit))
13035
13036 (define-public python-packaging
13037 (package
13038 (name "python-packaging")
13039 (version "19.0")
13040 (source
13041 (origin
13042 (method url-fetch)
13043 (uri (pypi-uri "packaging" version))
13044 (sha256
13045 (base32
13046 "1brjhygq9dz6x1kdljivkjfldi3qf5rbkqgck1bpgv9qpv8ab60c"))))
13047 (build-system python-build-system)
13048 (arguments
13049 `(#:phases (modify-phases %standard-phases
13050 (replace 'check
13051 (lambda _ (invoke "py.test" "-vv"))))))
13052 (native-inputs
13053 `(("python-pretend" ,python-pretend)
13054 ("python-pytest" ,python-pytest)))
13055 (propagated-inputs
13056 `(("python-pyparsing" ,python-pyparsing)
13057 ("python-six" ,python-six)))
13058 (home-page "https://github.com/pypa/packaging")
13059 (synopsis "Core utilities for Python packages")
13060 (description "Packaging is a Python module for dealing with Python packages.
13061 It offers an interface for working with package versions, names, and dependency
13062 information.")
13063 ;; From 'LICENSE': This software is made available under the terms of
13064 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
13065 ;; Contributions to this software is made under the terms of *both* these
13066 ;; licenses.
13067 (license (list license:asl2.0 license:bsd-2))))
13068
13069 (define-public python2-packaging
13070 (package-with-python2 python-packaging))
13071
13072 (define-public python-relatorio
13073 (package
13074 (name "python-relatorio")
13075 (version "0.8.0")
13076 (source
13077 (origin
13078 (method url-fetch)
13079 (uri (pypi-uri "relatorio" version))
13080 (sha256
13081 (base32
13082 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
13083 (build-system python-build-system)
13084 (propagated-inputs
13085 `(("python-lxml" ,python-lxml)
13086 ("python-genshi" ,python-genshi)))
13087 (native-inputs
13088 `(("python-magic" ,python-magic)))
13089 (home-page "https://relatorio.tryton.org/")
13090 (synopsis "Templating library able to output ODT and PDF files")
13091 (description "Relatorio is a templating library which provides a way to
13092 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
13093 for more filetypes can be easily added by creating plugins for them.")
13094 (license license:gpl3+)))
13095
13096 (define-public python2-relatorio
13097 (package-with-python2 python-relatorio))
13098
13099 (define-public python-radon
13100 (package
13101 (name "python-radon")
13102 (version "2.2.0")
13103 (source
13104 (origin
13105 (method url-fetch)
13106 (uri (pypi-uri "radon" version))
13107 (sha256
13108 (base32
13109 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
13110 (build-system python-build-system)
13111 (arguments
13112 `(#:phases (modify-phases %standard-phases
13113 (replace 'check
13114 (lambda _
13115 (invoke "python" "radon/tests/run.py"))))))
13116 (propagated-inputs
13117 `(("python-colorama" ,python-colorama)
13118 ("python-flake8-polyfill" ,python-flake8-polyfill)
13119 ("python-mando" ,python-mando)))
13120 (native-inputs
13121 `(("python-pytest" ,python-pytest)
13122 ("python-pytest-mock" ,python-pytest-mock)))
13123 (home-page "https://radon.readthedocs.org/")
13124 (synopsis "Code Metrics in Python")
13125 (description "Radon is a Python tool which computes various code metrics.
13126 Supported metrics are:
13127 @itemize @bullet
13128 @item raw metrics: SLOC, comment lines, blank lines, &c.
13129 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
13130 @item Halstead metrics (all of them)
13131 @item the Maintainability Index (a Visual Studio metric)
13132 @end itemize")
13133 (license license:expat)))
13134
13135 (define-public python2-radon
13136 (package-with-python2 python-radon))
13137
13138 (define-public python-sure
13139 (package
13140 (name "python-sure")
13141 (version "1.4.11")
13142 (source
13143 (origin
13144 (method url-fetch)
13145 (uri (pypi-uri "sure" version))
13146 (sha256
13147 (base32
13148 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
13149 (build-system python-build-system)
13150 (propagated-inputs
13151 `(("python-mock" ,python-mock)
13152 ("python-six" ,python-six)))
13153 (native-inputs
13154 `(("python-nose" ,python-nose)))
13155 (home-page "https://github.com/gabrielfalcao/sure")
13156 (synopsis "Automated testing library in python for python")
13157 (description
13158 "Sure is a python library that leverages a DSL for writing assertions.
13159 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
13160 (license license:gpl3+)))
13161
13162 (define-public python2-sure
13163 (package-with-python2 python-sure))
13164
13165 (define-public python2-couleur
13166 ;; This package does not seem to support python3 at all, hence,
13167 ;; only the python2 variant definition is provided.
13168 (package
13169 (name "python2-couleur")
13170 (version "0.6.2")
13171 (source
13172 (origin
13173 (method url-fetch)
13174 (uri (pypi-uri "couleur" version))
13175 (sha256
13176 (base32
13177 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
13178 (build-system python-build-system)
13179 (arguments
13180 `(#:python ,python-2))
13181 (home-page "https://github.com/gabrielfalcao/couleur")
13182 (synopsis
13183 "ANSI terminal tool for python, colored shell and other handy fancy features")
13184 (description
13185 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
13186 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
13187 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
13188 ;; https://github.com/gabrielfalcao/couleur/issues/11
13189 (license license:lgpl3+)))
13190
13191 (define-public python-misaka
13192 (package
13193 (name "python-misaka")
13194 (version "2.1.1")
13195 (source
13196 (origin
13197 (method url-fetch)
13198 (uri (pypi-uri "misaka" version))
13199 (sha256
13200 (base32
13201 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
13202 (build-system python-build-system)
13203 (arguments
13204 `(;; Line 37 of setup.py calls self.run_command('develop')
13205 ;; in the 'check' phase. This command seems to be trying
13206 ;; to write to
13207 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
13208 ;; for which it does not have the permission to write.
13209 #:tests? #f))
13210 (propagated-inputs
13211 `(("python-cffi" ,python-cffi)))
13212 (home-page "https://github.com/FSX/misaka")
13213 (synopsis "Python binding for Hoedown")
13214 (description
13215 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
13216 library written in C. It features a fast HTML renderer and functionality to make custom
13217 renderers (e.g. man pages or LaTeX).")
13218 (license license:expat)))
13219
13220 (define-public python2-misaka
13221 (package-with-python2 python-misaka))
13222
13223 (define-public python2-steadymark
13224 ;; This is forced into being a python2 only variant
13225 ;; due to its dependence on couleur that has no support
13226 ;; for python3
13227 (package
13228 (name "python2-steadymark")
13229 (version "0.7.3")
13230 (source
13231 (origin
13232 (method url-fetch)
13233 (uri (pypi-uri "steadymark" version))
13234 (sha256
13235 (base32
13236 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
13237 (build-system python-build-system)
13238 (native-inputs
13239 `(("python-couleur" ,python2-couleur)
13240 ("python-sure" ,python2-sure)
13241 ("python-misaka" ,python2-misaka)))
13242 (arguments
13243 `(#:python ,python-2
13244 #:phases
13245 (modify-phases %standard-phases
13246 (add-before 'build 'patch-setup-py
13247 (lambda _
13248 ;; Update requirements from dependency==version
13249 ;; to dependency>=version
13250 (substitute* "setup.py"
13251 (("==") ">="))
13252 #t)))))
13253 (home-page "https://github.com/gabrielfalcao/steadymark")
13254 (synopsis "Markdown-based test runner for python")
13255 (description
13256 "@code{Steadymark} allows documentation to be written in github-flavoured
13257 markdown. The documentation may contain snippets of code surrounded by python
13258 code blocks and @code{Steadymark} will find these snippets and run them, making
13259 sure that there are no old malfunctional examples in the documentation examples.")
13260 (license license:expat)))
13261
13262 (define-public python-jsonpointer
13263 (package
13264 (name "python-jsonpointer")
13265 (version "1.10")
13266 (source
13267 (origin
13268 (method url-fetch)
13269 (uri (pypi-uri "jsonpointer" version))
13270 (sha256
13271 (base32
13272 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
13273 (build-system python-build-system)
13274 (home-page "https://github.com/stefankoegl/python-json-pointer")
13275 (synopsis "Identify specific nodes in a JSON document")
13276 (description "@code{jsonpointer} allows you to access specific nodes
13277 by path in a JSON document (see RFC 6901).")
13278 (license license:bsd-3)))
13279
13280 (define-public python2-jsonpointer
13281 (package-with-python2 python-jsonpointer))
13282
13283 (define-public python-jsonpatch
13284 (package
13285 (name "python-jsonpatch")
13286 (version "1.16")
13287 (source
13288 (origin
13289 (method url-fetch)
13290 ;; pypi version lacks tests.js
13291 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
13292 "archive/v" version ".tar.gz"))
13293 (file-name (string-append name "-" version ".tar.gz"))
13294 (sha256
13295 (base32
13296 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
13297 (build-system python-build-system)
13298 (native-inputs
13299 `(("python-jsonpointer" ,python-jsonpointer)))
13300 (home-page "https://github.com/stefankoegl/python-json-patch")
13301 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
13302 (description "@code{jsonpatch} is a library and program that allows
13303 applying JSON Patches according to RFC 6902.")
13304 (license license:bsd-3)))
13305
13306 (define-public python2-jsonpatch
13307 (package-with-python2 python-jsonpatch))
13308
13309 (define-public python-jsonpatch-0.4
13310 (package (inherit python-jsonpatch)
13311 (name "python-jsonpatch")
13312 (version "0.4")
13313 (source
13314 (origin
13315 (method url-fetch)
13316 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
13317 "archive/v" version ".tar.gz"))
13318 (file-name (string-append name "-" version ".tar.gz"))
13319 (sha256
13320 (base32
13321 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
13322
13323 (define-public python2-jsonpatch-0.4
13324 (package-with-python2 python-jsonpatch-0.4))
13325
13326 (define-public python-rfc3986
13327 (package
13328 (name "python-rfc3986")
13329 (version "1.1.0")
13330 (source (origin
13331 (method url-fetch)
13332 (uri (pypi-uri "rfc3986" version))
13333 (sha256
13334 (base32
13335 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
13336 (build-system python-build-system)
13337 (arguments
13338 `(#:modules ((guix build utils)
13339 (guix build python-build-system)
13340 (ice-9 ftw)
13341 (srfi srfi-1)
13342 (srfi srfi-26))
13343 #:phases
13344 (modify-phases %standard-phases
13345 (replace 'check
13346 (lambda _
13347 (let ((cwd (getcwd)))
13348 (setenv "PYTHONPATH"
13349 (string-append cwd "/build/"
13350 (find (cut string-prefix? "lib" <>)
13351 (scandir (string-append cwd "/build")))
13352 ":"
13353 (getenv "PYTHONPATH")))
13354 (invoke "pytest" "-v")))))))
13355 (native-inputs
13356 `(("python-pytest" ,python-pytest)))
13357 (home-page "https://rfc3986.readthedocs.io/")
13358 (synopsis "Parse and validate URI references")
13359 (description
13360 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
13361 validation and authority parsing. This module also supports RFC@tie{}6874
13362 which adds support for zone identifiers to IPv6 addresses.")
13363 (license license:asl2.0)))
13364
13365 (define-public python2-rfc3986
13366 (package-with-python2 python-rfc3986))
13367
13368 (define-public python-rfc3987
13369 (package
13370 (name "python-rfc3987")
13371 (version "1.3.7")
13372 (source
13373 (origin
13374 (method url-fetch)
13375 (uri (pypi-uri "rfc3987" version))
13376 (sha256
13377 (base32
13378 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
13379 (build-system python-build-system)
13380 (home-page "https://pypi.python.org/pypi/rfc3987")
13381 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
13382 (description "@code{rfc3987} provides routines for parsing and
13383 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
13384 (license license:gpl3+)))
13385
13386 (define-public python2-rfc3987
13387 (package-with-python2 python-rfc3987))
13388
13389 (define-public python-validate-email
13390 (package
13391 (name "python-validate-email")
13392 (version "1.3")
13393 (source
13394 (origin
13395 (method url-fetch)
13396 (uri (pypi-uri "validate_email" version))
13397 (sha256
13398 (base32
13399 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
13400 (build-system python-build-system)
13401 (home-page "https://github.com/syrusakbary/validate_email")
13402 (synopsis "Verifies if an email address is valid and really exists")
13403 (description "@code{validate_email} can be used to verify if an email
13404 address is valid and really exists.")
13405 (license license:lgpl3+)))
13406
13407 (define-public python2-validate-email
13408 (package-with-python2 python-validate-email))
13409
13410 (define-public python-flex
13411 (package
13412 (name "python-flex")
13413 (version "6.10.0")
13414 (source
13415 (origin
13416 (method url-fetch)
13417 (uri (pypi-uri "flex" version))
13418 (sha256
13419 (base32
13420 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
13421 (build-system python-build-system)
13422 (propagated-inputs
13423 `(("python-click" ,python-click)
13424 ("python-iso8601" ,python-iso8601)
13425 ("python-jsonpointer" ,python-jsonpointer)
13426 ("python-pyyaml" ,python-pyyaml)
13427 ("python-requests" ,python-requests)
13428 ("python-rfc3987" ,python-rfc3987)
13429 ("python-six" ,python-six)
13430 ("python-validate-email" ,python-validate-email)))
13431 (home-page "https://github.com/pipermerriam/flex")
13432 (synopsis "Validates Swagger schemata")
13433 (description "@code{flex} can be used to validate Swagger schemata.")
13434 (license license:bsd-3)))
13435
13436 (define-public python2-flex
13437 (package-with-python2 python-flex))
13438
13439 (define-public python-marshmallow
13440 (package
13441 (name "python-marshmallow")
13442 (version "3.0.0b14")
13443 (source
13444 (origin
13445 (method url-fetch)
13446 (uri (pypi-uri "marshmallow" version))
13447 (sha256
13448 (base32
13449 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
13450 (build-system python-build-system)
13451 (propagated-inputs
13452 `(("python-dateutil" ,python-dateutil)
13453 ("python-simplejson" ,python-simplejson)))
13454 (native-inputs
13455 `(("python-pytest" ,python-pytest)
13456 ("python-pytz" ,python-pytz)))
13457 (home-page "https://github.com/marshmallow-code/marshmallow")
13458 (synopsis "Convert complex datatypes to and from native
13459 Python datatypes.")
13460 (description "@code{marshmallow} provides a library for converting
13461 complex datatypes to and from native Python datatypes.")
13462 (license license:expat)))
13463
13464 (define-public python2-marshmallow
13465 (package-with-python2 python-marshmallow))
13466
13467 (define-public python-apispec
13468 (package
13469 (name "python-apispec")
13470 (version "0.25.3")
13471 (source
13472 (origin
13473 (method url-fetch)
13474 (uri (pypi-uri "apispec" version))
13475 (sha256
13476 (base32
13477 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
13478 (build-system python-build-system)
13479 (propagated-inputs
13480 `(("python-pyyaml" ,python-pyyaml)))
13481 (native-inputs
13482 `(("python-pytest" ,python-pytest)
13483 ("python-flask" ,python-flask)
13484 ("python-marshmallow" ,python-marshmallow)
13485 ("python-tornado" ,python-tornado)
13486 ("python-bottle" ,python-bottle)
13487 ("python-mock" ,python-mock)))
13488 (home-page "https://github.com/marshmallow-code/apispec")
13489 (synopsis "Swagger 2.0 API specification generator")
13490 (description "@code{python-apispec} is a pluggable API specification
13491 generator. Currently supports the OpenAPI specification (f.k.a.
13492 Swagger 2.0).")
13493 (license license:expat)))
13494
13495 (define-public python2-apispec
13496 (package-with-python2 python-apispec))
13497
13498 (define-public python-flasgger
13499 (package
13500 (name "python-flasgger")
13501 (version "0.6.3")
13502 (source
13503 (origin
13504 (method git-fetch)
13505 (uri (git-reference
13506 (url "https://github.com/rochacbruno/flasgger.git")
13507 (commit version)))
13508 (file-name (git-file-name name version))
13509 (sha256
13510 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
13511 (build-system python-build-system)
13512 (arguments
13513 `(#:phases
13514 (modify-phases %standard-phases
13515 (replace 'check
13516 (lambda* (#:key inputs outputs #:allow-other-keys)
13517 (substitute* "Makefile"
13518 (("flake8 flasgger --ignore=F403")
13519 "flake8 flasgger --ignore=E731,F403"))
13520 (setenv "PYTHONPATH" (string-append (getcwd)
13521 ":"
13522 (getenv "PYTHONPATH")))
13523 (invoke "py.test"))))))
13524 (propagated-inputs
13525 `(("python-flask" ,python-flask)
13526 ("python-pyyaml" ,python-pyyaml)
13527 ("python-jsonschema" ,python-jsonschema)
13528 ("python-mistune" ,python-mistune)
13529 ("python-six" ,python-six)))
13530 (native-inputs
13531 `(("python-decorator" ,python-decorator)
13532 ("python-flake8" ,python-flake8)
13533 ("python-flask-restful" ,python-flask-restful)
13534 ("python-flex" ,python-flex)
13535 ("python-pytest" ,python-pytest)
13536 ("python-pytest-cov" ,python-pytest-cov)
13537 ("python-marshmallow" ,python-marshmallow)
13538 ("python-apispec" ,python-apispec)))
13539 (home-page "https://github.com/rochacbruno/flasgger/")
13540 (synopsis "Extract Swagger specs from your Flask project")
13541 (description "@code{python-flasgger} allows extracting Swagger specs
13542 from your Flask project. It is a fork of Flask-Swagger.")
13543 (license license:expat)))
13544
13545 (define-public python2-flasgger
13546 (package-with-python2 python-flasgger))
13547
13548 (define-public python-swagger-spec-validator
13549 (package
13550 (name "python-swagger-spec-validator")
13551 (version "2.4.3")
13552 (source
13553 (origin
13554 (method url-fetch)
13555 (uri (pypi-uri "swagger-spec-validator" version))
13556 (sha256
13557 (base32
13558 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
13559 (build-system python-build-system)
13560 (propagated-inputs
13561 `(("python-jsonschema" ,python-jsonschema)
13562 ("python-pyyaml" ,python-pyyaml)
13563 ("python-six" ,python-six)))
13564 (home-page
13565 "https://github.com/Yelp/swagger_spec_validator")
13566 (synopsis "Validation of Swagger specifications")
13567 (description "@code{swagger_spec_validator} provides a library for
13568 validating Swagger API specifications.")
13569 (license license:asl2.0)))
13570
13571 (define-public python2-swagger-spec-validator
13572 (package-with-python2 python-swagger-spec-validator))
13573
13574 (define-public python-apache-libcloud
13575 (package
13576 (name "python-apache-libcloud")
13577 (version "2.4.0")
13578 (source
13579 (origin
13580 (method url-fetch)
13581 (uri (pypi-uri "apache-libcloud" version))
13582 (sha256
13583 (base32
13584 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13585 (build-system python-build-system)
13586 (arguments
13587 `(#:phases
13588 (modify-phases %standard-phases
13589 (add-after 'unpack 'patch-ssh
13590 (lambda* (#:key inputs #:allow-other-keys)
13591 (substitute* "libcloud/compute/ssh.py"
13592 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13593 "/bin/ssh" "'")))
13594 #t))
13595 (add-after 'unpack 'patch-tests
13596 (lambda _
13597 (substitute* "./libcloud/test/test_file_fixtures.py"
13598 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13599 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13600 return (httplib.OK,
13601 \"1234abcd\",
13602 {\"test\": \"value\"},
13603 httplib.responses[httplib.OK])
13604 def _ascii"))
13605 (substitute* "libcloud/test/compute/test_ssh_client.py"
13606 (("class ShellOutSSHClientTests")
13607 "@unittest.skip(\"Guix container doesn't have ssh service\")
13608 class ShellOutSSHClientTests")
13609 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13610 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13611 (("'.xF0', '.x90', '.x8D', '.x88'")
13612 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13613 #t))
13614 (add-before 'check 'copy-secret
13615 (lambda _
13616 (copy-file "libcloud/test/secrets.py-dist"
13617 "libcloud/test/secrets.py")
13618 #t)))))
13619 (inputs
13620 `(("openssh" ,openssh)))
13621 (propagated-inputs
13622 `(("python-paramiko" ,python-paramiko)
13623 ("python-requests" ,python-requests)))
13624 (native-inputs
13625 `(("python-lockfile" ,python-lockfile)
13626 ("python-mock" ,python-mock)
13627 ("python-pytest" ,python-pytest)
13628 ("python-pytest-runner" ,python-pytest-runner)
13629 ("python-requests-mock" ,python-requests-mock)))
13630 (home-page "https://libcloud.apache.org/")
13631 (synopsis "Unified Cloud API")
13632 (description "@code{libcloud} is a Python library for interacting with
13633 many of the popular cloud service providers using a unified API.")
13634 (license license:asl2.0)))
13635
13636 (define-public python2-apache-libcloud
13637 (package-with-python2 python-apache-libcloud))
13638
13639 (define-public python-smmap2
13640 (package
13641 (name "python-smmap2")
13642 (version "2.0.3")
13643 (source
13644 (origin
13645 (method url-fetch)
13646 (uri (pypi-uri "smmap2" version))
13647 (sha256
13648 (base32
13649 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
13650 (build-system python-build-system)
13651 (native-inputs
13652 `(("python-nosexcover" ,python-nosexcover)))
13653 (home-page "https://github.com/Byron/smmap")
13654 (synopsis "Python sliding window memory map manager")
13655 (description "@code{smmap2} is a pure Python implementation of a sliding
13656 window memory map manager.")
13657 (license license:bsd-3)))
13658
13659 (define-public python2-smmap2
13660 (package-with-python2 python-smmap2))
13661
13662 (define-public python-regex
13663 (package
13664 (name "python-regex")
13665 (version "2019.04.14")
13666 (source (origin
13667 (method url-fetch)
13668 (uri (pypi-uri "regex" version))
13669 (sha256
13670 (base32
13671 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
13672 ;; TODO: Fix and enable regex_test.py tests that complain about the
13673 ;; test.support module not existing.
13674 (build-system python-build-system)
13675 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13676 (synopsis "Alternative regular expression module")
13677 (description "This regular expression implementation is backwards-
13678 compatible with the standard @code{re} module, but offers additional
13679 functionality like full case-folding for case-insensitive matches in Unicode.")
13680 (license license:psfl)))
13681
13682 (define-public python2-regex
13683 (package-with-python2 python-regex))
13684
13685 (define-public python2-pyopengl
13686 (package
13687 (name "python2-pyopengl")
13688 (version "3.1.0")
13689 (source
13690 (origin
13691 (method url-fetch)
13692 (uri (pypi-uri "PyOpenGL" version))
13693 (sha256
13694 (base32
13695 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13696 (arguments
13697 `(#:python ,python-2))
13698 (build-system python-build-system)
13699 (home-page "http://pyopengl.sourceforge.net")
13700 (synopsis "Standard OpenGL bindings for Python")
13701 (description
13702 "PyOpenGL is the most common cross platform Python binding to OpenGL and
13703 related APIs. The binding is created using the standard @code{ctypes}
13704 library.")
13705 (license license:bsd-3)))
13706
13707 (define-public python2-pyopengl-accelerate
13708 (package
13709 (inherit python2-pyopengl)
13710 (name "python2-pyopengl-accelerate")
13711 (version "3.1.0")
13712 (source
13713 (origin
13714 (method url-fetch)
13715 (uri (pypi-uri "PyOpenGL-accelerate" version))
13716 (sha256
13717 (base32
13718 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
13719 (synopsis "Acceleration code for PyOpenGL")
13720 (description
13721 "This is the Cython-coded accelerator module for PyOpenGL.")))
13722
13723 (define-public python-rencode
13724 (package
13725 (name "python-rencode")
13726 (version "1.0.5")
13727 (source
13728 (origin
13729 (method url-fetch)
13730 (uri (pypi-uri "rencode" version))
13731 (sha256
13732 (base32
13733 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
13734 (build-system python-build-system)
13735 (arguments
13736 `(#:phases
13737 (modify-phases %standard-phases
13738 (add-before 'check 'delete-bogus-test
13739 ;; This test requires /home/aresch/Downloads, which is not provided by
13740 ;; the build environment.
13741 (lambda _
13742 (delete-file "rencode/t.py")
13743 #t)))))
13744 (native-inputs `(("pkg-config" ,pkg-config)
13745 ("python-cython" ,python-cython)))
13746 (home-page "https://github.com/aresch/rencode")
13747 (synopsis "Serialization of heterogeneous data structures")
13748 (description
13749 "The @code{rencode} module is a data structure serialization library,
13750 similar to @code{bencode} from the BitTorrent project. For complex,
13751 heterogeneous data structures with many small elements, r-encoding stake up
13752 significantly less space than b-encodings. This version of rencode is a
13753 complete rewrite in Cython to attempt to increase the performance over the
13754 pure Python module.")
13755 (license license:bsd-3)))
13756
13757 (define-public python2-rencode
13758 (package-with-python2 python-rencode))
13759
13760 (define-public python-xenon
13761 (package
13762 (name "python-xenon")
13763 (version "0.5.4")
13764 (source
13765 (origin
13766 (method url-fetch)
13767 (uri (pypi-uri "xenon" version))
13768 (sha256
13769 (base32
13770 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
13771 (build-system python-build-system)
13772 (native-inputs
13773 `(("python-pyyaml" ,python-pyyaml)
13774 ("python-radon" ,python-radon)
13775 ("python-requests" ,python-requests)
13776 ("python-flake8" ,python-flake8)
13777 ("python-tox" ,python-tox)))
13778 (arguments
13779 `(#:phases
13780 (modify-phases %standard-phases
13781 (add-before 'build 'patch-test-requirements
13782 (lambda _
13783 ;; Remove httpretty dependency for tests.
13784 (substitute* "setup.py"
13785 (("httpretty") ""))
13786 #t)))))
13787 (home-page "https://xenon.readthedocs.org/")
13788 (synopsis "Monitor code metrics for Python on your CI server")
13789 (description
13790 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
13791 Ideally, @code{xenon} is run every time code is committed. Through command
13792 line options, various thresholds can be set for the complexity of code. It
13793 will fail (i.e. it will exit with a non-zero exit code) when any of these
13794 requirements is not met.")
13795 (license license:expat)))
13796
13797 (define-public python2-xenon
13798 (package-with-python2 python-xenon))
13799
13800 (define-public python-pysocks
13801 (package
13802 (name "python-pysocks")
13803 (version "1.7.0")
13804 (source
13805 (origin
13806 (method url-fetch)
13807 (uri (pypi-uri "PySocks" version))
13808 (sha256
13809 (base32
13810 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
13811 (build-system python-build-system)
13812 (arguments `(#:tests? #f))
13813 (home-page "https://github.com/Anorov/PySocks")
13814 (synopsis "SOCKS client module")
13815 (description "@code{pysocks} is an updated and semi-actively maintained
13816 version of @code{SocksiPy} with bug fixes and extra features.")
13817 (license license:bsd-3)))
13818
13819 (define-public python2-pysocks
13820 (package-with-python2 python-pysocks))
13821
13822 (define-public python-pydiff
13823 (package
13824 (name "python-pydiff")
13825 (version "0.2")
13826 (source
13827 (origin
13828 (method url-fetch)
13829 (uri (pypi-uri "pydiff" version))
13830 (sha256
13831 (base32
13832 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
13833 (build-system python-build-system)
13834 (home-page "https://github.com/myint/pydiff")
13835 (synopsis "Library to diff two Python files at the bytecode level")
13836 (description
13837 "@code{pydiff} makes it easy to look for actual code changes while
13838 ignoring formatting changes.")
13839 (license license:expat)))
13840
13841 (define-public python2-pydiff
13842 (package-with-python2 python-pydiff))
13843
13844 (define-public python-tqdm
13845 (package
13846 (name "python-tqdm")
13847 (version "4.19.6")
13848 (source
13849 (origin
13850 (method url-fetch)
13851 (uri (pypi-uri "tqdm" version))
13852 (sha256
13853 (base32
13854 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
13855 (build-system python-build-system)
13856 (native-inputs
13857 `(("python-flake8" ,python-flake8)
13858 ("python-nose" ,python-nose)
13859 ("python-coverage" ,python-coverage)))
13860 (home-page "https://github.com/tqdm/tqdm")
13861 (synopsis "Fast, extensible progress meter")
13862 (description
13863 "Make loops show a progress bar on the console by just wrapping any
13864 iterable with @code{|tqdm(iterable)|}. Offers many options to define
13865 design and layout.")
13866 (license (list license:mpl2.0 license:expat))
13867 (properties `((python2-variant . ,(delay python2-tqdm))))))
13868
13869 (define-public python2-tqdm
13870 (let ((tqdm (package-with-python2
13871 (strip-python2-variant python-tqdm))))
13872 (package (inherit tqdm)
13873 (native-inputs `(("python2-functools32" ,python2-functools32)
13874 ,@(package-native-inputs tqdm))))))
13875
13876 (define-public python-pkginfo
13877 (package
13878 (name "python-pkginfo")
13879 (version "1.4.2")
13880 (source
13881 (origin
13882 (method url-fetch)
13883 (uri (pypi-uri "pkginfo" version))
13884 (sha256
13885 (base32
13886 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
13887 (build-system python-build-system)
13888 (arguments
13889 ;; The tests are broken upstream.
13890 '(#:tests? #f))
13891 (home-page
13892 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
13893 (synopsis
13894 "Query metadatdata from sdists, bdists, and installed packages")
13895 (description
13896 "API to query the distutils metadata written in @file{PKG-INFO} inside a
13897 source distriubtion (an sdist) or a binary distribution (e.g., created by
13898 running bdist_egg). It can also query the EGG-INFO directory of an installed
13899 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
13900 created by running @code{python setup.py develop}).")
13901 (license license:expat)))
13902
13903 (define-public python2-pkginfo
13904 (package-with-python2 python-pkginfo))
13905
13906 (define-public python-twine
13907 (package
13908 (name "python-twine")
13909 (version "1.9.1")
13910 (source
13911 (origin
13912 (method url-fetch)
13913 (uri (pypi-uri "twine" version))
13914 (sha256
13915 (base32
13916 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
13917 (build-system python-build-system)
13918 (propagated-inputs
13919 `(("python-tqdm" ,python-tqdm)
13920 ("python-pkginfo" ,python-pkginfo)
13921 ("python-requests" ,python-requests)
13922 ("python-requests-toolbelt" ,python-requests-toolbelt)))
13923 (home-page "https://github.com/pypa/twine")
13924 (synopsis "Collection of utilities for interacting with PyPI")
13925 (description
13926 "@code{twine} currently supports registering projects and uploading
13927 distributions. It authenticates the user over HTTPS, allows them to pre-sign
13928 their files and supports any packaging format (including wheels).")
13929 (license license:asl2.0)))
13930
13931 (define-public python2-twine
13932 (package-with-python2 python-twine))
13933
13934 (define-public python-linecache2
13935 (package
13936 (name "python-linecache2")
13937 (version "1.0.0")
13938 (source
13939 (origin
13940 (method url-fetch)
13941 (uri (pypi-uri "linecache2" version))
13942 (sha256
13943 (base32
13944 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
13945 (build-system python-build-system)
13946 (arguments
13947 `(;; The tests depend on unittest2, and our version is a bit too old.
13948 #:tests? #f))
13949 (native-inputs
13950 `(("python-pbr" ,python-pbr-minimal)))
13951 (home-page
13952 "https://github.com/testing-cabal/linecache2")
13953 (synopsis "Backports of the linecache module")
13954 (description
13955 "The linecache module allows one to get any line from any file, while
13956 attempting to optimize internally, using a cache, the common case where many
13957 lines are read from a single file.")
13958 (license license:psfl)))
13959
13960 (define-public python2-linecache2
13961 (package-with-python2 python-linecache2))
13962
13963 (define-public python-traceback2
13964 (package
13965 (name "python-traceback2")
13966 (version "1.4.0")
13967 (source
13968 (origin
13969 (method url-fetch)
13970 (uri (pypi-uri "traceback2" version))
13971 (sha256
13972 (base32
13973 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
13974 (build-system python-build-system)
13975 (arguments
13976 `(;; python-traceback2 and python-unittest2 depend on one another.
13977 #:tests? #f))
13978 (native-inputs
13979 `(("python-pbr" ,python-pbr-minimal)))
13980 (propagated-inputs
13981 `(("python-linecache2" ,python-linecache2)))
13982 (home-page
13983 "https://github.com/testing-cabal/traceback2")
13984 (synopsis "Backports of the traceback module")
13985 (description
13986 "This module provides a standard interface to extract, format and print
13987 stack traces of Python programs. It exactly mimics the behavior of the Python
13988 interpreter when it prints a stack trace.")
13989 (license license:psfl)))
13990
13991 (define-public python2-traceback2
13992 (package-with-python2 python-traceback2))
13993
13994 (define-public python-ratelimiter
13995 (package
13996 (name "python-ratelimiter")
13997 (version "1.2.0")
13998 (source
13999 (origin
14000 (method url-fetch)
14001 (uri (pypi-uri "ratelimiter" version))
14002 (sha256
14003 (base32
14004 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
14005 (build-system python-build-system)
14006 (arguments
14007 '(#:tests? #f)) ; There are no tests in the pypi archive.
14008 (home-page "https://github.com/RazerM/ratelimiter")
14009 (synopsis "Simple rate limiting object")
14010 (description
14011 "The @code{ratelimiter} module ensures that an operation will not be
14012 executed more than a given number of times during a given period.")
14013 (license license:asl2.0)))
14014
14015 (define-public python2-ratelimiter
14016 (package-with-python2 python-ratelimiter))
14017
14018 (define-public python-dukpy
14019 (package
14020 (name "python-dukpy")
14021 (version "0.3")
14022 (source
14023 (origin
14024 (method git-fetch)
14025 (uri (git-reference
14026 (url "https://github.com/kovidgoyal/dukpy.git")
14027 (commit (string-append "v" version))))
14028 (file-name (git-file-name name version))
14029 (sha256
14030 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
14031 (build-system python-build-system)
14032 (home-page "https://github.com/kovidgoyal/dukpy")
14033 (synopsis "Run JavaScript in python")
14034 (description
14035 "dukpy is a JavaScript runtime environment for Python using the duktape
14036 embeddable JavaScript engine.")
14037 ;; Dukpy is licensed under MIT like the embedded duktape library,
14038 ;; with 'errors.c' as GPL3.
14039 (license (list license:expat license:gpl3))))
14040
14041 (define-public python2-dukpy
14042 (package-with-python2 python-dukpy))
14043
14044 (define-public python-jsonrpclib-pelix
14045 (package
14046 (name "python-jsonrpclib-pelix")
14047 (version "0.3.2")
14048 (source
14049 (origin
14050 (method url-fetch)
14051 (uri (pypi-uri "jsonrpclib-pelix" version))
14052 (sha256
14053 (base32
14054 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
14055 (build-system python-build-system)
14056 (arguments
14057 `(#:tests? #f)) ; no tests in PyPI tarball
14058 (home-page "https://github.com/tcalmant/jsonrpclib/")
14059 (synopsis "JSON-RPC 2.0 client library for Python")
14060 (description
14061 "This library implements the JSON-RPC v2.0
14062 specification (backwards-compatible) as a client library for Python. This
14063 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
14064 services.")
14065 (license license:asl2.0)))
14066
14067 (define-public python2-jsonrpclib-pelix
14068 (package-with-python2 python-jsonrpclib-pelix))
14069
14070 (define-public python-setuptools-scm-git-archive
14071 (package
14072 (name "python-setuptools-scm-git-archive")
14073 (version "1.0")
14074 (source
14075 (origin
14076 (method url-fetch)
14077 (uri (pypi-uri "setuptools_scm_git_archive" version))
14078 (sha256
14079 (base32
14080 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
14081 (build-system python-build-system)
14082 (native-inputs
14083 `(("python-pytest" ,python-pytest)))
14084 (propagated-inputs
14085 `(("python-setuptools-scm" ,python-setuptools-scm)))
14086 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
14087 (synopsis "Setuptools_scm plugin for git archives")
14088 (description
14089 "The setuptools_scm_git_archive package is a plugin to
14090 setuptools_scm, which supports obtaining versions from git archives that
14091 belong to tagged versions.")
14092 (license license:expat)))
14093
14094 (define-public python2-setuptools-scm-git-archive
14095 (package-with-python2 python-setuptools-scm-git-archive))
14096
14097 (define-public python-setuptools-git
14098 (package
14099 (name "python-setuptools-git")
14100 (version "1.2")
14101 (source
14102 (origin
14103 (method url-fetch)
14104 (uri (pypi-uri "setuptools-git" version))
14105 (sha256
14106 (base32
14107 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
14108 (build-system python-build-system)
14109 (arguments
14110 `(#:phases
14111 (modify-phases %standard-phases
14112 ;; This is needed for tests.
14113 (add-after 'unpack 'configure-git
14114 (lambda _
14115 (setenv "HOME" "/tmp")
14116 (invoke "git" "config" "--global" "user.email" "guix")
14117 (invoke "git" "config" "--global" "user.name" "guix")
14118 #t)))))
14119 (native-inputs
14120 `(("git" ,git-minimal)))
14121 (home-page "https://github.com/msabramo/setuptools-git")
14122 (synopsis "Setuptools revision control system plugin for Git")
14123 (description
14124 "This package provides a plugin for Setuptools for revision control with
14125 Git.")
14126 (license license:bsd-3)))
14127
14128 (define-public python-pyclipper
14129 (package
14130 (name "python-pyclipper")
14131 (version "1.1.0.post1")
14132 (source
14133 (origin
14134 (method url-fetch)
14135 (uri (pypi-uri "pyclipper" version ".zip"))
14136 (sha256
14137 (base32
14138 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
14139 (modules '((guix build utils)))
14140 (snippet
14141 '(begin
14142 ;; This file is generated by Cython.
14143 (delete-file "pyclipper/pyclipper.cpp") #t))))
14144 (build-system python-build-system)
14145 (arguments
14146 `(#:phases
14147 (modify-phases %standard-phases
14148 (add-before 'build 'cythonize-sources
14149 (lambda _
14150 (with-directory-excursion "pyclipper"
14151 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
14152 (propagated-inputs
14153 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
14154 (native-inputs
14155 `(("python-cython" ,python-cython)
14156 ("python-pytest" ,python-pytest)
14157 ("python-pytest-runner" ,python-pytest-runner)
14158 ("python-unittest2" ,python-unittest2)
14159 ("unzip" ,unzip)))
14160 (home-page "https://github.com/greginvm/pyclipper")
14161 (synopsis "Wrapper for Angus Johnson's Clipper library")
14162 (description
14163 "Pyclipper is a Cython wrapper for the C++ translation of the
14164 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
14165 (license license:expat)))
14166
14167 (define-public python2-pyclipper
14168 (package-with-python2 python-pyclipper))
14169
14170 (define-public python2-booleanoperations
14171 (package
14172 (name "python2-booleanoperations")
14173 (version "0.7.1")
14174 (source
14175 (origin
14176 (method url-fetch)
14177 (uri (pypi-uri "booleanOperations" version ".zip"))
14178 (sha256
14179 (base32
14180 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
14181 (build-system python-build-system)
14182 (arguments
14183 `(#:python ,python-2))
14184 (native-inputs
14185 `(("unzip" ,unzip)
14186 ("python2-pytest" ,python2-pytest)
14187 ("python2-pytest-runner" ,python2-pytest-runner)))
14188 (propagated-inputs
14189 `(("python-fonttools" ,python2-fonttools)
14190 ("python-pyclipper" ,python2-pyclipper)
14191 ("python-ufolib" ,python2-ufolib)))
14192 (home-page "https://github.com/typemytype/booleanOperations")
14193 (synopsis "Boolean operations on paths")
14194 (description
14195 "BooleanOperations provides a Python library that enables
14196 boolean operations on paths.")
14197 (license license:expat)))
14198
14199 (define-public python-tempdir
14200 (package
14201 (name "python-tempdir")
14202 (version "0.7.1")
14203 (source
14204 (origin
14205 (method url-fetch)
14206 (uri (pypi-uri "tempdir" version))
14207 (sha256
14208 (base32
14209 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
14210 (build-system python-build-system)
14211 (home-page "https://pypi.org/project/tempdir/")
14212 (arguments
14213 ;; the package has no tests
14214 '(#:tests? #f))
14215 (synopsis "Python library for managing temporary directories")
14216 (description
14217 "This library manages temporary directories that are automatically
14218 deleted with all their contents when they are no longer needed. It is
14219 particularly convenient for use in tests.")
14220 (license license:expat)))
14221
14222 (define-public python2-tempdir
14223 (package-with-python2 python-tempdir))
14224
14225 (define-public python-activepapers
14226 (package
14227 (name "python-activepapers")
14228 (version "0.2.2")
14229 (source
14230 (origin
14231 (method url-fetch)
14232 (uri (pypi-uri "ActivePapers.Py" version))
14233 (sha256
14234 (base32
14235 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
14236 (build-system python-build-system)
14237 (arguments
14238 `(#:modules ((ice-9 ftw)
14239 (srfi srfi-1)
14240 (guix build utils)
14241 (guix build python-build-system))
14242
14243 #:phases
14244 (modify-phases %standard-phases
14245 (add-after 'unpack 'delete-python2-code
14246 (lambda _
14247 (for-each delete-file
14248 '("lib/activepapers/builtins2.py"
14249 "lib/activepapers/standardlib2.py"
14250 "lib/activepapers/utility2.py"))))
14251 (replace 'check
14252 (lambda _
14253 ;; Deactivate the test cases that download files
14254 (setenv "NO_NETWORK_ACCESS" "1")
14255 ;; For some strange reason, some tests fail if nosetests runs all
14256 ;; test modules in a single execution. They pass if each test
14257 ;; module is run individually.
14258 (for-each (lambda (filename)
14259 (invoke "nosetests"
14260 (string-append "tests/" filename)))
14261 (scandir "tests"
14262 (lambda (filename)
14263 (string-suffix? ".py" filename)))))))))
14264 (native-inputs
14265 `(("python-tempdir" ,python-tempdir)
14266 ("python-nose" ,python-nose)))
14267 (propagated-inputs
14268 `(("python-h5py" ,python-h5py)))
14269 (home-page "http://www.activepapers.org/")
14270 (synopsis "Executable papers for scientific computing")
14271 (description
14272 "ActivePapers is a tool for working with executable papers, which
14273 combine data, code, and documentation in single-file packages,
14274 suitable for publication as supplementary material or on repositories
14275 such as figshare or Zenodo.")
14276 (properties `((python2-variant . ,(delay python2-activepapers))))
14277 (license license:bsd-3)))
14278
14279 (define-public python2-activepapers
14280 (let ((base (package-with-python2
14281 (strip-python2-variant python-activepapers))))
14282 (package
14283 (inherit base)
14284 (arguments
14285 (substitute-keyword-arguments (package-arguments base)
14286 ((#:phases phases)
14287 `(modify-phases ,phases
14288 (delete 'delete-python2-code)
14289 (add-after 'unpack 'delete-python3-code
14290 (lambda _
14291 (for-each delete-file
14292 '("lib/activepapers/builtins3.py"
14293 "lib/activepapers/standardlib3.py"
14294 "lib/activepapers/utility3.py")))))))))))
14295
14296 (define-public python-semver
14297 (package
14298 (name "python-semver")
14299 (version "2.7.9")
14300 (source
14301 (origin
14302 (method url-fetch)
14303 (uri (pypi-uri "semver" version))
14304 (sha256
14305 (base32
14306 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
14307 (build-system python-build-system)
14308 (arguments
14309 `(#:phases
14310 (modify-phases %standard-phases
14311 (add-after 'unpack 'patch-test-requirements
14312 (lambda _
14313 (substitute* "setup.py"
14314 ;; Our Python is new enough.
14315 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
14316 #t)))))
14317 (native-inputs
14318 `(("python-tox" ,python-tox)
14319 ("python-virtualenv" ,python-virtualenv)))
14320 (home-page "https://github.com/k-bx/python-semver")
14321 (synopsis "Python helper for Semantic Versioning")
14322 (description "This package provides a Python library for
14323 @url{Semantic Versioning, http://semver.org/}.")
14324 (license license:bsd-3)))
14325
14326 (define-public python2-semver
14327 (package-with-python2 python-semver))
14328
14329 (define-public python-pyro4
14330 (package
14331 (name "python-pyro4")
14332 (version "4.77")
14333 (source
14334 (origin
14335 (method url-fetch)
14336 (uri (pypi-uri "Pyro4" version))
14337 (sha256
14338 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
14339 (build-system python-build-system)
14340 (arguments
14341 '(#:tests? #f)) ;FIXME: Some tests require network access.
14342 (native-inputs
14343 `(("python-cloudpickle" ,python-cloudpickle)
14344 ("python-dill" ,python-dill)
14345 ("python-msgpack" ,python-msgpack)))
14346 (propagated-inputs
14347 `(("python-serpent" ,python-serpent)))
14348 (home-page "https://pyro4.readthedocs.io")
14349 (synopsis "Distributed object middleware for Python")
14350 (description
14351 "Pyro enables you to build applications in which objects can talk to each
14352 other over the network. You can just use normal Python method calls to call
14353 objects on other machines, also known as remote procedure calls (RPC).")
14354 (license license:expat)))
14355
14356 (define-public python2-pyro
14357 (package
14358 (name "python2-pyro")
14359 (version "3.16")
14360 (source
14361 (origin
14362 (method url-fetch)
14363 (uri (pypi-uri "Pyro" version))
14364 (file-name (string-append "Pyro-" version ".tar.gz"))
14365 (sha256
14366 (base32
14367 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
14368 (build-system python-build-system)
14369 (arguments
14370 ;; Pyro is not compatible with Python 3
14371 `(#:python ,python-2
14372 ;; Pyro has no test cases for automatic execution
14373 #:tests? #f))
14374 (home-page "http://pythonhosted.org/Pyro/")
14375 (synopsis "Distributed object manager for Python")
14376 (description "Pyro is a Distributed Object Technology system
14377 written in Python that is designed to be easy to use. It resembles
14378 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
14379 which is a system and language independent Distributed Object Technology
14380 and has much more to offer than Pyro or RMI. Pyro 3.x is no
14381 longer maintained. New projects should use Pyro4 instead, which
14382 is the new Pyro version that is actively developed.")
14383 (license license:expat)))
14384
14385 (define-public python2-scientific
14386 (package
14387 (name "python2-scientific")
14388 (version "2.9.4")
14389 (source
14390 (origin
14391 (method url-fetch)
14392 (uri (string-append "https://bitbucket.org/khinsen/"
14393 "scientificpython/downloads/ScientificPython-"
14394 version ".tar.gz"))
14395 (file-name (string-append "ScientificPython-" version ".tar.gz"))
14396 (sha256
14397 (base32
14398 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
14399 (build-system python-build-system)
14400 (inputs
14401 `(("netcdf" ,netcdf)))
14402 (propagated-inputs
14403 `(("python-numpy" ,python2-numpy-1.8)
14404 ("python-pyro" ,python2-pyro)))
14405 (arguments
14406 ;; ScientificPython is not compatible with Python 3
14407 `(#:python ,python-2
14408 #:tests? #f ; No test suite
14409 #:phases
14410 (modify-phases %standard-phases
14411 (replace 'build
14412 (lambda* (#:key inputs #:allow-other-keys)
14413 (invoke "python" "setup.py" "build"
14414 (string-append "--netcdf_prefix="
14415 (assoc-ref inputs "netcdf"))))))))
14416 (home-page "https://bitbucket.org/khinsen/scientificpython")
14417 (synopsis "Python modules for scientific computing")
14418 (description "ScientificPython is a collection of Python modules that are
14419 useful for scientific computing. Most modules are rather general (Geometry,
14420 physical units, automatic derivatives, ...) whereas others are more
14421 domain-specific (e.g. netCDF and PDB support). The library is currently
14422 not actively maintained and works only with Python 2 and NumPy < 1.9.")
14423 (license license:cecill-c)))
14424
14425 (define-public python2-mmtk
14426 (package
14427 (name "python2-mmtk")
14428 (version "2.7.11")
14429 (source
14430 (origin
14431 (method url-fetch)
14432 (uri (string-append "https://bitbucket.org/khinsen/"
14433 "mmtk/downloads/MMTK-" version ".tar.gz"))
14434 (file-name (string-append "MMTK-" version ".tar.gz"))
14435 (sha256
14436 (base32
14437 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
14438 (build-system python-build-system)
14439 (native-inputs
14440 `(("netcdf" ,netcdf)))
14441 (propagated-inputs
14442 `(("python-scientific" ,python2-scientific)
14443 ("python-tkinter" ,python-2 "tk")))
14444 (arguments
14445 `(#:python ,python-2
14446 #:tests? #f
14447 #:phases
14448 (modify-phases %standard-phases
14449 (add-before 'build 'includes-from-scientific
14450 (lambda* (#:key inputs #:allow-other-keys)
14451 (mkdir-p "Include/Scientific")
14452 (copy-recursively
14453 (string-append
14454 (assoc-ref inputs "python-scientific")
14455 "/include/python2.7/Scientific")
14456 "Include/Scientific"))))))
14457 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
14458 (synopsis "Python library for molecular simulation")
14459 (description "MMTK is a library for molecular simulations with an emphasis
14460 on biomolecules. It provides widely used methods such as Molecular Dynamics
14461 and normal mode analysis, but also basic routines for implementing new methods
14462 for simulation and analysis. The library is currently not actively maintained
14463 and works only with Python 2 and NumPy < 1.9.")
14464 (license license:cecill-c)))
14465
14466 (define-public python-phonenumbers
14467 (package
14468 (name "python-phonenumbers")
14469 (version "8.9.1")
14470 (source
14471 (origin
14472 (method url-fetch)
14473 (uri (pypi-uri "phonenumbers" version))
14474 (sha256
14475 (base32
14476 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
14477 (build-system python-build-system)
14478 (home-page
14479 "https://github.com/daviddrysdale/python-phonenumbers")
14480 (synopsis
14481 "Python library for dealing with international phone numbers")
14482 (description
14483 "This package provides a Python port of Google's libphonenumber library.")
14484 (license license:asl2.0)))
14485
14486 (define-public python2-phonenumbers
14487 (package-with-python2 python-phonenumbers))
14488
14489 (define-public python-send2trash
14490 (package
14491 (name "python-send2trash")
14492 (version "1.5.0")
14493 (source
14494 (origin (method git-fetch)
14495 ;; Source tarball on PyPI doesn't include tests.
14496 (uri (git-reference
14497 (url "https://github.com/hsoft/send2trash.git")
14498 (commit version)))
14499 (file-name (git-file-name name version))
14500 (sha256
14501 (base32
14502 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
14503 (build-system python-build-system)
14504 (arguments
14505 '(#:phases
14506 (modify-phases %standard-phases
14507 (add-before 'check 'pre-check
14508 (lambda _
14509 (mkdir-p "/tmp/foo")
14510 (setenv "HOME" "/tmp/foo")
14511 #t)))))
14512 (home-page "https://github.com/hsoft/send2trash")
14513 (synopsis "Send files to the user's @file{~/Trash} directory")
14514 (description "This package provides a Python library to send files to the
14515 user's @file{~/Trash} directory.")
14516 (properties `((python2-variant . ,(delay python2-send2trash))))
14517 (license license:bsd-3)))
14518
14519 (define-public python2-send2trash
14520 (package
14521 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
14522 (arguments
14523 (substitute-keyword-arguments (package-arguments python-send2trash)
14524 ((#:phases phases)
14525 `(modify-phases ,phases
14526 (add-before 'check 'setenv
14527 (lambda _
14528 (setenv "PYTHONPATH"
14529 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
14530 #t))))))))
14531
14532 (define-public python-yapf
14533 (package
14534 (name "python-yapf")
14535 (version "0.24.0")
14536 (source
14537 (origin
14538 (method url-fetch)
14539 (uri (pypi-uri "yapf" version))
14540 (sha256
14541 (base32
14542 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
14543 (build-system python-build-system)
14544 (home-page "https://github.com/google/yapf")
14545 (synopsis "Formatter for Python code")
14546 (description "YAPF is a formatter for Python code. It's based off of
14547 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
14548 takes the code and reformats it to the best formatting that conforms to the
14549 style guide, even if the original code didn't violate the style guide.")
14550 (license license:asl2.0)))
14551
14552 (define-public python2-yapf
14553 (package-with-python2 python-yapf))
14554
14555 (define-public python-gyp
14556 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
14557 (revision "0"))
14558 (package
14559 (name "python-gyp")
14560 ;; Google does not release versions,
14561 ;; based on second most recent commit date.
14562 (version (git-version "0.0.0" revision commit))
14563 (source
14564 (origin
14565 ;; Google does not release tarballs,
14566 ;; git checkout is needed.
14567 (method git-fetch)
14568 (uri (git-reference
14569 (url "https://chromium.googlesource.com/external/gyp")
14570 (commit commit)))
14571 (file-name (git-file-name name version))
14572 (sha256
14573 (base32
14574 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14575 (build-system python-build-system)
14576 (home-page "https://gyp.gsrc.io/")
14577 (synopsis "GYP is a Meta-Build system")
14578 (description
14579 "GYP builds build systems for large, cross platform applications.
14580 It can be used to generate XCode projects, Visual Studio projects, Ninja build
14581 files, and Makefiles.")
14582 (license license:bsd-3))))
14583
14584 (define-public python2-gyp
14585 (package-with-python2 python-gyp))
14586
14587 (define-public python-whatever
14588 (package
14589 (name "python-whatever")
14590 (version "0.5")
14591 (source
14592 (origin
14593 (method url-fetch)
14594 (uri (string-append "https://github.com/Suor/whatever/archive/" version
14595 ".tar.gz"))
14596 (sha256
14597 (base32
14598 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
14599 (file-name (string-append name "-" version ".tar.gz"))))
14600 (build-system python-build-system)
14601 (arguments
14602 `(#:phases
14603 (modify-phases %standard-phases
14604 (replace 'check
14605 (lambda _
14606 (invoke "py.test"))))))
14607 (native-inputs
14608 `(("python-pytest" ,python-pytest)))
14609 (home-page "http://github.com/Suor/whatever")
14610 (synopsis "Make anonymous functions by partial application of operators")
14611 (description "@code{whatever} provides an easy way to make anonymous
14612 functions by partial application of operators.")
14613 (license license:bsd-3)))
14614
14615 (define-public python2-whatever
14616 (package-with-python2 python-whatever))
14617
14618 (define-public python-funcy
14619 (package
14620 (name "python-funcy")
14621 (version "1.11")
14622 (source
14623 (origin
14624 (method git-fetch)
14625 (uri (git-reference
14626 (url "https://github.com/Suor/funcy.git")
14627 (commit version)))
14628 (sha256
14629 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14630 (file-name (git-file-name name version))))
14631 (build-system python-build-system)
14632 (arguments
14633 `(#:phases
14634 (modify-phases %standard-phases
14635 (replace 'check
14636 (lambda _
14637 (invoke "py.test"))))))
14638 (native-inputs
14639 `(("python-pytest" ,python-pytest)
14640 ("python-whatever" ,python-whatever)))
14641 (home-page "http://github.com/Suor/funcy")
14642 (synopsis "Functional tools")
14643 (description "@code{funcy} is a library that provides functional tools.
14644 Examples are:
14645 @enumerate
14646 @item merge - Merges collections of the same type
14647 @item walk - Type-preserving map
14648 @item select - Selects a part of a collection
14649 @item take - Takes the first n items of a collection
14650 @item first - Takes the first item of a collection
14651 @item remove - Predicated-removes items of a collection
14652 @item concat - Concatenates two collections
14653 @item flatten - Flattens a collection with subcollections
14654 @item distinct - Returns only distinct items
14655 @item split - Predicated-splits a collection
14656 @item split_at - Splits a collection at a given item
14657 @item group_by - Groups items by group
14658 @item pairwise - Pairs off adjacent items
14659 @item partial - Partially-applies a function
14660 @item curry - Curries a function
14661 @item compose - Composes functions
14662 @item complement - Complements a predicate
14663 @item all_fn - \"all\" with predicate
14664 @end enumerate")
14665 (license license:bsd-3)))
14666
14667 (define-public python2-funcy
14668 (package-with-python2 python-funcy))
14669
14670 (define-public python-isoweek
14671 (package
14672 (name "python-isoweek")
14673 (version "1.3.3")
14674 (source
14675 (origin
14676 (method url-fetch)
14677 (uri (pypi-uri "isoweek" version))
14678 (sha256
14679 (base32
14680 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14681 (build-system python-build-system)
14682 (home-page "https://github.com/gisle/isoweek")
14683 (synopsis "Objects representing a week")
14684 (description "The @code{isoweek} module provide the class Week that
14685 implements the week definition of ISO 8601. This standard also defines
14686 a notation for identifying weeks; yyyyWww (where the W is a literal).
14687 Week instances stringify to this form.")
14688 (license license:bsd-3)))
14689
14690 (define-public python2-isoweek
14691 (package-with-python2 python-isoweek))
14692
14693 (define-public python-tokenize-rt
14694 (package
14695 (name "python-tokenize-rt")
14696 (version "2.0.1")
14697 (source
14698 (origin
14699 (method url-fetch)
14700 (uri (pypi-uri "tokenize-rt" version))
14701 (sha256
14702 (base32
14703 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14704 (build-system python-build-system)
14705 (home-page "https://github.com/asottile/tokenize-rt")
14706 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14707 (description
14708 "This Python library is a wrapper around @code{tokenize} from the Python
14709 standard library. It provides two additional tokens @code{ESCAPED_NL} and
14710 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14711 and @code{tokens_to_src} to roundtrip.")
14712 (license license:expat)))
14713
14714 (define-public python-future-fstrings
14715 (package
14716 (name "python-future-fstrings")
14717 (version "0.4.1")
14718 (source
14719 (origin
14720 (method url-fetch)
14721 (uri (pypi-uri "future_fstrings" version))
14722 (sha256
14723 (base32
14724 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14725 (build-system python-build-system)
14726 (propagated-inputs
14727 `(("python-tokenize-rt" ,python-tokenize-rt)))
14728 (home-page "https://github.com/asottile/future-fstrings")
14729 (synopsis "Backport of fstrings to Python < 3.6")
14730 (description
14731 "This package provides a UTF-8 compatible encoding
14732 @code{future_fstrings}, which performs source manipulation. It decodes the
14733 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
14734 @code{f} strings.")
14735 (license license:expat)))
14736
14737 (define-public python-typed-ast
14738 (package
14739 (name "python-typed-ast")
14740 (version "1.4.0")
14741 (source
14742 (origin
14743 (method git-fetch)
14744 (uri (git-reference
14745 (url "https://github.com/python/typed_ast.git")
14746 (commit version)))
14747 (sha256
14748 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
14749 (file-name (git-file-name name version))))
14750 (build-system python-build-system)
14751 (arguments
14752 `(#:modules ((guix build utils)
14753 (guix build python-build-system)
14754 (ice-9 ftw)
14755 (srfi srfi-1)
14756 (srfi srfi-26))
14757 #:phases
14758 (modify-phases %standard-phases
14759 (replace 'check
14760 (lambda _
14761 (let ((cwd (getcwd)))
14762 (setenv "PYTHONPATH"
14763 (string-append cwd "/build/"
14764 (find (cut string-prefix? "lib" <>)
14765 (scandir (string-append cwd "/build")))
14766 ":"
14767 (getenv "PYTHONPATH"))))
14768 (invoke "pytest")
14769 #t)))))
14770 (native-inputs `(("python-pytest" ,python-pytest)))
14771 (home-page "https://github.com/python/typed_ast")
14772 (synopsis "Fork of Python @code{ast} modules with type comment support")
14773 (description "This package provides a parser similar to the standard
14774 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
14775 include PEP 484 type comments and are independent of the version of Python
14776 under which they are run. The @code{typed_ast} parsers produce the standard
14777 Python AST (plus type comments), and are both fast and correct, as they are
14778 based on the CPython 2.7 and 3.7 parsers.")
14779 ;; See the file "LICENSE" for the details.
14780 (license (list license:psfl
14781 license:asl2.0
14782 license:expat)))) ;ast27/Parser/spark.py
14783
14784 (define-public python-typing
14785 (package
14786 (name "python-typing")
14787 (version "3.6.6")
14788 (source
14789 (origin
14790 (method url-fetch)
14791 (uri (pypi-uri "typing" version))
14792 (sha256
14793 (base32
14794 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
14795 (build-system python-build-system)
14796 (home-page "https://docs.python.org/3/library/typing.html")
14797 (synopsis "Type hints for Python")
14798 (description "This is a backport of the standard library @code{typing}
14799 module to Python versions older than 3.5. Typing defines a standard notation
14800 for Python function and variable type annotations. The notation can be used
14801 for documenting code in a concise, standard format, and it has been designed
14802 to also be used by static and runtime type checkers, static analyzers, IDEs
14803 and other tools.")
14804 (license license:psfl)))
14805
14806 (define-public python2-typing
14807 (package-with-python2 python-typing))
14808
14809 (define-public python-typing-extensions
14810 (package
14811 (name "python-typing-extensions")
14812 (version "3.7.2")
14813 (source
14814 (origin
14815 (method url-fetch)
14816 (uri (pypi-uri "typing_extensions" version))
14817 (sha256
14818 (base32
14819 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
14820 (build-system python-build-system)
14821 (home-page
14822 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
14823 (synopsis "Experimental type hints for Python")
14824 (description
14825 "The typing_extensions module contains additional @code{typing} hints not
14826 yet present in the of the @code{typing} standard library.
14827 Included are implementations of:
14828 @enumerate
14829 @item ClassVar
14830 @item ContextManager
14831 @item Counter
14832 @item DefaultDict
14833 @item Deque
14834 @item NewType
14835 @item NoReturn
14836 @item overload
14837 @item Protocol
14838 @item runtime
14839 @item Text
14840 @item Type
14841 @item TYPE_CHECKING
14842 @item AsyncGenerator
14843 @end enumerate\n")
14844 (license license:psfl)))
14845
14846 (define-public bpython
14847 (package
14848 (name "bpython")
14849 (version "0.18")
14850 (source
14851 (origin
14852 (method url-fetch)
14853 (uri (pypi-uri "bpython" version))
14854 (sha256
14855 (base32 "1hl6frgvr2lqaxqczl8amg9xih32b3gzv429vs0qrjb8wpdj1k2n"))))
14856 (build-system python-build-system)
14857 (arguments
14858 `(#:phases
14859 (modify-phases %standard-phases
14860 (add-after 'unpack 'remove-failing-test
14861 (lambda _
14862 ;; Remove failing test. FIXME: make it pass
14863 (delete-file "bpython/test/test_args.py")
14864 #t))
14865 (add-after 'wrap 'add-aliases
14866 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
14867 (lambda* (#:key outputs #:allow-other-keys)
14868 (let ((out (assoc-ref outputs "out")))
14869 (for-each
14870 (lambda (old new)
14871 (symlink old (string-append out "/bin/" new)))
14872 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
14873 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
14874 #t)))))
14875 (propagated-inputs
14876 `(("python-pygments" ,python-pygments)
14877 ("python-requests" ,python-requests)
14878 ("python-babel" ,python-babel) ; optional, for internationalization
14879 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
14880 ("python-greenlet" ,python-greenlet)
14881 ("python-urwid" ,python-urwid) ; for bpython-urwid only
14882 ("python-six" ,python-six)))
14883 (native-inputs
14884 `(("python-sphinx" ,python-sphinx)
14885 ("python-mock" ,python-mock)))
14886 (home-page "https://bpython-interpreter.org/")
14887 (synopsis "Fancy interface to the Python interpreter")
14888 (description "Bpython is a fancy interface to the Python
14889 interpreter. bpython's main features are
14890
14891 @enumerate
14892 @item in-line syntax highlighting,
14893 @item readline-like autocomplete with suggestions displayed as you type,
14894 @item expected parameter list for any Python function,
14895 @item \"rewind\" function to pop the last line of code from memory and
14896 re-evaluate,
14897 @item send the code you've entered off to a pastebin,
14898 @item save the code you've entered to a file, and
14899 @item auto-indentation.
14900 @end enumerate")
14901 (license license:expat)))
14902
14903 (define-public bpython2
14904 (let ((base (package-with-python2
14905 (strip-python2-variant bpython))))
14906 (package (inherit base)
14907 (name "bpython2")
14908 (arguments
14909 `(#:python ,python-2
14910 #:phases
14911 (modify-phases %standard-phases
14912 (add-after 'unpack 'remove-failing-test
14913 (lambda _
14914 ;; Remove failing test. FIXME: make it pass
14915 (delete-file "bpython/test/test_args.py")
14916 ;; Disable failing test-cases (renaming inhibits they are
14917 ;; discovered)
14918 (substitute* "bpython/test/test_curtsies_repl.py"
14919 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
14920 (string-append a "xxx_off_" b))
14921 (("^(\\s*def )(test_complex\\W)" _ a b)
14922 (string-append a "xxx_off_" b)))
14923 #t))
14924 (add-before 'build 'rename-scripts
14925 ;; rename the scripts to bypthon2, bpdb2, etc.
14926 (lambda _
14927 (substitute* "setup.py"
14928 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
14929 (string-append name "2" rest "\n"))
14930 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
14931 (string-append name "2" (or sub "") rest "\n")))
14932 #t))))))))
14933
14934 (define-public python-pyinotify
14935 (package
14936 (name "python-pyinotify")
14937 (version "0.9.6")
14938 (source (origin
14939 (method url-fetch)
14940 (uri (pypi-uri "pyinotify" version))
14941 (sha256
14942 (base32
14943 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
14944 (build-system python-build-system)
14945 (arguments `(#:tests? #f)) ;no tests
14946 (home-page "https://github.com/seb-m/pyinotify")
14947 (synopsis "Python library for monitoring inotify events")
14948 (description
14949 "@code{pyinotify} provides a Python interface for monitoring
14950 file system events on Linux.")
14951 (license license:expat)))
14952
14953 (define-public python2-pyinotify
14954 (package-with-python2 python-pyinotify))
14955
14956 ;; Ada parser uses this version.
14957 (define-public python2-quex-0.67.3
14958 (package
14959 (name "python2-quex")
14960 (version "0.67.3")
14961 (source
14962 (origin
14963 (method url-fetch)
14964 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
14965 (version-major+minor version)
14966 "/quex-" version ".zip"))
14967 (sha256
14968 (base32
14969 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
14970 (build-system python-build-system)
14971 (native-inputs
14972 `(("unzip" ,unzip)))
14973 (arguments
14974 `(#:python ,python-2
14975 #:tests? #f
14976 #:phases
14977 (modify-phases %standard-phases
14978 (delete 'configure)
14979 (delete 'build)
14980 (replace 'install
14981 (lambda* (#:key outputs #:allow-other-keys)
14982 (let* ((out (assoc-ref outputs "out"))
14983 (share/quex (string-append out "/share/quex"))
14984 (bin (string-append out "/bin")))
14985 (copy-recursively "." share/quex)
14986 (mkdir-p bin)
14987 (symlink (string-append share/quex "/quex-exe.py")
14988 (string-append bin "/quex"))
14989 #t))))))
14990 (native-search-paths
14991 (list (search-path-specification
14992 (variable "QUEX_PATH")
14993 (files '("share/quex")))))
14994 (home-page "http://quex.sourceforge.net/")
14995 (synopsis "Lexical analyzer generator in Python")
14996 (description "@code{quex} is a lexical analyzer generator in Python.")
14997 (license license:lgpl2.1+))) ; Non-military
14998
14999 (define-public python2-quex
15000 (package (inherit python2-quex-0.67.3)
15001 (name "python2-quex")
15002 (version "0.68.1")
15003 (source
15004 (origin
15005 (method url-fetch)
15006 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
15007 (sha256
15008 (base32
15009 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
15010 (file-name (string-append name "-" version ".tar.gz"))))))
15011
15012 (define-public python-more-itertools
15013 (package
15014 (name "python-more-itertools")
15015 (version "7.1.0")
15016 (source
15017 (origin
15018 (method url-fetch)
15019 (uri (pypi-uri "more-itertools" version))
15020 (sha256
15021 (base32
15022 "16phg2f2dvm6ci5wr49ncha5lmc0m2in3bsl33c61vzca4gkvd4b"))))
15023 (build-system python-build-system)
15024 (home-page "https://github.com/erikrose/more-itertools")
15025 (synopsis "More routines for operating on iterables, beyond itertools")
15026 (description "Python's built-in @code{itertools} module implements a
15027 number of iterator building blocks inspired by constructs from APL, Haskell,
15028 and SML. @code{more-itertools} includes additional building blocks for
15029 working with iterables.")
15030 (properties `((python2-variant . ,(delay python2-more-itertools))))
15031 (license license:expat)))
15032
15033 ;; The 5.x series are the last versions supporting Python 2.7.
15034 (define-public python2-more-itertools
15035 (package
15036 (inherit python-more-itertools)
15037 (name "python2-more-itertools")
15038 (version "5.0.0")
15039 (source (origin
15040 (method url-fetch)
15041 (uri (pypi-uri "more-itertools" version))
15042 (sha256
15043 (base32
15044 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
15045 (arguments
15046 `(#:python ,python2-minimal))
15047 (propagated-inputs
15048 `(("python2-six" ,python2-six-bootstrap)))))
15049
15050 (define-public python-latexcodec
15051 (package
15052 (name "python-latexcodec")
15053 (version "1.0.6")
15054 (source
15055 (origin
15056 (method url-fetch)
15057 (uri (pypi-uri "latexcodec" version))
15058 (sha256
15059 (base32 "0s4wdbg0w2l8pj3i0y4510i0s04p8nhxcsa2z41bjsv0k66npb81"))))
15060 (build-system python-build-system)
15061 (inputs
15062 `(("python-six" ,python-six)))
15063 (home-page "https://readthedocs.org/projects/latexcodec/")
15064 (synopsis "Work with LaTeX code in Python")
15065 (description "Lexer and codec to work with LaTeX code in Python.")
15066 (license license:expat)))
15067
15068 (define-public python-pybtex
15069 (package
15070 (name "python-pybtex")
15071 (version "0.22.2")
15072 (source
15073 (origin
15074 (method url-fetch)
15075 (uri (pypi-uri "pybtex" version))
15076 (sha256
15077 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
15078 (build-system python-build-system)
15079 (native-inputs
15080 `(("python-nose" ,python-nose)))
15081 (inputs
15082 `(("python-latexcodec" ,python-latexcodec)
15083 ("python-pyyaml" ,python-pyyaml)
15084 ("python-six" ,python-six)))
15085 (arguments
15086 `(#:test-target "nosetests"))
15087 (home-page "https://pybtex.org/")
15088 (synopsis "BibTeX-compatible bibliography processor")
15089 (description "Pybtex is a BibTeX-compatible bibliography processor written
15090 in Python. You can simply type pybtex instead of bibtex.")
15091 (license license:expat)))
15092
15093 (define-public python-onetimepass
15094 (package
15095 (name "python-onetimepass")
15096 (version "1.0.1")
15097 (source
15098 (origin
15099 (method url-fetch)
15100 (uri (pypi-uri "onetimepass" version))
15101 (sha256
15102 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
15103 (build-system python-build-system)
15104 (propagated-inputs `(("python-six" ,python-six)))
15105 (home-page "https://github.com/tadeck/onetimepass/")
15106 (synopsis "One-time password library")
15107 (description "Python one-time password library for HMAC-based (HOTP) and
15108 time-based (TOTP) passwords.")
15109 (license license:expat)))
15110
15111 (define-public python-parso
15112 (package
15113 (name "python-parso")
15114 (version "0.5.1")
15115 (source
15116 (origin
15117 (method url-fetch)
15118 (uri (pypi-uri "parso" version))
15119 (sha256
15120 (base32
15121 "171a9ivhxwsd52h1cgsz40zgzpgzscn7yqb7sdjhy8m1lzj0wsv6"))))
15122 (native-inputs
15123 `(("python-pytest" ,python-pytest)))
15124 (build-system python-build-system)
15125 (arguments
15126 `(#:phases (modify-phases %standard-phases
15127 (replace 'check
15128 (lambda _ (invoke "pytest" "-vv"))))))
15129 (home-page "https://github.com/davidhalter/parso")
15130 (synopsis "Python Parser")
15131 (description "Parso is a Python parser that supports error recovery and
15132 round-trip parsing for different Python versions (in multiple Python versions).
15133 Parso is also able to list multiple syntax errors in your Python file.")
15134 (license license:expat)))
15135
15136 (define-public python2-parso
15137 (package-with-python2 python-parso))
15138
15139 (define-public python-async-generator
15140 (package
15141 (name "python-async-generator")
15142 (version "1.10")
15143 (source
15144 (origin
15145 (method url-fetch)
15146 (uri (pypi-uri "async_generator" version))
15147 (sha256
15148 (base32
15149 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
15150 (build-system python-build-system)
15151 (native-inputs
15152 `(("python-pytest" ,python-pytest)))
15153 (home-page "https://github.com/python-trio/async_generator")
15154 (synopsis "Async generators and context managers for Python 3.5+")
15155 (description "@code{async_generator} back-ports Python 3.6's native async
15156 generators and Python 3.7's context managers into Python 3.5.")
15157 ;; Dual licensed.
15158 (license (list license:expat license:asl2.0))))
15159
15160 (define-public python-async-timeout
15161 (package
15162 (name "python-async-timeout")
15163 (version "3.0.1")
15164 (source
15165 (origin
15166 (method url-fetch)
15167 (uri (pypi-uri "async-timeout" version))
15168 (sha256
15169 (base32
15170 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
15171 (build-system python-build-system)
15172 (home-page "https://github.com/aio-libs/async_timeout/")
15173 (synopsis "Timeout context manager for asyncio programs")
15174 (description "@code{async-timeout} provides a timeout timeout context
15175 manager compatible with @code{asyncio}.")
15176 (license license:asl2.0)))
15177
15178 (define-public python-glob2
15179 (package
15180 (name "python-glob2")
15181 (version "0.7")
15182 (source
15183 (origin
15184 (method git-fetch)
15185 (uri (git-reference
15186 (url "https://github.com/miracle2k/python-glob2.git")
15187 (commit (string-append "v" version))))
15188 (file-name (git-file-name name version))
15189 (sha256
15190 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
15191 (build-system python-build-system)
15192 (home-page "https://github.com/miracle2k/python-glob2/")
15193 (synopsis "Extended Version of the python buildin glob module")
15194 (description "This is an extended version of the Python
15195 @url{http://docs.python.org/library/glob.html, built-in glob module} which
15196 adds:
15197
15198 @itemize
15199 @item The ability to capture the text matched by glob patterns, and return
15200 those matches alongside the file names.
15201 @item A recursive @code{**} globbing syntax, akin for example to the
15202 @code{globstar} option of Bash.
15203 @item The ability to replace the file system functions used, in order to glob
15204 on virtual file systems.
15205 @item Compatible with Python 2 and Python 3 (tested with 3.3).
15206 @end itemize
15207
15208 Glob2 currently based on the glob code from Python 3.3.1.")
15209 (license license:bsd-2)))
15210
15211 (define-public python2-glob2
15212 (package-with-python2 python-glob2))
15213
15214 (define-public python-gipc
15215 (package
15216 (name "python-gipc")
15217 (version "0.6.0")
15218 (source
15219 (origin
15220 (method url-fetch)
15221 (uri (pypi-uri "gipc" version ".zip"))
15222 (sha256
15223 (base32
15224 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
15225 (build-system python-build-system)
15226 (native-inputs
15227 `(("unzip" ,unzip)))
15228 (propagated-inputs
15229 `(("python-gevent" ,python-gevent)))
15230 (home-page "http://gehrcke.de/gipc")
15231 (synopsis "Child process management in the context of gevent")
15232 (description "Usage of Python's multiprocessing package in a
15233 gevent-powered application may raise problems. With @code{gipc},
15234 process-based child processes can safely be created anywhere within a
15235 gevent-powered application.")
15236 (license license:expat)))
15237
15238 (define-public python2-gipc
15239 (package-with-python2 python-gipc))
15240
15241 (define-public python-fusepy
15242 (package
15243 (name "python-fusepy")
15244 (version "2.0.4")
15245 (source
15246 (origin
15247 (method url-fetch)
15248 (uri (pypi-uri "fusepy" version))
15249 (sha256
15250 (base32
15251 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
15252 (build-system python-build-system)
15253 (arguments
15254 `(#:phases
15255 (modify-phases %standard-phases
15256 (add-before 'build 'set-library-file-name
15257 (lambda* (#:key inputs #:allow-other-keys)
15258 (let ((fuse (assoc-ref inputs "fuse")))
15259 (substitute* "fuse.py"
15260 (("find_library\\('fuse'\\)")
15261 (string-append "'" fuse "/lib/libfuse.so'")))
15262 #t))))))
15263 (propagated-inputs
15264 `(("fuse" ,fuse)))
15265 (home-page "https://github.com/fusepy/fusepy")
15266 (synopsis "Simple ctypes bindings for FUSE")
15267 (description "Python module that provides a simple interface to FUSE and
15268 MacFUSE. The binding is created using the standard @code{ctypes} library.")
15269 (license license:isc)))
15270
15271 (define-public python2-fusepy
15272 (package-with-python2 python-fusepy))
15273
15274 (define-public python2-gdrivefs
15275 (package
15276 (name "python2-gdrivefs")
15277 (version "0.14.9")
15278 (source
15279 (origin
15280 (method url-fetch)
15281 (uri (pypi-uri "gdrivefs" version))
15282 (sha256
15283 (base32
15284 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
15285 (build-system python-build-system)
15286 (arguments
15287 `(#:python ,python-2
15288 #:phases
15289 (modify-phases %standard-phases
15290 (add-before 'build 'patch-setup-py
15291 (lambda _
15292 ;; Update requirements from dependency==version
15293 ;; to dependency>=version
15294 (substitute* "gdrivefs/resources/requirements.txt"
15295 (("==") ">="))
15296 #t)))))
15297 (native-inputs
15298 `(("python2-gipc" ,python2-gipc)
15299 ("python2-gevent" ,python2-gevent)
15300 ("python2-greenlet" ,python2-greenlet)
15301 ("python2-httplib2" ,python2-httplib2)
15302 ("python2-uritemplate" ,python2-uritemplate)
15303 ("python2-oauth2client" ,python2-oauth2client)
15304 ("python2-six" ,python2-six)))
15305 (propagated-inputs
15306 `(("python2-dateutil" ,python2-dateutil)
15307 ("python2-fusepy" ,python2-fusepy)
15308 ("python2-google-api-client" ,python2-google-api-client)))
15309 (home-page "https://github.com/dsoprea/GDriveFS")
15310 (synopsis "Mount Google Drive as a local file system")
15311 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
15312 under Python 2.7.")
15313 (license license:gpl2)))
15314
15315 (define-public pybind11
15316 (package
15317 (name "pybind11")
15318 (version "2.3.0")
15319 (source (origin
15320 (method git-fetch)
15321 (uri (git-reference
15322 (url "https://github.com/pybind/pybind11.git")
15323 (commit (string-append "v" version))))
15324 (sha256
15325 (base32
15326 "11b6dniri8m05spfd2a19irz82shf4sdca73566bniggrf3zclnf"))
15327 (file-name (git-file-name name version))))
15328 (build-system cmake-build-system)
15329 (native-inputs
15330 `(("python" ,python)
15331 ("python-pytest" ,python-pytest)))
15332 (arguments
15333 `(#:test-target "check"))
15334 (home-page "https://github.com/pybind/pybind11/")
15335 (synopsis "Seamless operability between C++11 and Python")
15336 (description "pybind11 is a lightweight header-only library that exposes
15337 C++ types in Python and vice versa, mainly to create Python bindings of
15338 existing C++ code. Its goals and syntax are similar to the excellent
15339 Boost.Python library by David Abrahams: to minimize boilerplate code in
15340 traditional extension modules by inferring type information using compile-time
15341 introspection.")
15342 (license license:expat)))
15343
15344 (define-public python-fasteners
15345 (package
15346 (name "python-fasteners")
15347 (version "0.14.1")
15348 (source
15349 (origin
15350 (method url-fetch)
15351 (uri (pypi-uri "fasteners" version))
15352 (sha256
15353 (base32
15354 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
15355 (build-system python-build-system)
15356 (propagated-inputs
15357 `(("python-monotonic" ,python-monotonic)
15358 ("python-six" ,python-six)
15359 ("python-testtools" ,python-testtools)))
15360 (home-page "https://github.com/harlowja/fasteners")
15361 (synopsis "Python package that provides useful locks")
15362 (description
15363 "This package provides a Python program that provides following locks:
15364
15365 @itemize
15366 @item Locking decorator
15367 @item Reader-writer locks
15368 @item Inter-process locks
15369 @item Generic helpers
15370 @end itemize\n")
15371 (properties `((python2-variant . ,(delay python2-fasteners))))
15372 (license license:asl2.0)))
15373
15374 (define-public python2-fasteners
15375 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
15376 (package
15377 (inherit base)
15378 (propagated-inputs
15379 `(("python2-futures" ,python2-futures)
15380 ,@(package-propagated-inputs base))))))
15381
15382 (define-public python-requests-file
15383 (package
15384 (name "python-requests-file")
15385 (version "1.4.3")
15386 (source
15387 (origin
15388 (method url-fetch)
15389 (uri (pypi-uri "requests-file" version))
15390 (sha256
15391 (base32
15392 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
15393 (build-system python-build-system)
15394 (propagated-inputs
15395 `(("python-requests" ,python-requests)
15396 ("python-six" ,python-six)))
15397 (home-page
15398 "https://github.com/dashea/requests-file")
15399 (synopsis "File transport adapter for Requests")
15400 (description
15401 "Requests-File is a transport adapter for use with the Requests Python
15402 library to allow local file system access via @code{file://} URLs.")
15403 (license license:asl2.0)))
15404
15405 (define-public python2-requests-file
15406 (package-with-python2 python-requests-file))
15407
15408 (define-public python-tldextract
15409 (package
15410 (name "python-tldextract")
15411 (version "2.2.0")
15412 (source
15413 (origin
15414 (method url-fetch)
15415 (uri (pypi-uri "tldextract" version))
15416 (sha256
15417 (base32
15418 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
15419 (build-system python-build-system)
15420 (native-inputs
15421 `(("python-pytest" ,python-pytest)
15422 ("python-responses" ,python-responses)))
15423 (propagated-inputs
15424 `(("python-idna" ,python-idna)
15425 ("python-requests" ,python-requests)
15426 ("python-requests-file" ,python-requests-file)))
15427 (home-page
15428 "https://github.com/john-kurkowski/tldextract")
15429 (synopsis
15430 "Separate the TLD from the registered domain and subdomains of a URL")
15431 (description
15432 "TLDExtract accurately separates the TLD from the registered domain and
15433 subdomains of a URL, using the Public Suffix List. By default, this includes
15434 the public ICANN TLDs and their exceptions. It can optionally support the
15435 Public Suffix List's private domains as well.")
15436 (license license:bsd-3)))
15437
15438 (define-public python2-tldextract
15439 (package-with-python2 python-tldextract))
15440
15441 (define-public python-pynamecheap
15442 (package
15443 (name "python-pynamecheap")
15444 (version "0.0.3")
15445 (source
15446 (origin
15447 (method url-fetch)
15448 (uri (pypi-uri "PyNamecheap" version))
15449 (sha256
15450 (base32
15451 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
15452 (build-system python-build-system)
15453 (propagated-inputs
15454 `(("python-requests" ,python-requests)))
15455 (home-page
15456 "https://github.com/Bemmu/PyNamecheap")
15457 (synopsis
15458 "Namecheap API client in Python")
15459 (description
15460 "PyNamecheap is a Namecheap API client in Python.")
15461 (license license:expat)))
15462
15463 (define-public python2-pynamecheap
15464 (package-with-python2 python-pynamecheap))
15465
15466 (define-public python-dns-lexicon
15467 (package
15468 (name "python-dns-lexicon")
15469 (version "2.4.0")
15470 (source
15471 (origin
15472 (method url-fetch)
15473 (uri (pypi-uri "dns-lexicon" version))
15474 (sha256
15475 (base32
15476 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
15477 (build-system python-build-system)
15478 (arguments
15479 `(#:tests? #f)) ;requires internet access
15480 (propagated-inputs
15481 `(("python-future" ,python-future)
15482 ("python-pynamecheap" ,python-pynamecheap)
15483 ("python-requests" ,python-requests)
15484 ("python-tldextract" ,python-tldextract)
15485 ("python-urllib3" ,python-urllib3)))
15486 (home-page "https://github.com/AnalogJ/lexicon")
15487 (synopsis
15488 "Manipulate DNS records on various DNS providers")
15489 (description
15490 "Lexicon provides a way to manipulate DNS records on multiple DNS
15491 providers in a standardized way. It has a CLI but it can also be used as a
15492 Python library. It was designed to be used in automation, specifically with
15493 Let's Encrypt.")
15494 (license license:expat)))
15495
15496 (define-public python2-dns-lexicon
15497 (package-with-python2 python-dns-lexicon))
15498
15499 (define-public python-commandlines
15500 (package
15501 (name "python-commandlines")
15502 (version "0.4.1")
15503 (source
15504 (origin
15505 (method url-fetch)
15506 (uri (pypi-uri "commandlines" version))
15507 (sha256
15508 (base32
15509 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15510 (build-system python-build-system)
15511 (home-page "https://github.com/chrissimpkins/commandlines")
15512 (synopsis "Command line argument to object parsing library")
15513 (description
15514 "@code{Commandlines} is a Python library for command line application
15515 development that supports command line argument parsing, command string
15516 validation testing and application logic.")
15517 (license license:expat)))
15518
15519 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15520 ;; python-numba. They have a very unflexible relationship.
15521 (define-public python-numba
15522 (package
15523 (name "python-numba")
15524 (version "0.42.0")
15525 (source
15526 (origin
15527 (method url-fetch)
15528 (uri (pypi-uri "numba" version))
15529 (sha256
15530 (base32
15531 "03rqdfx0512lcri2bcpngx5k3jwfbqnanqj3n19c7d6h6hqxvq9x"))))
15532 (build-system python-build-system)
15533 (arguments
15534 `(#:modules ((guix build utils)
15535 (guix build python-build-system)
15536 (ice-9 ftw)
15537 (srfi srfi-1)
15538 (srfi srfi-26))
15539 #:phases
15540 (modify-phases %standard-phases
15541 (add-after 'unpack 'disable-proprietary-features
15542 (lambda _
15543 (setenv "NUMBA_DISABLE_HSA" "1")
15544 (setenv "NUMBA_DISABLE_CUDA" "1")
15545 #t))
15546 (add-after 'unpack 'remove-failing-tests
15547 (lambda _
15548 ;; FIXME: these tests fail for unknown reasons:
15549 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15550 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15551 (substitute* "numba/tests/test_dispatcher.py"
15552 (("def test(_non_writable_pycache)" _ m)
15553 (string-append "def guix_skip" m))
15554 (("def test(_non_creatable_pycache)" _ m)
15555 (string-append "def guix_skip" m))
15556 (("def test(_frozen)" _ m)
15557 (string-append "def guix_skip" m)))
15558
15559 ;; These tests fail because we don't run the tests from the build
15560 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
15561 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
15562 (substitute* "numba/tests/test_pycc.py"
15563 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15564 (string-append "def guix_skip" m)))
15565 #t))
15566 (replace 'check
15567 (lambda _
15568 (let ((cwd (getcwd)))
15569 (setenv "PYTHONPATH"
15570 (string-append cwd "/build/"
15571 (find (cut string-prefix? "lib" <>)
15572 (scandir (string-append cwd "/build")))
15573 ":"
15574 (getenv "PYTHONPATH")))
15575 ;; Something is wrong with the PYTHONPATH when running the
15576 ;; tests from the build directory, as it complains about not being
15577 ;; able to import certain modules.
15578 (with-directory-excursion "/tmp"
15579 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15580 #t)))))
15581 (propagated-inputs
15582 `(("python-llvmlite" ,python-llvmlite)
15583 ("python-numpy" ,python-numpy)
15584 ("python-singledispatch" ,python-singledispatch)))
15585 ;; Needed for tests.
15586 (inputs
15587 `(("python-jinja2" ,python-jinja2)
15588 ("python-pygments" ,python-pygments)))
15589 (home-page "https://numba.pydata.org")
15590 (synopsis "Compile Python code using LLVM")
15591 (description "Numba gives you the power to speed up your applications with
15592 high performance functions written directly in Python. With a few
15593 annotations, array-oriented and math-heavy Python code can be just-in-time
15594 compiled to native machine instructions, similar in performance to C, C++ and
15595 Fortran, without having to switch languages or Python interpreters.
15596
15597 Numba works by generating optimized machine code using the LLVM compiler
15598 infrastructure at import time, runtime, or statically (using the included pycc
15599 tool).")
15600 (license license:bsd-3)))
15601
15602 (define-public python-anndata
15603 (package
15604 (name "python-anndata")
15605 (version "0.6.18")
15606 (source
15607 (origin
15608 (method url-fetch)
15609 (uri (pypi-uri "anndata" version))
15610 (sha256
15611 (base32
15612 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
15613 (build-system python-build-system)
15614 (propagated-inputs
15615 `(("python-h5py" ,python-h5py)
15616 ("python-natsort" ,python-natsort)
15617 ("python-pandas" ,python-pandas)
15618 ("python-scipy" ,python-scipy)))
15619 (home-page "https://github.com/theislab/anndata")
15620 (synopsis "Annotated data for data analysis pipelines")
15621 (description "Anndata is a package for simple (functional) high-level APIs
15622 for data analysis pipelines. In this context, it provides an efficient,
15623 scalable way of keeping track of data together with learned annotations and
15624 reduces the code overhead typically encountered when using a mostly
15625 object-oriented library such as @code{scikit-learn}.")
15626 (license license:bsd-3)))
15627
15628 (define-public python-dill
15629 (package
15630 (name "python-dill")
15631 (version "0.2.9")
15632 (source
15633 (origin
15634 (method url-fetch)
15635 (uri (pypi-uri "dill" version))
15636 (sha256
15637 (base32 "0vwqyi6hyz2r29zydc78dqymkbc5y7gia16xcdh215cikxph9mpn"))))
15638 (build-system python-build-system)
15639 ;; FIXME: The check phase fails with "don't know how to make test from: …".
15640 (arguments '(#:tests? #f))
15641 (home-page "https://pypi.org/project/dill")
15642 (synopsis "Serialize all of Python")
15643 (description "Dill extends Python's @code{pickle} module for serializing
15644 and de-serializing Python objects to the majority of the built-in Python
15645 types. Dill provides the user the same interface as the @code{pickle} module,
15646 and also includes some additional features. In addition to pickling Python
15647 objects, @code{dill} provides the ability to save the state of an interpreter
15648 session in a single command. Hence, it would be feasible to save a
15649 interpreter session, close the interpreter, ship the pickled file to another
15650 computer, open a new interpreter, unpickle the session and thus continue from
15651 the saved state of the original interpreter session.")
15652 (license license:bsd-3)))
15653
15654 (define-public python-multiprocess
15655 (package
15656 (name "python-multiprocess")
15657 (version "0.70.6.1")
15658 (source
15659 (origin
15660 (method url-fetch)
15661 (uri (pypi-uri "multiprocess" version))
15662 (sha256
15663 (base32
15664 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
15665 (build-system python-build-system)
15666 (propagated-inputs
15667 `(("python-dill" ,python-dill)))
15668 (home-page "https://pypi.org/project/multiprocess")
15669 (synopsis "Multiprocessing and multithreading in Python")
15670 (description
15671 "This package is a fork of the multiprocessing Python package, a package
15672 which supports the spawning of processes using the API of the standard
15673 library's @code{threading} module.")
15674 (license license:bsd-3)))
15675
15676 (define-public python-toolz
15677 (package
15678 (name "python-toolz")
15679 (version "0.9.0")
15680 (source
15681 (origin
15682 (method url-fetch)
15683 (uri (pypi-uri "toolz" version))
15684 (sha256
15685 (base32
15686 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
15687 (build-system python-build-system)
15688 ;; FIXME: tests cannot be computed: "Can't perform this operation for
15689 ;; unregistered loader type"
15690 (arguments '(#:tests? #f))
15691 (home-page "https://github.com/pytoolz/toolz/")
15692 (synopsis "List processing tools and functional utilities")
15693 (description
15694 "This package provides a set of utility functions for iterators,
15695 functions, and dictionaries.")
15696 (license license:bsd-3)))
15697
15698 (define-public python2-toolz
15699 (package-with-python2 python-toolz))
15700
15701 (define-public python-cytoolz
15702 (package
15703 (name "python-cytoolz")
15704 (version "0.9.0.1")
15705 (source
15706 (origin
15707 (method url-fetch)
15708 (uri (pypi-uri "cytoolz" version))
15709 (sha256
15710 (base32
15711 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
15712 (build-system python-build-system)
15713 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
15714 ;; 'exceptions'"
15715 (arguments '(#:tests? #f))
15716 (propagated-inputs
15717 `(("python-toolz" ,python-toolz)))
15718 (native-inputs
15719 `(("python-cython" ,python-cython)))
15720 (home-page "https://github.com/pytoolz/cytoolz")
15721 (synopsis "High performance functional utilities")
15722 (description
15723 "The cytoolz package implements the same API as provided by toolz. The
15724 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
15725 that is accessible to other projects developed in Cython.")
15726 (license license:bsd-3)))
15727
15728 (define-public python-sortedcontainers
15729 (package
15730 (name "python-sortedcontainers")
15731 (version "2.0.4")
15732 (source
15733 (origin
15734 (method url-fetch)
15735 (uri (pypi-uri "sortedcontainers" version))
15736 (sha256
15737 (base32
15738 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
15739 (build-system python-build-system)
15740 (native-inputs
15741 `(("python-tox" ,python-tox)))
15742 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
15743 (synopsis "Sorted List, Sorted Dict, Sorted Set")
15744 (description
15745 "This package provides a sorted collections library, written in
15746 pure-Python.")
15747 (license license:asl2.0)))
15748
15749 (define-public python-cloudpickle
15750 (package
15751 (name "python-cloudpickle")
15752 (version "0.6.1")
15753 (source
15754 (origin
15755 (method url-fetch)
15756 (uri (pypi-uri "cloudpickle" version))
15757 (sha256
15758 (base32
15759 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
15760 (build-system python-build-system)
15761 ;; FIXME: there are 5 errors in 122 tests:
15762 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
15763 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
15764 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15765 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15766 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
15767 ;; TypeError: cannot serialize '_io.BufferedRandom' object
15768 (arguments '(#:tests? #f))
15769 (native-inputs
15770 `(("python-pytest" ,python-pytest)
15771 ("python-mock" ,python-mock)
15772 ("python-tornado" ,python-tornado)))
15773 (home-page "https://github.com/cloudpipe/cloudpickle")
15774 (synopsis "Extended pickling support for Python objects")
15775 (description
15776 "Cloudpickle makes it possible to serialize Python constructs not
15777 supported by the default pickle module from the Python standard library. It
15778 is especially useful for cluster computing where Python expressions are
15779 shipped over the network to execute on remote hosts, possibly close to the
15780 data.")
15781 (license license:bsd-3)))
15782
15783 (define-public python2-cloudpickle
15784 (package-with-python2 python-cloudpickle))
15785
15786 (define-public python-locket
15787 (package
15788 (name "python-locket")
15789 (version "0.2.0")
15790 (source
15791 (origin
15792 (method url-fetch)
15793 (uri (pypi-uri "locket" version))
15794 (sha256
15795 (base32
15796 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
15797 (build-system python-build-system)
15798 (home-page "https://github.com/mwilliamson/locket.py")
15799 (synopsis "File-based locks for Python")
15800 (description
15801 "Locket implements a lock that can be used by multiple processes provided
15802 they use the same path.")
15803 (license license:bsd-2)))
15804
15805 (define-public python2-locket
15806 (package-with-python2 python-locket))
15807
15808 (define-public python-blosc
15809 (package
15810 (name "python-blosc")
15811 (version "1.5.1")
15812 (source
15813 (origin
15814 (method url-fetch)
15815 (uri (pypi-uri "blosc" version))
15816 (sha256
15817 (base32
15818 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
15819 (build-system python-build-system)
15820 ;; FIXME: all tests pass, but then this error is printed:
15821 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
15822 (arguments '(#:tests? #f))
15823 (propagated-inputs
15824 `(("python-numpy" ,python-numpy)))
15825 (home-page "https://github.com/blosc/python-blosc")
15826 (synopsis "Python wrapper for the Blosc data compressor library")
15827 (description "Blosc is a high performance compressor optimized for binary
15828 data. It has been designed to transmit data to the processor cache faster
15829 than the traditional, non-compressed, direct memory fetch approach via a
15830 @code{memcpy()} system call.
15831
15832 Blosc works well for compressing numerical arrays that contains data with
15833 relatively low entropy, like sparse data, time series, grids with
15834 regular-spaced values, etc.
15835
15836 This Python package wraps the Blosc library.")
15837 (license license:bsd-3)))
15838
15839 (define-public python2-blosc
15840 (package-with-python2 python-blosc))
15841
15842 (define-public python-partd
15843 (package
15844 (name "python-partd")
15845 (version "0.3.9")
15846 (source
15847 (origin
15848 (method url-fetch)
15849 (uri (pypi-uri "partd" version))
15850 (sha256
15851 (base32
15852 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
15853 (build-system python-build-system)
15854 (propagated-inputs
15855 `(("python-blosc" ,python-blosc)
15856 ("python-locket" ,python-locket)
15857 ("python-numpy" ,python-numpy)
15858 ("python-pandas" ,python-pandas)
15859 ("python-pyzmq" ,python-pyzmq)
15860 ("python-toolz" ,python-toolz)))
15861 (home-page "https://github.com/dask/partd/")
15862 (synopsis "Appendable key-value storage")
15863 (description "Partd stores key-value pairs. Values are raw bytes. We
15864 append on old values. Partd excels at shuffling operations.")
15865 (license license:bsd-3)))
15866
15867 (define-public python2-partd
15868 (package-with-python2 python-partd))
15869
15870 (define-public python-dask
15871 (package
15872 (name "python-dask")
15873 (version "1.2.2")
15874 (source
15875 (origin
15876 (method url-fetch)
15877 (uri (pypi-uri "dask" version))
15878 (sha256
15879 (base32 "0b29gvf96gmp20wicly3v3mhyc93zbm3mdv935fka6x0wax7cy2y"))))
15880 (build-system python-build-system)
15881 ;; A single test out of 5000+ fails. This test is marked as xfail when
15882 ;; pytest-xdist is used.
15883 (arguments
15884 `(#:phases
15885 (modify-phases %standard-phases
15886 (add-after 'unpack 'disable-broken-test
15887 (lambda _
15888 (substitute* "dask/tests/test_threaded.py"
15889 (("def test_interrupt\\(\\)" m)
15890 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15891 m)))
15892 (when (which "python2")
15893 ;; This test fails with recent Pandas:
15894 ;; <https://github.com/dask/dask/issues/3794>.
15895 (substitute* "dask/dataframe/tests/test_dataframe.py"
15896 (("def test_info\\(\\)" m)
15897 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15898 m))))
15899 #t))
15900 (replace 'check
15901 (lambda _ (invoke "pytest" "-vv"))))))
15902 (propagated-inputs
15903 `(("python-cloudpickle" ,python-cloudpickle)
15904 ("python-numpy" ,python-numpy)
15905 ("python-pandas" ,python-pandas)
15906 ("python-partd" ,python-partd)
15907 ("python-toolz" ,python-toolz)
15908 ("python-pyyaml" ,python-pyyaml)))
15909 (native-inputs
15910 `(("python-pytest" ,python-pytest)
15911 ("python-pytest-runner" ,python-pytest-runner)))
15912 (home-page "https://github.com/dask/dask/")
15913 (synopsis "Parallel computing with task scheduling")
15914 (description
15915 "Dask is a flexible parallel computing library for analytics. It
15916 consists of two components: dynamic task scheduling optimized for computation,
15917 and large data collections like parallel arrays, dataframes, and lists that
15918 extend common interfaces like NumPy, Pandas, or Python iterators to
15919 larger-than-memory or distributed environments. These parallel collections
15920 run on top of the dynamic task schedulers. ")
15921 (license license:bsd-3)))
15922
15923 (define-public python2-dask
15924 (package-with-python2 python-dask))
15925
15926 (define-public python-ilinkedlist
15927 (package
15928 (name "python-ilinkedlist")
15929 (version "0.4.0")
15930 (source
15931 (origin
15932 (method url-fetch)
15933 (uri (pypi-uri "ilinkedlist" version))
15934 (sha256
15935 (base32
15936 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
15937 (build-system python-build-system)
15938 (native-inputs `(("python-pytest" ,python-pytest)))
15939 (inputs `(("python" ,python)))
15940 (home-page "https://github.com/luther9/ilinkedlist-py")
15941 (synopsis "Immutable linked list library")
15942 (description
15943 "This is a implementation of immutable linked lists for Python. It
15944 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
15945 Since a linked list is treated as immutable, it is hashable, and its length
15946 can be retrieved in constant time. Some of the terminology is inspired by
15947 LISP. It is possible to create an improper list by creating a @code{Pair}
15948 with a non-list @code{cdr}.")
15949 (license license:gpl3+)))
15950
15951 (define-public python-readlike
15952 (package
15953 (name "python-readlike")
15954 (version "0.1.3")
15955 (source
15956 (origin
15957 (method url-fetch)
15958 (uri (pypi-uri "readlike" version))
15959 (sha256
15960 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
15961 (build-system python-build-system)
15962 (home-page "https://github.com/jangler/readlike")
15963 (synopsis "GNU Readline-like line editing module")
15964 (description
15965 "This Python module provides line editing functions similar to the default
15966 Emacs-style ones of GNU Readline. Unlike the Python standard library's
15967 @code{readline} package, this one allows access to those capabilties in settings
15968 outside of a standard command-line interface. It is especially well-suited to
15969 interfacing with Urwid, due to a shared syntax for describing key inputs.
15970
15971 Currently, all stateless Readline commands are implemented. Yanking and history
15972 are not supported.")
15973 (license license:expat)))
15974
15975 (define-public python2-readlike
15976 (package-with-python2 python-readlike))
15977
15978 (define-public python-reparser
15979 (package
15980 (name "python-reparser")
15981 (version "1.4.3")
15982 (source
15983 (origin
15984 (method url-fetch)
15985 (uri (pypi-uri "ReParser" version))
15986 (sha256
15987 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
15988 (build-system python-build-system)
15989 (home-page "https://github.com/xmikos/reparser")
15990 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
15991 (description
15992 "This Python library provides a simple lexer/parser for inline markup based
15993 on regular expressions.")
15994 (license license:expat)))
15995
15996 (define-public python2-reparser
15997 (let ((reparser (package-with-python2
15998 (strip-python2-variant python-reparser))))
15999 (package (inherit reparser)
16000 (propagated-inputs
16001 `(("python2-enum34" ,python2-enum34)
16002 ,@(package-propagated-inputs reparser))))))
16003
16004 (define-public python-precis-i18n
16005 (package
16006 (name "python-precis-i18n")
16007 (version "1.0.0")
16008 (source
16009 (origin
16010 (method url-fetch)
16011 (uri (pypi-uri "precis_i18n" version))
16012 (sha256
16013 (base32
16014 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
16015 (build-system python-build-system)
16016 (home-page "https://github.com/byllyfish/precis_i18n")
16017 (synopsis "Implementation of the PRECIS framework")
16018 (description
16019 "This module implements the PRECIS Framework as described in RFC 8264,
16020 RFC 8265 and RFC 8266.")
16021 (license license:expat)))
16022
16023 (define-public python-absl-py
16024 (package
16025 (name "python-absl-py")
16026 (version "0.6.1")
16027 (source
16028 (origin
16029 (method url-fetch)
16030 (uri (pypi-uri "absl-py" version))
16031 (sha256
16032 (base32
16033 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
16034 (build-system python-build-system)
16035 (propagated-inputs
16036 `(("python-six" ,python-six)))
16037 (home-page "https://github.com/abseil/abseil-py")
16038 (synopsis "Abseil Python common libraries")
16039 (description
16040 "This package provides the Abseil Python Common Libraries, a collection
16041 of Python libraries for building Python applications.")
16042 (license license:asl2.0)))
16043
16044 (define-public python-astor
16045 (package
16046 (name "python-astor")
16047 (version "0.7.1")
16048 (source
16049 (origin
16050 (method url-fetch)
16051 (uri (pypi-uri "astor" version))
16052 (sha256
16053 (base32
16054 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
16055 (build-system python-build-system)
16056 ;; FIXME: There are two errors and two test failures.
16057 (arguments `(#:tests? #f))
16058 (home-page "https://github.com/berkerpeksag/astor")
16059 (synopsis "Read and write Python ASTs")
16060 (description "Astor is designed to allow easy manipulation of Python
16061 source via the Abstract Syntax Tree.")
16062 (license license:bsd-3)))
16063
16064 (define-public python2-astor
16065 (package-with-python2 python-astor))
16066
16067 (define-public python-grpcio
16068 (package
16069 (name "python-grpcio")
16070 (version "1.17.1")
16071 (source
16072 (origin
16073 (method url-fetch)
16074 (uri (pypi-uri "grpcio" version))
16075 (sha256
16076 (base32
16077 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
16078 (build-system python-build-system)
16079 (propagated-inputs
16080 `(("python-six" ,python-six)))
16081 (home-page "https://grpc.io")
16082 (synopsis "HTTP/2-based RPC framework")
16083 (description "This package provides a Python library for communicating
16084 with the HTTP/2-based RPC framework gRPC.")
16085 (license license:asl2.0)))
16086
16087 (define-public python-astunparse
16088 (package
16089 (name "python-astunparse")
16090 (version "1.6.2")
16091 (source
16092 (origin
16093 (method url-fetch)
16094 (uri (pypi-uri "astunparse" version))
16095 (sha256
16096 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
16097 (build-system python-build-system)
16098 (arguments '(#:tests? #f)) ; there are none
16099 (propagated-inputs
16100 `(("python-six" ,python-six)
16101 ("python-wheel" ,python-wheel)))
16102 (home-page "https://github.com/simonpercivall/astunparse")
16103 (synopsis "AST unparser for Python")
16104 (description "This package provides an AST unparser for Python. It is a
16105 factored out version of @code{unparse} found in the Python source
16106 distribution.")
16107 (license license:bsd-3)))
16108
16109 (define-public python-gast
16110 (package
16111 (name "python-gast")
16112 (version "0.2.2")
16113 (source
16114 (origin
16115 (method url-fetch)
16116 (uri (pypi-uri "gast" version))
16117 (sha256
16118 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
16119 (build-system python-build-system)
16120 (propagated-inputs
16121 `(("python-astunparse" ,python-astunparse)))
16122 (home-page "https://pypi.org/project/gast/")
16123 (synopsis "Generic Python AST that abstracts the underlying Python version")
16124 (description
16125 "GAST provides a compatibility layer between the AST of various Python
16126 versions, as produced by @code{ast.parse} from the standard @code{ast}
16127 module.")
16128 (license license:bsd-3)))
16129
16130 (define-public python-wikidata
16131 (package
16132 (name "python-wikidata")
16133 (version "0.6.1")
16134 (source
16135 (origin
16136 (method url-fetch)
16137 (uri (pypi-uri "Wikidata" version))
16138 (sha256
16139 (base32
16140 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
16141 (build-system python-build-system)
16142 (propagated-inputs
16143 `(("python-babel" ,python-babel)))
16144 (home-page "https://github.com/dahlia/wikidata")
16145 (synopsis "Wikidata client library")
16146 (description
16147 "This package provides a Python interface to
16148 @url{https://www.wikidata.org/, Wikidata}.")
16149 (properties '((upstream-name . "Wikidata")))
16150 (license license:gpl3+)))
16151
16152 (define-public python-doctest-ignore-unicode
16153 (package
16154 (name "python-doctest-ignore-unicode")
16155 (version "0.1.2")
16156 (source
16157 (origin
16158 (method url-fetch)
16159 (uri (pypi-uri "doctest-ignore-unicode" version))
16160 (sha256
16161 (base32
16162 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
16163 (build-system python-build-system)
16164 (native-inputs
16165 `(("python-nose" ,python-nose)))
16166 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
16167 (synopsis "Ignore Unicode literal prefixes in doctests")
16168 (description
16169 "This package adds support for a flag to ignore Unicode literal prefixes
16170 in doctests.")
16171 (license license:asl2.0)))
16172
16173 (define-public python-attr
16174 (package
16175 (name "python-attr")
16176 (version "0.3.1")
16177 (source
16178 (origin
16179 (method url-fetch)
16180 (uri (pypi-uri "attr" version))
16181 (sha256
16182 (base32
16183 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
16184 (build-system python-build-system)
16185 (home-page "https://github.com/denis-ryzhkov/attr")
16186 (synopsis "Decorator for attributes of target function or class")
16187 (description "Simple decorator to set attributes of target function or
16188 class in a @acronym{DRY, Don't Repeat Yourself} way.")
16189 (license license:expat)))
16190
16191 (define-public python-construct
16192 (package
16193 (name "python-construct")
16194 (version "2.9.45")
16195 (source
16196 (origin
16197 (method url-fetch)
16198 (uri (pypi-uri "construct" version))
16199 (sha256
16200 (base32
16201 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
16202 (build-system python-build-system)
16203 (arguments
16204 `(#:tests? #f)) ; No tests exist.
16205 (propagated-inputs
16206 `(("python-extras" ,python-extras)
16207 ("python-arrow" ,python-arrow)
16208 ("python-numpy" ,python-numpy)
16209 ("python-ruamel.yaml" ,python-ruamel.yaml)))
16210 (home-page "http://construct.readthedocs.io")
16211 (synopsis "Declarative and symmetrical parser and builder for binary data")
16212 (description
16213 "This package provides both simple, atomic constructs (such as
16214 integers of various sizes), as well as composite ones which allow you
16215 form hierarchical and sequential structures of increasing complexity.
16216 It features bit and byte granularity, easy debugging and testing, an
16217 easy-to-extend subclass system, and lots of primitive constructs to
16218 make your work easier.")
16219 (license license:expat)))
16220
16221 (define-public python-humanize
16222 (package
16223 (name "python-humanize")
16224 (version "0.5.1")
16225 (source
16226 (origin
16227 (method url-fetch)
16228 (uri (pypi-uri "humanize" version))
16229 (sha256
16230 (base32
16231 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
16232 (arguments
16233 '(#:tests? #f)) ; tests not in pypi archive
16234 (build-system python-build-system)
16235 (home-page "https://github.com/jmoiron/humanize")
16236 (synopsis "Print numerical information in a human-readable form")
16237 (description "This package provides a Python module that displays numbers
16238 and dates in \"human readable\" forms. For example, it would display
16239 \"12345591313\" as \"12.3 billion\".")
16240 (license license:expat)))
16241
16242 (define-public python-txaio
16243 (package
16244 (name "python-txaio")
16245 (version "18.8.1")
16246 (source
16247 (origin
16248 (method url-fetch)
16249 (uri (pypi-uri "txaio" version))
16250 (sha256
16251 (base32
16252 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
16253 (build-system python-build-system)
16254 (propagated-inputs
16255 `(("python-twisted" ,python-twisted)
16256 ("python-six" ,python-six)))
16257 (home-page "https://github.com/crossbario/txaio")
16258 (synopsis "Compatibility layer between Python asyncio and Twisted")
16259 (description "Txaio provides a compatibility layer between the Python
16260 @code{asyncio} module and @code{Twisted}.")
16261 (license license:expat)))
16262
16263 (define-public python-toolshed
16264 (package
16265 (name "python-toolshed")
16266 (version "0.4.6")
16267 (source
16268 (origin
16269 (method url-fetch)
16270 (uri (pypi-uri "toolshed" version))
16271 (sha256
16272 (base32
16273 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
16274 (build-system python-build-system)
16275 (native-inputs
16276 `(("python-nose" ,python-nose)))
16277 (home-page "https://github.com/brentp/toolshed/")
16278 (synopsis "Collection of modules and functions for working with data")
16279 (description "This is a collection of well-tested, simple modules and
16280 functions that aim to reduce boilerplate when working with data.")
16281 (license license:bsd-2)))
16282
16283 (define-public python-annoy
16284 (package
16285 (name "python-annoy")
16286 (version "1.15.1")
16287 (source
16288 (origin
16289 (method url-fetch)
16290 (uri (pypi-uri "annoy" version))
16291 (sha256
16292 (base32
16293 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
16294 (build-system python-build-system)
16295 (native-inputs
16296 `(("python-nose" ,python-nose)))
16297 (home-page "https://github.com/spotify/annoy/")
16298 (synopsis "Approximate nearest neighbors library")
16299 (description
16300 "Annoy is a C++ library with Python bindings to search for points in
16301 space that are close to a given query point. It also creates large read-only
16302 file-based data structures that are @code{mmap}ped into memory so that many
16303 processes may share the same data.")
16304 (license license:asl2.0)))
16305
16306 (define-public python-pylzma
16307 (package
16308 (name "python-pylzma")
16309 (version "0.5.0")
16310 (source
16311 (origin
16312 (method url-fetch)
16313 (uri (pypi-uri "pylzma" version))
16314 (sha256
16315 (base32
16316 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
16317 (build-system python-build-system)
16318 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
16319 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
16320 (description "This package provides Python bindings for the LZMA library
16321 by Igor Pavlov.")
16322 (license license:lgpl2.1+)))
16323
16324 (define-public python2-pylzma
16325 (package-with-python2 python-pylzma))
16326
16327 (define-public python2-zeroconf
16328 (package
16329 (name "python2-zeroconf")
16330
16331 ;; This is the last version that supports Python 2.x.
16332 (version "0.19.1")
16333 (source
16334 (origin
16335 (method url-fetch)
16336 (uri (pypi-uri "zeroconf" version))
16337 (sha256
16338 (base32
16339 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
16340 (build-system python-build-system)
16341 (arguments
16342 `(#:python ,python-2
16343 #:phases
16344 (modify-phases %standard-phases
16345 (add-after 'unpack 'patch-requires
16346 (lambda* (#:key inputs #:allow-other-keys)
16347 (substitute* "setup.py"
16348 (("enum-compat")
16349 "enum34"))
16350 #t)))))
16351 (native-inputs
16352 `(("python2-six" ,python2-six)
16353 ("python2-enum32" ,python2-enum34)
16354 ("python2-netifaces" ,python2-netifaces)
16355 ("python2-typing" ,python2-typing)))
16356 (home-page "https://github.com/jstasiak/python-zeroconf")
16357 (synopsis "Pure Python mDNS service discovery")
16358 (description
16359 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
16360 compatible).")
16361 (license license:lgpl2.1+)))
16362
16363 (define-public python-bsddb3
16364 (package
16365 (name "python-bsddb3")
16366 (version "6.2.6")
16367 (source
16368 (origin
16369 (method url-fetch)
16370 (uri (pypi-uri "bsddb3" version))
16371 (sha256
16372 (base32
16373 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
16374 (build-system python-build-system)
16375 (inputs
16376 `(("bdb" ,bdb)))
16377 (arguments
16378 '(#:phases
16379 (modify-phases %standard-phases
16380 (add-after 'unpack 'configure-locations
16381 (lambda* (#:key inputs #:allow-other-keys)
16382 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
16383 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
16384 #t))
16385 (replace 'check
16386 (lambda _
16387 (invoke "python3" "test3.py" "-v"))))))
16388 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
16389 (synopsis "Python bindings for Oracle Berkeley DB")
16390 (description
16391 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
16392 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
16393 Transaction objects, and each of these is exposed as a Python type in the
16394 bsddb3.db module. The database objects can use various access methods: btree,
16395 hash, recno, and queue. Complete support of Berkeley DB distributed
16396 transactions. Complete support for Berkeley DB Replication Manager.
16397 Complete support for Berkeley DB Base Replication. Support for RPC.")
16398 (license license:bsd-3)))
16399
16400 (define-public python-dbfread
16401 (package
16402 (name "python-dbfread")
16403 (version "2.0.7")
16404 (source (origin
16405 (method url-fetch)
16406 (uri (pypi-uri "dbfread" version))
16407 (sha256
16408 (base32
16409 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
16410 (build-system python-build-system)
16411 (native-inputs
16412 `(("python-pytest" ,python-pytest)))
16413 (home-page "https://dbfread.readthedocs.io")
16414 (synopsis "Read DBF Files with Python")
16415 (description
16416 "This library reads DBF files and returns the data as native Python data
16417 types for further processing. It is primarily intended for batch jobs and
16418 one-off scripts.")
16419 (license license:expat)))
16420
16421 (define-public python-cached-property
16422 (package
16423 (name "python-cached-property")
16424 (version "1.5.1")
16425 (source
16426 (origin
16427 (method url-fetch)
16428 (uri (pypi-uri "cached-property" version))
16429 (sha256
16430 (base32
16431 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
16432 (build-system python-build-system)
16433 (arguments
16434 `(#:phases
16435 (modify-phases %standard-phases
16436 ;; https://github.com/pydanny/cached-property/issues/131
16437 ;; recent versions of freezegun break one test
16438 (add-after 'unpack 'disable-broken-test
16439 (lambda _
16440 (substitute* "tests/test_cached_property.py"
16441 (("def test_threads_ttl_expiry\\(self\\)" m)
16442 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
16443 " " m)))
16444 #t)))))
16445 (native-inputs
16446 `(("python-freezegun" ,python-freezegun)))
16447 (home-page
16448 "https://github.com/pydanny/cached-property")
16449 (synopsis
16450 "Decorator for caching properties in classes")
16451 (description
16452 "This package provides a decorator which makes caching
16453 time-or-computationally-expensive properties quick and easy and works in Python
16454 2 or 3.")
16455 (license license:bsd-3)))
16456
16457 (define-public python-folium
16458 (package
16459 (name "python-folium")
16460 (version "0.10.0")
16461 (source
16462 (origin
16463 (method url-fetch)
16464 (uri (pypi-uri "folium" version))
16465 (sha256
16466 (base32
16467 "18fzxijsgrb95r0a8anc9ba5ijyw3nlnv3rpavfbkqa5v878x84f"))))
16468 (build-system python-build-system)
16469 (propagated-inputs
16470 `(("python-branca" ,python-branca)
16471 ("python-jinja2" ,python-jinja2)
16472 ("python-numpy" ,python-numpy)
16473 ("python-requests" ,python-requests)))
16474 (native-inputs
16475 `(("python-pytest" ,python-pytest)))
16476 (home-page "https://github.com/python-visualization/folium")
16477 (synopsis "Make beautiful maps with Leaflet.js & Python")
16478 (description "@code{folium} makes it easy to visualize data that’s been
16479 manipulated in Python on an interactive leaflet map. It enables both the
16480 binding of data to a map for @code{choropleth} visualizations as well as
16481 passing rich vector/raster/HTML visualizations as markers on the map.
16482
16483 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
16484 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
16485 supports Image, Video, GeoJSON and TopoJSON overlays.")
16486 (license license:expat)))
16487
16488 (define-public jube
16489 (package
16490 ;; This is a command-line tool, so no "python-" prefix.
16491 (name "jube")
16492 (version "2.2.2")
16493 (source (origin
16494 (method url-fetch)
16495 (uri (string-append
16496 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
16497 version))
16498 (sha256
16499 (base32
16500 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
16501 (file-name (string-append "jube-" version ".tar.gz"))))
16502 (build-system python-build-system)
16503 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
16504 (synopsis "Benchmarking environment")
16505 (description
16506 "JUBE helps perform and analyze benchmarks in a systematic way. For each
16507 benchmarked application, benchmark data is stored in a format that allows JUBE
16508 to deduct the desired information. This data can be parsed by automatic pre-
16509 and post-processing scripts that draw information and store it more densely
16510 for manual interpretation.")
16511 (license license:gpl3+)))
16512
16513 (define-public python-pyroutelib3
16514 (package
16515 (name "python-pyroutelib3")
16516 (version "1.3.post1")
16517 (source
16518 (origin
16519 (method url-fetch)
16520 (uri (pypi-uri "pyroutelib3" version))
16521 (sha256
16522 (base32
16523 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
16524 (build-system python-build-system)
16525 (propagated-inputs
16526 `(("python-dateutil" ,python-dateutil)))
16527 (home-page "https://github.com/MKuranowski/pyroutelib3")
16528 (synopsis "Library for simple routing on OSM data")
16529 (description "Library for simple routing on OSM data")
16530 (license license:gpl3+)))
16531
16532 (define-public python-elementpath
16533 (package
16534 (name "python-elementpath")
16535 (version "1.2.0")
16536 (source
16537 (origin
16538 (method url-fetch)
16539 (uri (pypi-uri "elementpath" version))
16540 (sha256
16541 (base32
16542 "1syn2z543brab23dskh3fjd9pqvz6npqbcicrs2d88dbg26xl08p"))))
16543 (build-system python-build-system)
16544 (home-page
16545 "https://github.com/sissaschool/elementpath")
16546 (synopsis
16547 "XPath 1.0/2.0 parsers and selectors for ElementTree and lxml")
16548 (description
16549 "The proposal of this package is to provide XPath 1.0 and 2.0 selectors
16550 for Python's ElementTree XML data structures, both for the standard
16551 ElementTree library and for the @uref{http://lxml.de, lxml.etree} library.
16552
16553 For lxml.etree this package can be useful for providing XPath 2.0 selectors,
16554 because lxml.etree already has it's own implementation of XPath 1.0.")
16555 (license license:expat)))
16556
16557 (define-public python-bibtexparser
16558 (package
16559 (name "python-bibtexparser")
16560 (version "1.1.0")
16561 (source
16562 (origin
16563 (method url-fetch)
16564 (uri (pypi-uri "bibtexparser" version))
16565 (sha256
16566 (base32
16567 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
16568 (build-system python-build-system)
16569 (propagated-inputs
16570 `(("python-pyparsing" ,python-pyparsing)))
16571 (native-inputs
16572 `(("python-future" ,python-future)))
16573 (home-page "https://github.com/sciunto-org/python-bibtexparser")
16574 (synopsis "Python library to parse BibTeX files")
16575 (description "BibtexParser is a Python library to parse BibTeX files.")
16576 (license (list license:bsd-3 license:lgpl3))))
16577
16578 (define-public python-distro
16579 (package
16580 (name "python-distro")
16581 (version "1.4.0")
16582 (source
16583 (origin
16584 (method url-fetch)
16585 (uri (pypi-uri "distro" version))
16586 (sha256
16587 (base32
16588 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
16589 (build-system python-build-system)
16590 (native-inputs
16591 `(("python-pytest" ,python-pytest)))
16592 (home-page "https://github.com/nir0s/distro")
16593 (synopsis
16594 "OS platform information API")
16595 (description
16596 "@code{distro} provides information about the OS distribution it runs on,
16597 such as a reliable machine-readable ID, or version information.
16598
16599 It is the recommended replacement for Python's original
16600 `platform.linux_distribution` function (which will be removed in Python 3.8).
16601 @code{distro} also provides a command-line interface to output the platform
16602 information in various formats.")
16603 (license license:asl2.0)))
16604
16605 (define-public python-cairosvg
16606 (package
16607 (name "python-cairosvg")
16608 (version "2.4.2")
16609 (source
16610 (origin
16611 (method url-fetch)
16612 (uri (pypi-uri "CairoSVG" version))
16613 (sha256
16614 (base32 "1bb7irxbaxxb9ahm3z5wsx1q96mm5gzskc7b6q07h9ikcnb8yrjf"))))
16615 (build-system python-build-system)
16616 (arguments
16617 `(#:phases
16618 (modify-phases %standard-phases
16619 (replace 'check
16620 (lambda _ (invoke "pytest"))))))
16621 (propagated-inputs
16622 `(("python-cairocffi" ,python-cairocffi)
16623 ("python-cssselect2" ,python-cssselect2)
16624 ("python-defusedxml" ,python-defusedxml)
16625 ("python-pillow" ,python-pillow)
16626 ("python-tinycss2" ,python-tinycss2)))
16627 (native-inputs
16628 `(("python-pytest-flake8" ,python-pytest-flake8)
16629 ("python-pytest-isort" ,python-pytest-isort)
16630 ("python-pytest-runner" ,python-pytest-runner)))
16631 (home-page "https://cairosvg.org/")
16632 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
16633 (description "CairoSVG is a SVG converter based on Cairo. It can export
16634 SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
16635 SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
16636 parsed, the result is drawn to a Cairo surface that can be exported to
16637 qvarious formats: PDF, PostScript, PNG and even SVG.")
16638 (license license:lgpl3+)))
16639
16640 (define-public python-pyphen
16641 (package
16642 (name "python-pyphen")
16643 (version "0.9.5")
16644 (source
16645 (origin
16646 (method url-fetch)
16647 (uri (pypi-uri "Pyphen" version))
16648 (sha256
16649 (base32 "08c9y69ry9d6m4zalhnalg86lsp9v2j5n1ziw5vxfmiihx83lqrv"))))
16650 (build-system python-build-system)
16651 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
16652 ;; embedded set provided by upstream - like Debian does.
16653 (home-page "https://github.com/Kozea/Pyphen")
16654 (synopsis "Pure Python module to hyphenate text")
16655 (description "Pyphen is a pure Python module to hyphenate text using
16656 existing Hunspell hyphenation dictionaries.")
16657 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))