gnu: python-binaryornot: Fix typo.
[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 ;;;
70 ;;; This file is part of GNU Guix.
71 ;;;
72 ;;; GNU Guix is free software; you can redistribute it and/or modify it
73 ;;; under the terms of the GNU General Public License as published by
74 ;;; the Free Software Foundation; either version 3 of the License, or (at
75 ;;; your option) any later version.
76 ;;;
77 ;;; GNU Guix is distributed in the hope that it will be useful, but
78 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
79 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
80 ;;; GNU General Public License for more details.
81 ;;;
82 ;;; You should have received a copy of the GNU General Public License
83 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
84
85 (define-module (gnu packages python-xyz)
86 #:use-module ((guix licenses) #:prefix license:)
87 #:use-module (gnu packages)
88 #:use-module (gnu packages algebra)
89 #:use-module (gnu packages adns)
90 #:use-module (gnu packages attr)
91 #:use-module (gnu packages backup)
92 #:use-module (gnu packages bash)
93 #:use-module (gnu packages check)
94 #:use-module (gnu packages compression)
95 #:use-module (gnu packages crypto)
96 #:use-module (gnu packages databases)
97 #:use-module (gnu packages dbm)
98 #:use-module (gnu packages file)
99 #:use-module (gnu packages fontutils)
100 #:use-module (gnu packages gcc)
101 #:use-module (gnu packages geo)
102 #:use-module (gnu packages ghostscript)
103 #:use-module (gnu packages gl)
104 #:use-module (gnu packages glib)
105 #:use-module (gnu packages graphviz)
106 #:use-module (gnu packages graphics)
107 #:use-module (gnu packages gstreamer)
108 #:use-module (gnu packages gtk)
109 #:use-module (gnu packages icu4c)
110 #:use-module (gnu packages image)
111 #:use-module (gnu packages imagemagick)
112 #:use-module (gnu packages libevent)
113 #:use-module (gnu packages libffi)
114 #:use-module (gnu packages linux)
115 #:use-module (gnu packages llvm)
116 #:use-module (gnu packages man)
117 #:use-module (gnu packages maths)
118 #:use-module (gnu packages monitoring)
119 #:use-module (gnu packages multiprecision)
120 #:use-module (gnu packages networking)
121 #:use-module (gnu packages ncurses)
122 #:use-module (gnu packages openstack)
123 #:use-module (gnu packages pcre)
124 #:use-module (gnu packages perl)
125 #:use-module (gnu packages pkg-config)
126 #:use-module (gnu packages python)
127 #:use-module (gnu packages python-check)
128 #:use-module (gnu packages python-compression)
129 #:use-module (gnu packages python-crypto)
130 #:use-module (gnu packages python-web)
131 #:use-module (gnu packages qt)
132 #:use-module (gnu packages readline)
133 #:use-module (gnu packages sdl)
134 #:use-module (gnu packages search)
135 #:use-module (gnu packages shells)
136 #:use-module (gnu packages sphinx)
137 #:use-module (gnu packages ssh)
138 #:use-module (gnu packages terminals)
139 #:use-module (gnu packages tex)
140 #:use-module (gnu packages texinfo)
141 #:use-module (gnu packages time)
142 #:use-module (gnu packages tls)
143 #:use-module (gnu packages version-control)
144 #:use-module (gnu packages video)
145 #:use-module (gnu packages web)
146 #:use-module (gnu packages base)
147 #:use-module (gnu packages xml)
148 #:use-module (gnu packages xorg)
149 #:use-module (gnu packages xdisorg)
150 #:use-module (gnu packages tcl)
151 #:use-module (gnu packages bdw-gc)
152 #:use-module (gnu packages serialization)
153 #:use-module (guix packages)
154 #:use-module (guix download)
155 #:use-module (guix git-download)
156 #:use-module (guix hg-download)
157 #:use-module (guix utils)
158 #:use-module (guix build-system gnu)
159 #:use-module (guix build-system cmake)
160 #:use-module (guix build-system python)
161 #:use-module (guix build-system trivial)
162 #:use-module (srfi srfi-1)
163 #:use-module (srfi srfi-26))
164
165 (define-public python-psutil
166 (package
167 (name "python-psutil")
168 (version "5.6.2")
169 (source
170 (origin
171 (method url-fetch)
172 (uri (pypi-uri "psutil" version))
173 (sha256
174 (base32
175 "1v95vb5385qscfdvphv8l2w22bmir3d7yhpi02n58v3mlqy1r3l2"))))
176 (build-system python-build-system)
177 (arguments
178 ;; FIXME: some tests does not return and times out.
179 '(#:tests? #f))
180 (home-page "https://www.github.com/giampaolo/psutil")
181 (synopsis "Library for retrieving information on running processes")
182 (description
183 "psutil (Python system and process utilities) is a library for retrieving
184 information on running processes and system utilization (CPU, memory, disks,
185 network) in Python. It is useful mainly for system monitoring, profiling and
186 limiting process resources and management of running processes. It implements
187 many functionalities offered by command line tools such as: ps, top, lsof,
188 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
189 pidof, tty, taskset, pmap.")
190 (properties `((python2-variant . ,(delay python2-psutil))))
191 (license license:bsd-3)))
192
193 (define-public python2-psutil
194 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
195 (package
196 (inherit base)
197 (propagated-inputs
198 `(("python2-enum34" ,python2-enum34) ;optional
199 ,@(package-propagated-inputs base))))))
200
201 (define-public python-shapely
202 (package
203 (name "python-shapely")
204 (version "1.6.4.post2")
205 (source
206 (origin
207 (method url-fetch)
208 (uri (pypi-uri "Shapely" version))
209 (sha256
210 (base32
211 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
212 (build-system python-build-system)
213 (native-inputs
214 `(("python-cython" ,python-cython)
215 ("python-matplotlib" ,python-matplotlib)
216 ("python-pytest" ,python-pytest)
217 ("python-pytest-cov" ,python-pytest-cov)))
218 (inputs
219 `(("geos" ,geos)))
220 (propagated-inputs
221 `(("python-numpy" ,python-numpy)))
222 (arguments
223 `(#:phases
224 (modify-phases %standard-phases
225 (add-after 'unpack 'patch-geos-path
226 (lambda* (#:key inputs #:allow-other-keys)
227 (let ((geos (assoc-ref inputs "geos"))
228 (glibc (assoc-ref inputs ,(if (%current-target-system)
229 "cross-libc" "libc"))))
230 (substitute* "shapely/geos.py"
231 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
232 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
233 geos "/lib/libgeos_c.so'])"))
234 (("free = load_dll\\('c'\\)\\.free")
235 (string-append "free = load_dll('c', fallbacks=['"
236 glibc "/lib/libc.so.6']).free"))))
237 #t)))))
238 (home-page "https://github.com/Toblerity/Shapely")
239 (synopsis "Library for the manipulation and analysis of geometric objects")
240 (description "Shapely is a Python package for manipulation and analysis of
241 planar geometric objects. It is based on the @code{GEOS} library.")
242 (license license:bsd-3)))
243
244 (define-public python-shortuuid
245 (package
246 (name "python-shortuuid")
247 (version "0.5.0")
248 (source
249 (origin
250 (method url-fetch)
251 (uri (pypi-uri "shortuuid" version))
252 (sha256
253 (base32
254 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
255 (build-system python-build-system)
256 (native-inputs
257 `(("python-pep8" ,python-pep8)))
258 (home-page "https://github.com/skorokithakis/shortuuid")
259 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
260 (description
261 "@code{shortuuid} is a Python library for generating concise, unambiguous
262 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
263 module and then similar looking characters are removed.")
264 (license license:bsd-3)))
265
266 (define-public python-logwrap
267 (package
268 (name "python-logwrap")
269 (version "3.2.1")
270 (source
271 (origin
272 (method url-fetch)
273 (uri (pypi-uri "logwrap" version ".zip"))
274 (sha256
275 (base32
276 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
277 (build-system python-build-system)
278 (propagated-inputs
279 `(("python-six" ,python-six)
280 ("python-typing" ,python-typing)))
281 (native-inputs
282 `(("unzip" ,unzip)
283 ("python-cython" ,python-cython)
284 ("python-pytest" ,python-pytest)
285 ("python-pytest-cov" ,python-pytest-cov)
286 ("python-pytest-runner" ,python-pytest-runner)))
287 (home-page "https://github.com/penguinolog/logwrap")
288 (synopsis "Decorator for logging function arguments")
289 (description "This package provides a decorator to log function arguments
290 and function call return values in a human-readable way.")
291 (license license:asl2.0)))
292
293 (define-public python2-shapely
294 (package-with-python2 python-shapely))
295
296 (define-public python-clyent
297 (package
298 (name "python-clyent")
299 (version "1.2.1")
300 (source
301 (origin
302 (method url-fetch)
303 (uri (pypi-uri "clyent" version))
304 (sha256
305 (base32
306 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
307 (build-system python-build-system)
308 (native-inputs
309 `(("python-mock" ,python-mock)))
310 (home-page "https://github.com/binstar/clyent")
311 (synopsis "Command line client library")
312 (description "Clyent is a Python command line utiliy library. It is used
313 by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
314 (license license:bsd-3)))
315
316 (define-public python2-clyent
317 (package-with-python2 python-clyent))
318
319 (define-public python-babel
320 (package
321 (name "python-babel")
322 (version "2.7.0")
323 (source
324 (origin
325 (method url-fetch)
326 (uri (pypi-uri "Babel" version))
327 (sha256
328 (base32
329 "0a7wawx8vsg7igvz6p3x909fskhg4b2y1910xk4f4c8y22p3aqg8"))))
330 (build-system python-build-system)
331 (native-inputs
332 `(("python-freezegun" ,python-freezegun)
333 ("python-pytest" ,python-pytest)))
334 (propagated-inputs
335 `(("python-pytz" ,python-pytz)))
336 (arguments
337 `(#:phases (modify-phases %standard-phases
338 (replace 'check
339 (lambda _
340 (invoke "pytest" "-vv" "-k"
341 (string-append
342 ;; XXX: These tests fail when using Pytest 4.x and
343 ;; Babel 2.6.0. Try removing this for later versions.
344 "not test_no_inherit_metazone_marker_never_in_output"
345 " and not test_smoke_dates"
346 " and not test_smoke_numbers")))))))
347 (home-page "http://babel.pocoo.org/")
348 (synopsis
349 "Tools for internationalizing Python applications")
350 (description
351 "Babel is composed of two major parts:
352 - tools to build and work with gettext message catalogs
353 - a Python interface to the CLDR (Common Locale Data Repository), providing
354 access to various locale display names, localized number and date formatting,
355 etc. ")
356 (license license:bsd-3)))
357
358 (define-public python2-babel
359 (package-with-python2 python-babel))
360
361 ;; Sphinx < 2.0 requires this version. Remove once no longer needed.
362 (define-public python2-babel-2.6
363 (package
364 (inherit python2-babel)
365 (version "2.6.0")
366 (source (origin
367 (method url-fetch)
368 (uri (pypi-uri "Babel" version))
369 (sha256
370 (base32
371 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
372
373 (define-public python2-backport-ssl-match-hostname
374 (package
375 (name "python2-backport-ssl-match-hostname")
376 (version "3.5.0.1")
377 (source
378 (origin
379 (method url-fetch)
380 (uri (pypi-uri "backports.ssl_match_hostname" version))
381 (sha256
382 (base32
383 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
384 (build-system python-build-system)
385 (arguments
386 `(#:python ,python-2
387 #:tests? #f)) ; no test target
388 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
389 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
390 (description
391 "This backport brings the ssl.match_hostname() function to users of
392 earlier versions of Python. The function checks the hostname in the
393 certificate returned by the server to which a connection has been established,
394 and verifies that it matches the intended target hostname.")
395 (license license:psfl)))
396
397 (define-public python-boolean.py
398 (package
399 (name "python-boolean.py")
400 (version "3.6")
401 (source
402 (origin
403 ;; There's no source tarball on PyPI.
404 (method git-fetch)
405 (uri (git-reference
406 (url "https://github.com/bastikr/boolean.py")
407 (commit (string-append "v" version))))
408 (file-name (git-file-name name version))
409 (sha256
410 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
411 (build-system python-build-system)
412 (home-page "https://github.com/bastikr/boolean.py")
413 (synopsis "Boolean algebra in one Python module")
414 (description
415 "This is a small Python library that implements boolean algebra.
416 It defines two base elements, @code{TRUE} and @code{FALSE}, and a
417 @code{Symbol} class that can take on one of these two values. Calculations
418 are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
419 compositions like @code{XOR} and @code{NAND} are emulated on top of them.
420 Expressions are constructed from parsed strings or directly in Python.")
421 (license license:bsd-2)))
422
423 (define-public python-hdf4
424 (package
425 (name "python-hdf4")
426 (version "0.9")
427 (source
428 (origin
429 (method url-fetch)
430 (uri (pypi-uri name version))
431 (sha256
432 (base32
433 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
434 (build-system python-build-system)
435 (native-inputs `(("nose" ,python-nose)))
436 (propagated-inputs `(("numpy" ,python-numpy)))
437 (inputs
438 `(("hdf4" ,hdf4)
439 ("libjpeg" ,libjpeg)
440 ("zlib" ,zlib)))
441 (arguments
442 `(#:phases
443 (modify-phases %standard-phases
444 (replace 'check
445 (lambda _
446 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
447 ;; on to import numpy. Somehow this works on their CI system.
448 ;; Let's just manage PYTHONPATH here instead.
449 (substitute* "runexamples.sh"
450 (("export PYTHONPATH=.*") ""))
451 (setenv "PYTHONPATH"
452 (string-append (getcwd) ":"
453 (getenv "PYTHONPATH")))
454 (invoke "./runexamples.sh")
455 (invoke "nosetests" "-v"))))))
456 (home-page "https://github.com/fhs/python-hdf4")
457 (synopsis "Python interface to the NCSA HDF4 library")
458 (description
459 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
460 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
461 NetCDF files can also be read and modified. Python-HDF4 is a fork of
462 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
463 (license license:expat)))
464
465 (define-public python2-hdf4
466 (package-with-python2 python-hdf4))
467
468 (define-public python-h5py
469 (package
470 (name "python-h5py")
471 (version "2.8.0")
472 (source
473 (origin
474 (method url-fetch)
475 (uri (pypi-uri "h5py" version))
476 (sha256
477 (base32
478 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
479 (build-system python-build-system)
480 (arguments
481 `(#:tests? #f ; no test target
482 #:phases
483 (modify-phases %standard-phases
484 (add-after 'unpack 'fix-hdf5-paths
485 (lambda* (#:key inputs #:allow-other-keys)
486 (let ((prefix (assoc-ref inputs "hdf5")))
487 (substitute* "setup_build.py"
488 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
489 (string-append "['" prefix "/lib" "']"))
490 (("'/opt/local/include', '/usr/local/include'")
491 (string-append "'" prefix "/include" "'")))
492 (substitute* "setup_configure.py"
493 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
494 (string-append "['" prefix "/lib" "']")))
495 #t))))))
496 (propagated-inputs
497 `(("python-six" ,python-six)
498 ("python-numpy" ,python-numpy)))
499 (inputs
500 `(("hdf5" ,hdf5)))
501 (native-inputs
502 `(("python-cython" ,python-cython)
503 ("python-pkgconfig" ,python-pkgconfig)))
504 (home-page "http://www.h5py.org/")
505 (synopsis "Read and write HDF5 files from Python")
506 (description
507 "The h5py package provides both a high- and low-level interface to the
508 HDF5 library from Python. The low-level interface is intended to be a
509 complete wrapping of the HDF5 API, while the high-level component supports
510 access to HDF5 files, datasets and groups using established Python and NumPy
511 concepts.")
512 (license license:bsd-3)))
513
514 (define-public python2-h5py
515 (package-with-python2 python-h5py))
516
517 (define-public python-sh
518 (package
519 (name "python-sh")
520 (version "1.12.14")
521 (source
522 (origin
523 (method url-fetch)
524 (uri (pypi-uri "sh" version))
525 (sha256
526 (base32
527 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
528 (build-system python-build-system)
529 (arguments
530 '(#:phases
531 (modify-phases %standard-phases
532 (replace 'check
533 (lambda _
534 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
535 (setenv "HOME" "/tmp")
536 (invoke "python" "sh.py" "test"))))))
537 (native-inputs
538 `(("python-coverage" ,python-coverage)))
539 (home-page "https://github.com/amoffat/sh")
540 (synopsis "Python subprocess replacement")
541 (description "This package provides a replacement for Python's
542 @code{subprocess} feature.")
543 (license license:expat)))
544
545 (define-public python2-sh
546 (package-with-python2 python-sh))
547
548 (define-public python-cftime
549 (package
550 (name "python-cftime")
551 (version "1.0.3.4")
552 (source
553 (origin
554 (method url-fetch)
555 (uri (pypi-uri "cftime" version))
556 (sha256
557 (base32
558 "0362dhxbzk593walyjz30dll6y2y79wialik647cbwdsf3ad0x6x"))))
559 (build-system python-build-system)
560 (propagated-inputs
561 `(("python-numpy" ,python-numpy)))
562 (native-inputs
563 `(("python-coveralls" ,python-coveralls)
564 ("python-cython" ,python-cython)
565 ("python-pytest-cov" ,python-pytest-cov)))
566 (home-page "https://github.com/Unidata/cftime")
567 (synopsis "Library for time handling")
568 (description
569 "This package provides time-handling functionality that used to be part
570 of the netcdf4 package before.")
571 ;; This package claims to include code under the GPLv3 but is released
572 ;; under ISC.
573 (license (list license:isc license:gpl3+))))
574
575 (define-public python-netcdf4
576 (package
577 (name "python-netcdf4")
578 (version "1.4.2")
579 (source
580 (origin
581 (method url-fetch)
582 (uri (pypi-uri "netCDF4" version))
583 (sha256
584 (base32
585 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
586 (build-system python-build-system)
587 (arguments
588 '(#:phases
589 (modify-phases %standard-phases
590 (add-after 'unpack 'configure-locations
591 (lambda* (#:key inputs #:allow-other-keys)
592 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
593 #t)))))
594 (native-inputs
595 `(("python-cython" ,python-cython)))
596 (propagated-inputs
597 `(("python-numpy" ,python-numpy)
598 ("python-cftime" ,python-cftime)))
599 (inputs
600 `(("netcdf" ,netcdf)
601 ("hdf4" ,hdf4)
602 ("hdf5" ,hdf5)))
603 (home-page "https://github.com/Unidata/netcdf4-python")
604 (synopsis "Python/numpy interface to the netCDF library")
605 (description "Netcdf4-python is a Python interface to the netCDF C
606 library. netCDF version 4 has many features not found in earlier
607 versions of the library and is implemented on top of HDF5. This module
608 can read and write files in both the new netCDF 4 and the old netCDF 3
609 format, and can create files that are readable by HDF5 clients. The
610 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
611 to users of that module.")
612 ;; The software is mainly ISC, but includes some files covered
613 ;; by the Expat license.
614 (license (list license:isc license:expat))))
615
616 (define-public python2-netcdf4
617 (package-with-python2 python-netcdf4))
618
619 (define-public python-license-expression
620 (package
621 (name "python-license-expression")
622 (version "0.999")
623 (source
624 (origin
625 (method url-fetch)
626 (uri (pypi-uri "license-expression" version))
627 (sha256
628 (base32 "08ppb0bxbrsxazy88sgpl9yffvdsabw6dkk1nc332wcz2mphwwyf"))))
629 (build-system python-build-system)
630 (propagated-inputs
631 `(("python-boolean.py" ,python-boolean.py)))
632 (home-page "https://github.com/nexB/license-expression")
633 (synopsis "Apply boolean logic to license expressions")
634 (description
635 "This Python module defines a tiny language to evaluate and compare
636 license expressions using boolean logic. Logical combinations of licenses can
637 be tested for equality, containment, and equivalence. They can be normalised
638 and simplified. It supports SPDX license expressions as well as other naming
639 conventions and aliases in the same expression.")
640 (license license:gpl2+)))
641
642 (define-public python-lockfile
643 (package
644 (name "python-lockfile")
645 (version "0.12.2")
646 (source
647 (origin
648 (method url-fetch)
649 (uri (pypi-uri "lockfile" version))
650 (sha256
651 (base32
652 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
653 (build-system python-build-system)
654 (arguments '(#:test-target "check"))
655 (native-inputs
656 `(("python-pbr" ,python-pbr)))
657 (home-page "https://launchpad.net/pylockfile")
658 (synopsis "Platform-independent file locking module")
659 (description
660 "The lockfile package exports a LockFile class which provides a simple
661 API for locking files.")
662 (license license:expat)))
663
664 (define-public python2-lockfile
665 (package-with-python2 python-lockfile))
666
667 (define-public python-semantic-version
668 (package
669 (name "python-semantic-version")
670 (version "2.6.0")
671 (source
672 (origin
673 (method url-fetch)
674 (uri (pypi-uri "semantic_version" version))
675 (sha256
676 (base32
677 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
678 (build-system python-build-system)
679 (arguments
680 `(#:tests? #f)) ; PyPI tarball lacks tests
681 (home-page "https://github.com/rbarrois/python-semanticversion")
682 (synopsis "Semantic versioning module for Python")
683 (description
684 "The @code{semantic_version} class is a small library for handling
685 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
686
687 It can compare versions, generate a new version that represents a bump in one of
688 the version levels, and check whether any given string is a proper semantic
689 version identifier.")
690 (license license:bsd-3)))
691
692 (define-public python2-semantic-version
693 (package-with-python2 python-semantic-version))
694
695 (define-public python-serpent
696 (package
697 (name "python-serpent")
698 (version "1.28")
699 (source
700 (origin
701 (method url-fetch)
702 (uri (pypi-uri "serpent" version))
703 (sha256
704 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
705 (build-system python-build-system)
706 (native-inputs
707 `(("python-attrs" ,python-attrs)
708 ("python-pytz" ,python-pytz)))
709 (home-page "https://github.com/irmen/Serpent")
710 (synopsis "Serializer for literal Python expressions")
711 (description
712 "Serpent provides @code{ast.literal_eval()}-compatible object tree
713 serialization. It serializes an object tree into bytes (an utf-8 encoded
714 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
715 to rebuild the original object tree.
716
717 Because only safe literals are encoded, it is safe to send serpent data to
718 other machines, such as over the network.")
719 (license license:expat)))
720
721 (define-public python-setuptools
722 (package
723 (name "python-setuptools")
724 (version "41.0.1")
725 (source
726 (origin
727 (method url-fetch)
728 (uri (pypi-uri "setuptools" version ".zip"))
729 (sha256
730 (base32
731 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
732 (modules '((guix build utils)))
733 (snippet
734 '(begin
735 ;; Remove included binaries which are used to build self-extracting
736 ;; installers for Windows.
737 ;; TODO: Find some way to build them ourself so we can include them.
738 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
739 #t))))
740 (build-system python-build-system)
741 ;; FIXME: Tests require pytest, which itself relies on setuptools.
742 ;; One could bootstrap with an internal untested setuptools.
743 (arguments
744 `(#:tests? #f))
745 (home-page "https://pypi.python.org/pypi/setuptools")
746 (synopsis
747 "Library designed to facilitate packaging Python projects")
748 (description
749 "Setuptools is a fully-featured, stable library designed to facilitate
750 packaging Python projects, where packaging includes:
751 Python package and module definitions,
752 distribution package metadata,
753 test hooks,
754 project installation,
755 platform-specific details,
756 Python 3 support.")
757 ;; TODO: setuptools now bundles the following libraries:
758 ;; packaging, pyparsing, six and appdirs. How to unbundle?
759 (license (list license:psfl ; setuptools itself
760 license:expat ; six, appdirs, pyparsing
761 license:asl2.0 ; packaging is dual ASL2/BSD-2
762 license:bsd-2))))
763
764 (define-public python2-setuptools
765 (package-with-python2 python-setuptools))
766
767 ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
768 (define-public python-setuptools-for-tensorflow
769 (hidden-package
770 (package
771 (inherit python-setuptools)
772 (version "39.1.0")
773 (source (origin
774 (inherit (package-source python-setuptools))
775 (uri (pypi-uri "setuptools" version ".zip"))
776 (sha256
777 (base32
778 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
779
780 (define-public python-uniseg
781 (package
782 (name "python-uniseg")
783 (version "0.7.1")
784 (source
785 (origin
786 (method url-fetch)
787 (uri (pypi-uri "uniseg" version ".zip"))
788 (sha256
789 (base32
790 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
791 (build-system python-build-system)
792 (arguments
793 '(#:tests? #f)) ; The test suite requires network access.
794 (native-inputs
795 `(("unzip" ,unzip)))
796 (home-page
797 "https://bitbucket.org/emptypage/uniseg-python")
798 (synopsis
799 "Python library to determine Unicode text segmentations")
800 (description
801 "Uniseg is a Python package used to determine Unicode text segmentations.
802 Supported segmentations include:
803 @enumerate
804 @item @dfn{Code point} (any value in the Unicode codespace)
805 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
806 multiple Unicode code points, e.g. \"G\" + acute-accent)
807 @item Word break
808 @item Sentence break
809 @item Line break
810 @end enumerate")
811 (license license:expat)))
812
813 (define-public python2-uniseg
814 (package-with-python2 python-uniseg))
815
816 (define-public python-humanfriendly
817 (package
818 (name "python-humanfriendly")
819 (version "4.4.1")
820 (source
821 (origin
822 (method url-fetch)
823 (uri (pypi-uri "humanfriendly" version))
824 (sha256
825 (base32
826 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
827 (build-system python-build-system)
828 (arguments
829 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
830 #:tests? #f))
831 (propagated-inputs
832 `(("python-monotonic" ,python-monotonic)))
833 (home-page "https://humanfriendly.readthedocs.io")
834 (synopsis "Human-friendly input and output in Python")
835 (description
836 "The functions and classes in @code{humanfriendly} can be used to make
837 text interfaces more user-friendly. It includes tools to parse and format
838 numbers, file sizes, and timespans, timers for long-running operations, menus
839 to allow the user to choose from a list of options, and terminal interaction
840 helpers.")
841 (license license:expat)))
842
843 (define-public python2-humanfriendly
844 (package-with-python2 python-humanfriendly))
845
846 (define-public python-capturer
847 (package
848 (name "python-capturer")
849 (version "2.4")
850 (source
851 (origin
852 (method url-fetch)
853 (uri (pypi-uri "capturer" version))
854 (sha256
855 (base32
856 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
857 (build-system python-build-system)
858 (arguments
859 `(#:tests? #f))
860 (propagated-inputs
861 `(("python-humanfriendly" ,python-humanfriendly)))
862 (home-page "https://capturer.readthedocs.io")
863 (synopsis "Capture stdout and stderr streams of the current process")
864 (description
865 "The capturer package makes it easy to capture the stdout and stderr
866 streams of the current process and subprocesses. Output can be relayed
867 to the terminal in real time but is also available to the Python program
868 for additional processing.")
869 (license license:expat)))
870
871 (define-public python2-capturer
872 (package-with-python2 python-capturer))
873
874 (define-public python-case
875 (package
876 (name "python-case")
877 (version "1.5.3")
878 (source
879 (origin
880 (method url-fetch)
881 (uri (pypi-uri "case" version))
882 (sha256
883 (base32
884 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
885 (build-system python-build-system)
886 (propagated-inputs
887 `(("python-mock" ,python-mock)
888 ("python-nose" ,python-nose)
889 ("python-six" ,python-six)
890 ("python-unittest2" ,python-unittest2)))
891 (native-inputs
892 `(("python-coverage" ,python-coverage)))
893 (home-page "https://github.com/celery/case")
894 (synopsis "Unittest utilities and convenience methods")
895 (description
896 "The @code{case} package provides utilities on top of unittest, including
897 some helpful Python 2 compatibility convenience methods.")
898 (license license:bsd-3)))
899
900 (define-public python-verboselogs
901 (package
902 (name "python-verboselogs")
903 (version "1.7")
904 (source
905 (origin
906 (method url-fetch)
907 (uri (pypi-uri "verboselogs" version))
908 (sha256
909 (base32
910 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
911 (build-system python-build-system)
912 (native-inputs
913 `(("python-mock" ,python-mock)
914 ("python-astroid" ,python-astroid)
915 ("python-pylint" ,python-pylint)))
916 (home-page "https://verboselogs.readthedocs.io")
917 (synopsis "Verbose logging level for Python's logging module")
918 (description
919 "The @code{verboselogs} package extends Python's @code{logging} module to
920 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
921 (license license:expat)))
922
923 (define-public python2-verboselogs
924 (package-with-python2 python-verboselogs))
925
926 (define-public python-coloredlogs
927 (package
928 (name "python-coloredlogs")
929 (version "7.3")
930 (source
931 (origin
932 (method url-fetch)
933 (uri (pypi-uri "coloredlogs" version))
934 (sha256
935 (base32
936 "1blcann6dyg5dhps9pg12rn0q0rjrlajpmmil0gy0j4cbvnl2il9"))))
937 (build-system python-build-system)
938 (arguments
939 `(;Tests require some updated modules
940 #:tests? #f))
941 (propagated-inputs
942 `(("python-capturer" ,python-capturer)))
943 (home-page "https://coloredlogs.readthedocs.io")
944 (synopsis "Colored stream handler for Python's logging module")
945 (description
946 "The @code{coloredlogs} package enables colored terminal output for
947 Python's logging module. The @code{ColoredFormatter} class inherits from
948 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
949 messages in color.")
950 (license license:expat)))
951
952 (define-public python2-coloredlogs
953 (package-with-python2 python-coloredlogs))
954
955 (define-public python-editorconfig
956 (package
957 (name "python-editorconfig")
958 (version "0.12.2")
959 (source
960 (origin
961 (method url-fetch)
962 (uri (pypi-uri "EditorConfig" version))
963 (sha256
964 (base32
965 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
966 (build-system python-build-system)
967 (home-page "https://editorconfig.org/")
968 (synopsis "EditorConfig bindings for python")
969 (description "The EditorConfig project consists of a file format for
970 defining coding styles and a collection of text editor plugins that enable
971 editors to read the file format and adhere to defined styles. EditorConfig
972 files are easily readable and they work nicely with version control systems.")
973 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
974 (license (list license:bsd-2 license:psfl))))
975
976 (define-public python-et-xmlfile
977 (package
978 (name "python-et-xmlfile")
979 (version "1.0.1")
980 (source
981 (origin
982 (method url-fetch)
983 (uri (pypi-uri "et_xmlfile" version))
984 (sha256
985 (base32
986 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
987 (build-system python-build-system)
988 (arguments
989 `(#:phases (modify-phases %standard-phases
990 (replace 'check
991 (lambda _
992 (invoke "pytest"))))))
993 (native-inputs
994 `(("python-pytest" ,python-pytest)
995 ("python-lxml" ,python-lxml))) ;used for the tests
996 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
997 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
998 (description "This Python library is based upon the @code{xmlfile} module
999 from @code{lxml}. It aims to provide a low memory, compatible implementation
1000 of @code{xmlfile}.")
1001 (license license:expat)))
1002
1003 (define-public python2-et-xmlfile
1004 (package-with-python2 python-et-xmlfile))
1005
1006 (define-public python-openpyxl
1007 (package
1008 (name "python-openpyxl")
1009 (version "2.6.2")
1010 (source
1011 (origin
1012 ;; We use the upstream repository, as the tests are not included in the
1013 ;; PyPI releases.
1014 (method hg-fetch)
1015 (uri (hg-reference
1016 (url "https://bitbucket.org/openpyxl/openpyxl")
1017 (changeset version)))
1018 (file-name (string-append name "-" version "-checkout"))
1019 (sha256
1020 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
1021 (build-system python-build-system)
1022 (arguments
1023 `(#:phases (modify-phases %standard-phases
1024 (replace 'check
1025 (lambda _
1026 (invoke "pytest"))))))
1027 (native-inputs
1028 ;; For the test suite.
1029 `(("python-lxml" ,python-lxml)
1030 ("python-pillow" ,python-pillow)
1031 ("python-pytest" ,python-pytest)))
1032 (propagated-inputs
1033 `(("python-et-xmlfile" ,python-et-xmlfile)
1034 ("python-jdcal" ,python-jdcal)))
1035 (home-page "https://openpyxl.readthedocs.io")
1036 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1037 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1038 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1039 standard.")
1040 (license license:expat)))
1041
1042 (define-public python-eventlet
1043 (package
1044 (name "python-eventlet")
1045 (version "0.20.1")
1046 (source
1047 (origin
1048 (method url-fetch)
1049 (uri (pypi-uri "eventlet" version))
1050 (sha256
1051 (base32
1052 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
1053 (build-system python-build-system)
1054 (propagated-inputs
1055 `(("python-greenlet" ,python-greenlet)))
1056 (arguments
1057 ;; TODO: Requires unpackaged 'enum-compat'.
1058 '(#:tests? #f))
1059 (home-page "http://eventlet.net")
1060 (synopsis "Concurrent networking library for Python")
1061 (description
1062 "Eventlet is a concurrent networking library for Python that
1063 allows you to change how you run your code, not how you write it.
1064 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1065 Coroutines ensure that the developer uses a blocking style of programming
1066 that is similar to threading, but provide the benefits of non-blocking I/O.
1067 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1068 from the Python interpreter, or as a small part of a larger application.")
1069 (license license:expat)))
1070
1071 (define-public python2-eventlet
1072 (let ((base (package-with-python2
1073 (strip-python2-variant python-eventlet))))
1074 (package (inherit base)
1075 (propagated-inputs
1076 `(("python2-enum34" ,python2-enum34)
1077 ,@(package-propagated-inputs base))))))
1078
1079 (define-public python-six
1080 (package
1081 (name "python-six")
1082 (version "1.12.0")
1083 (source
1084 (origin
1085 (method url-fetch)
1086 (uri (pypi-uri "six" version))
1087 (sha256
1088 (base32
1089 "0wxs1q74v07ssjywbbm7x6h5v9qx209ld2yfsif4060sxi0h2sni"))))
1090 (build-system python-build-system)
1091 (arguments
1092 `(#:phases
1093 (modify-phases %standard-phases
1094 (replace 'check
1095 (lambda _
1096 (invoke "py.test" "-v"))))))
1097 (native-inputs
1098 `(("python-py" ,python-py)
1099 ("python-pytest" ,python-pytest-bootstrap)))
1100 (home-page "https://pypi.python.org/pypi/six/")
1101 (synopsis "Python 2 and 3 compatibility utilities")
1102 (description
1103 "Six is a Python 2 and 3 compatibility library. It provides utility
1104 functions for smoothing over the differences between the Python versions with
1105 the goal of writing Python code that is compatible on both Python versions.
1106 Six supports every Python version since 2.5. It is contained in only one
1107 Python file, so it can be easily copied into your project.")
1108 (license license:x11)))
1109
1110 (define-public python2-six
1111 (package-with-python2 python-six))
1112
1113 (define-public python-six-bootstrap
1114 (package
1115 (inherit python-six)
1116 (name "python-six-bootstrap")
1117 (native-inputs `())
1118 (arguments `(#:tests? #f))))
1119
1120 (define-public python2-six-bootstrap
1121 (package-with-python2 python-six-bootstrap))
1122
1123 (define-public python-schedule
1124 (package
1125 (name "python-schedule")
1126 (version "0.4.3")
1127 (source
1128 (origin
1129 (method url-fetch)
1130 (uri (pypi-uri "schedule" version))
1131 (sha256
1132 (base32
1133 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1134 (build-system python-build-system)
1135 (native-inputs
1136 `(("python-pytest" ,python-pytest)
1137 ("python-mock" ,python-mock)))
1138 (home-page "https://github.com/dbader/schedule")
1139 (synopsis "Schedule periodic function calls in Python")
1140 (description
1141 "Schedule is an in-process scheduler for periodic jobs that uses the
1142 builder pattern for configuration. Schedule lets you run Python functions (or
1143 any other callable) periodically at pre-determined intervals using a simple,
1144 human-friendly syntax.")
1145 (license license:expat)))
1146
1147 (define-public python2-schedule
1148 (package-with-python2 python-schedule))
1149
1150 (define-public python-pandas
1151 (package
1152 (name "python-pandas")
1153 (version "0.24.2")
1154 (source
1155 (origin
1156 (method url-fetch)
1157 (uri (pypi-uri "pandas" version))
1158 (sha256
1159 (base32 "18imlm8xbhcbwy4wa957a1fkamrcb0z988z006jpfda3ki09z4ag"))))
1160 (build-system python-build-system)
1161 (arguments
1162 `(#:modules ((guix build utils)
1163 (guix build python-build-system)
1164 (ice-9 ftw)
1165 (srfi srfi-26))
1166 #:phases (modify-phases %standard-phases
1167 (add-after 'unpack 'patch-which
1168 (lambda* (#:key inputs #:allow-other-keys)
1169 (let ((which (assoc-ref inputs "which")))
1170 (substitute* "pandas/io/clipboard/__init__.py"
1171 (("^CHECK_CMD = .*")
1172 (string-append "CHECK_CMD = \"" which "\"\n"))))
1173 #t))
1174 (replace 'check
1175 (lambda _
1176 (let ((build-directory
1177 (string-append
1178 (getcwd) "/build/"
1179 (car (scandir "build"
1180 (cut string-prefix? "lib." <>))))))
1181 ;; Disable the "strict data files" option which causes
1182 ;; the build to error out if required data files are
1183 ;; not available (as is the case with PyPI archives).
1184 (substitute* "setup.cfg"
1185 (("addopts = --strict-data-files") "addopts = "))
1186 (with-directory-excursion build-directory
1187 ;; Delete tests that require "moto" which is not yet
1188 ;; in Guix.
1189 (for-each delete-file
1190 '("pandas/tests/io/conftest.py"
1191 "pandas/tests/io/json/test_compression.py"
1192 "pandas/tests/io/parser/test_network.py"
1193 "pandas/tests/io/test_parquet.py"))
1194 (invoke "pytest" "-vv" "pandas" "--skip-slow"
1195 "--skip-network" "-k"
1196 ;; XXX: Due to the deleted tests above.
1197 "not test_read_s3_jsonl"))))))))
1198 (propagated-inputs
1199 `(("python-numpy" ,python-numpy)
1200 ("python-openpyxl" ,python-openpyxl)
1201 ("python-pytz" ,python-pytz)
1202 ("python-dateutil" ,python-dateutil)
1203 ("python-xlrd" ,python-xlrd)))
1204 (inputs
1205 `(("which" ,which)))
1206 (native-inputs
1207 `(("python-cython" ,python-cython)
1208 ("python-beautifulsoup4" ,python-beautifulsoup4)
1209 ("python-lxml" ,python-lxml)
1210 ("python-html5lib" ,python-html5lib)
1211 ("python-nose" ,python-nose)
1212 ("python-pytest" ,python-pytest)
1213 ("python-pytest-mock" ,python-pytest-mock)))
1214 (home-page "https://pandas.pydata.org")
1215 (synopsis "Data structures for data analysis, time series, and statistics")
1216 (description
1217 "Pandas is a Python package providing fast, flexible, and expressive data
1218 structures designed to make working with structured (tabular,
1219 multidimensional, potentially heterogeneous) and time series data both easy
1220 and intuitive. It aims to be the fundamental high-level building block for
1221 doing practical, real world data analysis in Python.")
1222 (license license:bsd-3)))
1223
1224 (define-public python2-pandas
1225 (package-with-python2 python-pandas))
1226
1227 (define-public python2-mechanize
1228 (package
1229 (name "python2-mechanize")
1230 (version "0.2.5")
1231 (source
1232 (origin
1233 (method url-fetch)
1234 (uri (pypi-uri "mechanize" version))
1235 (sha256
1236 (base32
1237 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1238 (build-system python-build-system)
1239 (arguments
1240 `(#:python ,python-2 ; apparently incompatible with Python 3
1241 #:tests? #f))
1242 ;; test fails with message
1243 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1244 ;; (python-3.3.2) or
1245 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1246 ;; (python-2.7.5).
1247 ;; The source code is from March 2011 and probably not up-to-date
1248 ;; with respect to python unit tests.
1249 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1250 (synopsis
1251 "Stateful programmatic web browsing in Python")
1252 (description
1253 "Mechanize implements stateful programmatic web browsing in Python,
1254 after Andy Lester’s Perl module WWW::Mechanize.")
1255 (license (license:non-copyleft
1256 "file://COPYING"
1257 "See COPYING in the distribution."))))
1258
1259
1260 (define-public python-simplejson
1261 (package
1262 (name "python-simplejson")
1263 (version "3.14.0")
1264 (source
1265 (origin
1266 (method url-fetch)
1267 (uri (pypi-uri "simplejson" version))
1268 (sha256
1269 (base32
1270 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1271 (build-system python-build-system)
1272 (home-page "http://simplejson.readthedocs.org/en/latest/")
1273 (synopsis
1274 "Json library for Python")
1275 (description
1276 "JSON (JavaScript Object Notation) is a subset of JavaScript
1277 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1278 format.
1279
1280 Simplejson exposes an API familiar to users of the standard library marshal
1281 and pickle modules. It is the externally maintained version of the json
1282 library contained in Python 2.6, but maintains compatibility with Python 2.5
1283 and (currently) has significant performance advantages, even without using
1284 the optional C extension for speedups. Simplejson is also supported on
1285 Python 3.3+.")
1286 (license license:x11)))
1287
1288 (define-public python2-simplejson
1289 (package-with-python2 python-simplejson))
1290
1291
1292 (define-public python-pyicu
1293 (package
1294 (name "python-pyicu")
1295 (version "2.3.1")
1296 (source
1297 (origin
1298 (method url-fetch)
1299 (uri (pypi-uri "PyICU" version))
1300 (sha256
1301 (base32
1302 "1x4w8m7ifki9z2a187pgjr33z6z0rp2fii9b73djak1vhm9v9cnx"))))
1303 (build-system python-build-system)
1304 (inputs
1305 `(("icu4c" ,icu4c)))
1306 (native-inputs
1307 `(("python-pytest" ,python-pytest)
1308 ("python-six" ,python-six)))
1309 (home-page "https://github.com/ovalhub/pyicu")
1310 (synopsis "Python extension wrapping the ICU C++ API")
1311 (description
1312 "PyICU is a python extension wrapping the ICU C++ API.")
1313 (properties `((python2-variant . ,(delay python2-pyicu))))
1314 (license license:x11)))
1315
1316 (define-public python2-pyicu
1317 (let ((base (package-with-python2
1318 (strip-python2-variant python-pyicu))))
1319 (package
1320 (inherit base)
1321 (arguments
1322 `(,@(package-arguments base)
1323 #:phases
1324 (modify-phases %standard-phases
1325 (add-before 'check 'delete-failing-test
1326 (λ _
1327 ;; XXX: This fails due to Unicode issues unique to Python 2,
1328 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1329 (delete-file "test/test_Script.py")
1330 #t))))))))
1331
1332 (define-public python2-dogtail
1333 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1334 ;; spaces in indentation" with Python 3.
1335 (package
1336 (name "python2-dogtail")
1337 (version "0.9.9")
1338 (source (origin
1339 (method url-fetch)
1340 (uri (pypi-uri "dogtail" version))
1341 (sha256
1342 (base32
1343 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1344 (build-system python-build-system)
1345 (arguments `(#:python ,python-2
1346 #:tests? #f)) ; invalid command "test"
1347 ;; Currently no offical homepage.
1348 (home-page "https://pypi.python.org/pypi/dogtail/")
1349 (synopsis "GUI test tool and automation framework written in Python")
1350 (description
1351 "Dogtail is a GUI test tool and automation framework written in Python.
1352 It uses Accessibility (a11y) technologies to communicate with desktop
1353 applications. dogtail scripts are written in Python and executed like any
1354 other Python program.")
1355 (license license:gpl2+)))
1356
1357 (define-public python-empy
1358 (package
1359 (name "python-empy")
1360 (version "3.3.3")
1361 (source (origin
1362 (method url-fetch)
1363 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1364 version ".tar.gz"))
1365 (sha256
1366 (base32
1367 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
1368 (build-system python-build-system)
1369 (arguments
1370 `(#:tests? #f)) ; python2 only
1371 (home-page "http://www.alcyone.com/software/empy/")
1372 (synopsis "Templating system for Python")
1373 (description
1374 "EmPy is a system for embedding Python expressions and statements in
1375 template text; it takes an EmPy source file, processes it, and produces
1376 output. This is accomplished via expansions, which are special signals to the
1377 EmPy system and are set off by a special prefix (by default the at sign, @@).
1378 EmPy can expand arbitrary Python expressions and statements in this way, as
1379 well as a variety of special forms. Textual data not explicitly delimited in
1380 this way is sent unaffected to the output, allowing Python to be used in
1381 effect as a markup language. Also supported are callbacks via hooks,
1382 recording and playback via diversions, and dynamic, chainable filters. The
1383 system is highly configurable via command line options and embedded
1384 commands.")
1385 (license license:lgpl2.1+)))
1386
1387 (define-public python2-empy
1388 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1389 (package
1390 (inherit base)
1391 (arguments `(,@(package-arguments base)
1392 #:tests? #t)))))
1393
1394 (define-public python2-element-tree
1395 (package
1396 (name "python2-element-tree")
1397 (version "1.2.6")
1398 (source (origin
1399 (method url-fetch)
1400 (uri (string-append
1401 "http://effbot.org/media/downloads/elementtree-"
1402 version "-20050316.tar.gz"))
1403 (sha256
1404 (base32
1405 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1406 (build-system python-build-system)
1407 (arguments
1408 `(#:python ,python-2 ; seems to be part of Python 3
1409 #:tests? #f)) ; no 'test' sub-command
1410 (synopsis "Toolkit for XML processing in Python")
1411 (description
1412 "ElementTree is a Python library supporting lightweight XML processing.")
1413 (home-page "http://effbot.org/zone/element-index.htm")
1414 (license (license:x11-style
1415 "http://docs.python.org/2/license.html"
1416 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1417
1418 (define-public python2-pybugz
1419 (package
1420 (name "python2-pybugz")
1421 (version "0.6.11")
1422 (source (origin
1423 (method url-fetch)
1424 (uri (string-append
1425 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1426 version ".tar.gz"))
1427 (sha256
1428 (base32
1429 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1430 (patches (search-patches "pybugz-stty.patch"
1431 "pybugz-encode-error.patch"))))
1432 (build-system python-build-system)
1433 (arguments
1434 `(#:python ,python-2 ; SyntaxError with Python 3
1435 #:tests? #f)) ; no 'test' sub-command
1436 (propagated-inputs
1437 `(("element-tree" ,python2-element-tree)))
1438 (synopsis "Python and command-line interface to Bugzilla")
1439 (description
1440 "PyBugz is a Python library and command-line tool to query the Bugzilla
1441 bug tracking system. It is meant as an aid to speed up interaction with the
1442 bug tracker.")
1443 (home-page "http://www.liquidx.net/pybugz/")
1444 (license license:gpl2)))
1445
1446 (define-public python2-enum
1447 (package
1448 (name "python2-enum")
1449 (version "0.4.6")
1450 (source (origin
1451 (method url-fetch)
1452 (uri (pypi-uri "enum" version))
1453 (sha256
1454 (base32
1455 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1456 (build-system python-build-system)
1457 (arguments
1458 `(#:python ,python-2))
1459 (home-page "http://pypi.python.org/pypi/enum/")
1460 (synopsis "Robust enumerated type support in Python")
1461 (description
1462 "This provides a module for robust enumerations in Python. It has
1463 been superseded by the Python standard library and is provided only for
1464 compatibility.")
1465 ;; Choice of either license.
1466 (license (list license:gpl3+ license:psfl))))
1467
1468 (define-public python-enum34
1469 (package
1470 (name "python-enum34")
1471 (version "1.1.6")
1472 (source
1473 (origin
1474 (method url-fetch)
1475 (uri (pypi-uri "enum34" version))
1476 (sha256
1477 (base32
1478 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1479 (build-system python-build-system)
1480 (home-page "https://pypi.python.org/pypi/enum34")
1481 (synopsis "Backported Python 3.4 Enum")
1482 (description
1483 "Enum34 is the new Python stdlib enum module available in Python 3.4
1484 backported for previous versions of Python from 2.4 to 3.3.")
1485 (license license:bsd-3)))
1486
1487 (define-public python2-enum34
1488 (package-with-python2 python-enum34))
1489
1490 (define-public python-parse-type
1491 (package
1492 (name "python-parse-type")
1493 (version "0.4.2")
1494 (source
1495 (origin
1496 (method url-fetch)
1497 (uri (pypi-uri "parse_type" version))
1498 (sha256
1499 (base32
1500 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1501 (build-system python-build-system)
1502 (propagated-inputs
1503 `(("python-six" ,python-six)
1504 ("python-parse" ,python-parse)))
1505 (native-inputs
1506 `(("python-pytest" ,python-pytest)
1507 ("python-pytest-runner" ,python-pytest-runner)))
1508 (home-page "https://github.com/jenisys/parse_type")
1509 (synopsis "Extended parse module")
1510 (description
1511 "Parse_type extends the python parse module.")
1512 (properties
1513 `((python2-variant . ,(delay python2-parse-type))))
1514 (license license:bsd-3)))
1515
1516 (define-public python2-parse-type
1517 (let ((base (package-with-python2
1518 (strip-python2-variant python-parse-type))))
1519 (package (inherit base)
1520 (propagated-inputs
1521 `(("python2-enum34" ,python2-enum34)
1522 ,@(package-propagated-inputs base))))))
1523
1524 (define-public python-parse
1525 (package
1526 (name "python-parse")
1527 (version "1.8.4")
1528 (source
1529 (origin
1530 (method url-fetch)
1531 (uri (pypi-uri "parse" version))
1532 (sha256
1533 (base32
1534 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1535 (build-system python-build-system)
1536 (arguments
1537 `(#:phases
1538 (modify-phases %standard-phases
1539 (replace 'check
1540 (lambda _ (invoke "python" "test_parse.py"))))))
1541 (home-page "https://github.com/r1chardj0n3s/parse")
1542 (synopsis "Parse strings")
1543 (description
1544 "Parse strings using a specification based on the Python @code{format()}
1545 syntax.")
1546 (license license:x11)))
1547
1548 (define-public python-polib
1549 (package
1550 (name "python-polib")
1551 (version "1.0.8")
1552 (source (origin
1553 (method url-fetch)
1554 (uri (pypi-uri "polib" version))
1555 (sha256
1556 (base32
1557 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1558 (build-system python-build-system)
1559 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1560 (synopsis "Manipulate, create and modify gettext files")
1561 (description "Polib can manipulate any gettext format (po, pot and mo)
1562 files. It can be used to create po files from scratch or to modify
1563 existing ones.")
1564 (license license:expat)))
1565
1566 (define-public python2-polib
1567 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1568 (package
1569 (inherit base)
1570 (arguments `(,@(package-arguments base)
1571 ;; Tests don't work with python2.
1572 #:tests? #f)))))
1573
1574 (define-public scons
1575 (package
1576 (name "scons")
1577 (version "3.0.4")
1578 (source (origin
1579 (method git-fetch)
1580 (uri (git-reference
1581 (url "https://github.com/SCons/scons.git")
1582 (commit version)))
1583 (file-name (git-file-name name version))
1584 (sha256
1585 (base32
1586 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
1587 (build-system python-build-system)
1588 (arguments
1589 `(#:use-setuptools? #f ; still relies on distutils
1590 #:tests? #f ; no 'python setup.py test' command
1591 #:phases
1592 (modify-phases %standard-phases
1593 (add-before 'build 'bootstrap
1594 (lambda _
1595 (substitute* "src/engine/SCons/compat/__init__.py"
1596 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1597 "sys.modules[new] = __import__(old)"))
1598 (substitute* "src/engine/SCons/Platform/__init__.py"
1599 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1600 "mod = __import__(full_name)"))
1601 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1602 (chdir "build/scons")
1603 #t)))))
1604 (home-page "http://scons.org/")
1605 (synopsis "Software construction tool written in Python")
1606 (description
1607 "SCons is a software construction tool. Think of SCons as an improved,
1608 cross-platform substitute for the classic Make utility with integrated
1609 functionality similar to autoconf/automake and compiler caches such as ccache.
1610 In short, SCons is an easier, more reliable and faster way to build
1611 software.")
1612 (license license:x11)))
1613
1614 (define-public scons-python2
1615 (package
1616 (inherit (package-with-python2 scons))
1617 (name "scons-python2")))
1618
1619 (define-public python-extras
1620 (package
1621 (name "python-extras")
1622 (version "1.0.0")
1623 (source
1624 (origin
1625 (method url-fetch)
1626 (uri (pypi-uri "extras" version))
1627 (sha256
1628 (base32
1629 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1630 (build-system python-build-system)
1631 (arguments
1632 ;; FIXME: Circular dependency on testtools.
1633 '(#:tests? #f))
1634 (home-page "https://github.com/testing-cabal/extras")
1635 (synopsis "Useful extensions to the Python standard library")
1636 (description
1637 "Extras is a set of extensions to the Python standard library.")
1638 (license license:expat)))
1639
1640 (define-public python2-extras
1641 (package-with-python2 python-extras))
1642
1643 (define-public python-mimeparse
1644 (package
1645 (name "python-mimeparse")
1646 (version "1.6.0")
1647 (source
1648 (origin
1649 (method url-fetch)
1650 (uri (pypi-uri "python-mimeparse" version))
1651 (sha256
1652 (base32
1653 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1654 (build-system python-build-system)
1655 (arguments
1656 '(#:phases
1657 (modify-phases %standard-phases
1658 (replace 'check
1659 (lambda _
1660 (invoke "./mimeparse_test.py"))))))
1661 (home-page
1662 "https://github.com/dbtsai/python-mimeparse")
1663 (synopsis "Python library for parsing MIME types")
1664 (description
1665 "Mimeparse provides basic functions for parsing MIME type names and
1666 matching them against a list of media-ranges.")
1667 (license license:expat)))
1668
1669 (define-public python2-mimeparse
1670 (package-with-python2 python-mimeparse))
1671
1672 (define-public python-miniboa
1673 (package
1674 (name "python-miniboa")
1675 (version "1.0.7")
1676 (source
1677 (origin
1678 (method url-fetch)
1679 (uri (pypi-uri "miniboa" version))
1680 (sha256
1681 (base32
1682 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1683 (build-system python-build-system)
1684 (home-page "https://github.com/shmup/miniboa")
1685 (synopsis "Simple, single-threaded Telnet server")
1686 (description
1687 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1688 server.")
1689 (license license:asl2.0)))
1690
1691 (define-public python2-miniboa
1692 (package-with-python2 python-miniboa))
1693
1694 (define-public python-pafy
1695 (package
1696 (name "python-pafy")
1697 (version "0.5.3.1")
1698 (source
1699 (origin
1700 (method url-fetch)
1701 (uri (pypi-uri "pafy" version))
1702 (sha256
1703 (base32
1704 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1705 (build-system python-build-system)
1706 (arguments
1707 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1708 (propagated-inputs
1709 ;; Youtube-dl is a python package which is imported in the file
1710 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1711 `(("youtube-dl" ,youtube-dl)))
1712 (home-page "https://np1.github.io/pafy/")
1713 (synopsis "Retrieve YouTube content and metadata")
1714 (description
1715 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1716 (license license:lgpl3+)))
1717
1718 (define-public python2-funcsigs
1719 (package
1720 (name "python2-funcsigs")
1721 (version "1.0.2")
1722 (source (origin
1723 (method url-fetch)
1724 (uri (pypi-uri "funcsigs" version))
1725 (sha256
1726 (base32
1727 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1728 (build-system python-build-system)
1729 (arguments
1730 `(#:python ,python-2))
1731 (native-inputs
1732 `(("python2-unittest2" ,python2-unittest2)))
1733 (home-page "http://funcsigs.readthedocs.org")
1734 (synopsis "Python function signatures from PEP362")
1735 (description
1736 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1737 (license license:asl2.0)))
1738
1739 (define-public python2-funcsigs-bootstrap
1740 (package
1741 (inherit python2-funcsigs)
1742 (name "python2-funcsigs-bootstrap")
1743 (native-inputs `())
1744 (arguments
1745 `(#:tests? #f
1746 ,@(package-arguments python2-funcsigs)))))
1747
1748 (define-public python-py
1749 (package
1750 (name "python-py")
1751 (version "1.8.0")
1752 (source
1753 (origin
1754 (method url-fetch)
1755 (uri (pypi-uri "py" version))
1756 (sha256
1757 (base32
1758 "0lsy1gajva083pzc7csj1cvbmminb7b4l6a0prdzyb3fd829nqyw"))))
1759 (build-system python-build-system)
1760 (arguments
1761 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1762 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1763 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1764 ;; Is this module globally installed?"
1765 '(#:tests? #f))
1766 (native-inputs
1767 `(("python-setuptools-scm" ,python-setuptools-scm)))
1768 (home-page "https://github.com/pytest-dev/py")
1769 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1770 (description
1771 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1772 code introspection, and logging.")
1773 (license license:expat)))
1774
1775 (define-public python2-py
1776 (package-with-python2 python-py))
1777
1778 ;; Recent versions of python-fixtures and python-testrepository need
1779 ;; python-pbr for packaging, which itself needs these two packages for
1780 ;; testing.
1781 ;; To fix this circular dependency, we use a build of python-pbr, based on the
1782 ;; same source, just without any test dependencies and with tests disabled.
1783 ;; python-pbr-minmal is then used to package python-fixtures and
1784 ;; python-testrepository.
1785 ;; Strictly speaking we currently could remove the test-requirements from the
1786 ;; normal python-pbr package (and save this package) since test are disabled
1787 ;; there anyway. But this may change in future.
1788 (define-public python-pbr-minimal
1789 (package
1790 (name "python-pbr-minimal")
1791 (version "3.0.1")
1792 (source
1793 (origin
1794 (method url-fetch)
1795 (uri (pypi-uri "pbr" version))
1796 (sha256
1797 (base32
1798 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1799 (build-system python-build-system)
1800 (arguments
1801 `(#:tests? #f))
1802 (home-page "http://docs.openstack.org/developer/pbr/")
1803 (synopsis "Minimal build of python-pbr used for bootstrapping")
1804 (description
1805 "Used only for bootstrapping python2-pbr, you should not need this.")
1806 (license license:asl2.0)))
1807
1808 (define-public python2-pbr-minimal
1809 (package-with-python2 python-pbr-minimal))
1810
1811 (define-public python-pbr
1812 (package
1813 (inherit python-pbr-minimal)
1814 (name "python-pbr")
1815 (arguments
1816 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1817 (propagated-inputs
1818 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1819 (native-inputs
1820 `(("python-fixtures" ,python-fixtures-bootstrap)
1821 ;; discover, coverage, hacking, subunit
1822 ("python-mock" ,python-mock)
1823 ("python-six" ,python-six)
1824 ("python-sphinx" ,python-sphinx)
1825 ("python-testrepository" ,python-testrepository-bootstrap)
1826 ("python-testresources" ,python-testresources-bootstrap)
1827 ("python-testscenarios" ,python-testscenarios-bootstrap)
1828 ("python-testtools" ,python-testtools-bootstrap)
1829 ("python-virtualenv" ,python-virtualenv)))
1830 (synopsis "Enhance the default behavior of Python’s setuptools")
1831 (description
1832 "Python Build Reasonableness (PBR) is a library that injects some useful
1833 and sensible default behaviors into your setuptools run. It will set
1834 versions, process requirements files and generate AUTHORS and ChangeLog file
1835 from git information.
1836 ")))
1837
1838 (define-public python2-pbr
1839 (package-with-python2 python-pbr))
1840
1841 (define-public python-pyrsistent
1842 (package
1843 (name "python-pyrsistent")
1844 (version "0.14.11")
1845 (home-page "https://github.com/tobgu/pyrsistent")
1846 (source (origin
1847 (method url-fetch)
1848 (uri (pypi-uri "pyrsistent" version))
1849 (sha256
1850 (base32
1851 "1qkh74bm296mp5g3r11lgsksr6bh4w1bf8pji4nmxdlfj542ga1w"))))
1852 (build-system python-build-system)
1853 (native-inputs
1854 `(("python-hypothesis" ,python-hypothesis)
1855 ("python-pytest" ,python-pytest)
1856 ("python-pytest-runner" ,python-pytest-runner)))
1857 (propagated-inputs
1858 `(("python-six" ,python-six)))
1859 (synopsis "Persistent data structures for Python")
1860 (description
1861 "Pyrsistent is a number of persistent collections (by some referred to as
1862 functional data structures). Persistent in the sense that they are immutable.
1863
1864 All methods on a data structure that would normally mutate it instead return a
1865 new copy of the structure containing the requested updates. The original
1866 structure is left untouched.")
1867 (license license:expat)))
1868
1869 (define-public python2-pyrsistent
1870 (package-with-python2 python-pyrsistent))
1871
1872 (define-public python-exif-read
1873 (package
1874 (name "python-exif-read")
1875 (version "2.1.2")
1876 (source (origin
1877 (method url-fetch)
1878 (uri (pypi-uri "ExifRead" version))
1879 (sha256
1880 (base32
1881 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1882 (build-system python-build-system)
1883 (arguments `(#:tests? #f)) ; no tests
1884 (home-page "https://github.com/ianare/exif-py")
1885 (synopsis "Python library to extract EXIF data from image files")
1886 (description
1887 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1888 files.")
1889 (license license:bsd-3)))
1890
1891 (define-public python2-exif-read
1892 (package-with-python2 python-exif-read))
1893
1894 (define-public python-pyld
1895 (package
1896 (name "python-pyld")
1897 (version "1.0.3")
1898 (source (origin
1899 (method url-fetch)
1900 (uri (pypi-uri "PyLD" version))
1901 (sha256
1902 (base32
1903 "12i2g6xdj30k7xxcibg3sc5y76snwq8l6n8fy9lyi577kgy0h2pm"))))
1904 (build-system python-build-system)
1905 (home-page "https://github.com/digitalbazaar/pyld")
1906 (synopsis "Python implementation of the JSON-LD specification")
1907 (description
1908 "PyLD is an implementation of the JSON-LD specification.")
1909 (license license:bsd-3)))
1910
1911 (define-public python2-pyld
1912 (package-with-python2 python-pyld))
1913
1914 (define-public python-click
1915 (package
1916 (name "python-click")
1917 (version "7.0")
1918 (source
1919 (origin
1920 (method url-fetch)
1921 (uri (pypi-uri "click" version))
1922 (sha256
1923 (base32
1924 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
1925 (build-system python-build-system)
1926 (arguments
1927 `(#:phases
1928 (modify-phases %standard-phases
1929 (add-after 'unpack 'fix-paths
1930 (lambda* (#:key inputs #:allow-other-keys)
1931 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1932 "cross-libc" "libc"))))
1933 (substitute* "click/_unicodefun.py"
1934 (("'locale'")
1935 (string-append "'" glibc "/bin/locale'"))))
1936 #t))
1937 (replace 'check
1938 (lambda _
1939 (invoke "python" "-m" "pytest"))))))
1940 (native-inputs
1941 `(("python-pytest" ,python-pytest)))
1942 (home-page "https://palletsprojects.com/p/click/")
1943 (synopsis "Command line library for Python")
1944 (description
1945 "Click is a Python package for creating command line interfaces in a
1946 composable way with as little code as necessary. Its name stands for
1947 \"Command Line Interface Creation Kit\". It's highly configurable but comes
1948 with sensible defaults out of the box.")
1949 (license license:bsd-3)))
1950
1951 (define-public python2-click
1952 (package-with-python2 python-click))
1953
1954 (define-public python-wheel
1955 (package
1956 (name "python-wheel")
1957 (version "0.32.3")
1958 (source
1959 (origin
1960 (method url-fetch)
1961 (uri (pypi-uri "wheel" version))
1962 (sha256
1963 (base32
1964 "1dhxl1bf18bx9szmqcnxbg6204hp3im8089q3hkwh5jfa6zh75q2"))))
1965 (build-system python-build-system)
1966 (native-inputs
1967 `(("python-jsonschema" ,python-jsonschema)
1968 ("python-pytest-cov" ,python-pytest-cov)))
1969 (home-page "https://bitbucket.org/pypa/wheel/")
1970 (synopsis "Format for built Python packages")
1971 (description
1972 "A wheel is a ZIP-format archive with a specially formatted filename and
1973 the @code{.whl} extension. It is designed to contain all the files for a PEP
1974 376 compatible install in a way that is very close to the on-disk format. Many
1975 packages will be properly installed with only the @code{Unpack} step and the
1976 unpacked archive preserves enough information to @code{Spread} (copy data and
1977 scripts to their final locations) at any later time. Wheel files can be
1978 installed with a newer @code{pip} or with wheel's own command line utility.")
1979 (license license:expat)
1980 (properties `((python2-variant . ,(delay python2-wheel))))))
1981
1982 (define-public python2-wheel
1983 (let ((wheel (package-with-python2
1984 (strip-python2-variant python-wheel))))
1985 (package (inherit wheel)
1986 (native-inputs `(("python2-functools32" ,python2-functools32)
1987 ,@(package-native-inputs wheel))))))
1988
1989 (define-public python-vcversioner
1990 (package
1991 (name "python-vcversioner")
1992 (version "2.16.0.0")
1993 (source
1994 (origin
1995 (method url-fetch)
1996 (uri (pypi-uri "vcversioner" version))
1997 (sha256
1998 (base32
1999 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
2000 (build-system python-build-system)
2001 (synopsis "Python library for version number discovery")
2002 (description "Vcversioner is a Python library that inspects tagging
2003 information in a variety of version control systems in order to discover
2004 version numbers.")
2005 (home-page "https://github.com/habnabit/vcversioner")
2006 (license license:isc)))
2007
2008 (define-public python2-vcversioner
2009 (package-with-python2 python-vcversioner))
2010
2011 (define-public python-jdcal
2012 (package
2013 (name "python-jdcal")
2014 (version "1.4")
2015 (source
2016 (origin
2017 (method url-fetch)
2018 (uri (pypi-uri "jdcal" version))
2019 (sha256
2020 (base32
2021 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
2022 (build-system python-build-system)
2023 (arguments
2024 `(#:phases (modify-phases %standard-phases
2025 (replace 'check
2026 (lambda _
2027 (invoke "pytest"))))))
2028 (native-inputs
2029 `(("python-pytest" ,python-pytest)))
2030 (home-page "https://github.com/phn/jdcal")
2031 (synopsis "Functions to convert between Julian dates Gregorian dates")
2032 (description "This Python library provides functions for converting
2033 between Julian dates and Gregorian dates.")
2034 (license license:bsd-2)))
2035
2036 (define-public python2-jdcal
2037 (package-with-python2 python-jdcal))
2038
2039 (define-public python-jsonschema
2040 (package
2041 (name "python-jsonschema")
2042 (version "3.0.1")
2043 (source (origin
2044 (method url-fetch)
2045 (uri (pypi-uri "jsonschema" version))
2046 (sha256
2047 (base32
2048 "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc"))))
2049 (build-system python-build-system)
2050 (arguments
2051 '(#:phases
2052 (modify-phases %standard-phases
2053 (replace 'check
2054 (lambda _
2055 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2056 (invoke "trial" "jsonschema"))))))
2057 (native-inputs
2058 `(("python-setuptools_scm" ,python-setuptools-scm)
2059 ("python-twisted" ,python-twisted)))
2060 (propagated-inputs
2061 `(("python-attrs" ,python-attrs)
2062 ("python-pyrsistent" ,python-pyrsistent)
2063 ("python-six" ,python-six)))
2064 (home-page "https://github.com/Julian/jsonschema")
2065 (synopsis "Implementation of JSON Schema for Python")
2066 (description
2067 "Jsonschema is an implementation of JSON Schema for Python.")
2068 (license license:expat)
2069 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2070
2071 (define-public python2-jsonschema
2072 (let ((jsonschema (package-with-python2
2073 (strip-python2-variant python-jsonschema))))
2074 (package (inherit jsonschema)
2075 (propagated-inputs
2076 `(("python2-functools32" ,python2-functools32)
2077 ,@(package-propagated-inputs jsonschema))))))
2078
2079 ;; This old version is still required by docker-compose as of 1.24.0.
2080 (define-public python-jsonschema-2.6
2081 (package
2082 (name "python-jsonschema")
2083 (version "2.6.0")
2084 (source (origin
2085 (method url-fetch)
2086 (uri (pypi-uri "jsonschema" version))
2087 (sha256
2088 (base32
2089 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
2090 (build-system python-build-system)
2091 (arguments
2092 '(#:phases
2093 (modify-phases %standard-phases
2094 (replace 'check (lambda _ (invoke "nosetests"))))))
2095 (native-inputs
2096 `(("python-nose" ,python-nose)
2097 ("python-vcversioner" ,python-vcversioner)))
2098 (home-page "https://github.com/Julian/jsonschema")
2099 (synopsis "Implementation of JSON Schema for Python")
2100 (description
2101 "Jsonschema is an implementation of JSON Schema for Python.")
2102 (license license:expat)
2103 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2104
2105 (define-public python-schema
2106 (package
2107 (name "python-schema")
2108 (version "0.6.6")
2109 (source
2110 (origin
2111 (method url-fetch)
2112 (uri (pypi-uri "schema" version))
2113 (sha256
2114 (base32
2115 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2116 (build-system python-build-system)
2117 (native-inputs
2118 `(("python-pytest" ,python-pytest)))
2119 (home-page "https://github.com/keleshev/schema")
2120 (synopsis "Simple data validation library")
2121 (description
2122 "@code{python-schema} is a library for validating Python data
2123 structures, such as those obtained from config-files, forms, external
2124 services or command-line parsing, converted from JSON/YAML (or
2125 something else) to Python data-types.")
2126 (license license:psfl)))
2127
2128 (define-public python2-schema
2129 (package-with-python2 python-schema))
2130
2131 (define-public python-schema-0.5
2132 (package (inherit python-schema)
2133 (version "0.5.0")
2134 (source
2135 (origin
2136 (method url-fetch)
2137 (uri (pypi-uri "schema" version))
2138 (sha256
2139 (base32
2140 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2141
2142 (define-public python2-schema-0.5
2143 (package-with-python2 python-schema-0.5))
2144
2145 (define-public python-kitchen
2146 (package
2147 (name "python-kitchen")
2148 (version "1.2.5")
2149 (source
2150 (origin
2151 (method url-fetch)
2152 (uri (pypi-uri "kitchen" version))
2153 (sha256
2154 (base32
2155 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2156 (build-system python-build-system)
2157 (propagated-inputs
2158 `(("python-chardet" ,python-chardet)))
2159 (home-page "https://github.com/fedora-infra/kitchen")
2160 (synopsis "Python API for snippets")
2161 (description "@code{kitchen} module provides a python API for all sorts of
2162 little useful snippets of code that everybody ends up writing for their projects
2163 but never seem big enough to build an independent release. Use kitchen and stop
2164 cutting and pasting that code over and over.")
2165 (license (list license:lgpl2.1+
2166 ;; subprocess.py, test_subprocess.py,
2167 ;; kitchen/pycompat25/defaultdict.py:
2168 license:psfl))))
2169
2170 (define-public python2-kitchen
2171 (package-with-python2 python-kitchen))
2172
2173 (define-public python-unidecode
2174 (package
2175 (name "python-unidecode")
2176 (version "1.1.0")
2177 (source (origin
2178 (method url-fetch)
2179 (uri (pypi-uri "Unidecode" version))
2180 (sha256
2181 (base32
2182 "00pi0czzwvbf7djhkkjyvimj60wqdx0llbddzfnax650g9b8yscc"))))
2183 (build-system python-build-system)
2184 (home-page "https://pypi.python.org/pypi/Unidecode")
2185 (synopsis "ASCII transliterations of Unicode text")
2186 (description
2187 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2188 useful when integrating with legacy code that doesn't support Unicode, or for
2189 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2190 machine identifiers from human-readable Unicode strings that should still be
2191 somewhat intelligible.")
2192 (license license:gpl2+)))
2193
2194 (define-public python2-unidecode
2195 (package-with-python2 python-unidecode))
2196
2197 (define-public python-pyjwt
2198 (package
2199 (name "python-pyjwt")
2200 (version "1.5.3")
2201 (source
2202 (origin
2203 (method url-fetch)
2204 (uri (pypi-uri "PyJWT" version))
2205 (sha256
2206 (base32
2207 "1rxsg14i33vm2i6lz0my628108c81k43v10n4h3p0gx62xdyf2sh"))
2208 (modules '((guix build utils)))
2209 (snippet
2210 '(begin
2211 (for-each delete-file-recursively
2212 (find-files "." "\\.pyc$"))
2213 #t))))
2214 (build-system python-build-system)
2215 (native-inputs
2216 `(("python-pytest" ,python-pytest)
2217 ("python-pytest-cov" ,python-pytest-cov)
2218 ("python-pytest-runner" ,python-pytest-runner)))
2219 (home-page "https://github.com/progrium/pyjwt")
2220 (synopsis "JSON Web Token implementation in Python")
2221 (description
2222 "PyJWT is a JSON Web Token implementation written in Python.")
2223 (license license:expat)))
2224
2225 (define-public python2-pyjwt
2226 (package-with-python2 python-pyjwt))
2227
2228 (define-public python-pykka
2229 (package
2230 (name "python-pykka")
2231 (version "1.2.1")
2232 (source
2233 (origin
2234 (method url-fetch)
2235 (uri (pypi-uri "Pykka" version))
2236 (sha256
2237 (base32
2238 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2239 (build-system python-build-system)
2240 (native-inputs
2241 `(("python-mock" ,python-mock)
2242 ("python-nose" ,python-nose)
2243 ("python-gevent" ,python-gevent)
2244 ("python-eventlet" ,python-eventlet)))
2245 (home-page "https://www.pykka.org/")
2246 (synopsis "Pykka is a Python implementation of the actor model")
2247 (description
2248 "Pykka is a Python implementation of the actor model.
2249 The actor model introduces some simple rules to control the sharing
2250 of state and cooperation between execution units, which makes it
2251 easier to build concurrent applications.")
2252 (license license:asl2.0)))
2253
2254 (define-public python2-pykka
2255 (package-with-python2 python-pykka))
2256
2257 (define-public python-pymsgbox
2258 (package
2259 (name "python-pymsgbox")
2260 (version "1.0.6")
2261 (source
2262 (origin
2263 (method git-fetch)
2264 (uri (git-reference
2265 ;; LICENSE.txt is not present on pypi
2266 (url "https://github.com/asweigart/PyMsgBox")
2267 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2268 (file-name (git-file-name name version))
2269 (sha256
2270 (base32
2271 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2272 (arguments
2273 ;; Circular dependency to run tests:
2274 ;; Tests need pyautogui, which depends on pymsgbox.
2275 '(#:tests? #f))
2276 (build-system python-build-system)
2277 (home-page "https://github.com/asweigart/PyMsgBox")
2278 (synopsis "Python module for JavaScript-like message boxes")
2279 (description
2280 "PyMsgBox is a simple, cross-platform, pure Python module for
2281 JavaScript-like message boxes. Types of dialog boxes include:
2282 @enumerate
2283 @item alert
2284 @item confirm
2285 @item prompt
2286 @item password
2287 @end enumerate
2288 ")
2289 (license license:bsd-3)))
2290
2291 (define-public python-pympler
2292 (package
2293 (name "python-pympler")
2294 (home-page "https://pythonhosted.org/Pympler/")
2295 (version "0.7")
2296 (source (origin
2297 (method url-fetch)
2298 (uri (pypi-uri "Pympler" version))
2299 (sha256
2300 (base32
2301 "0ki7bqp1h9l1xc2k1h4vjyzsgs20i8ingvcdhszyi72s28wyf4bs"))))
2302 (build-system python-build-system)
2303 (arguments
2304 `(#:phases (modify-phases %standard-phases
2305 (delete 'check)
2306 (add-after 'install 'check
2307 (lambda* (#:key inputs outputs #:allow-other-keys)
2308 (add-installed-pythonpath inputs outputs)
2309 (invoke "python" "setup.py" "test"))))))
2310 (synopsis "Measure, monitor and analyze memory behavior")
2311 (description
2312 "Pympler is a development tool to measure, monitor and analyze
2313 the memory behavior of Python objects in a running Python application.
2314
2315 By pympling a Python application, detailed insight in the size and the
2316 lifetime of Python objects can be obtained. Undesirable or unexpected
2317 runtime behavior like memory bloat and other @samp{pymples} can easily
2318 be identified.
2319
2320 A web profiling frontend exposes process statistics, garbage
2321 visualisation and class tracker statistics.")
2322 (license license:asl2.0)))
2323
2324 (define-public python2-pympler
2325 (package-with-python2 python-pympler))
2326
2327 (define-public python-itsdangerous
2328 (package
2329 (name "python-itsdangerous")
2330 (version "1.1.0")
2331 (source
2332 (origin
2333 (method url-fetch)
2334 (uri (pypi-uri "itsdangerous" version))
2335 (sha256
2336 (base32
2337 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
2338 (build-system python-build-system)
2339 (home-page "https://palletsprojects.com/p/itsdangerous/")
2340 (synopsis "Python library for passing data to/from untrusted environments")
2341 (description
2342 "Itsdangerous provides various helpers to pass trusted data to untrusted
2343 environments and back.")
2344 (license license:bsd-3)))
2345
2346 (define-public python2-itsdangerous
2347 (package-with-python2 python-itsdangerous))
2348
2349 (define-public python-pyyaml
2350 (package
2351 (name "python-pyyaml")
2352 (version "3.13")
2353 (source
2354 (origin
2355 (method url-fetch)
2356 (uri (pypi-uri "PyYAML" version))
2357 (sha256
2358 (base32
2359 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2360 (build-system python-build-system)
2361 (inputs
2362 `(("libyaml" ,libyaml)))
2363 (home-page "http://pyyaml.org/wiki/PyYAML")
2364 (synopsis "YAML parser and emitter for Python")
2365 (description
2366 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2367 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2368 API, and sensible error messages. PyYAML supports standard YAML tags and
2369 provides Python-specific tags that allow to represent an arbitrary Python
2370 object.")
2371 (license license:expat)))
2372
2373 (define-public python2-pyyaml
2374 (package-with-python2 python-pyyaml))
2375
2376 (define-public python-vine
2377 (package
2378 (name "python-vine")
2379 (version "1.1.4")
2380 (source
2381 (origin
2382 (method url-fetch)
2383 (uri (pypi-uri "vine" version))
2384 (sha256
2385 (base32
2386 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2387 (build-system python-build-system)
2388 (native-inputs
2389 `(("python-pytest" ,python-pytest)
2390 ("python-case" ,python-case)))
2391 (home-page "https://github.com/celery/vine")
2392 (synopsis "Promises for Python")
2393 (description
2394 "@code{vine} provides a special implementation of promises in that it can
2395 be used both for \"promise of a value\" and lazy evaluation. The biggest
2396 upside for this is that everything in a promise can also be a promise,
2397 e.g. filters, callbacks and errbacks can all be promises.")
2398 (license license:bsd-3)))
2399
2400 (define-public python-virtualenv
2401 (package
2402 (name "python-virtualenv")
2403 (version "16.1.0")
2404 (source
2405 (origin
2406 (method url-fetch)
2407 (uri (pypi-uri "virtualenv" version))
2408 (sha256
2409 (base32
2410 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
2411 (build-system python-build-system)
2412 (arguments
2413 `(#:phases
2414 (modify-phases %standard-phases
2415 (add-before 'check 'disable-failing-test
2416 (lambda _
2417 ;; Disable failing test. See upstream bug report
2418 ;; https://github.com/pypa/virtualenv/issues/957
2419 (substitute* "tests/test_virtualenv.py"
2420 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2421 #t)))))
2422 (native-inputs
2423 `(("python-mock" ,python-mock)
2424 ("python-pytest" ,python-pytest)))
2425 (home-page "https://virtualenv.pypa.io/")
2426 (synopsis "Virtual Python environment builder")
2427 (description
2428 "Virtualenv is a tool to create isolated Python environments.")
2429 (license license:expat)))
2430
2431 (define-public python2-virtualenv
2432 (package-with-python2 python-virtualenv))
2433
2434 (define-public python-markupsafe
2435 (package
2436 (name "python-markupsafe")
2437 (version "1.1.1")
2438 (source
2439 (origin
2440 (method url-fetch)
2441 (uri (pypi-uri "MarkupSafe" version))
2442 (sha256
2443 (base32
2444 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
2445 (build-system python-build-system)
2446 (arguments
2447 `(#:modules ((ice-9 ftw)
2448 (srfi srfi-1)
2449 (srfi srfi-26)
2450 (guix build utils)
2451 (guix build python-build-system))
2452 #:phases (modify-phases %standard-phases
2453 (replace 'check
2454 (lambda _
2455 (let ((cwd (getcwd))
2456 (libdir (find (cut string-prefix? "lib." <>)
2457 (scandir "build"))))
2458 (setenv "PYTHONPATH"
2459 (string-append cwd "/build/" libdir ":"
2460 (getenv "PYTHONPATH")))
2461 (invoke "pytest" "-vv")))))))
2462 (native-inputs
2463 `(("python-pytest" ,python-pytest)))
2464 (home-page "https://github.com/mitsuhiko/markupsafe")
2465 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2466 (description
2467 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2468 for Python.")
2469 (license license:bsd-3)))
2470
2471 (define-public python2-markupsafe
2472 (package-with-python2 python-markupsafe))
2473
2474 (define-public python-jinja2
2475 (package
2476 (name "python-jinja2")
2477 (version "2.10.1")
2478 (source
2479 (origin
2480 (method url-fetch)
2481 (uri (pypi-uri "Jinja2" version))
2482 (sha256
2483 (base32
2484 "04shqrs56aj04ipyqykj512rw2l0zfammvj9krawzxz7xc14yp06"))))
2485 (build-system python-build-system)
2486 (propagated-inputs
2487 `(("python-markupsafe" ,python-markupsafe)))
2488 (home-page "http://jinja.pocoo.org/")
2489 (synopsis "Python template engine")
2490 (description
2491 "Jinja2 is a small but fast and easy to use stand-alone template engine
2492 written in pure Python.")
2493 (license license:bsd-3)))
2494
2495 (define-public python2-jinja2
2496 (package-with-python2 python-jinja2))
2497
2498 (define-public python-pystache
2499 (package
2500 (name "python-pystache")
2501 (version "0.5.4")
2502 (source (origin
2503 (method url-fetch)
2504 (uri (pypi-uri "pystache" version))
2505 (sha256
2506 (base32
2507 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2508 (build-system python-build-system)
2509 (arguments
2510 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2511 (home-page "http://defunkt.io/pystache/")
2512 (synopsis "Python logic-less template engine")
2513 (description
2514 "Pystache is a Python implementation of the framework agnostic,
2515 logic-free templating system Mustache.")
2516 (license license:expat)
2517 (properties `((python2-variant . ,(delay python2-pystache))))))
2518
2519 (define-public python2-pystache
2520 (package (inherit (package-with-python2
2521 (strip-python2-variant python-pystache)))
2522 (arguments
2523 `(#:python ,python-2
2524 #:phases
2525 (modify-phases %standard-phases
2526 (replace 'check
2527 (lambda _
2528 (invoke "python" "test_pystache.py"))))))))
2529
2530 (define-public python-joblib
2531 (package
2532 (name "python-joblib")
2533 (version "0.13.0")
2534 (source (origin
2535 (method url-fetch)
2536 (uri (pypi-uri "joblib" version))
2537 (sha256
2538 (base32
2539 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2540 (build-system python-build-system)
2541 (arguments
2542 `(#:phases
2543 (modify-phases %standard-phases
2544 (replace 'check
2545 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2546 (native-inputs
2547 `(("python-pytest" ,python-pytest)))
2548 (home-page "https://joblib.readthedocs.io/")
2549 (synopsis "Using Python functions as pipeline jobs")
2550 (description
2551 "Joblib is a set of tools to provide lightweight pipelining in Python.
2552 In particular, joblib offers: transparent disk-caching of the output values
2553 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2554 logging and tracing of the execution.")
2555 (license license:bsd-3)))
2556
2557 (define-public python2-joblib
2558 (package-with-python2 python-joblib))
2559
2560 (define-public python-daemon
2561 (package
2562 (name "python-daemon")
2563 (version "2.2.3")
2564 (source
2565 (origin
2566 (method url-fetch)
2567 (uri (pypi-uri "python-daemon" version))
2568 (sha256
2569 (base32
2570 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2571 (build-system python-build-system)
2572 (arguments
2573 `(#:phases
2574 (modify-phases %standard-phases
2575 (add-before 'check 'disable-tests
2576 (lambda _
2577 ;; FIXME: Determine why test fails
2578 (substitute* "test/test_daemon.py"
2579 (("test_detaches_process_context")
2580 "skip_test_detaches_process_context"))
2581 #t)))))
2582 (propagated-inputs
2583 `(("python-lockfile" ,python-lockfile)))
2584 (native-inputs
2585 `(("python-unittest2" ,python-unittest2)
2586 ("python-testtools" ,python-testtools)
2587 ("python-testscenarios" ,python-testscenarios)
2588 ("python-mock" ,python-mock)
2589 ("python-docutils" ,python-docutils)))
2590 (home-page "https://pagure.io/python-daemon/")
2591 (synopsis "Python library for making a Unix daemon process")
2592 (description "Python-daemon is a library that assists a Python program to
2593 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2594
2595 This library provides a @code{DaemonContext} class that manages the following
2596 important tasks for becoming a daemon process:
2597 @enumerate
2598 @item Detach the process into its own process group.
2599 @item Set process environment appropriate for running inside a chroot.
2600 @item Renounce suid and sgid privileges.
2601 @item Close all open file descriptors.
2602 @item Change the working directory, uid, gid, and umask.
2603 @item Set appropriate signal handlers.
2604 @item Open new file descriptors for stdin, stdout, and stderr.
2605 @item Manage a specified PID lock file.
2606 @item Register cleanup functions for at-exit processing.
2607 @end enumerate")
2608 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2609 (license (list license:asl2.0 license:gpl3+))))
2610
2611 (define-public python-docutils
2612 (package
2613 (name "python-docutils")
2614 (version "0.14")
2615 (source
2616 (origin
2617 (method url-fetch)
2618 (uri (pypi-uri "docutils" version))
2619 (sha256
2620 (base32
2621 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2622 (build-system python-build-system)
2623 (arguments
2624 '(#:tests? #f)) ; no setup.py test command
2625 (home-page "http://docutils.sourceforge.net/")
2626 (synopsis "Python Documentation Utilities")
2627 (description
2628 "Docutils is a modular system for processing documentation into useful
2629 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2630 reStructuredText.")
2631 ;; Most of the source code is public domain, but some source files are
2632 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2633 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2634
2635 (define-public python2-docutils
2636 (package-with-python2 python-docutils))
2637
2638 (define-public python-pygments
2639 (package
2640 (name "python-pygments")
2641 (version "2.4.2")
2642 (source
2643 (origin
2644 (method url-fetch)
2645 (uri (pypi-uri "Pygments" version))
2646 (sha256
2647 (base32
2648 "15v2sqm5g12bqa0c7wikfh9ck2nl97ayizy1hpqhmws5gqalq748"))))
2649 (build-system python-build-system)
2650 (arguments
2651 ;; FIXME: Tests require sphinx, which depends on this.
2652 '(#:tests? #f))
2653 (home-page "http://pygments.org/")
2654 (synopsis "Syntax highlighting")
2655 (description
2656 "Pygments is a syntax highlighting package written in Python.")
2657 (license license:bsd-2)))
2658
2659 (define-public python2-pygments
2660 (package-with-python2 python-pygments))
2661
2662 (define-public python-bumpversion
2663 (package
2664 (name "python-bumpversion")
2665 (version "0.5.3")
2666 (source
2667 (origin
2668 (method url-fetch)
2669 (uri (pypi-uri "bumpversion" version))
2670 (sha256
2671 (base32
2672 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
2673 (build-system python-build-system)
2674 (home-page "https://github.com/peritus/bumpversion")
2675 (synopsis "Tool to bump software version")
2676 (description "This tool provides a command-line interface (CLI) to bump a
2677 software version simply.")
2678 (license license:expat)))
2679
2680 (define-public python-deprecated
2681 (package
2682 (name "python-deprecated")
2683 (version "1.2.5")
2684 (source
2685 (origin
2686 (method git-fetch)
2687 (uri (git-reference
2688 (url "https://github.com/tantale/deprecated.git")
2689 (commit (string-append "v" version))))
2690 (file-name (git-file-name name version))
2691 (sha256
2692 (base32
2693 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
2694 (build-system python-build-system)
2695 (arguments
2696 `(#:phases (modify-phases %standard-phases
2697 (replace 'check
2698 (lambda _
2699 (invoke "pytest"))))))
2700 (propagated-inputs
2701 `(("python-wrapt" ,python-wrapt)))
2702 (native-inputs
2703 `(("python-bumpversion" ,python-bumpversion)
2704 ("python-pytest" ,python-pytest)
2705 ("python-pytest-cov" ,python-pytest-cov)
2706 ("python-sphinx" ,python-sphinx)
2707 ("python-tox" ,python-tox)))
2708 (home-page "https://github.com/tantale/deprecated")
2709 (synopsis "Python decorator to deprecate classes, functions or methods")
2710 (description "The @code{deprecated} decorator provides a convenient way to deprecate
2711 to deprecate classes, functions or methods.")
2712 (license license:expat)))
2713
2714 (define-public python-pygithub
2715 (package
2716 (name "python-pygithub")
2717 (version "1.43.7")
2718 (source
2719 ;; We fetch from the Git repo because there are no tests in the PyPI
2720 ;; archive.
2721 (origin
2722 (method git-fetch)
2723 (uri (git-reference
2724 (url "https://github.com/PyGithub/PyGithub.git")
2725 (commit (string-append "v" version))))
2726 (file-name (git-file-name name version))
2727 (sha256
2728 (base32
2729 "0ww92zz0ja9w6rw83vphmn8rwmcn6abg16j4q7zxjc0rrg2cfj9i"))))
2730 (build-system python-build-system)
2731 (arguments
2732 `(#:phases (modify-phases %standard-phases
2733 ;; Some tests rely on the network.
2734 (add-after 'unpack 'disable-failing-tests
2735 (lambda _
2736 (substitute* "tests/Issue142.py"
2737 (("testDecodeJson") "disabled_testDecodeJson"))
2738 #t))
2739 (add-before 'check 'prepare-for-tests
2740 (lambda _
2741 (for-each (lambda (f)
2742 (chmod f #o666))
2743 (find-files "./tests"))
2744 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
2745 (setenv "PYTHONPATH"
2746 (string-append "./tests:" (getenv "PYTHONPATH")))
2747 #t)))))
2748 (propagated-inputs
2749 `(("python-deprecated" ,python-deprecated)
2750 ("python-pyjwt" ,python-pyjwt)
2751 ("python-requests" ,python-requests)))
2752 (native-inputs `(("python-httpretty" ,python-httpretty)))
2753 (home-page "https://pygithub.readthedocs.io/en/latest/")
2754 (synopsis "Python library for the GitHub API")
2755 (description "This library allows managing GitHub resources such as
2756 repositories, user profiles, and organizations in your Python applications,
2757 using version 3 of the GitHub application programming interface (API).")
2758 (license license:lgpl3+)))
2759
2760 (define-public python-rellu
2761 (package
2762 (name "python-rellu")
2763 (version "0.7")
2764 (source
2765 (origin
2766 (method url-fetch)
2767 (uri (pypi-uri "rellu" version))
2768 (sha256
2769 (base32
2770 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
2771 (build-system python-build-system)
2772 (propagated-inputs
2773 `(("python-invoke" ,python-invoke)
2774 ("python-pygithub" ,python-pygithub)))
2775 (home-page "https://github.com/robotframework/rellu")
2776 (synopsis "Utilities to create PyPI releases")
2777 (description "This collection of utilities contains tooling and templates
2778 to assist in creating releases on GitHub and publishing them on PyPI. It is
2779 designed to be used by Robot Framework and tools and libraries in its
2780 ecosystem, but can naturally be used also by other projects.")
2781 (license license:asl2.0)))
2782
2783 (define-public python-robotframework
2784 (package
2785 (name "python-robotframework")
2786 (version "3.1.2")
2787 ;; There are no tests in the PyPI archive.
2788 (source
2789 (origin
2790 (method git-fetch)
2791 (uri (git-reference
2792 (url "https://github.com/robotframework/robotframework.git")
2793 (commit (string-append "v" version))))
2794 (file-name (git-file-name name version))
2795 (sha256
2796 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
2797 (patches (search-patches
2798 "python-robotframework-honor-source-date-epoch.patch"))))
2799 (build-system python-build-system)
2800 (arguments
2801 `(#:phases (modify-phases %standard-phases
2802 (add-before 'build 'build-and-install-doc
2803 (lambda* (#:key outputs #:allow-other-keys)
2804 (let* ((doc-output (assoc-ref outputs "doc"))
2805 (doc (string-append doc-output "/share/"
2806 ,name "-" ,version "/")))
2807 (invoke "invoke" "library-docs" "all")
2808 (mkdir-p doc)
2809 (copy-recursively "doc/libraries"
2810 (string-append doc "/libraries"))
2811 #t)))
2812 (replace 'check
2813 (lambda _
2814 (invoke "python" "utest/run.py"))))))
2815 (native-inputs
2816 `(("python-invoke" ,python-invoke)
2817 ("python-rellu" ,python-rellu)
2818 ("python:tk" ,python "tk"))) ;used when building the HTML doc
2819 (outputs '("out" "doc"))
2820 (home-page "https://robotframework.org")
2821 (synopsis "Generic automation framework")
2822 (description "Robot Framework is a generic automation framework for
2823 acceptance testing, acceptance test driven development (ATDD), and robotic
2824 process automation (RPA).")
2825 (license license:asl2.0)))
2826
2827 (define-public python-robotframework-lint
2828 ;; There is no properly tagged release; the commit below seems to correspond
2829 ;; to the 0.9 stable release available from PyPI. The tests are not
2830 ;; included in the PyPI archive, so we fetch the sources from the upstream
2831 ;; Git repo.
2832 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
2833 (revision "1"))
2834 (package
2835 (name "python-robotframework-lint")
2836 (version (git-version "0.9.0" revision commit))
2837 (source
2838 (origin
2839 (method git-fetch)
2840 (uri (git-reference
2841 (url "https://github.com/boakley/robotframework-lint.git")
2842 (commit commit)))
2843 (file-name (git-file-name name version))
2844 (sha256
2845 (base32
2846 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
2847 (build-system python-build-system)
2848 (arguments
2849 `(#:phases
2850 (modify-phases %standard-phases
2851 (replace 'check
2852 (lambda _
2853 (invoke "python" "-m" "robot" "-A"
2854 "tests/conf/default.args" "tests"))))))
2855 (propagated-inputs
2856 `(("python-robotframework" ,python-robotframework)))
2857 (home-page "https://github.com/boakley/robotframework-lint/")
2858 (synopsis "Static analysis tool (linter) for Robot Framework")
2859 (description "This package provides the @code{rflint} command-line
2860 utility, a static analysis tool (linter) for Robot Framework source files.")
2861 (license license:asl2.0))))
2862
2863 (define-public python-robotframework-sshlibrary
2864 (package
2865 (name "python-robotframework-sshlibrary")
2866 (version "3.3.0")
2867 ;; There are no tests in the PyPI archive.
2868 (source
2869 (origin
2870 (method git-fetch)
2871 (uri (git-reference
2872 (url "https://github.com/robotframework/SSHLibrary.git")
2873 (commit (string-append "v" version))))
2874 (file-name (git-file-name name version))
2875 (sha256
2876 (base32
2877 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
2878 (build-system python-build-system)
2879 (arguments
2880 `(#:phases
2881 (modify-phases %standard-phases
2882 (add-before 'build 'build-and-install-doc
2883 (lambda* (#:key outputs #:allow-other-keys)
2884 (let* ((doc-output (assoc-ref outputs "doc"))
2885 (doc (string-append doc-output "/share/"
2886 ,name "-" ,version "/")))
2887 (invoke "chmod" "-R" "+w" "docs")
2888 (invoke "invoke" "kw-docs" "project-docs")
2889 (mkdir-p doc)
2890 (for-each delete-file (find-files "docs" "\\.rst"))
2891 (copy-recursively "docs" doc)
2892 #t)))
2893 (replace 'check
2894 (lambda _
2895 ;; Some tests require an SSH server; we remove them.
2896 (delete-file "utest/test_client_api.py")
2897 (delete-file "utest/test_scp.py")
2898 (invoke "python" "utest/run.py"))))))
2899 (propagated-inputs
2900 `(("python-robotframework" ,python-robotframework)
2901 ("python-paramiko" ,python-paramiko)
2902 ("python-scp" ,python-scp)))
2903 (native-inputs
2904 `(("openssh" ,openssh)
2905 ("which" ,which)
2906 ;; To generate the documentation
2907 ("python-docutils" ,python-docutils)
2908 ("python-invoke" ,python-invoke)
2909 ("python-pygments" ,python-pygments)
2910 ("python-rellu" ,python-rellu)))
2911 (outputs '("out" "doc"))
2912 (home-page "https://github.com/robotframework/SSHLibrary")
2913 (synopsis "Robot Framework library for SSH and SFTP")
2914 (description "SSHLibrary is a Robot Framework library providing support
2915 for SSH and SFTP. It has the following main usages:
2916 @itemize @bullet
2917 @item Executing commands on the remote machine, either blocking or non-blocking.
2918 @item Writing and reading in an interactive shell.
2919 @item Transferring files and directories over SFTP.
2920 @item Ensuring that files and directories exist on the remote machine.
2921 @end itemize")
2922 (license license:asl2.0)))
2923
2924 (define-public python-scp
2925 (package
2926 (name "python-scp")
2927 (version "0.13.2")
2928 (source
2929 (origin
2930 (method url-fetch)
2931 (uri (pypi-uri "scp" version))
2932 (sha256
2933 (base32
2934 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
2935 (build-system python-build-system)
2936 (arguments
2937 '(#:tests? #f)) ;tests require an SSH server
2938 (propagated-inputs
2939 `(("python-paramiko" ,python-paramiko)))
2940 (home-page "https://github.com/jbardin/scp.py")
2941 (synopsis "SCP protocol module for Python and Paramiko")
2942 (description "The scp module extends the Paramiko library to send and
2943 receive files via the SCP1 protocol, as implemented by the OpenSSH
2944 @command{scp} program.")
2945 (license license:gpl2+)))
2946
2947 (define-public python-rst.linker
2948 (package
2949 (name "python-rst.linker")
2950 (version "1.10")
2951 (source
2952 (origin
2953 (method url-fetch)
2954 (uri (pypi-uri "rst.linker" version))
2955 (sha256
2956 (base32
2957 "0iqaacp7pj1s8avs4kc0qg0r7dscywaq37y6l9j14glqdikk0wdj"))))
2958 (build-system python-build-system)
2959 (propagated-inputs
2960 `(("python-dateutil" ,python-dateutil)
2961 ("python-six" ,python-six)))
2962 (native-inputs
2963 `(("python-setuptools-scm" ,python-setuptools-scm)))
2964 ;; Test would require path.py, which would introduce a cyclic dependence.
2965 (arguments `(#:tests? #f))
2966 ;; Note: As of version 1.7 the documentation is not worth building.
2967 (home-page "https://github.com/jaraco/rst.linker")
2968 (synopsis "Sphinx plugin to add links and timestamps")
2969 (description "rst.linker allows to automatically replace text by a
2970 reStructuredText external reference or timestamps. It's primary purpose is to
2971 augment the changelog, but it can be used for other documents, too.")
2972 (license license:expat)))
2973
2974 (define-public python2-rst.linker
2975 (package-with-python2 python-rst.linker))
2976
2977 (define-public python-feedgenerator
2978 (package
2979 (name "python-feedgenerator")
2980 (version "1.9")
2981 (source
2982 (origin
2983 (method url-fetch)
2984 (uri (pypi-uri "feedgenerator" version))
2985 (sha256
2986 (base32
2987 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2988 (modules '((guix build utils)))
2989 (snippet
2990 '(begin
2991 ;; Remove pre-compiled .pyc files from source.
2992 (for-each delete-file-recursively
2993 (find-files "." "__pycache__" #:directories? #t))
2994 (for-each delete-file (find-files "." "\\.pyc$"))
2995 #t))))
2996 (build-system python-build-system)
2997 (propagated-inputs
2998 `(("python-pytz" ,python-pytz)
2999 ("python-six" ,python-six)))
3000 (home-page "https://github.com/getpelican/feedgenerator")
3001 (synopsis
3002 "Standalone version of Django's Atom/RSS feed generator")
3003 (description
3004 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3005 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3006 (license license:bsd-3)))
3007
3008 (define-public python2-feedgenerator
3009 (package-with-python2 python-feedgenerator))
3010
3011 (define-public python-toml
3012 (package
3013 (name "python-toml")
3014 (version "0.9.4")
3015 (source
3016 (origin
3017 (method url-fetch)
3018 (uri (pypi-uri "toml" version))
3019 (sha256
3020 (base32
3021 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
3022 (build-system python-build-system)
3023 (arguments
3024 `(#:tests? #f)) ;no tests suite in release
3025 (home-page "https://github.com/uiri/toml")
3026 (synopsis "Library for TOML")
3027 (description
3028 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
3029 Language (TOML) configuration files.")
3030 (license license:expat)))
3031
3032 (define-public python-jsonrpc-server
3033 (package
3034 (name "python-jsonrpc-server")
3035 (version "0.1.2")
3036 (source
3037 (origin
3038 (method url-fetch)
3039 (uri (pypi-uri "python-jsonrpc-server" version))
3040 (sha256
3041 (base32
3042 "0m4ykpcdy52x37n1ikysp07j7p8ialcdvvvsrjp3545sn7iiid09"))))
3043 (build-system python-build-system)
3044 (propagated-inputs
3045 `(("python-future" ,python-future)
3046 ("python-mock" ,python-mock)
3047 ("python-pytest" ,python-pytest)))
3048 (home-page
3049 "https://github.com/palantir/python-jsonrpc-server")
3050 (synopsis "JSON RPC 2.0 server library")
3051 (description
3052 "This package provides a JSON RPC 2.0 server library for Python.")
3053 (license license:expat)))
3054
3055 (define-public python-pydocstyle
3056 (package
3057 (name "python-pydocstyle")
3058 (version "3.0.0")
3059 (source
3060 (origin
3061 (method url-fetch)
3062 (uri (pypi-uri "pydocstyle" version))
3063 (sha256
3064 (base32
3065 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
3066 (build-system python-build-system)
3067 (propagated-inputs
3068 `(("python-six" ,python-six)
3069 ("python-snowballstemmer" ,python-snowballstemmer)))
3070 (home-page
3071 "https://github.com/PyCQA/pydocstyle/")
3072 (synopsis "Python docstring style checker")
3073 (description
3074 "This package provides a style checker for the Python Language
3075 Server (PLS).")
3076 (license license:expat)))
3077
3078 ;; XXX: We must use a non-release version since the latest release version
3079 ;; requires python-jedi version < 0.15.
3080 (define-public python-language-server
3081 (let ((commit "c3cab77a85b1de4af1aec1bafea6a7320d6baec5")
3082 (revision "1"))
3083 (package
3084 (name "python-language-server")
3085 (version (git-version "0.28.3" revision commit))
3086 (source
3087 (origin
3088 (method git-fetch)
3089 (uri (git-reference
3090 (url "https://github.com/palantir/python-language-server.git")
3091 (commit commit)))
3092 (sha256
3093 (base32
3094 "1q0xdwgln09sh58j0ryygj92hfgdhwcs57zjvqihya23jr5v0bz4"))))
3095 (build-system python-build-system)
3096 (propagated-inputs
3097 `(("python-pluggy" ,python-pluggy)
3098 ("python-jsonrpc-server" ,python-jsonrpc-server)
3099 ("python-jedi" ,python-jedi)
3100 ("python-yapf" ,python-yapf)
3101 ("python-pyflakes" ,python-pyflakes)
3102 ("python-pydocstyle" ,python-pydocstyle)
3103 ("python-pycodestyle" ,python-pycodestyle)
3104 ("python-mccabe" ,python-mccabe)
3105 ("python-rope" ,python-rope)
3106 ("python-autopep8" ,python-autopep8)
3107 ("python-pylint" ,python-pylint)))
3108 (home-page "https://github.com/palantir/python-language-server")
3109 (synopsis "Python implementation of the Language Server Protocol")
3110 (description
3111 "The Python Language Server (pyls) is an implementation of the Python 3
3112 language specification for the Language Server Protocol (LSP). This tool is
3113 used in text editing environments to provide a complete and integrated
3114 feature-set for programming Python effectively.")
3115 (license license:expat))))
3116
3117 (define-public python-black
3118 (package
3119 (name "python-black")
3120 (version "18.6b4")
3121 (source
3122 (origin
3123 (method url-fetch)
3124 (uri (pypi-uri "black" version))
3125 (sha256
3126 (base32
3127 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
3128 (build-system python-build-system)
3129 (arguments
3130 `(#:phases
3131 (modify-phases %standard-phases
3132 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3133 (lambda _
3134 (let ((python3 (which "python3")))
3135 (substitute* '("tests/data/fmtonoff.py"
3136 "tests/data/string_prefixes.py"
3137 "tests/data/function.py")
3138 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3139 (string-append "#!" python3 (if (string? minor-version)
3140 minor-version
3141 ""))))))))))
3142 (propagated-inputs
3143 `(("python-click" ,python-click)
3144 ("python-attrs" ,python-attrs)
3145 ("python-appdirs" ,python-appdirs)
3146 ("python-toml" ,python-toml)))
3147 (home-page "https://github.com/ambv/black")
3148 (synopsis "The uncompromising code formatter")
3149 (description "Black is the uncompromising Python code formatter.")
3150 (license license:expat)))
3151
3152 (define-public python-blinker
3153 (package
3154 (name "python-blinker")
3155 (version "1.4")
3156 (source
3157 (origin
3158 (method url-fetch)
3159 (uri (pypi-uri "blinker" version))
3160 (sha256
3161 (base32
3162 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3163 (build-system python-build-system)
3164 (home-page "http://pythonhosted.org/blinker/")
3165 (synopsis "Fast, simple object-to-object and broadcast signaling")
3166 (description
3167 "Blinker provides a fast dispatching system that allows any number of
3168 interested parties to subscribe to events, or \"signals\".")
3169 (license license:expat)))
3170
3171 (define-public python2-blinker
3172 (package-with-python2 python-blinker))
3173
3174 (define-public pelican
3175 (package
3176 (name "pelican")
3177 (version "4.0.1")
3178 (source
3179 (origin
3180 (method url-fetch)
3181 (uri (pypi-uri "pelican" version))
3182 (sha256
3183 (base32
3184 "05yda7n6r0ll18fpdjzkzyr0ls8hbb86fnjyb33k9jvv5avah2lr"))))
3185 (build-system python-build-system)
3186 (propagated-inputs
3187 `(("python-feedgenerator" ,python-feedgenerator)
3188 ("python-jinja2" ,python-jinja2)
3189 ("python-pygments" ,python-pygments)
3190 ("python-docutils" ,python-docutils)
3191 ("python-pytz" ,python-pytz)
3192 ("python-blinker" ,python-blinker)
3193 ("python-unidecode" ,python-unidecode)
3194 ("python-six" ,python-six)
3195 ("python-dateutil" ,python-dateutil)
3196 ("python-markdown" ,python-markdown)))
3197 (home-page "https://getpelican.com/")
3198 (arguments
3199 `(;; XXX Requires a lot more packages to do unit tests :P
3200 #:tests? #f
3201 #:phases (modify-phases %standard-phases
3202 (add-before
3203 'install 'adjust-requires
3204 ;; Since feedgenerator is installed from git, it doesn't
3205 ;; conform to the version requirements.
3206 ;;
3207 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3208 ;; version requirement so setuptools doesn't get confused.
3209 (lambda _
3210 (substitute* "setup.py"
3211 (("['\"]feedgenerator.*?['\"]")
3212 "'feedgenerator'")))))))
3213 (synopsis "Python-based static site publishing system")
3214 (description
3215 "Pelican is a tool to generate a static blog from reStructuredText,
3216 Markdown input files, and more. Pelican uses Jinja2 for templating
3217 and is very extensible.")
3218 (license license:agpl3+)))
3219
3220 (define-public mallard-ducktype
3221 (package
3222 (name "mallard-ducktype")
3223 (version "1.0.2")
3224 (source
3225 (origin
3226 (method git-fetch)
3227 ;; git-reference because tests are not included in pypi source tarball
3228 ;; https://issues.guix.gnu.org/issue/36755#2
3229 (uri (git-reference
3230 (url "https://github.com/projectmallard/mallard-ducktype.git")
3231 (commit version)))
3232 (file-name (git-file-name name version))
3233 (sha256
3234 (base32
3235 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
3236 (build-system python-build-system)
3237 (arguments
3238 '(#:phases
3239 (modify-phases %standard-phases
3240 (replace 'check
3241 (lambda _
3242 (with-directory-excursion "tests"
3243 (invoke "sh" "runtests")))))))
3244 (home-page "http://projectmallard.org")
3245 (synopsis "Convert Ducktype to Mallard documentation markup")
3246 (description
3247 "Ducktype is a lightweight syntax that can represent all the semantics
3248 of the Mallard XML documentation system. Ducktype files can be converted to
3249 Mallard using the @command{ducktype} tool. The yelp-tools package
3250 provides additional functionality on the produced Mallard documents.")
3251 (license license:expat)))
3252
3253 (define-public python-scikit-image
3254 (package
3255 (name "python-scikit-image")
3256 (version "0.14.2")
3257 (source
3258 (origin
3259 (method url-fetch)
3260 (uri (pypi-uri "scikit-image" version))
3261 (sha256
3262 (base32 "07qchljkyxvg5nrm12fvszi7pmjk4m01qp0w0z8syxzxxs20pz8s"))))
3263 (build-system python-build-system)
3264 (arguments
3265 ;; TODO: Some tests require running X11 server. Disable them?
3266 '(#:tests? #f))
3267 ;; See DEPENDS.txt for the list of build and run time requiremnts
3268 (propagated-inputs
3269 `(("python-cloudpickle" ,python-cloudpickle)
3270 ("python-dask" ,python-dask)
3271 ("python-matplotlib" ,python-matplotlib)
3272 ("python-networkx" ,python-networkx)
3273 ("python-numpy" ,python-numpy)
3274 ("python-pillow" ,python-pillow)
3275 ("python-pywavelets" ,python-pywavelets)
3276 ("python-scipy" ,python-scipy)
3277 ("python-six" ,python-six)))
3278 (native-inputs
3279 `(("python-cython" ,python-cython)))
3280 (home-page "http://scikit-image.org/")
3281 (synopsis "Image processing in Python")
3282 (description
3283 "Scikit-image is a collection of algorithms for image processing.")
3284 (license license:bsd-3)))
3285
3286 (define-public python2-scikit-image
3287 (package-with-python2 python-scikit-image))
3288
3289 (define-public python-cython
3290 (package
3291 (name "python-cython")
3292 (version "0.29.13")
3293 (source
3294 (origin
3295 (method url-fetch)
3296 (uri (pypi-uri "Cython" version))
3297 (sha256
3298 (base32
3299 "13k37lrcgagwwnzr5bzririsscb793vndj234d475x1h9ad0d7f2"))))
3300 (build-system python-build-system)
3301 ;; we need the full python package and not just the python-wrapper
3302 ;; because we need libpython3.3m.so
3303 (inputs
3304 `(("python" ,python)))
3305 (arguments
3306 `(#:phases
3307 (modify-phases %standard-phases
3308 (add-before 'check 'set-HOME
3309 ;; some tests require access to "$HOME/.cython"
3310 (lambda _ (setenv "HOME" "/tmp") #t))
3311
3312 ;; FIXME: These tests started failing on armhf after the 0.28 update
3313 ;; (commit c69d11c5930), both with an error such as this:
3314 ;; compiling (cpp) and running dictcomp ...
3315 ;; === C/C++ compiler error output: ===
3316 ;; ‘
3317 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
3318 ;; See <https://hydra.gnu.org/build/2948724> for logs.
3319 ,@(if (target-arm32?)
3320 `((add-before 'check 'disable-failing-tests
3321 (lambda _
3322 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
3323 (for-each (lambda (test)
3324 (format disabled-tests "~a\n" test))
3325 '("memslice" "dictcomp"))
3326 (close-port disabled-tests)))))
3327 '())
3328
3329 (replace 'check
3330 (lambda _
3331 ;; Disable compiler optimizations to greatly reduce the running
3332 ;; time of the test suite.
3333 (setenv "CFLAGS" "-O0")
3334
3335 (invoke "python" "runtests.py" "-vv"
3336 "-j" (number->string (parallel-job-count))))))))
3337 (home-page "https://cython.org/")
3338 (synopsis "C extensions for Python")
3339 (description "Cython is an optimising static compiler for both the Python
3340 programming language and the extended Cython programming language. It makes
3341 writing C extensions for Python as easy as Python itself.")
3342 (license license:asl2.0)
3343 (properties `((python2-variant . ,(delay python2-cython))))))
3344
3345 (define-public python2-cython
3346 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
3347 (package
3348 (inherit base)
3349 (name "python2-cython")
3350 (inputs
3351 `(("python-2" ,python-2))) ;this is not automatically changed
3352 (arguments
3353 (substitute-keyword-arguments (package-arguments base)
3354 ((#:phases phases)
3355 `(modify-phases ,phases
3356 (add-before 'check 'adjust-test_embed
3357 (lambda _
3358 (substitute* "runtests.py"
3359 ;; test_embed goes great lengths to find the static libpythonX.Y.a
3360 ;; so it can give the right -L flag to GCC when embedding static
3361 ;; builds of Python. It is unaware that the Python "config"
3362 ;; directory (where the static library lives) was renamed in
3363 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
3364 ;; which works fine, because that is where the shared library is.
3365 ;;
3366 ;; It also appears to be unaware that the Makefile in Demos/embed
3367 ;; already unconditionally pass the static library location to GCC,
3368 ;; after checking sysconfig.get_config_var('LIBPL).
3369 ;;
3370 ;; The effect is that the linker is unable to resolve libexpat
3371 ;; symbols when building for Python 2, because neither the Python 2
3372 ;; shared library nor Expat is available. To fix it, we can either
3373 ;; add Expat as an input and make it visible to the linker, or just
3374 ;; prevent it from overriding the Python shared library location.
3375 ;; The end result is identical, so we take the easy route.
3376 ((" or libname not in os\\.listdir\\(libdir\\)")
3377 ""))
3378 #t)))))))))
3379
3380 ;; The RPython toolchain currently does not support Python 3.
3381 (define-public python2-rpython
3382 (package
3383 (name "python2-rpython")
3384 (version "0.2.1")
3385 (source
3386 (origin
3387 (method url-fetch)
3388 (uri (pypi-uri "rpython" version))
3389 (sha256
3390 (base32
3391 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3392 (build-system python-build-system)
3393 (arguments `(#:python ,python-2))
3394 (native-inputs
3395 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3396 (home-page "https://rpython.readthedocs.org")
3397 (synopsis "Framework for implementing interpreters and virtual machines")
3398 (description "RPython is a translation and support framework for
3399 producing implementations of dynamic languages, emphasizing a clean separation
3400 between language specification and implementation aspects.")
3401 (license license:expat)))
3402
3403 ;; NOTE: when upgrading numpy please make sure that python-pandas and
3404 ;; python-scipy still build, as these three packages are often used together.
3405 (define-public python-numpy
3406 (package
3407 (name "python-numpy")
3408 (version "1.15.4")
3409 (source
3410 (origin
3411 (method url-fetch)
3412 (uri (string-append
3413 "https://github.com/numpy/numpy/releases/download/v"
3414 version "/numpy-" version ".tar.gz"))
3415 (sha256
3416 (base32
3417 "102vcl2qq4pjbm7a3d67vkkvn4466ngia1d8wi5avqwqh8j0jvkn"))))
3418 (build-system python-build-system)
3419 (inputs
3420 `(("openblas" ,openblas)
3421 ("lapack" ,lapack)))
3422 (native-inputs
3423 `(("python-cython" ,python-cython)
3424 ("python-pytest" ,python-pytest)
3425 ("gfortran" ,gfortran)))
3426 (arguments
3427 `(#:phases
3428 (modify-phases %standard-phases
3429 (add-before 'build 'configure-blas-lapack
3430 (lambda* (#:key inputs #:allow-other-keys)
3431 (call-with-output-file "site.cfg"
3432 (lambda (port)
3433 (format port
3434 "[openblas]
3435 libraries = openblas
3436 library_dirs = ~a/lib
3437 include_dirs = ~a/include
3438
3439 # backslash-n to make emacs happy
3440 \n[lapack]
3441 lapack_libs = lapack
3442 library_dirs = ~a/lib
3443 include_dirs = ~a/include
3444 "
3445 (assoc-ref inputs "openblas")
3446 (assoc-ref inputs "openblas")
3447 (assoc-ref inputs "lapack")
3448 (assoc-ref inputs "lapack"))))
3449 #t))
3450 (add-before 'build 'fix-executable-paths
3451 (lambda* (#:key inputs #:allow-other-keys)
3452 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3453 ;; instead of /bin/sh.
3454 (substitute* "numpy/distutils/exec_command.py"
3455 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3456 (string-append match-start (assoc-ref inputs "bash") match-end)))
3457 ;; Use "gcc" executable, not "cc".
3458 (substitute* "numpy/distutils/system_info.py"
3459 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3460 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3461 #t))
3462 ;; Tests can only be run after the library has been installed and not
3463 ;; within the source directory.
3464 (delete 'check)
3465 (add-after 'install 'check
3466 (lambda* (#:key outputs inputs #:allow-other-keys)
3467 ;; Make installed package available for running the tests
3468 (add-installed-pythonpath inputs outputs)
3469 ;; Make sure "f2py" etc is found.
3470 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3471 ":" (getenv "PATH")))
3472 (with-directory-excursion "/tmp"
3473 (invoke "python" "-c"
3474 "import numpy; numpy.test(verbose=2)")))))))
3475 (home-page "http://www.numpy.org/")
3476 (synopsis "Fundamental package for scientific computing with Python")
3477 (description "NumPy is the fundamental package for scientific computing
3478 with Python. It contains among other things: a powerful N-dimensional array
3479 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3480 and Fortran code, useful linear algebra, Fourier transform, and random number
3481 capabilities.")
3482 (license license:bsd-3)))
3483
3484 (define-public python2-numpy
3485 (package-with-python2 python-numpy))
3486
3487 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3488 ;; interest only for legacy code going back to NumPy's predecessor
3489 ;; Numeric.
3490 (define-public python2-numpy-1.8
3491 (package (inherit python2-numpy)
3492 (version "1.8.2")
3493 (source
3494 (origin
3495 (method url-fetch)
3496 (uri (string-append
3497 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3498 (file-name (string-append "python2-numpy-" version ".tar.gz"))
3499 (sha256
3500 (base32
3501 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
3502 (arguments
3503 (substitute-keyword-arguments (package-arguments python2-numpy)
3504 ((#:phases phases)
3505 `(modify-phases ,phases
3506 (replace 'configure-blas-lapack
3507 (lambda* (#:key inputs #:allow-other-keys)
3508 (call-with-output-file "site.cfg"
3509 (lambda (port)
3510 (format port
3511 "[openblas]
3512 libraries = openblas,lapack
3513 library_dirs = ~a/lib:~a/lib
3514 include_dirs = ~a/include:~a/include
3515 "
3516 (assoc-ref inputs "openblas")
3517 (assoc-ref inputs "lapack")
3518 (assoc-ref inputs "openblas")
3519 (assoc-ref inputs "lapack"))))
3520 #t))))))
3521 (native-inputs
3522 `(("python2-nose" ,python2-nose)))
3523 (description "NumPy is the fundamental package for scientific computing
3524 with Python. It contains among other things: a powerful N-dimensional array
3525 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3526 and Fortran code, useful linear algebra, Fourier transform, and random number
3527 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3528 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3529 Numeric.")
3530 (license license:bsd-3)))
3531
3532 (define-public python-munch
3533 (package
3534 (name "python-munch")
3535 (version "2.0.4")
3536 (source
3537 (origin
3538 (method url-fetch)
3539 (uri (pypi-uri "munch" version))
3540 (sha256
3541 (base32
3542 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3543 (build-system python-build-system)
3544 (home-page "https://github.com/Infinidat/munch")
3545 (synopsis "Dot-accessible dictionary")
3546 (description "Munch is a dot-accessible dictionary similar to JavaScript
3547 objects.")
3548 (license license:expat)))
3549
3550 (define-public python2-munch
3551 (package-with-python2 python-munch))
3552
3553 (define-public python-colormath
3554 (package
3555 (name "python-colormath")
3556 (version "3.0.0")
3557 (source
3558 (origin
3559 (method url-fetch)
3560 (uri (pypi-uri "colormath" version))
3561 (sha256
3562 (base32
3563 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3564 (build-system python-build-system)
3565 (propagated-inputs
3566 `(("python-networkx" ,python-networkx)
3567 ("python-numpy" ,python-numpy)))
3568 (home-page "https://github.com/gtaylor/python-colormath")
3569 (synopsis "Color math and conversion library")
3570 (description
3571 "This is a Python library for color math and conversions.")
3572 (license license:bsd-3)))
3573
3574 (define-public python2-colormath
3575 (package-with-python2 python-colormath))
3576
3577 (define-public python-spectra
3578 (package
3579 (name "python-spectra")
3580 (version "0.0.11")
3581 (source
3582 (origin
3583 (method url-fetch)
3584 (uri (pypi-uri "spectra" version))
3585 (sha256
3586 (base32
3587 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3588 (build-system python-build-system)
3589 (arguments
3590 `(#:phases
3591 (modify-phases %standard-phases
3592 (replace 'check
3593 (lambda _ (invoke "nosetests" "-v"))))))
3594 (propagated-inputs
3595 `(("python-colormath" ,python-colormath)))
3596 (native-inputs
3597 `(("python-nose" ,python-nose)))
3598 (home-page "https://github.com/jsvine/spectra")
3599 (synopsis "Color scales and color conversion")
3600 (description
3601 "This package provides a Python library intended to make color math,
3602 color scales, and color space conversion easy. It has support for:
3603
3604 @enumerate
3605 @item Color scales
3606 @item Color ranges
3607 @item Color blending
3608 @item Brightening/darkening colors
3609 @item Saturating/desaturating colors
3610 @item Conversion to/from multiple color spaces.
3611 @end enumerate\n")
3612 (license license:expat)))
3613
3614 (define-public python2-spectra
3615 (package-with-python2 python-spectra))
3616
3617 (define-public python-numpy-documentation
3618 (package
3619 (name "python-numpy-documentation")
3620 (version (package-version python-numpy))
3621 (source (package-source python-numpy))
3622 (build-system python-build-system)
3623 (native-inputs
3624 `(("python-matplotlib" ,python-matplotlib)
3625 ("python-numpy" ,python-numpy)
3626 ("pkg-config" ,pkg-config)
3627 ("python-sphinx" ,python-sphinx)
3628 ("python-numpydoc" ,python-numpydoc)
3629 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
3630 texlive-fonts-ec
3631 texlive-generic-ifxetex
3632 texlive-generic-pdftex
3633 texlive-amsfonts
3634 texlive-latex-capt-of
3635 texlive-latex-cmap
3636 texlive-latex-environ
3637 texlive-latex-eqparbox
3638 texlive-latex-etoolbox
3639 texlive-latex-expdlist
3640 texlive-latex-fancyhdr
3641 texlive-latex-fancyvrb
3642 texlive-latex-fncychap
3643 texlive-latex-float
3644 texlive-latex-framed
3645 texlive-latex-geometry
3646 texlive-latex-graphics
3647 texlive-latex-hyperref
3648 texlive-latex-mdwtools
3649 texlive-latex-multirow
3650 texlive-latex-needspace
3651 texlive-latex-oberdiek
3652 texlive-latex-parskip
3653 texlive-latex-preview
3654 texlive-latex-tabulary
3655 texlive-latex-threeparttable
3656 texlive-latex-titlesec
3657 texlive-latex-trimspaces
3658 texlive-latex-ucs
3659 texlive-latex-upquote
3660 texlive-latex-url
3661 texlive-latex-varwidth
3662 texlive-latex-wrapfig)))
3663 ("texinfo" ,texinfo)
3664 ("perl" ,perl)
3665 ("scipy-sphinx-theme"
3666 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3667 (method git-fetch)
3668 (uri (git-reference
3669 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3670 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3671 (sha256
3672 (base32
3673 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3674 ,@(package-native-inputs python-numpy)))
3675 (arguments
3676 `(#:tests? #f ; we're only generating the documentation
3677 #:phases
3678 (modify-phases %standard-phases
3679 (delete 'build)
3680 (replace 'install
3681 (lambda* (#:key inputs outputs #:allow-other-keys)
3682 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3683 (doc (string-append
3684 data "/doc/" ,name "-"
3685 ,(package-version python-numpy)))
3686 (info-reader (string-append data "/info"))
3687 (html (string-append doc "/html"))
3688 (scipy-sphinx-theme "scipy-sphinx-theme")
3689 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3690 (pyver ,(string-append "PYVER=")))
3691
3692 ;; FIXME: this is needed to for texlive-union to generate
3693 ;; fonts, which are not found.
3694 (setenv "HOME" "/tmp")
3695
3696 (with-directory-excursion "doc"
3697 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3698 (mkdir-p html)
3699 (invoke "make" "html" pyver)
3700 (invoke "make" "latex" "PAPER=a4" pyver)
3701 (invoke "make" "-C" "build/latex"
3702 "all-pdf" "PAPER=a4" pyver)
3703 ;; FIXME: Generation of the info file fails.
3704 ;; (invoke "make" "info" pyver)
3705 ;; (mkdir-p info)
3706 ;; (copy-file "build/texinfo/numpy.info"
3707 ;; (string-append info "/numpy.info"))
3708 (for-each (lambda (file)
3709 (copy-file (string-append "build/latex" file)
3710 (string-append doc file)))
3711 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3712 (with-directory-excursion "build/html"
3713 (for-each (lambda (file)
3714 (let* ((dir (dirname file))
3715 (tgt-dir (string-append html "/" dir)))
3716 (unless (equal? "." dir)
3717 (mkdir-p tgt-dir))
3718 (install-file file html)))
3719 (find-files "." ".*")))))
3720 #t)))))
3721 (home-page (package-home-page python-numpy))
3722 (synopsis "Documentation for the python-numpy package")
3723 (description (package-description python-numpy))
3724 (license (package-license python-numpy))))
3725
3726 (define-public python2-numpy-documentation
3727 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3728 (package
3729 (inherit numpy-documentation)
3730 (native-inputs `(("python2-functools32" ,python2-functools32)
3731 ,@(package-native-inputs numpy-documentation))))))
3732
3733 (define-public python-pygit2
3734 (package
3735 (name "python-pygit2")
3736 (version "0.28.2")
3737 (source
3738 (origin
3739 (method url-fetch)
3740 (uri (pypi-uri "pygit2" version))
3741 (sha256
3742 (base32 "11kzj5mjkspvplnpdb6bj8dcj6rgmkk986k8hjcklyg5yaxkz32d"))))
3743 (build-system python-build-system)
3744 (arguments
3745 '(#:tests? #f)) ; tests don't run correctly in our environment
3746 (propagated-inputs
3747 `(("python-six" ,python-six)
3748 ("python-cffi" ,python-cffi)
3749 ("libgit2" ,libgit2)
3750 ("python-tox" ,python-tox)))
3751 (native-inputs
3752 `(("python-pytest" ,python-pytest)))
3753 (home-page "https://github.com/libgit2/pygit2")
3754 (synopsis "Python bindings for libgit2")
3755 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3756 library, libgit2 implements Git plumbing.")
3757 ;; GPL2.0 only, with linking exception.
3758 (license license:gpl2)))
3759
3760 (define-public python2-pygit2
3761 (package-with-python2 python-pygit2))
3762
3763 (define-public python-pyparsing
3764 (package
3765 (name "python-pyparsing")
3766 (version "2.3.1")
3767 (source
3768 (origin
3769 (method url-fetch)
3770 (uri (pypi-uri "pyparsing" version))
3771 (sha256
3772 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
3773 (build-system python-build-system)
3774 (outputs '("out" "doc"))
3775 (arguments
3776 `(#:tests? #f ; no test target
3777 #:phases
3778 (modify-phases %standard-phases
3779 (add-after 'install 'install-doc
3780 (lambda* (#:key outputs #:allow-other-keys)
3781 (let* ((doc (string-append (assoc-ref outputs "doc")
3782 "/share/doc/" ,name "-" ,version))
3783 (html-doc (string-append doc "/html"))
3784 (examples (string-append doc "/examples")))
3785 (mkdir-p html-doc)
3786 (mkdir-p examples)
3787 (for-each
3788 (lambda (dir tgt)
3789 (map (lambda (file)
3790 (install-file file tgt))
3791 (find-files dir ".*")))
3792 (list "docs" "htmldoc" "examples")
3793 (list doc html-doc examples))
3794 #t))))))
3795 (home-page "https://github.com/pyparsing/pyparsing")
3796 (synopsis "Python parsing class library")
3797 (description
3798 "The pyparsing module is an alternative approach to creating and
3799 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3800 of regular expressions. The pyparsing module provides a library of classes
3801 that client code uses to construct the grammar directly in Python code.")
3802 (license license:expat)))
3803
3804 (define-public python2-pyparsing
3805 (package-with-python2 python-pyparsing))
3806
3807 (define-public python-numpydoc
3808 (package
3809 (name "python-numpydoc")
3810 (version "0.8.0")
3811 (source
3812 (origin
3813 (method url-fetch)
3814 (uri (pypi-uri "numpydoc" version))
3815 (sha256
3816 (base32
3817 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3818 (build-system python-build-system)
3819 (propagated-inputs
3820 `(("python-sphinx" ,python-sphinx)))
3821 (native-inputs
3822 `(("python-nose" ,python-nose)))
3823 (home-page "https://pypi.python.org/pypi/numpydoc")
3824 (synopsis
3825 "Numpy's Sphinx extensions")
3826 (description
3827 "Sphinx extension to support docstrings in Numpy format.")
3828 (license license:bsd-2)))
3829
3830 (define-public python2-numpydoc
3831 (package-with-python2 python-numpydoc))
3832
3833 (define-public python-numexpr
3834 (package
3835 (name "python-numexpr")
3836 (version "2.6.5")
3837 (source
3838 (origin
3839 (method url-fetch)
3840 (uri (pypi-uri "numexpr" version))
3841 (sha256
3842 (base32
3843 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3844 (build-system python-build-system)
3845 (arguments `(#:tests? #f)) ; no tests included
3846 (propagated-inputs
3847 `(("python-numpy" ,python-numpy)))
3848 (home-page "https://github.com/pydata/numexpr")
3849 (synopsis "Fast numerical expression evaluator for NumPy")
3850 (description
3851 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3852 expressions that operate on arrays are accelerated and use less memory than
3853 doing the same calculation in Python. In addition, its multi-threaded
3854 capabilities can make use of all your cores, which may accelerate
3855 computations, most specially if they are not memory-bounded (e.g. those using
3856 transcendental functions).")
3857 (license license:expat)))
3858
3859 (define-public python2-numexpr
3860 (package-with-python2 python-numexpr))
3861
3862 (define-public python-cycler
3863 (package
3864 (name "python-cycler")
3865 (version "0.10.0")
3866 (source (origin
3867 (method url-fetch)
3868 (uri (pypi-uri "cycler" version))
3869 (sha256
3870 (base32
3871 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3872 (build-system python-build-system)
3873 (arguments
3874 ;; XXX: The current version requires 'coveralls' which we don't have.
3875 ;; Enable this for the next release which uses 'python-pytest'.
3876 '(#:tests? #f))
3877 (propagated-inputs
3878 `(("python-six" ,python-six)))
3879 (home-page "http://matplotlib.org/cycler/")
3880 (synopsis "Composable keyword argument iterator")
3881 (description
3882 "When using @code{matplotlib} and plotting more than one line, it is
3883 common to want to be able to want to be able to cycle over one or more artist
3884 styles; but the plotting logic can quickly become involved.
3885 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3886 @code{Cycler} class was developed.")
3887 (license license:bsd-3)))
3888
3889 (define-public python2-cycler
3890 (package-with-python2 python-cycler))
3891
3892 (define-public python-colorspacious
3893 (package
3894 (name "python-colorspacious")
3895 (version "1.1.0")
3896 (source
3897 (origin
3898 (method git-fetch)
3899 (uri (git-reference
3900 (url "https://github.com/njsmith/colorspacious.git")
3901 (commit (string-append "v" version))))
3902 (file-name (git-file-name name version))
3903 (sha256
3904 (base32 "0g0lxqiscy5g5rq9421vv7abg0c90jzy0zmas2z3hya6k2dr5aid"))))
3905 (build-system python-build-system)
3906 (propagated-inputs
3907 `(("python-numpy" ,python-numpy)))
3908 (native-inputs
3909 `(("python-nose" ,python-nose)))
3910 (arguments
3911 `(#:phases
3912 (modify-phases %standard-phases
3913 (replace 'check
3914 (lambda _
3915 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
3916 (home-page "https://github.com/njsmith/colorspacious")
3917 (synopsis "Python library for colorspace conversions")
3918 (description "@code{colorspacious} is a Python library that lets you
3919 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3920 (license license:expat)))
3921
3922 (define-public python2-colorspacious
3923 (package-with-python2 python-colorspacious))
3924
3925 (define-public python-matplotlib
3926 (package
3927 (name "python-matplotlib")
3928 (version "3.1.1")
3929 (source
3930 (origin
3931 (method url-fetch)
3932 (uri (pypi-uri "matplotlib" version))
3933 (sha256
3934 (base32
3935 "14qc109dibp32xfd9lah54djc0rc76fhbsj9cwyb328lzqmd5sqz"))))
3936 (build-system python-build-system)
3937 (propagated-inputs ; the following packages are all needed at run time
3938 `(("python-cycler" ,python-cycler)
3939 ("python-kiwisolver" ,python-kiwisolver)
3940 ("python-pyparsing" ,python-pyparsing)
3941 ("python-pygobject" ,python-pygobject)
3942 ("gobject-introspection" ,gobject-introspection)
3943 ("python-tkinter" ,python "tk")
3944 ("python-dateutil" ,python-dateutil)
3945 ("python-numpy" ,python-numpy)
3946 ("python-pillow" ,python-pillow)
3947 ("python-pytz" ,python-pytz)
3948 ("python-six" ,python-six)
3949 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3950 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3951 ;; object. For this reason we need to import both libraries.
3952 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
3953 ("python-pycairo" ,python-pycairo)
3954 ("python-cairocffi" ,python-cairocffi)))
3955 (inputs
3956 `(("libpng" ,libpng)
3957 ("imagemagick" ,imagemagick)
3958 ("freetype" ,freetype)
3959 ("cairo" ,cairo)
3960 ("glib" ,glib)
3961 ;; FIXME: Add backends when available.
3962 ;("python-wxpython" ,python-wxpython)
3963 ("tcl" ,tcl)
3964 ("tk" ,tk)))
3965 (native-inputs
3966 `(("pkg-config" ,pkg-config)
3967 ("python-pytest" ,python-pytest)
3968 ("python-mock" ,python-mock)
3969 ("unzip" ,unzip)
3970 ("jquery-ui"
3971 ,(origin
3972 (method url-fetch)
3973 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
3974 (sha256
3975 (base32
3976 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
3977 (arguments
3978 `(#:phases
3979 (modify-phases %standard-phases
3980 ;; XXX We disable all image comparison tests because we're using a
3981 ;; newer version of FreeType than matplotlib expects. This leads to
3982 ;; minor differences throughout the tests.
3983 (add-after 'unpack 'fix-and-disable-failing-tests
3984 (lambda _
3985 (substitute* (append (find-files "lib/matplotlib/tests/"
3986 "test_.*\\.py$")
3987 (find-files "lib/mpl_toolkits/tests"
3988 "test_.*\\.py$"))
3989 (("^from matplotlib" match)
3990 (string-append "import pytest\n" match))
3991 (("( *)@image_comparison" match indent)
3992 (string-append indent
3993 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
3994 match)))
3995 (substitute* "lib/matplotlib/tests/test_animation.py"
3996 (("/bin/sh") (which "sh")))
3997 (for-each delete-file
3998 ;; test_normal_axes, test_get_tightbbox_polar
3999 '("lib/matplotlib/tests/test_axes.py"
4000 ;; test_outward_ticks
4001 "lib/matplotlib/tests/test_tightlayout.py"
4002 ;; Fontconfig returns no fonts.
4003 "lib/matplotlib/tests/test_font_manager.py"))
4004 #t))
4005 (add-before 'install 'install-jquery-ui
4006 (lambda* (#:key outputs inputs #:allow-other-keys)
4007 (let ((dir (string-append (assoc-ref outputs "out")
4008 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
4009 (mkdir-p dir)
4010 (invoke "unzip"
4011 (assoc-ref inputs "jquery-ui")
4012 "-d" dir))
4013 #t))
4014 (delete 'check)
4015 (add-after 'install 'check
4016 (lambda* (#:key outputs inputs #:allow-other-keys)
4017 (add-installed-pythonpath inputs outputs)
4018 (invoke "python" "tests.py" "-v"
4019 "-m" "not network")))
4020 (add-before 'build 'configure-environment
4021 (lambda* (#:key outputs inputs #:allow-other-keys)
4022 (let ((cairo (assoc-ref inputs "cairo")))
4023 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
4024 ;; has not effect.
4025 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
4026 (setenv "HOME" (getcwd))
4027 (call-with-output-file "setup.cfg"
4028 (lambda (port)
4029 (format port "[directories]~%
4030 basedirlist = ~a,~a~%
4031 [packages]~%
4032 tests = True~%"
4033 (assoc-ref inputs "tcl")
4034 (assoc-ref inputs "tk")))))
4035 #t)))))
4036 (home-page "https://matplotlib.org/")
4037 (synopsis "2D plotting library for Python")
4038 (description
4039 "Matplotlib is a Python 2D plotting library which produces publication
4040 quality figures in a variety of hardcopy formats and interactive environments
4041 across platforms. Matplotlib can be used in Python scripts, the python and
4042 ipython shell, web application servers, and six graphical user interface
4043 toolkits.")
4044 (license license:psfl)
4045 (properties `((python2-variant . ,(delay python2-matplotlib))))))
4046
4047 (define-public python2-matplotlib
4048 (let ((matplotlib (package-with-python2
4049 (strip-python2-variant python-matplotlib))))
4050 (package (inherit matplotlib)
4051 (version "2.2.4")
4052 (source
4053 (origin
4054 (method url-fetch)
4055 (uri (pypi-uri "matplotlib" version))
4056 (sha256
4057 (base32
4058 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
4059 (arguments
4060 (substitute-keyword-arguments (package-arguments matplotlib)
4061 ((#:phases phases)
4062 `(modify-phases ,phases
4063 (replace 'install-jquery-ui
4064 (lambda* (#:key outputs inputs #:allow-other-keys)
4065 (let ((dir (string-append (assoc-ref outputs "out")
4066 "/lib/python2.7/site-packages/"
4067 "matplotlib/backends/web_backend/")))
4068 (mkdir-p dir)
4069 (invoke "unzip"
4070 (assoc-ref inputs "jquery-ui")
4071 "-d" dir))
4072 #t))
4073 (delete 'check))))) ; These tests weren't run the the past.
4074 ;; Make sure to use special packages for Python 2 instead
4075 ;; of those automatically rewritten by package-with-python2.
4076 (propagated-inputs
4077 `(("python2-pycairo" ,python2-pycairo)
4078 ("python2-backports-functools-lru-cache"
4079 ,python2-backports-functools-lru-cache)
4080 ("python2-functools32" ,python2-functools32)
4081 ("python2-pygobject-2" ,python2-pygobject-2)
4082 ("python2-subprocess32" ,python2-subprocess32)
4083 ("python2-tkinter" ,python-2 "tk")
4084 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4085 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4086
4087 (define-public python-matplotlib-documentation
4088 (package
4089 (name "python-matplotlib-documentation")
4090 (version (package-version python-matplotlib))
4091 (source (package-source python-matplotlib))
4092 (build-system python-build-system)
4093 (native-inputs
4094 `(("python-matplotlib" ,python-matplotlib)
4095 ("python-colorspacious" ,python-colorspacious)
4096 ("python-sphinx" ,python-sphinx)
4097 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
4098 ("python-sphinx-gallery" ,python-sphinx-gallery)
4099 ("python-numpydoc" ,python-numpydoc)
4100 ("python-ipython" ,python-ipython)
4101 ("python-ipykernel" ,python-ipykernel)
4102 ("python-mock" ,python-mock)
4103 ("graphviz" ,graphviz)
4104 ("texlive" ,(texlive-union (list texlive-amsfonts
4105 texlive-latex-amsmath
4106 texlive-latex-enumitem
4107 texlive-latex-expdlist
4108 texlive-latex-geometry
4109 texlive-latex-preview
4110 texlive-latex-type1cm
4111 texlive-latex-ucs
4112
4113 texlive-generic-pdftex
4114
4115 texlive-fonts-ec
4116 texlive-fonts-adobe-times
4117 texlive-fonts-txfonts)))
4118 ("texinfo" ,texinfo)
4119 ,@(package-native-inputs python-matplotlib)))
4120 (arguments
4121 `(#:tests? #f ; we're only generating documentation
4122 #:phases
4123 (modify-phases %standard-phases
4124 ;; The tests in python-matplotlib are run after the install phase, so
4125 ;; we need to delete the extra phase here.
4126 (delete 'check)
4127 (replace 'build
4128 (lambda _
4129 (chdir "doc")
4130 (setenv "PYTHONPATH"
4131 (string-append (getenv "PYTHONPATH")
4132 ":" (getcwd) "/../examples/units"))
4133 (substitute* "conf.py"
4134 ;; Don't use git.
4135 (("^SHA = check_output.*")
4136 (string-append "SHA = \"" ,version "\"\n"))
4137 ;; Don't fetch intersphinx files from the Internet
4138 (("^explicit_order_folders" m)
4139 (string-append "intersphinx_mapping = {}\n" m))
4140 (("'sphinx.ext.intersphinx',") "")
4141 ;; Disable URL embedding which requires internet access.
4142 (("'https://docs.scipy.org/doc/numpy'") "None")
4143 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
4144 (invoke "make"
4145 "SPHINXBUILD=sphinx-build"
4146 "SPHINXOPTS=" ; don't abort on warnings
4147 "html" "texinfo")))
4148 (replace 'install
4149 (lambda* (#:key inputs outputs #:allow-other-keys)
4150 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4151 (doc (string-append data "/doc/python-matplotlib-" ,version))
4152 (info (string-append data "/info"))
4153 (html (string-append doc "/html")))
4154 (mkdir-p html)
4155 (mkdir-p info)
4156 (copy-recursively "build/html" html)
4157 (symlink (string-append html "/_images")
4158 (string-append info "/matplotlib-figures"))
4159 (with-directory-excursion "build/texinfo"
4160 (substitute* "matplotlib.texi"
4161 (("@image\\{([^,]*)" all file)
4162 (string-append "@image{matplotlib-figures/" file)))
4163 (symlink (string-append html "/_images")
4164 "./matplotlib-figures")
4165 (invoke "makeinfo" "--no-split"
4166 "-o" "matplotlib.info" "matplotlib.texi"))
4167 (install-file "build/texinfo/matplotlib.info" info))
4168 #t)))))
4169 (home-page (package-home-page python-matplotlib))
4170 (synopsis "Documentation for the python-matplotlib package")
4171 (description (package-description python-matplotlib))
4172 (license (package-license python-matplotlib))))
4173
4174 (define-public python2-matplotlib-documentation
4175 (let ((parent (package-with-python2 python-matplotlib-documentation)))
4176 (package
4177 (inherit parent)
4178 (native-inputs
4179 (alist-delete "python-sphinx-copybutton"
4180 (package-native-inputs parent))))))
4181
4182 (define-public python-matplotlib-venn
4183 (package
4184 (name "python-matplotlib-venn")
4185 (version "0.11.5")
4186 (source
4187 (origin
4188 (method url-fetch)
4189 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4190 (sha256
4191 (base32
4192 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4193 (build-system python-build-system)
4194 (arguments '(#:tests? #f)) ; tests are not included
4195 (propagated-inputs
4196 `(("python-matplotlib" ,python-matplotlib)
4197 ("python-numpy" ,python-numpy)
4198 ("python-scipy" ,python-scipy)))
4199 (native-inputs
4200 `(("unzip" ,unzip)))
4201 (home-page "https://github.com/konstantint/matplotlib-venn")
4202 (synopsis "Plot area-proportional Venn diagrams")
4203 (description
4204 "This package provides tools for plotting area-proportional two- and
4205 three-way Venn diagrams in @code{matplotlib}.")
4206 (license license:expat)))
4207
4208 (define-public python2-pysnptools
4209 (package
4210 (name "python2-pysnptools")
4211 (version "0.3.13")
4212 (source
4213 (origin
4214 (method url-fetch)
4215 (uri (pypi-uri "pysnptools" version))
4216 (sha256
4217 (base32
4218 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
4219 (build-system python-build-system)
4220 (arguments
4221 `(#:python ,python-2 ; only Python 2.7 is supported
4222 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
4223 (propagated-inputs
4224 `(("python2-numpy" ,python2-numpy)
4225 ("python2-scipy" ,python2-scipy)
4226 ("python2-pandas" ,python2-pandas)))
4227 (native-inputs
4228 `(("python2-cython" ,python2-cython)))
4229 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
4230 (synopsis "Library for reading and manipulating genetic data")
4231 (description
4232 "PySnpTools is a library for reading and manipulating genetic data. It
4233 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4234 those files. It can also efficiently manipulate ranges of integers using set
4235 operators such as union, intersection, and difference.")
4236 (license license:asl2.0)))
4237
4238 (define-public python-scipy
4239 (package
4240 (name "python-scipy")
4241 (version "1.3.1")
4242 (source
4243 (origin
4244 (method url-fetch)
4245 (uri (pypi-uri "scipy" version))
4246 (sha256
4247 (base32
4248 "1df113c9i6vazsn6y3n9wc22jh737z1g7dmx3mypkdwpdnscyhr6"))))
4249 (build-system python-build-system)
4250 (propagated-inputs
4251 `(("python-numpy" ,python-numpy)
4252 ("python-matplotlib" ,python-matplotlib)
4253 ("python-pyparsing" ,python-pyparsing)))
4254 (inputs
4255 `(("lapack" ,lapack)
4256 ("openblas" ,openblas)))
4257 (native-inputs
4258 `(("python-cython" ,python-cython)
4259 ("python-pytest" ,python-pytest)
4260 ("python-sphinx" ,python-sphinx)
4261 ("python-numpydoc" ,python-numpydoc)
4262 ("gfortran" ,gfortran)
4263 ("perl" ,perl)
4264 ("which" ,which)))
4265 (outputs '("out" "doc"))
4266 (arguments
4267 `(#:phases
4268 (modify-phases %standard-phases
4269 (add-after 'unpack 'disable-broken-tests
4270 (lambda _
4271 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
4272 (("^( +)def test_threads_parallel\\(self\\):" m indent)
4273 (string-append indent
4274 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4275 m)))
4276 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
4277 (("^def test_parallel_threads\\(\\):" m)
4278 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
4279 m)))
4280 #t))
4281 (add-before 'build 'configure-openblas
4282 (lambda* (#:key inputs #:allow-other-keys)
4283 (call-with-output-file "site.cfg"
4284 (lambda (port)
4285 (format port
4286 "[blas]
4287 libraries = openblas
4288 library_dirs = ~a/lib
4289 include_dirs = ~a/include
4290
4291 # backslash-n to make emacs happy
4292 \n[atlas]
4293 library_dirs = ~a/lib
4294 atlas_libs = openblas
4295 "
4296 (assoc-ref inputs "openblas")
4297 (assoc-ref inputs "openblas")
4298 (assoc-ref inputs "openblas"))))
4299 #t))
4300 (add-after 'install 'install-doc
4301 (lambda* (#:key inputs outputs #:allow-other-keys)
4302 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4303 (doc (string-append data "/doc/" ,name "-" ,version))
4304 (html (string-append doc "/html"))
4305 (pyver ,(string-append "PYVER=" (version-major+minor
4306 (package-version python))))
4307 ;; By default it tries to run sphinx-build through the Python
4308 ;; interpreter which won't work with our shell wrapper.
4309 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
4310 ;; Make installed package available for building the
4311 ;; documentation
4312 (add-installed-pythonpath inputs outputs)
4313 (with-directory-excursion "doc"
4314 ;; Fix generation of images for mathematical expressions.
4315 (substitute* (find-files "source" "conf\\.py")
4316 (("pngmath_use_preview = True")
4317 "pngmath_use_preview = False"))
4318 (mkdir-p html)
4319 (invoke "make" "html" pyver sphinxbuild)
4320 (with-directory-excursion "build/html"
4321 (for-each (lambda (file)
4322 (let* ((dir (dirname file))
4323 (tgt-dir (string-append html "/" dir)))
4324 (install-file file html)))
4325 (find-files "." ".*")))))
4326 #t))
4327 ;; Tests can only be run after the library has been installed and not
4328 ;; within the source directory.
4329 (delete 'check)
4330 (add-after 'install 'check
4331 (lambda* (#:key inputs outputs #:allow-other-keys)
4332 (add-installed-pythonpath inputs outputs)
4333 (with-directory-excursion "/tmp"
4334 (invoke "python" "-c"
4335 "import scipy; scipy.test(verbose=2)")))))))
4336 (home-page "https://www.scipy.org/")
4337 (synopsis "The Scipy library provides efficient numerical routines")
4338 (description "The SciPy library is one of the core packages that make up
4339 the SciPy stack. It provides many user-friendly and efficient numerical
4340 routines such as routines for numerical integration and optimization.")
4341 (properties `((python2-variant . ,(delay python2-scipy))))
4342 (license license:bsd-3)))
4343
4344 ;; Version 1.2.2 is the last version to support Python 2
4345 (define-public python2-scipy
4346 (package
4347 (inherit (package-with-python2
4348 (strip-python2-variant python-scipy)))
4349 (version "1.2.2")
4350 (source
4351 (origin
4352 (method url-fetch)
4353 (uri (pypi-uri "scipy" version))
4354 (sha256
4355 (base32
4356 "1cgvgin8fvckv96hjh3ikmwkra5rif51bdb75ifzf7xbil5iwcx4"))))))
4357
4358 (define-public python-socksipy-branch
4359 (package
4360 (name "python-socksipy-branch")
4361 (version "1.01")
4362 (source
4363 (origin
4364 (method url-fetch)
4365 (uri (pypi-uri "SocksiPy-branch" version))
4366 (sha256
4367 (base32
4368 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4369 (build-system python-build-system)
4370 (arguments
4371 `(#:tests? #f)) ; There are no tests
4372 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4373 (synopsis "Python SOCKS module")
4374 (description
4375 "SocksiPy - A Python SOCKS client module. It provides a
4376 socket-like interface that supports connections to any TCP
4377 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4378 The original version was developed by Dan Haim, this is a
4379 branch created by Mario Vilas to address some open issues,
4380 as the original project seems to have been abandoned circa 2007.")
4381 (license license:bsd-3)))
4382
4383 (define-public python2-socksipy-branch
4384 (package-with-python2 python-socksipy-branch))
4385
4386 (define-public python-pycodestyle
4387 (package
4388 (name "python-pycodestyle")
4389 (version "2.5.0")
4390 (source
4391 (origin
4392 (method url-fetch)
4393 (uri (pypi-uri "pycodestyle" version))
4394 (sha256
4395 (base32
4396 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
4397 (build-system python-build-system)
4398 (home-page "https://pycodestyle.readthedocs.io/")
4399 (synopsis "Python style guide checker")
4400 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4401 Python code against some of the style conventions in
4402 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4403 (license license:expat)))
4404
4405 (define-public python2-pycodestyle
4406 (package-with-python2 python-pycodestyle))
4407
4408 (define-public python-multidict
4409 (package
4410 (name "python-multidict")
4411 (version "4.2.0")
4412 (source
4413 (origin
4414 (method url-fetch)
4415 (uri (pypi-uri "multidict" version))
4416 (sha256
4417 (base32
4418 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4419 (build-system python-build-system)
4420 (native-inputs
4421 `(("python-pytest" ,python-pytest)
4422 ("python-pytest-runner" ,python-pytest-runner)))
4423 (home-page "https://github.com/aio-libs/multidict/")
4424 (synopsis "Multidict implementation")
4425 (description "Multidict is dict-like collection of key-value pairs
4426 where key might be occurred more than once in the container.")
4427 (license license:asl2.0)))
4428
4429 (define-public python-orderedmultidict
4430 (package
4431 (name "python-orderedmultidict")
4432 (version "0.7.11")
4433 (source
4434 (origin
4435 (method url-fetch)
4436 (uri (pypi-uri "orderedmultidict" version))
4437 (sha256
4438 (base32
4439 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4440 (build-system python-build-system)
4441 (arguments
4442 `(#:phases
4443 (modify-phases %standard-phases
4444 (add-after 'unpack 'fix-tests
4445 (lambda _
4446 ;; The package uses nosetest for running the tests.
4447 ;; Adding this initfile allows to run the test suite
4448 ;; without requiring nosetest.
4449 (with-output-to-file "tests/__init__.py" newline)
4450 #t)))))
4451 (propagated-inputs
4452 `(("python-six" ,python-six)))
4453 (native-inputs
4454 `(("python-pycodestyle" ,python-pycodestyle)))
4455 (home-page "https://github.com/gruns/orderedmultidict")
4456 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4457 (description "This package contains a library for ordered multivalue
4458 dictionaries. A multivalue dictionary is a dictionary that can store
4459 multiple values for the same key. An ordered multivalue dictionary is a
4460 multivalue dictionary that retains the order of insertions and deletions.")
4461 (license license:unlicense)))
4462
4463 (define-public python2-orderedmultidict
4464 (package-with-python2 python-orderedmultidict))
4465
4466 (define-public python-autopep8
4467 (package
4468 (name "python-autopep8")
4469 (version "1.3.5")
4470 (source
4471 (origin
4472 (method url-fetch)
4473 (uri (pypi-uri "autopep8" version))
4474 (sha256
4475 (base32
4476 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4477 (build-system python-build-system)
4478 (propagated-inputs
4479 `(("python-pycodestyle" ,python-pycodestyle)))
4480 (home-page "https://github.com/hhatto/autopep8")
4481 (synopsis "Format Python code according to the PEP 8 style guide")
4482 (description
4483 "@code{autopep8} automatically formats Python code to conform to
4484 the PEP 8 style guide. It uses the pycodestyle utility to determine
4485 what parts of the code needs to be formatted. @code{autopep8} is
4486 capable of fixing most of the formatting issues that can be reported
4487 by pycodestyle.")
4488 (license (license:non-copyleft
4489 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4490
4491 (define-public python2-autopep8
4492 (package-with-python2 python-autopep8))
4493
4494 (define-public python-distutils-extra
4495 (package
4496 (name "python-distutils-extra")
4497 (version "2.38")
4498 (source
4499 (origin
4500 (method url-fetch)
4501 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4502 version "/+download/python-distutils-extra-"
4503 version ".tar.gz"))
4504 (sha256
4505 (base32
4506 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4507 (build-system python-build-system)
4508 (home-page "https://launchpad.net/python-distutils-extra/")
4509 (synopsis "Enhancements to Python's distutils")
4510 (description
4511 "The python-distutils-extra module enables you to easily integrate
4512 gettext support, themed icons, and scrollkeeper-based documentation into
4513 Python's distutils.")
4514 (license license:gpl2)))
4515
4516 (define-public python2-distutils-extra
4517 (package-with-python2 python-distutils-extra))
4518
4519 (define-public python2-elib.intl
4520 (package
4521 (name "python2-elib.intl")
4522 (version "0.0.3")
4523 (source
4524 (origin
4525 ;; This project doesn't tag releases or publish tarballs, so we take
4526 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4527 (method git-fetch)
4528 (uri (git-reference
4529 (url "https://github.com/dieterv/elib.intl.git")
4530 (commit "d09997cfef")))
4531 (file-name (string-append name "-" version "-checkout"))
4532 (sha256
4533 (base32
4534 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4535 (build-system python-build-system)
4536 (arguments
4537 ;; incompatible with Python 3 (exception syntax)
4538 `(#:python ,python-2
4539 #:tests? #f))
4540 (home-page "https://github.com/dieterv/elib.intl")
4541 (synopsis "Enhanced internationalization for Python")
4542 (description
4543 "The elib.intl module provides enhanced internationalization (I18N)
4544 services for your Python modules and applications.")
4545 (license license:lgpl3+)))
4546
4547 (define-public python-olefile
4548 (package
4549 (name "python-olefile")
4550 (version "0.46")
4551 (source
4552 (origin
4553 (method url-fetch)
4554 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4555 "download/v" version "/olefile-" version ".tar.gz"))
4556 (file-name (string-append name "-" version ".tar.gz"))
4557 (sha256
4558 (base32
4559 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
4560 (build-system python-build-system)
4561 (home-page "https://www.decalage.info/python/olefileio")
4562 (synopsis "Read and write Microsoft OLE2 files.")
4563 (description
4564 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4565 Storage or Compound Document, Microsoft Office). It is an improved version of
4566 the OleFileIO module from PIL, the Python Image Library.")
4567 (license license:bsd-3)))
4568
4569 (define-public python2-olefile
4570 (package-with-python2 python-olefile))
4571
4572 (define-public python-pillow
4573 (package
4574 (name "python-pillow")
4575 (version "6.1.0")
4576 (source
4577 (origin
4578 (method url-fetch)
4579 (uri (pypi-uri "Pillow" version))
4580 (sha256
4581 (base32
4582 "1pnrsz0f0n0c819v1pdr8j6rm8xvhc9f3kh1fv9xpdp9n5ygf108"))))
4583 (build-system python-build-system)
4584 (native-inputs
4585 `(("python-pytest" ,python-pytest)))
4586 (inputs
4587 `(("freetype" ,freetype)
4588 ("lcms" ,lcms)
4589 ("zlib" ,zlib)
4590 ("libjpeg" ,libjpeg)
4591 ("openjpeg" ,openjpeg)
4592 ("libtiff" ,libtiff)
4593 ("libwebp" ,libwebp)))
4594 (propagated-inputs
4595 `(("python-olefile" ,python-olefile)))
4596 (arguments
4597 `(#:phases
4598 (modify-phases %standard-phases
4599 (add-after 'unpack 'patch-ldconfig
4600 (lambda _
4601 (substitute* "setup.py"
4602 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4603 (delete 'check) ; We must run checks after python-pillow is installed.
4604 (add-after 'install 'check-installed
4605 (lambda* (#:key outputs inputs #:allow-other-keys)
4606 (begin
4607 (setenv "HOME" (getcwd))
4608 ;; Make installed package available for running the tests.
4609 (add-installed-pythonpath inputs outputs)
4610 (invoke "python" "selftest.py" "--installed")
4611 (invoke "python" "-m" "pytest" "-vv")))))))
4612 (home-page "https://python-pillow.org")
4613 (synopsis "Fork of the Python Imaging Library")
4614 (description
4615 "The Python Imaging Library adds image processing capabilities to your
4616 Python interpreter. This library provides extensive file format support, an
4617 efficient internal representation, and fairly powerful image processing
4618 capabilities. The core image library is designed for fast access to data
4619 stored in a few basic pixel formats. It should provide a solid foundation for
4620 a general image processing tool.")
4621 (license (license:x11-style
4622 "http://www.pythonware.com/products/pil/license.htm"
4623 "The PIL Software License"))))
4624
4625 (define-public python2-pillow
4626 (package-with-python2 python-pillow))
4627
4628 (define-public python-pycparser
4629 (package
4630 (name "python-pycparser")
4631 (version "2.19")
4632 (source
4633 (origin
4634 (method url-fetch)
4635 (uri (pypi-uri "pycparser" version))
4636 (sha256
4637 (base32
4638 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
4639 (outputs '("out" "doc"))
4640 (build-system python-build-system)
4641 (native-inputs
4642 `(("pkg-config" ,pkg-config)))
4643 (arguments
4644 `(#:phases
4645 (modify-phases %standard-phases
4646 (replace 'check
4647 (lambda _
4648 (with-directory-excursion "tests"
4649 (invoke "python" "all_tests.py"))
4650 #t))
4651 (add-after 'install 'install-doc
4652 (lambda* (#:key outputs #:allow-other-keys)
4653 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4654 (doc (string-append data "/doc/" ,name "-" ,version))
4655 (examples (string-append doc "/examples")))
4656 (mkdir-p examples)
4657 (for-each (lambda (file)
4658 (copy-file (string-append "." file)
4659 (string-append doc file)))
4660 '("/README.rst" "/CHANGES" "/LICENSE"))
4661 (copy-recursively "examples" examples)
4662 #t))))))
4663 (home-page "https://github.com/eliben/pycparser")
4664 (synopsis "C parser in Python")
4665 (description
4666 "Pycparser is a complete parser of the C language, written in pure Python
4667 using the PLY parsing library. It parses C code into an AST and can serve as
4668 a front-end for C compilers or analysis tools.")
4669 (license license:bsd-3)))
4670
4671 (define-public python2-pycparser
4672 (package-with-python2 python-pycparser))
4673
4674 (define-public python-pywavelets
4675 (package
4676 (name "python-pywavelets")
4677 (version "1.0.1")
4678 (home-page "https://github.com/PyWavelets/pywt")
4679 (source (origin
4680 (method url-fetch)
4681 (uri (pypi-uri "PyWavelets" version))
4682 (sha256
4683 (base32
4684 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4685 (build-system python-build-system)
4686 (arguments
4687 '(#:modules ((ice-9 ftw)
4688 (srfi srfi-1)
4689 (srfi srfi-26)
4690 (guix build utils)
4691 (guix build python-build-system))
4692 #:phases (modify-phases %standard-phases
4693 (replace 'check
4694 (lambda _
4695 (let ((cwd (getcwd))
4696 (libdir (find (cut string-prefix? "lib." <>)
4697 (scandir "build"))))
4698 (with-directory-excursion (string-append cwd "/build/" libdir)
4699 (invoke "nosetests" "-v" "."))))))))
4700 (native-inputs
4701 `(("python-matplotlib" ,python-matplotlib) ;for tests
4702 ("python-nose" ,python-nose)))
4703 (propagated-inputs
4704 `(("python-numpy" ,python-numpy)))
4705 (synopsis "Wavelet transforms in Python")
4706 (description
4707 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4708 mathematical basis functions that are localized in both time and frequency.
4709 Wavelet transforms are time-frequency transforms employing wavelets. They are
4710 similar to Fourier transforms, the difference being that Fourier transforms are
4711 localized only in frequency instead of in time and frequency.")
4712 (license license:expat)))
4713
4714 (define-public python2-pywavelets
4715 (package-with-python2 python-pywavelets))
4716
4717 (define-public python-xcffib
4718 (package
4719 (name "python-xcffib")
4720 (version "0.6.0")
4721 (source
4722 (origin
4723 (method url-fetch)
4724 (uri (pypi-uri "xcffib" version))
4725 (sha256
4726 (base32
4727 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4728 (build-system python-build-system)
4729 (inputs
4730 `(("libxcb" ,libxcb)))
4731 (propagated-inputs
4732 `(("python-cffi" ,python-cffi) ; used at run time
4733 ("python-six" ,python-six)))
4734 (arguments
4735 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4736 #:tests? #f
4737 #:phases
4738 (modify-phases %standard-phases
4739 (add-after 'unpack 'fix-libxcb-path
4740 (lambda* (#:key inputs #:allow-other-keys)
4741 (let ((libxcb (assoc-ref inputs "libxcb")))
4742 (substitute* '("xcffib/__init__.py")
4743 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4744 #t)))
4745 (add-after 'install 'install-doc
4746 (lambda* (#:key outputs #:allow-other-keys)
4747 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4748 "/doc/" ,name "-" ,version)))
4749 (mkdir-p doc)
4750 (copy-file "README.md"
4751 (string-append doc "/README.md"))
4752 #t))))))
4753 (home-page "https://github.com/tych0/xcffib")
4754 (synopsis "XCB Python bindings")
4755 (description
4756 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4757 support for Python 3 and PyPy. It is based on cffi.")
4758 (license license:expat)))
4759
4760 (define-public python2-xcffib
4761 (package-with-python2 python-xcffib))
4762
4763 (define-public python-cairocffi
4764 (package
4765 (name "python-cairocffi")
4766 (version "0.9.0")
4767 (source
4768 (origin
4769 (method url-fetch)
4770 (uri (pypi-uri "cairocffi" version))
4771 (sha256
4772 (base32
4773 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4774 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4775 (build-system python-build-system)
4776 (outputs '("out" "doc"))
4777 (inputs
4778 `(("glib" ,glib)
4779 ("gtk+" ,gtk+)
4780 ("gdk-pixbuf" ,gdk-pixbuf)
4781 ("cairo" ,cairo)
4782 ("pango" ,pango)))
4783 (native-inputs
4784 `(("pkg-config" ,pkg-config)
4785 ("python-pytest" ,python-pytest)
4786 ("python-pytest-cov" ,python-pytest-cov)
4787 ("python-pytest-runner" ,python-pytest-runner)
4788 ("python-sphinx" ,python-sphinx)
4789 ("python-docutils" ,python-docutils)))
4790 (propagated-inputs
4791 `(("python-xcffib" ,python-xcffib))) ; used at run time
4792 (arguments
4793 `(#:phases
4794 (modify-phases %standard-phases
4795 (add-after 'unpack 'patch-paths
4796 (lambda* (#:key inputs outputs #:allow-other-keys)
4797 (substitute* (find-files "." "\\.py$")
4798 (("dlopen\\(ffi, 'cairo'")
4799 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4800 "/lib/libcairo.so.2'"))
4801 (("dlopen\\(ffi, 'gdk-3'")
4802 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4803 "/lib/libgtk-3.so.0'"))
4804 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4805 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4806 "/lib/libgdk_pixbuf-2.0.so.0'"))
4807 (("dlopen\\(ffi, 'glib-2.0'")
4808 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4809 "/lib/libglib-2.0.so.0'"))
4810 (("dlopen\\(ffi, 'gobject-2.0'")
4811 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4812 "/lib/libgobject-2.0.so.0'"))
4813 (("dlopen\\(ffi, 'pangocairo-1.0'")
4814 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4815 "/lib/libpangocairo-1.0.so.0'"))
4816 (("dlopen\\(ffi, 'pango-1.0'")
4817 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4818 "/lib/libpango-1.0.so.0'")))
4819 #t))
4820 (add-after 'install 'install-doc
4821 (lambda* (#:key inputs outputs #:allow-other-keys)
4822 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4823 (doc (string-append data "/doc/" ,name "-" ,version))
4824 (html (string-append doc "/html")))
4825 (setenv "LD_LIBRARY_PATH"
4826 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4827 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4828 (setenv "LANG" "en_US.UTF-8")
4829 (mkdir-p html)
4830 (for-each (lambda (file)
4831 (copy-file (string-append "." file)
4832 (string-append doc file)))
4833 '("/README.rst" "/CHANGES" "/LICENSE"))
4834 (system* "python" "setup.py" "build_sphinx")
4835 (copy-recursively "docs/_build/html" html)
4836 #t))))))
4837 (home-page "https://github.com/Kozea/cairocffi")
4838 (synopsis "Python bindings and object-oriented API for Cairo")
4839 (description
4840 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4841 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4842 graphics library with support for multiple backends including image buffers,
4843 PNG, PostScript, PDF, and SVG file output.")
4844 (license license:bsd-3)))
4845
4846 (define-public python2-cairocffi
4847 (package-with-python2 python-cairocffi))
4848
4849 (define-public python-decorator
4850 (package
4851 (name "python-decorator")
4852 (version "4.3.0")
4853 (source
4854 (origin
4855 (method url-fetch)
4856 (uri (pypi-uri "decorator" version))
4857 (sha256
4858 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4859 (build-system python-build-system)
4860 (home-page "https://pypi.python.org/pypi/decorator/")
4861 (synopsis "Python module to simplify usage of decorators")
4862 (description
4863 "The aim of the decorator module is to simplify the usage of decorators
4864 for the average programmer, and to popularize decorators usage giving examples
4865 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4866 etc. The core of this module is a decorator factory.")
4867 (license license:expat)))
4868
4869 (define-public python2-decorator
4870 (package-with-python2 python-decorator))
4871
4872 (define-public python-drmaa
4873 (package
4874 (name "python-drmaa")
4875 (version "0.7.7")
4876 (source
4877 (origin
4878 (method url-fetch)
4879 (uri (pypi-uri "drmaa" version))
4880 (sha256
4881 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4882 (build-system python-build-system)
4883 ;; The test suite requires libdrmaa which is provided by the cluster
4884 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4885 ;; should be set to the path of the libdrmaa library.
4886 (arguments '(#:tests? #f))
4887 (native-inputs
4888 `(("python-nose" ,python-nose)))
4889 (home-page "https://pypi.python.org/pypi/drmaa")
4890 (synopsis "Python bindings for the DRMAA library")
4891 (description
4892 "A Python package for Distributed Resource Management (DRM) job
4893 submission and control. This package is an implementation of the DRMAA 1.0
4894 Python language binding specification.")
4895 (license license:bsd-3)))
4896
4897 (define-public python2-drmaa
4898 (package-with-python2 python-drmaa))
4899
4900 (define-public python-grako
4901 (package
4902 (name "python-grako")
4903 (version "3.99.9")
4904 (source
4905 (origin
4906 (method url-fetch)
4907 (uri
4908 (pypi-uri "grako" version ".zip"))
4909 (sha256
4910 (base32
4911 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4912 (build-system python-build-system)
4913 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4914 (native-inputs
4915 `(("unzip" ,unzip)
4916 ("python-pytest" ,python-pytest)
4917 ("python-pytest-runner" ,python-pytest-runner)))
4918 (home-page "https://bitbucket.org/neogeny/grako")
4919 (synopsis "EBNF parser generator")
4920 (description
4921 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4922 memoizing PEG/Packrat parser in Python.")
4923 (license license:bsd-3)))
4924
4925 (define-public python2-grako
4926 (package-with-python2 python-grako))
4927
4928 (define-public python-gridmap
4929 (package
4930 (name "python-gridmap")
4931 (version "0.13.0")
4932 (source
4933 (origin
4934 (method git-fetch)
4935 (uri (git-reference
4936 (url "https://github.com/pygridtools/gridmap.git")
4937 (commit (string-append "v" version))))
4938 (file-name (git-file-name name version))
4939 (sha256
4940 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
4941 (build-system python-build-system)
4942 (arguments
4943 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4944 (propagated-inputs
4945 `(("python-psutil" ,python-psutil)
4946 ("python-drmaa" ,python-drmaa)
4947 ("python-pyzmq" ,python-pyzmq)))
4948 (home-page "https://github.com/pygridtools/gridmap")
4949 (synopsis "Create jobs on a cluster directly from Python")
4950 (description
4951 "Gridmap is a Python package to allow you to easily create jobs on the
4952 cluster directly from Python. You can directly map Python functions onto the
4953 cluster without needing to write any wrapper code yourself.")
4954 (license license:gpl3+)))
4955
4956 (define-public python2-gridmap
4957 (package-with-python2 python-gridmap))
4958
4959 (define-public python-honcho
4960 (package
4961 (name "python-honcho")
4962 (version "1.0.1")
4963 (source
4964 (origin
4965 (method git-fetch)
4966 (uri (git-reference
4967 (url "https://github.com/nickstenning/honcho.git")
4968 (commit (string-append "v" version))))
4969 (file-name (git-file-name name version))
4970 (sha256
4971 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
4972 (build-system python-build-system)
4973 (native-inputs
4974 `(("python-pytest" ,python-pytest)
4975 ("python-mock" ,python-mock)
4976 ("python-tox" ,python-tox)
4977 ("which" ,which))) ;for tests
4978 (propagated-inputs
4979 `(("python-jinja2" ,python-jinja2)))
4980 (arguments
4981 `(#:phases
4982 (modify-phases %standard-phases
4983 (delete 'check)
4984 (add-after 'install 'check
4985 (lambda* (#:key outputs inputs #:allow-other-keys)
4986 ;; fix honcho path in testsuite
4987 (substitute* "tests/conftest.py"
4988 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4989 "/bin/honcho" "'")))
4990 ;; It's easier to run tests after install.
4991 ;; Make installed package available for running the tests
4992 (add-installed-pythonpath inputs outputs)
4993 (invoke "py.test" "-v"))))))
4994 (home-page "https://github.com/nickstenning/honcho")
4995 (synopsis "Manage Procfile-based applications")
4996 (description
4997 "A Procfile is a file which describes how to run an application
4998 consisting of several processes. honcho starts all listed processes.
4999 The output of all running processes is collected by honcho and
5000 displayed.")
5001 (license license:expat)))
5002
5003 (define-public python2-honcho
5004 (package-with-python2 python-honcho))
5005
5006 (define-public python-pexpect
5007 (package
5008 (name "python-pexpect")
5009 (version "4.6.0")
5010 (source
5011 (origin
5012 (method url-fetch)
5013 (uri (pypi-uri "pexpect" version))
5014 (sha256
5015 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
5016 (build-system python-build-system)
5017 (arguments
5018 `(#:phases
5019 (modify-phases %standard-phases
5020 (add-before 'check 'prepare-tests
5021 (lambda _
5022 (substitute* (find-files "tests")
5023 (("/bin/ls") (which "ls"))
5024 (("/bin/echo") (which "echo"))
5025 (("/bin/which") (which "which"))
5026 ;; Many tests try to use the /bin directory which
5027 ;; is not present in the build environment.
5028 ;; Use one that's non-empty and unlikely to change.
5029 (("/bin'") "/dev'"))
5030 ;; XXX: Socket connection test gets "Connection reset by peer".
5031 ;; Why does it not work? Delete for now.
5032 (delete-file "tests/test_socket.py")
5033 #t))
5034 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
5035 (native-inputs
5036 `(("python-nose" ,python-nose)
5037 ("python-pytest" ,python-pytest)
5038 ("man-db" ,man-db)
5039 ("which" ,which)
5040 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
5041 (propagated-inputs
5042 `(("python-ptyprocess" ,python-ptyprocess)))
5043 (home-page "http://pexpect.readthedocs.org/")
5044 (synopsis "Controlling interactive console applications")
5045 (description
5046 "Pexpect is a pure Python module for spawning child applications;
5047 controlling them; and responding to expected patterns in their output.
5048 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
5049 child application and control it as if a human were typing commands.")
5050 (license license:isc)))
5051
5052 (define-public python2-pexpect
5053 (package-with-python2 python-pexpect))
5054
5055 (define-public python-setuptools-scm
5056 (package
5057 (name "python-setuptools-scm")
5058 (version "3.2.0")
5059 (source (origin
5060 (method url-fetch)
5061 (uri (pypi-uri "setuptools_scm" version))
5062 (sha256
5063 (base32
5064 "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj"))))
5065 (build-system python-build-system)
5066 (home-page "https://github.com/pypa/setuptools_scm/")
5067 (synopsis "Manage Python package versions in SCM metadata")
5068 (description
5069 "Setuptools_scm handles managing your Python package versions in
5070 @dfn{software configuration management} (SCM) metadata instead of declaring
5071 them as the version argument or in a SCM managed file.")
5072 (license license:expat)))
5073
5074 (define-public python2-setuptools-scm
5075 (package-with-python2 python-setuptools-scm))
5076
5077 (define-public python-pathlib2
5078 (package
5079 (name "python-pathlib2")
5080 (version "2.3.3")
5081 (source
5082 (origin
5083 (method url-fetch)
5084 (uri (pypi-uri "pathlib2" version))
5085 (sha256
5086 (base32
5087 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
5088 (build-system python-build-system)
5089 (propagated-inputs
5090 `(("python-scandir" ,python-scandir)
5091 ("python-six" ,python-six)))
5092 (home-page "https://pypi.python.org/pypi/pathlib2/")
5093 (synopsis "Object-oriented file system paths")
5094 (description "The goal of pathlib2 is to provide a backport of the
5095 standard @code{pathlib} module which tracks the standard library module, so
5096 all the newest features of the standard @code{pathlib} can be used also on
5097 older Python versions.")
5098 (license license:expat)))
5099
5100 (define-public python-importlib-metadata
5101 (package
5102 (name "python-importlib-metadata")
5103 (version "0.23")
5104 (source
5105 (origin
5106 (method url-fetch)
5107 (uri (pypi-uri "importlib_metadata" version))
5108 (sha256
5109 (base32 "09mdqdfv5rdrwz80jh9m379gxmvk2vhjfz0fg53hid00icvxf65a"))))
5110 (build-system python-build-system)
5111 (propagated-inputs
5112 `(("python-configparser" ,python-configparser)
5113 ("python-contextlib2" ,python-contextlib2)
5114 ("python-docutils" ,python-docutils)
5115 ("python-pathlib2" ,python-pathlib2)
5116 ("python-rst.linker" ,python-rst.linker)
5117 ("python-zipp" ,python-zipp)))
5118 (native-inputs
5119 `(("python-setuptools-scm" ,python-setuptools-scm)
5120 ("python-sphinx" ,python-sphinx)))
5121 (home-page "https://importlib-metadata.readthedocs.io/")
5122 (synopsis "Read metadata from Python packages")
5123 (description
5124 "@code{importlib_metadata} is a library which provides an API for
5125 accessing an installed Python package's metadata, such as its entry points or
5126 its top-level name. This functionality intends to replace most uses of
5127 @code{pkg_resources} entry point API and metadata API. Along with
5128 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
5129 need to use the older and less efficient @code{pkg_resources} package.")
5130 (license license:asl2.0)))
5131
5132 (define-public python-jaraco-packaging
5133 (package
5134 (name "python-jaraco-packaging")
5135 (version "6.1")
5136 (source
5137 (origin
5138 (method url-fetch)
5139 (uri (pypi-uri "jaraco.packaging" version))
5140 (sha256
5141 (base32
5142 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
5143 (build-system python-build-system)
5144 (propagated-inputs
5145 `(("python-pytest" ,python-pytest)
5146 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
5147 ("python-pytest-flake8" ,python-pytest-flake8)
5148 ("python-rst.linker" ,python-rst.linker)
5149 ("python-setuptools" ,python-setuptools)
5150 ("python-setuptools-scm" ,python-setuptools-scm)
5151 ("python-six" ,python-six)
5152 ("python-sphinx" ,python-sphinx)))
5153 (home-page "https://github.com/jaraco/jaraco.packaging")
5154 (synopsis "Tools to supplement packaging Python releases")
5155 (description
5156 "This package provides various tools to supplement packaging Python
5157 releases.")
5158 (license license:expat)))
5159
5160 (define-public python-pathpy
5161 (package
5162 (name "python-pathpy")
5163 (version "11.5.0")
5164 (source
5165 (origin
5166 (method url-fetch)
5167 (uri (pypi-uri "path.py" version))
5168 (sha256
5169 (base32 "1jxkf91syzxlpiwgm83fjfz1m5xh3jrvv4iyl5wjsnkk599pls5n"))))
5170 (outputs '("out" "doc"))
5171 (build-system python-build-system)
5172 (propagated-inputs
5173 `(("python-appdirs" ,python-appdirs)
5174 ("python-importlib-metadata" ,python-importlib-metadata)))
5175 (native-inputs
5176 `(("python-setuptools-scm" ,python-setuptools-scm)
5177 ("python-sphinx" ,python-sphinx)
5178 ("python-rst.linker" ,python-rst.linker)
5179 ("python-pytest" ,python-pytest)
5180 ("python-pytest-runner" ,python-pytest-runner)
5181 ("python-jaraco-packaging" ,python-jaraco-packaging)))
5182 (arguments
5183 `(#:phases
5184 (modify-phases %standard-phases
5185 (add-after 'build 'build-doc
5186 (lambda _
5187 (setenv "LANG" "en_US.UTF-8")
5188 (invoke "python" "setup.py" "build_sphinx")))
5189 (add-after 'install 'install-doc
5190 (lambda* (#:key outputs #:allow-other-keys)
5191 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5192 (doc (string-append data "/doc/" ,name "-" ,version))
5193 (html (string-append doc "/html")))
5194 (mkdir-p html)
5195 (for-each (lambda (file)
5196 (copy-file file (string-append doc "/" file)))
5197 '("README.rst" "CHANGES.rst"))
5198 (copy-recursively "build/sphinx/html" html)
5199 #t)))
5200 (replace 'check
5201 (lambda _
5202 ;; The import time test aborts if an import takes longer than
5203 ;; 100ms. It may very well take a little longer than that.
5204 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
5205 (home-page "https://github.com/jaraco/path.py")
5206 (synopsis "Python module wrapper for built-in os.path")
5207 (description
5208 "@code{path.py} implements path objects as first-class entities, allowing
5209 common operations on files to be invoked on those path objects directly.")
5210 (license license:expat)))
5211
5212 (define-public python2-pathpy
5213 (package-with-python2 python-pathpy))
5214
5215 (define-public python-simplegeneric
5216 (package
5217 (name "python-simplegeneric")
5218 (version "0.8.1")
5219 (source
5220 (origin
5221 (method url-fetch)
5222 (uri (pypi-uri "simplegeneric" version ".zip"))
5223 (sha256
5224 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5225 (build-system python-build-system)
5226 (native-inputs
5227 `(("unzip" ,unzip)))
5228 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5229 (synopsis "Python module for simple generic functions")
5230 (description
5231 "The simplegeneric module lets you define simple single-dispatch generic
5232 functions, akin to Python’s built-in generic functions like @code{len()},
5233 @code{iter()} and so on. However, instead of using specially-named methods,
5234 these generic functions use simple lookup tables, akin to those used by
5235 e.g. @code{pickle.dump()} and other generic functions found in the Python
5236 standard library.")
5237 (license license:zpl2.1)))
5238
5239 (define-public python2-simplegeneric
5240 (package-with-python2 python-simplegeneric))
5241
5242 (define-public python-ipython-genutils
5243 ;; TODO: This package is retired, check if can be removed, see description.
5244 (package
5245 (name "python-ipython-genutils")
5246 (version "0.1.0")
5247 (source
5248 (origin
5249 (method url-fetch)
5250 (uri (pypi-uri "ipython_genutils" version))
5251 (sha256
5252 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5253 (build-system python-build-system)
5254 (arguments `(#:tests? #f)) ; no tests
5255 (home-page "https://ipython.org")
5256 (synopsis "Vestigial utilities from IPython")
5257 (description
5258 "This package provides retired utilities from IPython. No packages
5259 outside IPython/Jupyter should depend on it.
5260
5261 This package shouldn't exist. It contains some common utilities shared by
5262 Jupyter and IPython projects during The Big Split. As soon as possible, those
5263 packages will remove their dependency on this, and this package will go
5264 away.")
5265 (license license:bsd-3)))
5266
5267 (define-public python2-ipython-genutils
5268 (package-with-python2 python-ipython-genutils))
5269
5270 (define-public python-traitlets
5271 (package
5272 (name "python-traitlets")
5273 (version "4.3.3")
5274 (source
5275 (origin
5276 (method url-fetch)
5277 (uri (pypi-uri "traitlets" version))
5278 (sha256
5279 (base32
5280 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
5281 (build-system python-build-system)
5282 (arguments
5283 `(#:phases
5284 (modify-phases %standard-phases
5285 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5286 (propagated-inputs
5287 `(("python-ipython-genutils" ,python-ipython-genutils)
5288 ("python-decorator" ,python-decorator)))
5289 (native-inputs
5290 `(("python-pytest" ,python-pytest)))
5291 (properties `((python2-variant . ,(delay python2-traitlets))))
5292 (home-page "https://ipython.org")
5293 (synopsis "Configuration system for Python applications")
5294 (description
5295 "Traitlets is a framework that lets Python classes have attributes with
5296 type checking, dynamically calculated default values, and ‘on change’
5297 callbacks. The package also includes a mechanism to use traitlets for
5298 configuration, loading values from files or from command line arguments. This
5299 is a distinct layer on top of traitlets, so you can use traitlets in your code
5300 without using the configuration machinery.")
5301 (license license:bsd-3)))
5302
5303 (define-public python2-traitlets
5304 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5305 (package
5306 (inherit traitlets)
5307 (propagated-inputs
5308 `(("python2-enum34" ,python2-enum34)
5309 ,@(package-propagated-inputs traitlets))))))
5310
5311 (define-public python-jupyter-core
5312 (package
5313 (name "python-jupyter-core")
5314 (version "4.4.0")
5315 (source
5316 (origin
5317 (method url-fetch)
5318 (uri (string-append (pypi-uri "jupyter_core" version)))
5319 (sha256
5320 (base32
5321 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5322 (build-system python-build-system)
5323 ;; FIXME: not sure how to run the tests
5324 (arguments `(#:tests? #f))
5325 (propagated-inputs
5326 `(("python-traitlets" ,python-traitlets)))
5327 (home-page "http://jupyter.org/")
5328 (synopsis "Jupyter base package")
5329 (description
5330 "Jupyter core is the base package on which Jupyter projects rely.")
5331 (license license:bsd-3)))
5332
5333 (define-public python2-jupyter-core
5334 (package-with-python2 python-jupyter-core))
5335
5336 (define-public python-jupyter-client
5337 (package
5338 (name "python-jupyter-client")
5339 (version "5.2.4")
5340 (source
5341 (origin
5342 (method url-fetch)
5343 (uri (pypi-uri "jupyter_client" version))
5344 (sha256
5345 (base32
5346 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5347 (build-system python-build-system)
5348 ;; Tests fail because of missing native python kernel which I assume is
5349 ;; provided by the ipython package, which we cannot use because it would
5350 ;; cause a dependency cycle.
5351 (arguments
5352 `(#:tests? #f
5353
5354 #:phases (modify-phases %standard-phases
5355 (add-after 'unpack 'set-tool-file-names
5356 (lambda* (#:key inputs #:allow-other-keys)
5357 (let ((iproute (assoc-ref inputs "iproute")))
5358 (substitute* "jupyter_client/localinterfaces.py"
5359 (("'ip'")
5360 (string-append "'" iproute "/sbin/ip'")))
5361 #t))))))
5362 (inputs
5363 `(("iproute" ,iproute)))
5364 (propagated-inputs
5365 `(("python-pyzmq" ,python-pyzmq)
5366 ("python-traitlets" ,python-traitlets)
5367 ("python-jupyter-core" ,python-jupyter-core)))
5368 (home-page "http://jupyter.org/")
5369 (synopsis "Jupyter protocol implementation and client libraries")
5370 (description
5371 "The @code{jupyter_client} package contains the reference implementation
5372 of the Jupyter protocol. It also provides client and kernel management APIs
5373 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5374 installing @code{kernelspec}s for use with Jupyter frontends.")
5375 (license license:bsd-3)))
5376
5377 (define-public python2-jupyter-client
5378 (package-with-python2 python-jupyter-client))
5379
5380 (define-public python-ipykernel
5381 (package
5382 (name "python-ipykernel")
5383 (version "5.1.1")
5384 (source
5385 (origin
5386 (method url-fetch)
5387 (uri (pypi-uri "ipykernel" version))
5388 (sha256
5389 (base32 "173nm29g85w8cac3fg40b27qaq26g41wgg6qn79ql1hq4w2n5sgh"))))
5390 (build-system python-build-system)
5391 (arguments
5392 `(#:phases
5393 (modify-phases %standard-phases
5394 (replace 'check
5395 (lambda _
5396 (setenv "HOME" "/tmp")
5397 (invoke "pytest" "-v")
5398 #t))
5399 (add-after 'install 'set-python-file-name
5400 (lambda* (#:key outputs #:allow-other-keys)
5401 ;; Record the absolute file name of the 'python' executable in
5402 ;; 'kernel.json'.
5403 (let ((out (assoc-ref outputs "out")))
5404 (substitute* (string-append out "/share/jupyter"
5405 "/kernels/python3/kernel.json")
5406 (("\"python\"")
5407 (string-append "\"" (which "python") "\"")))
5408 #t))))))
5409 (propagated-inputs
5410 `(("python-ipython" ,python-ipython)
5411 ;; imported at runtime during connect
5412 ("python-jupyter-client" ,python-jupyter-client)))
5413 (native-inputs
5414 `(("python-pytest" ,python-pytest)
5415 ("python-nose" ,python-nose)))
5416 (home-page "https://ipython.org")
5417 (synopsis "IPython Kernel for Jupyter")
5418 (description
5419 "This package provides the IPython kernel for Jupyter.")
5420 (license license:bsd-3)))
5421
5422 ;; Version 5.1.1 and above no longer support Python 2.
5423 (define-public python2-ipykernel
5424 (package
5425 (name "python2-ipykernel")
5426 (version "5.1.0")
5427 (source
5428 (origin
5429 (method url-fetch)
5430 (uri (pypi-uri "ipykernel" version))
5431 (sha256
5432 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5433 (build-system python-build-system)
5434 (arguments
5435 `(#:python ,python-2
5436 #:phases
5437 (modify-phases %standard-phases
5438 (replace 'check
5439 (lambda _
5440 (setenv "HOME" "/tmp")
5441 (invoke "pytest" "-v")
5442 #t)))))
5443 (propagated-inputs
5444 `(("python2-ipython" ,python2-ipython)
5445 ;; imported at runtime during connect
5446 ("python2-jupyter-client" ,python2-jupyter-client)))
5447 (native-inputs
5448 `(("python2-pytest" ,python2-pytest)
5449 ("python2-nose" ,python2-nose)))
5450 (home-page "https://ipython.org")
5451 (synopsis "IPython Kernel for Jupyter")
5452 (description
5453 "This package provides the IPython kernel for Jupyter.")
5454 (license license:bsd-3)))
5455
5456 (define-public python-pari-jupyter
5457 (package
5458 (name "python-pari-jupyter")
5459 (version "1.3.2")
5460 (source
5461 (origin
5462 (method url-fetch)
5463 (uri (pypi-uri "pari_jupyter" version))
5464 (sha256
5465 (base32
5466 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5467 (build-system python-build-system)
5468 (propagated-inputs
5469 `(("python-ipykernel" ,python-ipykernel)))
5470 (inputs
5471 `(("pari-gp" ,pari-gp)
5472 ("readline" ,readline)))
5473 (arguments
5474 `(#:tests? #f)) ; no test suite
5475 (home-page
5476 "https://github.com/jdemeyer/pari_jupyter")
5477 (synopsis "A Jupyter kernel for PARI/GP")
5478 (description "The package provides a PARI/GP kernel for Jupyter.")
5479 (license license:gpl3+)))
5480
5481 (define-public python-backcall
5482 (package
5483 (name "python-backcall")
5484 (version "0.1.0")
5485 (source
5486 (origin
5487 (method url-fetch)
5488 (uri (pypi-uri "backcall" version))
5489 (sha256
5490 (base32
5491 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5492 (build-system python-build-system)
5493 (home-page "https://github.com/takluyver/backcall/")
5494 (synopsis "Specifications for callback functions passed in to an API")
5495 (description
5496 "If your code lets other people supply callback functions, it's important
5497 to specify the function signature you expect, and check that functions support
5498 that. Adding extra parameters later would break other peoples code unless
5499 you're careful. The @code{backcall} package provides a way of specifying the
5500 callback signature using a prototype function.")
5501 (license license:bsd-3)))
5502
5503 ;; This is the latest release of the LTS version of ipython with support for
5504 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
5505 ;; dropped support for Python 2.7.
5506 (define-public python2-ipython
5507 (package
5508 (name "python2-ipython")
5509 (version "5.8.0")
5510 (source
5511 (origin
5512 (method url-fetch)
5513 (uri (pypi-uri "ipython" version ".tar.gz"))
5514 (sha256
5515 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5516 (build-system python-build-system)
5517 (propagated-inputs
5518 `(("python2-backports-shutil-get-terminal-size"
5519 ,python2-backports-shutil-get-terminal-size)
5520 ("python2-pathlib2" ,python2-pathlib2)
5521 ("python2-pyzmq" ,python2-pyzmq)
5522 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5523 ("python2-terminado" ,python2-terminado)
5524 ("python2-matplotlib" ,python2-matplotlib)
5525 ("python2-numpy" ,python2-numpy)
5526 ("python2-numpydoc" ,python2-numpydoc)
5527 ("python2-jinja2" ,python2-jinja2)
5528 ("python2-mistune" ,python2-mistune)
5529 ("python2-pexpect" ,python2-pexpect)
5530 ("python2-pickleshare" ,python2-pickleshare)
5531 ("python2-simplegeneric" ,python2-simplegeneric)
5532 ("python2-jsonschema" ,python2-jsonschema)
5533 ("python2-traitlets" ,python2-traitlets)
5534 ("python2-nbformat" ,python2-nbformat)
5535 ("python2-pygments" ,python2-pygments)))
5536 (inputs
5537 `(("readline" ,readline)
5538 ("which" ,which)))
5539 (native-inputs
5540 `(("graphviz" ,graphviz)
5541 ("pkg-config" ,pkg-config)
5542 ("python2-requests" ,python2-requests) ;; for tests
5543 ("python2-testpath" ,python2-testpath)
5544 ("python2-mock" ,python2-mock)
5545 ("python2-nose" ,python2-nose)))
5546 (arguments
5547 `(#:python ,python-2
5548 #:phases
5549 (modify-phases %standard-phases
5550 (add-before 'check 'delete-broken-tests
5551 (lambda* (#:key inputs #:allow-other-keys)
5552 ;; These tests throw errors for unknown reasons.
5553 (delete-file "IPython/core/tests/test_profile.py")
5554 (delete-file "IPython/core/tests/test_interactiveshell.py")
5555 (delete-file "IPython/core/tests/test_magic.py")
5556 #t)))))
5557 (home-page "https://ipython.org")
5558 (synopsis "IPython is a tool for interactive computing in Python")
5559 (description
5560 "IPython provides a rich architecture for interactive computing with:
5561 Powerful interactive shells, a browser-based notebook, support for interactive
5562 data visualization, embeddable interpreters and tools for parallel
5563 computing.")
5564 (license license:bsd-3)))
5565
5566 (define-public python-ipython
5567 (package
5568 (name "python-ipython")
5569 (version "7.5.0")
5570 (source
5571 (origin
5572 (method url-fetch)
5573 (uri (pypi-uri "ipython" version ".tar.gz"))
5574 (sha256
5575 (base32 "09mbxq37mfn88xjnib7qfzaq9krr7gf1jxwy1p6mcjr254082h78"))))
5576 (build-system python-build-system)
5577 (propagated-inputs
5578 `(("python-backcall" ,python-backcall)
5579 ("python-pyzmq" ,python-pyzmq)
5580 ("python-prompt-toolkit" ,python-prompt-toolkit)
5581 ("python-terminado" ,python-terminado)
5582 ("python-matplotlib" ,python-matplotlib)
5583 ("python-numpy" ,python-numpy)
5584 ("python-numpydoc" ,python-numpydoc)
5585 ("python-jedi" ,python-jedi)
5586 ("python-jinja2" ,python-jinja2)
5587 ("python-mistune" ,python-mistune)
5588 ("python-pexpect" ,python-pexpect)
5589 ("python-pickleshare" ,python-pickleshare)
5590 ("python-simplegeneric" ,python-simplegeneric)
5591 ("python-jsonschema" ,python-jsonschema)
5592 ("python-traitlets" ,python-traitlets)
5593 ("python-nbformat" ,python-nbformat)
5594 ("python-pygments" ,python-pygments)))
5595 (inputs
5596 `(("readline" ,readline)
5597 ("which" ,which)))
5598 (native-inputs
5599 `(("graphviz" ,graphviz)
5600 ("pkg-config" ,pkg-config)
5601 ("python-requests" ,python-requests) ;; for tests
5602 ("python-testpath" ,python-testpath)
5603 ("python-nose" ,python-nose)))
5604 (arguments
5605 `(#:phases
5606 (modify-phases %standard-phases
5607 (add-after 'unpack 'make-docs-reproducible
5608 (lambda _
5609 (substitute* "IPython/sphinxext/ipython_directive.py"
5610 ((".*import datetime") "")
5611 ((".*datetime.datetime.now\\(\\)") "")
5612 (("%timeit") "# %timeit"))
5613 #t))
5614 ;; Tests can only be run after the library has been installed and not
5615 ;; within the source directory.
5616 (delete 'check)
5617 (add-after 'install 'check
5618 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5619 (if tests?
5620 (begin
5621 ;; Make installed package available for running the tests
5622 (add-installed-pythonpath inputs outputs)
5623 (setenv "HOME" "/tmp/") ;; required by a test
5624 ;; We only test the core because one of the other tests
5625 ;; tries to import ipykernel.
5626 (invoke "python" "IPython/testing/iptest.py"
5627 "-v" "IPython/core/tests"))
5628 #t)))
5629 (add-before 'check 'fix-tests
5630 (lambda* (#:key inputs #:allow-other-keys)
5631 (substitute* "./IPython/utils/_process_posix.py"
5632 (("/usr/bin/env', 'which") (which "which")))
5633 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5634 (("#!/usr/bin/env python")
5635 (string-append "#!" (which "python"))))
5636 ;; This test introduces a circular dependency on ipykernel
5637 ;; (which depends on ipython).
5638 (delete-file "IPython/core/tests/test_display.py")
5639 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
5640 (delete-file "IPython/core/tests/test_interactiveshell.py")
5641 #t)))))
5642 (home-page "https://ipython.org")
5643 (synopsis "IPython is a tool for interactive computing in Python")
5644 (description
5645 "IPython provides a rich architecture for interactive computing with:
5646 Powerful interactive shells, a browser-based notebook, support for interactive
5647 data visualization, embeddable interpreters and tools for parallel
5648 computing.")
5649 (license license:bsd-3)))
5650
5651 (define-public python-ipython-documentation
5652 (package
5653 (inherit python-ipython)
5654 (name "python-ipython-documentation")
5655 (version (package-version python-ipython))
5656 (arguments
5657 `(#:phases
5658 (modify-phases %standard-phases
5659 (delete 'build)
5660 (delete 'check)
5661 (replace 'install
5662 (lambda* (#:key outputs #:allow-other-keys)
5663 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5664 (doc (string-append data "/doc/" ,name "-" ,version))
5665 (html (string-append doc "/html"))
5666 (man1 (string-append data "/man/man1"))
5667 (info (string-append data "/info"))
5668 (examples (string-append doc "/examples"))
5669 (python-arg (string-append "PYTHON=" (which "python"))))
5670 (setenv "LANG" "en_US.utf8")
5671 (with-directory-excursion "docs"
5672 ;; FIXME: pdf fails to build
5673 ;;(system* "make" "pdf" "PAPER=a4")
5674 (system* "make" python-arg "html")
5675 ;; FIXME: the generated texi file contains ^@^@, which trips
5676 ;; up the parser.
5677 ;; (system* "make" python-arg "info")
5678 )
5679 (copy-recursively "docs/man" man1)
5680 (copy-recursively "examples" examples)
5681 (copy-recursively "docs/build/html" html)
5682 ;; (copy-file "docs/build/latex/ipython.pdf"
5683 ;; (string-append doc "/ipython.pdf"))
5684 (mkdir-p info)
5685 ;; (copy-file "docs/build/texinfo/ipython.info"
5686 ;; (string-append info "/ipython.info"))
5687 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5688 #t)))))
5689 (inputs
5690 `(("python-ipython" ,python-ipython)
5691 ("python-ipykernel" ,python-ipykernel)))
5692 (native-inputs
5693 `(("python-sphinx" ,python-sphinx)
5694 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
5695 ;; FIXME: It's possible that a smaller union would work just as well.
5696 ("texlive" ,(texlive-union (list texlive-amsfonts
5697 texlive-fonts-ec
5698 texlive-generic-ifxetex
5699 texlive-generic-pdftex
5700 texlive-latex-capt-of
5701 texlive-latex-cmap
5702 texlive-latex-environ
5703 texlive-latex-eqparbox
5704 texlive-latex-etoolbox
5705 texlive-latex-expdlist
5706 texlive-latex-fancyhdr
5707 texlive-latex-fancyvrb
5708 texlive-latex-fncychap
5709 texlive-latex-float
5710 texlive-latex-framed
5711 texlive-latex-geometry
5712 texlive-latex-graphics
5713 texlive-latex-hyperref
5714 texlive-latex-mdwtools
5715 texlive-latex-multirow
5716 texlive-latex-needspace
5717 texlive-latex-oberdiek
5718 texlive-latex-parskip
5719 texlive-latex-preview
5720 texlive-latex-tabulary
5721 texlive-latex-threeparttable
5722 texlive-latex-titlesec
5723 texlive-latex-trimspaces
5724 texlive-latex-ucs
5725 texlive-latex-upquote
5726 texlive-latex-url
5727 texlive-latex-varwidth
5728 texlive-latex-wrapfig)))
5729 ("texinfo" ,texinfo)))))
5730
5731 (define-public python-urwid
5732 (package
5733 (name "python-urwid")
5734 (version "2.0.1")
5735 (source
5736 (origin
5737 (method url-fetch)
5738 (uri (pypi-uri "urwid" version))
5739 (sha256
5740 (base32
5741 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5742 (build-system python-build-system)
5743 (home-page "http://urwid.org")
5744 (synopsis "Console user interface library for Python")
5745 (description
5746 "Urwid is a curses-based UI/widget library for Python. It includes many
5747 features useful for text console applications.")
5748 (license license:lgpl2.1+)))
5749
5750 (define-public python2-urwid
5751 (package-with-python2 python-urwid))
5752
5753 (define-public python-urwidtrees
5754 (package
5755 (name "python-urwidtrees")
5756 (version "1.0.2")
5757 (source
5758 (origin
5759 (method url-fetch)
5760 ;; package author intends on distributing via github rather than pypi:
5761 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5762 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5763 version ".tar.gz"))
5764 (file-name (string-append name "-" version ".tar.gz"))
5765 (sha256
5766 (base32
5767 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5768 (build-system python-build-system)
5769 (arguments
5770 '(#:tests? #f)) ; no tests
5771 (propagated-inputs `(("python-urwid" ,python-urwid)))
5772 (home-page "https://github.com/pazz/urwidtrees")
5773 (synopsis "Tree widgets for urwid")
5774 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5775 toolkit. Use it to build trees of widgets.")
5776 (license license:gpl3+)))
5777
5778 (define-public python2-urwidtrees
5779 (package-with-python2 python-urwidtrees))
5780
5781 (define-public python-ua-parser
5782 (package
5783 (name "python-ua-parser")
5784 (version "0.8.0")
5785 (source
5786 (origin
5787 (method url-fetch)
5788 (uri (pypi-uri "ua-parser" version))
5789 (sha256
5790 (base32
5791 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5792 (build-system python-build-system)
5793 (arguments
5794 `(#:tests? #f)) ;no test suite in release
5795 (native-inputs
5796 `(("python-pyyaml" ,python-pyyaml)))
5797 (home-page "https://github.com/ua-parser/uap-python")
5798 (synopsis "User agent parser")
5799 (description
5800 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5801 (license license:asl2.0)))
5802
5803 (define-public python2-ua-parser
5804 (package-with-python2 python-ua-parser))
5805
5806 (define-public python-user-agents
5807 (package
5808 (name "python-user-agents")
5809 (version "1.1.0")
5810 (source
5811 (origin
5812 (method url-fetch)
5813 (uri (pypi-uri "user-agents" version))
5814 (sha256
5815 (base32
5816 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5817 (build-system python-build-system)
5818 (arguments
5819 `(#:tests? #f)) ;missing devices.json test file in release
5820 (propagated-inputs
5821 `(("python-ua-parser" ,python-ua-parser)))
5822 (home-page "https://github.com/selwin/python-user-agents")
5823 (synopsis "User Agent strings parsing library")
5824 (description
5825 "A library to identify devices (phones, tablets) and their capabilities by
5826 parsing (browser/HTTP) user agent strings.")
5827 (license license:expat)))
5828
5829 (define-public python2-user-agents
5830 (package-with-python2 python-user-agents))
5831
5832 (define-public python-dbus
5833 (package
5834 (name "python-dbus")
5835 (version "1.2.8")
5836 (source
5837 (origin
5838 (method url-fetch)
5839 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5840 "dbus-python-" version ".tar.gz"))
5841 (sha256
5842 (base32
5843 "0vvvjmiwnc9cjlks3gcdk43ap7llhlpz7cm1wbw0nc2yfsxjpwdb"))))
5844 (build-system gnu-build-system)
5845 (arguments
5846 '(#:phases
5847 (modify-phases %standard-phases
5848 (add-before
5849 'check 'pre-check
5850 (lambda _
5851 ;; XXX: For the missing '/etc/machine-id'.
5852 (substitute* "test/run-test.sh"
5853 (("DBUS_FATAL_WARNINGS=1")
5854 "DBUS_FATAL_WARNINGS=0"))
5855 #t)))))
5856 (native-inputs
5857 `(("pkg-config" ,pkg-config)))
5858 (inputs
5859 `(("python" ,python-wrapper)
5860 ("dbus-glib" ,dbus-glib)))
5861 (synopsis "Python bindings for D-bus")
5862 (description "python-dbus provides bindings for libdbus, the reference
5863 implementation of D-Bus.")
5864 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5865 (license license:expat)))
5866
5867 (define-public python2-dbus
5868 (package (inherit python-dbus)
5869 (name "python2-dbus")
5870 (inputs `(("python" ,python-2)
5871 ,@(alist-delete "python"
5872 (package-inputs python-dbus)
5873 equal?)))
5874 ;; FIXME: on Python 2, the test_utf8 fails with:
5875 ;; "ValueError: unichr() arg not in range(0x10000) (narrow Python build)"
5876 (arguments `(#:tests? #f))))
5877
5878 (define-public python-notify2
5879 (package
5880 (name "python-notify2")
5881 (version "0.3.1")
5882 (source
5883 (origin
5884 (method url-fetch)
5885 (uri (pypi-uri "notify2" version))
5886 (sha256
5887 (base32
5888 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
5889 (build-system python-build-system)
5890 (arguments `(#:tests? #f)) ; tests depend on system state
5891 (native-inputs
5892 `(("python-dbus" ,python-dbus)))
5893 (home-page "https://bitbucket.org/takluyver/pynotify2")
5894 (synopsis "Python interface to D-Bus notifications")
5895 (description
5896 "Pynotify2 provides a Python interface for sending D-Bus notifications.
5897 It is a reimplementation of pynotify in pure Python, and an alternative to
5898 the GObject Introspection bindings to libnotify for non-GTK applications.")
5899 (license (list license:bsd-2
5900 license:lgpl2.1+))))
5901
5902 (define-public python2-notify2
5903 (package-with-python2 python-notify2))
5904
5905 (define-public python-lxml
5906 (package
5907 (name "python-lxml")
5908 (version "4.2.5")
5909 (source
5910 (origin
5911 (method url-fetch)
5912 (uri (pypi-uri "lxml" version))
5913 (sha256
5914 (base32
5915 "0zw0y9hs0nflxhl9cs6ipwwh53szi3w2x06wl0k9cylyqac0cwin"))))
5916 (build-system python-build-system)
5917 (inputs
5918 `(("libxml2" ,libxml2)
5919 ("libxslt" ,libxslt)))
5920 (home-page "http://lxml.de/")
5921 (synopsis
5922 "Python XML processing library")
5923 (description
5924 "The lxml XML toolkit is a Pythonic binding for the C libraries
5925 libxml2 and libxslt.")
5926 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5927
5928 (define-public python2-lxml
5929 (package-with-python2 python-lxml))
5930
5931 ;; beautifulsoup4 has a totally different namespace than 3.x,
5932 ;; and pypi seems to put it under its own name, so I guess we should too
5933 (define-public python-beautifulsoup4
5934 (package
5935 (name "python-beautifulsoup4")
5936 (version "4.7.1")
5937 (source
5938 (origin
5939 (method url-fetch)
5940 (uri (pypi-uri "beautifulsoup4" version))
5941 (sha256
5942 (base32
5943 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
5944 (build-system python-build-system)
5945 (arguments
5946 `(#:phases
5947 (modify-phases %standard-phases
5948 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5949 ;; must use this conversion script when building with Python 3. The
5950 ;; conversion script also runs the tests.
5951 ;; For more information, see the file 'convert-py3k' in the source
5952 ;; distribution.
5953 (replace 'check
5954 (lambda _ (invoke "./convert-py3k"))))))
5955 (propagated-inputs
5956 `(("python-soupsieve" ,python-soupsieve)))
5957 (home-page
5958 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5959 (synopsis
5960 "Python screen-scraping library")
5961 (description
5962 "Beautiful Soup is a Python library designed for rapidly setting up
5963 screen-scraping projects. It offers Pythonic idioms for navigating,
5964 searching, and modifying a parse tree, providing a toolkit for
5965 dissecting a document and extracting what you need. It automatically
5966 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5967 (license license:expat)
5968 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5969
5970 (define-public python2-beautifulsoup4
5971 (package
5972 (inherit (package-with-python2
5973 (strip-python2-variant python-beautifulsoup4)))
5974 (arguments `(#:python ,python-2))))
5975
5976 (define-public python-soupsieve
5977 (package
5978 (name "python-soupsieve")
5979 (version "1.9.2")
5980 (source
5981 (origin
5982 (method url-fetch)
5983 (uri (pypi-uri "soupsieve" version))
5984 (sha256
5985 (base32
5986 "0in9rc9q3h8w5b4qf7kvl3qxcvw6vrz35ckblchgf70hm6pg3dbj"))))
5987 (build-system python-build-system)
5988 (arguments `(#:tests? #f))
5989 ;;XXX: 2 tests fail currently despite claming they were to be
5990 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
5991 ;;don't want to create a circular dependency.
5992 (home-page "https://github.com/facelessuser/soupsieve")
5993 (synopsis "CSS selector library")
5994 (description
5995 "Soup Sieve is a CSS selector library designed to be used with Beautiful
5996 Soup 4. It aims to provide selecting, matching, and filtering using modern
5997 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
5998 specifications up through the latest CSS level 4 drafts and beyond (though
5999 some are not yet implemented).")
6000 (properties `((python2-variant . ,(delay python2-soupsieve))))
6001 (license license:expat)))
6002
6003 (define-public python2-soupsieve
6004 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
6005 (package
6006 (inherit base)
6007 (propagated-inputs
6008 `(("python2-backports-functools-lru-cache"
6009 ,python2-backports-functools-lru-cache)
6010 ,@(package-propagated-inputs base))))))
6011
6012 (define-public python-netifaces
6013 (package
6014 (name "python-netifaces")
6015 (version "0.10.7")
6016 (source
6017 (origin
6018 (method url-fetch)
6019 (uri (pypi-uri "netifaces" version))
6020 (sha256
6021 (base32
6022 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
6023 (build-system python-build-system)
6024 (home-page "https://github.com/al45tair/netifaces")
6025 (synopsis
6026 "Python module for portable network interface information")
6027 (description
6028 "Netifaces is a Python module providing information on network
6029 interfaces in an easy and portable manner.")
6030 (license license:expat)))
6031
6032 (define-public python2-netifaces
6033 (package-with-python2 python-netifaces))
6034
6035 (define-public python-networkx
6036 (package
6037 (name "python-networkx")
6038 (version "2.2")
6039 (source
6040 (origin
6041 (method url-fetch)
6042 (uri (pypi-uri "networkx" version ".zip"))
6043 (sha256
6044 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
6045 (build-system python-build-system)
6046 ;; python-decorator is needed at runtime.
6047 (propagated-inputs
6048 `(("python-decorator" ,python-decorator)))
6049 (native-inputs
6050 `(("python-nose" ,python-nose)
6051 ("unzip" ,unzip)))
6052 (home-page "https://networkx.github.io/")
6053 (synopsis "Python module for creating and manipulating graphs and networks")
6054 (description
6055 "NetworkX is a Python package for the creation, manipulation, and study
6056 of the structure, dynamics, and functions of complex networks.")
6057 (license license:bsd-3)))
6058
6059 (define-public python2-networkx
6060 (package-with-python2 python-networkx))
6061
6062 (define-public python-datrie
6063 (package
6064 (name "python-datrie")
6065 (version "0.8")
6066 (source
6067 (origin
6068 (method url-fetch)
6069 (uri (pypi-uri "datrie" version))
6070 (sha256
6071 (base32
6072 "0338r8xgmpy78556jhms0h6qkvyjr10p8bpgdvcpqzm9lrmxmmdx"))))
6073 (build-system python-build-system)
6074 (native-inputs
6075 `(("python-cython" ,python-cython)
6076 ("python-hypothesis" ,python-hypothesis)
6077 ("python-pytest" ,python-pytest)
6078 ("python-pytest-runner" ,python-pytest-runner)))
6079 (home-page "https://github.com/kmike/datrie")
6080 (synopsis "Fast, efficiently stored trie for Python")
6081 (description
6082 "This package provides a fast, efficiently stored trie implementation for
6083 Python.")
6084 (license license:lgpl2.1+)))
6085
6086 (define-public snakemake
6087 (package
6088 (name "snakemake")
6089 (version "5.2.4")
6090 (source
6091 (origin
6092 (method url-fetch)
6093 (uri (pypi-uri "snakemake" version))
6094 (sha256
6095 (base32 "0gj0xxgiq3mp9qyyrbfzldiaq1giliqw0in64nqiz7vx49myqj7z"))))
6096 (build-system python-build-system)
6097 (arguments
6098 ;; TODO: Package missing test dependencies.
6099 '(#:tests? #f
6100 #:phases
6101 (modify-phases %standard-phases
6102 ;; For cluster execution Snakemake will call Python. Since there is
6103 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
6104 ;; this by calling the snakemake wrapper instead.
6105 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
6106 (lambda* (#:key outputs #:allow-other-keys)
6107 (substitute* "snakemake/executors.py"
6108 (("\\{sys.executable\\} -m snakemake")
6109 (string-append (assoc-ref outputs "out")
6110 "/bin/snakemake")))
6111 #t)))))
6112 (propagated-inputs
6113 `(("python-gitpython" ,python-gitpython)
6114 ("python-wrapt" ,python-wrapt)
6115 ("python-requests" ,python-requests)
6116 ("python-appdirs" ,python-appdirs)
6117 ("python-configargparse" ,python-configargparse)
6118 ("python-datrie" ,python-datrie)
6119 ("python-docutils" ,python-docutils)
6120 ("python-jinja2" ,python-jinja2)
6121 ("python-jsonschema" ,python-jsonschema)
6122 ("python-networkx" ,python-networkx)
6123 ("python-pyyaml" ,python-pyyaml)
6124 ("python-ratelimiter" ,python-ratelimiter)))
6125 (home-page "https://snakemake.readthedocs.io")
6126 (synopsis "Python-based execution environment for make-like workflows")
6127 (description
6128 "Snakemake aims to reduce the complexity of creating workflows by
6129 providing a clean and modern domain specific specification language (DSL) in
6130 Python style, together with a fast and comfortable execution environment.")
6131 (license license:expat)))
6132
6133 ;; This is currently needed for the pigx-* packages.
6134 (define-public snakemake-4
6135 (package (inherit snakemake)
6136 (version "4.4.0")
6137 (source
6138 (origin
6139 (method url-fetch)
6140 (uri (pypi-uri "snakemake" version))
6141 (sha256
6142 (base32 "0g0paia4z7w3srnqdmavq3hrb2x7qnpf81jx50njl0p7y4y0j8jv"))))
6143 (propagated-inputs
6144 `(("python-wrapt" ,python-wrapt)
6145 ("python-requests" ,python-requests)
6146 ("python-appdirs" ,python-appdirs)
6147 ("python-configargparse" ,python-configargparse)
6148 ("python-pyyaml" ,python-pyyaml)
6149 ("python-ratelimiter" ,python-ratelimiter)))))
6150
6151 (define-public python-pyqrcode
6152 (package
6153 (name "python-pyqrcode")
6154 (version "1.2.1")
6155 (source
6156 (origin
6157 (method url-fetch)
6158 (uri (pypi-uri "PyQRCode" version))
6159 (sha256
6160 (base32
6161 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
6162 (build-system python-build-system)
6163 (home-page
6164 "https://github.com/mnooner256/pyqrcode")
6165 (synopsis "QR code generator")
6166 (description
6167 "Pyqrcode is a QR code generator written purely in Python with
6168 SVG, EPS, PNG and terminal output.")
6169 (license license:bsd-3)))
6170
6171 (define-public python-seaborn
6172 (package
6173 (name "python-seaborn")
6174 (version "0.9.0")
6175 (source
6176 (origin
6177 (method url-fetch)
6178 (uri (pypi-uri "seaborn" version))
6179 (sha256
6180 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))))
6181 (build-system python-build-system)
6182 (arguments
6183 `(#:phases
6184 (modify-phases %standard-phases
6185 (add-before 'check 'start-xserver
6186 (lambda* (#:key inputs #:allow-other-keys)
6187 (let ((xorg-server (assoc-ref inputs "xorg-server")))
6188 ;; There must be a running X server and make check doesn't
6189 ;; start one. Therefore we must do it.
6190 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
6191 (setenv "DISPLAY" ":1")
6192 #t)))
6193 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
6194 (propagated-inputs
6195 `(("python-pandas" ,python-pandas)
6196 ("python-matplotlib" ,python-matplotlib)
6197 ("python-numpy" ,python-numpy)
6198 ("python-scipy" ,python-scipy)))
6199 (native-inputs
6200 `(("python-pytest" ,python-pytest)
6201 ("xorg-server" ,xorg-server)))
6202 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6203 (synopsis "Statistical data visualization")
6204 (description
6205 "Seaborn is a library for making attractive and informative statistical
6206 graphics in Python. It is built on top of matplotlib and tightly integrated
6207 with the PyData stack, including support for numpy and pandas data structures
6208 and statistical routines from scipy and statsmodels.")
6209 (license license:bsd-3)))
6210
6211 (define-public python2-seaborn
6212 (package-with-python2 python-seaborn))
6213
6214 (define-public python-mpmath
6215 (package
6216 (name "python-mpmath")
6217 (version "0.19")
6218 (source (origin
6219 (method url-fetch)
6220 (uri (string-append "http://mpmath.org/files/mpmath-"
6221 version ".tar.gz"))
6222 (sha256
6223 (base32
6224 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6225 (build-system python-build-system)
6226 (arguments
6227 '(#:phases
6228 (modify-phases %standard-phases
6229 (replace 'check
6230 (lambda _
6231 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
6232 (home-page "http://mpmath.org")
6233 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6234 (description
6235 "@code{mpmath} can be used as an arbitrary-precision substitute for
6236 Python's float/complex types and math/cmath modules, but also does much
6237 more advanced mathematics.")
6238 (license license:bsd-3)))
6239
6240 (define-public python2-mpmath
6241 (package-with-python2 python-mpmath))
6242
6243 (define-public python-bigfloat
6244 (package
6245 (name "python-bigfloat")
6246 (version "0.3.0")
6247 (source
6248 (origin
6249 (method url-fetch)
6250 (uri (pypi-uri "bigfloat" version))
6251 (sha256
6252 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6253 (build-system python-build-system)
6254 (inputs
6255 `(("mpfr" ,mpfr)))
6256 (home-page "https://github.com/mdickinson/bigfloat")
6257 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6258 (description
6259 "This package provides a Python interface to the MPFR library for
6260 multiprecision arithmetic.")
6261 (license license:lgpl3+)))
6262
6263 (define-public python2-bigfloat
6264 (package-with-python2 python-bigfloat))
6265
6266 (define-public python-sympy
6267 (package
6268 (name "python-sympy")
6269 (version "1.1.1")
6270 (source
6271 (origin
6272 (method url-fetch)
6273 (uri (string-append
6274 "https://github.com/sympy/sympy/releases/download/sympy-"
6275 version "/sympy-" version ".tar.gz"))
6276 (sha256
6277 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6278 (build-system python-build-system)
6279 (arguments
6280 `(#:phases
6281 (modify-phases %standard-phases
6282 ;; Run the core tests after installation. By default it would run
6283 ;; *all* tests, which take a very long time to complete and are known
6284 ;; to be flaky.
6285 (delete 'check)
6286 (add-after 'install 'check
6287 (lambda* (#:key outputs #:allow-other-keys)
6288 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6289 #t)))))
6290 (propagated-inputs
6291 `(("python-mpmath" ,python-mpmath)))
6292 (home-page "http://www.sympy.org/")
6293 (synopsis "Python library for symbolic mathematics")
6294 (description
6295 "SymPy is a Python library for symbolic mathematics. It aims to become a
6296 full-featured computer algebra system (CAS) while keeping the code as simple
6297 as possible in order to be comprehensible and easily extensible.")
6298 (license license:bsd-3)))
6299
6300 (define-public python2-sympy
6301 (package
6302 (inherit (package-with-python2 python-sympy))
6303 (arguments
6304 `(#:phases
6305 (modify-phases %standard-phases
6306 ;; Run the core tests after installation. By default it would run
6307 ;; *all* tests, which take a very long time to complete and are known
6308 ;; to be flaky.
6309 (delete 'check)
6310 (add-after 'install 'check
6311 (lambda* (#:key outputs #:allow-other-keys)
6312 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6313 #t)))))))
6314
6315 (define-public python-q
6316 (package
6317 (name "python-q")
6318 (version "2.6")
6319 (source
6320 (origin
6321 (method url-fetch)
6322 (uri (pypi-uri "q" version))
6323 (sha256
6324 (base32
6325 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6326 (build-system python-build-system)
6327 (home-page "https://github.com/zestyping/q")
6328 (synopsis "Quick-and-dirty debugging output for tired programmers")
6329 (description
6330 "q is a Python module for \"print\" style of debugging Python code. It
6331 provides convenient short API for print out of values, tracebacks, and
6332 falling into the Python interpreter.")
6333 (license license:asl2.0)))
6334
6335 (define-public python2-q
6336 (package-with-python2 python-q))
6337
6338 (define-public python2-xlib
6339 (package
6340 (name "python2-xlib")
6341 (version "0.14")
6342 (source (origin
6343 (method url-fetch)
6344 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6345 "/" version "/"
6346 "python-xlib-" version ".tar.gz"))
6347 (sha256
6348 (base32
6349 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6350 (build-system python-build-system)
6351 (arguments
6352 `(#:python ,python-2 ;Python 2 only
6353 #:tests? #f)) ;no tests
6354 (home-page "http://python-xlib.sourceforge.net/")
6355 (synopsis "Python X11 client library")
6356 (description
6357 "The Python X Library is intended to be a fully functional X client
6358 library for Python programs. It is useful to implement low-level X clients.
6359 It is written entirely in Python.")
6360 (license license:gpl2+)))
6361
6362 (define-public python-singledispatch
6363 (package
6364 (name "python-singledispatch")
6365 (version "3.4.0.3")
6366 (source
6367 (origin
6368 (method url-fetch)
6369 (uri (pypi-uri "singledispatch" version))
6370 (sha256
6371 (base32
6372 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6373 (build-system python-build-system)
6374 (native-inputs
6375 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6376 (home-page
6377 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6378 (synopsis "Backport of singledispatch feature from Python 3.4")
6379 (description
6380 "This library brings functools.singledispatch from Python 3.4 to Python
6381 2.6-3.3.")
6382 (license license:expat)))
6383
6384 (define-public python2-singledispatch
6385 (package-with-python2 python-singledispatch))
6386
6387 ;; the python- version can be removed with python-3.5
6388 (define-public python-backports-abc
6389 (package
6390 (name "python-backports-abc")
6391 (version "0.5")
6392 (source
6393 (origin
6394 (method url-fetch)
6395 (uri (pypi-uri "backports_abc" version))
6396 (sha256
6397 (base32
6398 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6399 (build-system python-build-system)
6400 (home-page "https://github.com/cython/backports_abc")
6401 (synopsis "Backport of additions to the 'collections.abc' module")
6402 (description
6403 "Python-backports-abc provides a backport of additions to the
6404 @code{collections.abc} module in Python-3.5.")
6405 (license license:psfl)))
6406
6407 (define-public python2-backports-abc
6408 (package-with-python2 python-backports-abc))
6409
6410 (define-public python-backports-csv
6411 (package
6412 (name "python-backports-csv")
6413 (version "1.0.5")
6414 (source
6415 (origin
6416 (method url-fetch)
6417 (uri (pypi-uri "backports.csv" version))
6418 (sha256
6419 (base32
6420 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6421 (build-system python-build-system)
6422 (home-page "https://github.com/ryanhiebert/backports.csv")
6423 (synopsis "Backport of Python 3's csv module for Python 2")
6424 (description
6425 "Provides a backport of Python 3's @code{csv} module for parsing
6426 comma separated values. The API of the @code{csv} module in Python 2
6427 is drastically different from the @code{csv} module in Python 3.
6428 This is due, for the most part, to the difference between str in
6429 Python 2 and Python 3.")
6430 (license license:psfl)))
6431
6432 (define-public python2-backports-csv
6433 (package-with-python2 python-backports-csv))
6434
6435 (define-public python2-backports-shutil-get-terminal-size
6436 (package
6437 (name "python2-backports-shutil-get-terminal-size")
6438 (version "1.0.0")
6439 (source
6440 (origin
6441 (method url-fetch)
6442 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6443 (sha256
6444 (base32
6445 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6446 (build-system python-build-system)
6447 (arguments
6448 `(#:python ,python-2
6449 #:phases
6450 (modify-phases %standard-phases
6451 (replace 'check
6452 (lambda _
6453 (invoke "py.test" "-v"))))))
6454 (native-inputs
6455 `(("python2-pytest" ,python2-pytest)))
6456 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6457 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6458 (description
6459 "This package provides a backport of the @code{get_terminal_size
6460 function} from Python 3.3's @code{shutil}.
6461 Unlike the original version it is written in pure Python rather than C,
6462 so it might be a tiny bit slower.")
6463 (license license:expat)))
6464
6465 (define-public python-waf
6466 (package
6467 (name "python-waf")
6468 (version "2.0.11")
6469 (source (origin
6470 (method url-fetch)
6471 (uri (string-append "https://waf.io/"
6472 "waf-" version ".tar.bz2"))
6473 (sha256
6474 (base32
6475 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
6476 (build-system python-build-system)
6477 (arguments
6478 '(#:phases
6479 (modify-phases %standard-phases
6480 (replace 'build
6481 (lambda _
6482 (invoke "python" "waf-light" "configure" "build")))
6483 (replace 'check
6484 (lambda _
6485 (invoke "python" "waf" "--version")))
6486 (replace 'install
6487 (lambda* (#:key outputs #:allow-other-keys)
6488 (let ((out (assoc-ref outputs "out")))
6489 (install-file "waf" (string-append out "/bin")))
6490 #t))
6491 ;; waf breaks when it is wrapped.
6492 (delete 'wrap))))
6493 (home-page "https://waf.io/")
6494 (synopsis "Python-based build system")
6495 (description
6496 "Waf is a Python-based framework for configuring, compiling and installing
6497 applications.")
6498 (license license:bsd-3)))
6499
6500 (define-public python2-waf
6501 (package-with-python2 python-waf))
6502
6503 (define-public python-pyzmq
6504 (package
6505 (name "python-pyzmq")
6506 (version "17.1.2")
6507 (source
6508 (origin
6509 (method url-fetch)
6510 (uri (pypi-uri "pyzmq" version))
6511 (sha256
6512 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6513 (build-system python-build-system)
6514 (arguments
6515 `(#:configure-flags
6516 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6517 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6518 ;; --inplace' for 'python setup.py test' to work.
6519 #:tests? #f))
6520 (inputs
6521 `(("zeromq" ,zeromq)))
6522 (native-inputs
6523 `(("pkg-config" ,pkg-config)
6524 ("python-nose" ,python-nose)))
6525 (home-page "https://github.com/zeromq/pyzmq")
6526 (synopsis "Python bindings for 0MQ")
6527 (description
6528 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6529 (license license:bsd-4)))
6530
6531 (define-public python2-pyzmq
6532 (package-with-python2 python-pyzmq))
6533
6534 (define-public python-pep8
6535 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6536 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6537 ;; some dependents' test suites, and nothing more.
6538 (package
6539 (name "python-pep8")
6540 (version "1.7.0")
6541 (source
6542 (origin
6543 (method url-fetch)
6544 (uri (pypi-uri "pep8" version))
6545 (sha256
6546 (base32
6547 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
6548 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
6549 (build-system python-build-system)
6550 (home-page "https://pep8.readthedocs.org/")
6551 (synopsis "Python style guide checker")
6552 (description
6553 "This tools checks Python code against some of the style conventions in
6554 PEP 8.")
6555 (license license:expat)))
6556
6557 (define-public python2-pep8
6558 (package-with-python2 python-pep8))
6559
6560 (define-public python-pyflakes
6561 (package
6562 (name "python-pyflakes")
6563 (version "2.1.1")
6564 (source
6565 (origin
6566 (method url-fetch)
6567 (uri (pypi-uri "pyflakes" version))
6568 (sha256
6569 (base32
6570 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
6571 (build-system python-build-system)
6572 (home-page
6573 "https://github.com/pyflakes/pyflakes")
6574 (synopsis "Passive checker of Python programs")
6575 (description
6576 "Pyflakes statically checks Python source code for common errors.")
6577 (license license:expat)))
6578
6579 (define-public python2-pyflakes
6580 (package-with-python2 python-pyflakes))
6581
6582 (define-public python-mccabe
6583 (package
6584 (name "python-mccabe")
6585 (version "0.6.1")
6586 (source
6587 (origin
6588 (method url-fetch)
6589 (uri (pypi-uri "mccabe" version))
6590 (sha256
6591 (base32
6592 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6593 (build-system python-build-system)
6594 (native-inputs
6595 `(("python-pytest" ,python-pytest-bootstrap)
6596 ("python-pytest-runner" ,python-pytest-runner)))
6597 (home-page "https://github.com/flintwork/mccabe")
6598 (synopsis "McCabe checker, plugin for flake8")
6599 (description
6600 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6601 complexity of Python source code.")
6602 (license license:expat)))
6603
6604 (define-public python2-mccabe
6605 (package-with-python2 python-mccabe))
6606
6607 (define-public python-mccabe-0.2.1
6608 (package (inherit python-mccabe)
6609 (version "0.2.1")
6610 (source
6611 (origin
6612 (method url-fetch)
6613 (uri (pypi-uri "mccabe" version))
6614 (sha256
6615 (base32
6616 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6617
6618 (define-public python2-mccabe-0.2.1
6619 (package-with-python2 python-mccabe-0.2.1))
6620
6621 ;; Flake8 2.4.1 requires an older version of pep8.
6622 ;; This should be removed ASAP.
6623 (define-public python-pep8-1.5.7
6624 (package (inherit python-pep8)
6625 (version "1.5.7")
6626 (source
6627 (origin
6628 (method url-fetch)
6629 (uri (pypi-uri "pep8" version))
6630 (sha256
6631 (base32
6632 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6633 (arguments
6634 ;; XXX Tests not compatible with Python 3.5.
6635 '(#:tests? #f))))
6636
6637 (define-public python2-pep8-1.5.7
6638 (package-with-python2 python-pep8-1.5.7))
6639
6640 ;; Flake8 2.4.1 requires an older version of pyflakes.
6641 ;; This should be removed ASAP.
6642 (define-public python-pyflakes-0.8.1
6643 (package (inherit python-pyflakes)
6644 (version "0.8.1")
6645 (source
6646 (origin
6647 (method url-fetch)
6648 (uri (pypi-uri "pyflakes" version))
6649 (sha256
6650 (base32
6651 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6652 (arguments
6653 ;; XXX Tests not compatible with Python 3.5.
6654 '(#:tests? #f))))
6655
6656 (define-public python2-pyflakes-0.8.1
6657 (package-with-python2 python-pyflakes-0.8.1))
6658
6659 (define-public python-flake8
6660 (package
6661 (name "python-flake8")
6662 (version "3.7.7")
6663 (source (origin
6664 (method url-fetch)
6665 (uri (pypi-uri "flake8" version))
6666 (sha256
6667 (base32
6668 "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5"))))
6669 (build-system python-build-system)
6670 (arguments
6671 `(#:phases
6672 (modify-phases %standard-phases
6673 (delete 'check)
6674 (add-after 'install 'check
6675 (lambda* (#:key inputs outputs #:allow-other-keys)
6676 (add-installed-pythonpath inputs outputs)
6677 (invoke "pytest" "-v")
6678 #t)))))
6679 (propagated-inputs
6680 `(("python-pycodestyle" ,python-pycodestyle)
6681 ("python-entrypoints" ,python-entrypoints)
6682 ("python-pyflakes" ,python-pyflakes)
6683 ("python-mccabe" ,python-mccabe)))
6684 (native-inputs
6685 `(("python-mock" ,python-mock)
6686 ("python-pytest" ,python-pytest-bootstrap)
6687 ("python-pytest-runner" ,python-pytest-runner)))
6688 (home-page "https://gitlab.com/pycqa/flake8")
6689 (synopsis
6690 "The modular source code checker: pep8, pyflakes and co")
6691 (description
6692 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6693 (properties `((python2-variant . ,(delay python2-flake8))))
6694 (license license:expat)))
6695
6696 (define-public python2-flake8
6697 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
6698 (package (inherit base)
6699 (propagated-inputs
6700 `(("python2-configparser" ,python2-configparser)
6701 ("python2-enum34" ,python2-enum34)
6702 ("python2-typing" ,python2-typing)
6703 ,@(package-propagated-inputs base))))))
6704
6705 ;; python-hacking requires flake8 <2.6.0.
6706 (define-public python-flake8-2.5
6707 (package
6708 (inherit python-flake8)
6709 (version "2.5.5")
6710 (source (origin
6711 (method url-fetch)
6712 (uri (pypi-uri "flake8" version))
6713 (sha256
6714 (base32
6715 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6716 (propagated-inputs
6717 `(("python-pep8" ,python-pep8)
6718 ,@(package-propagated-inputs python-flake8)))
6719 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6720
6721 (define-public python2-flake8-2.5
6722 (package
6723 (inherit python2-flake8)
6724 (version (package-version python-flake8-2.5))
6725 (source (origin
6726 (inherit (package-source python-flake8-2.5))))
6727 (propagated-inputs
6728 `(("python2-pep8" ,python2-pep8)
6729 ,@(package-propagated-inputs python2-flake8)))))
6730
6731 (define-public python-flake8-polyfill
6732 (package
6733 (name "python-flake8-polyfill")
6734 (version "1.0.2")
6735 (source
6736 (origin
6737 (method url-fetch)
6738 (uri (pypi-uri "flake8-polyfill" version))
6739 (sha256
6740 (base32
6741 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6742 (build-system python-build-system)
6743 (arguments
6744 '(#:phases
6745 (modify-phases %standard-phases
6746 (replace 'check
6747 (lambda _
6748 ;; Be compatible with Pytest 4:
6749 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
6750 (substitute* "setup.cfg"
6751 (("\\[pytest\\]")
6752 "[tool:pytest]"))
6753
6754 (setenv "PYTHONPATH"
6755 (string-append (getcwd) "/build/lib:"
6756 (getenv "PYTHONPATH")))
6757 (invoke "py.test" "-v"))))))
6758 (native-inputs
6759 `(("python-flake8" ,python-flake8)
6760 ("python-mock" ,python-mock)
6761 ("python-pep8" ,python-pep8)
6762 ("python-pycodestyle" ,python-pycodestyle)
6763 ("python-pytest" ,python-pytest)))
6764 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6765 (synopsis "Polyfill package for Flake8 plugins")
6766 (description
6767 "This package that provides some compatibility helpers for Flake8
6768 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6769 (license license:expat)))
6770
6771 (define-public python2-flake8-polyfill
6772 (package-with-python2 python-flake8-polyfill))
6773
6774 (define-public python-mistune
6775 (package
6776 (name "python-mistune")
6777 (version "0.8.4")
6778 (source
6779 (origin
6780 (method url-fetch)
6781 (uri (pypi-uri "mistune" version))
6782 (sha256
6783 (base32
6784 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6785 (build-system python-build-system)
6786 (native-inputs
6787 `(("python-nose" ,python-nose)
6788 ("python-cython" ,python-cython)))
6789 (home-page "https://github.com/lepture/mistune")
6790 (synopsis "Markdown parser in pure Python")
6791 (description "This package provides a fast markdown parser in pure
6792 Python.")
6793 (license license:bsd-3)))
6794
6795 (define-public python2-mistune
6796 (package-with-python2 python-mistune))
6797
6798 (define-public python-markdown
6799 (package
6800 (name "python-markdown")
6801 (version "3.1.1")
6802 (source
6803 (origin
6804 (method url-fetch)
6805 (uri (pypi-uri "Markdown" version))
6806 (sha256
6807 (base32
6808 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f"))))
6809 (build-system python-build-system)
6810 (native-inputs
6811 `(("python-nose" ,python-nose)
6812 ("python-pyyaml" ,python-pyyaml)))
6813 (home-page "https://python-markdown.github.io/")
6814 (synopsis "Python implementation of Markdown")
6815 (description
6816 "This package provides a Python implementation of John Gruber's
6817 Markdown. The library features international input, various Markdown
6818 extensions, and several HTML output formats. A command line wrapper
6819 markdown_py is also provided to convert Markdown files to HTML.")
6820 (license license:bsd-3)))
6821
6822 (define-public python2-markdown
6823 (package-with-python2 python-markdown))
6824
6825 (define-public python-ptyprocess
6826 (package
6827 (name "python-ptyprocess")
6828 (version "0.5.2")
6829 (source
6830 (origin
6831 (method url-fetch)
6832 (uri (pypi-uri "ptyprocess" version))
6833 (sha256
6834 (base32
6835 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6836 (build-system python-build-system)
6837 (native-inputs
6838 `(("python-nose" ,python-nose)))
6839 (arguments
6840 `(#:phases
6841 (modify-phases %standard-phases
6842 (replace 'check
6843 (lambda _ (invoke "nosetests"))))))
6844 (home-page "https://github.com/pexpect/ptyprocess")
6845 (synopsis "Run a subprocess in a pseudo terminal")
6846 (description
6847 "This package provides a Python library used to launch a subprocess in a
6848 pseudo terminal (pty), and interact with both the process and its pty.")
6849 (license license:isc)))
6850
6851 (define-public python2-ptyprocess
6852 (package-with-python2 python-ptyprocess))
6853
6854 (define-public python-cram
6855 (package
6856 (name "python-cram")
6857 (version "0.7")
6858 (home-page "https://bitheap.org/cram/")
6859 (source (origin
6860 (method url-fetch)
6861 (uri (list (string-append home-page "cram-"
6862 version ".tar.gz")
6863 (pypi-uri "cram" version)))
6864 (sha256
6865 (base32
6866 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6867 (arguments
6868 '(#:phases
6869 (modify-phases %standard-phases
6870 (add-after 'unpack 'patch-source
6871 (lambda _
6872 (substitute* (find-files "cram" ".*\\.py$")
6873 ;; Replace default shell path.
6874 (("/bin/sh") (which "sh")))
6875 (substitute* (find-files "tests" ".*\\.t$")
6876 (("md5") "md5sum")
6877 (("/bin/bash") (which "bash"))
6878 (("/bin/sh") (which "sh")))
6879 (substitute* "cram/_test.py"
6880 ;; This hack works around a bug triggered by substituting
6881 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6882 ;; "cram -h", which breaks the output at 80 characters. This
6883 ;; causes the line showing the default shell to break into two
6884 ;; lines, but the test expects a single line...
6885 (("env\\['COLUMNS'\\] = '80'")
6886 "env['COLUMNS'] = '160'"))
6887
6888 (substitute* "Makefile"
6889 ;; Recent versions of python-coverage have caused the test
6890 ;; coverage to decrease (as of version 0.7). Allow that.
6891 (("--fail-under=100")
6892 "--fail-under=90"))
6893
6894 #t))
6895 (replace 'check
6896 ;; The test phase uses the built library and executable.
6897 (lambda* (#:key inputs outputs #:allow-other-keys)
6898 (add-installed-pythonpath inputs outputs)
6899 (setenv "PATH" (string-append (getenv "PATH") ":"
6900 (assoc-ref outputs "out") "/bin"))
6901 (invoke "make" "test"))))))
6902 (build-system python-build-system)
6903 (native-inputs
6904 `(("python-coverage" ,python-coverage)
6905 ("which" ,which)))
6906 (synopsis "Simple testing framework for command line applications")
6907 (description
6908 "Cram is a functional testing framework for command line applications.
6909 Cram tests look like snippets of interactive shell sessions. Cram runs each
6910 command and compares the command output in the test with the command’s actual
6911 output.")
6912 (license license:gpl2+)))
6913
6914 (define-public python2-cram
6915 (package-with-python2 python-cram))
6916
6917 (define-public python-straight-plugin
6918 (package
6919 (name "python-straight-plugin")
6920 (version "1.4.1")
6921 (source
6922 (origin
6923 (method url-fetch)
6924 (uri (pypi-uri "straight.plugin" version))
6925 (sha256
6926 (base32
6927 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6928 (build-system python-build-system)
6929 (home-page "https://github.com/ironfroggy/straight.plugin")
6930 (synopsis "Simple namespaced plugin facility")
6931 (description "Straight Plugin provides a type of plugin you can create from
6932 almost any existing Python modules, and an easy way for outside developers to
6933 add functionality and customization to your projects with their own plugins.")
6934 (license license:expat)))
6935
6936 (define-public python2-straight-plugin
6937 (package-with-python2 python-straight-plugin))
6938
6939 (define-public python-fonttools
6940 (package
6941 (name "python-fonttools")
6942 (version "3.38.0")
6943 (source (origin
6944 (method url-fetch)
6945 (uri (pypi-uri "fonttools" version ".zip"))
6946 (sha256
6947 (base32
6948 "12ripk3s7skgxr1bs9r8n13r94ym3s8iir7ivfixls9fa4dabmlh"))))
6949 (build-system python-build-system)
6950 (native-inputs
6951 `(("unzip" ,unzip)
6952 ("python-pytest" ,python-pytest)
6953 ("python-pytest-runner" ,python-pytest-runner)))
6954 (home-page "https://github.com/behdad/fonttools")
6955 (synopsis "Tools to manipulate font files")
6956 (description
6957 "FontTools/TTX is a library to manipulate font files from Python. It
6958 supports reading and writing of TrueType/OpenType fonts, reading and writing
6959 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6960 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6961 from an XML-based format.")
6962 (license license:expat)))
6963
6964 (define-public python2-fonttools
6965 (package-with-python2 python-fonttools))
6966
6967 (define-public python-ly
6968 (package
6969 (name "python-ly")
6970 (version "0.9.5")
6971 (source
6972 (origin
6973 (method url-fetch)
6974 (uri (pypi-uri name version))
6975 (sha256
6976 (base32
6977 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6978 (build-system python-build-system)
6979 (arguments
6980 ;; FIXME: Some tests need network access.
6981 '(#:tests? #f))
6982 (synopsis "Tool and library for manipulating LilyPond files")
6983 (description "This package provides a Python library to parse, manipulate
6984 or create documents in LilyPond format. A command line program ly is also
6985 provided that can be used to do various manipulations with LilyPond files.")
6986 (home-page "https://pypi.python.org/pypi/python-ly")
6987 (license license:gpl2+)))
6988
6989 (define-public python-appdirs
6990 (package
6991 (name "python-appdirs")
6992 (version "1.4.3")
6993 (source
6994 (origin
6995 (method url-fetch)
6996 (uri (pypi-uri "appdirs" version))
6997 (sha256
6998 (base32
6999 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
7000 (build-system python-build-system)
7001 (home-page "https://github.com/ActiveState/appdirs")
7002 (synopsis
7003 "Determine platform-specific dirs, e.g. a \"user data dir\"")
7004 (description
7005 "This module provides a portable way of finding out where user data
7006 should be stored on various operating systems.")
7007 (license license:expat)))
7008
7009 (define-public python2-appdirs
7010 (package-with-python2 python-appdirs))
7011
7012 (define-public python-llfuse
7013 (package
7014 (name "python-llfuse")
7015 (version "1.3.5")
7016 (source (origin
7017 (method url-fetch)
7018 (uri (pypi-uri "llfuse" version ".tar.bz2"))
7019 (sha256
7020 (base32
7021 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
7022 (build-system python-build-system)
7023 (inputs
7024 `(("fuse" ,fuse)
7025 ("attr" ,attr)))
7026 (native-inputs
7027 `(("pkg-config" ,pkg-config)))
7028 (synopsis "Python bindings for FUSE")
7029 (description
7030 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
7031 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
7032 (license license:lgpl2.0+)
7033 (properties `((python2-variant . ,(delay python2-llfuse))))))
7034
7035 (define-public python2-llfuse
7036 (package (inherit (package-with-python2
7037 (strip-python2-variant python-llfuse)))
7038 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
7039
7040 ;; For attic-0.16
7041 (define-public python-llfuse-0.41
7042 (package (inherit python-llfuse)
7043 (version "0.41.1")
7044 (source (origin
7045 (method url-fetch)
7046 (uri (string-append
7047 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
7048 "llfuse-" version ".tar.bz2"))
7049 (sha256
7050 (base32
7051 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
7052 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
7053 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
7054 (license (list license:expat license:lgpl2.0+))))
7055
7056 (define-public python-msgpack
7057 (package
7058 (name "python-msgpack")
7059 (version "0.5.6")
7060 (source (origin
7061 (method url-fetch)
7062 (uri (pypi-uri "msgpack" version))
7063 (sha256
7064 (base32
7065 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
7066 (build-system python-build-system)
7067 (arguments
7068 `(#:modules ((guix build utils)
7069 (guix build python-build-system)
7070 (ice-9 ftw)
7071 (srfi srfi-1)
7072 (srfi srfi-26))
7073 #:phases
7074 (modify-phases %standard-phases
7075 (replace 'check
7076 (lambda _
7077 (let ((cwd (getcwd)))
7078 (setenv "PYTHONPATH"
7079 (string-append cwd "/build/"
7080 (find (cut string-prefix? "lib" <>)
7081 (scandir (string-append cwd "/build")))
7082 ":"
7083 (getenv "PYTHONPATH")))
7084 (invoke "pytest" "-v" "test")))))))
7085 (native-inputs
7086 `(("python-pytest" ,python-pytest)))
7087 (synopsis "MessagePack (de)serializer")
7088 (description "MessagePack is a fast, compact binary serialization format,
7089 suitable for similar data to JSON. This package provides CPython bindings for
7090 reading and writing MessagePack data.")
7091 (home-page "https://pypi.python.org/pypi/msgpack/")
7092 (license license:asl2.0)))
7093
7094 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
7095 ;; release 0.5. Some packages like borg still call it by the old name for now.
7096 ;; <https://bugs.gnu.org/30662>
7097 (define-public python-msgpack-transitional
7098 (package
7099 (inherit python-msgpack)
7100 (name "python-msgpack-transitional")
7101 (arguments
7102 (substitute-keyword-arguments (package-arguments python-msgpack)
7103 ((#:phases phases)
7104 `(modify-phases ,phases
7105 (add-after 'unpack 'configure-transitional
7106 (lambda _
7107 ;; Keep using the old name.
7108 (substitute* "setup.py"
7109 (("TRANSITIONAL = False")
7110 "TRANSITIONAL = 1"))
7111 #t))))))))
7112
7113 (define-public python2-msgpack
7114 (package-with-python2 python-msgpack))
7115
7116 (define-public python-netaddr
7117 (package
7118 (name "python-netaddr")
7119 (version "0.7.19")
7120 (source
7121 (origin
7122 (method url-fetch)
7123 (uri (pypi-uri "netaddr" version))
7124 (sha256
7125 (base32
7126 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
7127 (build-system python-build-system)
7128 (arguments `(#:tests? #f)) ;; No tests.
7129 (home-page "https://github.com/drkjam/netaddr/")
7130 (synopsis "Pythonic manipulation of network addresses")
7131 (description
7132 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
7133 and MAC network addresses.")
7134 (license license:bsd-3)))
7135
7136 (define-public python2-netaddr
7137 (package-with-python2 python-netaddr))
7138
7139 (define-public python2-pyroute2
7140 (package
7141 (name "python2-pyroute2")
7142 (version "0.5.6")
7143 (source
7144 (origin
7145 (method url-fetch)
7146 (uri (pypi-uri "pyroute2" version))
7147 (sha256
7148 (base32
7149 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
7150 (build-system python-build-system)
7151 (arguments
7152 `(#:python ,python-2)) ;Python 3.x is not supported
7153 (home-page "https://github.com/svinota/pyroute2")
7154 (synopsis "Python netlink library")
7155 (description
7156 "Pyroute2 is a pure Python netlink library with minimal dependencies.
7157 Supported netlink families and protocols include:
7158 @itemize
7159 @item rtnl, network settings - addresses, routes, traffic controls
7160 @item nfnetlink - netfilter API: ipset, nftables, ...
7161 @item ipq - simplest userspace packet filtering, iptables QUEUE target
7162 @item devlink - manage and monitor devlink-enabled hardware
7163 @item generic - generic netlink families
7164 @itemize
7165 @item nl80211 - wireless functions API (basic support)
7166 @item taskstats - extended process statistics
7167 @item acpi_events - ACPI events monitoring
7168 @item thermal_events - thermal events monitoring
7169 @item VFS_DQUOT - disk quota events monitoring
7170 @end itemize
7171 @end itemize")
7172 (license license:gpl2+)))
7173
7174 (define-public python-wrapt
7175 (package
7176 (name "python-wrapt")
7177 (version "1.11.2")
7178 (source
7179 (origin
7180 (method url-fetch)
7181 (uri (pypi-uri "wrapt" version))
7182 (sha256
7183 (base32
7184 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
7185 (build-system python-build-system)
7186 (arguments
7187 ;; Tests are not included in the tarball, they are only available in the
7188 ;; git repository.
7189 `(#:tests? #f))
7190 (home-page "https://github.com/GrahamDumpleton/wrapt")
7191 (synopsis "Module for decorators, wrappers and monkey patching")
7192 (description
7193 "The aim of the wrapt module is to provide a transparent object proxy for
7194 Python, which can be used as the basis for the construction of function
7195 wrappers and decorator functions.")
7196 (license license:bsd-2)))
7197
7198 (define-public python2-wrapt
7199 (package-with-python2 python-wrapt))
7200
7201 (define-public python-xlrd
7202 (package
7203 (name "python-xlrd")
7204 (version "1.0.0")
7205 (source (origin
7206 (method url-fetch)
7207 (uri (pypi-uri "xlrd" version))
7208 (sha256
7209 (base32
7210 "0s8hjiz01vbhy85xalrz0qlsmd9ypf36zjqrf97hh984spapvy0g"))))
7211 (build-system python-build-system)
7212 (arguments
7213 `(#:phases
7214 (modify-phases %standard-phases
7215 ;; Current test in setup.py does not work as of 1.0.0, so use nose to
7216 ;; run tests instead for now.
7217 (replace 'check (lambda _ (invoke "nosetests"))))))
7218 (native-inputs `(("python-nose" ,python-nose)))
7219 (home-page "http://www.python-excel.org/")
7220 (synopsis "Library for extracting data from Excel files")
7221 (description "This package provides a library to extract data from
7222 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7223 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7224 Unicode-aware. It is not intended as an end-user tool.")
7225 (license license:bsd-3)))
7226
7227 (define-public python2-xlrd
7228 (package-with-python2 python-xlrd))
7229
7230 (define-public python-prettytable
7231 (package
7232 (name "python-prettytable")
7233 (version "0.7.2")
7234 (source
7235 (origin
7236 (method url-fetch)
7237 (uri (pypi-uri "prettytable" version ".tar.bz2"))
7238 (sha256
7239 (base32
7240 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7241 (build-system python-build-system)
7242 (home-page "http://code.google.com/p/prettytable/")
7243 (synopsis "Display tabular data in an ASCII table format")
7244 (description
7245 "A library designed to represent tabular data in visually appealing ASCII
7246 tables. PrettyTable allows for selection of which columns are to be printed,
7247 independent alignment of columns (left or right justified or centred) and
7248 printing of sub-tables by specifying a row range.")
7249 (license license:bsd-3)))
7250
7251 (define-public python2-prettytable
7252 (package-with-python2 python-prettytable))
7253
7254 (define-public python-tables
7255 (package
7256 (name "python-tables")
7257 (version "3.4.4")
7258 (source
7259 (origin
7260 (method url-fetch)
7261 (uri (pypi-uri "tables" version))
7262 (sha256
7263 (base32
7264 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7265 (modules '((guix build utils)))
7266 (snippet
7267 '(begin
7268 ;; Remove pre-compiled .pyc files from source.
7269 (for-each delete-file-recursively
7270 (find-files "." "__pycache__" #:directories? #t))
7271 (for-each delete-file (find-files "." "\\.pyc$"))
7272 #t))))
7273 (build-system python-build-system)
7274 (arguments
7275 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7276 ;; or "check", so we must override the build and check phases.
7277 #:phases
7278 (modify-phases %standard-phases
7279 (add-after 'unpack 'use-gcc
7280 (lambda _
7281 (substitute* "setup.py"
7282 (("compiler = new_compiler\\(\\)" line)
7283 (string-append line
7284 "\ncompiler.set_executables(compiler='gcc',"
7285 "compiler_so='gcc',"
7286 "linker_exe='gcc',"
7287 "linker_so='gcc -shared')")))
7288 #t))
7289 (replace 'build
7290 (lambda* (#:key inputs #:allow-other-keys)
7291 (invoke "python" "setup.py" "build"
7292 (string-append "--hdf5="
7293 (assoc-ref inputs "hdf5")))))
7294 (replace 'check
7295 (lambda* (#:key inputs #:allow-other-keys)
7296 (invoke "python" "setup.py" "check"
7297 (string-append "--hdf5="
7298 (assoc-ref inputs "hdf5"))))))))
7299 (propagated-inputs
7300 `(("python-numexpr" ,python-numexpr)
7301 ("python-numpy" ,python-numpy)))
7302 (native-inputs
7303 `(("python-cython" ,python-cython)
7304 ("pkg-config" ,pkg-config)))
7305 (inputs
7306 `(("hdf5" ,hdf5)
7307 ("bzip2" ,bzip2)
7308 ("zlib" ,zlib)))
7309 (home-page "http://www.pytables.org/")
7310 (synopsis "Hierarchical datasets for Python")
7311 (description "PyTables is a package for managing hierarchical datasets and
7312 designed to efficiently cope with extremely large amounts of data.")
7313 (license license:bsd-3)))
7314
7315 (define-public python2-tables
7316 (package-with-python2 python-tables))
7317
7318 (define-public python-pyasn1
7319 (package
7320 (name "python-pyasn1")
7321 (version "0.4.3")
7322 (source
7323 (origin
7324 (method url-fetch)
7325 (uri (pypi-uri "pyasn1" version))
7326 (sha256
7327 (base32
7328 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7329 (build-system python-build-system)
7330 (home-page "http://pyasn1.sourceforge.net/")
7331 (synopsis "ASN.1 types and codecs")
7332 (description
7333 "This is an implementation of ASN.1 types and codecs in Python. It is
7334 suitable for a wide range of protocols based on the ASN.1 specification.")
7335 (license license:bsd-2)))
7336
7337 (define-public python2-pyasn1
7338 (package-with-python2 python-pyasn1))
7339
7340 (define-public python-pyasn1-modules
7341 (package
7342 (name "python-pyasn1-modules")
7343 (version "0.2.2")
7344 (source
7345 (origin
7346 (method url-fetch)
7347 (uri (pypi-uri "pyasn1-modules" version))
7348 (sha256
7349 (base32
7350 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7351 (build-system python-build-system)
7352 (propagated-inputs
7353 `(("python-pyasn1" ,python-pyasn1)))
7354 (home-page "https://sourceforge.net/projects/pyasn1/")
7355 (synopsis "ASN.1 codec implementations")
7356 (description
7357 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7358 implementations of ASN.1-based codecs and protocols.")
7359 (license license:bsd-3)))
7360
7361 (define-public python2-pyasn1-modules
7362 (package-with-python2 python-pyasn1-modules))
7363
7364 (define-public python-ipaddress
7365 (package
7366 (name "python-ipaddress")
7367 (version "1.0.22")
7368 (source (origin
7369 (method url-fetch)
7370 (uri (pypi-uri "ipaddress" version))
7371 (sha256
7372 (base32
7373 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7374 (build-system python-build-system)
7375 (home-page "https://github.com/phihag/ipaddress")
7376 (synopsis "IP address manipulation library")
7377 (description
7378 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7379 in Python. This library is used to create, poke at, and manipulate IPv4 and
7380 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7381 module to older versions of Python.")
7382 (license license:psfl)))
7383
7384 (define-public python2-ipaddress
7385 (package-with-python2 python-ipaddress))
7386
7387 (define-public python2-ipaddr
7388 (package
7389 (name "python2-ipaddr")
7390 (version "2.1.11")
7391 (source
7392 (origin
7393 (method url-fetch)
7394 (uri (pypi-uri "ipaddr" version))
7395 (sha256
7396 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7397 (build-system python-build-system)
7398 (arguments
7399 `(#:python ,python-2 ;version 2 only
7400 #:phases
7401 (modify-phases %standard-phases
7402 (replace 'check
7403 (lambda _ (invoke "python" "ipaddr_test.py"))))))
7404 (home-page "https://github.com/google/ipaddr-py")
7405 (synopsis "IP address manipulation library")
7406 (description
7407 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7408 IPv6 addresses and networks.
7409
7410 For new implementations you may prefer to use the standard module
7411 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
7412 versions of Python.")
7413 (license license:asl2.0)))
7414
7415 (define-public python-idna
7416 (package
7417 (name "python-idna")
7418 (version "2.8")
7419 (source
7420 (origin
7421 (method url-fetch)
7422 (uri (pypi-uri "idna" version))
7423 (sha256
7424 (base32
7425 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
7426 (build-system python-build-system)
7427 (home-page "https://github.com/kjd/idna")
7428 (synopsis "Internationalized domain names in applications")
7429 (description
7430 "This is a library to support the Internationalised Domain Names in
7431 Applications (IDNA) protocol as specified in RFC 5891. This version of the
7432 protocol is often referred to as “IDNA2008” and can produce different results
7433 from the earlier standard from 2003. The library is also intended to act as a
7434 suitable drop-in replacement for the “encodings.idna” module that comes with
7435 the Python standard library but currently only supports the older 2003
7436 specification.")
7437 (license license:bsd-4)))
7438
7439 (define-public python-idna-2.7
7440 (package (inherit python-idna)
7441 (version "2.7")
7442 (source (origin
7443 (method url-fetch)
7444 (uri (pypi-uri "idna" version))
7445 (sha256
7446 (base32
7447 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7448
7449
7450 (define-public python2-idna
7451 (package-with-python2 python-idna))
7452
7453 (define-public python-idna-ssl
7454 (package
7455 (name "python-idna-ssl")
7456 (version "1.0.1")
7457 (source
7458 (origin
7459 (method url-fetch)
7460 (uri (pypi-uri "idna-ssl" version))
7461 (sha256
7462 (base32
7463 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7464 (build-system python-build-system)
7465 (arguments
7466 `(#:tests? #f)) ;circular dependency with python-aiohttp
7467 (home-page "https://github.com/aio-libs/idna-ssl")
7468 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7469 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7470 domains support.")
7471 (license license:expat)))
7472
7473 (define-public python-pretend
7474 (package
7475 (name "python-pretend")
7476 (version "1.0.9")
7477 (source
7478 (origin
7479 (method url-fetch)
7480 (uri (pypi-uri "pretend" version))
7481 (sha256
7482 (base32
7483 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7484 (build-system python-build-system)
7485 (home-page "https://github.com/alex/pretend")
7486 (synopsis "Library for stubbing in Python")
7487 (description
7488 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7489 technique for writing tests. You may hear the term mixed up with mocks,
7490 fakes, or doubles. Basically, a stub is an object that returns pre-canned
7491 responses, rather than doing any computation.")
7492 (license license:bsd-3)))
7493
7494 (define-public python2-pretend
7495 (package-with-python2 python-pretend))
7496
7497 (define-public python-pip
7498 (package
7499 (name "python-pip")
7500 (version "19.2.1")
7501 (source
7502 (origin
7503 (method url-fetch)
7504 (uri (pypi-uri "pip" version))
7505 (sha256
7506 (base32
7507 "100sd12ss4mbdj5lf3wawad29cm573b27765mq098x6xhcj71395"))))
7508 (build-system python-build-system)
7509 (arguments
7510 '(#:tests? #f)) ; there are no tests in the pypi archive.
7511 (home-page "https://pip.pypa.io/")
7512 (synopsis "Package manager for Python software")
7513 (description
7514 "Pip is a package manager for Python software, that finds packages on the
7515 Python Package Index (PyPI).")
7516 (license license:expat)))
7517
7518 (define-public python2-pip
7519 (package-with-python2 python-pip))
7520
7521 (define-public python-tlsh
7522 (package
7523 (name "python-tlsh")
7524 (version "3.4.5")
7525 (home-page "https://github.com/trendmicro/tlsh")
7526 (source
7527 (origin
7528 (method git-fetch)
7529 (uri (git-reference
7530 (url "https://github.com/trendmicro/tlsh.git")
7531 (commit (string-append "v" version))))
7532 (file-name (git-file-name name version))
7533 (sha256
7534 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
7535 (build-system cmake-build-system)
7536 (arguments
7537 '(#:out-of-source? #f
7538 #:phases (modify-phases %standard-phases
7539 (replace
7540 'install
7541 (lambda* (#:key outputs #:allow-other-keys)
7542 ;; Build and install the Python bindings. The underlying
7543 ;; C++ library is apparently not meant to be installed.
7544 (let ((out (assoc-ref outputs "out")))
7545 (with-directory-excursion "py_ext"
7546 (and (system* "python" "setup.py" "build")
7547 (system* "python" "setup.py" "install"
7548 (string-append "--prefix=" out))))))))))
7549 (inputs `(("python" ,python-wrapper))) ;for the bindings
7550 (synopsis "Fuzzy matching library for Python")
7551 (description
7552 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7553 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7554 value which can be used for similarity comparisons. Similar objects have
7555 similar hash values, which allows for the detection of similar objects by
7556 comparing their hash values. The byte stream should have a sufficient amount
7557 of complexity; for example, a byte stream of identical bytes will not generate
7558 a hash value.")
7559 (license license:asl2.0)))
7560
7561 (define-public python2-tlsh
7562 (package
7563 (inherit python-tlsh)
7564 (name "python2-tlsh")
7565 (inputs `(("python" ,python-2)))))
7566
7567 (define-public python-termcolor
7568 (package
7569 (name "python-termcolor")
7570 (version "1.1.0")
7571 (source
7572 (origin
7573 (method url-fetch)
7574 (uri (pypi-uri "termcolor" version))
7575 (sha256
7576 (base32
7577 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7578 (build-system python-build-system)
7579 (arguments
7580 ;; There are no tests.
7581 `(#:tests? #f))
7582 (home-page "https://pypi.python.org/pypi/termcolor")
7583 (synopsis "ANSII Color formatting for terminal output")
7584 (description
7585 "This package provides ANSII Color formatting for output in terminals.")
7586 (license license:expat)))
7587
7588 (define-public python2-termcolor
7589 (package-with-python2 python-termcolor))
7590
7591 (define-public python-libarchive-c
7592 (package
7593 (name "python-libarchive-c")
7594 (version "2.8")
7595 (source (origin
7596 (method url-fetch)
7597 (uri (pypi-uri "libarchive-c" version))
7598 (sha256
7599 (base32
7600 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
7601 (build-system python-build-system)
7602 (arguments
7603 '(#:phases (modify-phases %standard-phases
7604 (add-before
7605 'build 'reference-libarchive
7606 (lambda* (#:key inputs #:allow-other-keys)
7607 ;; Retain the absolute file name of libarchive.so.
7608 (let ((libarchive (assoc-ref inputs "libarchive")))
7609 (substitute* "libarchive/ffi.py"
7610 (("find_library\\('archive'\\)")
7611 (string-append "'" libarchive
7612 "/lib/libarchive.so'"))))))
7613 (replace 'check
7614 (lambda _ (invoke "pytest" "-vv"))))))
7615 (native-inputs
7616 `(("python-mock" ,python-mock)
7617 ("python-pytest" ,python-pytest)))
7618 (inputs
7619 `(("libarchive" ,libarchive)))
7620 (home-page "https://github.com/Changaco/python-libarchive-c")
7621 (synopsis "Python interface to libarchive")
7622 (description
7623 "This package provides Python bindings to libarchive, a C library to
7624 access possibly compressed archives in many different formats. It uses
7625 Python's @code{ctypes} foreign function interface (FFI).")
7626 (license license:lgpl2.0+)))
7627
7628 (define-public python2-libarchive-c
7629 (package-with-python2 python-libarchive-c))
7630
7631 (define-public python-file
7632 (package
7633 (inherit file)
7634 (name "python-file")
7635 (build-system python-build-system)
7636 (arguments
7637 '(#:tests? #f ;no tests
7638 #:configure-flags '("--single-version-externally-managed" "--root=/")
7639 #:phases (modify-phases %standard-phases
7640 (add-before 'build 'change-directory
7641 (lambda _
7642 (chdir "python")
7643 #t))
7644 (add-before 'build 'set-library-file-name
7645 (lambda* (#:key inputs #:allow-other-keys)
7646 (let ((file (assoc-ref inputs "file")))
7647 (substitute* "magic.py"
7648 (("find_library\\('magic'\\)")
7649 (string-append "'" file "/lib/libmagic.so'")))
7650 #t))))))
7651 (inputs `(("file" ,file)))
7652 (native-inputs (if (%current-target-system)
7653 `(("self" ,this-package))
7654 '()))
7655 (synopsis "Python bindings to the libmagic file type guesser. Note that
7656 this module and the python-magic module both provide a \"magic.py\" file;
7657 these two modules, which are different and were developed separately, both
7658 serve the same purpose: provide Python bindings for libmagic.")))
7659
7660 (define-public python2-file
7661 (package-with-python2 python-file))
7662
7663 (define-public python-debian
7664 (package
7665 (name "python-debian")
7666 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
7667 (version "0.1.36")
7668 (source
7669 (origin
7670 ;; Use git-fetch, as pypi doesn't include test suite.
7671 (method git-fetch)
7672 (uri (git-reference
7673 (url home-page)
7674 (commit version)))
7675 (file-name (git-file-name name version))
7676 (sha256
7677 (base32
7678 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
7679 (build-system python-build-system)
7680 (arguments
7681 `(#:phases (modify-phases %standard-phases
7682 (add-after 'unpack 'remove-debian-specific-tests
7683 ;; python-apt, apt and dpkg are not yet available in guix,
7684 ;; and these tests heavily depend on them.
7685 (lambda _
7686 (delete-file "lib/debian/tests/test_deb822.py")
7687 (delete-file "lib/debian/tests/test_debfile.py")
7688 #t)))))
7689 (propagated-inputs
7690 `(("python-six" ,python-six)
7691 ("python-chardet" ,python-chardet)))
7692 (synopsis "Debian package related modules")
7693 (description
7694 ;; XXX: Use @enumerate instead of @itemize to work around
7695 ;; <http://bugs.gnu.org/21772>.
7696 "This package provides Python modules that abstract many formats of
7697 Debian-related files, such as:
7698
7699 @enumerate
7700 @item Debtags information;
7701 @item @file{debian/changelog} files;
7702 @item packages files, pdiffs;
7703 @item control files of single or multiple RFC822-style paragraphs---e.g.
7704 @file{debian/control}, @file{.changes}, @file{.dsc};
7705 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7706 contained files and meta-information.
7707 @end enumerate\n")
7708
7709 ;; Modules are either GPLv2+ or GPLv3+.
7710 (license license:gpl3+)))
7711
7712 (define-public python2-debian
7713 (package-with-python2 python-debian))
7714
7715 (define-public python-nbformat
7716 (package
7717 (name "python-nbformat")
7718 (version "4.4.0")
7719 (source
7720 (origin
7721 (method url-fetch)
7722 (uri (pypi-uri "nbformat" version))
7723 (sha256
7724 (base32
7725 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7726 (build-system python-build-system)
7727 (arguments `(#:tests? #f)) ; no test target
7728 (propagated-inputs
7729 `(("python-ipython-genutils" ,python-ipython-genutils)
7730 ("python-jsonschema" ,python-jsonschema)
7731 ("python-jupyter-core" ,python-jupyter-core)
7732 ("python-traitlets" ,python-traitlets)))
7733 (home-page "http://jupyter.org")
7734 (synopsis "Jupyter Notebook format")
7735 (description "This package provides the reference implementation of the
7736 Jupyter Notebook format and Python APIs for working with notebooks.")
7737 (license license:bsd-3)))
7738
7739 (define-public python2-nbformat
7740 (package-with-python2 python-nbformat))
7741
7742 (define-public python-bleach
7743 (package
7744 (name "python-bleach")
7745 (version "1.4.3")
7746 (source
7747 (origin
7748 (method url-fetch)
7749 (uri (pypi-uri "bleach" version))
7750 (sha256
7751 (base32
7752 "0jvg3jxrvnx7xmm9gj262v60ib452xlnwlb0navyp7jsvcd0d4qj"))))
7753 (build-system python-build-system)
7754 (propagated-inputs
7755 `(("python-html5lib" ,python-html5lib-0.9)
7756 ("python-six" ,python-six)))
7757 (native-inputs
7758 `(("python-nose" ,python-nose)))
7759 (home-page "https://github.com/jsocol/bleach")
7760 (synopsis "Whitelist-based HTML-sanitizing tool")
7761 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7762 (license license:asl2.0)))
7763
7764 (define-public python2-bleach
7765 (package-with-python2 python-bleach))
7766
7767 (define-public python-entrypoints
7768 (package
7769 (name "python-entrypoints")
7770 (version "0.3")
7771 (source
7772 (origin
7773 (method url-fetch)
7774 (uri (pypi-uri "entrypoints" version))
7775 (sha256
7776 (base32
7777 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
7778 (build-system python-build-system)
7779 ;; The package does not come with a setup.py file, so we have to generate
7780 ;; one ourselves.
7781 (arguments
7782 `(#:tests? #f
7783 #:phases
7784 (modify-phases %standard-phases
7785 (add-after 'unpack 'create-setup.py
7786 (lambda _
7787 (call-with-output-file "setup.py"
7788 (lambda (port)
7789 (format port "\
7790 from setuptools import setup
7791 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7792 " ,version))))))))
7793 (home-page "https://github.com/takluyver/entrypoints")
7794 (synopsis "Discover and load entry points from installed Python packages")
7795 (description "Entry points are a way for Python packages to advertise
7796 objects with some common interface. The most common examples are
7797 @code{console_scripts} entry points, which define shell commands by
7798 identifying a Python function to run. The @code{entrypoints} module contains
7799 functions to find and load entry points.")
7800 (license license:expat)))
7801
7802 (define-public python2-entrypoints
7803 (package-with-python2 python-entrypoints))
7804
7805 (define-public python-nbconvert
7806 (package
7807 (name "python-nbconvert")
7808 (version "5.0.0b1")
7809 (source
7810 (origin
7811 (method url-fetch)
7812 (uri (pypi-uri "nbconvert" version))
7813 (sha256
7814 (base32
7815 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7816 (build-system python-build-system)
7817 (arguments
7818 `(;; The "bdist_egg" target is disabled by default, causing the installation
7819 ;; to fail.
7820 #:configure-flags (list "bdist_egg")
7821 ;; FIXME: 5 failures, 40 errors.
7822 #:tests? #f))
7823 ;; #:phases
7824 ;; (modify-phases %standard-phases
7825 ;; (replace 'check
7826 ;; (lambda _
7827 ;; (zero? (system* "py.test" "-v")))))
7828 (native-inputs
7829 `(("python-pytest" ,python-pytest)))
7830 (propagated-inputs
7831 `(("python-bleach" ,python-bleach)
7832 ("python-entrypoints" ,python-entrypoints)
7833 ("python-jinja2" ,python-jinja2)
7834 ("python-jupyter-core" ,python-jupyter-core)
7835 ("python-mistune" ,python-mistune)
7836 ("python-nbformat" ,python-nbformat)
7837 ("python-pygments" ,python-pygments)
7838 ("python-traitlets" ,python-traitlets)))
7839 (home-page "http://jupyter.org")
7840 (synopsis "Converting Jupyter Notebooks")
7841 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7842 notebooks to various other formats via Jinja templates. It allows you to
7843 convert an @code{.ipynb} notebook file into various static formats including:
7844
7845 @enumerate
7846 @item HTML
7847 @item LaTeX
7848 @item PDF
7849 @item Reveal JS
7850 @item Markdown (md)
7851 @item ReStructured Text (rst)
7852 @item executable script
7853 @end enumerate\n")
7854 (license license:bsd-3)))
7855
7856 (define-public python2-nbconvert
7857 (package-with-python2 python-nbconvert))
7858
7859 (define-public python-notebook
7860 (package
7861 (name "python-notebook")
7862 (version "5.7.4")
7863 (source (origin
7864 (method url-fetch)
7865 (uri (pypi-uri "notebook" version))
7866 (sha256
7867 (base32
7868 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7869 (build-system python-build-system)
7870 (arguments
7871 `(#:phases
7872 (modify-phases %standard-phases
7873 (replace 'check
7874 (lambda _
7875 ;; These tests require a browser
7876 (delete-file-recursively "notebook/tests/selenium")
7877 ;; Some tests need HOME
7878 (setenv "HOME" "/tmp")
7879 ;; This file contains "warningfilters", which are not supported
7880 ;; by this version of nose.
7881 (delete-file "setup.cfg")
7882 (with-directory-excursion "/tmp"
7883 (invoke "nosetests" "-v"))
7884 #t)))))
7885 (propagated-inputs
7886 `(("python-jupyter-core" ,python-jupyter-core)
7887 ("python-nbformat" ,python-nbformat)
7888 ("python-nbconvert" ,python-nbconvert)
7889 ("python-prometheus-client" ,python-prometheus-client)
7890 ("python-send2trash" ,python-send2trash)
7891 ("python-terminado" ,python-terminado)))
7892 (native-inputs
7893 `(("python-nose" ,python-nose)
7894 ("python-sphinx" ,python-sphinx)
7895 ("python-requests" ,python-requests)))
7896 (home-page "http://jupyter.org/")
7897 (synopsis "Web-based notebook environment for interactive computing")
7898 (description
7899 "The Jupyter HTML notebook is a web-based notebook environment for
7900 interactive computing.")
7901 (properties `((python2-variant . ,(delay python2-notebook))))
7902 (license license:bsd-3)))
7903
7904 (define-public python2-notebook
7905 (let ((base (package-with-python2
7906 (strip-python2-variant python-notebook))))
7907 (package (inherit base)
7908 (native-inputs
7909 `(("python2-mock" ,python2-mock)
7910 ,@(package-native-inputs base)))
7911 (arguments
7912 (substitute-keyword-arguments (package-arguments base)
7913 ((#:phases phases)
7914 `(modify-phases ,phases
7915 (add-before 'check 'disable-test-case
7916 ;; The test requires network access to localhost. Curiously it
7917 ;; fails with Python 2 only. Simply make the test-case return
7918 ;; immediately.
7919 (lambda _
7920 (substitute*
7921 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7922 (("formats = self.nbconvert_api") "return #")))))))))))
7923
7924 (define-public python-widgetsnbextension
7925 (package
7926 (name "python-widgetsnbextension")
7927 (version "3.4.2")
7928 (source
7929 (origin
7930 (method url-fetch)
7931 (uri (pypi-uri "widgetsnbextension" version))
7932 (sha256
7933 (base32
7934 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7935 (build-system python-build-system)
7936 (propagated-inputs
7937 `(("python-ipykernel" ,python-ipykernel)
7938 ("python-notebook" ,python-notebook)))
7939 (native-inputs
7940 `(("python-certifi" ,python-certifi)
7941 ("python-nose" ,python-nose)))
7942 (home-page "https://ipython.org")
7943 (synopsis "IPython HTML widgets for Jupyter")
7944 (description "This package provides interactive HTML widgets for Jupyter
7945 notebooks.")
7946 (license license:bsd-3)))
7947
7948 (define-public python2-widgetsnbextension
7949 (package-with-python2 python-widgetsnbextension))
7950
7951 (define-public python-ipywidgets
7952 (package
7953 (name "python-ipywidgets")
7954 (version "5.2.2")
7955 (source
7956 (origin
7957 (method url-fetch)
7958 (uri (pypi-uri "ipywidgets" version))
7959 (sha256
7960 (base32
7961 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7962 (build-system python-build-system)
7963 (propagated-inputs
7964 `(("python-ipython" ,python-ipython)
7965 ("python-traitlets" ,python-traitlets)
7966 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7967 (native-inputs
7968 `(("python-nose" ,python-nose)
7969 ("python-pytest" ,python-pytest)))
7970 (home-page "https://ipython.org")
7971 (synopsis "IPython HTML widgets for Jupyter")
7972 (description "Ipywidgets are interactive HTML widgets for Jupyter
7973 notebooks and the IPython kernel. Notebooks come alive when interactive
7974 widgets are used. Users gain control of their data and can visualize changes
7975 in the data.")
7976 (license license:bsd-3)))
7977
7978 (define-public python2-ipywidgets
7979 (package-with-python2 python-ipywidgets))
7980
7981 (define-public python-jupyter-console
7982 (package
7983 (name "python-jupyter-console")
7984 (version "6.0.0")
7985 (source
7986 (origin
7987 (method url-fetch)
7988 (uri (pypi-uri "jupyter_console" version))
7989 (sha256
7990 (base32
7991 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
7992 (build-system python-build-system)
7993 (propagated-inputs
7994 `(("python-ipykernel" ,python-ipykernel)
7995 ("python-jupyter-client" ,python-jupyter-client)
7996 ("python-prompt-toolkit" ,python-prompt-toolkit)
7997 ("python-pygments" ,python-pygments)))
7998 (native-inputs
7999 `(("python-nose" ,python-nose)))
8000 (home-page "https://jupyter.org")
8001 (synopsis "Jupyter terminal console")
8002 (description "This package provides a terminal-based console frontend for
8003 Jupyter kernels. It also allows for console-based interaction with non-Python
8004 Jupyter kernels such as IJulia and IRKernel.")
8005 (license license:bsd-3)))
8006
8007 (define-public python2-jupyter-console
8008 (package
8009 (name "python2-jupyter-console")
8010 (version "5.2.0")
8011 (source
8012 (origin
8013 (method url-fetch)
8014 (uri (pypi-uri "jupyter_console" version))
8015 (sha256
8016 (base32
8017 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
8018 (build-system python-build-system)
8019 ;; Tests only run in an TTY.
8020 (arguments `(#:tests? #f))
8021 (propagated-inputs
8022 `(("python2-ipykernel" ,python2-ipykernel)
8023 ("python2-jupyter-client" ,python2-jupyter-client)
8024 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
8025 ("python2-pygments" ,python2-pygments)))
8026 (native-inputs
8027 `(("python2-nose" ,python2-nose)))
8028 (home-page "https://jupyter.org")
8029 (synopsis "Jupyter terminal console")
8030 (description "This package provides a terminal-based console frontend for
8031 Jupyter kernels. It also allows for console-based interaction with non-Python
8032 Jupyter kernels such as IJulia and IRKernel.")
8033 (license license:bsd-3)))
8034
8035 ;; The python-ipython and python-jupyter-console require each other. To get
8036 ;; the functionality in both packages working, strip down the
8037 ;; python-jupyter-console package when using it as an input to python-ipython.
8038 (define python-jupyter-console-minimal
8039 (package
8040 (inherit python-jupyter-console)
8041 (name "python-jupyter-console-minimal")
8042 (arguments
8043 (substitute-keyword-arguments
8044 (package-arguments python-jupyter-console)
8045 ((#:phases phases)
8046 `(modify-phases ,phases
8047 (add-after 'install 'delete-bin
8048 (lambda* (#:key outputs #:allow-other-keys)
8049 ;; Delete the bin files, to avoid conflicts in profiles
8050 ;; where python-ipython and python-jupyter-console are
8051 ;; both present.
8052 (delete-file-recursively
8053 (string-append
8054 (assoc-ref outputs "out") "/bin"))))))))
8055 ;; Remove the python-ipython propagated input, to avoid the cycle
8056 (propagated-inputs
8057 (alist-delete
8058 "python-ipython"
8059 (package-propagated-inputs python-jupyter-console)))))
8060
8061 (define-public python-qtconsole
8062 (package
8063 (name "python-qtconsole")
8064 (version "4.4.3")
8065 (source
8066 (origin
8067 (method url-fetch)
8068 (uri (pypi-uri "qtconsole" version))
8069 (sha256
8070 (base32
8071 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
8072 (build-system python-build-system)
8073 (arguments
8074 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
8075 ;; but we only have the LTS version 5.x. This means that there might be
8076 ;; runtime errors, but since this is a dependency of the Jupyter package,
8077 ;; and Jupyter can be used without the qtconsole we can overlook this for
8078 ;; now.
8079 `(#:tests? #f
8080 #:phases
8081 (modify-phases %standard-phases
8082 (add-before 'check 'pre-check
8083 (lambda _
8084 (setenv "QT_QPA_PLATFORM" "offscreen")
8085 #t)))))
8086 (propagated-inputs
8087 `(("python-ipykernel" ,python-ipykernel)
8088 ("python-ipython" ,python-ipython)))
8089 (native-inputs
8090 `(("python-pytest" ,python-pytest)))
8091 (home-page "http://jupyter.org")
8092 (synopsis "Jupyter Qt console")
8093 (description "This package provides a Qt-based console for Jupyter with
8094 support for rich media output.")
8095 (license license:bsd-3)))
8096
8097 (define-public python-jsbeautifier
8098 (package
8099 (name "python-jsbeautifier")
8100 (version "1.10.2")
8101 (home-page "https://github.com/beautify-web/js-beautify")
8102 (source (origin
8103 (method git-fetch)
8104 (uri (git-reference
8105 (url home-page)
8106 (commit (string-append "v" version))))
8107 (file-name (git-file-name name version))
8108 (sha256
8109 (base32
8110 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
8111 (build-system python-build-system)
8112 (arguments
8113 `(#:phases (modify-phases %standard-phases
8114 (add-after 'unpack 'chdir
8115 (lambda _
8116 ;; The upstream Git repository contains all the code,
8117 ;; but this package only builds the python code.
8118 (chdir "python")
8119 #t))
8120 (add-after 'unpack 'patch-python-six-requirements
8121 (lambda _
8122 (substitute* "python/setup.py"
8123 (("six>=1.12.0")
8124 "six>=1.11.0"))
8125 #t)))))
8126 (propagated-inputs
8127 `(("python-editorconfig" ,python-editorconfig)
8128 ("python-six" ,python-six)))
8129 (native-inputs
8130 `(("python-pytest" ,python-pytest)))
8131 (synopsis "JavaScript unobfuscator and beautifier")
8132 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
8133 popular online obfuscators.")
8134 (license license:expat)))
8135
8136 (define-public jupyter
8137 (package
8138 (name "jupyter")
8139 (version "1.0.0")
8140 (source
8141 (origin
8142 (method url-fetch)
8143 (uri (pypi-uri "jupyter" version))
8144 (sha256
8145 (base32
8146 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8147 (build-system python-build-system)
8148 (arguments '(#:tests? #f)) ; there are none.
8149 (propagated-inputs
8150 `(("python-ipykernel" ,python-ipykernel)
8151 ("python-ipywidgets" ,python-ipywidgets)
8152 ("python-jupyter-console" ,python-jupyter-console)
8153 ("python-nbconvert" ,python-nbconvert)
8154 ("python-notebook" ,python-notebook)
8155 ("python-qtconsole" ,python-qtconsole)))
8156 (native-search-paths
8157 (list (search-path-specification
8158 (variable "JUPYTER_PATH")
8159 (files '("share/jupyter")))))
8160 (home-page "https://jupyter.org")
8161 (synopsis "Web application for interactive documents")
8162 (description
8163 "The Jupyter Notebook is a web application that allows you to create and
8164 share documents that contain live code, equations, visualizations and
8165 explanatory text. Uses include: data cleaning and transformation, numerical
8166 simulation, statistical modeling, machine learning and much more.")
8167 (license license:bsd-3)))
8168
8169 (define-public python-chardet
8170 (package
8171 (name "python-chardet")
8172 (version "3.0.4")
8173 (source
8174 (origin
8175 (method url-fetch)
8176 (uri (pypi-uri "chardet" version))
8177 (sha256
8178 (base32
8179 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
8180 (native-inputs
8181 `(("python-hypothesis" ,python-hypothesis)
8182 ("python-pytest" ,python-pytest)
8183 ("python-pytest-runner" ,python-pytest-runner)))
8184 (build-system python-build-system)
8185 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
8186 (arguments `(#:tests? #f))
8187 (home-page "https://github.com/chardet/chardet")
8188 (synopsis "Universal encoding detector for Python 2 and 3")
8189 (description
8190 "This package provides @code{chardet}, a Python module that can
8191 automatically detect a wide range of file encodings.")
8192 (license license:lgpl2.1+)))
8193
8194 (define-public python2-chardet
8195 (package-with-python2 python-chardet))
8196
8197 (define-public python-docopt
8198 (package
8199 (name "python-docopt")
8200 (version "0.6.2")
8201 (source
8202 (origin
8203 (method url-fetch)
8204 ;; The release on PyPI does not include tests.
8205 (uri (string-append
8206 "https://github.com/docopt/docopt/archive/"
8207 version ".tar.gz"))
8208 (file-name (string-append name "-" version ".tar.gz"))
8209 (sha256
8210 (base32
8211 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
8212 (build-system python-build-system)
8213 (native-inputs
8214 `(("python-pytest" ,python-pytest)))
8215 (arguments
8216 `(#:phases
8217 (modify-phases %standard-phases
8218 (replace 'check
8219 (lambda _ (invoke "py.test"))))))
8220 (home-page "http://docopt.org")
8221 (synopsis "Command-line interface description language for Python")
8222 (description "This library allows the user to define a command-line
8223 interface from a program's help message rather than specifying it
8224 programmatically with command-line parsers like @code{getopt} and
8225 @code{argparse}.")
8226 (license license:expat)))
8227
8228 (define-public python2-docopt
8229 (package-with-python2 python-docopt))
8230
8231 (define-public python-pythondialog
8232 (package
8233 (name "python-pythondialog")
8234 (version "3.4.0")
8235 (source
8236 (origin
8237 (method url-fetch)
8238 (uri (pypi-uri "pythondialog" version))
8239 (sha256
8240 (base32
8241 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8242 (build-system python-build-system)
8243 (arguments
8244 `(#:phases
8245 (modify-phases %standard-phases
8246 (add-after 'unpack 'patch-path
8247 (lambda* (#:key inputs #:allow-other-keys)
8248 (let* ((dialog (assoc-ref inputs "dialog")))
8249 ;; Since this library really wants to grovel the search path, we
8250 ;; must hardcode dialog's store path into it.
8251 (substitute* "dialog.py"
8252 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8253 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8254 #t))))
8255 #:tests? #f)) ; no test suite
8256 (propagated-inputs
8257 `(("dialog" ,dialog)))
8258 (home-page "http://pythondialog.sourceforge.net/")
8259 (synopsis "Python interface to the UNIX dialog utility")
8260 (description "A Python wrapper for the dialog utility. Its purpose is to
8261 provide an easy to use, pythonic and comprehensive Python interface to dialog.
8262 This allows one to make simple text-mode user interfaces on Unix-like systems")
8263 (license license:lgpl2.1)
8264 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8265
8266 (define-public python2-pythondialog
8267 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8268 (package
8269 (inherit base)
8270 (version (package-version python-pythondialog))
8271 (source (origin
8272 (method url-fetch)
8273 (uri (pypi-uri "python2-pythondialog" version))
8274 (sha256
8275 (base32
8276 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8277
8278 (define-public python-configobj
8279 (package
8280 (name "python-configobj")
8281 (version "5.0.6")
8282 (source (origin
8283 (method url-fetch)
8284 (uri (pypi-uri "configobj" version))
8285 (sha256
8286 (base32
8287 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8288 ;; Patch setup.py so it looks for python-setuptools, which is
8289 ;; required to parse the keyword 'install_requires' in setup.py.
8290 (patches (search-patches "python-configobj-setuptools.patch"))))
8291 (build-system python-build-system)
8292 (propagated-inputs
8293 `(("python-six" ,python-six)))
8294 (synopsis "Config file reading, writing and validation")
8295 (description "ConfigObj is a simple but powerful config file reader and
8296 writer: an ini file round tripper. Its main feature is that it is very easy to
8297 use, with a straightforward programmer’s interface and a simple syntax for
8298 config files.")
8299 (home-page "https://github.com/DiffSK/configobj")
8300 (license license:bsd-3)))
8301
8302 (define-public python2-configobj
8303 (package-with-python2 python-configobj))
8304
8305 (define-public python-configargparse
8306 (package
8307 (name "python-configargparse")
8308 (version "0.14.0")
8309 (source (origin
8310 (method url-fetch)
8311 (uri (pypi-uri "ConfigArgParse" version))
8312 (sha256
8313 (base32
8314 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
8315 (build-system python-build-system)
8316 (native-inputs
8317 `(("python-pyyaml" ,python-pyyaml)))
8318 (arguments
8319 `(#:phases
8320 (modify-phases %standard-phases
8321 (replace 'check
8322 (lambda _
8323 ;; Bypass setuptools-shim because one test relies on "setup.py"
8324 ;; being the first argument passed to the python call.
8325 ;;
8326 ;; NOTE: Many tests do not run because they rely on Python's
8327 ;; built-in test.test_argparse, but we remove the unit tests from
8328 ;; our Python installation.
8329 (invoke "python" "setup.py" "test"))))))
8330 (synopsis "Replacement for argparse")
8331 (description "A drop-in replacement for argparse that allows options to also
8332 be set via config files and/or environment variables.")
8333 (home-page "https://github.com/bw2/ConfigArgParse")
8334 (license license:expat)))
8335
8336 (define-public python2-configargparse
8337 (package-with-python2 python-configargparse))
8338
8339 (define-public python-argparse-manpage
8340 (package
8341 (name "python-argparse-manpage")
8342 (version "1.1")
8343 (source
8344 (origin
8345 (method url-fetch)
8346 (uri (pypi-uri "argparse-manpage" version))
8347 (sha256
8348 (base32
8349 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8350 (build-system python-build-system)
8351 (home-page "https://github.com/praiskup/argparse-manpage")
8352 (synopsis "Build manual page from Python's ArgumentParser object")
8353 (description
8354 "This package provides tools to build manual pages from Python's
8355 @code{ArgumentParser} object.")
8356 (license license:asl2.0)))
8357
8358 (define-public python-contextlib2
8359 (package
8360 (name "python-contextlib2")
8361 (version "0.5.5")
8362 (source
8363 (origin
8364 (method url-fetch)
8365 (uri (pypi-uri "contextlib2" version))
8366 (sha256
8367 (base32
8368 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8369 (build-system python-build-system)
8370 (home-page "http://contextlib2.readthedocs.org/")
8371 (synopsis "Tools for decorators and context managers")
8372 (description "This module is primarily a backport of the Python
8373 3.2 contextlib to earlier Python versions. Like contextlib, it
8374 provides utilities for common tasks involving decorators and context
8375 managers. It also contains additional features that are not part of
8376 the standard library.")
8377 (license license:psfl)))
8378
8379 (define-public python2-contextlib2
8380 (package
8381 (name "python2-contextlib2")
8382 (version "0.5.5")
8383 (source
8384 (origin
8385 (method url-fetch)
8386 (uri (pypi-uri "contextlib2" version))
8387 (sha256
8388 (base32
8389 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8390 (build-system python-build-system)
8391 (arguments
8392 `(#:python ,python-2
8393 #:phases
8394 (modify-phases %standard-phases
8395 (replace 'check
8396 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
8397 (native-inputs
8398 `(("python2-unittest2" ,python2-unittest2)))
8399 (home-page "http://contextlib2.readthedocs.org/")
8400 (synopsis "Tools for decorators and context managers")
8401 (description "This module is primarily a backport of the Python
8402 3.2 contextlib to earlier Python versions. Like contextlib, it
8403 provides utilities for common tasks involving decorators and context
8404 managers. It also contains additional features that are not part of
8405 the standard library.")
8406 (license license:psfl)))
8407
8408 (define-public python-texttable
8409 (package
8410 (name "python-texttable")
8411 (version "0.9.1")
8412 (source
8413 (origin
8414 (method url-fetch)
8415 (uri (pypi-uri "texttable" version))
8416 (sha256
8417 (base32
8418 "0yawv64c0zbawwv6zz84whb32fnb2n9jylwjcfsrcdgh7xvl340i"))))
8419 (build-system python-build-system)
8420 (arguments '(#:tests? #f)) ; no tests
8421 (home-page "https://github.com/foutaise/texttable/")
8422 (synopsis "Python module for creating simple ASCII tables")
8423 (description "Texttable is a Python module for creating simple ASCII
8424 tables.")
8425 (license license:lgpl2.1+)))
8426
8427 (define-public python2-texttable
8428 (package-with-python2 python-texttable))
8429
8430 (define-public python-atomicwrites
8431 (package
8432 (name "python-atomicwrites")
8433 (version "1.3.0")
8434 (source (origin
8435 (method url-fetch)
8436 (uri (pypi-uri "atomicwrites" version))
8437 (sha256
8438 (base32
8439 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
8440 (build-system python-build-system)
8441 (synopsis "Atomic file writes in Python")
8442 (description "Library for atomic file writes using platform dependent tools
8443 for atomic file system operations.")
8444 (home-page "https://github.com/untitaker/python-atomicwrites")
8445 (license license:expat)))
8446
8447 (define-public python2-atomicwrites
8448 (package-with-python2 python-atomicwrites))
8449
8450 (define-public python-click-threading
8451 (package
8452 (name "python-click-threading")
8453 (version "0.4.4")
8454 (source (origin
8455 (method url-fetch)
8456 (uri (pypi-uri "click-threading" version))
8457 (sha256
8458 (base32
8459 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8460 (build-system python-build-system)
8461 (propagated-inputs
8462 `(("python-click" ,python-click)))
8463 (synopsis "Utilities for multithreading in Click")
8464 (description "This package provides utilities for multithreading in Click
8465 applications.")
8466 (home-page "https://github.com/click-contrib/click-threading")
8467 (license license:expat)))
8468
8469 (define-public python-click-log
8470 (package
8471 (name "python-click-log")
8472 (version "0.3.2")
8473 (source (origin
8474 (method url-fetch)
8475 (uri (pypi-uri "click-log" version))
8476 (sha256
8477 (base32
8478 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8479 (build-system python-build-system)
8480 (propagated-inputs
8481 `(("python-click" ,python-click)))
8482 (synopsis "Logging for click applications")
8483 (description "This package provides a Python library for logging Click
8484 applications.")
8485 (home-page "https://github.com/click-contrib/click-log")
8486 (license license:expat)))
8487
8488 (define-public python-apipkg
8489 (package
8490 (name "python-apipkg")
8491 (version "1.4")
8492 (source (origin
8493 (method url-fetch)
8494 (uri (pypi-uri "apipkg" version))
8495 (sha256
8496 (base32
8497 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8498 (build-system python-build-system)
8499 (native-inputs
8500 `(("python-pytest" ,python-pytest)))
8501 (synopsis "Namespace control and lazy-import mechanism")
8502 (description "With apipkg you can control the exported namespace of a Python
8503 package and greatly reduce the number of imports for your users. It is a small
8504 pure Python module that works on virtually all Python versions.")
8505 (home-page "https://github.com/pytest-dev/apipkg")
8506 (license license:expat)))
8507
8508 (define-public python2-apipkg
8509 (package-with-python2 python-apipkg))
8510
8511 (define-public python-execnet
8512 (package
8513 (name "python-execnet")
8514 (version "1.4.1")
8515 (source (origin
8516 (method url-fetch)
8517 (uri (pypi-uri "execnet" version))
8518 (sha256
8519 (base32
8520 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8521 (build-system python-build-system)
8522 (arguments
8523 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8524 ;; The two test failures are caused by the lack of an `ssh` executable.
8525 ;; The test suite can be run with pytest after the 'install' phase.
8526 #:tests? #f))
8527 (native-inputs
8528 `(("python-pytest" ,python-pytest)
8529 ("python-setuptools-scm" ,python-setuptools-scm)))
8530 (propagated-inputs
8531 `(("python-apipkg" ,python-apipkg)))
8532 (synopsis "Rapid multi-Python deployment")
8533 (description "Execnet provides a share-nothing model with
8534 channel-send/receive communication for distributing execution across many
8535 Python interpreters across version, platform and network barriers. It has a
8536 minimal and fast API targeting the following uses:
8537 @enumerate
8538 @item distribute tasks to (many) local or remote CPUs
8539 @item write and deploy hybrid multi-process applications
8540 @item write scripts to administer multiple environments
8541 @end enumerate")
8542 (home-page "http://codespeak.net/execnet/")
8543 (license license:expat)))
8544
8545 (define-public python2-execnet
8546 (package-with-python2 python-execnet))
8547
8548 (define-public python-icalendar
8549 (package
8550 (name "python-icalendar")
8551 (version "4.0.3")
8552 (source (origin
8553 (method url-fetch)
8554 (uri (pypi-uri "icalendar" version))
8555 (sha256
8556 (base32
8557 "0mk3dk1dxkcm46jy48v27j2w2349iv4sbimqj1yb5js43mx49hh7"))))
8558 (build-system python-build-system)
8559 (propagated-inputs
8560 `(("python-dateutil" ,python-dateutil)
8561 ("python-pytz" ,python-pytz)))
8562 (synopsis "Python library for parsing iCalendar files")
8563 (description "The icalendar package is a parser/generator of iCalendar
8564 files for use with Python.")
8565 (home-page "https://github.com/collective/icalendar")
8566 (license license:bsd-2)))
8567
8568 (define-public python-args
8569 (package
8570 (name "python-args")
8571 (version "0.1.0")
8572 (source (origin
8573 (method url-fetch)
8574 (uri (pypi-uri "args" version))
8575 (sha256
8576 (base32
8577 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8578 (build-system python-build-system)
8579 (home-page "https://github.com/kennethreitz/args")
8580 (synopsis "Command-line argument parser")
8581 (description
8582 "This library provides a Python module to parse command-line arguments.")
8583 (license license:bsd-3)))
8584
8585 (define-public python2-args
8586 (package-with-python2 python-args))
8587
8588 (define-public python-clint
8589 (package
8590 (name "python-clint")
8591 (version "0.5.1")
8592 (source (origin
8593 (method url-fetch)
8594 (uri (pypi-uri "clint" version))
8595 (sha256
8596 (base32
8597 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8598 (build-system python-build-system)
8599 (arguments
8600 '(#:phases
8601 (modify-phases %standard-phases
8602 (replace 'check
8603 (lambda _ (invoke "py.test" "-v"))))))
8604 (native-inputs
8605 `(("python-pytest" ,python-pytest)))
8606 (propagated-inputs
8607 `(("python-args" ,python-args)))
8608 (home-page "https://github.com/kennethreitz/clint")
8609 (synopsis "Command-line interface tools")
8610 (description
8611 "Clint is a Python module filled with a set of tools for developing
8612 command-line applications, including tools for colored and indented
8613 output, progress bar display, and pipes.")
8614 (license license:isc)))
8615
8616 (define-public python2-clint
8617 (package-with-python2 python-clint))
8618
8619 (define-public python-rply
8620 (package
8621 (name "python-rply")
8622 (version "0.7.5")
8623 (source (origin
8624 (method url-fetch)
8625 (uri (pypi-uri "rply" version))
8626 (sha256
8627 (base32
8628 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8629 (build-system python-build-system)
8630 (propagated-inputs
8631 `(("python-appdirs" ,python-appdirs)))
8632 (home-page "https://github.com/alex/rply")
8633 (synopsis "Parser generator for Python")
8634 (description
8635 "This package provides a pure Python based parser generator, that also
8636 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8637 with a new public API, and RPython support.")
8638 (license license:bsd-3)))
8639
8640 (define-public python2-rply
8641 (package-with-python2 python-rply))
8642
8643 (define-public python-hy
8644 (package
8645 (name "python-hy")
8646 (version "0.13.0")
8647 (source (origin
8648 (method url-fetch)
8649 (uri (pypi-uri "hy" version))
8650 (sha256
8651 (base32
8652 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
8653 (build-system python-build-system)
8654 (arguments
8655 '(#:phases
8656 (modify-phases %standard-phases
8657 (replace 'check
8658 (lambda _
8659 ;; Tests require write access to HOME.
8660 (setenv "HOME" "/tmp")
8661 (invoke "nosetests"))))))
8662 (native-inputs
8663 `(("python-coverage" ,python-coverage)
8664 ("python-nose" ,python-nose)))
8665 (propagated-inputs
8666 `(("python-astor" ,python-astor)
8667 ("python-clint" ,python-clint)
8668 ("python-rply" ,python-rply)))
8669 (home-page "http://hylang.org/")
8670 (synopsis "Lisp frontend to Python")
8671 (description
8672 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8673 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8674 Python at your fingertips, in Lisp form.")
8675 (license license:expat)))
8676
8677 (define-public python2-hy
8678 (package-with-python2 python-hy))
8679
8680 (define-public python2-functools32
8681 (package
8682 (name "python2-functools32")
8683 (version "3.2.3-2")
8684 (source
8685 (origin
8686 (method url-fetch)
8687 (uri (pypi-uri "functools32" version))
8688 (sha256
8689 (base32
8690 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8691 (build-system python-build-system)
8692 (arguments
8693 `(#:python ,python-2
8694 #:tests? #f)) ; no test target
8695 (home-page "https://github.com/MiCHiLU/python-functools32")
8696 (synopsis
8697 "Backport of the functools module from Python 3.2.3")
8698 (description
8699 "This package is a backport of the @code{functools} module from Python
8700 3.2.3 for use with older versions of Python and PyPy.")
8701 (license license:expat)))
8702
8703 (define-public python2-subprocess32
8704 (package
8705 (name "python2-subprocess32")
8706 (version "3.2.7")
8707 (source (origin
8708 (method url-fetch)
8709 (uri (pypi-uri "subprocess32" version))
8710 (sha256
8711 (base32
8712 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8713 (patches
8714 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8715 (build-system python-build-system)
8716 (arguments
8717 `(#:python ,python-2
8718 ;; The test suite fails with Python > 2.7.13:
8719 ;; import test.support
8720 ;; ImportError: No module named support
8721 #:tests? #f
8722 #:phases
8723 (modify-phases %standard-phases
8724 (add-after 'unpack 'patch-/bin/sh
8725 (lambda _
8726 (substitute* '("subprocess32.py"
8727 "test_subprocess32.py")
8728 (("/bin/sh") (which "sh")))
8729 #t)))))
8730 (home-page "https://github.com/google/python-subprocess32")
8731 (synopsis "Backport of the subprocess module from Python 3.2")
8732 (description
8733 "This is a backport of the @code{subprocess} standard library module
8734 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8735 new features. On POSIX systems it is guaranteed to be reliable when used
8736 in threaded applications. It includes timeout support from Python 3.3 but
8737 otherwise matches 3.2’s API.")
8738 (license license:psfl)))
8739
8740 (define-public python2-futures
8741 (package
8742 (name "python2-futures")
8743 (version "3.2.0")
8744 (source
8745 (origin
8746 (method url-fetch)
8747 (uri (pypi-uri "futures" version))
8748 (sha256
8749 (base32
8750 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8751 (build-system python-build-system)
8752 (arguments
8753 `(#:python ,python-2
8754 #:phases
8755 (modify-phases %standard-phases
8756 (replace 'check
8757 (lambda _
8758 (invoke "python" "test_futures.py")
8759 #t)))))
8760 (home-page "https://github.com/agronholm/pythonfutures")
8761 (synopsis
8762 "Backport of the concurrent.futures package from Python 3.2")
8763 (description
8764 "The concurrent.futures module provides a high-level interface for
8765 asynchronously executing callables. This package backports the
8766 concurrent.futures package from Python 3.2")
8767 (license license:bsd-3)))
8768
8769 (define-public python-promise
8770 (package
8771 (name "python-promise")
8772 (version "0.4.2")
8773 (source
8774 (origin
8775 (method url-fetch)
8776 (uri (pypi-uri "promise" version))
8777 (sha256
8778 (base32
8779 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8780 (build-system python-build-system)
8781 ;; Tests wants python-futures, which is a python2 only program, and
8782 ;; can't be found by python-promise at test time.
8783 (arguments `(#:tests? #f))
8784 (home-page "https://github.com/syrusakbary/promise")
8785 (synopsis "Promises/A+ implementation for Python")
8786 (description
8787 "Promises/A+ implementation for Python")
8788 (properties `((python2-variant . ,(delay python2-promise))))
8789 (license license:expat)))
8790
8791 (define-public python2-promise
8792 (let ((promise (package-with-python2
8793 (strip-python2-variant python-promise))))
8794 (package (inherit promise)
8795 (arguments (substitute-keyword-arguments (package-arguments promise)
8796 ((#:tests? _) #t)))
8797 (native-inputs
8798 `(("python2-futures" ,python2-futures)
8799 ("python2-pytest" ,python2-pytest)
8800 ,@(package-native-inputs promise))))))
8801
8802 (define-public python-progressbar33
8803 (package
8804 (name "python-progressbar33")
8805 (version "2.4")
8806 (source
8807 (origin
8808 (method url-fetch)
8809 (uri (pypi-uri "progressbar33" version))
8810 (sha256
8811 (base32
8812 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
8813 (build-system python-build-system)
8814 (home-page "http://github.com/germangh/python-progressbar")
8815 (synopsis "Text progress bar library for Python")
8816 (description
8817 "This package provides a text progress bar library for Python. This
8818 version only differs from the original @code{progressbar} package in that it
8819 uses relative package imports instead of absolute imports, which is necessary
8820 for the module to work under Python 3.3.")
8821 ;; Either or both of these licenses may be selected.
8822 (license (list license:lgpl2.1+ license:bsd-3))))
8823
8824 (define-public python-colorama
8825 (package
8826 (name "python-colorama")
8827 (version "0.3.9")
8828 (source
8829 (origin
8830 (method url-fetch)
8831 (uri (pypi-uri "colorama" version))
8832 (sha256
8833 (base32
8834 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
8835 (build-system python-build-system)
8836 (synopsis "Colored terminal text rendering for Python")
8837 (description "Colorama is a Python library for rendering colored terminal
8838 text.")
8839 (home-page "https://pypi.python.org/pypi/colorama")
8840 (license license:bsd-3)))
8841
8842 (define-public python2-colorama
8843 (package-with-python2 python-colorama))
8844
8845 (define-public python-rsa
8846 (package
8847 (name "python-rsa")
8848 (version "3.4.2")
8849 (source
8850 (origin
8851 (method url-fetch)
8852 (uri (pypi-uri "rsa" version))
8853 (sha256
8854 (base32
8855 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8856 (build-system python-build-system)
8857 (propagated-inputs
8858 `(("python-pyasn1" ,python-pyasn1)))
8859 (synopsis "Pure-Python RSA implementation")
8860 (description "Python-RSA is a pure-Python RSA implementation. It supports
8861 encryption and decryption, signing and verifying signatures, and key
8862 generation according to PKCS#1 version 1.5. It can be used as a Python
8863 library as well as on the command line.")
8864 (home-page "https://stuvel.eu/rsa")
8865 (license license:asl2.0)))
8866
8867 (define-public python2-rsa
8868 (package-with-python2 python-rsa))
8869
8870 (define-public python-pluggy
8871 (package
8872 (name "python-pluggy")
8873 (version "0.11.0")
8874 (source
8875 (origin
8876 (method url-fetch)
8877 (uri (pypi-uri "pluggy" version))
8878 (sha256
8879 (base32
8880 "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895"))))
8881 (build-system python-build-system)
8882 (native-inputs
8883 `(("python-setuptools-scm" ,python-setuptools-scm)))
8884 (synopsis "Plugin and hook calling mechanism for Python")
8885 (description "Pluggy is an extraction of the plugin manager as used by
8886 Pytest but stripped of Pytest specific details.")
8887 (home-page "https://pypi.python.org/pypi/pluggy")
8888 (license license:expat)))
8889
8890 (define-public python2-pluggy
8891 (package-with-python2 python-pluggy))
8892
8893 (define-public python-tox
8894 (package
8895 (name "python-tox")
8896 (version "2.8.1")
8897 (source
8898 (origin
8899 (method url-fetch)
8900 (uri (pypi-uri "tox" version))
8901 (sha256
8902 (base32
8903 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8904 (build-system python-build-system)
8905 (arguments
8906 ;; FIXME: Tests require pytest-timeout, which itself requires
8907 ;; pytest>=2.8.0 for installation.
8908 '(#:tests? #f))
8909 (propagated-inputs
8910 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8911 ("python-py" ,python-py)
8912 ("python-virtualenv" ,python-virtualenv)))
8913 (native-inputs
8914 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8915 ("python-pytest" ,python-pytest) ; >= 2.3.5
8916 ("python-setuptools-scm" ,python-setuptools-scm)))
8917 (home-page "http://tox.testrun.org/")
8918 (synopsis "Virtualenv-based automation of test activities")
8919 (description "Tox is a generic virtualenv management and test command line
8920 tool. It can be used to check that a package installs correctly with
8921 different Python versions and interpreters, or run tests in each type of
8922 supported environment, or act as a frontend to continuous integration
8923 servers.")
8924 (license license:expat)))
8925
8926 (define-public python2-tox
8927 (package-with-python2 python-tox))
8928
8929 (define-public python-jmespath
8930 (package
8931 (name "python-jmespath")
8932 (version "0.9.3")
8933 (source
8934 (origin
8935 (method url-fetch)
8936 (uri (pypi-uri "jmespath" version))
8937 (sha256
8938 (base32
8939 "0r7wc7fsxmlwzxx9j1j7rms06c6xs6d4sysirdhz1jk2mb4x90ba"))))
8940 (build-system python-build-system)
8941 (native-inputs
8942 `(("python-nose" ,python-nose)))
8943 (synopsis "JSON Matching Expressions")
8944 (description "JMESPath (pronounced “james path”) is a Python library that
8945 allows one to declaratively specify how to extract elements from a JSON
8946 document.")
8947 (home-page "https://github.com/jmespath/jmespath.py")
8948 (license license:expat)))
8949
8950 (define-public python2-jmespath
8951 (package-with-python2 python-jmespath))
8952
8953 (define-public python-botocore
8954 (package
8955 (name "python-botocore")
8956 (version "1.12.149")
8957 (source
8958 (origin
8959 (method url-fetch)
8960 (uri (pypi-uri "botocore" version))
8961 (sha256
8962 (base32
8963 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
8964 (build-system python-build-system)
8965 (arguments
8966 ;; FIXME: Many tests are failing.
8967 '(#:tests? #f))
8968 (propagated-inputs
8969 `(("python-dateutil" ,python-dateutil)
8970 ("python-docutils" ,python-docutils)
8971 ("python-jmespath" ,python-jmespath)))
8972 (native-inputs
8973 `(("python-mock" ,python-mock)
8974 ("python-nose" ,python-nose)
8975 ("behave" ,behave)
8976 ("python-tox" ,python-tox)
8977 ("python-urllib3" ,python-urllib3)
8978 ("python-wheel" ,python-wheel)))
8979 (home-page "https://github.com/boto/botocore")
8980 (synopsis "Low-level interface to AWS")
8981 (description "Botocore is a Python library that provides a low-level
8982 interface to the Amazon Web Services (AWS) API.")
8983 (license license:asl2.0)))
8984
8985 (define-public python2-botocore
8986 (package-with-python2 python-botocore))
8987
8988 (define-public python-xdo
8989 (package
8990 (name "python-xdo")
8991 (version "0.3")
8992 (source (origin
8993 (method url-fetch)
8994 (uri (string-append
8995 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8996 "python-xdo_" version ".orig.tar.gz"))
8997 (sha256
8998 (base32
8999 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
9000 (build-system python-build-system)
9001 (arguments
9002 '(#:phases
9003 (modify-phases %standard-phases
9004 (add-before 'install 'patch-libxdo-path
9005 ;; Hardcode the path of dynamically loaded libxdo library.
9006 (lambda* (#:key inputs #:allow-other-keys)
9007 (let ((libxdo (string-append
9008 (assoc-ref inputs "xdotool")
9009 "/lib/libxdo.so")))
9010 (substitute* "xdo/_xdo.py"
9011 (("find_library\\(\"xdo\"\\)")
9012 (simple-format #f "\"~a\"" libxdo)))
9013 #t))))
9014 #:tests? #f)) ; no tests provided
9015 (propagated-inputs
9016 `(("python-six" ,python-six)))
9017 (inputs
9018 `(("xdotool" ,xdotool)
9019 ("libX11" ,libx11)))
9020 (home-page "https://tracker.debian.org/pkg/python-xdo")
9021 (synopsis "Python library for simulating X11 keyboard/mouse input")
9022 (description "Provides bindings to libxdo for manipulating X11 via simulated
9023 input. (Note that this is mostly a legacy library; you may wish to look at
9024 python-xdo for newer bindings.)")
9025 (license license:bsd-3)))
9026
9027 (define-public python2-xdo
9028 (package-with-python2 python-xdo))
9029
9030 (define-public python-mako
9031 (package
9032 (name "python-mako")
9033 (version "1.1.0")
9034 (source
9035 (origin
9036 (method url-fetch)
9037 (uri (pypi-uri "Mako" version))
9038 (sha256
9039 (base32
9040 "0jqa3qfpykyn4fmkn0kh6043sfls7br8i2bsdbccazcvk9cijsd3"))))
9041 (build-system python-build-system)
9042 (arguments
9043 `(#:phases (modify-phases %standard-phases
9044 (replace 'check
9045 (lambda _
9046 (invoke "pytest" "-vv"))))))
9047 (propagated-inputs
9048 `(("python-markupsafe" ,python-markupsafe)))
9049 (native-inputs
9050 `(("python-mock" ,python-mock)
9051 ("python-pytest" ,python-pytest)))
9052 (home-page "https://www.makotemplates.org/")
9053 (synopsis "Templating language for Python")
9054 (description "Mako is a templating language for Python that compiles
9055 templates into Python modules.")
9056 (license license:expat)))
9057
9058 (define-public python2-mako
9059 (package-with-python2 python-mako))
9060
9061 (define-public python-waitress
9062 (package
9063 (name "python-waitress")
9064 (version "1.1.0")
9065 (source
9066 (origin
9067 (method url-fetch)
9068 (uri (pypi-uri "waitress" version))
9069 (patches (search-patches "python-waitress-fix-tests.patch"))
9070 (sha256
9071 (base32
9072 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
9073 (build-system python-build-system)
9074 (home-page "https://github.com/Pylons/waitress")
9075 (synopsis "Waitress WSGI server")
9076 (description "Waitress is meant to be a production-quality pure-Python WSGI
9077 server with very acceptable performance.")
9078 (license license:zpl2.1)))
9079
9080 (define-public python2-waitress
9081 (package-with-python2 python-waitress))
9082
9083 (define-public python-pyquery
9084 (package
9085 (name "python-pyquery")
9086 (version "1.2.17")
9087 (source
9088 (origin
9089 (method url-fetch)
9090 (uri (pypi-uri "pyquery" version))
9091 (sha256
9092 (base32
9093 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9094 (build-system python-build-system)
9095 (native-inputs
9096 `(("python-webob" ,python-webob)
9097 ("python-webtest" ,python-webtest)))
9098 (propagated-inputs
9099 `(("python-lxml" ,python-lxml)
9100 ("python-cssselect" ,python-cssselect)))
9101 (home-page "https://github.com/gawel/pyquery")
9102 (synopsis "Make jQuery-like queries on xml documents")
9103 (description "pyquery allows you to make jQuery queries on xml documents.
9104 The API is as much as possible the similar to jQuery. pyquery uses lxml for
9105 fast xml and html manipulation.")
9106 (license license:bsd-3)))
9107
9108 (define-public python-anyjson
9109 (package
9110 (name "python-anyjson")
9111 (version "0.3.3")
9112 (source
9113 (origin
9114 (method url-fetch)
9115 (uri (pypi-uri "anyjson" version))
9116 (sha256
9117 (base32
9118 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9119 (build-system python-build-system)
9120 (arguments
9121 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9122 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9123 ;; whatever) so this transformation needs to be done before the tests
9124 ;; can be run. Maybe we could add a build step to transform beforehand
9125 ;; but it could be annoying/difficult.
9126 ;; We can enable tests for the Python 2 version, though, and do below.
9127 #:tests? #f))
9128 (home-page "https://bitbucket.org/runeh/anyjson/")
9129 (synopsis
9130 "Wraps best available JSON implementation in a common interface")
9131 (description
9132 "Anyjson loads whichever is the fastest JSON module installed
9133 and provides a uniform API regardless of which JSON implementation is used.")
9134 (license license:bsd-3)
9135 (properties `((python2-variant . ,(delay python2-anyjson))))))
9136
9137 (define-public python2-anyjson
9138 (let ((anyjson (package-with-python2
9139 (strip-python2-variant python-anyjson))))
9140 (package
9141 (inherit anyjson)
9142 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9143 #:tests? #t
9144 ,@(package-arguments anyjson)))
9145 (native-inputs `(("python2-nose" ,python2-nose))))))
9146
9147 (define-public python-amqp
9148 (package
9149 (name "python-amqp")
9150 (version "2.3.2")
9151 (source
9152 (origin
9153 (method url-fetch)
9154 (uri (pypi-uri "amqp" version))
9155 (sha256
9156 (base32
9157 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
9158 (build-system python-build-system)
9159 (native-inputs
9160 `(("python-case" ,python-case)
9161 ("python-pytest-sugar" ,python-pytest-sugar)
9162 ("python-mock" ,python-mock)))
9163 (propagated-inputs
9164 `(("python-vine" ,python-vine)))
9165 (home-page "https://github.com/celery/py-amqp")
9166 (synopsis
9167 "Low-level AMQP client for Python (fork of amqplib)")
9168 (description
9169 "This is a fork of amqplib which was originally written by Barry Pederson.
9170 It is maintained by the Celery project, and used by kombu as a pure python
9171 alternative when librabbitmq is not available.")
9172 (license license:lgpl2.1+)
9173 (properties `((python2-variant . ,(delay python2-amqp))))))
9174
9175 (define-public python2-amqp
9176 (let ((amqp (package-with-python2
9177 (strip-python2-variant python-amqp))))
9178 (package
9179 (inherit amqp)
9180 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9181 ;; unmaintained. Weirdly, does not do this on the python 3
9182 ;; version?
9183 #:tests? #f
9184 ,@(package-arguments amqp))))))
9185
9186 (define-public python-txamqp
9187 (package
9188 (name "python-txamqp")
9189 (version "0.8.2")
9190 (source
9191 (origin
9192 (method url-fetch)
9193 (uri (pypi-uri "txAMQP" version))
9194 (sha256
9195 (base32
9196 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
9197 (build-system python-build-system)
9198 (propagated-inputs
9199 `(("python-six" ,python-six)
9200 ("python-twisted" ,python-twisted)))
9201 (home-page "https://github.com/txamqp/txamqp")
9202 (synopsis "Communicate with AMQP peers and brokers using Twisted")
9203 (description
9204 "This package provides a Python library for communicating with AMQP peers
9205 and brokers using the asynchronous networking framework Twisted. It contains
9206 all the necessary code to connect, send and receive messages to/from an
9207 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
9208 also includes support for using Thrift RPC over AMQP in Twisted
9209 applications.")
9210 (license license:asl2.0)))
9211
9212 (define-public python2-txamqp
9213 (package-with-python2 python-txamqp))
9214
9215 (define-public python-kombu
9216 (package
9217 (name "python-kombu")
9218 (version "4.2.2")
9219 (source
9220 (origin
9221 (method url-fetch)
9222 (uri (pypi-uri "kombu" version))
9223 (sha256
9224 (base32
9225 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
9226 (build-system python-build-system)
9227 (native-inputs
9228 `(("python-mock" ,python-mock)
9229 ("python-case" ,python-case)
9230 ("python-pyro4" ,python-pyro4)
9231 ("python-pytest-sugar" ,python-pytest-sugar)
9232 ("python-pytz" ,python-pytz)))
9233 (propagated-inputs
9234 `(("python-anyjson" ,python-anyjson)
9235 ("python-amqp" ,python-amqp)
9236 ("python-redis" ,python-redis)))
9237 (home-page "https://kombu.readthedocs.io")
9238 (synopsis "Message passing library for Python")
9239 (description "The aim of Kombu is to make messaging in Python as easy as
9240 possible by providing an idiomatic high-level interface for the AMQ protocol,
9241 and also provide proven and tested solutions to common messaging problems.
9242 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9243 message orientation, queuing, routing, reliability and security, for which the
9244 RabbitMQ messaging server is the most popular implementation.")
9245 (license license:bsd-3)
9246 (properties `((python2-variant . ,(delay python2-kombu))))))
9247
9248 (define-public python2-kombu
9249 (let ((kombu (package-with-python2
9250 (strip-python2-variant python-kombu))))
9251 (package
9252 (inherit kombu)
9253 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9254 ;; It works fine on the python3 variant.
9255 #:tests? #f
9256 ,@(package-arguments kombu)))
9257 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9258 ,@(package-native-inputs kombu))))))
9259
9260 (define-public python-billiard
9261 (package
9262 (name "python-billiard")
9263 (version "3.5.0.5")
9264 (source
9265 (origin
9266 (method url-fetch)
9267 (uri (pypi-uri "billiard" version))
9268 (sha256
9269 (base32
9270 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9271 (build-system python-build-system)
9272 (native-inputs
9273 `(("python-case" ,python-case)
9274 ("python-pytest" ,python-pytest)))
9275 (home-page "https://github.com/celery/billiard")
9276 (synopsis
9277 "Python multiprocessing fork with improvements and bugfixes")
9278 (description
9279 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9280 multiprocessing package itself is a renamed and updated version of R Oudkerk's
9281 pyprocessing package. This standalone variant is intended to be compatible with
9282 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9283 (license license:bsd-3)
9284 (properties `((python2-variant . ,(delay python2-billiard))))))
9285
9286 (define-public python2-billiard
9287 (let ((billiard (package-with-python2
9288 (strip-python2-variant python-billiard))))
9289 (package
9290 (inherit billiard)
9291 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9292 ("python2-mock" ,python2-mock)
9293 ,@(package-native-inputs billiard))))))
9294
9295 (define-public python-celery
9296 (package
9297 (name "python-celery")
9298 (version "4.2.1")
9299 (source
9300 (origin
9301 (method url-fetch)
9302 (uri (pypi-uri "celery" version))
9303 (sha256
9304 (base32
9305 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9306 (build-system python-build-system)
9307 (arguments
9308 '(;; TODO The tests fail with Python 3.7
9309 ;; https://github.com/celery/celery/issues/4849
9310 #:tests? #f
9311 #:phases
9312 (modify-phases %standard-phases
9313 (add-after 'unpack 'patch-requirements
9314 (lambda _
9315 (substitute* "requirements/test.txt"
9316 (("pytest>=3\\.0,<3\\.3")
9317 "pytest>=3.0"))
9318 #t)))))
9319 (native-inputs
9320 `(("python-case" ,python-case)
9321 ("python-pytest" ,python-pytest)))
9322 (propagated-inputs
9323 `(("python-pytz" ,python-pytz)
9324 ("python-billiard" ,python-billiard)
9325 ("python-kombu" ,python-kombu)))
9326 (home-page "https://celeryproject.org")
9327 (synopsis "Distributed Task Queue")
9328 (description "Celery is an asynchronous task queue/job queue based on
9329 distributed message passing. It is focused on real-time operation, but
9330 supports scheduling as well. The execution units, called tasks, are executed
9331 concurrently on a single or more worker servers using multiprocessing,
9332 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9333 synchronously (wait until ready).")
9334 (license license:bsd-3)
9335 (properties `((python2-variant . ,(delay python2-celery))))))
9336
9337 (define-public python2-celery
9338 (let ((celery (package-with-python2
9339 (strip-python2-variant python-celery))))
9340 (package
9341 (inherit celery)
9342 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9343 ("python2-mock" ,python2-mock)
9344 ,@(package-native-inputs celery))))))
9345
9346 (define-public python-translitcodec
9347 (package
9348 (name "python-translitcodec")
9349 (version "0.4.0")
9350 (source
9351 (origin
9352 (method url-fetch)
9353 (uri (pypi-uri "translitcodec" version))
9354 (sha256
9355 (base32
9356 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9357 (build-system python-build-system)
9358 (arguments
9359 `(#:tests? #f)) ; no tests provided
9360 (home-page
9361 "https://github.com/claudep/translitcodec")
9362 (synopsis
9363 "Unicode to 8-bit charset transliteration codec")
9364 (description
9365 "This package contains codecs for transliterating ISO 10646 texts into
9366 best-effort representations using smaller coded character sets (ASCII,
9367 ISO 8859, etc.).")
9368 (license license:expat)))
9369
9370 (define-public python2-translitcodec
9371 (package-with-python2 python-translitcodec))
9372
9373 (define-public python-editor
9374 (package
9375 (name "python-editor")
9376 (version "0.5")
9377 (source
9378 (origin
9379 (method url-fetch)
9380 (uri (pypi-uri "python-editor" version))
9381 (sha256
9382 (base32
9383 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9384 (build-system python-build-system)
9385 (home-page
9386 "https://github.com/fmoo/python-editor")
9387 (synopsis
9388 "Programmatically open an editor, capture the result")
9389 (description
9390 "python-editor is a library that provides the editor module for
9391 programmatically interfacing with your system's $EDITOR.")
9392 (license license:asl2.0)))
9393
9394 (define-public python2-editor
9395 (package-with-python2 python-editor))
9396
9397 (define-public python-vobject
9398 (package
9399 (name "python-vobject")
9400 (version "0.9.5")
9401 (source (origin
9402 (method url-fetch)
9403 (uri (pypi-uri "vobject" version))
9404 (sha256
9405 (base32
9406 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9407 (build-system python-build-system)
9408 (arguments
9409 '(;; The test suite relies on some non-portable Windows interfaces.
9410 #:tests? #f))
9411 (propagated-inputs
9412 `(("python-dateutil" ,python-dateutil)
9413 ("python-pyicu" ,python-pyicu)))
9414 (synopsis "Parse and generate vCard and vCalendar files")
9415 (description "Vobject is intended to be a full featured Python package for
9416 parsing and generating vCard and vCalendar files. Currently, iCalendar files
9417 are supported and well tested. vCard 3.0 files are supported, and all data
9418 should be imported, but only a few components are understood in a sophisticated
9419 way.")
9420 (home-page "http://eventable.github.io/vobject/")
9421 (license license:asl2.0)))
9422
9423 (define-public python2-vobject
9424 (package-with-python2 python-vobject))
9425
9426 (define-public python-munkres
9427 (package
9428 (name "python-munkres")
9429 (version "1.0.8")
9430 (source (origin
9431 (method url-fetch)
9432 (uri (pypi-uri "munkres" version))
9433 (sha256
9434 (base32
9435 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9436 (build-system python-build-system)
9437 (arguments
9438 '(#:tests? #f)) ; no test suite
9439 (home-page "http://software.clapper.org/munkres/")
9440 (synopsis "Implementation of the Munkres algorithm")
9441 (description "The Munkres module provides an implementation of the Munkres
9442 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9443 useful for solving the Assignment Problem.")
9444 (license license:bsd-3)))
9445
9446 (define-public python2-munkres
9447 (package-with-python2 python-munkres))
9448
9449 (define-public python-whoosh
9450 (package
9451 (name "python-whoosh")
9452 (version "2.7.4")
9453 (source
9454 (origin
9455 (method url-fetch)
9456 (uri (pypi-uri "Whoosh" version))
9457 (sha256
9458 (base32
9459 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9460 (build-system python-build-system)
9461 (native-inputs
9462 `(("python-pytest" ,python-pytest)))
9463 (home-page "https://bitbucket.org/mchaput/whoosh")
9464 (synopsis "Full text indexing, search, and spell checking library")
9465 (description
9466 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9467 checking library.")
9468 (license license:bsd-2)))
9469
9470 (define-public python2-whoosh
9471 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9472 (package (inherit whoosh)
9473 (propagated-inputs
9474 `(("python2-backport-ssl-match-hostname"
9475 ,python2-backport-ssl-match-hostname)
9476 ,@(package-propagated-inputs whoosh))))))
9477
9478 (define-public python-pathlib
9479 (package
9480 (name "python-pathlib")
9481 (version "1.0.1")
9482 (source (origin
9483 (method url-fetch)
9484 (uri (pypi-uri "pathlib" version))
9485 (sha256
9486 (base32
9487 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9488 (build-system python-build-system)
9489 ;; The tests depend on the internal "test" module, which does not provide
9490 ;; a stable interface.
9491 (arguments `(#:tests? #f))
9492 (home-page "https://pathlib.readthedocs.org/")
9493 (synopsis "Object-oriented file system paths")
9494 (description "Pathlib offers a set of classes to handle file system paths.
9495 It offers the following advantages over using string objects:
9496
9497 @enumerate
9498 @item No more cumbersome use of os and os.path functions. Everything can
9499 be done easily through operators, attribute accesses, and method calls.
9500 @item Embodies the semantics of different path types. For example,
9501 comparing Windows paths ignores casing.
9502 @item Well-defined semantics, eliminating any inconsistencies or
9503 ambiguities (forward vs. backward slashes, etc.).
9504 @end enumerate
9505
9506 Note: In Python 3.4, pathlib is now part of the standard library. For other
9507 Python versions please consider python-pathlib2 instead, which tracks the
9508 standard library module. This module (python-pathlib) isn't maintained
9509 anymore.")
9510 (license license:expat)))
9511
9512 (define-public python2-pathlib
9513 (package-with-python2 python-pathlib))
9514
9515 (define-public python2-pathlib2
9516 (package
9517 (name "python2-pathlib2")
9518 (version "2.3.3")
9519 (source (origin
9520 (method url-fetch)
9521 (uri (pypi-uri "pathlib2" version))
9522 (sha256
9523 (base32
9524 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
9525 (build-system python-build-system)
9526 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9527 ;; version is 3.4 which already includes this package as part of the
9528 ;; standard library.
9529 (arguments
9530 `(#:python ,python-2))
9531 (propagated-inputs
9532 `(("python2-scandir" ,python2-scandir)
9533 ("python2-six" ,python2-six)))
9534 (home-page "https://pypi.python.org/pypi/pathlib2/")
9535 (synopsis "Object-oriented file system paths - backport of standard
9536 pathlib module")
9537 (description "The goal of pathlib2 is to provide a backport of standard
9538 pathlib module which tracks the standard library module, so all the newest
9539 features of the standard pathlib can be used also on older Python versions.
9540
9541 Pathlib offers a set of classes to handle file system paths. It offers the
9542 following advantages over using string objects:
9543
9544 @enumerate
9545 @item No more cumbersome use of os and os.path functions. Everything can
9546 be done easily through operators, attribute accesses, and method calls.
9547 @item Embodies the semantics of different path types. For example,
9548 comparing Windows paths ignores casing.
9549 @item Well-defined semantics, eliminating any inconsistencies or
9550 ambiguities (forward vs. backward slashes, etc.).
9551 @end enumerate")
9552 (license license:expat)))
9553
9554 (define-public python2-pathlib2-bootstrap
9555 (hidden-package
9556 (package
9557 (inherit python2-pathlib2)
9558 (name "python2-pathlib2-bootstrap")
9559 (propagated-inputs
9560 `(("python2-scandir" ,python2-scandir)
9561 ("python2-six" ,python2-six-bootstrap))))))
9562
9563 (define-public python-jellyfish
9564 (package
9565 (name "python-jellyfish")
9566 (version "0.5.6")
9567 (source (origin
9568 (method url-fetch)
9569 (uri (pypi-uri "jellyfish" version))
9570 (sha256
9571 (base32
9572 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9573 (build-system python-build-system)
9574 (native-inputs
9575 `(("python-pytest" ,python-pytest)))
9576 (home-page "https://github.com/jamesturk/jellyfish")
9577 (synopsis "Approximate and phonetic matching of strings")
9578 (description "Jellyfish uses a variety of string comparison and phonetic
9579 encoding algorithms to do fuzzy string matching.")
9580 (license license:bsd-2)
9581 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9582
9583 (define-public python2-jellyfish
9584 (let ((jellyfish (package-with-python2
9585 (strip-python2-variant python-jellyfish))))
9586 (package (inherit jellyfish)
9587 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9588 ,@(package-native-inputs jellyfish))))))
9589
9590 (define-public python2-unicodecsv
9591 (package
9592 (name "python2-unicodecsv")
9593 (version "0.14.1")
9594 (source (origin
9595 (method url-fetch)
9596 ;; The test suite is not included in the PyPi release.
9597 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9598 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9599 "archive/" version ".tar.gz"))
9600 (file-name (string-append name "-" version ".tar.gz"))
9601 (sha256
9602 (base32
9603 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9604 (build-system python-build-system)
9605 (arguments
9606 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9607 #:python ,python-2))
9608 (native-inputs
9609 `(("python2-unittest2" ,python2-unittest2)))
9610 (home-page "https://github.com/jdunck/python-unicodecsv")
9611 (synopsis "Unicode CSV module for Python 2")
9612 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9613 module, adding support for Unicode strings.")
9614 (license license:bsd-2)))
9615
9616 (define-public python-rarfile
9617 (package
9618 (name "python-rarfile")
9619 (version "2.8")
9620 (source (origin
9621 (method url-fetch)
9622 (uri (pypi-uri "rarfile" version))
9623 (sha256
9624 (base32
9625 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9626 (build-system python-build-system)
9627 (arguments
9628 '(#:phases
9629 (modify-phases %standard-phases
9630 (replace 'check
9631 ;; Many tests fail, but the installation proceeds.
9632 (lambda _ (invoke "make" "-C" "test" "test"))))))
9633 (native-inputs
9634 `(("which" ,which))) ; required for tests
9635 (propagated-inputs
9636 `(("libarchive" ,libarchive)))
9637 (home-page "https://github.com/markokr/rarfile")
9638 (synopsis "RAR archive reader for Python")
9639 (description "This is Python module for RAR archive reading. The interface
9640 is made as zipfile like as possible.")
9641 (license license:isc)))
9642
9643 (define-public python2-rarfile
9644 (package-with-python2 python-rarfile))
9645
9646 (define-public python-magic
9647 (package
9648 (name "python-magic")
9649 (version "0.4.15")
9650 (source
9651 (origin
9652 (method url-fetch)
9653 (uri (pypi-uri "python-magic" version))
9654 (sha256
9655 (base32
9656 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9657 (file-name (string-append name "-" version "-checkout"))))
9658 (build-system python-build-system)
9659 (arguments
9660 ;; The tests are unreliable, so don't run them. The tests fail
9661 ;; under Python3 because they were written for Python2 and
9662 ;; contain import statements that do not work in Python3. One of
9663 ;; the tests fails under Python2 because its assertions are
9664 ;; overly stringent; it relies on comparing output strings which
9665 ;; are brittle and can change depending on the version of
9666 ;; libmagic being used and the system on which the test is
9667 ;; running. In my case, under GuixSD 0.10.0, only one test
9668 ;; failed, and it seems to have failed only because the version
9669 ;; of libmagic that is packaged in Guix outputs a slightly
9670 ;; different (but not wrong) string than the one that the test
9671 ;; expected.
9672 '(#:tests? #f
9673 #:phases (modify-phases %standard-phases
9674 ;; Replace a specific method call with a hard-coded
9675 ;; path to the necessary libmagic.so file in the
9676 ;; store. If we don't do this, then the method call
9677 ;; will fail to find the libmagic.so file, which in
9678 ;; turn will cause any application using
9679 ;; python-magic to fail.
9680 (add-before 'build 'hard-code-path-to-libmagic
9681 (lambda* (#:key inputs #:allow-other-keys)
9682 (let ((file (assoc-ref inputs "file")))
9683 (substitute* "magic.py"
9684 (("ctypes.util.find_library\\('magic'\\)")
9685 (string-append "'" file "/lib/libmagic.so'")))
9686 #t)))
9687 (add-before 'install 'disable-egg-compression
9688 (lambda _
9689 (let ((port (open-file "setup.cfg" "a")))
9690 (display "\n[easy_install]\nzip_ok = 0\n"
9691 port)
9692 (close-port port)
9693 #t))))))
9694 (inputs
9695 ;; python-magic needs to be able to find libmagic.so.
9696 `(("file" ,file)))
9697 (home-page
9698 "https://github.com/ahupp/python-magic")
9699 (synopsis
9700 "File type identification using libmagic")
9701 (description
9702 "This module uses ctypes to access the libmagic file type
9703 identification library. It makes use of the local magic database and
9704 supports both textual and MIME-type output. Note that this module and
9705 the python-file module both provide a \"magic.py\" file; these two
9706 modules, which are different and were developed separately, both serve
9707 the same purpose: to provide Python bindings for libmagic.")
9708 (license license:expat)))
9709
9710 (define-public python2-magic
9711 (package-with-python2 python-magic))
9712
9713 (define-public python2-s3cmd
9714 (package
9715 (name "python2-s3cmd")
9716 (version "1.6.1")
9717 (source
9718 (origin
9719 (method url-fetch)
9720 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9721 "s3cmd-" version ".tar.gz"))
9722 (sha256
9723 (base32
9724 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9725 (build-system python-build-system)
9726 (arguments
9727 ;; s3cmd is written for python2 only and contains no tests.
9728 `(#:python ,python-2
9729 #:tests? #f))
9730 (propagated-inputs
9731 `(("python2-dateutil" ,python2-dateutil)
9732 ;; The python-file package also provides a magic.py module.
9733 ;; This is an unfortunate state of affairs; however, s3cmd
9734 ;; fails to install if it cannot find specifically the
9735 ;; python-magic package. Thus we include it, instead of using
9736 ;; python-file. Ironically, s3cmd sometimes works better
9737 ;; without libmagic bindings at all:
9738 ;; https://github.com/s3tools/s3cmd/issues/198
9739 ("python2-magic" ,python2-magic)))
9740 (home-page "http://s3tools.org/s3cmd")
9741 (synopsis "Command line tool for S3-compatible storage services")
9742 (description
9743 "S3cmd is a command line tool for uploading, retrieving and managing data
9744 in storage services that are compatible with the Amazon Simple Storage
9745 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9746 GnuPG encryption, and more. It also supports management of Amazon's
9747 CloudFront content delivery network.")
9748 (license license:gpl2+)))
9749
9750 (define-public python-pkgconfig
9751 (package
9752 (name "python-pkgconfig")
9753 (version "1.3.1")
9754 (source
9755 (origin
9756 (method url-fetch)
9757 (uri (pypi-uri "pkgconfig" version))
9758 (sha256
9759 (base32
9760 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9761 (build-system python-build-system)
9762 (native-inputs
9763 `(("python-nose" ,python-nose)))
9764 (inputs
9765 `(("pkg-config" ,pkg-config)))
9766 (arguments
9767 `(#:phases
9768 (modify-phases %standard-phases
9769 (add-before 'build 'patch
9770 ;; Hard-code the path to pkg-config.
9771 (lambda _
9772 (substitute* "pkgconfig/pkgconfig.py"
9773 (("cmd = 'pkg-config")
9774 (string-append "cmd = '" (which "pkg-config"))))
9775 #t))
9776 (replace 'check
9777 (lambda _
9778 (invoke "nosetests" "test.py"))))))
9779 (home-page "https://github.com/matze/pkgconfig")
9780 (synopsis "Python interface for pkg-config")
9781 (description "This module provides a Python interface to pkg-config. It
9782 can be used to find all pkg-config packages, check if a package exists,
9783 check if a package meets certain version requirements, query CFLAGS and
9784 LDFLAGS and parse the output to build extensions with setup.py.")
9785 (license license:expat)))
9786
9787 (define-public python2-pkgconfig
9788 (package-with-python2 python-pkgconfig))
9789
9790 (define-public python-bz2file
9791 (package
9792 (name "python-bz2file")
9793 (version "0.98")
9794 (source
9795 (origin
9796 (method url-fetch)
9797 (uri (pypi-uri "bz2file" version))
9798 (sha256
9799 (base32
9800 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9801 (build-system python-build-system)
9802 (arguments
9803 `(#:tests? #f)) ; Tests use deprecated python modules.
9804 (home-page "https://github.com/nvawda/bz2file")
9805 (synopsis "Read and write bzip2-compressed files")
9806 (description
9807 "Bz2file is a Python library for reading and writing bzip2-compressed
9808 files. It contains a drop-in replacement for the I/O interface in the
9809 standard library's @code{bz2} module, including features from the latest
9810 development version of CPython that are not available in older releases.")
9811 (license license:asl2.0)))
9812
9813 (define-public python2-bz2file
9814 (package-with-python2 python-bz2file))
9815
9816 (define-public python-future
9817 (package
9818 (name "python-future")
9819 (version "0.17.1")
9820 (source
9821 (origin
9822 (method url-fetch)
9823 (uri (pypi-uri "future" version))
9824 (sha256
9825 (base32
9826 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
9827 (build-system python-build-system)
9828 ;; Many tests connect to the network or are otherwise flawed.
9829 ;; https://github.com/PythonCharmers/python-future/issues/210
9830 (arguments
9831 `(#:tests? #f))
9832 (home-page "http://python-future.org")
9833 (synopsis "Single-source support for Python 3 and 2")
9834 (description
9835 "@code{python-future} is the missing compatibility layer between Python 2 and
9836 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9837 to support both Python 2 and Python 3 with minimal overhead.")
9838 (license license:expat)))
9839
9840 (define-public python2-future
9841 (package-with-python2 python-future))
9842
9843 (define-public python-cysignals
9844 (package
9845 (name "python-cysignals")
9846 (version "1.9.0")
9847 (source
9848 (origin
9849 (method url-fetch)
9850 (uri (pypi-uri "cysignals" version))
9851 (sha256
9852 (base32
9853 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
9854 (build-system python-build-system)
9855 (native-inputs
9856 `(("python-cython" ,python-cython)
9857 ("python-sphinx" ,python-sphinx)))
9858 (inputs
9859 `(("pari-gp" ,pari-gp)))
9860 (arguments
9861 `(#:modules ((guix build python-build-system)
9862 ((guix build gnu-build-system) #:prefix gnu:)
9863 (guix build utils))
9864 ;; FIXME: Tests are executed after installation and currently fail
9865 ;; when not installing into standard locations; the author is working
9866 ;; on a fix.
9867 #:tests? #f
9868 #:phases
9869 (modify-phases %standard-phases
9870 (add-before
9871 'build 'configure
9872 (assoc-ref gnu:%standard-phases 'configure)))))
9873 (home-page
9874 "https://github.com/sagemath/cysignals")
9875 (synopsis
9876 "Handling of interrupts and signals for Cython")
9877 (description
9878 "The cysignals package provides mechanisms to handle interrupts (and
9879 other signals and errors) in Cython code, using two related approaches,
9880 for mixed Cython/Python code or external C libraries and pure Cython code,
9881 respectively.")
9882 (license license:lgpl3+)))
9883
9884 (define-public python2-cysignals
9885 (package-with-python2 python-cysignals))
9886
9887 (define-public python2-shedskin
9888 (package
9889 (name "python2-shedskin")
9890 (version "0.9.4")
9891 (source
9892 (origin
9893 (method url-fetch)
9894 (uri (string-append "https://github.com/shedskin/shedskin/"
9895 "releases/download/v" version
9896 "/shedskin-" version ".tgz"))
9897 (sha256
9898 (base32
9899 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9900 (build-system python-build-system)
9901 (arguments
9902 `(#:python ,python-2
9903 #:phases (modify-phases %standard-phases
9904 (add-after 'unpack 'fix-resulting-include-libs
9905 (lambda* (#:key inputs #:allow-other-keys)
9906 (let ((libgc (assoc-ref inputs "libgc"))
9907 (pcre (assoc-ref inputs "pcre")))
9908 (substitute* "shedskin/makefile.py"
9909 (("variable == 'CCFLAGS':[ ]*")
9910 (string-append "variable == 'CCFLAGS':\n"
9911 " line += ' -I " pcre "/include"
9912 " -I " libgc "/include'"))
9913 (("variable == 'LFLAGS':[ ]*")
9914 (string-append "variable == 'LFLAGS':\n"
9915 " line += ' -L" pcre "/lib"
9916 " -L " libgc "/lib'")))
9917 #t))))))
9918 (inputs `(("pcre" ,pcre)
9919 ("libgc" ,libgc)))
9920 (home-page "https://shedskin.github.io/")
9921 (synopsis "Experimental Python-2 to C++ Compiler")
9922 (description (string-append "This is an experimental compiler for a subset of
9923 Python. It generates C++ code and a Makefile."))
9924 (license (list license:gpl3 license:bsd-3 license:expat))))
9925
9926 (define-public python2-rope
9927 (package
9928 (name "python2-rope")
9929 (version "0.11.0")
9930 (source
9931 (origin
9932 (method url-fetch)
9933 (uri (pypi-uri "rope" version))
9934 (sha256
9935 (base32
9936 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
9937 (arguments
9938 ;; Rope has only partial python3 support, see `python-rope'
9939 `(#:python ,python-2))
9940 (build-system python-build-system)
9941 (native-inputs
9942 `(("python2-unittest2" ,python2-unittest2)))
9943 (home-page "https://github.com/python-rope/rope")
9944 (synopsis "Refactoring library for Python")
9945 (description "Rope is a refactoring library for Python. It facilitates
9946 the renaming, moving and extracting of attributes, functions, modules, fields
9947 and parameters in Python 2 source code. These refactorings can also be applied
9948 to occurrences in strings and comments.")
9949 (license license:gpl2)))
9950
9951 (define-public python-rope
9952 (package
9953 (inherit python2-rope)
9954 (name "python-rope")
9955 (arguments `(#:python ,python-wrapper
9956 ;; XXX: Only partial python3 support, results in some failing
9957 ;; tests: <https://github.com/python-rope/rope/issues/247>.
9958 #:tests? #f))
9959 (properties `((python2-variant . ,(delay python2-rope))))))
9960
9961 (define-public python-py3status
9962 (package
9963 (name "python-py3status")
9964 (version "3.16")
9965 (source
9966 (origin
9967 (method url-fetch)
9968 (uri (pypi-uri "py3status" version))
9969 (sha256
9970 (base32
9971 "1xrfph277bgjln3jbpzpgkhxad04fjvj7s3xfil42q1sxi4s3q3g"))))
9972 (build-system python-build-system)
9973 (inputs
9974 `(("file" ,file)))
9975 (arguments
9976 '(#:phases
9977 (modify-phases %standard-phases
9978 ;; 'file' is used for detection of configuration file encoding
9979 ;; let's make link the dependency to particular input
9980 (add-before 'build 'patch-file-path
9981 (lambda* (#:key inputs #:allow-other-keys)
9982 (let ((file-path (assoc-ref inputs "file")))
9983 (substitute* "py3status/parse_config.py"
9984 (("\\['file', '-b'")
9985 (string-append "['" file-path "/bin/file', '-b'")))
9986 #t))))
9987 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9988 (home-page "https://github.com/ultrabug/py3status")
9989 (synopsis "Extensible i3status wrapper written in Python")
9990 (description "py3status is an i3status wrapper which extends i3status
9991 functionality in a modular way, allowing you to extend your panel with your
9992 own code, responding to click events and updating clock every second.")
9993 (license license:bsd-3)))
9994
9995 (define-public python-tblib
9996 (package
9997 (name "python-tblib")
9998 (version "1.3.2")
9999 (source (origin
10000 (method url-fetch)
10001 (uri (pypi-uri "tblib" version))
10002 (sha256 (base32
10003 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
10004 (build-system python-build-system)
10005 (arguments
10006 `(#:phases
10007 (modify-phases %standard-phases
10008 (add-before 'check 'adjust-tests
10009 (lambda _
10010 (when (which "python3")
10011 ;; Adjust the example output to match that of Python 3.7:
10012 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
10013 (substitute* "README.rst"
10014 (("Exception\\('fail',") "Exception('fail'"))
10015 #t)))
10016 (replace 'check
10017 (lambda _
10018 ;; Upstream runs tests after installation and the package itself
10019 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
10020 ;; found.
10021 (setenv "PYTHONPATH"
10022 (string-append (getcwd) "/build/lib:"
10023 (getenv "PYTHONPATH")))
10024 (invoke "py.test" "-vv" "tests" "README.rst"))))))
10025 (native-inputs
10026 `(("python-pytest" ,python-pytest)
10027 ("python-six" ,python-six)))
10028 (home-page "https://github.com/ionelmc/python-tblib")
10029 (synopsis "Traceback serialization library")
10030 (description
10031 "Traceback serialization allows you to:
10032
10033 @enumerate
10034 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
10035 different processes. This allows better error handling when running code over
10036 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
10037
10038 @item Parse traceback strings and raise with the parsed tracebacks.
10039 @end enumerate\n")
10040 (license license:bsd-3)))
10041
10042 (define-public python2-tblib
10043 (package-with-python2 python-tblib))
10044
10045 (define-public python-greenlet
10046 (package
10047 (name "python-greenlet")
10048 (version "0.4.15")
10049 (source (origin
10050 (method url-fetch)
10051 (uri (pypi-uri "greenlet" version))
10052 (sha256
10053 (base32
10054 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
10055 (build-system python-build-system)
10056 (home-page "https://greenlet.readthedocs.io/")
10057 (synopsis "Lightweight in-process concurrent programming")
10058 (description
10059 "Greenlet package is a spin-off of Stackless, a version of CPython
10060 that supports micro-threads called \"tasklets\". Tasklets run
10061 pseudo-concurrently (typically in a single or a few OS-level threads) and
10062 are synchronized with data exchanges on \"channels\".")
10063 (license (list license:psfl license:expat))))
10064
10065 (define-public python2-greenlet
10066 (package-with-python2 python-greenlet))
10067
10068 (define-public python-objgraph
10069 (package
10070 (name "python-objgraph")
10071 (version "3.4.0")
10072 (source
10073 (origin
10074 (method url-fetch)
10075 (uri (pypi-uri "objgraph" version))
10076 (sha256
10077 (base32
10078 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
10079 (build-system python-build-system)
10080 (propagated-inputs
10081 `(("python-graphviz" ,python-graphviz)))
10082 (native-inputs
10083 `(("python-mock" ,python-mock)
10084 ("graphviz" ,graphviz)))
10085 (home-page "https://mg.pov.lt/objgraph/")
10086 (synopsis "Draw Python object reference graphs with graphviz")
10087 (description
10088 "This package provides tools to draw Python object reference graphs with
10089 graphviz.")
10090 (license license:expat)))
10091
10092 (define-public python-gevent
10093 (package
10094 (name "python-gevent")
10095 (version "1.3.7")
10096 (source (origin
10097 (method url-fetch)
10098 (uri (pypi-uri "gevent" version))
10099 (sha256
10100 (base32
10101 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
10102 (modules '((guix build utils)))
10103 (snippet
10104 '(begin
10105 ;; unbunding libev and c-ares
10106 (delete-file-recursively "deps")
10107 #t))))
10108 (build-system python-build-system)
10109 (arguments
10110 `(#:modules ((ice-9 ftw)
10111 (ice-9 match)
10112 (srfi srfi-26)
10113 (guix build utils)
10114 (guix build python-build-system))
10115 #:phases (modify-phases %standard-phases
10116 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
10117 (lambda _
10118 (substitute* "src/gevent/subprocess.py"
10119 (("/bin/sh") (which "sh")))
10120 (for-each (lambda (file)
10121 (substitute* file
10122 (("/bin/sh") (which "sh"))
10123 (("/bin/true") (which "true"))))
10124 (find-files "src/greentest" "\\.py$"))
10125 #t))
10126 (add-before 'build 'do-not-use-bundled-sources
10127 (lambda* (#:key inputs #:allow-other-keys)
10128 (setenv "CONFIG_SHELL" (which "bash"))
10129 (setenv "LIBEV_EMBED" "false")
10130 (setenv "CARES_EMBED" "false")
10131 (setenv "EMBED" "false")
10132
10133 ;; Prevent building bundled libev.
10134 (substitute* "setup.py"
10135 (("run_make=_BUILDING")
10136 "run_make=False"))
10137
10138 (let ((greenlet (string-append
10139 (assoc-ref inputs "python-greenlet")
10140 "/include")))
10141 (match (scandir greenlet
10142 (lambda (item)
10143 (string-prefix? "python" item)))
10144 ((python)
10145 (setenv "C_INCLUDE_PATH"
10146 (string-append greenlet "/" python)))))
10147 #t))
10148 (add-before 'check 'skip-timer-test
10149 (lambda _
10150 ;; XXX: Skip 'TestTimerResolution', which appears to be
10151 ;; unreliable.
10152 (substitute* "src/greentest/test__core_timer.py"
10153 (("not greentest.RUNNING_ON_CI") "False"))
10154 #t))
10155 (replace 'check
10156 (lambda _
10157 ;; Make sure the build directory is on PYTHONPATH.
10158 (setenv "PYTHONPATH"
10159 (string-append
10160 (getenv "PYTHONPATH") ":"
10161 (getcwd) "/build/"
10162 (car (scandir "build" (cut string-prefix? "lib." <>)))))
10163 (with-directory-excursion "src/greentest"
10164 ;; XXX: Many tests require network access. Instead we only
10165 ;; run known-good tests. Unfortunately we cannot use
10166 ;; recursion here since this directory also contains
10167 ;; Python-version-specific subfolders.
10168 (apply invoke "python" "testrunner.py" "--config"
10169 "known_failures.py"
10170 (scandir "." (cut regexp-exec
10171 (make-regexp "test_+(subprocess|core)")
10172 <>)))))))))
10173 (propagated-inputs
10174 `(("python-greenlet" ,python-greenlet)
10175 ("python-objgraph" ,python-objgraph)))
10176 (native-inputs
10177 `(("python-six" ,python-six)))
10178 (inputs
10179 `(("c-ares" ,c-ares)
10180 ("libev" ,libev)))
10181 (home-page "http://www.gevent.org/")
10182 (synopsis "Coroutine-based network library")
10183 (description
10184 "gevent is a coroutine-based Python networking library that uses greenlet
10185 to provide a high-level synchronous API on top of the libev event loop.")
10186 (license license:expat)
10187 (properties `((python2-variant . ,(delay python2-gevent))))))
10188
10189 (define-public python2-gevent
10190 (let ((base (package-with-python2
10191 (strip-python2-variant python-gevent))))
10192 (package
10193 (inherit base)
10194 (native-inputs `(,@(package-native-inputs python-gevent)
10195 ("python-mock" ,python2-mock))))))
10196
10197 (define-public python-fastimport
10198 (package
10199 (name "python-fastimport")
10200 (version "0.9.6")
10201 (source
10202 (origin
10203 (method url-fetch)
10204 (uri (pypi-uri "fastimport" version))
10205 (sha256
10206 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10207 (build-system python-build-system)
10208 (home-page "https://github.com/jelmer/python-fastimport")
10209 (synopsis "VCS fastimport parser and generator in Python")
10210 (description "This package provides a parser for and generator of the Git
10211 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
10212 format.")
10213 (license license:gpl2+)))
10214
10215 (define-public python2-fastimport
10216 (package-with-python2 python-fastimport))
10217
10218 (define-public python-twisted
10219 (package
10220 (name "python-twisted")
10221 (version "19.7.0")
10222 (source (origin
10223 (method url-fetch)
10224 (uri (pypi-uri "Twisted" version ".tar.bz2"))
10225 (sha256
10226 (base32
10227 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
10228 (build-system python-build-system)
10229 (arguments
10230 '(#:tests? #f)) ; FIXME: some tests fail
10231 (propagated-inputs
10232 `(("python-zope-interface" ,python-zope-interface)
10233 ("python-pyhamcrest" ,python-pyhamcrest)
10234 ("python-incremental" ,python-incremental)
10235 ("python-hyperlink" ,python-hyperlink)
10236 ("python-constantly" ,python-constantly)
10237 ("python-automat" ,python-automat)))
10238 (home-page "https://twistedmatrix.com/")
10239 (synopsis "Asynchronous networking framework written in Python")
10240 (description
10241 "Twisted is an extensible framework for Python programming, with special
10242 focus on event-based network programming and multiprotocol integration.")
10243 (license license:expat)))
10244
10245 (define-public python2-twisted
10246 (package-with-python2 python-twisted))
10247
10248 (define-public python-pika
10249 (package
10250 (name "python-pika")
10251 (version "0.12.0")
10252 (source
10253 (origin
10254 (method url-fetch)
10255 (uri (pypi-uri "pika" version))
10256 (sha256
10257 (base32
10258 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10259 (build-system python-build-system)
10260 (native-inputs
10261 `(("python-pyev" ,python-pyev)
10262 ("python-tornado" ,python-tornado)
10263 ("python-twisted" ,python-twisted)))
10264 (home-page "https://pika.readthedocs.org")
10265 (synopsis "Pure Python AMQP Client Library")
10266 (description
10267 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10268 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10269 network support library.")
10270 (license license:bsd-3)))
10271
10272 (define-public python2-pika
10273 (package-with-python2 python-pika))
10274
10275 (define-public python-ply
10276 (package
10277 (name "python-ply")
10278 (version "3.10")
10279 (source
10280 (origin
10281 (method url-fetch)
10282 (uri (pypi-uri "ply" version))
10283 (sha256
10284 (base32
10285 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10286 (build-system python-build-system)
10287 (home-page "http://www.dabeaz.com/ply/")
10288 (synopsis "Python Lex & Yacc")
10289 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10290 It uses LR parsing and does extensive error checking.")
10291 (license license:bsd-3)))
10292
10293 (define-public python2-ply
10294 (package-with-python2 python-ply))
10295
10296 (define-public python-tabulate
10297 (package
10298 (name "python-tabulate")
10299 (version "0.7.7")
10300 (source (origin
10301 (method url-fetch)
10302 (uri (pypi-uri "tabulate" version))
10303 (sha256
10304 (base32
10305 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10306 (build-system python-build-system)
10307 (arguments
10308 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10309 ;; and the latest release is not tagged in the upstream repository.
10310 '(#:tests? #f))
10311 (home-page "https://bitbucket.org/astanin/python-tabulate")
10312 (synopsis "Pretty-print tabular data")
10313 (description
10314 "Tabulate is a library and command-line utility to pretty-print tabular
10315 data in Python.")
10316 (license license:expat)))
10317
10318 (define-public python2-tabulate
10319 (package-with-python2 python-tabulate))
10320
10321 (define-public python-kazoo
10322 (package
10323 (name "python-kazoo")
10324 (version "2.4.0")
10325 (source
10326 (origin
10327 (method url-fetch)
10328 (uri (pypi-uri "kazoo" version))
10329 (sha256
10330 (base32
10331 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10332 (build-system python-build-system)
10333 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10334 (propagated-inputs
10335 `(("python-six" ,python-six)))
10336 (home-page "https://kazoo.readthedocs.org")
10337 (synopsis "High-level Zookeeper client library")
10338 (description
10339 "Kazoo is a Python client library for the Apache Zookeeper distributed
10340 application service. It is designed to be easy to use and to avoid common
10341 programming errors.")
10342 (license license:asl2.0)))
10343
10344 (define-public python2-kazoo
10345 (package-with-python2 python-kazoo))
10346
10347 (define-public python-pykafka
10348 (package
10349 (name "python-pykafka")
10350 (version "2.4.0")
10351 (source (origin
10352 (method url-fetch)
10353 (uri (pypi-uri "pykafka" version))
10354 (sha256
10355 (base32
10356 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10357 (build-system python-build-system)
10358 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10359 (propagated-inputs
10360 `(("python-gevent" ,python-gevent)
10361 ("python-kazoo" ,python-kazoo)
10362 ("python-tabulate" ,python-tabulate)))
10363 (inputs
10364 `(("librdkafka" ,librdkafka)))
10365 (home-page "https://pykafka.readthedocs.io/")
10366 (synopsis "Apache Kafka client for Python")
10367 (description
10368 "PyKafka is a client for the Apache Kafka distributed messaging system.
10369 It includes Python implementations of Kafka producers and consumers, which
10370 are optionally backed by a C extension built on librdkafka.")
10371 (license license:asl2.0)))
10372
10373 (define-public python2-pykafka
10374 (package-with-python2 python-pykafka))
10375
10376 (define-public python-wcwidth
10377 (package
10378 (name "python-wcwidth")
10379 (version "0.1.7")
10380 (source
10381 (origin
10382 (method url-fetch)
10383 (uri (pypi-uri "wcwidth" version))
10384 (sha256
10385 (base32
10386 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
10387 (build-system python-build-system)
10388 (home-page "https://github.com/jquast/wcwidth")
10389 (synopsis "Measure number of terminal column cells of wide-character codes")
10390 (description "Wcwidth measures the number of terminal column cells of
10391 wide-character codes. It is useful for those implementing a terminal emulator,
10392 or programs that carefully produce output to be interpreted by one. It is a
10393 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10394 specified in POSIX.1-2001 and POSIX.1-2008.")
10395 (license license:expat)))
10396
10397 (define-public python2-wcwidth
10398 (package-with-python2 python-wcwidth))
10399
10400 (define-public python2-jsonrpclib
10401 (package
10402 (name "python2-jsonrpclib")
10403 (version "0.1.7")
10404 (source (origin
10405 (method url-fetch)
10406 (uri (pypi-uri "jsonrpclib" version))
10407 (sha256
10408 (base32
10409 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10410 (build-system python-build-system)
10411 (arguments
10412 `(#:tests? #f
10413 #:python ,python-2))
10414 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10415 (synopsis "Implementation of JSON-RPC specification for Python")
10416 (description
10417 "This library is an implementation of the JSON-RPC specification.
10418 It supports both the original 1.0 specification, as well as the
10419 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10420 etc.")
10421 (license license:asl2.0)))
10422
10423 (define-public python-chai
10424 (package
10425 (name "python-chai")
10426 (version "1.1.2")
10427 (source (origin
10428 (method url-fetch)
10429 (uri (pypi-uri "chai" version))
10430 (sha256
10431 (base32
10432 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10433 (build-system python-build-system)
10434 (home-page "https://github.com/agoragames/chai")
10435 (synopsis "Mocking framework for Python")
10436 (description
10437 "Chai provides an api for mocking, stubbing and spying your python
10438 objects, patterned after the Mocha library for Ruby.")
10439 (license license:bsd-3)))
10440
10441 (define-public python2-chai
10442 (package-with-python2 python-chai))
10443
10444 (define-public python-inflection
10445 (package
10446 (name "python-inflection")
10447 (version "0.3.1")
10448 (source
10449 (origin (method url-fetch)
10450 (uri (pypi-uri "inflection" version))
10451 (sha256
10452 (base32
10453 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10454 (build-system python-build-system)
10455 (native-inputs
10456 `(("python-pytest" ,python-pytest)))
10457 (home-page "https://github.com/jpvanhal/inflection")
10458 (synopsis "Python string transformation library")
10459 (description
10460 "Inflection is a string transformation library. It singularizes
10461 and pluralizes English words, and transforms strings from CamelCase to
10462 underscored string.")
10463 (license license:expat)))
10464
10465 (define-public python2-inflection
10466 (package-with-python2 python-inflection))
10467
10468 (define-public python-pylev
10469 (package
10470 (name "python-pylev")
10471 (version "1.3.0")
10472 (source (origin
10473 (method url-fetch)
10474 (uri (pypi-uri "pylev" version))
10475 (sha256
10476 (base32
10477 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10478 (build-system python-build-system)
10479 (home-page "https://github.com/toastdriven/pylev")
10480 (synopsis "Levenshtein distance implementation in Python")
10481 (description "Pure Python Levenshtein implementation, based off the
10482 Wikipedia code samples at
10483 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10484 (license license:bsd-3)))
10485
10486 (define-public python2-pylev
10487 (package-with-python2 python-pylev))
10488
10489 (define-public python-cleo
10490 (package
10491 (name "python-cleo")
10492 (version "0.6.1")
10493 (source (origin
10494 (method url-fetch)
10495 (uri (pypi-uri "cleo" version))
10496 (sha256
10497 (base32
10498 "0q1cf0szr0d54am4pypzwdnm74zpladdsinad94c2fz5i06fdpf7"))))
10499 (build-system python-build-system)
10500 (native-inputs
10501 `(;; For testing
10502 ("python-mock" ,python-mock)
10503 ("python-pytest-mock" ,python-pytest-mock)
10504 ("python-pytest" ,python-pytest)))
10505 (propagated-inputs
10506 `(("python-backpack" ,python-backpack)
10507 ("python-pastel" ,python-pastel)
10508 ("python-pylev" ,python-pylev)))
10509 (home-page "https://github.com/sdispater/cleo")
10510 (synopsis "Command-line arguments library for Python")
10511 (description
10512 "Cleo allows you to create command-line commands with signature in
10513 docstring and colored output.")
10514 (license license:expat)))
10515
10516 (define-public python2-cleo
10517 (package-with-python2 python-cleo))
10518
10519 (define-public python-lazy-object-proxy
10520 (package
10521 (name "python-lazy-object-proxy")
10522 (version "1.3.1")
10523 (source (origin
10524 (method url-fetch)
10525 (uri (pypi-uri "lazy-object-proxy" version))
10526 (sha256
10527 (base32
10528 "0yha7q9bhw857fwaby785d63mffhngl9npwzlk9i0pwlkwvbx4gb"))))
10529 (build-system python-build-system)
10530 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10531 (synopsis "Lazy object proxy for python")
10532 (description
10533 "Lazy object proxy is an object that wraps a callable but defers the call
10534 until the object is actually required, and caches the result of said call.")
10535 (license license:bsd-2)))
10536
10537 (define-public python2-lazy-object-proxy
10538 (package-with-python2 python-lazy-object-proxy))
10539
10540 (define-public python-dnspython
10541 (package
10542 (name "python-dnspython")
10543 (version "1.15.0")
10544 (source (origin
10545 (method url-fetch)
10546 (uri (string-append "http://www.dnspython.org/kits/"
10547 version "/dnspython-" version ".tar.gz"))
10548 (sha256
10549 (base32
10550 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10551 (build-system python-build-system)
10552 (arguments '(#:tests? #f)) ; XXX: requires internet access
10553 (home-page "http://www.dnspython.org")
10554 (synopsis "DNS toolkit for Python")
10555 (description
10556 "dnspython is a DNS toolkit for Python. It supports almost all record
10557 types. It can be used for queries, zone transfers, and dynamic updates.
10558 It supports TSIG authenticated messages and EDNS0.")
10559 (license license:expat)))
10560
10561 (define-public python2-dnspython
10562 (package-with-python2 python-dnspython))
10563
10564 (define-public python-email-validator
10565 (package
10566 (name "python-email-validator")
10567 (version "1.0.2")
10568 (source
10569 (origin (method url-fetch)
10570 (uri (pypi-uri "email_validator" version))
10571 (sha256
10572 (base32
10573 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10574 (build-system python-build-system)
10575 (arguments
10576 '(#:phases
10577 (modify-phases %standard-phases
10578 (add-before 'build 'use-dnspython
10579 (lambda _
10580 (substitute* "setup.py"
10581 (("dnspython3") "dnspython"))
10582 #t)))))
10583 (propagated-inputs
10584 `(("python-dnspython" ,python-dnspython)
10585 ("python-idna" ,python-idna)))
10586 (home-page "https://github.com/JoshData/python-email-validator")
10587 (synopsis "Email address validation library for Python")
10588 (description
10589 "This library validates email address syntax and deliverability.")
10590 (license license:cc0)))
10591
10592 (define-public python2-email-validator
10593 (package-with-python2 python-email-validator))
10594
10595 (define-public python-ukpostcodeparser
10596 (package
10597 (name "python-ukpostcodeparser")
10598 (version "1.0.3")
10599 (source (origin
10600 (method url-fetch)
10601 (uri (pypi-uri "UkPostcodeParser" version))
10602 (sha256
10603 (base32
10604 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10605 (build-system python-build-system)
10606 (home-page "https://github.com/hamstah/ukpostcodeparser")
10607 (synopsis "UK Postcode parser for Python")
10608 (description
10609 "This library provides the @code{parse_uk_postcode} function for
10610 parsing UK postcodes.")
10611 (license license:expat)))
10612
10613 (define-public python2-ukpostcodeparser
10614 (package-with-python2 python-ukpostcodeparser))
10615
10616 (define-public python-faker
10617 (package
10618 (name "python-faker")
10619 (version "0.7.9")
10620 (source (origin
10621 (method url-fetch)
10622 (uri (pypi-uri "Faker" version))
10623 (sha256
10624 (base32
10625 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10626 (patches
10627 (search-patches "python-faker-fix-build-32bit.patch"))
10628 (modules '((guix build utils)))
10629 (snippet
10630 '(begin
10631 (for-each delete-file (find-files "." "\\.pyc$"))
10632 #t))))
10633 (build-system python-build-system)
10634 (arguments
10635 '(#:phases
10636 (modify-phases %standard-phases
10637 (replace 'check
10638 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
10639 (native-inputs
10640 `(;; For testing
10641 ("python-email-validator" ,python-email-validator)
10642 ("python-mock" ,python-mock)
10643 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10644 (propagated-inputs
10645 `(("python-dateutil" ,python-dateutil)
10646 ("python-six" ,python-six)))
10647 (home-page "https://github.com/joke2k/faker")
10648 (synopsis "Python package that generates fake data")
10649 (description
10650 "Faker is a Python package that generates fake data such as names,
10651 addresses, and phone numbers.")
10652 (license license:expat)
10653 (properties `((python2-variant . ,(delay python2-faker))))))
10654
10655 (define-public python2-faker
10656 (let ((base (package-with-python2 (strip-python2-variant
10657 python-faker))))
10658 (package
10659 (inherit base)
10660 (propagated-inputs
10661 `(("python2-ipaddress" ,python2-ipaddress)
10662 ,@(package-propagated-inputs base))))))
10663
10664 (define-public python-pyaml
10665 (package
10666 (name "python-pyaml")
10667 (version "18.11.0")
10668 (source (origin
10669 (method url-fetch)
10670 (uri (pypi-uri "pyaml" version))
10671 (sha256
10672 (base32
10673 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
10674 (build-system python-build-system)
10675 (native-inputs
10676 `(("python-unidecode" ,python-unidecode)))
10677 (propagated-inputs
10678 `(("python-pyyaml" ,python-pyyaml)))
10679 (home-page "https://github.com/mk-fg/pretty-yaml")
10680 (synopsis "YAML pretty-print library for Python")
10681 (description
10682 "pyaml is a PyYAML based python module to produce pretty and readable
10683 YAML-serialized data.")
10684 (license license:wtfpl2)))
10685
10686 (define-public python2-pyaml
10687 (package-with-python2 python-pyaml))
10688
10689 (define-public python-backpack
10690 (package
10691 (name "python-backpack")
10692 (version "0.1")
10693 (source
10694 (origin
10695 (method url-fetch)
10696 (uri (pypi-uri "backpack" version))
10697 (sha256
10698 (base32
10699 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10700 (build-system python-build-system)
10701 (native-inputs
10702 `(("python-pytest" ,python-pytest)
10703 ("python-nose" ,python-nose)))
10704 (propagated-inputs
10705 `(("python-simplejson" ,python-simplejson)))
10706 (home-page "https://github.com/sdispater/backpack")
10707 (synopsis "Utilities for working with Python collections")
10708 (description "Backpack provides some useful utilities for working with
10709 collections of data.")
10710 (license license:expat)))
10711
10712 (define-public python2-backpack
10713 (package-with-python2 python-backpack))
10714
10715 (define-public python-prompt-toolkit
10716 (package
10717 (name "python-prompt-toolkit")
10718 (version "2.0.7")
10719 (source
10720 (origin
10721 (method url-fetch)
10722 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10723 (sha256
10724 (base32
10725 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10726 (build-system python-build-system)
10727 (arguments
10728 `(#:phases
10729 (modify-phases %standard-phases
10730 (delete 'check)
10731 (add-after 'install 'post-install-check
10732 (lambda* (#:key inputs outputs #:allow-other-keys)
10733 ;; HOME is needed for the test
10734 ;; "test_pathcompleter_can_expanduser".
10735 (setenv "HOME" "/tmp")
10736 (add-installed-pythonpath inputs outputs)
10737 (invoke "py.test"))))))
10738 (propagated-inputs
10739 `(("python-wcwidth" ,python-wcwidth)
10740 ("python-six" ,python-six)
10741 ("python-pygments" ,python-pygments)))
10742 (native-inputs
10743 `(("python-pytest" ,python-pytest)))
10744 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10745 (synopsis "Library for building command line interfaces in Python")
10746 (description
10747 "Prompt-Toolkit is a library for building interactive command line
10748 interfaces in Python. It's like GNU Readline but it also features syntax
10749 highlighting while typing, out-of-the-box multi-line input editing, advanced
10750 code completion, incremental search, support for Chinese double-width
10751 characters, mouse support, and auto suggestions.")
10752 (license license:bsd-3)))
10753
10754 (define-public python2-prompt-toolkit
10755 (package-with-python2 python-prompt-toolkit))
10756
10757 (define-public python-prompt-toolkit-1
10758 (package (inherit python-prompt-toolkit)
10759 (version "1.0.15")
10760 (source
10761 (origin
10762 (method url-fetch)
10763 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10764 (sha256
10765 (base32
10766 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
10767
10768 (define-public python2-prompt-toolkit-1
10769 (package-with-python2 python-prompt-toolkit-1))
10770
10771 (define-public python-jedi
10772 (package
10773 (name "python-jedi")
10774 (version "0.15.1")
10775 (source
10776 (origin
10777 (method url-fetch)
10778 (uri (pypi-uri "jedi" version))
10779 (sha256
10780 (base32
10781 "0bp4pxhsynaarbvzblsn5x32lzp29svy3sxfy8i6m5iwz9s9r1ds"))))
10782 (build-system python-build-system)
10783 (arguments
10784 `(#:phases
10785 (modify-phases %standard-phases
10786 (add-after 'unpack 'disable-file-completion-test
10787 ;; A single parameterized test currently fail (see:
10788 ;; https://github.com/davidhalter/jedi/issues/1395). Remove it.
10789 (lambda _
10790 (substitute* "test/test_api/test_completion.py"
10791 ((".*'example.py', 'rb\"' \\+ join\\('\\.\\.'.*") ""))
10792 #t))
10793 (replace 'check
10794 (lambda _
10795 (setenv "HOME" "/tmp")
10796 (invoke "python" "-m" "pytest"))))))
10797 (native-inputs
10798 `(("python-pytest" ,python-pytest)
10799 ("python-docopt" ,python-docopt)))
10800 (propagated-inputs
10801 `(("python-parso" ,python-parso)))
10802 (home-page "https://github.com/davidhalter/jedi")
10803 (synopsis "Autocompletion and static analysis library for Python")
10804 (description
10805 "Jedi is a static analysis tool for Python that can be used in Integrated
10806 Development Environments (@dfn{IDE}s) and text editors. It understands Python
10807 on a deeper level than many other static analysis frameworks for Python.
10808
10809 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
10810 well.")
10811 (license license:expat)))
10812
10813 (define-public python2-jedi
10814 (package-with-python2 python-jedi))
10815
10816 (define-public ptpython
10817 (package
10818 (name "ptpython")
10819 (version "0.34")
10820 (source (origin
10821 (method url-fetch)
10822 (uri (pypi-uri "ptpython" version))
10823 (sha256
10824 (base32
10825 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10826 (build-system python-build-system)
10827 (arguments
10828 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
10829 (propagated-inputs
10830 `(("python-docopt" ,python-docopt)
10831 ("python-jedi" ,python-jedi)
10832 ("python-prompt-toolkit" ,python-prompt-toolkit)
10833 ("python-pygments" ,python-pygments)))
10834 (home-page "https://github.com/jonathanslenders/ptpython")
10835 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10836 (description
10837 "ptpython is a Python read-eval-print loop with IDE-like features.
10838 It supports syntax highlighting, multiline editing, autocompletion, mouse,
10839 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10840 etc.")
10841 (license license:bsd-3)
10842 (properties `((python2-variant . ,(delay ptpython-2))))))
10843
10844 (define-public ptpython-2
10845 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10846 (package
10847 (inherit base)
10848 (name "ptpython2"))))
10849
10850 (define-public python-stem
10851 (package
10852 (name "python-stem")
10853 (version "1.7.1")
10854 (source
10855 (origin
10856 (method url-fetch)
10857 (uri (pypi-uri "stem" version))
10858 (sha256
10859 (base32
10860 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
10861 (build-system python-build-system)
10862 (arguments
10863 `(#:phases
10864 (modify-phases %standard-phases
10865 (replace 'check
10866 (lambda _
10867 (invoke "./run_tests.py" "--unit")
10868 #t)))))
10869 (native-inputs
10870 `(("python-mock" ,python-mock)
10871 ("python-pycodestyle" ,python-pycodestyle)
10872 ("python-pyflakes" ,python-pyflakes)))
10873 (home-page "https://stem.torproject.org/")
10874 (synopsis
10875 "Python controller library that allows applications to interact with Tor")
10876 (description
10877 "Stem is a Python controller library for Tor. With it you can use Tor's
10878 control protocol to script against the Tor process and read descriptor data
10879 relays publish about themselves.")
10880 (license license:lgpl3)))
10881
10882 (define-public python2-stem
10883 (package-with-python2 python-stem))
10884
10885 (define-public python-pyserial
10886 (package
10887 (name "python-pyserial")
10888 (version "3.1.1")
10889 (source
10890 (origin
10891 (method url-fetch)
10892 (uri (pypi-uri "pyserial" version))
10893 (sha256
10894 (base32
10895 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
10896 (build-system python-build-system)
10897 (arguments
10898 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
10899 ;; #:phases
10900 ;; (modify-phases %standard-phases
10901 ;; (replace 'check
10902 ;; (lambda _
10903 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
10904 (home-page
10905 "https://github.com/pyserial/pyserial")
10906 (synopsis "Python Serial Port Bindings")
10907 (description "@code{pyserial} provide serial port bindings for Python. It
10908 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
10909 and/or Xon/Xoff. The port is accessed in RAW mode.")
10910 (license license:bsd-3)))
10911
10912 (define-public python2-pyserial
10913 (package-with-python2 python-pyserial))
10914
10915 (define-public python-kivy
10916 (package
10917 (name "python-kivy")
10918 (version "1.10.1")
10919 (source
10920 (origin
10921 (method url-fetch)
10922 (uri (pypi-uri "Kivy" version))
10923 (file-name (string-append name "-" version ".tar.gz"))
10924 (sha256
10925 (base32
10926 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
10927 (build-system python-build-system)
10928 (arguments
10929 `(#:tests? #f ; Tests require many optional packages
10930 #:phases
10931 (modify-phases %standard-phases
10932 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
10933 (lambda* (#:key inputs #:allow-other-keys)
10934 (setenv "KIVY_SDL2_PATH"
10935 (string-append (assoc-ref inputs "sdl-union")
10936 "/include/SDL2"))
10937 #t)))))
10938 (native-inputs
10939 `(("git" ,git)
10940 ("pkg-config" ,pkg-config)
10941 ("python-cython" ,python-cython)))
10942 (inputs
10943 `(("gstreamer" ,gstreamer)
10944 ("mesa" ,mesa)
10945 ("sdl-union"
10946 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
10947 (home-page "http://kivy.org")
10948 (synopsis
10949 "Multitouch application framework")
10950 (description
10951 "A software library for rapid development of
10952 hardware-accelerated multitouch applications.")
10953 (license license:expat)))
10954
10955 (define-public python2-kivy
10956 (package-with-python2 python-kivy))
10957
10958 (define-public python-kivy-next
10959 (deprecated-package "python-kivy-next" python-kivy))
10960
10961 (define-public python2-kivy-next
10962 (deprecated-package "python2-kivy-next" python2-kivy))
10963
10964 (define-public python-binaryornot
10965 (package
10966 (name "python-binaryornot")
10967 (version "0.4.4")
10968 (source (origin
10969 (method url-fetch)
10970 (uri (pypi-uri "binaryornot" version))
10971 (sha256
10972 (base32
10973 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
10974 (build-system python-build-system)
10975 (arguments
10976 `(#:phases
10977 (modify-phases %standard-phases
10978 (add-after 'unpack 'patch-tests
10979 (lambda _
10980 ;; TypeError: binary() got an unexpected keyword argument
10981 ;; 'average_size'.
10982 (substitute* "tests/test_check.py"
10983 (("average_size=512") ""))
10984 #t)))))
10985 (propagated-inputs
10986 `(("python-chardet" ,python-chardet)
10987 ("python-hypothesis" ,python-hypothesis)))
10988 (home-page "https://github.com/audreyr/binaryornot")
10989 (synopsis "Package to check if a file is binary or text")
10990 (description "Ultra-lightweight pure Python package to check if a file is
10991 binary or text.")
10992 (license license:bsd-3)
10993 (properties `((python2-variant . ,(delay python2-binaryornot))))))
10994
10995 (define-public python2-binaryornot
10996 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
10997 (package (inherit base)
10998 (propagated-inputs
10999 `(("python2-enum34" ,python2-enum34)
11000 ,@(package-propagated-inputs base))))))
11001
11002 (define-public python-binwalk
11003 (let ((commit "64201acfb5b0a9cdd9faa58c40a36dcff8612e29")
11004 (revision "0"))
11005 (package
11006 (name "python-binwalk")
11007 (version (git-version "2.1.1" revision commit))
11008 (source
11009 (origin
11010 (method git-fetch)
11011 (uri (git-reference
11012 (url "https://github.com/ReFirmLabs/binwalk")
11013 (commit commit)))
11014 (file-name (git-file-name name version))
11015 (sha256
11016 (base32
11017 "1z7ca6rfp887hw5jc3sb45mm4fa0xid4lsp2z8g4r590dr7k7w15"))))
11018 (build-system python-build-system)
11019 (arguments
11020 `(#:phases
11021 (modify-phases %standard-phases
11022 (add-before 'check 'set-pythonpath
11023 (lambda _
11024 (setenv "PYTHONPATH"
11025 (string-append
11026 (getcwd) "/src/"
11027 ":" (getenv "PYTHONPATH")))
11028 (setenv "HOME" "")
11029 #t)))))
11030 (native-inputs
11031 `(("python-coverage" ,python-coverage)
11032 ("python-nose" ,python-nose)))
11033 (home-page "https://github.com/ReFirmLabs/binwalk")
11034 (synopsis "Firmware analysis tool")
11035 (description "Binwalk is a tool for analyzing, reverse engineering, and extracting firmware images")
11036 (license license:expat))))
11037
11038 (define-public python-nltk
11039 (package
11040 (name "python-nltk")
11041 (version "3.2.1")
11042 (source (origin
11043 (method url-fetch)
11044 (uri (pypi-uri "nltk" version))
11045 (sha256
11046 (base32
11047 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11048 (build-system python-build-system)
11049 (arguments
11050 '(;; The tests require some extra resources to be downloaded.
11051 ;; TODO Try packaging these resources.
11052 #:tests? #f))
11053 (home-page "http://nltk.org/")
11054 (synopsis "Natural Language Toolkit")
11055 (description "It provides interfaces to over 50 corpora and lexical
11056 resources such as WordNet, along with a suite of text processing libraries
11057 for classification, tokenization, stemming, tagging, parsing, and semantic
11058 reasoning, wrappers for natural language processing libraries.")
11059 (license license:asl2.0)))
11060
11061 (define-public python2-nltk
11062 (package-with-python2 python-nltk))
11063
11064 (define-public python-pymongo
11065 (package
11066 (name "python-pymongo")
11067 (version "3.7.2")
11068 (source (origin
11069 (method url-fetch)
11070 (uri (pypi-uri "pymongo" version))
11071 (sha256
11072 (base32
11073 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
11074 (build-system python-build-system)
11075 (propagated-inputs
11076 `(("python-certifi" ,python-certifi)))
11077 (home-page "https://github.com/mongodb/mongo-python-driver")
11078 (synopsis "Python driver for MongoDB")
11079 (description "Python driver for MongoDB.")
11080 (license license:asl2.0)))
11081
11082 (define-public python2-pymongo
11083 (package-with-python2 python-pymongo))
11084
11085 (define-public python-consul
11086 (package
11087 (name "python-consul")
11088 (version "0.6.1")
11089 (source
11090 (origin
11091 (method url-fetch)
11092 (uri (pypi-uri "python-consul" version))
11093 (sha256
11094 (base32
11095 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11096 (build-system python-build-system)
11097 (arguments
11098 '(#:tests? #f)) ; The tests are not distributed
11099 (propagated-inputs
11100 `(("python-requests" ,python-requests)
11101 ("python-six" ,python-six)))
11102 (home-page "https://github.com/cablehead/python-consul")
11103 (synopsis "Python client for Consul")
11104 (description
11105 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11106 discovery, monitoring and configuration.")
11107 (license license:expat)))
11108
11109 (define-public python2-consul
11110 (package-with-python2 python-consul))
11111
11112 (define-public python-schematics
11113 (package
11114 (name "python-schematics")
11115 (version "1.1.1")
11116 (source
11117 (origin
11118 (method git-fetch)
11119 (uri (git-reference
11120 (url "https://github.com/schematics/schematics.git")
11121 (commit (string-append "v" version))))
11122 (file-name (git-file-name name version))
11123 (sha256
11124 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
11125 (build-system python-build-system)
11126 (propagated-inputs
11127 `(("python-six" ,python-six)))
11128 (arguments
11129 ;; The tests require a bunch of not very nice packages with fixed
11130 ;; version requirements (e.g. python-coveralls).
11131 `(#:tests? #f))
11132 (home-page "https://github.com/schematics/schematics")
11133 (synopsis "Python Data Structures for Humans")
11134 (description "Python Data Structures for Humans.")
11135 (license license:bsd-3)))
11136
11137 (define-public python2-schematics
11138 (package-with-python2 python-schematics))
11139
11140 (define-public python-odfpy
11141 (package
11142 (name "python-odfpy")
11143 (version "1.3.3")
11144 (source (origin
11145 (method url-fetch)
11146 (uri (pypi-uri "odfpy" version))
11147 (sha256
11148 (base32
11149 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11150 (arguments
11151 `(#:modules ((srfi srfi-1)
11152 (guix build python-build-system)
11153 (guix build utils))
11154 #:phases
11155 (modify-phases %standard-phases
11156 (replace 'check
11157 ;; The test runner invokes python2 and python3 for test*.py.
11158 ;; To avoid having both in inputs, we replicate it here.
11159 (lambda _
11160 (for-each (lambda (test-file) (invoke "python" test-file))
11161 (find-files "tests" "^test.*\\.py$"))
11162 #t)))))
11163 (build-system python-build-system)
11164 (home-page "https://github.com/eea/odfpy")
11165 (synopsis "Python API and tools to manipulate OpenDocument files")
11166 (description "Collection of libraries and utility programs written in
11167 Python to manipulate OpenDocument 1.2 files.")
11168 (license
11169 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11170 ;; number of files with other licenses.
11171 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11172
11173 (define-public python2-odfpy
11174 (package-with-python2 python-odfpy))
11175
11176 (define-public python-natsort
11177 (package
11178 (name "python-natsort")
11179 (version "5.4.1")
11180 (source (origin
11181 (method url-fetch)
11182 (uri (pypi-uri "natsort" version))
11183 (sha256
11184 (base32
11185 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
11186 (build-system python-build-system)
11187 (arguments
11188 `(#:modules ((guix build utils)
11189 (guix build python-build-system)
11190 (srfi srfi-1)
11191 (srfi srfi-26)
11192 (ice-9 ftw))
11193 #:phases
11194 (modify-phases %standard-phases
11195 (add-before 'check 'set-cachedir
11196 ;; Tests require write access to $HOME by default
11197 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
11198 (replace 'check
11199 (lambda _
11200 (let ((cwd (getcwd)))
11201 (setenv "PYTHONPATH"
11202 (string-append
11203 cwd "/build/"
11204 (find (cut string-prefix? "lib" <>)
11205 (scandir (string-append cwd "/build")))
11206 ":"
11207 (getenv "PYTHONPATH")))
11208 (invoke "pytest" "-v")))))))
11209 (native-inputs
11210 `(("python-hypothesis" ,python-hypothesis)
11211 ("python-pytest-cov" ,python-pytest-cov)
11212 ("python-pytest-mock" ,python-pytest-mock)
11213 ("python-pytest" ,python-pytest)))
11214 (propagated-inputs ; TODO: Add python-fastnumbers.
11215 `(("python-pyicu" ,python-pyicu)))
11216 (home-page "https://github.com/SethMMorton/natsort")
11217 (synopsis "Natural sorting for python and shell")
11218 (description
11219 "Natsort lets you apply natural sorting on lists instead of
11220 lexicographical. If you use the built-in @code{sorted} method in python
11221 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
11222 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
11223 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
11224 identifies numbers and sorts them separately from strings. It can also sort
11225 version numbers, real numbers, mixed types and more, and comes with a shell
11226 command @command{natsort} that exposes this functionality in the command line.")
11227 (license license:expat)
11228 (properties `((python2-variant . ,(delay python2-natsort))))))
11229
11230 (define-public python2-natsort
11231 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11232 (package (inherit base)
11233 (native-inputs
11234 `(("python2-pathlib" ,python2-pathlib)
11235 ,@(package-native-inputs base))))))
11236
11237 (define-public python-glances
11238 (package
11239 (name "python-glances")
11240 (version "3.1.1")
11241 (source
11242 (origin
11243 (method url-fetch)
11244 (uri (pypi-uri "Glances" version))
11245 (sha256
11246 (base32
11247 "07j1ggzsqiskyz1i4mrnyr9i95v0dqi0i0hibnv1l188km8shmi8"))
11248 (modules '((guix build utils)))
11249 (snippet
11250 '(begin
11251 ;; Glances phones PyPI for weekly update checks by default.
11252 ;; Disable these. The user can re-enable them if desired.
11253 (substitute* "glances/outdated.py"
11254 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
11255 (string-append indentation
11256 "self.args.disable_check_update = True\n"
11257 line)))
11258 #t))))
11259 (build-system python-build-system)
11260 (propagated-inputs
11261 `(("python-future" ,python-future)
11262 ("python-psutil" ,python-psutil)))
11263 (home-page
11264 "https://github.com/nicolargo/glances")
11265 (synopsis "Cross-platform curses-based monitoring tool")
11266 (description
11267 "Glances is a curses-based monitoring tool for a wide variety of platforms.
11268 Glances uses the PsUtil library to get information from your system. It
11269 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
11270 (license license:lgpl3+)))
11271
11272 (define-public python2-glances
11273 (package-with-python2 python-glances))
11274
11275 (define-public python-graphql-core
11276 (package
11277 (name "python-graphql-core")
11278 (version "0.5.3")
11279 (source
11280 (origin
11281 (method url-fetch)
11282 (uri (pypi-uri "graphql-core" version))
11283 (sha256
11284 (base32
11285 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11286 (build-system python-build-system)
11287 (arguments
11288 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11289 #:phases
11290 (modify-phases %standard-phases
11291 (add-after 'unpack 'patch-hardcoded-version
11292 (lambda _ (substitute*
11293 "setup.py"
11294 (("'gevent==1.1rc1'") "'gevent'"))
11295 #t)))))
11296 (native-inputs
11297 `(("python-gevent" ,python-gevent)
11298 ("python-mock" ,python-mock)
11299 ("python-pytest-mock" ,python-pytest-mock)))
11300 (propagated-inputs
11301 `(("python-promise" ,python-promise)
11302 ("python-six" ,python-six)))
11303 (home-page "https://github.com/graphql-python/graphql-core")
11304 (synopsis "GraphQL implementation for Python")
11305 (description
11306 "GraphQL implementation for Python. GraphQL is a data query language and
11307 runtime designed and used to request and deliver data to mobile and web apps.
11308 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11309 to Python.")
11310 (license license:expat)))
11311
11312 (define-public python2-graphql-core
11313 (package-with-python2 python-graphql-core))
11314
11315 (define-public python-graphql-relay
11316 (package
11317 (name "python-graphql-relay")
11318 (version "0.4.5")
11319 (source
11320 (origin
11321 (method url-fetch)
11322 (uri (pypi-uri "graphql-relay" version))
11323 (sha256
11324 (base32
11325 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
11326 (build-system python-build-system)
11327 (arguments
11328 '(#:tests? #f)) ; The tests are not distributed
11329 (propagated-inputs
11330 `(("python-graphql-core" ,python-graphql-core)
11331 ("python-promise" ,python-promise)
11332 ("python-six" ,python-six)))
11333 (home-page "https://github.com/graphql-python/graphql-relay-py")
11334 (synopsis "Relay implementation for Python")
11335 (description
11336 "This is a library to allow the easy creation of Relay-compliant servers
11337 using the GraphQL Python reference implementation of a GraphQL server. It
11338 should be noted that the code is a exact port of the original
11339 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11340 from Facebook.")
11341 (license license:expat)))
11342
11343 (define-public python2-graphql-relay
11344 (package-with-python2 python-graphql-relay))
11345
11346 (define-public python-graphene
11347 (package
11348 (name "python-graphene")
11349 (version "0.10.2")
11350 (source
11351 (origin
11352 (method url-fetch)
11353 (uri (pypi-uri "graphene" version))
11354 (sha256
11355 (base32
11356 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11357 (build-system python-build-system)
11358 (propagated-inputs
11359 `(("python-graphql-core" ,python-graphql-core)
11360 ("python-graphql-relay" ,python-graphql-relay)
11361 ("python-iso8601" ,python-iso8601)
11362 ("python-promise" ,python-promise)
11363 ("python-six" ,python-six)))
11364 (arguments
11365 `(#:tests? #f)) ; no tests/ in the PyPI tarball
11366 (home-page "http://graphene-python.org/")
11367 (synopsis "GraphQL Framework for Python")
11368 (description
11369 "Graphene is a Python library for building GraphQL schemas/types.
11370 A GraphQL schema describes your data model, and provides a GraphQL server
11371 with an associated set of resolve methods that know how to fetch data.")
11372 (properties `((python2-variant . ,(delay python2-graphene))))
11373 (license license:expat)))
11374
11375 (define-public python2-graphene
11376 (let ((base (package-with-python2
11377 (strip-python2-variant python-graphene))))
11378 (package (inherit base)
11379 (native-inputs
11380 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11381 ,@(package-native-inputs base))))))
11382
11383 (define-public python-nautilus
11384 (package
11385 (name "python-nautilus")
11386 (version "0.4.9")
11387 (source
11388 (origin
11389 (method url-fetch)
11390 (uri (pypi-uri "nautilus" version))
11391 (sha256
11392 (base32
11393 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11394 (build-system python-build-system)
11395 (arguments `(#:tests? #f)) ; fails to import test modules
11396 (propagated-inputs
11397 `(("python-bcrypt" ,python-bcrypt)
11398 ("python-click" ,python-click)
11399 ("python-consul" ,python-consul)
11400 ("python-graphene" ,python-graphene)
11401 ("python-jinja2" ,python-jinja2)
11402 ("python-peewee" ,python-peewee)
11403 ("python-pika" ,python-pika)
11404 ("python-tornado" ,python-tornado)
11405 ("python-wtforms" ,python-wtforms)))
11406 (native-inputs
11407 `(("python-nose2" ,python-nose2)))
11408 (home-page "https://github.com/AlecAivazis/nautilus")
11409 (synopsis "Library for creating microservice applications")
11410 (description
11411 "Nautilus is a framework for flux based microservices that looks to
11412 provide extendible implementations of common aspects of a cloud so that you can
11413 focus on building massively scalable web applications.")
11414 (license license:expat)))
11415
11416 (define-public python-snowballstemmer
11417 (package
11418 (name "python-snowballstemmer")
11419 (version "1.2.1")
11420 (source (origin
11421 (method url-fetch)
11422 (uri (pypi-uri "snowballstemmer" version))
11423 (sha256
11424 (base32
11425 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11426 (build-system python-build-system)
11427 (arguments
11428 `(;; No tests exist
11429 #:tests? #f))
11430 (home-page "https://github.com/shibukawa/snowball_py")
11431 (synopsis "Snowball stemming library collection for Python")
11432 (description "This package provides 16 word stemmer algorithms generated
11433 from Snowball algorithms. It includes the 15 original ones plus the Poerter
11434 English stemmer.")
11435 (license license:bsd-3)))
11436
11437 (define-public python2-snowballstemmer
11438 (package-with-python2 python-snowballstemmer))
11439
11440 (define-public python-setproctitle
11441 (package
11442 (name "python-setproctitle")
11443 (version "1.1.10")
11444 (source
11445 (origin
11446 (method url-fetch)
11447 (uri (pypi-uri "setproctitle" version))
11448 (sha256
11449 (base32
11450 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11451 (build-system python-build-system)
11452 (arguments
11453 '(#:phases
11454 (modify-phases %standard-phases
11455 (add-before 'check 'patch-Makefile
11456 ;; Stricly this is only required for the python2 variant.
11457 ;; But adding a phase in an inherited package seems to be
11458 ;; cumbersum. So we patch even for python3.
11459 (lambda _
11460 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11461 (when nose
11462 (substitute* "Makefile"
11463 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11464 (string-append nose "/bin/nosetests "))))
11465 #t)))
11466 (replace 'check
11467 (lambda _
11468 (setenv "PYTHON" (or (which "python3") (which "python")))
11469 (setenv "PYCONFIG" (or (which "python3-config")
11470 (which "python-config")))
11471 (setenv "CC" "gcc")
11472 ;; No need to extend PYTHONPATH to find the built package, since
11473 ;; the Makefile will build anyway
11474 (invoke "make" "check"))))))
11475 (native-inputs
11476 `(("procps" ,procps))) ; required for tests
11477 (home-page
11478 "https://github.com/dvarrazzo/py-setproctitle")
11479 (synopsis
11480 "Setproctitle implementation for Python to customize the process title")
11481 (description "The library allows a process to change its title (as displayed
11482 by system tools such as ps and top).
11483
11484 Changing the title is mostly useful in multi-process systems, for
11485 example when a master process is forked: changing the children's title
11486 allows to identify the task each process is busy with. The technique
11487 is used by PostgreSQL and the OpenSSH Server for example.")
11488 (license license:bsd-3)
11489 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11490
11491 (define-public python2-setproctitle
11492 (let ((base (package-with-python2
11493 (strip-python2-variant python-setproctitle))))
11494 (package
11495 (inherit base)
11496 (native-inputs `(("python2-nose" ,python2-nose)
11497 ,@(package-native-inputs base))))))
11498
11499 (define-public python-validictory
11500 (package
11501 (name "python-validictory")
11502 (version "1.0.1")
11503 (source
11504 (origin
11505 (method url-fetch)
11506 (uri (pypi-uri "validictory" version))
11507 (sha256
11508 (base32
11509 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11510 (build-system python-build-system)
11511 (arguments
11512 '(#:phases
11513 (modify-phases %standard-phases
11514 (add-after 'unpack 'bootstrap
11515 ;; Move the tests out of the package directory to avoid
11516 ;; packaging them.
11517 (lambda* _
11518 (rename-file "validictory/tests" "tests")
11519 (delete-file "tests/__init__.py")))
11520 (replace 'check
11521 (lambda _
11522 ;; Extend PYTHONPATH so the built package will be found.
11523 (setenv "PYTHONPATH"
11524 (string-append (getcwd) "/build/lib:"
11525 (getenv "PYTHONPATH")))
11526 (invoke "py.test" "-vv" ))))))
11527 (native-inputs
11528 `(("python-pytest" ,python-pytest)))
11529 (home-page
11530 "https://github.com/jamesturk/validictory")
11531 (synopsis "General purpose Python data validator")
11532 (description "It allows validation of arbitrary Python data structures.
11533
11534 The schema format is based on the JSON Schema
11535 proposal (http://json-schema.org), so combined with json the library is also
11536 useful as a validator for JSON data.")
11537 (license license:expat)))
11538
11539 (define-public python2-validictory
11540 (package-with-python2 python-validictory))
11541
11542 (define-public python-pyelftools
11543 (package
11544 (name "python-pyelftools")
11545 (version "0.25")
11546 (source
11547 (origin
11548 (method url-fetch)
11549 (uri (pypi-uri "pyelftools" version))
11550 (sha256
11551 (base32
11552 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11553 (build-system python-build-system)
11554 (arguments
11555 `(#:phases
11556 (modify-phases %standard-phases
11557 (add-before 'check 'set-pythonpath
11558 (lambda _
11559 (setenv "PYTHONPATH"
11560 (string-append
11561 (getcwd) "/test/"
11562 ":" (getenv "PYTHONPATH")))
11563 #t)))))
11564 (home-page
11565 "https://github.com/eliben/pyelftools")
11566 (synopsis
11567 "Analyze binary and library file information")
11568 (description "This Python library provides interfaces for parsing and
11569 analyzing two binary and library file formats; the Executable and Linking
11570 Format (ELF), and debugging information in the Debugging With Attributed
11571 Record Format (DWARF).")
11572 (license license:public-domain)))
11573
11574 (define-public python-pyev
11575 (package
11576 (name "python-pyev")
11577 (version "0.9.0")
11578 (source
11579 (origin
11580 (method url-fetch)
11581 (uri (pypi-uri "pyev" version))
11582 (sha256
11583 (base32
11584 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11585 (build-system python-build-system)
11586 (arguments
11587 `(#:tests? #f ; no test suite
11588 #:phases
11589 (modify-phases %standard-phases
11590 (add-after 'unpack 'patch
11591 (lambda* (#:key inputs #:allow-other-keys)
11592 (let ((libev (string-append (assoc-ref inputs "libev")
11593 "/lib/libev.so.4")))
11594 (substitute* "setup.py"
11595 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11596 (string-append "libev_dll_name = \"" libev "\"")))))))))
11597 (inputs
11598 `(("libev" ,libev)))
11599 (home-page "http://pythonhosted.org/pyev/")
11600 (synopsis "Python libev interface")
11601 (description "Pyev provides a Python interface to libev.")
11602 (license license:gpl3)))
11603
11604 (define-public python2-pyev
11605 (package-with-python2 python-pyev))
11606
11607 (define-public python-imagesize
11608 (package
11609 (name "python-imagesize")
11610 (version "1.1.0")
11611 (source
11612 (origin
11613 (method url-fetch)
11614 (uri (pypi-uri "imagesize" version))
11615 (sha256
11616 (base32
11617 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11618 (build-system python-build-system)
11619 (home-page "https://github.com/shibukawa/imagesize_py")
11620 (synopsis "Gets image size of files in various formats in Python")
11621 (description
11622 "This package allows determination of image size from
11623 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11624 (license license:expat)))
11625
11626 (define-public python2-imagesize
11627 (package-with-python2 python-imagesize))
11628
11629 (define-public python-termstyle
11630 (package
11631 (name "python-termstyle")
11632 (version "0.1.11")
11633 (source
11634 (origin
11635 (method url-fetch)
11636 (uri (pypi-uri "termstyle" version))
11637 (sha256
11638 (base32
11639 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11640 (build-system python-build-system)
11641 (arguments
11642 '(#:phases
11643 (modify-phases %standard-phases
11644 (replace 'check
11645 (lambda _
11646 (invoke "python" "test3.py"))))))
11647 (home-page "https://github.com/gfxmonk/termstyle")
11648 (synopsis "Console text coloring for Python")
11649 (description "This package provides console text coloring for Python.")
11650 (license license:bsd-3)))
11651
11652 (define-public python-argcomplete
11653 (package
11654 (name "python-argcomplete")
11655 (version "1.7.0")
11656 (source
11657 (origin
11658 (method url-fetch)
11659 (uri (pypi-uri "argcomplete" version))
11660 (sha256
11661 (base32
11662 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
11663 (build-system python-build-system)
11664 (native-inputs
11665 `(("python-pexpect" ,python-pexpect)
11666 ("tcsh" ,tcsh)
11667 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
11668 (home-page "https://github.com/kislyuk/argcomplete")
11669 (synopsis "Shell tab completion for Python argparse")
11670 (description "argcomplete provides extensible command line tab completion
11671 of arguments and options for Python scripts using @code{argparse}. It's
11672 particularly useful for programs with many options or sub-parsers that can
11673 dynamically suggest completions; for example, when browsing resources over the
11674 network.")
11675 (license license:asl2.0)))
11676
11677 (define-public python2-argcomplete
11678 (package-with-python2 python-argcomplete))
11679
11680 (define-public python-xopen
11681 (package
11682 (name "python-xopen")
11683 (version "0.5.0")
11684 (source
11685 (origin
11686 (method url-fetch)
11687 (uri (pypi-uri "xopen" version))
11688 (sha256
11689 (base32
11690 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
11691 (build-system python-build-system)
11692 (propagated-inputs
11693 `(("python-setuptools-scm" ,python-setuptools-scm)))
11694 (home-page "https://github.com/marcelm/xopen/")
11695 (synopsis "Open compressed files transparently")
11696 (description "This module provides an @code{xopen} function that works like
11697 Python's built-in @code{open} function, but can also deal with compressed files.
11698 Supported compression formats are gzip, bzip2 and, xz, and are automatically
11699 recognized by their file extensions. The focus is on being as efficient as
11700 possible on all supported Python versions.")
11701 (license license:expat)))
11702
11703 (define-public python2-xopen
11704 (let ((base (package-with-python2
11705 (strip-python2-variant python-xopen))))
11706 (package
11707 (inherit base)
11708 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
11709 ,@(package-propagated-inputs base))))))
11710
11711 (define-public python-cheetah
11712 (package
11713 (name "python-cheetah")
11714 (version "3.1.0")
11715 (source
11716 (origin
11717 (method url-fetch)
11718 (uri (pypi-uri "Cheetah3" version))
11719 (sha256
11720 (base32
11721 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
11722 (build-system python-build-system)
11723 (arguments
11724 `(#:modules ((guix build utils)
11725 (guix build python-build-system)
11726 (ice-9 ftw)
11727 (srfi srfi-1)
11728 (srfi srfi-26))
11729 #:phases (modify-phases %standard-phases
11730 (add-after 'unpack 'use-absolute-python
11731 (lambda _
11732 (substitute* "Cheetah/CheetahWrapper.py"
11733 (("#!/usr/bin/env python")
11734 (string-append "#!" (which "python"))))
11735 #t))
11736 (replace 'check
11737 (lambda _
11738 (let ((cwd (getcwd)))
11739 (setenv "PYTHONPATH"
11740 (string-append
11741 cwd "/build/"
11742 (find (cut string-prefix? "lib" <>)
11743 (scandir (string-append cwd "/build")))
11744 ":" (getenv "PYTHONPATH")))
11745 (setenv "PATH"
11746 (string-append (getenv "PATH")
11747 ":" cwd "/bin"))
11748 (setenv "TMPDIR" "/tmp")
11749
11750 (substitute* "Cheetah/Tests/Test.py"
11751 (("unittest.TextTestRunner\\(\\)")
11752 "unittest.TextTestRunner(verbosity=2)"))
11753
11754 (invoke "python" "Cheetah/Tests/Test.py")))))))
11755 (propagated-inputs
11756 `(("python-markdown" ,python-markdown))) ;optional
11757 (home-page "http://cheetahtemplate.org/")
11758 (synopsis "Template engine")
11759 (description "Cheetah is a text-based template engine and Python code
11760 generator.
11761
11762 Cheetah can be used as a standalone templating utility or referenced as
11763 a library from other Python applications. It has many potential uses,
11764 but web developers looking for a viable alternative to ASP, JSP, PHP and
11765 PSP are expected to be its principle user group.
11766
11767 Features:
11768 @enumerate
11769 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
11770 text-based format.
11771 @item Cleanly separates content, graphic design, and program code.
11772 @item Blends the power and flexibility of Python with a simple template language
11773 that non-programmers can understand.
11774 @item Gives template writers full access to any Python data structure, module,
11775 function, object, or method in their templates.
11776 @item Makes code reuse easy by providing an object-orientated interface to
11777 templates that is accessible from Python code or other Cheetah templates.
11778 One template can subclass another and selectively reimplement sections of it.
11779 @item Provides a simple, yet powerful, caching mechanism that can dramatically
11780 improve the performance of a dynamic website.
11781 @item Compiles templates into optimized, yet readable, Python code.
11782 @end enumerate")
11783 (license (license:x11-style "file://LICENSE"))))
11784
11785 (define-public python2-cheetah
11786 (package-with-python2 python-cheetah))
11787
11788 (define-public python-dulwich
11789 (package
11790 (name "python-dulwich")
11791 (version "0.18.6")
11792 (source
11793 (origin
11794 (method url-fetch)
11795 (uri (list (string-append "https://www.dulwich.io/releases/"
11796 "dulwich-" version ".tar.gz")
11797 (pypi-uri "dulwich" version)))
11798 (sha256
11799 (base32
11800 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
11801 (build-system python-build-system)
11802 (arguments
11803 `(#:phases
11804 (modify-phases %standard-phases
11805 (add-before 'check 'fix-tests
11806 (lambda* (#:key inputs #:allow-other-keys)
11807 ;; The tests use Popen with a custom environment which doesn't
11808 ;; include PATH.
11809 (substitute* "dulwich/tests/compat/utils.py"
11810 (("'git'") (string-append "'"
11811 (which "git")
11812 "'")))
11813 (substitute* '("dulwich/tests/test_repository.py"
11814 "dulwich/tests/test_hooks.py")
11815 (("#!/bin/sh") (string-append "#!" (which "sh"))))
11816 (setenv "TEST_RUNNER" "unittest")
11817 (setenv "PYTHONHASHSEED" "random")
11818 #t)))))
11819 (propagated-inputs
11820 `(("python-fastimport" ,python-fastimport)))
11821 (native-inputs
11822 `(("python-mock" ,python-mock)
11823 ("python-geventhttpclient" ,python-geventhttpclient)
11824 ("git" ,git)))
11825 (home-page "https://www.dulwich.io/")
11826 (synopsis "Git implementation in Python")
11827 (description "Dulwich is an implementation of the Git file formats and
11828 protocols written in pure Python.")
11829 ;; Can be used with either license.
11830 (license (list license:asl2.0 license:gpl2+))))
11831
11832 (define-public python2-dulwich
11833 (package-with-python2 python-dulwich))
11834
11835 (define-public python-pbkdf2
11836 (package
11837 (name "python-pbkdf2")
11838 (version "1.3")
11839 (source
11840 (origin
11841 (method url-fetch)
11842 (uri (pypi-uri "pbkdf2" version))
11843 (sha256
11844 (base32
11845 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
11846 (build-system python-build-system)
11847 (arguments
11848 '(#:phases
11849 (modify-phases %standard-phases
11850 (replace 'check
11851 (lambda _
11852 (setenv "PYTHONPATH"
11853 (string-append (getcwd) "/build/lib:"
11854 (getenv "PYTHONPATH")))
11855 (invoke "python" "test/test_pbkdf2.py"))))))
11856 (propagated-inputs
11857 `(("python-pycrypto" ,python-pycrypto))) ; optional
11858 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
11859 (synopsis "Password-based key derivation")
11860 (description "This module implements the password-based key derivation
11861 function, PBKDF2, specified in RSA PKCS#5 v2.0.
11862
11863 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
11864 is part of the RSA Public Key Cryptography Standards series. The provided
11865 implementation takes a password or a passphrase and a salt value (and
11866 optionally a iteration count, a digest module, and a MAC module) and provides
11867 a file-like object from which an arbitrarly-sized key can be read.")
11868 (license license:expat)))
11869
11870 (define-public python2-pbkdf2
11871 (package-with-python2 python-pbkdf2))
11872
11873 (define-public python-qrcode
11874 (package
11875 (name "python-qrcode")
11876 (version "6.1")
11877 (source
11878 (origin
11879 (method url-fetch)
11880 (uri (pypi-uri "qrcode" version))
11881 (sha256
11882 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
11883 (build-system python-build-system)
11884 (arguments
11885 ;; FIXME: Tests require packaging 'pymaging'.
11886 '(#:tests? #f))
11887 (propagated-inputs
11888 `(("python-lxml" ,python-lxml) ; for SVG output
11889 ("python-pillow" ,python-pillow) ; for PNG output
11890 ("python-six" ,python-six)))
11891 (home-page "https://github.com/lincolnloop/python-qrcode")
11892 (synopsis "QR Code image generator")
11893 (description "This package provides a pure Python QR Code generator
11894 module. It uses the Python Imaging Library (PIL) to allow for the generation
11895 of QR Codes.
11896
11897 In addition this package provides a command line tool to generate QR codes and
11898 either write these QR codes to a file or do the output as ascii art at the
11899 console.")
11900 (license license:bsd-3)))
11901
11902 (define-public python2-qrcode
11903 (package-with-python2 python-qrcode))
11904
11905 (define-public python-rst2ansi
11906 (package
11907 (name "python-rst2ansi")
11908 (version "0.1.5")
11909 (source
11910 (origin
11911 (method url-fetch)
11912 (uri (pypi-uri "rst2ansi" version))
11913 (sha256
11914 (base32
11915 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
11916 (build-system python-build-system)
11917 (propagated-inputs
11918 `(("python-docutils" ,python-docutils)))
11919 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
11920 (synopsis "Convert RST to ANSI-decorated console output")
11921 (description
11922 "Python module dedicated to rendering RST (reStructuredText) documents
11923 to ansi-escaped strings suitable for display in a terminal.")
11924 (license license:expat)))
11925
11926 (define-public python-ansi2html
11927 (package
11928 (name "python-ansi2html")
11929 (version "1.2.0")
11930 (source
11931 (origin
11932 (method url-fetch)
11933 (uri (pypi-uri "ansi2html" version))
11934 (sha256
11935 (base32
11936 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
11937 (build-system python-build-system)
11938 (native-inputs
11939 `(("python-mock" ,python-mock)
11940 ("python-nose" ,python-nose)))
11941 (propagated-inputs
11942 `(("python-six" ,python-six)))
11943 (home-page "https://github.com/ralphbean/ansi2html")
11944 (synopsis "Convert ANSI-decorated console output to HTML")
11945 (description
11946 "@command{ansi2html} is a Python library and command line utility for
11947 convering text with ANSI color codes to HTML or LaTeX.")
11948 (license license:gpl3+)))
11949
11950 (define-public python2-ansi2html
11951 (package-with-python2 python-ansi2html))
11952
11953 (define-public python-ddt
11954 (package
11955 (name "python-ddt")
11956 (version "1.1.3")
11957 (source
11958 (origin
11959 (method url-fetch)
11960 (uri (pypi-uri "ddt" version))
11961 (sha256
11962 (base32
11963 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
11964 (build-system python-build-system)
11965 (native-inputs
11966 `(("python-mock" ,python-mock)
11967 ("python-nose" ,python-nose)))
11968 (propagated-inputs
11969 `(("python-six" ,python-six)
11970 ("python-pyyaml" ,python-pyyaml)))
11971 (home-page "https://github.com/txels/ddt")
11972 (synopsis "Data-Driven Tests")
11973 (description
11974 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
11975 running it with different test data, and make it appear as multiple test
11976 cases.")
11977 (license license:expat)))
11978
11979 (define-public python2-ddt
11980 (package-with-python2 python-ddt))
11981
11982 (define-public python-pycountry
11983 (package
11984 (name "python-pycountry")
11985 (version "18.5.26")
11986 (source
11987 (origin
11988 (method url-fetch)
11989 (uri (pypi-uri "pycountry" version))
11990 (sha256
11991 (base32
11992 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
11993 (build-system python-build-system)
11994 (home-page "https://bitbucket.org/flyingcircus/pycountry")
11995 (synopsis "ISO databases for languages, countries, currencies, etc.")
11996 (description
11997 "@code{pycountry} provides the ISO databases for the standards:
11998 @enumerate
11999 @item 639-3 (Languages)
12000 @item 3166 (Countries)
12001 @item 3166-3 (Deleted Countries)
12002 @item 3166-2 (Subdivisions of countries)
12003 @item 4217 (Currencies)
12004 @item 15924 (Scripts)
12005 @end enumerate
12006 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
12007 through a Python API.")
12008 (license license:lgpl2.1+)))
12009
12010 (define-public python2-pycountry
12011 (package-with-python2 python-pycountry))
12012
12013 (define-public python-pycosat
12014 (package
12015 (name "python-pycosat")
12016 (version "0.6.1")
12017 (source
12018 (origin
12019 (method url-fetch)
12020 (uri (pypi-uri "pycosat" version))
12021 (sha256
12022 (base32
12023 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
12024 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
12025 (build-system python-build-system)
12026 (home-page "https://github.com/ContinuumIO/pycosat")
12027 (synopsis "Bindings to picosat (a SAT solver)")
12028 (description
12029 "This package provides efficient Python bindings to @code{picosat} on
12030 the C level. When importing pycosat, the @code{picosat} solver becomes part
12031 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
12032 Problem} (SAT) solver.")
12033 (license license:expat)))
12034
12035 (define-public python2-pycosat
12036 (package-with-python2 python-pycosat))
12037
12038 (define-public python2-ruamel.ordereddict
12039 (package
12040 (name "python2-ruamel.ordereddict")
12041 (version "0.4.9")
12042 (source
12043 (origin
12044 (method url-fetch)
12045 (uri (pypi-uri "ruamel.ordereddict" version))
12046 (sha256
12047 (base32
12048 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
12049 (build-system python-build-system)
12050 (arguments
12051 `(#:python ,python-2
12052 #:phases
12053 (modify-phases %standard-phases
12054 (delete 'check)
12055 (add-after 'install 'check
12056 (lambda* (#:key inputs outputs #:allow-other-keys)
12057 (add-installed-pythonpath inputs outputs)
12058 (invoke "python" "test/testordereddict.py"))))))
12059 (home-page "https://bitbucket.org/ruamel/ordereddict")
12060 (synopsis "Version of dict that keeps keys in insertion order")
12061 (description
12062 "This is an implementation of an ordered dictionary with @dfn{Key
12063 Insertion Order} (KIO: updates of values do not affect the position of the
12064 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
12065 removed and put at the back). The standard library module @code{OrderedDict},
12066 implemented later, implements a subset of @code{ordereddict} functionality.
12067 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
12068 Order} (KSO, no sorting function can be specified, but a transform can be
12069 specified to apply on the key before comparison (e.g. @code{string.lower})).")
12070 (license license:expat)))
12071
12072 (define-public python-pypeg2
12073 (package
12074 (name "python-pypeg2")
12075 (version "2.15.2")
12076 (source
12077 (origin
12078 (method url-fetch)
12079 (uri (pypi-uri "pyPEG2" version))
12080 (sha256
12081 (base32
12082 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
12083 (build-system python-build-system)
12084 (propagated-inputs `(("python-lxml" ,python-lxml)))
12085 (arguments
12086 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
12087 '(#:tests? #f))
12088 (home-page "https://fdik.org/pyPEG/")
12089 (synopsis "Parsering Expression Grammars in Python")
12090 (description "PyPEG is an intrinsic parser interpreter framework for
12091 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
12092 parse many formal languages.")
12093 (license license:gpl2)))
12094
12095 (define-public python-incremental
12096 (package
12097 (name "python-incremental")
12098 (version "17.5.0")
12099 (source
12100 (origin
12101 (method url-fetch)
12102 (uri (pypi-uri "incremental" version))
12103 (sha256
12104 (base32
12105 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
12106 (build-system python-build-system)
12107 (home-page "https://github.com/hawkowl/incremental")
12108 (synopsis "Library for versioning Python projects")
12109 (description "Incremental is a small library that versions your Python
12110 projects.")
12111 (license license:expat)))
12112
12113 (define-public python2-incremental
12114 (package-with-python2 python-incremental))
12115
12116 (define-public python-invoke
12117 (package
12118 (name "python-invoke")
12119 (home-page "http://www.pyinvoke.org/")
12120 (version "1.1.0")
12121 (source (origin
12122 (method url-fetch)
12123 (uri (pypi-uri "invoke" version))
12124 (sha256
12125 (base32
12126 "0aiy1xvk1f91246zxd1zqrm679vdvd10h843a2na41cqr3cflpi6"))))
12127 (build-system python-build-system)
12128 (arguments
12129 ;; XXX: Requires many dependencies that are not yet in Guix.
12130 `(#:tests? #f))
12131 (synopsis "Pythonic task execution")
12132 (description
12133 "Invoke is a Python task execution tool and library, drawing inspiration
12134 from various sources to arrive at a powerful and clean feature set. It is
12135 evolved from the Fabric project, but focuses on local and abstract concerns
12136 instead of servers and network commands.")
12137 (license license:bsd-3)))
12138
12139 (define-public python2-invoke
12140 (package-with-python2 python-invoke))
12141
12142 (define-public python-automat
12143 (package
12144 (name "python-automat")
12145 (version "0.7.0")
12146 (source (origin
12147 (method url-fetch)
12148 (uri (pypi-uri "Automat" version))
12149 (sha256
12150 (base32
12151 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
12152 (build-system python-build-system)
12153 ;; We disable the tests because they require python-twisted, while
12154 ;; python-twisted depends on python-automat. Twisted is optional, but the
12155 ;; tests fail if it is not available. Also see
12156 ;; <https://github.com/glyph/automat/issues/71>.
12157 (arguments '(#:tests? #f))
12158 (native-inputs
12159 `(("python-m2r" ,python-m2r)
12160 ("python-setuptools-scm" ,python-setuptools-scm)
12161 ("python-graphviz" ,python-graphviz)))
12162 (propagated-inputs
12163 `(("python-six" ,python-six)
12164 ("python-attrs" ,python-attrs)))
12165 (home-page "https://github.com/glyph/Automat")
12166 (synopsis "Self-service finite-state machines")
12167 (description "Automat is a library for concise, idiomatic Python
12168 expression of finite-state automata (particularly deterministic finite-state
12169 transducers).")
12170 (license license:expat)))
12171
12172 (define-public python2-automat
12173 (package-with-python2 python-automat))
12174
12175 (define-public python-m2r
12176 (package
12177 (name "python-m2r")
12178 (version "0.2.1")
12179 (source (origin
12180 (method url-fetch)
12181 (uri (pypi-uri "m2r" version))
12182 (sha256
12183 (base32
12184 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
12185 (build-system python-build-system)
12186 (propagated-inputs
12187 `(("python-docutils" ,python-docutils)
12188 ("python-mistune" ,python-mistune)))
12189 (native-inputs
12190 `(("python-pygments" ,python-pygments)
12191 ("python-mock" ,python-mock)))
12192 (home-page "https://github.com/miyakogi/m2r")
12193 (synopsis "Markdown to reStructuredText converter")
12194 (description "M2R converts a markdown file including reST markups to valid
12195 reST format.")
12196 (license license:expat)))
12197
12198 (define-public python2-m2r
12199 (package-with-python2 python-m2r))
12200
12201 (define-public python-constantly
12202 (package
12203 (name "python-constantly")
12204 (version "15.1.0")
12205 (source (origin
12206 (method url-fetch)
12207 (uri (pypi-uri "constantly" version))
12208 (sha256
12209 (base32
12210 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
12211 (build-system python-build-system)
12212 (home-page "https://github.com/twisted/constantly")
12213 (synopsis "Symbolic constants in Python")
12214 (description "Constantly is a Python library that provides symbolic
12215 constant support. It includes collections and constants with text, numeric,
12216 and bit flag values.")
12217 (license license:expat)))
12218
12219 (define-public python2-constantly
12220 (package-with-python2 python-constantly))
12221
12222 (define-public python-attrs
12223 (package
12224 (name "python-attrs")
12225 (version "19.1.0")
12226 (source (origin
12227 (method url-fetch)
12228 (uri (pypi-uri "attrs" version))
12229 (sha256
12230 (base32
12231 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
12232 (build-system python-build-system)
12233 (arguments
12234 `(#:modules ((guix build utils)
12235 (guix build python-build-system)
12236 (ice-9 ftw)
12237 (srfi srfi-1)
12238 (srfi srfi-26))
12239 #:phases (modify-phases %standard-phases
12240 (replace 'check
12241 (lambda _
12242 (let ((cwd (getcwd)))
12243 (setenv "PYTHONPATH"
12244 (string-append
12245 cwd "/build/"
12246 (find (cut string-prefix? "lib" <>)
12247 (scandir (string-append cwd "/build")))
12248 ":"
12249 (getenv "PYTHONPATH")))
12250 (invoke "python" "-m" "pytest")))))))
12251 (native-inputs
12252 `(("python-coverage" ,python-coverage)
12253 ("python-hypothesis" ,python-hypothesis)
12254 ("python-pympler" ,python-pympler)
12255 ("python-pytest" ,python-pytest)
12256 ("python-six" ,python-six)
12257 ("python-sphinx" ,python-sphinx)
12258 ("python-zope-interface" ,python-zope-interface)))
12259 (home-page "https://github.com/python-attrs/attrs/")
12260 (synopsis "Attributes without boilerplate")
12261 (description "@code{attrs} is a Python package with class decorators that
12262 ease the chores of implementing the most common attribute-related object
12263 protocols.")
12264 (license license:expat)))
12265
12266 (define-public python2-attrs
12267 (package-with-python2 python-attrs))
12268
12269 (define-public python-attrs-bootstrap
12270 (package
12271 (inherit python-attrs)
12272 (name "python-attrs-bootstrap")
12273 (native-inputs `())
12274 (arguments `(#:tests? #f))))
12275
12276 (define-public python2-attrs-bootstrap
12277 (package-with-python2 python-attrs-bootstrap))
12278
12279 (define-public python2-cliapp
12280 (package
12281 (name "python2-cliapp")
12282 (version "1.20180812.1")
12283 (source
12284 (origin
12285 (method url-fetch)
12286 (uri (string-append
12287 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
12288 version ".tar.gz"))
12289 (sha256
12290 (base32
12291 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
12292 (build-system python-build-system)
12293 (arguments
12294 `(#:python ,python-2
12295 #:phases
12296 (modify-phases %standard-phases
12297 ;; check phase needs to be run before the build phase. If not,
12298 ;; coverage-test-runner looks for tests for the built source files,
12299 ;; and fails.
12300 (delete 'check)
12301 (add-before 'build 'check
12302 (lambda _
12303 ;; Disable python3 tests
12304 (substitute* "check"
12305 (("python3") "# python3"))
12306 (invoke "./check"))))))
12307 (native-inputs
12308 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12309 ("python2-pep8" ,python2-pep8)))
12310 (propagated-inputs
12311 `(("python2-pyaml" ,python2-pyaml)))
12312 (home-page "https://liw.fi/cliapp/")
12313 (synopsis "Python framework for command line programs")
12314 (description "@code{python2-cliapp} is a python framework for
12315 command line programs. It contains the typical stuff such programs
12316 need to do, such as parsing the command line for options, and
12317 iterating over input files.")
12318 (license license:gpl2+)))
12319
12320 (define-public python2-ttystatus
12321 (package
12322 (name "python2-ttystatus")
12323 (version "0.36")
12324 (source
12325 (origin
12326 (method url-fetch)
12327 (uri (string-append
12328 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
12329 version ".tar.gz"))
12330 (sha256
12331 (base32
12332 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
12333 (build-system python-build-system)
12334 (native-inputs
12335 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12336 ("python2-pep8" ,python2-pep8)))
12337 (arguments
12338 `(#:python ,python-2
12339 #:phases
12340 (modify-phases %standard-phases
12341 ;; check phase needs to be run before the build phase. If not,
12342 ;; coverage-test-runner looks for tests for the built source files,
12343 ;; and fails.
12344 (delete 'check)
12345 (add-before 'build 'check
12346 (lambda _ (invoke "make" "check"))))))
12347 (home-page "https://liw.fi/ttystatus/")
12348 (synopsis "Python library for showing progress reporting and
12349 status updates on terminals")
12350 (description "@code{python2-ttystatus} is a python library for
12351 showing progress reporting and status updates on terminals, for
12352 command line programs. Output is automatically adapted to the width
12353 of the terminal: truncated if it does not fit, and resized if the
12354 terminal size changes.")
12355 (license license:gpl3+)))
12356
12357 (define-public python2-tracing
12358 (package
12359 (name "python2-tracing")
12360 (version "0.10")
12361 (source
12362 (origin
12363 (method url-fetch)
12364 (uri (string-append
12365 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
12366 version ".tar.gz"))
12367 (sha256
12368 (base32
12369 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
12370 (build-system python-build-system)
12371 (arguments
12372 `(#:python ,python-2))
12373 (home-page "https://liw.fi/tracing/")
12374 (synopsis "Python debug logging helper")
12375 (description "@code{python2-tracing} is a python library for
12376 logging debug messages. It provides a way to turn debugging messages
12377 on and off, based on the filename they occur in. It is much faster
12378 than using @code{logging.Filter} to accomplish the same thing, which
12379 matters when code is run in production mode. The actual logging still
12380 happens using the @code{logging} library.")
12381 (license license:gpl3+)))
12382
12383 (define-public python2-larch
12384 (package
12385 (name "python2-larch")
12386 (version "1.20151025")
12387 (source
12388 (origin
12389 (method url-fetch)
12390 (uri (string-append
12391 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12392 version ".tar.gz"))
12393 (patches (search-patches
12394 "python2-larch-coverage-4.0a6-compatibility.patch"))
12395 (sha256
12396 (base32
12397 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12398 (build-system python-build-system)
12399 (arguments
12400 `(#:python ,python-2
12401 #:phases
12402 (modify-phases %standard-phases
12403 ;; check phase needs to be run before the build phase. If not,
12404 ;; coverage-test-runner looks for tests for the built source files,
12405 ;; and fails.
12406 (delete 'check)
12407 (add-before 'build 'check
12408 (lambda _ (invoke "make" "check"))))))
12409 (native-inputs
12410 `(("cmdtest" ,cmdtest)
12411 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12412 (propagated-inputs
12413 `(("python2-tracing" ,python2-tracing)))
12414 (home-page "https://liw.fi/larch/")
12415 (synopsis "Python copy-on-write B-tree library")
12416 (description "@code{python2-larch} is an implementation of
12417 particular kind of B-tree, based on research by Ohad Rodeh. See
12418 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12419 on the data structure.
12420
12421 The distinctive feature of this B-tree is that a node is never
12422 (conceptually) modified. Instead, all updates are done by
12423 copy-on-write. This makes it easy to clone a tree, and modify only the
12424 clone, while other processes access the original tree.")
12425 (license license:gpl3+)))
12426
12427 (define-public python-astroid
12428 (package
12429 (name "python-astroid")
12430 (version "2.1.0")
12431 (source
12432 (origin
12433 (method url-fetch)
12434 (uri (pypi-uri "astroid" version))
12435 (sha256
12436 (base32
12437 "08hz675knh4294bancdapql392fmbjyimhbyrmfkz1ka7l035c1m"))))
12438 (build-system python-build-system)
12439 (propagated-inputs
12440 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12441 ("python-six" ,python-six)
12442 ("python-wrapt" ,python-wrapt)))
12443 (native-inputs
12444 `(("python-dateutil" ,python-dateutil)
12445 ("python-nose" ,python-nose)
12446 ("python-pytest" ,python-pytest)
12447 ("python-pytest-runner" ,python-pytest-runner)))
12448 (arguments
12449 `(#:phases
12450 (modify-phases %standard-phases
12451 (add-after 'unpack 'remove-spurious-test
12452 (lambda _
12453 ;; This can be removed after upgrading from python-3.7
12454 ;; https://github.com/PyCQA/astroid/issues/593
12455 ;; https://bugs.python.org/issue34056
12456 (delete-file "astroid/tests/unittest_modutils.py")
12457 #t))
12458 (replace 'check
12459 (lambda _
12460 (invoke "pytest" "astroid"))))))
12461 (home-page "https://github.com/PyCQA/astroid")
12462 (synopsis "Common base representation of python source code for pylint and
12463 other projects")
12464 (description "@code{python-astroid} provides a common base representation
12465 of python source code for projects such as pychecker, pyreverse, pylint, etc.
12466
12467 It provides a compatible representation which comes from the _ast module. It
12468 rebuilds the tree generated by the builtin _ast module by recursively walking
12469 down the AST and building an extended ast. The new node classes have
12470 additional methods and attributes for different usages. They include some
12471 support for static inference and local name scopes. Furthermore, astroid
12472 builds partial trees by inspecting living objects.")
12473 (license license:lgpl2.1+)
12474 (properties `((python2-variant . ,(delay python2-astroid))))))
12475
12476 (define-public python2-astroid
12477 (let ((base (package-with-python2
12478 (strip-python2-variant python-astroid))))
12479 (package (inherit base)
12480 ;; Version 2.x removes python2 support.
12481 (version "1.6.5")
12482 (source
12483 (origin
12484 (method url-fetch)
12485 (uri (pypi-uri "astroid" version))
12486 (sha256
12487 (base32
12488 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12489 (arguments
12490 (substitute-keyword-arguments (package-arguments base)
12491 ((#:phases phases)
12492 `(modify-phases ,phases
12493 (add-after 'unpack 'remove-spurious-test
12494 (lambda _
12495 ;; https://github.com/PyCQA/astroid/issues/276
12496 (delete-file "astroid/tests/unittest_brain.py")
12497 #t))
12498 (replace 'check
12499 (lambda _
12500 (invoke"python" "-m" "unittest" "discover"
12501 "-p" "unittest*.py")))))))
12502 (native-inputs `())
12503 (propagated-inputs
12504 `(("python2-backports-functools-lru-cache"
12505 ,python2-backports-functools-lru-cache)
12506 ("python2-enum34" ,python2-enum34)
12507 ("python2-singledispatch" ,python2-singledispatch)
12508 ,@(package-propagated-inputs base))))))
12509
12510 (define-public python-isort
12511 (package
12512 (name "python-isort")
12513 (version "4.3.4")
12514 (source
12515 (origin
12516 (method git-fetch)
12517 (uri (git-reference
12518 ;; Tests pass only from the Github sources
12519 (url "https://github.com/timothycrosley/isort")
12520 (commit version)))
12521 (file-name (git-file-name name version))
12522 (sha256
12523 (base32
12524 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
12525 (build-system python-build-system)
12526 (native-inputs
12527 `(("python-mock" ,python-mock)
12528 ("python-pytest" ,python-pytest)))
12529 (home-page "https://github.com/timothycrosley/isort")
12530 (synopsis "Python utility/library to sort python imports")
12531 (description "@code{python-isort} is a python utility/library to sort
12532 imports alphabetically, and automatically separated into sections. It
12533 provides a command line utility, a python library and plugins for various
12534 editors.")
12535 (license license:expat)
12536 (properties `((python2-variant . ,(delay python2-isort))))))
12537
12538 (define-public python2-isort
12539 (let ((base (package-with-python2
12540 (strip-python2-variant python-isort))))
12541 (package (inherit base)
12542 (native-inputs
12543 `(("python2-futures" ,python2-futures)
12544 ,@(package-native-inputs base))))))
12545
12546 (define-public python2-backports-functools-lru-cache
12547 (package
12548 (name "python2-backports-functools-lru-cache")
12549 (version "1.5")
12550 (source
12551 (origin
12552 (method url-fetch)
12553 ;; only the pypi tarballs contain the necessary metadata
12554 (uri (pypi-uri "backports.functools_lru_cache" version))
12555 (sha256
12556 (base32
12557 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12558 (build-system python-build-system)
12559 (native-inputs
12560 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12561 (arguments
12562 `(#:python ,python-2))
12563 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12564 (synopsis "Backport of functools.lru_cache from Python 3.3")
12565 (description "@code{python2-backports-functools-lru-cache} is a backport
12566 of @code{functools.lru_cache} from python 3.3.")
12567 (license license:expat)))
12568
12569 (define-public python-configparser
12570 (package
12571 (name "python-configparser")
12572 (version "3.7.1")
12573 (source
12574 (origin
12575 (method url-fetch)
12576 (uri (pypi-uri "configparser" version))
12577 (sha256
12578 (base32
12579 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
12580 (build-system python-build-system)
12581 (home-page "https://github.com/jaraco/configparser/")
12582 (synopsis "Backport of configparser from python 3.5")
12583 (description "@code{python-configparser} is a backport of
12584 @code{configparser} from Python 3.5 so that it can be used directly
12585 in other versions.")
12586 (license license:expat)))
12587
12588 (define-public python2-configparser
12589 (package-with-python2 python-configparser))
12590
12591 (define-public python-mando
12592 (package
12593 (name "python-mando")
12594 (version "0.6.4")
12595 (source (origin
12596 (method url-fetch)
12597 (uri (pypi-uri "mando" version))
12598 (sha256
12599 (base32
12600 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12601 (build-system python-build-system)
12602 (propagated-inputs
12603 `(("python-rst2ansi" ,python-rst2ansi)
12604 ("python-six" ,python-six)))
12605 (native-inputs
12606 `(("python-pytest" ,python-pytest)))
12607 (home-page "https://mando.readthedocs.org/")
12608 (synopsis
12609 "Wrapper around argparse, allowing creation of complete CLI applications")
12610 (description
12611 "This package is a wrapper around argparse, allowing you to write complete CLI
12612 applications in seconds while maintaining all the flexibility.")
12613 (license license:expat)))
12614
12615 (define-public python2-mando
12616 (package-with-python2 python-mando))
12617
12618 (define-public python2-argparse
12619 (package
12620 (name "python2-argparse")
12621 (version "1.4.0")
12622 (source
12623 (origin
12624 (method url-fetch)
12625 (uri (pypi-uri "argparse" version))
12626 (sha256
12627 (base32
12628 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12629 (build-system python-build-system)
12630 (arguments
12631 `(#:python ,python-2))
12632 (home-page "https://github.com/ThomasWaldmann/argparse/")
12633 (synopsis "Python command-line parsing library")
12634 (description
12635 "This package is mostly for people who want to have @code{argparse} on
12636 older Pythons because it was not part of the standard library back then.")
12637 (license license:psfl)))
12638
12639 (define-public python-fudge
12640 (package
12641 (name "python-fudge")
12642 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
12643 ;; package, which is currently the only use of this package.
12644 (version "0.9.6")
12645 (source
12646 (origin
12647 (method url-fetch)
12648 (uri (pypi-uri "fudge" version))
12649 (sha256
12650 (base32
12651 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
12652 (build-system python-build-system)
12653 (arguments
12654 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
12655 (home-page "https://github.com/fudge-py/fudge")
12656 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
12657 (description
12658 "Fudge is a Python module for using fake objects (mocks and stubs) to
12659 test real ones.
12660
12661 In readable Python code, you declare the methods available on your fake object
12662 and how they should be called. Then you inject that into your application and
12663 start testing. This declarative approach means you don’t have to record and
12664 playback actions and you don’t have to inspect your fakes after running code.
12665 If the fake object was used incorrectly then you’ll see an informative
12666 exception message with a traceback that points to the culprit.")
12667 (license license:expat)))
12668
12669 (define-public python2-fudge
12670 (package-with-python2 python-fudge))
12671
12672 (define-public python-mwclient
12673 (package
12674 (name "python-mwclient")
12675 (version "0.8.4")
12676 (source
12677 (origin
12678 (method url-fetch)
12679 ;; The PyPI version wouldn't contain tests.
12680 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
12681 "v" version ".tar.gz"))
12682 (file-name (string-append name "-" version ".tar.gz"))
12683 (sha256
12684 (base32
12685 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
12686 (build-system python-build-system)
12687 (propagated-inputs
12688 `(("python-requests" ,python-requests)
12689 ("python-requests-oauthlib"
12690 ,python-requests-oauthlib)
12691 ("python-six" ,python-six)))
12692 (native-inputs
12693 `(("python-mock" ,python-mock)
12694 ("python-pytest" ,python-pytest)
12695 ("python-pytest-pep8" ,python-pytest-pep8)
12696 ("python-pytest-cache" ,python-pytest-cache)
12697 ("python-pytest-cov" ,python-pytest-cov)
12698 ("python-responses" ,python-responses)))
12699 (home-page "https://github.com/btongminh/mwclient")
12700 (synopsis "MediaWiki API client")
12701 (description "This package provides a MediaWiki API client.")
12702 (license license:expat)))
12703
12704 (define-public python2-mwclient
12705 (package-with-python2 python-mwclient))
12706
12707 (define-public python-utils
12708 (package
12709 (name "python-utils")
12710 (version "2.1.0")
12711 (source (origin
12712 (method url-fetch)
12713 (uri (pypi-uri "python-utils" version))
12714 (sha256
12715 (base32
12716 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
12717 (build-system python-build-system)
12718 (native-inputs
12719 `(("pytest-runner" ,python-pytest-runner)
12720 ("pytest" ,python-pytest)
12721 ("six" ,python-six)))
12722 (home-page "https://github.com/WoLpH/python-utils")
12723 (synopsis "Convenient utilities not included with the standard Python install")
12724 (description
12725 "Python Utils is a collection of small Python functions and classes which
12726 make common patterns shorter and easier.")
12727 (license license:bsd-2)))
12728
12729 (define-public python2-utils
12730 (package-with-python2 python-utils))
12731
12732 (define-public python-diff-match-patch
12733 (package
12734 (name "python-diff-match-patch")
12735 (version "20121119")
12736 (source
12737 (origin
12738 (method url-fetch)
12739 (uri (pypi-uri "diff-match-patch" version))
12740 (sha256
12741 (base32
12742 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
12743 (build-system python-build-system)
12744 (home-page "https://code.google.com/p/google-diff-match-patch")
12745 (synopsis "Synchronize plain text")
12746 (description "Diff Match and Patch libraries offer robust algorithms to
12747 perform the operations required for synchronizing plain text.")
12748 (license license:asl2.0)))
12749
12750 (define-public python2-diff-match-patch
12751 (package-with-python2 python-diff-match-patch))
12752
12753 (define-public python-dirsync
12754 (package
12755 (name "python-dirsync")
12756 (version "2.2.3")
12757 (source
12758 (origin
12759 (method url-fetch)
12760 (uri (pypi-uri "dirsync" version))
12761 (sha256
12762 (base32
12763 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
12764 (build-system python-build-system)
12765 (propagated-inputs
12766 `(("six" ,python-six)))
12767 (home-page "https://bitbucket.org/tkhyn/dirsync")
12768 (synopsis "Advanced directory tree synchronisation tool")
12769 (description "Advanced directory tree synchronisation tool.")
12770 (license license:expat)))
12771
12772 (define-public python2-dirsync
12773 (package-with-python2 python-dirsync))
12774
12775 (define-public python-levenshtein
12776 (package
12777 (name "python-levenshtein")
12778 (version "0.12.0")
12779 (source
12780 (origin
12781 (method url-fetch)
12782 (uri (pypi-uri "python-Levenshtein" version))
12783 (sha256
12784 (base32
12785 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
12786 (build-system python-build-system)
12787 (home-page "https://github.com/ztane/python-Levenshtein")
12788 (synopsis "Fast computation of Levenshtein distance and string similarity")
12789 (description
12790 "The Levenshtein Python C extension module contains functions for fast computation of
12791 @enumerate
12792 @item Levenshtein (edit) distance, and edit operations
12793 @item string similarity
12794 @item approximate median strings, and generally string averaging
12795 @item string sequence and set similarity
12796 @end enumerate
12797 It supports both normal and Unicode strings.")
12798 (license license:gpl2+)))
12799
12800 (define-public python2-levenshtein
12801 (package-with-python2 python-levenshtein))
12802
12803 (define-public python-scandir
12804 (package
12805 (name "python-scandir")
12806 (version "1.9.0")
12807 (source
12808 (origin
12809 (method url-fetch)
12810 (uri (pypi-uri "scandir" version))
12811 (sha256
12812 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
12813 (build-system python-build-system)
12814 (arguments
12815 `(#:phases (modify-phases %standard-phases
12816 (replace 'check
12817 (lambda _
12818 (invoke "python" "test/run_tests.py"))))))
12819 (home-page "https://github.com/benhoyt/scandir")
12820 (synopsis "Directory iteration function")
12821 (description
12822 "Directory iteration function like os.listdir(), except that instead of
12823 returning a list of bare filenames, it yields DirEntry objects that include
12824 file type and stat information along with the name. Using scandir() increases
12825 the speed of os.walk() by 2-20 times (depending on the platform and file
12826 system) by avoiding unnecessary calls to os.stat() in most cases.
12827
12828 This package is part of the Python standard library since version 3.5.")
12829 (license license:bsd-3)))
12830
12831 (define-public python2-scandir
12832 (package-with-python2 python-scandir))
12833
12834 (define-public python2-stemming
12835 (package
12836 (name "python2-stemming")
12837 (version "1.0.1")
12838 (source
12839 (origin
12840 (method url-fetch)
12841 (uri (pypi-uri "stemming" version))
12842 (sha256
12843 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
12844 (build-system python-build-system)
12845 (arguments
12846 `(#:python ,python-2))
12847 (home-page "https://bitbucket.org/mchaput/stemming/overview")
12848 (synopsis "Python implementations of various stemming algorithms")
12849 (description
12850 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
12851 stemming algorithms for English. These implementations are straightforward and
12852 efficient, unlike some Python versions of the same algorithms available on the
12853 Web. This package is an extraction of the stemming code included in the Whoosh
12854 search engine.")
12855 (license license:public-domain)))
12856
12857 (define-public python-factory-boy
12858 (package
12859 (name "python-factory-boy")
12860 (version "2.8.1")
12861 (source
12862 (origin
12863 (method url-fetch)
12864 (uri (pypi-uri "factory_boy" version))
12865 (sha256
12866 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
12867 (build-system python-build-system)
12868 (arguments
12869 ;; Tests are not included in the tarball.
12870 `(#:tests? #f))
12871 (propagated-inputs
12872 `(("faker" ,python-faker)))
12873 (home-page "https://github.com/benhoyt/scandir")
12874 (synopsis "Versatile test fixtures replacement")
12875 (description
12876 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
12877
12878 As a fixtures replacement tool, it aims to replace static, hard to maintain
12879 fixtures with easy-to-use factories for complex object.
12880
12881 Instead of building an exhaustive test setup with every possible combination
12882 of corner cases, factory_boy allows you to use objects customized for the
12883 current test, while only declaring the test-specific fields")
12884 (license license:expat)))
12885
12886 (define-public python2-factory-boy
12887 (package-with-python2 python-factory-boy))
12888
12889 (define-public python-translate-toolkit
12890 (package
12891 (name "python-translate-toolkit")
12892 (version "2.1.0")
12893 (source
12894 (origin
12895 (method url-fetch)
12896 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
12897 (sha256
12898 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
12899 (build-system python-build-system)
12900 (native-inputs
12901 `(("python-pytest" ,python-pytest)
12902 ("python-sphinx" ,python-sphinx)))
12903 (propagated-inputs
12904 `(("python-babel" ,python-babel)
12905 ("python-beautifulsoup4" ,python-beautifulsoup4)
12906 ("python-chardet" ,python-chardet)
12907 ("python-diff-match-patch" ,python-diff-match-patch)
12908 ("python-levenshtein" ,python-levenshtein)
12909 ("python-lxml" ,python-lxml)
12910 ("python-six" ,python-six)
12911 ("python-vobject" ,python-vobject)
12912 ("python-pyyaml" ,python-pyyaml)))
12913 (arguments
12914 ;; TODO: tests are not run, because they end with
12915 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
12916 ;; 'parse_funcs'
12917 ;; during test setup.
12918 `(#:tests? #f))
12919 (home-page "https://toolkit.translatehouse.org")
12920 (synopsis "Tools and API for translation and localization engineering")
12921 (description
12922 "Tools and API for translation and localization engineering. It contains
12923 several utilities, as well as an API for building localization tools.")
12924 (license license:gpl2+)))
12925
12926 (define-public python2-translate-toolkit
12927 (package-with-python2 python-translate-toolkit))
12928
12929 (define-public python-packaging
12930 (package
12931 (name "python-packaging")
12932 (version "19.0")
12933 (source
12934 (origin
12935 (method url-fetch)
12936 (uri (pypi-uri "packaging" version))
12937 (sha256
12938 (base32
12939 "1brjhygq9dz6x1kdljivkjfldi3qf5rbkqgck1bpgv9qpv8ab60c"))))
12940 (build-system python-build-system)
12941 (arguments
12942 `(#:phases (modify-phases %standard-phases
12943 (replace 'check
12944 (lambda _ (invoke "py.test" "-vv"))))))
12945 (native-inputs
12946 `(("python-pretend" ,python-pretend)
12947 ("python-pytest" ,python-pytest)))
12948 (propagated-inputs
12949 `(("python-pyparsing" ,python-pyparsing)
12950 ("python-six" ,python-six)))
12951 (home-page "https://github.com/pypa/packaging")
12952 (synopsis "Core utilities for Python packages")
12953 (description "Packaging is a Python module for dealing with Python packages.
12954 It offers an interface for working with package versions, names, and dependency
12955 information.")
12956 ;; From 'LICENSE': This software is made available under the terms of
12957 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
12958 ;; Contributions to this software is made under the terms of *both* these
12959 ;; licenses.
12960 (license (list license:asl2.0 license:bsd-2))))
12961
12962 (define-public python2-packaging
12963 (package-with-python2 python-packaging))
12964
12965 (define-public python-relatorio
12966 (package
12967 (name "python-relatorio")
12968 (version "0.8.0")
12969 (source
12970 (origin
12971 (method url-fetch)
12972 (uri (pypi-uri "relatorio" version))
12973 (sha256
12974 (base32
12975 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
12976 (build-system python-build-system)
12977 (propagated-inputs
12978 `(("python-lxml" ,python-lxml)
12979 ("python-genshi" ,python-genshi)))
12980 (native-inputs
12981 `(("python-magic" ,python-magic)))
12982 (home-page "https://relatorio.tryton.org/")
12983 (synopsis "Templating library able to output ODT and PDF files")
12984 (description "Relatorio is a templating library which provides a way to
12985 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
12986 for more filetypes can be easily added by creating plugins for them.")
12987 (license license:gpl3+)))
12988
12989 (define-public python2-relatorio
12990 (package-with-python2 python-relatorio))
12991
12992 (define-public python-radon
12993 (package
12994 (name "python-radon")
12995 (version "2.2.0")
12996 (source
12997 (origin
12998 (method url-fetch)
12999 (uri (pypi-uri "radon" version))
13000 (sha256
13001 (base32
13002 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
13003 (build-system python-build-system)
13004 (arguments
13005 `(#:phases (modify-phases %standard-phases
13006 (replace 'check
13007 (lambda _
13008 (invoke "python" "radon/tests/run.py"))))))
13009 (propagated-inputs
13010 `(("python-colorama" ,python-colorama)
13011 ("python-flake8-polyfill" ,python-flake8-polyfill)
13012 ("python-mando" ,python-mando)))
13013 (native-inputs
13014 `(("python-pytest" ,python-pytest)
13015 ("python-pytest-mock" ,python-pytest-mock)))
13016 (home-page "https://radon.readthedocs.org/")
13017 (synopsis "Code Metrics in Python")
13018 (description "Radon is a Python tool which computes various code metrics.
13019 Supported metrics are:
13020 @itemize @bullet
13021 @item raw metrics: SLOC, comment lines, blank lines, &c.
13022 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
13023 @item Halstead metrics (all of them)
13024 @item the Maintainability Index (a Visual Studio metric)
13025 @end itemize")
13026 (license license:expat)))
13027
13028 (define-public python2-radon
13029 (package-with-python2 python-radon))
13030
13031 (define-public python-sure
13032 (package
13033 (name "python-sure")
13034 (version "1.4.11")
13035 (source
13036 (origin
13037 (method url-fetch)
13038 (uri (pypi-uri "sure" version))
13039 (sha256
13040 (base32
13041 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
13042 (build-system python-build-system)
13043 (propagated-inputs
13044 `(("python-mock" ,python-mock)
13045 ("python-six" ,python-six)))
13046 (native-inputs
13047 `(("python-nose" ,python-nose)))
13048 (home-page "https://github.com/gabrielfalcao/sure")
13049 (synopsis "Automated testing library in python for python")
13050 (description
13051 "Sure is a python library that leverages a DSL for writing assertions.
13052 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
13053 (license license:gpl3+)))
13054
13055 (define-public python2-sure
13056 (package-with-python2 python-sure))
13057
13058 (define-public python2-couleur
13059 ;; This package does not seem to support python3 at all, hence,
13060 ;; only the python2 variant definition is provided.
13061 (package
13062 (name "python2-couleur")
13063 (version "0.6.2")
13064 (source
13065 (origin
13066 (method url-fetch)
13067 (uri (pypi-uri "couleur" version))
13068 (sha256
13069 (base32
13070 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
13071 (build-system python-build-system)
13072 (arguments
13073 `(#:python ,python-2))
13074 (home-page "https://github.com/gabrielfalcao/couleur")
13075 (synopsis
13076 "ANSI terminal tool for python, colored shell and other handy fancy features")
13077 (description
13078 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
13079 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
13080 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
13081 ;; https://github.com/gabrielfalcao/couleur/issues/11
13082 (license license:lgpl3+)))
13083
13084 (define-public python-misaka
13085 (package
13086 (name "python-misaka")
13087 (version "2.1.1")
13088 (source
13089 (origin
13090 (method url-fetch)
13091 (uri (pypi-uri "misaka" version))
13092 (sha256
13093 (base32
13094 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
13095 (build-system python-build-system)
13096 (arguments
13097 `(;; Line 37 of setup.py calls self.run_command('develop')
13098 ;; in the 'check' phase. This command seems to be trying
13099 ;; to write to
13100 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
13101 ;; for which it does not have the permission to write.
13102 #:tests? #f))
13103 (propagated-inputs
13104 `(("python-cffi" ,python-cffi)))
13105 (home-page "https://github.com/FSX/misaka")
13106 (synopsis "Python binding for Hoedown")
13107 (description
13108 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
13109 library written in C. It features a fast HTML renderer and functionality to make custom
13110 renderers (e.g. man pages or LaTeX).")
13111 (license license:expat)))
13112
13113 (define-public python2-misaka
13114 (package-with-python2 python-misaka))
13115
13116 (define-public python2-steadymark
13117 ;; This is forced into being a python2 only variant
13118 ;; due to its dependence on couleur that has no support
13119 ;; for python3
13120 (package
13121 (name "python2-steadymark")
13122 (version "0.7.3")
13123 (source
13124 (origin
13125 (method url-fetch)
13126 (uri (pypi-uri "steadymark" version))
13127 (sha256
13128 (base32
13129 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
13130 (build-system python-build-system)
13131 (native-inputs
13132 `(("python-couleur" ,python2-couleur)
13133 ("python-sure" ,python2-sure)
13134 ("python-misaka" ,python2-misaka)))
13135 (arguments
13136 `(#:python ,python-2
13137 #:phases
13138 (modify-phases %standard-phases
13139 (add-before 'build 'patch-setup-py
13140 (lambda _
13141 ;; Update requirements from dependency==version
13142 ;; to dependency>=version
13143 (substitute* "setup.py"
13144 (("==") ">="))
13145 #t)))))
13146 (home-page "https://github.com/gabrielfalcao/steadymark")
13147 (synopsis "Markdown-based test runner for python")
13148 (description
13149 "@code{Steadymark} allows documentation to be written in github-flavoured
13150 markdown. The documentation may contain snippets of code surrounded by python
13151 code blocks and @code{Steadymark} will find these snippets and run them, making
13152 sure that there are no old malfunctional examples in the documentation examples.")
13153 (license license:expat)))
13154
13155 (define-public python-jsonpointer
13156 (package
13157 (name "python-jsonpointer")
13158 (version "1.10")
13159 (source
13160 (origin
13161 (method url-fetch)
13162 (uri (pypi-uri "jsonpointer" version))
13163 (sha256
13164 (base32
13165 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
13166 (build-system python-build-system)
13167 (home-page "https://github.com/stefankoegl/python-json-pointer")
13168 (synopsis "Identify specific nodes in a JSON document")
13169 (description "@code{jsonpointer} allows you to access specific nodes
13170 by path in a JSON document (see RFC 6901).")
13171 (license license:bsd-3)))
13172
13173 (define-public python2-jsonpointer
13174 (package-with-python2 python-jsonpointer))
13175
13176 (define-public python-jsonpatch
13177 (package
13178 (name "python-jsonpatch")
13179 (version "1.16")
13180 (source
13181 (origin
13182 (method url-fetch)
13183 ;; pypi version lacks tests.js
13184 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
13185 "archive/v" version ".tar.gz"))
13186 (file-name (string-append name "-" version ".tar.gz"))
13187 (sha256
13188 (base32
13189 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
13190 (build-system python-build-system)
13191 (native-inputs
13192 `(("python-jsonpointer" ,python-jsonpointer)))
13193 (home-page "https://github.com/stefankoegl/python-json-patch")
13194 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
13195 (description "@code{jsonpatch} is a library and program that allows
13196 applying JSON Patches according to RFC 6902.")
13197 (license license:bsd-3)))
13198
13199 (define-public python2-jsonpatch
13200 (package-with-python2 python-jsonpatch))
13201
13202 (define-public python-jsonpatch-0.4
13203 (package (inherit python-jsonpatch)
13204 (name "python-jsonpatch")
13205 (version "0.4")
13206 (source
13207 (origin
13208 (method url-fetch)
13209 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
13210 "archive/v" version ".tar.gz"))
13211 (file-name (string-append name "-" version ".tar.gz"))
13212 (sha256
13213 (base32
13214 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
13215
13216 (define-public python2-jsonpatch-0.4
13217 (package-with-python2 python-jsonpatch-0.4))
13218
13219 (define-public python-rfc3986
13220 (package
13221 (name "python-rfc3986")
13222 (version "1.1.0")
13223 (source (origin
13224 (method url-fetch)
13225 (uri (pypi-uri "rfc3986" version))
13226 (sha256
13227 (base32
13228 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
13229 (build-system python-build-system)
13230 (arguments
13231 `(#:modules ((guix build utils)
13232 (guix build python-build-system)
13233 (ice-9 ftw)
13234 (srfi srfi-1)
13235 (srfi srfi-26))
13236 #:phases
13237 (modify-phases %standard-phases
13238 (replace 'check
13239 (lambda _
13240 (let ((cwd (getcwd)))
13241 (setenv "PYTHONPATH"
13242 (string-append cwd "/build/"
13243 (find (cut string-prefix? "lib" <>)
13244 (scandir (string-append cwd "/build")))
13245 ":"
13246 (getenv "PYTHONPATH")))
13247 (invoke "pytest" "-v")))))))
13248 (native-inputs
13249 `(("python-pytest" ,python-pytest)))
13250 (home-page "https://rfc3986.readthedocs.io/")
13251 (synopsis "Parse and validate URI references")
13252 (description
13253 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
13254 validation and authority parsing. This module also supports RFC@tie{}6874
13255 which adds support for zone identifiers to IPv6 addresses.")
13256 (license license:asl2.0)))
13257
13258 (define-public python2-rfc3986
13259 (package-with-python2 python-rfc3986))
13260
13261 (define-public python-rfc3987
13262 (package
13263 (name "python-rfc3987")
13264 (version "1.3.7")
13265 (source
13266 (origin
13267 (method url-fetch)
13268 (uri (pypi-uri "rfc3987" version))
13269 (sha256
13270 (base32
13271 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
13272 (build-system python-build-system)
13273 (home-page "https://pypi.python.org/pypi/rfc3987")
13274 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
13275 (description "@code{rfc3987} provides routines for parsing and
13276 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
13277 (license license:gpl3+)))
13278
13279 (define-public python2-rfc3987
13280 (package-with-python2 python-rfc3987))
13281
13282 (define-public python-validate-email
13283 (package
13284 (name "python-validate-email")
13285 (version "1.3")
13286 (source
13287 (origin
13288 (method url-fetch)
13289 (uri (pypi-uri "validate_email" version))
13290 (sha256
13291 (base32
13292 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
13293 (build-system python-build-system)
13294 (home-page "https://github.com/syrusakbary/validate_email")
13295 (synopsis "Verifies if an email address is valid and really exists")
13296 (description "@code{validate_email} can be used to verify if an email
13297 address is valid and really exists.")
13298 (license license:lgpl3+)))
13299
13300 (define-public python2-validate-email
13301 (package-with-python2 python-validate-email))
13302
13303 (define-public python-flex
13304 (package
13305 (name "python-flex")
13306 (version "6.10.0")
13307 (source
13308 (origin
13309 (method url-fetch)
13310 (uri (pypi-uri "flex" version))
13311 (sha256
13312 (base32
13313 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
13314 (build-system python-build-system)
13315 (propagated-inputs
13316 `(("python-click" ,python-click)
13317 ("python-iso8601" ,python-iso8601)
13318 ("python-jsonpointer" ,python-jsonpointer)
13319 ("python-pyyaml" ,python-pyyaml)
13320 ("python-requests" ,python-requests)
13321 ("python-rfc3987" ,python-rfc3987)
13322 ("python-six" ,python-six)
13323 ("python-validate-email" ,python-validate-email)))
13324 (home-page "https://github.com/pipermerriam/flex")
13325 (synopsis "Validates Swagger schemata")
13326 (description "@code{flex} can be used to validate Swagger schemata.")
13327 (license license:bsd-3)))
13328
13329 (define-public python2-flex
13330 (package-with-python2 python-flex))
13331
13332 (define-public python-marshmallow
13333 (package
13334 (name "python-marshmallow")
13335 (version "3.0.0b14")
13336 (source
13337 (origin
13338 (method url-fetch)
13339 (uri (pypi-uri "marshmallow" version))
13340 (sha256
13341 (base32
13342 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
13343 (build-system python-build-system)
13344 (propagated-inputs
13345 `(("python-dateutil" ,python-dateutil)
13346 ("python-simplejson" ,python-simplejson)))
13347 (native-inputs
13348 `(("python-pytest" ,python-pytest)
13349 ("python-pytz" ,python-pytz)))
13350 (home-page "https://github.com/marshmallow-code/marshmallow")
13351 (synopsis "Convert complex datatypes to and from native
13352 Python datatypes.")
13353 (description "@code{marshmallow} provides a library for converting
13354 complex datatypes to and from native Python datatypes.")
13355 (license license:expat)))
13356
13357 (define-public python2-marshmallow
13358 (package-with-python2 python-marshmallow))
13359
13360 (define-public python-apispec
13361 (package
13362 (name "python-apispec")
13363 (version "0.25.3")
13364 (source
13365 (origin
13366 (method url-fetch)
13367 (uri (pypi-uri "apispec" version))
13368 (sha256
13369 (base32
13370 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
13371 (build-system python-build-system)
13372 (propagated-inputs
13373 `(("python-pyyaml" ,python-pyyaml)))
13374 (native-inputs
13375 `(("python-pytest" ,python-pytest)
13376 ("python-flask" ,python-flask)
13377 ("python-marshmallow" ,python-marshmallow)
13378 ("python-tornado" ,python-tornado)
13379 ("python-bottle" ,python-bottle)
13380 ("python-mock" ,python-mock)))
13381 (home-page "https://github.com/marshmallow-code/apispec")
13382 (synopsis "Swagger 2.0 API specification generator")
13383 (description "@code{python-apispec} is a pluggable API specification
13384 generator. Currently supports the OpenAPI specification (f.k.a.
13385 Swagger 2.0).")
13386 (license license:expat)))
13387
13388 (define-public python2-apispec
13389 (package-with-python2 python-apispec))
13390
13391 (define-public python-flasgger
13392 (package
13393 (name "python-flasgger")
13394 (version "0.6.3")
13395 (source
13396 (origin
13397 (method git-fetch)
13398 (uri (git-reference
13399 (url "https://github.com/rochacbruno/flasgger.git")
13400 (commit version)))
13401 (file-name (git-file-name name version))
13402 (sha256
13403 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
13404 (build-system python-build-system)
13405 (arguments
13406 `(#:phases
13407 (modify-phases %standard-phases
13408 (replace 'check
13409 (lambda* (#:key inputs outputs #:allow-other-keys)
13410 (substitute* "Makefile"
13411 (("flake8 flasgger --ignore=F403")
13412 "flake8 flasgger --ignore=E731,F403"))
13413 (setenv "PYTHONPATH" (string-append (getcwd)
13414 ":"
13415 (getenv "PYTHONPATH")))
13416 (invoke "py.test"))))))
13417 (propagated-inputs
13418 `(("python-flask" ,python-flask)
13419 ("python-pyyaml" ,python-pyyaml)
13420 ("python-jsonschema" ,python-jsonschema)
13421 ("python-mistune" ,python-mistune)
13422 ("python-six" ,python-six)))
13423 (native-inputs
13424 `(("python-decorator" ,python-decorator)
13425 ("python-flake8" ,python-flake8)
13426 ("python-flask-restful" ,python-flask-restful)
13427 ("python-flex" ,python-flex)
13428 ("python-pytest" ,python-pytest)
13429 ("python-pytest-cov" ,python-pytest-cov)
13430 ("python-marshmallow" ,python-marshmallow)
13431 ("python-apispec" ,python-apispec)))
13432 (home-page "https://github.com/rochacbruno/flasgger/")
13433 (synopsis "Extract Swagger specs from your Flask project")
13434 (description "@code{python-flasgger} allows extracting Swagger specs
13435 from your Flask project. It is a fork of Flask-Swagger.")
13436 (license license:expat)))
13437
13438 (define-public python2-flasgger
13439 (package-with-python2 python-flasgger))
13440
13441 (define-public python-swagger-spec-validator
13442 (package
13443 (name "python-swagger-spec-validator")
13444 (version "2.4.3")
13445 (source
13446 (origin
13447 (method url-fetch)
13448 (uri (pypi-uri "swagger-spec-validator" version))
13449 (sha256
13450 (base32
13451 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
13452 (build-system python-build-system)
13453 (propagated-inputs
13454 `(("python-jsonschema" ,python-jsonschema)
13455 ("python-pyyaml" ,python-pyyaml)
13456 ("python-six" ,python-six)))
13457 (home-page
13458 "https://github.com/Yelp/swagger_spec_validator")
13459 (synopsis "Validation of Swagger specifications")
13460 (description "@code{swagger_spec_validator} provides a library for
13461 validating Swagger API specifications.")
13462 (license license:asl2.0)))
13463
13464 (define-public python2-swagger-spec-validator
13465 (package-with-python2 python-swagger-spec-validator))
13466
13467 (define-public python-apache-libcloud
13468 (package
13469 (name "python-apache-libcloud")
13470 (version "2.4.0")
13471 (source
13472 (origin
13473 (method url-fetch)
13474 (uri (pypi-uri "apache-libcloud" version))
13475 (sha256
13476 (base32
13477 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13478 (build-system python-build-system)
13479 (arguments
13480 `(#:phases
13481 (modify-phases %standard-phases
13482 (add-after 'unpack 'patch-ssh
13483 (lambda* (#:key inputs #:allow-other-keys)
13484 (substitute* "libcloud/compute/ssh.py"
13485 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13486 "/bin/ssh" "'")))
13487 #t))
13488 (add-after 'unpack 'patch-tests
13489 (lambda _
13490 (substitute* "./libcloud/test/test_file_fixtures.py"
13491 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13492 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13493 return (httplib.OK,
13494 \"1234abcd\",
13495 {\"test\": \"value\"},
13496 httplib.responses[httplib.OK])
13497 def _ascii"))
13498 (substitute* "libcloud/test/compute/test_ssh_client.py"
13499 (("class ShellOutSSHClientTests")
13500 "@unittest.skip(\"Guix container doesn't have ssh service\")
13501 class ShellOutSSHClientTests")
13502 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13503 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13504 (("'.xF0', '.x90', '.x8D', '.x88'")
13505 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13506 #t))
13507 (add-before 'check 'copy-secret
13508 (lambda _
13509 (copy-file "libcloud/test/secrets.py-dist"
13510 "libcloud/test/secrets.py")
13511 #t)))))
13512 (inputs
13513 `(("openssh" ,openssh)))
13514 (propagated-inputs
13515 `(("python-paramiko" ,python-paramiko)
13516 ("python-requests" ,python-requests)))
13517 (native-inputs
13518 `(("python-lockfile" ,python-lockfile)
13519 ("python-mock" ,python-mock)
13520 ("python-pytest" ,python-pytest)
13521 ("python-pytest-runner" ,python-pytest-runner)
13522 ("python-requests-mock" ,python-requests-mock)))
13523 (home-page "https://libcloud.apache.org/")
13524 (synopsis "Unified Cloud API")
13525 (description "@code{libcloud} is a Python library for interacting with
13526 many of the popular cloud service providers using a unified API.")
13527 (license license:asl2.0)))
13528
13529 (define-public python2-apache-libcloud
13530 (package-with-python2 python-apache-libcloud))
13531
13532 (define-public python-smmap2
13533 (package
13534 (name "python-smmap2")
13535 (version "2.0.3")
13536 (source
13537 (origin
13538 (method url-fetch)
13539 (uri (pypi-uri "smmap2" version))
13540 (sha256
13541 (base32
13542 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
13543 (build-system python-build-system)
13544 (native-inputs
13545 `(("python-nosexcover" ,python-nosexcover)))
13546 (home-page "https://github.com/Byron/smmap")
13547 (synopsis "Python sliding window memory map manager")
13548 (description "@code{smmap2} is a pure Python implementation of a sliding
13549 window memory map manager.")
13550 (license license:bsd-3)))
13551
13552 (define-public python2-smmap2
13553 (package-with-python2 python-smmap2))
13554
13555 (define-public python-regex
13556 (package
13557 (name "python-regex")
13558 (version "2019.04.14")
13559 (source (origin
13560 (method url-fetch)
13561 (uri (pypi-uri "regex" version))
13562 (sha256
13563 (base32
13564 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
13565 ;; TODO: Fix and enable regex_test.py tests that complain about the
13566 ;; test.support module not existing.
13567 (build-system python-build-system)
13568 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13569 (synopsis "Alternative regular expression module")
13570 (description "This regular expression implementation is backwards-
13571 compatible with the standard @code{re} module, but offers additional
13572 functionality like full case-folding for case-insensitive matches in Unicode.")
13573 (license license:psfl)))
13574
13575 (define-public python2-regex
13576 (package-with-python2 python-regex))
13577
13578 (define-public python2-pyopengl
13579 (package
13580 (name "python2-pyopengl")
13581 (version "3.1.0")
13582 (source
13583 (origin
13584 (method url-fetch)
13585 (uri (pypi-uri "PyOpenGL" version))
13586 (sha256
13587 (base32
13588 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13589 (arguments
13590 `(#:python ,python-2))
13591 (build-system python-build-system)
13592 (home-page "http://pyopengl.sourceforge.net")
13593 (synopsis "Standard OpenGL bindings for Python")
13594 (description
13595 "PyOpenGL is the most common cross platform Python binding to OpenGL and
13596 related APIs. The binding is created using the standard @code{ctypes}
13597 library.")
13598 (license license:bsd-3)))
13599
13600 (define-public python2-pyopengl-accelerate
13601 (package
13602 (inherit python2-pyopengl)
13603 (name "python2-pyopengl-accelerate")
13604 (version "3.1.0")
13605 (source
13606 (origin
13607 (method url-fetch)
13608 (uri (pypi-uri "PyOpenGL-accelerate" version))
13609 (sha256
13610 (base32
13611 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
13612 (synopsis "Acceleration code for PyOpenGL")
13613 (description
13614 "This is the Cython-coded accelerator module for PyOpenGL.")))
13615
13616 (define-public python-rencode
13617 (package
13618 (name "python-rencode")
13619 (version "1.0.5")
13620 (source
13621 (origin
13622 (method url-fetch)
13623 (uri (pypi-uri "rencode" version))
13624 (sha256
13625 (base32
13626 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
13627 (build-system python-build-system)
13628 (arguments
13629 `(#:phases
13630 (modify-phases %standard-phases
13631 (add-before 'check 'delete-bogus-test
13632 ;; This test requires /home/aresch/Downloads, which is not provided by
13633 ;; the build environment.
13634 (lambda _
13635 (delete-file "rencode/t.py")
13636 #t)))))
13637 (native-inputs `(("pkg-config" ,pkg-config)
13638 ("python-cython" ,python-cython)))
13639 (home-page "https://github.com/aresch/rencode")
13640 (synopsis "Serialization of heterogeneous data structures")
13641 (description
13642 "The @code{rencode} module is a data structure serialization library,
13643 similar to @code{bencode} from the BitTorrent project. For complex,
13644 heterogeneous data structures with many small elements, r-encoding stake up
13645 significantly less space than b-encodings. This version of rencode is a
13646 complete rewrite in Cython to attempt to increase the performance over the
13647 pure Python module.")
13648 (license license:bsd-3)))
13649
13650 (define-public python2-rencode
13651 (package-with-python2 python-rencode))
13652
13653 (define-public python-xenon
13654 (package
13655 (name "python-xenon")
13656 (version "0.5.4")
13657 (source
13658 (origin
13659 (method url-fetch)
13660 (uri (pypi-uri "xenon" version))
13661 (sha256
13662 (base32
13663 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
13664 (build-system python-build-system)
13665 (native-inputs
13666 `(("python-pyyaml" ,python-pyyaml)
13667 ("python-radon" ,python-radon)
13668 ("python-requests" ,python-requests)
13669 ("python-flake8" ,python-flake8)
13670 ("python-tox" ,python-tox)))
13671 (arguments
13672 `(#:phases
13673 (modify-phases %standard-phases
13674 (add-before 'build 'patch-test-requirements
13675 (lambda _
13676 ;; Remove httpretty dependency for tests.
13677 (substitute* "setup.py"
13678 (("httpretty") ""))
13679 #t)))))
13680 (home-page "https://xenon.readthedocs.org/")
13681 (synopsis "Monitor code metrics for Python on your CI server")
13682 (description
13683 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
13684 Ideally, @code{xenon} is run every time code is committed. Through command
13685 line options, various thresholds can be set for the complexity of code. It
13686 will fail (i.e. it will exit with a non-zero exit code) when any of these
13687 requirements is not met.")
13688 (license license:expat)))
13689
13690 (define-public python2-xenon
13691 (package-with-python2 python-xenon))
13692
13693 (define-public python-pysocks
13694 (package
13695 (name "python-pysocks")
13696 (version "1.7.0")
13697 (source
13698 (origin
13699 (method url-fetch)
13700 (uri (pypi-uri "PySocks" version))
13701 (sha256
13702 (base32
13703 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
13704 (build-system python-build-system)
13705 (arguments `(#:tests? #f))
13706 (home-page "https://github.com/Anorov/PySocks")
13707 (synopsis "SOCKS client module")
13708 (description "@code{pysocks} is an updated and semi-actively maintained
13709 version of @code{SocksiPy} with bug fixes and extra features.")
13710 (license license:bsd-3)))
13711
13712 (define-public python2-pysocks
13713 (package-with-python2 python-pysocks))
13714
13715 (define-public python-pydiff
13716 (package
13717 (name "python-pydiff")
13718 (version "0.2")
13719 (source
13720 (origin
13721 (method url-fetch)
13722 (uri (pypi-uri "pydiff" version))
13723 (sha256
13724 (base32
13725 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
13726 (build-system python-build-system)
13727 (home-page "https://github.com/myint/pydiff")
13728 (synopsis "Library to diff two Python files at the bytecode level")
13729 (description
13730 "@code{pydiff} makes it easy to look for actual code changes while
13731 ignoring formatting changes.")
13732 (license license:expat)))
13733
13734 (define-public python2-pydiff
13735 (package-with-python2 python-pydiff))
13736
13737 (define-public python-tqdm
13738 (package
13739 (name "python-tqdm")
13740 (version "4.19.6")
13741 (source
13742 (origin
13743 (method url-fetch)
13744 (uri (pypi-uri "tqdm" version))
13745 (sha256
13746 (base32
13747 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
13748 (build-system python-build-system)
13749 (native-inputs
13750 `(("python-flake8" ,python-flake8)
13751 ("python-nose" ,python-nose)
13752 ("python-coverage" ,python-coverage)))
13753 (home-page "https://github.com/tqdm/tqdm")
13754 (synopsis "Fast, extensible progress meter")
13755 (description
13756 "Make loops show a progress bar on the console by just wrapping any
13757 iterable with @code{|tqdm(iterable)|}. Offers many options to define
13758 design and layout.")
13759 (license (list license:mpl2.0 license:expat))
13760 (properties `((python2-variant . ,(delay python2-tqdm))))))
13761
13762 (define-public python2-tqdm
13763 (let ((tqdm (package-with-python2
13764 (strip-python2-variant python-tqdm))))
13765 (package (inherit tqdm)
13766 (native-inputs `(("python2-functools32" ,python2-functools32)
13767 ,@(package-native-inputs tqdm))))))
13768
13769 (define-public python-pkginfo
13770 (package
13771 (name "python-pkginfo")
13772 (version "1.4.2")
13773 (source
13774 (origin
13775 (method url-fetch)
13776 (uri (pypi-uri "pkginfo" version))
13777 (sha256
13778 (base32
13779 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
13780 (build-system python-build-system)
13781 (arguments
13782 ;; The tests are broken upstream.
13783 '(#:tests? #f))
13784 (home-page
13785 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
13786 (synopsis
13787 "Query metadatdata from sdists, bdists, and installed packages")
13788 (description
13789 "API to query the distutils metadata written in @file{PKG-INFO} inside a
13790 source distriubtion (an sdist) or a binary distribution (e.g., created by
13791 running bdist_egg). It can also query the EGG-INFO directory of an installed
13792 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
13793 created by running @code{python setup.py develop}).")
13794 (license license:expat)))
13795
13796 (define-public python2-pkginfo
13797 (package-with-python2 python-pkginfo))
13798
13799 (define-public python-twine
13800 (package
13801 (name "python-twine")
13802 (version "1.9.1")
13803 (source
13804 (origin
13805 (method url-fetch)
13806 (uri (pypi-uri "twine" version))
13807 (sha256
13808 (base32
13809 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
13810 (build-system python-build-system)
13811 (propagated-inputs
13812 `(("python-tqdm" ,python-tqdm)
13813 ("python-pkginfo" ,python-pkginfo)
13814 ("python-requests" ,python-requests)
13815 ("python-requests-toolbelt" ,python-requests-toolbelt)))
13816 (home-page "https://github.com/pypa/twine")
13817 (synopsis "Collection of utilities for interacting with PyPI")
13818 (description
13819 "@code{twine} currently supports registering projects and uploading
13820 distributions. It authenticates the user over HTTPS, allows them to pre-sign
13821 their files and supports any packaging format (including wheels).")
13822 (license license:asl2.0)))
13823
13824 (define-public python2-twine
13825 (package-with-python2 python-twine))
13826
13827 (define-public python-linecache2
13828 (package
13829 (name "python-linecache2")
13830 (version "1.0.0")
13831 (source
13832 (origin
13833 (method url-fetch)
13834 (uri (pypi-uri "linecache2" version))
13835 (sha256
13836 (base32
13837 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
13838 (build-system python-build-system)
13839 (arguments
13840 `(;; The tests depend on unittest2, and our version is a bit too old.
13841 #:tests? #f))
13842 (native-inputs
13843 `(("python-pbr" ,python-pbr-minimal)))
13844 (home-page
13845 "https://github.com/testing-cabal/linecache2")
13846 (synopsis "Backports of the linecache module")
13847 (description
13848 "The linecache module allows one to get any line from any file, while
13849 attempting to optimize internally, using a cache, the common case where many
13850 lines are read from a single file.")
13851 (license license:psfl)))
13852
13853 (define-public python2-linecache2
13854 (package-with-python2 python-linecache2))
13855
13856 (define-public python-traceback2
13857 (package
13858 (name "python-traceback2")
13859 (version "1.4.0")
13860 (source
13861 (origin
13862 (method url-fetch)
13863 (uri (pypi-uri "traceback2" version))
13864 (sha256
13865 (base32
13866 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
13867 (build-system python-build-system)
13868 (arguments
13869 `(;; python-traceback2 and python-unittest2 depend on one another.
13870 #:tests? #f))
13871 (native-inputs
13872 `(("python-pbr" ,python-pbr-minimal)))
13873 (propagated-inputs
13874 `(("python-linecache2" ,python-linecache2)))
13875 (home-page
13876 "https://github.com/testing-cabal/traceback2")
13877 (synopsis "Backports of the traceback module")
13878 (description
13879 "This module provides a standard interface to extract, format and print
13880 stack traces of Python programs. It exactly mimics the behavior of the Python
13881 interpreter when it prints a stack trace.")
13882 (license license:psfl)))
13883
13884 (define-public python2-traceback2
13885 (package-with-python2 python-traceback2))
13886
13887 (define-public python-ratelimiter
13888 (package
13889 (name "python-ratelimiter")
13890 (version "1.2.0")
13891 (source
13892 (origin
13893 (method url-fetch)
13894 (uri (pypi-uri "ratelimiter" version))
13895 (sha256
13896 (base32
13897 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
13898 (build-system python-build-system)
13899 (arguments
13900 '(#:tests? #f)) ; There are no tests in the pypi archive.
13901 (home-page "https://github.com/RazerM/ratelimiter")
13902 (synopsis "Simple rate limiting object")
13903 (description
13904 "The @code{ratelimiter} module ensures that an operation will not be
13905 executed more than a given number of times during a given period.")
13906 (license license:asl2.0)))
13907
13908 (define-public python2-ratelimiter
13909 (package-with-python2 python-ratelimiter))
13910
13911 (define-public python-dukpy
13912 (package
13913 (name "python-dukpy")
13914 (version "0.3")
13915 (source
13916 (origin
13917 (method git-fetch)
13918 (uri (git-reference
13919 (url "https://github.com/kovidgoyal/dukpy.git")
13920 (commit (string-append "v" version))))
13921 (file-name (git-file-name name version))
13922 (sha256
13923 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
13924 (build-system python-build-system)
13925 (home-page "https://github.com/kovidgoyal/dukpy")
13926 (synopsis "Run JavaScript in python")
13927 (description
13928 "dukpy is a JavaScript runtime environment for Python using the duktape
13929 embeddable JavaScript engine.")
13930 ;; Dukpy is licensed under MIT like the embedded duktape library,
13931 ;; with 'errors.c' as GPL3.
13932 (license (list license:expat license:gpl3))))
13933
13934 (define-public python2-dukpy
13935 (package-with-python2 python-dukpy))
13936
13937 (define-public python-jsonrpclib-pelix
13938 (package
13939 (name "python-jsonrpclib-pelix")
13940 (version "0.3.2")
13941 (source
13942 (origin
13943 (method url-fetch)
13944 (uri (pypi-uri "jsonrpclib-pelix" version))
13945 (sha256
13946 (base32
13947 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
13948 (build-system python-build-system)
13949 (arguments
13950 `(#:tests? #f)) ; no tests in PyPI tarball
13951 (home-page "https://github.com/tcalmant/jsonrpclib/")
13952 (synopsis "JSON-RPC 2.0 client library for Python")
13953 (description
13954 "This library implements the JSON-RPC v2.0
13955 specification (backwards-compatible) as a client library for Python. This
13956 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
13957 services.")
13958 (license license:asl2.0)))
13959
13960 (define-public python2-jsonrpclib-pelix
13961 (package-with-python2 python-jsonrpclib-pelix))
13962
13963 (define-public python-setuptools-scm-git-archive
13964 (package
13965 (name "python-setuptools-scm-git-archive")
13966 (version "1.0")
13967 (source
13968 (origin
13969 (method url-fetch)
13970 (uri (pypi-uri "setuptools_scm_git_archive" version))
13971 (sha256
13972 (base32
13973 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
13974 (build-system python-build-system)
13975 (native-inputs
13976 `(("python-pytest" ,python-pytest)))
13977 (propagated-inputs
13978 `(("python-setuptools-scm" ,python-setuptools-scm)))
13979 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
13980 (synopsis "Setuptools_scm plugin for git archives")
13981 (description
13982 "The setuptools_scm_git_archive package is a plugin to
13983 setuptools_scm, which supports obtaining versions from git archives that
13984 belong to tagged versions.")
13985 (license license:expat)))
13986
13987 (define-public python2-setuptools-scm-git-archive
13988 (package-with-python2 python-setuptools-scm-git-archive))
13989
13990 (define-public python-setuptools-git
13991 (package
13992 (name "python-setuptools-git")
13993 (version "1.2")
13994 (source
13995 (origin
13996 (method url-fetch)
13997 (uri (pypi-uri "setuptools-git" version))
13998 (sha256
13999 (base32
14000 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
14001 (build-system python-build-system)
14002 (arguments
14003 `(#:phases
14004 (modify-phases %standard-phases
14005 ;; This is needed for tests.
14006 (add-after 'unpack 'configure-git
14007 (lambda _
14008 (setenv "HOME" "/tmp")
14009 (invoke "git" "config" "--global" "user.email" "guix")
14010 (invoke "git" "config" "--global" "user.name" "guix")
14011 #t)))))
14012 (native-inputs
14013 `(("git" ,git-minimal)))
14014 (home-page "https://github.com/msabramo/setuptools-git")
14015 (synopsis "Setuptools revision control system plugin for Git")
14016 (description
14017 "This package provides a plugin for Setuptools for revision control with
14018 Git.")
14019 (license license:bsd-3)))
14020
14021 (define-public python-pyclipper
14022 (package
14023 (name "python-pyclipper")
14024 (version "1.1.0.post1")
14025 (source
14026 (origin
14027 (method url-fetch)
14028 (uri (pypi-uri "pyclipper" version ".zip"))
14029 (sha256
14030 (base32
14031 "0ldbkbnx94an4zzrwb1sxmg6k0jgk4cwmvcdyy8y5k1zslc612wa"))
14032 (modules '((guix build utils)))
14033 (snippet
14034 '(begin
14035 ;; This file is generated by Cython.
14036 (delete-file "pyclipper/pyclipper.cpp") #t))))
14037 (build-system python-build-system)
14038 (arguments
14039 `(#:phases
14040 (modify-phases %standard-phases
14041 (add-before 'build 'cythonize-sources
14042 (lambda _
14043 (with-directory-excursion "pyclipper"
14044 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
14045 (propagated-inputs
14046 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
14047 (native-inputs
14048 `(("python-cython" ,python-cython)
14049 ("python-pytest" ,python-pytest)
14050 ("python-pytest-runner" ,python-pytest-runner)
14051 ("python-unittest2" ,python-unittest2)
14052 ("unzip" ,unzip)))
14053 (home-page "https://github.com/greginvm/pyclipper")
14054 (synopsis "Wrapper for Angus Johnson's Clipper library")
14055 (description
14056 "Pyclipper is a Cython wrapper for the C++ translation of the
14057 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
14058 (license license:expat)))
14059
14060 (define-public python2-pyclipper
14061 (package-with-python2 python-pyclipper))
14062
14063 (define-public python2-booleanoperations
14064 (package
14065 (name "python2-booleanoperations")
14066 (version "0.7.1")
14067 (source
14068 (origin
14069 (method url-fetch)
14070 (uri (pypi-uri "booleanOperations" version ".zip"))
14071 (sha256
14072 (base32
14073 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
14074 (build-system python-build-system)
14075 (arguments
14076 `(#:python ,python-2))
14077 (native-inputs
14078 `(("unzip" ,unzip)
14079 ("python2-pytest" ,python2-pytest)
14080 ("python2-pytest-runner" ,python2-pytest-runner)))
14081 (propagated-inputs
14082 `(("python-fonttools" ,python2-fonttools)
14083 ("python-pyclipper" ,python2-pyclipper)
14084 ("python-ufolib" ,python2-ufolib)))
14085 (home-page "https://github.com/typemytype/booleanOperations")
14086 (synopsis "Boolean operations on paths")
14087 (description
14088 "BooleanOperations provides a Python library that enables
14089 boolean operations on paths.")
14090 (license license:expat)))
14091
14092 (define-public python-tempdir
14093 (package
14094 (name "python-tempdir")
14095 (version "0.7.1")
14096 (source
14097 (origin
14098 (method url-fetch)
14099 (uri (pypi-uri "tempdir" version))
14100 (sha256
14101 (base32
14102 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
14103 (build-system python-build-system)
14104 (home-page "https://pypi.org/project/tempdir/")
14105 (arguments
14106 ;; the package has no tests
14107 '(#:tests? #f))
14108 (synopsis "Python library for managing temporary directories")
14109 (description
14110 "This library manages temporary directories that are automatically
14111 deleted with all their contents when they are no longer needed. It is
14112 particularly convenient for use in tests.")
14113 (license license:expat)))
14114
14115 (define-public python2-tempdir
14116 (package-with-python2 python-tempdir))
14117
14118 (define-public python-activepapers
14119 (package
14120 (name "python-activepapers")
14121 (version "0.2.2")
14122 (source
14123 (origin
14124 (method url-fetch)
14125 (uri (pypi-uri "ActivePapers.Py" version))
14126 (sha256
14127 (base32
14128 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
14129 (build-system python-build-system)
14130 (arguments
14131 `(#:modules ((ice-9 ftw)
14132 (srfi srfi-1)
14133 (guix build utils)
14134 (guix build python-build-system))
14135
14136 #:phases
14137 (modify-phases %standard-phases
14138 (add-after 'unpack 'delete-python2-code
14139 (lambda _
14140 (for-each delete-file
14141 '("lib/activepapers/builtins2.py"
14142 "lib/activepapers/standardlib2.py"
14143 "lib/activepapers/utility2.py"))))
14144 (replace 'check
14145 (lambda _
14146 ;; Deactivate the test cases that download files
14147 (setenv "NO_NETWORK_ACCESS" "1")
14148 ;; For some strange reason, some tests fail if nosetests runs all
14149 ;; test modules in a single execution. They pass if each test
14150 ;; module is run individually.
14151 (for-each (lambda (filename)
14152 (invoke "nosetests"
14153 (string-append "tests/" filename)))
14154 (scandir "tests"
14155 (lambda (filename)
14156 (string-suffix? ".py" filename)))))))))
14157 (native-inputs
14158 `(("python-tempdir" ,python-tempdir)
14159 ("python-nose" ,python-nose)))
14160 (propagated-inputs
14161 `(("python-h5py" ,python-h5py)))
14162 (home-page "http://www.activepapers.org/")
14163 (synopsis "Executable papers for scientific computing")
14164 (description
14165 "ActivePapers is a tool for working with executable papers, which
14166 combine data, code, and documentation in single-file packages,
14167 suitable for publication as supplementary material or on repositories
14168 such as figshare or Zenodo.")
14169 (properties `((python2-variant . ,(delay python2-activepapers))))
14170 (license license:bsd-3)))
14171
14172 (define-public python2-activepapers
14173 (let ((base (package-with-python2
14174 (strip-python2-variant python-activepapers))))
14175 (package
14176 (inherit base)
14177 (arguments
14178 (substitute-keyword-arguments (package-arguments base)
14179 ((#:phases phases)
14180 `(modify-phases ,phases
14181 (delete 'delete-python2-code)
14182 (add-after 'unpack 'delete-python3-code
14183 (lambda _
14184 (for-each delete-file
14185 '("lib/activepapers/builtins3.py"
14186 "lib/activepapers/standardlib3.py"
14187 "lib/activepapers/utility3.py")))))))))))
14188
14189 (define-public python-semver
14190 (package
14191 (name "python-semver")
14192 (version "2.7.9")
14193 (source
14194 (origin
14195 (method url-fetch)
14196 (uri (pypi-uri "semver" version))
14197 (sha256
14198 (base32
14199 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
14200 (build-system python-build-system)
14201 (arguments
14202 `(#:phases
14203 (modify-phases %standard-phases
14204 (add-after 'unpack 'patch-test-requirements
14205 (lambda _
14206 (substitute* "setup.py"
14207 ;; Our Python is new enough.
14208 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
14209 #t)))))
14210 (native-inputs
14211 `(("python-tox" ,python-tox)
14212 ("python-virtualenv" ,python-virtualenv)))
14213 (home-page "https://github.com/k-bx/python-semver")
14214 (synopsis "Python helper for Semantic Versioning")
14215 (description "This package provides a Python library for
14216 @url{Semantic Versioning, http://semver.org/}.")
14217 (license license:bsd-3)))
14218
14219 (define-public python2-semver
14220 (package-with-python2 python-semver))
14221
14222 (define-public python-pyro4
14223 (package
14224 (name "python-pyro4")
14225 (version "4.75")
14226 (source
14227 (origin
14228 (method url-fetch)
14229 (uri (pypi-uri "Pyro4" version))
14230 (sha256
14231 (base32 "1dfpp36imddx19yv0kd28gk1l71ckhpqy6jd590wpm2680jw15rq"))))
14232 (build-system python-build-system)
14233 (propagated-inputs
14234 `(("python-serpent" ,python-serpent)))
14235 (home-page "https://pyro4.readthedocs.io")
14236 (synopsis "Distributed object middleware for Python")
14237 (description
14238 "Pyro enables you to build applications in which objects can talk to each
14239 other over the network. You can just use normal Python method calls to call
14240 objects on other machines, also known as remote procedure calls (RPC).")
14241 (license license:expat)))
14242
14243 (define-public python2-pyro
14244 (package
14245 (name "python2-pyro")
14246 (version "3.16")
14247 (source
14248 (origin
14249 (method url-fetch)
14250 (uri (pypi-uri "Pyro" version))
14251 (file-name (string-append "Pyro-" version ".tar.gz"))
14252 (sha256
14253 (base32
14254 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
14255 (build-system python-build-system)
14256 (arguments
14257 ;; Pyro is not compatible with Python 3
14258 `(#:python ,python-2
14259 ;; Pyro has no test cases for automatic execution
14260 #:tests? #f))
14261 (home-page "http://pythonhosted.org/Pyro/")
14262 (synopsis "Distributed object manager for Python")
14263 (description "Pyro is a Distributed Object Technology system
14264 written in Python that is designed to be easy to use. It resembles
14265 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
14266 which is a system and language independent Distributed Object Technology
14267 and has much more to offer than Pyro or RMI. Pyro 3.x is no
14268 longer maintained. New projects should use Pyro4 instead, which
14269 is the new Pyro version that is actively developed.")
14270 (license license:expat)))
14271
14272 (define-public python2-scientific
14273 (package
14274 (name "python2-scientific")
14275 (version "2.9.4")
14276 (source
14277 (origin
14278 (method url-fetch)
14279 (uri (string-append "https://bitbucket.org/khinsen/"
14280 "scientificpython/downloads/ScientificPython-"
14281 version ".tar.gz"))
14282 (file-name (string-append "ScientificPython-" version ".tar.gz"))
14283 (sha256
14284 (base32
14285 "0fc69zhlsn9d2jvbzyjl9ah53vj598h84nkq230c83ahfvgzx5y3"))))
14286 (build-system python-build-system)
14287 (inputs
14288 `(("netcdf" ,netcdf)))
14289 (propagated-inputs
14290 `(("python-numpy" ,python2-numpy-1.8)
14291 ("python-pyro" ,python2-pyro)))
14292 (arguments
14293 ;; ScientificPython is not compatible with Python 3
14294 `(#:python ,python-2
14295 #:tests? #f ; No test suite
14296 #:phases
14297 (modify-phases %standard-phases
14298 (replace 'build
14299 (lambda* (#:key inputs #:allow-other-keys)
14300 (invoke "python" "setup.py" "build"
14301 (string-append "--netcdf_prefix="
14302 (assoc-ref inputs "netcdf"))))))))
14303 (home-page "https://bitbucket.org/khinsen/scientificpython")
14304 (synopsis "Python modules for scientific computing")
14305 (description "ScientificPython is a collection of Python modules that are
14306 useful for scientific computing. Most modules are rather general (Geometry,
14307 physical units, automatic derivatives, ...) whereas others are more
14308 domain-specific (e.g. netCDF and PDB support). The library is currently
14309 not actively maintained and works only with Python 2 and NumPy < 1.9.")
14310 (license license:cecill-c)))
14311
14312 (define-public python2-mmtk
14313 (package
14314 (name "python2-mmtk")
14315 (version "2.7.11")
14316 (source
14317 (origin
14318 (method url-fetch)
14319 (uri (string-append "https://bitbucket.org/khinsen/"
14320 "mmtk/downloads/MMTK-" version ".tar.gz"))
14321 (file-name (string-append "MMTK-" version ".tar.gz"))
14322 (sha256
14323 (base32
14324 "1d0nnjx4lwsvh8f99vv1r6gi50d93yba0adkz8b4zgv4za4c5862"))))
14325 (build-system python-build-system)
14326 (native-inputs
14327 `(("netcdf" ,netcdf)))
14328 (propagated-inputs
14329 `(("python-scientific" ,python2-scientific)
14330 ("python-tkinter" ,python-2 "tk")))
14331 (arguments
14332 `(#:python ,python-2
14333 #:tests? #f
14334 #:phases
14335 (modify-phases %standard-phases
14336 (add-before 'build 'includes-from-scientific
14337 (lambda* (#:key inputs #:allow-other-keys)
14338 (mkdir-p "Include/Scientific")
14339 (copy-recursively
14340 (string-append
14341 (assoc-ref inputs "python-scientific")
14342 "/include/python2.7/Scientific")
14343 "Include/Scientific"))))))
14344 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
14345 (synopsis "Python library for molecular simulation")
14346 (description "MMTK is a library for molecular simulations with an emphasis
14347 on biomolecules. It provides widely used methods such as Molecular Dynamics
14348 and normal mode analysis, but also basic routines for implementing new methods
14349 for simulation and analysis. The library is currently not actively maintained
14350 and works only with Python 2 and NumPy < 1.9.")
14351 (license license:cecill-c)))
14352
14353 (define-public python-phonenumbers
14354 (package
14355 (name "python-phonenumbers")
14356 (version "8.9.1")
14357 (source
14358 (origin
14359 (method url-fetch)
14360 (uri (pypi-uri "phonenumbers" version))
14361 (sha256
14362 (base32
14363 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
14364 (build-system python-build-system)
14365 (home-page
14366 "https://github.com/daviddrysdale/python-phonenumbers")
14367 (synopsis
14368 "Python library for dealing with international phone numbers")
14369 (description
14370 "This package provides a Python port of Google's libphonenumber library.")
14371 (license license:asl2.0)))
14372
14373 (define-public python2-phonenumbers
14374 (package-with-python2 python-phonenumbers))
14375
14376 (define-public python-send2trash
14377 (package
14378 (name "python-send2trash")
14379 (version "1.5.0")
14380 (source
14381 (origin (method git-fetch)
14382 ;; Source tarball on PyPI doesn't include tests.
14383 (uri (git-reference
14384 (url "https://github.com/hsoft/send2trash.git")
14385 (commit version)))
14386 (file-name (git-file-name name version))
14387 (sha256
14388 (base32
14389 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
14390 (build-system python-build-system)
14391 (arguments
14392 '(#:phases
14393 (modify-phases %standard-phases
14394 (add-before 'check 'pre-check
14395 (lambda _
14396 (mkdir-p "/tmp/foo")
14397 (setenv "HOME" "/tmp/foo")
14398 #t)))))
14399 (home-page "https://github.com/hsoft/send2trash")
14400 (synopsis "Send files to the user's @file{~/Trash} directory")
14401 (description "This package provides a Python library to send files to the
14402 user's @file{~/Trash} directory.")
14403 (properties `((python2-variant . ,(delay python2-send2trash))))
14404 (license license:bsd-3)))
14405
14406 (define-public python2-send2trash
14407 (package
14408 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
14409 (arguments
14410 (substitute-keyword-arguments (package-arguments python-send2trash)
14411 ((#:phases phases)
14412 `(modify-phases ,phases
14413 (add-before 'check 'setenv
14414 (lambda _
14415 (setenv "PYTHONPATH"
14416 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
14417 #t))))))))
14418
14419 (define-public python-yapf
14420 (package
14421 (name "python-yapf")
14422 (version "0.24.0")
14423 (source
14424 (origin
14425 (method url-fetch)
14426 (uri (pypi-uri "yapf" version))
14427 (sha256
14428 (base32
14429 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
14430 (build-system python-build-system)
14431 (home-page "https://github.com/google/yapf")
14432 (synopsis "Formatter for Python code")
14433 (description "YAPF is a formatter for Python code. It's based off of
14434 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
14435 takes the code and reformats it to the best formatting that conforms to the
14436 style guide, even if the original code didn't violate the style guide.")
14437 (license license:asl2.0)))
14438
14439 (define-public python2-yapf
14440 (package-with-python2 python-yapf))
14441
14442 (define-public python-gyp
14443 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
14444 (revision "0"))
14445 (package
14446 (name "python-gyp")
14447 ;; Google does not release versions,
14448 ;; based on second most recent commit date.
14449 (version (git-version "0.0.0" revision commit))
14450 (source
14451 (origin
14452 ;; Google does not release tarballs,
14453 ;; git checkout is needed.
14454 (method git-fetch)
14455 (uri (git-reference
14456 (url "https://chromium.googlesource.com/external/gyp")
14457 (commit commit)))
14458 (file-name (git-file-name name version))
14459 (sha256
14460 (base32
14461 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14462 (build-system python-build-system)
14463 (home-page "https://gyp.gsrc.io/")
14464 (synopsis "GYP is a Meta-Build system")
14465 (description
14466 "GYP builds build systems for large, cross platform applications.
14467 It can be used to generate XCode projects, Visual Studio projects, Ninja build
14468 files, and Makefiles.")
14469 (license license:bsd-3))))
14470
14471 (define-public python2-gyp
14472 (package-with-python2 python-gyp))
14473
14474 (define-public python-whatever
14475 (package
14476 (name "python-whatever")
14477 (version "0.5")
14478 (source
14479 (origin
14480 (method url-fetch)
14481 (uri (string-append "https://github.com/Suor/whatever/archive/" version
14482 ".tar.gz"))
14483 (sha256
14484 (base32
14485 "1iqvnaf0zpc6b4rvbqq4xy45mszcscyzpzknv8wg6j84pbp22sap"))
14486 (file-name (string-append name "-" version ".tar.gz"))))
14487 (build-system python-build-system)
14488 (arguments
14489 `(#:phases
14490 (modify-phases %standard-phases
14491 (replace 'check
14492 (lambda _
14493 (invoke "py.test"))))))
14494 (native-inputs
14495 `(("python-pytest" ,python-pytest)))
14496 (home-page "http://github.com/Suor/whatever")
14497 (synopsis "Make anonymous functions by partial application of operators")
14498 (description "@code{whatever} provides an easy way to make anonymous
14499 functions by partial application of operators.")
14500 (license license:bsd-3)))
14501
14502 (define-public python2-whatever
14503 (package-with-python2 python-whatever))
14504
14505 (define-public python-funcy
14506 (package
14507 (name "python-funcy")
14508 (version "1.11")
14509 (source
14510 (origin
14511 (method git-fetch)
14512 (uri (git-reference
14513 (url "https://github.com/Suor/funcy.git")
14514 (commit version)))
14515 (sha256
14516 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14517 (file-name (git-file-name name version))))
14518 (build-system python-build-system)
14519 (arguments
14520 `(#:phases
14521 (modify-phases %standard-phases
14522 (replace 'check
14523 (lambda _
14524 (invoke "py.test"))))))
14525 (native-inputs
14526 `(("python-pytest" ,python-pytest)
14527 ("python-whatever" ,python-whatever)))
14528 (home-page "http://github.com/Suor/funcy")
14529 (synopsis "Functional tools")
14530 (description "@code{funcy} is a library that provides functional tools.
14531 Examples are:
14532 @enumerate
14533 @item merge - Merges collections of the same type
14534 @item walk - Type-preserving map
14535 @item select - Selects a part of a collection
14536 @item take - Takes the first n items of a collection
14537 @item first - Takes the first item of a collection
14538 @item remove - Predicated-removes items of a collection
14539 @item concat - Concatenates two collections
14540 @item flatten - Flattens a collection with subcollections
14541 @item distinct - Returns only distinct items
14542 @item split - Predicated-splits a collection
14543 @item split_at - Splits a collection at a given item
14544 @item group_by - Groups items by group
14545 @item pairwise - Pairs off adjacent items
14546 @item partial - Partially-applies a function
14547 @item curry - Curries a function
14548 @item compose - Composes functions
14549 @item complement - Complements a predicate
14550 @item all_fn - \"all\" with predicate
14551 @end enumerate")
14552 (license license:bsd-3)))
14553
14554 (define-public python2-funcy
14555 (package-with-python2 python-funcy))
14556
14557 (define-public python-isoweek
14558 (package
14559 (name "python-isoweek")
14560 (version "1.3.3")
14561 (source
14562 (origin
14563 (method url-fetch)
14564 (uri (pypi-uri "isoweek" version))
14565 (sha256
14566 (base32
14567 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14568 (build-system python-build-system)
14569 (home-page "https://github.com/gisle/isoweek")
14570 (synopsis "Objects representing a week")
14571 (description "The @code{isoweek} module provide the class Week that
14572 implements the week definition of ISO 8601. This standard also defines
14573 a notation for identifying weeks; yyyyWww (where the W is a literal).
14574 Week instances stringify to this form.")
14575 (license license:bsd-3)))
14576
14577 (define-public python2-isoweek
14578 (package-with-python2 python-isoweek))
14579
14580 (define-public python-tokenize-rt
14581 (package
14582 (name "python-tokenize-rt")
14583 (version "2.0.1")
14584 (source
14585 (origin
14586 (method url-fetch)
14587 (uri (pypi-uri "tokenize-rt" version))
14588 (sha256
14589 (base32
14590 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14591 (build-system python-build-system)
14592 (home-page "https://github.com/asottile/tokenize-rt")
14593 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14594 (description
14595 "This Python library is a wrapper around @code{tokenize} from the Python
14596 standard library. It provides two additional tokens @code{ESCAPED_NL} and
14597 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14598 and @code{tokens_to_src} to roundtrip.")
14599 (license license:expat)))
14600
14601 (define-public python-future-fstrings
14602 (package
14603 (name "python-future-fstrings")
14604 (version "0.4.1")
14605 (source
14606 (origin
14607 (method url-fetch)
14608 (uri (pypi-uri "future_fstrings" version))
14609 (sha256
14610 (base32
14611 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14612 (build-system python-build-system)
14613 (propagated-inputs
14614 `(("python-tokenize-rt" ,python-tokenize-rt)))
14615 (home-page "https://github.com/asottile/future-fstrings")
14616 (synopsis "Backport of fstrings to Python < 3.6")
14617 (description
14618 "This package provides a UTF-8 compatible encoding
14619 @code{future_fstrings}, which performs source manipulation. It decodes the
14620 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
14621 @code{f} strings.")
14622 (license license:expat)))
14623
14624 (define-public python-typed-ast
14625 (package
14626 (name "python-typed-ast")
14627 (version "1.3.5")
14628 (source
14629 (origin
14630 (method url-fetch)
14631 (uri (pypi-uri "typed-ast" version))
14632 (sha256
14633 (base32
14634 "1m7pr6qpana3cvqwiw7mlvrgvmw27ch5mx1592572xhlki8g85ak"))))
14635 (build-system python-build-system)
14636 (arguments
14637 `(#:modules ((guix build utils)
14638 (guix build python-build-system)
14639 (ice-9 ftw)
14640 (srfi srfi-1)
14641 (srfi srfi-26))
14642 #:phases
14643 (modify-phases %standard-phases
14644 (replace 'check
14645 (lambda _
14646 (let ((cwd (getcwd)))
14647 (setenv "PYTHONPATH"
14648 (string-append cwd "/build/"
14649 (find (cut string-prefix? "lib" <>)
14650 (scandir (string-append cwd "/build")))
14651 ":"
14652 (getenv "PYTHONPATH"))))
14653 (invoke "pytest")
14654 #t)))))
14655 (native-inputs `(("python-pytest" ,python-pytest)))
14656 (home-page "https://github.com/python/typed_ast")
14657 (synopsis "Fork of Python @code{ast} modules with type comment support")
14658 (description "This package provides a parser similar to the standard
14659 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
14660 include PEP 484 type comments and are independent of the version of Python
14661 under which they are run. The @code{typed_ast} parsers produce the standard
14662 Python AST (plus type comments), and are both fast and correct, as they are
14663 based on the CPython 2.7 and 3.7 parsers.")
14664 ;; See the file "LICENSE" for the details.
14665 (license (list license:psfl
14666 license:asl2.0
14667 license:expat)))) ;ast27/Parser/spark.py
14668
14669 (define-public python-typing
14670 (package
14671 (name "python-typing")
14672 (version "3.6.6")
14673 (source
14674 (origin
14675 (method url-fetch)
14676 (uri (pypi-uri "typing" version))
14677 (sha256
14678 (base32
14679 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
14680 (build-system python-build-system)
14681 (home-page "https://docs.python.org/3/library/typing.html")
14682 (synopsis "Type hints for Python")
14683 (description "This is a backport of the standard library @code{typing}
14684 module to Python versions older than 3.5. Typing defines a standard notation
14685 for Python function and variable type annotations. The notation can be used
14686 for documenting code in a concise, standard format, and it has been designed
14687 to also be used by static and runtime type checkers, static analyzers, IDEs
14688 and other tools.")
14689 (license license:psfl)))
14690
14691 (define-public python2-typing
14692 (package-with-python2 python-typing))
14693
14694 (define-public python-typing-extensions
14695 (package
14696 (name "python-typing-extensions")
14697 (version "3.7.2")
14698 (source
14699 (origin
14700 (method url-fetch)
14701 (uri (pypi-uri "typing_extensions" version))
14702 (sha256
14703 (base32
14704 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
14705 (build-system python-build-system)
14706 (home-page
14707 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
14708 (synopsis "Experimental type hints for Python")
14709 (description
14710 "The typing_extensions module contains additional @code{typing} hints not
14711 yet present in the of the @code{typing} standard library.
14712 Included are implementations of:
14713 @enumerate
14714 @item ClassVar
14715 @item ContextManager
14716 @item Counter
14717 @item DefaultDict
14718 @item Deque
14719 @item NewType
14720 @item NoReturn
14721 @item overload
14722 @item Protocol
14723 @item runtime
14724 @item Text
14725 @item Type
14726 @item TYPE_CHECKING
14727 @item AsyncGenerator
14728 @end enumerate\n")
14729 (license license:psfl)))
14730
14731 (define-public bpython
14732 (package
14733 (name "bpython")
14734 (version "0.17.1")
14735 (source
14736 (origin
14737 (method url-fetch)
14738 (uri (pypi-uri "bpython" version))
14739 (sha256
14740 (base32
14741 "0bxhxi5zxdkrf8b4gwn0d363kdz3qnypjwhm1aydki53ph8ca1w9"))))
14742 (build-system python-build-system)
14743 (arguments
14744 `(#:phases
14745 (modify-phases %standard-phases
14746 (add-after 'unpack 'remove-failing-test
14747 (lambda _
14748 ;; Remove failing test. FIXME: make it pass
14749 (delete-file "bpython/test/test_args.py")
14750 #t))
14751 (add-after 'wrap 'add-aliases
14752 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
14753 (lambda* (#:key outputs #:allow-other-keys)
14754 (let ((out (assoc-ref outputs "out")))
14755 (for-each
14756 (lambda (old new)
14757 (symlink old (string-append out "/bin/" new)))
14758 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
14759 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
14760 #t)))))
14761 (propagated-inputs
14762 `(("python-pygments" ,python-pygments)
14763 ("python-requests" ,python-requests)
14764 ("python-babel" ,python-babel) ; optional, for internationalization
14765 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
14766 ("python-greenlet" ,python-greenlet)
14767 ("python-urwid" ,python-urwid) ; for bpython-urwid only
14768 ("python-six" ,python-six)))
14769 (native-inputs
14770 `(("python-sphinx" ,python-sphinx)
14771 ("python-mock" ,python-mock)))
14772 (home-page "https://bpython-interpreter.org/")
14773 (synopsis "Fancy interface to the Python interpreter")
14774 (description "Bpython is a fancy interface to the Python
14775 interpreter. bpython's main features are
14776
14777 @enumerate
14778 @item in-line syntax highlighting,
14779 @item readline-like autocomplete with suggestions displayed as you type,
14780 @item expected parameter list for any Python function,
14781 @item \"rewind\" function to pop the last line of code from memory and
14782 re-evaluate,
14783 @item send the code you've entered off to a pastebin,
14784 @item save the code you've entered to a file, and
14785 @item auto-indentation.
14786 @end enumerate")
14787 (license license:expat)))
14788
14789 (define-public bpython2
14790 (let ((base (package-with-python2
14791 (strip-python2-variant bpython))))
14792 (package (inherit base)
14793 (name "bpython2")
14794 (arguments
14795 `(#:python ,python-2
14796 #:phases
14797 (modify-phases %standard-phases
14798 (add-after 'unpack 'remove-failing-test
14799 (lambda _
14800 ;; Remove failing test. FIXME: make it pass
14801 (delete-file "bpython/test/test_args.py")
14802 ;; Disable failing test-cases (renaming inhibits they are
14803 ;; discovered)
14804 (substitute* "bpython/test/test_curtsies_repl.py"
14805 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
14806 (string-append a "xxx_off_" b))
14807 (("^(\\s*def )(test_complex\\W)" _ a b)
14808 (string-append a "xxx_off_" b)))
14809 #t))
14810 (add-before 'build 'rename-scripts
14811 ;; rename the scripts to bypthon2, bpdb2, etc.
14812 (lambda _
14813 (substitute* "setup.py"
14814 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
14815 (string-append name "2" rest "\n"))
14816 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
14817 (string-append name "2" (or sub "") rest "\n")))
14818 #t))))))))
14819
14820 (define-public python-pyinotify
14821 (package
14822 (name "python-pyinotify")
14823 (version "0.9.6")
14824 (source (origin
14825 (method url-fetch)
14826 (uri (pypi-uri "pyinotify" version))
14827 (sha256
14828 (base32
14829 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
14830 (build-system python-build-system)
14831 (arguments `(#:tests? #f)) ;no tests
14832 (home-page "https://github.com/seb-m/pyinotify")
14833 (synopsis "Python library for monitoring inotify events")
14834 (description
14835 "@code{pyinotify} provides a Python interface for monitoring
14836 file system events on Linux.")
14837 (license license:expat)))
14838
14839 (define-public python2-pyinotify
14840 (package-with-python2 python-pyinotify))
14841
14842 ;; Ada parser uses this version.
14843 (define-public python2-quex-0.67.3
14844 (package
14845 (name "python2-quex")
14846 (version "0.67.3")
14847 (source
14848 (origin
14849 (method url-fetch)
14850 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
14851 (version-major+minor version)
14852 "/quex-" version ".zip"))
14853 (sha256
14854 (base32
14855 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
14856 (build-system python-build-system)
14857 (native-inputs
14858 `(("unzip" ,unzip)))
14859 (arguments
14860 `(#:python ,python-2
14861 #:tests? #f
14862 #:phases
14863 (modify-phases %standard-phases
14864 (delete 'configure)
14865 (delete 'build)
14866 (replace 'install
14867 (lambda* (#:key outputs #:allow-other-keys)
14868 (let* ((out (assoc-ref outputs "out"))
14869 (share/quex (string-append out "/share/quex"))
14870 (bin (string-append out "/bin")))
14871 (copy-recursively "." share/quex)
14872 (mkdir-p bin)
14873 (symlink (string-append share/quex "/quex-exe.py")
14874 (string-append bin "/quex"))
14875 #t))))))
14876 (native-search-paths
14877 (list (search-path-specification
14878 (variable "QUEX_PATH")
14879 (files '("share/quex")))))
14880 (home-page "http://quex.sourceforge.net/")
14881 (synopsis "Lexical analyzer generator in Python")
14882 (description "@code{quex} is a lexical analyzer generator in Python.")
14883 (license license:lgpl2.1+))) ; Non-military
14884
14885 (define-public python2-quex
14886 (package (inherit python2-quex-0.67.3)
14887 (name "python2-quex")
14888 (version "0.68.1")
14889 (source
14890 (origin
14891 (method url-fetch)
14892 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
14893 (sha256
14894 (base32
14895 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
14896 (file-name (string-append name "-" version ".tar.gz"))))))
14897
14898 (define-public python-more-itertools
14899 (package
14900 (name "python-more-itertools")
14901 (version "7.1.0")
14902 (source
14903 (origin
14904 (method url-fetch)
14905 (uri (pypi-uri "more-itertools" version))
14906 (sha256
14907 (base32
14908 "16phg2f2dvm6ci5wr49ncha5lmc0m2in3bsl33c61vzca4gkvd4b"))))
14909 (build-system python-build-system)
14910 (home-page "https://github.com/erikrose/more-itertools")
14911 (synopsis "More routines for operating on iterables, beyond itertools")
14912 (description "Python's built-in @code{itertools} module implements a
14913 number of iterator building blocks inspired by constructs from APL, Haskell,
14914 and SML. @code{more-itertools} includes additional building blocks for
14915 working with iterables.")
14916 (properties `((python2-variant . ,(delay python2-more-itertools))))
14917 (license license:expat)))
14918
14919 ;; The 5.x series are the last versions supporting Python 2.7.
14920 (define-public python2-more-itertools
14921 (package
14922 (inherit python-more-itertools)
14923 (name "python2-more-itertools")
14924 (version "5.0.0")
14925 (source (origin
14926 (method url-fetch)
14927 (uri (pypi-uri "more-itertools" version))
14928 (sha256
14929 (base32
14930 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
14931 (arguments
14932 `(#:python ,python2-minimal))
14933 (propagated-inputs
14934 `(("python2-six" ,python2-six-bootstrap)))))
14935
14936 (define-public python-latexcodec
14937 (package
14938 (name "python-latexcodec")
14939 (version "1.0.6")
14940 (source
14941 (origin
14942 (method url-fetch)
14943 (uri (pypi-uri "latexcodec" version))
14944 (sha256
14945 (base32 "0s4wdbg0w2l8pj3i0y4510i0s04p8nhxcsa2z41bjsv0k66npb81"))))
14946 (build-system python-build-system)
14947 (inputs
14948 `(("python-six" ,python-six)))
14949 (home-page "https://readthedocs.org/projects/latexcodec/")
14950 (synopsis "Work with LaTeX code in Python")
14951 (description "Lexer and codec to work with LaTeX code in Python.")
14952 (license license:expat)))
14953
14954 (define-public python-pybtex
14955 (package
14956 (name "python-pybtex")
14957 (version "0.22.2")
14958 (source
14959 (origin
14960 (method url-fetch)
14961 (uri (pypi-uri "pybtex" version))
14962 (sha256
14963 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
14964 (build-system python-build-system)
14965 (native-inputs
14966 `(("python-nose" ,python-nose)))
14967 (inputs
14968 `(("python-latexcodec" ,python-latexcodec)
14969 ("python-pyyaml" ,python-pyyaml)
14970 ("python-six" ,python-six)))
14971 (arguments
14972 `(#:test-target "nosetests"))
14973 (home-page "https://pybtex.org/")
14974 (synopsis "BibTeX-compatible bibliography processor")
14975 (description "Pybtex is a BibTeX-compatible bibliography processor written
14976 in Python. You can simply type pybtex instead of bibtex.")
14977 (license license:expat)))
14978
14979 (define-public python-onetimepass
14980 (package
14981 (name "python-onetimepass")
14982 (version "1.0.1")
14983 (source
14984 (origin
14985 (method url-fetch)
14986 (uri (pypi-uri "onetimepass" version))
14987 (sha256
14988 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
14989 (build-system python-build-system)
14990 (propagated-inputs `(("python-six" ,python-six)))
14991 (home-page "https://github.com/tadeck/onetimepass/")
14992 (synopsis "One-time password library")
14993 (description "Python one-time password library for HMAC-based (HOTP) and
14994 time-based (TOTP) passwords.")
14995 (license license:expat)))
14996
14997 (define-public python-parso
14998 (package
14999 (name "python-parso")
15000 (version "0.5.1")
15001 (source
15002 (origin
15003 (method url-fetch)
15004 (uri (pypi-uri "parso" version))
15005 (sha256
15006 (base32
15007 "171a9ivhxwsd52h1cgsz40zgzpgzscn7yqb7sdjhy8m1lzj0wsv6"))))
15008 (native-inputs
15009 `(("python-pytest" ,python-pytest)))
15010 (build-system python-build-system)
15011 (arguments
15012 `(#:phases (modify-phases %standard-phases
15013 (replace 'check
15014 (lambda _ (invoke "pytest" "-vv"))))))
15015 (home-page "https://github.com/davidhalter/parso")
15016 (synopsis "Python Parser")
15017 (description "Parso is a Python parser that supports error recovery and
15018 round-trip parsing for different Python versions (in multiple Python versions).
15019 Parso is also able to list multiple syntax errors in your Python file.")
15020 (license license:expat)))
15021
15022 (define-public python2-parso
15023 (package-with-python2 python-parso))
15024
15025 (define-public python-async-generator
15026 (package
15027 (name "python-async-generator")
15028 (version "1.10")
15029 (source
15030 (origin
15031 (method url-fetch)
15032 (uri (pypi-uri "async_generator" version))
15033 (sha256
15034 (base32
15035 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
15036 (build-system python-build-system)
15037 (native-inputs
15038 `(("python-pytest" ,python-pytest)))
15039 (home-page "https://github.com/python-trio/async_generator")
15040 (synopsis "Async generators and context managers for Python 3.5+")
15041 (description "@code{async_generator} back-ports Python 3.6's native async
15042 generators and Python 3.7's context managers into Python 3.5.")
15043 ;; Dual licensed.
15044 (license (list license:expat license:asl2.0))))
15045
15046 (define-public python-async-timeout
15047 (package
15048 (name "python-async-timeout")
15049 (version "3.0.1")
15050 (source
15051 (origin
15052 (method url-fetch)
15053 (uri (pypi-uri "async-timeout" version))
15054 (sha256
15055 (base32
15056 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
15057 (build-system python-build-system)
15058 (home-page "https://github.com/aio-libs/async_timeout/")
15059 (synopsis "Timeout context manager for asyncio programs")
15060 (description "@code{async-timeout} provides a timeout timeout context
15061 manager compatible with @code{asyncio}.")
15062 (license license:asl2.0)))
15063
15064 (define-public python-glob2
15065 (package
15066 (name "python-glob2")
15067 (version "0.6")
15068 (source
15069 (origin
15070 (method git-fetch)
15071 (uri (git-reference
15072 (url "https://github.com/miracle2k/python-glob2.git")
15073 (commit version)))
15074 (file-name (git-file-name name version))
15075 (sha256
15076 (base32 "1lm1xz3k3l0k1c5bcp9hlzmi3gp5j8dl1k3xhpiq5mnm0xq6n163"))))
15077 (build-system python-build-system)
15078 (home-page "https://github.com/miracle2k/python-glob2/")
15079 (synopsis "Extended Version of the python buildin glob module")
15080 (description "This is an extended version of the Python
15081 @url{http://docs.python.org/library/glob.html, built-in glob module} which
15082 adds:
15083
15084 @itemize
15085 @item The ability to capture the text matched by glob patterns, and return
15086 those matches alongside the file names.
15087 @item A recursive @code{**} globbing syntax, akin for example to the
15088 @code{globstar} option of Bash.
15089 @item The ability to replace the file system functions used, in order to glob
15090 on virtual file systems.
15091 @item Compatible with Python 2 and Python 3 (tested with 3.3).
15092 @end itemize
15093
15094 Glob2 currently based on the glob code from Python 3.3.1.")
15095 (license license:bsd-2)))
15096
15097 (define-public python2-glob2
15098 (package-with-python2 python-glob2))
15099
15100 (define-public python-gipc
15101 (package
15102 (name "python-gipc")
15103 (version "0.6.0")
15104 (source
15105 (origin
15106 (method url-fetch)
15107 (uri (pypi-uri "gipc" version ".zip"))
15108 (sha256
15109 (base32
15110 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
15111 (build-system python-build-system)
15112 (native-inputs
15113 `(("unzip" ,unzip)))
15114 (propagated-inputs
15115 `(("python-gevent" ,python-gevent)))
15116 (home-page "http://gehrcke.de/gipc")
15117 (synopsis "Child process management in the context of gevent")
15118 (description "Usage of Python's multiprocessing package in a
15119 gevent-powered application may raise problems. With @code{gipc},
15120 process-based child processes can safely be created anywhere within a
15121 gevent-powered application.")
15122 (license license:expat)))
15123
15124 (define-public python2-gipc
15125 (package-with-python2 python-gipc))
15126
15127 (define-public python-fusepy
15128 (package
15129 (name "python-fusepy")
15130 (version "2.0.4")
15131 (source
15132 (origin
15133 (method url-fetch)
15134 (uri (pypi-uri "fusepy" version))
15135 (sha256
15136 (base32
15137 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
15138 (build-system python-build-system)
15139 (arguments
15140 `(#:phases
15141 (modify-phases %standard-phases
15142 (add-before 'build 'set-library-file-name
15143 (lambda* (#:key inputs #:allow-other-keys)
15144 (let ((fuse (assoc-ref inputs "fuse")))
15145 (substitute* "fuse.py"
15146 (("find_library\\('fuse'\\)")
15147 (string-append "'" fuse "/lib/libfuse.so'")))
15148 #t))))))
15149 (propagated-inputs
15150 `(("fuse" ,fuse)))
15151 (home-page "https://github.com/fusepy/fusepy")
15152 (synopsis "Simple ctypes bindings for FUSE")
15153 (description "Python module that provides a simple interface to FUSE and
15154 MacFUSE. The binding is created using the standard @code{ctypes} library.")
15155 (license license:isc)))
15156
15157 (define-public python2-fusepy
15158 (package-with-python2 python-fusepy))
15159
15160 (define-public python2-gdrivefs
15161 (package
15162 (name "python2-gdrivefs")
15163 (version "0.14.9")
15164 (source
15165 (origin
15166 (method url-fetch)
15167 (uri (pypi-uri "gdrivefs" version))
15168 (sha256
15169 (base32
15170 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
15171 (build-system python-build-system)
15172 (arguments
15173 `(#:python ,python-2
15174 #:phases
15175 (modify-phases %standard-phases
15176 (add-before 'build 'patch-setup-py
15177 (lambda _
15178 ;; Update requirements from dependency==version
15179 ;; to dependency>=version
15180 (substitute* "gdrivefs/resources/requirements.txt"
15181 (("==") ">="))
15182 #t)))))
15183 (native-inputs
15184 `(("python2-gipc" ,python2-gipc)
15185 ("python2-gevent" ,python2-gevent)
15186 ("python2-greenlet" ,python2-greenlet)
15187 ("python2-httplib2" ,python2-httplib2)
15188 ("python2-uritemplate" ,python2-uritemplate)
15189 ("python2-oauth2client" ,python2-oauth2client)
15190 ("python2-six" ,python2-six)))
15191 (propagated-inputs
15192 `(("python2-dateutil" ,python2-dateutil)
15193 ("python2-fusepy" ,python2-fusepy)
15194 ("python2-google-api-client" ,python2-google-api-client)))
15195 (home-page "https://github.com/dsoprea/GDriveFS")
15196 (synopsis "Mount Google Drive as a local file system")
15197 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
15198 under Python 2.7.")
15199 (license license:gpl2)))
15200
15201 (define-public pybind11
15202 (package
15203 (name "pybind11")
15204 (version "2.3.0")
15205 (source (origin
15206 (method git-fetch)
15207 (uri (git-reference
15208 (url "https://github.com/pybind/pybind11.git")
15209 (commit (string-append "v" version))))
15210 (sha256
15211 (base32
15212 "11b6dniri8m05spfd2a19irz82shf4sdca73566bniggrf3zclnf"))
15213 (file-name (git-file-name name version))))
15214 (build-system cmake-build-system)
15215 (native-inputs
15216 `(("python" ,python)
15217 ("python-pytest" ,python-pytest)))
15218 (arguments
15219 `(#:test-target "check"))
15220 (home-page "https://github.com/pybind/pybind11/")
15221 (synopsis "Seamless operability between C++11 and Python")
15222 (description "pybind11 is a lightweight header-only library that exposes
15223 C++ types in Python and vice versa, mainly to create Python bindings of
15224 existing C++ code. Its goals and syntax are similar to the excellent
15225 Boost.Python library by David Abrahams: to minimize boilerplate code in
15226 traditional extension modules by inferring type information using compile-time
15227 introspection.")
15228 (license license:expat)))
15229
15230 (define-public python-fasteners
15231 (package
15232 (name "python-fasteners")
15233 (version "0.14.1")
15234 (source
15235 (origin
15236 (method url-fetch)
15237 (uri (pypi-uri "fasteners" version))
15238 (sha256
15239 (base32
15240 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
15241 (build-system python-build-system)
15242 (propagated-inputs
15243 `(("python-monotonic" ,python-monotonic)
15244 ("python-six" ,python-six)
15245 ("python-testtools" ,python-testtools)))
15246 (home-page "https://github.com/harlowja/fasteners")
15247 (synopsis "Python package that provides useful locks")
15248 (description
15249 "This package provides a Python program that provides following locks:
15250
15251 @itemize
15252 @item Locking decorator
15253 @item Reader-writer locks
15254 @item Inter-process locks
15255 @item Generic helpers
15256 @end itemize\n")
15257 (properties `((python2-variant . ,(delay python2-fasteners))))
15258 (license license:asl2.0)))
15259
15260 (define-public python2-fasteners
15261 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
15262 (package
15263 (inherit base)
15264 (propagated-inputs
15265 `(("python2-futures" ,python2-futures)
15266 ,@(package-propagated-inputs base))))))
15267
15268 (define-public python-requests-file
15269 (package
15270 (name "python-requests-file")
15271 (version "1.4.3")
15272 (source
15273 (origin
15274 (method url-fetch)
15275 (uri (pypi-uri "requests-file" version))
15276 (sha256
15277 (base32
15278 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
15279 (build-system python-build-system)
15280 (propagated-inputs
15281 `(("python-requests" ,python-requests)
15282 ("python-six" ,python-six)))
15283 (home-page
15284 "https://github.com/dashea/requests-file")
15285 (synopsis "File transport adapter for Requests")
15286 (description
15287 "Requests-File is a transport adapter for use with the Requests Python
15288 library to allow local file system access via @code{file://} URLs.")
15289 (license license:asl2.0)))
15290
15291 (define-public python2-requests-file
15292 (package-with-python2 python-requests-file))
15293
15294 (define-public python-tldextract
15295 (package
15296 (name "python-tldextract")
15297 (version "2.2.0")
15298 (source
15299 (origin
15300 (method url-fetch)
15301 (uri (pypi-uri "tldextract" version))
15302 (sha256
15303 (base32
15304 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
15305 (build-system python-build-system)
15306 (native-inputs
15307 `(("python-pytest" ,python-pytest)
15308 ("python-responses" ,python-responses)))
15309 (propagated-inputs
15310 `(("python-idna" ,python-idna)
15311 ("python-requests" ,python-requests)
15312 ("python-requests-file" ,python-requests-file)))
15313 (home-page
15314 "https://github.com/john-kurkowski/tldextract")
15315 (synopsis
15316 "Separate the TLD from the registered domain and subdomains of a URL")
15317 (description
15318 "TLDExtract accurately separates the TLD from the registered domain and
15319 subdomains of a URL, using the Public Suffix List. By default, this includes
15320 the public ICANN TLDs and their exceptions. It can optionally support the
15321 Public Suffix List's private domains as well.")
15322 (license license:bsd-3)))
15323
15324 (define-public python2-tldextract
15325 (package-with-python2 python-tldextract))
15326
15327 (define-public python-pynamecheap
15328 (package
15329 (name "python-pynamecheap")
15330 (version "0.0.3")
15331 (source
15332 (origin
15333 (method url-fetch)
15334 (uri (pypi-uri "PyNamecheap" version))
15335 (sha256
15336 (base32
15337 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
15338 (build-system python-build-system)
15339 (propagated-inputs
15340 `(("python-requests" ,python-requests)))
15341 (home-page
15342 "https://github.com/Bemmu/PyNamecheap")
15343 (synopsis
15344 "Namecheap API client in Python")
15345 (description
15346 "PyNamecheap is a Namecheap API client in Python.")
15347 (license license:expat)))
15348
15349 (define-public python2-pynamecheap
15350 (package-with-python2 python-pynamecheap))
15351
15352 (define-public python-dns-lexicon
15353 (package
15354 (name "python-dns-lexicon")
15355 (version "2.4.0")
15356 (source
15357 (origin
15358 (method url-fetch)
15359 (uri (pypi-uri "dns-lexicon" version))
15360 (sha256
15361 (base32
15362 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
15363 (build-system python-build-system)
15364 (arguments
15365 `(#:tests? #f)) ;requires internet access
15366 (propagated-inputs
15367 `(("python-future" ,python-future)
15368 ("python-pynamecheap" ,python-pynamecheap)
15369 ("python-requests" ,python-requests)
15370 ("python-tldextract" ,python-tldextract)
15371 ("python-urllib3" ,python-urllib3)))
15372 (home-page "https://github.com/AnalogJ/lexicon")
15373 (synopsis
15374 "Manipulate DNS records on various DNS providers")
15375 (description
15376 "Lexicon provides a way to manipulate DNS records on multiple DNS
15377 providers in a standardized way. It has a CLI but it can also be used as a
15378 Python library. It was designed to be used in automation, specifically with
15379 Let's Encrypt.")
15380 (license license:expat)))
15381
15382 (define-public python2-dns-lexicon
15383 (package-with-python2 python-dns-lexicon))
15384
15385 (define-public python-commandlines
15386 (package
15387 (name "python-commandlines")
15388 (version "0.4.1")
15389 (source
15390 (origin
15391 (method url-fetch)
15392 (uri (pypi-uri "commandlines" version))
15393 (sha256
15394 (base32
15395 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15396 (build-system python-build-system)
15397 (home-page "https://github.com/chrissimpkins/commandlines")
15398 (synopsis "Command line argument to object parsing library")
15399 (description
15400 "@code{Commandlines} is a Python library for command line application
15401 development that supports command line argument parsing, command string
15402 validation testing and application logic.")
15403 (license license:expat)))
15404
15405 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15406 ;; python-numba. They have a very unflexible relationship.
15407 (define-public python-numba
15408 (package
15409 (name "python-numba")
15410 (version "0.42.0")
15411 (source
15412 (origin
15413 (method url-fetch)
15414 (uri (pypi-uri "numba" version))
15415 (sha256
15416 (base32
15417 "03rqdfx0512lcri2bcpngx5k3jwfbqnanqj3n19c7d6h6hqxvq9x"))))
15418 (build-system python-build-system)
15419 (arguments
15420 `(#:modules ((guix build utils)
15421 (guix build python-build-system)
15422 (ice-9 ftw)
15423 (srfi srfi-1)
15424 (srfi srfi-26))
15425 #:phases
15426 (modify-phases %standard-phases
15427 (add-after 'unpack 'disable-proprietary-features
15428 (lambda _
15429 (setenv "NUMBA_DISABLE_HSA" "1")
15430 (setenv "NUMBA_DISABLE_CUDA" "1")
15431 #t))
15432 (add-after 'unpack 'remove-failing-tests
15433 (lambda _
15434 ;; FIXME: these tests fail for unknown reasons:
15435 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15436 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15437 (substitute* "numba/tests/test_dispatcher.py"
15438 (("def test(_non_writable_pycache)" _ m)
15439 (string-append "def guix_skip" m))
15440 (("def test(_non_creatable_pycache)" _ m)
15441 (string-append "def guix_skip" m))
15442 (("def test(_frozen)" _ m)
15443 (string-append "def guix_skip" m)))
15444
15445 ;; These tests fail because we don't run the tests from the build
15446 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
15447 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
15448 (substitute* "numba/tests/test_pycc.py"
15449 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15450 (string-append "def guix_skip" m)))
15451 #t))
15452 (replace 'check
15453 (lambda _
15454 (let ((cwd (getcwd)))
15455 (setenv "PYTHONPATH"
15456 (string-append cwd "/build/"
15457 (find (cut string-prefix? "lib" <>)
15458 (scandir (string-append cwd "/build")))
15459 ":"
15460 (getenv "PYTHONPATH")))
15461 ;; Something is wrong with the PYTHONPATH when running the
15462 ;; tests from the build directory, as it complains about not being
15463 ;; able to import certain modules.
15464 (with-directory-excursion "/tmp"
15465 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15466 #t)))))
15467 (propagated-inputs
15468 `(("python-llvmlite" ,python-llvmlite)
15469 ("python-numpy" ,python-numpy)
15470 ("python-singledispatch" ,python-singledispatch)))
15471 ;; Needed for tests.
15472 (inputs
15473 `(("python-jinja2" ,python-jinja2)
15474 ("python-pygments" ,python-pygments)))
15475 (home-page "https://numba.pydata.org")
15476 (synopsis "Compile Python code using LLVM")
15477 (description "Numba gives you the power to speed up your applications with
15478 high performance functions written directly in Python. With a few
15479 annotations, array-oriented and math-heavy Python code can be just-in-time
15480 compiled to native machine instructions, similar in performance to C, C++ and
15481 Fortran, without having to switch languages or Python interpreters.
15482
15483 Numba works by generating optimized machine code using the LLVM compiler
15484 infrastructure at import time, runtime, or statically (using the included pycc
15485 tool).")
15486 (license license:bsd-3)))
15487
15488 (define-public python-anndata
15489 (package
15490 (name "python-anndata")
15491 (version "0.6.18")
15492 (source
15493 (origin
15494 (method url-fetch)
15495 (uri (pypi-uri "anndata" version))
15496 (sha256
15497 (base32
15498 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
15499 (build-system python-build-system)
15500 (propagated-inputs
15501 `(("python-h5py" ,python-h5py)
15502 ("python-natsort" ,python-natsort)
15503 ("python-pandas" ,python-pandas)
15504 ("python-scipy" ,python-scipy)))
15505 (home-page "https://github.com/theislab/anndata")
15506 (synopsis "Annotated data for data analysis pipelines")
15507 (description "Anndata is a package for simple (functional) high-level APIs
15508 for data analysis pipelines. In this context, it provides an efficient,
15509 scalable way of keeping track of data together with learned annotations and
15510 reduces the code overhead typically encountered when using a mostly
15511 object-oriented library such as @code{scikit-learn}.")
15512 (license license:bsd-3)))
15513
15514 (define-public python-dill
15515 (package
15516 (name "python-dill")
15517 (version "0.2.9")
15518 (source
15519 (origin
15520 (method url-fetch)
15521 (uri (pypi-uri "dill" version))
15522 (sha256
15523 (base32 "0vwqyi6hyz2r29zydc78dqymkbc5y7gia16xcdh215cikxph9mpn"))))
15524 (build-system python-build-system)
15525 ;; FIXME: The check phase fails with "don't know how to make test from: …".
15526 (arguments '(#:tests? #f))
15527 (home-page "https://pypi.org/project/dill")
15528 (synopsis "Serialize all of Python")
15529 (description "Dill extends Python's @code{pickle} module for serializing
15530 and de-serializing Python objects to the majority of the built-in Python
15531 types. Dill provides the user the same interface as the @code{pickle} module,
15532 and also includes some additional features. In addition to pickling Python
15533 objects, @code{dill} provides the ability to save the state of an interpreter
15534 session in a single command. Hence, it would be feasible to save a
15535 interpreter session, close the interpreter, ship the pickled file to another
15536 computer, open a new interpreter, unpickle the session and thus continue from
15537 the saved state of the original interpreter session.")
15538 (license license:bsd-3)))
15539
15540 (define-public python-multiprocess
15541 (package
15542 (name "python-multiprocess")
15543 (version "0.70.6.1")
15544 (source
15545 (origin
15546 (method url-fetch)
15547 (uri (pypi-uri "multiprocess" version))
15548 (sha256
15549 (base32
15550 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
15551 (build-system python-build-system)
15552 (propagated-inputs
15553 `(("python-dill" ,python-dill)))
15554 (home-page "https://pypi.org/project/multiprocess")
15555 (synopsis "Multiprocessing and multithreading in Python")
15556 (description
15557 "This package is a fork of the multiprocessing Python package, a package
15558 which supports the spawning of processes using the API of the standard
15559 library's @code{threading} module.")
15560 (license license:bsd-3)))
15561
15562 (define-public python-toolz
15563 (package
15564 (name "python-toolz")
15565 (version "0.9.0")
15566 (source
15567 (origin
15568 (method url-fetch)
15569 (uri (pypi-uri "toolz" version))
15570 (sha256
15571 (base32
15572 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
15573 (build-system python-build-system)
15574 ;; FIXME: tests cannot be computed: "Can't perform this operation for
15575 ;; unregistered loader type"
15576 (arguments '(#:tests? #f))
15577 (home-page "https://github.com/pytoolz/toolz/")
15578 (synopsis "List processing tools and functional utilities")
15579 (description
15580 "This package provides a set of utility functions for iterators,
15581 functions, and dictionaries.")
15582 (license license:bsd-3)))
15583
15584 (define-public python2-toolz
15585 (package-with-python2 python-toolz))
15586
15587 (define-public python-cytoolz
15588 (package
15589 (name "python-cytoolz")
15590 (version "0.9.0.1")
15591 (source
15592 (origin
15593 (method url-fetch)
15594 (uri (pypi-uri "cytoolz" version))
15595 (sha256
15596 (base32
15597 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
15598 (build-system python-build-system)
15599 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
15600 ;; 'exceptions'"
15601 (arguments '(#:tests? #f))
15602 (propagated-inputs
15603 `(("python-toolz" ,python-toolz)))
15604 (native-inputs
15605 `(("python-cython" ,python-cython)))
15606 (home-page "https://github.com/pytoolz/cytoolz")
15607 (synopsis "High performance functional utilities")
15608 (description
15609 "The cytoolz package implements the same API as provided by toolz. The
15610 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
15611 that is accessible to other projects developed in Cython.")
15612 (license license:bsd-3)))
15613
15614 (define-public python-sortedcontainers
15615 (package
15616 (name "python-sortedcontainers")
15617 (version "2.0.4")
15618 (source
15619 (origin
15620 (method url-fetch)
15621 (uri (pypi-uri "sortedcontainers" version))
15622 (sha256
15623 (base32
15624 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
15625 (build-system python-build-system)
15626 (native-inputs
15627 `(("python-tox" ,python-tox)))
15628 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
15629 (synopsis "Sorted List, Sorted Dict, Sorted Set")
15630 (description
15631 "This package provides a sorted collections library, written in
15632 pure-Python.")
15633 (license license:asl2.0)))
15634
15635 (define-public python-cloudpickle
15636 (package
15637 (name "python-cloudpickle")
15638 (version "0.6.1")
15639 (source
15640 (origin
15641 (method url-fetch)
15642 (uri (pypi-uri "cloudpickle" version))
15643 (sha256
15644 (base32
15645 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
15646 (build-system python-build-system)
15647 ;; FIXME: there are 5 errors in 122 tests:
15648 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
15649 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
15650 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15651 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15652 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
15653 ;; TypeError: cannot serialize '_io.BufferedRandom' object
15654 (arguments '(#:tests? #f))
15655 (native-inputs
15656 `(("python-pytest" ,python-pytest)
15657 ("python-mock" ,python-mock)
15658 ("python-tornado" ,python-tornado)))
15659 (home-page "https://github.com/cloudpipe/cloudpickle")
15660 (synopsis "Extended pickling support for Python objects")
15661 (description
15662 "Cloudpickle makes it possible to serialize Python constructs not
15663 supported by the default pickle module from the Python standard library. It
15664 is especially useful for cluster computing where Python expressions are
15665 shipped over the network to execute on remote hosts, possibly close to the
15666 data.")
15667 (license license:bsd-3)))
15668
15669 (define-public python2-cloudpickle
15670 (package-with-python2 python-cloudpickle))
15671
15672 (define-public python-locket
15673 (package
15674 (name "python-locket")
15675 (version "0.2.0")
15676 (source
15677 (origin
15678 (method url-fetch)
15679 (uri (pypi-uri "locket" version))
15680 (sha256
15681 (base32
15682 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
15683 (build-system python-build-system)
15684 (home-page "https://github.com/mwilliamson/locket.py")
15685 (synopsis "File-based locks for Python")
15686 (description
15687 "Locket implements a lock that can be used by multiple processes provided
15688 they use the same path.")
15689 (license license:bsd-2)))
15690
15691 (define-public python2-locket
15692 (package-with-python2 python-locket))
15693
15694 (define-public python-blosc
15695 (package
15696 (name "python-blosc")
15697 (version "1.5.1")
15698 (source
15699 (origin
15700 (method url-fetch)
15701 (uri (pypi-uri "blosc" version))
15702 (sha256
15703 (base32
15704 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
15705 (build-system python-build-system)
15706 ;; FIXME: all tests pass, but then this error is printed:
15707 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
15708 (arguments '(#:tests? #f))
15709 (propagated-inputs
15710 `(("python-numpy" ,python-numpy)))
15711 (home-page "https://github.com/blosc/python-blosc")
15712 (synopsis "Python wrapper for the Blosc data compressor library")
15713 (description "Blosc is a high performance compressor optimized for binary
15714 data. It has been designed to transmit data to the processor cache faster
15715 than the traditional, non-compressed, direct memory fetch approach via a
15716 @code{memcpy()} system call.
15717
15718 Blosc works well for compressing numerical arrays that contains data with
15719 relatively low entropy, like sparse data, time series, grids with
15720 regular-spaced values, etc.
15721
15722 This Python package wraps the Blosc library.")
15723 (license license:bsd-3)))
15724
15725 (define-public python2-blosc
15726 (package-with-python2 python-blosc))
15727
15728 (define-public python-partd
15729 (package
15730 (name "python-partd")
15731 (version "0.3.9")
15732 (source
15733 (origin
15734 (method url-fetch)
15735 (uri (pypi-uri "partd" version))
15736 (sha256
15737 (base32
15738 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
15739 (build-system python-build-system)
15740 (propagated-inputs
15741 `(("python-blosc" ,python-blosc)
15742 ("python-locket" ,python-locket)
15743 ("python-numpy" ,python-numpy)
15744 ("python-pandas" ,python-pandas)
15745 ("python-pyzmq" ,python-pyzmq)
15746 ("python-toolz" ,python-toolz)))
15747 (home-page "https://github.com/dask/partd/")
15748 (synopsis "Appendable key-value storage")
15749 (description "Partd stores key-value pairs. Values are raw bytes. We
15750 append on old values. Partd excels at shuffling operations.")
15751 (license license:bsd-3)))
15752
15753 (define-public python2-partd
15754 (package-with-python2 python-partd))
15755
15756 (define-public python-dask
15757 (package
15758 (name "python-dask")
15759 (version "1.2.2")
15760 (source
15761 (origin
15762 (method url-fetch)
15763 (uri (pypi-uri "dask" version))
15764 (sha256
15765 (base32 "0b29gvf96gmp20wicly3v3mhyc93zbm3mdv935fka6x0wax7cy2y"))))
15766 (build-system python-build-system)
15767 ;; A single test out of 5000+ fails. This test is marked as xfail when
15768 ;; pytest-xdist is used.
15769 (arguments
15770 `(#:phases
15771 (modify-phases %standard-phases
15772 (add-after 'unpack 'disable-broken-test
15773 (lambda _
15774 (substitute* "dask/tests/test_threaded.py"
15775 (("def test_interrupt\\(\\)" m)
15776 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15777 m)))
15778 (when (which "python2")
15779 ;; This test fails with recent Pandas:
15780 ;; <https://github.com/dask/dask/issues/3794>.
15781 (substitute* "dask/dataframe/tests/test_dataframe.py"
15782 (("def test_info\\(\\)" m)
15783 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15784 m))))
15785 #t))
15786 (replace 'check
15787 (lambda _ (invoke "pytest" "-vv"))))))
15788 (propagated-inputs
15789 `(("python-cloudpickle" ,python-cloudpickle)
15790 ("python-numpy" ,python-numpy)
15791 ("python-pandas" ,python-pandas)
15792 ("python-partd" ,python-partd)
15793 ("python-toolz" ,python-toolz)
15794 ("python-pyyaml" ,python-pyyaml)))
15795 (native-inputs
15796 `(("python-pytest" ,python-pytest)
15797 ("python-pytest-runner" ,python-pytest-runner)))
15798 (home-page "https://github.com/dask/dask/")
15799 (synopsis "Parallel computing with task scheduling")
15800 (description
15801 "Dask is a flexible parallel computing library for analytics. It
15802 consists of two components: dynamic task scheduling optimized for computation,
15803 and large data collections like parallel arrays, dataframes, and lists that
15804 extend common interfaces like NumPy, Pandas, or Python iterators to
15805 larger-than-memory or distributed environments. These parallel collections
15806 run on top of the dynamic task schedulers. ")
15807 (license license:bsd-3)))
15808
15809 (define-public python2-dask
15810 (package-with-python2 python-dask))
15811
15812 (define-public python-ilinkedlist
15813 (package
15814 (name "python-ilinkedlist")
15815 (version "0.4.0")
15816 (source
15817 (origin
15818 (method url-fetch)
15819 (uri (pypi-uri "ilinkedlist" version))
15820 (sha256
15821 (base32
15822 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
15823 (build-system python-build-system)
15824 (native-inputs `(("python-pytest" ,python-pytest)))
15825 (inputs `(("python" ,python)))
15826 (home-page "https://github.com/luther9/ilinkedlist-py")
15827 (synopsis "Immutable linked list library")
15828 (description
15829 "This is a implementation of immutable linked lists for Python. It
15830 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
15831 Since a linked list is treated as immutable, it is hashable, and its length
15832 can be retrieved in constant time. Some of the terminology is inspired by
15833 LISP. It is possible to create an improper list by creating a @code{Pair}
15834 with a non-list @code{cdr}.")
15835 (license license:gpl3+)))
15836
15837 (define-public python-readlike
15838 (package
15839 (name "python-readlike")
15840 (version "0.1.3")
15841 (source
15842 (origin
15843 (method url-fetch)
15844 (uri (pypi-uri "readlike" version))
15845 (sha256
15846 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
15847 (build-system python-build-system)
15848 (home-page "https://github.com/jangler/readlike")
15849 (synopsis "GNU Readline-like line editing module")
15850 (description
15851 "This Python module provides line editing functions similar to the default
15852 Emacs-style ones of GNU Readline. Unlike the Python standard library's
15853 @code{readline} package, this one allows access to those capabilties in settings
15854 outside of a standard command-line interface. It is especially well-suited to
15855 interfacing with Urwid, due to a shared syntax for describing key inputs.
15856
15857 Currently, all stateless Readline commands are implemented. Yanking and history
15858 are not supported.")
15859 (license license:expat)))
15860
15861 (define-public python2-readlike
15862 (package-with-python2 python-readlike))
15863
15864 (define-public python-reparser
15865 (package
15866 (name "python-reparser")
15867 (version "1.4.3")
15868 (source
15869 (origin
15870 (method url-fetch)
15871 (uri (pypi-uri "ReParser" version))
15872 (sha256
15873 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
15874 (build-system python-build-system)
15875 (home-page "https://github.com/xmikos/reparser")
15876 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
15877 (description
15878 "This Python library provides a simple lexer/parser for inline markup based
15879 on regular expressions.")
15880 (license license:expat)))
15881
15882 (define-public python2-reparser
15883 (let ((reparser (package-with-python2
15884 (strip-python2-variant python-reparser))))
15885 (package (inherit reparser)
15886 (propagated-inputs
15887 `(("python2-enum34" ,python2-enum34)
15888 ,@(package-propagated-inputs reparser))))))
15889
15890 (define-public python-precis-i18n
15891 (package
15892 (name "python-precis-i18n")
15893 (version "1.0.0")
15894 (source
15895 (origin
15896 (method url-fetch)
15897 (uri (pypi-uri "precis_i18n" version))
15898 (sha256
15899 (base32
15900 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
15901 (build-system python-build-system)
15902 (home-page "https://github.com/byllyfish/precis_i18n")
15903 (synopsis "Implementation of the PRECIS framework")
15904 (description
15905 "This module implements the PRECIS Framework as described in RFC 8264,
15906 RFC 8265 and RFC 8266.")
15907 (license license:expat)))
15908
15909 (define-public python-absl-py
15910 (package
15911 (name "python-absl-py")
15912 (version "0.6.1")
15913 (source
15914 (origin
15915 (method url-fetch)
15916 (uri (pypi-uri "absl-py" version))
15917 (sha256
15918 (base32
15919 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
15920 (build-system python-build-system)
15921 (propagated-inputs
15922 `(("python-six" ,python-six)))
15923 (home-page "https://github.com/abseil/abseil-py")
15924 (synopsis "Abseil Python common libraries")
15925 (description
15926 "This package provides the Abseil Python Common Libraries, a collection
15927 of Python libraries for building Python applications.")
15928 (license license:asl2.0)))
15929
15930 (define-public python-astor
15931 (package
15932 (name "python-astor")
15933 (version "0.7.1")
15934 (source
15935 (origin
15936 (method url-fetch)
15937 (uri (pypi-uri "astor" version))
15938 (sha256
15939 (base32
15940 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
15941 (build-system python-build-system)
15942 ;; FIXME: There are two errors and two test failures.
15943 (arguments `(#:tests? #f))
15944 (home-page "https://github.com/berkerpeksag/astor")
15945 (synopsis "Read and write Python ASTs")
15946 (description "Astor is designed to allow easy manipulation of Python
15947 source via the Abstract Syntax Tree.")
15948 (license license:bsd-3)))
15949
15950 (define-public python2-astor
15951 (package-with-python2 python-astor))
15952
15953 (define-public python-grpcio
15954 (package
15955 (name "python-grpcio")
15956 (version "1.17.1")
15957 (source
15958 (origin
15959 (method url-fetch)
15960 (uri (pypi-uri "grpcio" version))
15961 (sha256
15962 (base32
15963 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
15964 (build-system python-build-system)
15965 (propagated-inputs
15966 `(("python-six" ,python-six)))
15967 (home-page "https://grpc.io")
15968 (synopsis "HTTP/2-based RPC framework")
15969 (description "This package provides a Python library for communicating
15970 with the HTTP/2-based RPC framework gRPC.")
15971 (license license:asl2.0)))
15972
15973 (define-public python-astunparse
15974 (package
15975 (name "python-astunparse")
15976 (version "1.6.2")
15977 (source
15978 (origin
15979 (method url-fetch)
15980 (uri (pypi-uri "astunparse" version))
15981 (sha256
15982 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
15983 (build-system python-build-system)
15984 (arguments '(#:tests? #f)) ; there are none
15985 (propagated-inputs
15986 `(("python-six" ,python-six)
15987 ("python-wheel" ,python-wheel)))
15988 (home-page "https://github.com/simonpercivall/astunparse")
15989 (synopsis "AST unparser for Python")
15990 (description "This package provides an AST unparser for Python. It is a
15991 factored out version of @code{unparse} found in the Python source
15992 distribution.")
15993 (license license:bsd-3)))
15994
15995 (define-public python-gast
15996 (package
15997 (name "python-gast")
15998 (version "0.2.2")
15999 (source
16000 (origin
16001 (method url-fetch)
16002 (uri (pypi-uri "gast" version))
16003 (sha256
16004 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
16005 (build-system python-build-system)
16006 (propagated-inputs
16007 `(("python-astunparse" ,python-astunparse)))
16008 (home-page "https://pypi.org/project/gast/")
16009 (synopsis "Generic Python AST that abstracts the underlying Python version")
16010 (description
16011 "GAST provides a compatibility layer between the AST of various Python
16012 versions, as produced by @code{ast.parse} from the standard @code{ast}
16013 module.")
16014 (license license:bsd-3)))
16015
16016 (define-public python-wikidata
16017 (package
16018 (name "python-wikidata")
16019 (version "0.6.1")
16020 (source
16021 (origin
16022 (method url-fetch)
16023 (uri (pypi-uri "Wikidata" version))
16024 (sha256
16025 (base32
16026 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
16027 (build-system python-build-system)
16028 (propagated-inputs
16029 `(("python-babel" ,python-babel)))
16030 (home-page "https://github.com/dahlia/wikidata")
16031 (synopsis "Wikidata client library")
16032 (description
16033 "This package provides a Python interface to
16034 @url{https://www.wikidata.org/, Wikidata}.")
16035 (properties '((upstream-name . "Wikidata")))
16036 (license license:gpl3+)))
16037
16038 (define-public python-doctest-ignore-unicode
16039 (package
16040 (name "python-doctest-ignore-unicode")
16041 (version "0.1.2")
16042 (source
16043 (origin
16044 (method url-fetch)
16045 (uri (pypi-uri "doctest-ignore-unicode" version))
16046 (sha256
16047 (base32
16048 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
16049 (build-system python-build-system)
16050 (native-inputs
16051 `(("python-nose" ,python-nose)))
16052 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
16053 (synopsis "Ignore Unicode literal prefixes in doctests")
16054 (description
16055 "This package adds support for a flag to ignore Unicode literal prefixes
16056 in doctests.")
16057 (license license:asl2.0)))
16058
16059 (define-public python-attr
16060 (package
16061 (name "python-attr")
16062 (version "0.3.1")
16063 (source
16064 (origin
16065 (method url-fetch)
16066 (uri (pypi-uri "attr" version))
16067 (sha256
16068 (base32
16069 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
16070 (build-system python-build-system)
16071 (home-page "https://github.com/denis-ryzhkov/attr")
16072 (synopsis "Decorator for attributes of target function or class")
16073 (description "Simple decorator to set attributes of target function or
16074 class in a @acronym{DRY, Don't Repeat Yourself} way.")
16075 (license license:expat)))
16076
16077 (define-public python-construct
16078 (package
16079 (name "python-construct")
16080 (version "2.9.45")
16081 (source
16082 (origin
16083 (method url-fetch)
16084 (uri (pypi-uri "construct" version))
16085 (sha256
16086 (base32
16087 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
16088 (build-system python-build-system)
16089 (arguments
16090 `(#:tests? #f)) ; No tests exist.
16091 (propagated-inputs
16092 `(("python-extras" ,python-extras)
16093 ("python-arrow" ,python-arrow)
16094 ("python-numpy" ,python-numpy)
16095 ("python-ruamel.yaml" ,python-ruamel.yaml)))
16096 (home-page "http://construct.readthedocs.io")
16097 (synopsis "Declarative and symmetrical parser and builder for binary data")
16098 (description
16099 "This package provides both simple, atomic constructs (such as
16100 integers of various sizes), as well as composite ones which allow you
16101 form hierarchical and sequential structures of increasing complexity.
16102 It features bit and byte granularity, easy debugging and testing, an
16103 easy-to-extend subclass system, and lots of primitive constructs to
16104 make your work easier.")
16105 (license license:expat)))
16106
16107 (define-public python-humanize
16108 (package
16109 (name "python-humanize")
16110 (version "0.5.1")
16111 (source
16112 (origin
16113 (method url-fetch)
16114 (uri (pypi-uri "humanize" version))
16115 (sha256
16116 (base32
16117 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
16118 (arguments
16119 '(#:tests? #f)) ; tests not in pypi archive
16120 (build-system python-build-system)
16121 (home-page "https://github.com/jmoiron/humanize")
16122 (synopsis "Print numerical information in a human-readable form")
16123 (description "This package provides a Python module that displays numbers
16124 and dates in \"human readable\" forms. For example, it would display
16125 \"12345591313\" as \"12.3 billion\".")
16126 (license license:expat)))
16127
16128 (define-public python-txaio
16129 (package
16130 (name "python-txaio")
16131 (version "18.8.1")
16132 (source
16133 (origin
16134 (method url-fetch)
16135 (uri (pypi-uri "txaio" version))
16136 (sha256
16137 (base32
16138 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
16139 (build-system python-build-system)
16140 (propagated-inputs
16141 `(("python-twisted" ,python-twisted)
16142 ("python-six" ,python-six)))
16143 (home-page "https://github.com/crossbario/txaio")
16144 (synopsis "Compatibility layer between Python asyncio and Twisted")
16145 (description "Txaio provides a compatibility layer between the Python
16146 @code{asyncio} module and @code{Twisted}.")
16147 (license license:expat)))
16148
16149 (define-public python-toolshed
16150 (package
16151 (name "python-toolshed")
16152 (version "0.4.6")
16153 (source
16154 (origin
16155 (method url-fetch)
16156 (uri (pypi-uri "toolshed" version))
16157 (sha256
16158 (base32
16159 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
16160 (build-system python-build-system)
16161 (native-inputs
16162 `(("python-nose" ,python-nose)))
16163 (home-page "https://github.com/brentp/toolshed/")
16164 (synopsis "Collection of modules and functions for working with data")
16165 (description "This is a collection of well-tested, simple modules and
16166 functions that aim to reduce boilerplate when working with data.")
16167 (license license:bsd-2)))
16168
16169 (define-public python-annoy
16170 (package
16171 (name "python-annoy")
16172 (version "1.15.1")
16173 (source
16174 (origin
16175 (method url-fetch)
16176 (uri (pypi-uri "annoy" version))
16177 (sha256
16178 (base32
16179 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
16180 (build-system python-build-system)
16181 (native-inputs
16182 `(("python-nose" ,python-nose)))
16183 (home-page "https://github.com/spotify/annoy/")
16184 (synopsis "Approximate nearest neighbors library")
16185 (description
16186 "Annoy is a C++ library with Python bindings to search for points in
16187 space that are close to a given query point. It also creates large read-only
16188 file-based data structures that are @code{mmap}ped into memory so that many
16189 processes may share the same data.")
16190 (license license:asl2.0)))
16191
16192 (define-public python-pylzma
16193 (package
16194 (name "python-pylzma")
16195 (version "0.5.0")
16196 (source
16197 (origin
16198 (method url-fetch)
16199 (uri (pypi-uri "pylzma" version))
16200 (sha256
16201 (base32
16202 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
16203 (build-system python-build-system)
16204 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
16205 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
16206 (description "This package provides Python bindings for the LZMA library
16207 by Igor Pavlov.")
16208 (license license:lgpl2.1+)))
16209
16210 (define-public python2-pylzma
16211 (package-with-python2 python-pylzma))
16212
16213 (define-public python2-zeroconf
16214 (package
16215 (name "python2-zeroconf")
16216
16217 ;; This is the last version that supports Python 2.x.
16218 (version "0.19.1")
16219 (source
16220 (origin
16221 (method url-fetch)
16222 (uri (pypi-uri "zeroconf" version))
16223 (sha256
16224 (base32
16225 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
16226 (build-system python-build-system)
16227 (arguments
16228 `(#:python ,python-2
16229 #:phases
16230 (modify-phases %standard-phases
16231 (add-after 'unpack 'patch-requires
16232 (lambda* (#:key inputs #:allow-other-keys)
16233 (substitute* "setup.py"
16234 (("enum-compat")
16235 "enum34"))
16236 #t)))))
16237 (native-inputs
16238 `(("python2-six" ,python2-six)
16239 ("python2-enum32" ,python2-enum34)
16240 ("python2-netifaces" ,python2-netifaces)
16241 ("python2-typing" ,python2-typing)))
16242 (home-page "https://github.com/jstasiak/python-zeroconf")
16243 (synopsis "Pure Python mDNS service discovery")
16244 (description
16245 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
16246 compatible).")
16247 (license license:lgpl2.1+)))
16248
16249 (define-public python-bsddb3
16250 (package
16251 (name "python-bsddb3")
16252 (version "6.2.6")
16253 (source
16254 (origin
16255 (method url-fetch)
16256 (uri (pypi-uri "bsddb3" version))
16257 (sha256
16258 (base32
16259 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
16260 (build-system python-build-system)
16261 (inputs
16262 `(("bdb" ,bdb)))
16263 (arguments
16264 '(#:phases
16265 (modify-phases %standard-phases
16266 (add-after 'unpack 'configure-locations
16267 (lambda* (#:key inputs #:allow-other-keys)
16268 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
16269 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
16270 #t))
16271 (replace 'check
16272 (lambda _
16273 (invoke "python3" "test3.py" "-v"))))))
16274 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
16275 (synopsis "Python bindings for Oracle Berkeley DB")
16276 (description
16277 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
16278 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
16279 Transaction objects, and each of these is exposed as a Python type in the
16280 bsddb3.db module. The database objects can use various access methods: btree,
16281 hash, recno, and queue. Complete support of Berkeley DB distributed
16282 transactions. Complete support for Berkeley DB Replication Manager.
16283 Complete support for Berkeley DB Base Replication. Support for RPC.")
16284 (license license:bsd-3)))
16285
16286 (define-public python-dbfread
16287 (package
16288 (name "python-dbfread")
16289 (version "2.0.7")
16290 (source (origin
16291 (method url-fetch)
16292 (uri (pypi-uri "dbfread" version))
16293 (sha256
16294 (base32
16295 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
16296 (build-system python-build-system)
16297 (native-inputs
16298 `(("python-pytest" ,python-pytest)))
16299 (home-page "https://dbfread.readthedocs.io")
16300 (synopsis "Read DBF Files with Python")
16301 (description
16302 "This library reads DBF files and returns the data as native Python data
16303 types for further processing. It is primarily intended for batch jobs and
16304 one-off scripts.")
16305 (license license:expat)))
16306
16307 (define-public python-cached-property
16308 (package
16309 (name "python-cached-property")
16310 (version "1.5.1")
16311 (source
16312 (origin
16313 (method url-fetch)
16314 (uri (pypi-uri "cached-property" version))
16315 (sha256
16316 (base32
16317 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
16318 (build-system python-build-system)
16319 (arguments
16320 `(#:phases
16321 (modify-phases %standard-phases
16322 ;; https://github.com/pydanny/cached-property/issues/131
16323 ;; recent versions of freezegun break one test
16324 (add-after 'unpack 'disable-broken-test
16325 (lambda _
16326 (substitute* "tests/test_cached_property.py"
16327 (("def test_threads_ttl_expiry\\(self\\)" m)
16328 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
16329 " " m)))
16330 #t)))))
16331 (native-inputs
16332 `(("python-freezegun" ,python-freezegun)))
16333 (home-page
16334 "https://github.com/pydanny/cached-property")
16335 (synopsis
16336 "Decorator for caching properties in classes")
16337 (description
16338 "This package provides a decorator which makes caching
16339 time-or-computationally-expensive properties quick and easy and works in Python
16340 2 or 3.")
16341 (license license:bsd-3)))
16342
16343 (define-public python-folium
16344 (package
16345 (name "python-folium")
16346 (version "0.10.0")
16347 (source
16348 (origin
16349 (method url-fetch)
16350 (uri (pypi-uri "folium" version))
16351 (sha256
16352 (base32
16353 "18fzxijsgrb95r0a8anc9ba5ijyw3nlnv3rpavfbkqa5v878x84f"))))
16354 (build-system python-build-system)
16355 (propagated-inputs
16356 `(("python-branca" ,python-branca)
16357 ("python-jinja2" ,python-jinja2)
16358 ("python-numpy" ,python-numpy)
16359 ("python-requests" ,python-requests)))
16360 (native-inputs
16361 `(("python-pytest" ,python-pytest)))
16362 (home-page "https://github.com/python-visualization/folium")
16363 (synopsis "Make beautiful maps with Leaflet.js & Python")
16364 (description "@code{folium} makes it easy to visualize data that’s been
16365 manipulated in Python on an interactive leaflet map. It enables both the
16366 binding of data to a map for @code{choropleth} visualizations as well as
16367 passing rich vector/raster/HTML visualizations as markers on the map.
16368
16369 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
16370 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
16371 supports Image, Video, GeoJSON and TopoJSON overlays.")
16372 (license license:expat)))
16373
16374 (define-public jube
16375 (package
16376 ;; This is a command-line tool, so no "python-" prefix.
16377 (name "jube")
16378 (version "2.2.2")
16379 (source (origin
16380 (method url-fetch)
16381 (uri (string-append
16382 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
16383 version))
16384 (sha256
16385 (base32
16386 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
16387 (file-name (string-append "jube-" version ".tar.gz"))))
16388 (build-system python-build-system)
16389 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
16390 (synopsis "Benchmarking environment")
16391 (description
16392 "JUBE helps perform and analyze benchmarks in a systematic way. For each
16393 benchmarked application, benchmark data is stored in a format that allows JUBE
16394 to deduct the desired information. This data can be parsed by automatic pre-
16395 and post-processing scripts that draw information and store it more densely
16396 for manual interpretation.")
16397 (license license:gpl3+)))
16398
16399 (define-public python-pyroutelib3
16400 (package
16401 (name "python-pyroutelib3")
16402 (version "1.3.post1")
16403 (source
16404 (origin
16405 (method url-fetch)
16406 (uri (pypi-uri "pyroutelib3" version))
16407 (sha256
16408 (base32
16409 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
16410 (build-system python-build-system)
16411 (propagated-inputs
16412 `(("python-dateutil" ,python-dateutil)))
16413 (home-page "https://github.com/MKuranowski/pyroutelib3")
16414 (synopsis "Library for simple routing on OSM data")
16415 (description "Library for simple routing on OSM data")
16416 (license license:gpl3+)))
16417
16418 (define-public python-elementpath
16419 (package
16420 (name "python-elementpath")
16421 (version "1.2.0")
16422 (source
16423 (origin
16424 (method url-fetch)
16425 (uri (pypi-uri "elementpath" version))
16426 (sha256
16427 (base32
16428 "1syn2z543brab23dskh3fjd9pqvz6npqbcicrs2d88dbg26xl08p"))))
16429 (build-system python-build-system)
16430 (home-page
16431 "https://github.com/sissaschool/elementpath")
16432 (synopsis
16433 "XPath 1.0/2.0 parsers and selectors for ElementTree and lxml")
16434 (description
16435 "The proposal of this package is to provide XPath 1.0 and 2.0 selectors
16436 for Python's ElementTree XML data structures, both for the standard
16437 ElementTree library and for the @uref{http://lxml.de, lxml.etree} library.
16438
16439 For lxml.etree this package can be useful for providing XPath 2.0 selectors,
16440 because lxml.etree already has it's own implementation of XPath 1.0.")
16441 (license license:expat)))
16442
16443 (define-public python-bibtexparser
16444 (package
16445 (name "python-bibtexparser")
16446 (version "1.1.0")
16447 (source
16448 (origin
16449 (method url-fetch)
16450 (uri (pypi-uri "bibtexparser" version))
16451 (sha256
16452 (base32
16453 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
16454 (build-system python-build-system)
16455 (propagated-inputs
16456 `(("python-pyparsing" ,python-pyparsing)))
16457 (native-inputs
16458 `(("python-future" ,python-future)))
16459 (home-page "https://github.com/sciunto-org/python-bibtexparser")
16460 (synopsis "Python library to parse BibTeX files")
16461 (description "BibtexParser is a Python library to parse BibTeX files.")
16462 (license (list license:bsd-3 license:lgpl3))))
16463
16464 (define-public python-distro
16465 (package
16466 (name "python-distro")
16467 (version "1.4.0")
16468 (source
16469 (origin
16470 (method url-fetch)
16471 (uri (pypi-uri "distro" version))
16472 (sha256
16473 (base32
16474 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
16475 (build-system python-build-system)
16476 (native-inputs
16477 `(("python-pytest" ,python-pytest)))
16478 (home-page "https://github.com/nir0s/distro")
16479 (synopsis
16480 "OS platform information API")
16481 (description
16482 "@code{distro} provides information about the OS distribution it runs on,
16483 such as a reliable machine-readable ID, or version information.
16484
16485 It is the recommended replacement for Python's original
16486 `platform.linux_distribution` function (which will be removed in Python 3.8).
16487 @code{distro} also provides a command-line interface to output the platform
16488 information in various formats.")
16489 (license license:asl2.0)))