Merge branch 'master' into staging
[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 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.2")
170 (source
171 (origin
172 (method url-fetch)
173 (uri (pypi-uri "psutil" version))
174 (sha256
175 (base32
176 "1v95vb5385qscfdvphv8l2w22bmir3d7yhpi02n58v3mlqy1r3l2"))))
177 (build-system python-build-system)
178 (arguments
179 ;; FIXME: some tests does not return and times out.
180 '(#:tests? #f))
181 (home-page "https://www.github.com/giampaolo/psutil")
182 (synopsis "Library for retrieving information on running processes")
183 (description
184 "psutil (Python system and process utilities) is a library for retrieving
185 information on running processes and system utilization (CPU, memory, disks,
186 network) in Python. It is useful mainly for system monitoring, profiling and
187 limiting process resources and management of running processes. It implements
188 many functionalities offered by command line tools such as: ps, top, lsof,
189 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
190 pidof, tty, taskset, pmap.")
191 (properties `((python2-variant . ,(delay python2-psutil))))
192 (license license:bsd-3)))
193
194 (define-public python2-psutil
195 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
196 (package
197 (inherit base)
198 (propagated-inputs
199 `(("python2-enum34" ,python2-enum34) ;optional
200 ,@(package-propagated-inputs base))))))
201
202 (define-public python-shapely
203 (package
204 (name "python-shapely")
205 (version "1.6.4.post2")
206 (source
207 (origin
208 (method url-fetch)
209 (uri (pypi-uri "Shapely" version))
210 (sha256
211 (base32
212 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
213 (build-system python-build-system)
214 (native-inputs
215 `(("python-cython" ,python-cython)
216 ("python-matplotlib" ,python-matplotlib)
217 ("python-pytest" ,python-pytest)
218 ("python-pytest-cov" ,python-pytest-cov)))
219 (inputs
220 `(("geos" ,geos)))
221 (propagated-inputs
222 `(("python-numpy" ,python-numpy)))
223 (arguments
224 `(#:phases
225 (modify-phases %standard-phases
226 (add-after 'unpack 'patch-geos-path
227 (lambda* (#:key inputs #:allow-other-keys)
228 (let ((geos (assoc-ref inputs "geos"))
229 (glibc (assoc-ref inputs ,(if (%current-target-system)
230 "cross-libc" "libc"))))
231 (substitute* "shapely/geos.py"
232 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
233 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
234 geos "/lib/libgeos_c.so'])"))
235 (("free = load_dll\\('c'\\)\\.free")
236 (string-append "free = load_dll('c', fallbacks=['"
237 glibc "/lib/libc.so.6']).free"))))
238 #t)))))
239 (home-page "https://github.com/Toblerity/Shapely")
240 (synopsis "Library for the manipulation and analysis of geometric objects")
241 (description "Shapely is a Python package for manipulation and analysis of
242 planar geometric objects. It is based on the @code{GEOS} library.")
243 (license license:bsd-3)))
244
245 (define-public python-shortuuid
246 (package
247 (name "python-shortuuid")
248 (version "0.5.0")
249 (source
250 (origin
251 (method url-fetch)
252 (uri (pypi-uri "shortuuid" version))
253 (sha256
254 (base32
255 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
256 (build-system python-build-system)
257 (native-inputs
258 `(("python-pep8" ,python-pep8)))
259 (home-page "https://github.com/skorokithakis/shortuuid")
260 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
261 (description
262 "@code{shortuuid} is a Python library for generating concise, unambiguous
263 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
264 module and then similar looking characters are removed.")
265 (license license:bsd-3)))
266
267 (define-public python-logwrap
268 (package
269 (name "python-logwrap")
270 (version "3.2.1")
271 (source
272 (origin
273 (method url-fetch)
274 (uri (pypi-uri "logwrap" version ".zip"))
275 (sha256
276 (base32
277 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
278 (build-system python-build-system)
279 (propagated-inputs
280 `(("python-six" ,python-six)
281 ("python-typing" ,python-typing)))
282 (native-inputs
283 `(("unzip" ,unzip)
284 ("python-cython" ,python-cython)
285 ("python-pytest" ,python-pytest)
286 ("python-pytest-cov" ,python-pytest-cov)
287 ("python-pytest-runner" ,python-pytest-runner)))
288 (home-page "https://github.com/penguinolog/logwrap")
289 (synopsis "Decorator for logging function arguments")
290 (description "This package provides a decorator to log function arguments
291 and function call return values in a human-readable way.")
292 (license license:asl2.0)))
293
294 (define-public python2-shapely
295 (package-with-python2 python-shapely))
296
297 (define-public python-clyent
298 (package
299 (name "python-clyent")
300 (version "1.2.1")
301 (source
302 (origin
303 (method url-fetch)
304 (uri (pypi-uri "clyent" version))
305 (sha256
306 (base32
307 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
308 (build-system python-build-system)
309 (native-inputs
310 `(("python-mock" ,python-mock)))
311 (home-page "https://github.com/binstar/clyent")
312 (synopsis "Command line client library")
313 (description "Clyent is a Python command line utiliy library. It is used
314 by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
315 (license license:bsd-3)))
316
317 (define-public python2-clyent
318 (package-with-python2 python-clyent))
319
320 (define-public python-babel
321 (package
322 (name "python-babel")
323 (version "2.7.0")
324 (source
325 (origin
326 (method url-fetch)
327 (uri (pypi-uri "Babel" version))
328 (sha256
329 (base32
330 "0a7wawx8vsg7igvz6p3x909fskhg4b2y1910xk4f4c8y22p3aqg8"))))
331 (build-system python-build-system)
332 (native-inputs
333 `(("python-freezegun" ,python-freezegun)
334 ("python-pytest" ,python-pytest)))
335 (propagated-inputs
336 `(("python-pytz" ,python-pytz)))
337 (arguments
338 `(#:phases (modify-phases %standard-phases
339 (replace 'check
340 (lambda _
341 (invoke "pytest" "-vv" "-k"
342 (string-append
343 ;; XXX: These tests fail when using Pytest 4.x and
344 ;; Babel 2.6.0. Try removing this for later versions.
345 "not test_no_inherit_metazone_marker_never_in_output"
346 " and not test_smoke_dates"
347 " and not test_smoke_numbers")))))))
348 (home-page "http://babel.pocoo.org/")
349 (synopsis
350 "Tools for internationalizing Python applications")
351 (description
352 "Babel is composed of two major parts:
353 - tools to build and work with gettext message catalogs
354 - a Python interface to the CLDR (Common Locale Data Repository), providing
355 access to various locale display names, localized number and date formatting,
356 etc. ")
357 (license license:bsd-3)))
358
359 (define-public python2-babel
360 (package-with-python2 python-babel))
361
362 ;; Sphinx < 2.0 requires this version. Remove once no longer needed.
363 (define-public python2-babel-2.6
364 (package
365 (inherit python2-babel)
366 (version "2.6.0")
367 (source (origin
368 (method url-fetch)
369 (uri (pypi-uri "Babel" version))
370 (sha256
371 (base32
372 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
373
374 (define-public python2-backport-ssl-match-hostname
375 (package
376 (name "python2-backport-ssl-match-hostname")
377 (version "3.5.0.1")
378 (source
379 (origin
380 (method url-fetch)
381 (uri (pypi-uri "backports.ssl_match_hostname" version))
382 (sha256
383 (base32
384 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
385 (build-system python-build-system)
386 (arguments
387 `(#:python ,python-2
388 #:tests? #f)) ; no test target
389 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
390 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
391 (description
392 "This backport brings the ssl.match_hostname() function to users of
393 earlier versions of Python. The function checks the hostname in the
394 certificate returned by the server to which a connection has been established,
395 and verifies that it matches the intended target hostname.")
396 (license license:psfl)))
397
398 (define-public python-boolean.py
399 (package
400 (name "python-boolean.py")
401 (version "3.6")
402 (source
403 (origin
404 ;; There's no source tarball on PyPI.
405 (method git-fetch)
406 (uri (git-reference
407 (url "https://github.com/bastikr/boolean.py")
408 (commit (string-append "v" version))))
409 (file-name (git-file-name name version))
410 (sha256
411 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
412 (build-system python-build-system)
413 (home-page "https://github.com/bastikr/boolean.py")
414 (synopsis "Boolean algebra in one Python module")
415 (description
416 "This is a small Python library that implements boolean algebra.
417 It defines two base elements, @code{TRUE} and @code{FALSE}, and a
418 @code{Symbol} class that can take on one of these two values. Calculations
419 are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
420 compositions like @code{XOR} and @code{NAND} are emulated on top of them.
421 Expressions are constructed from parsed strings or directly in Python.")
422 (license license:bsd-2)))
423
424 (define-public python-hdf4
425 (package
426 (name "python-hdf4")
427 (version "0.9")
428 (source
429 (origin
430 (method url-fetch)
431 (uri (pypi-uri name version))
432 (sha256
433 (base32
434 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
435 (build-system python-build-system)
436 (native-inputs `(("nose" ,python-nose)))
437 (propagated-inputs `(("numpy" ,python-numpy)))
438 (inputs
439 `(("hdf4" ,hdf4)
440 ("libjpeg" ,libjpeg)
441 ("zlib" ,zlib)))
442 (arguments
443 `(#:phases
444 (modify-phases %standard-phases
445 (replace 'check
446 (lambda _
447 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
448 ;; on to import numpy. Somehow this works on their CI system.
449 ;; Let's just manage PYTHONPATH here instead.
450 (substitute* "runexamples.sh"
451 (("export PYTHONPATH=.*") ""))
452 (setenv "PYTHONPATH"
453 (string-append (getcwd) ":"
454 (getenv "PYTHONPATH")))
455 (invoke "./runexamples.sh")
456 (invoke "nosetests" "-v"))))))
457 (home-page "https://github.com/fhs/python-hdf4")
458 (synopsis "Python interface to the NCSA HDF4 library")
459 (description
460 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
461 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
462 NetCDF files can also be read and modified. Python-HDF4 is a fork of
463 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
464 (license license:expat)))
465
466 (define-public python2-hdf4
467 (package-with-python2 python-hdf4))
468
469 (define-public python-h5py
470 (package
471 (name "python-h5py")
472 (version "2.8.0")
473 (source
474 (origin
475 (method url-fetch)
476 (uri (pypi-uri "h5py" version))
477 (sha256
478 (base32
479 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
480 (build-system python-build-system)
481 (arguments
482 `(#:tests? #f ; no test target
483 #:phases
484 (modify-phases %standard-phases
485 (add-after 'unpack 'fix-hdf5-paths
486 (lambda* (#:key inputs #:allow-other-keys)
487 (let ((prefix (assoc-ref inputs "hdf5")))
488 (substitute* "setup_build.py"
489 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
490 (string-append "['" prefix "/lib" "']"))
491 (("'/opt/local/include', '/usr/local/include'")
492 (string-append "'" prefix "/include" "'")))
493 (substitute* "setup_configure.py"
494 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
495 (string-append "['" prefix "/lib" "']")))
496 #t))))))
497 (propagated-inputs
498 `(("python-six" ,python-six)
499 ("python-numpy" ,python-numpy)))
500 (inputs
501 `(("hdf5" ,hdf5)))
502 (native-inputs
503 `(("python-cython" ,python-cython)
504 ("python-pkgconfig" ,python-pkgconfig)))
505 (home-page "http://www.h5py.org/")
506 (synopsis "Read and write HDF5 files from Python")
507 (description
508 "The h5py package provides both a high- and low-level interface to the
509 HDF5 library from Python. The low-level interface is intended to be a
510 complete wrapping of the HDF5 API, while the high-level component supports
511 access to HDF5 files, datasets and groups using established Python and NumPy
512 concepts.")
513 (license license:bsd-3)))
514
515 (define-public python2-h5py
516 (package-with-python2 python-h5py))
517
518 (define-public python-sh
519 (package
520 (name "python-sh")
521 (version "1.12.14")
522 (source
523 (origin
524 (method url-fetch)
525 (uri (pypi-uri "sh" version))
526 (sha256
527 (base32
528 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
529 (build-system python-build-system)
530 (arguments
531 '(#:phases
532 (modify-phases %standard-phases
533 (replace 'check
534 (lambda _
535 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
536 (setenv "HOME" "/tmp")
537 (invoke "python" "sh.py" "test"))))))
538 (native-inputs
539 `(("python-coverage" ,python-coverage)))
540 (home-page "https://github.com/amoffat/sh")
541 (synopsis "Python subprocess replacement")
542 (description "This package provides a replacement for Python's
543 @code{subprocess} feature.")
544 (license license:expat)))
545
546 (define-public python2-sh
547 (package-with-python2 python-sh))
548
549 (define-public python-cftime
550 (package
551 (name "python-cftime")
552 (version "1.0.3.4")
553 (source
554 (origin
555 (method url-fetch)
556 (uri (pypi-uri "cftime" version))
557 (sha256
558 (base32
559 "0362dhxbzk593walyjz30dll6y2y79wialik647cbwdsf3ad0x6x"))))
560 (build-system python-build-system)
561 (propagated-inputs
562 `(("python-numpy" ,python-numpy)))
563 (native-inputs
564 `(("python-coveralls" ,python-coveralls)
565 ("python-cython" ,python-cython)
566 ("python-pytest-cov" ,python-pytest-cov)))
567 (home-page "https://github.com/Unidata/cftime")
568 (synopsis "Library for time handling")
569 (description
570 "This package provides time-handling functionality that used to be part
571 of the netcdf4 package before.")
572 ;; This package claims to include code under the GPLv3 but is released
573 ;; under ISC.
574 (license (list license:isc license:gpl3+))))
575
576 (define-public python-netcdf4
577 (package
578 (name "python-netcdf4")
579 (version "1.4.2")
580 (source
581 (origin
582 (method url-fetch)
583 (uri (pypi-uri "netCDF4" version))
584 (sha256
585 (base32
586 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
587 (build-system python-build-system)
588 (arguments
589 '(#:phases
590 (modify-phases %standard-phases
591 (add-after 'unpack 'configure-locations
592 (lambda* (#:key inputs #:allow-other-keys)
593 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
594 #t)))))
595 (native-inputs
596 `(("python-cython" ,python-cython)))
597 (propagated-inputs
598 `(("python-numpy" ,python-numpy)
599 ("python-cftime" ,python-cftime)))
600 (inputs
601 `(("netcdf" ,netcdf)
602 ("hdf4" ,hdf4)
603 ("hdf5" ,hdf5)))
604 (home-page "https://github.com/Unidata/netcdf4-python")
605 (synopsis "Python/numpy interface to the netCDF library")
606 (description "Netcdf4-python is a Python interface to the netCDF C
607 library. netCDF version 4 has many features not found in earlier
608 versions of the library and is implemented on top of HDF5. This module
609 can read and write files in both the new netCDF 4 and the old netCDF 3
610 format, and can create files that are readable by HDF5 clients. The
611 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
612 to users of that module.")
613 ;; The software is mainly ISC, but includes some files covered
614 ;; by the Expat license.
615 (license (list license:isc license:expat))))
616
617 (define-public python2-netcdf4
618 (package-with-python2 python-netcdf4))
619
620 (define-public python-license-expression
621 (package
622 (name "python-license-expression")
623 (version "0.999")
624 (source
625 (origin
626 (method url-fetch)
627 (uri (pypi-uri "license-expression" version))
628 (sha256
629 (base32 "08ppb0bxbrsxazy88sgpl9yffvdsabw6dkk1nc332wcz2mphwwyf"))))
630 (build-system python-build-system)
631 (propagated-inputs
632 `(("python-boolean.py" ,python-boolean.py)))
633 (home-page "https://github.com/nexB/license-expression")
634 (synopsis "Apply boolean logic to license expressions")
635 (description
636 "This Python module defines a tiny language to evaluate and compare
637 license expressions using boolean logic. Logical combinations of licenses can
638 be tested for equality, containment, and equivalence. They can be normalised
639 and simplified. It supports SPDX license expressions as well as other naming
640 conventions and aliases in the same expression.")
641 (license license:gpl2+)))
642
643 (define-public python-lockfile
644 (package
645 (name "python-lockfile")
646 (version "0.12.2")
647 (source
648 (origin
649 (method url-fetch)
650 (uri (pypi-uri "lockfile" version))
651 (sha256
652 (base32
653 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
654 (build-system python-build-system)
655 (arguments '(#:test-target "check"))
656 (native-inputs
657 `(("python-pbr" ,python-pbr)))
658 (home-page "https://launchpad.net/pylockfile")
659 (synopsis "Platform-independent file locking module")
660 (description
661 "The lockfile package exports a LockFile class which provides a simple
662 API for locking files.")
663 (license license:expat)))
664
665 (define-public python2-lockfile
666 (package-with-python2 python-lockfile))
667
668 (define-public python-semantic-version
669 (package
670 (name "python-semantic-version")
671 (version "2.6.0")
672 (source
673 (origin
674 (method url-fetch)
675 (uri (pypi-uri "semantic_version" version))
676 (sha256
677 (base32
678 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
679 (build-system python-build-system)
680 (arguments
681 `(#:tests? #f)) ; PyPI tarball lacks tests
682 (home-page "https://github.com/rbarrois/python-semanticversion")
683 (synopsis "Semantic versioning module for Python")
684 (description
685 "The @code{semantic_version} class is a small library for handling
686 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
687
688 It can compare versions, generate a new version that represents a bump in one of
689 the version levels, and check whether any given string is a proper semantic
690 version identifier.")
691 (license license:bsd-3)))
692
693 (define-public python2-semantic-version
694 (package-with-python2 python-semantic-version))
695
696 (define-public python-serpent
697 (package
698 (name "python-serpent")
699 (version "1.28")
700 (source
701 (origin
702 (method url-fetch)
703 (uri (pypi-uri "serpent" version))
704 (sha256
705 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
706 (build-system python-build-system)
707 (native-inputs
708 `(("python-attrs" ,python-attrs)
709 ("python-pytz" ,python-pytz)))
710 (home-page "https://github.com/irmen/Serpent")
711 (synopsis "Serializer for literal Python expressions")
712 (description
713 "Serpent provides @code{ast.literal_eval()}-compatible object tree
714 serialization. It serializes an object tree into bytes (an utf-8 encoded
715 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
716 to rebuild the original object tree.
717
718 Because only safe literals are encoded, it is safe to send serpent data to
719 other machines, such as over the network.")
720 (license license:expat)))
721
722 (define-public python-setuptools
723 (package
724 (name "python-setuptools")
725 (version "41.0.1")
726 (source
727 (origin
728 (method url-fetch)
729 (uri (pypi-uri "setuptools" version ".zip"))
730 (sha256
731 (base32
732 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
733 (modules '((guix build utils)))
734 (snippet
735 '(begin
736 ;; Remove included binaries which are used to build self-extracting
737 ;; installers for Windows.
738 ;; TODO: Find some way to build them ourself so we can include them.
739 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
740 #t))))
741 (build-system python-build-system)
742 ;; FIXME: Tests require pytest, which itself relies on setuptools.
743 ;; One could bootstrap with an internal untested setuptools.
744 (arguments
745 `(#:tests? #f))
746 (home-page "https://pypi.python.org/pypi/setuptools")
747 (synopsis
748 "Library designed to facilitate packaging Python projects")
749 (description
750 "Setuptools is a fully-featured, stable library designed to facilitate
751 packaging Python projects, where packaging includes:
752 Python package and module definitions,
753 distribution package metadata,
754 test hooks,
755 project installation,
756 platform-specific details,
757 Python 3 support.")
758 ;; TODO: setuptools now bundles the following libraries:
759 ;; packaging, pyparsing, six and appdirs. How to unbundle?
760 (license (list license:psfl ; setuptools itself
761 license:expat ; six, appdirs, pyparsing
762 license:asl2.0 ; packaging is dual ASL2/BSD-2
763 license:bsd-2))))
764
765 (define-public python2-setuptools
766 (package-with-python2 python-setuptools))
767
768 ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
769 (define-public python-setuptools-for-tensorflow
770 (hidden-package
771 (package
772 (inherit python-setuptools)
773 (version "39.1.0")
774 (source (origin
775 (inherit (package-source python-setuptools))
776 (uri (pypi-uri "setuptools" version ".zip"))
777 (sha256
778 (base32
779 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
780
781 (define-public python-uniseg
782 (package
783 (name "python-uniseg")
784 (version "0.7.1")
785 (source
786 (origin
787 (method url-fetch)
788 (uri (pypi-uri "uniseg" version ".zip"))
789 (sha256
790 (base32
791 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
792 (build-system python-build-system)
793 (arguments
794 '(#:tests? #f)) ; The test suite requires network access.
795 (native-inputs
796 `(("unzip" ,unzip)))
797 (home-page
798 "https://bitbucket.org/emptypage/uniseg-python")
799 (synopsis
800 "Python library to determine Unicode text segmentations")
801 (description
802 "Uniseg is a Python package used to determine Unicode text segmentations.
803 Supported segmentations include:
804 @enumerate
805 @item @dfn{Code point} (any value in the Unicode codespace)
806 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
807 multiple Unicode code points, e.g. \"G\" + acute-accent)
808 @item Word break
809 @item Sentence break
810 @item Line break
811 @end enumerate")
812 (license license:expat)))
813
814 (define-public python2-uniseg
815 (package-with-python2 python-uniseg))
816
817 (define-public python-humanfriendly
818 (package
819 (name "python-humanfriendly")
820 (version "4.4.1")
821 (source
822 (origin
823 (method url-fetch)
824 (uri (pypi-uri "humanfriendly" version))
825 (sha256
826 (base32
827 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
828 (build-system python-build-system)
829 (arguments
830 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
831 #:tests? #f))
832 (propagated-inputs
833 `(("python-monotonic" ,python-monotonic)))
834 (home-page "https://humanfriendly.readthedocs.io")
835 (synopsis "Human-friendly input and output in Python")
836 (description
837 "The functions and classes in @code{humanfriendly} can be used to make
838 text interfaces more user-friendly. It includes tools to parse and format
839 numbers, file sizes, and timespans, timers for long-running operations, menus
840 to allow the user to choose from a list of options, and terminal interaction
841 helpers.")
842 (license license:expat)))
843
844 (define-public python2-humanfriendly
845 (package-with-python2 python-humanfriendly))
846
847 (define-public python-capturer
848 (package
849 (name "python-capturer")
850 (version "2.4")
851 (source
852 (origin
853 (method url-fetch)
854 (uri (pypi-uri "capturer" version))
855 (sha256
856 (base32
857 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
858 (build-system python-build-system)
859 (arguments
860 `(#:tests? #f))
861 (propagated-inputs
862 `(("python-humanfriendly" ,python-humanfriendly)))
863 (home-page "https://capturer.readthedocs.io")
864 (synopsis "Capture stdout and stderr streams of the current process")
865 (description
866 "The capturer package makes it easy to capture the stdout and stderr
867 streams of the current process and subprocesses. Output can be relayed
868 to the terminal in real time but is also available to the Python program
869 for additional processing.")
870 (license license:expat)))
871
872 (define-public python2-capturer
873 (package-with-python2 python-capturer))
874
875 (define-public python-case
876 (package
877 (name "python-case")
878 (version "1.5.3")
879 (source
880 (origin
881 (method url-fetch)
882 (uri (pypi-uri "case" version))
883 (sha256
884 (base32
885 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
886 (build-system python-build-system)
887 (propagated-inputs
888 `(("python-mock" ,python-mock)
889 ("python-nose" ,python-nose)
890 ("python-six" ,python-six)
891 ("python-unittest2" ,python-unittest2)))
892 (native-inputs
893 `(("python-coverage" ,python-coverage)))
894 (home-page "https://github.com/celery/case")
895 (synopsis "Unittest utilities and convenience methods")
896 (description
897 "The @code{case} package provides utilities on top of unittest, including
898 some helpful Python 2 compatibility convenience methods.")
899 (license license:bsd-3)))
900
901 (define-public python-verboselogs
902 (package
903 (name "python-verboselogs")
904 (version "1.7")
905 (source
906 (origin
907 (method url-fetch)
908 (uri (pypi-uri "verboselogs" version))
909 (sha256
910 (base32
911 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
912 (build-system python-build-system)
913 (native-inputs
914 `(("python-mock" ,python-mock)
915 ("python-astroid" ,python-astroid)
916 ("python-pylint" ,python-pylint)))
917 (home-page "https://verboselogs.readthedocs.io")
918 (synopsis "Verbose logging level for Python's logging module")
919 (description
920 "The @code{verboselogs} package extends Python's @code{logging} module to
921 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
922 (license license:expat)))
923
924 (define-public python2-verboselogs
925 (package-with-python2 python-verboselogs))
926
927 (define-public python-coloredlogs
928 (package
929 (name "python-coloredlogs")
930 (version "7.3")
931 (source
932 (origin
933 (method url-fetch)
934 (uri (pypi-uri "coloredlogs" version))
935 (sha256
936 (base32
937 "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9"))))
938 (build-system python-build-system)
939 (arguments
940 `(;Tests require some updated modules
941 #:tests? #f))
942 (propagated-inputs
943 `(("python-capturer" ,python-capturer)))
944 (home-page "https://coloredlogs.readthedocs.io")
945 (synopsis "Colored stream handler for Python's logging module")
946 (description
947 "The @code{coloredlogs} package enables colored terminal output for
948 Python's logging module. The @code{ColoredFormatter} class inherits from
949 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
950 messages in color.")
951 (license license:expat)))
952
953 (define-public python2-coloredlogs
954 (package-with-python2 python-coloredlogs))
955
956 (define-public python-editorconfig
957 (package
958 (name "python-editorconfig")
959 (version "0.12.2")
960 (source
961 (origin
962 (method url-fetch)
963 (uri (pypi-uri "EditorConfig" version))
964 (sha256
965 (base32
966 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
967 (build-system python-build-system)
968 (home-page "https://editorconfig.org/")
969 (synopsis "EditorConfig bindings for python")
970 (description "The EditorConfig project consists of a file format for
971 defining coding styles and a collection of text editor plugins that enable
972 editors to read the file format and adhere to defined styles. EditorConfig
973 files are easily readable and they work nicely with version control systems.")
974 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
975 (license (list license:bsd-2 license:psfl))))
976
977 (define-public python-et-xmlfile
978 (package
979 (name "python-et-xmlfile")
980 (version "1.0.1")
981 (source
982 (origin
983 (method url-fetch)
984 (uri (pypi-uri "et_xmlfile" version))
985 (sha256
986 (base32
987 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
988 (build-system python-build-system)
989 (arguments
990 `(#:phases (modify-phases %standard-phases
991 (replace 'check
992 (lambda _
993 (invoke "pytest"))))))
994 (native-inputs
995 `(("python-pytest" ,python-pytest)
996 ("python-lxml" ,python-lxml))) ;used for the tests
997 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
998 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
999 (description "This Python library is based upon the @code{xmlfile} module
1000 from @code{lxml}. It aims to provide a low memory, compatible implementation
1001 of @code{xmlfile}.")
1002 (license license:expat)))
1003
1004 (define-public python2-et-xmlfile
1005 (package-with-python2 python-et-xmlfile))
1006
1007 (define-public python-openpyxl
1008 (package
1009 (name "python-openpyxl")
1010 (version "2.6.2")
1011 (source
1012 (origin
1013 ;; We use the upstream repository, as the tests are not included in the
1014 ;; PyPI releases.
1015 (method hg-fetch)
1016 (uri (hg-reference
1017 (url "https://bitbucket.org/openpyxl/openpyxl")
1018 (changeset version)))
1019 (file-name (string-append name "-" version "-checkout"))
1020 (sha256
1021 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
1022 (build-system python-build-system)
1023 (arguments
1024 `(#:phases (modify-phases %standard-phases
1025 (replace 'check
1026 (lambda _
1027 (invoke "pytest"))))))
1028 (native-inputs
1029 ;; For the test suite.
1030 `(("python-lxml" ,python-lxml)
1031 ("python-pillow" ,python-pillow)
1032 ("python-pytest" ,python-pytest)))
1033 (propagated-inputs
1034 `(("python-et-xmlfile" ,python-et-xmlfile)
1035 ("python-jdcal" ,python-jdcal)))
1036 (home-page "https://openpyxl.readthedocs.io")
1037 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1038 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1039 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1040 standard.")
1041 (license license:expat)))
1042
1043 (define-public python-eventlet
1044 (package
1045 (name "python-eventlet")
1046 (version "0.20.1")
1047 (source
1048 (origin
1049 (method url-fetch)
1050 (uri (pypi-uri "eventlet" version))
1051 (sha256
1052 (base32
1053 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
1054 (build-system python-build-system)
1055 (propagated-inputs
1056 `(("python-greenlet" ,python-greenlet)))
1057 (arguments
1058 ;; TODO: Requires unpackaged 'enum-compat'.
1059 '(#:tests? #f))
1060 (home-page "http://eventlet.net")
1061 (synopsis "Concurrent networking library for Python")
1062 (description
1063 "Eventlet is a concurrent networking library for Python that
1064 allows you to change how you run your code, not how you write it.
1065 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1066 Coroutines ensure that the developer uses a blocking style of programming
1067 that is similar to threading, but provide the benefits of non-blocking I/O.
1068 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1069 from the Python interpreter, or as a small part of a larger application.")
1070 (license license:expat)))
1071
1072 (define-public python2-eventlet
1073 (let ((base (package-with-python2
1074 (strip-python2-variant python-eventlet))))
1075 (package (inherit base)
1076 (propagated-inputs
1077 `(("python2-enum34" ,python2-enum34)
1078 ,@(package-propagated-inputs base))))))
1079
1080 (define-public python-six
1081 (package
1082 (name "python-six")
1083 (version "1.12.0")
1084 (source
1085 (origin
1086 (method url-fetch)
1087 (uri (pypi-uri "six" version))
1088 (sha256
1089 (base32
1090 "0wxs1q74v07ssjywbbm7x6h5v9qx209ld2yfsif4060sxi0h2sni"))))
1091 (build-system python-build-system)
1092 (arguments
1093 `(#:phases
1094 (modify-phases %standard-phases
1095 (replace 'check
1096 (lambda _
1097 (invoke "py.test" "-v"))))))
1098 (native-inputs
1099 `(("python-py" ,python-py)
1100 ("python-pytest" ,python-pytest-bootstrap)))
1101 (home-page "https://pypi.python.org/pypi/six/")
1102 (synopsis "Python 2 and 3 compatibility utilities")
1103 (description
1104 "Six is a Python 2 and 3 compatibility library. It provides utility
1105 functions for smoothing over the differences between the Python versions with
1106 the goal of writing Python code that is compatible on both Python versions.
1107 Six supports every Python version since 2.5. It is contained in only one
1108 Python file, so it can be easily copied into your project.")
1109 (license license:x11)))
1110
1111 (define-public python2-six
1112 (package-with-python2 python-six))
1113
1114 (define-public python-six-bootstrap
1115 (package
1116 (inherit python-six)
1117 (name "python-six-bootstrap")
1118 (native-inputs `())
1119 (arguments `(#:tests? #f))))
1120
1121 (define-public python2-six-bootstrap
1122 (package-with-python2 python-six-bootstrap))
1123
1124 (define-public python-schedule
1125 (package
1126 (name "python-schedule")
1127 (version "0.4.3")
1128 (source
1129 (origin
1130 (method url-fetch)
1131 (uri (pypi-uri "schedule" version))
1132 (sha256
1133 (base32
1134 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1135 (build-system python-build-system)
1136 (native-inputs
1137 `(("python-pytest" ,python-pytest)
1138 ("python-mock" ,python-mock)))
1139 (home-page "https://github.com/dbader/schedule")
1140 (synopsis "Schedule periodic function calls in Python")
1141 (description
1142 "Schedule is an in-process scheduler for periodic jobs that uses the
1143 builder pattern for configuration. Schedule lets you run Python functions (or
1144 any other callable) periodically at pre-determined intervals using a simple,
1145 human-friendly syntax.")
1146 (license license:expat)))
1147
1148 (define-public python2-schedule
1149 (package-with-python2 python-schedule))
1150
1151 (define-public python-pandas
1152 (package
1153 (name "python-pandas")
1154 (version "0.24.2")
1155 (source
1156 (origin
1157 (method url-fetch)
1158 (uri (pypi-uri "pandas" version))
1159 (sha256
1160 (base32 "18imlm8xbhcbwy4wa957a1fkamrcb0z988z006jpfda3ki09z4ag"))))
1161 (build-system python-build-system)
1162 (arguments
1163 `(#:modules ((guix build utils)
1164 (guix build python-build-system)
1165 (ice-9 ftw)
1166 (srfi srfi-26))
1167 #:phases (modify-phases %standard-phases
1168 (add-after 'unpack 'patch-which
1169 (lambda* (#:key inputs #:allow-other-keys)
1170 (let ((which (assoc-ref inputs "which")))
1171 (substitute* "pandas/io/clipboard/__init__.py"
1172 (("^CHECK_CMD = .*")
1173 (string-append "CHECK_CMD = \"" which "\"\n"))))
1174 #t))
1175 (replace 'check
1176 (lambda _
1177 (let ((build-directory
1178 (string-append
1179 (getcwd) "/build/"
1180 (car (scandir "build"
1181 (cut string-prefix? "lib." <>))))))
1182 ;; Disable the "strict data files" option which causes
1183 ;; the build to error out if required data files are
1184 ;; not available (as is the case with PyPI archives).
1185 (substitute* "setup.cfg"
1186 (("addopts = --strict-data-files") "addopts = "))
1187 (with-directory-excursion build-directory
1188 ;; Delete tests that require "moto" which is not yet
1189 ;; in Guix.
1190 (for-each delete-file
1191 '("pandas/tests/io/conftest.py"
1192 "pandas/tests/io/json/test_compression.py"
1193 "pandas/tests/io/parser/test_network.py"
1194 "pandas/tests/io/test_parquet.py"))
1195 (invoke "pytest" "-vv" "pandas" "--skip-slow"
1196 "--skip-network" "-k"
1197 ;; XXX: Due to the deleted tests above.
1198 "not test_read_s3_jsonl"))))))))
1199 (propagated-inputs
1200 `(("python-numpy" ,python-numpy)
1201 ("python-openpyxl" ,python-openpyxl)
1202 ("python-pytz" ,python-pytz)
1203 ("python-dateutil" ,python-dateutil)
1204 ("python-xlrd" ,python-xlrd)))
1205 (inputs
1206 `(("which" ,which)))
1207 (native-inputs
1208 `(("python-cython" ,python-cython)
1209 ("python-beautifulsoup4" ,python-beautifulsoup4)
1210 ("python-lxml" ,python-lxml)
1211 ("python-html5lib" ,python-html5lib)
1212 ("python-nose" ,python-nose)
1213 ("python-pytest" ,python-pytest)
1214 ("python-pytest-mock" ,python-pytest-mock)))
1215 (home-page "https://pandas.pydata.org")
1216 (synopsis "Data structures for data analysis, time series, and statistics")
1217 (description
1218 "Pandas is a Python package providing fast, flexible, and expressive data
1219 structures designed to make working with structured (tabular,
1220 multidimensional, potentially heterogeneous) and time series data both easy
1221 and intuitive. It aims to be the fundamental high-level building block for
1222 doing practical, real world data analysis in Python.")
1223 (license license:bsd-3)))
1224
1225 (define-public python2-pandas
1226 (package-with-python2 python-pandas))
1227
1228 (define-public python2-mechanize
1229 (package
1230 (name "python2-mechanize")
1231 (version "0.2.5")
1232 (source
1233 (origin
1234 (method url-fetch)
1235 (uri (pypi-uri "mechanize" version))
1236 (sha256
1237 (base32
1238 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1239 (build-system python-build-system)
1240 (arguments
1241 `(#:python ,python-2 ; apparently incompatible with Python 3
1242 #:tests? #f))
1243 ;; test fails with message
1244 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1245 ;; (python-3.3.2) or
1246 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1247 ;; (python-2.7.5).
1248 ;; The source code is from March 2011 and probably not up-to-date
1249 ;; with respect to python unit tests.
1250 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1251 (synopsis
1252 "Stateful programmatic web browsing in Python")
1253 (description
1254 "Mechanize implements stateful programmatic web browsing in Python,
1255 after Andy Lester’s Perl module WWW::Mechanize.")
1256 (license (license:non-copyleft
1257 "file://COPYING"
1258 "See COPYING in the distribution."))))
1259
1260
1261 (define-public python-simplejson
1262 (package
1263 (name "python-simplejson")
1264 (version "3.14.0")
1265 (source
1266 (origin
1267 (method url-fetch)
1268 (uri (pypi-uri "simplejson" version))
1269 (sha256
1270 (base32
1271 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1272 (build-system python-build-system)
1273 (home-page "http://simplejson.readthedocs.org/en/latest/")
1274 (synopsis
1275 "Json library for Python")
1276 (description
1277 "JSON (JavaScript Object Notation) is a subset of JavaScript
1278 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1279 format.
1280
1281 Simplejson exposes an API familiar to users of the standard library marshal
1282 and pickle modules. It is the externally maintained version of the json
1283 library contained in Python 2.6, but maintains compatibility with Python 2.5
1284 and (currently) has significant performance advantages, even without using
1285 the optional C extension for speedups. Simplejson is also supported on
1286 Python 3.3+.")
1287 (license license:x11)))
1288
1289 (define-public python2-simplejson
1290 (package-with-python2 python-simplejson))
1291
1292
1293 (define-public python-pyicu
1294 (package
1295 (name "python-pyicu")
1296 (version "2.3.1")
1297 (source
1298 (origin
1299 (method url-fetch)
1300 (uri (pypi-uri "PyICU" version))
1301 (sha256
1302 (base32
1303 "1x4w8m7ifki9z2a187pgjr33z6z0rp2fii9b73djak1vhm9v9cnx"))))
1304 (build-system python-build-system)
1305 (inputs
1306 `(("icu4c" ,icu4c)))
1307 (native-inputs
1308 `(("python-pytest" ,python-pytest)
1309 ("python-six" ,python-six)))
1310 (home-page "https://github.com/ovalhub/pyicu")
1311 (synopsis "Python extension wrapping the ICU C++ API")
1312 (description
1313 "PyICU is a python extension wrapping the ICU C++ API.")
1314 (properties `((python2-variant . ,(delay python2-pyicu))))
1315 (license license:x11)))
1316
1317 (define-public python2-pyicu
1318 (let ((base (package-with-python2
1319 (strip-python2-variant python-pyicu))))
1320 (package
1321 (inherit base)
1322 (arguments
1323 `(,@(package-arguments base)
1324 #:phases
1325 (modify-phases %standard-phases
1326 (add-before 'check 'delete-failing-test
1327 (λ _
1328 ;; XXX: This fails due to Unicode issues unique to Python 2,
1329 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1330 (delete-file "test/test_Script.py")
1331 #t))))))))
1332
1333 (define-public python2-dogtail
1334 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1335 ;; spaces in indentation" with Python 3.
1336 (package
1337 (name "python2-dogtail")
1338 (version "0.9.9")
1339 (source (origin
1340 (method url-fetch)
1341 (uri (pypi-uri "dogtail" version))
1342 (sha256
1343 (base32
1344 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1345 (build-system python-build-system)
1346 (arguments `(#:python ,python-2
1347 #:tests? #f)) ; invalid command "test"
1348 ;; Currently no offical homepage.
1349 (home-page "https://pypi.python.org/pypi/dogtail/")
1350 (synopsis "GUI test tool and automation framework written in Python")
1351 (description
1352 "Dogtail is a GUI test tool and automation framework written in Python.
1353 It uses Accessibility (a11y) technologies to communicate with desktop
1354 applications. dogtail scripts are written in Python and executed like any
1355 other Python program.")
1356 (license license:gpl2+)))
1357
1358 (define-public python-empy
1359 (package
1360 (name "python-empy")
1361 (version "3.3.3")
1362 (source (origin
1363 (method url-fetch)
1364 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1365 version ".tar.gz"))
1366 (sha256
1367 (base32
1368 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
1369 (build-system python-build-system)
1370 (arguments
1371 `(#:tests? #f)) ; python2 only
1372 (home-page "http://www.alcyone.com/software/empy/")
1373 (synopsis "Templating system for Python")
1374 (description
1375 "EmPy is a system for embedding Python expressions and statements in
1376 template text; it takes an EmPy source file, processes it, and produces
1377 output. This is accomplished via expansions, which are special signals to the
1378 EmPy system and are set off by a special prefix (by default the at sign, @@).
1379 EmPy can expand arbitrary Python expressions and statements in this way, as
1380 well as a variety of special forms. Textual data not explicitly delimited in
1381 this way is sent unaffected to the output, allowing Python to be used in
1382 effect as a markup language. Also supported are callbacks via hooks,
1383 recording and playback via diversions, and dynamic, chainable filters. The
1384 system is highly configurable via command line options and embedded
1385 commands.")
1386 (license license:lgpl2.1+)))
1387
1388 (define-public python2-empy
1389 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1390 (package
1391 (inherit base)
1392 (arguments `(,@(package-arguments base)
1393 #:tests? #t)))))
1394
1395 (define-public python2-element-tree
1396 (package
1397 (name "python2-element-tree")
1398 (version "1.2.6")
1399 (source (origin
1400 (method url-fetch)
1401 (uri (string-append
1402 "http://effbot.org/media/downloads/elementtree-"
1403 version "-20050316.tar.gz"))
1404 (sha256
1405 (base32
1406 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1407 (build-system python-build-system)
1408 (arguments
1409 `(#:python ,python-2 ; seems to be part of Python 3
1410 #:tests? #f)) ; no 'test' sub-command
1411 (synopsis "Toolkit for XML processing in Python")
1412 (description
1413 "ElementTree is a Python library supporting lightweight XML processing.")
1414 (home-page "http://effbot.org/zone/element-index.htm")
1415 (license (license:x11-style
1416 "http://docs.python.org/2/license.html"
1417 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1418
1419 (define-public python2-pybugz
1420 (package
1421 (name "python2-pybugz")
1422 (version "0.6.11")
1423 (source (origin
1424 (method url-fetch)
1425 (uri (string-append
1426 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1427 version ".tar.gz"))
1428 (sha256
1429 (base32
1430 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1431 (patches (search-patches "pybugz-stty.patch"
1432 "pybugz-encode-error.patch"))))
1433 (build-system python-build-system)
1434 (arguments
1435 `(#:python ,python-2 ; SyntaxError with Python 3
1436 #:tests? #f)) ; no 'test' sub-command
1437 (propagated-inputs
1438 `(("element-tree" ,python2-element-tree)))
1439 (synopsis "Python and command-line interface to Bugzilla")
1440 (description
1441 "PyBugz is a Python library and command-line tool to query the Bugzilla
1442 bug tracking system. It is meant as an aid to speed up interaction with the
1443 bug tracker.")
1444 (home-page "http://www.liquidx.net/pybugz/")
1445 (license license:gpl2)))
1446
1447 (define-public python2-enum
1448 (package
1449 (name "python2-enum")
1450 (version "0.4.6")
1451 (source (origin
1452 (method url-fetch)
1453 (uri (pypi-uri "enum" version))
1454 (sha256
1455 (base32
1456 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1457 (build-system python-build-system)
1458 (arguments
1459 `(#:python ,python-2))
1460 (home-page "http://pypi.python.org/pypi/enum/")
1461 (synopsis "Robust enumerated type support in Python")
1462 (description
1463 "This provides a module for robust enumerations in Python. It has
1464 been superseded by the Python standard library and is provided only for
1465 compatibility.")
1466 ;; Choice of either license.
1467 (license (list license:gpl3+ license:psfl))))
1468
1469 (define-public python-enum34
1470 (package
1471 (name "python-enum34")
1472 (version "1.1.6")
1473 (source
1474 (origin
1475 (method url-fetch)
1476 (uri (pypi-uri "enum34" version))
1477 (sha256
1478 (base32
1479 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1480 (build-system python-build-system)
1481 (home-page "https://pypi.python.org/pypi/enum34")
1482 (synopsis "Backported Python 3.4 Enum")
1483 (description
1484 "Enum34 is the new Python stdlib enum module available in Python 3.4
1485 backported for previous versions of Python from 2.4 to 3.3.")
1486 (license license:bsd-3)))
1487
1488 (define-public python2-enum34
1489 (package-with-python2 python-enum34))
1490
1491 (define-public python-parse-type
1492 (package
1493 (name "python-parse-type")
1494 (version "0.4.2")
1495 (source
1496 (origin
1497 (method url-fetch)
1498 (uri (pypi-uri "parse_type" version))
1499 (sha256
1500 (base32
1501 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1502 (build-system python-build-system)
1503 (propagated-inputs
1504 `(("python-six" ,python-six)
1505 ("python-parse" ,python-parse)))
1506 (native-inputs
1507 `(("python-pytest" ,python-pytest)
1508 ("python-pytest-runner" ,python-pytest-runner)))
1509 (home-page "https://github.com/jenisys/parse_type")
1510 (synopsis "Extended parse module")
1511 (description
1512 "Parse_type extends the python parse module.")
1513 (properties
1514 `((python2-variant . ,(delay python2-parse-type))))
1515 (license license:bsd-3)))
1516
1517 (define-public python2-parse-type
1518 (let ((base (package-with-python2
1519 (strip-python2-variant python-parse-type))))
1520 (package (inherit base)
1521 (propagated-inputs
1522 `(("python2-enum34" ,python2-enum34)
1523 ,@(package-propagated-inputs base))))))
1524
1525 (define-public python-parse
1526 (package
1527 (name "python-parse")
1528 (version "1.8.4")
1529 (source
1530 (origin
1531 (method url-fetch)
1532 (uri (pypi-uri "parse" version))
1533 (sha256
1534 (base32
1535 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1536 (build-system python-build-system)
1537 (arguments
1538 `(#:phases
1539 (modify-phases %standard-phases
1540 (replace 'check
1541 (lambda _ (invoke "python" "test_parse.py"))))))
1542 (home-page "https://github.com/r1chardj0n3s/parse")
1543 (synopsis "Parse strings")
1544 (description
1545 "Parse strings using a specification based on the Python @code{format()}
1546 syntax.")
1547 (license license:x11)))
1548
1549 (define-public python-polib
1550 (package
1551 (name "python-polib")
1552 (version "1.0.8")
1553 (source (origin
1554 (method url-fetch)
1555 (uri (pypi-uri "polib" version))
1556 (sha256
1557 (base32
1558 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1559 (build-system python-build-system)
1560 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1561 (synopsis "Manipulate, create and modify gettext files")
1562 (description "Polib can manipulate any gettext format (po, pot and mo)
1563 files. It can be used to create po files from scratch or to modify
1564 existing ones.")
1565 (license license:expat)))
1566
1567 (define-public python2-polib
1568 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1569 (package
1570 (inherit base)
1571 (arguments `(,@(package-arguments base)
1572 ;; Tests don't work with python2.
1573 #:tests? #f)))))
1574
1575 (define-public python-poyo
1576 (package
1577 (name "python-poyo")
1578 (version "0.5.0")
1579 (source
1580 (origin
1581 (method url-fetch)
1582 (uri (pypi-uri "poyo" version))
1583 (sha256
1584 (base32
1585 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
1586 (build-system python-build-system)
1587 (home-page "https://github.com/hackebrot/poyo")
1588 (synopsis "Lightweight YAML Parser for Python")
1589 (description
1590 "This package provides a lightweight YAML Parser for Python. It supports
1591 only a chosen subset of the YAML format that is required to parse cookiecutter
1592 user configuration files. It does not have support for serializing into YAML
1593 and is not compatible with JSON.")
1594 (license license:expat)))
1595
1596 (define-public scons
1597 (package
1598 (name "scons")
1599 (version "3.0.4")
1600 (source (origin
1601 (method git-fetch)
1602 (uri (git-reference
1603 (url "https://github.com/SCons/scons.git")
1604 (commit version)))
1605 (file-name (git-file-name name version))
1606 (sha256
1607 (base32
1608 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
1609 (build-system python-build-system)
1610 (arguments
1611 `(#:use-setuptools? #f ; still relies on distutils
1612 #:tests? #f ; no 'python setup.py test' command
1613 #:phases
1614 (modify-phases %standard-phases
1615 (add-before 'build 'bootstrap
1616 (lambda _
1617 (substitute* "src/engine/SCons/compat/__init__.py"
1618 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1619 "sys.modules[new] = __import__(old)"))
1620 (substitute* "src/engine/SCons/Platform/__init__.py"
1621 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1622 "mod = __import__(full_name)"))
1623 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1624 (chdir "build/scons")
1625 #t)))))
1626 (home-page "http://scons.org/")
1627 (synopsis "Software construction tool written in Python")
1628 (description
1629 "SCons is a software construction tool. Think of SCons as an improved,
1630 cross-platform substitute for the classic Make utility with integrated
1631 functionality similar to autoconf/automake and compiler caches such as ccache.
1632 In short, SCons is an easier, more reliable and faster way to build
1633 software.")
1634 (license license:x11)))
1635
1636 (define-public scons-python2
1637 (package
1638 (inherit (package-with-python2 scons))
1639 (name "scons-python2")))
1640
1641 (define-public python-extras
1642 (package
1643 (name "python-extras")
1644 (version "1.0.0")
1645 (source
1646 (origin
1647 (method url-fetch)
1648 (uri (pypi-uri "extras" version))
1649 (sha256
1650 (base32
1651 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1652 (build-system python-build-system)
1653 (arguments
1654 ;; FIXME: Circular dependency on testtools.
1655 '(#:tests? #f))
1656 (home-page "https://github.com/testing-cabal/extras")
1657 (synopsis "Useful extensions to the Python standard library")
1658 (description
1659 "Extras is a set of extensions to the Python standard library.")
1660 (license license:expat)))
1661
1662 (define-public python2-extras
1663 (package-with-python2 python-extras))
1664
1665 (define-public python-mimeparse
1666 (package
1667 (name "python-mimeparse")
1668 (version "1.6.0")
1669 (source
1670 (origin
1671 (method url-fetch)
1672 (uri (pypi-uri "python-mimeparse" version))
1673 (sha256
1674 (base32
1675 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1676 (build-system python-build-system)
1677 (arguments
1678 '(#:phases
1679 (modify-phases %standard-phases
1680 (replace 'check
1681 (lambda _
1682 (invoke "./mimeparse_test.py"))))))
1683 (home-page
1684 "https://github.com/dbtsai/python-mimeparse")
1685 (synopsis "Python library for parsing MIME types")
1686 (description
1687 "Mimeparse provides basic functions for parsing MIME type names and
1688 matching them against a list of media-ranges.")
1689 (license license:expat)))
1690
1691 (define-public python2-mimeparse
1692 (package-with-python2 python-mimeparse))
1693
1694 (define-public python-miniboa
1695 (package
1696 (name "python-miniboa")
1697 (version "1.0.7")
1698 (source
1699 (origin
1700 (method url-fetch)
1701 (uri (pypi-uri "miniboa" version))
1702 (sha256
1703 (base32
1704 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1705 (build-system python-build-system)
1706 (home-page "https://github.com/shmup/miniboa")
1707 (synopsis "Simple, single-threaded Telnet server")
1708 (description
1709 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1710 server.")
1711 (license license:asl2.0)))
1712
1713 (define-public python2-miniboa
1714 (package-with-python2 python-miniboa))
1715
1716 (define-public python-pafy
1717 (package
1718 (name "python-pafy")
1719 (version "0.5.3.1")
1720 (source
1721 (origin
1722 (method url-fetch)
1723 (uri (pypi-uri "pafy" version))
1724 (sha256
1725 (base32
1726 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1727 (build-system python-build-system)
1728 (arguments
1729 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1730 (propagated-inputs
1731 ;; Youtube-dl is a python package which is imported in the file
1732 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1733 `(("youtube-dl" ,youtube-dl)))
1734 (home-page "https://np1.github.io/pafy/")
1735 (synopsis "Retrieve YouTube content and metadata")
1736 (description
1737 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1738 (license license:lgpl3+)))
1739
1740 (define-public python2-funcsigs
1741 (package
1742 (name "python2-funcsigs")
1743 (version "1.0.2")
1744 (source (origin
1745 (method url-fetch)
1746 (uri (pypi-uri "funcsigs" version))
1747 (sha256
1748 (base32
1749 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1750 (build-system python-build-system)
1751 (arguments
1752 `(#:python ,python-2))
1753 (native-inputs
1754 `(("python2-unittest2" ,python2-unittest2)))
1755 (home-page "http://funcsigs.readthedocs.org")
1756 (synopsis "Python function signatures from PEP362")
1757 (description
1758 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1759 (license license:asl2.0)))
1760
1761 (define-public python2-funcsigs-bootstrap
1762 (package
1763 (inherit python2-funcsigs)
1764 (name "python2-funcsigs-bootstrap")
1765 (native-inputs `())
1766 (arguments
1767 `(#:tests? #f
1768 ,@(package-arguments python2-funcsigs)))))
1769
1770 (define-public python-py
1771 (package
1772 (name "python-py")
1773 (version "1.8.0")
1774 (source
1775 (origin
1776 (method url-fetch)
1777 (uri (pypi-uri "py" version))
1778 (sha256
1779 (base32
1780 "0lsy1gajva083pzc7csj1cvbmminb7b4l6a0prdzyb3fd829nqyw"))))
1781 (build-system python-build-system)
1782 (arguments
1783 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1784 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1785 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1786 ;; Is this module globally installed?"
1787 '(#:tests? #f))
1788 (native-inputs
1789 `(("python-setuptools-scm" ,python-setuptools-scm)))
1790 (home-page "https://github.com/pytest-dev/py")
1791 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1792 (description
1793 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1794 code introspection, and logging.")
1795 (license license:expat)))
1796
1797 (define-public python2-py
1798 (package-with-python2 python-py))
1799
1800 ;; Recent versions of python-fixtures and python-testrepository need
1801 ;; python-pbr for packaging, which itself needs these two packages for
1802 ;; testing.
1803 ;; To fix this circular dependency, we use a build of python-pbr, based on the
1804 ;; same source, just without any test dependencies and with tests disabled.
1805 ;; python-pbr-minmal is then used to package python-fixtures and
1806 ;; python-testrepository.
1807 ;; Strictly speaking we currently could remove the test-requirements from the
1808 ;; normal python-pbr package (and save this package) since test are disabled
1809 ;; there anyway. But this may change in future.
1810 (define-public python-pbr-minimal
1811 (package
1812 (name "python-pbr-minimal")
1813 (version "3.0.1")
1814 (source
1815 (origin
1816 (method url-fetch)
1817 (uri (pypi-uri "pbr" version))
1818 (sha256
1819 (base32
1820 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1821 (build-system python-build-system)
1822 (arguments
1823 `(#:tests? #f))
1824 (home-page "http://docs.openstack.org/developer/pbr/")
1825 (synopsis "Minimal build of python-pbr used for bootstrapping")
1826 (description
1827 "Used only for bootstrapping python2-pbr, you should not need this.")
1828 (license license:asl2.0)))
1829
1830 (define-public python2-pbr-minimal
1831 (package-with-python2 python-pbr-minimal))
1832
1833 (define-public python-pbr
1834 (package
1835 (inherit python-pbr-minimal)
1836 (name "python-pbr")
1837 (arguments
1838 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1839 (propagated-inputs
1840 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1841 (native-inputs
1842 `(("python-fixtures" ,python-fixtures-bootstrap)
1843 ;; discover, coverage, hacking, subunit
1844 ("python-mock" ,python-mock)
1845 ("python-six" ,python-six)
1846 ("python-sphinx" ,python-sphinx)
1847 ("python-testrepository" ,python-testrepository-bootstrap)
1848 ("python-testresources" ,python-testresources-bootstrap)
1849 ("python-testscenarios" ,python-testscenarios-bootstrap)
1850 ("python-testtools" ,python-testtools-bootstrap)
1851 ("python-virtualenv" ,python-virtualenv)))
1852 (synopsis "Enhance the default behavior of Python’s setuptools")
1853 (description
1854 "Python Build Reasonableness (PBR) is a library that injects some useful
1855 and sensible default behaviors into your setuptools run. It will set
1856 versions, process requirements files and generate AUTHORS and ChangeLog file
1857 from git information.
1858 ")))
1859
1860 (define-public python2-pbr
1861 (package-with-python2 python-pbr))
1862
1863 (define-public python-pyrsistent
1864 (package
1865 (name "python-pyrsistent")
1866 (version "0.14.11")
1867 (home-page "https://github.com/tobgu/pyrsistent")
1868 (source (origin
1869 (method url-fetch)
1870 (uri (pypi-uri "pyrsistent" version))
1871 (sha256
1872 (base32
1873 "1qkh74bm296mp5g3r11lgsksr6bh4w1bf8pji4nmxdlfj542ga1w"))))
1874 (build-system python-build-system)
1875 (native-inputs
1876 `(("python-hypothesis" ,python-hypothesis)
1877 ("python-pytest" ,python-pytest)
1878 ("python-pytest-runner" ,python-pytest-runner)))
1879 (propagated-inputs
1880 `(("python-six" ,python-six)))
1881 (synopsis "Persistent data structures for Python")
1882 (description
1883 "Pyrsistent is a number of persistent collections (by some referred to as
1884 functional data structures). Persistent in the sense that they are immutable.
1885
1886 All methods on a data structure that would normally mutate it instead return a
1887 new copy of the structure containing the requested updates. The original
1888 structure is left untouched.")
1889 (license license:expat)))
1890
1891 (define-public python2-pyrsistent
1892 (package-with-python2 python-pyrsistent))
1893
1894 (define-public python-exif-read
1895 (package
1896 (name "python-exif-read")
1897 (version "2.1.2")
1898 (source (origin
1899 (method url-fetch)
1900 (uri (pypi-uri "ExifRead" version))
1901 (sha256
1902 (base32
1903 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1904 (build-system python-build-system)
1905 (arguments `(#:tests? #f)) ; no tests
1906 (home-page "https://github.com/ianare/exif-py")
1907 (synopsis "Python library to extract EXIF data from image files")
1908 (description
1909 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1910 files.")
1911 (license license:bsd-3)))
1912
1913 (define-public python2-exif-read
1914 (package-with-python2 python-exif-read))
1915
1916 (define-public python-pyld
1917 (package
1918 (name "python-pyld")
1919 (version "1.0.3")
1920 (source (origin
1921 (method url-fetch)
1922 (uri (pypi-uri "PyLD" version))
1923 (sha256
1924 (base32
1925 "12i2g6xdj30k7xxcibg3sc5y76snwq8l6n8fy9lyi577kgy0h2pm"))))
1926 (build-system python-build-system)
1927 (home-page "https://github.com/digitalbazaar/pyld")
1928 (synopsis "Python implementation of the JSON-LD specification")
1929 (description
1930 "PyLD is an implementation of the JSON-LD specification.")
1931 (license license:bsd-3)))
1932
1933 (define-public python2-pyld
1934 (package-with-python2 python-pyld))
1935
1936 (define-public python-click
1937 (package
1938 (name "python-click")
1939 (version "7.0")
1940 (source
1941 (origin
1942 (method url-fetch)
1943 (uri (pypi-uri "click" version))
1944 (sha256
1945 (base32
1946 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
1947 (build-system python-build-system)
1948 (arguments
1949 `(#:phases
1950 (modify-phases %standard-phases
1951 (add-after 'unpack 'fix-paths
1952 (lambda* (#:key inputs #:allow-other-keys)
1953 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1954 "cross-libc" "libc"))))
1955 (substitute* "click/_unicodefun.py"
1956 (("'locale'")
1957 (string-append "'" glibc "/bin/locale'"))))
1958 #t))
1959 (replace 'check
1960 (lambda _
1961 (invoke "python" "-m" "pytest"))))))
1962 (native-inputs
1963 `(("python-pytest" ,python-pytest)))
1964 (home-page "https://palletsprojects.com/p/click/")
1965 (synopsis "Command line library for Python")
1966 (description
1967 "Click is a Python package for creating command line interfaces in a
1968 composable way with as little code as necessary. Its name stands for
1969 \"Command Line Interface Creation Kit\". It's highly configurable but comes
1970 with sensible defaults out of the box.")
1971 (license license:bsd-3)))
1972
1973 (define-public python2-click
1974 (package-with-python2 python-click))
1975
1976 (define-public python-wheel
1977 (package
1978 (name "python-wheel")
1979 (version "0.32.3")
1980 (source
1981 (origin
1982 (method url-fetch)
1983 (uri (pypi-uri "wheel" version))
1984 (sha256
1985 (base32
1986 "1dhxl1bf18bx9szmqcnxbg6204hp3im8089q3hkwh5jfa6zh75q2"))))
1987 (build-system python-build-system)
1988 (native-inputs
1989 `(("python-jsonschema" ,python-jsonschema)
1990 ("python-pytest-cov" ,python-pytest-cov)))
1991 (home-page "https://bitbucket.org/pypa/wheel/")
1992 (synopsis "Format for built Python packages")
1993 (description
1994 "A wheel is a ZIP-format archive with a specially formatted filename and
1995 the @code{.whl} extension. It is designed to contain all the files for a PEP
1996 376 compatible install in a way that is very close to the on-disk format. Many
1997 packages will be properly installed with only the @code{Unpack} step and the
1998 unpacked archive preserves enough information to @code{Spread} (copy data and
1999 scripts to their final locations) at any later time. Wheel files can be
2000 installed with a newer @code{pip} or with wheel's own command line utility.")
2001 (license license:expat)
2002 (properties `((python2-variant . ,(delay python2-wheel))))))
2003
2004 (define-public python2-wheel
2005 (let ((wheel (package-with-python2
2006 (strip-python2-variant python-wheel))))
2007 (package (inherit wheel)
2008 (native-inputs `(("python2-functools32" ,python2-functools32)
2009 ,@(package-native-inputs wheel))))))
2010
2011 (define-public python-vcversioner
2012 (package
2013 (name "python-vcversioner")
2014 (version "2.16.0.0")
2015 (source
2016 (origin
2017 (method url-fetch)
2018 (uri (pypi-uri "vcversioner" version))
2019 (sha256
2020 (base32
2021 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2022 (build-system python-build-system)
2023 (synopsis "Python library for version number discovery")
2024 (description "Vcversioner is a Python library that inspects tagging
2025 information in a variety of version control systems in order to discover
2026 version numbers.")
2027 (home-page "https://github.com/habnabit/vcversioner")
2028 (license license:isc)))
2029
2030 (define-public python2-vcversioner
2031 (package-with-python2 python-vcversioner))
2032
2033 (define-public python-jdcal
2034 (package
2035 (name "python-jdcal")
2036 (version "1.4")
2037 (source
2038 (origin
2039 (method url-fetch)
2040 (uri (pypi-uri "jdcal" version))
2041 (sha256
2042 (base32
2043 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
2044 (build-system python-build-system)
2045 (arguments
2046 `(#:phases (modify-phases %standard-phases
2047 (replace 'check
2048 (lambda _
2049 (invoke "pytest"))))))
2050 (native-inputs
2051 `(("python-pytest" ,python-pytest)))
2052 (home-page "https://github.com/phn/jdcal")
2053 (synopsis "Functions to convert between Julian dates Gregorian dates")
2054 (description "This Python library provides functions for converting
2055 between Julian dates and Gregorian dates.")
2056 (license license:bsd-2)))
2057
2058 (define-public python2-jdcal
2059 (package-with-python2 python-jdcal))
2060
2061 (define-public python-jsonschema
2062 (package
2063 (name "python-jsonschema")
2064 (version "3.0.1")
2065 (source (origin
2066 (method url-fetch)
2067 (uri (pypi-uri "jsonschema" version))
2068 (sha256
2069 (base32
2070 "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc"))))
2071 (build-system python-build-system)
2072 (arguments
2073 '(#:phases
2074 (modify-phases %standard-phases
2075 (replace 'check
2076 (lambda _
2077 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2078 (invoke "trial" "jsonschema"))))))
2079 (native-inputs
2080 `(("python-setuptools_scm" ,python-setuptools-scm)
2081 ("python-twisted" ,python-twisted)))
2082 (propagated-inputs
2083 `(("python-attrs" ,python-attrs)
2084 ("python-pyrsistent" ,python-pyrsistent)
2085 ("python-six" ,python-six)))
2086 (home-page "https://github.com/Julian/jsonschema")
2087 (synopsis "Implementation of JSON Schema for Python")
2088 (description
2089 "Jsonschema is an implementation of JSON Schema for Python.")
2090 (license license:expat)
2091 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2092
2093 (define-public python2-jsonschema
2094 (let ((jsonschema (package-with-python2
2095 (strip-python2-variant python-jsonschema))))
2096 (package (inherit jsonschema)
2097 (propagated-inputs
2098 `(("python2-functools32" ,python2-functools32)
2099 ,@(package-propagated-inputs jsonschema))))))
2100
2101 ;; This old version is still required by docker-compose as of 1.24.0.
2102 (define-public python-jsonschema-2.6
2103 (package
2104 (name "python-jsonschema")
2105 (version "2.6.0")
2106 (source (origin
2107 (method url-fetch)
2108 (uri (pypi-uri "jsonschema" version))
2109 (sha256
2110 (base32
2111 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
2112 (build-system python-build-system)
2113 (arguments
2114 '(#:phases
2115 (modify-phases %standard-phases
2116 (replace 'check (lambda _ (invoke "nosetests"))))))
2117 (native-inputs
2118 `(("python-nose" ,python-nose)
2119 ("python-vcversioner" ,python-vcversioner)))
2120 (home-page "https://github.com/Julian/jsonschema")
2121 (synopsis "Implementation of JSON Schema for Python")
2122 (description
2123 "Jsonschema is an implementation of JSON Schema for Python.")
2124 (license license:expat)
2125 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2126
2127 (define-public python-schema
2128 (package
2129 (name "python-schema")
2130 (version "0.6.6")
2131 (source
2132 (origin
2133 (method url-fetch)
2134 (uri (pypi-uri "schema" version))
2135 (sha256
2136 (base32
2137 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2138 (build-system python-build-system)
2139 (native-inputs
2140 `(("python-pytest" ,python-pytest)))
2141 (home-page "https://github.com/keleshev/schema")
2142 (synopsis "Simple data validation library")
2143 (description
2144 "@code{python-schema} is a library for validating Python data
2145 structures, such as those obtained from config-files, forms, external
2146 services or command-line parsing, converted from JSON/YAML (or
2147 something else) to Python data-types.")
2148 (license license:psfl)))
2149
2150 (define-public python2-schema
2151 (package-with-python2 python-schema))
2152
2153 (define-public python-schema-0.5
2154 (package (inherit python-schema)
2155 (version "0.5.0")
2156 (source
2157 (origin
2158 (method url-fetch)
2159 (uri (pypi-uri "schema" version))
2160 (sha256
2161 (base32
2162 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2163
2164 (define-public python2-schema-0.5
2165 (package-with-python2 python-schema-0.5))
2166
2167 (define-public python-kitchen
2168 (package
2169 (name "python-kitchen")
2170 (version "1.2.5")
2171 (source
2172 (origin
2173 (method url-fetch)
2174 (uri (pypi-uri "kitchen" version))
2175 (sha256
2176 (base32
2177 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2178 (build-system python-build-system)
2179 (propagated-inputs
2180 `(("python-chardet" ,python-chardet)))
2181 (home-page "https://github.com/fedora-infra/kitchen")
2182 (synopsis "Python API for snippets")
2183 (description "@code{kitchen} module provides a python API for all sorts of
2184 little useful snippets of code that everybody ends up writing for their projects
2185 but never seem big enough to build an independent release. Use kitchen and stop
2186 cutting and pasting that code over and over.")
2187 (license (list license:lgpl2.1+
2188 ;; subprocess.py, test_subprocess.py,
2189 ;; kitchen/pycompat25/defaultdict.py:
2190 license:psfl))))
2191
2192 (define-public python2-kitchen
2193 (package-with-python2 python-kitchen))
2194
2195 (define-public python-unidecode
2196 (package
2197 (name "python-unidecode")
2198 (version "1.1.1")
2199 (source (origin
2200 (method url-fetch)
2201 (uri (pypi-uri "Unidecode" version))
2202 (sha256
2203 (base32
2204 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
2205 (build-system python-build-system)
2206 (home-page "https://pypi.python.org/pypi/Unidecode")
2207 (synopsis "ASCII transliterations of Unicode text")
2208 (description
2209 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2210 useful when integrating with legacy code that doesn't support Unicode, or for
2211 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2212 machine identifiers from human-readable Unicode strings that should still be
2213 somewhat intelligible.")
2214 (license license:gpl2+)))
2215
2216 (define-public python2-unidecode
2217 (package-with-python2 python-unidecode))
2218
2219 (define-public python-pyjwt
2220 (package
2221 (name "python-pyjwt")
2222 (version "1.7.1")
2223 (source
2224 (origin
2225 (method url-fetch)
2226 (uri (pypi-uri "PyJWT" version))
2227 (sha256
2228 (base32
2229 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
2230 (modules '((guix build utils)))
2231 (snippet
2232 '(begin
2233 (for-each delete-file-recursively
2234 (find-files "." "\\.pyc$"))
2235 #t))))
2236 (build-system python-build-system)
2237 (native-inputs
2238 `(("python-pytest" ,python-pytest)
2239 ("python-pytest-cov" ,python-pytest-cov)
2240 ("python-pytest-runner" ,python-pytest-runner)))
2241 (home-page "https://github.com/progrium/pyjwt")
2242 (synopsis "JSON Web Token implementation in Python")
2243 (description
2244 "PyJWT is a JSON Web Token implementation written in Python.")
2245 (license license:expat)))
2246
2247 (define-public python2-pyjwt
2248 (package-with-python2 python-pyjwt))
2249
2250 (define-public python-pykka
2251 (package
2252 (name "python-pykka")
2253 (version "1.2.1")
2254 (source
2255 (origin
2256 (method url-fetch)
2257 (uri (pypi-uri "Pykka" version))
2258 (sha256
2259 (base32
2260 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2261 (build-system python-build-system)
2262 (native-inputs
2263 `(("python-mock" ,python-mock)
2264 ("python-nose" ,python-nose)
2265 ("python-gevent" ,python-gevent)
2266 ("python-eventlet" ,python-eventlet)))
2267 (home-page "https://www.pykka.org/")
2268 (synopsis "Pykka is a Python implementation of the actor model")
2269 (description
2270 "Pykka is a Python implementation of the actor model.
2271 The actor model introduces some simple rules to control the sharing
2272 of state and cooperation between execution units, which makes it
2273 easier to build concurrent applications.")
2274 (license license:asl2.0)))
2275
2276 (define-public python2-pykka
2277 (package-with-python2 python-pykka))
2278
2279 (define-public python-pymsgbox
2280 (package
2281 (name "python-pymsgbox")
2282 (version "1.0.6")
2283 (source
2284 (origin
2285 (method git-fetch)
2286 (uri (git-reference
2287 ;; LICENSE.txt is not present on pypi
2288 (url "https://github.com/asweigart/PyMsgBox")
2289 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2290 (file-name (git-file-name name version))
2291 (sha256
2292 (base32
2293 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2294 (arguments
2295 ;; Circular dependency to run tests:
2296 ;; Tests need pyautogui, which depends on pymsgbox.
2297 '(#:tests? #f))
2298 (build-system python-build-system)
2299 (home-page "https://github.com/asweigart/PyMsgBox")
2300 (synopsis "Python module for JavaScript-like message boxes")
2301 (description
2302 "PyMsgBox is a simple, cross-platform, pure Python module for
2303 JavaScript-like message boxes. Types of dialog boxes include:
2304 @enumerate
2305 @item alert
2306 @item confirm
2307 @item prompt
2308 @item password
2309 @end enumerate
2310 ")
2311 (license license:bsd-3)))
2312
2313 (define-public python-pympler
2314 (package
2315 (name "python-pympler")
2316 (home-page "https://pythonhosted.org/Pympler/")
2317 (version "0.7")
2318 (source (origin
2319 (method url-fetch)
2320 (uri (pypi-uri "Pympler" version))
2321 (sha256
2322 (base32
2323 "0ki7bqp1h9l1xc2k1h4vjyzsgs20i8ingvcdhszyi72s28wyf4bs"))))
2324 (build-system python-build-system)
2325 (arguments
2326 `(#:phases (modify-phases %standard-phases
2327 (delete 'check)
2328 (add-after 'install 'check
2329 (lambda* (#:key inputs outputs #:allow-other-keys)
2330 (add-installed-pythonpath inputs outputs)
2331 (invoke "python" "setup.py" "test"))))))
2332 (synopsis "Measure, monitor and analyze memory behavior")
2333 (description
2334 "Pympler is a development tool to measure, monitor and analyze
2335 the memory behavior of Python objects in a running Python application.
2336
2337 By pympling a Python application, detailed insight in the size and the
2338 lifetime of Python objects can be obtained. Undesirable or unexpected
2339 runtime behavior like memory bloat and other @samp{pymples} can easily
2340 be identified.
2341
2342 A web profiling frontend exposes process statistics, garbage
2343 visualisation and class tracker statistics.")
2344 (license license:asl2.0)))
2345
2346 (define-public python2-pympler
2347 (package-with-python2 python-pympler))
2348
2349 (define-public python-itsdangerous
2350 (package
2351 (name "python-itsdangerous")
2352 (version "1.1.0")
2353 (source
2354 (origin
2355 (method url-fetch)
2356 (uri (pypi-uri "itsdangerous" version))
2357 (sha256
2358 (base32
2359 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
2360 (build-system python-build-system)
2361 (home-page "https://palletsprojects.com/p/itsdangerous/")
2362 (synopsis "Python library for passing data to/from untrusted environments")
2363 (description
2364 "Itsdangerous provides various helpers to pass trusted data to untrusted
2365 environments and back.")
2366 (license license:bsd-3)))
2367
2368 (define-public python2-itsdangerous
2369 (package-with-python2 python-itsdangerous))
2370
2371 (define-public python-pyyaml
2372 (package
2373 (name "python-pyyaml")
2374 (version "3.13")
2375 (source
2376 (origin
2377 (method url-fetch)
2378 (uri (pypi-uri "PyYAML" version))
2379 (sha256
2380 (base32
2381 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2382 (build-system python-build-system)
2383 (inputs
2384 `(("libyaml" ,libyaml)))
2385 (home-page "http://pyyaml.org/wiki/PyYAML")
2386 (synopsis "YAML parser and emitter for Python")
2387 (description
2388 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2389 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2390 API, and sensible error messages. PyYAML supports standard YAML tags and
2391 provides Python-specific tags that allow to represent an arbitrary Python
2392 object.")
2393 (license license:expat)))
2394
2395 (define-public python2-pyyaml
2396 (package-with-python2 python-pyyaml))
2397
2398 (define-public python-vine
2399 (package
2400 (name "python-vine")
2401 (version "1.1.4")
2402 (source
2403 (origin
2404 (method url-fetch)
2405 (uri (pypi-uri "vine" version))
2406 (sha256
2407 (base32
2408 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2409 (build-system python-build-system)
2410 (native-inputs
2411 `(("python-pytest" ,python-pytest)
2412 ("python-case" ,python-case)))
2413 (home-page "https://github.com/celery/vine")
2414 (synopsis "Promises for Python")
2415 (description
2416 "@code{vine} provides a special implementation of promises in that it can
2417 be used both for \"promise of a value\" and lazy evaluation. The biggest
2418 upside for this is that everything in a promise can also be a promise,
2419 e.g. filters, callbacks and errbacks can all be promises.")
2420 (license license:bsd-3)))
2421
2422 (define-public python-virtualenv
2423 (package
2424 (name "python-virtualenv")
2425 (version "16.1.0")
2426 (source
2427 (origin
2428 (method url-fetch)
2429 (uri (pypi-uri "virtualenv" version))
2430 (sha256
2431 (base32
2432 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
2433 (build-system python-build-system)
2434 (arguments
2435 `(#:phases
2436 (modify-phases %standard-phases
2437 (add-before 'check 'disable-failing-test
2438 (lambda _
2439 ;; Disable failing test. See upstream bug report
2440 ;; https://github.com/pypa/virtualenv/issues/957
2441 (substitute* "tests/test_virtualenv.py"
2442 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2443 #t)))))
2444 (native-inputs
2445 `(("python-mock" ,python-mock)
2446 ("python-pytest" ,python-pytest)))
2447 (home-page "https://virtualenv.pypa.io/")
2448 (synopsis "Virtual Python environment builder")
2449 (description
2450 "Virtualenv is a tool to create isolated Python environments.")
2451 (license license:expat)))
2452
2453 (define-public python2-virtualenv
2454 (package-with-python2 python-virtualenv))
2455
2456 (define-public python-markupsafe
2457 (package
2458 (name "python-markupsafe")
2459 (version "1.1.1")
2460 (source
2461 (origin
2462 (method url-fetch)
2463 (uri (pypi-uri "MarkupSafe" version))
2464 (sha256
2465 (base32
2466 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
2467 (build-system python-build-system)
2468 (arguments
2469 `(#:modules ((ice-9 ftw)
2470 (srfi srfi-1)
2471 (srfi srfi-26)
2472 (guix build utils)
2473 (guix build python-build-system))
2474 #:phases (modify-phases %standard-phases
2475 (replace 'check
2476 (lambda _
2477 (let ((cwd (getcwd))
2478 (libdir (find (cut string-prefix? "lib." <>)
2479 (scandir "build"))))
2480 (setenv "PYTHONPATH"
2481 (string-append cwd "/build/" libdir ":"
2482 (getenv "PYTHONPATH")))
2483 (invoke "pytest" "-vv")))))))
2484 (native-inputs
2485 `(("python-pytest" ,python-pytest)))
2486 (home-page "https://github.com/mitsuhiko/markupsafe")
2487 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2488 (description
2489 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2490 for Python.")
2491 (license license:bsd-3)))
2492
2493 (define-public python2-markupsafe
2494 (package-with-python2 python-markupsafe))
2495
2496 (define-public python-jinja2
2497 (package
2498 (name "python-jinja2")
2499 (version "2.10.1")
2500 (source
2501 (origin
2502 (method url-fetch)
2503 (uri (pypi-uri "Jinja2" version))
2504 (sha256
2505 (base32
2506 "04shqrs56aj04ipyqykj512rw2l0zfammvj9krawzxz7xc14yp06"))))
2507 (build-system python-build-system)
2508 (propagated-inputs
2509 `(("python-markupsafe" ,python-markupsafe)))
2510 (home-page "http://jinja.pocoo.org/")
2511 (synopsis "Python template engine")
2512 (description
2513 "Jinja2 is a small but fast and easy to use stand-alone template engine
2514 written in pure Python.")
2515 (license license:bsd-3)))
2516
2517 (define-public python2-jinja2
2518 (package-with-python2 python-jinja2))
2519
2520 (define-public python-jinja2-time
2521 (package
2522 (name "python-jinja2-time")
2523 (version "0.2.0")
2524 (source
2525 (origin
2526 (method url-fetch)
2527 (uri (pypi-uri "jinja2-time" version))
2528 (sha256
2529 (base32
2530 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
2531 (build-system python-build-system)
2532 (propagated-inputs
2533 `(("python-arrow" ,python-arrow)
2534 ("python-jinja2" ,python-jinja2)))
2535 (home-page
2536 "https://github.com/hackebrot/jinja2-time")
2537 (synopsis "Jinja2 Extension for Dates and Times")
2538 (description
2539 "This package provides an extension for the template engine Jinja2. It
2540 adds a 'now' tag providing a convenient access to the arrow.now() API from
2541 templates. A format string can be provided to control the output.")
2542 (license license:expat)))
2543
2544 (define-public python-pystache
2545 (package
2546 (name "python-pystache")
2547 (version "0.5.4")
2548 (source (origin
2549 (method url-fetch)
2550 (uri (pypi-uri "pystache" version))
2551 (sha256
2552 (base32
2553 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2554 (build-system python-build-system)
2555 (arguments
2556 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2557 (home-page "http://defunkt.io/pystache/")
2558 (synopsis "Python logic-less template engine")
2559 (description
2560 "Pystache is a Python implementation of the framework agnostic,
2561 logic-free templating system Mustache.")
2562 (license license:expat)
2563 (properties `((python2-variant . ,(delay python2-pystache))))))
2564
2565 (define-public python2-pystache
2566 (package (inherit (package-with-python2
2567 (strip-python2-variant python-pystache)))
2568 (arguments
2569 `(#:python ,python-2
2570 #:phases
2571 (modify-phases %standard-phases
2572 (replace 'check
2573 (lambda _
2574 (invoke "python" "test_pystache.py"))))))))
2575
2576 (define-public python-joblib
2577 (package
2578 (name "python-joblib")
2579 (version "0.13.0")
2580 (source (origin
2581 (method url-fetch)
2582 (uri (pypi-uri "joblib" version))
2583 (sha256
2584 (base32
2585 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2586 (build-system python-build-system)
2587 (arguments
2588 `(#:phases
2589 (modify-phases %standard-phases
2590 (replace 'check
2591 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2592 (native-inputs
2593 `(("python-pytest" ,python-pytest)))
2594 (home-page "https://joblib.readthedocs.io/")
2595 (synopsis "Using Python functions as pipeline jobs")
2596 (description
2597 "Joblib is a set of tools to provide lightweight pipelining in Python.
2598 In particular, joblib offers: transparent disk-caching of the output values
2599 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2600 logging and tracing of the execution.")
2601 (license license:bsd-3)))
2602
2603 (define-public python2-joblib
2604 (package-with-python2 python-joblib))
2605
2606 (define-public python-daemon
2607 (package
2608 (name "python-daemon")
2609 (version "2.2.3")
2610 (source
2611 (origin
2612 (method url-fetch)
2613 (uri (pypi-uri "python-daemon" version))
2614 (sha256
2615 (base32
2616 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2617 (build-system python-build-system)
2618 (arguments
2619 `(#:phases
2620 (modify-phases %standard-phases
2621 (add-before 'check 'disable-tests
2622 (lambda _
2623 ;; FIXME: Determine why test fails
2624 (substitute* "test/test_daemon.py"
2625 (("test_detaches_process_context")
2626 "skip_test_detaches_process_context"))
2627 #t)))))
2628 (propagated-inputs
2629 `(("python-lockfile" ,python-lockfile)))
2630 (native-inputs
2631 `(("python-unittest2" ,python-unittest2)
2632 ("python-testtools" ,python-testtools)
2633 ("python-testscenarios" ,python-testscenarios)
2634 ("python-mock" ,python-mock)
2635 ("python-docutils" ,python-docutils)))
2636 (home-page "https://pagure.io/python-daemon/")
2637 (synopsis "Python library for making a Unix daemon process")
2638 (description "Python-daemon is a library that assists a Python program to
2639 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2640
2641 This library provides a @code{DaemonContext} class that manages the following
2642 important tasks for becoming a daemon process:
2643 @enumerate
2644 @item Detach the process into its own process group.
2645 @item Set process environment appropriate for running inside a chroot.
2646 @item Renounce suid and sgid privileges.
2647 @item Close all open file descriptors.
2648 @item Change the working directory, uid, gid, and umask.
2649 @item Set appropriate signal handlers.
2650 @item Open new file descriptors for stdin, stdout, and stderr.
2651 @item Manage a specified PID lock file.
2652 @item Register cleanup functions for at-exit processing.
2653 @end enumerate")
2654 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2655 (license (list license:asl2.0 license:gpl3+))))
2656
2657 (define-public python-docutils
2658 (package
2659 (name "python-docutils")
2660 (version "0.14")
2661 (source
2662 (origin
2663 (method url-fetch)
2664 (uri (pypi-uri "docutils" version))
2665 (sha256
2666 (base32
2667 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2668 (build-system python-build-system)
2669 (arguments
2670 '(#:tests? #f)) ; no setup.py test command
2671 (home-page "http://docutils.sourceforge.net/")
2672 (synopsis "Python Documentation Utilities")
2673 (description
2674 "Docutils is a modular system for processing documentation into useful
2675 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2676 reStructuredText.")
2677 ;; Most of the source code is public domain, but some source files are
2678 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2679 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2680
2681 (define-public python2-docutils
2682 (package-with-python2 python-docutils))
2683
2684 (define-public python-pygments
2685 (package
2686 (name "python-pygments")
2687 (version "2.4.2")
2688 (source
2689 (origin
2690 (method url-fetch)
2691 (uri (pypi-uri "Pygments" version))
2692 (sha256
2693 (base32
2694 "15v2sqm5g12bqa0c7wikfh9ck2nl97ayizy1hpqhmws5gqalq748"))))
2695 (build-system python-build-system)
2696 (arguments
2697 ;; FIXME: Tests require sphinx, which depends on this.
2698 '(#:tests? #f))
2699 (home-page "http://pygments.org/")
2700 (synopsis "Syntax highlighting")
2701 (description
2702 "Pygments is a syntax highlighting package written in Python.")
2703 (license license:bsd-2)))
2704
2705 (define-public python2-pygments
2706 (package-with-python2 python-pygments))
2707
2708 (define-public python-bumpversion
2709 (package
2710 (name "python-bumpversion")
2711 (version "0.5.3")
2712 (source
2713 (origin
2714 (method url-fetch)
2715 (uri (pypi-uri "bumpversion" version))
2716 (sha256
2717 (base32
2718 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
2719 (build-system python-build-system)
2720 (home-page "https://github.com/peritus/bumpversion")
2721 (synopsis "Tool to bump software version")
2722 (description "This tool provides a command-line interface (CLI) to bump a
2723 software version simply.")
2724 (license license:expat)))
2725
2726 (define-public python-deprecated
2727 (package
2728 (name "python-deprecated")
2729 (version "1.2.5")
2730 (source
2731 (origin
2732 (method git-fetch)
2733 (uri (git-reference
2734 (url "https://github.com/tantale/deprecated.git")
2735 (commit (string-append "v" version))))
2736 (file-name (git-file-name name version))
2737 (sha256
2738 (base32
2739 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
2740 (build-system python-build-system)
2741 (arguments
2742 `(#:phases (modify-phases %standard-phases
2743 (replace 'check
2744 (lambda _
2745 (invoke "pytest"))))))
2746 (propagated-inputs
2747 `(("python-wrapt" ,python-wrapt)))
2748 (native-inputs
2749 `(("python-bumpversion" ,python-bumpversion)
2750 ("python-pytest" ,python-pytest)
2751 ("python-pytest-cov" ,python-pytest-cov)
2752 ("python-sphinx" ,python-sphinx)
2753 ("python-tox" ,python-tox)))
2754 (home-page "https://github.com/tantale/deprecated")
2755 (synopsis "Python decorator to deprecate classes, functions or methods")
2756 (description "The @code{deprecated} decorator provides a convenient way to deprecate
2757 to deprecate classes, functions or methods.")
2758 (license license:expat)))
2759
2760 (define-public python-pygithub
2761 (package
2762 (name "python-pygithub")
2763 (version "1.43.8")
2764 (source
2765 ;; We fetch from the Git repo because there are no tests in the PyPI
2766 ;; archive.
2767 (origin
2768 (method git-fetch)
2769 (uri (git-reference
2770 (url "https://github.com/PyGithub/PyGithub.git")
2771 (commit (string-append "v" version))))
2772 (file-name (git-file-name name version))
2773 (sha256
2774 (base32 "1625v558xga5mwhl9jqmibywy5qafmg1vqrirqz6zfq1la1d22mw"))))
2775 (build-system python-build-system)
2776 (arguments
2777 `(#:phases (modify-phases %standard-phases
2778 ;; Some tests rely on the network.
2779 (add-after 'unpack 'disable-failing-tests
2780 (lambda _
2781 (substitute* "tests/Issue142.py"
2782 (("testDecodeJson") "disabled_testDecodeJson"))
2783 #t))
2784 (add-before 'check 'prepare-for-tests
2785 (lambda _
2786 (for-each (lambda (f)
2787 (chmod f #o666))
2788 (find-files "./tests"))
2789 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
2790 (setenv "PYTHONPATH"
2791 (string-append "./tests:" (getenv "PYTHONPATH")))
2792 #t)))))
2793 (propagated-inputs
2794 `(("python-deprecated" ,python-deprecated)
2795 ("python-pyjwt" ,python-pyjwt)
2796 ("python-requests" ,python-requests)))
2797 (native-inputs `(("python-httpretty" ,python-httpretty)))
2798 (home-page "https://pygithub.readthedocs.io/en/latest/")
2799 (synopsis "Python library for the GitHub API")
2800 (description "This library allows managing GitHub resources such as
2801 repositories, user profiles, and organizations in your Python applications,
2802 using version 3 of the GitHub application programming interface (API).")
2803 (license license:lgpl3+)))
2804
2805 (define-public python-rellu
2806 (package
2807 (name "python-rellu")
2808 (version "0.7")
2809 (source
2810 (origin
2811 (method url-fetch)
2812 (uri (pypi-uri "rellu" version))
2813 (sha256
2814 (base32
2815 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
2816 (build-system python-build-system)
2817 (propagated-inputs
2818 `(("python-invoke" ,python-invoke)
2819 ("python-pygithub" ,python-pygithub)))
2820 (home-page "https://github.com/robotframework/rellu")
2821 (synopsis "Utilities to create PyPI releases")
2822 (description "This collection of utilities contains tooling and templates
2823 to assist in creating releases on GitHub and publishing them on PyPI. It is
2824 designed to be used by Robot Framework and tools and libraries in its
2825 ecosystem, but can naturally be used also by other projects.")
2826 (license license:asl2.0)))
2827
2828 (define-public python-robotframework
2829 (package
2830 (name "python-robotframework")
2831 (version "3.1.2")
2832 ;; There are no tests in the PyPI archive.
2833 (source
2834 (origin
2835 (method git-fetch)
2836 (uri (git-reference
2837 (url "https://github.com/robotframework/robotframework.git")
2838 (commit (string-append "v" version))))
2839 (file-name (git-file-name name version))
2840 (sha256
2841 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
2842 (patches (search-patches
2843 "python-robotframework-honor-source-date-epoch.patch"))))
2844 (build-system python-build-system)
2845 (arguments
2846 `(#:phases (modify-phases %standard-phases
2847 (add-before 'build 'build-and-install-doc
2848 (lambda* (#:key outputs #:allow-other-keys)
2849 (let* ((doc-output (assoc-ref outputs "doc"))
2850 (doc (string-append doc-output "/share/"
2851 ,name "-" ,version "/")))
2852 (invoke "invoke" "library-docs" "all")
2853 (mkdir-p doc)
2854 (copy-recursively "doc/libraries"
2855 (string-append doc "/libraries"))
2856 #t)))
2857 (replace 'check
2858 (lambda _
2859 (invoke "python" "utest/run.py"))))))
2860 (native-inputs
2861 `(("python-invoke" ,python-invoke)
2862 ("python-rellu" ,python-rellu)
2863 ("python:tk" ,python "tk"))) ;used when building the HTML doc
2864 (outputs '("out" "doc"))
2865 (home-page "https://robotframework.org")
2866 (synopsis "Generic automation framework")
2867 (description "Robot Framework is a generic automation framework for
2868 acceptance testing, acceptance test driven development (ATDD), and robotic
2869 process automation (RPA).")
2870 (license license:asl2.0)))
2871
2872 (define-public python-robotframework-lint
2873 ;; There is no properly tagged release; the commit below seems to correspond
2874 ;; to the 0.9 stable release available from PyPI. The tests are not
2875 ;; included in the PyPI archive, so we fetch the sources from the upstream
2876 ;; Git repo.
2877 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
2878 (revision "1"))
2879 (package
2880 (name "python-robotframework-lint")
2881 (version (git-version "0.9.0" revision commit))
2882 (source
2883 (origin
2884 (method git-fetch)
2885 (uri (git-reference
2886 (url "https://github.com/boakley/robotframework-lint.git")
2887 (commit commit)))
2888 (file-name (git-file-name name version))
2889 (sha256
2890 (base32
2891 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
2892 (build-system python-build-system)
2893 (arguments
2894 `(#:phases
2895 (modify-phases %standard-phases
2896 (replace 'check
2897 (lambda _
2898 (invoke "python" "-m" "robot" "-A"
2899 "tests/conf/default.args" "tests"))))))
2900 (propagated-inputs
2901 `(("python-robotframework" ,python-robotframework)))
2902 (home-page "https://github.com/boakley/robotframework-lint/")
2903 (synopsis "Static analysis tool (linter) for Robot Framework")
2904 (description "This package provides the @code{rflint} command-line
2905 utility, a static analysis tool (linter) for Robot Framework source files.")
2906 (license license:asl2.0))))
2907
2908 (define-public python-robotframework-sshlibrary
2909 (package
2910 (name "python-robotframework-sshlibrary")
2911 (version "3.3.0")
2912 ;; There are no tests in the PyPI archive.
2913 (source
2914 (origin
2915 (method git-fetch)
2916 (uri (git-reference
2917 (url "https://github.com/robotframework/SSHLibrary.git")
2918 (commit (string-append "v" version))))
2919 (file-name (git-file-name name version))
2920 (sha256
2921 (base32
2922 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
2923 (build-system python-build-system)
2924 (arguments
2925 `(#:phases
2926 (modify-phases %standard-phases
2927 (add-before 'build 'build-and-install-doc
2928 (lambda* (#:key outputs #:allow-other-keys)
2929 (let* ((doc-output (assoc-ref outputs "doc"))
2930 (doc (string-append doc-output "/share/"
2931 ,name "-" ,version "/")))
2932 (invoke "chmod" "-R" "+w" "docs")
2933 (invoke "invoke" "kw-docs" "project-docs")
2934 (mkdir-p doc)
2935 (for-each delete-file (find-files "docs" "\\.rst"))
2936 (copy-recursively "docs" doc)
2937 #t)))
2938 (replace 'check
2939 (lambda _
2940 ;; Some tests require an SSH server; we remove them.
2941 (delete-file "utest/test_client_api.py")
2942 (delete-file "utest/test_scp.py")
2943 (invoke "python" "utest/run.py"))))))
2944 (propagated-inputs
2945 `(("python-robotframework" ,python-robotframework)
2946 ("python-paramiko" ,python-paramiko)
2947 ("python-scp" ,python-scp)))
2948 (native-inputs
2949 `(("openssh" ,openssh)
2950 ("which" ,which)
2951 ;; To generate the documentation
2952 ("python-docutils" ,python-docutils)
2953 ("python-invoke" ,python-invoke)
2954 ("python-pygments" ,python-pygments)
2955 ("python-rellu" ,python-rellu)))
2956 (outputs '("out" "doc"))
2957 (home-page "https://github.com/robotframework/SSHLibrary")
2958 (synopsis "Robot Framework library for SSH and SFTP")
2959 (description "SSHLibrary is a Robot Framework library providing support
2960 for SSH and SFTP. It has the following main usages:
2961 @itemize @bullet
2962 @item Executing commands on the remote machine, either blocking or non-blocking.
2963 @item Writing and reading in an interactive shell.
2964 @item Transferring files and directories over SFTP.
2965 @item Ensuring that files and directories exist on the remote machine.
2966 @end itemize")
2967 (license license:asl2.0)))
2968
2969 (define-public python-scp
2970 (package
2971 (name "python-scp")
2972 (version "0.13.2")
2973 (source
2974 (origin
2975 (method url-fetch)
2976 (uri (pypi-uri "scp" version))
2977 (sha256
2978 (base32
2979 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
2980 (build-system python-build-system)
2981 (arguments
2982 '(#:tests? #f)) ;tests require an SSH server
2983 (propagated-inputs
2984 `(("python-paramiko" ,python-paramiko)))
2985 (home-page "https://github.com/jbardin/scp.py")
2986 (synopsis "SCP protocol module for Python and Paramiko")
2987 (description "The scp module extends the Paramiko library to send and
2988 receive files via the SCP1 protocol, as implemented by the OpenSSH
2989 @command{scp} program.")
2990 (license license:gpl2+)))
2991
2992 (define-public python-rst.linker
2993 (package
2994 (name "python-rst.linker")
2995 (version "1.10")
2996 (source
2997 (origin
2998 (method url-fetch)
2999 (uri (pypi-uri "rst.linker" version))
3000 (sha256
3001 (base32
3002 "0iqaacp7pj1s8avs4kc0qg0r7dscywaq37y6l9j14glqdikk0wdj"))))
3003 (build-system python-build-system)
3004 (propagated-inputs
3005 `(("python-dateutil" ,python-dateutil)
3006 ("python-six" ,python-six)))
3007 (native-inputs
3008 `(("python-setuptools-scm" ,python-setuptools-scm)))
3009 ;; Test would require path.py, which would introduce a cyclic dependence.
3010 (arguments `(#:tests? #f))
3011 ;; Note: As of version 1.7 the documentation is not worth building.
3012 (home-page "https://github.com/jaraco/rst.linker")
3013 (synopsis "Sphinx plugin to add links and timestamps")
3014 (description "rst.linker allows to automatically replace text by a
3015 reStructuredText external reference or timestamps. It's primary purpose is to
3016 augment the changelog, but it can be used for other documents, too.")
3017 (license license:expat)))
3018
3019 (define-public python2-rst.linker
3020 (package-with-python2 python-rst.linker))
3021
3022 (define-public python-feedgenerator
3023 (package
3024 (name "python-feedgenerator")
3025 (version "1.9")
3026 (source
3027 (origin
3028 (method url-fetch)
3029 (uri (pypi-uri "feedgenerator" version))
3030 (sha256
3031 (base32
3032 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
3033 (modules '((guix build utils)))
3034 (snippet
3035 '(begin
3036 ;; Remove pre-compiled .pyc files from source.
3037 (for-each delete-file-recursively
3038 (find-files "." "__pycache__" #:directories? #t))
3039 (for-each delete-file (find-files "." "\\.pyc$"))
3040 #t))))
3041 (build-system python-build-system)
3042 (propagated-inputs
3043 `(("python-pytz" ,python-pytz)
3044 ("python-six" ,python-six)))
3045 (home-page "https://github.com/getpelican/feedgenerator")
3046 (synopsis
3047 "Standalone version of Django's Atom/RSS feed generator")
3048 (description
3049 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3050 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3051 (license license:bsd-3)))
3052
3053 (define-public python2-feedgenerator
3054 (package-with-python2 python-feedgenerator))
3055
3056 (define-public python-toml
3057 (package
3058 (name "python-toml")
3059 (version "0.9.4")
3060 (source
3061 (origin
3062 (method url-fetch)
3063 (uri (pypi-uri "toml" version))
3064 (sha256
3065 (base32
3066 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
3067 (build-system python-build-system)
3068 (arguments
3069 `(#:tests? #f)) ;no tests suite in release
3070 (home-page "https://github.com/uiri/toml")
3071 (synopsis "Library for TOML")
3072 (description
3073 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
3074 Language (TOML) configuration files.")
3075 (license license:expat)))
3076
3077 (define-public python-jsonrpc-server
3078 (package
3079 (name "python-jsonrpc-server")
3080 (version "0.1.2")
3081 (source
3082 (origin
3083 (method url-fetch)
3084 (uri (pypi-uri "python-jsonrpc-server" version))
3085 (sha256
3086 (base32
3087 "0m4ykpcdy52x37n1ikysp07j7p8ialcdvvvsrjp3545sn7iiid09"))))
3088 (build-system python-build-system)
3089 (propagated-inputs
3090 `(("python-future" ,python-future)
3091 ("python-mock" ,python-mock)
3092 ("python-pytest" ,python-pytest)))
3093 (home-page
3094 "https://github.com/palantir/python-jsonrpc-server")
3095 (synopsis "JSON RPC 2.0 server library")
3096 (description
3097 "This package provides a JSON RPC 2.0 server library for Python.")
3098 (license license:expat)))
3099
3100 (define-public python-pydocstyle
3101 (package
3102 (name "python-pydocstyle")
3103 (version "3.0.0")
3104 (source
3105 (origin
3106 (method url-fetch)
3107 (uri (pypi-uri "pydocstyle" version))
3108 (sha256
3109 (base32
3110 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
3111 (build-system python-build-system)
3112 (propagated-inputs
3113 `(("python-six" ,python-six)
3114 ("python-snowballstemmer" ,python-snowballstemmer)))
3115 (home-page
3116 "https://github.com/PyCQA/pydocstyle/")
3117 (synopsis "Python docstring style checker")
3118 (description
3119 "This package provides a style checker for the Python Language
3120 Server (PLS).")
3121 (license license:expat)))
3122
3123 (define-public python-language-server
3124 (package
3125 (name "python-language-server")
3126 (version "0.29.1")
3127 (source
3128 (origin
3129 (method url-fetch)
3130 (uri (pypi-uri "python-language-server" version))
3131 (sha256
3132 (base32
3133 "1f8qlflh6j3s7qfmzhirpl8fgidl6f0qbakdmiml96wdxzvka0s3"))))
3134 (build-system python-build-system)
3135 (propagated-inputs
3136 `(("python-pluggy" ,python-pluggy)
3137 ("python-jsonrpc-server" ,python-jsonrpc-server)
3138 ("python-jedi" ,python-jedi)
3139 ("python-yapf" ,python-yapf)
3140 ("python-pyflakes" ,python-pyflakes)
3141 ("python-pydocstyle" ,python-pydocstyle)
3142 ("python-pycodestyle" ,python-pycodestyle)
3143 ("python-mccabe" ,python-mccabe)
3144 ("python-rope" ,python-rope)
3145 ("python-autopep8" ,python-autopep8)
3146 ("python-flake8" ,python-flake8)
3147 ("python-pylint" ,python-pylint)))
3148 (home-page "https://github.com/palantir/python-language-server")
3149 (synopsis "Python implementation of the Language Server Protocol")
3150 (description
3151 "The Python Language Server (pyls) is an implementation of the Python 3
3152 language specification for the Language Server Protocol (LSP). This tool is
3153 used in text editing environments to provide a complete and integrated
3154 feature-set for programming Python effectively.")
3155 (license license:expat)))
3156
3157 (define-public python-black
3158 (package
3159 (name "python-black")
3160 (version "18.6b4")
3161 (source
3162 (origin
3163 (method url-fetch)
3164 (uri (pypi-uri "black" version))
3165 (sha256
3166 (base32
3167 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
3168 (build-system python-build-system)
3169 (arguments
3170 `(#:phases
3171 (modify-phases %standard-phases
3172 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3173 (lambda _
3174 (let ((python3 (which "python3")))
3175 (substitute* '("tests/data/fmtonoff.py"
3176 "tests/data/string_prefixes.py"
3177 "tests/data/function.py")
3178 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3179 (string-append "#!" python3 (if (string? minor-version)
3180 minor-version
3181 ""))))))))))
3182 (propagated-inputs
3183 `(("python-click" ,python-click)
3184 ("python-attrs" ,python-attrs)
3185 ("python-appdirs" ,python-appdirs)
3186 ("python-toml" ,python-toml)))
3187 (home-page "https://github.com/ambv/black")
3188 (synopsis "The uncompromising code formatter")
3189 (description "Black is the uncompromising Python code formatter.")
3190 (license license:expat)))
3191
3192 (define-public python-blinker
3193 (package
3194 (name "python-blinker")
3195 (version "1.4")
3196 (source
3197 (origin
3198 (method url-fetch)
3199 (uri (pypi-uri "blinker" version))
3200 (sha256
3201 (base32
3202 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3203 (build-system python-build-system)
3204 (home-page "http://pythonhosted.org/blinker/")
3205 (synopsis "Fast, simple object-to-object and broadcast signaling")
3206 (description
3207 "Blinker provides a fast dispatching system that allows any number of
3208 interested parties to subscribe to events, or \"signals\".")
3209 (license license:expat)))
3210
3211 (define-public python2-blinker
3212 (package-with-python2 python-blinker))
3213
3214 (define-public pelican
3215 (package
3216 (name "pelican")
3217 (version "4.0.1")
3218 (source
3219 (origin
3220 (method url-fetch)
3221 (uri (pypi-uri "pelican" version))
3222 (sha256
3223 (base32
3224 "05yda7n6r0ll18fpdjzkzyr0ls8hbb86fnjyb33k9jvv5avah2lr"))))
3225 (build-system python-build-system)
3226 (propagated-inputs
3227 `(("python-feedgenerator" ,python-feedgenerator)
3228 ("python-jinja2" ,python-jinja2)
3229 ("python-pygments" ,python-pygments)
3230 ("python-docutils" ,python-docutils)
3231 ("python-pytz" ,python-pytz)
3232 ("python-blinker" ,python-blinker)
3233 ("python-unidecode" ,python-unidecode)
3234 ("python-six" ,python-six)
3235 ("python-dateutil" ,python-dateutil)
3236 ("python-markdown" ,python-markdown)))
3237 (home-page "https://getpelican.com/")
3238 (arguments
3239 `(;; XXX Requires a lot more packages to do unit tests :P
3240 #:tests? #f
3241 #:phases (modify-phases %standard-phases
3242 (add-before
3243 'install 'adjust-requires
3244 ;; Since feedgenerator is installed from git, it doesn't
3245 ;; conform to the version requirements.
3246 ;;
3247 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3248 ;; version requirement so setuptools doesn't get confused.
3249 (lambda _
3250 (substitute* "setup.py"
3251 (("['\"]feedgenerator.*?['\"]")
3252 "'feedgenerator'")))))))
3253 (synopsis "Python-based static site publishing system")
3254 (description
3255 "Pelican is a tool to generate a static blog from reStructuredText,
3256 Markdown input files, and more. Pelican uses Jinja2 for templating
3257 and is very extensible.")
3258 (license license:agpl3+)))
3259
3260 (define-public mallard-ducktype
3261 (package
3262 (name "mallard-ducktype")
3263 (version "1.0.2")
3264 (source
3265 (origin
3266 (method git-fetch)
3267 ;; git-reference because tests are not included in pypi source tarball
3268 ;; https://issues.guix.gnu.org/issue/36755#2
3269 (uri (git-reference
3270 (url "https://github.com/projectmallard/mallard-ducktype.git")
3271 (commit version)))
3272 (file-name (git-file-name name version))
3273 (sha256
3274 (base32
3275 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
3276 (build-system python-build-system)
3277 (arguments
3278 '(#:phases
3279 (modify-phases %standard-phases
3280 (replace 'check
3281 (lambda _
3282 (with-directory-excursion "tests"
3283 (invoke "sh" "runtests")))))))
3284 (home-page "http://projectmallard.org")
3285 (synopsis "Convert Ducktype to Mallard documentation markup")
3286 (description
3287 "Ducktype is a lightweight syntax that can represent all the semantics
3288 of the Mallard XML documentation system. Ducktype files can be converted to
3289 Mallard using the @command{ducktype} tool. The yelp-tools package
3290 provides additional functionality on the produced Mallard documents.")
3291 (license license:expat)))
3292
3293 (define-public python-scikit-image
3294 (package
3295 (name "python-scikit-image")
3296 (version "0.14.2")
3297 (source
3298 (origin
3299 (method url-fetch)
3300 (uri (pypi-uri "scikit-image" version))
3301 (sha256
3302 (base32 "07qchljkyxvg5nrm12fvszi7pmjk4m01qp0w0z8syxzxxs20pz8s"))))
3303 (build-system python-build-system)
3304 (arguments
3305 ;; TODO: Some tests require running X11 server. Disable them?
3306 '(#:tests? #f))
3307 ;; See DEPENDS.txt for the list of build and run time requiremnts
3308 (propagated-inputs
3309 `(("python-cloudpickle" ,python-cloudpickle)
3310 ("python-dask" ,python-dask)
3311 ("python-matplotlib" ,python-matplotlib)
3312 ("python-networkx" ,python-networkx)
3313 ("python-numpy" ,python-numpy)
3314 ("python-pillow" ,python-pillow)
3315 ("python-pywavelets" ,python-pywavelets)
3316 ("python-scipy" ,python-scipy)
3317 ("python-six" ,python-six)))
3318 (native-inputs
3319 `(("python-cython" ,python-cython)))
3320 (home-page "http://scikit-image.org/")
3321 (synopsis "Image processing in Python")
3322 (description
3323 "Scikit-image is a collection of algorithms for image processing.")
3324 (license license:bsd-3)))
3325
3326 (define-public python2-scikit-image
3327 (package-with-python2 python-scikit-image))
3328
3329 (define-public python-cython
3330 (package
3331 (name "python-cython")
3332 (version "0.29.13")
3333 (source
3334 (origin
3335 (method url-fetch)
3336 (uri (pypi-uri "Cython" version))
3337 (sha256
3338 (base32
3339 "13k37lrcgagwwnzr5bzririsscb793vndj234d475x1h9ad0d7f2"))))
3340 (build-system python-build-system)
3341 ;; we need the full python package and not just the python-wrapper
3342 ;; because we need libpython3.3m.so
3343 (inputs
3344 `(("python" ,python)))
3345 (arguments
3346 `(#:phases
3347 (modify-phases %standard-phases
3348 (add-before 'check 'set-HOME
3349 ;; some tests require access to "$HOME/.cython"
3350 (lambda _ (setenv "HOME" "/tmp") #t))
3351
3352 ;; FIXME: These tests started failing on armhf after the 0.28 update
3353 ;; (commit c69d11c5930), both with an error such as this:
3354 ;; compiling (cpp) and running dictcomp ...
3355 ;; === C/C++ compiler error output: ===
3356 ;; ‘
3357 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
3358 ;; See <https://hydra.gnu.org/build/2948724> for logs.
3359 ,@(if (target-arm32?)
3360 `((add-before 'check 'disable-failing-tests
3361 (lambda _
3362 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
3363 (for-each (lambda (test)
3364 (format disabled-tests "~a\n" test))
3365 '("memslice" "dictcomp"))
3366 (close-port disabled-tests)))))
3367 '())
3368
3369 (replace 'check
3370 (lambda _
3371 ;; Disable compiler optimizations to greatly reduce the running
3372 ;; time of the test suite.
3373 (setenv "CFLAGS" "-O0")
3374
3375 (invoke "python" "runtests.py" "-vv"
3376 "-j" (number->string (parallel-job-count))))))))
3377 (home-page "https://cython.org/")
3378 (synopsis "C extensions for Python")
3379 (description "Cython is an optimising static compiler for both the Python
3380 programming language and the extended Cython programming language. It makes
3381 writing C extensions for Python as easy as Python itself.")
3382 (license license:asl2.0)
3383 (properties `((python2-variant . ,(delay python2-cython))))))
3384
3385 (define-public python2-cython
3386 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
3387 (package
3388 (inherit base)
3389 (name "python2-cython")
3390 (inputs
3391 `(("python-2" ,python-2))) ;this is not automatically changed
3392 (arguments
3393 (substitute-keyword-arguments (package-arguments base)
3394 ((#:phases phases)
3395 `(modify-phases ,phases
3396 (add-before 'check 'adjust-test_embed
3397 (lambda _
3398 (substitute* "runtests.py"
3399 ;; test_embed goes great lengths to find the static libpythonX.Y.a
3400 ;; so it can give the right -L flag to GCC when embedding static
3401 ;; builds of Python. It is unaware that the Python "config"
3402 ;; directory (where the static library lives) was renamed in
3403 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
3404 ;; which works fine, because that is where the shared library is.
3405 ;;
3406 ;; It also appears to be unaware that the Makefile in Demos/embed
3407 ;; already unconditionally pass the static library location to GCC,
3408 ;; after checking sysconfig.get_config_var('LIBPL).
3409 ;;
3410 ;; The effect is that the linker is unable to resolve libexpat
3411 ;; symbols when building for Python 2, because neither the Python 2
3412 ;; shared library nor Expat is available. To fix it, we can either
3413 ;; add Expat as an input and make it visible to the linker, or just
3414 ;; prevent it from overriding the Python shared library location.
3415 ;; The end result is identical, so we take the easy route.
3416 ((" or libname not in os\\.listdir\\(libdir\\)")
3417 ""))
3418 #t)))))))))
3419
3420 ;; The RPython toolchain currently does not support Python 3.
3421 (define-public python2-rpython
3422 (package
3423 (name "python2-rpython")
3424 (version "0.2.1")
3425 (source
3426 (origin
3427 (method url-fetch)
3428 (uri (pypi-uri "rpython" version))
3429 (sha256
3430 (base32
3431 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3432 (build-system python-build-system)
3433 (arguments `(#:python ,python-2))
3434 (native-inputs
3435 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3436 (home-page "https://rpython.readthedocs.org")
3437 (synopsis "Framework for implementing interpreters and virtual machines")
3438 (description "RPython is a translation and support framework for
3439 producing implementations of dynamic languages, emphasizing a clean separation
3440 between language specification and implementation aspects.")
3441 (license license:expat)))
3442
3443 ;; NOTE: when upgrading numpy please make sure that python-pandas and
3444 ;; python-scipy still build, as these three packages are often used together.
3445 (define-public python-numpy
3446 (package
3447 (name "python-numpy")
3448 (version "1.15.4")
3449 (source
3450 (origin
3451 (method url-fetch)
3452 (uri (string-append
3453 "https://github.com/numpy/numpy/releases/download/v"
3454 version "/numpy-" version ".tar.gz"))
3455 (sha256
3456 (base32
3457 "102vcl2qq4pjbm7a3d67vkkvn4466ngia1d8wi5avqwqh8j0jvkn"))))
3458 (build-system python-build-system)
3459 (inputs
3460 `(("openblas" ,openblas)
3461 ("lapack" ,lapack)))
3462 (native-inputs
3463 `(("python-cython" ,python-cython)
3464 ("python-pytest" ,python-pytest)
3465 ("gfortran" ,gfortran)))
3466 (arguments
3467 `(#:phases
3468 (modify-phases %standard-phases
3469 (add-before 'build 'configure-blas-lapack
3470 (lambda* (#:key inputs #:allow-other-keys)
3471 (call-with-output-file "site.cfg"
3472 (lambda (port)
3473 (format port
3474 "[openblas]
3475 libraries = openblas
3476 library_dirs = ~a/lib
3477 include_dirs = ~a/include
3478
3479 # backslash-n to make emacs happy
3480 \n[lapack]
3481 lapack_libs = lapack
3482 library_dirs = ~a/lib
3483 include_dirs = ~a/include
3484 "
3485 (assoc-ref inputs "openblas")
3486 (assoc-ref inputs "openblas")
3487 (assoc-ref inputs "lapack")
3488 (assoc-ref inputs "lapack"))))
3489 #t))
3490 (add-before 'build 'fix-executable-paths
3491 (lambda* (#:key inputs #:allow-other-keys)
3492 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3493 ;; instead of /bin/sh.
3494 (substitute* "numpy/distutils/exec_command.py"
3495 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3496 (string-append match-start (assoc-ref inputs "bash") match-end)))
3497 ;; Use "gcc" executable, not "cc".
3498 (substitute* "numpy/distutils/system_info.py"
3499 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3500 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3501 #t))
3502 ;; Tests can only be run after the library has been installed and not
3503 ;; within the source directory.
3504 (delete 'check)
3505 (add-after 'install 'check
3506 (lambda* (#:key outputs inputs #:allow-other-keys)
3507 ;; Make installed package available for running the tests
3508 (add-installed-pythonpath inputs outputs)
3509 ;; Make sure "f2py" etc is found.
3510 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3511 ":" (getenv "PATH")))
3512 (with-directory-excursion "/tmp"
3513 (invoke "python" "-c"
3514 "import numpy; numpy.test(verbose=2)")))))))
3515 (home-page "http://www.numpy.org/")
3516 (synopsis "Fundamental package for scientific computing with Python")
3517 (description "NumPy is the fundamental package for scientific computing
3518 with Python. It contains among other things: a powerful N-dimensional array
3519 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3520 and Fortran code, useful linear algebra, Fourier transform, and random number
3521 capabilities.")
3522 (license license:bsd-3)))
3523
3524 (define-public python2-numpy
3525 (package-with-python2 python-numpy))
3526
3527 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3528 ;; interest only for legacy code going back to NumPy's predecessor
3529 ;; Numeric.
3530 (define-public python2-numpy-1.8
3531 (package (inherit python2-numpy)
3532 (version "1.8.2")
3533 (source
3534 (origin
3535 (method url-fetch)
3536 (uri (string-append
3537 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3538 (file-name (string-append "python2-numpy-" version ".tar.gz"))
3539 (sha256
3540 (base32
3541 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
3542 (arguments
3543 (substitute-keyword-arguments (package-arguments python2-numpy)
3544 ((#:phases phases)
3545 `(modify-phases ,phases
3546 (replace 'configure-blas-lapack
3547 (lambda* (#:key inputs #:allow-other-keys)
3548 (call-with-output-file "site.cfg"
3549 (lambda (port)
3550 (format port
3551 "[openblas]
3552 libraries = openblas,lapack
3553 library_dirs = ~a/lib:~a/lib
3554 include_dirs = ~a/include:~a/include
3555 "
3556 (assoc-ref inputs "openblas")
3557 (assoc-ref inputs "lapack")
3558 (assoc-ref inputs "openblas")
3559 (assoc-ref inputs "lapack"))))
3560 #t))))))
3561 (native-inputs
3562 `(("python2-nose" ,python2-nose)))
3563 (description "NumPy is the fundamental package for scientific computing
3564 with Python. It contains among other things: a powerful N-dimensional array
3565 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3566 and Fortran code, useful linear algebra, Fourier transform, and random number
3567 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3568 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3569 Numeric.")
3570 (license license:bsd-3)))
3571
3572 (define-public python-munch
3573 (package
3574 (name "python-munch")
3575 (version "2.0.4")
3576 (source
3577 (origin
3578 (method url-fetch)
3579 (uri (pypi-uri "munch" version))
3580 (sha256
3581 (base32
3582 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3583 (build-system python-build-system)
3584 (home-page "https://github.com/Infinidat/munch")
3585 (synopsis "Dot-accessible dictionary")
3586 (description "Munch is a dot-accessible dictionary similar to JavaScript
3587 objects.")
3588 (license license:expat)))
3589
3590 (define-public python2-munch
3591 (package-with-python2 python-munch))
3592
3593 (define-public python-colormath
3594 (package
3595 (name "python-colormath")
3596 (version "3.0.0")
3597 (source
3598 (origin
3599 (method url-fetch)
3600 (uri (pypi-uri "colormath" version))
3601 (sha256
3602 (base32
3603 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3604 (build-system python-build-system)
3605 (propagated-inputs
3606 `(("python-networkx" ,python-networkx)
3607 ("python-numpy" ,python-numpy)))
3608 (home-page "https://github.com/gtaylor/python-colormath")
3609 (synopsis "Color math and conversion library")
3610 (description
3611 "This is a Python library for color math and conversions.")
3612 (license license:bsd-3)))
3613
3614 (define-public python2-colormath
3615 (package-with-python2 python-colormath))
3616
3617 (define-public python-spectra
3618 (package
3619 (name "python-spectra")
3620 (version "0.0.11")
3621 (source
3622 (origin
3623 (method url-fetch)
3624 (uri (pypi-uri "spectra" version))
3625 (sha256
3626 (base32
3627 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3628 (build-system python-build-system)
3629 (arguments
3630 `(#:phases
3631 (modify-phases %standard-phases
3632 (replace 'check
3633 (lambda _ (invoke "nosetests" "-v"))))))
3634 (propagated-inputs
3635 `(("python-colormath" ,python-colormath)))
3636 (native-inputs
3637 `(("python-nose" ,python-nose)))
3638 (home-page "https://github.com/jsvine/spectra")
3639 (synopsis "Color scales and color conversion")
3640 (description
3641 "This package provides a Python library intended to make color math,
3642 color scales, and color space conversion easy. It has support for:
3643
3644 @enumerate
3645 @item Color scales
3646 @item Color ranges
3647 @item Color blending
3648 @item Brightening/darkening colors
3649 @item Saturating/desaturating colors
3650 @item Conversion to/from multiple color spaces.
3651 @end enumerate\n")
3652 (license license:expat)))
3653
3654 (define-public python2-spectra
3655 (package-with-python2 python-spectra))
3656
3657 (define-public python-numpy-documentation
3658 (package
3659 (name "python-numpy-documentation")
3660 (version (package-version python-numpy))
3661 (source (package-source python-numpy))
3662 (build-system python-build-system)
3663 (native-inputs
3664 `(("python-matplotlib" ,python-matplotlib)
3665 ("python-numpy" ,python-numpy)
3666 ("pkg-config" ,pkg-config)
3667 ("python-sphinx" ,python-sphinx)
3668 ("python-numpydoc" ,python-numpydoc)
3669 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
3670 texlive-fonts-ec
3671 texlive-generic-ifxetex
3672 texlive-generic-pdftex
3673 texlive-amsfonts
3674 texlive-latex-capt-of
3675 texlive-latex-cmap
3676 texlive-latex-environ
3677 texlive-latex-eqparbox
3678 texlive-latex-etoolbox
3679 texlive-latex-expdlist
3680 texlive-latex-fancyhdr
3681 texlive-latex-fancyvrb
3682 texlive-latex-fncychap
3683 texlive-latex-float
3684 texlive-latex-framed
3685 texlive-latex-geometry
3686 texlive-latex-graphics
3687 texlive-latex-hyperref
3688 texlive-latex-mdwtools
3689 texlive-latex-multirow
3690 texlive-latex-needspace
3691 texlive-latex-oberdiek
3692 texlive-latex-parskip
3693 texlive-latex-preview
3694 texlive-latex-tabulary
3695 texlive-latex-threeparttable
3696 texlive-latex-titlesec
3697 texlive-latex-trimspaces
3698 texlive-latex-ucs
3699 texlive-latex-upquote
3700 texlive-latex-url
3701 texlive-latex-varwidth
3702 texlive-latex-wrapfig)))
3703 ("texinfo" ,texinfo)
3704 ("perl" ,perl)
3705 ("scipy-sphinx-theme"
3706 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3707 (method git-fetch)
3708 (uri (git-reference
3709 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3710 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3711 (sha256
3712 (base32
3713 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3714 ,@(package-native-inputs python-numpy)))
3715 (arguments
3716 `(#:tests? #f ; we're only generating the documentation
3717 #:phases
3718 (modify-phases %standard-phases
3719 (delete 'build)
3720 (replace 'install
3721 (lambda* (#:key inputs outputs #:allow-other-keys)
3722 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3723 (doc (string-append
3724 data "/doc/" ,name "-"
3725 ,(package-version python-numpy)))
3726 (info-reader (string-append data "/info"))
3727 (html (string-append doc "/html"))
3728 (scipy-sphinx-theme "scipy-sphinx-theme")
3729 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3730 (pyver ,(string-append "PYVER=")))
3731
3732 ;; FIXME: this is needed to for texlive-union to generate
3733 ;; fonts, which are not found.
3734 (setenv "HOME" "/tmp")
3735
3736 (with-directory-excursion "doc"
3737 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3738 (mkdir-p html)
3739 (invoke "make" "html" pyver)
3740 (invoke "make" "latex" "PAPER=a4" pyver)
3741 (invoke "make" "-C" "build/latex"
3742 "all-pdf" "PAPER=a4" pyver)
3743 ;; FIXME: Generation of the info file fails.
3744 ;; (invoke "make" "info" pyver)
3745 ;; (mkdir-p info)
3746 ;; (copy-file "build/texinfo/numpy.info"
3747 ;; (string-append info "/numpy.info"))
3748 (for-each (lambda (file)
3749 (copy-file (string-append "build/latex" file)
3750 (string-append doc file)))
3751 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3752 (with-directory-excursion "build/html"
3753 (for-each (lambda (file)
3754 (let* ((dir (dirname file))
3755 (tgt-dir (string-append html "/" dir)))
3756 (unless (equal? "." dir)
3757 (mkdir-p tgt-dir))
3758 (install-file file html)))
3759 (find-files "." ".*")))))
3760 #t)))))
3761 (home-page (package-home-page python-numpy))
3762 (synopsis "Documentation for the python-numpy package")
3763 (description (package-description python-numpy))
3764 (license (package-license python-numpy))))
3765
3766 (define-public python2-numpy-documentation
3767 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3768 (package
3769 (inherit numpy-documentation)
3770 (native-inputs `(("python2-functools32" ,python2-functools32)
3771 ,@(package-native-inputs numpy-documentation))))))
3772
3773 (define-public python-pygit2
3774 (package
3775 (name "python-pygit2")
3776 (version "0.28.2")
3777 (source
3778 (origin
3779 (method url-fetch)
3780 (uri (pypi-uri "pygit2" version))
3781 (sha256
3782 (base32 "11kzj5mjkspvplnpdb6bj8dcj6rgmkk986k8hjcklyg5yaxkz32d"))))
3783 (build-system python-build-system)
3784 (arguments
3785 '(#:tests? #f)) ; tests don't run correctly in our environment
3786 (propagated-inputs
3787 `(("python-six" ,python-six)
3788 ("python-cffi" ,python-cffi)
3789 ("libgit2" ,libgit2)
3790 ("python-tox" ,python-tox)))
3791 (native-inputs
3792 `(("python-pytest" ,python-pytest)))
3793 (home-page "https://github.com/libgit2/pygit2")
3794 (synopsis "Python bindings for libgit2")
3795 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3796 library, libgit2 implements Git plumbing.")
3797 ;; GPL2.0 only, with linking exception.
3798 (license license:gpl2)))
3799
3800 (define-public python2-pygit2
3801 (package-with-python2 python-pygit2))
3802
3803 (define-public python-pyparsing
3804 (package
3805 (name "python-pyparsing")
3806 (version "2.3.1")
3807 (source
3808 (origin
3809 (method url-fetch)
3810 (uri (pypi-uri "pyparsing" version))
3811 (sha256
3812 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
3813 (build-system python-build-system)
3814 (outputs '("out" "doc"))
3815 (arguments
3816 `(#:tests? #f ; no test target
3817 #:phases
3818 (modify-phases %standard-phases
3819 (add-after 'install 'install-doc
3820 (lambda* (#:key outputs #:allow-other-keys)
3821 (let* ((doc (string-append (assoc-ref outputs "doc")
3822 "/share/doc/" ,name "-" ,version))
3823 (html-doc (string-append doc "/html"))
3824 (examples (string-append doc "/examples")))
3825 (mkdir-p html-doc)
3826 (mkdir-p examples)
3827 (for-each
3828 (lambda (dir tgt)
3829 (map (lambda (file)
3830 (install-file file tgt))
3831 (find-files dir ".*")))
3832 (list "docs" "htmldoc" "examples")
3833 (list doc html-doc examples))
3834 #t))))))
3835 (home-page "https://github.com/pyparsing/pyparsing")
3836 (synopsis "Python parsing class library")
3837 (description
3838 "The pyparsing module is an alternative approach to creating and
3839 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3840 of regular expressions. The pyparsing module provides a library of classes
3841 that client code uses to construct the grammar directly in Python code.")
3842 (license license:expat)))
3843
3844 (define-public python2-pyparsing
3845 (package-with-python2 python-pyparsing))
3846
3847 (define-public python-numpydoc
3848 (package
3849 (name "python-numpydoc")
3850 (version "0.8.0")
3851 (source
3852 (origin
3853 (method url-fetch)
3854 (uri (pypi-uri "numpydoc" version))
3855 (sha256
3856 (base32
3857 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3858 (build-system python-build-system)
3859 (propagated-inputs
3860 `(("python-sphinx" ,python-sphinx)))
3861 (native-inputs
3862 `(("python-nose" ,python-nose)))
3863 (home-page "https://pypi.python.org/pypi/numpydoc")
3864 (synopsis
3865 "Numpy's Sphinx extensions")
3866 (description
3867 "Sphinx extension to support docstrings in Numpy format.")
3868 (license license:bsd-2)))
3869
3870 (define-public python2-numpydoc
3871 (package-with-python2 python-numpydoc))
3872
3873 (define-public python-numexpr
3874 (package
3875 (name "python-numexpr")
3876 (version "2.6.5")
3877 (source
3878 (origin
3879 (method url-fetch)
3880 (uri (pypi-uri "numexpr" version))
3881 (sha256
3882 (base32
3883 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3884 (build-system python-build-system)
3885 (arguments `(#:tests? #f)) ; no tests included
3886 (propagated-inputs
3887 `(("python-numpy" ,python-numpy)))
3888 (home-page "https://github.com/pydata/numexpr")
3889 (synopsis "Fast numerical expression evaluator for NumPy")
3890 (description
3891 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3892 expressions that operate on arrays are accelerated and use less memory than
3893 doing the same calculation in Python. In addition, its multi-threaded
3894 capabilities can make use of all your cores, which may accelerate
3895 computations, most specially if they are not memory-bounded (e.g. those using
3896 transcendental functions).")
3897 (license license:expat)))
3898
3899 (define-public python2-numexpr
3900 (package-with-python2 python-numexpr))
3901
3902 (define-public python-cycler
3903 (package
3904 (name "python-cycler")
3905 (version "0.10.0")
3906 (source (origin
3907 (method url-fetch)
3908 (uri (pypi-uri "cycler" version))
3909 (sha256
3910 (base32
3911 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3912 (build-system python-build-system)
3913 (arguments
3914 ;; XXX: The current version requires 'coveralls' which we don't have.
3915 ;; Enable this for the next release which uses 'python-pytest'.
3916 '(#:tests? #f))
3917 (propagated-inputs
3918 `(("python-six" ,python-six)))
3919 (home-page "http://matplotlib.org/cycler/")
3920 (synopsis "Composable keyword argument iterator")
3921 (description
3922 "When using @code{matplotlib} and plotting more than one line, it is
3923 common to want to be able to want to be able to cycle over one or more artist
3924 styles; but the plotting logic can quickly become involved.
3925 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3926 @code{Cycler} class was developed.")
3927 (license license:bsd-3)))
3928
3929 (define-public python2-cycler
3930 (package-with-python2 python-cycler))
3931
3932 (define-public python-colorspacious
3933 (package
3934 (name "python-colorspacious")
3935 (version "1.1.2")
3936 (source
3937 (origin
3938 (method git-fetch)
3939 (uri (git-reference
3940 (url "https://github.com/njsmith/colorspacious.git")
3941 (commit (string-append "v" version))))
3942 (file-name (git-file-name name version))
3943 (sha256
3944 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
3945 (build-system python-build-system)
3946 (propagated-inputs
3947 `(("python-numpy" ,python-numpy)))
3948 (native-inputs
3949 `(("python-nose" ,python-nose)))
3950 (arguments
3951 `(#:phases
3952 (modify-phases %standard-phases
3953 (replace 'check
3954 (lambda _
3955 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
3956 (home-page "https://github.com/njsmith/colorspacious")
3957 (synopsis "Python library for colorspace conversions")
3958 (description "@code{colorspacious} is a Python library that lets you
3959 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3960 (license license:expat)))
3961
3962 (define-public python2-colorspacious
3963 (package-with-python2 python-colorspacious))
3964
3965 (define-public python-matplotlib
3966 (package
3967 (name "python-matplotlib")
3968 (version "3.1.1")
3969 (source
3970 (origin
3971 (method url-fetch)
3972 (uri (pypi-uri "matplotlib" version))
3973 (sha256
3974 (base32
3975 "14qc109dibp32xfd9lah54djc0rc76fhbsj9cwyb328lzqmd5sqz"))))
3976 (build-system python-build-system)
3977 (propagated-inputs ; the following packages are all needed at run time
3978 `(("python-cycler" ,python-cycler)
3979 ("python-kiwisolver" ,python-kiwisolver)
3980 ("python-pyparsing" ,python-pyparsing)
3981 ("python-pygobject" ,python-pygobject)
3982 ("gobject-introspection" ,gobject-introspection)
3983 ("python-tkinter" ,python "tk")
3984 ("python-dateutil" ,python-dateutil)
3985 ("python-numpy" ,python-numpy)
3986 ("python-pillow" ,python-pillow)
3987 ("python-pytz" ,python-pytz)
3988 ("python-six" ,python-six)
3989 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3990 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3991 ;; object. For this reason we need to import both libraries.
3992 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
3993 ("python-pycairo" ,python-pycairo)
3994 ("python-cairocffi" ,python-cairocffi)))
3995 (inputs
3996 `(("libpng" ,libpng)
3997 ("imagemagick" ,imagemagick)
3998 ("freetype" ,freetype)
3999 ("cairo" ,cairo)
4000 ("glib" ,glib)
4001 ;; FIXME: Add backends when available.
4002 ;("python-wxpython" ,python-wxpython)
4003 ("tcl" ,tcl)
4004 ("tk" ,tk)))
4005 (native-inputs
4006 `(("pkg-config" ,pkg-config)
4007 ("python-pytest" ,python-pytest)
4008 ("python-mock" ,python-mock)
4009 ("unzip" ,unzip)
4010 ("jquery-ui"
4011 ,(origin
4012 (method url-fetch)
4013 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
4014 (sha256
4015 (base32
4016 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
4017 (arguments
4018 `(#:phases
4019 (modify-phases %standard-phases
4020 ;; XXX We disable all image comparison tests because we're using a
4021 ;; newer version of FreeType than matplotlib expects. This leads to
4022 ;; minor differences throughout the tests.
4023 (add-after 'unpack 'fix-and-disable-failing-tests
4024 (lambda _
4025 (substitute* (append (find-files "lib/matplotlib/tests/"
4026 "test_.*\\.py$")
4027 (find-files "lib/mpl_toolkits/tests"
4028 "test_.*\\.py$"))
4029 (("^from matplotlib" match)
4030 (string-append "import pytest\n" match))
4031 (("( *)@image_comparison" match indent)
4032 (string-append indent
4033 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
4034 match)))
4035 (substitute* "lib/matplotlib/tests/test_animation.py"
4036 (("/bin/sh") (which "sh")))
4037 (for-each delete-file
4038 ;; test_normal_axes, test_get_tightbbox_polar
4039 '("lib/matplotlib/tests/test_axes.py"
4040 ;; test_outward_ticks
4041 "lib/matplotlib/tests/test_tightlayout.py"
4042 ;; Fontconfig returns no fonts.
4043 "lib/matplotlib/tests/test_font_manager.py"))
4044 #t))
4045 (add-before 'install 'install-jquery-ui
4046 (lambda* (#:key outputs inputs #:allow-other-keys)
4047 (let ((dir (string-append (assoc-ref outputs "out")
4048 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
4049 (mkdir-p dir)
4050 (invoke "unzip"
4051 (assoc-ref inputs "jquery-ui")
4052 "-d" dir))
4053 #t))
4054 (delete 'check)
4055 (add-after 'install 'check
4056 (lambda* (#:key outputs inputs #:allow-other-keys)
4057 (add-installed-pythonpath inputs outputs)
4058 (invoke "python" "tests.py" "-v"
4059 "-m" "not network")))
4060 (add-before 'build 'configure-environment
4061 (lambda* (#:key outputs inputs #:allow-other-keys)
4062 (let ((cairo (assoc-ref inputs "cairo")))
4063 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
4064 ;; has not effect.
4065 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
4066 (setenv "HOME" (getcwd))
4067 (call-with-output-file "setup.cfg"
4068 (lambda (port)
4069 (format port "[directories]~%
4070 basedirlist = ~a,~a~%
4071 [packages]~%
4072 tests = True~%"
4073 (assoc-ref inputs "tcl")
4074 (assoc-ref inputs "tk")))))
4075 #t)))))
4076 (home-page "https://matplotlib.org/")
4077 (synopsis "2D plotting library for Python")
4078 (description
4079 "Matplotlib is a Python 2D plotting library which produces publication
4080 quality figures in a variety of hardcopy formats and interactive environments
4081 across platforms. Matplotlib can be used in Python scripts, the python and
4082 ipython shell, web application servers, and six graphical user interface
4083 toolkits.")
4084 (license license:psfl)
4085 (properties `((python2-variant . ,(delay python2-matplotlib))))))
4086
4087 (define-public python2-matplotlib
4088 (let ((matplotlib (package-with-python2
4089 (strip-python2-variant python-matplotlib))))
4090 (package (inherit matplotlib)
4091 (version "2.2.4")
4092 (source
4093 (origin
4094 (method url-fetch)
4095 (uri (pypi-uri "matplotlib" version))
4096 (sha256
4097 (base32
4098 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
4099 (arguments
4100 (substitute-keyword-arguments (package-arguments matplotlib)
4101 ((#:phases phases)
4102 `(modify-phases ,phases
4103 (replace 'install-jquery-ui
4104 (lambda* (#:key outputs inputs #:allow-other-keys)
4105 (let ((dir (string-append (assoc-ref outputs "out")
4106 "/lib/python2.7/site-packages/"
4107 "matplotlib/backends/web_backend/")))
4108 (mkdir-p dir)
4109 (invoke "unzip"
4110 (assoc-ref inputs "jquery-ui")
4111 "-d" dir))
4112 #t))
4113 (delete 'check))))) ; These tests weren't run the the past.
4114 ;; Make sure to use special packages for Python 2 instead
4115 ;; of those automatically rewritten by package-with-python2.
4116 (propagated-inputs
4117 `(("python2-pycairo" ,python2-pycairo)
4118 ("python2-backports-functools-lru-cache"
4119 ,python2-backports-functools-lru-cache)
4120 ("python2-functools32" ,python2-functools32)
4121 ("python2-pygobject-2" ,python2-pygobject-2)
4122 ("python2-subprocess32" ,python2-subprocess32)
4123 ("python2-tkinter" ,python-2 "tk")
4124 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4125 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4126
4127 (define-public python-matplotlib-documentation
4128 (package
4129 (name "python-matplotlib-documentation")
4130 (version (package-version python-matplotlib))
4131 (source (package-source python-matplotlib))
4132 (build-system python-build-system)
4133 (native-inputs
4134 `(("python-matplotlib" ,python-matplotlib)
4135 ("python-colorspacious" ,python-colorspacious)
4136 ("python-sphinx" ,python-sphinx)
4137 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
4138 ("python-sphinx-gallery" ,python-sphinx-gallery)
4139 ("python-numpydoc" ,python-numpydoc)
4140 ("python-ipython" ,python-ipython)
4141 ("python-ipykernel" ,python-ipykernel)
4142 ("python-mock" ,python-mock)
4143 ("graphviz" ,graphviz)
4144 ("texlive" ,(texlive-union (list texlive-amsfonts
4145 texlive-latex-amsmath
4146 texlive-latex-enumitem
4147 texlive-latex-expdlist
4148 texlive-latex-geometry
4149 texlive-latex-preview
4150 texlive-latex-type1cm
4151 texlive-latex-ucs
4152
4153 texlive-generic-pdftex
4154
4155 texlive-fonts-ec
4156 texlive-fonts-adobe-times
4157 texlive-fonts-txfonts)))
4158 ("texinfo" ,texinfo)
4159 ,@(package-native-inputs python-matplotlib)))
4160 (arguments
4161 `(#:tests? #f ; we're only generating documentation
4162 #:phases
4163 (modify-phases %standard-phases
4164 ;; The tests in python-matplotlib are run after the install phase, so
4165 ;; we need to delete the extra phase here.
4166 (delete 'check)
4167 (replace 'build
4168 (lambda _
4169 (chdir "doc")
4170 (setenv "PYTHONPATH"
4171 (string-append (getenv "PYTHONPATH")
4172 ":" (getcwd) "/../examples/units"))
4173 (substitute* "conf.py"
4174 ;; Don't use git.
4175 (("^SHA = check_output.*")
4176 (string-append "SHA = \"" ,version "\"\n"))
4177 ;; Don't fetch intersphinx files from the Internet
4178 (("^explicit_order_folders" m)
4179 (string-append "intersphinx_mapping = {}\n" m))
4180 (("'sphinx.ext.intersphinx',") "")
4181 ;; Disable URL embedding which requires internet access.
4182 (("'https://docs.scipy.org/doc/numpy'") "None")
4183 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
4184 (invoke "make"
4185 "SPHINXBUILD=sphinx-build"
4186 "SPHINXOPTS=" ; don't abort on warnings
4187 "html" "texinfo")))
4188 (replace 'install
4189 (lambda* (#:key inputs outputs #:allow-other-keys)
4190 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4191 (doc (string-append data "/doc/python-matplotlib-" ,version))
4192 (info (string-append data "/info"))
4193 (html (string-append doc "/html")))
4194 (mkdir-p html)
4195 (mkdir-p info)
4196 (copy-recursively "build/html" html)
4197 (symlink (string-append html "/_images")
4198 (string-append info "/matplotlib-figures"))
4199 (with-directory-excursion "build/texinfo"
4200 (substitute* "matplotlib.texi"
4201 (("@image\\{([^,]*)" all file)
4202 (string-append "@image{matplotlib-figures/" file)))
4203 (symlink (string-append html "/_images")
4204 "./matplotlib-figures")
4205 (invoke "makeinfo" "--no-split"
4206 "-o" "matplotlib.info" "matplotlib.texi"))
4207 (install-file "build/texinfo/matplotlib.info" info))
4208 #t)))))
4209 (home-page (package-home-page python-matplotlib))
4210 (synopsis "Documentation for the python-matplotlib package")
4211 (description (package-description python-matplotlib))
4212 (license (package-license python-matplotlib))))
4213
4214 (define-public python2-matplotlib-documentation
4215 (let ((parent (package-with-python2 python-matplotlib-documentation)))
4216 (package
4217 (inherit parent)
4218 (native-inputs
4219 (alist-delete "python-sphinx-copybutton"
4220 (package-native-inputs parent))))))
4221
4222 (define-public python-matplotlib-venn
4223 (package
4224 (name "python-matplotlib-venn")
4225 (version "0.11.5")
4226 (source
4227 (origin
4228 (method url-fetch)
4229 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4230 (sha256
4231 (base32
4232 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4233 (build-system python-build-system)
4234 (arguments '(#:tests? #f)) ; tests are not included
4235 (propagated-inputs
4236 `(("python-matplotlib" ,python-matplotlib)
4237 ("python-numpy" ,python-numpy)
4238 ("python-scipy" ,python-scipy)))
4239 (native-inputs
4240 `(("unzip" ,unzip)))
4241 (home-page "https://github.com/konstantint/matplotlib-venn")
4242 (synopsis "Plot area-proportional Venn diagrams")
4243 (description
4244 "This package provides tools for plotting area-proportional two- and
4245 three-way Venn diagrams in @code{matplotlib}.")
4246 (license license:expat)))
4247
4248 (define-public python2-pysnptools
4249 (package
4250 (name "python2-pysnptools")
4251 (version "0.3.13")
4252 (source
4253 (origin
4254 (method url-fetch)
4255 (uri (pypi-uri "pysnptools" version))
4256 (sha256
4257 (base32
4258 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
4259 (build-system python-build-system)
4260 (arguments
4261 `(#:python ,python-2 ; only Python 2.7 is supported
4262 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
4263 (propagated-inputs
4264 `(("python2-numpy" ,python2-numpy)
4265 ("python2-scipy" ,python2-scipy)
4266 ("python2-pandas" ,python2-pandas)))
4267 (native-inputs
4268 `(("python2-cython" ,python2-cython)))
4269 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
4270 (synopsis "Library for reading and manipulating genetic data")
4271 (description
4272 "PySnpTools is a library for reading and manipulating genetic data. It
4273 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4274 those files. It can also efficiently manipulate ranges of integers using set
4275 operators such as union, intersection, and difference.")
4276 (license license:asl2.0)))
4277
4278 (define-public python-scipy
4279 (package
4280 (name "python-scipy")
4281 (version "1.3.1")
4282 (source
4283 (origin
4284 (method url-fetch)
4285 (uri (pypi-uri "scipy" version))
4286 (sha256
4287 (base32
4288 "1df113c9i6vazsn6y3n9wc22jh737z1g7dmx3mypkdwpdnscyhr6"))))
4289 (build-system python-build-system)
4290 (propagated-inputs
4291 `(("python-numpy" ,python-numpy)
4292 ("python-matplotlib" ,python-matplotlib)
4293 ("python-pyparsing" ,python-pyparsing)))
4294 (inputs
4295 `(("lapack" ,lapack)
4296 ("openblas" ,openblas)))
4297 (native-inputs
4298 `(("python-cython" ,python-cython)
4299 ("python-pytest" ,python-pytest)
4300 ("python-sphinx" ,python-sphinx)
4301 ("python-numpydoc" ,python-numpydoc)
4302 ("gfortran" ,gfortran)
4303 ("perl" ,perl)
4304 ("which" ,which)))
4305 (outputs '("out" "doc"))
4306 (arguments
4307 `(#:phases
4308 (modify-phases %standard-phases
4309 (add-after 'unpack 'disable-broken-tests
4310 (lambda _
4311 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
4312 (("^( +)def test_threads_parallel\\(self\\):" m indent)
4313 (string-append indent
4314 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4315 m)))
4316 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
4317 (("^def test_parallel_threads\\(\\):" m)
4318 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4319 m)))
4320 #t))
4321 (add-before 'build 'configure-openblas
4322 (lambda* (#:key inputs #:allow-other-keys)
4323 (call-with-output-file "site.cfg"
4324 (lambda (port)
4325 (format port
4326 "[blas]
4327 libraries = openblas
4328 library_dirs = ~a/lib
4329 include_dirs = ~a/include
4330
4331 # backslash-n to make emacs happy
4332 \n[atlas]
4333 library_dirs = ~a/lib
4334 atlas_libs = openblas
4335 "
4336 (assoc-ref inputs "openblas")
4337 (assoc-ref inputs "openblas")
4338 (assoc-ref inputs "openblas"))))
4339 #t))
4340 (add-after 'install 'install-doc
4341 (lambda* (#:key inputs outputs #:allow-other-keys)
4342 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4343 (doc (string-append data "/doc/" ,name "-" ,version))
4344 (html (string-append doc "/html"))
4345 (pyver ,(string-append "PYVER=" (version-major+minor
4346 (package-version python))))
4347 ;; By default it tries to run sphinx-build through the Python
4348 ;; interpreter which won't work with our shell wrapper.
4349 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
4350 ;; Make installed package available for building the
4351 ;; documentation
4352 (add-installed-pythonpath inputs outputs)
4353 (with-directory-excursion "doc"
4354 ;; Fix generation of images for mathematical expressions.
4355 (substitute* (find-files "source" "conf\\.py")
4356 (("pngmath_use_preview = True")
4357 "pngmath_use_preview = False"))
4358 (mkdir-p html)
4359 (invoke "make" "html" pyver sphinxbuild)
4360 (with-directory-excursion "build/html"
4361 (for-each (lambda (file)
4362 (let* ((dir (dirname file))
4363 (tgt-dir (string-append html "/" dir)))
4364 (install-file file html)))
4365 (find-files "." ".*")))))
4366 #t))
4367 ;; Tests can only be run after the library has been installed and not
4368 ;; within the source directory.
4369 (delete 'check)
4370 (add-after 'install 'check
4371 (lambda* (#:key inputs outputs #:allow-other-keys)
4372 (add-installed-pythonpath inputs outputs)
4373 (with-directory-excursion "/tmp"
4374 (invoke "python" "-c"
4375 "import scipy; scipy.test(verbose=2)")))))))
4376 (home-page "https://www.scipy.org/")
4377 (synopsis "The Scipy library provides efficient numerical routines")
4378 (description "The SciPy library is one of the core packages that make up
4379 the SciPy stack. It provides many user-friendly and efficient numerical
4380 routines such as routines for numerical integration and optimization.")
4381 (properties `((python2-variant . ,(delay python2-scipy))))
4382 (license license:bsd-3)))
4383
4384 ;; Version 1.2.2 is the last version to support Python 2
4385 (define-public python2-scipy
4386 (package
4387 (inherit (package-with-python2
4388 (strip-python2-variant python-scipy)))
4389 (version "1.2.2")
4390 (source
4391 (origin
4392 (method url-fetch)
4393 (uri (pypi-uri "scipy" version))
4394 (sha256
4395 (base32
4396 "1cgvgin8fvckv96hjh3ikmwkra5rif51bdb75ifzf7xbil5iwcx4"))))))
4397
4398 (define-public python-socksipy-branch
4399 (package
4400 (name "python-socksipy-branch")
4401 (version "1.01")
4402 (source
4403 (origin
4404 (method url-fetch)
4405 (uri (pypi-uri "SocksiPy-branch" version))
4406 (sha256
4407 (base32
4408 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4409 (build-system python-build-system)
4410 (arguments
4411 `(#:tests? #f)) ; There are no tests
4412 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4413 (synopsis "Python SOCKS module")
4414 (description
4415 "SocksiPy - A Python SOCKS client module. It provides a
4416 socket-like interface that supports connections to any TCP
4417 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4418 The original version was developed by Dan Haim, this is a
4419 branch created by Mario Vilas to address some open issues,
4420 as the original project seems to have been abandoned circa 2007.")
4421 (license license:bsd-3)))
4422
4423 (define-public python2-socksipy-branch
4424 (package-with-python2 python-socksipy-branch))
4425
4426 (define-public python-pycodestyle
4427 (package
4428 (name "python-pycodestyle")
4429 (version "2.5.0")
4430 (source
4431 (origin
4432 (method url-fetch)
4433 (uri (pypi-uri "pycodestyle" version))
4434 (sha256
4435 (base32
4436 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
4437 (build-system python-build-system)
4438 (home-page "https://pycodestyle.readthedocs.io/")
4439 (synopsis "Python style guide checker")
4440 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4441 Python code against some of the style conventions in
4442 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4443 (license license:expat)))
4444
4445 (define-public python2-pycodestyle
4446 (package-with-python2 python-pycodestyle))
4447
4448 (define-public python-multidict
4449 (package
4450 (name "python-multidict")
4451 (version "4.2.0")
4452 (source
4453 (origin
4454 (method url-fetch)
4455 (uri (pypi-uri "multidict" version))
4456 (sha256
4457 (base32
4458 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4459 (build-system python-build-system)
4460 (native-inputs
4461 `(("python-pytest" ,python-pytest)
4462 ("python-pytest-runner" ,python-pytest-runner)))
4463 (home-page "https://github.com/aio-libs/multidict/")
4464 (synopsis "Multidict implementation")
4465 (description "Multidict is dict-like collection of key-value pairs
4466 where key might be occurred more than once in the container.")
4467 (license license:asl2.0)))
4468
4469 (define-public python-orderedmultidict
4470 (package
4471 (name "python-orderedmultidict")
4472 (version "0.7.11")
4473 (source
4474 (origin
4475 (method url-fetch)
4476 (uri (pypi-uri "orderedmultidict" version))
4477 (sha256
4478 (base32
4479 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4480 (build-system python-build-system)
4481 (arguments
4482 `(#:phases
4483 (modify-phases %standard-phases
4484 (add-after 'unpack 'fix-tests
4485 (lambda _
4486 ;; The package uses nosetest for running the tests.
4487 ;; Adding this initfile allows to run the test suite
4488 ;; without requiring nosetest.
4489 (with-output-to-file "tests/__init__.py" newline)
4490 #t)))))
4491 (propagated-inputs
4492 `(("python-six" ,python-six)))
4493 (native-inputs
4494 `(("python-pycodestyle" ,python-pycodestyle)))
4495 (home-page "https://github.com/gruns/orderedmultidict")
4496 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4497 (description "This package contains a library for ordered multivalue
4498 dictionaries. A multivalue dictionary is a dictionary that can store
4499 multiple values for the same key. An ordered multivalue dictionary is a
4500 multivalue dictionary that retains the order of insertions and deletions.")
4501 (license license:unlicense)))
4502
4503 (define-public python2-orderedmultidict
4504 (package-with-python2 python-orderedmultidict))
4505
4506 (define-public python-autopep8
4507 (package
4508 (name "python-autopep8")
4509 (version "1.3.5")
4510 (source
4511 (origin
4512 (method url-fetch)
4513 (uri (pypi-uri "autopep8" version))
4514 (sha256
4515 (base32
4516 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4517 (build-system python-build-system)
4518 (propagated-inputs
4519 `(("python-pycodestyle" ,python-pycodestyle)))
4520 (home-page "https://github.com/hhatto/autopep8")
4521 (synopsis "Format Python code according to the PEP 8 style guide")
4522 (description
4523 "@code{autopep8} automatically formats Python code to conform to
4524 the PEP 8 style guide. It uses the pycodestyle utility to determine
4525 what parts of the code needs to be formatted. @code{autopep8} is
4526 capable of fixing most of the formatting issues that can be reported
4527 by pycodestyle.")
4528 (license (license:non-copyleft
4529 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4530
4531 (define-public python2-autopep8
4532 (package-with-python2 python-autopep8))
4533
4534 (define-public python-distutils-extra
4535 (package
4536 (name "python-distutils-extra")
4537 (version "2.38")
4538 (source
4539 (origin
4540 (method url-fetch)
4541 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4542 version "/+download/python-distutils-extra-"
4543 version ".tar.gz"))
4544 (sha256
4545 (base32
4546 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4547 (build-system python-build-system)
4548 (home-page "https://launchpad.net/python-distutils-extra/")
4549 (synopsis "Enhancements to Python's distutils")
4550 (description
4551 "The python-distutils-extra module enables you to easily integrate
4552 gettext support, themed icons, and scrollkeeper-based documentation into
4553 Python's distutils.")
4554 (license license:gpl2)))
4555
4556 (define-public python2-distutils-extra
4557 (package-with-python2 python-distutils-extra))
4558
4559 (define-public python2-elib.intl
4560 (package
4561 (name "python2-elib.intl")
4562 (version "0.0.3")
4563 (source
4564 (origin
4565 ;; This project doesn't tag releases or publish tarballs, so we take
4566 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4567 (method git-fetch)
4568 (uri (git-reference
4569 (url "https://github.com/dieterv/elib.intl.git")
4570 (commit "d09997cfef")))
4571 (file-name (string-append name "-" version "-checkout"))
4572 (sha256
4573 (base32
4574 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4575 (build-system python-build-system)
4576 (arguments
4577 ;; incompatible with Python 3 (exception syntax)
4578 `(#:python ,python-2
4579 #:tests? #f))
4580 (home-page "https://github.com/dieterv/elib.intl")
4581 (synopsis "Enhanced internationalization for Python")
4582 (description
4583 "The elib.intl module provides enhanced internationalization (I18N)
4584 services for your Python modules and applications.")
4585 (license license:lgpl3+)))
4586
4587 (define-public python-olefile
4588 (package
4589 (name "python-olefile")
4590 (version "0.46")
4591 (source
4592 (origin
4593 (method url-fetch)
4594 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4595 "download/v" version "/olefile-" version ".tar.gz"))
4596 (file-name (string-append name "-" version ".tar.gz"))
4597 (sha256
4598 (base32
4599 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
4600 (build-system python-build-system)
4601 (home-page "https://www.decalage.info/python/olefileio")
4602 (synopsis "Read and write Microsoft OLE2 files.")
4603 (description
4604 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4605 Storage or Compound Document, Microsoft Office). It is an improved version of
4606 the OleFileIO module from PIL, the Python Image Library.")
4607 (license license:bsd-3)))
4608
4609 (define-public python2-olefile
4610 (package-with-python2 python-olefile))
4611
4612 (define-public python-pillow
4613 (package
4614 (name "python-pillow")
4615 (version "6.1.0")
4616 (source
4617 (origin
4618 (method url-fetch)
4619 (uri (pypi-uri "Pillow" version))
4620 (sha256
4621 (base32
4622 "1pnrsz0f0n0c819v1pdr8j6rm8xvhc9f3kh1fv9xpdp9n5ygf108"))))
4623 (build-system python-build-system)
4624 (native-inputs
4625 `(("python-pytest" ,python-pytest)))
4626 (inputs
4627 `(("freetype" ,freetype)
4628 ("lcms" ,lcms)
4629 ("zlib" ,zlib)
4630 ("libjpeg" ,libjpeg)
4631 ("openjpeg" ,openjpeg)
4632 ("libtiff" ,libtiff)
4633 ("libwebp" ,libwebp)))
4634 (propagated-inputs
4635 `(("python-olefile" ,python-olefile)))
4636 (arguments
4637 `(#:phases
4638 (modify-phases %standard-phases
4639 (add-after 'unpack 'patch-ldconfig
4640 (lambda _
4641 (substitute* "setup.py"
4642 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4643 (delete 'check) ; We must run checks after python-pillow is installed.
4644 (add-after 'install 'check-installed
4645 (lambda* (#:key outputs inputs #:allow-other-keys)
4646 (begin
4647 (setenv "HOME" (getcwd))
4648 ;; Make installed package available for running the tests.
4649 (add-installed-pythonpath inputs outputs)
4650 (invoke "python" "selftest.py" "--installed")
4651 (invoke "python" "-m" "pytest" "-vv")))))))
4652 (home-page "https://python-pillow.org")
4653 (synopsis "Fork of the Python Imaging Library")
4654 (description
4655 "The Python Imaging Library adds image processing capabilities to your
4656 Python interpreter. This library provides extensive file format support, an
4657 efficient internal representation, and fairly powerful image processing
4658 capabilities. The core image library is designed for fast access to data
4659 stored in a few basic pixel formats. It should provide a solid foundation for
4660 a general image processing tool.")
4661 (license (license:x11-style
4662 "http://www.pythonware.com/products/pil/license.htm"
4663 "The PIL Software License"))))
4664
4665 (define-public python2-pillow
4666 (package-with-python2 python-pillow))
4667
4668 (define-public python-pycparser
4669 (package
4670 (name "python-pycparser")
4671 (version "2.19")
4672 (source
4673 (origin
4674 (method url-fetch)
4675 (uri (pypi-uri "pycparser" version))
4676 (sha256
4677 (base32
4678 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
4679 (outputs '("out" "doc"))
4680 (build-system python-build-system)
4681 (native-inputs
4682 `(("pkg-config" ,pkg-config)))
4683 (arguments
4684 `(#:phases
4685 (modify-phases %standard-phases
4686 (replace 'check
4687 (lambda _
4688 (with-directory-excursion "tests"
4689 (invoke "python" "all_tests.py"))
4690 #t))
4691 (add-after 'install 'install-doc
4692 (lambda* (#:key outputs #:allow-other-keys)
4693 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4694 (doc (string-append data "/doc/" ,name "-" ,version))
4695 (examples (string-append doc "/examples")))
4696 (mkdir-p examples)
4697 (for-each (lambda (file)
4698 (copy-file (string-append "." file)
4699 (string-append doc file)))
4700 '("/README.rst" "/CHANGES" "/LICENSE"))
4701 (copy-recursively "examples" examples)
4702 #t))))))
4703 (home-page "https://github.com/eliben/pycparser")
4704 (synopsis "C parser in Python")
4705 (description
4706 "Pycparser is a complete parser of the C language, written in pure Python
4707 using the PLY parsing library. It parses C code into an AST and can serve as
4708 a front-end for C compilers or analysis tools.")
4709 (license license:bsd-3)))
4710
4711 (define-public python2-pycparser
4712 (package-with-python2 python-pycparser))
4713
4714 (define-public python-pywavelets
4715 (package
4716 (name "python-pywavelets")
4717 (version "1.0.1")
4718 (home-page "https://github.com/PyWavelets/pywt")
4719 (source (origin
4720 (method url-fetch)
4721 (uri (pypi-uri "PyWavelets" version))
4722 (sha256
4723 (base32
4724 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4725 (build-system python-build-system)
4726 (arguments
4727 '(#:modules ((ice-9 ftw)
4728 (srfi srfi-1)
4729 (srfi srfi-26)
4730 (guix build utils)
4731 (guix build python-build-system))
4732 #:phases (modify-phases %standard-phases
4733 (replace 'check
4734 (lambda _
4735 (let ((cwd (getcwd))
4736 (libdir (find (cut string-prefix? "lib." <>)
4737 (scandir "build"))))
4738 (with-directory-excursion (string-append cwd "/build/" libdir)
4739 (invoke "nosetests" "-v" "."))))))))
4740 (native-inputs
4741 `(("python-matplotlib" ,python-matplotlib) ;for tests
4742 ("python-nose" ,python-nose)))
4743 (propagated-inputs
4744 `(("python-numpy" ,python-numpy)))
4745 (synopsis "Wavelet transforms in Python")
4746 (description
4747 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4748 mathematical basis functions that are localized in both time and frequency.
4749 Wavelet transforms are time-frequency transforms employing wavelets. They are
4750 similar to Fourier transforms, the difference being that Fourier transforms are
4751 localized only in frequency instead of in time and frequency.")
4752 (license license:expat)))
4753
4754 (define-public python2-pywavelets
4755 (package-with-python2 python-pywavelets))
4756
4757 (define-public python-xcffib
4758 (package
4759 (name "python-xcffib")
4760 (version "0.6.0")
4761 (source
4762 (origin
4763 (method url-fetch)
4764 (uri (pypi-uri "xcffib" version))
4765 (sha256
4766 (base32
4767 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4768 (build-system python-build-system)
4769 (inputs
4770 `(("libxcb" ,libxcb)))
4771 (propagated-inputs
4772 `(("python-cffi" ,python-cffi) ; used at run time
4773 ("python-six" ,python-six)))
4774 (arguments
4775 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4776 #:tests? #f
4777 #:phases
4778 (modify-phases %standard-phases
4779 (add-after 'unpack 'fix-libxcb-path
4780 (lambda* (#:key inputs #:allow-other-keys)
4781 (let ((libxcb (assoc-ref inputs "libxcb")))
4782 (substitute* '("xcffib/__init__.py")
4783 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4784 #t)))
4785 (add-after 'install 'install-doc
4786 (lambda* (#:key outputs #:allow-other-keys)
4787 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4788 "/doc/" ,name "-" ,version)))
4789 (mkdir-p doc)
4790 (copy-file "README.md"
4791 (string-append doc "/README.md"))
4792 #t))))))
4793 (home-page "https://github.com/tych0/xcffib")
4794 (synopsis "XCB Python bindings")
4795 (description
4796 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4797 support for Python 3 and PyPy. It is based on cffi.")
4798 (license license:expat)))
4799
4800 (define-public python2-xcffib
4801 (package-with-python2 python-xcffib))
4802
4803 (define-public python-cairocffi
4804 (package
4805 (name "python-cairocffi")
4806 (version "0.9.0")
4807 (source
4808 (origin
4809 (method url-fetch)
4810 (uri (pypi-uri "cairocffi" version))
4811 (sha256
4812 (base32
4813 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4814 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4815 (build-system python-build-system)
4816 (outputs '("out" "doc"))
4817 (inputs
4818 `(("glib" ,glib)
4819 ("gtk+" ,gtk+)
4820 ("gdk-pixbuf" ,gdk-pixbuf)
4821 ("cairo" ,cairo)
4822 ("pango" ,pango)))
4823 (native-inputs
4824 `(("pkg-config" ,pkg-config)
4825 ("python-pytest" ,python-pytest)
4826 ("python-pytest-cov" ,python-pytest-cov)
4827 ("python-pytest-runner" ,python-pytest-runner)
4828 ("python-sphinx" ,python-sphinx)
4829 ("python-docutils" ,python-docutils)))
4830 (propagated-inputs
4831 `(("python-xcffib" ,python-xcffib))) ; used at run time
4832 (arguments
4833 `(#:phases
4834 (modify-phases %standard-phases
4835 (add-after 'unpack 'patch-paths
4836 (lambda* (#:key inputs outputs #:allow-other-keys)
4837 (substitute* (find-files "." "\\.py$")
4838 (("dlopen\\(ffi, 'cairo'")
4839 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4840 "/lib/libcairo.so.2'"))
4841 (("dlopen\\(ffi, 'gdk-3'")
4842 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4843 "/lib/libgtk-3.so.0'"))
4844 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4845 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4846 "/lib/libgdk_pixbuf-2.0.so.0'"))
4847 (("dlopen\\(ffi, 'glib-2.0'")
4848 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4849 "/lib/libglib-2.0.so.0'"))
4850 (("dlopen\\(ffi, 'gobject-2.0'")
4851 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4852 "/lib/libgobject-2.0.so.0'"))
4853 (("dlopen\\(ffi, 'pangocairo-1.0'")
4854 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4855 "/lib/libpangocairo-1.0.so.0'"))
4856 (("dlopen\\(ffi, 'pango-1.0'")
4857 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4858 "/lib/libpango-1.0.so.0'")))
4859 #t))
4860 (add-after 'install 'install-doc
4861 (lambda* (#:key inputs outputs #:allow-other-keys)
4862 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4863 (doc (string-append data "/doc/" ,name "-" ,version))
4864 (html (string-append doc "/html")))
4865 (setenv "LD_LIBRARY_PATH"
4866 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4867 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4868 (setenv "LANG" "en_US.UTF-8")
4869 (mkdir-p html)
4870 (for-each (lambda (file)
4871 (copy-file (string-append "." file)
4872 (string-append doc file)))
4873 '("/README.rst" "/CHANGES" "/LICENSE"))
4874 (system* "python" "setup.py" "build_sphinx")
4875 (copy-recursively "docs/_build/html" html)
4876 #t))))))
4877 (home-page "https://github.com/Kozea/cairocffi")
4878 (synopsis "Python bindings and object-oriented API for Cairo")
4879 (description
4880 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4881 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4882 graphics library with support for multiple backends including image buffers,
4883 PNG, PostScript, PDF, and SVG file output.")
4884 (license license:bsd-3)))
4885
4886 (define-public python2-cairocffi
4887 (package-with-python2 python-cairocffi))
4888
4889 (define-public python-decorator
4890 (package
4891 (name "python-decorator")
4892 (version "4.3.0")
4893 (source
4894 (origin
4895 (method url-fetch)
4896 (uri (pypi-uri "decorator" version))
4897 (sha256
4898 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4899 (build-system python-build-system)
4900 (home-page "https://pypi.python.org/pypi/decorator/")
4901 (synopsis "Python module to simplify usage of decorators")
4902 (description
4903 "The aim of the decorator module is to simplify the usage of decorators
4904 for the average programmer, and to popularize decorators usage giving examples
4905 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4906 etc. The core of this module is a decorator factory.")
4907 (license license:expat)))
4908
4909 (define-public python2-decorator
4910 (package-with-python2 python-decorator))
4911
4912 (define-public python-drmaa
4913 (package
4914 (name "python-drmaa")
4915 (version "0.7.7")
4916 (source
4917 (origin
4918 (method url-fetch)
4919 (uri (pypi-uri "drmaa" version))
4920 (sha256
4921 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4922 (build-system python-build-system)
4923 ;; The test suite requires libdrmaa which is provided by the cluster
4924 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4925 ;; should be set to the path of the libdrmaa library.
4926 (arguments '(#:tests? #f))
4927 (native-inputs
4928 `(("python-nose" ,python-nose)))
4929 (home-page "https://pypi.python.org/pypi/drmaa")
4930 (synopsis "Python bindings for the DRMAA library")
4931 (description
4932 "A Python package for Distributed Resource Management (DRM) job
4933 submission and control. This package is an implementation of the DRMAA 1.0
4934 Python language binding specification.")
4935 (license license:bsd-3)))
4936
4937 (define-public python2-drmaa
4938 (package-with-python2 python-drmaa))
4939
4940 (define-public python-grako
4941 (package
4942 (name "python-grako")
4943 (version "3.99.9")
4944 (source
4945 (origin
4946 (method url-fetch)
4947 (uri
4948 (pypi-uri "grako" version ".zip"))
4949 (sha256
4950 (base32
4951 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4952 (build-system python-build-system)
4953 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4954 (native-inputs
4955 `(("unzip" ,unzip)
4956 ("python-pytest" ,python-pytest)
4957 ("python-pytest-runner" ,python-pytest-runner)))
4958 (home-page "https://bitbucket.org/neogeny/grako")
4959 (synopsis "EBNF parser generator")
4960 (description
4961 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4962 memoizing PEG/Packrat parser in Python.")
4963 (license license:bsd-3)))
4964
4965 (define-public python2-grako
4966 (package-with-python2 python-grako))
4967
4968 (define-public python-gridmap
4969 (package
4970 (name "python-gridmap")
4971 (version "0.13.0")
4972 (source
4973 (origin
4974 (method git-fetch)
4975 (uri (git-reference
4976 (url "https://github.com/pygridtools/gridmap.git")
4977 (commit (string-append "v" version))))
4978 (file-name (git-file-name name version))
4979 (sha256
4980 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
4981 (build-system python-build-system)
4982 (arguments
4983 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4984 (propagated-inputs
4985 `(("python-psutil" ,python-psutil)
4986 ("python-drmaa" ,python-drmaa)
4987 ("python-pyzmq" ,python-pyzmq)))
4988 (home-page "https://github.com/pygridtools/gridmap")
4989 (synopsis "Create jobs on a cluster directly from Python")
4990 (description
4991 "Gridmap is a Python package to allow you to easily create jobs on the
4992 cluster directly from Python. You can directly map Python functions onto the
4993 cluster without needing to write any wrapper code yourself.")
4994 (license license:gpl3+)))
4995
4996 (define-public python2-gridmap
4997 (package-with-python2 python-gridmap))
4998
4999 (define-public python-honcho
5000 (package
5001 (name "python-honcho")
5002 (version "1.0.1")
5003 (source
5004 (origin
5005 (method git-fetch)
5006 (uri (git-reference
5007 (url "https://github.com/nickstenning/honcho.git")
5008 (commit (string-append "v" version))))
5009 (file-name (git-file-name name version))
5010 (sha256
5011 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
5012 (build-system python-build-system)
5013 (native-inputs
5014 `(("python-pytest" ,python-pytest)
5015 ("python-mock" ,python-mock)
5016 ("python-tox" ,python-tox)
5017 ("which" ,which))) ;for tests
5018 (propagated-inputs
5019 `(("python-jinja2" ,python-jinja2)))
5020 (arguments
5021 `(#:phases
5022 (modify-phases %standard-phases
5023 (delete 'check)
5024 (add-after 'install 'check
5025 (lambda* (#:key outputs inputs #:allow-other-keys)
5026 ;; fix honcho path in testsuite
5027 (substitute* "tests/conftest.py"
5028 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
5029 "/bin/honcho" "'")))
5030 ;; It's easier to run tests after install.
5031 ;; Make installed package available for running the tests
5032 (add-installed-pythonpath inputs outputs)
5033 (invoke "py.test" "-v"))))))
5034 (home-page "https://github.com/nickstenning/honcho")
5035 (synopsis "Manage Procfile-based applications")
5036 (description
5037 "A Procfile is a file which describes how to run an application
5038 consisting of several processes. honcho starts all listed processes.
5039 The output of all running processes is collected by honcho and
5040 displayed.")
5041 (license license:expat)))
5042
5043 (define-public python2-honcho
5044 (package-with-python2 python-honcho))
5045
5046 (define-public python-pexpect
5047 (package
5048 (name "python-pexpect")
5049 (version "4.6.0")
5050 (source
5051 (origin
5052 (method url-fetch)
5053 (uri (pypi-uri "pexpect" version))
5054 (sha256
5055 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
5056 (build-system python-build-system)
5057 (arguments
5058 `(#:phases
5059 (modify-phases %standard-phases
5060 (add-before 'check 'prepare-tests
5061 (lambda _
5062 (substitute* (find-files "tests")
5063 (("/bin/ls") (which "ls"))
5064 (("/bin/echo") (which "echo"))
5065 (("/bin/which") (which "which"))
5066 ;; Many tests try to use the /bin directory which
5067 ;; is not present in the build environment.
5068 ;; Use one that's non-empty and unlikely to change.
5069 (("/bin'") "/dev'"))
5070 ;; XXX: Socket connection test gets "Connection reset by peer".
5071 ;; Why does it not work? Delete for now.
5072 (delete-file "tests/test_socket.py")
5073 #t))
5074 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
5075 (native-inputs
5076 `(("python-nose" ,python-nose)
5077 ("python-pytest" ,python-pytest)
5078 ("man-db" ,man-db)
5079 ("which" ,which)
5080 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
5081 (propagated-inputs
5082 `(("python-ptyprocess" ,python-ptyprocess)))
5083 (home-page "http://pexpect.readthedocs.org/")
5084 (synopsis "Controlling interactive console applications")
5085 (description
5086 "Pexpect is a pure Python module for spawning child applications;
5087 controlling them; and responding to expected patterns in their output.
5088 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
5089 child application and control it as if a human were typing commands.")
5090 (license license:isc)))
5091
5092 (define-public python2-pexpect
5093 (package-with-python2 python-pexpect))
5094
5095 (define-public python-setuptools-scm
5096 (package
5097 (name "python-setuptools-scm")
5098 (version "3.2.0")
5099 (source (origin
5100 (method url-fetch)
5101 (uri (pypi-uri "setuptools_scm" version))
5102 (sha256
5103 (base32
5104 "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj"))))
5105 (build-system python-build-system)
5106 (home-page "https://github.com/pypa/setuptools_scm/")
5107 (synopsis "Manage Python package versions in SCM metadata")
5108 (description
5109 "Setuptools_scm handles managing your Python package versions in
5110 @dfn{software configuration management} (SCM) metadata instead of declaring
5111 them as the version argument or in a SCM managed file.")
5112 (license license:expat)))
5113
5114 (define-public python2-setuptools-scm
5115 (package-with-python2 python-setuptools-scm))
5116
5117 (define-public python-pathlib2
5118 (package
5119 (name "python-pathlib2")
5120 (version "2.3.3")
5121 (source
5122 (origin
5123 (method url-fetch)
5124 (uri (pypi-uri "pathlib2" version))
5125 (sha256
5126 (base32
5127 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
5128 (build-system python-build-system)
5129 (propagated-inputs
5130 `(("python-scandir" ,python-scandir)
5131 ("python-six" ,python-six)))
5132 (home-page "https://pypi.python.org/pypi/pathlib2/")
5133 (synopsis "Object-oriented file system paths")
5134 (description "The goal of pathlib2 is to provide a backport of the
5135 standard @code{pathlib} module which tracks the standard library module, so
5136 all the newest features of the standard @code{pathlib} can be used also on
5137 older Python versions.")
5138 (license license:expat)))
5139
5140 (define-public python-importlib-metadata
5141 (package
5142 (name "python-importlib-metadata")
5143 (version "0.23")
5144 (source
5145 (origin
5146 (method url-fetch)
5147 (uri (pypi-uri "importlib_metadata" version))
5148 (sha256
5149 (base32 "09mdqdfv5rdrwz80jh9m379gxmvk2vhjfz0fg53hid00icvxf65a"))))
5150 (build-system python-build-system)
5151 (propagated-inputs
5152 `(("python-configparser" ,python-configparser)
5153 ("python-contextlib2" ,python-contextlib2)
5154 ("python-docutils" ,python-docutils)
5155 ("python-pathlib2" ,python-pathlib2)
5156 ("python-rst.linker" ,python-rst.linker)
5157 ("python-zipp" ,python-zipp)))
5158 (native-inputs
5159 `(("python-setuptools-scm" ,python-setuptools-scm)
5160 ("python-sphinx" ,python-sphinx)))
5161 (home-page "https://importlib-metadata.readthedocs.io/")
5162 (synopsis "Read metadata from Python packages")
5163 (description
5164 "@code{importlib_metadata} is a library which provides an API for
5165 accessing an installed Python package's metadata, such as its entry points or
5166 its top-level name. This functionality intends to replace most uses of
5167 @code{pkg_resources} entry point API and metadata API. Along with
5168 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
5169 need to use the older and less efficient @code{pkg_resources} package.")
5170 (license license:asl2.0)))
5171
5172 (define-public python-jaraco-packaging
5173 (package
5174 (name "python-jaraco-packaging")
5175 (version "6.1")
5176 (source
5177 (origin
5178 (method url-fetch)
5179 (uri (pypi-uri "jaraco.packaging" version))
5180 (sha256
5181 (base32
5182 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
5183 (build-system python-build-system)
5184 (propagated-inputs
5185 `(("python-pytest" ,python-pytest)
5186 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
5187 ("python-pytest-flake8" ,python-pytest-flake8)
5188 ("python-rst.linker" ,python-rst.linker)
5189 ("python-setuptools" ,python-setuptools)
5190 ("python-setuptools-scm" ,python-setuptools-scm)
5191 ("python-six" ,python-six)
5192 ("python-sphinx" ,python-sphinx)))
5193 (home-page "https://github.com/jaraco/jaraco.packaging")
5194 (synopsis "Tools to supplement packaging Python releases")
5195 (description
5196 "This package provides various tools to supplement packaging Python
5197 releases.")
5198 (license license:expat)))
5199
5200 (define-public python-pathpy
5201 (package
5202 (name "python-pathpy")
5203 (version "11.5.0")
5204 (source
5205 (origin
5206 (method url-fetch)
5207 (uri (pypi-uri "path.py" version))
5208 (sha256
5209 (base32 "1jxkf91syzxlpiwgm83fjfz1m5xh3jrvv4iyl5wjsnkk599pls5n"))))
5210 (outputs '("out" "doc"))
5211 (build-system python-build-system)
5212 (propagated-inputs
5213 `(("python-appdirs" ,python-appdirs)
5214 ("python-importlib-metadata" ,python-importlib-metadata)))
5215 (native-inputs
5216 `(("python-setuptools-scm" ,python-setuptools-scm)
5217 ("python-sphinx" ,python-sphinx)
5218 ("python-rst.linker" ,python-rst.linker)
5219 ("python-pytest" ,python-pytest)
5220 ("python-pytest-runner" ,python-pytest-runner)
5221 ("python-jaraco-packaging" ,python-jaraco-packaging)))
5222 (arguments
5223 `(#:phases
5224 (modify-phases %standard-phases
5225 (add-after 'build 'build-doc
5226 (lambda _
5227 (setenv "LANG" "en_US.UTF-8")
5228 (invoke "python" "setup.py" "build_sphinx")))
5229 (add-after 'install 'install-doc
5230 (lambda* (#:key outputs #:allow-other-keys)
5231 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5232 (doc (string-append data "/doc/" ,name "-" ,version))
5233 (html (string-append doc "/html")))
5234 (mkdir-p html)
5235 (for-each (lambda (file)
5236 (copy-file file (string-append doc "/" file)))
5237 '("README.rst" "CHANGES.rst"))
5238 (copy-recursively "build/sphinx/html" html)
5239 #t)))
5240 (replace 'check
5241 (lambda _
5242 ;; The import time test aborts if an import takes longer than
5243 ;; 100ms. It may very well take a little longer than that.
5244 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
5245 (home-page "https://github.com/jaraco/path.py")
5246 (synopsis "Python module wrapper for built-in os.path")
5247 (description
5248 "@code{path.py} implements path objects as first-class entities, allowing
5249 common operations on files to be invoked on those path objects directly.")
5250 (license license:expat)))
5251
5252 (define-public python2-pathpy
5253 (package-with-python2 python-pathpy))
5254
5255 (define-public python-simplegeneric
5256 (package
5257 (name "python-simplegeneric")
5258 (version "0.8.1")
5259 (source
5260 (origin
5261 (method url-fetch)
5262 (uri (pypi-uri "simplegeneric" version ".zip"))
5263 (sha256
5264 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5265 (build-system python-build-system)
5266 (native-inputs
5267 `(("unzip" ,unzip)))
5268 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5269 (synopsis "Python module for simple generic functions")
5270 (description
5271 "The simplegeneric module lets you define simple single-dispatch generic
5272 functions, akin to Python’s built-in generic functions like @code{len()},
5273 @code{iter()} and so on. However, instead of using specially-named methods,
5274 these generic functions use simple lookup tables, akin to those used by
5275 e.g. @code{pickle.dump()} and other generic functions found in the Python
5276 standard library.")
5277 (license license:zpl2.1)))
5278
5279 (define-public python2-simplegeneric
5280 (package-with-python2 python-simplegeneric))
5281
5282 (define-public python-ipython-genutils
5283 ;; TODO: This package is retired, check if can be removed, see description.
5284 (package
5285 (name "python-ipython-genutils")
5286 (version "0.1.0")
5287 (source
5288 (origin
5289 (method url-fetch)
5290 (uri (pypi-uri "ipython_genutils" version))
5291 (sha256
5292 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5293 (build-system python-build-system)
5294 (arguments `(#:tests? #f)) ; no tests
5295 (home-page "https://ipython.org")
5296 (synopsis "Vestigial utilities from IPython")
5297 (description
5298 "This package provides retired utilities from IPython. No packages
5299 outside IPython/Jupyter should depend on it.
5300
5301 This package shouldn't exist. It contains some common utilities shared by
5302 Jupyter and IPython projects during The Big Split. As soon as possible, those
5303 packages will remove their dependency on this, and this package will go
5304 away.")
5305 (license license:bsd-3)))
5306
5307 (define-public python2-ipython-genutils
5308 (package-with-python2 python-ipython-genutils))
5309
5310 (define-public python-traitlets
5311 (package
5312 (name "python-traitlets")
5313 (version "4.3.3")
5314 (source
5315 (origin
5316 (method url-fetch)
5317 (uri (pypi-uri "traitlets" version))
5318 (sha256
5319 (base32
5320 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
5321 (build-system python-build-system)
5322 (arguments
5323 `(#:phases
5324 (modify-phases %standard-phases
5325 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5326 (propagated-inputs
5327 `(("python-ipython-genutils" ,python-ipython-genutils)
5328 ("python-decorator" ,python-decorator)))
5329 (native-inputs
5330 `(("python-pytest" ,python-pytest)))
5331 (properties `((python2-variant . ,(delay python2-traitlets))))
5332 (home-page "https://ipython.org")
5333 (synopsis "Configuration system for Python applications")
5334 (description
5335 "Traitlets is a framework that lets Python classes have attributes with
5336 type checking, dynamically calculated default values, and ‘on change’
5337 callbacks. The package also includes a mechanism to use traitlets for
5338 configuration, loading values from files or from command line arguments. This
5339 is a distinct layer on top of traitlets, so you can use traitlets in your code
5340 without using the configuration machinery.")
5341 (license license:bsd-3)))
5342
5343 (define-public python2-traitlets
5344 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5345 (package
5346 (inherit traitlets)
5347 (propagated-inputs
5348 `(("python2-enum34" ,python2-enum34)
5349 ,@(package-propagated-inputs traitlets))))))
5350
5351 (define-public python-jupyter-core
5352 (package
5353 (name "python-jupyter-core")
5354 (version "4.4.0")
5355 (source
5356 (origin
5357 (method url-fetch)
5358 (uri (string-append (pypi-uri "jupyter_core" version)))
5359 (sha256
5360 (base32
5361 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5362 (build-system python-build-system)
5363 ;; FIXME: not sure how to run the tests
5364 (arguments `(#:tests? #f))
5365 (propagated-inputs
5366 `(("python-traitlets" ,python-traitlets)))
5367 (home-page "http://jupyter.org/")
5368 (synopsis "Jupyter base package")
5369 (description
5370 "Jupyter core is the base package on which Jupyter projects rely.")
5371 (license license:bsd-3)))
5372
5373 (define-public python2-jupyter-core
5374 (package-with-python2 python-jupyter-core))
5375
5376 (define-public python-jupyter-client
5377 (package
5378 (name "python-jupyter-client")
5379 (version "5.2.4")
5380 (source
5381 (origin
5382 (method url-fetch)
5383 (uri (pypi-uri "jupyter_client" version))
5384 (sha256
5385 (base32
5386 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5387 (build-system python-build-system)
5388 ;; Tests fail because of missing native python kernel which I assume is
5389 ;; provided by the ipython package, which we cannot use because it would
5390 ;; cause a dependency cycle.
5391 (arguments
5392 `(#:tests? #f
5393
5394 #:phases (modify-phases %standard-phases
5395 (add-after 'unpack 'set-tool-file-names
5396 (lambda* (#:key inputs #:allow-other-keys)
5397 (let ((iproute (assoc-ref inputs "iproute")))
5398 (substitute* "jupyter_client/localinterfaces.py"
5399 (("'ip'")
5400 (string-append "'" iproute "/sbin/ip'")))
5401 #t))))))
5402 (inputs
5403 `(("iproute" ,iproute)))
5404 (propagated-inputs
5405 `(("python-pyzmq" ,python-pyzmq)
5406 ("python-traitlets" ,python-traitlets)
5407 ("python-jupyter-core" ,python-jupyter-core)))
5408 (home-page "http://jupyter.org/")
5409 (synopsis "Jupyter protocol implementation and client libraries")
5410 (description
5411 "The @code{jupyter_client} package contains the reference implementation
5412 of the Jupyter protocol. It also provides client and kernel management APIs
5413 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5414 installing @code{kernelspec}s for use with Jupyter frontends.")
5415 (license license:bsd-3)))
5416
5417 (define-public python2-jupyter-client
5418 (package-with-python2 python-jupyter-client))
5419
5420 (define-public python-ipykernel
5421 (package
5422 (name "python-ipykernel")
5423 (version "5.1.1")
5424 (source
5425 (origin
5426 (method url-fetch)
5427 (uri (pypi-uri "ipykernel" version))
5428 (sha256
5429 (base32 "173nm29g85w8cac3fg40b27qaq26g41wgg6qn79ql1hq4w2n5sgh"))))
5430 (build-system python-build-system)
5431 (arguments
5432 `(#:phases
5433 (modify-phases %standard-phases
5434 (replace 'check
5435 (lambda _
5436 (setenv "HOME" "/tmp")
5437 (invoke "pytest" "-v")
5438 #t))
5439 (add-after 'install 'set-python-file-name
5440 (lambda* (#:key outputs #:allow-other-keys)
5441 ;; Record the absolute file name of the 'python' executable in
5442 ;; 'kernel.json'.
5443 (let ((out (assoc-ref outputs "out")))
5444 (substitute* (string-append out "/share/jupyter"
5445 "/kernels/python3/kernel.json")
5446 (("\"python\"")
5447 (string-append "\"" (which "python") "\"")))
5448 #t))))))
5449 (propagated-inputs
5450 `(("python-ipython" ,python-ipython)
5451 ;; imported at runtime during connect
5452 ("python-jupyter-client" ,python-jupyter-client)))
5453 (native-inputs
5454 `(("python-pytest" ,python-pytest)
5455 ("python-nose" ,python-nose)))
5456 (home-page "https://ipython.org")
5457 (synopsis "IPython Kernel for Jupyter")
5458 (description
5459 "This package provides the IPython kernel for Jupyter.")
5460 (license license:bsd-3)))
5461
5462 ;; Version 5.1.1 and above no longer support Python 2.
5463 (define-public python2-ipykernel
5464 (package
5465 (name "python2-ipykernel")
5466 (version "5.1.0")
5467 (source
5468 (origin
5469 (method url-fetch)
5470 (uri (pypi-uri "ipykernel" version))
5471 (sha256
5472 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5473 (build-system python-build-system)
5474 (arguments
5475 `(#:python ,python-2
5476 #:phases
5477 (modify-phases %standard-phases
5478 (replace 'check
5479 (lambda _
5480 (setenv "HOME" "/tmp")
5481 (invoke "pytest" "-v")
5482 #t)))))
5483 (propagated-inputs
5484 `(("python2-ipython" ,python2-ipython)
5485 ;; imported at runtime during connect
5486 ("python2-jupyter-client" ,python2-jupyter-client)))
5487 (native-inputs
5488 `(("python2-pytest" ,python2-pytest)
5489 ("python2-nose" ,python2-nose)))
5490 (home-page "https://ipython.org")
5491 (synopsis "IPython Kernel for Jupyter")
5492 (description
5493 "This package provides the IPython kernel for Jupyter.")
5494 (license license:bsd-3)))
5495
5496 (define-public python-pari-jupyter
5497 (package
5498 (name "python-pari-jupyter")
5499 (version "1.3.2")
5500 (source
5501 (origin
5502 (method url-fetch)
5503 (uri (pypi-uri "pari_jupyter" version))
5504 (sha256
5505 (base32
5506 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5507 (build-system python-build-system)
5508 (propagated-inputs
5509 `(("python-ipykernel" ,python-ipykernel)))
5510 (inputs
5511 `(("pari-gp" ,pari-gp)
5512 ("readline" ,readline)))
5513 (arguments
5514 `(#:tests? #f)) ; no test suite
5515 (home-page
5516 "https://github.com/jdemeyer/pari_jupyter")
5517 (synopsis "A Jupyter kernel for PARI/GP")
5518 (description "The package provides a PARI/GP kernel for Jupyter.")
5519 (license license:gpl3+)))
5520
5521 (define-public python-backcall
5522 (package
5523 (name "python-backcall")
5524 (version "0.1.0")
5525 (source
5526 (origin
5527 (method url-fetch)
5528 (uri (pypi-uri "backcall" version))
5529 (sha256
5530 (base32
5531 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5532 (build-system python-build-system)
5533 (home-page "https://github.com/takluyver/backcall/")
5534 (synopsis "Specifications for callback functions passed in to an API")
5535 (description
5536 "If your code lets other people supply callback functions, it's important
5537 to specify the function signature you expect, and check that functions support
5538 that. Adding extra parameters later would break other peoples code unless
5539 you're careful. The @code{backcall} package provides a way of specifying the
5540 callback signature using a prototype function.")
5541 (license license:bsd-3)))
5542
5543 ;; This is the latest release of the LTS version of ipython with support for
5544 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
5545 ;; dropped support for Python 2.7.
5546 (define-public python2-ipython
5547 (package
5548 (name "python2-ipython")
5549 (version "5.8.0")
5550 (source
5551 (origin
5552 (method url-fetch)
5553 (uri (pypi-uri "ipython" version ".tar.gz"))
5554 (sha256
5555 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5556 (build-system python-build-system)
5557 (propagated-inputs
5558 `(("python2-backports-shutil-get-terminal-size"
5559 ,python2-backports-shutil-get-terminal-size)
5560 ("python2-pathlib2" ,python2-pathlib2)
5561 ("python2-pyzmq" ,python2-pyzmq)
5562 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5563 ("python2-terminado" ,python2-terminado)
5564 ("python2-matplotlib" ,python2-matplotlib)
5565 ("python2-numpy" ,python2-numpy)
5566 ("python2-numpydoc" ,python2-numpydoc)
5567 ("python2-jinja2" ,python2-jinja2)
5568 ("python2-mistune" ,python2-mistune)
5569 ("python2-pexpect" ,python2-pexpect)
5570 ("python2-pickleshare" ,python2-pickleshare)
5571 ("python2-simplegeneric" ,python2-simplegeneric)
5572 ("python2-jsonschema" ,python2-jsonschema)
5573 ("python2-traitlets" ,python2-traitlets)
5574 ("python2-nbformat" ,python2-nbformat)
5575 ("python2-pygments" ,python2-pygments)))
5576 (inputs
5577 `(("readline" ,readline)
5578 ("which" ,which)))
5579 (native-inputs
5580 `(("graphviz" ,graphviz)
5581 ("pkg-config" ,pkg-config)
5582 ("python2-requests" ,python2-requests) ;; for tests
5583 ("python2-testpath" ,python2-testpath)
5584 ("python2-mock" ,python2-mock)
5585 ("python2-nose" ,python2-nose)))
5586 (arguments
5587 `(#:python ,python-2
5588 #:phases
5589 (modify-phases %standard-phases
5590 (add-before 'check 'delete-broken-tests
5591 (lambda* (#:key inputs #:allow-other-keys)
5592 ;; These tests throw errors for unknown reasons.
5593 (delete-file "IPython/core/tests/test_profile.py")
5594 (delete-file "IPython/core/tests/test_interactiveshell.py")
5595 (delete-file "IPython/core/tests/test_magic.py")
5596 #t)))))
5597 (home-page "https://ipython.org")
5598 (synopsis "IPython is a tool for interactive computing in Python")
5599 (description
5600 "IPython provides a rich architecture for interactive computing with:
5601 Powerful interactive shells, a browser-based notebook, support for interactive
5602 data visualization, embeddable interpreters and tools for parallel
5603 computing.")
5604 (license license:bsd-3)))
5605
5606 (define-public python-ipython
5607 (package
5608 (name "python-ipython")
5609 (version "7.5.0")
5610 (source
5611 (origin
5612 (method url-fetch)
5613 (uri (pypi-uri "ipython" version ".tar.gz"))
5614 (sha256
5615 (base32 "09mbxq37mfn88xjnib7qfzaq9krr7gf1jxwy1p6mcjr254082h78"))))
5616 (build-system python-build-system)
5617 (propagated-inputs
5618 `(("python-backcall" ,python-backcall)
5619 ("python-pyzmq" ,python-pyzmq)
5620 ("python-prompt-toolkit" ,python-prompt-toolkit)
5621 ("python-terminado" ,python-terminado)
5622 ("python-matplotlib" ,python-matplotlib)
5623 ("python-numpy" ,python-numpy)
5624 ("python-numpydoc" ,python-numpydoc)
5625 ("python-jedi" ,python-jedi)
5626 ("python-jinja2" ,python-jinja2)
5627 ("python-mistune" ,python-mistune)
5628 ("python-pexpect" ,python-pexpect)
5629 ("python-pickleshare" ,python-pickleshare)
5630 ("python-simplegeneric" ,python-simplegeneric)
5631 ("python-jsonschema" ,python-jsonschema)
5632 ("python-traitlets" ,python-traitlets)
5633 ("python-nbformat" ,python-nbformat)
5634 ("python-pygments" ,python-pygments)))
5635 (inputs
5636 `(("readline" ,readline)
5637 ("which" ,which)))
5638 (native-inputs
5639 `(("graphviz" ,graphviz)
5640 ("pkg-config" ,pkg-config)
5641 ("python-requests" ,python-requests) ;; for tests
5642 ("python-testpath" ,python-testpath)
5643 ("python-nose" ,python-nose)))
5644 (arguments
5645 `(#:phases
5646 (modify-phases %standard-phases
5647 (add-after 'unpack 'make-docs-reproducible
5648 (lambda _
5649 (substitute* "IPython/sphinxext/ipython_directive.py"
5650 ((".*import datetime") "")
5651 ((".*datetime.datetime.now\\(\\)") "")
5652 (("%timeit") "# %timeit"))
5653 #t))
5654 ;; Tests can only be run after the library has been installed and not
5655 ;; within the source directory.
5656 (delete 'check)
5657 (add-after 'install 'check
5658 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5659 (if tests?
5660 (begin
5661 ;; Make installed package available for running the tests
5662 (add-installed-pythonpath inputs outputs)
5663 (setenv "HOME" "/tmp/") ;; required by a test
5664 ;; We only test the core because one of the other tests
5665 ;; tries to import ipykernel.
5666 (invoke "python" "IPython/testing/iptest.py"
5667 "-v" "IPython/core/tests"))
5668 #t)))
5669 (add-before 'check 'fix-tests
5670 (lambda* (#:key inputs #:allow-other-keys)
5671 (substitute* "./IPython/utils/_process_posix.py"
5672 (("/usr/bin/env', 'which") (which "which")))
5673 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5674 (("#!/usr/bin/env python")
5675 (string-append "#!" (which "python"))))
5676 ;; This test introduces a circular dependency on ipykernel
5677 ;; (which depends on ipython).
5678 (delete-file "IPython/core/tests/test_display.py")
5679 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
5680 (delete-file "IPython/core/tests/test_interactiveshell.py")
5681 #t)))))
5682 (home-page "https://ipython.org")
5683 (synopsis "IPython is a tool for interactive computing in Python")
5684 (description
5685 "IPython provides a rich architecture for interactive computing with:
5686 Powerful interactive shells, a browser-based notebook, support for interactive
5687 data visualization, embeddable interpreters and tools for parallel
5688 computing.")
5689 (license license:bsd-3)))
5690
5691 (define-public python-ipython-documentation
5692 (package
5693 (inherit python-ipython)
5694 (name "python-ipython-documentation")
5695 (version (package-version python-ipython))
5696 (arguments
5697 `(#:phases
5698 (modify-phases %standard-phases
5699 (delete 'build)
5700 (delete 'check)
5701 (replace 'install
5702 (lambda* (#:key outputs #:allow-other-keys)
5703 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5704 (doc (string-append data "/doc/" ,name "-" ,version))
5705 (html (string-append doc "/html"))
5706 (man1 (string-append data "/man/man1"))
5707 (info (string-append data "/info"))
5708 (examples (string-append doc "/examples"))
5709 (python-arg (string-append "PYTHON=" (which "python"))))
5710 (setenv "LANG" "en_US.utf8")
5711 (with-directory-excursion "docs"
5712 ;; FIXME: pdf fails to build
5713 ;;(system* "make" "pdf" "PAPER=a4")
5714 (system* "make" python-arg "html")
5715 ;; FIXME: the generated texi file contains ^@^@, which trips
5716 ;; up the parser.
5717 ;; (system* "make" python-arg "info")
5718 )
5719 (copy-recursively "docs/man" man1)
5720 (copy-recursively "examples" examples)
5721 (copy-recursively "docs/build/html" html)
5722 ;; (copy-file "docs/build/latex/ipython.pdf"
5723 ;; (string-append doc "/ipython.pdf"))
5724 (mkdir-p info)
5725 ;; (copy-file "docs/build/texinfo/ipython.info"
5726 ;; (string-append info "/ipython.info"))
5727 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5728 #t)))))
5729 (inputs
5730 `(("python-ipython" ,python-ipython)
5731 ("python-ipykernel" ,python-ipykernel)))
5732 (native-inputs
5733 `(("python-sphinx" ,python-sphinx)
5734 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
5735 ;; FIXME: It's possible that a smaller union would work just as well.
5736 ("texlive" ,(texlive-union (list texlive-amsfonts
5737 texlive-fonts-ec
5738 texlive-generic-ifxetex
5739 texlive-generic-pdftex
5740 texlive-latex-capt-of
5741 texlive-latex-cmap
5742 texlive-latex-environ
5743 texlive-latex-eqparbox
5744 texlive-latex-etoolbox
5745 texlive-latex-expdlist
5746 texlive-latex-fancyhdr
5747 texlive-latex-fancyvrb
5748 texlive-latex-fncychap
5749 texlive-latex-float
5750 texlive-latex-framed
5751 texlive-latex-geometry
5752 texlive-latex-graphics
5753 texlive-latex-hyperref
5754 texlive-latex-mdwtools
5755 texlive-latex-multirow
5756 texlive-latex-needspace
5757 texlive-latex-oberdiek
5758 texlive-latex-parskip
5759 texlive-latex-preview
5760 texlive-latex-tabulary
5761 texlive-latex-threeparttable
5762 texlive-latex-titlesec
5763 texlive-latex-trimspaces
5764 texlive-latex-ucs
5765 texlive-latex-upquote
5766 texlive-latex-url
5767 texlive-latex-varwidth
5768 texlive-latex-wrapfig)))
5769 ("texinfo" ,texinfo)))))
5770
5771 (define-public python-urwid
5772 (package
5773 (name "python-urwid")
5774 (version "2.0.1")
5775 (source
5776 (origin
5777 (method url-fetch)
5778 (uri (pypi-uri "urwid" version))
5779 (sha256
5780 (base32
5781 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5782 (build-system python-build-system)
5783 (home-page "http://urwid.org")
5784 (synopsis "Console user interface library for Python")
5785 (description
5786 "Urwid is a curses-based UI/widget library for Python. It includes many
5787 features useful for text console applications.")
5788 (license license:lgpl2.1+)))
5789
5790 (define-public python2-urwid
5791 (package-with-python2 python-urwid))
5792
5793 (define-public python-urwidtrees
5794 (package
5795 (name "python-urwidtrees")
5796 (version "1.0.2")
5797 (source
5798 (origin
5799 (method url-fetch)
5800 ;; package author intends on distributing via github rather than pypi:
5801 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5802 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5803 version ".tar.gz"))
5804 (file-name (string-append name "-" version ".tar.gz"))
5805 (sha256
5806 (base32
5807 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5808 (build-system python-build-system)
5809 (arguments
5810 '(#:tests? #f)) ; no tests
5811 (propagated-inputs `(("python-urwid" ,python-urwid)))
5812 (home-page "https://github.com/pazz/urwidtrees")
5813 (synopsis "Tree widgets for urwid")
5814 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5815 toolkit. Use it to build trees of widgets.")
5816 (license license:gpl3+)))
5817
5818 (define-public python2-urwidtrees
5819 (package-with-python2 python-urwidtrees))
5820
5821 (define-public python-ua-parser
5822 (package
5823 (name "python-ua-parser")
5824 (version "0.8.0")
5825 (source
5826 (origin
5827 (method url-fetch)
5828 (uri (pypi-uri "ua-parser" version))
5829 (sha256
5830 (base32
5831 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5832 (build-system python-build-system)
5833 (arguments
5834 `(#:tests? #f)) ;no test suite in release
5835 (native-inputs
5836 `(("python-pyyaml" ,python-pyyaml)))
5837 (home-page "https://github.com/ua-parser/uap-python")
5838 (synopsis "User agent parser")
5839 (description
5840 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5841 (license license:asl2.0)))
5842
5843 (define-public python2-ua-parser
5844 (package-with-python2 python-ua-parser))
5845
5846 (define-public python-user-agents
5847 (package
5848 (name "python-user-agents")
5849 (version "1.1.0")
5850 (source
5851 (origin
5852 (method url-fetch)
5853 (uri (pypi-uri "user-agents" version))
5854 (sha256
5855 (base32
5856 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5857 (build-system python-build-system)
5858 (arguments
5859 `(#:tests? #f)) ;missing devices.json test file in release
5860 (propagated-inputs
5861 `(("python-ua-parser" ,python-ua-parser)))
5862 (home-page "https://github.com/selwin/python-user-agents")
5863 (synopsis "User Agent strings parsing library")
5864 (description
5865 "A library to identify devices (phones, tablets) and their capabilities by
5866 parsing (browser/HTTP) user agent strings.")
5867 (license license:expat)))
5868
5869 (define-public python2-user-agents
5870 (package-with-python2 python-user-agents))
5871
5872 (define-public python-dbus
5873 (package
5874 (name "python-dbus")
5875 (version "1.2.8")
5876 (source
5877 (origin
5878 (method url-fetch)
5879 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5880 "dbus-python-" version ".tar.gz"))
5881 (sha256
5882 (base32
5883 "0vvvjmiwnc9cjlks3gcdk43ap7llhlpz7cm1wbw0nc2yfsxjpwdb"))))
5884 (build-system gnu-build-system)
5885 (arguments
5886 '(#:phases
5887 (modify-phases %standard-phases
5888 (add-before
5889 'check 'pre-check
5890 (lambda _
5891 ;; XXX: For the missing '/etc/machine-id'.
5892 (substitute* "test/run-test.sh"
5893 (("DBUS_FATAL_WARNINGS=1")
5894 "DBUS_FATAL_WARNINGS=0"))
5895 #t)))))
5896 (native-inputs
5897 `(("pkg-config" ,pkg-config)))
5898 (inputs
5899 `(("python" ,python-wrapper)
5900 ("dbus-glib" ,dbus-glib)))
5901 (synopsis "Python bindings for D-bus")
5902 (description "python-dbus provides bindings for libdbus, the reference
5903 implementation of D-Bus.")
5904 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5905 (license license:expat)))
5906
5907 (define-public python2-dbus
5908 (package (inherit python-dbus)
5909 (name "python2-dbus")
5910 (inputs `(("python" ,python-2)
5911 ,@(alist-delete "python"
5912 (package-inputs python-dbus)
5913 equal?)))
5914 ;; FIXME: on Python 2, the test_utf8 fails with:
5915 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5916 (arguments `(#:tests? #f))))
5917
5918 (define-public python-notify2
5919 (package
5920 (name "python-notify2")
5921 (version "0.3.1")
5922 (source
5923 (origin
5924 (method url-fetch)
5925 (uri (pypi-uri "notify2" version))
5926 (sha256
5927 (base32
5928 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
5929 (build-system python-build-system)
5930 (arguments `(#:tests? #f)) ; tests depend on system state
5931 (native-inputs
5932 `(("python-dbus" ,python-dbus)))
5933 (home-page "https://bitbucket.org/takluyver/pynotify2")
5934 (synopsis "Python interface to D-Bus notifications")
5935 (description
5936 "Pynotify2 provides a Python interface for sending D-Bus notifications.
5937 It is a reimplementation of pynotify in pure Python, and an alternative to
5938 the GObject Introspection bindings to libnotify for non-GTK applications.")
5939 (license (list license:bsd-2
5940 license:lgpl2.1+))))
5941
5942 (define-public python2-notify2
5943 (package-with-python2 python-notify2))
5944
5945 (define-public python-lxml
5946 (package
5947 (name "python-lxml")
5948 (version "4.2.5")
5949 (source
5950 (origin
5951 (method url-fetch)
5952 (uri (pypi-uri "lxml" version))
5953 (sha256
5954 (base32
5955 "0zw0y9hs0nflxhl9cs6ipwwh53szi3w2x06wl0k9cylyqac0cwin"))))
5956 (build-system python-build-system)
5957 (inputs
5958 `(("libxml2" ,libxml2)
5959 ("libxslt" ,libxslt)))
5960 (home-page "http://lxml.de/")
5961 (synopsis
5962 "Python XML processing library")
5963 (description
5964 "The lxml XML toolkit is a Pythonic binding for the C libraries
5965 libxml2 and libxslt.")
5966 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5967
5968 (define-public python2-lxml
5969 (package-with-python2 python-lxml))
5970
5971 ;; beautifulsoup4 has a totally different namespace than 3.x,
5972 ;; and pypi seems to put it under its own name, so I guess we should too
5973 (define-public python-beautifulsoup4
5974 (package
5975 (name "python-beautifulsoup4")
5976 (version "4.7.1")
5977 (source
5978 (origin
5979 (method url-fetch)
5980 (uri (pypi-uri "beautifulsoup4" version))
5981 (sha256
5982 (base32
5983 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
5984 (build-system python-build-system)
5985 (arguments
5986 `(#:phases
5987 (modify-phases %standard-phases
5988 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5989 ;; must use this conversion script when building with Python 3. The
5990 ;; conversion script also runs the tests.
5991 ;; For more information, see the file 'convert-py3k' in the source
5992 ;; distribution.
5993 (replace 'check
5994 (lambda _ (invoke "./convert-py3k"))))))
5995 (propagated-inputs
5996 `(("python-soupsieve" ,python-soupsieve)))
5997 (home-page
5998 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5999 (synopsis
6000 "Python screen-scraping library")
6001 (description
6002 "Beautiful Soup is a Python library designed for rapidly setting up
6003 screen-scraping projects. It offers Pythonic idioms for navigating,
6004 searching, and modifying a parse tree, providing a toolkit for
6005 dissecting a document and extracting what you need. It automatically
6006 converts incoming documents to Unicode and outgoing documents to UTF-8.")
6007 (license license:expat)
6008 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
6009
6010 (define-public python2-beautifulsoup4
6011 (package
6012 (inherit (package-with-python2
6013 (strip-python2-variant python-beautifulsoup4)))
6014 (arguments `(#:python ,python-2))))
6015
6016 (define-public python-soupsieve
6017 (package
6018 (name "python-soupsieve")
6019 (version "1.9.2")
6020 (source
6021 (origin
6022 (method url-fetch)
6023 (uri (pypi-uri "soupsieve" version))
6024 (sha256
6025 (base32
6026 "0in9rc9q3h8w5b4qf7kvl3qxcvw6vrz35ckblchgf70hm6pg3dbj"))))
6027 (build-system python-build-system)
6028 (arguments `(#:tests? #f))
6029 ;;XXX: 2 tests fail currently despite claming they were to be
6030 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
6031 ;;don't want to create a circular dependency.
6032 (home-page "https://github.com/facelessuser/soupsieve")
6033 (synopsis "CSS selector library")
6034 (description
6035 "Soup Sieve is a CSS selector library designed to be used with Beautiful
6036 Soup 4. It aims to provide selecting, matching, and filtering using modern
6037 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
6038 specifications up through the latest CSS level 4 drafts and beyond (though
6039 some are not yet implemented).")
6040 (properties `((python2-variant . ,(delay python2-soupsieve))))
6041 (license license:expat)))
6042
6043 (define-public python2-soupsieve
6044 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
6045 (package
6046 (inherit base)
6047 (propagated-inputs
6048 `(("python2-backports-functools-lru-cache"
6049 ,python2-backports-functools-lru-cache)
6050 ,@(package-propagated-inputs base))))))
6051
6052 (define-public python-netifaces
6053 (package
6054 (name "python-netifaces")
6055 (version "0.10.7")
6056 (source
6057 (origin
6058 (method url-fetch)
6059 (uri (pypi-uri "netifaces" version))
6060 (sha256
6061 (base32
6062 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
6063 (build-system python-build-system)
6064 (home-page "https://github.com/al45tair/netifaces")
6065 (synopsis
6066 "Python module for portable network interface information")
6067 (description
6068 "Netifaces is a Python module providing information on network
6069 interfaces in an easy and portable manner.")
6070 (license license:expat)))
6071
6072 (define-public python2-netifaces
6073 (package-with-python2 python-netifaces))
6074
6075 (define-public python-networkx
6076 (package
6077 (name "python-networkx")
6078 (version "2.2")
6079 (source
6080 (origin
6081 (method url-fetch)
6082 (uri (pypi-uri "networkx" version ".zip"))
6083 (sha256
6084 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
6085 (build-system python-build-system)
6086 ;; python-decorator is needed at runtime.
6087 (propagated-inputs
6088 `(("python-decorator" ,python-decorator)))
6089 (native-inputs
6090 `(("python-nose" ,python-nose)
6091 ("unzip" ,unzip)))
6092 (home-page "https://networkx.github.io/")
6093 (synopsis "Python module for creating and manipulating graphs and networks")
6094 (description
6095 "NetworkX is a Python package for the creation, manipulation, and study
6096 of the structure, dynamics, and functions of complex networks.")
6097 (license license:bsd-3)))
6098
6099 (define-public python2-networkx
6100 (package-with-python2 python-networkx))
6101
6102 (define-public python-datrie
6103 (package
6104 (name "python-datrie")
6105 (version "0.8")
6106 (source
6107 (origin
6108 (method url-fetch)
6109 (uri (pypi-uri "datrie" version))
6110 (sha256
6111 (base32
6112 "0338r8xgmpy78556jhms0h6qkvyjr10p8bpgdvcpqzm9lrmxmmdx"))))
6113 (build-system python-build-system)
6114 (native-inputs
6115 `(("python-cython" ,python-cython)
6116 ("python-hypothesis" ,python-hypothesis)
6117 ("python-pytest" ,python-pytest)
6118 ("python-pytest-runner" ,python-pytest-runner)))
6119 (home-page "https://github.com/kmike/datrie")
6120 (synopsis "Fast, efficiently stored trie for Python")
6121 (description
6122 "This package provides a fast, efficiently stored trie implementation for
6123 Python.")
6124 (license license:lgpl2.1+)))
6125
6126 (define-public snakemake
6127 (package
6128 (name "snakemake")
6129 (version "5.2.4")
6130 (source
6131 (origin
6132 (method url-fetch)
6133 (uri (pypi-uri "snakemake" version))
6134 (sha256
6135 (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z"))))
6136 (build-system python-build-system)
6137 (arguments
6138 ;; TODO: Package missing test dependencies.
6139 '(#:tests? #f
6140 #:phases
6141 (modify-phases %standard-phases
6142 ;; For cluster execution Snakemake will call Python. Since there is
6143 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
6144 ;; this by calling the snakemake wrapper instead.
6145 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
6146 (lambda* (#:key outputs #:allow-other-keys)
6147 (substitute* "snakemake/executors.py"
6148 (("\\{sys.executable\\} -m snakemake")
6149 (string-append (assoc-ref outputs "out")
6150 "/bin/snakemake")))
6151 #t)))))
6152 (propagated-inputs
6153 `(("python-gitpython" ,python-gitpython)
6154 ("python-wrapt" ,python-wrapt)
6155 ("python-requests" ,python-requests)
6156 ("python-appdirs" ,python-appdirs)
6157 ("python-configargparse" ,python-configargparse)
6158 ("python-datrie" ,python-datrie)
6159 ("python-docutils" ,python-docutils)
6160 ("python-jinja2" ,python-jinja2)
6161 ("python-jsonschema" ,python-jsonschema)
6162 ("python-networkx" ,python-networkx)
6163 ("python-pyyaml" ,python-pyyaml)
6164 ("python-ratelimiter" ,python-ratelimiter)))
6165 (home-page "https://snakemake.readthedocs.io")
6166 (synopsis "Python-based execution environment for make-like workflows")
6167 (description
6168 "Snakemake aims to reduce the complexity of creating workflows by
6169 providing a clean and modern domain specific specification language (DSL) in
6170 Python style, together with a fast and comfortable execution environment.")
6171 (license license:expat)))
6172
6173 ;; This is currently needed for the pigx-* packages.
6174 (define-public snakemake-4
6175 (package (inherit snakemake)
6176 (version "4.4.0")
6177 (source
6178 (origin
6179 (method url-fetch)
6180 (uri (pypi-uri "snakemake" version))
6181 (sha256
6182 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
6183 (propagated-inputs
6184 `(("python-wrapt" ,python-wrapt)
6185 ("python-requests" ,python-requests)
6186 ("python-appdirs" ,python-appdirs)
6187 ("python-configargparse" ,python-configargparse)
6188 ("python-pyyaml" ,python-pyyaml)
6189 ("python-ratelimiter" ,python-ratelimiter)))))
6190
6191 (define-public python-pyqrcode
6192 (package
6193 (name "python-pyqrcode")
6194 (version "1.2.1")
6195 (source
6196 (origin
6197 (method url-fetch)
6198 (uri (pypi-uri "PyQRCode" version))
6199 (sha256
6200 (base32
6201 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
6202 (build-system python-build-system)
6203 (home-page
6204 "https://github.com/mnooner256/pyqrcode")
6205 (synopsis "QR code generator")
6206 (description
6207 "Pyqrcode is a QR code generator written purely in Python with
6208 SVG, EPS, PNG and terminal output.")
6209 (license license:bsd-3)))
6210
6211 (define-public python-seaborn
6212 (package
6213 (name "python-seaborn")
6214 (version "0.9.0")
6215 (source
6216 (origin
6217 (method url-fetch)
6218 (uri (pypi-uri "seaborn" version))
6219 (sha256
6220 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
6221 (build-system python-build-system)
6222 (arguments
6223 `(#:phases
6224 (modify-phases %standard-phases
6225 (add-before 'check 'start-xserver
6226 (lambda* (#:key inputs #:allow-other-keys)
6227 (let ((xorg-server (assoc-ref inputs "xorg-server")))
6228 ;; There must be a running X server and make check doesn't
6229 ;; start one. Therefore we must do it.
6230 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
6231 (setenv "DISPLAY" ":1")
6232 #t)))
6233 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
6234 (propagated-inputs
6235 `(("python-pandas" ,python-pandas)
6236 ("python-matplotlib" ,python-matplotlib)
6237 ("python-numpy" ,python-numpy)
6238 ("python-scipy" ,python-scipy)))
6239 (native-inputs
6240 `(("python-pytest" ,python-pytest)
6241 ("xorg-server" ,xorg-server)))
6242 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6243 (synopsis "Statistical data visualization")
6244 (description
6245 "Seaborn is a library for making attractive and informative statistical
6246 graphics in Python. It is built on top of matplotlib and tightly integrated
6247 with the PyData stack, including support for numpy and pandas data structures
6248 and statistical routines from scipy and statsmodels.")
6249 (license license:bsd-3)))
6250
6251 (define-public python2-seaborn
6252 (package-with-python2 python-seaborn))
6253
6254 (define-public python-mpmath
6255 (package
6256 (name "python-mpmath")
6257 (version "0.19")
6258 (source (origin
6259 (method url-fetch)
6260 (uri (string-append "http://mpmath.org/files/mpmath-"
6261 version ".tar.gz"))
6262 (sha256
6263 (base32
6264 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6265 (build-system python-build-system)
6266 (arguments
6267 '(#:phases
6268 (modify-phases %standard-phases
6269 (replace 'check
6270 (lambda _
6271 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
6272 (home-page "http://mpmath.org")
6273 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6274 (description
6275 "@code{mpmath} can be used as an arbitrary-precision substitute for
6276 Python's float/complex types and math/cmath modules, but also does much
6277 more advanced mathematics.")
6278 (license license:bsd-3)))
6279
6280 (define-public python2-mpmath
6281 (package-with-python2 python-mpmath))
6282
6283 (define-public python-bigfloat
6284 (package
6285 (name "python-bigfloat")
6286 (version "0.3.0")
6287 (source
6288 (origin
6289 (method url-fetch)
6290 (uri (pypi-uri "bigfloat" version))
6291 (sha256
6292 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6293 (build-system python-build-system)
6294 (inputs
6295 `(("mpfr" ,mpfr)))
6296 (home-page "https://github.com/mdickinson/bigfloat")
6297 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6298 (description
6299 "This package provides a Python interface to the MPFR library for
6300 multiprecision arithmetic.")
6301 (license license:lgpl3+)))
6302
6303 (define-public python2-bigfloat
6304 (package-with-python2 python-bigfloat))
6305
6306 (define-public python-sympy
6307 (package
6308 (name "python-sympy")
6309 (version "1.1.1")
6310 (source
6311 (origin
6312 (method url-fetch)
6313 (uri (string-append
6314 "https://github.com/sympy/sympy/releases/download/sympy-"
6315 version "/sympy-" version ".tar.gz"))
6316 (sha256
6317 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6318 (build-system python-build-system)
6319 (arguments
6320 `(#:phases
6321 (modify-phases %standard-phases
6322 ;; Run the core tests after installation. By default it would run
6323 ;; *all* tests, which take a very long time to complete and are known
6324 ;; to be flaky.
6325 (delete 'check)
6326 (add-after 'install 'check
6327 (lambda* (#:key outputs #:allow-other-keys)
6328 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6329 #t)))))
6330 (propagated-inputs
6331 `(("python-mpmath" ,python-mpmath)))
6332 (home-page "http://www.sympy.org/")
6333 (synopsis "Python library for symbolic mathematics")
6334 (description
6335 "SymPy is a Python library for symbolic mathematics. It aims to become a
6336 full-featured computer algebra system (CAS) while keeping the code as simple
6337 as possible in order to be comprehensible and easily extensible.")
6338 (license license:bsd-3)))
6339
6340 (define-public python2-sympy
6341 (package
6342 (inherit (package-with-python2 python-sympy))
6343 (arguments
6344 `(#:phases
6345 (modify-phases %standard-phases
6346 ;; Run the core tests after installation. By default it would run
6347 ;; *all* tests, which take a very long time to complete and are known
6348 ;; to be flaky.
6349 (delete 'check)
6350 (add-after 'install 'check
6351 (lambda* (#:key outputs #:allow-other-keys)
6352 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6353 #t)))))))
6354
6355 (define-public python-q
6356 (package
6357 (name "python-q")
6358 (version "2.6")
6359 (source
6360 (origin
6361 (method url-fetch)
6362 (uri (pypi-uri "q" version))
6363 (sha256
6364 (base32
6365 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6366 (build-system python-build-system)
6367 (home-page "https://github.com/zestyping/q")
6368 (synopsis "Quick-and-dirty debugging output for tired programmers")
6369 (description
6370 "q is a Python module for \"print\" style of debugging Python code. It
6371 provides convenient short API for print out of values, tracebacks, and
6372 falling into the Python interpreter.")
6373 (license license:asl2.0)))
6374
6375 (define-public python2-q
6376 (package-with-python2 python-q))
6377
6378 (define-public python2-xlib
6379 (package
6380 (name "python2-xlib")
6381 (version "0.14")
6382 (source (origin
6383 (method url-fetch)
6384 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6385 "/" version "/"
6386 "python-xlib-" version ".tar.gz"))
6387 (sha256
6388 (base32
6389 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6390 (build-system python-build-system)
6391 (arguments
6392 `(#:python ,python-2 ;Python 2 only
6393 #:tests? #f)) ;no tests
6394 (home-page "http://python-xlib.sourceforge.net/")
6395 (synopsis "Python X11 client library")
6396 (description
6397 "The Python X Library is intended to be a fully functional X client
6398 library for Python programs. It is useful to implement low-level X clients.
6399 It is written entirely in Python.")
6400 (license license:gpl2+)))
6401
6402 (define-public python-singledispatch
6403 (package
6404 (name "python-singledispatch")
6405 (version "3.4.0.3")
6406 (source
6407 (origin
6408 (method url-fetch)
6409 (uri (pypi-uri "singledispatch" version))
6410 (sha256
6411 (base32
6412 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6413 (build-system python-build-system)
6414 (native-inputs
6415 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6416 (home-page
6417 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6418 (synopsis "Backport of singledispatch feature from Python 3.4")
6419 (description
6420 "This library brings functools.singledispatch from Python 3.4 to Python
6421 2.6-3.3.")
6422 (license license:expat)))
6423
6424 (define-public python2-singledispatch
6425 (package-with-python2 python-singledispatch))
6426
6427 ;; the python- version can be removed with python-3.5
6428 (define-public python-backports-abc
6429 (package
6430 (name "python-backports-abc")
6431 (version "0.5")
6432 (source
6433 (origin
6434 (method url-fetch)
6435 (uri (pypi-uri "backports_abc" version))
6436 (sha256
6437 (base32
6438 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6439 (build-system python-build-system)
6440 (home-page "https://github.com/cython/backports_abc")
6441 (synopsis "Backport of additions to the 'collections.abc' module")
6442 (description
6443 "Python-backports-abc provides a backport of additions to the
6444 @code{collections.abc} module in Python-3.5.")
6445 (license license:psfl)))
6446
6447 (define-public python2-backports-abc
6448 (package-with-python2 python-backports-abc))
6449
6450 (define-public python-backports-csv
6451 (package
6452 (name "python-backports-csv")
6453 (version "1.0.5")
6454 (source
6455 (origin
6456 (method url-fetch)
6457 (uri (pypi-uri "backports.csv" version))
6458 (sha256
6459 (base32
6460 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6461 (build-system python-build-system)
6462 (home-page "https://github.com/ryanhiebert/backports.csv")
6463 (synopsis "Backport of Python 3's csv module for Python 2")
6464 (description
6465 "Provides a backport of Python 3's @code{csv} module for parsing
6466 comma separated values. The API of the @code{csv} module in Python 2
6467 is drastically different from the @code{csv} module in Python 3.
6468 This is due, for the most part, to the difference between str in
6469 Python 2 and Python 3.")
6470 (license license:psfl)))
6471
6472 (define-public python2-backports-csv
6473 (package-with-python2 python-backports-csv))
6474
6475 (define-public python2-backports-shutil-get-terminal-size
6476 (package
6477 (name "python2-backports-shutil-get-terminal-size")
6478 (version "1.0.0")
6479 (source
6480 (origin
6481 (method url-fetch)
6482 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6483 (sha256
6484 (base32
6485 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6486 (build-system python-build-system)
6487 (arguments
6488 `(#:python ,python-2
6489 #:phases
6490 (modify-phases %standard-phases
6491 (replace 'check
6492 (lambda _
6493 (invoke "py.test" "-v"))))))
6494 (native-inputs
6495 `(("python2-pytest" ,python2-pytest)))
6496 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6497 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6498 (description
6499 "This package provides a backport of the @code{get_terminal_size
6500 function} from Python 3.3's @code{shutil}.
6501 Unlike the original version it is written in pure Python rather than C,
6502 so it might be a tiny bit slower.")
6503 (license license:expat)))
6504
6505 (define-public python-waf
6506 (package
6507 (name "python-waf")
6508 (version "2.0.11")
6509 (source (origin
6510 (method url-fetch)
6511 (uri (string-append "https://waf.io/"
6512 "waf-" version ".tar.bz2"))
6513 (sha256
6514 (base32
6515 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
6516 (build-system python-build-system)
6517 (arguments
6518 '(#:phases
6519 (modify-phases %standard-phases
6520 (replace 'build
6521 (lambda _
6522 (invoke "python" "waf-light" "configure" "build")))
6523 (replace 'check
6524 (lambda _
6525 (invoke "python" "waf" "--version")))
6526 (replace 'install
6527 (lambda* (#:key outputs #:allow-other-keys)
6528 (let ((out (assoc-ref outputs "out")))
6529 (install-file "waf" (string-append out "/bin")))
6530 #t))
6531 ;; waf breaks when it is wrapped.
6532 (delete 'wrap))))
6533 (home-page "https://waf.io/")
6534 (synopsis "Python-based build system")
6535 (description
6536 "Waf is a Python-based framework for configuring, compiling and installing
6537 applications.")
6538 (license license:bsd-3)))
6539
6540 (define-public python2-waf
6541 (package-with-python2 python-waf))
6542
6543 (define-public python-pyzmq
6544 (package
6545 (name "python-pyzmq")
6546 (version "17.1.2")
6547 (source
6548 (origin
6549 (method url-fetch)
6550 (uri (pypi-uri "pyzmq" version))
6551 (sha256
6552 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6553 (build-system python-build-system)
6554 (arguments
6555 `(#:configure-flags
6556 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6557 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6558 ;; --inplace' for 'python setup.py test' to work.
6559 #:tests? #f))
6560 (inputs
6561 `(("zeromq" ,zeromq)))
6562 (native-inputs
6563 `(("pkg-config" ,pkg-config)
6564 ("python-nose" ,python-nose)))
6565 (home-page "https://github.com/zeromq/pyzmq")
6566 (synopsis "Python bindings for 0MQ")
6567 (description
6568 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6569 (license license:bsd-4)))
6570
6571 (define-public python2-pyzmq
6572 (package-with-python2 python-pyzmq))
6573
6574 (define-public python-pep8
6575 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6576 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6577 ;; some dependents' test suites, and nothing more.
6578 (package
6579 (name "python-pep8")
6580 (version "1.7.0")
6581 (source
6582 (origin
6583 (method url-fetch)
6584 (uri (pypi-uri "pep8" version))
6585 (sha256
6586 (base32
6587 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
6588 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
6589 (build-system python-build-system)
6590 (home-page "https://pep8.readthedocs.org/")
6591 (synopsis "Python style guide checker")
6592 (description
6593 "This tools checks Python code against some of the style conventions in
6594 PEP 8.")
6595 (license license:expat)))
6596
6597 (define-public python2-pep8
6598 (package-with-python2 python-pep8))
6599
6600 (define-public python-pyflakes
6601 (package
6602 (name "python-pyflakes")
6603 (version "2.1.1")
6604 (source
6605 (origin
6606 (method url-fetch)
6607 (uri (pypi-uri "pyflakes" version))
6608 (sha256
6609 (base32
6610 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
6611 (build-system python-build-system)
6612 (home-page
6613 "https://github.com/pyflakes/pyflakes")
6614 (synopsis "Passive checker of Python programs")
6615 (description
6616 "Pyflakes statically checks Python source code for common errors.")
6617 (license license:expat)))
6618
6619 (define-public python2-pyflakes
6620 (package-with-python2 python-pyflakes))
6621
6622 (define-public python-mccabe
6623 (package
6624 (name "python-mccabe")
6625 (version "0.6.1")
6626 (source
6627 (origin
6628 (method url-fetch)
6629 (uri (pypi-uri "mccabe" version))
6630 (sha256
6631 (base32
6632 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6633 (build-system python-build-system)
6634 (native-inputs
6635 `(("python-pytest" ,python-pytest-bootstrap)
6636 ("python-pytest-runner" ,python-pytest-runner)))
6637 (home-page "https://github.com/flintwork/mccabe")
6638 (synopsis "McCabe checker, plugin for flake8")
6639 (description
6640 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6641 complexity of Python source code.")
6642 (license license:expat)))
6643
6644 (define-public python2-mccabe
6645 (package-with-python2 python-mccabe))
6646
6647 (define-public python-mccabe-0.2.1
6648 (package (inherit python-mccabe)
6649 (version "0.2.1")
6650 (source
6651 (origin
6652 (method url-fetch)
6653 (uri (pypi-uri "mccabe" version))
6654 (sha256
6655 (base32
6656 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6657
6658 (define-public python2-mccabe-0.2.1
6659 (package-with-python2 python-mccabe-0.2.1))
6660
6661 ;; Flake8 2.4.1 requires an older version of pep8.
6662 ;; This should be removed ASAP.
6663 (define-public python-pep8-1.5.7
6664 (package (inherit python-pep8)
6665 (version "1.5.7")
6666 (source
6667 (origin
6668 (method url-fetch)
6669 (uri (pypi-uri "pep8" version))
6670 (sha256
6671 (base32
6672 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6673 (arguments
6674 ;; XXX Tests not compatible with Python 3.5.
6675 '(#:tests? #f))))
6676
6677 (define-public python2-pep8-1.5.7
6678 (package-with-python2 python-pep8-1.5.7))
6679
6680 ;; Flake8 2.4.1 requires an older version of pyflakes.
6681 ;; This should be removed ASAP.
6682 (define-public python-pyflakes-0.8.1
6683 (package (inherit python-pyflakes)
6684 (version "0.8.1")
6685 (source
6686 (origin
6687 (method url-fetch)
6688 (uri (pypi-uri "pyflakes" version))
6689 (sha256
6690 (base32
6691 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6692 (arguments
6693 ;; XXX Tests not compatible with Python 3.5.
6694 '(#:tests? #f))))
6695
6696 (define-public python2-pyflakes-0.8.1
6697 (package-with-python2 python-pyflakes-0.8.1))
6698
6699 (define-public python-flake8
6700 (package
6701 (name "python-flake8")
6702 (version "3.7.7")
6703 (source (origin
6704 (method url-fetch)
6705 (uri (pypi-uri "flake8" version))
6706 (sha256
6707 (base32
6708 "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5"))))
6709 (build-system python-build-system)
6710 (arguments
6711 `(#:phases
6712 (modify-phases %standard-phases
6713 (delete 'check)
6714 (add-after 'install 'check
6715 (lambda* (#:key inputs outputs #:allow-other-keys)
6716 (add-installed-pythonpath inputs outputs)
6717 (invoke "pytest" "-v")
6718 #t)))))
6719 (propagated-inputs
6720 `(("python-pycodestyle" ,python-pycodestyle)
6721 ("python-entrypoints" ,python-entrypoints)
6722 ("python-pyflakes" ,python-pyflakes)
6723 ("python-mccabe" ,python-mccabe)))
6724 (native-inputs
6725 `(("python-mock" ,python-mock)
6726 ("python-pytest" ,python-pytest-bootstrap)
6727 ("python-pytest-runner" ,python-pytest-runner)))
6728 (home-page "https://gitlab.com/pycqa/flake8")
6729 (synopsis
6730 "The modular source code checker: pep8, pyflakes and co")
6731 (description
6732 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6733 (properties `((python2-variant . ,(delay python2-flake8))))
6734 (license license:expat)))
6735
6736 (define-public python2-flake8
6737 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
6738 (package (inherit base)
6739 (propagated-inputs
6740 `(("python2-configparser" ,python2-configparser)
6741 ("python2-enum34" ,python2-enum34)
6742 ("python2-typing" ,python2-typing)
6743 ,@(package-propagated-inputs base))))))
6744
6745 ;; python-hacking requires flake8 <2.6.0.
6746 (define-public python-flake8-2.5
6747 (package
6748 (inherit python-flake8)
6749 (version "2.5.5")
6750 (source (origin
6751 (method url-fetch)
6752 (uri (pypi-uri "flake8" version))
6753 (sha256
6754 (base32
6755 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6756 (propagated-inputs
6757 `(("python-pep8" ,python-pep8)
6758 ,@(package-propagated-inputs python-flake8)))
6759 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6760
6761 (define-public python2-flake8-2.5
6762 (package
6763 (inherit python2-flake8)
6764 (version (package-version python-flake8-2.5))
6765 (source (origin
6766 (inherit (package-source python-flake8-2.5))))
6767 (propagated-inputs
6768 `(("python2-pep8" ,python2-pep8)
6769 ,@(package-propagated-inputs python2-flake8)))))
6770
6771 (define-public python-flake8-polyfill
6772 (package
6773 (name "python-flake8-polyfill")
6774 (version "1.0.2")
6775 (source
6776 (origin
6777 (method url-fetch)
6778 (uri (pypi-uri "flake8-polyfill" version))
6779 (sha256
6780 (base32
6781 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6782 (build-system python-build-system)
6783 (arguments
6784 '(#:phases
6785 (modify-phases %standard-phases
6786 (replace 'check
6787 (lambda _
6788 ;; Be compatible with Pytest 4:
6789 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
6790 (substitute* "setup.cfg"
6791 (("\\[pytest\\]")
6792 "[tool:pytest]"))
6793
6794 (setenv "PYTHONPATH"
6795 (string-append (getcwd) "/build/lib:"
6796 (getenv "PYTHONPATH")))
6797 (invoke "py.test" "-v"))))))
6798 (native-inputs
6799 `(("python-flake8" ,python-flake8)
6800 ("python-mock" ,python-mock)
6801 ("python-pep8" ,python-pep8)
6802 ("python-pycodestyle" ,python-pycodestyle)
6803 ("python-pytest" ,python-pytest)))
6804 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6805 (synopsis "Polyfill package for Flake8 plugins")
6806 (description
6807 "This package that provides some compatibility helpers for Flake8
6808 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6809 (license license:expat)))
6810
6811 (define-public python2-flake8-polyfill
6812 (package-with-python2 python-flake8-polyfill))
6813
6814 (define-public python-mistune
6815 (package
6816 (name "python-mistune")
6817 (version "0.8.4")
6818 (source
6819 (origin
6820 (method url-fetch)
6821 (uri (pypi-uri "mistune" version))
6822 (sha256
6823 (base32
6824 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6825 (build-system python-build-system)
6826 (native-inputs
6827 `(("python-nose" ,python-nose)
6828 ("python-cython" ,python-cython)))
6829 (home-page "https://github.com/lepture/mistune")
6830 (synopsis "Markdown parser in pure Python")
6831 (description "This package provides a fast markdown parser in pure
6832 Python.")
6833 (license license:bsd-3)))
6834
6835 (define-public python2-mistune
6836 (package-with-python2 python-mistune))
6837
6838 (define-public python-markdown
6839 (package
6840 (name "python-markdown")
6841 (version "3.1.1")
6842 (source
6843 (origin
6844 (method url-fetch)
6845 (uri (pypi-uri "Markdown" version))
6846 (sha256
6847 (base32
6848 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f"))))
6849 (build-system python-build-system)
6850 (native-inputs
6851 `(("python-nose" ,python-nose)
6852 ("python-pyyaml" ,python-pyyaml)))
6853 (home-page "https://python-markdown.github.io/")
6854 (synopsis "Python implementation of Markdown")
6855 (description
6856 "This package provides a Python implementation of John Gruber's
6857 Markdown. The library features international input, various Markdown
6858 extensions, and several HTML output formats. A command line wrapper
6859 markdown_py is also provided to convert Markdown files to HTML.")
6860 (license license:bsd-3)))
6861
6862 (define-public python2-markdown
6863 (package-with-python2 python-markdown))
6864
6865 (define-public python-ptyprocess
6866 (package
6867 (name "python-ptyprocess")
6868 (version "0.5.2")
6869 (source
6870 (origin
6871 (method url-fetch)
6872 (uri (pypi-uri "ptyprocess" version))
6873 (sha256
6874 (base32
6875 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6876 (build-system python-build-system)
6877 (native-inputs
6878 `(("python-nose" ,python-nose)))
6879 (arguments
6880 `(#:phases
6881 (modify-phases %standard-phases
6882 (replace 'check
6883 (lambda _ (invoke "nosetests"))))))
6884 (home-page "https://github.com/pexpect/ptyprocess")
6885 (synopsis "Run a subprocess in a pseudo terminal")
6886 (description
6887 "This package provides a Python library used to launch a subprocess in a
6888 pseudo terminal (pty), and interact with both the process and its pty.")
6889 (license license:isc)))
6890
6891 (define-public python2-ptyprocess
6892 (package-with-python2 python-ptyprocess))
6893
6894 (define-public python-cram
6895 (package
6896 (name "python-cram")
6897 (version "0.7")
6898 (home-page "https://bitheap.org/cram/")
6899 (source (origin
6900 (method url-fetch)
6901 (uri (list (string-append home-page "cram-"
6902 version ".tar.gz")
6903 (pypi-uri "cram" version)))
6904 (sha256
6905 (base32
6906 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6907 (arguments
6908 '(#:phases
6909 (modify-phases %standard-phases
6910 (add-after 'unpack 'patch-source
6911 (lambda _
6912 (substitute* (find-files "cram" ".*\\.py$")
6913 ;; Replace default shell path.
6914 (("/bin/sh") (which "sh")))
6915 (substitute* (find-files "tests" ".*\\.t$")
6916 (("md5") "md5sum")
6917 (("/bin/bash") (which "bash"))
6918 (("/bin/sh") (which "sh")))
6919 (substitute* "cram/_test.py"
6920 ;; This hack works around a bug triggered by substituting
6921 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6922 ;; "cram -h", which breaks the output at 80 characters. This
6923 ;; causes the line showing the default shell to break into two
6924 ;; lines, but the test expects a single line...
6925 (("env\\['COLUMNS'\\] = '80'")
6926 "env['COLUMNS'] = '160'"))
6927
6928 (substitute* "Makefile"
6929 ;; Recent versions of python-coverage have caused the test
6930 ;; coverage to decrease (as of version 0.7). Allow that.
6931 (("--fail-under=100")
6932 "--fail-under=90"))
6933
6934 #t))
6935 (replace 'check
6936 ;; The test phase uses the built library and executable.
6937 (lambda* (#:key inputs outputs #:allow-other-keys)
6938 (add-installed-pythonpath inputs outputs)
6939 (setenv "PATH" (string-append (getenv "PATH") ":"
6940 (assoc-ref outputs "out") "/bin"))
6941 (invoke "make" "test"))))))
6942 (build-system python-build-system)
6943 (native-inputs
6944 `(("python-coverage" ,python-coverage)
6945 ("which" ,which)))
6946 (synopsis "Simple testing framework for command line applications")
6947 (description
6948 "Cram is a functional testing framework for command line applications.
6949 Cram tests look like snippets of interactive shell sessions. Cram runs each
6950 command and compares the command output in the test with the command’s actual
6951 output.")
6952 (license license:gpl2+)))
6953
6954 (define-public python2-cram
6955 (package-with-python2 python-cram))
6956
6957 (define-public python-straight-plugin
6958 (package
6959 (name "python-straight-plugin")
6960 (version "1.4.1")
6961 (source
6962 (origin
6963 (method url-fetch)
6964 (uri (pypi-uri "straight.plugin" version))
6965 (sha256
6966 (base32
6967 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6968 (build-system python-build-system)
6969 (home-page "https://github.com/ironfroggy/straight.plugin")
6970 (synopsis "Simple namespaced plugin facility")
6971 (description "Straight Plugin provides a type of plugin you can create from
6972 almost any existing Python modules, and an easy way for outside developers to
6973 add functionality and customization to your projects with their own plugins.")
6974 (license license:expat)))
6975
6976 (define-public python2-straight-plugin
6977 (package-with-python2 python-straight-plugin))
6978
6979 (define-public python-fonttools
6980 (package
6981 (name "python-fonttools")
6982 (version "3.38.0")
6983 (source (origin
6984 (method url-fetch)
6985 (uri (pypi-uri "fonttools" version ".zip"))
6986 (sha256
6987 (base32
6988 "12ripk3s7skgxr1bs9r8n13r94ym3s8iir7ivfixls9fa4dabmlh"))))
6989 (build-system python-build-system)
6990 (native-inputs
6991 `(("unzip" ,unzip)
6992 ("python-pytest" ,python-pytest)
6993 ("python-pytest-runner" ,python-pytest-runner)))
6994 (home-page "https://github.com/behdad/fonttools")
6995 (synopsis "Tools to manipulate font files")
6996 (description
6997 "FontTools/TTX is a library to manipulate font files from Python. It
6998 supports reading and writing of TrueType/OpenType fonts, reading and writing
6999 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
7000 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
7001 from an XML-based format.")
7002 (license license:expat)))
7003
7004 (define-public python2-fonttools
7005 (package-with-python2 python-fonttools))
7006
7007 (define-public python-ly
7008 (package
7009 (name "python-ly")
7010 (version "0.9.5")
7011 (source
7012 (origin
7013 (method url-fetch)
7014 (uri (pypi-uri name version))
7015 (sha256
7016 (base32
7017 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
7018 (build-system python-build-system)
7019 (arguments
7020 ;; FIXME: Some tests need network access.
7021 '(#:tests? #f))
7022 (synopsis "Tool and library for manipulating LilyPond files")
7023 (description "This package provides a Python library to parse, manipulate
7024 or create documents in LilyPond format. A command line program ly is also
7025 provided that can be used to do various manipulations with LilyPond files.")
7026 (home-page "https://pypi.python.org/pypi/python-ly")
7027 (license license:gpl2+)))
7028
7029 (define-public python-appdirs
7030 (package
7031 (name "python-appdirs")
7032 (version "1.4.3")
7033 (source
7034 (origin
7035 (method url-fetch)
7036 (uri (pypi-uri "appdirs" version))
7037 (sha256
7038 (base32
7039 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
7040 (build-system python-build-system)
7041 (home-page "https://github.com/ActiveState/appdirs")
7042 (synopsis
7043 "Determine platform-specific dirs, e.g. a \"user data dir\"")
7044 (description
7045 "This module provides a portable way of finding out where user data
7046 should be stored on various operating systems.")
7047 (license license:expat)))
7048
7049 (define-public python2-appdirs
7050 (package-with-python2 python-appdirs))
7051
7052 (define-public python-llfuse
7053 (package
7054 (name "python-llfuse")
7055 (version "1.3.5")
7056 (source (origin
7057 (method url-fetch)
7058 (uri (pypi-uri "llfuse" version ".tar.bz2"))
7059 (sha256
7060 (base32
7061 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
7062 (build-system python-build-system)
7063 (inputs
7064 `(("fuse" ,fuse)
7065 ("attr" ,attr)))
7066 (native-inputs
7067 `(("pkg-config" ,pkg-config)))
7068 (synopsis "Python bindings for FUSE")
7069 (description
7070 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
7071 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
7072 (license license:lgpl2.0+)
7073 (properties `((python2-variant . ,(delay python2-llfuse))))))
7074
7075 (define-public python2-llfuse
7076 (package (inherit (package-with-python2
7077 (strip-python2-variant python-llfuse)))
7078 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
7079
7080 ;; For attic-0.16
7081 (define-public python-llfuse-0.41
7082 (package (inherit python-llfuse)
7083 (version "0.41.1")
7084 (source (origin
7085 (method url-fetch)
7086 (uri (string-append
7087 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
7088 "llfuse-" version ".tar.bz2"))
7089 (sha256
7090 (base32
7091 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
7092 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
7093 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
7094 (license (list license:expat license:lgpl2.0+))))
7095
7096 (define-public python-msgpack
7097 (package
7098 (name "python-msgpack")
7099 (version "0.5.6")
7100 (source (origin
7101 (method url-fetch)
7102 (uri (pypi-uri "msgpack" version))
7103 (sha256
7104 (base32
7105 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
7106 (build-system python-build-system)
7107 (arguments
7108 `(#:modules ((guix build utils)
7109 (guix build python-build-system)
7110 (ice-9 ftw)
7111 (srfi srfi-1)
7112 (srfi srfi-26))
7113 #:phases
7114 (modify-phases %standard-phases
7115 (replace 'check
7116 (lambda _
7117 (let ((cwd (getcwd)))
7118 (setenv "PYTHONPATH"
7119 (string-append cwd "/build/"
7120 (find (cut string-prefix? "lib" <>)
7121 (scandir (string-append cwd "/build")))
7122 ":"
7123 (getenv "PYTHONPATH")))
7124 (invoke "pytest" "-v" "test")))))))
7125 (native-inputs
7126 `(("python-pytest" ,python-pytest)))
7127 (synopsis "MessagePack (de)serializer")
7128 (description "MessagePack is a fast, compact binary serialization format,
7129 suitable for similar data to JSON. This package provides CPython bindings for
7130 reading and writing MessagePack data.")
7131 (home-page "https://pypi.python.org/pypi/msgpack/")
7132 (license license:asl2.0)))
7133
7134 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
7135 ;; release 0.5. Some packages like borg still call it by the old name for now.
7136 ;; <https://bugs.gnu.org/30662>
7137 (define-public python-msgpack-transitional
7138 (package
7139 (inherit python-msgpack)
7140 (name "python-msgpack-transitional")
7141 (arguments
7142 (substitute-keyword-arguments (package-arguments python-msgpack)
7143 ((#:phases phases)
7144 `(modify-phases ,phases
7145 (add-after 'unpack 'configure-transitional
7146 (lambda _
7147 ;; Keep using the old name.
7148 (substitute* "setup.py"
7149 (("TRANSITIONAL = False")
7150 "TRANSITIONAL = 1"))
7151 #t))))))))
7152
7153 (define-public python2-msgpack
7154 (package-with-python2 python-msgpack))
7155
7156 (define-public python-netaddr
7157 (package
7158 (name "python-netaddr")
7159 (version "0.7.19")
7160 (source
7161 (origin
7162 (method url-fetch)
7163 (uri (pypi-uri "netaddr" version))
7164 (sha256
7165 (base32
7166 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
7167 (build-system python-build-system)
7168 (arguments `(#:tests? #f)) ;; No tests.
7169 (home-page "https://github.com/drkjam/netaddr/")
7170 (synopsis "Pythonic manipulation of network addresses")
7171 (description
7172 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
7173 and MAC network addresses.")
7174 (license license:bsd-3)))
7175
7176 (define-public python2-netaddr
7177 (package-with-python2 python-netaddr))
7178
7179 (define-public python2-pyroute2
7180 (package
7181 (name "python2-pyroute2")
7182 (version "0.5.6")
7183 (source
7184 (origin
7185 (method url-fetch)
7186 (uri (pypi-uri "pyroute2" version))
7187 (sha256
7188 (base32
7189 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
7190 (build-system python-build-system)
7191 (arguments
7192 `(#:python ,python-2)) ;Python 3.x is not supported
7193 (home-page "https://github.com/svinota/pyroute2")
7194 (synopsis "Python netlink library")
7195 (description
7196 "Pyroute2 is a pure Python netlink library with minimal dependencies.
7197 Supported netlink families and protocols include:
7198 @itemize
7199 @item rtnl, network settings - addresses, routes, traffic controls
7200 @item nfnetlink - netfilter API: ipset, nftables, ...
7201 @item ipq - simplest userspace packet filtering, iptables QUEUE target
7202 @item devlink - manage and monitor devlink-enabled hardware
7203 @item generic - generic netlink families
7204 @itemize
7205 @item nl80211 - wireless functions API (basic support)
7206 @item taskstats - extended process statistics
7207 @item acpi_events - ACPI events monitoring
7208 @item thermal_events - thermal events monitoring
7209 @item VFS_DQUOT - disk quota events monitoring
7210 @end itemize
7211 @end itemize")
7212 (license license:gpl2+)))
7213
7214 (define-public python-wrapt
7215 (package
7216 (name "python-wrapt")
7217 (version "1.11.2")
7218 (source
7219 (origin
7220 (method url-fetch)
7221 (uri (pypi-uri "wrapt" version))
7222 (sha256
7223 (base32
7224 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
7225 (build-system python-build-system)
7226 (arguments
7227 ;; Tests are not included in the tarball, they are only available in the
7228 ;; git repository.
7229 `(#:tests? #f))
7230 (home-page "https://github.com/GrahamDumpleton/wrapt")
7231 (synopsis "Module for decorators, wrappers and monkey patching")
7232 (description
7233 "The aim of the wrapt module is to provide a transparent object proxy for
7234 Python, which can be used as the basis for the construction of function
7235 wrappers and decorator functions.")
7236 (license license:bsd-2)))
7237
7238 (define-public python2-wrapt
7239 (package-with-python2 python-wrapt))
7240
7241 (define-public python-xlrd
7242 (package
7243 (name "python-xlrd")
7244 (version "1.0.0")
7245 (source (origin
7246 (method url-fetch)
7247 (uri (pypi-uri "xlrd" version))
7248 (sha256
7249 (base32
7250 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
7251 (build-system python-build-system)
7252 (arguments
7253 `(#:phases
7254 (modify-phases %standard-phases
7255 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
7256 ;; run tests instead for now.
7257 (replace 'check (lambda _ (invoke "nosetests"))))))
7258 (native-inputs `(("python-nose" ,python-nose)))
7259 (home-page "http://www.python-excel.org/")
7260 (synopsis "Library for extracting data from Excel files")
7261 (description "This package provides a library to extract data from
7262 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7263 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7264 Unicode-aware. It is not intended as an end-user tool.")
7265 (license license:bsd-3)))
7266
7267 (define-public python2-xlrd
7268 (package-with-python2 python-xlrd))
7269
7270 (define-public python-prettytable
7271 (package
7272 (name "python-prettytable")
7273 (version "0.7.2")
7274 (source
7275 (origin
7276 (method url-fetch)
7277 (uri (pypi-uri "prettytable" version ".tar.bz2"))
7278 (sha256
7279 (base32
7280 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7281 (build-system python-build-system)
7282 (home-page "http://code.google.com/p/prettytable/")
7283 (synopsis "Display tabular data in an ASCII table format")
7284 (description
7285 "A library designed to represent tabular data in visually appealing ASCII
7286 tables. PrettyTable allows for selection of which columns are to be printed,
7287 independent alignment of columns (left or right justified or centred) and
7288 printing of sub-tables by specifying a row range.")
7289 (license license:bsd-3)))
7290
7291 (define-public python2-prettytable
7292 (package-with-python2 python-prettytable))
7293
7294 (define-public python-tables
7295 (package
7296 (name "python-tables")
7297 (version "3.4.4")
7298 (source
7299 (origin
7300 (method url-fetch)
7301 (uri (pypi-uri "tables" version))
7302 (sha256
7303 (base32
7304 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7305 (modules '((guix build utils)))
7306 (snippet
7307 '(begin
7308 ;; Remove pre-compiled .pyc files from source.
7309 (for-each delete-file-recursively
7310 (find-files "." "__pycache__" #:directories? #t))
7311 (for-each delete-file (find-files "." "\\.pyc$"))
7312 #t))))
7313 (build-system python-build-system)
7314 (arguments
7315 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7316 ;; or "check", so we must override the build and check phases.
7317 #:phases
7318 (modify-phases %standard-phases
7319 (add-after 'unpack 'use-gcc
7320 (lambda _
7321 (substitute* "setup.py"
7322 (("compiler = new_compiler\\(\\)" line)
7323 (string-append line
7324 "\ncompiler.set_executables(compiler='gcc',"
7325 "compiler_so='gcc',"
7326 "linker_exe='gcc',"
7327 "linker_so='gcc -shared')")))
7328 #t))
7329 (replace 'build
7330 (lambda* (#:key inputs #:allow-other-keys)
7331 (invoke "python" "setup.py" "build"
7332 (string-append "--hdf5="
7333 (assoc-ref inputs "hdf5")))))
7334 (replace 'check
7335 (lambda* (#:key inputs #:allow-other-keys)
7336 (invoke "python" "setup.py" "check"
7337 (string-append "--hdf5="
7338 (assoc-ref inputs "hdf5"))))))))
7339 (propagated-inputs
7340 `(("python-numexpr" ,python-numexpr)
7341 ("python-numpy" ,python-numpy)))
7342 (native-inputs
7343 `(("python-cython" ,python-cython)
7344 ("pkg-config" ,pkg-config)))
7345 (inputs
7346 `(("hdf5" ,hdf5)
7347 ("bzip2" ,bzip2)
7348 ("zlib" ,zlib)))
7349 (home-page "http://www.pytables.org/")
7350 (synopsis "Hierarchical datasets for Python")
7351 (description "PyTables is a package for managing hierarchical datasets and
7352 designed to efficiently cope with extremely large amounts of data.")
7353 (license license:bsd-3)))
7354
7355 (define-public python2-tables
7356 (package-with-python2 python-tables))
7357
7358 (define-public python-pyasn1
7359 (package
7360 (name "python-pyasn1")
7361 (version "0.4.3")
7362 (source
7363 (origin
7364 (method url-fetch)
7365 (uri (pypi-uri "pyasn1" version))
7366 (sha256
7367 (base32
7368 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7369 (build-system python-build-system)
7370 (home-page "http://pyasn1.sourceforge.net/")
7371 (synopsis "ASN.1 types and codecs")
7372 (description
7373 "This is an implementation of ASN.1 types and codecs in Python. It is
7374 suitable for a wide range of protocols based on the ASN.1 specification.")
7375 (license license:bsd-2)))
7376
7377 (define-public python2-pyasn1
7378 (package-with-python2 python-pyasn1))
7379
7380 (define-public python-pyasn1-modules
7381 (package
7382 (name "python-pyasn1-modules")
7383 (version "0.2.2")
7384 (source
7385 (origin
7386 (method url-fetch)
7387 (uri (pypi-uri "pyasn1-modules" version))
7388 (sha256
7389 (base32
7390 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7391 (build-system python-build-system)
7392 (propagated-inputs
7393 `(("python-pyasn1" ,python-pyasn1)))
7394 (home-page "https://sourceforge.net/projects/pyasn1/")
7395 (synopsis "ASN.1 codec implementations")
7396 (description
7397 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7398 implementations of ASN.1-based codecs and protocols.")
7399 (license license:bsd-3)))
7400
7401 (define-public python2-pyasn1-modules
7402 (package-with-python2 python-pyasn1-modules))
7403
7404 (define-public python-ipaddress
7405 (package
7406 (name "python-ipaddress")
7407 (version "1.0.22")
7408 (source (origin
7409 (method url-fetch)
7410 (uri (pypi-uri "ipaddress" version))
7411 (sha256
7412 (base32
7413 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7414 (build-system python-build-system)
7415 (home-page "https://github.com/phihag/ipaddress")
7416 (synopsis "IP address manipulation library")
7417 (description
7418 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7419 in Python. This library is used to create, poke at, and manipulate IPv4 and
7420 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7421 module to older versions of Python.")
7422 (license license:psfl)))
7423
7424 (define-public python2-ipaddress
7425 (package-with-python2 python-ipaddress))
7426
7427 (define-public python2-ipaddr
7428 (package
7429 (name "python2-ipaddr")
7430 (version "2.1.11")
7431 (source
7432 (origin
7433 (method url-fetch)
7434 (uri (pypi-uri "ipaddr" version))
7435 (sha256
7436 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7437 (build-system python-build-system)
7438 (arguments
7439 `(#:python ,python-2 ;version 2 only
7440 #:phases
7441 (modify-phases %standard-phases
7442 (replace 'check
7443 (lambda _ (invoke "python" "ipaddr_test.py"))))))
7444 (home-page "https://github.com/google/ipaddr-py")
7445 (synopsis "IP address manipulation library")
7446 (description
7447 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7448 IPv6 addresses and networks.
7449
7450 For new implementations you may prefer to use the standard module
7451 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
7452 versions of Python.")
7453 (license license:asl2.0)))
7454
7455 (define-public python-idna
7456 (package
7457 (name "python-idna")
7458 (version "2.8")
7459 (source
7460 (origin
7461 (method url-fetch)
7462 (uri (pypi-uri "idna" version))
7463 (sha256
7464 (base32
7465 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
7466 (build-system python-build-system)
7467 (home-page "https://github.com/kjd/idna")
7468 (synopsis "Internationalized domain names in applications")
7469 (description
7470 "This is a library to support the Internationalised Domain Names in
7471 Applications (IDNA) protocol as specified in RFC 5891. This version of the
7472 protocol is often referred to as “IDNA2008” and can produce different results
7473 from the earlier standard from 2003. The library is also intended to act as a
7474 suitable drop-in replacement for the “encodings.idna” module that comes with
7475 the Python standard library but currently only supports the older 2003
7476 specification.")
7477 (license license:bsd-4)))
7478
7479 (define-public python-idna-2.7
7480 (package (inherit python-idna)
7481 (version "2.7")
7482 (source (origin
7483 (method url-fetch)
7484 (uri (pypi-uri "idna" version))
7485 (sha256
7486 (base32
7487 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7488
7489
7490 (define-public python2-idna
7491 (package-with-python2 python-idna))
7492
7493 (define-public python-idna-ssl
7494 (package
7495 (name "python-idna-ssl")
7496 (version "1.0.1")
7497 (source
7498 (origin
7499 (method url-fetch)
7500 (uri (pypi-uri "idna-ssl" version))
7501 (sha256
7502 (base32
7503 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7504 (build-system python-build-system)
7505 (arguments
7506 `(#:tests? #f)) ;circular dependency with python-aiohttp
7507 (home-page "https://github.com/aio-libs/idna-ssl")
7508 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7509 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7510 domains support.")
7511 (license license:expat)))
7512
7513 (define-public python-pretend
7514 (package
7515 (name "python-pretend")
7516 (version "1.0.9")
7517 (source
7518 (origin
7519 (method url-fetch)
7520 (uri (pypi-uri "pretend" version))
7521 (sha256
7522 (base32
7523 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7524 (build-system python-build-system)
7525 (home-page "https://github.com/alex/pretend")
7526 (synopsis "Library for stubbing in Python")
7527 (description
7528 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7529 technique for writing tests. You may hear the term mixed up with mocks,
7530 fakes, or doubles. Basically, a stub is an object that returns pre-canned
7531 responses, rather than doing any computation.")
7532 (license license:bsd-3)))
7533
7534 (define-public python2-pretend
7535 (package-with-python2 python-pretend))
7536
7537 (define-public python-pip
7538 (package
7539 (name "python-pip")
7540 (version "19.2.1")
7541 (source
7542 (origin
7543 (method url-fetch)
7544 (uri (pypi-uri "pip" version))
7545 (sha256
7546 (base32
7547 "100sd12ss4mbdj5lf3wawad29cm573b27765mq098x6xhcj71395"))))
7548 (build-system python-build-system)
7549 (arguments
7550 '(#:tests? #f)) ; there are no tests in the pypi archive.
7551 (home-page "https://pip.pypa.io/")
7552 (synopsis "Package manager for Python software")
7553 (description
7554 "Pip is a package manager for Python software, that finds packages on the
7555 Python Package Index (PyPI).")
7556 (license license:expat)))
7557
7558 (define-public python2-pip
7559 (package-with-python2 python-pip))
7560
7561 (define-public python-tlsh
7562 (package
7563 (name "python-tlsh")
7564 (version "3.4.5")
7565 (home-page "https://github.com/trendmicro/tlsh")
7566 (source
7567 (origin
7568 (method git-fetch)
7569 (uri (git-reference
7570 (url "https://github.com/trendmicro/tlsh.git")
7571 (commit (string-append "v" version))))
7572 (file-name (git-file-name name version))
7573 (sha256
7574 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
7575 (build-system cmake-build-system)
7576 (arguments
7577 '(#:out-of-source? #f
7578 #:phases (modify-phases %standard-phases
7579 (replace
7580 'install
7581 (lambda* (#:key outputs #:allow-other-keys)
7582 ;; Build and install the Python bindings. The underlying
7583 ;; C++ library is apparently not meant to be installed.
7584 (let ((out (assoc-ref outputs "out")))
7585 (with-directory-excursion "py_ext"
7586 (and (system* "python" "setup.py" "build")
7587 (system* "python" "setup.py" "install"
7588 (string-append "--prefix=" out))))))))))
7589 (inputs `(("python" ,python-wrapper))) ;for the bindings
7590 (synopsis "Fuzzy matching library for Python")
7591 (description
7592 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7593 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7594 value which can be used for similarity comparisons. Similar objects have
7595 similar hash values, which allows for the detection of similar objects by
7596 comparing their hash values. The byte stream should have a sufficient amount
7597 of complexity; for example, a byte stream of identical bytes will not generate
7598 a hash value.")
7599 (license license:asl2.0)))
7600
7601 (define-public python2-tlsh
7602 (package
7603 (inherit python-tlsh)
7604 (name "python2-tlsh")
7605 (inputs `(("python" ,python-2)))))
7606
7607 (define-public python-termcolor
7608 (package
7609 (name "python-termcolor")
7610 (version "1.1.0")
7611 (source
7612 (origin
7613 (method url-fetch)
7614 (uri (pypi-uri "termcolor" version))
7615 (sha256
7616 (base32
7617 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7618 (build-system python-build-system)
7619 (arguments
7620 ;; There are no tests.
7621 `(#:tests? #f))
7622 (home-page "https://pypi.python.org/pypi/termcolor")
7623 (synopsis "ANSII Color formatting for terminal output")
7624 (description
7625 "This package provides ANSII Color formatting for output in terminals.")
7626 (license license:expat)))
7627
7628 (define-public python2-termcolor
7629 (package-with-python2 python-termcolor))
7630
7631 (define-public python-libarchive-c
7632 (package
7633 (name "python-libarchive-c")
7634 (version "2.8")
7635 (source (origin
7636 (method url-fetch)
7637 (uri (pypi-uri "libarchive-c" version))
7638 (sha256
7639 (base32
7640 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
7641 (build-system python-build-system)
7642 (arguments
7643 '(#:phases (modify-phases %standard-phases
7644 (add-before
7645 'build 'reference-libarchive
7646 (lambda* (#:key inputs #:allow-other-keys)
7647 ;; Retain the absolute file name of libarchive.so.
7648 (let ((libarchive (assoc-ref inputs "libarchive")))
7649 (substitute* "libarchive/ffi.py"
7650 (("find_library\\('archive'\\)")
7651 (string-append "'" libarchive
7652 "/lib/libarchive.so'"))))))
7653 (replace 'check
7654 (lambda _ (invoke "pytest" "-vv"))))))
7655 (native-inputs
7656 `(("python-mock" ,python-mock)
7657 ("python-pytest" ,python-pytest)))
7658 (inputs
7659 `(("libarchive" ,libarchive)))
7660 (home-page "https://github.com/Changaco/python-libarchive-c")
7661 (synopsis "Python interface to libarchive")
7662 (description
7663 "This package provides Python bindings to libarchive, a C library to
7664 access possibly compressed archives in many different formats. It uses
7665 Python's @code{ctypes} foreign function interface (FFI).")
7666 (license license:lgpl2.0+)))
7667
7668 (define-public python2-libarchive-c
7669 (package-with-python2 python-libarchive-c))
7670
7671 (define-public python-file
7672 (package
7673 (inherit file)
7674 (name "python-file")
7675 (build-system python-build-system)
7676 (arguments
7677 '(#:tests? #f ;no tests
7678 #:configure-flags '("--single-version-externally-managed" "--root=/")
7679 #:phases (modify-phases %standard-phases
7680 (add-before 'build 'change-directory
7681 (lambda _
7682 (chdir "python")
7683 #t))
7684 (add-before 'build 'set-library-file-name
7685 (lambda* (#:key inputs #:allow-other-keys)
7686 (let ((file (assoc-ref inputs "file")))
7687 (substitute* "magic.py"
7688 (("find_library\\('magic'\\)")
7689 (string-append "'" file "/lib/libmagic.so'")))
7690 #t))))))
7691 (inputs `(("file" ,file)))
7692 (native-inputs (if (%current-target-system)
7693 `(("self" ,this-package))
7694 '()))
7695 (synopsis "Python bindings to the libmagic file type guesser. Note that
7696 this module and the python-magic module both provide a \"magic.py\" file;
7697 these two modules, which are different and were developed separately, both
7698 serve the same purpose: provide Python bindings for libmagic.")))
7699
7700 (define-public python2-file
7701 (package-with-python2 python-file))
7702
7703 (define-public python-debian
7704 (package
7705 (name "python-debian")
7706 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
7707 (version "0.1.36")
7708 (source
7709 (origin
7710 ;; Use git-fetch, as pypi doesn't include test suite.
7711 (method git-fetch)
7712 (uri (git-reference
7713 (url home-page)
7714 (commit version)))
7715 (file-name (git-file-name name version))
7716 (sha256
7717 (base32
7718 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
7719 (build-system python-build-system)
7720 (arguments
7721 `(#:phases (modify-phases %standard-phases
7722 (add-after 'unpack 'remove-debian-specific-tests
7723 ;; python-apt, apt and dpkg are not yet available in guix,
7724 ;; and these tests heavily depend on them.
7725 (lambda _
7726 (delete-file "lib/debian/tests/test_deb822.py")
7727 (delete-file "lib/debian/tests/test_debfile.py")
7728 #t)))))
7729 (propagated-inputs
7730 `(("python-six" ,python-six)
7731 ("python-chardet" ,python-chardet)))
7732 (synopsis "Debian package related modules")
7733 (description
7734 ;; XXX: Use @enumerate instead of @itemize to work around
7735 ;; <http://bugs.gnu.org/21772>.
7736 "This package provides Python modules that abstract many formats of
7737 Debian-related files, such as:
7738
7739 @enumerate
7740 @item Debtags information;
7741 @item @file{debian/changelog} files;
7742 @item packages files, pdiffs;
7743 @item control files of single or multiple RFC822-style paragraphs---e.g.
7744 @file{debian/control}, @file{.changes}, @file{.dsc};
7745 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7746 contained files and meta-information.
7747 @end enumerate\n")
7748
7749 ;; Modules are either GPLv2+ or GPLv3+.
7750 (license license:gpl3+)))
7751
7752 (define-public python2-debian
7753 (package-with-python2 python-debian))
7754
7755 (define-public python-nbformat
7756 (package
7757 (name "python-nbformat")
7758 (version "4.4.0")
7759 (source
7760 (origin
7761 (method url-fetch)
7762 (uri (pypi-uri "nbformat" version))
7763 (sha256
7764 (base32
7765 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7766 (build-system python-build-system)
7767 (arguments `(#:tests? #f)) ; no test target
7768 (propagated-inputs
7769 `(("python-ipython-genutils" ,python-ipython-genutils)
7770 ("python-jsonschema" ,python-jsonschema)
7771 ("python-jupyter-core" ,python-jupyter-core)
7772 ("python-traitlets" ,python-traitlets)))
7773 (home-page "http://jupyter.org")
7774 (synopsis "Jupyter Notebook format")
7775 (description "This package provides the reference implementation of the
7776 Jupyter Notebook format and Python APIs for working with notebooks.")
7777 (license license:bsd-3)))
7778
7779 (define-public python2-nbformat
7780 (package-with-python2 python-nbformat))
7781
7782 (define-public python-bleach
7783 (package
7784 (name "python-bleach")
7785 (version "3.1.0")
7786 (source
7787 (origin
7788 (method url-fetch)
7789 (uri (pypi-uri "bleach" version))
7790 (sha256
7791 (base32
7792 "1yhrgrhkln8bd6gn3imj69g1h4xqah9gaz9q26crqr6gmmvpzprz"))))
7793 (build-system python-build-system)
7794 (propagated-inputs
7795 `(("python-webencodings" ,python-webencodings)
7796 ("python-six" ,python-six)))
7797 (native-inputs
7798 `(("python-pytest" ,python-pytest)
7799 ("python-pytest-runner" ,python-pytest-runner-2)))
7800 (home-page "https://github.com/jsocol/bleach")
7801 (synopsis "Whitelist-based HTML-sanitizing tool")
7802 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7803 (license license:asl2.0)))
7804
7805 (define-public python2-bleach
7806 (package-with-python2 python-bleach))
7807
7808 (define-public python-entrypoints
7809 (package
7810 (name "python-entrypoints")
7811 (version "0.3")
7812 (source
7813 (origin
7814 (method url-fetch)
7815 (uri (pypi-uri "entrypoints" version))
7816 (sha256
7817 (base32
7818 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
7819 (build-system python-build-system)
7820 ;; The package does not come with a setup.py file, so we have to generate
7821 ;; one ourselves.
7822 (arguments
7823 `(#:tests? #f
7824 #:phases
7825 (modify-phases %standard-phases
7826 (add-after 'unpack 'create-setup.py
7827 (lambda _
7828 (call-with-output-file "setup.py"
7829 (lambda (port)
7830 (format port "\
7831 from setuptools import setup
7832 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7833 " ,version))))))))
7834 (home-page "https://github.com/takluyver/entrypoints")
7835 (synopsis "Discover and load entry points from installed Python packages")
7836 (description "Entry points are a way for Python packages to advertise
7837 objects with some common interface. The most common examples are
7838 @code{console_scripts} entry points, which define shell commands by
7839 identifying a Python function to run. The @code{entrypoints} module contains
7840 functions to find and load entry points.")
7841 (license license:expat)))
7842
7843 (define-public python2-entrypoints
7844 (package-with-python2 python-entrypoints))
7845
7846 (define-public python-nbconvert
7847 (package
7848 (name "python-nbconvert")
7849 (version "5.0.0b1")
7850 (source
7851 (origin
7852 (method url-fetch)
7853 (uri (pypi-uri "nbconvert" version))
7854 (sha256
7855 (base32
7856 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7857 (build-system python-build-system)
7858 (arguments
7859 `(;; The "bdist_egg" target is disabled by default, causing the installation
7860 ;; to fail.
7861 #:configure-flags (list "bdist_egg")
7862 ;; FIXME: 5 failures, 40 errors.
7863 #:tests? #f))
7864 ;; #:phases
7865 ;; (modify-phases %standard-phases
7866 ;; (replace 'check
7867 ;; (lambda _
7868 ;; (zero? (system* "py.test" "-v")))))
7869 (native-inputs
7870 `(("python-pytest" ,python-pytest)))
7871 (propagated-inputs
7872 `(("python-bleach" ,python-bleach)
7873 ("python-entrypoints" ,python-entrypoints)
7874 ("python-jinja2" ,python-jinja2)
7875 ("python-jupyter-core" ,python-jupyter-core)
7876 ("python-mistune" ,python-mistune)
7877 ("python-nbformat" ,python-nbformat)
7878 ("python-pygments" ,python-pygments)
7879 ("python-traitlets" ,python-traitlets)))
7880 (home-page "http://jupyter.org")
7881 (synopsis "Converting Jupyter Notebooks")
7882 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7883 notebooks to various other formats via Jinja templates. It allows you to
7884 convert an @code{.ipynb} notebook file into various static formats including:
7885
7886 @enumerate
7887 @item HTML
7888 @item LaTeX
7889 @item PDF
7890 @item Reveal JS
7891 @item Markdown (md)
7892 @item ReStructured Text (rst)
7893 @item executable script
7894 @end enumerate\n")
7895 (license license:bsd-3)))
7896
7897 (define-public python2-nbconvert
7898 (package-with-python2 python-nbconvert))
7899
7900 (define-public python-notebook
7901 (package
7902 (name "python-notebook")
7903 (version "5.7.4")
7904 (source (origin
7905 (method url-fetch)
7906 (uri (pypi-uri "notebook" version))
7907 (sha256
7908 (base32
7909 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7910 (build-system python-build-system)
7911 (arguments
7912 `(#:phases
7913 (modify-phases %standard-phases
7914 (replace 'check
7915 (lambda _
7916 ;; These tests require a browser
7917 (delete-file-recursively "notebook/tests/selenium")
7918 ;; Some tests need HOME
7919 (setenv "HOME" "/tmp")
7920 ;; This file contains "warningfilters", which are not supported
7921 ;; by this version of nose.
7922 (delete-file "setup.cfg")
7923 (with-directory-excursion "/tmp"
7924 (invoke "nosetests" "-v"))
7925 #t)))))
7926 (propagated-inputs
7927 `(("python-jupyter-core" ,python-jupyter-core)
7928 ("python-nbformat" ,python-nbformat)
7929 ("python-nbconvert" ,python-nbconvert)
7930 ("python-prometheus-client" ,python-prometheus-client)
7931 ("python-send2trash" ,python-send2trash)
7932 ("python-terminado" ,python-terminado)))
7933 (native-inputs
7934 `(("python-nose" ,python-nose)
7935 ("python-sphinx" ,python-sphinx)
7936 ("python-requests" ,python-requests)))
7937 (home-page "http://jupyter.org/")
7938 (synopsis "Web-based notebook environment for interactive computing")
7939 (description
7940 "The Jupyter HTML notebook is a web-based notebook environment for
7941 interactive computing.")
7942 (properties `((python2-variant . ,(delay python2-notebook))))
7943 (license license:bsd-3)))
7944
7945 (define-public python2-notebook
7946 (let ((base (package-with-python2
7947 (strip-python2-variant python-notebook))))
7948 (package (inherit base)
7949 (native-inputs
7950 `(("python2-mock" ,python2-mock)
7951 ,@(package-native-inputs base)))
7952 (arguments
7953 (substitute-keyword-arguments (package-arguments base)
7954 ((#:phases phases)
7955 `(modify-phases ,phases
7956 (add-before 'check 'disable-test-case
7957 ;; The test requires network access to localhost. Curiously it
7958 ;; fails with Python 2 only. Simply make the test-case return
7959 ;; immediately.
7960 (lambda _
7961 (substitute*
7962 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7963 (("formats = self.nbconvert_api") "return #")))))))))))
7964
7965 (define-public python-widgetsnbextension
7966 (package
7967 (name "python-widgetsnbextension")
7968 (version "3.4.2")
7969 (source
7970 (origin
7971 (method url-fetch)
7972 (uri (pypi-uri "widgetsnbextension" version))
7973 (sha256
7974 (base32
7975 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7976 (build-system python-build-system)
7977 (propagated-inputs
7978 `(("python-ipykernel" ,python-ipykernel)
7979 ("python-notebook" ,python-notebook)))
7980 (native-inputs
7981 `(("python-certifi" ,python-certifi)
7982 ("python-nose" ,python-nose)))
7983 (home-page "https://ipython.org")
7984 (synopsis "IPython HTML widgets for Jupyter")
7985 (description "This package provides interactive HTML widgets for Jupyter
7986 notebooks.")
7987 (license license:bsd-3)))
7988
7989 (define-public python2-widgetsnbextension
7990 (package-with-python2 python-widgetsnbextension))
7991
7992 (define-public python-ipywidgets
7993 (package
7994 (name "python-ipywidgets")
7995 (version "5.2.2")
7996 (source
7997 (origin
7998 (method url-fetch)
7999 (uri (pypi-uri "ipywidgets" version))
8000 (sha256
8001 (base32
8002 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
8003 (build-system python-build-system)
8004 (propagated-inputs
8005 `(("python-ipython" ,python-ipython)
8006 ("python-traitlets" ,python-traitlets)
8007 ("python-widgetsnbextension" ,python-widgetsnbextension)))
8008 (native-inputs
8009 `(("python-nose" ,python-nose)
8010 ("python-pytest" ,python-pytest)))
8011 (home-page "https://ipython.org")
8012 (synopsis "IPython HTML widgets for Jupyter")
8013 (description "Ipywidgets are interactive HTML widgets for Jupyter
8014 notebooks and the IPython kernel. Notebooks come alive when interactive
8015 widgets are used. Users gain control of their data and can visualize changes
8016 in the data.")
8017 (license license:bsd-3)))
8018
8019 (define-public python2-ipywidgets
8020 (package-with-python2 python-ipywidgets))
8021
8022 (define-public python-jupyter-console
8023 (package
8024 (name "python-jupyter-console")
8025 (version "6.0.0")
8026 (source
8027 (origin
8028 (method url-fetch)
8029 (uri (pypi-uri "jupyter_console" version))
8030 (sha256
8031 (base32
8032 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
8033 (build-system python-build-system)
8034 (propagated-inputs
8035 `(("python-ipykernel" ,python-ipykernel)
8036 ("python-jupyter-client" ,python-jupyter-client)
8037 ("python-prompt-toolkit" ,python-prompt-toolkit)
8038 ("python-pygments" ,python-pygments)))
8039 (native-inputs
8040 `(("python-nose" ,python-nose)))
8041 (home-page "https://jupyter.org")
8042 (synopsis "Jupyter terminal console")
8043 (description "This package provides a terminal-based console frontend for
8044 Jupyter kernels. It also allows for console-based interaction with non-Python
8045 Jupyter kernels such as IJulia and IRKernel.")
8046 (license license:bsd-3)))
8047
8048 (define-public python2-jupyter-console
8049 (package
8050 (name "python2-jupyter-console")
8051 (version "5.2.0")
8052 (source
8053 (origin
8054 (method url-fetch)
8055 (uri (pypi-uri "jupyter_console" version))
8056 (sha256
8057 (base32
8058 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
8059 (build-system python-build-system)
8060 ;; Tests only run in an TTY.
8061 (arguments `(#:tests? #f))
8062 (propagated-inputs
8063 `(("python2-ipykernel" ,python2-ipykernel)
8064 ("python2-jupyter-client" ,python2-jupyter-client)
8065 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
8066 ("python2-pygments" ,python2-pygments)))
8067 (native-inputs
8068 `(("python2-nose" ,python2-nose)))
8069 (home-page "https://jupyter.org")
8070 (synopsis "Jupyter terminal console")
8071 (description "This package provides a terminal-based console frontend for
8072 Jupyter kernels. It also allows for console-based interaction with non-Python
8073 Jupyter kernels such as IJulia and IRKernel.")
8074 (license license:bsd-3)))
8075
8076 ;; The python-ipython and python-jupyter-console require each other. To get
8077 ;; the functionality in both packages working, strip down the
8078 ;; python-jupyter-console package when using it as an input to python-ipython.
8079 (define python-jupyter-console-minimal
8080 (package
8081 (inherit python-jupyter-console)
8082 (name "python-jupyter-console-minimal")
8083 (arguments
8084 (substitute-keyword-arguments
8085 (package-arguments python-jupyter-console)
8086 ((#:phases phases)
8087 `(modify-phases ,phases
8088 (add-after 'install 'delete-bin
8089 (lambda* (#:key outputs #:allow-other-keys)
8090 ;; Delete the bin files, to avoid conflicts in profiles
8091 ;; where python-ipython and python-jupyter-console are
8092 ;; both present.
8093 (delete-file-recursively
8094 (string-append
8095 (assoc-ref outputs "out") "/bin"))))))))
8096 ;; Remove the python-ipython propagated input, to avoid the cycle
8097 (propagated-inputs
8098 (alist-delete
8099 "python-ipython"
8100 (package-propagated-inputs python-jupyter-console)))))
8101
8102 (define-public python-qtconsole
8103 (package
8104 (name "python-qtconsole")
8105 (version "4.4.3")
8106 (source
8107 (origin
8108 (method url-fetch)
8109 (uri (pypi-uri "qtconsole" version))
8110 (sha256
8111 (base32
8112 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
8113 (build-system python-build-system)
8114 (arguments
8115 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
8116 ;; but we only have the LTS version 5.x. This means that there might be
8117 ;; runtime errors, but since this is a dependency of the Jupyter package,
8118 ;; and Jupyter can be used without the qtconsole we can overlook this for
8119 ;; now.
8120 `(#:tests? #f
8121 #:phases
8122 (modify-phases %standard-phases
8123 (add-before 'check 'pre-check
8124 (lambda _
8125 (setenv "QT_QPA_PLATFORM" "offscreen")
8126 #t)))))
8127 (propagated-inputs
8128 `(("python-ipykernel" ,python-ipykernel)
8129 ("python-ipython" ,python-ipython)))
8130 (native-inputs
8131 `(("python-pytest" ,python-pytest)))
8132 (home-page "http://jupyter.org")
8133 (synopsis "Jupyter Qt console")
8134 (description "This package provides a Qt-based console for Jupyter with
8135 support for rich media output.")
8136 (license license:bsd-3)))
8137
8138 (define-public python-jsbeautifier
8139 (package
8140 (name "python-jsbeautifier")
8141 (version "1.10.2")
8142 (home-page "https://github.com/beautify-web/js-beautify")
8143 (source (origin
8144 (method git-fetch)
8145 (uri (git-reference
8146 (url home-page)
8147 (commit (string-append "v" version))))
8148 (file-name (git-file-name name version))
8149 (sha256
8150 (base32
8151 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
8152 (build-system python-build-system)
8153 (arguments
8154 `(#:phases (modify-phases %standard-phases
8155 (add-after 'unpack 'chdir
8156 (lambda _
8157 ;; The upstream Git repository contains all the code,
8158 ;; but this package only builds the python code.
8159 (chdir "python")
8160 #t))
8161 (add-after 'unpack 'patch-python-six-requirements
8162 (lambda _
8163 (substitute* "python/setup.py"
8164 (("six>=1.12.0")
8165 "six>=1.11.0"))
8166 #t)))))
8167 (propagated-inputs
8168 `(("python-editorconfig" ,python-editorconfig)
8169 ("python-six" ,python-six)))
8170 (native-inputs
8171 `(("python-pytest" ,python-pytest)))
8172 (synopsis "JavaScript unobfuscator and beautifier")
8173 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
8174 popular online obfuscators.")
8175 (license license:expat)))
8176
8177 (define-public jupyter
8178 (package
8179 (name "jupyter")
8180 (version "1.0.0")
8181 (source
8182 (origin
8183 (method url-fetch)
8184 (uri (pypi-uri "jupyter" version))
8185 (sha256
8186 (base32
8187 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8188 (build-system python-build-system)
8189 (arguments '(#:tests? #f)) ; there are none.
8190 (propagated-inputs
8191 `(("python-ipykernel" ,python-ipykernel)
8192 ("python-ipywidgets" ,python-ipywidgets)
8193 ("python-jupyter-console" ,python-jupyter-console)
8194 ("python-nbconvert" ,python-nbconvert)
8195 ("python-notebook" ,python-notebook)
8196 ("python-qtconsole" ,python-qtconsole)))
8197 (native-search-paths
8198 (list (search-path-specification
8199 (variable "JUPYTER_PATH")
8200 (files '("share/jupyter")))))
8201 (home-page "https://jupyter.org")
8202 (synopsis "Web application for interactive documents")
8203 (description
8204 "The Jupyter Notebook is a web application that allows you to create and
8205 share documents that contain live code, equations, visualizations and
8206 explanatory text. Uses include: data cleaning and transformation, numerical
8207 simulation, statistical modeling, machine learning and much more.")
8208 (license license:bsd-3)))
8209
8210 (define-public python-chardet
8211 (package
8212 (name "python-chardet")
8213 (version "3.0.4")
8214 (source
8215 (origin
8216 (method url-fetch)
8217 (uri (pypi-uri "chardet" version))
8218 (sha256
8219 (base32
8220 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
8221 (native-inputs
8222 `(("python-hypothesis" ,python-hypothesis)
8223 ("python-pytest" ,python-pytest)
8224 ("python-pytest-runner" ,python-pytest-runner)))
8225 (build-system python-build-system)
8226 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
8227 (arguments `(#:tests? #f))
8228 (home-page "https://github.com/chardet/chardet")
8229 (synopsis "Universal encoding detector for Python 2 and 3")
8230 (description
8231 "This package provides @code{chardet}, a Python module that can
8232 automatically detect a wide range of file encodings.")
8233 (license license:lgpl2.1+)))
8234
8235 (define-public python2-chardet
8236 (package-with-python2 python-chardet))
8237
8238 (define-public python-docopt
8239 (package
8240 (name "python-docopt")
8241 (version "0.6.2")
8242 (source
8243 (origin
8244 (method url-fetch)
8245 ;; The release on PyPI does not include tests.
8246 (uri (string-append
8247 "https://github.com/docopt/docopt/archive/"
8248 version ".tar.gz"))
8249 (file-name (string-append name "-" version ".tar.gz"))
8250 (sha256
8251 (base32
8252 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
8253 (build-system python-build-system)
8254 (native-inputs
8255 `(("python-pytest" ,python-pytest)))
8256 (arguments
8257 `(#:phases
8258 (modify-phases %standard-phases
8259 (replace 'check
8260 (lambda _ (invoke "py.test"))))))
8261 (home-page "http://docopt.org")
8262 (synopsis "Command-line interface description language for Python")
8263 (description "This library allows the user to define a command-line
8264 interface from a program's help message rather than specifying it
8265 programmatically with command-line parsers like @code{getopt} and
8266 @code{argparse}.")
8267 (license license:expat)))
8268
8269 (define-public python2-docopt
8270 (package-with-python2 python-docopt))
8271
8272 (define-public python-pythondialog
8273 (package
8274 (name "python-pythondialog")
8275 (version "3.4.0")
8276 (source
8277 (origin
8278 (method url-fetch)
8279 (uri (pypi-uri "pythondialog" version))
8280 (sha256
8281 (base32
8282 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8283 (build-system python-build-system)
8284 (arguments
8285 `(#:phases
8286 (modify-phases %standard-phases
8287 (add-after 'unpack 'patch-path
8288 (lambda* (#:key inputs #:allow-other-keys)
8289 (let* ((dialog (assoc-ref inputs "dialog")))
8290 ;; Since this library really wants to grovel the search path, we
8291 ;; must hardcode dialog's store path into it.
8292 (substitute* "dialog.py"
8293 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8294 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8295 #t))))
8296 #:tests? #f)) ; no test suite
8297 (propagated-inputs
8298 `(("dialog" ,dialog)))
8299 (home-page "http://pythondialog.sourceforge.net/")
8300 (synopsis "Python interface to the UNIX dialog utility")
8301 (description "A Python wrapper for the dialog utility. Its purpose is to
8302 provide an easy to use, pythonic and comprehensive Python interface to dialog.
8303 This allows one to make simple text-mode user interfaces on Unix-like systems")
8304 (license license:lgpl2.1)
8305 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8306
8307 (define-public python2-pythondialog
8308 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8309 (package
8310 (inherit base)
8311 (version (package-version python-pythondialog))
8312 (source (origin
8313 (method url-fetch)
8314 (uri (pypi-uri "python2-pythondialog" version))
8315 (sha256
8316 (base32
8317 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8318
8319 (define-public python-configobj
8320 (package
8321 (name "python-configobj")
8322 (version "5.0.6")
8323 (source (origin
8324 (method url-fetch)
8325 (uri (pypi-uri "configobj" version))
8326 (sha256
8327 (base32
8328 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8329 ;; Patch setup.py so it looks for python-setuptools, which is
8330 ;; required to parse the keyword 'install_requires' in setup.py.
8331 (patches (search-patches "python-configobj-setuptools.patch"))))
8332 (build-system python-build-system)
8333 (propagated-inputs
8334 `(("python-six" ,python-six)))
8335 (synopsis "Config file reading, writing and validation")
8336 (description "ConfigObj is a simple but powerful config file reader and
8337 writer: an ini file round tripper. Its main feature is that it is very easy to
8338 use, with a straightforward programmer’s interface and a simple syntax for
8339 config files.")
8340 (home-page "https://github.com/DiffSK/configobj")
8341 (license license:bsd-3)))
8342
8343 (define-public python2-configobj
8344 (package-with-python2 python-configobj))
8345
8346 (define-public python-configargparse
8347 (package
8348 (name "python-configargparse")
8349 (version "0.14.0")
8350 (source (origin
8351 (method url-fetch)
8352 (uri (pypi-uri "ConfigArgParse" version))
8353 (sha256
8354 (base32
8355 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
8356 (build-system python-build-system)
8357 (native-inputs
8358 `(("python-pyyaml" ,python-pyyaml)))
8359 (arguments
8360 `(#:phases
8361 (modify-phases %standard-phases
8362 (replace 'check
8363 (lambda _
8364 ;; Bypass setuptools-shim because one test relies on "setup.py"
8365 ;; being the first argument passed to the python call.
8366 ;;
8367 ;; NOTE: Many tests do not run because they rely on Python's
8368 ;; built-in test.test_argparse, but we remove the unit tests from
8369 ;; our Python installation.
8370 (invoke "python" "setup.py" "test"))))))
8371 (synopsis "Replacement for argparse")
8372 (description "A drop-in replacement for argparse that allows options to also
8373 be set via config files and/or environment variables.")
8374 (home-page "https://github.com/bw2/ConfigArgParse")
8375 (license license:expat)))
8376
8377 (define-public python2-configargparse
8378 (package-with-python2 python-configargparse))
8379
8380 (define-public python-argparse-manpage
8381 (package
8382 (name "python-argparse-manpage")
8383 (version "1.1")
8384 (source
8385 (origin
8386 (method url-fetch)
8387 (uri (pypi-uri "argparse-manpage" version))
8388 (sha256
8389 (base32
8390 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8391 (build-system python-build-system)
8392 (home-page "https://github.com/praiskup/argparse-manpage")
8393 (synopsis "Build manual page from Python's ArgumentParser object")
8394 (description
8395 "This package provides tools to build manual pages from Python's
8396 @code{ArgumentParser} object.")
8397 (license license:asl2.0)))
8398
8399 (define-public python-contextlib2
8400 (package
8401 (name "python-contextlib2")
8402 (version "0.5.5")
8403 (source
8404 (origin
8405 (method url-fetch)
8406 (uri (pypi-uri "contextlib2" version))
8407 (sha256
8408 (base32
8409 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8410 (build-system python-build-system)
8411 (home-page "http://contextlib2.readthedocs.org/")
8412 (synopsis "Tools for decorators and context managers")
8413 (description "This module is primarily a backport of the Python
8414 3.2 contextlib to earlier Python versions. Like contextlib, it
8415 provides utilities for common tasks involving decorators and context
8416 managers. It also contains additional features that are not part of
8417 the standard library.")
8418 (license license:psfl)))
8419
8420 (define-public python2-contextlib2
8421 (package
8422 (name "python2-contextlib2")
8423 (version "0.5.5")
8424 (source
8425 (origin
8426 (method url-fetch)
8427 (uri (pypi-uri "contextlib2" version))
8428 (sha256
8429 (base32
8430 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8431 (build-system python-build-system)
8432 (arguments
8433 `(#:python ,python-2
8434 #:phases
8435 (modify-phases %standard-phases
8436 (replace 'check
8437 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
8438 (native-inputs
8439 `(("python2-unittest2" ,python2-unittest2)))
8440 (home-page "http://contextlib2.readthedocs.org/")
8441 (synopsis "Tools for decorators and context managers")
8442 (description "This module is primarily a backport of the Python
8443 3.2 contextlib to earlier Python versions. Like contextlib, it
8444 provides utilities for common tasks involving decorators and context
8445 managers. It also contains additional features that are not part of
8446 the standard library.")
8447 (license license:psfl)))
8448
8449 (define-public python-texttable
8450 (package
8451 (name "python-texttable")
8452 (version "0.9.1")
8453 (source
8454 (origin
8455 (method url-fetch)
8456 (uri (pypi-uri "texttable" version))
8457 (sha256
8458 (base32
8459 "0yawv64c0zbawwv6zz84whb32fnb2n9jylwjcfsrcdgh7xvl340i"))))
8460 (build-system python-build-system)
8461 (arguments '(#:tests? #f)) ; no tests
8462 (home-page "https://github.com/foutaise/texttable/")
8463 (synopsis "Python module for creating simple ASCII tables")
8464 (description "Texttable is a Python module for creating simple ASCII
8465 tables.")
8466 (license license:lgpl2.1+)))
8467
8468 (define-public python2-texttable
8469 (package-with-python2 python-texttable))
8470
8471 (define-public python-atomicwrites
8472 (package
8473 (name "python-atomicwrites")
8474 (version "1.3.0")
8475 (source (origin
8476 (method url-fetch)
8477 (uri (pypi-uri "atomicwrites" version))
8478 (sha256
8479 (base32
8480 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
8481 (build-system python-build-system)
8482 (synopsis "Atomic file writes in Python")
8483 (description "Library for atomic file writes using platform dependent tools
8484 for atomic file system operations.")
8485 (home-page "https://github.com/untitaker/python-atomicwrites")
8486 (license license:expat)))
8487
8488 (define-public python2-atomicwrites
8489 (package-with-python2 python-atomicwrites))
8490
8491 (define-public python-click-threading
8492 (package
8493 (name "python-click-threading")
8494 (version "0.4.4")
8495 (source (origin
8496 (method url-fetch)
8497 (uri (pypi-uri "click-threading" version))
8498 (sha256
8499 (base32
8500 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8501 (build-system python-build-system)
8502 (propagated-inputs
8503 `(("python-click" ,python-click)))
8504 (synopsis "Utilities for multithreading in Click")
8505 (description "This package provides utilities for multithreading in Click
8506 applications.")
8507 (home-page "https://github.com/click-contrib/click-threading")
8508 (license license:expat)))
8509
8510 (define-public python-click-log
8511 (package
8512 (name "python-click-log")
8513 (version "0.3.2")
8514 (source (origin
8515 (method url-fetch)
8516 (uri (pypi-uri "click-log" version))
8517 (sha256
8518 (base32
8519 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8520 (build-system python-build-system)
8521 (propagated-inputs
8522 `(("python-click" ,python-click)))
8523 (synopsis "Logging for click applications")
8524 (description "This package provides a Python library for logging Click
8525 applications.")
8526 (home-page "https://github.com/click-contrib/click-log")
8527 (license license:expat)))
8528
8529 (define-public python-apipkg
8530 (package
8531 (name "python-apipkg")
8532 (version "1.4")
8533 (source (origin
8534 (method url-fetch)
8535 (uri (pypi-uri "apipkg" version))
8536 (sha256
8537 (base32
8538 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8539 (build-system python-build-system)
8540 (native-inputs
8541 `(("python-pytest" ,python-pytest)))
8542 (synopsis "Namespace control and lazy-import mechanism")
8543 (description "With apipkg you can control the exported namespace of a Python
8544 package and greatly reduce the number of imports for your users. It is a small
8545 pure Python module that works on virtually all Python versions.")
8546 (home-page "https://github.com/pytest-dev/apipkg")
8547 (license license:expat)))
8548
8549 (define-public python2-apipkg
8550 (package-with-python2 python-apipkg))
8551
8552 (define-public python-execnet
8553 (package
8554 (name "python-execnet")
8555 (version "1.4.1")
8556 (source (origin
8557 (method url-fetch)
8558 (uri (pypi-uri "execnet" version))
8559 (sha256
8560 (base32
8561 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8562 (build-system python-build-system)
8563 (arguments
8564 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8565 ;; The two test failures are caused by the lack of an `ssh` executable.
8566 ;; The test suite can be run with pytest after the 'install' phase.
8567 #:tests? #f))
8568 (native-inputs
8569 `(("python-pytest" ,python-pytest)
8570 ("python-setuptools-scm" ,python-setuptools-scm)))
8571 (propagated-inputs
8572 `(("python-apipkg" ,python-apipkg)))
8573 (synopsis "Rapid multi-Python deployment")
8574 (description "Execnet provides a share-nothing model with
8575 channel-send/receive communication for distributing execution across many
8576 Python interpreters across version, platform and network barriers. It has a
8577 minimal and fast API targeting the following uses:
8578 @enumerate
8579 @item distribute tasks to (many) local or remote CPUs
8580 @item write and deploy hybrid multi-process applications
8581 @item write scripts to administer multiple environments
8582 @end enumerate")
8583 (home-page "http://codespeak.net/execnet/")
8584 (license license:expat)))
8585
8586 (define-public python2-execnet
8587 (package-with-python2 python-execnet))
8588
8589 (define-public python-icalendar
8590 (package
8591 (name "python-icalendar")
8592 (version "4.0.3")
8593 (source (origin
8594 (method url-fetch)
8595 (uri (pypi-uri "icalendar" version))
8596 (sha256
8597 (base32
8598 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
8599 (build-system python-build-system)
8600 (propagated-inputs
8601 `(("python-dateutil" ,python-dateutil)
8602 ("python-pytz" ,python-pytz)))
8603 (synopsis "Python library for parsing iCalendar files")
8604 (description "The icalendar package is a parser/generator of iCalendar
8605 files for use with Python.")
8606 (home-page "https://github.com/collective/icalendar")
8607 (license license:bsd-2)))
8608
8609 (define-public python-args
8610 (package
8611 (name "python-args")
8612 (version "0.1.0")
8613 (source (origin
8614 (method url-fetch)
8615 (uri (pypi-uri "args" version))
8616 (sha256
8617 (base32
8618 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8619 (build-system python-build-system)
8620 (home-page "https://github.com/kennethreitz/args")
8621 (synopsis "Command-line argument parser")
8622 (description
8623 "This library provides a Python module to parse command-line arguments.")
8624 (license license:bsd-3)))
8625
8626 (define-public python2-args
8627 (package-with-python2 python-args))
8628
8629 (define-public python-clint
8630 (package
8631 (name "python-clint")
8632 (version "0.5.1")
8633 (source (origin
8634 (method url-fetch)
8635 (uri (pypi-uri "clint" version))
8636 (sha256
8637 (base32
8638 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8639 (build-system python-build-system)
8640 (arguments
8641 '(#:phases
8642 (modify-phases %standard-phases
8643 (replace 'check
8644 (lambda _ (invoke "py.test" "-v"))))))
8645 (native-inputs
8646 `(("python-pytest" ,python-pytest)))
8647 (propagated-inputs
8648 `(("python-args" ,python-args)))
8649 (home-page "https://github.com/kennethreitz/clint")
8650 (synopsis "Command-line interface tools")
8651 (description
8652 "Clint is a Python module filled with a set of tools for developing
8653 command-line applications, including tools for colored and indented
8654 output, progress bar display, and pipes.")
8655 (license license:isc)))
8656
8657 (define-public python2-clint
8658 (package-with-python2 python-clint))
8659
8660 (define-public python-rply
8661 (package
8662 (name "python-rply")
8663 (version "0.7.5")
8664 (source (origin
8665 (method url-fetch)
8666 (uri (pypi-uri "rply" version))
8667 (sha256
8668 (base32
8669 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8670 (build-system python-build-system)
8671 (propagated-inputs
8672 `(("python-appdirs" ,python-appdirs)))
8673 (home-page "https://github.com/alex/rply")
8674 (synopsis "Parser generator for Python")
8675 (description
8676 "This package provides a pure Python based parser generator, that also
8677 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8678 with a new public API, and RPython support.")
8679 (license license:bsd-3)))
8680
8681 (define-public python2-rply
8682 (package-with-python2 python-rply))
8683
8684 (define-public python-hy
8685 (package
8686 (name "python-hy")
8687 (version "0.13.0")
8688 (source (origin
8689 (method url-fetch)
8690 (uri (pypi-uri "hy" version))
8691 (sha256
8692 (base32
8693 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
8694 (build-system python-build-system)
8695 (arguments
8696 '(#:phases
8697 (modify-phases %standard-phases
8698 (replace 'check
8699 (lambda _
8700 ;; Tests require write access to HOME.
8701 (setenv "HOME" "/tmp")
8702 (invoke "nosetests"))))))
8703 (native-inputs
8704 `(("python-coverage" ,python-coverage)
8705 ("python-nose" ,python-nose)))
8706 (propagated-inputs
8707 `(("python-astor" ,python-astor)
8708 ("python-clint" ,python-clint)
8709 ("python-rply" ,python-rply)))
8710 (home-page "http://hylang.org/")
8711 (synopsis "Lisp frontend to Python")
8712 (description
8713 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8714 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8715 Python at your fingertips, in Lisp form.")
8716 (license license:expat)))
8717
8718 (define-public python2-hy
8719 (package-with-python2 python-hy))
8720
8721 (define-public python2-functools32
8722 (package
8723 (name "python2-functools32")
8724 (version "3.2.3-2")
8725 (source
8726 (origin
8727 (method url-fetch)
8728 (uri (pypi-uri "functools32" version))
8729 (sha256
8730 (base32
8731 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8732 (build-system python-build-system)
8733 (arguments
8734 `(#:python ,python-2
8735 #:tests? #f)) ; no test target
8736 (home-page "https://github.com/MiCHiLU/python-functools32")
8737 (synopsis
8738 "Backport of the functools module from Python 3.2.3")
8739 (description
8740 "This package is a backport of the @code{functools} module from Python
8741 3.2.3 for use with older versions of Python and PyPy.")
8742 (license license:expat)))
8743
8744 (define-public python2-subprocess32
8745 (package
8746 (name "python2-subprocess32")
8747 (version "3.2.7")
8748 (source (origin
8749 (method url-fetch)
8750 (uri (pypi-uri "subprocess32" version))
8751 (sha256
8752 (base32
8753 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8754 (patches
8755 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8756 (build-system python-build-system)
8757 (arguments
8758 `(#:python ,python-2
8759 ;; The test suite fails with Python > 2.7.13:
8760 ;; import test.support
8761 ;; ImportError: No module named support
8762 #:tests? #f
8763 #:phases
8764 (modify-phases %standard-phases
8765 (add-after 'unpack 'patch-/bin/sh
8766 (lambda _
8767 (substitute* '("subprocess32.py"
8768 "test_subprocess32.py")
8769 (("/bin/sh") (which "sh")))
8770 #t)))))
8771 (home-page "https://github.com/google/python-subprocess32")
8772 (synopsis "Backport of the subprocess module from Python 3.2")
8773 (description
8774 "This is a backport of the @code{subprocess} standard library module
8775 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8776 new features. On POSIX systems it is guaranteed to be reliable when used
8777 in threaded applications. It includes timeout support from Python 3.3 but
8778 otherwise matches 3.2’s API.")
8779 (license license:psfl)))
8780
8781 (define-public python2-futures
8782 (package
8783 (name "python2-futures")
8784 (version "3.2.0")
8785 (source
8786 (origin
8787 (method url-fetch)
8788 (uri (pypi-uri "futures" version))
8789 (sha256
8790 (base32
8791 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8792 (build-system python-build-system)
8793 (arguments
8794 `(#:python ,python-2
8795 #:phases
8796 (modify-phases %standard-phases
8797 (replace 'check
8798 (lambda _
8799 (invoke "python" "test_futures.py")
8800 #t)))))
8801 (home-page "https://github.com/agronholm/pythonfutures")
8802 (synopsis
8803 "Backport of the concurrent.futures package from Python 3.2")
8804 (description
8805 "The concurrent.futures module provides a high-level interface for
8806 asynchronously executing callables. This package backports the
8807 concurrent.futures package from Python 3.2")
8808 (license license:bsd-3)))
8809
8810 (define-public python-promise
8811 (package
8812 (name "python-promise")
8813 (version "0.4.2")
8814 (source
8815 (origin
8816 (method url-fetch)
8817 (uri (pypi-uri "promise" version))
8818 (sha256
8819 (base32
8820 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8821 (build-system python-build-system)
8822 ;; Tests wants python-futures, which is a python2 only program, and
8823 ;; can't be found by python-promise at test time.
8824 (arguments `(#:tests? #f))
8825 (home-page "https://github.com/syrusakbary/promise")
8826 (synopsis "Promises/A+ implementation for Python")
8827 (description
8828 "Promises/A+ implementation for Python")
8829 (properties `((python2-variant . ,(delay python2-promise))))
8830 (license license:expat)))
8831
8832 (define-public python2-promise
8833 (let ((promise (package-with-python2
8834 (strip-python2-variant python-promise))))
8835 (package (inherit promise)
8836 (arguments (substitute-keyword-arguments (package-arguments promise)
8837 ((#:tests? _) #t)))
8838 (native-inputs
8839 `(("python2-futures" ,python2-futures)
8840 ("python2-pytest" ,python2-pytest)
8841 ,@(package-native-inputs promise))))))
8842
8843 (define-public python-progressbar33
8844 (package
8845 (name "python-progressbar33")
8846 (version "2.4")
8847 (source
8848 (origin
8849 (method url-fetch)
8850 (uri (pypi-uri "progressbar33" version))
8851 (sha256
8852 (base32
8853 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
8854 (build-system python-build-system)
8855 (home-page "http://github.com/germangh/python-progressbar")
8856 (synopsis "Text progress bar library for Python")
8857 (description
8858 "This package provides a text progress bar library for Python. This
8859 version only differs from the original @code{progressbar} package in that it
8860 uses relative package imports instead of absolute imports, which is necessary
8861 for the module to work under Python 3.3.")
8862 ;; Either or both of these licenses may be selected.
8863 (license (list license:lgpl2.1+ license:bsd-3))))
8864
8865 (define-public python-colorama
8866 (package
8867 (name "python-colorama")
8868 (version "0.3.9")
8869 (source
8870 (origin
8871 (method url-fetch)
8872 (uri (pypi-uri "colorama" version))
8873 (sha256
8874 (base32
8875 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
8876 (build-system python-build-system)
8877 (synopsis "Colored terminal text rendering for Python")
8878 (description "Colorama is a Python library for rendering colored terminal
8879 text.")
8880 (home-page "https://pypi.python.org/pypi/colorama")
8881 (license license:bsd-3)))
8882
8883 (define-public python2-colorama
8884 (package-with-python2 python-colorama))
8885
8886 (define-public python-rsa
8887 (package
8888 (name "python-rsa")
8889 (version "3.4.2")
8890 (source
8891 (origin
8892 (method url-fetch)
8893 (uri (pypi-uri "rsa" version))
8894 (sha256
8895 (base32
8896 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8897 (build-system python-build-system)
8898 (propagated-inputs
8899 `(("python-pyasn1" ,python-pyasn1)))
8900 (synopsis "Pure-Python RSA implementation")
8901 (description "Python-RSA is a pure-Python RSA implementation. It supports
8902 encryption and decryption, signing and verifying signatures, and key
8903 generation according to PKCS#1 version 1.5. It can be used as a Python
8904 library as well as on the command line.")
8905 (home-page "https://stuvel.eu/rsa")
8906 (license license:asl2.0)))
8907
8908 (define-public python2-rsa
8909 (package-with-python2 python-rsa))
8910
8911 (define-public python-pluggy
8912 (package
8913 (name "python-pluggy")
8914 (version "0.11.0")
8915 (source
8916 (origin
8917 (method url-fetch)
8918 (uri (pypi-uri "pluggy" version))
8919 (sha256
8920 (base32
8921 "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895"))))
8922 (build-system python-build-system)
8923 (native-inputs
8924 `(("python-setuptools-scm" ,python-setuptools-scm)))
8925 (synopsis "Plugin and hook calling mechanism for Python")
8926 (description "Pluggy is an extraction of the plugin manager as used by
8927 Pytest but stripped of Pytest specific details.")
8928 (home-page "https://pypi.python.org/pypi/pluggy")
8929 (license license:expat)))
8930
8931 (define-public python2-pluggy
8932 (package-with-python2 python-pluggy))
8933
8934 (define-public python-tox
8935 (package
8936 (name "python-tox")
8937 (version "2.8.1")
8938 (source
8939 (origin
8940 (method url-fetch)
8941 (uri (pypi-uri "tox" version))
8942 (sha256
8943 (base32
8944 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8945 (build-system python-build-system)
8946 (arguments
8947 ;; FIXME: Tests require pytest-timeout, which itself requires
8948 ;; pytest>=2.8.0 for installation.
8949 '(#:tests? #f))
8950 (propagated-inputs
8951 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8952 ("python-py" ,python-py)
8953 ("python-virtualenv" ,python-virtualenv)))
8954 (native-inputs
8955 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8956 ("python-pytest" ,python-pytest) ; >= 2.3.5
8957 ("python-setuptools-scm" ,python-setuptools-scm)))
8958 (home-page "http://tox.testrun.org/")
8959 (synopsis "Virtualenv-based automation of test activities")
8960 (description "Tox is a generic virtualenv management and test command line
8961 tool. It can be used to check that a package installs correctly with
8962 different Python versions and interpreters, or run tests in each type of
8963 supported environment, or act as a frontend to continuous integration
8964 servers.")
8965 (license license:expat)))
8966
8967 (define-public python2-tox
8968 (package-with-python2 python-tox))
8969
8970 (define-public python-jmespath
8971 (package
8972 (name "python-jmespath")
8973 (version "0.9.3")
8974 (source
8975 (origin
8976 (method url-fetch)
8977 (uri (pypi-uri "jmespath" version))
8978 (sha256
8979 (base32
8980 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
8981 (build-system python-build-system)
8982 (native-inputs
8983 `(("python-nose" ,python-nose)))
8984 (synopsis "JSON Matching Expressions")
8985 (description "JMESPath (pronounced “james path”) is a Python library that
8986 allows one to declaratively specify how to extract elements from a JSON
8987 document.")
8988 (home-page "https://github.com/jmespath/jmespath.py")
8989 (license license:expat)))
8990
8991 (define-public python2-jmespath
8992 (package-with-python2 python-jmespath))
8993
8994 (define-public python-botocore
8995 (package
8996 (name "python-botocore")
8997 (version "1.12.149")
8998 (source
8999 (origin
9000 (method url-fetch)
9001 (uri (pypi-uri "botocore" version))
9002 (sha256
9003 (base32
9004 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
9005 (build-system python-build-system)
9006 (arguments
9007 ;; FIXME: Many tests are failing.
9008 '(#:tests? #f))
9009 (propagated-inputs
9010 `(("python-dateutil" ,python-dateutil)
9011 ("python-docutils" ,python-docutils)
9012 ("python-jmespath" ,python-jmespath)))
9013 (native-inputs
9014 `(("python-mock" ,python-mock)
9015 ("python-nose" ,python-nose)
9016 ("behave" ,behave)
9017 ("python-tox" ,python-tox)
9018 ("python-urllib3" ,python-urllib3)
9019 ("python-wheel" ,python-wheel)))
9020 (home-page "https://github.com/boto/botocore")
9021 (synopsis "Low-level interface to AWS")
9022 (description "Botocore is a Python library that provides a low-level
9023 interface to the Amazon Web Services (AWS) API.")
9024 (license license:asl2.0)))
9025
9026 (define-public python2-botocore
9027 (package-with-python2 python-botocore))
9028
9029 (define-public python-xdo
9030 (package
9031 (name "python-xdo")
9032 (version "0.3")
9033 (source (origin
9034 (method url-fetch)
9035 (uri (string-append
9036 "http://http.debian.net/debian/pool/main/p/python-xdo/"
9037 "python-xdo_" version ".orig.tar.gz"))
9038 (sha256
9039 (base32
9040 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
9041 (build-system python-build-system)
9042 (arguments
9043 '(#:phases
9044 (modify-phases %standard-phases
9045 (add-before 'install 'patch-libxdo-path
9046 ;; Hardcode the path of dynamically loaded libxdo library.
9047 (lambda* (#:key inputs #:allow-other-keys)
9048 (let ((libxdo (string-append
9049 (assoc-ref inputs "xdotool")
9050 "/lib/libxdo.so")))
9051 (substitute* "xdo/_xdo.py"
9052 (("find_library\\(\"xdo\"\\)")
9053 (simple-format #f "\"~a\"" libxdo)))
9054 #t))))
9055 #:tests? #f)) ; no tests provided
9056 (propagated-inputs
9057 `(("python-six" ,python-six)))
9058 (inputs
9059 `(("xdotool" ,xdotool)
9060 ("libX11" ,libx11)))
9061 (home-page "https://tracker.debian.org/pkg/python-xdo")
9062 (synopsis "Python library for simulating X11 keyboard/mouse input")
9063 (description "Provides bindings to libxdo for manipulating X11 via simulated
9064 input. (Note that this is mostly a legacy library; you may wish to look at
9065 python-xdo for newer bindings.)")
9066 (license license:bsd-3)))
9067
9068 (define-public python2-xdo
9069 (package-with-python2 python-xdo))
9070
9071 (define-public python-mako
9072 (package
9073 (name "python-mako")
9074 (version "1.1.0")
9075 (source
9076 (origin
9077 (method url-fetch)
9078 (uri (pypi-uri "Mako" version))
9079 (sha256
9080 (base32
9081 "0jqa3qfpykyn4fmkn0kh6043sfls7br8i2bsdbccazcvk9cijsd3"))))
9082 (build-system python-build-system)
9083 (arguments
9084 `(#:phases (modify-phases %standard-phases
9085 (replace 'check
9086 (lambda _
9087 (invoke "pytest" "-vv"))))))
9088 (propagated-inputs
9089 `(("python-markupsafe" ,python-markupsafe)))
9090 (native-inputs
9091 `(("python-mock" ,python-mock)
9092 ("python-pytest" ,python-pytest)))
9093 (home-page "https://www.makotemplates.org/")
9094 (synopsis "Templating language for Python")
9095 (description "Mako is a templating language for Python that compiles
9096 templates into Python modules.")
9097 (license license:expat)))
9098
9099 (define-public python2-mako
9100 (package-with-python2 python-mako))
9101
9102 (define-public python-waitress
9103 (package
9104 (name "python-waitress")
9105 (version "1.1.0")
9106 (source
9107 (origin
9108 (method url-fetch)
9109 (uri (pypi-uri "waitress" version))
9110 (patches (search-patches "python-waitress-fix-tests.patch"))
9111 (sha256
9112 (base32
9113 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
9114 (build-system python-build-system)
9115 (home-page "https://github.com/Pylons/waitress")
9116 (synopsis "Waitress WSGI server")
9117 (description "Waitress is meant to be a production-quality pure-Python WSGI
9118 server with very acceptable performance.")
9119 (license license:zpl2.1)))
9120
9121 (define-public python2-waitress
9122 (package-with-python2 python-waitress))
9123
9124 (define-public python-whichcraft
9125 (package
9126 (name "python-whichcraft")
9127 (version "0.6.1")
9128 (source
9129 (origin
9130 (method url-fetch)
9131 (uri (pypi-uri "whichcraft" version))
9132 (sha256
9133 (base32
9134 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
9135 (build-system python-build-system)
9136 (native-inputs
9137 `(("python-pytest" ,python-pytest)))
9138 (home-page "https://github.com/pydanny/whichcraft")
9139 (synopsis "Cross-platform cross-python shutil.which functionality")
9140 (description
9141 "This package provides a shim of the shutil.which function that's
9142 designed to work across multiple versions of Python.")
9143 (license license:bsd-3)))
9144
9145 (define-public python-cookiecutter
9146 (package
9147 (name "python-cookiecutter")
9148 (version "1.6.0")
9149 (source
9150 (origin
9151 (method url-fetch)
9152 (uri (pypi-uri "cookiecutter" version))
9153 (sha256
9154 (base32
9155 "0glsvaz8igi2wy1hsnhm9fkn6560vdvdixzvkq6dn20z3hpaa5hk"))))
9156 (build-system python-build-system)
9157 (native-inputs
9158 `(("python-freezegun" ,python-freezegun)
9159 ("python-pytest" ,python-pytest)
9160 ("python-pytest-catchlog" ,python-pytest-catchlog)
9161 ("python-pytest-cov" ,python-pytest-cov)
9162 ("python-pytest-mock" ,python-pytest-mock)))
9163 (propagated-inputs
9164 `(("python-binaryornot" ,python-binaryornot)
9165 ("python-click" ,python-click)
9166 ("python-future" ,python-future)
9167 ("python-jinja2" ,python-jinja2)
9168 ("python-jinja2-time" ,python-jinja2-time)
9169 ("python-poyo" ,python-poyo)
9170 ("python-requests" ,python-requests)
9171 ("python-whichcraft" ,python-whichcraft)))
9172 (home-page "https://github.com/audreyr/cookiecutter")
9173 (synopsis
9174 "Command-line utility that creates projects from project templates")
9175 (description
9176 "This package provides a command-line utility that creates projects from
9177 project templates, e.g. creating a Python package project from a Python package
9178 project template.")
9179 (license license:bsd-3)))
9180
9181 (define-public python-pyquery
9182 (package
9183 (name "python-pyquery")
9184 (version "1.2.17")
9185 (source
9186 (origin
9187 (method url-fetch)
9188 (uri (pypi-uri "pyquery" version))
9189 (sha256
9190 (base32
9191 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9192 (build-system python-build-system)
9193 (native-inputs
9194 `(("python-webob" ,python-webob)
9195 ("python-webtest" ,python-webtest)))
9196 (propagated-inputs
9197 `(("python-lxml" ,python-lxml)
9198 ("python-cssselect" ,python-cssselect)))
9199 (home-page "https://github.com/gawel/pyquery")
9200 (synopsis "Make jQuery-like queries on xml documents")
9201 (description "pyquery allows you to make jQuery queries on xml documents.
9202 The API is as much as possible the similar to jQuery. pyquery uses lxml for
9203 fast xml and html manipulation.")
9204 (license license:bsd-3)))
9205
9206 (define-public python-anyjson
9207 (package
9208 (name "python-anyjson")
9209 (version "0.3.3")
9210 (source
9211 (origin
9212 (method url-fetch)
9213 (uri (pypi-uri "anyjson" version))
9214 (sha256
9215 (base32
9216 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9217 (build-system python-build-system)
9218 (arguments
9219 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9220 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9221 ;; whatever) so this transformation needs to be done before the tests
9222 ;; can be run. Maybe we could add a build step to transform beforehand
9223 ;; but it could be annoying/difficult.
9224 ;; We can enable tests for the Python 2 version, though, and do below.
9225 #:tests? #f))
9226 (home-page "https://bitbucket.org/runeh/anyjson/")
9227 (synopsis
9228 "Wraps best available JSON implementation in a common interface")
9229 (description
9230 "Anyjson loads whichever is the fastest JSON module installed
9231 and provides a uniform API regardless of which JSON implementation is used.")
9232 (license license:bsd-3)
9233 (properties `((python2-variant . ,(delay python2-anyjson))))))
9234
9235 (define-public python2-anyjson
9236 (let ((anyjson (package-with-python2
9237 (strip-python2-variant python-anyjson))))
9238 (package
9239 (inherit anyjson)
9240 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9241 #:tests? #t
9242 ,@(package-arguments anyjson)))
9243 (native-inputs `(("python2-nose" ,python2-nose))))))
9244
9245 (define-public python-amqp
9246 (package
9247 (name "python-amqp")
9248 (version "2.3.2")
9249 (source
9250 (origin
9251 (method url-fetch)
9252 (uri (pypi-uri "amqp" version))
9253 (sha256
9254 (base32
9255 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
9256 (build-system python-build-system)
9257 (native-inputs
9258 `(("python-case" ,python-case)
9259 ("python-pytest-sugar" ,python-pytest-sugar)
9260 ("python-mock" ,python-mock)))
9261 (propagated-inputs
9262 `(("python-vine" ,python-vine)))
9263 (home-page "https://github.com/celery/py-amqp")
9264 (synopsis
9265 "Low-level AMQP client for Python (fork of amqplib)")
9266 (description
9267 "This is a fork of amqplib which was originally written by Barry Pederson.
9268 It is maintained by the Celery project, and used by kombu as a pure python
9269 alternative when librabbitmq is not available.")
9270 (license license:lgpl2.1+)
9271 (properties `((python2-variant . ,(delay python2-amqp))))))
9272
9273 (define-public python2-amqp
9274 (let ((amqp (package-with-python2
9275 (strip-python2-variant python-amqp))))
9276 (package
9277 (inherit amqp)
9278 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9279 ;; unmaintained. Weirdly, does not do this on the python 3
9280 ;; version?
9281 #:tests? #f
9282 ,@(package-arguments amqp))))))
9283
9284 (define-public python-txamqp
9285 (package
9286 (name "python-txamqp")
9287 (version "0.8.2")
9288 (source
9289 (origin
9290 (method url-fetch)
9291 (uri (pypi-uri "txAMQP" version))
9292 (sha256
9293 (base32
9294 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
9295 (build-system python-build-system)
9296 (propagated-inputs
9297 `(("python-six" ,python-six)
9298 ("python-twisted" ,python-twisted)))
9299 (home-page "https://github.com/txamqp/txamqp")
9300 (synopsis "Communicate with AMQP peers and brokers using Twisted")
9301 (description
9302 "This package provides a Python library for communicating with AMQP peers
9303 and brokers using the asynchronous networking framework Twisted. It contains
9304 all the necessary code to connect, send and receive messages to/from an
9305 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
9306 also includes support for using Thrift RPC over AMQP in Twisted
9307 applications.")
9308 (license license:asl2.0)))
9309
9310 (define-public python2-txamqp
9311 (package-with-python2 python-txamqp))
9312
9313 (define-public python-kombu
9314 (package
9315 (name "python-kombu")
9316 (version "4.2.2")
9317 (source
9318 (origin
9319 (method url-fetch)
9320 (uri (pypi-uri "kombu" version))
9321 (sha256
9322 (base32
9323 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
9324 (build-system python-build-system)
9325 (native-inputs
9326 `(("python-mock" ,python-mock)
9327 ("python-case" ,python-case)
9328 ("python-pyro4" ,python-pyro4)
9329 ("python-pytest-sugar" ,python-pytest-sugar)
9330 ("python-pytz" ,python-pytz)))
9331 (propagated-inputs
9332 `(("python-anyjson" ,python-anyjson)
9333 ("python-amqp" ,python-amqp)
9334 ("python-redis" ,python-redis)))
9335 (home-page "https://kombu.readthedocs.io")
9336 (synopsis "Message passing library for Python")
9337 (description "The aim of Kombu is to make messaging in Python as easy as
9338 possible by providing an idiomatic high-level interface for the AMQ protocol,
9339 and also provide proven and tested solutions to common messaging problems.
9340 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9341 message orientation, queuing, routing, reliability and security, for which the
9342 RabbitMQ messaging server is the most popular implementation.")
9343 (license license:bsd-3)
9344 (properties `((python2-variant . ,(delay python2-kombu))))))
9345
9346 (define-public python2-kombu
9347 (let ((kombu (package-with-python2
9348 (strip-python2-variant python-kombu))))
9349 (package
9350 (inherit kombu)
9351 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9352 ;; It works fine on the python3 variant.
9353 #:tests? #f
9354 ,@(package-arguments kombu)))
9355 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9356 ,@(package-native-inputs kombu))))))
9357
9358 (define-public python-billiard
9359 (package
9360 (name "python-billiard")
9361 (version "3.5.0.5")
9362 (source
9363 (origin
9364 (method url-fetch)
9365 (uri (pypi-uri "billiard" version))
9366 (sha256
9367 (base32
9368 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9369 (build-system python-build-system)
9370 (native-inputs
9371 `(("python-case" ,python-case)
9372 ("python-pytest" ,python-pytest)))
9373 (home-page "https://github.com/celery/billiard")
9374 (synopsis
9375 "Python multiprocessing fork with improvements and bugfixes")
9376 (description
9377 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9378 multiprocessing package itself is a renamed and updated version of R Oudkerk's
9379 pyprocessing package. This standalone variant is intended to be compatible with
9380 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9381 (license license:bsd-3)
9382 (properties `((python2-variant . ,(delay python2-billiard))))))
9383
9384 (define-public python2-billiard
9385 (let ((billiard (package-with-python2
9386 (strip-python2-variant python-billiard))))
9387 (package
9388 (inherit billiard)
9389 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9390 ("python2-mock" ,python2-mock)
9391 ,@(package-native-inputs billiard))))))
9392
9393 (define-public python-celery
9394 (package
9395 (name "python-celery")
9396 (version "4.2.1")
9397 (source
9398 (origin
9399 (method url-fetch)
9400 (uri (pypi-uri "celery" version))
9401 (sha256
9402 (base32
9403 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9404 (build-system python-build-system)
9405 (arguments
9406 '(;; TODO The tests fail with Python 3.7
9407 ;; https://github.com/celery/celery/issues/4849
9408 #:tests? #f
9409 #:phases
9410 (modify-phases %standard-phases
9411 (add-after 'unpack 'patch-requirements
9412 (lambda _
9413 (substitute* "requirements/test.txt"
9414 (("pytest>=3\\.0,<3\\.3")
9415 "pytest>=3.0"))
9416 #t)))))
9417 (native-inputs
9418 `(("python-case" ,python-case)
9419 ("python-pytest" ,python-pytest)))
9420 (propagated-inputs
9421 `(("python-pytz" ,python-pytz)
9422 ("python-billiard" ,python-billiard)
9423 ("python-kombu" ,python-kombu)))
9424 (home-page "https://celeryproject.org")
9425 (synopsis "Distributed Task Queue")
9426 (description "Celery is an asynchronous task queue/job queue based on
9427 distributed message passing. It is focused on real-time operation, but
9428 supports scheduling as well. The execution units, called tasks, are executed
9429 concurrently on a single or more worker servers using multiprocessing,
9430 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9431 synchronously (wait until ready).")
9432 (license license:bsd-3)
9433 (properties `((python2-variant . ,(delay python2-celery))))))
9434
9435 (define-public python2-celery
9436 (let ((celery (package-with-python2
9437 (strip-python2-variant python-celery))))
9438 (package
9439 (inherit celery)
9440 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9441 ("python2-mock" ,python2-mock)
9442 ,@(package-native-inputs celery))))))
9443
9444 (define-public python-translitcodec
9445 (package
9446 (name "python-translitcodec")
9447 (version "0.4.0")
9448 (source
9449 (origin
9450 (method url-fetch)
9451 (uri (pypi-uri "translitcodec" version))
9452 (sha256
9453 (base32
9454 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9455 (build-system python-build-system)
9456 (arguments
9457 `(#:tests? #f)) ; no tests provided
9458 (home-page
9459 "https://github.com/claudep/translitcodec")
9460 (synopsis
9461 "Unicode to 8-bit charset transliteration codec")
9462 (description
9463 "This package contains codecs for transliterating ISO 10646 texts into
9464 best-effort representations using smaller coded character sets (ASCII,
9465 ISO 8859, etc.).")
9466 (license license:expat)))
9467
9468 (define-public python2-translitcodec
9469 (package-with-python2 python-translitcodec))
9470
9471 (define-public python-editor
9472 (package
9473 (name "python-editor")
9474 (version "0.5")
9475 (source
9476 (origin
9477 (method url-fetch)
9478 (uri (pypi-uri "python-editor" version))
9479 (sha256
9480 (base32
9481 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9482 (build-system python-build-system)
9483 (home-page
9484 "https://github.com/fmoo/python-editor")
9485 (synopsis
9486 "Programmatically open an editor, capture the result")
9487 (description
9488 "python-editor is a library that provides the editor module for
9489 programmatically interfacing with your system's $EDITOR.")
9490 (license license:asl2.0)))
9491
9492 (define-public python2-editor
9493 (package-with-python2 python-editor))
9494
9495 (define-public python-vobject
9496 (package
9497 (name "python-vobject")
9498 (version "0.9.5")
9499 (source (origin
9500 (method url-fetch)
9501 (uri (pypi-uri "vobject" version))
9502 (sha256
9503 (base32
9504 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9505 (build-system python-build-system)
9506 (arguments
9507 '(;; The test suite relies on some non-portable Windows interfaces.
9508 #:tests? #f))
9509 (propagated-inputs
9510 `(("python-dateutil" ,python-dateutil)
9511 ("python-pyicu" ,python-pyicu)))
9512 (synopsis "Parse and generate vCard and vCalendar files")
9513 (description "Vobject is intended to be a full featured Python package for
9514 parsing and generating vCard and vCalendar files. Currently, iCalendar files
9515 are supported and well tested. vCard 3.0 files are supported, and all data
9516 should be imported, but only a few components are understood in a sophisticated
9517 way.")
9518 (home-page "http://eventable.github.io/vobject/")
9519 (license license:asl2.0)))
9520
9521 (define-public python2-vobject
9522 (package-with-python2 python-vobject))
9523
9524 (define-public python-munkres
9525 (package
9526 (name "python-munkres")
9527 (version "1.0.8")
9528 (source (origin
9529 (method url-fetch)
9530 (uri (pypi-uri "munkres" version))
9531 (sha256
9532 (base32
9533 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9534 (build-system python-build-system)
9535 (arguments
9536 '(#:tests? #f)) ; no test suite
9537 (home-page "http://software.clapper.org/munkres/")
9538 (synopsis "Implementation of the Munkres algorithm")
9539 (description "The Munkres module provides an implementation of the Munkres
9540 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9541 useful for solving the Assignment Problem.")
9542 (license license:bsd-3)))
9543
9544 (define-public python2-munkres
9545 (package-with-python2 python-munkres))
9546
9547 (define-public python-whoosh
9548 (package
9549 (name "python-whoosh")
9550 (version "2.7.4")
9551 (source
9552 (origin
9553 (method url-fetch)
9554 (uri (pypi-uri "Whoosh" version))
9555 (sha256
9556 (base32
9557 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9558 (build-system python-build-system)
9559 (native-inputs
9560 `(("python-pytest" ,python-pytest)))
9561 (home-page "https://bitbucket.org/mchaput/whoosh")
9562 (synopsis "Full text indexing, search, and spell checking library")
9563 (description
9564 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9565 checking library.")
9566 (license license:bsd-2)))
9567
9568 (define-public python2-whoosh
9569 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9570 (package (inherit whoosh)
9571 (propagated-inputs
9572 `(("python2-backport-ssl-match-hostname"
9573 ,python2-backport-ssl-match-hostname)
9574 ,@(package-propagated-inputs whoosh))))))
9575
9576 (define-public python-pathlib
9577 (package
9578 (name "python-pathlib")
9579 (version "1.0.1")
9580 (source (origin
9581 (method url-fetch)
9582 (uri (pypi-uri "pathlib" version))
9583 (sha256
9584 (base32
9585 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9586 (build-system python-build-system)
9587 ;; The tests depend on the internal "test" module, which does not provide
9588 ;; a stable interface.
9589 (arguments `(#:tests? #f))
9590 (home-page "https://pathlib.readthedocs.org/")
9591 (synopsis "Object-oriented file system paths")
9592 (description "Pathlib offers a set of classes to handle file system paths.
9593 It offers the following advantages over using string objects:
9594
9595 @enumerate
9596 @item No more cumbersome use of os and os.path functions. Everything can
9597 be done easily through operators, attribute accesses, and method calls.
9598 @item Embodies the semantics of different path types. For example,
9599 comparing Windows paths ignores casing.
9600 @item Well-defined semantics, eliminating any inconsistencies or
9601 ambiguities (forward vs. backward slashes, etc.).
9602 @end enumerate
9603
9604 Note: In Python 3.4, pathlib is now part of the standard library. For other
9605 Python versions please consider python-pathlib2 instead, which tracks the
9606 standard library module. This module (python-pathlib) isn't maintained
9607 anymore.")
9608 (license license:expat)))
9609
9610 (define-public python2-pathlib
9611 (package-with-python2 python-pathlib))
9612
9613 (define-public python2-pathlib2
9614 (package
9615 (name "python2-pathlib2")
9616 (version "2.3.3")
9617 (source (origin
9618 (method url-fetch)
9619 (uri (pypi-uri "pathlib2" version))
9620 (sha256
9621 (base32
9622 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
9623 (build-system python-build-system)
9624 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9625 ;; version is 3.4 which already includes this package as part of the
9626 ;; standard library.
9627 (arguments
9628 `(#:python ,python-2))
9629 (propagated-inputs
9630 `(("python2-scandir" ,python2-scandir)
9631 ("python2-six" ,python2-six)))
9632 (home-page "https://pypi.python.org/pypi/pathlib2/")
9633 (synopsis "Object-oriented file system paths - backport of standard
9634 pathlib module")
9635 (description "The goal of pathlib2 is to provide a backport of standard
9636 pathlib module which tracks the standard library module, so all the newest
9637 features of the standard pathlib can be used also on older Python versions.
9638
9639 Pathlib offers a set of classes to handle file system paths. It offers the
9640 following advantages over using string objects:
9641
9642 @enumerate
9643 @item No more cumbersome use of os and os.path functions. Everything can
9644 be done easily through operators, attribute accesses, and method calls.
9645 @item Embodies the semantics of different path types. For example,
9646 comparing Windows paths ignores casing.
9647 @item Well-defined semantics, eliminating any inconsistencies or
9648 ambiguities (forward vs. backward slashes, etc.).
9649 @end enumerate")
9650 (license license:expat)))
9651
9652 (define-public python2-pathlib2-bootstrap
9653 (hidden-package
9654 (package
9655 (inherit python2-pathlib2)
9656 (name "python2-pathlib2-bootstrap")
9657 (propagated-inputs
9658 `(("python2-scandir" ,python2-scandir)
9659 ("python2-six" ,python2-six-bootstrap))))))
9660
9661 (define-public python-jellyfish
9662 (package
9663 (name "python-jellyfish")
9664 (version "0.5.6")
9665 (source (origin
9666 (method url-fetch)
9667 (uri (pypi-uri "jellyfish" version))
9668 (sha256
9669 (base32
9670 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9671 (build-system python-build-system)
9672 (native-inputs
9673 `(("python-pytest" ,python-pytest)))
9674 (home-page "https://github.com/jamesturk/jellyfish")
9675 (synopsis "Approximate and phonetic matching of strings")
9676 (description "Jellyfish uses a variety of string comparison and phonetic
9677 encoding algorithms to do fuzzy string matching.")
9678 (license license:bsd-2)
9679 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9680
9681 (define-public python2-jellyfish
9682 (let ((jellyfish (package-with-python2
9683 (strip-python2-variant python-jellyfish))))
9684 (package (inherit jellyfish)
9685 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9686 ,@(package-native-inputs jellyfish))))))
9687
9688 (define-public python2-unicodecsv
9689 (package
9690 (name "python2-unicodecsv")
9691 (version "0.14.1")
9692 (source (origin
9693 (method url-fetch)
9694 ;; The test suite is not included in the PyPi release.
9695 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9696 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9697 "archive/" version ".tar.gz"))
9698 (file-name (string-append name "-" version ".tar.gz"))
9699 (sha256
9700 (base32
9701 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9702 (build-system python-build-system)
9703 (arguments
9704 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9705 #:python ,python-2))
9706 (native-inputs
9707 `(("python2-unittest2" ,python2-unittest2)))
9708 (home-page "https://github.com/jdunck/python-unicodecsv")
9709 (synopsis "Unicode CSV module for Python 2")
9710 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9711 module, adding support for Unicode strings.")
9712 (license license:bsd-2)))
9713
9714 (define-public python-rarfile
9715 (package
9716 (name "python-rarfile")
9717 (version "2.8")
9718 (source (origin
9719 (method url-fetch)
9720 (uri (pypi-uri "rarfile" version))
9721 (sha256
9722 (base32
9723 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9724 (build-system python-build-system)
9725 (arguments
9726 '(#:phases
9727 (modify-phases %standard-phases
9728 (replace 'check
9729 ;; Many tests fail, but the installation proceeds.
9730 (lambda _ (invoke "make" "-C" "test" "test"))))))
9731 (native-inputs
9732 `(("which" ,which))) ; required for tests
9733 (propagated-inputs
9734 `(("libarchive" ,libarchive)))
9735 (home-page "https://github.com/markokr/rarfile")
9736 (synopsis "RAR archive reader for Python")
9737 (description "This is Python module for RAR archive reading. The interface
9738 is made as zipfile like as possible.")
9739 (license license:isc)))
9740
9741 (define-public python2-rarfile
9742 (package-with-python2 python-rarfile))
9743
9744 (define-public python-magic
9745 (package
9746 (name "python-magic")
9747 (version "0.4.15")
9748 (source
9749 (origin
9750 (method url-fetch)
9751 (uri (pypi-uri "python-magic" version))
9752 (sha256
9753 (base32
9754 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9755 (file-name (string-append name "-" version "-checkout"))))
9756 (build-system python-build-system)
9757 (arguments
9758 ;; The tests are unreliable, so don't run them. The tests fail
9759 ;; under Python3 because they were written for Python2 and
9760 ;; contain import statements that do not work in Python3. One of
9761 ;; the tests fails under Python2 because its assertions are
9762 ;; overly stringent; it relies on comparing output strings which
9763 ;; are brittle and can change depending on the version of
9764 ;; libmagic being used and the system on which the test is
9765 ;; running. In my case, under GuixSD 0.10.0, only one test
9766 ;; failed, and it seems to have failed only because the version
9767 ;; of libmagic that is packaged in Guix outputs a slightly
9768 ;; different (but not wrong) string than the one that the test
9769 ;; expected.
9770 '(#:tests? #f
9771 #:phases (modify-phases %standard-phases
9772 ;; Replace a specific method call with a hard-coded
9773 ;; path to the necessary libmagic.so file in the
9774 ;; store. If we don't do this, then the method call
9775 ;; will fail to find the libmagic.so file, which in
9776 ;; turn will cause any application using
9777 ;; python-magic to fail.
9778 (add-before 'build 'hard-code-path-to-libmagic
9779 (lambda* (#:key inputs #:allow-other-keys)
9780 (let ((file (assoc-ref inputs "file")))
9781 (substitute* "magic.py"
9782 (("ctypes.util.find_library\\('magic'\\)")
9783 (string-append "'" file "/lib/libmagic.so'")))
9784 #t)))
9785 (add-before 'install 'disable-egg-compression
9786 (lambda _
9787 (let ((port (open-file "setup.cfg" "a")))
9788 (display "\n[easy_install]\nzip_ok = 0\n"
9789 port)
9790 (close-port port)
9791 #t))))))
9792 (inputs
9793 ;; python-magic needs to be able to find libmagic.so.
9794 `(("file" ,file)))
9795 (home-page
9796 "https://github.com/ahupp/python-magic")
9797 (synopsis
9798 "File type identification using libmagic")
9799 (description
9800 "This module uses ctypes to access the libmagic file type
9801 identification library. It makes use of the local magic database and
9802 supports both textual and MIME-type output. Note that this module and
9803 the python-file module both provide a \"magic.py\" file; these two
9804 modules, which are different and were developed separately, both serve
9805 the same purpose: to provide Python bindings for libmagic.")
9806 (license license:expat)))
9807
9808 (define-public python2-magic
9809 (package-with-python2 python-magic))
9810
9811 (define-public python2-s3cmd
9812 (package
9813 (name "python2-s3cmd")
9814 (version "1.6.1")
9815 (source
9816 (origin
9817 (method url-fetch)
9818 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9819 "s3cmd-" version ".tar.gz"))
9820 (sha256
9821 (base32
9822 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9823 (build-system python-build-system)
9824 (arguments
9825 ;; s3cmd is written for python2 only and contains no tests.
9826 `(#:python ,python-2
9827 #:tests? #f))
9828 (propagated-inputs
9829 `(("python2-dateutil" ,python2-dateutil)
9830 ;; The python-file package also provides a magic.py module.
9831 ;; This is an unfortunate state of affairs; however, s3cmd
9832 ;; fails to install if it cannot find specifically the
9833 ;; python-magic package. Thus we include it, instead of using
9834 ;; python-file. Ironically, s3cmd sometimes works better
9835 ;; without libmagic bindings at all:
9836 ;; https://github.com/s3tools/s3cmd/issues/198
9837 ("python2-magic" ,python2-magic)))
9838 (home-page "http://s3tools.org/s3cmd")
9839 (synopsis "Command line tool for S3-compatible storage services")
9840 (description
9841 "S3cmd is a command line tool for uploading, retrieving and managing data
9842 in storage services that are compatible with the Amazon Simple Storage
9843 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9844 GnuPG encryption, and more. It also supports management of Amazon's
9845 CloudFront content delivery network.")
9846 (license license:gpl2+)))
9847
9848 (define-public python-pkgconfig
9849 (package
9850 (name "python-pkgconfig")
9851 (version "1.3.1")
9852 (source
9853 (origin
9854 (method url-fetch)
9855 (uri (pypi-uri "pkgconfig" version))
9856 (sha256
9857 (base32
9858 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9859 (build-system python-build-system)
9860 (native-inputs
9861 `(("python-nose" ,python-nose)))
9862 (inputs
9863 `(("pkg-config" ,pkg-config)))
9864 (arguments
9865 `(#:phases
9866 (modify-phases %standard-phases
9867 (add-before 'build 'patch
9868 ;; Hard-code the path to pkg-config.
9869 (lambda _
9870 (substitute* "pkgconfig/pkgconfig.py"
9871 (("cmd = 'pkg-config")
9872 (string-append "cmd = '" (which "pkg-config"))))
9873 #t))
9874 (replace 'check
9875 (lambda _
9876 (invoke "nosetests" "test.py"))))))
9877 (home-page "https://github.com/matze/pkgconfig")
9878 (synopsis "Python interface for pkg-config")
9879 (description "This module provides a Python interface to pkg-config. It
9880 can be used to find all pkg-config packages, check if a package exists,
9881 check if a package meets certain version requirements, query CFLAGS and
9882 LDFLAGS and parse the output to build extensions with setup.py.")
9883 (license license:expat)))
9884
9885 (define-public python2-pkgconfig
9886 (package-with-python2 python-pkgconfig))
9887
9888 (define-public python-bz2file
9889 (package
9890 (name "python-bz2file")
9891 (version "0.98")
9892 (source
9893 (origin
9894 (method url-fetch)
9895 (uri (pypi-uri "bz2file" version))
9896 (sha256
9897 (base32
9898 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9899 (build-system python-build-system)
9900 (arguments
9901 `(#:tests? #f)) ; Tests use deprecated python modules.
9902 (home-page "https://github.com/nvawda/bz2file")
9903 (synopsis "Read and write bzip2-compressed files")
9904 (description
9905 "Bz2file is a Python library for reading and writing bzip2-compressed
9906 files. It contains a drop-in replacement for the I/O interface in the
9907 standard library's @code{bz2} module, including features from the latest
9908 development version of CPython that are not available in older releases.")
9909 (license license:asl2.0)))
9910
9911 (define-public python2-bz2file
9912 (package-with-python2 python-bz2file))
9913
9914 (define-public python-future
9915 (package
9916 (name "python-future")
9917 (version "0.17.1")
9918 (source
9919 (origin
9920 (method url-fetch)
9921 (uri (pypi-uri "future" version))
9922 (sha256
9923 (base32
9924 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
9925 (build-system python-build-system)
9926 ;; Many tests connect to the network or are otherwise flawed.
9927 ;; https://github.com/PythonCharmers/python-future/issues/210
9928 (arguments
9929 `(#:tests? #f))
9930 (home-page "http://python-future.org")
9931 (synopsis "Single-source support for Python 3 and 2")
9932 (description
9933 "@code{python-future} is the missing compatibility layer between Python 2 and
9934 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9935 to support both Python 2 and Python 3 with minimal overhead.")
9936 (license license:expat)))
9937
9938 (define-public python2-future
9939 (package-with-python2 python-future))
9940
9941 (define-public python-cysignals
9942 (package
9943 (name "python-cysignals")
9944 (version "1.9.0")
9945 (source
9946 (origin
9947 (method url-fetch)
9948 (uri (pypi-uri "cysignals" version))
9949 (sha256
9950 (base32
9951 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
9952 (build-system python-build-system)
9953 (native-inputs
9954 `(("python-cython" ,python-cython)
9955 ("python-sphinx" ,python-sphinx)))
9956 (inputs
9957 `(("pari-gp" ,pari-gp)))
9958 (arguments
9959 `(#:modules ((guix build python-build-system)
9960 ((guix build gnu-build-system) #:prefix gnu:)
9961 (guix build utils))
9962 ;; FIXME: Tests are executed after installation and currently fail
9963 ;; when not installing into standard locations; the author is working
9964 ;; on a fix.
9965 #:tests? #f
9966 #:phases
9967 (modify-phases %standard-phases
9968 (add-before
9969 'build 'configure
9970 (assoc-ref gnu:%standard-phases 'configure)))))
9971 (home-page
9972 "https://github.com/sagemath/cysignals")
9973 (synopsis
9974 "Handling of interrupts and signals for Cython")
9975 (description
9976 "The cysignals package provides mechanisms to handle interrupts (and
9977 other signals and errors) in Cython code, using two related approaches,
9978 for mixed Cython/Python code or external C libraries and pure Cython code,
9979 respectively.")
9980 (license license:lgpl3+)))
9981
9982 (define-public python2-cysignals
9983 (package-with-python2 python-cysignals))
9984
9985 (define-public python2-shedskin
9986 (package
9987 (name "python2-shedskin")
9988 (version "0.9.4")
9989 (source
9990 (origin
9991 (method url-fetch)
9992 (uri (string-append "https://github.com/shedskin/shedskin/"
9993 "releases/download/v" version
9994 "/shedskin-" version ".tgz"))
9995 (sha256
9996 (base32
9997 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9998 (build-system python-build-system)
9999 (arguments
10000 `(#:python ,python-2
10001 #:phases (modify-phases %standard-phases
10002 (add-after 'unpack 'fix-resulting-include-libs
10003 (lambda* (#:key inputs #:allow-other-keys)
10004 (let ((libgc (assoc-ref inputs "libgc"))
10005 (pcre (assoc-ref inputs "pcre")))
10006 (substitute* "shedskin/makefile.py"
10007 (("variable == 'CCFLAGS':[ ]*")
10008 (string-append "variable == 'CCFLAGS':\n"
10009 " line += ' -I " pcre "/include"
10010 " -I " libgc "/include'"))
10011 (("variable == 'LFLAGS':[ ]*")
10012 (string-append "variable == 'LFLAGS':\n"
10013 " line += ' -L" pcre "/lib"
10014 " -L " libgc "/lib'")))
10015 #t))))))
10016 (inputs `(("pcre" ,pcre)
10017 ("libgc" ,libgc)))
10018 (home-page "https://shedskin.github.io/")
10019 (synopsis "Experimental Python-2 to C++ Compiler")
10020 (description (string-append "This is an experimental compiler for a subset of
10021 Python. It generates C++ code and a Makefile."))
10022 (license (list license:gpl3 license:bsd-3 license:expat))))
10023
10024 (define-public python2-rope
10025 (package
10026 (name "python2-rope")
10027 (version "0.11.0")
10028 (source
10029 (origin
10030 (method url-fetch)
10031 (uri (pypi-uri "rope" version))
10032 (sha256
10033 (base32
10034 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
10035 (arguments
10036 ;; Rope has only partial python3 support, see `python-rope'
10037 `(#:python ,python-2))
10038 (build-system python-build-system)
10039 (native-inputs
10040 `(("python2-unittest2" ,python2-unittest2)))
10041 (home-page "https://github.com/python-rope/rope")
10042 (synopsis "Refactoring library for Python")
10043 (description "Rope is a refactoring library for Python. It facilitates
10044 the renaming, moving and extracting of attributes, functions, modules, fields
10045 and parameters in Python 2 source code. These refactorings can also be applied
10046 to occurrences in strings and comments.")
10047 (license license:gpl2)))
10048
10049 (define-public python-rope
10050 (package
10051 (inherit python2-rope)
10052 (name "python-rope")
10053 (arguments `(#:python ,python-wrapper
10054 ;; XXX: Only partial python3 support, results in some failing
10055 ;; tests: <https://github.com/python-rope/rope/issues/247>.
10056 #:tests? #f))
10057 (properties `((python2-variant . ,(delay python2-rope))))))
10058
10059 (define-public python-py3status
10060 (package
10061 (name "python-py3status")
10062 (version "3.21")
10063 (source
10064 (origin
10065 (method url-fetch)
10066 (uri (pypi-uri "py3status" version))
10067 (sha256
10068 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
10069 (build-system python-build-system)
10070 (inputs
10071 `(("file" ,file)))
10072 (arguments
10073 '(#:phases
10074 (modify-phases %standard-phases
10075 ;; 'file' is used for detection of configuration file encoding
10076 ;; let's make link the dependency to particular input
10077 (add-before 'build 'patch-file-path
10078 (lambda* (#:key inputs #:allow-other-keys)
10079 (let ((file-path (assoc-ref inputs "file")))
10080 (substitute* "py3status/parse_config.py"
10081 (("\\['file', '-b'")
10082 (string-append "['" file-path "/bin/file', '-b'")))
10083 #t))))
10084 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
10085 (home-page "https://github.com/ultrabug/py3status")
10086 (synopsis "Extensible i3status wrapper written in Python")
10087 (description "py3status is an i3status wrapper which extends i3status
10088 functionality in a modular way, allowing you to extend your panel with your
10089 own code, responding to click events and updating clock every second.")
10090 (license license:bsd-3)))
10091
10092 (define-public python-tblib
10093 (package
10094 (name "python-tblib")
10095 (version "1.3.2")
10096 (source (origin
10097 (method url-fetch)
10098 (uri (pypi-uri "tblib" version))
10099 (sha256 (base32
10100 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
10101 (build-system python-build-system)
10102 (arguments
10103 `(#:phases
10104 (modify-phases %standard-phases
10105 (add-before 'check 'adjust-tests
10106 (lambda _
10107 (when (which "python3")
10108 ;; Adjust the example output to match that of Python 3.7:
10109 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
10110 (substitute* "README.rst"
10111 (("Exception\\('fail',") "Exception('fail'"))
10112 #t)))
10113 (replace 'check
10114 (lambda _
10115 ;; Upstream runs tests after installation and the package itself
10116 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
10117 ;; found.
10118 (setenv "PYTHONPATH"
10119 (string-append (getcwd) "/build/lib:"
10120 (getenv "PYTHONPATH")))
10121 (invoke "py.test" "-vv" "tests" "README.rst"))))))
10122 (native-inputs
10123 `(("python-pytest" ,python-pytest)
10124 ("python-six" ,python-six)))
10125 (home-page "https://github.com/ionelmc/python-tblib")
10126 (synopsis "Traceback serialization library")
10127 (description
10128 "Traceback serialization allows you to:
10129
10130 @enumerate
10131 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
10132 different processes. This allows better error handling when running code over
10133 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
10134
10135 @item Parse traceback strings and raise with the parsed tracebacks.
10136 @end enumerate\n")
10137 (license license:bsd-3)))
10138
10139 (define-public python2-tblib
10140 (package-with-python2 python-tblib))
10141
10142 (define-public python-greenlet
10143 (package
10144 (name "python-greenlet")
10145 (version "0.4.15")
10146 (source (origin
10147 (method url-fetch)
10148 (uri (pypi-uri "greenlet" version))
10149 (sha256
10150 (base32
10151 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
10152 (build-system python-build-system)
10153 (home-page "https://greenlet.readthedocs.io/")
10154 (synopsis "Lightweight in-process concurrent programming")
10155 (description
10156 "Greenlet package is a spin-off of Stackless, a version of CPython
10157 that supports micro-threads called \"tasklets\". Tasklets run
10158 pseudo-concurrently (typically in a single or a few OS-level threads) and
10159 are synchronized with data exchanges on \"channels\".")
10160 (license (list license:psfl license:expat))))
10161
10162 (define-public python2-greenlet
10163 (package-with-python2 python-greenlet))
10164
10165 (define-public python-objgraph
10166 (package
10167 (name "python-objgraph")
10168 (version "3.4.0")
10169 (source
10170 (origin
10171 (method url-fetch)
10172 (uri (pypi-uri "objgraph" version))
10173 (sha256
10174 (base32
10175 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
10176 (build-system python-build-system)
10177 (propagated-inputs
10178 `(("python-graphviz" ,python-graphviz)))
10179 (native-inputs
10180 `(("python-mock" ,python-mock)
10181 ("graphviz" ,graphviz)))
10182 (home-page "https://mg.pov.lt/objgraph/")
10183 (synopsis "Draw Python object reference graphs with graphviz")
10184 (description
10185 "This package provides tools to draw Python object reference graphs with
10186 graphviz.")
10187 (license license:expat)))
10188
10189 (define-public python-gevent
10190 (package
10191 (name "python-gevent")
10192 (version "1.3.7")
10193 (source (origin
10194 (method url-fetch)
10195 (uri (pypi-uri "gevent" version))
10196 (sha256
10197 (base32
10198 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
10199 (modules '((guix build utils)))
10200 (snippet
10201 '(begin
10202 ;; unbunding libev and c-ares
10203 (delete-file-recursively "deps")
10204 #t))))
10205 (build-system python-build-system)
10206 (arguments
10207 `(#:modules ((ice-9 ftw)
10208 (ice-9 match)
10209 (srfi srfi-26)
10210 (guix build utils)
10211 (guix build python-build-system))
10212 #:phases (modify-phases %standard-phases
10213 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
10214 (lambda _
10215 (substitute* "src/gevent/subprocess.py"
10216 (("/bin/sh") (which "sh")))
10217 (for-each (lambda (file)
10218 (substitute* file
10219 (("/bin/sh") (which "sh"))
10220 (("/bin/true") (which "true"))))
10221 (find-files "src/greentest" "\\.py$"))
10222 #t))
10223 (add-before 'build 'do-not-use-bundled-sources
10224 (lambda* (#:key inputs #:allow-other-keys)
10225 (setenv "CONFIG_SHELL" (which "bash"))
10226 (setenv "LIBEV_EMBED" "false")
10227 (setenv "CARES_EMBED" "false")
10228 (setenv "EMBED" "false")
10229
10230 ;; Prevent building bundled libev.
10231 (substitute* "setup.py"
10232 (("run_make=_BUILDING")
10233 "run_make=False"))
10234
10235 (let ((greenlet (string-append
10236 (assoc-ref inputs "python-greenlet")
10237 "/include")))
10238 (match (scandir greenlet
10239 (lambda (item)
10240 (string-prefix? "python" item)))
10241 ((python)
10242 (setenv "C_INCLUDE_PATH"
10243 (string-append greenlet "/" python)))))
10244 #t))
10245 (add-before 'check 'skip-timer-test
10246 (lambda _
10247 ;; XXX: Skip 'TestTimerResolution', which appears to be
10248 ;; unreliable.
10249 (substitute* "src/greentest/test__core_timer.py"
10250 (("not greentest.RUNNING_ON_CI") "False"))
10251 #t))
10252 (replace 'check
10253 (lambda _
10254 ;; Make sure the build directory is on PYTHONPATH.
10255 (setenv "PYTHONPATH"
10256 (string-append
10257 (getenv "PYTHONPATH") ":"
10258 (getcwd) "/build/"
10259 (car (scandir "build" (cut string-prefix? "lib." <>)))))
10260 (with-directory-excursion "src/greentest"
10261 ;; XXX: Many tests require network access. Instead we only
10262 ;; run known-good tests. Unfortunately we cannot use
10263 ;; recursion here since this directory also contains
10264 ;; Python-version-specific subfolders.
10265 (apply invoke "python" "testrunner.py" "--config"
10266 "known_failures.py"
10267 (scandir "." (cut regexp-exec
10268 (make-regexp "test_+(subprocess|core)")
10269 <>)))))))))
10270 (propagated-inputs
10271 `(("python-greenlet" ,python-greenlet)
10272 ("python-objgraph" ,python-objgraph)))
10273 (native-inputs
10274 `(("python-six" ,python-six)))
10275 (inputs
10276 `(("c-ares" ,c-ares)
10277 ("libev" ,libev)))
10278 (home-page "http://www.gevent.org/")
10279 (synopsis "Coroutine-based network library")
10280 (description
10281 "gevent is a coroutine-based Python networking library that uses greenlet
10282 to provide a high-level synchronous API on top of the libev event loop.")
10283 (license license:expat)
10284 (properties `((python2-variant . ,(delay python2-gevent))))))
10285
10286 (define-public python2-gevent
10287 (let ((base (package-with-python2
10288 (strip-python2-variant python-gevent))))
10289 (package
10290 (inherit base)
10291 (native-inputs `(,@(package-native-inputs python-gevent)
10292 ("python-mock" ,python2-mock))))))
10293
10294 (define-public python-fastimport
10295 (package
10296 (name "python-fastimport")
10297 (version "0.9.6")
10298 (source
10299 (origin
10300 (method url-fetch)
10301 (uri (pypi-uri "fastimport" version))
10302 (sha256
10303 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10304 (build-system python-build-system)
10305 (home-page "https://github.com/jelmer/python-fastimport")
10306 (synopsis "VCS fastimport parser and generator in Python")
10307 (description "This package provides a parser for and generator of the Git
10308 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
10309 format.")
10310 (license license:gpl2+)))
10311
10312 (define-public python2-fastimport
10313 (package-with-python2 python-fastimport))
10314
10315 (define-public python-twisted
10316 (package
10317 (name "python-twisted")
10318 (version "19.7.0")
10319 (source (origin
10320 (method url-fetch)
10321 (uri (pypi-uri "Twisted" version ".tar.bz2"))
10322 (sha256
10323 (base32
10324 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
10325 (build-system python-build-system)
10326 (arguments
10327 '(#:tests? #f)) ; FIXME: some tests fail
10328 (propagated-inputs
10329 `(("python-zope-interface" ,python-zope-interface)
10330 ("python-pyhamcrest" ,python-pyhamcrest)
10331 ("python-incremental" ,python-incremental)
10332 ("python-hyperlink" ,python-hyperlink)
10333 ("python-constantly" ,python-constantly)
10334 ("python-automat" ,python-automat)))
10335 (home-page "https://twistedmatrix.com/")
10336 (synopsis "Asynchronous networking framework written in Python")
10337 (description
10338 "Twisted is an extensible framework for Python programming, with special
10339 focus on event-based network programming and multiprotocol integration.")
10340 (license license:expat)))
10341
10342 (define-public python2-twisted
10343 (package-with-python2 python-twisted))
10344
10345 (define-public python-pika
10346 (package
10347 (name "python-pika")
10348 (version "0.12.0")
10349 (source
10350 (origin
10351 (method url-fetch)
10352 (uri (pypi-uri "pika" version))
10353 (sha256
10354 (base32
10355 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10356 (build-system python-build-system)
10357 (native-inputs
10358 `(("python-pyev" ,python-pyev)
10359 ("python-tornado" ,python-tornado)
10360 ("python-twisted" ,python-twisted)))
10361 (home-page "https://pika.readthedocs.org")
10362 (synopsis "Pure Python AMQP Client Library")
10363 (description
10364 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10365 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10366 network support library.")
10367 (license license:bsd-3)))
10368
10369 (define-public python2-pika
10370 (package-with-python2 python-pika))
10371
10372 (define-public python-ply
10373 (package
10374 (name "python-ply")
10375 (version "3.10")
10376 (source
10377 (origin
10378 (method url-fetch)
10379 (uri (pypi-uri "ply" version))
10380 (sha256
10381 (base32
10382 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10383 (build-system python-build-system)
10384 (home-page "http://www.dabeaz.com/ply/")
10385 (synopsis "Python Lex & Yacc")
10386 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10387 It uses LR parsing and does extensive error checking.")
10388 (license license:bsd-3)))
10389
10390 (define-public python2-ply
10391 (package-with-python2 python-ply))
10392
10393 (define-public python-tabulate
10394 (package
10395 (name "python-tabulate")
10396 (version "0.7.7")
10397 (source (origin
10398 (method url-fetch)
10399 (uri (pypi-uri "tabulate" version))
10400 (sha256
10401 (base32
10402 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10403 (build-system python-build-system)
10404 (arguments
10405 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10406 ;; and the latest release is not tagged in the upstream repository.
10407 '(#:tests? #f))
10408 (home-page "https://bitbucket.org/astanin/python-tabulate")
10409 (synopsis "Pretty-print tabular data")
10410 (description
10411 "Tabulate is a library and command-line utility to pretty-print tabular
10412 data in Python.")
10413 (license license:expat)))
10414
10415 (define-public python2-tabulate
10416 (package-with-python2 python-tabulate))
10417
10418 (define-public python-kazoo
10419 (package
10420 (name "python-kazoo")
10421 (version "2.4.0")
10422 (source
10423 (origin
10424 (method url-fetch)
10425 (uri (pypi-uri "kazoo" version))
10426 (sha256
10427 (base32
10428 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10429 (build-system python-build-system)
10430 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10431 (propagated-inputs
10432 `(("python-six" ,python-six)))
10433 (home-page "https://kazoo.readthedocs.org")
10434 (synopsis "High-level Zookeeper client library")
10435 (description
10436 "Kazoo is a Python client library for the Apache Zookeeper distributed
10437 application service. It is designed to be easy to use and to avoid common
10438 programming errors.")
10439 (license license:asl2.0)))
10440
10441 (define-public python2-kazoo
10442 (package-with-python2 python-kazoo))
10443
10444 (define-public python-pykafka
10445 (package
10446 (name "python-pykafka")
10447 (version "2.4.0")
10448 (source (origin
10449 (method url-fetch)
10450 (uri (pypi-uri "pykafka" version))
10451 (sha256
10452 (base32
10453 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10454 (build-system python-build-system)
10455 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10456 (propagated-inputs
10457 `(("python-gevent" ,python-gevent)
10458 ("python-kazoo" ,python-kazoo)
10459 ("python-tabulate" ,python-tabulate)))
10460 (inputs
10461 `(("librdkafka" ,librdkafka)))
10462 (home-page "https://pykafka.readthedocs.io/")
10463 (synopsis "Apache Kafka client for Python")
10464 (description
10465 "PyKafka is a client for the Apache Kafka distributed messaging system.
10466 It includes Python implementations of Kafka producers and consumers, which
10467 are optionally backed by a C extension built on librdkafka.")
10468 (license license:asl2.0)))
10469
10470 (define-public python2-pykafka
10471 (package-with-python2 python-pykafka))
10472
10473 (define-public python-wcwidth
10474 (package
10475 (name "python-wcwidth")
10476 (version "0.1.7")
10477 (source
10478 (origin
10479 (method url-fetch)
10480 (uri (pypi-uri "wcwidth" version))
10481 (sha256
10482 (base32
10483 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
10484 (build-system python-build-system)
10485 (home-page "https://github.com/jquast/wcwidth")
10486 (synopsis "Measure number of terminal column cells of wide-character codes")
10487 (description "Wcwidth measures the number of terminal column cells of
10488 wide-character codes. It is useful for those implementing a terminal emulator,
10489 or programs that carefully produce output to be interpreted by one. It is a
10490 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10491 specified in POSIX.1-2001 and POSIX.1-2008.")
10492 (license license:expat)))
10493
10494 (define-public python2-wcwidth
10495 (package-with-python2 python-wcwidth))
10496
10497 (define-public python2-jsonrpclib
10498 (package
10499 (name "python2-jsonrpclib")
10500 (version "0.1.7")
10501 (source (origin
10502 (method url-fetch)
10503 (uri (pypi-uri "jsonrpclib" version))
10504 (sha256
10505 (base32
10506 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10507 (build-system python-build-system)
10508 (arguments
10509 `(#:tests? #f
10510 #:python ,python-2))
10511 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10512 (synopsis "Implementation of JSON-RPC specification for Python")
10513 (description
10514 "This library is an implementation of the JSON-RPC specification.
10515 It supports both the original 1.0 specification, as well as the
10516 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10517 etc.")
10518 (license license:asl2.0)))
10519
10520 (define-public python-chai
10521 (package
10522 (name "python-chai")
10523 (version "1.1.2")
10524 (source (origin
10525 (method url-fetch)
10526 (uri (pypi-uri "chai" version))
10527 (sha256
10528 (base32
10529 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10530 (build-system python-build-system)
10531 (home-page "https://github.com/agoragames/chai")
10532 (synopsis "Mocking framework for Python")
10533 (description
10534 "Chai provides an api for mocking, stubbing and spying your python
10535 objects, patterned after the Mocha library for Ruby.")
10536 (license license:bsd-3)))
10537
10538 (define-public python2-chai
10539 (package-with-python2 python-chai))
10540
10541 (define-public python-inflection
10542 (package
10543 (name "python-inflection")
10544 (version "0.3.1")
10545 (source
10546 (origin (method url-fetch)
10547 (uri (pypi-uri "inflection" version))
10548 (sha256
10549 (base32
10550 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10551 (build-system python-build-system)
10552 (native-inputs
10553 `(("python-pytest" ,python-pytest)))
10554 (home-page "https://github.com/jpvanhal/inflection")
10555 (synopsis "Python string transformation library")
10556 (description
10557 "Inflection is a string transformation library. It singularizes
10558 and pluralizes English words, and transforms strings from CamelCase to
10559 underscored string.")
10560 (license license:expat)))
10561
10562 (define-public python2-inflection
10563 (package-with-python2 python-inflection))
10564
10565 (define-public python-pylev
10566 (package
10567 (name "python-pylev")
10568 (version "1.3.0")
10569 (source (origin
10570 (method url-fetch)
10571 (uri (pypi-uri "pylev" version))
10572 (sha256
10573 (base32
10574 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10575 (build-system python-build-system)
10576 (home-page "https://github.com/toastdriven/pylev")
10577 (synopsis "Levenshtein distance implementation in Python")
10578 (description "Pure Python Levenshtein implementation, based off the
10579 Wikipedia code samples at
10580 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10581 (license license:bsd-3)))
10582
10583 (define-public python2-pylev
10584 (package-with-python2 python-pylev))
10585
10586 (define-public python-cleo
10587 (package
10588 (name "python-cleo")
10589 (version "0.6.1")
10590 (source (origin
10591 (method url-fetch)
10592 (uri (pypi-uri "cleo" version))
10593 (sha256
10594 (base32
10595 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
10596 (build-system python-build-system)
10597 (native-inputs
10598 `(;; For testing
10599 ("python-mock" ,python-mock)
10600 ("python-pytest-mock" ,python-pytest-mock)
10601 ("python-pytest" ,python-pytest)))
10602 (propagated-inputs
10603 `(("python-backpack" ,python-backpack)
10604 ("python-pastel" ,python-pastel)
10605 ("python-pylev" ,python-pylev)))
10606 (home-page "https://github.com/sdispater/cleo")
10607 (synopsis "Command-line arguments library for Python")
10608 (description
10609 "Cleo allows you to create command-line commands with signature in
10610 docstring and colored output.")
10611 (license license:expat)))
10612
10613 (define-public python2-cleo
10614 (package-with-python2 python-cleo))
10615
10616 (define-public python-lazy-object-proxy
10617 (package
10618 (name "python-lazy-object-proxy")
10619 (version "1.3.1")
10620 (source (origin
10621 (method url-fetch)
10622 (uri (pypi-uri "lazy-object-proxy" version))
10623 (sha256
10624 (base32
10625 "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb"))))
10626 (build-system python-build-system)
10627 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10628 (synopsis "Lazy object proxy for python")
10629 (description
10630 "Lazy object proxy is an object that wraps a callable but defers the call
10631 until the object is actually required, and caches the result of said call.")
10632 (license license:bsd-2)))
10633
10634 (define-public python2-lazy-object-proxy
10635 (package-with-python2 python-lazy-object-proxy))
10636
10637 (define-public python-dnspython
10638 (package
10639 (name "python-dnspython")
10640 (version "1.15.0")
10641 (source (origin
10642 (method url-fetch)
10643 (uri (string-append "http://www.dnspython.org/kits/"
10644 version "/dnspython-" version ".tar.gz"))
10645 (sha256
10646 (base32
10647 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10648 (build-system python-build-system)
10649 (arguments '(#:tests? #f)) ; XXX: requires internet access
10650 (home-page "http://www.dnspython.org")
10651 (synopsis "DNS toolkit for Python")
10652 (description
10653 "dnspython is a DNS toolkit for Python. It supports almost all record
10654 types. It can be used for queries, zone transfers, and dynamic updates.
10655 It supports TSIG authenticated messages and EDNS0.")
10656 (license license:expat)))
10657
10658 (define-public python2-dnspython
10659 (package-with-python2 python-dnspython))
10660
10661 (define-public python-email-validator
10662 (package
10663 (name "python-email-validator")
10664 (version "1.0.2")
10665 (source
10666 (origin (method url-fetch)
10667 (uri (pypi-uri "email_validator" version))
10668 (sha256
10669 (base32
10670 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10671 (build-system python-build-system)
10672 (arguments
10673 '(#:phases
10674 (modify-phases %standard-phases
10675 (add-before 'build 'use-dnspython
10676 (lambda _
10677 (substitute* "setup.py"
10678 (("dnspython3") "dnspython"))
10679 #t)))))
10680 (propagated-inputs
10681 `(("python-dnspython" ,python-dnspython)
10682 ("python-idna" ,python-idna)))
10683 (home-page "https://github.com/JoshData/python-email-validator")
10684 (synopsis "Email address validation library for Python")
10685 (description
10686 "This library validates email address syntax and deliverability.")
10687 (license license:cc0)))
10688
10689 (define-public python2-email-validator
10690 (package-with-python2 python-email-validator))
10691
10692 (define-public python-ukpostcodeparser
10693 (package
10694 (name "python-ukpostcodeparser")
10695 (version "1.0.3")
10696 (source (origin
10697 (method url-fetch)
10698 (uri (pypi-uri "UkPostcodeParser" version))
10699 (sha256
10700 (base32
10701 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10702 (build-system python-build-system)
10703 (home-page "https://github.com/hamstah/ukpostcodeparser")
10704 (synopsis "UK Postcode parser for Python")
10705 (description
10706 "This library provides the @code{parse_uk_postcode} function for
10707 parsing UK postcodes.")
10708 (license license:expat)))
10709
10710 (define-public python2-ukpostcodeparser
10711 (package-with-python2 python-ukpostcodeparser))
10712
10713 (define-public python-faker
10714 (package
10715 (name "python-faker")
10716 (version "0.7.9")
10717 (source (origin
10718 (method url-fetch)
10719 (uri (pypi-uri "Faker" version))
10720 (sha256
10721 (base32
10722 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10723 (patches
10724 (search-patches "python-faker-fix-build-32bit.patch"))
10725 (modules '((guix build utils)))
10726 (snippet
10727 '(begin
10728 (for-each delete-file (find-files "." "\\.pyc$"))
10729 #t))))
10730 (build-system python-build-system)
10731 (arguments
10732 '(#:phases
10733 (modify-phases %standard-phases
10734 (replace 'check
10735 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
10736 (native-inputs
10737 `(;; For testing
10738 ("python-email-validator" ,python-email-validator)
10739 ("python-mock" ,python-mock)
10740 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10741 (propagated-inputs
10742 `(("python-dateutil" ,python-dateutil)
10743 ("python-six" ,python-six)))
10744 (home-page "https://github.com/joke2k/faker")
10745 (synopsis "Python package that generates fake data")
10746 (description
10747 "Faker is a Python package that generates fake data such as names,
10748 addresses, and phone numbers.")
10749 (license license:expat)
10750 (properties `((python2-variant . ,(delay python2-faker))))))
10751
10752 (define-public python2-faker
10753 (let ((base (package-with-python2 (strip-python2-variant
10754 python-faker))))
10755 (package
10756 (inherit base)
10757 (propagated-inputs
10758 `(("python2-ipaddress" ,python2-ipaddress)
10759 ,@(package-propagated-inputs base))))))
10760
10761 (define-public python-pyaml
10762 (package
10763 (name "python-pyaml")
10764 (version "18.11.0")
10765 (source (origin
10766 (method url-fetch)
10767 (uri (pypi-uri "pyaml" version))
10768 (sha256
10769 (base32
10770 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
10771 (build-system python-build-system)
10772 (native-inputs
10773 `(("python-unidecode" ,python-unidecode)))
10774 (propagated-inputs
10775 `(("python-pyyaml" ,python-pyyaml)))
10776 (home-page "https://github.com/mk-fg/pretty-yaml")
10777 (synopsis "YAML pretty-print library for Python")
10778 (description
10779 "pyaml is a PyYAML based python module to produce pretty and readable
10780 YAML-serialized data.")
10781 (license license:wtfpl2)))
10782
10783 (define-public python2-pyaml
10784 (package-with-python2 python-pyaml))
10785
10786 (define-public python-backpack
10787 (package
10788 (name "python-backpack")
10789 (version "0.1")
10790 (source
10791 (origin
10792 (method url-fetch)
10793 (uri (pypi-uri "backpack" version))
10794 (sha256
10795 (base32
10796 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10797 (build-system python-build-system)
10798 (native-inputs
10799 `(("python-pytest" ,python-pytest)
10800 ("python-nose" ,python-nose)))
10801 (propagated-inputs
10802 `(("python-simplejson" ,python-simplejson)))
10803 (home-page "https://github.com/sdispater/backpack")
10804 (synopsis "Utilities for working with Python collections")
10805 (description "Backpack provides some useful utilities for working with
10806 collections of data.")
10807 (license license:expat)))
10808
10809 (define-public python2-backpack
10810 (package-with-python2 python-backpack))
10811
10812 (define-public python-prompt-toolkit
10813 (package
10814 (name "python-prompt-toolkit")
10815 (version "2.0.7")
10816 (source
10817 (origin
10818 (method url-fetch)
10819 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10820 (sha256
10821 (base32
10822 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10823 (build-system python-build-system)
10824 (arguments
10825 `(#:phases
10826 (modify-phases %standard-phases
10827 (delete 'check)
10828 (add-after 'install 'post-install-check
10829 (lambda* (#:key inputs outputs #:allow-other-keys)
10830 ;; HOME is needed for the test
10831 ;; "test_pathcompleter_can_expanduser".
10832 (setenv "HOME" "/tmp")
10833 (add-installed-pythonpath inputs outputs)
10834 (invoke "py.test"))))))
10835 (propagated-inputs
10836 `(("python-wcwidth" ,python-wcwidth)
10837 ("python-six" ,python-six)
10838 ("python-pygments" ,python-pygments)))
10839 (native-inputs
10840 `(("python-pytest" ,python-pytest)))
10841 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10842 (synopsis "Library for building command line interfaces in Python")
10843 (description
10844 "Prompt-Toolkit is a library for building interactive command line
10845 interfaces in Python. It's like GNU Readline but it also features syntax
10846 highlighting while typing, out-of-the-box multi-line input editing, advanced
10847 code completion, incremental search, support for Chinese double-width
10848 characters, mouse support, and auto suggestions.")
10849 (license license:bsd-3)))
10850
10851 (define-public python2-prompt-toolkit
10852 (package-with-python2 python-prompt-toolkit))
10853
10854 (define-public python-prompt-toolkit-1
10855 (package (inherit python-prompt-toolkit)
10856 (version "1.0.15")
10857 (source
10858 (origin
10859 (method url-fetch)
10860 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10861 (sha256
10862 (base32
10863 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
10864
10865 (define-public python2-prompt-toolkit-1
10866 (package-with-python2 python-prompt-toolkit-1))
10867
10868 (define-public python-jedi
10869 (package
10870 (name "python-jedi")
10871 (version "0.15.1")
10872 (source
10873 (origin
10874 (method url-fetch)
10875 (uri (pypi-uri "jedi" version))
10876 (sha256
10877 (base32
10878 "0bp4pxhsynaarbvzblsn5x32lzp29svy3sxfy8i6m5iwz9s9r1ds"))))
10879 (build-system python-build-system)
10880 (arguments
10881 `(#:phases
10882 (modify-phases %standard-phases
10883 (add-after 'unpack 'disable-file-completion-test
10884 ;; A single parameterized test currently fail (see:
10885 ;; https://github.com/davidhalter/jedi/issues/1395). Remove it.
10886 (lambda _
10887 (substitute* "test/test_api/test_completion.py"
10888 ((".*'example.py', 'rb\"' \\+ join\\('\\.\\.'.*") ""))
10889 #t))
10890 (replace 'check
10891 (lambda _
10892 (setenv "HOME" "/tmp")
10893 (invoke "python" "-m" "pytest"))))))
10894 (native-inputs
10895 `(("python-pytest" ,python-pytest)
10896 ("python-docopt" ,python-docopt)))
10897 (propagated-inputs
10898 `(("python-parso" ,python-parso)))
10899 (home-page "https://github.com/davidhalter/jedi")
10900 (synopsis "Autocompletion and static analysis library for Python")
10901 (description
10902 "Jedi is a static analysis tool for Python that can be used in Integrated
10903 Development Environments (@dfn{IDE}s) and text editors. It understands Python
10904 on a deeper level than many other static analysis frameworks for Python.
10905
10906 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
10907 well.")
10908 (license license:expat)))
10909
10910 (define-public python2-jedi
10911 (package-with-python2 python-jedi))
10912
10913 (define-public ptpython
10914 (package
10915 (name "ptpython")
10916 (version "0.34")
10917 (source (origin
10918 (method url-fetch)
10919 (uri (pypi-uri "ptpython" version))
10920 (sha256
10921 (base32
10922 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10923 (build-system python-build-system)
10924 (arguments
10925 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
10926 (propagated-inputs
10927 `(("python-docopt" ,python-docopt)
10928 ("python-jedi" ,python-jedi)
10929 ("python-prompt-toolkit" ,python-prompt-toolkit)
10930 ("python-pygments" ,python-pygments)))
10931 (home-page "https://github.com/jonathanslenders/ptpython")
10932 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10933 (description
10934 "ptpython is a Python read-eval-print loop with IDE-like features.
10935 It supports syntax highlighting, multiline editing, autocompletion, mouse,
10936 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10937 etc.")
10938 (license license:bsd-3)
10939 (properties `((python2-variant . ,(delay ptpython-2))))))
10940
10941 (define-public ptpython-2
10942 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10943 (package
10944 (inherit base)
10945 (name "ptpython2"))))
10946
10947 (define-public python-stem
10948 (package
10949 (name "python-stem")
10950 (version "1.7.1")
10951 (source
10952 (origin
10953 (method url-fetch)
10954 (uri (pypi-uri "stem" version))
10955 (sha256
10956 (base32
10957 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
10958 (build-system python-build-system)
10959 (arguments
10960 `(#:phases
10961 (modify-phases %standard-phases
10962 (replace 'check
10963 (lambda _
10964 (invoke "./run_tests.py" "--unit")
10965 #t)))))
10966 (native-inputs
10967 `(("python-mock" ,python-mock)
10968 ("python-pycodestyle" ,python-pycodestyle)
10969 ("python-pyflakes" ,python-pyflakes)))
10970 (home-page "https://stem.torproject.org/")
10971 (synopsis
10972 "Python controller library that allows applications to interact with Tor")
10973 (description
10974 "Stem is a Python controller library for Tor. With it you can use Tor's
10975 control protocol to script against the Tor process and read descriptor data
10976 relays publish about themselves.")
10977 (license license:lgpl3)))
10978
10979 (define-public python2-stem
10980 (package-with-python2 python-stem))
10981
10982 (define-public python-pyserial
10983 (package
10984 (name "python-pyserial")
10985 (version "3.1.1")
10986 (source
10987 (origin
10988 (method url-fetch)
10989 (uri (pypi-uri "pyserial" version))
10990 (sha256
10991 (base32
10992 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10993 (build-system python-build-system)
10994 (arguments
10995 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
10996 ;; #:phases
10997 ;; (modify-phases %standard-phases
10998 ;; (replace 'check
10999 ;; (lambda _
11000 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
11001 (home-page
11002 "https://github.com/pyserial/pyserial")
11003 (synopsis "Python Serial Port Bindings")
11004 (description "@code{pyserial} provide serial port bindings for Python. It
11005 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11006 and/or Xon/Xoff. The port is accessed in RAW mode.")
11007 (license license:bsd-3)))
11008
11009 (define-public python2-pyserial
11010 (package-with-python2 python-pyserial))
11011
11012 (define-public python-kivy
11013 (package
11014 (name "python-kivy")
11015 (version "1.10.1")
11016 (source
11017 (origin
11018 (method url-fetch)
11019 (uri (pypi-uri "Kivy" version))
11020 (file-name (string-append name "-" version ".tar.gz"))
11021 (sha256
11022 (base32
11023 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
11024 (build-system python-build-system)
11025 (arguments
11026 `(#:tests? #f ; Tests require many optional packages
11027 #:phases
11028 (modify-phases %standard-phases
11029 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11030 (lambda* (#:key inputs #:allow-other-keys)
11031 (setenv "KIVY_SDL2_PATH"
11032 (string-append (assoc-ref inputs "sdl-union")
11033 "/include/SDL2"))
11034 #t)))))
11035 (native-inputs
11036 `(("git" ,git)
11037 ("pkg-config" ,pkg-config)
11038 ("python-cython" ,python-cython)))
11039 (inputs
11040 `(("gstreamer" ,gstreamer)
11041 ("mesa" ,mesa)
11042 ("sdl-union"
11043 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11044 (home-page "http://kivy.org")
11045 (synopsis
11046 "Multitouch application framework")
11047 (description
11048 "A software library for rapid development of
11049 hardware-accelerated multitouch applications.")
11050 (license license:expat)))
11051
11052 (define-public python2-kivy
11053 (package-with-python2 python-kivy))
11054
11055 (define-public python-kivy-next
11056 (deprecated-package "python-kivy-next" python-kivy))
11057
11058 (define-public python2-kivy-next
11059 (deprecated-package "python2-kivy-next" python2-kivy))
11060
11061 (define-public python-binaryornot
11062 (package
11063 (name "python-binaryornot")
11064 (version "0.4.4")
11065 (source (origin
11066 (method url-fetch)
11067 (uri (pypi-uri "binaryornot" version))
11068 (sha256
11069 (base32
11070 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
11071 (build-system python-build-system)
11072 (arguments
11073 `(#:phases
11074 (modify-phases %standard-phases
11075 (add-after 'unpack 'patch-tests
11076 (lambda _
11077 ;; TypeError: binary() got an unexpected keyword argument
11078 ;; 'average_size'.
11079 (substitute* "tests/test_check.py"
11080 (("average_size=512") ""))
11081 #t)))))
11082 (propagated-inputs
11083 `(("python-chardet" ,python-chardet)
11084 ("python-hypothesis" ,python-hypothesis)))
11085 (home-page "https://github.com/audreyr/binaryornot")
11086 (synopsis "Package to check if a file is binary or text")
11087 (description "Ultra-lightweight pure Python package to check if a file is
11088 binary or text.")
11089 (license license:bsd-3)
11090 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11091
11092 (define-public python2-binaryornot
11093 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11094 (package (inherit base)
11095 (propagated-inputs
11096 `(("python2-enum34" ,python2-enum34)
11097 ,@(package-propagated-inputs base))))))
11098
11099 (define-public python-binwalk
11100 (let ((commit "64201acfb5b0a9cdd9faa58c40a36dcff8612e29")
11101 (revision "0"))
11102 (package
11103 (name "python-binwalk")
11104 (version (git-version "2.1.1" revision commit))
11105 (source
11106 (origin
11107 (method git-fetch)
11108 (uri (git-reference
11109 (url "https://github.com/ReFirmLabs/binwalk")
11110 (commit commit)))
11111 (file-name (git-file-name name version))
11112 (sha256
11113 (base32
11114 "1z7ca6rfp887hw5jc3sb45mm4fa0xid4lsp2z8g4r590dr7k7w15"))))
11115 (build-system python-build-system)
11116 (arguments
11117 `(#:phases
11118 (modify-phases %standard-phases
11119 (add-before 'check 'set-pythonpath
11120 (lambda _
11121 (setenv "PYTHONPATH"
11122 (string-append
11123 (getcwd) "/src/"
11124 ":" (getenv "PYTHONPATH")))
11125 (setenv "HOME" "")
11126 #t)))))
11127 (native-inputs
11128 `(("python-coverage" ,python-coverage)
11129 ("python-nose" ,python-nose)))
11130 (home-page "https://github.com/ReFirmLabs/binwalk")
11131 (synopsis "Firmware analysis tool")
11132 (description "Binwalk is a tool for analyzing, reverse engineering, and extracting firmware images")
11133 (license license:expat))))
11134
11135 (define-public python-nltk
11136 (package
11137 (name "python-nltk")
11138 (version "3.2.1")
11139 (source (origin
11140 (method url-fetch)
11141 (uri (pypi-uri "nltk" version))
11142 (sha256
11143 (base32
11144 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11145 (build-system python-build-system)
11146 (arguments
11147 '(;; The tests require some extra resources to be downloaded.
11148 ;; TODO Try packaging these resources.
11149 #:tests? #f))
11150 (home-page "http://nltk.org/")
11151 (synopsis "Natural Language Toolkit")
11152 (description "It provides interfaces to over 50 corpora and lexical
11153 resources such as WordNet, along with a suite of text processing libraries
11154 for classification, tokenization, stemming, tagging, parsing, and semantic
11155 reasoning, wrappers for natural language processing libraries.")
11156 (license license:asl2.0)))
11157
11158 (define-public python2-nltk
11159 (package-with-python2 python-nltk))
11160
11161 (define-public python-pymongo
11162 (package
11163 (name "python-pymongo")
11164 (version "3.7.2")
11165 (source (origin
11166 (method url-fetch)
11167 (uri (pypi-uri "pymongo" version))
11168 (sha256
11169 (base32
11170 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
11171 (build-system python-build-system)
11172 (propagated-inputs
11173 `(("python-certifi" ,python-certifi)))
11174 (home-page "https://github.com/mongodb/mongo-python-driver")
11175 (synopsis "Python driver for MongoDB")
11176 (description "Python driver for MongoDB.")
11177 (license license:asl2.0)))
11178
11179 (define-public python2-pymongo
11180 (package-with-python2 python-pymongo))
11181
11182 (define-public python-consul
11183 (package
11184 (name "python-consul")
11185 (version "0.6.1")
11186 (source
11187 (origin
11188 (method url-fetch)
11189 (uri (pypi-uri "python-consul" version))
11190 (sha256
11191 (base32
11192 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11193 (build-system python-build-system)
11194 (arguments
11195 '(#:tests? #f)) ; The tests are not distributed
11196 (propagated-inputs
11197 `(("python-requests" ,python-requests)
11198 ("python-six" ,python-six)))
11199 (home-page "https://github.com/cablehead/python-consul")
11200 (synopsis "Python client for Consul")
11201 (description
11202 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11203 discovery, monitoring and configuration.")
11204 (license license:expat)))
11205
11206 (define-public python2-consul
11207 (package-with-python2 python-consul))
11208
11209 (define-public python-schematics
11210 (package
11211 (name "python-schematics")
11212 (version "1.1.1")
11213 (source
11214 (origin
11215 (method git-fetch)
11216 (uri (git-reference
11217 (url "https://github.com/schematics/schematics.git")
11218 (commit (string-append "v" version))))
11219 (file-name (git-file-name name version))
11220 (sha256
11221 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
11222 (build-system python-build-system)
11223 (propagated-inputs
11224 `(("python-six" ,python-six)))
11225 (arguments
11226 ;; The tests require a bunch of not very nice packages with fixed
11227 ;; version requirements (e.g. python-coveralls).
11228 `(#:tests? #f))
11229 (home-page "https://github.com/schematics/schematics")
11230 (synopsis "Python Data Structures for Humans")
11231 (description "Python Data Structures for Humans.")
11232 (license license:bsd-3)))
11233
11234 (define-public python2-schematics
11235 (package-with-python2 python-schematics))
11236
11237 (define-public python-odfpy
11238 (package
11239 (name "python-odfpy")
11240 (version "1.3.3")
11241 (source (origin
11242 (method url-fetch)
11243 (uri (pypi-uri "odfpy" version))
11244 (sha256
11245 (base32
11246 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11247 (arguments
11248 `(#:modules ((srfi srfi-1)
11249 (guix build python-build-system)
11250 (guix build utils))
11251 #:phases
11252 (modify-phases %standard-phases
11253 (replace 'check
11254 ;; The test runner invokes python2 and python3 for test*.py.
11255 ;; To avoid having both in inputs, we replicate it here.
11256 (lambda _
11257 (for-each (lambda (test-file) (invoke "python" test-file))
11258 (find-files "tests" "^test.*\\.py$"))
11259 #t)))))
11260 (build-system python-build-system)
11261 (home-page "https://github.com/eea/odfpy")
11262 (synopsis "Python API and tools to manipulate OpenDocument files")
11263 (description "Collection of libraries and utility programs written in
11264 Python to manipulate OpenDocument 1.2 files.")
11265 (license
11266 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11267 ;; number of files with other licenses.
11268 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11269
11270 (define-public python2-odfpy
11271 (package-with-python2 python-odfpy))
11272
11273 (define-public python-natsort
11274 (package
11275 (name "python-natsort")
11276 (version "5.4.1")
11277 (source (origin
11278 (method url-fetch)
11279 (uri (pypi-uri "natsort" version))
11280 (sha256
11281 (base32
11282 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
11283 (build-system python-build-system)
11284 (arguments
11285 `(#:modules ((guix build utils)
11286 (guix build python-build-system)
11287 (srfi srfi-1)
11288 (srfi srfi-26)
11289 (ice-9 ftw))
11290 #:phases
11291 (modify-phases %standard-phases
11292 (add-before 'check 'set-cachedir
11293 ;; Tests require write access to $HOME by default
11294 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
11295 (replace 'check
11296 (lambda _
11297 (let ((cwd (getcwd)))
11298 (setenv "PYTHONPATH"
11299 (string-append
11300 cwd "/build/"
11301 (find (cut string-prefix? "lib" <>)
11302 (scandir (string-append cwd "/build")))
11303 ":"
11304 (getenv "PYTHONPATH")))
11305 (invoke "pytest" "-v")))))))
11306 (native-inputs
11307 `(("python-hypothesis" ,python-hypothesis)
11308 ("python-pytest-cov" ,python-pytest-cov)
11309 ("python-pytest-mock" ,python-pytest-mock)
11310 ("python-pytest" ,python-pytest)))
11311 (propagated-inputs ; TODO: Add python-fastnumbers.
11312 `(("python-pyicu" ,python-pyicu)))
11313 (home-page "https://github.com/SethMMorton/natsort")
11314 (synopsis "Natural sorting for python and shell")
11315 (description
11316 "Natsort lets you apply natural sorting on lists instead of
11317 lexicographical. If you use the built-in @code{sorted} method in python
11318 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
11319 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
11320 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
11321 identifies numbers and sorts them separately from strings. It can also sort
11322 version numbers, real numbers, mixed types and more, and comes with a shell
11323 command @command{natsort} that exposes this functionality in the command line.")
11324 (license license:expat)
11325 (properties `((python2-variant . ,(delay python2-natsort))))))
11326
11327 (define-public python2-natsort
11328 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11329 (package (inherit base)
11330 (native-inputs
11331 `(("python2-pathlib" ,python2-pathlib)
11332 ,@(package-native-inputs base))))))
11333
11334 (define-public python-glances
11335 (package
11336 (name "python-glances")
11337 (version "3.1.1")
11338 (source
11339 (origin
11340 (method url-fetch)
11341 (uri (pypi-uri "Glances" version))
11342 (sha256
11343 (base32
11344 "07j1ggzsqiskyz1i4mrnyr9i95v0dqi0i0hibnv1l188km8shmi8"))
11345 (modules '((guix build utils)))
11346 (snippet
11347 '(begin
11348 ;; Glances phones PyPI for weekly update checks by default.
11349 ;; Disable these. The user can re-enable them if desired.
11350 (substitute* "glances/outdated.py"
11351 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
11352 (string-append indentation
11353 "self.args.disable_check_update = True\n"
11354 line)))
11355 #t))))
11356 (build-system python-build-system)
11357 (propagated-inputs
11358 `(("python-future" ,python-future)
11359 ("python-psutil" ,python-psutil)))
11360 (home-page
11361 "https://github.com/nicolargo/glances")
11362 (synopsis "Cross-platform curses-based monitoring tool")
11363 (description
11364 "Glances is a curses-based monitoring tool for a wide variety of platforms.
11365 Glances uses the PsUtil library to get information from your system. It
11366 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
11367 (license license:lgpl3+)))
11368
11369 (define-public python2-glances
11370 (package-with-python2 python-glances))
11371
11372 (define-public python-graphql-core
11373 (package
11374 (name "python-graphql-core")
11375 (version "0.5.3")
11376 (source
11377 (origin
11378 (method url-fetch)
11379 (uri (pypi-uri "graphql-core" version))
11380 (sha256
11381 (base32
11382 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11383 (build-system python-build-system)
11384 (arguments
11385 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11386 #:phases
11387 (modify-phases %standard-phases
11388 (add-after 'unpack 'patch-hardcoded-version
11389 (lambda _ (substitute*
11390 "setup.py"
11391 (("'gevent==1.1rc1'") "'gevent'"))
11392 #t)))))
11393 (native-inputs
11394 `(("python-gevent" ,python-gevent)
11395 ("python-mock" ,python-mock)
11396 ("python-pytest-mock" ,python-pytest-mock)))
11397 (propagated-inputs
11398 `(("python-promise" ,python-promise)
11399 ("python-six" ,python-six)))
11400 (home-page "https://github.com/graphql-python/graphql-core")
11401 (synopsis "GraphQL implementation for Python")
11402 (description
11403 "GraphQL implementation for Python. GraphQL is a data query language and
11404 runtime designed and used to request and deliver data to mobile and web apps.
11405 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11406 to Python.")
11407 (license license:expat)))
11408
11409 (define-public python2-graphql-core
11410 (package-with-python2 python-graphql-core))
11411
11412 (define-public python-graphql-relay
11413 (package
11414 (name "python-graphql-relay")
11415 (version "0.4.5")
11416 (source
11417 (origin
11418 (method url-fetch)
11419 (uri (pypi-uri "graphql-relay" version))
11420 (sha256
11421 (base32
11422 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
11423 (build-system python-build-system)
11424 (arguments
11425 '(#:tests? #f)) ; The tests are not distributed
11426 (propagated-inputs
11427 `(("python-graphql-core" ,python-graphql-core)
11428 ("python-promise" ,python-promise)
11429 ("python-six" ,python-six)))
11430 (home-page "https://github.com/graphql-python/graphql-relay-py")
11431 (synopsis "Relay implementation for Python")
11432 (description
11433 "This is a library to allow the easy creation of Relay-compliant servers
11434 using the GraphQL Python reference implementation of a GraphQL server. It
11435 should be noted that the code is a exact port of the original
11436 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11437 from Facebook.")
11438 (license license:expat)))
11439
11440 (define-public python2-graphql-relay
11441 (package-with-python2 python-graphql-relay))
11442
11443 (define-public python-graphene
11444 (package
11445 (name "python-graphene")
11446 (version "0.10.2")
11447 (source
11448 (origin
11449 (method url-fetch)
11450 (uri (pypi-uri "graphene" version))
11451 (sha256
11452 (base32
11453 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11454 (build-system python-build-system)
11455 (propagated-inputs
11456 `(("python-graphql-core" ,python-graphql-core)
11457 ("python-graphql-relay" ,python-graphql-relay)
11458 ("python-iso8601" ,python-iso8601)
11459 ("python-promise" ,python-promise)
11460 ("python-six" ,python-six)))
11461 (arguments
11462 `(#:tests? #f)) ; no tests/ in the PyPI tarball
11463 (home-page "http://graphene-python.org/")
11464 (synopsis "GraphQL Framework for Python")
11465 (description
11466 "Graphene is a Python library for building GraphQL schemas/types.
11467 A GraphQL schema describes your data model, and provides a GraphQL server
11468 with an associated set of resolve methods that know how to fetch data.")
11469 (properties `((python2-variant . ,(delay python2-graphene))))
11470 (license license:expat)))
11471
11472 (define-public python2-graphene
11473 (let ((base (package-with-python2
11474 (strip-python2-variant python-graphene))))
11475 (package (inherit base)
11476 (native-inputs
11477 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11478 ,@(package-native-inputs base))))))
11479
11480 (define-public python-nautilus
11481 (package
11482 (name "python-nautilus")
11483 (version "0.4.9")
11484 (source
11485 (origin
11486 (method url-fetch)
11487 (uri (pypi-uri "nautilus" version))
11488 (sha256
11489 (base32
11490 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11491 (build-system python-build-system)
11492 (arguments `(#:tests? #f)) ; fails to import test modules
11493 (propagated-inputs
11494 `(("python-bcrypt" ,python-bcrypt)
11495 ("python-click" ,python-click)
11496 ("python-consul" ,python-consul)
11497 ("python-graphene" ,python-graphene)
11498 ("python-jinja2" ,python-jinja2)
11499 ("python-peewee" ,python-peewee)
11500 ("python-pika" ,python-pika)
11501 ("python-tornado" ,python-tornado)
11502 ("python-wtforms" ,python-wtforms)))
11503 (native-inputs
11504 `(("python-nose2" ,python-nose2)))
11505 (home-page "https://github.com/AlecAivazis/nautilus")
11506 (synopsis "Library for creating microservice applications")
11507 (description
11508 "Nautilus is a framework for flux based microservices that looks to
11509 provide extendible implementations of common aspects of a cloud so that you can
11510 focus on building massively scalable web applications.")
11511 (license license:expat)))
11512
11513 (define-public python-snowballstemmer
11514 (package
11515 (name "python-snowballstemmer")
11516 (version "1.2.1")
11517 (source (origin
11518 (method url-fetch)
11519 (uri (pypi-uri "snowballstemmer" version))
11520 (sha256
11521 (base32
11522 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11523 (build-system python-build-system)
11524 (arguments
11525 `(;; No tests exist
11526 #:tests? #f))
11527 (home-page "https://github.com/shibukawa/snowball_py")
11528 (synopsis "Snowball stemming library collection for Python")
11529 (description "This package provides 16 word stemmer algorithms generated
11530 from Snowball algorithms. It includes the 15 original ones plus the Poerter
11531 English stemmer.")
11532 (license license:bsd-3)))
11533
11534 (define-public python2-snowballstemmer
11535 (package-with-python2 python-snowballstemmer))
11536
11537 (define-public python-setproctitle
11538 (package
11539 (name "python-setproctitle")
11540 (version "1.1.10")
11541 (source
11542 (origin
11543 (method url-fetch)
11544 (uri (pypi-uri "setproctitle" version))
11545 (sha256
11546 (base32
11547 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11548 (build-system python-build-system)
11549 (arguments
11550 '(#:phases
11551 (modify-phases %standard-phases
11552 (add-before 'check 'patch-Makefile
11553 ;; Stricly this is only required for the python2 variant.
11554 ;; But adding a phase in an inherited package seems to be
11555 ;; cumbersum. So we patch even for python3.
11556 (lambda _
11557 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11558 (when nose
11559 (substitute* "Makefile"
11560 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11561 (string-append nose "/bin/nosetests "))))
11562 #t)))
11563 (replace 'check
11564 (lambda _
11565 (setenv "PYTHON" (or (which "python3") (which "python")))
11566 (setenv "PYCONFIG" (or (which "python3-config")
11567 (which "python-config")))
11568 (setenv "CC" "gcc")
11569 ;; No need to extend PYTHONPATH to find the built package, since
11570 ;; the Makefile will build anyway
11571 (invoke "make" "check"))))))
11572 (native-inputs
11573 `(("procps" ,procps))) ; required for tests
11574 (home-page
11575 "https://github.com/dvarrazzo/py-setproctitle")
11576 (synopsis
11577 "Setproctitle implementation for Python to customize the process title")
11578 (description "The library allows a process to change its title (as displayed
11579 by system tools such as ps and top).
11580
11581 Changing the title is mostly useful in multi-process systems, for
11582 example when a master process is forked: changing the children's title
11583 allows to identify the task each process is busy with. The technique
11584 is used by PostgreSQL and the OpenSSH Server for example.")
11585 (license license:bsd-3)
11586 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11587
11588 (define-public python2-setproctitle
11589 (let ((base (package-with-python2
11590 (strip-python2-variant python-setproctitle))))
11591 (package
11592 (inherit base)
11593 (native-inputs `(("python2-nose" ,python2-nose)
11594 ,@(package-native-inputs base))))))
11595
11596 (define-public python-validictory
11597 (package
11598 (name "python-validictory")
11599 (version "1.0.1")
11600 (source
11601 (origin
11602 (method url-fetch)
11603 (uri (pypi-uri "validictory" version))
11604 (sha256
11605 (base32
11606 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11607 (build-system python-build-system)
11608 (arguments
11609 '(#:phases
11610 (modify-phases %standard-phases
11611 (add-after 'unpack 'bootstrap
11612 ;; Move the tests out of the package directory to avoid
11613 ;; packaging them.
11614 (lambda* _
11615 (rename-file "validictory/tests" "tests")
11616 (delete-file "tests/__init__.py")))
11617 (replace 'check
11618 (lambda _
11619 ;; Extend PYTHONPATH so the built package will be found.
11620 (setenv "PYTHONPATH"
11621 (string-append (getcwd) "/build/lib:"
11622 (getenv "PYTHONPATH")))
11623 (invoke "py.test" "-vv" ))))))
11624 (native-inputs
11625 `(("python-pytest" ,python-pytest)))
11626 (home-page
11627 "https://github.com/jamesturk/validictory")
11628 (synopsis "General purpose Python data validator")
11629 (description "It allows validation of arbitrary Python data structures.
11630
11631 The schema format is based on the JSON Schema
11632 proposal (http://json-schema.org), so combined with json the library is also
11633 useful as a validator for JSON data.")
11634 (license license:expat)))
11635
11636 (define-public python2-validictory
11637 (package-with-python2 python-validictory))
11638
11639 (define-public python-pyelftools
11640 (package
11641 (name "python-pyelftools")
11642 (version "0.25")
11643 (source
11644 (origin
11645 (method url-fetch)
11646 (uri (pypi-uri "pyelftools" version))
11647 (sha256
11648 (base32
11649 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11650 (build-system python-build-system)
11651 (arguments
11652 `(#:phases
11653 (modify-phases %standard-phases
11654 (add-before 'check 'set-pythonpath
11655 (lambda _
11656 (setenv "PYTHONPATH"
11657 (string-append
11658 (getcwd) "/test/"
11659 ":" (getenv "PYTHONPATH")))
11660 #t)))))
11661 (home-page
11662 "https://github.com/eliben/pyelftools")
11663 (synopsis
11664 "Analyze binary and library file information")
11665 (description "This Python library provides interfaces for parsing and
11666 analyzing two binary and library file formats; the Executable and Linking
11667 Format (ELF), and debugging information in the Debugging With Attributed
11668 Record Format (DWARF).")
11669 (license license:public-domain)))
11670
11671 (define-public python-pyev
11672 (package
11673 (name "python-pyev")
11674 (version "0.9.0")
11675 (source
11676 (origin
11677 (method url-fetch)
11678 (uri (pypi-uri "pyev" version))
11679 (sha256
11680 (base32
11681 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11682 (build-system python-build-system)
11683 (arguments
11684 `(#:tests? #f ; no test suite
11685 #:phases
11686 (modify-phases %standard-phases
11687 (add-after 'unpack 'patch
11688 (lambda* (#:key inputs #:allow-other-keys)
11689 (let ((libev (string-append (assoc-ref inputs "libev")
11690 "/lib/libev.so.4")))
11691 (substitute* "setup.py"
11692 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11693 (string-append "libev_dll_name = \"" libev "\"")))))))))
11694 (inputs
11695 `(("libev" ,libev)))
11696 (home-page "http://pythonhosted.org/pyev/")
11697 (synopsis "Python libev interface")
11698 (description "Pyev provides a Python interface to libev.")
11699 (license license:gpl3)))
11700
11701 (define-public python2-pyev
11702 (package-with-python2 python-pyev))
11703
11704 (define-public python-imagesize
11705 (package
11706 (name "python-imagesize")
11707 (version "1.1.0")
11708 (source
11709 (origin
11710 (method url-fetch)
11711 (uri (pypi-uri "imagesize" version))
11712 (sha256
11713 (base32
11714 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11715 (build-system python-build-system)
11716 (home-page "https://github.com/shibukawa/imagesize_py")
11717 (synopsis "Gets image size of files in various formats in Python")
11718 (description
11719 "This package allows determination of image size from
11720 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11721 (license license:expat)))
11722
11723 (define-public python2-imagesize
11724 (package-with-python2 python-imagesize))
11725
11726 (define-public python-termstyle
11727 (package
11728 (name "python-termstyle")
11729 (version "0.1.11")
11730 (source
11731 (origin
11732 (method url-fetch)
11733 (uri (pypi-uri "termstyle" version))
11734 (sha256
11735 (base32
11736 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11737 (build-system python-build-system)
11738 (arguments
11739 '(#:phases
11740 (modify-phases %standard-phases
11741 (replace 'check
11742 (lambda _
11743 (invoke "python" "test3.py"))))))
11744 (home-page "https://github.com/gfxmonk/termstyle")
11745 (synopsis "Console text coloring for Python")
11746 (description "This package provides console text coloring for Python.")
11747 (license license:bsd-3)))
11748
11749 (define-public python-argcomplete
11750 (package
11751 (name "python-argcomplete")
11752 (version "1.7.0")
11753 (source
11754 (origin
11755 (method url-fetch)
11756 (uri (pypi-uri "argcomplete" version))
11757 (sha256
11758 (base32
11759 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
11760 (build-system python-build-system)
11761 (native-inputs
11762 `(("python-pexpect" ,python-pexpect)
11763 ("tcsh" ,tcsh)
11764 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
11765 (home-page "https://github.com/kislyuk/argcomplete")
11766 (synopsis "Shell tab completion for Python argparse")
11767 (description "argcomplete provides extensible command line tab completion
11768 of arguments and options for Python scripts using @code{argparse}. It's
11769 particularly useful for programs with many options or sub-parsers that can
11770 dynamically suggest completions; for example, when browsing resources over the
11771 network.")
11772 (license license:asl2.0)))
11773
11774 (define-public python2-argcomplete
11775 (package-with-python2 python-argcomplete))
11776
11777 (define-public python-xopen
11778 (package
11779 (name "python-xopen")
11780 (version "0.5.0")
11781 (source
11782 (origin
11783 (method url-fetch)
11784 (uri (pypi-uri "xopen" version))
11785 (sha256
11786 (base32
11787 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
11788 (build-system python-build-system)
11789 (propagated-inputs
11790 `(("python-setuptools-scm" ,python-setuptools-scm)))
11791 (home-page "https://github.com/marcelm/xopen/")
11792 (synopsis "Open compressed files transparently")
11793 (description "This module provides an @code{xopen} function that works like
11794 Python's built-in @code{open} function, but can also deal with compressed files.
11795 Supported compression formats are gzip, bzip2 and, xz, and are automatically
11796 recognized by their file extensions. The focus is on being as efficient as
11797 possible on all supported Python versions.")
11798 (license license:expat)))
11799
11800 (define-public python2-xopen
11801 (let ((base (package-with-python2
11802 (strip-python2-variant python-xopen))))
11803 (package
11804 (inherit base)
11805 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
11806 ,@(package-propagated-inputs base))))))
11807
11808 (define-public python-cheetah
11809 (package
11810 (name "python-cheetah")
11811 (version "3.1.0")
11812 (source
11813 (origin
11814 (method url-fetch)
11815 (uri (pypi-uri "Cheetah3" version))
11816 (sha256
11817 (base32
11818 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
11819 (build-system python-build-system)
11820 (arguments
11821 `(#:modules ((guix build utils)
11822 (guix build python-build-system)
11823 (ice-9 ftw)
11824 (srfi srfi-1)
11825 (srfi srfi-26))
11826 #:phases (modify-phases %standard-phases
11827 (add-after 'unpack 'use-absolute-python
11828 (lambda _
11829 (substitute* "Cheetah/CheetahWrapper.py"
11830 (("#!/usr/bin/env python")
11831 (string-append "#!" (which "python"))))
11832 #t))
11833 (replace 'check
11834 (lambda _
11835 (let ((cwd (getcwd)))
11836 (setenv "PYTHONPATH"
11837 (string-append
11838 cwd "/build/"
11839 (find (cut string-prefix? "lib" <>)
11840 (scandir (string-append cwd "/build")))
11841 ":" (getenv "PYTHONPATH")))
11842 (setenv "PATH"
11843 (string-append (getenv "PATH")
11844 ":" cwd "/bin"))
11845 (setenv "TMPDIR" "/tmp")
11846
11847 (substitute* "Cheetah/Tests/Test.py"
11848 (("unittest.TextTestRunner\\(\\)")
11849 "unittest.TextTestRunner(verbosity=2)"))
11850
11851 (invoke "python" "Cheetah/Tests/Test.py")))))))
11852 (propagated-inputs
11853 `(("python-markdown" ,python-markdown))) ;optional
11854 (home-page "http://cheetahtemplate.org/")
11855 (synopsis "Template engine")
11856 (description "Cheetah is a text-based template engine and Python code
11857 generator.
11858
11859 Cheetah can be used as a standalone templating utility or referenced as
11860 a library from other Python applications. It has many potential uses,
11861 but web developers looking for a viable alternative to ASP, JSP, PHP and
11862 PSP are expected to be its principle user group.
11863
11864 Features:
11865 @enumerate
11866 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
11867 text-based format.
11868 @item Cleanly separates content, graphic design, and program code.
11869 @item Blends the power and flexibility of Python with a simple template language
11870 that non-programmers can understand.
11871 @item Gives template writers full access to any Python data structure, module,
11872 function, object, or method in their templates.
11873 @item Makes code reuse easy by providing an object-orientated interface to
11874 templates that is accessible from Python code or other Cheetah templates.
11875 One template can subclass another and selectively reimplement sections of it.
11876 @item Provides a simple, yet powerful, caching mechanism that can dramatically
11877 improve the performance of a dynamic website.
11878 @item Compiles templates into optimized, yet readable, Python code.
11879 @end enumerate")
11880 (license (license:x11-style "file://LICENSE"))))
11881
11882 (define-public python2-cheetah
11883 (package-with-python2 python-cheetah))
11884
11885 (define-public python-dulwich
11886 (package
11887 (name "python-dulwich")
11888 (version "0.18.6")
11889 (source
11890 (origin
11891 (method url-fetch)
11892 (uri (list (string-append "https://www.dulwich.io/releases/"
11893 "dulwich-" version ".tar.gz")
11894 (pypi-uri "dulwich" version)))
11895 (sha256
11896 (base32
11897 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
11898 (build-system python-build-system)
11899 (arguments
11900 `(#:phases
11901 (modify-phases %standard-phases
11902 (add-before 'check 'fix-tests
11903 (lambda* (#:key inputs #:allow-other-keys)
11904 ;; The tests use Popen with a custom environment which doesn't
11905 ;; include PATH.
11906 (substitute* "dulwich/tests/compat/utils.py"
11907 (("'git'") (string-append "'"
11908 (which "git")
11909 "'")))
11910 (substitute* '("dulwich/tests/test_repository.py"
11911 "dulwich/tests/test_hooks.py")
11912 (("#!/bin/sh") (string-append "#!" (which "sh"))))
11913 (setenv "TEST_RUNNER" "unittest")
11914 (setenv "PYTHONHASHSEED" "random")
11915 #t)))))
11916 (propagated-inputs
11917 `(("python-fastimport" ,python-fastimport)))
11918 (native-inputs
11919 `(("python-mock" ,python-mock)
11920 ("python-geventhttpclient" ,python-geventhttpclient)
11921 ("git" ,git)))
11922 (home-page "https://www.dulwich.io/")
11923 (synopsis "Git implementation in Python")
11924 (description "Dulwich is an implementation of the Git file formats and
11925 protocols written in pure Python.")
11926 ;; Can be used with either license.
11927 (license (list license:asl2.0 license:gpl2+))))
11928
11929 (define-public python2-dulwich
11930 (package-with-python2 python-dulwich))
11931
11932 (define-public python-pbkdf2
11933 (package
11934 (name "python-pbkdf2")
11935 (version "1.3")
11936 (source
11937 (origin
11938 (method url-fetch)
11939 (uri (pypi-uri "pbkdf2" version))
11940 (sha256
11941 (base32
11942 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
11943 (build-system python-build-system)
11944 (arguments
11945 '(#:phases
11946 (modify-phases %standard-phases
11947 (replace 'check
11948 (lambda _
11949 (setenv "PYTHONPATH"
11950 (string-append (getcwd) "/build/lib:"
11951 (getenv "PYTHONPATH")))
11952 (invoke "python" "test/test_pbkdf2.py"))))))
11953 (propagated-inputs
11954 `(("python-pycrypto" ,python-pycrypto))) ; optional
11955 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
11956 (synopsis "Password-based key derivation")
11957 (description "This module implements the password-based key derivation
11958 function, PBKDF2, specified in RSA PKCS#5 v2.0.
11959
11960 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
11961 is part of the RSA Public Key Cryptography Standards series. The provided
11962 implementation takes a password or a passphrase and a salt value (and
11963 optionally a iteration count, a digest module, and a MAC module) and provides
11964 a file-like object from which an arbitrarly-sized key can be read.")
11965 (license license:expat)))
11966
11967 (define-public python2-pbkdf2
11968 (package-with-python2 python-pbkdf2))
11969
11970 (define-public python-qrcode
11971 (package
11972 (name "python-qrcode")
11973 (version "6.1")
11974 (source
11975 (origin
11976 (method url-fetch)
11977 (uri (pypi-uri "qrcode" version))
11978 (sha256
11979 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
11980 (build-system python-build-system)
11981 (arguments
11982 ;; FIXME: Tests require packaging 'pymaging'.
11983 '(#:tests? #f))
11984 (propagated-inputs
11985 `(("python-lxml" ,python-lxml) ; for SVG output
11986 ("python-pillow" ,python-pillow) ; for PNG output
11987 ("python-six" ,python-six)))
11988 (home-page "https://github.com/lincolnloop/python-qrcode")
11989 (synopsis "QR Code image generator")
11990 (description "This package provides a pure Python QR Code generator
11991 module. It uses the Python Imaging Library (PIL) to allow for the generation
11992 of QR Codes.
11993
11994 In addition this package provides a command line tool to generate QR codes and
11995 either write these QR codes to a file or do the output as ascii art at the
11996 console.")
11997 (license license:bsd-3)))
11998
11999 (define-public python2-qrcode
12000 (package-with-python2 python-qrcode))
12001
12002 (define-public python-rst2ansi
12003 (package
12004 (name "python-rst2ansi")
12005 (version "0.1.5")
12006 (source
12007 (origin
12008 (method url-fetch)
12009 (uri (pypi-uri "rst2ansi" version))
12010 (sha256
12011 (base32
12012 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
12013 (build-system python-build-system)
12014 (propagated-inputs
12015 `(("python-docutils" ,python-docutils)))
12016 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
12017 (synopsis "Convert RST to ANSI-decorated console output")
12018 (description
12019 "Python module dedicated to rendering RST (reStructuredText) documents
12020 to ansi-escaped strings suitable for display in a terminal.")
12021 (license license:expat)))
12022
12023 (define-public python-ansi2html
12024 (package
12025 (name "python-ansi2html")
12026 (version "1.2.0")
12027 (source
12028 (origin
12029 (method url-fetch)
12030 (uri (pypi-uri "ansi2html" version))
12031 (sha256
12032 (base32
12033 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
12034 (build-system python-build-system)
12035 (native-inputs
12036 `(("python-mock" ,python-mock)
12037 ("python-nose" ,python-nose)))
12038 (propagated-inputs
12039 `(("python-six" ,python-six)))
12040 (home-page "https://github.com/ralphbean/ansi2html")
12041 (synopsis "Convert ANSI-decorated console output to HTML")
12042 (description
12043 "@command{ansi2html} is a Python library and command line utility for
12044 convering text with ANSI color codes to HTML or LaTeX.")
12045 (license license:gpl3+)))
12046
12047 (define-public python2-ansi2html
12048 (package-with-python2 python-ansi2html))
12049
12050 (define-public python-ddt
12051 (package
12052 (name "python-ddt")
12053 (version "1.1.3")
12054 (source
12055 (origin
12056 (method url-fetch)
12057 (uri (pypi-uri "ddt" version))
12058 (sha256
12059 (base32
12060 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
12061 (build-system python-build-system)
12062 (native-inputs
12063 `(("python-mock" ,python-mock)
12064 ("python-nose" ,python-nose)))
12065 (propagated-inputs
12066 `(("python-six" ,python-six)
12067 ("python-pyyaml" ,python-pyyaml)))
12068 (home-page "https://github.com/txels/ddt")
12069 (synopsis "Data-Driven Tests")
12070 (description
12071 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
12072 running it with different test data, and make it appear as multiple test
12073 cases.")
12074 (license license:expat)))
12075
12076 (define-public python2-ddt
12077 (package-with-python2 python-ddt))
12078
12079 (define-public python-pycountry
12080 (package
12081 (name "python-pycountry")
12082 (version "18.5.26")
12083 (source
12084 (origin
12085 (method url-fetch)
12086 (uri (pypi-uri "pycountry" version))
12087 (sha256
12088 (base32
12089 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
12090 (build-system python-build-system)
12091 (home-page "https://bitbucket.org/flyingcircus/pycountry")
12092 (synopsis "ISO databases for languages, countries, currencies, etc.")
12093 (description
12094 "@code{pycountry} provides the ISO databases for the standards:
12095 @enumerate
12096 @item 639-3 (Languages)
12097 @item 3166 (Countries)
12098 @item 3166-3 (Deleted Countries)
12099 @item 3166-2 (Subdivisions of countries)
12100 @item 4217 (Currencies)
12101 @item 15924 (Scripts)
12102 @end enumerate
12103 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
12104 through a Python API.")
12105 (license license:lgpl2.1+)))
12106
12107 (define-public python2-pycountry
12108 (package-with-python2 python-pycountry))
12109
12110 (define-public python-pycosat
12111 (package
12112 (name "python-pycosat")
12113 (version "0.6.1")
12114 (source
12115 (origin
12116 (method url-fetch)
12117 (uri (pypi-uri "pycosat" version))
12118 (sha256
12119 (base32
12120 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
12121 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
12122 (build-system python-build-system)
12123 (home-page "https://github.com/ContinuumIO/pycosat")
12124 (synopsis "Bindings to picosat (a SAT solver)")
12125 (description
12126 "This package provides efficient Python bindings to @code{picosat} on
12127 the C level. When importing pycosat, the @code{picosat} solver becomes part
12128 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
12129 Problem} (SAT) solver.")
12130 (license license:expat)))
12131
12132 (define-public python2-pycosat
12133 (package-with-python2 python-pycosat))
12134
12135 (define-public python2-ruamel.ordereddict
12136 (package
12137 (name "python2-ruamel.ordereddict")
12138 (version "0.4.9")
12139 (source
12140 (origin
12141 (method url-fetch)
12142 (uri (pypi-uri "ruamel.ordereddict" version))
12143 (sha256
12144 (base32
12145 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
12146 (build-system python-build-system)
12147 (arguments
12148 `(#:python ,python-2
12149 #:phases
12150 (modify-phases %standard-phases
12151 (delete 'check)
12152 (add-after 'install 'check
12153 (lambda* (#:key inputs outputs #:allow-other-keys)
12154 (add-installed-pythonpath inputs outputs)
12155 (invoke "python" "test/testordereddict.py"))))))
12156 (home-page "https://bitbucket.org/ruamel/ordereddict")
12157 (synopsis "Version of dict that keeps keys in insertion order")
12158 (description
12159 "This is an implementation of an ordered dictionary with @dfn{Key
12160 Insertion Order} (KIO: updates of values do not affect the position of the
12161 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
12162 removed and put at the back). The standard library module @code{OrderedDict},
12163 implemented later, implements a subset of @code{ordereddict} functionality.
12164 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
12165 Order} (KSO, no sorting function can be specified, but a transform can be
12166 specified to apply on the key before comparison (e.g. @code{string.lower})).")
12167 (license license:expat)))
12168
12169 (define-public python-pypeg2
12170 (package
12171 (name "python-pypeg2")
12172 (version "2.15.2")
12173 (source
12174 (origin
12175 (method url-fetch)
12176 (uri (pypi-uri "pyPEG2" version))
12177 (sha256
12178 (base32
12179 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
12180 (build-system python-build-system)
12181 (propagated-inputs `(("python-lxml" ,python-lxml)))
12182 (arguments
12183 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
12184 '(#:tests? #f))
12185 (home-page "https://fdik.org/pyPEG/")
12186 (synopsis "Parsering Expression Grammars in Python")
12187 (description "PyPEG is an intrinsic parser interpreter framework for
12188 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
12189 parse many formal languages.")
12190 (license license:gpl2)))
12191
12192 (define-public python-incremental
12193 (package
12194 (name "python-incremental")
12195 (version "17.5.0")
12196 (source
12197 (origin
12198 (method url-fetch)
12199 (uri (pypi-uri "incremental" version))
12200 (sha256
12201 (base32
12202 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
12203 (build-system python-build-system)
12204 (home-page "https://github.com/hawkowl/incremental")
12205 (synopsis "Library for versioning Python projects")
12206 (description "Incremental is a small library that versions your Python
12207 projects.")
12208 (license license:expat)))
12209
12210 (define-public python2-incremental
12211 (package-with-python2 python-incremental))
12212
12213 (define-public python-invoke
12214 (package
12215 (name "python-invoke")
12216 (home-page "http://www.pyinvoke.org/")
12217 (version "1.1.0")
12218 (source (origin
12219 (method url-fetch)
12220 (uri (pypi-uri "invoke" version))
12221 (sha256
12222 (base32
12223 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
12224 (build-system python-build-system)
12225 (arguments
12226 ;; XXX: Requires many dependencies that are not yet in Guix.
12227 `(#:tests? #f))
12228 (synopsis "Pythonic task execution")
12229 (description
12230 "Invoke is a Python task execution tool and library, drawing inspiration
12231 from various sources to arrive at a powerful and clean feature set. It is
12232 evolved from the Fabric project, but focuses on local and abstract concerns
12233 instead of servers and network commands.")
12234 (license license:bsd-3)))
12235
12236 (define-public python2-invoke
12237 (package-with-python2 python-invoke))
12238
12239 (define-public python-automat
12240 (package
12241 (name "python-automat")
12242 (version "0.7.0")
12243 (source (origin
12244 (method url-fetch)
12245 (uri (pypi-uri "Automat" version))
12246 (sha256
12247 (base32
12248 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
12249 (build-system python-build-system)
12250 ;; We disable the tests because they require python-twisted, while
12251 ;; python-twisted depends on python-automat. Twisted is optional, but the
12252 ;; tests fail if it is not available. Also see
12253 ;; <https://github.com/glyph/automat/issues/71>.
12254 (arguments '(#:tests? #f))
12255 (native-inputs
12256 `(("python-m2r" ,python-m2r)
12257 ("python-setuptools-scm" ,python-setuptools-scm)
12258 ("python-graphviz" ,python-graphviz)))
12259 (propagated-inputs
12260 `(("python-six" ,python-six)
12261 ("python-attrs" ,python-attrs)))
12262 (home-page "https://github.com/glyph/Automat")
12263 (synopsis "Self-service finite-state machines")
12264 (description "Automat is a library for concise, idiomatic Python
12265 expression of finite-state automata (particularly deterministic finite-state
12266 transducers).")
12267 (license license:expat)))
12268
12269 (define-public python2-automat
12270 (package-with-python2 python-automat))
12271
12272 (define-public python-m2r
12273 (package
12274 (name "python-m2r")
12275 (version "0.2.1")
12276 (source (origin
12277 (method url-fetch)
12278 (uri (pypi-uri "m2r" version))
12279 (sha256
12280 (base32
12281 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
12282 (build-system python-build-system)
12283 (propagated-inputs
12284 `(("python-docutils" ,python-docutils)
12285 ("python-mistune" ,python-mistune)))
12286 (native-inputs
12287 `(("python-pygments" ,python-pygments)
12288 ("python-mock" ,python-mock)))
12289 (home-page "https://github.com/miyakogi/m2r")
12290 (synopsis "Markdown to reStructuredText converter")
12291 (description "M2R converts a markdown file including reST markups to valid
12292 reST format.")
12293 (license license:expat)))
12294
12295 (define-public python2-m2r
12296 (package-with-python2 python-m2r))
12297
12298 (define-public python-constantly
12299 (package
12300 (name "python-constantly")
12301 (version "15.1.0")
12302 (source (origin
12303 (method url-fetch)
12304 (uri (pypi-uri "constantly" version))
12305 (sha256
12306 (base32
12307 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
12308 (build-system python-build-system)
12309 (home-page "https://github.com/twisted/constantly")
12310 (synopsis "Symbolic constants in Python")
12311 (description "Constantly is a Python library that provides symbolic
12312 constant support. It includes collections and constants with text, numeric,
12313 and bit flag values.")
12314 (license license:expat)))
12315
12316 (define-public python2-constantly
12317 (package-with-python2 python-constantly))
12318
12319 (define-public python-attrs
12320 (package
12321 (name "python-attrs")
12322 (version "19.1.0")
12323 (source (origin
12324 (method url-fetch)
12325 (uri (pypi-uri "attrs" version))
12326 (sha256
12327 (base32
12328 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
12329 (build-system python-build-system)
12330 (arguments
12331 `(#:modules ((guix build utils)
12332 (guix build python-build-system)
12333 (ice-9 ftw)
12334 (srfi srfi-1)
12335 (srfi srfi-26))
12336 #:phases (modify-phases %standard-phases
12337 (replace 'check
12338 (lambda _
12339 (let ((cwd (getcwd)))
12340 (setenv "PYTHONPATH"
12341 (string-append
12342 cwd "/build/"
12343 (find (cut string-prefix? "lib" <>)
12344 (scandir (string-append cwd "/build")))
12345 ":"
12346 (getenv "PYTHONPATH")))
12347 (invoke "python" "-m" "pytest")))))))
12348 (native-inputs
12349 `(("python-coverage" ,python-coverage)
12350 ("python-hypothesis" ,python-hypothesis)
12351 ("python-pympler" ,python-pympler)
12352 ("python-pytest" ,python-pytest)
12353 ("python-six" ,python-six)
12354 ("python-sphinx" ,python-sphinx)
12355 ("python-zope-interface" ,python-zope-interface)))
12356 (home-page "https://github.com/python-attrs/attrs/")
12357 (synopsis "Attributes without boilerplate")
12358 (description "@code{attrs} is a Python package with class decorators that
12359 ease the chores of implementing the most common attribute-related object
12360 protocols.")
12361 (license license:expat)))
12362
12363 (define-public python2-attrs
12364 (package-with-python2 python-attrs))
12365
12366 (define-public python-attrs-bootstrap
12367 (package
12368 (inherit python-attrs)
12369 (name "python-attrs-bootstrap")
12370 (native-inputs `())
12371 (arguments `(#:tests? #f))))
12372
12373 (define-public python2-attrs-bootstrap
12374 (package-with-python2 python-attrs-bootstrap))
12375
12376 (define-public python2-cliapp
12377 (package
12378 (name "python2-cliapp")
12379 (version "1.20180812.1")
12380 (source
12381 (origin
12382 (method url-fetch)
12383 (uri (string-append
12384 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
12385 version ".tar.gz"))
12386 (sha256
12387 (base32
12388 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
12389 (build-system python-build-system)
12390 (arguments
12391 `(#:python ,python-2
12392 #:phases
12393 (modify-phases %standard-phases
12394 ;; check phase needs to be run before the build phase. If not,
12395 ;; coverage-test-runner looks for tests for the built source files,
12396 ;; and fails.
12397 (delete 'check)
12398 (add-before 'build 'check
12399 (lambda _
12400 ;; Disable python3 tests
12401 (substitute* "check"
12402 (("python3") "# python3"))
12403 (invoke "./check"))))))
12404 (native-inputs
12405 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12406 ("python2-pep8" ,python2-pep8)))
12407 (propagated-inputs
12408 `(("python2-pyaml" ,python2-pyaml)))
12409 (home-page "https://liw.fi/cliapp/")
12410 (synopsis "Python framework for command line programs")
12411 (description "@code{python2-cliapp} is a python framework for
12412 command line programs. It contains the typical stuff such programs
12413 need to do, such as parsing the command line for options, and
12414 iterating over input files.")
12415 (license license:gpl2+)))
12416
12417 (define-public python2-ttystatus
12418 (package
12419 (name "python2-ttystatus")
12420 (version "0.36")
12421 (source
12422 (origin
12423 (method url-fetch)
12424 (uri (string-append
12425 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
12426 version ".tar.gz"))
12427 (sha256
12428 (base32
12429 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
12430 (build-system python-build-system)
12431 (native-inputs
12432 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12433 ("python2-pep8" ,python2-pep8)))
12434 (arguments
12435 `(#:python ,python-2
12436 #:phases
12437 (modify-phases %standard-phases
12438 ;; check phase needs to be run before the build phase. If not,
12439 ;; coverage-test-runner looks for tests for the built source files,
12440 ;; and fails.
12441 (delete 'check)
12442 (add-before 'build 'check
12443 (lambda _ (invoke "make" "check"))))))
12444 (home-page "https://liw.fi/ttystatus/")
12445 (synopsis "Python library for showing progress reporting and
12446 status updates on terminals")
12447 (description "@code{python2-ttystatus} is a python library for
12448 showing progress reporting and status updates on terminals, for
12449 command line programs. Output is automatically adapted to the width
12450 of the terminal: truncated if it does not fit, and resized if the
12451 terminal size changes.")
12452 (license license:gpl3+)))
12453
12454 (define-public python2-tracing
12455 (package
12456 (name "python2-tracing")
12457 (version "0.10")
12458 (source
12459 (origin
12460 (method url-fetch)
12461 (uri (string-append
12462 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
12463 version ".tar.gz"))
12464 (sha256
12465 (base32
12466 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
12467 (build-system python-build-system)
12468 (arguments
12469 `(#:python ,python-2))
12470 (home-page "https://liw.fi/tracing/")
12471 (synopsis "Python debug logging helper")
12472 (description "@code{python2-tracing} is a python library for
12473 logging debug messages. It provides a way to turn debugging messages
12474 on and off, based on the filename they occur in. It is much faster
12475 than using @code{logging.Filter} to accomplish the same thing, which
12476 matters when code is run in production mode. The actual logging still
12477 happens using the @code{logging} library.")
12478 (license license:gpl3+)))
12479
12480 (define-public python2-larch
12481 (package
12482 (name "python2-larch")
12483 (version "1.20151025")
12484 (source
12485 (origin
12486 (method url-fetch)
12487 (uri (string-append
12488 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12489 version ".tar.gz"))
12490 (patches (search-patches
12491 "python2-larch-coverage-4.0a6-compatibility.patch"))
12492 (sha256
12493 (base32
12494 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12495 (build-system python-build-system)
12496 (arguments
12497 `(#:python ,python-2
12498 #:phases
12499 (modify-phases %standard-phases
12500 ;; check phase needs to be run before the build phase. If not,
12501 ;; coverage-test-runner looks for tests for the built source files,
12502 ;; and fails.
12503 (delete 'check)
12504 (add-before 'build 'check
12505 (lambda _ (invoke "make" "check"))))))
12506 (native-inputs
12507 `(("cmdtest" ,cmdtest)
12508 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12509 (propagated-inputs
12510 `(("python2-tracing" ,python2-tracing)))
12511 (home-page "https://liw.fi/larch/")
12512 (synopsis "Python copy-on-write B-tree library")
12513 (description "@code{python2-larch} is an implementation of
12514 particular kind of B-tree, based on research by Ohad Rodeh. See
12515 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12516 on the data structure.
12517
12518 The distinctive feature of this B-tree is that a node is never
12519 (conceptually) modified. Instead, all updates are done by
12520 copy-on-write. This makes it easy to clone a tree, and modify only the
12521 clone, while other processes access the original tree.")
12522 (license license:gpl3+)))
12523
12524 (define-public python-astroid
12525 (package
12526 (name "python-astroid")
12527 (version "2.1.0")
12528 (source
12529 (origin
12530 (method url-fetch)
12531 (uri (pypi-uri "astroid" version))
12532 (sha256
12533 (base32
12534 "08hz675knh4294bancdapql392fmbjyimhbyrmfkz1ka7l035c1m"))))
12535 (build-system python-build-system)
12536 (propagated-inputs
12537 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12538 ("python-six" ,python-six)
12539 ("python-wrapt" ,python-wrapt)))
12540 (native-inputs
12541 `(("python-dateutil" ,python-dateutil)
12542 ("python-nose" ,python-nose)
12543 ("python-pytest" ,python-pytest)
12544 ("python-pytest-runner" ,python-pytest-runner)))
12545 (arguments
12546 `(#:phases
12547 (modify-phases %standard-phases
12548 (add-after 'unpack 'remove-spurious-test
12549 (lambda _
12550 ;; This can be removed after upgrading from python-3.7
12551 ;; https://github.com/PyCQA/astroid/issues/593
12552 ;; https://bugs.python.org/issue34056
12553 (delete-file "astroid/tests/unittest_modutils.py")
12554 #t))
12555 (replace 'check
12556 (lambda _
12557 (invoke "pytest" "astroid"))))))
12558 (home-page "https://github.com/PyCQA/astroid")
12559 (synopsis "Common base representation of python source code for pylint and
12560 other projects")
12561 (description "@code{python-astroid} provides a common base representation
12562 of python source code for projects such as pychecker, pyreverse, pylint, etc.
12563
12564 It provides a compatible representation which comes from the _ast module. It
12565 rebuilds the tree generated by the builtin _ast module by recursively walking
12566 down the AST and building an extended ast. The new node classes have
12567 additional methods and attributes for different usages. They include some
12568 support for static inference and local name scopes. Furthermore, astroid
12569 builds partial trees by inspecting living objects.")
12570 (license license:lgpl2.1+)
12571 (properties `((python2-variant . ,(delay python2-astroid))))))
12572
12573 (define-public python2-astroid
12574 (let ((base (package-with-python2
12575 (strip-python2-variant python-astroid))))
12576 (package (inherit base)
12577 ;; Version 2.x removes python2 support.
12578 (version "1.6.5")
12579 (source
12580 (origin
12581 (method url-fetch)
12582 (uri (pypi-uri "astroid" version))
12583 (sha256
12584 (base32
12585 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12586 (arguments
12587 (substitute-keyword-arguments (package-arguments base)
12588 ((#:phases phases)
12589 `(modify-phases ,phases
12590 (add-after 'unpack 'remove-spurious-test
12591 (lambda _
12592 ;; https://github.com/PyCQA/astroid/issues/276
12593 (delete-file "astroid/tests/unittest_brain.py")
12594 #t))
12595 (replace 'check
12596 (lambda _
12597 (invoke"python" "-m" "unittest" "discover"
12598 "-p" "unittest*.py")))))))
12599 (native-inputs `())
12600 (propagated-inputs
12601 `(("python2-backports-functools-lru-cache"
12602 ,python2-backports-functools-lru-cache)
12603 ("python2-enum34" ,python2-enum34)
12604 ("python2-singledispatch" ,python2-singledispatch)
12605 ,@(package-propagated-inputs base))))))
12606
12607 (define-public python-isort
12608 (package
12609 (name "python-isort")
12610 (version "4.3.4")
12611 (source
12612 (origin
12613 (method git-fetch)
12614 (uri (git-reference
12615 ;; Tests pass only from the Github sources
12616 (url "https://github.com/timothycrosley/isort")
12617 (commit version)))
12618 (file-name (git-file-name name version))
12619 (sha256
12620 (base32
12621 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
12622 (build-system python-build-system)
12623 (native-inputs
12624 `(("python-mock" ,python-mock)
12625 ("python-pytest" ,python-pytest)))
12626 (home-page "https://github.com/timothycrosley/isort")
12627 (synopsis "Python utility/library to sort python imports")
12628 (description "@code{python-isort} is a python utility/library to sort
12629 imports alphabetically, and automatically separated into sections. It
12630 provides a command line utility, a python library and plugins for various
12631 editors.")
12632 (license license:expat)
12633 (properties `((python2-variant . ,(delay python2-isort))))))
12634
12635 (define-public python2-isort
12636 (let ((base (package-with-python2
12637 (strip-python2-variant python-isort))))
12638 (package (inherit base)
12639 (native-inputs
12640 `(("python2-futures" ,python2-futures)
12641 ,@(package-native-inputs base))))))
12642
12643 (define-public python2-backports-functools-lru-cache
12644 (package
12645 (name "python2-backports-functools-lru-cache")
12646 (version "1.5")
12647 (source
12648 (origin
12649 (method url-fetch)
12650 ;; only the pypi tarballs contain the necessary metadata
12651 (uri (pypi-uri "backports.functools_lru_cache" version))
12652 (sha256
12653 (base32
12654 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12655 (build-system python-build-system)
12656 (native-inputs
12657 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12658 (arguments
12659 `(#:python ,python-2))
12660 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12661 (synopsis "Backport of functools.lru_cache from Python 3.3")
12662 (description "@code{python2-backports-functools-lru-cache} is a backport
12663 of @code{functools.lru_cache} from python 3.3.")
12664 (license license:expat)))
12665
12666 (define-public python-configparser
12667 (package
12668 (name "python-configparser")
12669 (version "3.7.1")
12670 (source
12671 (origin
12672 (method url-fetch)
12673 (uri (pypi-uri "configparser" version))
12674 (sha256
12675 (base32
12676 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
12677 (build-system python-build-system)
12678 (home-page "https://github.com/jaraco/configparser/")
12679 (synopsis "Backport of configparser from python 3.5")
12680 (description "@code{python-configparser} is a backport of
12681 @code{configparser} from Python 3.5 so that it can be used directly
12682 in other versions.")
12683 (license license:expat)))
12684
12685 (define-public python2-configparser
12686 (package-with-python2 python-configparser))
12687
12688 (define-public python-mando
12689 (package
12690 (name "python-mando")
12691 (version "0.6.4")
12692 (source (origin
12693 (method url-fetch)
12694 (uri (pypi-uri "mando" version))
12695 (sha256
12696 (base32
12697 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12698 (build-system python-build-system)
12699 (propagated-inputs
12700 `(("python-rst2ansi" ,python-rst2ansi)
12701 ("python-six" ,python-six)))
12702 (native-inputs
12703 `(("python-pytest" ,python-pytest)))
12704 (home-page "https://mando.readthedocs.org/")
12705 (synopsis
12706 "Wrapper around argparse, allowing creation of complete CLI applications")
12707 (description
12708 "This package is a wrapper around argparse, allowing you to write complete CLI
12709 applications in seconds while maintaining all the flexibility.")
12710 (license license:expat)))
12711
12712 (define-public python2-mando
12713 (package-with-python2 python-mando))
12714
12715 (define-public python2-argparse
12716 (package
12717 (name "python2-argparse")
12718 (version "1.4.0")
12719 (source
12720 (origin
12721 (method url-fetch)
12722 (uri (pypi-uri "argparse" version))
12723 (sha256
12724 (base32
12725 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12726 (build-system python-build-system)
12727 (arguments
12728 `(#:python ,python-2))
12729 (home-page "https://github.com/ThomasWaldmann/argparse/")
12730 (synopsis "Python command-line parsing library")
12731 (description
12732 "This package is mostly for people who want to have @code{argparse} on
12733 older Pythons because it was not part of the standard library back then.")
12734 (license license:psfl)))
12735
12736 (define-public python-fudge
12737 (package
12738 (name "python-fudge")
12739 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
12740 ;; package, which is currently the only use of this package.
12741 (version "0.9.6")
12742 (source
12743 (origin
12744 (method url-fetch)
12745 (uri (pypi-uri "fudge" version))
12746 (sha256
12747 (base32
12748 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
12749 (build-system python-build-system)
12750 (arguments
12751 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
12752 (home-page "https://github.com/fudge-py/fudge")
12753 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
12754 (description
12755 "Fudge is a Python module for using fake objects (mocks and stubs) to
12756 test real ones.
12757
12758 In readable Python code, you declare the methods available on your fake object
12759 and how they should be called. Then you inject that into your application and
12760 start testing. This declarative approach means you don’t have to record and
12761 playback actions and you don’t have to inspect your fakes after running code.
12762 If the fake object was used incorrectly then you’ll see an informative
12763 exception message with a traceback that points to the culprit.")
12764 (license license:expat)))
12765
12766 (define-public python2-fudge
12767 (package-with-python2 python-fudge))
12768
12769 (define-public python-mwclient
12770 (package
12771 (name "python-mwclient")
12772 (version "0.8.4")
12773 (source
12774 (origin
12775 (method url-fetch)
12776 ;; The PyPI version wouldn't contain tests.
12777 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
12778 "v" version ".tar.gz"))
12779 (file-name (string-append name "-" version ".tar.gz"))
12780 (sha256
12781 (base32
12782 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
12783 (build-system python-build-system)
12784 (propagated-inputs
12785 `(("python-requests" ,python-requests)
12786 ("python-requests-oauthlib"
12787 ,python-requests-oauthlib)
12788 ("python-six" ,python-six)))
12789 (native-inputs
12790 `(("python-mock" ,python-mock)
12791 ("python-pytest" ,python-pytest)
12792 ("python-pytest-pep8" ,python-pytest-pep8)
12793 ("python-pytest-cache" ,python-pytest-cache)
12794 ("python-pytest-cov" ,python-pytest-cov)
12795 ("python-responses" ,python-responses)))
12796 (home-page "https://github.com/btongminh/mwclient")
12797 (synopsis "MediaWiki API client")
12798 (description "This package provides a MediaWiki API client.")
12799 (license license:expat)))
12800
12801 (define-public python2-mwclient
12802 (package-with-python2 python-mwclient))
12803
12804 (define-public python-utils
12805 (package
12806 (name "python-utils")
12807 (version "2.1.0")
12808 (source (origin
12809 (method url-fetch)
12810 (uri (pypi-uri "python-utils" version))
12811 (sha256
12812 (base32
12813 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
12814 (build-system python-build-system)
12815 (native-inputs
12816 `(("pytest-runner" ,python-pytest-runner)
12817 ("pytest" ,python-pytest)
12818 ("six" ,python-six)))
12819 (home-page "https://github.com/WoLpH/python-utils")
12820 (synopsis "Convenient utilities not included with the standard Python install")
12821 (description
12822 "Python Utils is a collection of small Python functions and classes which
12823 make common patterns shorter and easier.")
12824 (license license:bsd-2)))
12825
12826 (define-public python2-utils
12827 (package-with-python2 python-utils))
12828
12829 (define-public python-diff-match-patch
12830 (package
12831 (name "python-diff-match-patch")
12832 (version "20121119")
12833 (source
12834 (origin
12835 (method url-fetch)
12836 (uri (pypi-uri "diff-match-patch" version))
12837 (sha256
12838 (base32
12839 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
12840 (build-system python-build-system)
12841 (home-page "https://code.google.com/p/google-diff-match-patch")
12842 (synopsis "Synchronize plain text")
12843 (description "Diff Match and Patch libraries offer robust algorithms to
12844 perform the operations required for synchronizing plain text.")
12845 (license license:asl2.0)))
12846
12847 (define-public python2-diff-match-patch
12848 (package-with-python2 python-diff-match-patch))
12849
12850 (define-public python-dirsync
12851 (package
12852 (name "python-dirsync")
12853 (version "2.2.3")
12854 (source
12855 (origin
12856 (method url-fetch)
12857 (uri (pypi-uri "dirsync" version))
12858 (sha256
12859 (base32
12860 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
12861 (build-system python-build-system)
12862 (propagated-inputs
12863 `(("six" ,python-six)))
12864 (home-page "https://bitbucket.org/tkhyn/dirsync")
12865 (synopsis "Advanced directory tree synchronisation tool")
12866 (description "Advanced directory tree synchronisation tool.")
12867 (license license:expat)))
12868
12869 (define-public python2-dirsync
12870 (package-with-python2 python-dirsync))
12871
12872 (define-public python-levenshtein
12873 (package
12874 (name "python-levenshtein")
12875 (version "0.12.0")
12876 (source
12877 (origin
12878 (method url-fetch)
12879 (uri (pypi-uri "python-Levenshtein" version))
12880 (sha256
12881 (base32
12882 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
12883 (build-system python-build-system)
12884 (home-page "https://github.com/ztane/python-Levenshtein")
12885 (synopsis "Fast computation of Levenshtein distance and string similarity")
12886 (description
12887 "The Levenshtein Python C extension module contains functions for fast computation of
12888 @enumerate
12889 @item Levenshtein (edit) distance, and edit operations
12890 @item string similarity
12891 @item approximate median strings, and generally string averaging
12892 @item string sequence and set similarity
12893 @end enumerate
12894 It supports both normal and Unicode strings.")
12895 (license license:gpl2+)))
12896
12897 (define-public python2-levenshtein
12898 (package-with-python2 python-levenshtein))
12899
12900 (define-public python-scandir
12901 (package
12902 (name "python-scandir")
12903 (version "1.9.0")
12904 (source
12905 (origin
12906 (method url-fetch)
12907 (uri (pypi-uri "scandir" version))
12908 (sha256
12909 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
12910 (build-system python-build-system)
12911 (arguments
12912 `(#:phases (modify-phases %standard-phases
12913 (replace 'check
12914 (lambda _
12915 (invoke "python" "test/run_tests.py"))))))
12916 (home-page "https://github.com/benhoyt/scandir")
12917 (synopsis "Directory iteration function")
12918 (description
12919 "Directory iteration function like os.listdir(), except that instead of
12920 returning a list of bare filenames, it yields DirEntry objects that include
12921 file type and stat information along with the name. Using scandir() increases
12922 the speed of os.walk() by 2-20 times (depending on the platform and file
12923 system) by avoiding unnecessary calls to os.stat() in most cases.
12924
12925 This package is part of the Python standard library since version 3.5.")
12926 (license license:bsd-3)))
12927
12928 (define-public python2-scandir
12929 (package-with-python2 python-scandir))
12930
12931 (define-public python2-stemming
12932 (package
12933 (name "python2-stemming")
12934 (version "1.0.1")
12935 (source
12936 (origin
12937 (method url-fetch)
12938 (uri (pypi-uri "stemming" version))
12939 (sha256
12940 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
12941 (build-system python-build-system)
12942 (arguments
12943 `(#:python ,python-2))
12944 (home-page "https://bitbucket.org/mchaput/stemming/overview")
12945 (synopsis "Python implementations of various stemming algorithms")
12946 (description
12947 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
12948 stemming algorithms for English. These implementations are straightforward and
12949 efficient, unlike some Python versions of the same algorithms available on the
12950 Web. This package is an extraction of the stemming code included in the Whoosh
12951 search engine.")
12952 (license license:public-domain)))
12953
12954 (define-public python-factory-boy
12955 (package
12956 (name "python-factory-boy")
12957 (version "2.8.1")
12958 (source
12959 (origin
12960 (method url-fetch)
12961 (uri (pypi-uri "factory_boy" version))
12962 (sha256
12963 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
12964 (build-system python-build-system)
12965 (arguments
12966 ;; Tests are not included in the tarball.
12967 `(#:tests? #f))
12968 (propagated-inputs
12969 `(("faker" ,python-faker)))
12970 (home-page "https://github.com/benhoyt/scandir")
12971 (synopsis "Versatile test fixtures replacement")
12972 (description
12973 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
12974
12975 As a fixtures replacement tool, it aims to replace static, hard to maintain
12976 fixtures with easy-to-use factories for complex object.
12977
12978 Instead of building an exhaustive test setup with every possible combination
12979 of corner cases, factory_boy allows you to use objects customized for the
12980 current test, while only declaring the test-specific fields")
12981 (license license:expat)))
12982
12983 (define-public python2-factory-boy
12984 (package-with-python2 python-factory-boy))
12985
12986 (define-public python-translate-toolkit
12987 (package
12988 (name "python-translate-toolkit")
12989 (version "2.1.0")
12990 (source
12991 (origin
12992 (method url-fetch)
12993 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
12994 (sha256
12995 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
12996 (build-system python-build-system)
12997 (native-inputs
12998 `(("python-pytest" ,python-pytest)
12999 ("python-sphinx" ,python-sphinx)))
13000 (propagated-inputs
13001 `(("python-babel" ,python-babel)
13002 ("python-beautifulsoup4" ,python-beautifulsoup4)
13003 ("python-chardet" ,python-chardet)
13004 ("python-diff-match-patch" ,python-diff-match-patch)
13005 ("python-levenshtein" ,python-levenshtein)
13006 ("python-lxml" ,python-lxml)
13007 ("python-six" ,python-six)
13008 ("python-vobject" ,python-vobject)
13009 ("python-pyyaml" ,python-pyyaml)))
13010 (arguments
13011 ;; TODO: tests are not run, because they end with
13012 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
13013 ;; 'parse_funcs'
13014 ;; during test setup.
13015 `(#:tests? #f))
13016 (home-page "https://toolkit.translatehouse.org")
13017 (synopsis "Tools and API for translation and localization engineering")
13018 (description
13019 "Tools and API for translation and localization engineering. It contains
13020 several utilities, as well as an API for building localization tools.")
13021 (license license:gpl2+)))
13022
13023 (define-public python2-translate-toolkit
13024 (package-with-python2 python-translate-toolkit))
13025
13026 (define-public python-packaging
13027 (package
13028 (name "python-packaging")
13029 (version "19.2")
13030 (source
13031 (origin
13032 (method url-fetch)
13033 (uri (pypi-uri "packaging" version))
13034 (sha256
13035 (base32
13036 "0izwlz9h0bw171a1chr311g2y7n657zjaf4mq4rgm8pp9lbj9f98"))))
13037 (build-system python-build-system)
13038 (arguments
13039 `(#:phases (modify-phases %standard-phases
13040 (replace 'check
13041 (lambda _ (invoke "py.test" "-vv"))))))
13042 (native-inputs
13043 `(("python-pretend" ,python-pretend)
13044 ("python-pytest" ,python-pytest)))
13045 (propagated-inputs
13046 `(("python-pyparsing" ,python-pyparsing)
13047 ("python-six" ,python-six)))
13048 (home-page "https://github.com/pypa/packaging")
13049 (synopsis "Core utilities for Python packages")
13050 (description "Packaging is a Python module for dealing with Python packages.
13051 It offers an interface for working with package versions, names, and dependency
13052 information.")
13053 ;; From 'LICENSE': This software is made available under the terms of
13054 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
13055 ;; Contributions to this software is made under the terms of *both* these
13056 ;; licenses.
13057 (license (list license:asl2.0 license:bsd-2))))
13058
13059 (define-public python2-packaging
13060 (package-with-python2 python-packaging))
13061
13062 (define-public python-relatorio
13063 (package
13064 (name "python-relatorio")
13065 (version "0.8.0")
13066 (source
13067 (origin
13068 (method url-fetch)
13069 (uri (pypi-uri "relatorio" version))
13070 (sha256
13071 (base32
13072 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
13073 (build-system python-build-system)
13074 (propagated-inputs
13075 `(("python-lxml" ,python-lxml)
13076 ("python-genshi" ,python-genshi)))
13077 (native-inputs
13078 `(("python-magic" ,python-magic)))
13079 (home-page "https://relatorio.tryton.org/")
13080 (synopsis "Templating library able to output ODT and PDF files")
13081 (description "Relatorio is a templating library which provides a way to
13082 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
13083 for more filetypes can be easily added by creating plugins for them.")
13084 (license license:gpl3+)))
13085
13086 (define-public python2-relatorio
13087 (package-with-python2 python-relatorio))
13088
13089 (define-public python-radon
13090 (package
13091 (name "python-radon")
13092 (version "2.2.0")
13093 (source
13094 (origin
13095 (method url-fetch)
13096 (uri (pypi-uri "radon" version))
13097 (sha256
13098 (base32
13099 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
13100 (build-system python-build-system)
13101 (arguments
13102 `(#:phases (modify-phases %standard-phases
13103 (replace 'check
13104 (lambda _
13105 (invoke "python" "radon/tests/run.py"))))))
13106 (propagated-inputs
13107 `(("python-colorama" ,python-colorama)
13108 ("python-flake8-polyfill" ,python-flake8-polyfill)
13109 ("python-mando" ,python-mando)))
13110 (native-inputs
13111 `(("python-pytest" ,python-pytest)
13112 ("python-pytest-mock" ,python-pytest-mock)))
13113 (home-page "https://radon.readthedocs.org/")
13114 (synopsis "Code Metrics in Python")
13115 (description "Radon is a Python tool which computes various code metrics.
13116 Supported metrics are:
13117 @itemize @bullet
13118 @item raw metrics: SLOC, comment lines, blank lines, &c.
13119 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
13120 @item Halstead metrics (all of them)
13121 @item the Maintainability Index (a Visual Studio metric)
13122 @end itemize")
13123 (license license:expat)))
13124
13125 (define-public python2-radon
13126 (package-with-python2 python-radon))
13127
13128 (define-public python-sure
13129 (package
13130 (name "python-sure")
13131 (version "1.4.11")
13132 (source
13133 (origin
13134 (method url-fetch)
13135 (uri (pypi-uri "sure" version))
13136 (sha256
13137 (base32
13138 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
13139 (build-system python-build-system)
13140 (propagated-inputs
13141 `(("python-mock" ,python-mock)
13142 ("python-six" ,python-six)))
13143 (native-inputs
13144 `(("python-nose" ,python-nose)))
13145 (home-page "https://github.com/gabrielfalcao/sure")
13146 (synopsis "Automated testing library in python for python")
13147 (description
13148 "Sure is a python library that leverages a DSL for writing assertions.
13149 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
13150 (license license:gpl3+)))
13151
13152 (define-public python2-sure
13153 (package-with-python2 python-sure))
13154
13155 (define-public python2-couleur
13156 ;; This package does not seem to support python3 at all, hence,
13157 ;; only the python2 variant definition is provided.
13158 (package
13159 (name "python2-couleur")
13160 (version "0.6.2")
13161 (source
13162 (origin
13163 (method url-fetch)
13164 (uri (pypi-uri "couleur" version))
13165 (sha256
13166 (base32
13167 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
13168 (build-system python-build-system)
13169 (arguments
13170 `(#:python ,python-2))
13171 (home-page "https://github.com/gabrielfalcao/couleur")
13172 (synopsis
13173 "ANSI terminal tool for python, colored shell and other handy fancy features")
13174 (description
13175 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
13176 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
13177 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
13178 ;; https://github.com/gabrielfalcao/couleur/issues/11
13179 (license license:lgpl3+)))
13180
13181 (define-public python-misaka
13182 (package
13183 (name "python-misaka")
13184 (version "2.1.1")
13185 (source
13186 (origin
13187 (method url-fetch)
13188 (uri (pypi-uri "misaka" version))
13189 (sha256
13190 (base32
13191 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
13192 (build-system python-build-system)
13193 (arguments
13194 `(;; Line 37 of setup.py calls self.run_command('develop')
13195 ;; in the 'check' phase. This command seems to be trying
13196 ;; to write to
13197 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
13198 ;; for which it does not have the permission to write.
13199 #:tests? #f))
13200 (propagated-inputs
13201 `(("python-cffi" ,python-cffi)))
13202 (home-page "https://github.com/FSX/misaka")
13203 (synopsis "Python binding for Hoedown")
13204 (description
13205 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
13206 library written in C. It features a fast HTML renderer and functionality to make custom
13207 renderers (e.g. man pages or LaTeX).")
13208 (license license:expat)))
13209
13210 (define-public python2-misaka
13211 (package-with-python2 python-misaka))
13212
13213 (define-public python2-steadymark
13214 ;; This is forced into being a python2 only variant
13215 ;; due to its dependence on couleur that has no support
13216 ;; for python3
13217 (package
13218 (name "python2-steadymark")
13219 (version "0.7.3")
13220 (source
13221 (origin
13222 (method url-fetch)
13223 (uri (pypi-uri "steadymark" version))
13224 (sha256
13225 (base32
13226 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
13227 (build-system python-build-system)
13228 (native-inputs
13229 `(("python-couleur" ,python2-couleur)
13230 ("python-sure" ,python2-sure)
13231 ("python-misaka" ,python2-misaka)))
13232 (arguments
13233 `(#:python ,python-2
13234 #:phases
13235 (modify-phases %standard-phases
13236 (add-before 'build 'patch-setup-py
13237 (lambda _
13238 ;; Update requirements from dependency==version
13239 ;; to dependency>=version
13240 (substitute* "setup.py"
13241 (("==") ">="))
13242 #t)))))
13243 (home-page "https://github.com/gabrielfalcao/steadymark")
13244 (synopsis "Markdown-based test runner for python")
13245 (description
13246 "@code{Steadymark} allows documentation to be written in github-flavoured
13247 markdown. The documentation may contain snippets of code surrounded by python
13248 code blocks and @code{Steadymark} will find these snippets and run them, making
13249 sure that there are no old malfunctional examples in the documentation examples.")
13250 (license license:expat)))
13251
13252 (define-public python-jsonpointer
13253 (package
13254 (name "python-jsonpointer")
13255 (version "1.10")
13256 (source
13257 (origin
13258 (method url-fetch)
13259 (uri (pypi-uri "jsonpointer" version))
13260 (sha256
13261 (base32
13262 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
13263 (build-system python-build-system)
13264 (home-page "https://github.com/stefankoegl/python-json-pointer")
13265 (synopsis "Identify specific nodes in a JSON document")
13266 (description "@code{jsonpointer} allows you to access specific nodes
13267 by path in a JSON document (see RFC 6901).")
13268 (license license:bsd-3)))
13269
13270 (define-public python2-jsonpointer
13271 (package-with-python2 python-jsonpointer))
13272
13273 (define-public python-jsonpatch
13274 (package
13275 (name "python-jsonpatch")
13276 (version "1.16")
13277 (source
13278 (origin
13279 (method url-fetch)
13280 ;; pypi version lacks tests.js
13281 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
13282 "archive/v" version ".tar.gz"))
13283 (file-name (string-append name "-" version ".tar.gz"))
13284 (sha256
13285 (base32
13286 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
13287 (build-system python-build-system)
13288 (native-inputs
13289 `(("python-jsonpointer" ,python-jsonpointer)))
13290 (home-page "https://github.com/stefankoegl/python-json-patch")
13291 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
13292 (description "@code{jsonpatch} is a library and program that allows
13293 applying JSON Patches according to RFC 6902.")
13294 (license license:bsd-3)))
13295
13296 (define-public python2-jsonpatch
13297 (package-with-python2 python-jsonpatch))
13298
13299 (define-public python-jsonpatch-0.4
13300 (package (inherit python-jsonpatch)
13301 (name "python-jsonpatch")
13302 (version "0.4")
13303 (source
13304 (origin
13305 (method url-fetch)
13306 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
13307 "archive/v" version ".tar.gz"))
13308 (file-name (string-append name "-" version ".tar.gz"))
13309 (sha256
13310 (base32
13311 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
13312
13313 (define-public python2-jsonpatch-0.4
13314 (package-with-python2 python-jsonpatch-0.4))
13315
13316 (define-public python-rfc3986
13317 (package
13318 (name "python-rfc3986")
13319 (version "1.1.0")
13320 (source (origin
13321 (method url-fetch)
13322 (uri (pypi-uri "rfc3986" version))
13323 (sha256
13324 (base32
13325 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
13326 (build-system python-build-system)
13327 (arguments
13328 `(#:modules ((guix build utils)
13329 (guix build python-build-system)
13330 (ice-9 ftw)
13331 (srfi srfi-1)
13332 (srfi srfi-26))
13333 #:phases
13334 (modify-phases %standard-phases
13335 (replace 'check
13336 (lambda _
13337 (let ((cwd (getcwd)))
13338 (setenv "PYTHONPATH"
13339 (string-append cwd "/build/"
13340 (find (cut string-prefix? "lib" <>)
13341 (scandir (string-append cwd "/build")))
13342 ":"
13343 (getenv "PYTHONPATH")))
13344 (invoke "pytest" "-v")))))))
13345 (native-inputs
13346 `(("python-pytest" ,python-pytest)))
13347 (home-page "https://rfc3986.readthedocs.io/")
13348 (synopsis "Parse and validate URI references")
13349 (description
13350 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
13351 validation and authority parsing. This module also supports RFC@tie{}6874
13352 which adds support for zone identifiers to IPv6 addresses.")
13353 (license license:asl2.0)))
13354
13355 (define-public python2-rfc3986
13356 (package-with-python2 python-rfc3986))
13357
13358 (define-public python-rfc3987
13359 (package
13360 (name "python-rfc3987")
13361 (version "1.3.7")
13362 (source
13363 (origin
13364 (method url-fetch)
13365 (uri (pypi-uri "rfc3987" version))
13366 (sha256
13367 (base32
13368 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
13369 (build-system python-build-system)
13370 (home-page "https://pypi.python.org/pypi/rfc3987")
13371 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
13372 (description "@code{rfc3987} provides routines for parsing and
13373 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
13374 (license license:gpl3+)))
13375
13376 (define-public python2-rfc3987
13377 (package-with-python2 python-rfc3987))
13378
13379 (define-public python-validate-email
13380 (package
13381 (name "python-validate-email")
13382 (version "1.3")
13383 (source
13384 (origin
13385 (method url-fetch)
13386 (uri (pypi-uri "validate_email" version))
13387 (sha256
13388 (base32
13389 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
13390 (build-system python-build-system)
13391 (home-page "https://github.com/syrusakbary/validate_email")
13392 (synopsis "Verifies if an email address is valid and really exists")
13393 (description "@code{validate_email} can be used to verify if an email
13394 address is valid and really exists.")
13395 (license license:lgpl3+)))
13396
13397 (define-public python2-validate-email
13398 (package-with-python2 python-validate-email))
13399
13400 (define-public python-flex
13401 (package
13402 (name "python-flex")
13403 (version "6.10.0")
13404 (source
13405 (origin
13406 (method url-fetch)
13407 (uri (pypi-uri "flex" version))
13408 (sha256
13409 (base32
13410 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
13411 (build-system python-build-system)
13412 (propagated-inputs
13413 `(("python-click" ,python-click)
13414 ("python-iso8601" ,python-iso8601)
13415 ("python-jsonpointer" ,python-jsonpointer)
13416 ("python-pyyaml" ,python-pyyaml)
13417 ("python-requests" ,python-requests)
13418 ("python-rfc3987" ,python-rfc3987)
13419 ("python-six" ,python-six)
13420 ("python-validate-email" ,python-validate-email)))
13421 (home-page "https://github.com/pipermerriam/flex")
13422 (synopsis "Validates Swagger schemata")
13423 (description "@code{flex} can be used to validate Swagger schemata.")
13424 (license license:bsd-3)))
13425
13426 (define-public python2-flex
13427 (package-with-python2 python-flex))
13428
13429 (define-public python-marshmallow
13430 (package
13431 (name "python-marshmallow")
13432 (version "3.0.0b14")
13433 (source
13434 (origin
13435 (method url-fetch)
13436 (uri (pypi-uri "marshmallow" version))
13437 (sha256
13438 (base32
13439 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
13440 (build-system python-build-system)
13441 (propagated-inputs
13442 `(("python-dateutil" ,python-dateutil)
13443 ("python-simplejson" ,python-simplejson)))
13444 (native-inputs
13445 `(("python-pytest" ,python-pytest)
13446 ("python-pytz" ,python-pytz)))
13447 (home-page "https://github.com/marshmallow-code/marshmallow")
13448 (synopsis "Convert complex datatypes to and from native
13449 Python datatypes.")
13450 (description "@code{marshmallow} provides a library for converting
13451 complex datatypes to and from native Python datatypes.")
13452 (license license:expat)))
13453
13454 (define-public python2-marshmallow
13455 (package-with-python2 python-marshmallow))
13456
13457 (define-public python-apispec
13458 (package
13459 (name "python-apispec")
13460 (version "0.25.3")
13461 (source
13462 (origin
13463 (method url-fetch)
13464 (uri (pypi-uri "apispec" version))
13465 (sha256
13466 (base32
13467 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
13468 (build-system python-build-system)
13469 (propagated-inputs
13470 `(("python-pyyaml" ,python-pyyaml)))
13471 (native-inputs
13472 `(("python-pytest" ,python-pytest)
13473 ("python-flask" ,python-flask)
13474 ("python-marshmallow" ,python-marshmallow)
13475 ("python-tornado" ,python-tornado)
13476 ("python-bottle" ,python-bottle)
13477 ("python-mock" ,python-mock)))
13478 (home-page "https://github.com/marshmallow-code/apispec")
13479 (synopsis "Swagger 2.0 API specification generator")
13480 (description "@code{python-apispec} is a pluggable API specification
13481 generator. Currently supports the OpenAPI specification (f.k.a.
13482 Swagger 2.0).")
13483 (license license:expat)))
13484
13485 (define-public python2-apispec
13486 (package-with-python2 python-apispec))
13487
13488 (define-public python-flasgger
13489 (package
13490 (name "python-flasgger")
13491 (version "0.6.3")
13492 (source
13493 (origin
13494 (method git-fetch)
13495 (uri (git-reference
13496 (url "https://github.com/rochacbruno/flasgger.git")
13497 (commit version)))
13498 (file-name (git-file-name name version))
13499 (sha256
13500 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
13501 (build-system python-build-system)
13502 (arguments
13503 `(#:phases
13504 (modify-phases %standard-phases
13505 (replace 'check
13506 (lambda* (#:key inputs outputs #:allow-other-keys)
13507 (substitute* "Makefile"
13508 (("flake8 flasgger --ignore=F403")
13509 "flake8 flasgger --ignore=E731,F403"))
13510 (setenv "PYTHONPATH" (string-append (getcwd)
13511 ":"
13512 (getenv "PYTHONPATH")))
13513 (invoke "py.test"))))))
13514 (propagated-inputs
13515 `(("python-flask" ,python-flask)
13516 ("python-pyyaml" ,python-pyyaml)
13517 ("python-jsonschema" ,python-jsonschema)
13518 ("python-mistune" ,python-mistune)
13519 ("python-six" ,python-six)))
13520 (native-inputs
13521 `(("python-decorator" ,python-decorator)
13522 ("python-flake8" ,python-flake8)
13523 ("python-flask-restful" ,python-flask-restful)
13524 ("python-flex" ,python-flex)
13525 ("python-pytest" ,python-pytest)
13526 ("python-pytest-cov" ,python-pytest-cov)
13527 ("python-marshmallow" ,python-marshmallow)
13528 ("python-apispec" ,python-apispec)))
13529 (home-page "https://github.com/rochacbruno/flasgger/")
13530 (synopsis "Extract Swagger specs from your Flask project")
13531 (description "@code{python-flasgger} allows extracting Swagger specs
13532 from your Flask project. It is a fork of Flask-Swagger.")
13533 (license license:expat)))
13534
13535 (define-public python2-flasgger
13536 (package-with-python2 python-flasgger))
13537
13538 (define-public python-swagger-spec-validator
13539 (package
13540 (name "python-swagger-spec-validator")
13541 (version "2.4.3")
13542 (source
13543 (origin
13544 (method url-fetch)
13545 (uri (pypi-uri "swagger-spec-validator" version))
13546 (sha256
13547 (base32
13548 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
13549 (build-system python-build-system)
13550 (propagated-inputs
13551 `(("python-jsonschema" ,python-jsonschema)
13552 ("python-pyyaml" ,python-pyyaml)
13553 ("python-six" ,python-six)))
13554 (home-page
13555 "https://github.com/Yelp/swagger_spec_validator")
13556 (synopsis "Validation of Swagger specifications")
13557 (description "@code{swagger_spec_validator} provides a library for
13558 validating Swagger API specifications.")
13559 (license license:asl2.0)))
13560
13561 (define-public python2-swagger-spec-validator
13562 (package-with-python2 python-swagger-spec-validator))
13563
13564 (define-public python-apache-libcloud
13565 (package
13566 (name "python-apache-libcloud")
13567 (version "2.4.0")
13568 (source
13569 (origin
13570 (method url-fetch)
13571 (uri (pypi-uri "apache-libcloud" version))
13572 (sha256
13573 (base32
13574 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13575 (build-system python-build-system)
13576 (arguments
13577 `(#:phases
13578 (modify-phases %standard-phases
13579 (add-after 'unpack 'patch-ssh
13580 (lambda* (#:key inputs #:allow-other-keys)
13581 (substitute* "libcloud/compute/ssh.py"
13582 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13583 "/bin/ssh" "'")))
13584 #t))
13585 (add-after 'unpack 'patch-tests
13586 (lambda _
13587 (substitute* "./libcloud/test/test_file_fixtures.py"
13588 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13589 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13590 return (httplib.OK,
13591 \"1234abcd\",
13592 {\"test\": \"value\"},
13593 httplib.responses[httplib.OK])
13594 def _ascii"))
13595 (substitute* "libcloud/test/compute/test_ssh_client.py"
13596 (("class ShellOutSSHClientTests")
13597 "@unittest.skip(\"Guix container doesn't have ssh service\")
13598 class ShellOutSSHClientTests")
13599 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13600 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13601 (("'.xF0', '.x90', '.x8D', '.x88'")
13602 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13603 #t))
13604 (add-before 'check 'copy-secret
13605 (lambda _
13606 (copy-file "libcloud/test/secrets.py-dist"
13607 "libcloud/test/secrets.py")
13608 #t)))))
13609 (inputs
13610 `(("openssh" ,openssh)))
13611 (propagated-inputs
13612 `(("python-paramiko" ,python-paramiko)
13613 ("python-requests" ,python-requests)))
13614 (native-inputs
13615 `(("python-lockfile" ,python-lockfile)
13616 ("python-mock" ,python-mock)
13617 ("python-pytest" ,python-pytest)
13618 ("python-pytest-runner" ,python-pytest-runner)
13619 ("python-requests-mock" ,python-requests-mock)))
13620 (home-page "https://libcloud.apache.org/")
13621 (synopsis "Unified Cloud API")
13622 (description "@code{libcloud} is a Python library for interacting with
13623 many of the popular cloud service providers using a unified API.")
13624 (license license:asl2.0)))
13625
13626 (define-public python2-apache-libcloud
13627 (package-with-python2 python-apache-libcloud))
13628
13629 (define-public python-smmap2
13630 (package
13631 (name "python-smmap2")
13632 (version "2.0.3")
13633 (source
13634 (origin
13635 (method url-fetch)
13636 (uri (pypi-uri "smmap2" version))
13637 (sha256
13638 (base32
13639 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
13640 (build-system python-build-system)
13641 (native-inputs
13642 `(("python-nosexcover" ,python-nosexcover)))
13643 (home-page "https://github.com/Byron/smmap")
13644 (synopsis "Python sliding window memory map manager")
13645 (description "@code{smmap2} is a pure Python implementation of a sliding
13646 window memory map manager.")
13647 (license license:bsd-3)))
13648
13649 (define-public python2-smmap2
13650 (package-with-python2 python-smmap2))
13651
13652 (define-public python-regex
13653 (package
13654 (name "python-regex")
13655 (version "2019.04.14")
13656 (source (origin
13657 (method url-fetch)
13658 (uri (pypi-uri "regex" version))
13659 (sha256
13660 (base32
13661 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
13662 ;; TODO: Fix and enable regex_test.py tests that complain about the
13663 ;; test.support module not existing.
13664 (build-system python-build-system)
13665 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13666 (synopsis "Alternative regular expression module")
13667 (description "This regular expression implementation is backwards-
13668 compatible with the standard @code{re} module, but offers additional
13669 functionality like full case-folding for case-insensitive matches in Unicode.")
13670 (license license:psfl)))
13671
13672 (define-public python2-regex
13673 (package-with-python2 python-regex))
13674
13675 (define-public python2-pyopengl
13676 (package
13677 (name "python2-pyopengl")
13678 (version "3.1.0")
13679 (source
13680 (origin
13681 (method url-fetch)
13682 (uri (pypi-uri "PyOpenGL" version))
13683 (sha256
13684 (base32
13685 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13686 (arguments
13687 `(#:python ,python-2))
13688 (build-system python-build-system)
13689 (home-page "http://pyopengl.sourceforge.net")
13690 (synopsis "Standard OpenGL bindings for Python")
13691 (description
13692 "PyOpenGL is the most common cross platform Python binding to OpenGL and
13693 related APIs. The binding is created using the standard @code{ctypes}
13694 library.")
13695 (license license:bsd-3)))
13696
13697 (define-public python2-pyopengl-accelerate
13698 (package
13699 (inherit python2-pyopengl)
13700 (name "python2-pyopengl-accelerate")
13701 (version "3.1.0")
13702 (source
13703 (origin
13704 (method url-fetch)
13705 (uri (pypi-uri "PyOpenGL-accelerate" version))
13706 (sha256
13707 (base32
13708 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
13709 (synopsis "Acceleration code for PyOpenGL")
13710 (description
13711 "This is the Cython-coded accelerator module for PyOpenGL.")))
13712
13713 (define-public python-rencode
13714 (package
13715 (name "python-rencode")
13716 (version "1.0.5")
13717 (source
13718 (origin
13719 (method url-fetch)
13720 (uri (pypi-uri "rencode" version))
13721 (sha256
13722 (base32
13723 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
13724 (build-system python-build-system)
13725 (arguments
13726 `(#:phases
13727 (modify-phases %standard-phases
13728 (add-before 'check 'delete-bogus-test
13729 ;; This test requires /home/aresch/Downloads, which is not provided by
13730 ;; the build environment.
13731 (lambda _
13732 (delete-file "rencode/t.py")
13733 #t)))))
13734 (native-inputs `(("pkg-config" ,pkg-config)
13735 ("python-cython" ,python-cython)))
13736 (home-page "https://github.com/aresch/rencode")
13737 (synopsis "Serialization of heterogeneous data structures")
13738 (description
13739 "The @code{rencode} module is a data structure serialization library,
13740 similar to @code{bencode} from the BitTorrent project. For complex,
13741 heterogeneous data structures with many small elements, r-encoding stake up
13742 significantly less space than b-encodings. This version of rencode is a
13743 complete rewrite in Cython to attempt to increase the performance over the
13744 pure Python module.")
13745 (license license:bsd-3)))
13746
13747 (define-public python2-rencode
13748 (package-with-python2 python-rencode))
13749
13750 (define-public python-xenon
13751 (package
13752 (name "python-xenon")
13753 (version "0.5.4")
13754 (source
13755 (origin
13756 (method url-fetch)
13757 (uri (pypi-uri "xenon" version))
13758 (sha256
13759 (base32
13760 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
13761 (build-system python-build-system)
13762 (native-inputs
13763 `(("python-pyyaml" ,python-pyyaml)
13764 ("python-radon" ,python-radon)
13765 ("python-requests" ,python-requests)
13766 ("python-flake8" ,python-flake8)
13767 ("python-tox" ,python-tox)))
13768 (arguments
13769 `(#:phases
13770 (modify-phases %standard-phases
13771 (add-before 'build 'patch-test-requirements
13772 (lambda _
13773 ;; Remove httpretty dependency for tests.
13774 (substitute* "setup.py"
13775 (("httpretty") ""))
13776 #t)))))
13777 (home-page "https://xenon.readthedocs.org/")
13778 (synopsis "Monitor code metrics for Python on your CI server")
13779 (description
13780 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
13781 Ideally, @code{xenon} is run every time code is committed. Through command
13782 line options, various thresholds can be set for the complexity of code. It
13783 will fail (i.e. it will exit with a non-zero exit code) when any of these
13784 requirements is not met.")
13785 (license license:expat)))
13786
13787 (define-public python2-xenon
13788 (package-with-python2 python-xenon))
13789
13790 (define-public python-pysocks
13791 (package
13792 (name "python-pysocks")
13793 (version "1.7.0")
13794 (source
13795 (origin
13796 (method url-fetch)
13797 (uri (pypi-uri "PySocks" version))
13798 (sha256
13799 (base32
13800 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
13801 (build-system python-build-system)
13802 (arguments `(#:tests? #f))
13803 (home-page "https://github.com/Anorov/PySocks")
13804 (synopsis "SOCKS client module")
13805 (description "@code{pysocks} is an updated and semi-actively maintained
13806 version of @code{SocksiPy} with bug fixes and extra features.")
13807 (license license:bsd-3)))
13808
13809 (define-public python2-pysocks
13810 (package-with-python2 python-pysocks))
13811
13812 (define-public python-pydiff
13813 (package
13814 (name "python-pydiff")
13815 (version "0.2")
13816 (source
13817 (origin
13818 (method url-fetch)
13819 (uri (pypi-uri "pydiff" version))
13820 (sha256
13821 (base32
13822 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
13823 (build-system python-build-system)
13824 (home-page "https://github.com/myint/pydiff")
13825 (synopsis "Library to diff two Python files at the bytecode level")
13826 (description
13827 "@code{pydiff} makes it easy to look for actual code changes while
13828 ignoring formatting changes.")
13829 (license license:expat)))
13830
13831 (define-public python2-pydiff
13832 (package-with-python2 python-pydiff))
13833
13834 (define-public python-tqdm
13835 (package
13836 (name "python-tqdm")
13837 (version "4.19.6")
13838 (source
13839 (origin
13840 (method url-fetch)
13841 (uri (pypi-uri "tqdm" version))
13842 (sha256
13843 (base32
13844 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
13845 (build-system python-build-system)
13846 (native-inputs
13847 `(("python-flake8" ,python-flake8)
13848 ("python-nose" ,python-nose)
13849 ("python-coverage" ,python-coverage)))
13850 (home-page "https://github.com/tqdm/tqdm")
13851 (synopsis "Fast, extensible progress meter")
13852 (description
13853 "Make loops show a progress bar on the console by just wrapping any
13854 iterable with @code{|tqdm(iterable)|}. Offers many options to define
13855 design and layout.")
13856 (license (list license:mpl2.0 license:expat))
13857 (properties `((python2-variant . ,(delay python2-tqdm))))))
13858
13859 (define-public python2-tqdm
13860 (let ((tqdm (package-with-python2
13861 (strip-python2-variant python-tqdm))))
13862 (package (inherit tqdm)
13863 (native-inputs `(("python2-functools32" ,python2-functools32)
13864 ,@(package-native-inputs tqdm))))))
13865
13866 (define-public python-pkginfo
13867 (package
13868 (name "python-pkginfo")
13869 (version "1.4.2")
13870 (source
13871 (origin
13872 (method url-fetch)
13873 (uri (pypi-uri "pkginfo" version))
13874 (sha256
13875 (base32
13876 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
13877 (build-system python-build-system)
13878 (arguments
13879 ;; The tests are broken upstream.
13880 '(#:tests? #f))
13881 (home-page
13882 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
13883 (synopsis
13884 "Query metadatdata from sdists, bdists, and installed packages")
13885 (description
13886 "API to query the distutils metadata written in @file{PKG-INFO} inside a
13887 source distriubtion (an sdist) or a binary distribution (e.g., created by
13888 running bdist_egg). It can also query the EGG-INFO directory of an installed
13889 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
13890 created by running @code{python setup.py develop}).")
13891 (license license:expat)))
13892
13893 (define-public python2-pkginfo
13894 (package-with-python2 python-pkginfo))
13895
13896 (define-public python-twine
13897 (package
13898 (name "python-twine")
13899 (version "1.9.1")
13900 (source
13901 (origin
13902 (method url-fetch)
13903 (uri (pypi-uri "twine" version))
13904 (sha256
13905 (base32
13906 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
13907 (build-system python-build-system)
13908 (propagated-inputs
13909 `(("python-tqdm" ,python-tqdm)
13910 ("python-pkginfo" ,python-pkginfo)
13911 ("python-requests" ,python-requests)
13912 ("python-requests-toolbelt" ,python-requests-toolbelt)))
13913 (home-page "https://github.com/pypa/twine")
13914 (synopsis "Collection of utilities for interacting with PyPI")
13915 (description
13916 "@code{twine} currently supports registering projects and uploading
13917 distributions. It authenticates the user over HTTPS, allows them to pre-sign
13918 their files and supports any packaging format (including wheels).")
13919 (license license:asl2.0)))
13920
13921 (define-public python2-twine
13922 (package-with-python2 python-twine))
13923
13924 (define-public python-linecache2
13925 (package
13926 (name "python-linecache2")
13927 (version "1.0.0")
13928 (source
13929 (origin
13930 (method url-fetch)
13931 (uri (pypi-uri "linecache2" version))
13932 (sha256
13933 (base32
13934 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
13935 (build-system python-build-system)
13936 (arguments
13937 `(;; The tests depend on unittest2, and our version is a bit too old.
13938 #:tests? #f))
13939 (native-inputs
13940 `(("python-pbr" ,python-pbr-minimal)))
13941 (home-page
13942 "https://github.com/testing-cabal/linecache2")
13943 (synopsis "Backports of the linecache module")
13944 (description
13945 "The linecache module allows one to get any line from any file, while
13946 attempting to optimize internally, using a cache, the common case where many
13947 lines are read from a single file.")
13948 (license license:psfl)))
13949
13950 (define-public python2-linecache2
13951 (package-with-python2 python-linecache2))
13952
13953 (define-public python-traceback2
13954 (package
13955 (name "python-traceback2")
13956 (version "1.4.0")
13957 (source
13958 (origin
13959 (method url-fetch)
13960 (uri (pypi-uri "traceback2" version))
13961 (sha256
13962 (base32
13963 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
13964 (build-system python-build-system)
13965 (arguments
13966 `(;; python-traceback2 and python-unittest2 depend on one another.
13967 #:tests? #f))
13968 (native-inputs
13969 `(("python-pbr" ,python-pbr-minimal)))
13970 (propagated-inputs
13971 `(("python-linecache2" ,python-linecache2)))
13972 (home-page
13973 "https://github.com/testing-cabal/traceback2")
13974 (synopsis "Backports of the traceback module")
13975 (description
13976 "This module provides a standard interface to extract, format and print
13977 stack traces of Python programs. It exactly mimics the behavior of the Python
13978 interpreter when it prints a stack trace.")
13979 (license license:psfl)))
13980
13981 (define-public python2-traceback2
13982 (package-with-python2 python-traceback2))
13983
13984 (define-public python-ratelimiter
13985 (package
13986 (name "python-ratelimiter")
13987 (version "1.2.0")
13988 (source
13989 (origin
13990 (method url-fetch)
13991 (uri (pypi-uri "ratelimiter" version))
13992 (sha256
13993 (base32
13994 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
13995 (build-system python-build-system)
13996 (arguments
13997 '(#:tests? #f)) ; There are no tests in the pypi archive.
13998 (home-page "https://github.com/RazerM/ratelimiter")
13999 (synopsis "Simple rate limiting object")
14000 (description
14001 "The @code{ratelimiter} module ensures that an operation will not be
14002 executed more than a given number of times during a given period.")
14003 (license license:asl2.0)))
14004
14005 (define-public python2-ratelimiter
14006 (package-with-python2 python-ratelimiter))
14007
14008 (define-public python-dukpy
14009 (package
14010 (name "python-dukpy")
14011 (version "0.3")
14012 (source
14013 (origin
14014 (method git-fetch)
14015 (uri (git-reference
14016 (url "https://github.com/kovidgoyal/dukpy.git")
14017 (commit (string-append "v" version))))
14018 (file-name (git-file-name name version))
14019 (sha256
14020 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
14021 (build-system python-build-system)
14022 (home-page "https://github.com/kovidgoyal/dukpy")
14023 (synopsis "Run JavaScript in python")
14024 (description
14025 "dukpy is a JavaScript runtime environment for Python using the duktape
14026 embeddable JavaScript engine.")
14027 ;; Dukpy is licensed under MIT like the embedded duktape library,
14028 ;; with 'errors.c' as GPL3.
14029 (license (list license:expat license:gpl3))))
14030
14031 (define-public python2-dukpy
14032 (package-with-python2 python-dukpy))
14033
14034 (define-public python-jsonrpclib-pelix
14035 (package
14036 (name "python-jsonrpclib-pelix")
14037 (version "0.3.2")
14038 (source
14039 (origin
14040 (method url-fetch)
14041 (uri (pypi-uri "jsonrpclib-pelix" version))
14042 (sha256
14043 (base32
14044 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
14045 (build-system python-build-system)
14046 (arguments
14047 `(#:tests? #f)) ; no tests in PyPI tarball
14048 (home-page "https://github.com/tcalmant/jsonrpclib/")
14049 (synopsis "JSON-RPC 2.0 client library for Python")
14050 (description
14051 "This library implements the JSON-RPC v2.0
14052 specification (backwards-compatible) as a client library for Python. This
14053 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
14054 services.")
14055 (license license:asl2.0)))
14056
14057 (define-public python2-jsonrpclib-pelix
14058 (package-with-python2 python-jsonrpclib-pelix))
14059
14060 (define-public python-setuptools-scm-git-archive
14061 (package
14062 (name "python-setuptools-scm-git-archive")
14063 (version "1.0")
14064 (source
14065 (origin
14066 (method url-fetch)
14067 (uri (pypi-uri "setuptools_scm_git_archive" version))
14068 (sha256
14069 (base32
14070 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
14071 (build-system python-build-system)
14072 (native-inputs
14073 `(("python-pytest" ,python-pytest)))
14074 (propagated-inputs
14075 `(("python-setuptools-scm" ,python-setuptools-scm)))
14076 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
14077 (synopsis "Setuptools_scm plugin for git archives")
14078 (description
14079 "The setuptools_scm_git_archive package is a plugin to
14080 setuptools_scm, which supports obtaining versions from git archives that
14081 belong to tagged versions.")
14082 (license license:expat)))
14083
14084 (define-public python2-setuptools-scm-git-archive
14085 (package-with-python2 python-setuptools-scm-git-archive))
14086
14087 (define-public python-setuptools-git
14088 (package
14089 (name "python-setuptools-git")
14090 (version "1.2")
14091 (source
14092 (origin
14093 (method url-fetch)
14094 (uri (pypi-uri "setuptools-git" version))
14095 (sha256
14096 (base32
14097 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
14098 (build-system python-build-system)
14099 (arguments
14100 `(#:phases
14101 (modify-phases %standard-phases
14102 ;; This is needed for tests.
14103 (add-after 'unpack 'configure-git
14104 (lambda _
14105 (setenv "HOME" "/tmp")
14106 (invoke "git" "config" "--global" "user.email" "guix")
14107 (invoke "git" "config" "--global" "user.name" "guix")
14108 #t)))))
14109 (native-inputs
14110 `(("git" ,git-minimal)))
14111 (home-page "https://github.com/msabramo/setuptools-git")
14112 (synopsis "Setuptools revision control system plugin for Git")
14113 (description
14114 "This package provides a plugin for Setuptools for revision control with
14115 Git.")
14116 (license license:bsd-3)))
14117
14118 (define-public python-pyclipper
14119 (package
14120 (name "python-pyclipper")
14121 (version "1.1.0.post1")
14122 (source
14123 (origin
14124 (method url-fetch)
14125 (uri (pypi-uri "pyclipper" version ".zip"))
14126 (sha256
14127 (base32
14128 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
14129 (modules '((guix build utils)))
14130 (snippet
14131 '(begin
14132 ;; This file is generated by Cython.
14133 (delete-file "pyclipper/pyclipper.cpp") #t))))
14134 (build-system python-build-system)
14135 (arguments
14136 `(#:phases
14137 (modify-phases %standard-phases
14138 (add-before 'build 'cythonize-sources
14139 (lambda _
14140 (with-directory-excursion "pyclipper"
14141 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
14142 (propagated-inputs
14143 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
14144 (native-inputs
14145 `(("python-cython" ,python-cython)
14146 ("python-pytest" ,python-pytest)
14147 ("python-pytest-runner" ,python-pytest-runner)
14148 ("python-unittest2" ,python-unittest2)
14149 ("unzip" ,unzip)))
14150 (home-page "https://github.com/greginvm/pyclipper")
14151 (synopsis "Wrapper for Angus Johnson's Clipper library")
14152 (description
14153 "Pyclipper is a Cython wrapper for the C++ translation of the
14154 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
14155 (license license:expat)))
14156
14157 (define-public python2-pyclipper
14158 (package-with-python2 python-pyclipper))
14159
14160 (define-public python2-booleanoperations
14161 (package
14162 (name "python2-booleanoperations")
14163 (version "0.7.1")
14164 (source
14165 (origin
14166 (method url-fetch)
14167 (uri (pypi-uri "booleanOperations" version ".zip"))
14168 (sha256
14169 (base32
14170 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
14171 (build-system python-build-system)
14172 (arguments
14173 `(#:python ,python-2))
14174 (native-inputs
14175 `(("unzip" ,unzip)
14176 ("python2-pytest" ,python2-pytest)
14177 ("python2-pytest-runner" ,python2-pytest-runner)))
14178 (propagated-inputs
14179 `(("python-fonttools" ,python2-fonttools)
14180 ("python-pyclipper" ,python2-pyclipper)
14181 ("python-ufolib" ,python2-ufolib)))
14182 (home-page "https://github.com/typemytype/booleanOperations")
14183 (synopsis "Boolean operations on paths")
14184 (description
14185 "BooleanOperations provides a Python library that enables
14186 boolean operations on paths.")
14187 (license license:expat)))
14188
14189 (define-public python-tempdir
14190 (package
14191 (name "python-tempdir")
14192 (version "0.7.1")
14193 (source
14194 (origin
14195 (method url-fetch)
14196 (uri (pypi-uri "tempdir" version))
14197 (sha256
14198 (base32
14199 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
14200 (build-system python-build-system)
14201 (home-page "https://pypi.org/project/tempdir/")
14202 (arguments
14203 ;; the package has no tests
14204 '(#:tests? #f))
14205 (synopsis "Python library for managing temporary directories")
14206 (description
14207 "This library manages temporary directories that are automatically
14208 deleted with all their contents when they are no longer needed. It is
14209 particularly convenient for use in tests.")
14210 (license license:expat)))
14211
14212 (define-public python2-tempdir
14213 (package-with-python2 python-tempdir))
14214
14215 (define-public python-activepapers
14216 (package
14217 (name "python-activepapers")
14218 (version "0.2.2")
14219 (source
14220 (origin
14221 (method url-fetch)
14222 (uri (pypi-uri "ActivePapers.Py" version))
14223 (sha256
14224 (base32
14225 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
14226 (build-system python-build-system)
14227 (arguments
14228 `(#:modules ((ice-9 ftw)
14229 (srfi srfi-1)
14230 (guix build utils)
14231 (guix build python-build-system))
14232
14233 #:phases
14234 (modify-phases %standard-phases
14235 (add-after 'unpack 'delete-python2-code
14236 (lambda _
14237 (for-each delete-file
14238 '("lib/activepapers/builtins2.py"
14239 "lib/activepapers/standardlib2.py"
14240 "lib/activepapers/utility2.py"))))
14241 (replace 'check
14242 (lambda _
14243 ;; Deactivate the test cases that download files
14244 (setenv "NO_NETWORK_ACCESS" "1")
14245 ;; For some strange reason, some tests fail if nosetests runs all
14246 ;; test modules in a single execution. They pass if each test
14247 ;; module is run individually.
14248 (for-each (lambda (filename)
14249 (invoke "nosetests"
14250 (string-append "tests/" filename)))
14251 (scandir "tests"
14252 (lambda (filename)
14253 (string-suffix? ".py" filename)))))))))
14254 (native-inputs
14255 `(("python-tempdir" ,python-tempdir)
14256 ("python-nose" ,python-nose)))
14257 (propagated-inputs
14258 `(("python-h5py" ,python-h5py)))
14259 (home-page "http://www.activepapers.org/")
14260 (synopsis "Executable papers for scientific computing")
14261 (description
14262 "ActivePapers is a tool for working with executable papers, which
14263 combine data, code, and documentation in single-file packages,
14264 suitable for publication as supplementary material or on repositories
14265 such as figshare or Zenodo.")
14266 (properties `((python2-variant . ,(delay python2-activepapers))))
14267 (license license:bsd-3)))
14268
14269 (define-public python2-activepapers
14270 (let ((base (package-with-python2
14271 (strip-python2-variant python-activepapers))))
14272 (package
14273 (inherit base)
14274 (arguments
14275 (substitute-keyword-arguments (package-arguments base)
14276 ((#:phases phases)
14277 `(modify-phases ,phases
14278 (delete 'delete-python2-code)
14279 (add-after 'unpack 'delete-python3-code
14280 (lambda _
14281 (for-each delete-file
14282 '("lib/activepapers/builtins3.py"
14283 "lib/activepapers/standardlib3.py"
14284 "lib/activepapers/utility3.py")))))))))))
14285
14286 (define-public python-semver
14287 (package
14288 (name "python-semver")
14289 (version "2.7.9")
14290 (source
14291 (origin
14292 (method url-fetch)
14293 (uri (pypi-uri "semver" version))
14294 (sha256
14295 (base32
14296 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
14297 (build-system python-build-system)
14298 (arguments
14299 `(#:phases
14300 (modify-phases %standard-phases
14301 (add-after 'unpack 'patch-test-requirements
14302 (lambda _
14303 (substitute* "setup.py"
14304 ;; Our Python is new enough.
14305 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
14306 #t)))))
14307 (native-inputs
14308 `(("python-tox" ,python-tox)
14309 ("python-virtualenv" ,python-virtualenv)))
14310 (home-page "https://github.com/k-bx/python-semver")
14311 (synopsis "Python helper for Semantic Versioning")
14312 (description "This package provides a Python library for
14313 @url{Semantic Versioning, http://semver.org/}.")
14314 (license license:bsd-3)))
14315
14316 (define-public python2-semver
14317 (package-with-python2 python-semver))
14318
14319 (define-public python-pyro4
14320 (package
14321 (name "python-pyro4")
14322 (version "4.75")
14323 (source
14324 (origin
14325 (method url-fetch)
14326 (uri (pypi-uri "Pyro4" version))
14327 (sha256
14328 (base32 "1dfpp36imddx19yv0kd28gk1l71ckhpqy6jd590wpm2680jw15rq"))))
14329 (build-system python-build-system)
14330 (propagated-inputs
14331 `(("python-serpent" ,python-serpent)))
14332 (home-page "https://pyro4.readthedocs.io")
14333 (synopsis "Distributed object middleware for Python")
14334 (description
14335 "Pyro enables you to build applications in which objects can talk to each
14336 other over the network. You can just use normal Python method calls to call
14337 objects on other machines, also known as remote procedure calls (RPC).")
14338 (license license:expat)))
14339
14340 (define-public python2-pyro
14341 (package
14342 (name "python2-pyro")
14343 (version "3.16")
14344 (source
14345 (origin
14346 (method url-fetch)
14347 (uri (pypi-uri "Pyro" version))
14348 (file-name (string-append "Pyro-" version ".tar.gz"))
14349 (sha256
14350 (base32
14351 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
14352 (build-system python-build-system)
14353 (arguments
14354 ;; Pyro is not compatible with Python 3
14355 `(#:python ,python-2
14356 ;; Pyro has no test cases for automatic execution
14357 #:tests? #f))
14358 (home-page "http://pythonhosted.org/Pyro/")
14359 (synopsis "Distributed object manager for Python")
14360 (description "Pyro is a Distributed Object Technology system
14361 written in Python that is designed to be easy to use. It resembles
14362 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
14363 which is a system and language independent Distributed Object Technology
14364 and has much more to offer than Pyro or RMI. Pyro 3.x is no
14365 longer maintained. New projects should use Pyro4 instead, which
14366 is the new Pyro version that is actively developed.")
14367 (license license:expat)))
14368
14369 (define-public python2-scientific
14370 (package
14371 (name "python2-scientific")
14372 (version "2.9.4")
14373 (source
14374 (origin
14375 (method url-fetch)
14376 (uri (string-append "https://bitbucket.org/khinsen/"
14377 "scientificpython/downloads/ScientificPython-"
14378 version ".tar.gz"))
14379 (file-name (string-append "ScientificPython-" version ".tar.gz"))
14380 (sha256
14381 (base32
14382 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
14383 (build-system python-build-system)
14384 (inputs
14385 `(("netcdf" ,netcdf)))
14386 (propagated-inputs
14387 `(("python-numpy" ,python2-numpy-1.8)
14388 ("python-pyro" ,python2-pyro)))
14389 (arguments
14390 ;; ScientificPython is not compatible with Python 3
14391 `(#:python ,python-2
14392 #:tests? #f ; No test suite
14393 #:phases
14394 (modify-phases %standard-phases
14395 (replace 'build
14396 (lambda* (#:key inputs #:allow-other-keys)
14397 (invoke "python" "setup.py" "build"
14398 (string-append "--netcdf_prefix="
14399 (assoc-ref inputs "netcdf"))))))))
14400 (home-page "https://bitbucket.org/khinsen/scientificpython")
14401 (synopsis "Python modules for scientific computing")
14402 (description "ScientificPython is a collection of Python modules that are
14403 useful for scientific computing. Most modules are rather general (Geometry,
14404 physical units, automatic derivatives, ...) whereas others are more
14405 domain-specific (e.g. netCDF and PDB support). The library is currently
14406 not actively maintained and works only with Python 2 and NumPy < 1.9.")
14407 (license license:cecill-c)))
14408
14409 (define-public python2-mmtk
14410 (package
14411 (name "python2-mmtk")
14412 (version "2.7.11")
14413 (source
14414 (origin
14415 (method url-fetch)
14416 (uri (string-append "https://bitbucket.org/khinsen/"
14417 "mmtk/downloads/MMTK-" version ".tar.gz"))
14418 (file-name (string-append "MMTK-" version ".tar.gz"))
14419 (sha256
14420 (base32
14421 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
14422 (build-system python-build-system)
14423 (native-inputs
14424 `(("netcdf" ,netcdf)))
14425 (propagated-inputs
14426 `(("python-scientific" ,python2-scientific)
14427 ("python-tkinter" ,python-2 "tk")))
14428 (arguments
14429 `(#:python ,python-2
14430 #:tests? #f
14431 #:phases
14432 (modify-phases %standard-phases
14433 (add-before 'build 'includes-from-scientific
14434 (lambda* (#:key inputs #:allow-other-keys)
14435 (mkdir-p "Include/Scientific")
14436 (copy-recursively
14437 (string-append
14438 (assoc-ref inputs "python-scientific")
14439 "/include/python2.7/Scientific")
14440 "Include/Scientific"))))))
14441 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
14442 (synopsis "Python library for molecular simulation")
14443 (description "MMTK is a library for molecular simulations with an emphasis
14444 on biomolecules. It provides widely used methods such as Molecular Dynamics
14445 and normal mode analysis, but also basic routines for implementing new methods
14446 for simulation and analysis. The library is currently not actively maintained
14447 and works only with Python 2 and NumPy < 1.9.")
14448 (license license:cecill-c)))
14449
14450 (define-public python-phonenumbers
14451 (package
14452 (name "python-phonenumbers")
14453 (version "8.9.1")
14454 (source
14455 (origin
14456 (method url-fetch)
14457 (uri (pypi-uri "phonenumbers" version))
14458 (sha256
14459 (base32
14460 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
14461 (build-system python-build-system)
14462 (home-page
14463 "https://github.com/daviddrysdale/python-phonenumbers")
14464 (synopsis
14465 "Python library for dealing with international phone numbers")
14466 (description
14467 "This package provides a Python port of Google's libphonenumber library.")
14468 (license license:asl2.0)))
14469
14470 (define-public python2-phonenumbers
14471 (package-with-python2 python-phonenumbers))
14472
14473 (define-public python-send2trash
14474 (package
14475 (name "python-send2trash")
14476 (version "1.5.0")
14477 (source
14478 (origin (method git-fetch)
14479 ;; Source tarball on PyPI doesn't include tests.
14480 (uri (git-reference
14481 (url "https://github.com/hsoft/send2trash.git")
14482 (commit version)))
14483 (file-name (git-file-name name version))
14484 (sha256
14485 (base32
14486 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
14487 (build-system python-build-system)
14488 (arguments
14489 '(#:phases
14490 (modify-phases %standard-phases
14491 (add-before 'check 'pre-check
14492 (lambda _
14493 (mkdir-p "/tmp/foo")
14494 (setenv "HOME" "/tmp/foo")
14495 #t)))))
14496 (home-page "https://github.com/hsoft/send2trash")
14497 (synopsis "Send files to the user's @file{~/Trash} directory")
14498 (description "This package provides a Python library to send files to the
14499 user's @file{~/Trash} directory.")
14500 (properties `((python2-variant . ,(delay python2-send2trash))))
14501 (license license:bsd-3)))
14502
14503 (define-public python2-send2trash
14504 (package
14505 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
14506 (arguments
14507 (substitute-keyword-arguments (package-arguments python-send2trash)
14508 ((#:phases phases)
14509 `(modify-phases ,phases
14510 (add-before 'check 'setenv
14511 (lambda _
14512 (setenv "PYTHONPATH"
14513 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
14514 #t))))))))
14515
14516 (define-public python-yapf
14517 (package
14518 (name "python-yapf")
14519 (version "0.24.0")
14520 (source
14521 (origin
14522 (method url-fetch)
14523 (uri (pypi-uri "yapf" version))
14524 (sha256
14525 (base32
14526 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
14527 (build-system python-build-system)
14528 (home-page "https://github.com/google/yapf")
14529 (synopsis "Formatter for Python code")
14530 (description "YAPF is a formatter for Python code. It's based off of
14531 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
14532 takes the code and reformats it to the best formatting that conforms to the
14533 style guide, even if the original code didn't violate the style guide.")
14534 (license license:asl2.0)))
14535
14536 (define-public python2-yapf
14537 (package-with-python2 python-yapf))
14538
14539 (define-public python-gyp
14540 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
14541 (revision "0"))
14542 (package
14543 (name "python-gyp")
14544 ;; Google does not release versions,
14545 ;; based on second most recent commit date.
14546 (version (git-version "0.0.0" revision commit))
14547 (source
14548 (origin
14549 ;; Google does not release tarballs,
14550 ;; git checkout is needed.
14551 (method git-fetch)
14552 (uri (git-reference
14553 (url "https://chromium.googlesource.com/external/gyp")
14554 (commit commit)))
14555 (file-name (git-file-name name version))
14556 (sha256
14557 (base32
14558 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14559 (build-system python-build-system)
14560 (home-page "https://gyp.gsrc.io/")
14561 (synopsis "GYP is a Meta-Build system")
14562 (description
14563 "GYP builds build systems for large, cross platform applications.
14564 It can be used to generate XCode projects, Visual Studio projects, Ninja build
14565 files, and Makefiles.")
14566 (license license:bsd-3))))
14567
14568 (define-public python2-gyp
14569 (package-with-python2 python-gyp))
14570
14571 (define-public python-whatever
14572 (package
14573 (name "python-whatever")
14574 (version "0.5")
14575 (source
14576 (origin
14577 (method url-fetch)
14578 (uri (string-append "https://github.com/Suor/whatever/archive/" version
14579 ".tar.gz"))
14580 (sha256
14581 (base32
14582 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
14583 (file-name (string-append name "-" version ".tar.gz"))))
14584 (build-system python-build-system)
14585 (arguments
14586 `(#:phases
14587 (modify-phases %standard-phases
14588 (replace 'check
14589 (lambda _
14590 (invoke "py.test"))))))
14591 (native-inputs
14592 `(("python-pytest" ,python-pytest)))
14593 (home-page "http://github.com/Suor/whatever")
14594 (synopsis "Make anonymous functions by partial application of operators")
14595 (description "@code{whatever} provides an easy way to make anonymous
14596 functions by partial application of operators.")
14597 (license license:bsd-3)))
14598
14599 (define-public python2-whatever
14600 (package-with-python2 python-whatever))
14601
14602 (define-public python-funcy
14603 (package
14604 (name "python-funcy")
14605 (version "1.11")
14606 (source
14607 (origin
14608 (method git-fetch)
14609 (uri (git-reference
14610 (url "https://github.com/Suor/funcy.git")
14611 (commit version)))
14612 (sha256
14613 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14614 (file-name (git-file-name name version))))
14615 (build-system python-build-system)
14616 (arguments
14617 `(#:phases
14618 (modify-phases %standard-phases
14619 (replace 'check
14620 (lambda _
14621 (invoke "py.test"))))))
14622 (native-inputs
14623 `(("python-pytest" ,python-pytest)
14624 ("python-whatever" ,python-whatever)))
14625 (home-page "http://github.com/Suor/funcy")
14626 (synopsis "Functional tools")
14627 (description "@code{funcy} is a library that provides functional tools.
14628 Examples are:
14629 @enumerate
14630 @item merge - Merges collections of the same type
14631 @item walk - Type-preserving map
14632 @item select - Selects a part of a collection
14633 @item take - Takes the first n items of a collection
14634 @item first - Takes the first item of a collection
14635 @item remove - Predicated-removes items of a collection
14636 @item concat - Concatenates two collections
14637 @item flatten - Flattens a collection with subcollections
14638 @item distinct - Returns only distinct items
14639 @item split - Predicated-splits a collection
14640 @item split_at - Splits a collection at a given item
14641 @item group_by - Groups items by group
14642 @item pairwise - Pairs off adjacent items
14643 @item partial - Partially-applies a function
14644 @item curry - Curries a function
14645 @item compose - Composes functions
14646 @item complement - Complements a predicate
14647 @item all_fn - \"all\" with predicate
14648 @end enumerate")
14649 (license license:bsd-3)))
14650
14651 (define-public python2-funcy
14652 (package-with-python2 python-funcy))
14653
14654 (define-public python-isoweek
14655 (package
14656 (name "python-isoweek")
14657 (version "1.3.3")
14658 (source
14659 (origin
14660 (method url-fetch)
14661 (uri (pypi-uri "isoweek" version))
14662 (sha256
14663 (base32
14664 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14665 (build-system python-build-system)
14666 (home-page "https://github.com/gisle/isoweek")
14667 (synopsis "Objects representing a week")
14668 (description "The @code{isoweek} module provide the class Week that
14669 implements the week definition of ISO 8601. This standard also defines
14670 a notation for identifying weeks; yyyyWww (where the W is a literal).
14671 Week instances stringify to this form.")
14672 (license license:bsd-3)))
14673
14674 (define-public python2-isoweek
14675 (package-with-python2 python-isoweek))
14676
14677 (define-public python-tokenize-rt
14678 (package
14679 (name "python-tokenize-rt")
14680 (version "2.0.1")
14681 (source
14682 (origin
14683 (method url-fetch)
14684 (uri (pypi-uri "tokenize-rt" version))
14685 (sha256
14686 (base32
14687 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14688 (build-system python-build-system)
14689 (home-page "https://github.com/asottile/tokenize-rt")
14690 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14691 (description
14692 "This Python library is a wrapper around @code{tokenize} from the Python
14693 standard library. It provides two additional tokens @code{ESCAPED_NL} and
14694 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14695 and @code{tokens_to_src} to roundtrip.")
14696 (license license:expat)))
14697
14698 (define-public python-future-fstrings
14699 (package
14700 (name "python-future-fstrings")
14701 (version "0.4.1")
14702 (source
14703 (origin
14704 (method url-fetch)
14705 (uri (pypi-uri "future_fstrings" version))
14706 (sha256
14707 (base32
14708 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14709 (build-system python-build-system)
14710 (propagated-inputs
14711 `(("python-tokenize-rt" ,python-tokenize-rt)))
14712 (home-page "https://github.com/asottile/future-fstrings")
14713 (synopsis "Backport of fstrings to Python < 3.6")
14714 (description
14715 "This package provides a UTF-8 compatible encoding
14716 @code{future_fstrings}, which performs source manipulation. It decodes the
14717 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
14718 @code{f} strings.")
14719 (license license:expat)))
14720
14721 (define-public python-typed-ast
14722 (package
14723 (name "python-typed-ast")
14724 (version "1.3.5")
14725 (source
14726 (origin
14727 (method url-fetch)
14728 (uri (pypi-uri "typed-ast" version))
14729 (sha256
14730 (base32
14731 "1m7pr6qpana3cvqwiw7mlvrgvmw27ch5mx1592572xhlki8g85ak"))))
14732 (build-system python-build-system)
14733 (arguments
14734 `(#:modules ((guix build utils)
14735 (guix build python-build-system)
14736 (ice-9 ftw)
14737 (srfi srfi-1)
14738 (srfi srfi-26))
14739 #:phases
14740 (modify-phases %standard-phases
14741 (replace 'check
14742 (lambda _
14743 (let ((cwd (getcwd)))
14744 (setenv "PYTHONPATH"
14745 (string-append cwd "/build/"
14746 (find (cut string-prefix? "lib" <>)
14747 (scandir (string-append cwd "/build")))
14748 ":"
14749 (getenv "PYTHONPATH"))))
14750 (invoke "pytest")
14751 #t)))))
14752 (native-inputs `(("python-pytest" ,python-pytest)))
14753 (home-page "https://github.com/python/typed_ast")
14754 (synopsis "Fork of Python @code{ast} modules with type comment support")
14755 (description "This package provides a parser similar to the standard
14756 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
14757 include PEP 484 type comments and are independent of the version of Python
14758 under which they are run. The @code{typed_ast} parsers produce the standard
14759 Python AST (plus type comments), and are both fast and correct, as they are
14760 based on the CPython 2.7 and 3.7 parsers.")
14761 ;; See the file "LICENSE" for the details.
14762 (license (list license:psfl
14763 license:asl2.0
14764 license:expat)))) ;ast27/Parser/spark.py
14765
14766 (define-public python-typing
14767 (package
14768 (name "python-typing")
14769 (version "3.6.6")
14770 (source
14771 (origin
14772 (method url-fetch)
14773 (uri (pypi-uri "typing" version))
14774 (sha256
14775 (base32
14776 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
14777 (build-system python-build-system)
14778 (home-page "https://docs.python.org/3/library/typing.html")
14779 (synopsis "Type hints for Python")
14780 (description "This is a backport of the standard library @code{typing}
14781 module to Python versions older than 3.5. Typing defines a standard notation
14782 for Python function and variable type annotations. The notation can be used
14783 for documenting code in a concise, standard format, and it has been designed
14784 to also be used by static and runtime type checkers, static analyzers, IDEs
14785 and other tools.")
14786 (license license:psfl)))
14787
14788 (define-public python2-typing
14789 (package-with-python2 python-typing))
14790
14791 (define-public python-typing-extensions
14792 (package
14793 (name "python-typing-extensions")
14794 (version "3.7.2")
14795 (source
14796 (origin
14797 (method url-fetch)
14798 (uri (pypi-uri "typing_extensions" version))
14799 (sha256
14800 (base32
14801 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
14802 (build-system python-build-system)
14803 (home-page
14804 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
14805 (synopsis "Experimental type hints for Python")
14806 (description
14807 "The typing_extensions module contains additional @code{typing} hints not
14808 yet present in the of the @code{typing} standard library.
14809 Included are implementations of:
14810 @enumerate
14811 @item ClassVar
14812 @item ContextManager
14813 @item Counter
14814 @item DefaultDict
14815 @item Deque
14816 @item NewType
14817 @item NoReturn
14818 @item overload
14819 @item Protocol
14820 @item runtime
14821 @item Text
14822 @item Type
14823 @item TYPE_CHECKING
14824 @item AsyncGenerator
14825 @end enumerate\n")
14826 (license license:psfl)))
14827
14828 (define-public bpython
14829 (package
14830 (name "bpython")
14831 (version "0.17.1")
14832 (source
14833 (origin
14834 (method url-fetch)
14835 (uri (pypi-uri "bpython" version))
14836 (sha256
14837 (base32
14838 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
14839 (build-system python-build-system)
14840 (arguments
14841 `(#:phases
14842 (modify-phases %standard-phases
14843 (add-after 'unpack 'remove-failing-test
14844 (lambda _
14845 ;; Remove failing test. FIXME: make it pass
14846 (delete-file "bpython/test/test_args.py")
14847 #t))
14848 (add-after 'wrap 'add-aliases
14849 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
14850 (lambda* (#:key outputs #:allow-other-keys)
14851 (let ((out (assoc-ref outputs "out")))
14852 (for-each
14853 (lambda (old new)
14854 (symlink old (string-append out "/bin/" new)))
14855 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
14856 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
14857 #t)))))
14858 (propagated-inputs
14859 `(("python-pygments" ,python-pygments)
14860 ("python-requests" ,python-requests)
14861 ("python-babel" ,python-babel) ; optional, for internationalization
14862 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
14863 ("python-greenlet" ,python-greenlet)
14864 ("python-urwid" ,python-urwid) ; for bpython-urwid only
14865 ("python-six" ,python-six)))
14866 (native-inputs
14867 `(("python-sphinx" ,python-sphinx)
14868 ("python-mock" ,python-mock)))
14869 (home-page "https://bpython-interpreter.org/")
14870 (synopsis "Fancy interface to the Python interpreter")
14871 (description "Bpython is a fancy interface to the Python
14872 interpreter. bpython's main features are
14873
14874 @enumerate
14875 @item in-line syntax highlighting,
14876 @item readline-like autocomplete with suggestions displayed as you type,
14877 @item expected parameter list for any Python function,
14878 @item \"rewind\" function to pop the last line of code from memory and
14879 re-evaluate,
14880 @item send the code you've entered off to a pastebin,
14881 @item save the code you've entered to a file, and
14882 @item auto-indentation.
14883 @end enumerate")
14884 (license license:expat)))
14885
14886 (define-public bpython2
14887 (let ((base (package-with-python2
14888 (strip-python2-variant bpython))))
14889 (package (inherit base)
14890 (name "bpython2")
14891 (arguments
14892 `(#:python ,python-2
14893 #:phases
14894 (modify-phases %standard-phases
14895 (add-after 'unpack 'remove-failing-test
14896 (lambda _
14897 ;; Remove failing test. FIXME: make it pass
14898 (delete-file "bpython/test/test_args.py")
14899 ;; Disable failing test-cases (renaming inhibits they are
14900 ;; discovered)
14901 (substitute* "bpython/test/test_curtsies_repl.py"
14902 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
14903 (string-append a "xxx_off_" b))
14904 (("^(\\s*def )(test_complex\\W)" _ a b)
14905 (string-append a "xxx_off_" b)))
14906 #t))
14907 (add-before 'build 'rename-scripts
14908 ;; rename the scripts to bypthon2, bpdb2, etc.
14909 (lambda _
14910 (substitute* "setup.py"
14911 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
14912 (string-append name "2" rest "\n"))
14913 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
14914 (string-append name "2" (or sub "") rest "\n")))
14915 #t))))))))
14916
14917 (define-public python-pyinotify
14918 (package
14919 (name "python-pyinotify")
14920 (version "0.9.6")
14921 (source (origin
14922 (method url-fetch)
14923 (uri (pypi-uri "pyinotify" version))
14924 (sha256
14925 (base32
14926 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
14927 (build-system python-build-system)
14928 (arguments `(#:tests? #f)) ;no tests
14929 (home-page "https://github.com/seb-m/pyinotify")
14930 (synopsis "Python library for monitoring inotify events")
14931 (description
14932 "@code{pyinotify} provides a Python interface for monitoring
14933 file system events on Linux.")
14934 (license license:expat)))
14935
14936 (define-public python2-pyinotify
14937 (package-with-python2 python-pyinotify))
14938
14939 ;; Ada parser uses this version.
14940 (define-public python2-quex-0.67.3
14941 (package
14942 (name "python2-quex")
14943 (version "0.67.3")
14944 (source
14945 (origin
14946 (method url-fetch)
14947 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
14948 (version-major+minor version)
14949 "/quex-" version ".zip"))
14950 (sha256
14951 (base32
14952 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
14953 (build-system python-build-system)
14954 (native-inputs
14955 `(("unzip" ,unzip)))
14956 (arguments
14957 `(#:python ,python-2
14958 #:tests? #f
14959 #:phases
14960 (modify-phases %standard-phases
14961 (delete 'configure)
14962 (delete 'build)
14963 (replace 'install
14964 (lambda* (#:key outputs #:allow-other-keys)
14965 (let* ((out (assoc-ref outputs "out"))
14966 (share/quex (string-append out "/share/quex"))
14967 (bin (string-append out "/bin")))
14968 (copy-recursively "." share/quex)
14969 (mkdir-p bin)
14970 (symlink (string-append share/quex "/quex-exe.py")
14971 (string-append bin "/quex"))
14972 #t))))))
14973 (native-search-paths
14974 (list (search-path-specification
14975 (variable "QUEX_PATH")
14976 (files '("share/quex")))))
14977 (home-page "http://quex.sourceforge.net/")
14978 (synopsis "Lexical analyzer generator in Python")
14979 (description "@code{quex} is a lexical analyzer generator in Python.")
14980 (license license:lgpl2.1+))) ; Non-military
14981
14982 (define-public python2-quex
14983 (package (inherit python2-quex-0.67.3)
14984 (name "python2-quex")
14985 (version "0.68.1")
14986 (source
14987 (origin
14988 (method url-fetch)
14989 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
14990 (sha256
14991 (base32
14992 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
14993 (file-name (string-append name "-" version ".tar.gz"))))))
14994
14995 (define-public python-more-itertools
14996 (package
14997 (name "python-more-itertools")
14998 (version "7.1.0")
14999 (source
15000 (origin
15001 (method url-fetch)
15002 (uri (pypi-uri "more-itertools" version))
15003 (sha256
15004 (base32
15005 "16phg2f2dvm6ci5wr49ncha5lmc0m2in3bsl33c61vzca4gkvd4b"))))
15006 (build-system python-build-system)
15007 (home-page "https://github.com/erikrose/more-itertools")
15008 (synopsis "More routines for operating on iterables, beyond itertools")
15009 (description "Python's built-in @code{itertools} module implements a
15010 number of iterator building blocks inspired by constructs from APL, Haskell,
15011 and SML. @code{more-itertools} includes additional building blocks for
15012 working with iterables.")
15013 (properties `((python2-variant . ,(delay python2-more-itertools))))
15014 (license license:expat)))
15015
15016 ;; The 5.x series are the last versions supporting Python 2.7.
15017 (define-public python2-more-itertools
15018 (package
15019 (inherit python-more-itertools)
15020 (name "python2-more-itertools")
15021 (version "5.0.0")
15022 (source (origin
15023 (method url-fetch)
15024 (uri (pypi-uri "more-itertools" version))
15025 (sha256
15026 (base32
15027 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
15028 (arguments
15029 `(#:python ,python2-minimal))
15030 (propagated-inputs
15031 `(("python2-six" ,python2-six-bootstrap)))))
15032
15033 (define-public python-latexcodec
15034 (package
15035 (name "python-latexcodec")
15036 (version "1.0.6")
15037 (source
15038 (origin
15039 (method url-fetch)
15040 (uri (pypi-uri "latexcodec" version))
15041 (sha256
15042 (base32 "0s4wdbg0w2l8pj3i0y4510i0s04p8nhxcsa2z41bjsv0k66npb81"))))
15043 (build-system python-build-system)
15044 (inputs
15045 `(("python-six" ,python-six)))
15046 (home-page "https://readthedocs.org/projects/latexcodec/")
15047 (synopsis "Work with LaTeX code in Python")
15048 (description "Lexer and codec to work with LaTeX code in Python.")
15049 (license license:expat)))
15050
15051 (define-public python-pybtex
15052 (package
15053 (name "python-pybtex")
15054 (version "0.22.2")
15055 (source
15056 (origin
15057 (method url-fetch)
15058 (uri (pypi-uri "pybtex" version))
15059 (sha256
15060 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
15061 (build-system python-build-system)
15062 (native-inputs
15063 `(("python-nose" ,python-nose)))
15064 (inputs
15065 `(("python-latexcodec" ,python-latexcodec)
15066 ("python-pyyaml" ,python-pyyaml)
15067 ("python-six" ,python-six)))
15068 (arguments
15069 `(#:test-target "nosetests"))
15070 (home-page "https://pybtex.org/")
15071 (synopsis "BibTeX-compatible bibliography processor")
15072 (description "Pybtex is a BibTeX-compatible bibliography processor written
15073 in Python. You can simply type pybtex instead of bibtex.")
15074 (license license:expat)))
15075
15076 (define-public python-onetimepass
15077 (package
15078 (name "python-onetimepass")
15079 (version "1.0.1")
15080 (source
15081 (origin
15082 (method url-fetch)
15083 (uri (pypi-uri "onetimepass" version))
15084 (sha256
15085 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
15086 (build-system python-build-system)
15087 (propagated-inputs `(("python-six" ,python-six)))
15088 (home-page "https://github.com/tadeck/onetimepass/")
15089 (synopsis "One-time password library")
15090 (description "Python one-time password library for HMAC-based (HOTP) and
15091 time-based (TOTP) passwords.")
15092 (license license:expat)))
15093
15094 (define-public python-parso
15095 (package
15096 (name "python-parso")
15097 (version "0.5.1")
15098 (source
15099 (origin
15100 (method url-fetch)
15101 (uri (pypi-uri "parso" version))
15102 (sha256
15103 (base32
15104 "171a9ivhxwsd52h1cgsz40zgzpgzscn7yqb7sdjhy8m1lzj0wsv6"))))
15105 (native-inputs
15106 `(("python-pytest" ,python-pytest)))
15107 (build-system python-build-system)
15108 (arguments
15109 `(#:phases (modify-phases %standard-phases
15110 (replace 'check
15111 (lambda _ (invoke "pytest" "-vv"))))))
15112 (home-page "https://github.com/davidhalter/parso")
15113 (synopsis "Python Parser")
15114 (description "Parso is a Python parser that supports error recovery and
15115 round-trip parsing for different Python versions (in multiple Python versions).
15116 Parso is also able to list multiple syntax errors in your Python file.")
15117 (license license:expat)))
15118
15119 (define-public python2-parso
15120 (package-with-python2 python-parso))
15121
15122 (define-public python-async-generator
15123 (package
15124 (name "python-async-generator")
15125 (version "1.10")
15126 (source
15127 (origin
15128 (method url-fetch)
15129 (uri (pypi-uri "async_generator" version))
15130 (sha256
15131 (base32
15132 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
15133 (build-system python-build-system)
15134 (native-inputs
15135 `(("python-pytest" ,python-pytest)))
15136 (home-page "https://github.com/python-trio/async_generator")
15137 (synopsis "Async generators and context managers for Python 3.5+")
15138 (description "@code{async_generator} back-ports Python 3.6's native async
15139 generators and Python 3.7's context managers into Python 3.5.")
15140 ;; Dual licensed.
15141 (license (list license:expat license:asl2.0))))
15142
15143 (define-public python-async-timeout
15144 (package
15145 (name "python-async-timeout")
15146 (version "3.0.1")
15147 (source
15148 (origin
15149 (method url-fetch)
15150 (uri (pypi-uri "async-timeout" version))
15151 (sha256
15152 (base32
15153 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
15154 (build-system python-build-system)
15155 (home-page "https://github.com/aio-libs/async_timeout/")
15156 (synopsis "Timeout context manager for asyncio programs")
15157 (description "@code{async-timeout} provides a timeout timeout context
15158 manager compatible with @code{asyncio}.")
15159 (license license:asl2.0)))
15160
15161 (define-public python-glob2
15162 (package
15163 (name "python-glob2")
15164 (version "0.7")
15165 (source
15166 (origin
15167 (method git-fetch)
15168 (uri (git-reference
15169 (url "https://github.com/miracle2k/python-glob2.git")
15170 (commit (string-append "v" version))))
15171 (file-name (git-file-name name version))
15172 (sha256
15173 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
15174 (build-system python-build-system)
15175 (home-page "https://github.com/miracle2k/python-glob2/")
15176 (synopsis "Extended Version of the python buildin glob module")
15177 (description "This is an extended version of the Python
15178 @url{http://docs.python.org/library/glob.html, built-in glob module} which
15179 adds:
15180
15181 @itemize
15182 @item The ability to capture the text matched by glob patterns, and return
15183 those matches alongside the file names.
15184 @item A recursive @code{**} globbing syntax, akin for example to the
15185 @code{globstar} option of Bash.
15186 @item The ability to replace the file system functions used, in order to glob
15187 on virtual file systems.
15188 @item Compatible with Python 2 and Python 3 (tested with 3.3).
15189 @end itemize
15190
15191 Glob2 currently based on the glob code from Python 3.3.1.")
15192 (license license:bsd-2)))
15193
15194 (define-public python2-glob2
15195 (package-with-python2 python-glob2))
15196
15197 (define-public python-gipc
15198 (package
15199 (name "python-gipc")
15200 (version "0.6.0")
15201 (source
15202 (origin
15203 (method url-fetch)
15204 (uri (pypi-uri "gipc" version ".zip"))
15205 (sha256
15206 (base32
15207 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
15208 (build-system python-build-system)
15209 (native-inputs
15210 `(("unzip" ,unzip)))
15211 (propagated-inputs
15212 `(("python-gevent" ,python-gevent)))
15213 (home-page "http://gehrcke.de/gipc")
15214 (synopsis "Child process management in the context of gevent")
15215 (description "Usage of Python's multiprocessing package in a
15216 gevent-powered application may raise problems. With @code{gipc},
15217 process-based child processes can safely be created anywhere within a
15218 gevent-powered application.")
15219 (license license:expat)))
15220
15221 (define-public python2-gipc
15222 (package-with-python2 python-gipc))
15223
15224 (define-public python-fusepy
15225 (package
15226 (name "python-fusepy")
15227 (version "2.0.4")
15228 (source
15229 (origin
15230 (method url-fetch)
15231 (uri (pypi-uri "fusepy" version))
15232 (sha256
15233 (base32
15234 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
15235 (build-system python-build-system)
15236 (arguments
15237 `(#:phases
15238 (modify-phases %standard-phases
15239 (add-before 'build 'set-library-file-name
15240 (lambda* (#:key inputs #:allow-other-keys)
15241 (let ((fuse (assoc-ref inputs "fuse")))
15242 (substitute* "fuse.py"
15243 (("find_library\\('fuse'\\)")
15244 (string-append "'" fuse "/lib/libfuse.so'")))
15245 #t))))))
15246 (propagated-inputs
15247 `(("fuse" ,fuse)))
15248 (home-page "https://github.com/fusepy/fusepy")
15249 (synopsis "Simple ctypes bindings for FUSE")
15250 (description "Python module that provides a simple interface to FUSE and
15251 MacFUSE. The binding is created using the standard @code{ctypes} library.")
15252 (license license:isc)))
15253
15254 (define-public python2-fusepy
15255 (package-with-python2 python-fusepy))
15256
15257 (define-public python2-gdrivefs
15258 (package
15259 (name "python2-gdrivefs")
15260 (version "0.14.9")
15261 (source
15262 (origin
15263 (method url-fetch)
15264 (uri (pypi-uri "gdrivefs" version))
15265 (sha256
15266 (base32
15267 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
15268 (build-system python-build-system)
15269 (arguments
15270 `(#:python ,python-2
15271 #:phases
15272 (modify-phases %standard-phases
15273 (add-before 'build 'patch-setup-py
15274 (lambda _
15275 ;; Update requirements from dependency==version
15276 ;; to dependency>=version
15277 (substitute* "gdrivefs/resources/requirements.txt"
15278 (("==") ">="))
15279 #t)))))
15280 (native-inputs
15281 `(("python2-gipc" ,python2-gipc)
15282 ("python2-gevent" ,python2-gevent)
15283 ("python2-greenlet" ,python2-greenlet)
15284 ("python2-httplib2" ,python2-httplib2)
15285 ("python2-uritemplate" ,python2-uritemplate)
15286 ("python2-oauth2client" ,python2-oauth2client)
15287 ("python2-six" ,python2-six)))
15288 (propagated-inputs
15289 `(("python2-dateutil" ,python2-dateutil)
15290 ("python2-fusepy" ,python2-fusepy)
15291 ("python2-google-api-client" ,python2-google-api-client)))
15292 (home-page "https://github.com/dsoprea/GDriveFS")
15293 (synopsis "Mount Google Drive as a local file system")
15294 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
15295 under Python 2.7.")
15296 (license license:gpl2)))
15297
15298 (define-public pybind11
15299 (package
15300 (name "pybind11")
15301 (version "2.3.0")
15302 (source (origin
15303 (method git-fetch)
15304 (uri (git-reference
15305 (url "https://github.com/pybind/pybind11.git")
15306 (commit (string-append "v" version))))
15307 (sha256
15308 (base32
15309 "11b6dniri8m05spfd2a19irz82shf4sdca73566bniggrf3zclnf"))
15310 (file-name (git-file-name name version))))
15311 (build-system cmake-build-system)
15312 (native-inputs
15313 `(("python" ,python)
15314 ("python-pytest" ,python-pytest)))
15315 (arguments
15316 `(#:test-target "check"))
15317 (home-page "https://github.com/pybind/pybind11/")
15318 (synopsis "Seamless operability between C++11 and Python")
15319 (description "pybind11 is a lightweight header-only library that exposes
15320 C++ types in Python and vice versa, mainly to create Python bindings of
15321 existing C++ code. Its goals and syntax are similar to the excellent
15322 Boost.Python library by David Abrahams: to minimize boilerplate code in
15323 traditional extension modules by inferring type information using compile-time
15324 introspection.")
15325 (license license:expat)))
15326
15327 (define-public python-fasteners
15328 (package
15329 (name "python-fasteners")
15330 (version "0.14.1")
15331 (source
15332 (origin
15333 (method url-fetch)
15334 (uri (pypi-uri "fasteners" version))
15335 (sha256
15336 (base32
15337 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
15338 (build-system python-build-system)
15339 (propagated-inputs
15340 `(("python-monotonic" ,python-monotonic)
15341 ("python-six" ,python-six)
15342 ("python-testtools" ,python-testtools)))
15343 (home-page "https://github.com/harlowja/fasteners")
15344 (synopsis "Python package that provides useful locks")
15345 (description
15346 "This package provides a Python program that provides following locks:
15347
15348 @itemize
15349 @item Locking decorator
15350 @item Reader-writer locks
15351 @item Inter-process locks
15352 @item Generic helpers
15353 @end itemize\n")
15354 (properties `((python2-variant . ,(delay python2-fasteners))))
15355 (license license:asl2.0)))
15356
15357 (define-public python2-fasteners
15358 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
15359 (package
15360 (inherit base)
15361 (propagated-inputs
15362 `(("python2-futures" ,python2-futures)
15363 ,@(package-propagated-inputs base))))))
15364
15365 (define-public python-requests-file
15366 (package
15367 (name "python-requests-file")
15368 (version "1.4.3")
15369 (source
15370 (origin
15371 (method url-fetch)
15372 (uri (pypi-uri "requests-file" version))
15373 (sha256
15374 (base32
15375 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
15376 (build-system python-build-system)
15377 (propagated-inputs
15378 `(("python-requests" ,python-requests)
15379 ("python-six" ,python-six)))
15380 (home-page
15381 "https://github.com/dashea/requests-file")
15382 (synopsis "File transport adapter for Requests")
15383 (description
15384 "Requests-File is a transport adapter for use with the Requests Python
15385 library to allow local file system access via @code{file://} URLs.")
15386 (license license:asl2.0)))
15387
15388 (define-public python2-requests-file
15389 (package-with-python2 python-requests-file))
15390
15391 (define-public python-tldextract
15392 (package
15393 (name "python-tldextract")
15394 (version "2.2.0")
15395 (source
15396 (origin
15397 (method url-fetch)
15398 (uri (pypi-uri "tldextract" version))
15399 (sha256
15400 (base32
15401 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
15402 (build-system python-build-system)
15403 (native-inputs
15404 `(("python-pytest" ,python-pytest)
15405 ("python-responses" ,python-responses)))
15406 (propagated-inputs
15407 `(("python-idna" ,python-idna)
15408 ("python-requests" ,python-requests)
15409 ("python-requests-file" ,python-requests-file)))
15410 (home-page
15411 "https://github.com/john-kurkowski/tldextract")
15412 (synopsis
15413 "Separate the TLD from the registered domain and subdomains of a URL")
15414 (description
15415 "TLDExtract accurately separates the TLD from the registered domain and
15416 subdomains of a URL, using the Public Suffix List. By default, this includes
15417 the public ICANN TLDs and their exceptions. It can optionally support the
15418 Public Suffix List's private domains as well.")
15419 (license license:bsd-3)))
15420
15421 (define-public python2-tldextract
15422 (package-with-python2 python-tldextract))
15423
15424 (define-public python-pynamecheap
15425 (package
15426 (name "python-pynamecheap")
15427 (version "0.0.3")
15428 (source
15429 (origin
15430 (method url-fetch)
15431 (uri (pypi-uri "PyNamecheap" version))
15432 (sha256
15433 (base32
15434 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
15435 (build-system python-build-system)
15436 (propagated-inputs
15437 `(("python-requests" ,python-requests)))
15438 (home-page
15439 "https://github.com/Bemmu/PyNamecheap")
15440 (synopsis
15441 "Namecheap API client in Python")
15442 (description
15443 "PyNamecheap is a Namecheap API client in Python.")
15444 (license license:expat)))
15445
15446 (define-public python2-pynamecheap
15447 (package-with-python2 python-pynamecheap))
15448
15449 (define-public python-dns-lexicon
15450 (package
15451 (name "python-dns-lexicon")
15452 (version "2.4.0")
15453 (source
15454 (origin
15455 (method url-fetch)
15456 (uri (pypi-uri "dns-lexicon" version))
15457 (sha256
15458 (base32
15459 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
15460 (build-system python-build-system)
15461 (arguments
15462 `(#:tests? #f)) ;requires internet access
15463 (propagated-inputs
15464 `(("python-future" ,python-future)
15465 ("python-pynamecheap" ,python-pynamecheap)
15466 ("python-requests" ,python-requests)
15467 ("python-tldextract" ,python-tldextract)
15468 ("python-urllib3" ,python-urllib3)))
15469 (home-page "https://github.com/AnalogJ/lexicon")
15470 (synopsis
15471 "Manipulate DNS records on various DNS providers")
15472 (description
15473 "Lexicon provides a way to manipulate DNS records on multiple DNS
15474 providers in a standardized way. It has a CLI but it can also be used as a
15475 Python library. It was designed to be used in automation, specifically with
15476 Let's Encrypt.")
15477 (license license:expat)))
15478
15479 (define-public python2-dns-lexicon
15480 (package-with-python2 python-dns-lexicon))
15481
15482 (define-public python-commandlines
15483 (package
15484 (name "python-commandlines")
15485 (version "0.4.1")
15486 (source
15487 (origin
15488 (method url-fetch)
15489 (uri (pypi-uri "commandlines" version))
15490 (sha256
15491 (base32
15492 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15493 (build-system python-build-system)
15494 (home-page "https://github.com/chrissimpkins/commandlines")
15495 (synopsis "Command line argument to object parsing library")
15496 (description
15497 "@code{Commandlines} is a Python library for command line application
15498 development that supports command line argument parsing, command string
15499 validation testing and application logic.")
15500 (license license:expat)))
15501
15502 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15503 ;; python-numba. They have a very unflexible relationship.
15504 (define-public python-numba
15505 (package
15506 (name "python-numba")
15507 (version "0.42.0")
15508 (source
15509 (origin
15510 (method url-fetch)
15511 (uri (pypi-uri "numba" version))
15512 (sha256
15513 (base32
15514 "03rqdfx0512lcri2bcpngx5k3jwfbqnanqj3n19c7d6h6hqxvq9x"))))
15515 (build-system python-build-system)
15516 (arguments
15517 `(#:modules ((guix build utils)
15518 (guix build python-build-system)
15519 (ice-9 ftw)
15520 (srfi srfi-1)
15521 (srfi srfi-26))
15522 #:phases
15523 (modify-phases %standard-phases
15524 (add-after 'unpack 'disable-proprietary-features
15525 (lambda _
15526 (setenv "NUMBA_DISABLE_HSA" "1")
15527 (setenv "NUMBA_DISABLE_CUDA" "1")
15528 #t))
15529 (add-after 'unpack 'remove-failing-tests
15530 (lambda _
15531 ;; FIXME: these tests fail for unknown reasons:
15532 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15533 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15534 (substitute* "numba/tests/test_dispatcher.py"
15535 (("def test(_non_writable_pycache)" _ m)
15536 (string-append "def guix_skip" m))
15537 (("def test(_non_creatable_pycache)" _ m)
15538 (string-append "def guix_skip" m))
15539 (("def test(_frozen)" _ m)
15540 (string-append "def guix_skip" m)))
15541
15542 ;; These tests fail because we don't run the tests from the build
15543 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
15544 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
15545 (substitute* "numba/tests/test_pycc.py"
15546 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15547 (string-append "def guix_skip" m)))
15548 #t))
15549 (replace 'check
15550 (lambda _
15551 (let ((cwd (getcwd)))
15552 (setenv "PYTHONPATH"
15553 (string-append cwd "/build/"
15554 (find (cut string-prefix? "lib" <>)
15555 (scandir (string-append cwd "/build")))
15556 ":"
15557 (getenv "PYTHONPATH")))
15558 ;; Something is wrong with the PYTHONPATH when running the
15559 ;; tests from the build directory, as it complains about not being
15560 ;; able to import certain modules.
15561 (with-directory-excursion "/tmp"
15562 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15563 #t)))))
15564 (propagated-inputs
15565 `(("python-llvmlite" ,python-llvmlite)
15566 ("python-numpy" ,python-numpy)
15567 ("python-singledispatch" ,python-singledispatch)))
15568 ;; Needed for tests.
15569 (inputs
15570 `(("python-jinja2" ,python-jinja2)
15571 ("python-pygments" ,python-pygments)))
15572 (home-page "https://numba.pydata.org")
15573 (synopsis "Compile Python code using LLVM")
15574 (description "Numba gives you the power to speed up your applications with
15575 high performance functions written directly in Python. With a few
15576 annotations, array-oriented and math-heavy Python code can be just-in-time
15577 compiled to native machine instructions, similar in performance to C, C++ and
15578 Fortran, without having to switch languages or Python interpreters.
15579
15580 Numba works by generating optimized machine code using the LLVM compiler
15581 infrastructure at import time, runtime, or statically (using the included pycc
15582 tool).")
15583 (license license:bsd-3)))
15584
15585 (define-public python-anndata
15586 (package
15587 (name "python-anndata")
15588 (version "0.6.18")
15589 (source
15590 (origin
15591 (method url-fetch)
15592 (uri (pypi-uri "anndata" version))
15593 (sha256
15594 (base32
15595 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
15596 (build-system python-build-system)
15597 (propagated-inputs
15598 `(("python-h5py" ,python-h5py)
15599 ("python-natsort" ,python-natsort)
15600 ("python-pandas" ,python-pandas)
15601 ("python-scipy" ,python-scipy)))
15602 (home-page "https://github.com/theislab/anndata")
15603 (synopsis "Annotated data for data analysis pipelines")
15604 (description "Anndata is a package for simple (functional) high-level APIs
15605 for data analysis pipelines. In this context, it provides an efficient,
15606 scalable way of keeping track of data together with learned annotations and
15607 reduces the code overhead typically encountered when using a mostly
15608 object-oriented library such as @code{scikit-learn}.")
15609 (license license:bsd-3)))
15610
15611 (define-public python-dill
15612 (package
15613 (name "python-dill")
15614 (version "0.2.9")
15615 (source
15616 (origin
15617 (method url-fetch)
15618 (uri (pypi-uri "dill" version))
15619 (sha256
15620 (base32 "0vwqyi6hyz2r29zydc78dqymkbc5y7gia16xcdh215cikxph9mpn"))))
15621 (build-system python-build-system)
15622 ;; FIXME: The check phase fails with "don't know how to make test from: …".
15623 (arguments '(#:tests? #f))
15624 (home-page "https://pypi.org/project/dill")
15625 (synopsis "Serialize all of Python")
15626 (description "Dill extends Python's @code{pickle} module for serializing
15627 and de-serializing Python objects to the majority of the built-in Python
15628 types. Dill provides the user the same interface as the @code{pickle} module,
15629 and also includes some additional features. In addition to pickling Python
15630 objects, @code{dill} provides the ability to save the state of an interpreter
15631 session in a single command. Hence, it would be feasible to save a
15632 interpreter session, close the interpreter, ship the pickled file to another
15633 computer, open a new interpreter, unpickle the session and thus continue from
15634 the saved state of the original interpreter session.")
15635 (license license:bsd-3)))
15636
15637 (define-public python-multiprocess
15638 (package
15639 (name "python-multiprocess")
15640 (version "0.70.6.1")
15641 (source
15642 (origin
15643 (method url-fetch)
15644 (uri (pypi-uri "multiprocess" version))
15645 (sha256
15646 (base32
15647 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
15648 (build-system python-build-system)
15649 (propagated-inputs
15650 `(("python-dill" ,python-dill)))
15651 (home-page "https://pypi.org/project/multiprocess")
15652 (synopsis "Multiprocessing and multithreading in Python")
15653 (description
15654 "This package is a fork of the multiprocessing Python package, a package
15655 which supports the spawning of processes using the API of the standard
15656 library's @code{threading} module.")
15657 (license license:bsd-3)))
15658
15659 (define-public python-toolz
15660 (package
15661 (name "python-toolz")
15662 (version "0.9.0")
15663 (source
15664 (origin
15665 (method url-fetch)
15666 (uri (pypi-uri "toolz" version))
15667 (sha256
15668 (base32
15669 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
15670 (build-system python-build-system)
15671 ;; FIXME: tests cannot be computed: "Can't perform this operation for
15672 ;; unregistered loader type"
15673 (arguments '(#:tests? #f))
15674 (home-page "https://github.com/pytoolz/toolz/")
15675 (synopsis "List processing tools and functional utilities")
15676 (description
15677 "This package provides a set of utility functions for iterators,
15678 functions, and dictionaries.")
15679 (license license:bsd-3)))
15680
15681 (define-public python2-toolz
15682 (package-with-python2 python-toolz))
15683
15684 (define-public python-cytoolz
15685 (package
15686 (name "python-cytoolz")
15687 (version "0.9.0.1")
15688 (source
15689 (origin
15690 (method url-fetch)
15691 (uri (pypi-uri "cytoolz" version))
15692 (sha256
15693 (base32
15694 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
15695 (build-system python-build-system)
15696 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
15697 ;; 'exceptions'"
15698 (arguments '(#:tests? #f))
15699 (propagated-inputs
15700 `(("python-toolz" ,python-toolz)))
15701 (native-inputs
15702 `(("python-cython" ,python-cython)))
15703 (home-page "https://github.com/pytoolz/cytoolz")
15704 (synopsis "High performance functional utilities")
15705 (description
15706 "The cytoolz package implements the same API as provided by toolz. The
15707 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
15708 that is accessible to other projects developed in Cython.")
15709 (license license:bsd-3)))
15710
15711 (define-public python-sortedcontainers
15712 (package
15713 (name "python-sortedcontainers")
15714 (version "2.0.4")
15715 (source
15716 (origin
15717 (method url-fetch)
15718 (uri (pypi-uri "sortedcontainers" version))
15719 (sha256
15720 (base32
15721 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
15722 (build-system python-build-system)
15723 (native-inputs
15724 `(("python-tox" ,python-tox)))
15725 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
15726 (synopsis "Sorted List, Sorted Dict, Sorted Set")
15727 (description
15728 "This package provides a sorted collections library, written in
15729 pure-Python.")
15730 (license license:asl2.0)))
15731
15732 (define-public python-cloudpickle
15733 (package
15734 (name "python-cloudpickle")
15735 (version "0.6.1")
15736 (source
15737 (origin
15738 (method url-fetch)
15739 (uri (pypi-uri "cloudpickle" version))
15740 (sha256
15741 (base32
15742 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
15743 (build-system python-build-system)
15744 ;; FIXME: there are 5 errors in 122 tests:
15745 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
15746 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
15747 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15748 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15749 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
15750 ;; TypeError: cannot serialize '_io.BufferedRandom' object
15751 (arguments '(#:tests? #f))
15752 (native-inputs
15753 `(("python-pytest" ,python-pytest)
15754 ("python-mock" ,python-mock)
15755 ("python-tornado" ,python-tornado)))
15756 (home-page "https://github.com/cloudpipe/cloudpickle")
15757 (synopsis "Extended pickling support for Python objects")
15758 (description
15759 "Cloudpickle makes it possible to serialize Python constructs not
15760 supported by the default pickle module from the Python standard library. It
15761 is especially useful for cluster computing where Python expressions are
15762 shipped over the network to execute on remote hosts, possibly close to the
15763 data.")
15764 (license license:bsd-3)))
15765
15766 (define-public python2-cloudpickle
15767 (package-with-python2 python-cloudpickle))
15768
15769 (define-public python-locket
15770 (package
15771 (name "python-locket")
15772 (version "0.2.0")
15773 (source
15774 (origin
15775 (method url-fetch)
15776 (uri (pypi-uri "locket" version))
15777 (sha256
15778 (base32
15779 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
15780 (build-system python-build-system)
15781 (home-page "https://github.com/mwilliamson/locket.py")
15782 (synopsis "File-based locks for Python")
15783 (description
15784 "Locket implements a lock that can be used by multiple processes provided
15785 they use the same path.")
15786 (license license:bsd-2)))
15787
15788 (define-public python2-locket
15789 (package-with-python2 python-locket))
15790
15791 (define-public python-blosc
15792 (package
15793 (name "python-blosc")
15794 (version "1.5.1")
15795 (source
15796 (origin
15797 (method url-fetch)
15798 (uri (pypi-uri "blosc" version))
15799 (sha256
15800 (base32
15801 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
15802 (build-system python-build-system)
15803 ;; FIXME: all tests pass, but then this error is printed:
15804 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
15805 (arguments '(#:tests? #f))
15806 (propagated-inputs
15807 `(("python-numpy" ,python-numpy)))
15808 (home-page "https://github.com/blosc/python-blosc")
15809 (synopsis "Python wrapper for the Blosc data compressor library")
15810 (description "Blosc is a high performance compressor optimized for binary
15811 data. It has been designed to transmit data to the processor cache faster
15812 than the traditional, non-compressed, direct memory fetch approach via a
15813 @code{memcpy()} system call.
15814
15815 Blosc works well for compressing numerical arrays that contains data with
15816 relatively low entropy, like sparse data, time series, grids with
15817 regular-spaced values, etc.
15818
15819 This Python package wraps the Blosc library.")
15820 (license license:bsd-3)))
15821
15822 (define-public python2-blosc
15823 (package-with-python2 python-blosc))
15824
15825 (define-public python-partd
15826 (package
15827 (name "python-partd")
15828 (version "0.3.9")
15829 (source
15830 (origin
15831 (method url-fetch)
15832 (uri (pypi-uri "partd" version))
15833 (sha256
15834 (base32
15835 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
15836 (build-system python-build-system)
15837 (propagated-inputs
15838 `(("python-blosc" ,python-blosc)
15839 ("python-locket" ,python-locket)
15840 ("python-numpy" ,python-numpy)
15841 ("python-pandas" ,python-pandas)
15842 ("python-pyzmq" ,python-pyzmq)
15843 ("python-toolz" ,python-toolz)))
15844 (home-page "https://github.com/dask/partd/")
15845 (synopsis "Appendable key-value storage")
15846 (description "Partd stores key-value pairs. Values are raw bytes. We
15847 append on old values. Partd excels at shuffling operations.")
15848 (license license:bsd-3)))
15849
15850 (define-public python2-partd
15851 (package-with-python2 python-partd))
15852
15853 (define-public python-dask
15854 (package
15855 (name "python-dask")
15856 (version "1.2.2")
15857 (source
15858 (origin
15859 (method url-fetch)
15860 (uri (pypi-uri "dask" version))
15861 (sha256
15862 (base32 "0b29gvf96gmp20wicly3v3mhyc93zbm3mdv935fka6x0wax7cy2y"))))
15863 (build-system python-build-system)
15864 ;; A single test out of 5000+ fails. This test is marked as xfail when
15865 ;; pytest-xdist is used.
15866 (arguments
15867 `(#:phases
15868 (modify-phases %standard-phases
15869 (add-after 'unpack 'disable-broken-test
15870 (lambda _
15871 (substitute* "dask/tests/test_threaded.py"
15872 (("def test_interrupt\\(\\)" m)
15873 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15874 m)))
15875 (when (which "python2")
15876 ;; This test fails with recent Pandas:
15877 ;; <https://github.com/dask/dask/issues/3794>.
15878 (substitute* "dask/dataframe/tests/test_dataframe.py"
15879 (("def test_info\\(\\)" m)
15880 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15881 m))))
15882 #t))
15883 (replace 'check
15884 (lambda _ (invoke "pytest" "-vv"))))))
15885 (propagated-inputs
15886 `(("python-cloudpickle" ,python-cloudpickle)
15887 ("python-numpy" ,python-numpy)
15888 ("python-pandas" ,python-pandas)
15889 ("python-partd" ,python-partd)
15890 ("python-toolz" ,python-toolz)
15891 ("python-pyyaml" ,python-pyyaml)))
15892 (native-inputs
15893 `(("python-pytest" ,python-pytest)
15894 ("python-pytest-runner" ,python-pytest-runner)))
15895 (home-page "https://github.com/dask/dask/")
15896 (synopsis "Parallel computing with task scheduling")
15897 (description
15898 "Dask is a flexible parallel computing library for analytics. It
15899 consists of two components: dynamic task scheduling optimized for computation,
15900 and large data collections like parallel arrays, dataframes, and lists that
15901 extend common interfaces like NumPy, Pandas, or Python iterators to
15902 larger-than-memory or distributed environments. These parallel collections
15903 run on top of the dynamic task schedulers. ")
15904 (license license:bsd-3)))
15905
15906 (define-public python2-dask
15907 (package-with-python2 python-dask))
15908
15909 (define-public python-ilinkedlist
15910 (package
15911 (name "python-ilinkedlist")
15912 (version "0.4.0")
15913 (source
15914 (origin
15915 (method url-fetch)
15916 (uri (pypi-uri "ilinkedlist" version))
15917 (sha256
15918 (base32
15919 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
15920 (build-system python-build-system)
15921 (native-inputs `(("python-pytest" ,python-pytest)))
15922 (inputs `(("python" ,python)))
15923 (home-page "https://github.com/luther9/ilinkedlist-py")
15924 (synopsis "Immutable linked list library")
15925 (description
15926 "This is a implementation of immutable linked lists for Python. It
15927 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
15928 Since a linked list is treated as immutable, it is hashable, and its length
15929 can be retrieved in constant time. Some of the terminology is inspired by
15930 LISP. It is possible to create an improper list by creating a @code{Pair}
15931 with a non-list @code{cdr}.")
15932 (license license:gpl3+)))
15933
15934 (define-public python-readlike
15935 (package
15936 (name "python-readlike")
15937 (version "0.1.3")
15938 (source
15939 (origin
15940 (method url-fetch)
15941 (uri (pypi-uri "readlike" version))
15942 (sha256
15943 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
15944 (build-system python-build-system)
15945 (home-page "https://github.com/jangler/readlike")
15946 (synopsis "GNU Readline-like line editing module")
15947 (description
15948 "This Python module provides line editing functions similar to the default
15949 Emacs-style ones of GNU Readline. Unlike the Python standard library's
15950 @code{readline} package, this one allows access to those capabilties in settings
15951 outside of a standard command-line interface. It is especially well-suited to
15952 interfacing with Urwid, due to a shared syntax for describing key inputs.
15953
15954 Currently, all stateless Readline commands are implemented. Yanking and history
15955 are not supported.")
15956 (license license:expat)))
15957
15958 (define-public python2-readlike
15959 (package-with-python2 python-readlike))
15960
15961 (define-public python-reparser
15962 (package
15963 (name "python-reparser")
15964 (version "1.4.3")
15965 (source
15966 (origin
15967 (method url-fetch)
15968 (uri (pypi-uri "ReParser" version))
15969 (sha256
15970 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
15971 (build-system python-build-system)
15972 (home-page "https://github.com/xmikos/reparser")
15973 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
15974 (description
15975 "This Python library provides a simple lexer/parser for inline markup based
15976 on regular expressions.")
15977 (license license:expat)))
15978
15979 (define-public python2-reparser
15980 (let ((reparser (package-with-python2
15981 (strip-python2-variant python-reparser))))
15982 (package (inherit reparser)
15983 (propagated-inputs
15984 `(("python2-enum34" ,python2-enum34)
15985 ,@(package-propagated-inputs reparser))))))
15986
15987 (define-public python-precis-i18n
15988 (package
15989 (name "python-precis-i18n")
15990 (version "1.0.0")
15991 (source
15992 (origin
15993 (method url-fetch)
15994 (uri (pypi-uri "precis_i18n" version))
15995 (sha256
15996 (base32
15997 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
15998 (build-system python-build-system)
15999 (home-page "https://github.com/byllyfish/precis_i18n")
16000 (synopsis "Implementation of the PRECIS framework")
16001 (description
16002 "This module implements the PRECIS Framework as described in RFC 8264,
16003 RFC 8265 and RFC 8266.")
16004 (license license:expat)))
16005
16006 (define-public python-absl-py
16007 (package
16008 (name "python-absl-py")
16009 (version "0.6.1")
16010 (source
16011 (origin
16012 (method url-fetch)
16013 (uri (pypi-uri "absl-py" version))
16014 (sha256
16015 (base32
16016 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
16017 (build-system python-build-system)
16018 (propagated-inputs
16019 `(("python-six" ,python-six)))
16020 (home-page "https://github.com/abseil/abseil-py")
16021 (synopsis "Abseil Python common libraries")
16022 (description
16023 "This package provides the Abseil Python Common Libraries, a collection
16024 of Python libraries for building Python applications.")
16025 (license license:asl2.0)))
16026
16027 (define-public python-astor
16028 (package
16029 (name "python-astor")
16030 (version "0.7.1")
16031 (source
16032 (origin
16033 (method url-fetch)
16034 (uri (pypi-uri "astor" version))
16035 (sha256
16036 (base32
16037 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
16038 (build-system python-build-system)
16039 ;; FIXME: There are two errors and two test failures.
16040 (arguments `(#:tests? #f))
16041 (home-page "https://github.com/berkerpeksag/astor")
16042 (synopsis "Read and write Python ASTs")
16043 (description "Astor is designed to allow easy manipulation of Python
16044 source via the Abstract Syntax Tree.")
16045 (license license:bsd-3)))
16046
16047 (define-public python2-astor
16048 (package-with-python2 python-astor))
16049
16050 (define-public python-grpcio
16051 (package
16052 (name "python-grpcio")
16053 (version "1.17.1")
16054 (source
16055 (origin
16056 (method url-fetch)
16057 (uri (pypi-uri "grpcio" version))
16058 (sha256
16059 (base32
16060 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
16061 (build-system python-build-system)
16062 (propagated-inputs
16063 `(("python-six" ,python-six)))
16064 (home-page "https://grpc.io")
16065 (synopsis "HTTP/2-based RPC framework")
16066 (description "This package provides a Python library for communicating
16067 with the HTTP/2-based RPC framework gRPC.")
16068 (license license:asl2.0)))
16069
16070 (define-public python-astunparse
16071 (package
16072 (name "python-astunparse")
16073 (version "1.6.2")
16074 (source
16075 (origin
16076 (method url-fetch)
16077 (uri (pypi-uri "astunparse" version))
16078 (sha256
16079 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
16080 (build-system python-build-system)
16081 (arguments '(#:tests? #f)) ; there are none
16082 (propagated-inputs
16083 `(("python-six" ,python-six)
16084 ("python-wheel" ,python-wheel)))
16085 (home-page "https://github.com/simonpercivall/astunparse")
16086 (synopsis "AST unparser for Python")
16087 (description "This package provides an AST unparser for Python. It is a
16088 factored out version of @code{unparse} found in the Python source
16089 distribution.")
16090 (license license:bsd-3)))
16091
16092 (define-public python-gast
16093 (package
16094 (name "python-gast")
16095 (version "0.2.2")
16096 (source
16097 (origin
16098 (method url-fetch)
16099 (uri (pypi-uri "gast" version))
16100 (sha256
16101 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
16102 (build-system python-build-system)
16103 (propagated-inputs
16104 `(("python-astunparse" ,python-astunparse)))
16105 (home-page "https://pypi.org/project/gast/")
16106 (synopsis "Generic Python AST that abstracts the underlying Python version")
16107 (description
16108 "GAST provides a compatibility layer between the AST of various Python
16109 versions, as produced by @code{ast.parse} from the standard @code{ast}
16110 module.")
16111 (license license:bsd-3)))
16112
16113 (define-public python-wikidata
16114 (package
16115 (name "python-wikidata")
16116 (version "0.6.1")
16117 (source
16118 (origin
16119 (method url-fetch)
16120 (uri (pypi-uri "Wikidata" version))
16121 (sha256
16122 (base32
16123 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
16124 (build-system python-build-system)
16125 (propagated-inputs
16126 `(("python-babel" ,python-babel)))
16127 (home-page "https://github.com/dahlia/wikidata")
16128 (synopsis "Wikidata client library")
16129 (description
16130 "This package provides a Python interface to
16131 @url{https://www.wikidata.org/, Wikidata}.")
16132 (properties '((upstream-name . "Wikidata")))
16133 (license license:gpl3+)))
16134
16135 (define-public python-doctest-ignore-unicode
16136 (package
16137 (name "python-doctest-ignore-unicode")
16138 (version "0.1.2")
16139 (source
16140 (origin
16141 (method url-fetch)
16142 (uri (pypi-uri "doctest-ignore-unicode" version))
16143 (sha256
16144 (base32
16145 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
16146 (build-system python-build-system)
16147 (native-inputs
16148 `(("python-nose" ,python-nose)))
16149 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
16150 (synopsis "Ignore Unicode literal prefixes in doctests")
16151 (description
16152 "This package adds support for a flag to ignore Unicode literal prefixes
16153 in doctests.")
16154 (license license:asl2.0)))
16155
16156 (define-public python-attr
16157 (package
16158 (name "python-attr")
16159 (version "0.3.1")
16160 (source
16161 (origin
16162 (method url-fetch)
16163 (uri (pypi-uri "attr" version))
16164 (sha256
16165 (base32
16166 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
16167 (build-system python-build-system)
16168 (home-page "https://github.com/denis-ryzhkov/attr")
16169 (synopsis "Decorator for attributes of target function or class")
16170 (description "Simple decorator to set attributes of target function or
16171 class in a @acronym{DRY, Don't Repeat Yourself} way.")
16172 (license license:expat)))
16173
16174 (define-public python-construct
16175 (package
16176 (name "python-construct")
16177 (version "2.9.45")
16178 (source
16179 (origin
16180 (method url-fetch)
16181 (uri (pypi-uri "construct" version))
16182 (sha256
16183 (base32
16184 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
16185 (build-system python-build-system)
16186 (arguments
16187 `(#:tests? #f)) ; No tests exist.
16188 (propagated-inputs
16189 `(("python-extras" ,python-extras)
16190 ("python-arrow" ,python-arrow)
16191 ("python-numpy" ,python-numpy)
16192 ("python-ruamel.yaml" ,python-ruamel.yaml)))
16193 (home-page "http://construct.readthedocs.io")
16194 (synopsis "Declarative and symmetrical parser and builder for binary data")
16195 (description
16196 "This package provides both simple, atomic constructs (such as
16197 integers of various sizes), as well as composite ones which allow you
16198 form hierarchical and sequential structures of increasing complexity.
16199 It features bit and byte granularity, easy debugging and testing, an
16200 easy-to-extend subclass system, and lots of primitive constructs to
16201 make your work easier.")
16202 (license license:expat)))
16203
16204 (define-public python-humanize
16205 (package
16206 (name "python-humanize")
16207 (version "0.5.1")
16208 (source
16209 (origin
16210 (method url-fetch)
16211 (uri (pypi-uri "humanize" version))
16212 (sha256
16213 (base32
16214 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
16215 (arguments
16216 '(#:tests? #f)) ; tests not in pypi archive
16217 (build-system python-build-system)
16218 (home-page "https://github.com/jmoiron/humanize")
16219 (synopsis "Print numerical information in a human-readable form")
16220 (description "This package provides a Python module that displays numbers
16221 and dates in \"human readable\" forms. For example, it would display
16222 \"12345591313\" as \"12.3 billion\".")
16223 (license license:expat)))
16224
16225 (define-public python-txaio
16226 (package
16227 (name "python-txaio")
16228 (version "18.8.1")
16229 (source
16230 (origin
16231 (method url-fetch)
16232 (uri (pypi-uri "txaio" version))
16233 (sha256
16234 (base32
16235 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
16236 (build-system python-build-system)
16237 (propagated-inputs
16238 `(("python-twisted" ,python-twisted)
16239 ("python-six" ,python-six)))
16240 (home-page "https://github.com/crossbario/txaio")
16241 (synopsis "Compatibility layer between Python asyncio and Twisted")
16242 (description "Txaio provides a compatibility layer between the Python
16243 @code{asyncio} module and @code{Twisted}.")
16244 (license license:expat)))
16245
16246 (define-public python-toolshed
16247 (package
16248 (name "python-toolshed")
16249 (version "0.4.6")
16250 (source
16251 (origin
16252 (method url-fetch)
16253 (uri (pypi-uri "toolshed" version))
16254 (sha256
16255 (base32
16256 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
16257 (build-system python-build-system)
16258 (native-inputs
16259 `(("python-nose" ,python-nose)))
16260 (home-page "https://github.com/brentp/toolshed/")
16261 (synopsis "Collection of modules and functions for working with data")
16262 (description "This is a collection of well-tested, simple modules and
16263 functions that aim to reduce boilerplate when working with data.")
16264 (license license:bsd-2)))
16265
16266 (define-public python-annoy
16267 (package
16268 (name "python-annoy")
16269 (version "1.15.1")
16270 (source
16271 (origin
16272 (method url-fetch)
16273 (uri (pypi-uri "annoy" version))
16274 (sha256
16275 (base32
16276 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
16277 (build-system python-build-system)
16278 (native-inputs
16279 `(("python-nose" ,python-nose)))
16280 (home-page "https://github.com/spotify/annoy/")
16281 (synopsis "Approximate nearest neighbors library")
16282 (description
16283 "Annoy is a C++ library with Python bindings to search for points in
16284 space that are close to a given query point. It also creates large read-only
16285 file-based data structures that are @code{mmap}ped into memory so that many
16286 processes may share the same data.")
16287 (license license:asl2.0)))
16288
16289 (define-public python-pylzma
16290 (package
16291 (name "python-pylzma")
16292 (version "0.5.0")
16293 (source
16294 (origin
16295 (method url-fetch)
16296 (uri (pypi-uri "pylzma" version))
16297 (sha256
16298 (base32
16299 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
16300 (build-system python-build-system)
16301 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
16302 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
16303 (description "This package provides Python bindings for the LZMA library
16304 by Igor Pavlov.")
16305 (license license:lgpl2.1+)))
16306
16307 (define-public python2-pylzma
16308 (package-with-python2 python-pylzma))
16309
16310 (define-public python2-zeroconf
16311 (package
16312 (name "python2-zeroconf")
16313
16314 ;; This is the last version that supports Python 2.x.
16315 (version "0.19.1")
16316 (source
16317 (origin
16318 (method url-fetch)
16319 (uri (pypi-uri "zeroconf" version))
16320 (sha256
16321 (base32
16322 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
16323 (build-system python-build-system)
16324 (arguments
16325 `(#:python ,python-2
16326 #:phases
16327 (modify-phases %standard-phases
16328 (add-after 'unpack 'patch-requires
16329 (lambda* (#:key inputs #:allow-other-keys)
16330 (substitute* "setup.py"
16331 (("enum-compat")
16332 "enum34"))
16333 #t)))))
16334 (native-inputs
16335 `(("python2-six" ,python2-six)
16336 ("python2-enum32" ,python2-enum34)
16337 ("python2-netifaces" ,python2-netifaces)
16338 ("python2-typing" ,python2-typing)))
16339 (home-page "https://github.com/jstasiak/python-zeroconf")
16340 (synopsis "Pure Python mDNS service discovery")
16341 (description
16342 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
16343 compatible).")
16344 (license license:lgpl2.1+)))
16345
16346 (define-public python-bsddb3
16347 (package
16348 (name "python-bsddb3")
16349 (version "6.2.6")
16350 (source
16351 (origin
16352 (method url-fetch)
16353 (uri (pypi-uri "bsddb3" version))
16354 (sha256
16355 (base32
16356 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
16357 (build-system python-build-system)
16358 (inputs
16359 `(("bdb" ,bdb)))
16360 (arguments
16361 '(#:phases
16362 (modify-phases %standard-phases
16363 (add-after 'unpack 'configure-locations
16364 (lambda* (#:key inputs #:allow-other-keys)
16365 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
16366 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
16367 #t))
16368 (replace 'check
16369 (lambda _
16370 (invoke "python3" "test3.py" "-v"))))))
16371 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
16372 (synopsis "Python bindings for Oracle Berkeley DB")
16373 (description
16374 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
16375 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
16376 Transaction objects, and each of these is exposed as a Python type in the
16377 bsddb3.db module. The database objects can use various access methods: btree,
16378 hash, recno, and queue. Complete support of Berkeley DB distributed
16379 transactions. Complete support for Berkeley DB Replication Manager.
16380 Complete support for Berkeley DB Base Replication. Support for RPC.")
16381 (license license:bsd-3)))
16382
16383 (define-public python-dbfread
16384 (package
16385 (name "python-dbfread")
16386 (version "2.0.7")
16387 (source (origin
16388 (method url-fetch)
16389 (uri (pypi-uri "dbfread" version))
16390 (sha256
16391 (base32
16392 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
16393 (build-system python-build-system)
16394 (native-inputs
16395 `(("python-pytest" ,python-pytest)))
16396 (home-page "https://dbfread.readthedocs.io")
16397 (synopsis "Read DBF Files with Python")
16398 (description
16399 "This library reads DBF files and returns the data as native Python data
16400 types for further processing. It is primarily intended for batch jobs and
16401 one-off scripts.")
16402 (license license:expat)))
16403
16404 (define-public python-cached-property
16405 (package
16406 (name "python-cached-property")
16407 (version "1.5.1")
16408 (source
16409 (origin
16410 (method url-fetch)
16411 (uri (pypi-uri "cached-property" version))
16412 (sha256
16413 (base32
16414 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
16415 (build-system python-build-system)
16416 (arguments
16417 `(#:phases
16418 (modify-phases %standard-phases
16419 ;; https://github.com/pydanny/cached-property/issues/131
16420 ;; recent versions of freezegun break one test
16421 (add-after 'unpack 'disable-broken-test
16422 (lambda _
16423 (substitute* "tests/test_cached_property.py"
16424 (("def test_threads_ttl_expiry\\(self\\)" m)
16425 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
16426 " " m)))
16427 #t)))))
16428 (native-inputs
16429 `(("python-freezegun" ,python-freezegun)))
16430 (home-page
16431 "https://github.com/pydanny/cached-property")
16432 (synopsis
16433 "Decorator for caching properties in classes")
16434 (description
16435 "This package provides a decorator which makes caching
16436 time-or-computationally-expensive properties quick and easy and works in Python
16437 2 or 3.")
16438 (license license:bsd-3)))
16439
16440 (define-public python-folium
16441 (package
16442 (name "python-folium")
16443 (version "0.10.0")
16444 (source
16445 (origin
16446 (method url-fetch)
16447 (uri (pypi-uri "folium" version))
16448 (sha256
16449 (base32
16450 "18fzxijsgrb95r0a8anc9ba5ijyw3nlnv3rpavfbkqa5v878x84f"))))
16451 (build-system python-build-system)
16452 (propagated-inputs
16453 `(("python-branca" ,python-branca)
16454 ("python-jinja2" ,python-jinja2)
16455 ("python-numpy" ,python-numpy)
16456 ("python-requests" ,python-requests)))
16457 (native-inputs
16458 `(("python-pytest" ,python-pytest)))
16459 (home-page "https://github.com/python-visualization/folium")
16460 (synopsis "Make beautiful maps with Leaflet.js & Python")
16461 (description "@code{folium} makes it easy to visualize data that’s been
16462 manipulated in Python on an interactive leaflet map. It enables both the
16463 binding of data to a map for @code{choropleth} visualizations as well as
16464 passing rich vector/raster/HTML visualizations as markers on the map.
16465
16466 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
16467 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
16468 supports Image, Video, GeoJSON and TopoJSON overlays.")
16469 (license license:expat)))
16470
16471 (define-public jube
16472 (package
16473 ;; This is a command-line tool, so no "python-" prefix.
16474 (name "jube")
16475 (version "2.2.2")
16476 (source (origin
16477 (method url-fetch)
16478 (uri (string-append
16479 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
16480 version))
16481 (sha256
16482 (base32
16483 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
16484 (file-name (string-append "jube-" version ".tar.gz"))))
16485 (build-system python-build-system)
16486 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
16487 (synopsis "Benchmarking environment")
16488 (description
16489 "JUBE helps perform and analyze benchmarks in a systematic way. For each
16490 benchmarked application, benchmark data is stored in a format that allows JUBE
16491 to deduct the desired information. This data can be parsed by automatic pre-
16492 and post-processing scripts that draw information and store it more densely
16493 for manual interpretation.")
16494 (license license:gpl3+)))
16495
16496 (define-public python-pyroutelib3
16497 (package
16498 (name "python-pyroutelib3")
16499 (version "1.3.post1")
16500 (source
16501 (origin
16502 (method url-fetch)
16503 (uri (pypi-uri "pyroutelib3" version))
16504 (sha256
16505 (base32
16506 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
16507 (build-system python-build-system)
16508 (propagated-inputs
16509 `(("python-dateutil" ,python-dateutil)))
16510 (home-page "https://github.com/MKuranowski/pyroutelib3")
16511 (synopsis "Library for simple routing on OSM data")
16512 (description "Library for simple routing on OSM data")
16513 (license license:gpl3+)))
16514
16515 (define-public python-elementpath
16516 (package
16517 (name "python-elementpath")
16518 (version "1.2.0")
16519 (source
16520 (origin
16521 (method url-fetch)
16522 (uri (pypi-uri "elementpath" version))
16523 (sha256
16524 (base32
16525 "1syn2z543brab23dskh3fjd9pqvz6npqbcicrs2d88dbg26xl08p"))))
16526 (build-system python-build-system)
16527 (home-page
16528 "https://github.com/sissaschool/elementpath")
16529 (synopsis
16530 "XPath 1.0/2.0 parsers and selectors for ElementTree and lxml")
16531 (description
16532 "The proposal of this package is to provide XPath 1.0 and 2.0 selectors
16533 for Python's ElementTree XML data structures, both for the standard
16534 ElementTree library and for the @uref{http://lxml.de, lxml.etree} library.
16535
16536 For lxml.etree this package can be useful for providing XPath 2.0 selectors,
16537 because lxml.etree already has it's own implementation of XPath 1.0.")
16538 (license license:expat)))
16539
16540 (define-public python-bibtexparser
16541 (package
16542 (name "python-bibtexparser")
16543 (version "1.1.0")
16544 (source
16545 (origin
16546 (method url-fetch)
16547 (uri (pypi-uri "bibtexparser" version))
16548 (sha256
16549 (base32
16550 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
16551 (build-system python-build-system)
16552 (propagated-inputs
16553 `(("python-pyparsing" ,python-pyparsing)))
16554 (native-inputs
16555 `(("python-future" ,python-future)))
16556 (home-page "https://github.com/sciunto-org/python-bibtexparser")
16557 (synopsis "Python library to parse BibTeX files")
16558 (description "BibtexParser is a Python library to parse BibTeX files.")
16559 (license (list license:bsd-3 license:lgpl3))))
16560
16561 (define-public python-distro
16562 (package
16563 (name "python-distro")
16564 (version "1.4.0")
16565 (source
16566 (origin
16567 (method url-fetch)
16568 (uri (pypi-uri "distro" version))
16569 (sha256
16570 (base32
16571 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
16572 (build-system python-build-system)
16573 (native-inputs
16574 `(("python-pytest" ,python-pytest)))
16575 (home-page "https://github.com/nir0s/distro")
16576 (synopsis
16577 "OS platform information API")
16578 (description
16579 "@code{distro} provides information about the OS distribution it runs on,
16580 such as a reliable machine-readable ID, or version information.
16581
16582 It is the recommended replacement for Python's original
16583 `platform.linux_distribution` function (which will be removed in Python 3.8).
16584 @code{distro} also provides a command-line interface to output the platform
16585 information in various formats.")
16586 (license license:asl2.0)))