gnu: python-semver: Do not patch virtualenv for tests.
[jackhill/guix/guix.git] / gnu / packages / python-xyz.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2013, 2014, 2015, 2016, 2019 Andreas Enge <andreas@enge.fr>
5 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2014, 2017 Eric Bavier <bavier@member.fsf.org>
7 ;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
8 ;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
9 ;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
10 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
11 ;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
12 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
13 ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
14 ;;; Copyright © 2015, 2016, 2017, 2019 Leo Famulari <leo@famulari.name>
15 ;;; Copyright © 2015, 2017 Ben Woodcroft <donttrustben@gmail.com>
16 ;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
17 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
18 ;;; Copyright © 2015, 2017 Kyle Meyer <kyle@kyleam.com>
19 ;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
20 ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
21 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
22 ;;; Copyright © 2016, 2018-2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
23 ;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
24 ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
25 ;;; Copyright © 2016, 2017 Troy Sankey <sankeytms@gmail.com>
26 ;;; Copyright © 2016, 2017 ng0 <ng0@n0.is>
27 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28 ;;; Copyright © 2016 David Craven <david@craven.ch>
29 ;;; Copyright © 2016, 2017, 2018, 2019 Marius Bakke <mbakke@fastmail.com>
30 ;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
31 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
32 ;;; Copyright © 2016, 2017, 2019 Alex Vong <alexvong1995@gmail.com>
33 ;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
34 ;;; Copyright © 2016, 2017, 2018 Julien Lepiller <julien@lepiller.eu>
35 ;;; Copyright © 2016, 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
36 ;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
37 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
38 ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
39 ;;; Copyright © 2017, 2018 Adriano Peluso <catonano@gmail.com>
40 ;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
41 ;;; Copyright © 2017, 2018, 2019 Mathieu Othacehe <m.othacehe@gmail.com>
42 ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
43 ;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
44 ;;; Copyright © 2017, 2018, 2019 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, 2019 Clément Lassieur <clement@lassieur.org>
57 ;;; Copyright © 2018, 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
58 ;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
59 ;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
60 ;;; Copyright © 2019 Brett Gilio <brettg@posteo.net>
61 ;;; Copyright © 2019 Sam <smbaines8@gmail.com>
62 ;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us>
63 ;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
64 ;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
65 ;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
66 ;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
67 ;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
68 ;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
69 ;;; Copyright © 2019 Tanguy Le Carrour <tanguy@bioneland.org>
70 ;;;
71 ;;; This file is part of GNU Guix.
72 ;;;
73 ;;; GNU Guix is free software; you can redistribute it and/or modify it
74 ;;; under the terms of the GNU General Public License as published by
75 ;;; the Free Software Foundation; either version 3 of the License, or (at
76 ;;; your option) any later version.
77 ;;;
78 ;;; GNU Guix is distributed in the hope that it will be useful, but
79 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
80 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
81 ;;; GNU General Public License for more details.
82 ;;;
83 ;;; You should have received a copy of the GNU General Public License
84 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
85
86 (define-module (gnu packages python-xyz)
87 #:use-module ((guix licenses) #:prefix license:)
88 #:use-module (gnu packages)
89 #:use-module (gnu packages algebra)
90 #:use-module (gnu packages adns)
91 #:use-module (gnu packages attr)
92 #:use-module (gnu packages backup)
93 #:use-module (gnu packages bash)
94 #:use-module (gnu packages check)
95 #:use-module (gnu packages compression)
96 #:use-module (gnu packages crypto)
97 #:use-module (gnu packages databases)
98 #:use-module (gnu packages dbm)
99 #:use-module (gnu packages file)
100 #:use-module (gnu packages fontutils)
101 #:use-module (gnu packages gcc)
102 #:use-module (gnu packages geo)
103 #:use-module (gnu packages ghostscript)
104 #:use-module (gnu packages gl)
105 #:use-module (gnu packages glib)
106 #:use-module (gnu packages gnome)
107 #:use-module (gnu packages graphviz)
108 #:use-module (gnu packages graphics)
109 #:use-module (gnu packages gstreamer)
110 #:use-module (gnu packages gtk)
111 #:use-module (gnu packages icu4c)
112 #:use-module (gnu packages image)
113 #:use-module (gnu packages imagemagick)
114 #:use-module (gnu packages libevent)
115 #:use-module (gnu packages libffi)
116 #:use-module (gnu packages linux)
117 #:use-module (gnu packages llvm)
118 #:use-module (gnu packages man)
119 #:use-module (gnu packages maths)
120 #:use-module (gnu packages monitoring)
121 #:use-module (gnu packages multiprecision)
122 #:use-module (gnu packages networking)
123 #:use-module (gnu packages ncurses)
124 #:use-module (gnu packages openstack)
125 #:use-module (gnu packages pcre)
126 #:use-module (gnu packages perl)
127 #:use-module (gnu packages pkg-config)
128 #:use-module (gnu packages python)
129 #:use-module (gnu packages python-check)
130 #:use-module (gnu packages python-compression)
131 #:use-module (gnu packages python-crypto)
132 #:use-module (gnu packages python-science)
133 #:use-module (gnu packages python-web)
134 #:use-module (gnu packages qt)
135 #:use-module (gnu packages readline)
136 #:use-module (gnu packages sdl)
137 #:use-module (gnu packages search)
138 #:use-module (gnu packages shells)
139 #:use-module (gnu packages sphinx)
140 #:use-module (gnu packages ssh)
141 #:use-module (gnu packages terminals)
142 #:use-module (gnu packages tex)
143 #:use-module (gnu packages texinfo)
144 #:use-module (gnu packages time)
145 #:use-module (gnu packages tls)
146 #:use-module (gnu packages version-control)
147 #:use-module (gnu packages video)
148 #:use-module (gnu packages web)
149 #:use-module (gnu packages base)
150 #:use-module (gnu packages xml)
151 #:use-module (gnu packages xorg)
152 #:use-module (gnu packages xdisorg)
153 #:use-module (gnu packages tcl)
154 #:use-module (gnu packages bdw-gc)
155 #:use-module (gnu packages serialization)
156 #:use-module (guix packages)
157 #:use-module (guix download)
158 #:use-module (guix git-download)
159 #:use-module (guix hg-download)
160 #:use-module (guix utils)
161 #:use-module (guix build-system gnu)
162 #:use-module (guix build-system cmake)
163 #:use-module (guix build-system python)
164 #:use-module (guix build-system trivial)
165 #:use-module (srfi srfi-1)
166 #:use-module (srfi srfi-26))
167
168 (define-public python-psutil
169 (package
170 (name "python-psutil")
171 (version "5.6.5")
172 (source
173 (origin
174 (method url-fetch)
175 (uri (pypi-uri "psutil" version))
176 (sha256
177 (base32 "0isil5jxwwd8awz54qk28rpgjg43i5l6yl70g40vxwa4r4m56lfh"))))
178 (build-system python-build-system)
179 (arguments
180 ;; FIXME: some tests does not return and times out.
181 '(#:tests? #f))
182 (home-page "https://www.github.com/giampaolo/psutil")
183 (synopsis "Library for retrieving information on running processes")
184 (description
185 "psutil (Python system and process utilities) is a library for retrieving
186 information on running processes and system utilization (CPU, memory, disks,
187 network) in Python. It is useful mainly for system monitoring, profiling and
188 limiting process resources and management of running processes. It implements
189 many functionalities offered by command line tools such as: ps, top, lsof,
190 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
191 pidof, tty, taskset, pmap.")
192 (properties `((python2-variant . ,(delay python2-psutil))))
193 (license license:bsd-3)))
194
195 (define-public python2-psutil
196 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
197 (package
198 (inherit base)
199 (propagated-inputs
200 `(("python2-enum34" ,python2-enum34) ;optional
201 ,@(package-propagated-inputs base))))))
202
203 (define-public python-shapely
204 (package
205 (name "python-shapely")
206 (version "1.6.4.post2")
207 (source
208 (origin
209 (method url-fetch)
210 (uri (pypi-uri "Shapely" version))
211 (sha256
212 (base32
213 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
214 (build-system python-build-system)
215 (native-inputs
216 `(("python-cython" ,python-cython)
217 ("python-matplotlib" ,python-matplotlib)
218 ("python-pytest" ,python-pytest)
219 ("python-pytest-cov" ,python-pytest-cov)))
220 (inputs
221 `(("geos" ,geos)))
222 (propagated-inputs
223 `(("python-numpy" ,python-numpy)))
224 (arguments
225 `(#:phases
226 (modify-phases %standard-phases
227 (add-after 'unpack 'patch-geos-path
228 (lambda* (#:key inputs #:allow-other-keys)
229 (let ((geos (assoc-ref inputs "geos"))
230 (glibc (assoc-ref inputs ,(if (%current-target-system)
231 "cross-libc" "libc"))))
232 (substitute* "shapely/geos.py"
233 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
234 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
235 geos "/lib/libgeos_c.so'])"))
236 (("free = load_dll\\('c'\\)\\.free")
237 (string-append "free = load_dll('c', fallbacks=['"
238 glibc "/lib/libc.so.6']).free"))))
239 #t)))))
240 (home-page "https://github.com/Toblerity/Shapely")
241 (synopsis "Library for the manipulation and analysis of geometric objects")
242 (description "Shapely is a Python package for manipulation and analysis of
243 planar geometric objects. It is based on the @code{GEOS} library.")
244 (license license:bsd-3)))
245
246 (define-public python-shortuuid
247 (package
248 (name "python-shortuuid")
249 (version "0.5.0")
250 (source
251 (origin
252 (method url-fetch)
253 (uri (pypi-uri "shortuuid" version))
254 (sha256
255 (base32
256 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
257 (build-system python-build-system)
258 (native-inputs
259 `(("python-pep8" ,python-pep8)))
260 (home-page "https://github.com/skorokithakis/shortuuid")
261 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
262 (description
263 "@code{shortuuid} is a Python library for generating concise, unambiguous
264 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
265 module and then similar looking characters are removed.")
266 (license license:bsd-3)))
267
268 (define-public python-logwrap
269 (package
270 (name "python-logwrap")
271 (version "3.2.1")
272 (source
273 (origin
274 (method url-fetch)
275 (uri (pypi-uri "logwrap" version ".zip"))
276 (sha256
277 (base32
278 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
279 (build-system python-build-system)
280 (propagated-inputs
281 `(("python-six" ,python-six)
282 ("python-typing" ,python-typing)))
283 (native-inputs
284 `(("unzip" ,unzip)
285 ("python-cython" ,python-cython)
286 ("python-pytest" ,python-pytest)
287 ("python-pytest-cov" ,python-pytest-cov)
288 ("python-pytest-runner" ,python-pytest-runner)))
289 (home-page "https://github.com/penguinolog/logwrap")
290 (synopsis "Decorator for logging function arguments")
291 (description "This package provides a decorator to log function arguments
292 and function call return values in a human-readable way.")
293 (license license:asl2.0)))
294
295 (define-public python2-shapely
296 (package-with-python2 python-shapely))
297
298 (define-public python-clyent
299 (package
300 (name "python-clyent")
301 (version "1.2.1")
302 (source
303 (origin
304 (method url-fetch)
305 (uri (pypi-uri "clyent" version))
306 (sha256
307 (base32
308 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
309 (build-system python-build-system)
310 (native-inputs
311 `(("python-mock" ,python-mock)))
312 (home-page "https://github.com/binstar/clyent")
313 (synopsis "Command line client library")
314 (description "Clyent is a Python command line utiliy library. It is used
315 by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
316 (license license:bsd-3)))
317
318 (define-public python2-clyent
319 (package-with-python2 python-clyent))
320
321 (define-public python-babel
322 (package
323 (name "python-babel")
324 (version "2.7.0")
325 (source
326 (origin
327 (method url-fetch)
328 (uri (pypi-uri "Babel" version))
329 (sha256
330 (base32
331 "0a7wawx8vsg7igvz6p3x909fskhg4b2y1910xk4f4c8y22p3aqg8"))))
332 (build-system python-build-system)
333 (native-inputs
334 `(("python-freezegun" ,python-freezegun)
335 ("python-pytest" ,python-pytest)))
336 (propagated-inputs
337 `(("python-pytz" ,python-pytz)))
338 (arguments
339 `(#:phases (modify-phases %standard-phases
340 (replace 'check
341 (lambda _
342 (invoke "pytest" "-vv" "-k"
343 (string-append
344 ;; XXX: These tests fail when using Pytest 4.x and
345 ;; Babel 2.6.0. Try removing this for later versions.
346 "not test_no_inherit_metazone_marker_never_in_output"
347 " and not test_smoke_dates"
348 " and not test_smoke_numbers")))))))
349 (home-page "http://babel.pocoo.org/")
350 (synopsis
351 "Tools for internationalizing Python applications")
352 (description
353 "Babel is composed of two major parts:
354 - tools to build and work with gettext message catalogs
355 - a Python interface to the CLDR (Common Locale Data Repository), providing
356 access to various locale display names, localized number and date formatting,
357 etc. ")
358 (license license:bsd-3)))
359
360 (define-public python2-babel
361 (package-with-python2 python-babel))
362
363 ;; Sphinx < 2.0 requires this version. Remove once no longer needed.
364 (define-public python2-babel-2.6
365 (package
366 (inherit python2-babel)
367 (version "2.6.0")
368 (source (origin
369 (method url-fetch)
370 (uri (pypi-uri "Babel" version))
371 (sha256
372 (base32
373 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
374
375 (define-public python2-backport-ssl-match-hostname
376 (package
377 (name "python2-backport-ssl-match-hostname")
378 (version "3.5.0.1")
379 (source
380 (origin
381 (method url-fetch)
382 (uri (pypi-uri "backports.ssl_match_hostname" version))
383 (sha256
384 (base32
385 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
386 (build-system python-build-system)
387 (arguments
388 `(#:python ,python-2
389 #:tests? #f)) ; no test target
390 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
391 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
392 (description
393 "This backport brings the ssl.match_hostname() function to users of
394 earlier versions of Python. The function checks the hostname in the
395 certificate returned by the server to which a connection has been established,
396 and verifies that it matches the intended target hostname.")
397 (license license:psfl)))
398
399 (define-public python-boolean.py
400 (package
401 (name "python-boolean.py")
402 (version "3.6")
403 (source
404 (origin
405 ;; There's no source tarball on PyPI.
406 (method git-fetch)
407 (uri (git-reference
408 (url "https://github.com/bastikr/boolean.py")
409 (commit (string-append "v" version))))
410 (file-name (git-file-name name version))
411 (sha256
412 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
413 (build-system python-build-system)
414 (home-page "https://github.com/bastikr/boolean.py")
415 (synopsis "Boolean algebra in one Python module")
416 (description
417 "This is a small Python library that implements boolean algebra.
418 It defines two base elements, @code{TRUE} and @code{FALSE}, and a
419 @code{Symbol} class that can take on one of these two values. Calculations
420 are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
421 compositions like @code{XOR} and @code{NAND} are emulated on top of them.
422 Expressions are constructed from parsed strings or directly in Python.")
423 (license license:bsd-2)))
424
425 (define-public python-hdf4
426 (package
427 (name "python-hdf4")
428 (version "0.9")
429 (source
430 (origin
431 (method url-fetch)
432 (uri (pypi-uri name version))
433 (sha256
434 (base32
435 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
436 (build-system python-build-system)
437 (native-inputs `(("nose" ,python-nose)))
438 (propagated-inputs `(("numpy" ,python-numpy)))
439 (inputs
440 `(("hdf4" ,hdf4)
441 ("libjpeg" ,libjpeg)
442 ("zlib" ,zlib)))
443 (arguments
444 `(#:phases
445 (modify-phases %standard-phases
446 (replace 'check
447 (lambda _
448 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
449 ;; on to import numpy. Somehow this works on their CI system.
450 ;; Let's just manage PYTHONPATH here instead.
451 (substitute* "runexamples.sh"
452 (("export PYTHONPATH=.*") ""))
453 (setenv "PYTHONPATH"
454 (string-append (getcwd) ":"
455 (getenv "PYTHONPATH")))
456 (invoke "./runexamples.sh")
457 (invoke "nosetests" "-v"))))))
458 (home-page "https://github.com/fhs/python-hdf4")
459 (synopsis "Python interface to the NCSA HDF4 library")
460 (description
461 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
462 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
463 NetCDF files can also be read and modified. Python-HDF4 is a fork of
464 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
465 (license license:expat)))
466
467 (define-public python2-hdf4
468 (package-with-python2 python-hdf4))
469
470 (define-public python-h5py
471 (package
472 (name "python-h5py")
473 (version "2.8.0")
474 (source
475 (origin
476 (method url-fetch)
477 (uri (pypi-uri "h5py" version))
478 (sha256
479 (base32
480 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
481 (build-system python-build-system)
482 (arguments
483 `(#:tests? #f ; no test target
484 #:phases
485 (modify-phases %standard-phases
486 (add-after 'unpack 'fix-hdf5-paths
487 (lambda* (#:key inputs #:allow-other-keys)
488 (let ((prefix (assoc-ref inputs "hdf5")))
489 (substitute* "setup_build.py"
490 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
491 (string-append "['" prefix "/lib" "']"))
492 (("'/opt/local/include', '/usr/local/include'")
493 (string-append "'" prefix "/include" "'")))
494 (substitute* "setup_configure.py"
495 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
496 (string-append "['" prefix "/lib" "']")))
497 #t))))))
498 (propagated-inputs
499 `(("python-six" ,python-six)
500 ("python-numpy" ,python-numpy)))
501 (inputs
502 `(("hdf5" ,hdf5)))
503 (native-inputs
504 `(("python-cython" ,python-cython)
505 ("python-pkgconfig" ,python-pkgconfig)))
506 (home-page "http://www.h5py.org/")
507 (synopsis "Read and write HDF5 files from Python")
508 (description
509 "The h5py package provides both a high- and low-level interface to the
510 HDF5 library from Python. The low-level interface is intended to be a
511 complete wrapping of the HDF5 API, while the high-level component supports
512 access to HDF5 files, datasets and groups using established Python and NumPy
513 concepts.")
514 (license license:bsd-3)))
515
516 (define-public python2-h5py
517 (package-with-python2 python-h5py))
518
519 (define-public python-sh
520 (package
521 (name "python-sh")
522 (version "1.12.14")
523 (source
524 (origin
525 (method url-fetch)
526 (uri (pypi-uri "sh" version))
527 (sha256
528 (base32
529 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
530 (build-system python-build-system)
531 (arguments
532 '(#:phases
533 (modify-phases %standard-phases
534 (replace 'check
535 (lambda _
536 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
537 (setenv "HOME" "/tmp")
538 (invoke "python" "sh.py" "test"))))))
539 (native-inputs
540 `(("python-coverage" ,python-coverage)))
541 (home-page "https://github.com/amoffat/sh")
542 (synopsis "Python subprocess replacement")
543 (description "This package provides a replacement for Python's
544 @code{subprocess} feature.")
545 (license license:expat)))
546
547 (define-public python2-sh
548 (package-with-python2 python-sh))
549
550 (define-public python-cftime
551 (package
552 (name "python-cftime")
553 (version "1.0.4.2")
554 (source
555 (origin
556 (method url-fetch)
557 (uri (pypi-uri "cftime" version))
558 (sha256
559 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
560 (build-system python-build-system)
561 (propagated-inputs
562 `(("python-numpy" ,python-numpy)))
563 (native-inputs
564 `(("python-coveralls" ,python-coveralls)
565 ("python-cython" ,python-cython)
566 ("python-pytest-cov" ,python-pytest-cov)))
567 (home-page "https://github.com/Unidata/cftime")
568 (synopsis "Library for time handling")
569 (description
570 "This package provides time-handling functionality that used to be part
571 of the netcdf4 package before.")
572 ;; This package claims to include code under the GPLv3 but is released
573 ;; under ISC.
574 (license (list license:isc license:gpl3+))))
575
576 (define-public python-netcdf4
577 (package
578 (name "python-netcdf4")
579 (version "1.4.2")
580 (source
581 (origin
582 (method url-fetch)
583 (uri (pypi-uri "netCDF4" version))
584 (sha256
585 (base32
586 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
587 (build-system python-build-system)
588 (arguments
589 '(#:phases
590 (modify-phases %standard-phases
591 (add-after 'unpack 'configure-locations
592 (lambda* (#:key inputs #:allow-other-keys)
593 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
594 #t)))))
595 (native-inputs
596 `(("python-cython" ,python-cython)))
597 (propagated-inputs
598 `(("python-numpy" ,python-numpy)
599 ("python-cftime" ,python-cftime)))
600 (inputs
601 `(("netcdf" ,netcdf)
602 ("hdf4" ,hdf4)
603 ("hdf5" ,hdf5)))
604 (home-page "https://github.com/Unidata/netcdf4-python")
605 (synopsis "Python/numpy interface to the netCDF library")
606 (description "Netcdf4-python is a Python interface to the netCDF C
607 library. netCDF version 4 has many features not found in earlier
608 versions of the library and is implemented on top of HDF5. This module
609 can read and write files in both the new netCDF 4 and the old netCDF 3
610 format, and can create files that are readable by HDF5 clients. The
611 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
612 to users of that module.")
613 ;; The software is mainly ISC, but includes some files covered
614 ;; by the Expat license.
615 (license (list license:isc license:expat))))
616
617 (define-public python2-netcdf4
618 (package-with-python2 python-netcdf4))
619
620 (define-public python-license-expression
621 (package
622 (name "python-license-expression")
623 (version "0.999")
624 (source
625 (origin
626 (method url-fetch)
627 (uri (pypi-uri "license-expression" version))
628 (sha256
629 (base32 "08ppb0bxbrsxazy88sgpl9yffvdsabw6dkk1nc332wcz2mphwwyf"))))
630 (build-system python-build-system)
631 (propagated-inputs
632 `(("python-boolean.py" ,python-boolean.py)))
633 (home-page "https://github.com/nexB/license-expression")
634 (synopsis "Apply boolean logic to license expressions")
635 (description
636 "This Python module defines a tiny language to evaluate and compare
637 license expressions using boolean logic. Logical combinations of licenses can
638 be tested for equality, containment, and equivalence. They can be normalised
639 and simplified. It supports SPDX license expressions as well as other naming
640 conventions and aliases in the same expression.")
641 (license license:gpl2+)))
642
643 (define-public python-lockfile
644 (package
645 (name "python-lockfile")
646 (version "0.12.2")
647 (source
648 (origin
649 (method url-fetch)
650 (uri (pypi-uri "lockfile" version))
651 (sha256
652 (base32
653 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
654 (build-system python-build-system)
655 (arguments '(#:test-target "check"))
656 (native-inputs
657 `(("python-pbr" ,python-pbr)))
658 (home-page "https://launchpad.net/pylockfile")
659 (synopsis "Platform-independent file locking module")
660 (description
661 "The lockfile package exports a LockFile class which provides a simple
662 API for locking files.")
663 (license license:expat)))
664
665 (define-public python2-lockfile
666 (package-with-python2 python-lockfile))
667
668 (define-public python-semantic-version
669 (package
670 (name "python-semantic-version")
671 (version "2.6.0")
672 (source
673 (origin
674 (method url-fetch)
675 (uri (pypi-uri "semantic_version" version))
676 (sha256
677 (base32
678 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
679 (build-system python-build-system)
680 (arguments
681 `(#:tests? #f)) ; PyPI tarball lacks tests
682 (home-page "https://github.com/rbarrois/python-semanticversion")
683 (synopsis "Semantic versioning module for Python")
684 (description
685 "The @code{semantic_version} class is a small library for handling
686 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
687
688 It can compare versions, generate a new version that represents a bump in one of
689 the version levels, and check whether any given string is a proper semantic
690 version identifier.")
691 (license license:bsd-3)))
692
693 (define-public python2-semantic-version
694 (package-with-python2 python-semantic-version))
695
696 (define-public python-serpent
697 (package
698 (name "python-serpent")
699 (version "1.28")
700 (source
701 (origin
702 (method url-fetch)
703 (uri (pypi-uri "serpent" version))
704 (sha256
705 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
706 (build-system python-build-system)
707 (native-inputs
708 `(("python-attrs" ,python-attrs)
709 ("python-pytz" ,python-pytz)))
710 (home-page "https://github.com/irmen/Serpent")
711 (synopsis "Serializer for literal Python expressions")
712 (description
713 "Serpent provides @code{ast.literal_eval()}-compatible object tree
714 serialization. It serializes an object tree into bytes (an utf-8 encoded
715 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
716 to rebuild the original object tree.
717
718 Because only safe literals are encoded, it is safe to send serpent data to
719 other machines, such as over the network.")
720 (license license:expat)))
721
722 (define-public python-setuptools
723 (package
724 (name "python-setuptools")
725 (version "41.0.1")
726 (source
727 (origin
728 (method url-fetch)
729 (uri (pypi-uri "setuptools" version ".zip"))
730 (sha256
731 (base32
732 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
733 (modules '((guix build utils)))
734 (snippet
735 '(begin
736 ;; Remove included binaries which are used to build self-extracting
737 ;; installers for Windows.
738 ;; TODO: Find some way to build them ourself so we can include them.
739 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
740 #t))))
741 (build-system python-build-system)
742 ;; FIXME: Tests require pytest, which itself relies on setuptools.
743 ;; One could bootstrap with an internal untested setuptools.
744 (arguments
745 `(#:tests? #f))
746 (home-page "https://pypi.python.org/pypi/setuptools")
747 (synopsis
748 "Library designed to facilitate packaging Python projects")
749 (description
750 "Setuptools is a fully-featured, stable library designed to facilitate
751 packaging Python projects, where packaging includes:
752 Python package and module definitions,
753 distribution package metadata,
754 test hooks,
755 project installation,
756 platform-specific details,
757 Python 3 support.")
758 ;; TODO: setuptools now bundles the following libraries:
759 ;; packaging, pyparsing, six and appdirs. How to unbundle?
760 (license (list license:psfl ; setuptools itself
761 license:expat ; six, appdirs, pyparsing
762 license:asl2.0 ; packaging is dual ASL2/BSD-2
763 license:bsd-2))))
764
765 (define-public python2-setuptools
766 (package-with-python2 python-setuptools))
767
768 ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
769 (define-public python-setuptools-for-tensorflow
770 (hidden-package
771 (package
772 (inherit python-setuptools)
773 (version "39.1.0")
774 (source (origin
775 (inherit (package-source python-setuptools))
776 (uri (pypi-uri "setuptools" version ".zip"))
777 (sha256
778 (base32
779 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
780
781 (define-public python-uniseg
782 (package
783 (name "python-uniseg")
784 (version "0.7.1")
785 (source
786 (origin
787 (method url-fetch)
788 (uri (pypi-uri "uniseg" version ".zip"))
789 (sha256
790 (base32
791 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
792 (build-system python-build-system)
793 (arguments
794 '(#:tests? #f)) ; The test suite requires network access.
795 (native-inputs
796 `(("unzip" ,unzip)))
797 (home-page
798 "https://bitbucket.org/emptypage/uniseg-python")
799 (synopsis
800 "Python library to determine Unicode text segmentations")
801 (description
802 "Uniseg is a Python package used to determine Unicode text segmentations.
803 Supported segmentations include:
804 @enumerate
805 @item @dfn{Code point} (any value in the Unicode codespace)
806 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
807 multiple Unicode code points, e.g. \"G\" + acute-accent)
808 @item Word break
809 @item Sentence break
810 @item Line break
811 @end enumerate")
812 (license license:expat)))
813
814 (define-public python2-uniseg
815 (package-with-python2 python-uniseg))
816
817 (define-public python-humanfriendly
818 (package
819 (name "python-humanfriendly")
820 (version "4.4.1")
821 (source
822 (origin
823 (method url-fetch)
824 (uri (pypi-uri "humanfriendly" version))
825 (sha256
826 (base32
827 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
828 (build-system python-build-system)
829 (arguments
830 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
831 #:tests? #f))
832 (propagated-inputs
833 `(("python-monotonic" ,python-monotonic)))
834 (home-page "https://humanfriendly.readthedocs.io")
835 (synopsis "Human-friendly input and output in Python")
836 (description
837 "The functions and classes in @code{humanfriendly} can be used to make
838 text interfaces more user-friendly. It includes tools to parse and format
839 numbers, file sizes, and timespans, timers for long-running operations, menus
840 to allow the user to choose from a list of options, and terminal interaction
841 helpers.")
842 (license license:expat)))
843
844 (define-public python2-humanfriendly
845 (package-with-python2 python-humanfriendly))
846
847 (define-public python-capturer
848 (package
849 (name "python-capturer")
850 (version "2.4")
851 (source
852 (origin
853 (method url-fetch)
854 (uri (pypi-uri "capturer" version))
855 (sha256
856 (base32
857 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
858 (build-system python-build-system)
859 (arguments
860 `(#:tests? #f))
861 (propagated-inputs
862 `(("python-humanfriendly" ,python-humanfriendly)))
863 (home-page "https://capturer.readthedocs.io")
864 (synopsis "Capture stdout and stderr streams of the current process")
865 (description
866 "The capturer package makes it easy to capture the stdout and stderr
867 streams of the current process and subprocesses. Output can be relayed
868 to the terminal in real time but is also available to the Python program
869 for additional processing.")
870 (license license:expat)))
871
872 (define-public python2-capturer
873 (package-with-python2 python-capturer))
874
875 (define-public python-case
876 (package
877 (name "python-case")
878 (version "1.5.3")
879 (source
880 (origin
881 (method url-fetch)
882 (uri (pypi-uri "case" version))
883 (sha256
884 (base32
885 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
886 (build-system python-build-system)
887 (propagated-inputs
888 `(("python-mock" ,python-mock)
889 ("python-nose" ,python-nose)
890 ("python-six" ,python-six)
891 ("python-unittest2" ,python-unittest2)))
892 (native-inputs
893 `(("python-coverage" ,python-coverage)))
894 (home-page "https://github.com/celery/case")
895 (synopsis "Unittest utilities and convenience methods")
896 (description
897 "The @code{case} package provides utilities on top of unittest, including
898 some helpful Python 2 compatibility convenience methods.")
899 (license license:bsd-3)))
900
901 (define-public python-verboselogs
902 (package
903 (name "python-verboselogs")
904 (version "1.7")
905 (source
906 (origin
907 (method url-fetch)
908 (uri (pypi-uri "verboselogs" version))
909 (sha256
910 (base32
911 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
912 (build-system python-build-system)
913 (arguments
914 `(#:phases
915 (modify-phases %standard-phases
916 (replace 'check
917 (lambda _
918 ;; Do not run pylint plugin test, as astroid is an old
919 ;; unsupported version.
920 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
921 "verboselogs/tests.py"))))))
922 (native-inputs
923 `(("python-mock" ,python-mock)
924 ("python-pytest" ,python-pytest)))
925 (home-page "https://verboselogs.readthedocs.io")
926 (synopsis "Verbose logging level for Python's logging module")
927 (description
928 "The @code{verboselogs} package extends Python's @code{logging} module to
929 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
930 (license license:expat)))
931
932 (define-public python2-verboselogs
933 (package-with-python2 python-verboselogs))
934
935 (define-public python-coloredlogs
936 (package
937 (name "python-coloredlogs")
938 (version "10.0")
939 (source
940 (origin
941 (method url-fetch)
942 (uri (pypi-uri "coloredlogs" version))
943 (sha256
944 (base32
945 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
946 (build-system python-build-system)
947 (arguments
948 `(;Tests require some updated modules
949 #:tests? #f))
950 (propagated-inputs
951 `(("python-capturer" ,python-capturer)))
952 (home-page "https://coloredlogs.readthedocs.io")
953 (synopsis "Colored stream handler for Python's logging module")
954 (description
955 "The @code{coloredlogs} package enables colored terminal output for
956 Python's logging module. The @code{ColoredFormatter} class inherits from
957 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
958 messages in color.")
959 (license license:expat)))
960
961 (define-public python2-coloredlogs
962 (package-with-python2 python-coloredlogs))
963
964 (define-public python-editorconfig
965 (package
966 (name "python-editorconfig")
967 (version "0.12.2")
968 (source
969 (origin
970 (method url-fetch)
971 (uri (pypi-uri "EditorConfig" version))
972 (sha256
973 (base32
974 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
975 (build-system python-build-system)
976 (home-page "https://editorconfig.org/")
977 (synopsis "EditorConfig bindings for python")
978 (description "The EditorConfig project consists of a file format for
979 defining coding styles and a collection of text editor plugins that enable
980 editors to read the file format and adhere to defined styles. EditorConfig
981 files are easily readable and they work nicely with version control systems.")
982 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
983 (license (list license:bsd-2 license:psfl))))
984
985 (define-public python-et-xmlfile
986 (package
987 (name "python-et-xmlfile")
988 (version "1.0.1")
989 (source
990 (origin
991 (method url-fetch)
992 (uri (pypi-uri "et_xmlfile" version))
993 (sha256
994 (base32
995 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
996 (build-system python-build-system)
997 (arguments
998 `(#:phases (modify-phases %standard-phases
999 (replace 'check
1000 (lambda _
1001 (invoke "pytest"))))))
1002 (native-inputs
1003 `(("python-pytest" ,python-pytest)
1004 ("python-lxml" ,python-lxml))) ;used for the tests
1005 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
1006 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
1007 (description "This Python library is based upon the @code{xmlfile} module
1008 from @code{lxml}. It aims to provide a low memory, compatible implementation
1009 of @code{xmlfile}.")
1010 (license license:expat)))
1011
1012 (define-public python2-et-xmlfile
1013 (package-with-python2 python-et-xmlfile))
1014
1015 (define-public python-openpyxl
1016 (package
1017 (name "python-openpyxl")
1018 (version "2.6.2")
1019 (source
1020 (origin
1021 ;; We use the upstream repository, as the tests are not included in the
1022 ;; PyPI releases.
1023 (method hg-fetch)
1024 (uri (hg-reference
1025 (url "https://bitbucket.org/openpyxl/openpyxl")
1026 (changeset version)))
1027 (file-name (string-append name "-" version "-checkout"))
1028 (sha256
1029 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
1030 (build-system python-build-system)
1031 (arguments
1032 `(#:phases (modify-phases %standard-phases
1033 (replace 'check
1034 (lambda _
1035 (invoke "pytest"))))))
1036 (native-inputs
1037 ;; For the test suite.
1038 `(("python-lxml" ,python-lxml)
1039 ("python-pillow" ,python-pillow)
1040 ("python-pytest" ,python-pytest)))
1041 (propagated-inputs
1042 `(("python-et-xmlfile" ,python-et-xmlfile)
1043 ("python-jdcal" ,python-jdcal)))
1044 (home-page "https://openpyxl.readthedocs.io")
1045 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1046 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1047 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1048 standard.")
1049 (license license:expat)))
1050
1051 (define-public python-eventlet
1052 (package
1053 (name "python-eventlet")
1054 (version "0.20.1")
1055 (source
1056 (origin
1057 (method url-fetch)
1058 (uri (pypi-uri "eventlet" version))
1059 (sha256
1060 (base32
1061 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
1062 (build-system python-build-system)
1063 (propagated-inputs
1064 `(("python-greenlet" ,python-greenlet)))
1065 (arguments
1066 ;; TODO: Requires unpackaged 'enum-compat'.
1067 '(#:tests? #f))
1068 (home-page "http://eventlet.net")
1069 (synopsis "Concurrent networking library for Python")
1070 (description
1071 "Eventlet is a concurrent networking library for Python that
1072 allows you to change how you run your code, not how you write it.
1073 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1074 Coroutines ensure that the developer uses a blocking style of programming
1075 that is similar to threading, but provide the benefits of non-blocking I/O.
1076 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1077 from the Python interpreter, or as a small part of a larger application.")
1078 (license license:expat)))
1079
1080 (define-public python2-eventlet
1081 (let ((base (package-with-python2
1082 (strip-python2-variant python-eventlet))))
1083 (package (inherit base)
1084 (propagated-inputs
1085 `(("python2-enum34" ,python2-enum34)
1086 ,@(package-propagated-inputs base))))))
1087
1088 (define-public python-six
1089 (package
1090 (name "python-six")
1091 (version "1.12.0")
1092 (source
1093 (origin
1094 (method url-fetch)
1095 (uri (pypi-uri "six" version))
1096 (sha256
1097 (base32
1098 "0wxs1q74v07ssjywbbm7x6h5v9qx209ld2yfsif4060sxi0h2sni"))))
1099 (build-system python-build-system)
1100 (arguments
1101 `(#:phases
1102 (modify-phases %standard-phases
1103 (replace 'check
1104 (lambda _
1105 (invoke "py.test" "-v"))))))
1106 (native-inputs
1107 `(("python-py" ,python-py)
1108 ("python-pytest" ,python-pytest-bootstrap)))
1109 (home-page "https://pypi.python.org/pypi/six/")
1110 (synopsis "Python 2 and 3 compatibility utilities")
1111 (description
1112 "Six is a Python 2 and 3 compatibility library. It provides utility
1113 functions for smoothing over the differences between the Python versions with
1114 the goal of writing Python code that is compatible on both Python versions.
1115 Six supports every Python version since 2.5. It is contained in only one
1116 Python file, so it can be easily copied into your project.")
1117 (license license:x11)))
1118
1119 (define-public python2-six
1120 (package-with-python2 python-six))
1121
1122 (define-public python-six-bootstrap
1123 (package
1124 (inherit python-six)
1125 (name "python-six-bootstrap")
1126 (native-inputs `())
1127 (arguments `(#:tests? #f))))
1128
1129 (define-public python2-six-bootstrap
1130 (package-with-python2 python-six-bootstrap))
1131
1132 (define-public python-schedule
1133 (package
1134 (name "python-schedule")
1135 (version "0.4.3")
1136 (source
1137 (origin
1138 (method url-fetch)
1139 (uri (pypi-uri "schedule" version))
1140 (sha256
1141 (base32
1142 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1143 (build-system python-build-system)
1144 (native-inputs
1145 `(("python-pytest" ,python-pytest)
1146 ("python-mock" ,python-mock)))
1147 (home-page "https://github.com/dbader/schedule")
1148 (synopsis "Schedule periodic function calls in Python")
1149 (description
1150 "Schedule is an in-process scheduler for periodic jobs that uses the
1151 builder pattern for configuration. Schedule lets you run Python functions (or
1152 any other callable) periodically at pre-determined intervals using a simple,
1153 human-friendly syntax.")
1154 (license license:expat)))
1155
1156 (define-public python2-schedule
1157 (package-with-python2 python-schedule))
1158
1159 (define-public python2-mechanize
1160 (package
1161 (name "python2-mechanize")
1162 (version "0.2.5")
1163 (source
1164 (origin
1165 (method url-fetch)
1166 (uri (pypi-uri "mechanize" version))
1167 (sha256
1168 (base32
1169 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1170 (build-system python-build-system)
1171 (arguments
1172 `(#:python ,python-2 ; apparently incompatible with Python 3
1173 #:tests? #f))
1174 ;; test fails with message
1175 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1176 ;; (python-3.3.2) or
1177 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1178 ;; (python-2.7.5).
1179 ;; The source code is from March 2011 and probably not up-to-date
1180 ;; with respect to python unit tests.
1181 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1182 (synopsis
1183 "Stateful programmatic web browsing in Python")
1184 (description
1185 "Mechanize implements stateful programmatic web browsing in Python,
1186 after Andy Lester’s Perl module WWW::Mechanize.")
1187 (license (license:non-copyleft
1188 "file://COPYING"
1189 "See COPYING in the distribution."))))
1190
1191
1192 (define-public python-simplejson
1193 (package
1194 (name "python-simplejson")
1195 (version "3.14.0")
1196 (source
1197 (origin
1198 (method url-fetch)
1199 (uri (pypi-uri "simplejson" version))
1200 (sha256
1201 (base32
1202 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1203 (build-system python-build-system)
1204 (home-page "http://simplejson.readthedocs.org/en/latest/")
1205 (synopsis
1206 "Json library for Python")
1207 (description
1208 "JSON (JavaScript Object Notation) is a subset of JavaScript
1209 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1210 format.
1211
1212 Simplejson exposes an API familiar to users of the standard library marshal
1213 and pickle modules. It is the externally maintained version of the json
1214 library contained in Python 2.6, but maintains compatibility with Python 2.5
1215 and (currently) has significant performance advantages, even without using
1216 the optional C extension for speedups. Simplejson is also supported on
1217 Python 3.3+.")
1218 (license license:x11)))
1219
1220 (define-public python2-simplejson
1221 (package-with-python2 python-simplejson))
1222
1223
1224 (define-public python-pyicu
1225 (package
1226 (name "python-pyicu")
1227 (version "2.3.1")
1228 (source
1229 (origin
1230 (method url-fetch)
1231 (uri (pypi-uri "PyICU" version))
1232 (sha256
1233 (base32
1234 "1x4w8m7ifki9z2a187pgjr33z6z0rp2fii9b73djak1vhm9v9cnx"))))
1235 (build-system python-build-system)
1236 (inputs
1237 `(("icu4c" ,icu4c)))
1238 (native-inputs
1239 `(("python-pytest" ,python-pytest)
1240 ("python-six" ,python-six)))
1241 (home-page "https://github.com/ovalhub/pyicu")
1242 (synopsis "Python extension wrapping the ICU C++ API")
1243 (description
1244 "PyICU is a python extension wrapping the ICU C++ API.")
1245 (properties `((python2-variant . ,(delay python2-pyicu))))
1246 (license license:x11)))
1247
1248 (define-public python2-pyicu
1249 (let ((base (package-with-python2
1250 (strip-python2-variant python-pyicu))))
1251 (package
1252 (inherit base)
1253 (arguments
1254 `(,@(package-arguments base)
1255 #:phases
1256 (modify-phases %standard-phases
1257 (add-before 'check 'delete-failing-test
1258 (λ _
1259 ;; XXX: This fails due to Unicode issues unique to Python 2,
1260 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1261 (delete-file "test/test_Script.py")
1262 #t))))))))
1263
1264 (define-public python2-dogtail
1265 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1266 ;; spaces in indentation" with Python 3.
1267 (package
1268 (name "python2-dogtail")
1269 (version "0.9.9")
1270 (source (origin
1271 (method url-fetch)
1272 (uri (pypi-uri "dogtail" version))
1273 (sha256
1274 (base32
1275 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1276 (build-system python-build-system)
1277 (arguments `(#:python ,python-2
1278 #:tests? #f)) ; invalid command "test"
1279 ;; Currently no offical homepage.
1280 (home-page "https://pypi.python.org/pypi/dogtail/")
1281 (synopsis "GUI test tool and automation framework written in Python")
1282 (description
1283 "Dogtail is a GUI test tool and automation framework written in Python.
1284 It uses Accessibility (a11y) technologies to communicate with desktop
1285 applications. dogtail scripts are written in Python and executed like any
1286 other Python program.")
1287 (license license:gpl2+)))
1288
1289 (define-public python-empy
1290 (package
1291 (name "python-empy")
1292 (version "3.3.3")
1293 (source (origin
1294 (method url-fetch)
1295 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1296 version ".tar.gz"))
1297 (sha256
1298 (base32
1299 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
1300 (build-system python-build-system)
1301 (arguments
1302 `(#:tests? #f)) ; python2 only
1303 (home-page "http://www.alcyone.com/software/empy/")
1304 (synopsis "Templating system for Python")
1305 (description
1306 "EmPy is a system for embedding Python expressions and statements in
1307 template text; it takes an EmPy source file, processes it, and produces
1308 output. This is accomplished via expansions, which are special signals to the
1309 EmPy system and are set off by a special prefix (by default the at sign, @@).
1310 EmPy can expand arbitrary Python expressions and statements in this way, as
1311 well as a variety of special forms. Textual data not explicitly delimited in
1312 this way is sent unaffected to the output, allowing Python to be used in
1313 effect as a markup language. Also supported are callbacks via hooks,
1314 recording and playback via diversions, and dynamic, chainable filters. The
1315 system is highly configurable via command line options and embedded
1316 commands.")
1317 (license license:lgpl2.1+)))
1318
1319 (define-public python2-empy
1320 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1321 (package
1322 (inherit base)
1323 (arguments `(,@(package-arguments base)
1324 #:tests? #t)))))
1325
1326 (define-public python2-element-tree
1327 (package
1328 (name "python2-element-tree")
1329 (version "1.2.6")
1330 (source (origin
1331 (method url-fetch)
1332 (uri (string-append
1333 "http://effbot.org/media/downloads/elementtree-"
1334 version "-20050316.tar.gz"))
1335 (sha256
1336 (base32
1337 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1338 (build-system python-build-system)
1339 (arguments
1340 `(#:python ,python-2 ; seems to be part of Python 3
1341 #:tests? #f)) ; no 'test' sub-command
1342 (synopsis "Toolkit for XML processing in Python")
1343 (description
1344 "ElementTree is a Python library supporting lightweight XML processing.")
1345 (home-page "http://effbot.org/zone/element-index.htm")
1346 (license (license:x11-style
1347 "http://docs.python.org/2/license.html"
1348 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1349
1350 (define-public python2-pybugz
1351 (package
1352 (name "python2-pybugz")
1353 (version "0.6.11")
1354 (source (origin
1355 (method url-fetch)
1356 (uri (string-append
1357 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1358 version ".tar.gz"))
1359 (sha256
1360 (base32
1361 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1362 (patches (search-patches "pybugz-stty.patch"
1363 "pybugz-encode-error.patch"))))
1364 (build-system python-build-system)
1365 (arguments
1366 `(#:python ,python-2 ; SyntaxError with Python 3
1367 #:tests? #f)) ; no 'test' sub-command
1368 (propagated-inputs
1369 `(("element-tree" ,python2-element-tree)))
1370 (synopsis "Python and command-line interface to Bugzilla")
1371 (description
1372 "PyBugz is a Python library and command-line tool to query the Bugzilla
1373 bug tracking system. It is meant as an aid to speed up interaction with the
1374 bug tracker.")
1375 (home-page "http://www.liquidx.net/pybugz/")
1376 (license license:gpl2)))
1377
1378 (define-public python2-enum
1379 (package
1380 (name "python2-enum")
1381 (version "0.4.6")
1382 (source (origin
1383 (method url-fetch)
1384 (uri (pypi-uri "enum" version))
1385 (sha256
1386 (base32
1387 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1388 (build-system python-build-system)
1389 (arguments
1390 `(#:python ,python-2))
1391 (home-page "http://pypi.python.org/pypi/enum/")
1392 (synopsis "Robust enumerated type support in Python")
1393 (description
1394 "This provides a module for robust enumerations in Python. It has
1395 been superseded by the Python standard library and is provided only for
1396 compatibility.")
1397 ;; Choice of either license.
1398 (license (list license:gpl3+ license:psfl))))
1399
1400 (define-public python-enum34
1401 (package
1402 (name "python-enum34")
1403 (version "1.1.6")
1404 (source
1405 (origin
1406 (method url-fetch)
1407 (uri (pypi-uri "enum34" version))
1408 (sha256
1409 (base32
1410 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1411 (build-system python-build-system)
1412 (home-page "https://pypi.python.org/pypi/enum34")
1413 (synopsis "Backported Python 3.4 Enum")
1414 (description
1415 "Enum34 is the new Python stdlib enum module available in Python 3.4
1416 backported for previous versions of Python from 2.4 to 3.3.")
1417 (license license:bsd-3)))
1418
1419 (define-public python2-enum34
1420 (package-with-python2 python-enum34))
1421
1422 (define-public python-parse-type
1423 (package
1424 (name "python-parse-type")
1425 (version "0.4.2")
1426 (source
1427 (origin
1428 (method url-fetch)
1429 (uri (pypi-uri "parse_type" version))
1430 (sha256
1431 (base32
1432 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1433 (build-system python-build-system)
1434 (propagated-inputs
1435 `(("python-six" ,python-six)
1436 ("python-parse" ,python-parse)))
1437 (native-inputs
1438 `(("python-pytest" ,python-pytest)
1439 ("python-pytest-runner" ,python-pytest-runner)))
1440 (home-page "https://github.com/jenisys/parse_type")
1441 (synopsis "Extended parse module")
1442 (description
1443 "Parse_type extends the python parse module.")
1444 (properties
1445 `((python2-variant . ,(delay python2-parse-type))))
1446 (license license:bsd-3)))
1447
1448 (define-public python2-parse-type
1449 (let ((base (package-with-python2
1450 (strip-python2-variant python-parse-type))))
1451 (package (inherit base)
1452 (propagated-inputs
1453 `(("python2-enum34" ,python2-enum34)
1454 ,@(package-propagated-inputs base))))))
1455
1456 (define-public python-parse
1457 (package
1458 (name "python-parse")
1459 (version "1.8.4")
1460 (source
1461 (origin
1462 (method url-fetch)
1463 (uri (pypi-uri "parse" version))
1464 (sha256
1465 (base32
1466 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1467 (build-system python-build-system)
1468 (arguments
1469 `(#:phases
1470 (modify-phases %standard-phases
1471 (replace 'check
1472 (lambda _ (invoke "python" "test_parse.py"))))))
1473 (home-page "https://github.com/r1chardj0n3s/parse")
1474 (synopsis "Parse strings")
1475 (description
1476 "Parse strings using a specification based on the Python @code{format()}
1477 syntax.")
1478 (license license:x11)))
1479
1480 (define-public python-polib
1481 (package
1482 (name "python-polib")
1483 (version "1.0.8")
1484 (source (origin
1485 (method url-fetch)
1486 (uri (pypi-uri "polib" version))
1487 (sha256
1488 (base32
1489 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1490 (build-system python-build-system)
1491 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1492 (synopsis "Manipulate, create and modify gettext files")
1493 (description "Polib can manipulate any gettext format (po, pot and mo)
1494 files. It can be used to create po files from scratch or to modify
1495 existing ones.")
1496 (license license:expat)))
1497
1498 (define-public python2-polib
1499 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1500 (package
1501 (inherit base)
1502 (arguments `(,@(package-arguments base)
1503 ;; Tests don't work with python2.
1504 #:tests? #f)))))
1505
1506 (define-public python-poyo
1507 (package
1508 (name "python-poyo")
1509 (version "0.5.0")
1510 (source
1511 (origin
1512 (method url-fetch)
1513 (uri (pypi-uri "poyo" version))
1514 (sha256
1515 (base32
1516 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
1517 (build-system python-build-system)
1518 (home-page "https://github.com/hackebrot/poyo")
1519 (synopsis "Lightweight YAML Parser for Python")
1520 (description
1521 "This package provides a lightweight YAML Parser for Python. It supports
1522 only a chosen subset of the YAML format that is required to parse cookiecutter
1523 user configuration files. It does not have support for serializing into YAML
1524 and is not compatible with JSON.")
1525 (license license:expat)))
1526
1527 (define-public scons
1528 (package
1529 (name "scons")
1530 (version "3.0.4")
1531 (source (origin
1532 (method git-fetch)
1533 (uri (git-reference
1534 (url "https://github.com/SCons/scons.git")
1535 (commit version)))
1536 (file-name (git-file-name name version))
1537 (sha256
1538 (base32
1539 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
1540 (build-system python-build-system)
1541 (arguments
1542 `(#:use-setuptools? #f ; still relies on distutils
1543 #:tests? #f ; no 'python setup.py test' command
1544 #:phases
1545 (modify-phases %standard-phases
1546 (add-before 'build 'bootstrap
1547 (lambda _
1548 (substitute* "src/engine/SCons/compat/__init__.py"
1549 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1550 "sys.modules[new] = __import__(old)"))
1551 (substitute* "src/engine/SCons/Platform/__init__.py"
1552 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1553 "mod = __import__(full_name)"))
1554 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1555 (chdir "build/scons")
1556 #t)))))
1557 (home-page "http://scons.org/")
1558 (synopsis "Software construction tool written in Python")
1559 (description
1560 "SCons is a software construction tool. Think of SCons as an improved,
1561 cross-platform substitute for the classic Make utility with integrated
1562 functionality similar to autoconf/automake and compiler caches such as ccache.
1563 In short, SCons is an easier, more reliable and faster way to build
1564 software.")
1565 (license license:x11)))
1566
1567 (define-public scons-python2
1568 (package
1569 (inherit (package-with-python2 scons))
1570 (name "scons-python2")))
1571
1572 (define-public python-extras
1573 (package
1574 (name "python-extras")
1575 (version "1.0.0")
1576 (source
1577 (origin
1578 (method url-fetch)
1579 (uri (pypi-uri "extras" version))
1580 (sha256
1581 (base32
1582 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1583 (build-system python-build-system)
1584 (arguments
1585 ;; FIXME: Circular dependency on testtools.
1586 '(#:tests? #f))
1587 (home-page "https://github.com/testing-cabal/extras")
1588 (synopsis "Useful extensions to the Python standard library")
1589 (description
1590 "Extras is a set of extensions to the Python standard library.")
1591 (license license:expat)))
1592
1593 (define-public python2-extras
1594 (package-with-python2 python-extras))
1595
1596 (define-public python-mimeparse
1597 (package
1598 (name "python-mimeparse")
1599 (version "1.6.0")
1600 (source
1601 (origin
1602 (method url-fetch)
1603 (uri (pypi-uri "python-mimeparse" version))
1604 (sha256
1605 (base32
1606 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1607 (build-system python-build-system)
1608 (arguments
1609 '(#:phases
1610 (modify-phases %standard-phases
1611 (replace 'check
1612 (lambda _
1613 (invoke "./mimeparse_test.py"))))))
1614 (home-page
1615 "https://github.com/dbtsai/python-mimeparse")
1616 (synopsis "Python library for parsing MIME types")
1617 (description
1618 "Mimeparse provides basic functions for parsing MIME type names and
1619 matching them against a list of media-ranges.")
1620 (license license:expat)))
1621
1622 (define-public python2-mimeparse
1623 (package-with-python2 python-mimeparse))
1624
1625 (define-public python-miniboa
1626 (package
1627 (name "python-miniboa")
1628 (version "1.0.7")
1629 (source
1630 (origin
1631 (method url-fetch)
1632 (uri (pypi-uri "miniboa" version))
1633 (sha256
1634 (base32
1635 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1636 (build-system python-build-system)
1637 (home-page "https://github.com/shmup/miniboa")
1638 (synopsis "Simple, single-threaded Telnet server")
1639 (description
1640 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1641 server.")
1642 (license license:asl2.0)))
1643
1644 (define-public python2-miniboa
1645 (package-with-python2 python-miniboa))
1646
1647 (define-public python-pafy
1648 (package
1649 (name "python-pafy")
1650 (version "0.5.3.1")
1651 (source
1652 (origin
1653 (method url-fetch)
1654 (uri (pypi-uri "pafy" version))
1655 (sha256
1656 (base32
1657 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1658 (build-system python-build-system)
1659 (arguments
1660 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1661 (propagated-inputs
1662 ;; Youtube-dl is a python package which is imported in the file
1663 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1664 `(("youtube-dl" ,youtube-dl)))
1665 (home-page "https://np1.github.io/pafy/")
1666 (synopsis "Retrieve YouTube content and metadata")
1667 (description
1668 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1669 (license license:lgpl3+)))
1670
1671 (define-public python2-funcsigs
1672 (package
1673 (name "python2-funcsigs")
1674 (version "1.0.2")
1675 (source (origin
1676 (method url-fetch)
1677 (uri (pypi-uri "funcsigs" version))
1678 (sha256
1679 (base32
1680 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1681 (build-system python-build-system)
1682 (arguments
1683 `(#:python ,python-2))
1684 (native-inputs
1685 `(("python2-unittest2" ,python2-unittest2)))
1686 (home-page "http://funcsigs.readthedocs.org")
1687 (synopsis "Python function signatures from PEP362")
1688 (description
1689 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1690 (license license:asl2.0)))
1691
1692 (define-public python2-funcsigs-bootstrap
1693 (package
1694 (inherit python2-funcsigs)
1695 (name "python2-funcsigs-bootstrap")
1696 (native-inputs `())
1697 (arguments
1698 `(#:tests? #f
1699 ,@(package-arguments python2-funcsigs)))))
1700
1701 (define-public python-py
1702 (package
1703 (name "python-py")
1704 (version "1.8.0")
1705 (source
1706 (origin
1707 (method url-fetch)
1708 (uri (pypi-uri "py" version))
1709 (sha256
1710 (base32
1711 "0lsy1gajva083pzc7csj1cvbmminb7b4l6a0prdzyb3fd829nqyw"))))
1712 (build-system python-build-system)
1713 (arguments
1714 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1715 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1716 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1717 ;; Is this module globally installed?"
1718 '(#:tests? #f))
1719 (native-inputs
1720 `(("python-setuptools-scm" ,python-setuptools-scm)))
1721 (home-page "https://github.com/pytest-dev/py")
1722 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1723 (description
1724 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1725 code introspection, and logging.")
1726 (license license:expat)))
1727
1728 (define-public python2-py
1729 (package-with-python2 python-py))
1730
1731 ;; Recent versions of python-fixtures and python-testrepository need
1732 ;; python-pbr for packaging, which itself needs these two packages for
1733 ;; testing.
1734 ;; To fix this circular dependency, we use a build of python-pbr, based on the
1735 ;; same source, just without any test dependencies and with tests disabled.
1736 ;; python-pbr-minmal is then used to package python-fixtures and
1737 ;; python-testrepository.
1738 ;; Strictly speaking we currently could remove the test-requirements from the
1739 ;; normal python-pbr package (and save this package) since test are disabled
1740 ;; there anyway. But this may change in future.
1741 (define-public python-pbr-minimal
1742 (package
1743 (name "python-pbr-minimal")
1744 (version "3.0.1")
1745 (source
1746 (origin
1747 (method url-fetch)
1748 (uri (pypi-uri "pbr" version))
1749 (sha256
1750 (base32
1751 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1752 (build-system python-build-system)
1753 (arguments
1754 `(#:tests? #f))
1755 (home-page "http://docs.openstack.org/developer/pbr/")
1756 (synopsis "Minimal build of python-pbr used for bootstrapping")
1757 (description
1758 "Used only for bootstrapping python2-pbr, you should not need this.")
1759 (license license:asl2.0)))
1760
1761 (define-public python2-pbr-minimal
1762 (package-with-python2 python-pbr-minimal))
1763
1764 (define-public python-pbr
1765 (package
1766 (inherit python-pbr-minimal)
1767 (name "python-pbr")
1768 (arguments
1769 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1770 (propagated-inputs
1771 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1772 (native-inputs
1773 `(("python-fixtures" ,python-fixtures-bootstrap)
1774 ;; discover, coverage, hacking, subunit
1775 ("python-mock" ,python-mock)
1776 ("python-six" ,python-six)
1777 ("python-sphinx" ,python-sphinx)
1778 ("python-testrepository" ,python-testrepository-bootstrap)
1779 ("python-testresources" ,python-testresources-bootstrap)
1780 ("python-testscenarios" ,python-testscenarios-bootstrap)
1781 ("python-testtools" ,python-testtools-bootstrap)
1782 ("python-virtualenv" ,python-virtualenv)))
1783 (synopsis "Enhance the default behavior of Python’s setuptools")
1784 (description
1785 "Python Build Reasonableness (PBR) is a library that injects some useful
1786 and sensible default behaviors into your setuptools run. It will set
1787 versions, process requirements files and generate AUTHORS and ChangeLog file
1788 from git information.
1789 ")))
1790
1791 (define-public python2-pbr
1792 (package-with-python2 python-pbr))
1793
1794 (define-public python-pyrsistent
1795 (package
1796 (name "python-pyrsistent")
1797 (version "0.14.11")
1798 (home-page "https://github.com/tobgu/pyrsistent")
1799 (source (origin
1800 (method url-fetch)
1801 (uri (pypi-uri "pyrsistent" version))
1802 (sha256
1803 (base32
1804 "1qkh74bm296mp5g3r11lgsksr6bh4w1bf8pji4nmxdlfj542ga1w"))))
1805 (build-system python-build-system)
1806 (native-inputs
1807 `(("python-hypothesis" ,python-hypothesis)
1808 ("python-pytest" ,python-pytest)
1809 ("python-pytest-runner" ,python-pytest-runner)))
1810 (propagated-inputs
1811 `(("python-six" ,python-six)))
1812 (synopsis "Persistent data structures for Python")
1813 (description
1814 "Pyrsistent is a number of persistent collections (by some referred to as
1815 functional data structures). Persistent in the sense that they are immutable.
1816
1817 All methods on a data structure that would normally mutate it instead return a
1818 new copy of the structure containing the requested updates. The original
1819 structure is left untouched.")
1820 (license license:expat)))
1821
1822 (define-public python2-pyrsistent
1823 (package-with-python2 python-pyrsistent))
1824
1825 (define-public python-exif-read
1826 (package
1827 (name "python-exif-read")
1828 (version "2.1.2")
1829 (source (origin
1830 (method url-fetch)
1831 (uri (pypi-uri "ExifRead" version))
1832 (sha256
1833 (base32
1834 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1835 (build-system python-build-system)
1836 (arguments `(#:tests? #f)) ; no tests
1837 (home-page "https://github.com/ianare/exif-py")
1838 (synopsis "Python library to extract EXIF data from image files")
1839 (description
1840 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1841 files.")
1842 (license license:bsd-3)))
1843
1844 (define-public python2-exif-read
1845 (package-with-python2 python-exif-read))
1846
1847 (define-public python-pyld
1848 (package
1849 (name "python-pyld")
1850 (version "1.0.5")
1851 (source (origin
1852 (method url-fetch)
1853 (uri (pypi-uri "PyLD" version))
1854 (sha256
1855 (base32
1856 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
1857 (build-system python-build-system)
1858 (home-page "https://github.com/digitalbazaar/pyld")
1859 (synopsis "Python implementation of the JSON-LD specification")
1860 (description
1861 "PyLD is an implementation of the JSON-LD specification.")
1862 (license license:bsd-3)))
1863
1864 (define-public python2-pyld
1865 (package-with-python2 python-pyld))
1866
1867 (define-public python-click
1868 (package
1869 (name "python-click")
1870 (version "7.0")
1871 (source
1872 (origin
1873 (method url-fetch)
1874 (uri (pypi-uri "click" version))
1875 (sha256
1876 (base32
1877 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
1878 (build-system python-build-system)
1879 (arguments
1880 `(#:phases
1881 (modify-phases %standard-phases
1882 (add-after 'unpack 'fix-paths
1883 (lambda* (#:key inputs #:allow-other-keys)
1884 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1885 "cross-libc" "libc"))))
1886 (substitute* "click/_unicodefun.py"
1887 (("'locale'")
1888 (string-append "'" glibc "/bin/locale'"))))
1889 #t))
1890 (replace 'check
1891 (lambda _
1892 (invoke "python" "-m" "pytest"))))))
1893 (native-inputs
1894 `(("python-pytest" ,python-pytest)))
1895 (home-page "https://palletsprojects.com/p/click/")
1896 (synopsis "Command line library for Python")
1897 (description
1898 "Click is a Python package for creating command line interfaces in a
1899 composable way with as little code as necessary. Its name stands for
1900 \"Command Line Interface Creation Kit\". It's highly configurable but comes
1901 with sensible defaults out of the box.")
1902 (license license:bsd-3)))
1903
1904 (define-public python2-click
1905 (package-with-python2 python-click))
1906
1907 (define-public python-wheel
1908 (package
1909 (name "python-wheel")
1910 (version "0.32.3")
1911 (source
1912 (origin
1913 (method url-fetch)
1914 (uri (pypi-uri "wheel" version))
1915 (sha256
1916 (base32
1917 "1dhxl1bf18bx9szmqcnxbg6204hp3im8089q3hkwh5jfa6zh75q2"))))
1918 (build-system python-build-system)
1919 (native-inputs
1920 `(("python-jsonschema" ,python-jsonschema)
1921 ("python-pytest-cov" ,python-pytest-cov)))
1922 (home-page "https://bitbucket.org/pypa/wheel/")
1923 (synopsis "Format for built Python packages")
1924 (description
1925 "A wheel is a ZIP-format archive with a specially formatted filename and
1926 the @code{.whl} extension. It is designed to contain all the files for a PEP
1927 376 compatible install in a way that is very close to the on-disk format. Many
1928 packages will be properly installed with only the @code{Unpack} step and the
1929 unpacked archive preserves enough information to @code{Spread} (copy data and
1930 scripts to their final locations) at any later time. Wheel files can be
1931 installed with a newer @code{pip} or with wheel's own command line utility.")
1932 (license license:expat)
1933 (properties `((python2-variant . ,(delay python2-wheel))))))
1934
1935 (define-public python2-wheel
1936 (let ((wheel (package-with-python2
1937 (strip-python2-variant python-wheel))))
1938 (package (inherit wheel)
1939 (native-inputs `(("python2-functools32" ,python2-functools32)
1940 ,@(package-native-inputs wheel))))))
1941
1942 (define-public python-vcversioner
1943 (package
1944 (name "python-vcversioner")
1945 (version "2.16.0.0")
1946 (source
1947 (origin
1948 (method url-fetch)
1949 (uri (pypi-uri "vcversioner" version))
1950 (sha256
1951 (base32
1952 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1953 (build-system python-build-system)
1954 (synopsis "Python library for version number discovery")
1955 (description "Vcversioner is a Python library that inspects tagging
1956 information in a variety of version control systems in order to discover
1957 version numbers.")
1958 (home-page "https://github.com/habnabit/vcversioner")
1959 (license license:isc)))
1960
1961 (define-public python2-vcversioner
1962 (package-with-python2 python-vcversioner))
1963
1964 (define-public python-jdcal
1965 (package
1966 (name "python-jdcal")
1967 (version "1.4")
1968 (source
1969 (origin
1970 (method url-fetch)
1971 (uri (pypi-uri "jdcal" version))
1972 (sha256
1973 (base32
1974 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
1975 (build-system python-build-system)
1976 (arguments
1977 `(#:phases (modify-phases %standard-phases
1978 (replace 'check
1979 (lambda _
1980 (invoke "pytest"))))))
1981 (native-inputs
1982 `(("python-pytest" ,python-pytest)))
1983 (home-page "https://github.com/phn/jdcal")
1984 (synopsis "Functions to convert between Julian dates Gregorian dates")
1985 (description "This Python library provides functions for converting
1986 between Julian dates and Gregorian dates.")
1987 (license license:bsd-2)))
1988
1989 (define-public python2-jdcal
1990 (package-with-python2 python-jdcal))
1991
1992 (define-public python-jsonschema
1993 (package
1994 (name "python-jsonschema")
1995 (version "3.0.1")
1996 (source (origin
1997 (method url-fetch)
1998 (uri (pypi-uri "jsonschema" version))
1999 (sha256
2000 (base32
2001 "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc"))))
2002 (build-system python-build-system)
2003 (arguments
2004 '(#:phases
2005 (modify-phases %standard-phases
2006 (replace 'check
2007 (lambda _
2008 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2009 (invoke "trial" "jsonschema"))))))
2010 (native-inputs
2011 `(("python-setuptools_scm" ,python-setuptools-scm)
2012 ("python-twisted" ,python-twisted)))
2013 (propagated-inputs
2014 `(("python-attrs" ,python-attrs)
2015 ("python-pyrsistent" ,python-pyrsistent)
2016 ("python-six" ,python-six)))
2017 (home-page "https://github.com/Julian/jsonschema")
2018 (synopsis "Implementation of JSON Schema for Python")
2019 (description
2020 "Jsonschema is an implementation of JSON Schema for Python.")
2021 (license license:expat)
2022 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2023
2024 (define-public python2-jsonschema
2025 (let ((jsonschema (package-with-python2
2026 (strip-python2-variant python-jsonschema))))
2027 (package (inherit jsonschema)
2028 (propagated-inputs
2029 `(("python2-functools32" ,python2-functools32)
2030 ,@(package-propagated-inputs jsonschema))))))
2031
2032 ;; This old version is still required by docker-compose as of 1.24.0.
2033 (define-public python-jsonschema-2.6
2034 (package
2035 (name "python-jsonschema")
2036 (version "2.6.0")
2037 (source (origin
2038 (method url-fetch)
2039 (uri (pypi-uri "jsonschema" version))
2040 (sha256
2041 (base32
2042 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
2043 (build-system python-build-system)
2044 (arguments
2045 '(#:phases
2046 (modify-phases %standard-phases
2047 (replace 'check (lambda _ (invoke "nosetests"))))))
2048 (native-inputs
2049 `(("python-nose" ,python-nose)
2050 ("python-vcversioner" ,python-vcversioner)))
2051 (home-page "https://github.com/Julian/jsonschema")
2052 (synopsis "Implementation of JSON Schema for Python")
2053 (description
2054 "Jsonschema is an implementation of JSON Schema for Python.")
2055 (license license:expat)
2056 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2057
2058 (define-public python-schema
2059 (package
2060 (name "python-schema")
2061 (version "0.6.6")
2062 (source
2063 (origin
2064 (method url-fetch)
2065 (uri (pypi-uri "schema" version))
2066 (sha256
2067 (base32
2068 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2069 (build-system python-build-system)
2070 (native-inputs
2071 `(("python-pytest" ,python-pytest)))
2072 (home-page "https://github.com/keleshev/schema")
2073 (synopsis "Simple data validation library")
2074 (description
2075 "@code{python-schema} is a library for validating Python data
2076 structures, such as those obtained from config-files, forms, external
2077 services or command-line parsing, converted from JSON/YAML (or
2078 something else) to Python data-types.")
2079 (license license:psfl)))
2080
2081 (define-public python2-schema
2082 (package-with-python2 python-schema))
2083
2084 (define-public python-schema-0.5
2085 (package (inherit python-schema)
2086 (version "0.5.0")
2087 (source
2088 (origin
2089 (method url-fetch)
2090 (uri (pypi-uri "schema" version))
2091 (sha256
2092 (base32
2093 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2094
2095 (define-public python2-schema-0.5
2096 (package-with-python2 python-schema-0.5))
2097
2098 (define-public python-kitchen
2099 (package
2100 (name "python-kitchen")
2101 (version "1.2.5")
2102 (source
2103 (origin
2104 (method url-fetch)
2105 (uri (pypi-uri "kitchen" version))
2106 (sha256
2107 (base32
2108 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2109 (build-system python-build-system)
2110 (propagated-inputs
2111 `(("python-chardet" ,python-chardet)))
2112 (home-page "https://github.com/fedora-infra/kitchen")
2113 (synopsis "Python API for snippets")
2114 (description "@code{kitchen} module provides a python API for all sorts of
2115 little useful snippets of code that everybody ends up writing for their projects
2116 but never seem big enough to build an independent release. Use kitchen and stop
2117 cutting and pasting that code over and over.")
2118 (license (list license:lgpl2.1+
2119 ;; subprocess.py, test_subprocess.py,
2120 ;; kitchen/pycompat25/defaultdict.py:
2121 license:psfl))))
2122
2123 (define-public python2-kitchen
2124 (package-with-python2 python-kitchen))
2125
2126 (define-public python-unidecode
2127 (package
2128 (name "python-unidecode")
2129 (version "1.1.1")
2130 (source (origin
2131 (method url-fetch)
2132 (uri (pypi-uri "Unidecode" version))
2133 (sha256
2134 (base32
2135 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
2136 (build-system python-build-system)
2137 (home-page "https://pypi.python.org/pypi/Unidecode")
2138 (synopsis "ASCII transliterations of Unicode text")
2139 (description
2140 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2141 useful when integrating with legacy code that doesn't support Unicode, or for
2142 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2143 machine identifiers from human-readable Unicode strings that should still be
2144 somewhat intelligible.")
2145 (license license:gpl2+)))
2146
2147 (define-public python2-unidecode
2148 (package-with-python2 python-unidecode))
2149
2150 (define-public python-pyjwt
2151 (package
2152 (name "python-pyjwt")
2153 (version "1.7.1")
2154 (source
2155 (origin
2156 (method url-fetch)
2157 (uri (pypi-uri "PyJWT" version))
2158 (sha256
2159 (base32
2160 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
2161 (modules '((guix build utils)))
2162 (snippet
2163 '(begin
2164 (for-each delete-file-recursively
2165 (find-files "." "\\.pyc$"))
2166 #t))))
2167 (build-system python-build-system)
2168 (native-inputs
2169 `(("python-pytest" ,python-pytest)
2170 ("python-pytest-cov" ,python-pytest-cov)
2171 ("python-pytest-runner" ,python-pytest-runner)))
2172 (home-page "https://github.com/progrium/pyjwt")
2173 (synopsis "JSON Web Token implementation in Python")
2174 (description
2175 "PyJWT is a JSON Web Token implementation written in Python.")
2176 (license license:expat)))
2177
2178 (define-public python2-pyjwt
2179 (package-with-python2 python-pyjwt))
2180
2181 (define-public python-pykka
2182 (package
2183 (name "python-pykka")
2184 (version "1.2.1")
2185 (source
2186 (origin
2187 (method url-fetch)
2188 (uri (pypi-uri "Pykka" version))
2189 (sha256
2190 (base32
2191 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2192 (build-system python-build-system)
2193 (native-inputs
2194 `(("python-mock" ,python-mock)
2195 ("python-nose" ,python-nose)
2196 ("python-gevent" ,python-gevent)
2197 ("python-eventlet" ,python-eventlet)))
2198 (home-page "https://www.pykka.org/")
2199 (synopsis "Pykka is a Python implementation of the actor model")
2200 (description
2201 "Pykka is a Python implementation of the actor model.
2202 The actor model introduces some simple rules to control the sharing
2203 of state and cooperation between execution units, which makes it
2204 easier to build concurrent applications.")
2205 (license license:asl2.0)))
2206
2207 (define-public python2-pykka
2208 (package-with-python2 python-pykka))
2209
2210 (define-public python-pymsgbox
2211 (package
2212 (name "python-pymsgbox")
2213 (version "1.0.6")
2214 (source
2215 (origin
2216 (method git-fetch)
2217 (uri (git-reference
2218 ;; LICENSE.txt is not present on pypi
2219 (url "https://github.com/asweigart/PyMsgBox")
2220 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2221 (file-name (git-file-name name version))
2222 (sha256
2223 (base32
2224 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2225 (arguments
2226 ;; Circular dependency to run tests:
2227 ;; Tests need pyautogui, which depends on pymsgbox.
2228 '(#:tests? #f))
2229 (build-system python-build-system)
2230 (home-page "https://github.com/asweigart/PyMsgBox")
2231 (synopsis "Python module for JavaScript-like message boxes")
2232 (description
2233 "PyMsgBox is a simple, cross-platform, pure Python module for
2234 JavaScript-like message boxes. Types of dialog boxes include:
2235 @enumerate
2236 @item alert
2237 @item confirm
2238 @item prompt
2239 @item password
2240 @end enumerate
2241 ")
2242 (license license:bsd-3)))
2243
2244 (define-public python-pympler
2245 (package
2246 (name "python-pympler")
2247 (home-page "https://pythonhosted.org/Pympler/")
2248 (version "0.7")
2249 (source (origin
2250 (method url-fetch)
2251 (uri (pypi-uri "Pympler" version))
2252 (sha256
2253 (base32
2254 "0ki7bqp1h9l1xc2k1h4vjyzsgs20i8ingvcdhszyi72s28wyf4bs"))))
2255 (build-system python-build-system)
2256 (arguments
2257 `(#:phases (modify-phases %standard-phases
2258 (delete 'check)
2259 (add-after 'install 'check
2260 (lambda* (#:key inputs outputs #:allow-other-keys)
2261 (add-installed-pythonpath inputs outputs)
2262 (invoke "python" "setup.py" "test"))))))
2263 (synopsis "Measure, monitor and analyze memory behavior")
2264 (description
2265 "Pympler is a development tool to measure, monitor and analyze
2266 the memory behavior of Python objects in a running Python application.
2267
2268 By pympling a Python application, detailed insight in the size and the
2269 lifetime of Python objects can be obtained. Undesirable or unexpected
2270 runtime behavior like memory bloat and other @samp{pymples} can easily
2271 be identified.
2272
2273 A web profiling frontend exposes process statistics, garbage
2274 visualisation and class tracker statistics.")
2275 (license license:asl2.0)))
2276
2277 (define-public python2-pympler
2278 (package-with-python2 python-pympler))
2279
2280 (define-public python-itsdangerous
2281 (package
2282 (name "python-itsdangerous")
2283 (version "1.1.0")
2284 (source
2285 (origin
2286 (method url-fetch)
2287 (uri (pypi-uri "itsdangerous" version))
2288 (sha256
2289 (base32
2290 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
2291 (build-system python-build-system)
2292 (home-page "https://palletsprojects.com/p/itsdangerous/")
2293 (synopsis "Python library for passing data to/from untrusted environments")
2294 (description
2295 "Itsdangerous provides various helpers to pass trusted data to untrusted
2296 environments and back.")
2297 (license license:bsd-3)))
2298
2299 (define-public python2-itsdangerous
2300 (package-with-python2 python-itsdangerous))
2301
2302 (define-public python-pyyaml
2303 (package
2304 (name "python-pyyaml")
2305 (version "3.13")
2306 (source
2307 (origin
2308 (method url-fetch)
2309 (uri (pypi-uri "PyYAML" version))
2310 (sha256
2311 (base32
2312 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2313 (build-system python-build-system)
2314 (inputs
2315 `(("libyaml" ,libyaml)))
2316 (home-page "http://pyyaml.org/wiki/PyYAML")
2317 (synopsis "YAML parser and emitter for Python")
2318 (description
2319 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2320 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2321 API, and sensible error messages. PyYAML supports standard YAML tags and
2322 provides Python-specific tags that allow to represent an arbitrary Python
2323 object.")
2324 (license license:expat)))
2325
2326 (define-public python2-pyyaml
2327 (package-with-python2 python-pyyaml))
2328
2329 (define-public python-vine
2330 (package
2331 (name "python-vine")
2332 (version "1.1.4")
2333 (source
2334 (origin
2335 (method url-fetch)
2336 (uri (pypi-uri "vine" version))
2337 (sha256
2338 (base32
2339 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2340 (build-system python-build-system)
2341 (native-inputs
2342 `(("python-pytest" ,python-pytest)
2343 ("python-case" ,python-case)))
2344 (home-page "https://github.com/celery/vine")
2345 (synopsis "Promises for Python")
2346 (description
2347 "@code{vine} provides a special implementation of promises in that it can
2348 be used both for \"promise of a value\" and lazy evaluation. The biggest
2349 upside for this is that everything in a promise can also be a promise,
2350 e.g. filters, callbacks and errbacks can all be promises.")
2351 (license license:bsd-3)))
2352
2353 (define-public python-virtualenv
2354 (package
2355 (name "python-virtualenv")
2356 (version "16.1.0")
2357 (source
2358 (origin
2359 (method url-fetch)
2360 (uri (pypi-uri "virtualenv" version))
2361 (sha256
2362 (base32
2363 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
2364 (build-system python-build-system)
2365 (arguments
2366 `(#:phases
2367 (modify-phases %standard-phases
2368 (add-before 'check 'disable-failing-test
2369 (lambda _
2370 ;; Disable failing test. See upstream bug report
2371 ;; https://github.com/pypa/virtualenv/issues/957
2372 (substitute* "tests/test_virtualenv.py"
2373 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2374 #t)))))
2375 (native-inputs
2376 `(("python-mock" ,python-mock)
2377 ("python-pytest" ,python-pytest)))
2378 (home-page "https://virtualenv.pypa.io/")
2379 (synopsis "Virtual Python environment builder")
2380 (description
2381 "Virtualenv is a tool to create isolated Python environments.")
2382 (license license:expat)))
2383
2384 (define-public python2-virtualenv
2385 (package-with-python2 python-virtualenv))
2386
2387 (define-public python-markupsafe
2388 (package
2389 (name "python-markupsafe")
2390 (version "1.1.1")
2391 (source
2392 (origin
2393 (method url-fetch)
2394 (uri (pypi-uri "MarkupSafe" version))
2395 (sha256
2396 (base32
2397 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
2398 (build-system python-build-system)
2399 (arguments
2400 `(#:modules ((ice-9 ftw)
2401 (srfi srfi-1)
2402 (srfi srfi-26)
2403 (guix build utils)
2404 (guix build python-build-system))
2405 #:phases (modify-phases %standard-phases
2406 (replace 'check
2407 (lambda _
2408 (let ((cwd (getcwd))
2409 (libdir (find (cut string-prefix? "lib." <>)
2410 (scandir "build"))))
2411 (setenv "PYTHONPATH"
2412 (string-append cwd "/build/" libdir ":"
2413 (getenv "PYTHONPATH")))
2414 (invoke "pytest" "-vv")))))))
2415 (native-inputs
2416 `(("python-pytest" ,python-pytest)))
2417 (home-page "https://github.com/mitsuhiko/markupsafe")
2418 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2419 (description
2420 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2421 for Python.")
2422 (license license:bsd-3)))
2423
2424 (define-public python2-markupsafe
2425 (package-with-python2 python-markupsafe))
2426
2427 (define-public python-jinja2
2428 (package
2429 (name "python-jinja2")
2430 (version "2.10.1")
2431 (source
2432 (origin
2433 (method url-fetch)
2434 (uri (pypi-uri "Jinja2" version))
2435 (sha256
2436 (base32
2437 "04shqrs56aj04ipyqykj512rw2l0zfammvj9krawzxz7xc14yp06"))))
2438 (build-system python-build-system)
2439 (propagated-inputs
2440 `(("python-markupsafe" ,python-markupsafe)))
2441 (home-page "http://jinja.pocoo.org/")
2442 (synopsis "Python template engine")
2443 (description
2444 "Jinja2 is a small but fast and easy to use stand-alone template engine
2445 written in pure Python.")
2446 (license license:bsd-3)))
2447
2448 (define-public python2-jinja2
2449 (package-with-python2 python-jinja2))
2450
2451 (define-public python-jinja2-time
2452 (package
2453 (name "python-jinja2-time")
2454 (version "0.2.0")
2455 (source
2456 (origin
2457 (method url-fetch)
2458 (uri (pypi-uri "jinja2-time" version))
2459 (sha256
2460 (base32
2461 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
2462 (build-system python-build-system)
2463 (propagated-inputs
2464 `(("python-arrow" ,python-arrow)
2465 ("python-jinja2" ,python-jinja2)))
2466 (home-page
2467 "https://github.com/hackebrot/jinja2-time")
2468 (synopsis "Jinja2 Extension for Dates and Times")
2469 (description
2470 "This package provides an extension for the template engine Jinja2. It
2471 adds a 'now' tag providing a convenient access to the arrow.now() API from
2472 templates. A format string can be provided to control the output.")
2473 (license license:expat)))
2474
2475 (define-public python-pystache
2476 (package
2477 (name "python-pystache")
2478 (version "0.5.4")
2479 (source (origin
2480 (method url-fetch)
2481 (uri (pypi-uri "pystache" version))
2482 (sha256
2483 (base32
2484 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2485 (build-system python-build-system)
2486 (arguments
2487 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2488 (home-page "http://defunkt.io/pystache/")
2489 (synopsis "Python logic-less template engine")
2490 (description
2491 "Pystache is a Python implementation of the framework agnostic,
2492 logic-free templating system Mustache.")
2493 (license license:expat)
2494 (properties `((python2-variant . ,(delay python2-pystache))))))
2495
2496 (define-public python2-pystache
2497 (package (inherit (package-with-python2
2498 (strip-python2-variant python-pystache)))
2499 (arguments
2500 `(#:python ,python-2
2501 #:phases
2502 (modify-phases %standard-phases
2503 (replace 'check
2504 (lambda _
2505 (invoke "python" "test_pystache.py"))))))))
2506
2507 (define-public python-joblib
2508 (package
2509 (name "python-joblib")
2510 (version "0.13.0")
2511 (source (origin
2512 (method url-fetch)
2513 (uri (pypi-uri "joblib" version))
2514 (sha256
2515 (base32
2516 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2517 (build-system python-build-system)
2518 (arguments
2519 `(#:phases
2520 (modify-phases %standard-phases
2521 (replace 'check
2522 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2523 (native-inputs
2524 `(("python-pytest" ,python-pytest)))
2525 (home-page "https://joblib.readthedocs.io/")
2526 (synopsis "Using Python functions as pipeline jobs")
2527 (description
2528 "Joblib is a set of tools to provide lightweight pipelining in Python.
2529 In particular, joblib offers: transparent disk-caching of the output values
2530 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2531 logging and tracing of the execution.")
2532 (license license:bsd-3)))
2533
2534 (define-public python2-joblib
2535 (package-with-python2 python-joblib))
2536
2537 (define-public python-daemon
2538 (package
2539 (name "python-daemon")
2540 (version "2.2.3")
2541 (source
2542 (origin
2543 (method url-fetch)
2544 (uri (pypi-uri "python-daemon" version))
2545 (sha256
2546 (base32
2547 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2548 (build-system python-build-system)
2549 (arguments
2550 `(#:phases
2551 (modify-phases %standard-phases
2552 (add-before 'check 'disable-tests
2553 (lambda _
2554 ;; FIXME: Determine why test fails
2555 (substitute* "test/test_daemon.py"
2556 (("test_detaches_process_context")
2557 "skip_test_detaches_process_context"))
2558 #t)))))
2559 (propagated-inputs
2560 `(("python-lockfile" ,python-lockfile)))
2561 (native-inputs
2562 `(("python-unittest2" ,python-unittest2)
2563 ("python-testtools" ,python-testtools)
2564 ("python-testscenarios" ,python-testscenarios)
2565 ("python-mock" ,python-mock)
2566 ("python-docutils" ,python-docutils)))
2567 (home-page "https://pagure.io/python-daemon/")
2568 (synopsis "Python library for making a Unix daemon process")
2569 (description "Python-daemon is a library that assists a Python program to
2570 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2571
2572 This library provides a @code{DaemonContext} class that manages the following
2573 important tasks for becoming a daemon process:
2574 @enumerate
2575 @item Detach the process into its own process group.
2576 @item Set process environment appropriate for running inside a chroot.
2577 @item Renounce suid and sgid privileges.
2578 @item Close all open file descriptors.
2579 @item Change the working directory, uid, gid, and umask.
2580 @item Set appropriate signal handlers.
2581 @item Open new file descriptors for stdin, stdout, and stderr.
2582 @item Manage a specified PID lock file.
2583 @item Register cleanup functions for at-exit processing.
2584 @end enumerate")
2585 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2586 (license (list license:asl2.0 license:gpl3+))))
2587
2588 (define-public python-docutils
2589 (package
2590 (name "python-docutils")
2591 (version "0.14")
2592 (source
2593 (origin
2594 (method url-fetch)
2595 (uri (pypi-uri "docutils" version))
2596 (sha256
2597 (base32
2598 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2599 (build-system python-build-system)
2600 (arguments
2601 '(#:tests? #f)) ; no setup.py test command
2602 (home-page "http://docutils.sourceforge.net/")
2603 (synopsis "Python Documentation Utilities")
2604 (description
2605 "Docutils is a modular system for processing documentation into useful
2606 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2607 reStructuredText.")
2608 ;; Most of the source code is public domain, but some source files are
2609 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2610 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2611
2612 (define-public python2-docutils
2613 (package-with-python2 python-docutils))
2614
2615 (define-public python-pygments
2616 (package
2617 (name "python-pygments")
2618 (version "2.4.2")
2619 (source
2620 (origin
2621 (method url-fetch)
2622 (uri (pypi-uri "Pygments" version))
2623 (sha256
2624 (base32
2625 "15v2sqm5g12bqa0c7wikfh9ck2nl97ayizy1hpqhmws5gqalq748"))))
2626 (build-system python-build-system)
2627 (arguments
2628 ;; FIXME: Tests require sphinx, which depends on this.
2629 '(#:tests? #f))
2630 (home-page "http://pygments.org/")
2631 (synopsis "Syntax highlighting")
2632 (description
2633 "Pygments is a syntax highlighting package written in Python.")
2634 (license license:bsd-2)))
2635
2636 (define-public python2-pygments
2637 (package-with-python2 python-pygments))
2638
2639 (define-public python-bumpversion
2640 (package
2641 (name "python-bumpversion")
2642 (version "0.5.3")
2643 (source
2644 (origin
2645 (method url-fetch)
2646 (uri (pypi-uri "bumpversion" version))
2647 (sha256
2648 (base32
2649 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
2650 (build-system python-build-system)
2651 (home-page "https://github.com/peritus/bumpversion")
2652 (synopsis "Tool to bump software version")
2653 (description "This tool provides a command-line interface (CLI) to bump a
2654 software version simply.")
2655 (license license:expat)))
2656
2657 (define-public python-deprecated
2658 (package
2659 (name "python-deprecated")
2660 (version "1.2.5")
2661 (source
2662 (origin
2663 (method git-fetch)
2664 (uri (git-reference
2665 (url "https://github.com/tantale/deprecated.git")
2666 (commit (string-append "v" version))))
2667 (file-name (git-file-name name version))
2668 (sha256
2669 (base32
2670 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
2671 (build-system python-build-system)
2672 (arguments
2673 `(#:phases (modify-phases %standard-phases
2674 (replace 'check
2675 (lambda _
2676 (invoke "pytest"))))))
2677 (propagated-inputs
2678 `(("python-wrapt" ,python-wrapt)))
2679 (native-inputs
2680 `(("python-bumpversion" ,python-bumpversion)
2681 ("python-pytest" ,python-pytest)
2682 ("python-pytest-cov" ,python-pytest-cov)
2683 ("python-sphinx" ,python-sphinx)
2684 ("python-tox" ,python-tox)))
2685 (home-page "https://github.com/tantale/deprecated")
2686 (synopsis "Python decorator to deprecate classes, functions or methods")
2687 (description "The @code{deprecated} decorator provides a convenient way to deprecate
2688 to deprecate classes, functions or methods.")
2689 (license license:expat)))
2690
2691 (define-public python-pygithub
2692 (package
2693 (name "python-pygithub")
2694 (version "1.43.8")
2695 (source
2696 ;; We fetch from the Git repo because there are no tests in the PyPI
2697 ;; archive.
2698 (origin
2699 (method git-fetch)
2700 (uri (git-reference
2701 (url "https://github.com/PyGithub/PyGithub.git")
2702 (commit (string-append "v" version))))
2703 (file-name (git-file-name name version))
2704 (sha256
2705 (base32 "1625v558xga5mwhl9jqmibywy5qafmg1vqrirqz6zfq1la1d22mw"))))
2706 (build-system python-build-system)
2707 (arguments
2708 `(#:phases (modify-phases %standard-phases
2709 ;; Some tests rely on the network.
2710 (add-after 'unpack 'disable-failing-tests
2711 (lambda _
2712 (substitute* "tests/Issue142.py"
2713 (("testDecodeJson") "disabled_testDecodeJson"))
2714 #t))
2715 (add-before 'check 'prepare-for-tests
2716 (lambda _
2717 (for-each (lambda (f)
2718 (chmod f #o666))
2719 (find-files "./tests"))
2720 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
2721 (setenv "PYTHONPATH"
2722 (string-append "./tests:" (getenv "PYTHONPATH")))
2723 #t)))))
2724 (propagated-inputs
2725 `(("python-deprecated" ,python-deprecated)
2726 ("python-pyjwt" ,python-pyjwt)
2727 ("python-requests" ,python-requests)))
2728 (native-inputs `(("python-httpretty" ,python-httpretty)))
2729 (home-page "https://pygithub.readthedocs.io/en/latest/")
2730 (synopsis "Python library for the GitHub API")
2731 (description "This library allows managing GitHub resources such as
2732 repositories, user profiles, and organizations in your Python applications,
2733 using version 3 of the GitHub application programming interface (API).")
2734 (license license:lgpl3+)))
2735
2736 (define-public python-rellu
2737 (package
2738 (name "python-rellu")
2739 (version "0.7")
2740 (source
2741 (origin
2742 (method url-fetch)
2743 (uri (pypi-uri "rellu" version))
2744 (sha256
2745 (base32
2746 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
2747 (build-system python-build-system)
2748 (propagated-inputs
2749 `(("python-invoke" ,python-invoke)
2750 ("python-pygithub" ,python-pygithub)))
2751 (home-page "https://github.com/robotframework/rellu")
2752 (synopsis "Utilities to create PyPI releases")
2753 (description "This collection of utilities contains tooling and templates
2754 to assist in creating releases on GitHub and publishing them on PyPI. It is
2755 designed to be used by Robot Framework and tools and libraries in its
2756 ecosystem, but can naturally be used also by other projects.")
2757 (license license:asl2.0)))
2758
2759 (define-public python-robotframework
2760 (package
2761 (name "python-robotframework")
2762 (version "3.1.2")
2763 ;; There are no tests in the PyPI archive.
2764 (source
2765 (origin
2766 (method git-fetch)
2767 (uri (git-reference
2768 (url "https://github.com/robotframework/robotframework.git")
2769 (commit (string-append "v" version))))
2770 (file-name (git-file-name name version))
2771 (sha256
2772 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
2773 (patches (search-patches
2774 "python-robotframework-honor-source-date-epoch.patch"))))
2775 (build-system python-build-system)
2776 (arguments
2777 `(#:phases (modify-phases %standard-phases
2778 (add-before 'build 'build-and-install-doc
2779 (lambda* (#:key outputs #:allow-other-keys)
2780 (let* ((doc-output (assoc-ref outputs "doc"))
2781 (doc (string-append doc-output "/share/"
2782 ,name "-" ,version "/")))
2783 (invoke "invoke" "library-docs" "all")
2784 (mkdir-p doc)
2785 (copy-recursively "doc/libraries"
2786 (string-append doc "/libraries"))
2787 #t)))
2788 (replace 'check
2789 (lambda _
2790 (invoke "python" "utest/run.py"))))))
2791 (native-inputs
2792 `(("python-invoke" ,python-invoke)
2793 ("python-rellu" ,python-rellu)
2794 ("python:tk" ,python "tk"))) ;used when building the HTML doc
2795 (outputs '("out" "doc"))
2796 (home-page "https://robotframework.org")
2797 (synopsis "Generic automation framework")
2798 (description "Robot Framework is a generic automation framework for
2799 acceptance testing, acceptance test driven development (ATDD), and robotic
2800 process automation (RPA).")
2801 (license license:asl2.0)))
2802
2803 (define-public python-robotframework-lint
2804 ;; There is no properly tagged release; the commit below seems to correspond
2805 ;; to the 0.9 stable release available from PyPI. The tests are not
2806 ;; included in the PyPI archive, so we fetch the sources from the upstream
2807 ;; Git repo.
2808 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
2809 (revision "1"))
2810 (package
2811 (name "python-robotframework-lint")
2812 (version (git-version "0.9.0" revision commit))
2813 (source
2814 (origin
2815 (method git-fetch)
2816 (uri (git-reference
2817 (url "https://github.com/boakley/robotframework-lint.git")
2818 (commit commit)))
2819 (file-name (git-file-name name version))
2820 (sha256
2821 (base32
2822 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
2823 (build-system python-build-system)
2824 (arguments
2825 `(#:phases
2826 (modify-phases %standard-phases
2827 (replace 'check
2828 (lambda _
2829 (invoke "python" "-m" "robot" "-A"
2830 "tests/conf/default.args" "tests"))))))
2831 (propagated-inputs
2832 `(("python-robotframework" ,python-robotframework)))
2833 (home-page "https://github.com/boakley/robotframework-lint/")
2834 (synopsis "Static analysis tool (linter) for Robot Framework")
2835 (description "This package provides the @code{rflint} command-line
2836 utility, a static analysis tool (linter) for Robot Framework source files.")
2837 (license license:asl2.0))))
2838
2839 (define-public python-robotframework-sshlibrary
2840 (package
2841 (name "python-robotframework-sshlibrary")
2842 (version "3.3.0")
2843 ;; There are no tests in the PyPI archive.
2844 (source
2845 (origin
2846 (method git-fetch)
2847 (uri (git-reference
2848 (url "https://github.com/robotframework/SSHLibrary.git")
2849 (commit (string-append "v" version))))
2850 (file-name (git-file-name name version))
2851 (sha256
2852 (base32
2853 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
2854 (build-system python-build-system)
2855 (arguments
2856 `(#:phases
2857 (modify-phases %standard-phases
2858 (add-before 'build 'build-and-install-doc
2859 (lambda* (#:key outputs #:allow-other-keys)
2860 (let* ((doc-output (assoc-ref outputs "doc"))
2861 (doc (string-append doc-output "/share/"
2862 ,name "-" ,version "/")))
2863 (invoke "chmod" "-R" "+w" "docs")
2864 (invoke "invoke" "kw-docs" "project-docs")
2865 (mkdir-p doc)
2866 (for-each delete-file (find-files "docs" "\\.rst"))
2867 (copy-recursively "docs" doc)
2868 #t)))
2869 (replace 'check
2870 (lambda _
2871 ;; Some tests require an SSH server; we remove them.
2872 (delete-file "utest/test_client_api.py")
2873 (delete-file "utest/test_scp.py")
2874 (invoke "python" "utest/run.py"))))))
2875 (propagated-inputs
2876 `(("python-robotframework" ,python-robotframework)
2877 ("python-paramiko" ,python-paramiko)
2878 ("python-scp" ,python-scp)))
2879 (native-inputs
2880 `(("openssh" ,openssh)
2881 ("which" ,which)
2882 ;; To generate the documentation
2883 ("python-docutils" ,python-docutils)
2884 ("python-invoke" ,python-invoke)
2885 ("python-pygments" ,python-pygments)
2886 ("python-rellu" ,python-rellu)))
2887 (outputs '("out" "doc"))
2888 (home-page "https://github.com/robotframework/SSHLibrary")
2889 (synopsis "Robot Framework library for SSH and SFTP")
2890 (description "SSHLibrary is a Robot Framework library providing support
2891 for SSH and SFTP. It has the following main usages:
2892 @itemize @bullet
2893 @item Executing commands on the remote machine, either blocking or non-blocking.
2894 @item Writing and reading in an interactive shell.
2895 @item Transferring files and directories over SFTP.
2896 @item Ensuring that files and directories exist on the remote machine.
2897 @end itemize")
2898 (license license:asl2.0)))
2899
2900 (define-public python-scp
2901 (package
2902 (name "python-scp")
2903 (version "0.13.2")
2904 (source
2905 (origin
2906 (method url-fetch)
2907 (uri (pypi-uri "scp" version))
2908 (sha256
2909 (base32
2910 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
2911 (build-system python-build-system)
2912 (arguments
2913 '(#:tests? #f)) ;tests require an SSH server
2914 (propagated-inputs
2915 `(("python-paramiko" ,python-paramiko)))
2916 (home-page "https://github.com/jbardin/scp.py")
2917 (synopsis "SCP protocol module for Python and Paramiko")
2918 (description "The scp module extends the Paramiko library to send and
2919 receive files via the SCP1 protocol, as implemented by the OpenSSH
2920 @command{scp} program.")
2921 (license license:gpl2+)))
2922
2923 (define-public python-rst.linker
2924 (package
2925 (name "python-rst.linker")
2926 (version "1.11")
2927 (source
2928 (origin
2929 (method url-fetch)
2930 (uri (pypi-uri "rst.linker" version))
2931 (sha256
2932 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
2933 (build-system python-build-system)
2934 (propagated-inputs
2935 `(("python-dateutil" ,python-dateutil)
2936 ("python-six" ,python-six)))
2937 (native-inputs
2938 `(("python-setuptools-scm" ,python-setuptools-scm)))
2939 ;; Test would require path.py, which would introduce a cyclic dependence.
2940 (arguments `(#:tests? #f))
2941 ;; Note: As of version 1.7 the documentation is not worth building.
2942 (home-page "https://github.com/jaraco/rst.linker")
2943 (synopsis "Sphinx plugin to add links and timestamps")
2944 (description "rst.linker allows to automatically replace text by a
2945 reStructuredText external reference or timestamps. It's primary purpose is to
2946 augment the changelog, but it can be used for other documents, too.")
2947 (license license:expat)))
2948
2949 (define-public python2-rst.linker
2950 (package-with-python2 python-rst.linker))
2951
2952 (define-public python-feedgenerator
2953 (package
2954 (name "python-feedgenerator")
2955 (version "1.9")
2956 (source
2957 (origin
2958 (method url-fetch)
2959 (uri (pypi-uri "feedgenerator" version))
2960 (sha256
2961 (base32
2962 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2963 (modules '((guix build utils)))
2964 (snippet
2965 '(begin
2966 ;; Remove pre-compiled .pyc files from source.
2967 (for-each delete-file-recursively
2968 (find-files "." "__pycache__" #:directories? #t))
2969 (for-each delete-file (find-files "." "\\.pyc$"))
2970 #t))))
2971 (build-system python-build-system)
2972 (propagated-inputs
2973 `(("python-pytz" ,python-pytz)
2974 ("python-six" ,python-six)))
2975 (home-page "https://github.com/getpelican/feedgenerator")
2976 (synopsis
2977 "Standalone version of Django's Atom/RSS feed generator")
2978 (description
2979 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2980 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2981 (license license:bsd-3)))
2982
2983 (define-public python2-feedgenerator
2984 (package-with-python2 python-feedgenerator))
2985
2986 (define-public python-toml
2987 (package
2988 (name "python-toml")
2989 (version "0.9.4")
2990 (source
2991 (origin
2992 (method url-fetch)
2993 (uri (pypi-uri "toml" version))
2994 (sha256
2995 (base32
2996 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
2997 (build-system python-build-system)
2998 (arguments
2999 `(#:tests? #f)) ;no tests suite in release
3000 (home-page "https://github.com/uiri/toml")
3001 (synopsis "Library for TOML")
3002 (description
3003 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
3004 Language (TOML) configuration files.")
3005 (license license:expat)))
3006
3007 (define-public python-jsonrpc-server
3008 (package
3009 (name "python-jsonrpc-server")
3010 (version "0.3.2")
3011 (source
3012 (origin
3013 (method url-fetch)
3014 (uri (pypi-uri "python-jsonrpc-server" version))
3015 (sha256
3016 (base32
3017 "0ddgdp26dfxaz6isjbb12974b3rxavgsqrn2zrmck62cmipg5g05"))))
3018 (build-system python-build-system)
3019 (propagated-inputs
3020 `(("python-future" ,python-future)
3021 ("python-mock" ,python-mock)
3022 ("python-pytest" ,python-pytest)
3023 ("python-ujson" ,python-ujson)))
3024 (home-page
3025 "https://github.com/palantir/python-jsonrpc-server")
3026 (synopsis "JSON RPC 2.0 server library")
3027 (description
3028 "This package provides a JSON RPC 2.0 server library for Python.")
3029 (license license:expat)))
3030
3031 (define-public python-pydocstyle
3032 (package
3033 (name "python-pydocstyle")
3034 (version "3.0.0")
3035 (source
3036 (origin
3037 (method url-fetch)
3038 (uri (pypi-uri "pydocstyle" version))
3039 (sha256
3040 (base32
3041 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
3042 (build-system python-build-system)
3043 (propagated-inputs
3044 `(("python-six" ,python-six)
3045 ("python-snowballstemmer" ,python-snowballstemmer)))
3046 (home-page
3047 "https://github.com/PyCQA/pydocstyle/")
3048 (synopsis "Python docstring style checker")
3049 (description
3050 "This package provides a style checker for the Python Language
3051 Server (PLS).")
3052 (license license:expat)))
3053
3054 (define-public python-language-server
3055 (package
3056 (name "python-language-server")
3057 (version "0.31.2")
3058 (source
3059 (origin
3060 (method url-fetch)
3061 (uri (pypi-uri "python-language-server" version))
3062 (sha256
3063 (base32
3064 "1iq69wc1fyhirfyq25ih41wq9yvr7bchiw0i116adpdgcq6m9idq"))))
3065 (build-system python-build-system)
3066 (propagated-inputs
3067 `(("python-pluggy" ,python-pluggy)
3068 ("python-jsonrpc-server" ,python-jsonrpc-server)
3069 ("python-jedi" ,python-jedi)
3070 ("python-yapf" ,python-yapf)
3071 ("python-pyflakes" ,python-pyflakes)
3072 ("python-pydocstyle" ,python-pydocstyle)
3073 ("python-pycodestyle" ,python-pycodestyle)
3074 ("python-mccabe" ,python-mccabe)
3075 ("python-rope" ,python-rope)
3076 ("python-autopep8" ,python-autopep8)
3077 ("python-flake8" ,python-flake8)
3078 ("python-pylint" ,python-pylint)))
3079 (home-page "https://github.com/palantir/python-language-server")
3080 (synopsis "Python implementation of the Language Server Protocol")
3081 (description
3082 "The Python Language Server (pyls) is an implementation of the Python 3
3083 language specification for the Language Server Protocol (LSP). This tool is
3084 used in text editing environments to provide a complete and integrated
3085 feature-set for programming Python effectively.")
3086 (license license:expat)))
3087
3088 (define-public python-black
3089 (package
3090 (name "python-black")
3091 (version "18.6b4")
3092 (source
3093 (origin
3094 (method url-fetch)
3095 (uri (pypi-uri "black" version))
3096 (sha256
3097 (base32
3098 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
3099 (build-system python-build-system)
3100 (arguments
3101 `(#:phases
3102 (modify-phases %standard-phases
3103 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3104 (lambda _
3105 (let ((python3 (which "python3")))
3106 (substitute* '("tests/data/fmtonoff.py"
3107 "tests/data/string_prefixes.py"
3108 "tests/data/function.py")
3109 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3110 (string-append "#!" python3 (if (string? minor-version)
3111 minor-version
3112 ""))))))))))
3113 (propagated-inputs
3114 `(("python-click" ,python-click)
3115 ("python-attrs" ,python-attrs)
3116 ("python-appdirs" ,python-appdirs)
3117 ("python-toml" ,python-toml)))
3118 (home-page "https://github.com/ambv/black")
3119 (synopsis "The uncompromising code formatter")
3120 (description "Black is the uncompromising Python code formatter.")
3121 (license license:expat)))
3122
3123 (define-public python-blinker
3124 (package
3125 (name "python-blinker")
3126 (version "1.4")
3127 (source
3128 (origin
3129 (method url-fetch)
3130 (uri (pypi-uri "blinker" version))
3131 (sha256
3132 (base32
3133 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3134 (build-system python-build-system)
3135 (home-page "http://pythonhosted.org/blinker/")
3136 (synopsis "Fast, simple object-to-object and broadcast signaling")
3137 (description
3138 "Blinker provides a fast dispatching system that allows any number of
3139 interested parties to subscribe to events, or \"signals\".")
3140 (license license:expat)))
3141
3142 (define-public python2-blinker
3143 (package-with-python2 python-blinker))
3144
3145 (define-public pelican
3146 (package
3147 (name "pelican")
3148 (version "4.0.1")
3149 (source
3150 (origin
3151 (method url-fetch)
3152 (uri (pypi-uri "pelican" version))
3153 (sha256
3154 (base32
3155 "05yda7n6r0ll18fpdjzkzyr0ls8hbb86fnjyb33k9jvv5avah2lr"))))
3156 (build-system python-build-system)
3157 (propagated-inputs
3158 `(("python-feedgenerator" ,python-feedgenerator)
3159 ("python-jinja2" ,python-jinja2)
3160 ("python-pygments" ,python-pygments)
3161 ("python-docutils" ,python-docutils)
3162 ("python-pytz" ,python-pytz)
3163 ("python-blinker" ,python-blinker)
3164 ("python-unidecode" ,python-unidecode)
3165 ("python-six" ,python-six)
3166 ("python-dateutil" ,python-dateutil)
3167 ("python-markdown" ,python-markdown)))
3168 (home-page "https://getpelican.com/")
3169 (arguments
3170 `(;; XXX Requires a lot more packages to do unit tests :P
3171 #:tests? #f
3172 #:phases (modify-phases %standard-phases
3173 (add-before
3174 'install 'adjust-requires
3175 ;; Since feedgenerator is installed from git, it doesn't
3176 ;; conform to the version requirements.
3177 ;;
3178 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3179 ;; version requirement so setuptools doesn't get confused.
3180 (lambda _
3181 (substitute* "setup.py"
3182 (("['\"]feedgenerator.*?['\"]")
3183 "'feedgenerator'")))))))
3184 (synopsis "Python-based static site publishing system")
3185 (description
3186 "Pelican is a tool to generate a static blog from reStructuredText,
3187 Markdown input files, and more. Pelican uses Jinja2 for templating
3188 and is very extensible.")
3189 (license license:agpl3+)))
3190
3191 (define-public mallard-ducktype
3192 (package
3193 (name "mallard-ducktype")
3194 (version "1.0.2")
3195 (source
3196 (origin
3197 (method git-fetch)
3198 ;; git-reference because tests are not included in pypi source tarball
3199 ;; https://issues.guix.gnu.org/issue/36755#2
3200 (uri (git-reference
3201 (url "https://github.com/projectmallard/mallard-ducktype.git")
3202 (commit version)))
3203 (file-name (git-file-name name version))
3204 (sha256
3205 (base32
3206 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
3207 (build-system python-build-system)
3208 (arguments
3209 '(#:phases
3210 (modify-phases %standard-phases
3211 (replace 'check
3212 (lambda _
3213 (with-directory-excursion "tests"
3214 (invoke "sh" "runtests")))))))
3215 (home-page "http://projectmallard.org")
3216 (synopsis "Convert Ducktype to Mallard documentation markup")
3217 (description
3218 "Ducktype is a lightweight syntax that can represent all the semantics
3219 of the Mallard XML documentation system. Ducktype files can be converted to
3220 Mallard using the @command{ducktype} tool. The yelp-tools package
3221 provides additional functionality on the produced Mallard documents.")
3222 (license license:expat)))
3223
3224 (define-public python-cython
3225 (package
3226 (name "python-cython")
3227 (version "0.29.13")
3228 (source
3229 (origin
3230 (method url-fetch)
3231 (uri (pypi-uri "Cython" version))
3232 (sha256
3233 (base32
3234 "13k37lrcgagwwnzr5bzririsscb793vndj234d475x1h9ad0d7f2"))))
3235 (build-system python-build-system)
3236 ;; we need the full python package and not just the python-wrapper
3237 ;; because we need libpython3.3m.so
3238 (inputs
3239 `(("python" ,python)))
3240 (arguments
3241 `(#:phases
3242 (modify-phases %standard-phases
3243 (add-before 'check 'set-HOME
3244 ;; some tests require access to "$HOME/.cython"
3245 (lambda _ (setenv "HOME" "/tmp") #t))
3246
3247 ;; FIXME: These tests started failing on armhf after the 0.28 update
3248 ;; (commit c69d11c5930), both with an error such as this:
3249 ;; compiling (cpp) and running dictcomp ...
3250 ;; === C/C++ compiler error output: ===
3251 ;; ‘
3252 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
3253 ;; See <https://hydra.gnu.org/build/2948724> for logs.
3254 ,@(if (target-arm32?)
3255 `((add-before 'check 'disable-failing-tests
3256 (lambda _
3257 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
3258 (for-each (lambda (test)
3259 (format disabled-tests "~a\n" test))
3260 '("memslice" "dictcomp"))
3261 (close-port disabled-tests)))))
3262 '())
3263
3264 (replace 'check
3265 (lambda _
3266 ;; Disable compiler optimizations to greatly reduce the running
3267 ;; time of the test suite.
3268 (setenv "CFLAGS" "-O0")
3269
3270 (invoke "python" "runtests.py" "-vv"
3271 "-j" (number->string (parallel-job-count))))))))
3272 (home-page "https://cython.org/")
3273 (synopsis "C extensions for Python")
3274 (description "Cython is an optimising static compiler for both the Python
3275 programming language and the extended Cython programming language. It makes
3276 writing C extensions for Python as easy as Python itself.")
3277 (license license:asl2.0)
3278 (properties `((python2-variant . ,(delay python2-cython))))))
3279
3280 (define-public python2-cython
3281 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
3282 (package
3283 (inherit base)
3284 (name "python2-cython")
3285 (inputs
3286 `(("python-2" ,python-2))) ;this is not automatically changed
3287 (arguments
3288 (substitute-keyword-arguments (package-arguments base)
3289 ((#:phases phases)
3290 `(modify-phases ,phases
3291 (add-before 'check 'adjust-test_embed
3292 (lambda _
3293 (substitute* "runtests.py"
3294 ;; test_embed goes great lengths to find the static libpythonX.Y.a
3295 ;; so it can give the right -L flag to GCC when embedding static
3296 ;; builds of Python. It is unaware that the Python "config"
3297 ;; directory (where the static library lives) was renamed in
3298 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
3299 ;; which works fine, because that is where the shared library is.
3300 ;;
3301 ;; It also appears to be unaware that the Makefile in Demos/embed
3302 ;; already unconditionally pass the static library location to GCC,
3303 ;; after checking sysconfig.get_config_var('LIBPL).
3304 ;;
3305 ;; The effect is that the linker is unable to resolve libexpat
3306 ;; symbols when building for Python 2, because neither the Python 2
3307 ;; shared library nor Expat is available. To fix it, we can either
3308 ;; add Expat as an input and make it visible to the linker, or just
3309 ;; prevent it from overriding the Python shared library location.
3310 ;; The end result is identical, so we take the easy route.
3311 ((" or libname not in os\\.listdir\\(libdir\\)")
3312 ""))
3313 #t)))))))))
3314
3315 ;; The RPython toolchain currently does not support Python 3.
3316 (define-public python2-rpython
3317 (package
3318 (name "python2-rpython")
3319 (version "0.2.1")
3320 (source
3321 (origin
3322 (method url-fetch)
3323 (uri (pypi-uri "rpython" version))
3324 (sha256
3325 (base32
3326 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3327 (build-system python-build-system)
3328 (arguments `(#:python ,python-2))
3329 (native-inputs
3330 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3331 (home-page "https://rpython.readthedocs.org")
3332 (synopsis "Framework for implementing interpreters and virtual machines")
3333 (description "RPython is a translation and support framework for
3334 producing implementations of dynamic languages, emphasizing a clean separation
3335 between language specification and implementation aspects.")
3336 (license license:expat)))
3337
3338 ;; NOTE: when upgrading numpy please make sure that python-pandas and
3339 ;; python-scipy still build, as these three packages are often used together.
3340 (define-public python-numpy
3341 (package
3342 (name "python-numpy")
3343 (version "1.17.3")
3344 (source
3345 (origin
3346 (method url-fetch)
3347 (uri (string-append
3348 "https://github.com/numpy/numpy/releases/download/v"
3349 version "/numpy-" version ".tar.gz"))
3350 (sha256
3351 (base32
3352 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
3353 (build-system python-build-system)
3354 (inputs
3355 `(("openblas" ,openblas)
3356 ("lapack" ,lapack)))
3357 (native-inputs
3358 `(("python-cython" ,python-cython)
3359 ("python-pytest" ,python-pytest)
3360 ("gfortran" ,gfortran)))
3361 (arguments
3362 `(#:phases
3363 (modify-phases %standard-phases
3364 (add-before 'build 'configure-blas-lapack
3365 (lambda* (#:key inputs #:allow-other-keys)
3366 (call-with-output-file "site.cfg"
3367 (lambda (port)
3368 (format port
3369 "[openblas]
3370 libraries = openblas
3371 library_dirs = ~a/lib
3372 include_dirs = ~a/include
3373
3374 # backslash-n to make emacs happy
3375 \n[lapack]
3376 lapack_libs = lapack
3377 library_dirs = ~a/lib
3378 include_dirs = ~a/include
3379 "
3380 (assoc-ref inputs "openblas")
3381 (assoc-ref inputs "openblas")
3382 (assoc-ref inputs "lapack")
3383 (assoc-ref inputs "lapack"))))
3384 #t))
3385 (add-before 'build 'fix-executable-paths
3386 (lambda* (#:key inputs #:allow-other-keys)
3387 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3388 ;; instead of /bin/sh.
3389 (substitute* "numpy/distutils/exec_command.py"
3390 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3391 (string-append match-start (assoc-ref inputs "bash") match-end)))
3392 ;; Use "gcc" executable, not "cc".
3393 (substitute* "numpy/distutils/system_info.py"
3394 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3395 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3396 #t))
3397 ;; Tests can only be run after the library has been installed and not
3398 ;; within the source directory.
3399 (delete 'check)
3400 (add-after 'install 'check
3401 (lambda* (#:key outputs inputs #:allow-other-keys)
3402 ;; Make installed package available for running the tests
3403 (add-installed-pythonpath inputs outputs)
3404 ;; Make sure "f2py" etc is found.
3405 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3406 ":" (getenv "PATH")))
3407 (with-directory-excursion "/tmp"
3408 (invoke "python" "-c"
3409 "import numpy; numpy.test(verbose=2)")))))))
3410 (home-page "http://www.numpy.org/")
3411 (synopsis "Fundamental package for scientific computing with Python")
3412 (description "NumPy is the fundamental package for scientific computing
3413 with Python. It contains among other things: a powerful N-dimensional array
3414 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3415 and Fortran code, useful linear algebra, Fourier transform, and random number
3416 capabilities.")
3417 (properties `((python2-variant . ,(delay python2-numpy))))
3418 (license license:bsd-3)))
3419
3420 ;; Numpy 1.16.x are the last versions that support Python 2.
3421 (define-public python2-numpy
3422 (let ((numpy (package-with-python2
3423 (strip-python2-variant python-numpy))))
3424 (package/inherit
3425 numpy
3426 (version "1.16.5")
3427 (source (origin
3428 (method url-fetch)
3429 (uri (string-append
3430 "https://github.com/numpy/numpy/releases/download/v"
3431 version "/numpy-" version ".tar.gz"))
3432 (sha256
3433 (base32
3434 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
3435
3436 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3437 ;; interest only for legacy code going back to NumPy's predecessor
3438 ;; Numeric.
3439 (define-public python2-numpy-1.8
3440 (package (inherit python2-numpy)
3441 (version "1.8.2")
3442 (source
3443 (origin
3444 (method url-fetch)
3445 (uri (string-append
3446 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3447 (file-name (string-append "python2-numpy-" version ".tar.gz"))
3448 (sha256
3449 (base32
3450 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
3451 (arguments
3452 (substitute-keyword-arguments (package-arguments python2-numpy)
3453 ((#:phases phases)
3454 `(modify-phases ,phases
3455 (replace 'configure-blas-lapack
3456 (lambda* (#:key inputs #:allow-other-keys)
3457 (call-with-output-file "site.cfg"
3458 (lambda (port)
3459 (format port
3460 "[openblas]
3461 libraries = openblas,lapack
3462 library_dirs = ~a/lib:~a/lib
3463 include_dirs = ~a/include:~a/include
3464 "
3465 (assoc-ref inputs "openblas")
3466 (assoc-ref inputs "lapack")
3467 (assoc-ref inputs "openblas")
3468 (assoc-ref inputs "lapack"))))
3469 #t))))))
3470 (native-inputs
3471 `(("python2-nose" ,python2-nose)))
3472 (description "NumPy is the fundamental package for scientific computing
3473 with Python. It contains among other things: a powerful N-dimensional array
3474 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3475 and Fortran code, useful linear algebra, Fourier transform, and random number
3476 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3477 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3478 Numeric.")
3479 (license license:bsd-3)))
3480
3481 (define-public python-munch
3482 (package
3483 (name "python-munch")
3484 (version "2.0.4")
3485 (source
3486 (origin
3487 (method url-fetch)
3488 (uri (pypi-uri "munch" version))
3489 (sha256
3490 (base32
3491 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3492 (build-system python-build-system)
3493 (home-page "https://github.com/Infinidat/munch")
3494 (synopsis "Dot-accessible dictionary")
3495 (description "Munch is a dot-accessible dictionary similar to JavaScript
3496 objects.")
3497 (license license:expat)))
3498
3499 (define-public python2-munch
3500 (package-with-python2 python-munch))
3501
3502 (define-public python-colormath
3503 (package
3504 (name "python-colormath")
3505 (version "3.0.0")
3506 (source
3507 (origin
3508 (method url-fetch)
3509 (uri (pypi-uri "colormath" version))
3510 (sha256
3511 (base32
3512 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3513 (build-system python-build-system)
3514 (propagated-inputs
3515 `(("python-networkx" ,python-networkx)
3516 ("python-numpy" ,python-numpy)))
3517 (home-page "https://github.com/gtaylor/python-colormath")
3518 (synopsis "Color math and conversion library")
3519 (description
3520 "This is a Python library for color math and conversions.")
3521 (license license:bsd-3)))
3522
3523 (define-public python2-colormath
3524 (package-with-python2 python-colormath))
3525
3526 (define-public python-spectra
3527 (package
3528 (name "python-spectra")
3529 (version "0.0.11")
3530 (source
3531 (origin
3532 (method url-fetch)
3533 (uri (pypi-uri "spectra" version))
3534 (sha256
3535 (base32
3536 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3537 (build-system python-build-system)
3538 (arguments
3539 `(#:phases
3540 (modify-phases %standard-phases
3541 (replace 'check
3542 (lambda _ (invoke "nosetests" "-v"))))))
3543 (propagated-inputs
3544 `(("python-colormath" ,python-colormath)))
3545 (native-inputs
3546 `(("python-nose" ,python-nose)))
3547 (home-page "https://github.com/jsvine/spectra")
3548 (synopsis "Color scales and color conversion")
3549 (description
3550 "This package provides a Python library intended to make color math,
3551 color scales, and color space conversion easy. It has support for:
3552
3553 @enumerate
3554 @item Color scales
3555 @item Color ranges
3556 @item Color blending
3557 @item Brightening/darkening colors
3558 @item Saturating/desaturating colors
3559 @item Conversion to/from multiple color spaces.
3560 @end enumerate\n")
3561 (license license:expat)))
3562
3563 (define-public python2-spectra
3564 (package-with-python2 python-spectra))
3565
3566 (define-public python-numpy-documentation
3567 (package
3568 (name "python-numpy-documentation")
3569 (version (package-version python-numpy))
3570 (source (package-source python-numpy))
3571 (build-system python-build-system)
3572 (native-inputs
3573 `(("python-matplotlib" ,python-matplotlib)
3574 ("python-numpy" ,python-numpy)
3575 ("pkg-config" ,pkg-config)
3576 ("python-sphinx" ,python-sphinx)
3577 ("python-numpydoc" ,python-numpydoc)
3578 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
3579 texlive-fonts-ec
3580 texlive-generic-ifxetex
3581 texlive-generic-pdftex
3582 texlive-amsfonts
3583 texlive-latex-capt-of
3584 texlive-latex-cmap
3585 texlive-latex-environ
3586 texlive-latex-eqparbox
3587 texlive-latex-etoolbox
3588 texlive-latex-expdlist
3589 texlive-latex-fancyhdr
3590 texlive-latex-fancyvrb
3591 texlive-latex-fncychap
3592 texlive-latex-float
3593 texlive-latex-framed
3594 texlive-latex-geometry
3595 texlive-latex-graphics
3596 texlive-latex-hyperref
3597 texlive-latex-mdwtools
3598 texlive-latex-multirow
3599 texlive-latex-needspace
3600 texlive-latex-oberdiek
3601 texlive-latex-parskip
3602 texlive-latex-preview
3603 texlive-latex-tabulary
3604 texlive-latex-threeparttable
3605 texlive-latex-titlesec
3606 texlive-latex-trimspaces
3607 texlive-latex-ucs
3608 texlive-latex-upquote
3609 texlive-latex-url
3610 texlive-latex-varwidth
3611 texlive-latex-wrapfig)))
3612 ("texinfo" ,texinfo)
3613 ("perl" ,perl)
3614 ("scipy-sphinx-theme"
3615 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3616 (method git-fetch)
3617 (uri (git-reference
3618 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3619 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3620 (sha256
3621 (base32
3622 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3623 ,@(package-native-inputs python-numpy)))
3624 (arguments
3625 `(#:tests? #f ; we're only generating the documentation
3626 #:phases
3627 (modify-phases %standard-phases
3628 (delete 'build)
3629 (replace 'install
3630 (lambda* (#:key inputs outputs #:allow-other-keys)
3631 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3632 (doc (string-append
3633 data "/doc/" ,name "-"
3634 ,(package-version python-numpy)))
3635 (info-reader (string-append data "/info"))
3636 (html (string-append doc "/html"))
3637 (scipy-sphinx-theme "scipy-sphinx-theme")
3638 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3639 (pyver ,(string-append "PYVER=")))
3640
3641 ;; FIXME: this is needed to for texlive-union to generate
3642 ;; fonts, which are not found.
3643 (setenv "HOME" "/tmp")
3644
3645 (with-directory-excursion "doc"
3646 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3647 (mkdir-p html)
3648 (invoke "make" "html" pyver)
3649 (invoke "make" "latex" "PAPER=a4" pyver)
3650 (invoke "make" "-C" "build/latex"
3651 "all-pdf" "PAPER=a4" pyver)
3652 ;; FIXME: Generation of the info file fails.
3653 ;; (invoke "make" "info" pyver)
3654 ;; (mkdir-p info)
3655 ;; (copy-file "build/texinfo/numpy.info"
3656 ;; (string-append info "/numpy.info"))
3657 (for-each (lambda (file)
3658 (copy-file (string-append "build/latex" file)
3659 (string-append doc file)))
3660 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3661 (with-directory-excursion "build/html"
3662 (for-each (lambda (file)
3663 (let* ((dir (dirname file))
3664 (tgt-dir (string-append html "/" dir)))
3665 (unless (equal? "." dir)
3666 (mkdir-p tgt-dir))
3667 (install-file file html)))
3668 (find-files "." ".*")))))
3669 #t)))))
3670 (home-page (package-home-page python-numpy))
3671 (synopsis "Documentation for the python-numpy package")
3672 (description (package-description python-numpy))
3673 (license (package-license python-numpy))))
3674
3675 (define-public python2-numpy-documentation
3676 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3677 (package
3678 (inherit numpy-documentation)
3679 (native-inputs `(("python2-functools32" ,python2-functools32)
3680 ,@(package-native-inputs numpy-documentation))))))
3681
3682 (define-public python-pygit2
3683 (package
3684 (name "python-pygit2")
3685 (version "0.28.2")
3686 (source
3687 (origin
3688 (method url-fetch)
3689 (uri (pypi-uri "pygit2" version))
3690 (sha256
3691 (base32 "11kzj5mjkspvplnpdb6bj8dcj6rgmkk986k8hjcklyg5yaxkz32d"))))
3692 (build-system python-build-system)
3693 (arguments
3694 '(#:tests? #f)) ; tests don't run correctly in our environment
3695 (propagated-inputs
3696 `(("python-six" ,python-six)
3697 ("python-cffi" ,python-cffi)
3698 ("libgit2" ,libgit2)
3699 ("python-tox" ,python-tox)))
3700 (native-inputs
3701 `(("python-pytest" ,python-pytest)))
3702 (home-page "https://github.com/libgit2/pygit2")
3703 (synopsis "Python bindings for libgit2")
3704 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3705 library, libgit2 implements Git plumbing.")
3706 ;; GPL2.0 only, with linking exception.
3707 (license license:gpl2)))
3708
3709 (define-public python2-pygit2
3710 (package-with-python2 python-pygit2))
3711
3712 (define-public python-pyparsing
3713 (package
3714 (name "python-pyparsing")
3715 (version "2.3.1")
3716 (source
3717 (origin
3718 (method url-fetch)
3719 (uri (pypi-uri "pyparsing" version))
3720 (sha256
3721 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
3722 (build-system python-build-system)
3723 (outputs '("out" "doc"))
3724 (arguments
3725 `(#:tests? #f ; no test target
3726 #:phases
3727 (modify-phases %standard-phases
3728 (add-after 'install 'install-doc
3729 (lambda* (#:key outputs #:allow-other-keys)
3730 (let* ((doc (string-append (assoc-ref outputs "doc")
3731 "/share/doc/" ,name "-" ,version))
3732 (html-doc (string-append doc "/html"))
3733 (examples (string-append doc "/examples")))
3734 (mkdir-p html-doc)
3735 (mkdir-p examples)
3736 (for-each
3737 (lambda (dir tgt)
3738 (map (lambda (file)
3739 (install-file file tgt))
3740 (find-files dir ".*")))
3741 (list "docs" "htmldoc" "examples")
3742 (list doc html-doc examples))
3743 #t))))))
3744 (home-page "https://github.com/pyparsing/pyparsing")
3745 (synopsis "Python parsing class library")
3746 (description
3747 "The pyparsing module is an alternative approach to creating and
3748 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3749 of regular expressions. The pyparsing module provides a library of classes
3750 that client code uses to construct the grammar directly in Python code.")
3751 (license license:expat)))
3752
3753 (define-public python2-pyparsing
3754 (package-with-python2 python-pyparsing))
3755
3756 (define-public python-numpydoc
3757 (package
3758 (name "python-numpydoc")
3759 (version "0.8.0")
3760 (source
3761 (origin
3762 (method url-fetch)
3763 (uri (pypi-uri "numpydoc" version))
3764 (sha256
3765 (base32
3766 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3767 (build-system python-build-system)
3768 (propagated-inputs
3769 `(("python-sphinx" ,python-sphinx)))
3770 (native-inputs
3771 `(("python-nose" ,python-nose)))
3772 (home-page "https://pypi.python.org/pypi/numpydoc")
3773 (synopsis
3774 "Numpy's Sphinx extensions")
3775 (description
3776 "Sphinx extension to support docstrings in Numpy format.")
3777 (license license:bsd-2)))
3778
3779 (define-public python2-numpydoc
3780 (package-with-python2 python-numpydoc))
3781
3782 (define-public python-numexpr
3783 (package
3784 (name "python-numexpr")
3785 (version "2.6.5")
3786 (source
3787 (origin
3788 (method url-fetch)
3789 (uri (pypi-uri "numexpr" version))
3790 (sha256
3791 (base32
3792 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3793 (build-system python-build-system)
3794 (arguments `(#:tests? #f)) ; no tests included
3795 (propagated-inputs
3796 `(("python-numpy" ,python-numpy)))
3797 (home-page "https://github.com/pydata/numexpr")
3798 (synopsis "Fast numerical expression evaluator for NumPy")
3799 (description
3800 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3801 expressions that operate on arrays are accelerated and use less memory than
3802 doing the same calculation in Python. In addition, its multi-threaded
3803 capabilities can make use of all your cores, which may accelerate
3804 computations, most specially if they are not memory-bounded (e.g. those using
3805 transcendental functions).")
3806 (license license:expat)))
3807
3808 (define-public python2-numexpr
3809 (package-with-python2 python-numexpr))
3810
3811 (define-public python-cycler
3812 (package
3813 (name "python-cycler")
3814 (version "0.10.0")
3815 (source (origin
3816 (method url-fetch)
3817 (uri (pypi-uri "cycler" version))
3818 (sha256
3819 (base32
3820 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3821 (build-system python-build-system)
3822 (arguments
3823 ;; XXX: The current version requires 'coveralls' which we don't have.
3824 ;; Enable this for the next release which uses 'python-pytest'.
3825 '(#:tests? #f))
3826 (propagated-inputs
3827 `(("python-six" ,python-six)))
3828 (home-page "http://matplotlib.org/cycler/")
3829 (synopsis "Composable keyword argument iterator")
3830 (description
3831 "When using @code{matplotlib} and plotting more than one line, it is
3832 common to want to be able to want to be able to cycle over one or more artist
3833 styles; but the plotting logic can quickly become involved.
3834 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3835 @code{Cycler} class was developed.")
3836 (license license:bsd-3)))
3837
3838 (define-public python2-cycler
3839 (package-with-python2 python-cycler))
3840
3841 (define-public python-colorspacious
3842 (package
3843 (name "python-colorspacious")
3844 (version "1.1.2")
3845 (source
3846 (origin
3847 (method git-fetch)
3848 (uri (git-reference
3849 (url "https://github.com/njsmith/colorspacious.git")
3850 (commit (string-append "v" version))))
3851 (file-name (git-file-name name version))
3852 (sha256
3853 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
3854 (build-system python-build-system)
3855 (propagated-inputs
3856 `(("python-numpy" ,python-numpy)))
3857 (native-inputs
3858 `(("python-nose" ,python-nose)))
3859 (arguments
3860 `(#:phases
3861 (modify-phases %standard-phases
3862 (replace 'check
3863 (lambda _
3864 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
3865 (home-page "https://github.com/njsmith/colorspacious")
3866 (synopsis "Python library for colorspace conversions")
3867 (description "@code{colorspacious} is a Python library that lets you
3868 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3869 (license license:expat)))
3870
3871 (define-public python2-colorspacious
3872 (package-with-python2 python-colorspacious))
3873
3874 (define-public python-matplotlib
3875 (package
3876 (name "python-matplotlib")
3877 (version "3.1.2")
3878 (source
3879 (origin
3880 (method url-fetch)
3881 (uri (pypi-uri "matplotlib" version))
3882 (sha256
3883 (base32
3884 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))))
3885 (build-system python-build-system)
3886 (propagated-inputs ; the following packages are all needed at run time
3887 `(("python-cycler" ,python-cycler)
3888 ("python-kiwisolver" ,python-kiwisolver)
3889 ("python-pyparsing" ,python-pyparsing)
3890 ("python-pygobject" ,python-pygobject)
3891 ("gobject-introspection" ,gobject-introspection)
3892 ("python-tkinter" ,python "tk")
3893 ("python-dateutil" ,python-dateutil)
3894 ("python-numpy" ,python-numpy)
3895 ("python-pillow" ,python-pillow)
3896 ("python-pytz" ,python-pytz)
3897 ("python-six" ,python-six)
3898 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3899 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3900 ;; object. For this reason we need to import both libraries.
3901 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
3902 ("python-pycairo" ,python-pycairo)
3903 ("python-cairocffi" ,python-cairocffi)))
3904 (inputs
3905 `(("libpng" ,libpng)
3906 ("imagemagick" ,imagemagick)
3907 ("freetype" ,freetype)
3908 ("cairo" ,cairo)
3909 ("glib" ,glib)
3910 ;; FIXME: Add backends when available.
3911 ;("python-wxpython" ,python-wxpython)
3912 ("tcl" ,tcl)
3913 ("tk" ,tk)))
3914 (native-inputs
3915 `(("pkg-config" ,pkg-config)
3916 ("python-pytest" ,python-pytest)
3917 ("python-mock" ,python-mock)
3918 ("unzip" ,unzip)
3919 ("jquery-ui"
3920 ,(origin
3921 (method url-fetch)
3922 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
3923 (sha256
3924 (base32
3925 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
3926 (arguments
3927 `(#:phases
3928 (modify-phases %standard-phases
3929 ;; XXX We disable all image comparison tests because we're using a
3930 ;; newer version of FreeType than matplotlib expects. This leads to
3931 ;; minor differences throughout the tests.
3932 (add-after 'unpack 'fix-and-disable-failing-tests
3933 (lambda _
3934 (substitute* (append (find-files "lib/matplotlib/tests/"
3935 "test_.*\\.py$")
3936 (find-files "lib/mpl_toolkits/tests"
3937 "test_.*\\.py$"))
3938 (("^from matplotlib" match)
3939 (string-append "import pytest\n" match))
3940 (("( *)@image_comparison" match indent)
3941 (string-append indent
3942 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
3943 match)))
3944 (substitute* "lib/matplotlib/tests/test_animation.py"
3945 (("/bin/sh") (which "sh")))
3946 (for-each delete-file
3947 ;; test_normal_axes, test_get_tightbbox_polar
3948 '("lib/matplotlib/tests/test_axes.py"
3949 ;; We don't use the webagg backend and this test forces it.
3950 "lib/matplotlib/tests/test_backend_webagg.py"
3951 ;; test_outward_ticks
3952 "lib/matplotlib/tests/test_tightlayout.py"
3953 ;; test_hidden_axes fails with minor extent
3954 ;; differences, possibly due to the use of a
3955 ;; different version of FreeType.
3956 "lib/matplotlib/tests/test_constrainedlayout.py"
3957 ;; Fontconfig returns no fonts.
3958 "lib/matplotlib/tests/test_font_manager.py"))
3959 #t))
3960 (add-before 'install 'install-jquery-ui
3961 (lambda* (#:key outputs inputs #:allow-other-keys)
3962 (let ((dir (string-append (assoc-ref outputs "out")
3963 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
3964 (mkdir-p dir)
3965 (invoke "unzip"
3966 (assoc-ref inputs "jquery-ui")
3967 "-d" dir))
3968 #t))
3969 (replace 'check
3970 (lambda* (#:key outputs inputs #:allow-other-keys)
3971 (add-installed-pythonpath inputs outputs)
3972 (invoke "python" "tests.py" "-v"
3973 "-m" "not network and not webagg")))
3974 (add-before 'build 'configure-environment
3975 (lambda* (#:key outputs inputs #:allow-other-keys)
3976 (let ((cairo (assoc-ref inputs "cairo")))
3977 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
3978 ;; has not effect.
3979 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
3980 (setenv "HOME" (getcwd))
3981 (call-with-output-file "setup.cfg"
3982 (lambda (port)
3983 (format port "[directories]~%
3984 basedirlist = ~a,~a~%
3985 [packages]~%
3986 tests = True~%"
3987 (assoc-ref inputs "tcl")
3988 (assoc-ref inputs "tk")))))
3989 #t)))))
3990 (home-page "https://matplotlib.org/")
3991 (synopsis "2D plotting library for Python")
3992 (description
3993 "Matplotlib is a Python 2D plotting library which produces publication
3994 quality figures in a variety of hardcopy formats and interactive environments
3995 across platforms. Matplotlib can be used in Python scripts, the python and
3996 ipython shell, web application servers, and six graphical user interface
3997 toolkits.")
3998 (license license:psfl)
3999 (properties `((python2-variant . ,(delay python2-matplotlib))))))
4000
4001 (define-public python2-matplotlib
4002 (let ((matplotlib (package-with-python2
4003 (strip-python2-variant python-matplotlib))))
4004 (package (inherit matplotlib)
4005 (version "2.2.4")
4006 (source
4007 (origin
4008 (method url-fetch)
4009 (uri (pypi-uri "matplotlib" version))
4010 (sha256
4011 (base32
4012 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
4013 (arguments
4014 (substitute-keyword-arguments (package-arguments matplotlib)
4015 ((#:phases phases)
4016 `(modify-phases ,phases
4017 (replace 'install-jquery-ui
4018 (lambda* (#:key outputs inputs #:allow-other-keys)
4019 (let ((dir (string-append (assoc-ref outputs "out")
4020 "/lib/python2.7/site-packages/"
4021 "matplotlib/backends/web_backend/")))
4022 (mkdir-p dir)
4023 (invoke "unzip"
4024 (assoc-ref inputs "jquery-ui")
4025 "-d" dir))
4026 #t))
4027 (delete 'fix-and-disable-failing-tests)
4028 (delete 'check))))) ; These tests weren't run the the past.
4029 ;; Make sure to use special packages for Python 2 instead
4030 ;; of those automatically rewritten by package-with-python2.
4031 (propagated-inputs
4032 `(("python2-pycairo" ,python2-pycairo)
4033 ("python2-backports-functools-lru-cache"
4034 ,python2-backports-functools-lru-cache)
4035 ("python2-functools32" ,python2-functools32)
4036 ("python2-pygobject-2" ,python2-pygobject-2)
4037 ("python2-subprocess32" ,python2-subprocess32)
4038 ("python2-tkinter" ,python-2 "tk")
4039 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4040 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4041
4042 (define-public python-matplotlib-documentation
4043 (package
4044 (name "python-matplotlib-documentation")
4045 (version (package-version python-matplotlib))
4046 (source (package-source python-matplotlib))
4047 (build-system python-build-system)
4048 (native-inputs
4049 `(("python-matplotlib" ,python-matplotlib)
4050 ("python-colorspacious" ,python-colorspacious)
4051 ("python-sphinx" ,python-sphinx)
4052 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
4053 ("python-sphinx-gallery" ,python-sphinx-gallery)
4054 ("python-numpydoc" ,python-numpydoc)
4055 ("python-ipython" ,python-ipython)
4056 ("python-ipykernel" ,python-ipykernel)
4057 ("python-mock" ,python-mock)
4058 ("graphviz" ,graphviz)
4059 ("texlive" ,(texlive-union (list texlive-amsfonts
4060 texlive-latex-amsmath
4061 texlive-latex-enumitem
4062 texlive-latex-expdlist
4063 texlive-latex-geometry
4064 texlive-latex-preview
4065 texlive-latex-type1cm
4066 texlive-latex-ucs
4067
4068 texlive-generic-pdftex
4069
4070 texlive-fonts-ec
4071 texlive-fonts-adobe-times
4072 texlive-fonts-txfonts)))
4073 ("texinfo" ,texinfo)
4074 ,@(package-native-inputs python-matplotlib)))
4075 (arguments
4076 `(#:tests? #f ; we're only generating documentation
4077 #:phases
4078 (modify-phases %standard-phases
4079 ;; The tests in python-matplotlib are run after the install phase, so
4080 ;; we need to delete the extra phase here.
4081 (delete 'check)
4082 (replace 'build
4083 (lambda _
4084 (chdir "doc")
4085 (setenv "PYTHONPATH"
4086 (string-append (getenv "PYTHONPATH")
4087 ":" (getcwd) "/../examples/units"))
4088 (substitute* "conf.py"
4089 ;; Don't use git.
4090 (("^SHA = check_output.*")
4091 (string-append "SHA = \"" ,version "\"\n"))
4092 ;; Don't fetch intersphinx files from the Internet
4093 (("^explicit_order_folders" m)
4094 (string-append "intersphinx_mapping = {}\n" m))
4095 (("'sphinx.ext.intersphinx',") "")
4096 ;; Disable URL embedding which requires internet access.
4097 (("'https://docs.scipy.org/doc/numpy'") "None")
4098 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
4099 (invoke "make"
4100 "SPHINXBUILD=sphinx-build"
4101 "SPHINXOPTS=" ; don't abort on warnings
4102 "html" "texinfo")))
4103 (replace 'install
4104 (lambda* (#:key inputs outputs #:allow-other-keys)
4105 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4106 (doc (string-append data "/doc/python-matplotlib-" ,version))
4107 (info (string-append data "/info"))
4108 (html (string-append doc "/html")))
4109 (mkdir-p html)
4110 (mkdir-p info)
4111 (copy-recursively "build/html" html)
4112 (symlink (string-append html "/_images")
4113 (string-append info "/matplotlib-figures"))
4114 (with-directory-excursion "build/texinfo"
4115 (substitute* "matplotlib.texi"
4116 (("@image\\{([^,]*)" all file)
4117 (string-append "@image{matplotlib-figures/" file)))
4118 (symlink (string-append html "/_images")
4119 "./matplotlib-figures")
4120 (invoke "makeinfo" "--no-split"
4121 "-o" "matplotlib.info" "matplotlib.texi"))
4122 (install-file "build/texinfo/matplotlib.info" info))
4123 #t)))))
4124 (home-page (package-home-page python-matplotlib))
4125 (synopsis "Documentation for the python-matplotlib package")
4126 (description (package-description python-matplotlib))
4127 (license (package-license python-matplotlib))))
4128
4129 (define-public python2-matplotlib-documentation
4130 (let ((parent (package-with-python2 python-matplotlib-documentation)))
4131 (package
4132 (inherit parent)
4133 (native-inputs
4134 (alist-delete "python-sphinx-copybutton"
4135 (package-native-inputs parent))))))
4136
4137 (define-public python-matplotlib-venn
4138 (package
4139 (name "python-matplotlib-venn")
4140 (version "0.11.5")
4141 (source
4142 (origin
4143 (method url-fetch)
4144 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4145 (sha256
4146 (base32
4147 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4148 (build-system python-build-system)
4149 (arguments '(#:tests? #f)) ; tests are not included
4150 (propagated-inputs
4151 `(("python-matplotlib" ,python-matplotlib)
4152 ("python-numpy" ,python-numpy)
4153 ("python-scipy" ,python-scipy)))
4154 (native-inputs
4155 `(("unzip" ,unzip)))
4156 (home-page "https://github.com/konstantint/matplotlib-venn")
4157 (synopsis "Plot area-proportional Venn diagrams")
4158 (description
4159 "This package provides tools for plotting area-proportional two- and
4160 three-way Venn diagrams in @code{matplotlib}.")
4161 (license license:expat)))
4162
4163 (define-public python2-pysnptools
4164 (package
4165 (name "python2-pysnptools")
4166 (version "0.3.13")
4167 (source
4168 (origin
4169 (method url-fetch)
4170 (uri (pypi-uri "pysnptools" version))
4171 (sha256
4172 (base32
4173 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
4174 (build-system python-build-system)
4175 (arguments
4176 `(#:python ,python-2 ; only Python 2.7 is supported
4177 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
4178 (propagated-inputs
4179 `(("python2-numpy" ,python2-numpy)
4180 ("python2-scipy" ,python2-scipy)
4181 ("python2-pandas" ,python2-pandas)))
4182 (native-inputs
4183 `(("python2-cython" ,python2-cython)))
4184 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
4185 (synopsis "Library for reading and manipulating genetic data")
4186 (description
4187 "PySnpTools is a library for reading and manipulating genetic data. It
4188 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4189 those files. It can also efficiently manipulate ranges of integers using set
4190 operators such as union, intersection, and difference.")
4191 (license license:asl2.0)))
4192
4193 (define-public python-socksipy-branch
4194 (package
4195 (name "python-socksipy-branch")
4196 (version "1.01")
4197 (source
4198 (origin
4199 (method url-fetch)
4200 (uri (pypi-uri "SocksiPy-branch" version))
4201 (sha256
4202 (base32
4203 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4204 (build-system python-build-system)
4205 (arguments
4206 `(#:tests? #f)) ; There are no tests
4207 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4208 (synopsis "Python SOCKS module")
4209 (description
4210 "SocksiPy - A Python SOCKS client module. It provides a
4211 socket-like interface that supports connections to any TCP
4212 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4213 The original version was developed by Dan Haim, this is a
4214 branch created by Mario Vilas to address some open issues,
4215 as the original project seems to have been abandoned circa 2007.")
4216 (license license:bsd-3)))
4217
4218 (define-public python2-socksipy-branch
4219 (package-with-python2 python-socksipy-branch))
4220
4221 (define-public python-socksipychain
4222 (package
4223 (name "python-socksipychain")
4224 (version "2.1.0")
4225 (source
4226 (origin
4227 (method git-fetch)
4228 (uri (git-reference
4229 (url "https://github.com/pagekite/PySocksipyChain.git")
4230 (commit (string-append "v" version))))
4231 (file-name (git-file-name name version))
4232 (sha256
4233 (base32
4234 "0idm9a050rd2kbgbz2sk9ib9589kj4xh1xdnggs6xbq2v2y8f6zn"))))
4235 (build-system python-build-system)
4236 (arguments
4237 `(#:tests? #f)) ; Tests try to access the network.
4238 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
4239 (synopsis "Python SOCKS module with chained proxies support")
4240 (description
4241 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
4242 adds support for arbitrary chaining of proxy servers and various modes of
4243 TLS/SSL encryption. It was developed for use in PageKite, and also includes
4244 a simple netcat replacement with chaining support.")
4245 (license license:bsd-3)))
4246
4247 (define-public python-pycodestyle
4248 (package
4249 (name "python-pycodestyle")
4250 (version "2.5.0")
4251 (source
4252 (origin
4253 (method url-fetch)
4254 (uri (pypi-uri "pycodestyle" version))
4255 (sha256
4256 (base32
4257 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
4258 (build-system python-build-system)
4259 (home-page "https://pycodestyle.readthedocs.io/")
4260 (synopsis "Python style guide checker")
4261 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4262 Python code against some of the style conventions in
4263 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4264 (license license:expat)))
4265
4266 (define-public python2-pycodestyle
4267 (package-with-python2 python-pycodestyle))
4268
4269 (define-public python-multidict
4270 (package
4271 (name "python-multidict")
4272 (version "4.2.0")
4273 (source
4274 (origin
4275 (method url-fetch)
4276 (uri (pypi-uri "multidict" version))
4277 (sha256
4278 (base32
4279 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4280 (build-system python-build-system)
4281 (native-inputs
4282 `(("python-pytest" ,python-pytest)
4283 ("python-pytest-runner" ,python-pytest-runner)))
4284 (home-page "https://github.com/aio-libs/multidict/")
4285 (synopsis "Multidict implementation")
4286 (description "Multidict is dict-like collection of key-value pairs
4287 where key might be occurred more than once in the container.")
4288 (license license:asl2.0)))
4289
4290 (define-public python-orderedmultidict
4291 (package
4292 (name "python-orderedmultidict")
4293 (version "0.7.11")
4294 (source
4295 (origin
4296 (method url-fetch)
4297 (uri (pypi-uri "orderedmultidict" version))
4298 (sha256
4299 (base32
4300 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4301 (build-system python-build-system)
4302 (arguments
4303 `(#:phases
4304 (modify-phases %standard-phases
4305 (add-after 'unpack 'fix-tests
4306 (lambda _
4307 ;; The package uses nosetest for running the tests.
4308 ;; Adding this initfile allows to run the test suite
4309 ;; without requiring nosetest.
4310 (with-output-to-file "tests/__init__.py" newline)
4311 #t)))))
4312 (propagated-inputs
4313 `(("python-six" ,python-six)))
4314 (native-inputs
4315 `(("python-pycodestyle" ,python-pycodestyle)))
4316 (home-page "https://github.com/gruns/orderedmultidict")
4317 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4318 (description "This package contains a library for ordered multivalue
4319 dictionaries. A multivalue dictionary is a dictionary that can store
4320 multiple values for the same key. An ordered multivalue dictionary is a
4321 multivalue dictionary that retains the order of insertions and deletions.")
4322 (license license:unlicense)))
4323
4324 (define-public python2-orderedmultidict
4325 (package-with-python2 python-orderedmultidict))
4326
4327 (define-public python-autopep8
4328 (package
4329 (name "python-autopep8")
4330 (version "1.3.5")
4331 (source
4332 (origin
4333 (method url-fetch)
4334 (uri (pypi-uri "autopep8" version))
4335 (sha256
4336 (base32
4337 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4338 (build-system python-build-system)
4339 (propagated-inputs
4340 `(("python-pycodestyle" ,python-pycodestyle)))
4341 (home-page "https://github.com/hhatto/autopep8")
4342 (synopsis "Format Python code according to the PEP 8 style guide")
4343 (description
4344 "@code{autopep8} automatically formats Python code to conform to
4345 the PEP 8 style guide. It uses the pycodestyle utility to determine
4346 what parts of the code needs to be formatted. @code{autopep8} is
4347 capable of fixing most of the formatting issues that can be reported
4348 by pycodestyle.")
4349 (license (license:non-copyleft
4350 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4351
4352 (define-public python2-autopep8
4353 (package-with-python2 python-autopep8))
4354
4355 (define-public python-distutils-extra
4356 (package
4357 (name "python-distutils-extra")
4358 (version "2.38")
4359 (source
4360 (origin
4361 (method url-fetch)
4362 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4363 version "/+download/python-distutils-extra-"
4364 version ".tar.gz"))
4365 (sha256
4366 (base32
4367 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4368 (build-system python-build-system)
4369 (home-page "https://launchpad.net/python-distutils-extra/")
4370 (synopsis "Enhancements to Python's distutils")
4371 (description
4372 "The python-distutils-extra module enables you to easily integrate
4373 gettext support, themed icons, and scrollkeeper-based documentation into
4374 Python's distutils.")
4375 (license license:gpl2)))
4376
4377 (define-public python2-distutils-extra
4378 (package-with-python2 python-distutils-extra))
4379
4380 (define-public python2-elib.intl
4381 (package
4382 (name "python2-elib.intl")
4383 (version "0.0.3")
4384 (source
4385 (origin
4386 ;; This project doesn't tag releases or publish tarballs, so we take
4387 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4388 (method git-fetch)
4389 (uri (git-reference
4390 (url "https://github.com/dieterv/elib.intl.git")
4391 (commit "d09997cfef")))
4392 (file-name (string-append name "-" version "-checkout"))
4393 (sha256
4394 (base32
4395 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4396 (build-system python-build-system)
4397 (arguments
4398 ;; incompatible with Python 3 (exception syntax)
4399 `(#:python ,python-2
4400 #:tests? #f))
4401 (home-page "https://github.com/dieterv/elib.intl")
4402 (synopsis "Enhanced internationalization for Python")
4403 (description
4404 "The elib.intl module provides enhanced internationalization (I18N)
4405 services for your Python modules and applications.")
4406 (license license:lgpl3+)))
4407
4408 (define-public python-olefile
4409 (package
4410 (name "python-olefile")
4411 (version "0.46")
4412 (source
4413 (origin
4414 (method url-fetch)
4415 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4416 "download/v" version "/olefile-" version ".tar.gz"))
4417 (file-name (string-append name "-" version ".tar.gz"))
4418 (sha256
4419 (base32
4420 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
4421 (build-system python-build-system)
4422 (home-page "https://www.decalage.info/python/olefileio")
4423 (synopsis "Read and write Microsoft OLE2 files.")
4424 (description
4425 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4426 Storage or Compound Document, Microsoft Office). It is an improved version of
4427 the OleFileIO module from PIL, the Python Image Library.")
4428 (license license:bsd-3)))
4429
4430 (define-public python2-olefile
4431 (package-with-python2 python-olefile))
4432
4433 (define-public python-pillow
4434 (package
4435 (name "python-pillow")
4436 (version "6.2.1")
4437 (source
4438 (origin
4439 (method url-fetch)
4440 (uri (pypi-uri "Pillow" version))
4441 (sha256
4442 (base32
4443 "1c8wkzc58f5wdh006jvmwdk3wxld1xgagcbdvj7iv17qi0m9fkmz"))))
4444 (build-system python-build-system)
4445 (native-inputs
4446 `(("python-pytest" ,python-pytest)))
4447 (inputs
4448 `(("freetype" ,freetype)
4449 ("lcms" ,lcms)
4450 ("libjpeg" ,libjpeg)
4451 ("libtiff" ,libtiff)
4452 ("libwebp" ,libwebp)
4453 ("openjpeg" ,openjpeg)
4454 ("zlib" ,zlib)))
4455 (propagated-inputs
4456 `(("python-olefile" ,python-olefile)))
4457 (arguments
4458 `(#:phases
4459 (modify-phases %standard-phases
4460 (add-after 'unpack 'patch-ldconfig
4461 (lambda _
4462 (substitute* "setup.py"
4463 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4464 (replace 'check
4465 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
4466 (if tests?
4467 (begin
4468 (setenv "HOME" (getcwd))
4469 ;; Make installed package available for running the tests.
4470 (add-installed-pythonpath inputs outputs)
4471 (invoke "python" "selftest.py" "--installed")
4472 (invoke "python" "-m" "pytest" "-vv"))
4473 #t))))))
4474 (home-page "https://python-pillow.org")
4475 (synopsis "Fork of the Python Imaging Library")
4476 (description
4477 "The Python Imaging Library adds image processing capabilities to your
4478 Python interpreter. This library provides extensive file format support, an
4479 efficient internal representation, and fairly powerful image processing
4480 capabilities. The core image library is designed for fast access to data
4481 stored in a few basic pixel formats. It should provide a solid foundation for
4482 a general image processing tool.")
4483 (license (license:x11-style
4484 "http://www.pythonware.com/products/pil/license.htm"
4485 "The PIL Software License"))))
4486
4487 (define-public python2-pillow
4488 (package-with-python2 python-pillow))
4489
4490 (define-public python-pycparser
4491 (package
4492 (name "python-pycparser")
4493 (version "2.19")
4494 (source
4495 (origin
4496 (method url-fetch)
4497 (uri (pypi-uri "pycparser" version))
4498 (sha256
4499 (base32
4500 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
4501 (outputs '("out" "doc"))
4502 (build-system python-build-system)
4503 (native-inputs
4504 `(("pkg-config" ,pkg-config)))
4505 (arguments
4506 `(#:phases
4507 (modify-phases %standard-phases
4508 (replace 'check
4509 (lambda _
4510 (with-directory-excursion "tests"
4511 (invoke "python" "all_tests.py"))
4512 #t))
4513 (add-after 'install 'install-doc
4514 (lambda* (#:key outputs #:allow-other-keys)
4515 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4516 (doc (string-append data "/doc/" ,name "-" ,version))
4517 (examples (string-append doc "/examples")))
4518 (mkdir-p examples)
4519 (for-each (lambda (file)
4520 (copy-file (string-append "." file)
4521 (string-append doc file)))
4522 '("/README.rst" "/CHANGES" "/LICENSE"))
4523 (copy-recursively "examples" examples)
4524 #t))))))
4525 (home-page "https://github.com/eliben/pycparser")
4526 (synopsis "C parser in Python")
4527 (description
4528 "Pycparser is a complete parser of the C language, written in pure Python
4529 using the PLY parsing library. It parses C code into an AST and can serve as
4530 a front-end for C compilers or analysis tools.")
4531 (license license:bsd-3)))
4532
4533 (define-public python2-pycparser
4534 (package-with-python2 python-pycparser))
4535
4536 (define-public python-pywavelets
4537 (package
4538 (name "python-pywavelets")
4539 (version "1.0.1")
4540 (home-page "https://github.com/PyWavelets/pywt")
4541 (source (origin
4542 (method url-fetch)
4543 (uri (pypi-uri "PyWavelets" version))
4544 (sha256
4545 (base32
4546 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4547 (build-system python-build-system)
4548 (arguments
4549 '(#:modules ((ice-9 ftw)
4550 (srfi srfi-1)
4551 (srfi srfi-26)
4552 (guix build utils)
4553 (guix build python-build-system))
4554 #:phases (modify-phases %standard-phases
4555 (replace 'check
4556 (lambda _
4557 (let ((cwd (getcwd))
4558 (libdir (find (cut string-prefix? "lib." <>)
4559 (scandir "build"))))
4560 (with-directory-excursion (string-append cwd "/build/" libdir)
4561 (invoke "nosetests" "-v" "."))))))))
4562 (native-inputs
4563 `(("python-matplotlib" ,python-matplotlib) ;for tests
4564 ("python-nose" ,python-nose)))
4565 (propagated-inputs
4566 `(("python-numpy" ,python-numpy)))
4567 (synopsis "Wavelet transforms in Python")
4568 (description
4569 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4570 mathematical basis functions that are localized in both time and frequency.
4571 Wavelet transforms are time-frequency transforms employing wavelets. They are
4572 similar to Fourier transforms, the difference being that Fourier transforms are
4573 localized only in frequency instead of in time and frequency.")
4574 (license license:expat)))
4575
4576 (define-public python2-pywavelets
4577 (package-with-python2 python-pywavelets))
4578
4579 (define-public python-xcffib
4580 (package
4581 (name "python-xcffib")
4582 (version "0.6.0")
4583 (source
4584 (origin
4585 (method url-fetch)
4586 (uri (pypi-uri "xcffib" version))
4587 (sha256
4588 (base32
4589 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4590 (build-system python-build-system)
4591 (inputs
4592 `(("libxcb" ,libxcb)))
4593 (propagated-inputs
4594 `(("python-cffi" ,python-cffi) ; used at run time
4595 ("python-six" ,python-six)))
4596 (arguments
4597 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4598 #:tests? #f
4599 #:phases
4600 (modify-phases %standard-phases
4601 (add-after 'unpack 'fix-libxcb-path
4602 (lambda* (#:key inputs #:allow-other-keys)
4603 (let ((libxcb (assoc-ref inputs "libxcb")))
4604 (substitute* '("xcffib/__init__.py")
4605 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4606 #t)))
4607 (add-after 'install 'install-doc
4608 (lambda* (#:key outputs #:allow-other-keys)
4609 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4610 "/doc/" ,name "-" ,version)))
4611 (mkdir-p doc)
4612 (copy-file "README.md"
4613 (string-append doc "/README.md"))
4614 #t))))))
4615 (home-page "https://github.com/tych0/xcffib")
4616 (synopsis "XCB Python bindings")
4617 (description
4618 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4619 support for Python 3 and PyPy. It is based on cffi.")
4620 (license license:expat)))
4621
4622 (define-public python2-xcffib
4623 (package-with-python2 python-xcffib))
4624
4625 (define-public python-cairocffi
4626 (package
4627 (name "python-cairocffi")
4628 (version "0.9.0")
4629 (source
4630 (origin
4631 (method url-fetch)
4632 (uri (pypi-uri "cairocffi" version))
4633 (sha256
4634 (base32
4635 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4636 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4637 (build-system python-build-system)
4638 (outputs '("out" "doc"))
4639 (inputs
4640 `(("glib" ,glib)
4641 ("gtk+" ,gtk+)
4642 ("gdk-pixbuf" ,gdk-pixbuf)
4643 ("cairo" ,cairo)
4644 ("pango" ,pango)))
4645 (native-inputs
4646 `(("pkg-config" ,pkg-config)
4647 ("python-pytest" ,python-pytest)
4648 ("python-pytest-cov" ,python-pytest-cov)
4649 ("python-pytest-runner" ,python-pytest-runner)
4650 ("python-sphinx" ,python-sphinx)
4651 ("python-docutils" ,python-docutils)))
4652 (propagated-inputs
4653 `(("python-xcffib" ,python-xcffib))) ; used at run time
4654 (arguments
4655 `(#:phases
4656 (modify-phases %standard-phases
4657 (add-after 'unpack 'patch-paths
4658 (lambda* (#:key inputs outputs #:allow-other-keys)
4659 (substitute* (find-files "." "\\.py$")
4660 (("dlopen\\(ffi, 'cairo'")
4661 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4662 "/lib/libcairo.so.2'"))
4663 (("dlopen\\(ffi, 'gdk-3'")
4664 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4665 "/lib/libgtk-3.so.0'"))
4666 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4667 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4668 "/lib/libgdk_pixbuf-2.0.so.0'"))
4669 (("dlopen\\(ffi, 'glib-2.0'")
4670 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4671 "/lib/libglib-2.0.so.0'"))
4672 (("dlopen\\(ffi, 'gobject-2.0'")
4673 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4674 "/lib/libgobject-2.0.so.0'"))
4675 (("dlopen\\(ffi, 'pangocairo-1.0'")
4676 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4677 "/lib/libpangocairo-1.0.so.0'"))
4678 (("dlopen\\(ffi, 'pango-1.0'")
4679 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4680 "/lib/libpango-1.0.so.0'")))
4681 #t))
4682 (add-after 'install 'install-doc
4683 (lambda* (#:key inputs outputs #:allow-other-keys)
4684 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4685 (doc (string-append data "/doc/" ,name "-" ,version))
4686 (html (string-append doc "/html")))
4687 (setenv "LD_LIBRARY_PATH"
4688 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4689 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4690 (setenv "LANG" "en_US.UTF-8")
4691 (mkdir-p html)
4692 (for-each (lambda (file)
4693 (copy-file (string-append "." file)
4694 (string-append doc file)))
4695 '("/README.rst" "/CHANGES" "/LICENSE"))
4696 (system* "python" "setup.py" "build_sphinx")
4697 (copy-recursively "docs/_build/html" html)
4698 #t))))))
4699 (home-page "https://github.com/Kozea/cairocffi")
4700 (synopsis "Python bindings and object-oriented API for Cairo")
4701 (description
4702 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4703 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4704 graphics library with support for multiple backends including image buffers,
4705 PNG, PostScript, PDF, and SVG file output.")
4706 (license license:bsd-3)))
4707
4708 (define-public python2-cairocffi
4709 (package-with-python2 python-cairocffi))
4710
4711 (define-public python-decorator
4712 (package
4713 (name "python-decorator")
4714 (version "4.3.0")
4715 (source
4716 (origin
4717 (method url-fetch)
4718 (uri (pypi-uri "decorator" version))
4719 (sha256
4720 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4721 (build-system python-build-system)
4722 (home-page "https://pypi.python.org/pypi/decorator/")
4723 (synopsis "Python module to simplify usage of decorators")
4724 (description
4725 "The aim of the decorator module is to simplify the usage of decorators
4726 for the average programmer, and to popularize decorators usage giving examples
4727 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4728 etc. The core of this module is a decorator factory.")
4729 (license license:expat)))
4730
4731 (define-public python2-decorator
4732 (package-with-python2 python-decorator))
4733
4734 (define-public python-drmaa
4735 (package
4736 (name "python-drmaa")
4737 (version "0.7.7")
4738 (source
4739 (origin
4740 (method url-fetch)
4741 (uri (pypi-uri "drmaa" version))
4742 (sha256
4743 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4744 (build-system python-build-system)
4745 ;; The test suite requires libdrmaa which is provided by the cluster
4746 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4747 ;; should be set to the path of the libdrmaa library.
4748 (arguments '(#:tests? #f))
4749 (native-inputs
4750 `(("python-nose" ,python-nose)))
4751 (home-page "https://pypi.python.org/pypi/drmaa")
4752 (synopsis "Python bindings for the DRMAA library")
4753 (description
4754 "A Python package for Distributed Resource Management (DRM) job
4755 submission and control. This package is an implementation of the DRMAA 1.0
4756 Python language binding specification.")
4757 (license license:bsd-3)))
4758
4759 (define-public python2-drmaa
4760 (package-with-python2 python-drmaa))
4761
4762 (define-public python-grako
4763 (package
4764 (name "python-grako")
4765 (version "3.99.9")
4766 (source
4767 (origin
4768 (method url-fetch)
4769 (uri
4770 (pypi-uri "grako" version ".zip"))
4771 (sha256
4772 (base32
4773 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4774 (build-system python-build-system)
4775 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4776 (native-inputs
4777 `(("unzip" ,unzip)
4778 ("python-pytest" ,python-pytest)
4779 ("python-pytest-runner" ,python-pytest-runner)))
4780 (home-page "https://bitbucket.org/neogeny/grako")
4781 (synopsis "EBNF parser generator")
4782 (description
4783 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4784 memoizing PEG/Packrat parser in Python.")
4785 (license license:bsd-3)))
4786
4787 (define-public python2-grako
4788 (package-with-python2 python-grako))
4789
4790 (define-public python-gridmap
4791 (package
4792 (name "python-gridmap")
4793 (version "0.13.0")
4794 (source
4795 (origin
4796 (method git-fetch)
4797 (uri (git-reference
4798 (url "https://github.com/pygridtools/gridmap.git")
4799 (commit (string-append "v" version))))
4800 (file-name (git-file-name name version))
4801 (sha256
4802 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
4803 (build-system python-build-system)
4804 (arguments
4805 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4806 (propagated-inputs
4807 `(("python-psutil" ,python-psutil)
4808 ("python-drmaa" ,python-drmaa)
4809 ("python-pyzmq" ,python-pyzmq)))
4810 (home-page "https://github.com/pygridtools/gridmap")
4811 (synopsis "Create jobs on a cluster directly from Python")
4812 (description
4813 "Gridmap is a Python package to allow you to easily create jobs on the
4814 cluster directly from Python. You can directly map Python functions onto the
4815 cluster without needing to write any wrapper code yourself.")
4816 (license license:gpl3+)))
4817
4818 (define-public python2-gridmap
4819 (package-with-python2 python-gridmap))
4820
4821 (define-public python-honcho
4822 (package
4823 (name "python-honcho")
4824 (version "1.0.1")
4825 (source
4826 (origin
4827 (method git-fetch)
4828 (uri (git-reference
4829 (url "https://github.com/nickstenning/honcho.git")
4830 (commit (string-append "v" version))))
4831 (file-name (git-file-name name version))
4832 (sha256
4833 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
4834 (build-system python-build-system)
4835 (native-inputs
4836 `(("python-pytest" ,python-pytest)
4837 ("python-mock" ,python-mock)
4838 ("python-tox" ,python-tox)
4839 ("which" ,which))) ;for tests
4840 (propagated-inputs
4841 `(("python-jinja2" ,python-jinja2)))
4842 (arguments
4843 `(#:phases
4844 (modify-phases %standard-phases
4845 (delete 'check)
4846 (add-after 'install 'check
4847 (lambda* (#:key outputs inputs #:allow-other-keys)
4848 ;; fix honcho path in testsuite
4849 (substitute* "tests/conftest.py"
4850 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4851 "/bin/honcho" "'")))
4852 ;; It's easier to run tests after install.
4853 ;; Make installed package available for running the tests
4854 (add-installed-pythonpath inputs outputs)
4855 (invoke "py.test" "-v"))))))
4856 (home-page "https://github.com/nickstenning/honcho")
4857 (synopsis "Manage Procfile-based applications")
4858 (description
4859 "A Procfile is a file which describes how to run an application
4860 consisting of several processes. honcho starts all listed processes.
4861 The output of all running processes is collected by honcho and
4862 displayed.")
4863 (license license:expat)))
4864
4865 (define-public python2-honcho
4866 (package-with-python2 python-honcho))
4867
4868 (define-public python-pexpect
4869 (package
4870 (name "python-pexpect")
4871 (version "4.6.0")
4872 (source
4873 (origin
4874 (method url-fetch)
4875 (uri (pypi-uri "pexpect" version))
4876 (sha256
4877 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4878 (build-system python-build-system)
4879 (arguments
4880 `(#:phases
4881 (modify-phases %standard-phases
4882 (add-before 'check 'prepare-tests
4883 (lambda _
4884 (substitute* (find-files "tests")
4885 (("/bin/ls") (which "ls"))
4886 (("/bin/echo") (which "echo"))
4887 (("/bin/which") (which "which"))
4888 ;; Many tests try to use the /bin directory which
4889 ;; is not present in the build environment.
4890 ;; Use one that's non-empty and unlikely to change.
4891 (("/bin'") "/dev'"))
4892 ;; XXX: Socket connection test gets "Connection reset by peer".
4893 ;; Why does it not work? Delete for now.
4894 (delete-file "tests/test_socket.py")
4895 #t))
4896 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4897 (native-inputs
4898 `(("python-nose" ,python-nose)
4899 ("python-pytest" ,python-pytest)
4900 ("man-db" ,man-db)
4901 ("which" ,which)
4902 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4903 (propagated-inputs
4904 `(("python-ptyprocess" ,python-ptyprocess)))
4905 (home-page "http://pexpect.readthedocs.org/")
4906 (synopsis "Controlling interactive console applications")
4907 (description
4908 "Pexpect is a pure Python module for spawning child applications;
4909 controlling them; and responding to expected patterns in their output.
4910 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4911 child application and control it as if a human were typing commands.")
4912 (license license:isc)))
4913
4914 (define-public python2-pexpect
4915 (package-with-python2 python-pexpect))
4916
4917 (define-public python-setuptools-scm
4918 (package
4919 (name "python-setuptools-scm")
4920 (version "3.2.0")
4921 (source (origin
4922 (method url-fetch)
4923 (uri (pypi-uri "setuptools_scm" version))
4924 (sha256
4925 (base32
4926 "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj"))))
4927 (build-system python-build-system)
4928 (home-page "https://github.com/pypa/setuptools_scm/")
4929 (synopsis "Manage Python package versions in SCM metadata")
4930 (description
4931 "Setuptools_scm handles managing your Python package versions in
4932 @dfn{software configuration management} (SCM) metadata instead of declaring
4933 them as the version argument or in a SCM managed file.")
4934 (license license:expat)))
4935
4936 ;; Needed by python-lazy-object-proxy, remove on next update cycle.
4937 (define-public python-setuptools-scm-3.3
4938 (package
4939 (inherit python-setuptools-scm)
4940 (version "3.3.3")
4941 (source (origin
4942 (method url-fetch)
4943 (uri (pypi-uri "setuptools_scm" version))
4944 (sha256
4945 (base32
4946 "19cyndx23xmpbhz4qrwmfwsmnnaczd0dw7qg977ksq2dbvxy29dx"))))))
4947
4948 (define-public python2-setuptools-scm
4949 (package-with-python2 python-setuptools-scm))
4950
4951 (define-public python-pathlib2
4952 (package
4953 (name "python-pathlib2")
4954 (version "2.3.3")
4955 (source
4956 (origin
4957 (method url-fetch)
4958 (uri (pypi-uri "pathlib2" version))
4959 (sha256
4960 (base32
4961 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
4962 (build-system python-build-system)
4963 (propagated-inputs
4964 `(("python-scandir" ,python-scandir)
4965 ("python-six" ,python-six)))
4966 (home-page "https://pypi.python.org/pypi/pathlib2/")
4967 (synopsis "Object-oriented file system paths")
4968 (description "The goal of pathlib2 is to provide a backport of the
4969 standard @code{pathlib} module which tracks the standard library module, so
4970 all the newest features of the standard @code{pathlib} can be used also on
4971 older Python versions.")
4972 (license license:expat)))
4973
4974 (define-public python-importlib-metadata
4975 (package
4976 (name "python-importlib-metadata")
4977 (version "0.23")
4978 (source
4979 (origin
4980 (method url-fetch)
4981 (uri (pypi-uri "importlib_metadata" version))
4982 (sha256
4983 (base32 "09mdqdfv5rdrwz80jh9m379gxmvk2vhjfz0fg53hid00icvxf65a"))))
4984 (build-system python-build-system)
4985 (propagated-inputs
4986 `(("python-configparser" ,python-configparser)
4987 ("python-contextlib2" ,python-contextlib2)
4988 ("python-docutils" ,python-docutils)
4989 ("python-pathlib2" ,python-pathlib2)
4990 ("python-rst.linker" ,python-rst.linker)
4991 ("python-zipp" ,python-zipp)))
4992 (native-inputs
4993 `(("python-setuptools-scm" ,python-setuptools-scm)
4994 ("python-sphinx" ,python-sphinx)))
4995 (home-page "https://importlib-metadata.readthedocs.io/")
4996 (synopsis "Read metadata from Python packages")
4997 (description
4998 "@code{importlib_metadata} is a library which provides an API for
4999 accessing an installed Python package's metadata, such as its entry points or
5000 its top-level name. This functionality intends to replace most uses of
5001 @code{pkg_resources} entry point API and metadata API. Along with
5002 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
5003 need to use the older and less efficient @code{pkg_resources} package.")
5004 (license license:asl2.0)))
5005
5006 (define-public python-jaraco-packaging
5007 (package
5008 (name "python-jaraco-packaging")
5009 (version "6.1")
5010 (source
5011 (origin
5012 (method url-fetch)
5013 (uri (pypi-uri "jaraco.packaging" version))
5014 (sha256
5015 (base32
5016 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
5017 (build-system python-build-system)
5018 (propagated-inputs
5019 `(("python-pytest" ,python-pytest)
5020 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
5021 ("python-pytest-flake8" ,python-pytest-flake8)
5022 ("python-rst.linker" ,python-rst.linker)
5023 ("python-setuptools" ,python-setuptools)
5024 ("python-setuptools-scm" ,python-setuptools-scm)
5025 ("python-six" ,python-six)
5026 ("python-sphinx" ,python-sphinx)))
5027 (home-page "https://github.com/jaraco/jaraco.packaging")
5028 (synopsis "Tools to supplement packaging Python releases")
5029 (description
5030 "This package provides various tools to supplement packaging Python
5031 releases.")
5032 (license license:expat)))
5033
5034 (define-public python-pathpy
5035 (package
5036 (name "python-pathpy")
5037 (version "11.5.1")
5038 (source
5039 (origin
5040 (method url-fetch)
5041 (uri (pypi-uri "path.py" version))
5042 (sha256
5043 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
5044 (outputs '("out" "doc"))
5045 (build-system python-build-system)
5046 (propagated-inputs
5047 `(("python-appdirs" ,python-appdirs)
5048 ("python-importlib-metadata" ,python-importlib-metadata)))
5049 (native-inputs
5050 `(("python-setuptools-scm" ,python-setuptools-scm)
5051 ("python-sphinx" ,python-sphinx)
5052 ("python-rst.linker" ,python-rst.linker)
5053 ("python-pytest" ,python-pytest)
5054 ("python-pytest-runner" ,python-pytest-runner)
5055 ("python-jaraco-packaging" ,python-jaraco-packaging)))
5056 (arguments
5057 `(#:phases
5058 (modify-phases %standard-phases
5059 (add-after 'build 'build-doc
5060 (lambda _
5061 (setenv "LANG" "en_US.UTF-8")
5062 (invoke "python" "setup.py" "build_sphinx")))
5063 (add-after 'install 'install-doc
5064 (lambda* (#:key outputs #:allow-other-keys)
5065 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5066 (doc (string-append data "/doc/" ,name "-" ,version))
5067 (html (string-append doc "/html")))
5068 (mkdir-p html)
5069 (for-each (lambda (file)
5070 (copy-file file (string-append doc "/" file)))
5071 '("README.rst" "CHANGES.rst"))
5072 (copy-recursively "build/sphinx/html" html)
5073 #t)))
5074 (replace 'check
5075 (lambda _
5076 ;; The import time test aborts if an import takes longer than
5077 ;; 100ms. It may very well take a little longer than that.
5078 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
5079 (home-page "https://github.com/jaraco/path.py")
5080 (synopsis "Python module wrapper for built-in os.path")
5081 (description
5082 "@code{path.py} implements path objects as first-class entities, allowing
5083 common operations on files to be invoked on those path objects directly.")
5084 (license license:expat)))
5085
5086 (define-public python2-pathpy
5087 (package-with-python2 python-pathpy))
5088
5089 (define-public python-simplegeneric
5090 (package
5091 (name "python-simplegeneric")
5092 (version "0.8.1")
5093 (source
5094 (origin
5095 (method url-fetch)
5096 (uri (pypi-uri "simplegeneric" version ".zip"))
5097 (sha256
5098 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5099 (build-system python-build-system)
5100 (native-inputs
5101 `(("unzip" ,unzip)))
5102 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5103 (synopsis "Python module for simple generic functions")
5104 (description
5105 "The simplegeneric module lets you define simple single-dispatch generic
5106 functions, akin to Python’s built-in generic functions like @code{len()},
5107 @code{iter()} and so on. However, instead of using specially-named methods,
5108 these generic functions use simple lookup tables, akin to those used by
5109 e.g. @code{pickle.dump()} and other generic functions found in the Python
5110 standard library.")
5111 (license license:zpl2.1)))
5112
5113 (define-public python2-simplegeneric
5114 (package-with-python2 python-simplegeneric))
5115
5116 (define-public python-ipython-genutils
5117 ;; TODO: This package is retired, check if can be removed, see description.
5118 (package
5119 (name "python-ipython-genutils")
5120 (version "0.1.0")
5121 (source
5122 (origin
5123 (method url-fetch)
5124 (uri (pypi-uri "ipython_genutils" version))
5125 (sha256
5126 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5127 (build-system python-build-system)
5128 (arguments `(#:tests? #f)) ; no tests
5129 (home-page "https://ipython.org")
5130 (synopsis "Vestigial utilities from IPython")
5131 (description
5132 "This package provides retired utilities from IPython. No packages
5133 outside IPython/Jupyter should depend on it.
5134
5135 This package shouldn't exist. It contains some common utilities shared by
5136 Jupyter and IPython projects during The Big Split. As soon as possible, those
5137 packages will remove their dependency on this, and this package will go
5138 away.")
5139 (license license:bsd-3)))
5140
5141 (define-public python2-ipython-genutils
5142 (package-with-python2 python-ipython-genutils))
5143
5144 (define-public python-traitlets
5145 (package
5146 (name "python-traitlets")
5147 (version "4.3.3")
5148 (source
5149 (origin
5150 (method url-fetch)
5151 (uri (pypi-uri "traitlets" version))
5152 (sha256
5153 (base32
5154 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
5155 (build-system python-build-system)
5156 (arguments
5157 `(#:phases
5158 (modify-phases %standard-phases
5159 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5160 (propagated-inputs
5161 `(("python-ipython-genutils" ,python-ipython-genutils)
5162 ("python-decorator" ,python-decorator)))
5163 (native-inputs
5164 `(("python-pytest" ,python-pytest)))
5165 (properties `((python2-variant . ,(delay python2-traitlets))))
5166 (home-page "https://ipython.org")
5167 (synopsis "Configuration system for Python applications")
5168 (description
5169 "Traitlets is a framework that lets Python classes have attributes with
5170 type checking, dynamically calculated default values, and ‘on change’
5171 callbacks. The package also includes a mechanism to use traitlets for
5172 configuration, loading values from files or from command line arguments. This
5173 is a distinct layer on top of traitlets, so you can use traitlets in your code
5174 without using the configuration machinery.")
5175 (license license:bsd-3)))
5176
5177 (define-public python2-traitlets
5178 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5179 (package
5180 (inherit traitlets)
5181 (propagated-inputs
5182 `(("python2-enum34" ,python2-enum34)
5183 ,@(package-propagated-inputs traitlets))))))
5184
5185 (define-public python-jupyter-core
5186 (package
5187 (name "python-jupyter-core")
5188 (version "4.4.0")
5189 (source
5190 (origin
5191 (method url-fetch)
5192 (uri (string-append (pypi-uri "jupyter_core" version)))
5193 (sha256
5194 (base32
5195 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5196 (build-system python-build-system)
5197 ;; FIXME: not sure how to run the tests
5198 (arguments `(#:tests? #f))
5199 (propagated-inputs
5200 `(("python-traitlets" ,python-traitlets)))
5201 (home-page "http://jupyter.org/")
5202 (synopsis "Jupyter base package")
5203 (description
5204 "Jupyter core is the base package on which Jupyter projects rely.")
5205 (license license:bsd-3)))
5206
5207 (define-public python2-jupyter-core
5208 (package-with-python2 python-jupyter-core))
5209
5210 (define-public python-jupyter-client
5211 (package
5212 (name "python-jupyter-client")
5213 (version "5.2.4")
5214 (source
5215 (origin
5216 (method url-fetch)
5217 (uri (pypi-uri "jupyter_client" version))
5218 (sha256
5219 (base32
5220 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5221 (build-system python-build-system)
5222 ;; Tests fail because of missing native python kernel which I assume is
5223 ;; provided by the ipython package, which we cannot use because it would
5224 ;; cause a dependency cycle.
5225 (arguments
5226 `(#:tests? #f
5227
5228 #:phases (modify-phases %standard-phases
5229 (add-after 'unpack 'set-tool-file-names
5230 (lambda* (#:key inputs #:allow-other-keys)
5231 (let ((iproute (assoc-ref inputs "iproute")))
5232 (substitute* "jupyter_client/localinterfaces.py"
5233 (("'ip'")
5234 (string-append "'" iproute "/sbin/ip'")))
5235 #t))))))
5236 (inputs
5237 `(("iproute" ,iproute)))
5238 (propagated-inputs
5239 `(("python-pyzmq" ,python-pyzmq)
5240 ("python-traitlets" ,python-traitlets)
5241 ("python-jupyter-core" ,python-jupyter-core)))
5242 (home-page "http://jupyter.org/")
5243 (synopsis "Jupyter protocol implementation and client libraries")
5244 (description
5245 "The @code{jupyter_client} package contains the reference implementation
5246 of the Jupyter protocol. It also provides client and kernel management APIs
5247 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5248 installing @code{kernelspec}s for use with Jupyter frontends.")
5249 (license license:bsd-3)))
5250
5251 (define-public python2-jupyter-client
5252 (package-with-python2 python-jupyter-client))
5253
5254 (define-public python-ipykernel
5255 (package
5256 (name "python-ipykernel")
5257 (version "5.1.3")
5258 (source
5259 (origin
5260 (method url-fetch)
5261 (uri (pypi-uri "ipykernel" version))
5262 (sha256
5263 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
5264 (build-system python-build-system)
5265 (arguments
5266 `(#:phases
5267 (modify-phases %standard-phases
5268 (replace 'check
5269 (lambda _
5270 (setenv "HOME" "/tmp")
5271 (invoke "pytest" "-v")
5272 #t))
5273 (add-after 'install 'set-python-file-name
5274 (lambda* (#:key outputs #:allow-other-keys)
5275 ;; Record the absolute file name of the 'python' executable in
5276 ;; 'kernel.json'.
5277 (let ((out (assoc-ref outputs "out")))
5278 (substitute* (string-append out "/share/jupyter"
5279 "/kernels/python3/kernel.json")
5280 (("\"python\"")
5281 (string-append "\"" (which "python") "\"")))
5282 #t))))))
5283 (propagated-inputs
5284 `(("python-ipython" ,python-ipython)
5285 ;; imported at runtime during connect
5286 ("python-jupyter-client" ,python-jupyter-client)))
5287 (native-inputs
5288 `(("python-flaky" ,python-flaky)
5289 ("python-nose" ,python-nose)
5290 ("python-pytest" ,python-pytest)))
5291 (home-page "https://ipython.org")
5292 (synopsis "IPython Kernel for Jupyter")
5293 (description
5294 "This package provides the IPython kernel for Jupyter.")
5295 (license license:bsd-3)))
5296
5297 ;; Version 5.1.1 and above no longer support Python 2.
5298 (define-public python2-ipykernel
5299 (package
5300 (name "python2-ipykernel")
5301 (version "5.1.0")
5302 (source
5303 (origin
5304 (method url-fetch)
5305 (uri (pypi-uri "ipykernel" version))
5306 (sha256
5307 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5308 (build-system python-build-system)
5309 (arguments
5310 `(#:python ,python-2
5311 #:phases
5312 (modify-phases %standard-phases
5313 (replace 'check
5314 (lambda _
5315 (setenv "HOME" "/tmp")
5316 (invoke "pytest" "-v")
5317 #t)))))
5318 (propagated-inputs
5319 `(("python2-ipython" ,python2-ipython)
5320 ;; imported at runtime during connect
5321 ("python2-jupyter-client" ,python2-jupyter-client)))
5322 (native-inputs
5323 `(("python2-pytest" ,python2-pytest)
5324 ("python2-nose" ,python2-nose)))
5325 (home-page "https://ipython.org")
5326 (synopsis "IPython Kernel for Jupyter")
5327 (description
5328 "This package provides the IPython kernel for Jupyter.")
5329 (license license:bsd-3)))
5330
5331 (define-public python-pari-jupyter
5332 (package
5333 (name "python-pari-jupyter")
5334 (version "1.3.2")
5335 (source
5336 (origin
5337 (method url-fetch)
5338 (uri (pypi-uri "pari_jupyter" version))
5339 (sha256
5340 (base32
5341 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5342 (build-system python-build-system)
5343 (propagated-inputs
5344 `(("python-ipykernel" ,python-ipykernel)))
5345 (inputs
5346 `(("pari-gp" ,pari-gp)
5347 ("readline" ,readline)))
5348 (arguments
5349 `(#:tests? #f)) ; no test suite
5350 (home-page
5351 "https://github.com/jdemeyer/pari_jupyter")
5352 (synopsis "A Jupyter kernel for PARI/GP")
5353 (description "The package provides a PARI/GP kernel for Jupyter.")
5354 (license license:gpl3+)))
5355
5356 (define-public python-backcall
5357 (package
5358 (name "python-backcall")
5359 (version "0.1.0")
5360 (source
5361 (origin
5362 (method url-fetch)
5363 (uri (pypi-uri "backcall" version))
5364 (sha256
5365 (base32
5366 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5367 (build-system python-build-system)
5368 (home-page "https://github.com/takluyver/backcall/")
5369 (synopsis "Specifications for callback functions passed in to an API")
5370 (description
5371 "If your code lets other people supply callback functions, it's important
5372 to specify the function signature you expect, and check that functions support
5373 that. Adding extra parameters later would break other peoples code unless
5374 you're careful. The @code{backcall} package provides a way of specifying the
5375 callback signature using a prototype function.")
5376 (license license:bsd-3)))
5377
5378 ;; This is the latest release of the LTS version of ipython with support for
5379 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
5380 ;; dropped support for Python 2.7.
5381 (define-public python2-ipython
5382 (package
5383 (name "python2-ipython")
5384 (version "5.8.0")
5385 (source
5386 (origin
5387 (method url-fetch)
5388 (uri (pypi-uri "ipython" version ".tar.gz"))
5389 (sha256
5390 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5391 (build-system python-build-system)
5392 (propagated-inputs
5393 `(("python2-backports-shutil-get-terminal-size"
5394 ,python2-backports-shutil-get-terminal-size)
5395 ("python2-pathlib2" ,python2-pathlib2)
5396 ("python2-pyzmq" ,python2-pyzmq)
5397 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5398 ("python2-terminado" ,python2-terminado)
5399 ("python2-matplotlib" ,python2-matplotlib)
5400 ("python2-numpy" ,python2-numpy)
5401 ("python2-numpydoc" ,python2-numpydoc)
5402 ("python2-jinja2" ,python2-jinja2)
5403 ("python2-mistune" ,python2-mistune)
5404 ("python2-pexpect" ,python2-pexpect)
5405 ("python2-pickleshare" ,python2-pickleshare)
5406 ("python2-simplegeneric" ,python2-simplegeneric)
5407 ("python2-jsonschema" ,python2-jsonschema)
5408 ("python2-traitlets" ,python2-traitlets)
5409 ("python2-nbformat" ,python2-nbformat)
5410 ("python2-pygments" ,python2-pygments)))
5411 (inputs
5412 `(("readline" ,readline)
5413 ("which" ,which)))
5414 (native-inputs
5415 `(("graphviz" ,graphviz)
5416 ("pkg-config" ,pkg-config)
5417 ("python2-requests" ,python2-requests) ;; for tests
5418 ("python2-testpath" ,python2-testpath)
5419 ("python2-mock" ,python2-mock)
5420 ("python2-nose" ,python2-nose)))
5421 (arguments
5422 `(#:python ,python-2
5423 #:phases
5424 (modify-phases %standard-phases
5425 (add-before 'check 'delete-broken-tests
5426 (lambda* (#:key inputs #:allow-other-keys)
5427 ;; These tests throw errors for unknown reasons.
5428 (delete-file "IPython/core/tests/test_profile.py")
5429 (delete-file "IPython/core/tests/test_interactiveshell.py")
5430 (delete-file "IPython/core/tests/test_magic.py")
5431 #t)))))
5432 (home-page "https://ipython.org")
5433 (synopsis "IPython is a tool for interactive computing in Python")
5434 (description
5435 "IPython provides a rich architecture for interactive computing with:
5436 Powerful interactive shells, a browser-based notebook, support for interactive
5437 data visualization, embeddable interpreters and tools for parallel
5438 computing.")
5439 (license license:bsd-3)))
5440
5441 (define-public python-ipython
5442 (package
5443 (name "python-ipython")
5444 (version "7.9.0")
5445 (source
5446 (origin
5447 (method url-fetch)
5448 (uri (pypi-uri "ipython" version ".tar.gz"))
5449 (sha256
5450 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
5451 (build-system python-build-system)
5452 (propagated-inputs
5453 `(("python-backcall" ,python-backcall)
5454 ("python-pyzmq" ,python-pyzmq)
5455 ("python-prompt-toolkit" ,python-prompt-toolkit)
5456 ("python-terminado" ,python-terminado)
5457 ("python-matplotlib" ,python-matplotlib)
5458 ("python-numpy" ,python-numpy)
5459 ("python-numpydoc" ,python-numpydoc)
5460 ("python-jedi" ,python-jedi)
5461 ("python-jinja2" ,python-jinja2)
5462 ("python-mistune" ,python-mistune)
5463 ("python-pexpect" ,python-pexpect)
5464 ("python-pickleshare" ,python-pickleshare)
5465 ("python-simplegeneric" ,python-simplegeneric)
5466 ("python-jsonschema" ,python-jsonschema)
5467 ("python-traitlets" ,python-traitlets)
5468 ("python-nbformat" ,python-nbformat)
5469 ("python-pygments" ,python-pygments)))
5470 (inputs
5471 `(("readline" ,readline)
5472 ("which" ,which)))
5473 (native-inputs
5474 `(("graphviz" ,graphviz)
5475 ("pkg-config" ,pkg-config)
5476 ("python-requests" ,python-requests) ;; for tests
5477 ("python-testpath" ,python-testpath)
5478 ("python-nose" ,python-nose)))
5479 (arguments
5480 `(#:phases
5481 (modify-phases %standard-phases
5482 (add-after 'unpack 'make-docs-reproducible
5483 (lambda _
5484 (substitute* "IPython/sphinxext/ipython_directive.py"
5485 ((".*import datetime") "")
5486 ((".*datetime.datetime.now\\(\\)") "")
5487 (("%timeit") "# %timeit"))
5488 #t))
5489 ;; Tests can only be run after the library has been installed and not
5490 ;; within the source directory.
5491 (delete 'check)
5492 (add-after 'install 'check
5493 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5494 (if tests?
5495 (begin
5496 ;; Make installed package available for running the tests
5497 (add-installed-pythonpath inputs outputs)
5498 (setenv "HOME" "/tmp/") ;; required by a test
5499 ;; We only test the core because one of the other tests
5500 ;; tries to import ipykernel.
5501 (invoke "python" "IPython/testing/iptest.py"
5502 "-v" "IPython/core/tests"))
5503 #t)))
5504 (add-before 'check 'fix-tests
5505 (lambda* (#:key inputs #:allow-other-keys)
5506 (substitute* "./IPython/utils/_process_posix.py"
5507 (("/usr/bin/env', 'which") (which "which")))
5508 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5509 (("#!/usr/bin/env python")
5510 (string-append "#!" (which "python"))))
5511 ;; This test introduces a circular dependency on ipykernel
5512 ;; (which depends on ipython).
5513 (delete-file "IPython/core/tests/test_display.py")
5514 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
5515 (delete-file "IPython/core/tests/test_interactiveshell.py")
5516 #t)))))
5517 (home-page "https://ipython.org")
5518 (synopsis "IPython is a tool for interactive computing in Python")
5519 (description
5520 "IPython provides a rich architecture for interactive computing with:
5521 Powerful interactive shells, a browser-based notebook, support for interactive
5522 data visualization, embeddable interpreters and tools for parallel
5523 computing.")
5524 (license license:bsd-3)))
5525
5526 (define-public python-ipython-documentation
5527 (package
5528 (inherit python-ipython)
5529 (name "python-ipython-documentation")
5530 (version (package-version python-ipython))
5531 (arguments
5532 `(#:phases
5533 (modify-phases %standard-phases
5534 (delete 'build)
5535 (delete 'check)
5536 (replace 'install
5537 (lambda* (#:key outputs #:allow-other-keys)
5538 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5539 (doc (string-append data "/doc/" ,name "-" ,version))
5540 (html (string-append doc "/html"))
5541 (man1 (string-append data "/man/man1"))
5542 (info (string-append data "/info"))
5543 (examples (string-append doc "/examples"))
5544 (python-arg (string-append "PYTHON=" (which "python"))))
5545 (setenv "LANG" "en_US.utf8")
5546 (with-directory-excursion "docs"
5547 ;; FIXME: pdf fails to build
5548 ;;(system* "make" "pdf" "PAPER=a4")
5549 (system* "make" python-arg "html")
5550 ;; FIXME: the generated texi file contains ^@^@, which trips
5551 ;; up the parser.
5552 ;; (system* "make" python-arg "info")
5553 )
5554 (copy-recursively "docs/man" man1)
5555 (copy-recursively "examples" examples)
5556 (copy-recursively "docs/build/html" html)
5557 ;; (copy-file "docs/build/latex/ipython.pdf"
5558 ;; (string-append doc "/ipython.pdf"))
5559 (mkdir-p info)
5560 ;; (copy-file "docs/build/texinfo/ipython.info"
5561 ;; (string-append info "/ipython.info"))
5562 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5563 #t)))))
5564 (inputs
5565 `(("python-ipython" ,python-ipython)
5566 ("python-ipykernel" ,python-ipykernel)))
5567 (native-inputs
5568 `(("python-sphinx" ,python-sphinx)
5569 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
5570 ;; FIXME: It's possible that a smaller union would work just as well.
5571 ("texlive" ,(texlive-union (list texlive-amsfonts
5572 texlive-fonts-ec
5573 texlive-generic-ifxetex
5574 texlive-generic-pdftex
5575 texlive-latex-capt-of
5576 texlive-latex-cmap
5577 texlive-latex-environ
5578 texlive-latex-eqparbox
5579 texlive-latex-etoolbox
5580 texlive-latex-expdlist
5581 texlive-latex-fancyhdr
5582 texlive-latex-fancyvrb
5583 texlive-latex-fncychap
5584 texlive-latex-float
5585 texlive-latex-framed
5586 texlive-latex-geometry
5587 texlive-latex-graphics
5588 texlive-latex-hyperref
5589 texlive-latex-mdwtools
5590 texlive-latex-multirow
5591 texlive-latex-needspace
5592 texlive-latex-oberdiek
5593 texlive-latex-parskip
5594 texlive-latex-preview
5595 texlive-latex-tabulary
5596 texlive-latex-threeparttable
5597 texlive-latex-titlesec
5598 texlive-latex-trimspaces
5599 texlive-latex-ucs
5600 texlive-latex-upquote
5601 texlive-latex-url
5602 texlive-latex-varwidth
5603 texlive-latex-wrapfig)))
5604 ("texinfo" ,texinfo)))))
5605
5606 (define-public python-urwid
5607 (package
5608 (name "python-urwid")
5609 (version "2.0.1")
5610 (source
5611 (origin
5612 (method url-fetch)
5613 (uri (pypi-uri "urwid" version))
5614 (sha256
5615 (base32
5616 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5617 (build-system python-build-system)
5618 (home-page "http://urwid.org")
5619 (synopsis "Console user interface library for Python")
5620 (description
5621 "Urwid is a curses-based UI/widget library for Python. It includes many
5622 features useful for text console applications.")
5623 (license license:lgpl2.1+)))
5624
5625 (define-public python2-urwid
5626 (package-with-python2 python-urwid))
5627
5628 (define-public python-urwidtrees
5629 (package
5630 (name "python-urwidtrees")
5631 (version "1.0.2")
5632 (source
5633 (origin
5634 (method url-fetch)
5635 ;; package author intends on distributing via github rather than pypi:
5636 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5637 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5638 version ".tar.gz"))
5639 (file-name (string-append name "-" version ".tar.gz"))
5640 (sha256
5641 (base32
5642 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5643 (build-system python-build-system)
5644 (arguments
5645 '(#:tests? #f)) ; no tests
5646 (propagated-inputs `(("python-urwid" ,python-urwid)))
5647 (home-page "https://github.com/pazz/urwidtrees")
5648 (synopsis "Tree widgets for urwid")
5649 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5650 toolkit. Use it to build trees of widgets.")
5651 (license license:gpl3+)))
5652
5653 (define-public python2-urwidtrees
5654 (package-with-python2 python-urwidtrees))
5655
5656 (define-public python-ua-parser
5657 (package
5658 (name "python-ua-parser")
5659 (version "0.8.0")
5660 (source
5661 (origin
5662 (method url-fetch)
5663 (uri (pypi-uri "ua-parser" version))
5664 (sha256
5665 (base32
5666 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5667 (build-system python-build-system)
5668 (arguments
5669 `(#:tests? #f)) ;no test suite in release
5670 (native-inputs
5671 `(("python-pyyaml" ,python-pyyaml)))
5672 (home-page "https://github.com/ua-parser/uap-python")
5673 (synopsis "User agent parser")
5674 (description
5675 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5676 (license license:asl2.0)))
5677
5678 (define-public python2-ua-parser
5679 (package-with-python2 python-ua-parser))
5680
5681 (define-public python-user-agents
5682 (package
5683 (name "python-user-agents")
5684 (version "1.1.0")
5685 (source
5686 (origin
5687 (method url-fetch)
5688 (uri (pypi-uri "user-agents" version))
5689 (sha256
5690 (base32
5691 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5692 (build-system python-build-system)
5693 (arguments
5694 `(#:tests? #f)) ;missing devices.json test file in release
5695 (propagated-inputs
5696 `(("python-ua-parser" ,python-ua-parser)))
5697 (home-page "https://github.com/selwin/python-user-agents")
5698 (synopsis "User Agent strings parsing library")
5699 (description
5700 "A library to identify devices (phones, tablets) and their capabilities by
5701 parsing (browser/HTTP) user agent strings.")
5702 (license license:expat)))
5703
5704 (define-public python2-user-agents
5705 (package-with-python2 python-user-agents))
5706
5707 (define-public python-dbus
5708 (package
5709 (name "python-dbus")
5710 (version "1.2.14")
5711 (source
5712 (origin
5713 (method url-fetch)
5714 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5715 "dbus-python-" version ".tar.gz"))
5716 (sha256
5717 (base32 "0cdchkgnivlka4lf8q4qfk0yxq483i3r3aqickjf8hfn7nx0c0mi"))))
5718 (build-system gnu-build-system)
5719 (native-inputs
5720 `(("pkg-config" ,pkg-config)))
5721 (inputs
5722 `(("python" ,python-wrapper)
5723 ("dbus-glib" ,dbus-glib)))
5724 (synopsis "Python bindings for D-bus")
5725 (description "python-dbus provides bindings for libdbus, the reference
5726 implementation of D-Bus.")
5727 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5728 (license license:expat)))
5729
5730 (define-public python2-dbus
5731 (package (inherit python-dbus)
5732 (name "python2-dbus")
5733 (inputs `(("python" ,python-2)
5734 ,@(alist-delete "python"
5735 (package-inputs python-dbus)
5736 equal?)))))
5737
5738 (define-public python-notify2
5739 (package
5740 (name "python-notify2")
5741 (version "0.3.1")
5742 (source
5743 (origin
5744 (method url-fetch)
5745 (uri (pypi-uri "notify2" version))
5746 (sha256
5747 (base32
5748 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
5749 (build-system python-build-system)
5750 (arguments `(#:tests? #f)) ; tests depend on system state
5751 (native-inputs
5752 `(("python-dbus" ,python-dbus)))
5753 (home-page "https://bitbucket.org/takluyver/pynotify2")
5754 (synopsis "Python interface to D-Bus notifications")
5755 (description
5756 "Pynotify2 provides a Python interface for sending D-Bus notifications.
5757 It is a reimplementation of pynotify in pure Python, and an alternative to
5758 the GObject Introspection bindings to libnotify for non-GTK applications.")
5759 (license (list license:bsd-2
5760 license:lgpl2.1+))))
5761
5762 (define-public python2-notify2
5763 (package-with-python2 python-notify2))
5764
5765 (define-public python-lxml
5766 (package
5767 (name "python-lxml")
5768 (version "4.4.1")
5769 (source
5770 (origin
5771 (method url-fetch)
5772 (uri (pypi-uri "lxml" version))
5773 (sha256
5774 (base32
5775 "14jnpfcpgqr9sx8ppd286jzcbk0b36hbqsvd8jkvffipzw5v8768"))))
5776 (build-system python-build-system)
5777 (arguments
5778 `(#:phases (modify-phases %standard-phases
5779 (replace 'check
5780 (lambda _
5781 (invoke "make" "test"))))))
5782 (inputs
5783 `(("libxml2" ,libxml2)
5784 ("libxslt" ,libxslt)))
5785 (home-page "http://lxml.de/")
5786 (synopsis
5787 "Python XML processing library")
5788 (description
5789 "The lxml XML toolkit is a Pythonic binding for the C libraries
5790 libxml2 and libxslt.")
5791 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5792
5793 (define-public python2-lxml
5794 (package-with-python2 python-lxml))
5795
5796 ;; beautifulsoup4 has a totally different namespace than 3.x,
5797 ;; and pypi seems to put it under its own name, so I guess we should too
5798 (define-public python-beautifulsoup4
5799 (package
5800 (name "python-beautifulsoup4")
5801 (version "4.7.1")
5802 (source
5803 (origin
5804 (method url-fetch)
5805 (uri (pypi-uri "beautifulsoup4" version))
5806 (sha256
5807 (base32
5808 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
5809 (build-system python-build-system)
5810 (arguments
5811 `(#:phases
5812 (modify-phases %standard-phases
5813 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5814 ;; must use this conversion script when building with Python 3. The
5815 ;; conversion script also runs the tests.
5816 ;; For more information, see the file 'convert-py3k' in the source
5817 ;; distribution.
5818 (replace 'check
5819 (lambda _ (invoke "./convert-py3k"))))))
5820 (propagated-inputs
5821 `(("python-soupsieve" ,python-soupsieve)))
5822 (home-page
5823 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5824 (synopsis
5825 "Python screen-scraping library")
5826 (description
5827 "Beautiful Soup is a Python library designed for rapidly setting up
5828 screen-scraping projects. It offers Pythonic idioms for navigating,
5829 searching, and modifying a parse tree, providing a toolkit for
5830 dissecting a document and extracting what you need. It automatically
5831 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5832 (license license:expat)
5833 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5834
5835 (define-public python2-beautifulsoup4
5836 (package
5837 (inherit (package-with-python2
5838 (strip-python2-variant python-beautifulsoup4)))
5839 (arguments `(#:python ,python-2))))
5840
5841 (define-public python-soupsieve
5842 (package
5843 (name "python-soupsieve")
5844 (version "1.9.5")
5845 (source
5846 (origin
5847 (method url-fetch)
5848 (uri (pypi-uri "soupsieve" version))
5849 (sha256
5850 (base32
5851 "1nhd0q0ifwva9wn645s6pn74p1rd97asn3qfg75nphx1wkgcbhg2"))))
5852 (build-system python-build-system)
5853 (arguments `(#:tests? #f))
5854 ;;XXX: 2 tests fail currently despite claming they were to be
5855 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
5856 ;;don't want to create a circular dependency.
5857 (home-page "https://github.com/facelessuser/soupsieve")
5858 (synopsis "CSS selector library")
5859 (description
5860 "Soup Sieve is a CSS selector library designed to be used with Beautiful
5861 Soup 4. It aims to provide selecting, matching, and filtering using modern
5862 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
5863 specifications up through the latest CSS level 4 drafts and beyond (though
5864 some are not yet implemented).")
5865 (properties `((python2-variant . ,(delay python2-soupsieve))))
5866 (license license:expat)))
5867
5868 (define-public python2-soupsieve
5869 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
5870 (package
5871 (inherit base)
5872 (propagated-inputs
5873 `(("python2-backports-functools-lru-cache"
5874 ,python2-backports-functools-lru-cache)
5875 ,@(package-propagated-inputs base))))))
5876
5877 (define-public python-netifaces
5878 (package
5879 (name "python-netifaces")
5880 (version "0.10.7")
5881 (source
5882 (origin
5883 (method url-fetch)
5884 (uri (pypi-uri "netifaces" version))
5885 (sha256
5886 (base32
5887 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5888 (build-system python-build-system)
5889 (home-page "https://github.com/al45tair/netifaces")
5890 (synopsis
5891 "Python module for portable network interface information")
5892 (description
5893 "Netifaces is a Python module providing information on network
5894 interfaces in an easy and portable manner.")
5895 (license license:expat)))
5896
5897 (define-public python2-netifaces
5898 (package-with-python2 python-netifaces))
5899
5900 (define-public python-networkx
5901 (package
5902 (name "python-networkx")
5903 (version "2.2")
5904 (source
5905 (origin
5906 (method url-fetch)
5907 (uri (pypi-uri "networkx" version ".zip"))
5908 (sha256
5909 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5910 (build-system python-build-system)
5911 ;; python-decorator is needed at runtime.
5912 (propagated-inputs
5913 `(("python-decorator" ,python-decorator)))
5914 (native-inputs
5915 `(("python-nose" ,python-nose)
5916 ("unzip" ,unzip)))
5917 (home-page "https://networkx.github.io/")
5918 (synopsis "Python module for creating and manipulating graphs and networks")
5919 (description
5920 "NetworkX is a Python package for the creation, manipulation, and study
5921 of the structure, dynamics, and functions of complex networks.")
5922 (license license:bsd-3)))
5923
5924 (define-public python2-networkx
5925 (package-with-python2 python-networkx))
5926
5927 (define-public python-datrie
5928 (package
5929 (name "python-datrie")
5930 (version "0.8")
5931 (source
5932 (origin
5933 (method url-fetch)
5934 (uri (pypi-uri "datrie" version))
5935 (sha256
5936 (base32
5937 "0338r8xgmpy78556jhms0h6qkvyjr10p8bpgdvcpqzm9lrmxmmdx"))))
5938 (build-system python-build-system)
5939 (native-inputs
5940 `(("python-cython" ,python-cython)
5941 ("python-hypothesis" ,python-hypothesis)
5942 ("python-pytest" ,python-pytest)
5943 ("python-pytest-runner" ,python-pytest-runner)))
5944 (home-page "https://github.com/kmike/datrie")
5945 (synopsis "Fast, efficiently stored trie for Python")
5946 (description
5947 "This package provides a fast, efficiently stored trie implementation for
5948 Python.")
5949 (license license:lgpl2.1+)))
5950
5951 (define-public snakemake
5952 (package
5953 (name "snakemake")
5954 (version "5.7.1")
5955 (source
5956 (origin
5957 (method url-fetch)
5958 (uri (pypi-uri "snakemake" version))
5959 (sha256
5960 (base32 "1pnpvvn8n2a78cg360wz3ldmpqrsm2wzi0c0dmvki9fnsw6fxdas"))))
5961 (build-system python-build-system)
5962 (arguments
5963 ;; TODO: Package missing test dependencies.
5964 '(#:tests? #f
5965 #:phases
5966 (modify-phases %standard-phases
5967 ;; For cluster execution Snakemake will call Python. Since there is
5968 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5969 ;; this by calling the snakemake wrapper instead.
5970 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5971 (lambda* (#:key outputs #:allow-other-keys)
5972 (substitute* "snakemake/executors.py"
5973 (("\\{sys.executable\\} -m snakemake")
5974 (string-append (assoc-ref outputs "out")
5975 "/bin/snakemake")))
5976 #t)))))
5977 (propagated-inputs
5978 `(("python-appdirs" ,python-appdirs)
5979 ("python-configargparse" ,python-configargparse)
5980 ("python-datrie" ,python-datrie)
5981 ("python-docutils" ,python-docutils)
5982 ("python-gitpython" ,python-gitpython)
5983 ("python-jinja2" ,python-jinja2)
5984 ("python-jsonschema" ,python-jsonschema)
5985 ("python-networkx" ,python-networkx)
5986 ("python-psutil" ,python-psutil)
5987 ("python-pyyaml" ,python-pyyaml)
5988 ("python-ratelimiter" ,python-ratelimiter)
5989 ("python-requests" ,python-requests)
5990 ("python-wrapt" ,python-wrapt)))
5991 (home-page "https://snakemake.readthedocs.io")
5992 (synopsis "Python-based execution environment for make-like workflows")
5993 (description
5994 "Snakemake aims to reduce the complexity of creating workflows by
5995 providing a clean and modern domain specific specification language (DSL) in
5996 Python style, together with a fast and comfortable execution environment.")
5997 (license license:expat)))
5998
5999 (define-public python-pyqrcode
6000 (package
6001 (name "python-pyqrcode")
6002 (version "1.2.1")
6003 (source
6004 (origin
6005 (method url-fetch)
6006 (uri (pypi-uri "PyQRCode" version))
6007 (sha256
6008 (base32
6009 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
6010 (build-system python-build-system)
6011 (home-page
6012 "https://github.com/mnooner256/pyqrcode")
6013 (synopsis "QR code generator")
6014 (description
6015 "Pyqrcode is a QR code generator written purely in Python with
6016 SVG, EPS, PNG and terminal output.")
6017 (license license:bsd-3)))
6018
6019 (define-public python-seaborn
6020 (package
6021 (name "python-seaborn")
6022 (version "0.9.0")
6023 (source
6024 (origin
6025 (method url-fetch)
6026 (uri (pypi-uri "seaborn" version))
6027 (sha256
6028 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))
6029 (patches
6030 (list (origin
6031 (method url-fetch)
6032 ;; This has already been merged, but there is no new
6033 ;; release including this patch. It fixes problems
6034 ;; with axis rotation that would lead to test
6035 ;; failures.
6036 (uri "https://patch-diff.githubusercontent.com/raw/mwaskom/seaborn/pull/1716.diff")
6037 (sha256
6038 (base32
6039 "1lm870z316n9ivsyr86hpk1gxaraw0mrjvq42lqsm0znhjdp9q9w"))
6040 (file-name "seaborn-0.9.0-axis-rotation.patch"))))))
6041 (build-system python-build-system)
6042 (arguments
6043 `(#:phases
6044 (modify-phases %standard-phases
6045 (add-before 'check 'start-xserver
6046 (lambda* (#:key inputs #:allow-other-keys)
6047 (let ((xorg-server (assoc-ref inputs "xorg-server")))
6048 ;; There must be a running X server and make check doesn't
6049 ;; start one. Therefore we must do it.
6050 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
6051 (setenv "DISPLAY" ":1")
6052 #t)))
6053 (add-after 'unpack 'fix-tests
6054 (lambda _
6055 ;; test_cbar_ticks fails probably because of matplotlib's
6056 ;; expectation of using an older version of FreeType.
6057 (delete-file "seaborn/tests/test_matrix.py")
6058 #t))
6059 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
6060 (propagated-inputs
6061 `(("python-pandas" ,python-pandas)
6062 ("python-matplotlib" ,python-matplotlib)
6063 ("python-numpy" ,python-numpy)
6064 ("python-scipy" ,python-scipy)))
6065 (native-inputs
6066 `(("python-pytest" ,python-pytest)
6067 ("xorg-server" ,xorg-server-for-tests)))
6068 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6069 (synopsis "Statistical data visualization")
6070 (description
6071 "Seaborn is a library for making attractive and informative statistical
6072 graphics in Python. It is built on top of matplotlib and tightly integrated
6073 with the PyData stack, including support for numpy and pandas data structures
6074 and statistical routines from scipy and statsmodels.")
6075 (license license:bsd-3)))
6076
6077 (define-public python2-seaborn
6078 (package-with-python2 python-seaborn))
6079
6080 (define-public python-mpmath
6081 (package
6082 (name "python-mpmath")
6083 (version "0.19")
6084 (source (origin
6085 (method url-fetch)
6086 (uri (string-append "http://mpmath.org/files/mpmath-"
6087 version ".tar.gz"))
6088 (sha256
6089 (base32
6090 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6091 (build-system python-build-system)
6092 (arguments
6093 '(#:phases
6094 (modify-phases %standard-phases
6095 (replace 'check
6096 (lambda _
6097 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
6098 (home-page "http://mpmath.org")
6099 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6100 (description
6101 "@code{mpmath} can be used as an arbitrary-precision substitute for
6102 Python's float/complex types and math/cmath modules, but also does much
6103 more advanced mathematics.")
6104 (license license:bsd-3)))
6105
6106 (define-public python2-mpmath
6107 (package-with-python2 python-mpmath))
6108
6109 (define-public python-bigfloat
6110 (package
6111 (name "python-bigfloat")
6112 (version "0.3.0")
6113 (source
6114 (origin
6115 (method url-fetch)
6116 (uri (pypi-uri "bigfloat" version))
6117 (sha256
6118 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6119 (build-system python-build-system)
6120 (inputs
6121 `(("mpfr" ,mpfr)))
6122 (home-page "https://github.com/mdickinson/bigfloat")
6123 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6124 (description
6125 "This package provides a Python interface to the MPFR library for
6126 multiprecision arithmetic.")
6127 (license license:lgpl3+)))
6128
6129 (define-public python2-bigfloat
6130 (package-with-python2 python-bigfloat))
6131
6132 (define-public python-sympy
6133 (package
6134 (name "python-sympy")
6135 (version "1.1.1")
6136 (source
6137 (origin
6138 (method url-fetch)
6139 (uri (string-append
6140 "https://github.com/sympy/sympy/releases/download/sympy-"
6141 version "/sympy-" version ".tar.gz"))
6142 (sha256
6143 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6144 (build-system python-build-system)
6145 (arguments
6146 `(#:phases
6147 (modify-phases %standard-phases
6148 ;; Run the core tests after installation. By default it would run
6149 ;; *all* tests, which take a very long time to complete and are known
6150 ;; to be flaky.
6151 (delete 'check)
6152 (add-after 'install 'check
6153 (lambda* (#:key outputs #:allow-other-keys)
6154 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6155 #t)))))
6156 (propagated-inputs
6157 `(("python-mpmath" ,python-mpmath)))
6158 (home-page "http://www.sympy.org/")
6159 (synopsis "Python library for symbolic mathematics")
6160 (description
6161 "SymPy is a Python library for symbolic mathematics. It aims to become a
6162 full-featured computer algebra system (CAS) while keeping the code as simple
6163 as possible in order to be comprehensible and easily extensible.")
6164 (license license:bsd-3)))
6165
6166 (define-public python2-sympy
6167 (package
6168 (inherit (package-with-python2 python-sympy))
6169 (arguments
6170 `(#:phases
6171 (modify-phases %standard-phases
6172 ;; Run the core tests after installation. By default it would run
6173 ;; *all* tests, which take a very long time to complete and are known
6174 ;; to be flaky.
6175 (delete 'check)
6176 (add-after 'install 'check
6177 (lambda* (#:key outputs #:allow-other-keys)
6178 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6179 #t)))))))
6180
6181 (define-public python-q
6182 (package
6183 (name "python-q")
6184 (version "2.6")
6185 (source
6186 (origin
6187 (method url-fetch)
6188 (uri (pypi-uri "q" version))
6189 (sha256
6190 (base32
6191 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6192 (build-system python-build-system)
6193 (home-page "https://github.com/zestyping/q")
6194 (synopsis "Quick-and-dirty debugging output for tired programmers")
6195 (description
6196 "q is a Python module for \"print\" style of debugging Python code. It
6197 provides convenient short API for print out of values, tracebacks, and
6198 falling into the Python interpreter.")
6199 (license license:asl2.0)))
6200
6201 (define-public python2-q
6202 (package-with-python2 python-q))
6203
6204 (define-public python2-xlib
6205 (package
6206 (name "python2-xlib")
6207 (version "0.14")
6208 (source (origin
6209 (method url-fetch)
6210 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6211 "/" version "/"
6212 "python-xlib-" version ".tar.gz"))
6213 (sha256
6214 (base32
6215 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6216 (build-system python-build-system)
6217 (arguments
6218 `(#:python ,python-2 ;Python 2 only
6219 #:tests? #f)) ;no tests
6220 (home-page "http://python-xlib.sourceforge.net/")
6221 (synopsis "Python X11 client library")
6222 (description
6223 "The Python X Library is intended to be a fully functional X client
6224 library for Python programs. It is useful to implement low-level X clients.
6225 It is written entirely in Python.")
6226 (license license:gpl2+)))
6227
6228 (define-public python-singledispatch
6229 (package
6230 (name "python-singledispatch")
6231 (version "3.4.0.3")
6232 (source
6233 (origin
6234 (method url-fetch)
6235 (uri (pypi-uri "singledispatch" version))
6236 (sha256
6237 (base32
6238 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6239 (build-system python-build-system)
6240 (native-inputs
6241 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6242 (home-page
6243 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6244 (synopsis "Backport of singledispatch feature from Python 3.4")
6245 (description
6246 "This library brings functools.singledispatch from Python 3.4 to Python
6247 2.6-3.3.")
6248 (license license:expat)))
6249
6250 (define-public python2-singledispatch
6251 (package-with-python2 python-singledispatch))
6252
6253 ;; the python- version can be removed with python-3.5
6254 (define-public python-backports-abc
6255 (package
6256 (name "python-backports-abc")
6257 (version "0.5")
6258 (source
6259 (origin
6260 (method url-fetch)
6261 (uri (pypi-uri "backports_abc" version))
6262 (sha256
6263 (base32
6264 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6265 (build-system python-build-system)
6266 (home-page "https://github.com/cython/backports_abc")
6267 (synopsis "Backport of additions to the 'collections.abc' module")
6268 (description
6269 "Python-backports-abc provides a backport of additions to the
6270 @code{collections.abc} module in Python-3.5.")
6271 (license license:psfl)))
6272
6273 (define-public python2-backports-abc
6274 (package-with-python2 python-backports-abc))
6275
6276 (define-public python-backports-csv
6277 (package
6278 (name "python-backports-csv")
6279 (version "1.0.5")
6280 (source
6281 (origin
6282 (method url-fetch)
6283 (uri (pypi-uri "backports.csv" version))
6284 (sha256
6285 (base32
6286 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6287 (build-system python-build-system)
6288 (home-page "https://github.com/ryanhiebert/backports.csv")
6289 (synopsis "Backport of Python 3's csv module for Python 2")
6290 (description
6291 "Provides a backport of Python 3's @code{csv} module for parsing
6292 comma separated values. The API of the @code{csv} module in Python 2
6293 is drastically different from the @code{csv} module in Python 3.
6294 This is due, for the most part, to the difference between str in
6295 Python 2 and Python 3.")
6296 (license license:psfl)))
6297
6298 (define-public python2-backports-csv
6299 (package-with-python2 python-backports-csv))
6300
6301 (define-public python2-backports-shutil-get-terminal-size
6302 (package
6303 (name "python2-backports-shutil-get-terminal-size")
6304 (version "1.0.0")
6305 (source
6306 (origin
6307 (method url-fetch)
6308 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6309 (sha256
6310 (base32
6311 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6312 (build-system python-build-system)
6313 (arguments
6314 `(#:python ,python-2
6315 #:phases
6316 (modify-phases %standard-phases
6317 (replace 'check
6318 (lambda _
6319 (invoke "py.test" "-v"))))))
6320 (native-inputs
6321 `(("python2-pytest" ,python2-pytest)))
6322 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6323 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6324 (description
6325 "This package provides a backport of the @code{get_terminal_size
6326 function} from Python 3.3's @code{shutil}.
6327 Unlike the original version it is written in pure Python rather than C,
6328 so it might be a tiny bit slower.")
6329 (license license:expat)))
6330
6331 (define-public python-waf
6332 (package
6333 (name "python-waf")
6334 (version "2.0.11")
6335 (source (origin
6336 (method url-fetch)
6337 (uri (string-append "https://waf.io/"
6338 "waf-" version ".tar.bz2"))
6339 (sha256
6340 (base32
6341 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
6342 (build-system python-build-system)
6343 (arguments
6344 '(#:phases
6345 (modify-phases %standard-phases
6346 (replace 'build
6347 (lambda _
6348 (invoke "python" "waf-light" "configure" "build")))
6349 (replace 'check
6350 (lambda _
6351 (invoke "python" "waf" "--version")))
6352 (replace 'install
6353 (lambda* (#:key outputs #:allow-other-keys)
6354 (let ((out (assoc-ref outputs "out")))
6355 (install-file "waf" (string-append out "/bin")))
6356 #t))
6357 ;; waf breaks when it is wrapped.
6358 (delete 'wrap))))
6359 (home-page "https://waf.io/")
6360 (synopsis "Python-based build system")
6361 (description
6362 "Waf is a Python-based framework for configuring, compiling and installing
6363 applications.")
6364 (license license:bsd-3)))
6365
6366 (define-public python2-waf
6367 (package-with-python2 python-waf))
6368
6369 (define-public python-pyzmq
6370 (package
6371 (name "python-pyzmq")
6372 (version "17.1.2")
6373 (source
6374 (origin
6375 (method url-fetch)
6376 (uri (pypi-uri "pyzmq" version))
6377 (sha256
6378 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6379 (build-system python-build-system)
6380 (arguments
6381 `(#:configure-flags
6382 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6383 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6384 ;; --inplace' for 'python setup.py test' to work.
6385 #:tests? #f))
6386 (inputs
6387 `(("zeromq" ,zeromq)))
6388 (native-inputs
6389 `(("pkg-config" ,pkg-config)
6390 ("python-nose" ,python-nose)))
6391 (home-page "https://github.com/zeromq/pyzmq")
6392 (synopsis "Python bindings for 0MQ")
6393 (description
6394 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6395 (license license:bsd-4)))
6396
6397 (define-public python2-pyzmq
6398 (package-with-python2 python-pyzmq))
6399
6400 (define-public python-pep8
6401 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6402 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6403 ;; some dependents' test suites, and nothing more.
6404 (package
6405 (name "python-pep8")
6406 (version "1.7.0")
6407 (source
6408 (origin
6409 (method url-fetch)
6410 (uri (pypi-uri "pep8" version))
6411 (sha256
6412 (base32
6413 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
6414 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
6415 (build-system python-build-system)
6416 (home-page "https://pep8.readthedocs.org/")
6417 (synopsis "Python style guide checker")
6418 (description
6419 "This tools checks Python code against some of the style conventions in
6420 PEP 8.")
6421 (license license:expat)))
6422
6423 (define-public python2-pep8
6424 (package-with-python2 python-pep8))
6425
6426 (define-public python-pyflakes
6427 (package
6428 (name "python-pyflakes")
6429 (version "2.1.1")
6430 (source
6431 (origin
6432 (method url-fetch)
6433 (uri (pypi-uri "pyflakes" version))
6434 (sha256
6435 (base32
6436 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
6437 (build-system python-build-system)
6438 (home-page
6439 "https://github.com/pyflakes/pyflakes")
6440 (synopsis "Passive checker of Python programs")
6441 (description
6442 "Pyflakes statically checks Python source code for common errors.")
6443 (license license:expat)))
6444
6445 (define-public python2-pyflakes
6446 (package-with-python2 python-pyflakes))
6447
6448 (define-public python-mccabe
6449 (package
6450 (name "python-mccabe")
6451 (version "0.6.1")
6452 (source
6453 (origin
6454 (method url-fetch)
6455 (uri (pypi-uri "mccabe" version))
6456 (sha256
6457 (base32
6458 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6459 (build-system python-build-system)
6460 (native-inputs
6461 `(("python-pytest" ,python-pytest-bootstrap)
6462 ("python-pytest-runner" ,python-pytest-runner)))
6463 (home-page "https://github.com/flintwork/mccabe")
6464 (synopsis "McCabe checker, plugin for flake8")
6465 (description
6466 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6467 complexity of Python source code.")
6468 (license license:expat)))
6469
6470 (define-public python2-mccabe
6471 (package-with-python2 python-mccabe))
6472
6473 (define-public python-mccabe-0.2.1
6474 (package (inherit python-mccabe)
6475 (version "0.2.1")
6476 (source
6477 (origin
6478 (method url-fetch)
6479 (uri (pypi-uri "mccabe" version))
6480 (sha256
6481 (base32
6482 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6483
6484 (define-public python2-mccabe-0.2.1
6485 (package-with-python2 python-mccabe-0.2.1))
6486
6487 ;; Flake8 2.4.1 requires an older version of pep8.
6488 ;; This should be removed ASAP.
6489 (define-public python-pep8-1.5.7
6490 (package (inherit python-pep8)
6491 (version "1.5.7")
6492 (source
6493 (origin
6494 (method url-fetch)
6495 (uri (pypi-uri "pep8" version))
6496 (sha256
6497 (base32
6498 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6499 (arguments
6500 ;; XXX Tests not compatible with Python 3.5.
6501 '(#:tests? #f))))
6502
6503 (define-public python2-pep8-1.5.7
6504 (package-with-python2 python-pep8-1.5.7))
6505
6506 ;; Flake8 2.4.1 requires an older version of pyflakes.
6507 ;; This should be removed ASAP.
6508 (define-public python-pyflakes-0.8.1
6509 (package (inherit python-pyflakes)
6510 (version "0.8.1")
6511 (source
6512 (origin
6513 (method url-fetch)
6514 (uri (pypi-uri "pyflakes" version))
6515 (sha256
6516 (base32
6517 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6518 (arguments
6519 ;; XXX Tests not compatible with Python 3.5.
6520 '(#:tests? #f))))
6521
6522 (define-public python2-pyflakes-0.8.1
6523 (package-with-python2 python-pyflakes-0.8.1))
6524
6525 (define-public python-flake8
6526 (package
6527 (name "python-flake8")
6528 (version "3.7.7")
6529 (source (origin
6530 (method url-fetch)
6531 (uri (pypi-uri "flake8" version))
6532 (sha256
6533 (base32
6534 "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5"))))
6535 (build-system python-build-system)
6536 (arguments
6537 `(#:phases
6538 (modify-phases %standard-phases
6539 (delete 'check)
6540 (add-after 'install 'check
6541 (lambda* (#:key inputs outputs #:allow-other-keys)
6542 (add-installed-pythonpath inputs outputs)
6543 (invoke "pytest" "-v")
6544 #t)))))
6545 (propagated-inputs
6546 `(("python-pycodestyle" ,python-pycodestyle)
6547 ("python-entrypoints" ,python-entrypoints)
6548 ("python-pyflakes" ,python-pyflakes)
6549 ("python-mccabe" ,python-mccabe)))
6550 (native-inputs
6551 `(("python-mock" ,python-mock)
6552 ("python-pytest" ,python-pytest-bootstrap)
6553 ("python-pytest-runner" ,python-pytest-runner)))
6554 (home-page "https://gitlab.com/pycqa/flake8")
6555 (synopsis
6556 "The modular source code checker: pep8, pyflakes and co")
6557 (description
6558 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6559 (properties `((python2-variant . ,(delay python2-flake8))))
6560 (license license:expat)))
6561
6562 (define-public python2-flake8
6563 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
6564 (package (inherit base)
6565 (propagated-inputs
6566 `(("python2-configparser" ,python2-configparser)
6567 ("python2-enum34" ,python2-enum34)
6568 ("python2-typing" ,python2-typing)
6569 ,@(package-propagated-inputs base))))))
6570
6571 ;; python-hacking requires flake8 <2.6.0.
6572 (define-public python-flake8-2.5
6573 (package
6574 (inherit python-flake8)
6575 (version "2.5.5")
6576 (source (origin
6577 (method url-fetch)
6578 (uri (pypi-uri "flake8" version))
6579 (sha256
6580 (base32
6581 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6582 (propagated-inputs
6583 `(("python-pep8" ,python-pep8)
6584 ,@(package-propagated-inputs python-flake8)))
6585 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6586
6587 (define-public python2-flake8-2.5
6588 (package
6589 (inherit python2-flake8)
6590 (version (package-version python-flake8-2.5))
6591 (source (origin
6592 (inherit (package-source python-flake8-2.5))))
6593 (propagated-inputs
6594 `(("python2-pep8" ,python2-pep8)
6595 ,@(package-propagated-inputs python2-flake8)))))
6596
6597 (define-public python-flake8-polyfill
6598 (package
6599 (name "python-flake8-polyfill")
6600 (version "1.0.2")
6601 (source
6602 (origin
6603 (method url-fetch)
6604 (uri (pypi-uri "flake8-polyfill" version))
6605 (sha256
6606 (base32
6607 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6608 (build-system python-build-system)
6609 (arguments
6610 '(#:phases
6611 (modify-phases %standard-phases
6612 (replace 'check
6613 (lambda _
6614 ;; Be compatible with Pytest 4:
6615 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
6616 (substitute* "setup.cfg"
6617 (("\\[pytest\\]")
6618 "[tool:pytest]"))
6619
6620 (setenv "PYTHONPATH"
6621 (string-append (getcwd) "/build/lib:"
6622 (getenv "PYTHONPATH")))
6623 (invoke "py.test" "-v"))))))
6624 (native-inputs
6625 `(("python-flake8" ,python-flake8)
6626 ("python-mock" ,python-mock)
6627 ("python-pep8" ,python-pep8)
6628 ("python-pycodestyle" ,python-pycodestyle)
6629 ("python-pytest" ,python-pytest)))
6630 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6631 (synopsis "Polyfill package for Flake8 plugins")
6632 (description
6633 "This package that provides some compatibility helpers for Flake8
6634 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6635 (license license:expat)))
6636
6637 (define-public python2-flake8-polyfill
6638 (package-with-python2 python-flake8-polyfill))
6639
6640 (define-public python-mistune
6641 (package
6642 (name "python-mistune")
6643 (version "0.8.4")
6644 (source
6645 (origin
6646 (method url-fetch)
6647 (uri (pypi-uri "mistune" version))
6648 (sha256
6649 (base32
6650 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6651 (build-system python-build-system)
6652 (native-inputs
6653 `(("python-nose" ,python-nose)
6654 ("python-cython" ,python-cython)))
6655 (home-page "https://github.com/lepture/mistune")
6656 (synopsis "Markdown parser in pure Python")
6657 (description "This package provides a fast markdown parser in pure
6658 Python.")
6659 (license license:bsd-3)))
6660
6661 (define-public python2-mistune
6662 (package-with-python2 python-mistune))
6663
6664 (define-public python-markdown
6665 (package
6666 (name "python-markdown")
6667 (version "3.1.1")
6668 (source
6669 (origin
6670 (method url-fetch)
6671 (uri (pypi-uri "Markdown" version))
6672 (sha256
6673 (base32
6674 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f"))))
6675 (build-system python-build-system)
6676 (native-inputs
6677 `(("python-nose" ,python-nose)
6678 ("python-pyyaml" ,python-pyyaml)))
6679 (home-page "https://python-markdown.github.io/")
6680 (synopsis "Python implementation of Markdown")
6681 (description
6682 "This package provides a Python implementation of John Gruber's
6683 Markdown. The library features international input, various Markdown
6684 extensions, and several HTML output formats. A command line wrapper
6685 markdown_py is also provided to convert Markdown files to HTML.")
6686 (license license:bsd-3)))
6687
6688 (define-public python2-markdown
6689 (package-with-python2 python-markdown))
6690
6691 (define-public python-ptyprocess
6692 (package
6693 (name "python-ptyprocess")
6694 (version "0.5.2")
6695 (source
6696 (origin
6697 (method url-fetch)
6698 (uri (pypi-uri "ptyprocess" version))
6699 (sha256
6700 (base32
6701 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6702 (build-system python-build-system)
6703 (native-inputs
6704 `(("python-nose" ,python-nose)))
6705 (arguments
6706 `(#:phases
6707 (modify-phases %standard-phases
6708 (replace 'check
6709 (lambda _ (invoke "nosetests"))))))
6710 (home-page "https://github.com/pexpect/ptyprocess")
6711 (synopsis "Run a subprocess in a pseudo terminal")
6712 (description
6713 "This package provides a Python library used to launch a subprocess in a
6714 pseudo terminal (pty), and interact with both the process and its pty.")
6715 (license license:isc)))
6716
6717 (define-public python2-ptyprocess
6718 (package-with-python2 python-ptyprocess))
6719
6720 (define-public python-cram
6721 (package
6722 (name "python-cram")
6723 (version "0.7")
6724 (home-page "https://bitheap.org/cram/")
6725 (source (origin
6726 (method url-fetch)
6727 (uri (list (string-append home-page "cram-"
6728 version ".tar.gz")
6729 (pypi-uri "cram" version)))
6730 (sha256
6731 (base32
6732 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6733 (arguments
6734 '(#:phases
6735 (modify-phases %standard-phases
6736 (add-after 'unpack 'patch-source
6737 (lambda _
6738 (substitute* (find-files "cram" ".*\\.py$")
6739 ;; Replace default shell path.
6740 (("/bin/sh") (which "sh")))
6741 (substitute* (find-files "tests" ".*\\.t$")
6742 (("md5") "md5sum")
6743 (("/bin/bash") (which "bash"))
6744 (("/bin/sh") (which "sh")))
6745 (substitute* "cram/_test.py"
6746 ;; This hack works around a bug triggered by substituting
6747 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6748 ;; "cram -h", which breaks the output at 80 characters. This
6749 ;; causes the line showing the default shell to break into two
6750 ;; lines, but the test expects a single line...
6751 (("env\\['COLUMNS'\\] = '80'")
6752 "env['COLUMNS'] = '160'"))
6753
6754 (substitute* "Makefile"
6755 ;; Recent versions of python-coverage have caused the test
6756 ;; coverage to decrease (as of version 0.7). Allow that.
6757 (("--fail-under=100")
6758 "--fail-under=90"))
6759
6760 #t))
6761 (replace 'check
6762 ;; The test phase uses the built library and executable.
6763 (lambda* (#:key inputs outputs #:allow-other-keys)
6764 (add-installed-pythonpath inputs outputs)
6765 (setenv "PATH" (string-append (getenv "PATH") ":"
6766 (assoc-ref outputs "out") "/bin"))
6767 (invoke "make" "test"))))))
6768 (build-system python-build-system)
6769 (native-inputs
6770 `(("python-coverage" ,python-coverage)
6771 ("which" ,which)))
6772 (synopsis "Simple testing framework for command line applications")
6773 (description
6774 "Cram is a functional testing framework for command line applications.
6775 Cram tests look like snippets of interactive shell sessions. Cram runs each
6776 command and compares the command output in the test with the command’s actual
6777 output.")
6778 (license license:gpl2+)))
6779
6780 (define-public python2-cram
6781 (package-with-python2 python-cram))
6782
6783 (define-public python-straight-plugin
6784 (package
6785 (name "python-straight-plugin")
6786 (version "1.4.1")
6787 (source
6788 (origin
6789 (method url-fetch)
6790 (uri (pypi-uri "straight.plugin" version))
6791 (sha256
6792 (base32
6793 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6794 (build-system python-build-system)
6795 (home-page "https://github.com/ironfroggy/straight.plugin")
6796 (synopsis "Simple namespaced plugin facility")
6797 (description "Straight Plugin provides a type of plugin you can create from
6798 almost any existing Python modules, and an easy way for outside developers to
6799 add functionality and customization to your projects with their own plugins.")
6800 (license license:expat)))
6801
6802 (define-public python2-straight-plugin
6803 (package-with-python2 python-straight-plugin))
6804
6805 (define-public python-fonttools
6806 (package
6807 (name "python-fonttools")
6808 (version "3.38.0")
6809 (source (origin
6810 (method url-fetch)
6811 (uri (pypi-uri "fonttools" version ".zip"))
6812 (sha256
6813 (base32
6814 "12ripk3s7skgxr1bs9r8n13r94ym3s8iir7ivfixls9fa4dabmlh"))))
6815 (build-system python-build-system)
6816 (native-inputs
6817 `(("unzip" ,unzip)
6818 ("python-pytest" ,python-pytest)
6819 ("python-pytest-runner" ,python-pytest-runner)))
6820 (home-page "https://github.com/behdad/fonttools")
6821 (synopsis "Tools to manipulate font files")
6822 (description
6823 "FontTools/TTX is a library to manipulate font files from Python. It
6824 supports reading and writing of TrueType/OpenType fonts, reading and writing
6825 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6826 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6827 from an XML-based format.")
6828 (license license:expat)))
6829
6830 (define-public python2-fonttools
6831 (package-with-python2 python-fonttools))
6832
6833 (define-public python-ly
6834 (package
6835 (name "python-ly")
6836 (version "0.9.5")
6837 (source
6838 (origin
6839 (method url-fetch)
6840 (uri (pypi-uri name version))
6841 (sha256
6842 (base32
6843 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6844 (build-system python-build-system)
6845 (arguments
6846 ;; FIXME: Some tests need network access.
6847 '(#:tests? #f))
6848 (synopsis "Tool and library for manipulating LilyPond files")
6849 (description "This package provides a Python library to parse, manipulate
6850 or create documents in LilyPond format. A command line program ly is also
6851 provided that can be used to do various manipulations with LilyPond files.")
6852 (home-page "https://pypi.python.org/pypi/python-ly")
6853 (license license:gpl2+)))
6854
6855 (define-public python-appdirs
6856 (package
6857 (name "python-appdirs")
6858 (version "1.4.3")
6859 (source
6860 (origin
6861 (method url-fetch)
6862 (uri (pypi-uri "appdirs" version))
6863 (sha256
6864 (base32
6865 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6866 (build-system python-build-system)
6867 (home-page "https://github.com/ActiveState/appdirs")
6868 (synopsis
6869 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6870 (description
6871 "This module provides a portable way of finding out where user data
6872 should be stored on various operating systems.")
6873 (license license:expat)))
6874
6875 (define-public python2-appdirs
6876 (package-with-python2 python-appdirs))
6877
6878 (define-public python-llfuse
6879 (package
6880 (name "python-llfuse")
6881 (version "1.3.5")
6882 (source (origin
6883 (method url-fetch)
6884 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6885 (sha256
6886 (base32
6887 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6888 (build-system python-build-system)
6889 (inputs
6890 `(("fuse" ,fuse)
6891 ("attr" ,attr)))
6892 (native-inputs
6893 `(("pkg-config" ,pkg-config)))
6894 (synopsis "Python bindings for FUSE")
6895 (description
6896 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6897 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6898 (license license:lgpl2.0+)
6899 (properties `((python2-variant . ,(delay python2-llfuse))))))
6900
6901 (define-public python2-llfuse
6902 (package (inherit (package-with-python2
6903 (strip-python2-variant python-llfuse)))
6904 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6905
6906 ;; For attic-0.16
6907 (define-public python-llfuse-0.41
6908 (package (inherit python-llfuse)
6909 (version "0.41.1")
6910 (source (origin
6911 (method url-fetch)
6912 (uri (string-append
6913 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6914 "llfuse-" version ".tar.bz2"))
6915 (sha256
6916 (base32
6917 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6918 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6919 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6920 (license (list license:expat license:lgpl2.0+))))
6921
6922 (define-public python-msgpack
6923 (package
6924 (name "python-msgpack")
6925 (version "0.5.6")
6926 (source (origin
6927 (method url-fetch)
6928 (uri (pypi-uri "msgpack" version))
6929 (sha256
6930 (base32
6931 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6932 (build-system python-build-system)
6933 (arguments
6934 `(#:modules ((guix build utils)
6935 (guix build python-build-system)
6936 (ice-9 ftw)
6937 (srfi srfi-1)
6938 (srfi srfi-26))
6939 #:phases
6940 (modify-phases %standard-phases
6941 (replace 'check
6942 (lambda _
6943 (let ((cwd (getcwd)))
6944 (setenv "PYTHONPATH"
6945 (string-append cwd "/build/"
6946 (find (cut string-prefix? "lib" <>)
6947 (scandir (string-append cwd "/build")))
6948 ":"
6949 (getenv "PYTHONPATH")))
6950 (invoke "pytest" "-v" "test")))))))
6951 (native-inputs
6952 `(("python-pytest" ,python-pytest)))
6953 (synopsis "MessagePack (de)serializer")
6954 (description "MessagePack is a fast, compact binary serialization format,
6955 suitable for similar data to JSON. This package provides CPython bindings for
6956 reading and writing MessagePack data.")
6957 (home-page "https://pypi.python.org/pypi/msgpack/")
6958 (license license:asl2.0)))
6959
6960 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6961 ;; release 0.5. Some packages like borg still call it by the old name for now.
6962 ;; <https://bugs.gnu.org/30662>
6963 (define-public python-msgpack-transitional
6964 (package
6965 (inherit python-msgpack)
6966 (name "python-msgpack-transitional")
6967 (arguments
6968 (substitute-keyword-arguments (package-arguments python-msgpack)
6969 ((#:phases phases)
6970 `(modify-phases ,phases
6971 (add-after 'unpack 'configure-transitional
6972 (lambda _
6973 ;; Keep using the old name.
6974 (substitute* "setup.py"
6975 (("TRANSITIONAL = False")
6976 "TRANSITIONAL = 1"))
6977 #t))))))))
6978
6979 (define-public python2-msgpack
6980 (package-with-python2 python-msgpack))
6981
6982 (define-public python-netaddr
6983 (package
6984 (name "python-netaddr")
6985 (version "0.7.19")
6986 (source
6987 (origin
6988 (method url-fetch)
6989 (uri (pypi-uri "netaddr" version))
6990 (sha256
6991 (base32
6992 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6993 (build-system python-build-system)
6994 (arguments `(#:tests? #f)) ;; No tests.
6995 (home-page "https://github.com/drkjam/netaddr/")
6996 (synopsis "Pythonic manipulation of network addresses")
6997 (description
6998 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6999 and MAC network addresses.")
7000 (license license:bsd-3)))
7001
7002 (define-public python2-netaddr
7003 (package-with-python2 python-netaddr))
7004
7005 (define-public python2-pyroute2
7006 (package
7007 (name "python2-pyroute2")
7008 (version "0.5.6")
7009 (source
7010 (origin
7011 (method url-fetch)
7012 (uri (pypi-uri "pyroute2" version))
7013 (sha256
7014 (base32
7015 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
7016 (build-system python-build-system)
7017 (arguments
7018 `(#:python ,python-2)) ;Python 3.x is not supported
7019 (home-page "https://github.com/svinota/pyroute2")
7020 (synopsis "Python netlink library")
7021 (description
7022 "Pyroute2 is a pure Python netlink library with minimal dependencies.
7023 Supported netlink families and protocols include:
7024 @itemize
7025 @item rtnl, network settings - addresses, routes, traffic controls
7026 @item nfnetlink - netfilter API: ipset, nftables, ...
7027 @item ipq - simplest userspace packet filtering, iptables QUEUE target
7028 @item devlink - manage and monitor devlink-enabled hardware
7029 @item generic - generic netlink families
7030 @itemize
7031 @item nl80211 - wireless functions API (basic support)
7032 @item taskstats - extended process statistics
7033 @item acpi_events - ACPI events monitoring
7034 @item thermal_events - thermal events monitoring
7035 @item VFS_DQUOT - disk quota events monitoring
7036 @end itemize
7037 @end itemize")
7038 (license license:gpl2+)))
7039
7040 (define-public python-wrapt
7041 (package
7042 (name "python-wrapt")
7043 (version "1.11.2")
7044 (source
7045 (origin
7046 (method url-fetch)
7047 (uri (pypi-uri "wrapt" version))
7048 (sha256
7049 (base32
7050 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
7051 (build-system python-build-system)
7052 (arguments
7053 ;; Tests are not included in the tarball, they are only available in the
7054 ;; git repository.
7055 `(#:tests? #f))
7056 (home-page "https://github.com/GrahamDumpleton/wrapt")
7057 (synopsis "Module for decorators, wrappers and monkey patching")
7058 (description
7059 "The aim of the wrapt module is to provide a transparent object proxy for
7060 Python, which can be used as the basis for the construction of function
7061 wrappers and decorator functions.")
7062 (license license:bsd-2)))
7063
7064 (define-public python2-wrapt
7065 (package-with-python2 python-wrapt))
7066
7067 (define-public python-xlrd
7068 (package
7069 (name "python-xlrd")
7070 (version "1.2.0")
7071 (source (origin
7072 (method url-fetch)
7073 (uri (pypi-uri "xlrd" version))
7074 (sha256
7075 (base32
7076 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
7077 (build-system python-build-system)
7078 (arguments
7079 `(#:phases
7080 (modify-phases %standard-phases
7081 ;; Some tests depend on writing a temporary file to the user's home
7082 ;; directory.
7083 (add-after 'unpack 'fix-tests
7084 (lambda _
7085 (delete-file "tests/test_open_workbook.py")
7086 #t)))))
7087 (home-page "http://www.python-excel.org/")
7088 (synopsis "Library for extracting data from Excel files")
7089 (description "This package provides a library to extract data from
7090 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7091 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7092 Unicode-aware. It is not intended as an end-user tool.")
7093 (license license:bsd-3)))
7094
7095 (define-public python2-xlrd
7096 (package-with-python2 python-xlrd))
7097
7098 (define-public python-prettytable
7099 (package
7100 (name "python-prettytable")
7101 (version "0.7.2")
7102 (source
7103 (origin
7104 (method url-fetch)
7105 (uri (pypi-uri "prettytable" version ".tar.bz2"))
7106 (sha256
7107 (base32
7108 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7109 (build-system python-build-system)
7110 (home-page "http://code.google.com/p/prettytable/")
7111 (synopsis "Display tabular data in an ASCII table format")
7112 (description
7113 "A library designed to represent tabular data in visually appealing ASCII
7114 tables. PrettyTable allows for selection of which columns are to be printed,
7115 independent alignment of columns (left or right justified or centred) and
7116 printing of sub-tables by specifying a row range.")
7117 (license license:bsd-3)))
7118
7119 (define-public python2-prettytable
7120 (package-with-python2 python-prettytable))
7121
7122 (define-public python-tables
7123 (package
7124 (name "python-tables")
7125 (version "3.4.4")
7126 (source
7127 (origin
7128 (method url-fetch)
7129 (uri (pypi-uri "tables" version))
7130 (sha256
7131 (base32
7132 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7133 (modules '((guix build utils)))
7134 (snippet
7135 '(begin
7136 ;; Remove pre-compiled .pyc files from source.
7137 (for-each delete-file-recursively
7138 (find-files "." "__pycache__" #:directories? #t))
7139 (for-each delete-file (find-files "." "\\.pyc$"))
7140 #t))))
7141 (build-system python-build-system)
7142 (arguments
7143 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7144 ;; or "check", so we must override the build and check phases.
7145 #:phases
7146 (modify-phases %standard-phases
7147 (add-after 'unpack 'use-gcc
7148 (lambda _
7149 (substitute* "setup.py"
7150 (("compiler = new_compiler\\(\\)" line)
7151 (string-append line
7152 "\ncompiler.set_executables(compiler='gcc',"
7153 "compiler_so='gcc',"
7154 "linker_exe='gcc',"
7155 "linker_so='gcc -shared')")))
7156 #t))
7157 (replace 'build
7158 (lambda* (#:key inputs #:allow-other-keys)
7159 (invoke "python" "setup.py" "build"
7160 (string-append "--hdf5="
7161 (assoc-ref inputs "hdf5")))))
7162 (replace 'check
7163 (lambda* (#:key inputs #:allow-other-keys)
7164 (invoke "python" "setup.py" "check"
7165 (string-append "--hdf5="
7166 (assoc-ref inputs "hdf5"))))))))
7167 (propagated-inputs
7168 `(("python-numexpr" ,python-numexpr)
7169 ("python-numpy" ,python-numpy)))
7170 (native-inputs
7171 `(("python-cython" ,python-cython)
7172 ("pkg-config" ,pkg-config)))
7173 (inputs
7174 `(("hdf5" ,hdf5)
7175 ("bzip2" ,bzip2)
7176 ("zlib" ,zlib)))
7177 (home-page "http://www.pytables.org/")
7178 (synopsis "Hierarchical datasets for Python")
7179 (description "PyTables is a package for managing hierarchical datasets and
7180 designed to efficiently cope with extremely large amounts of data.")
7181 (license license:bsd-3)))
7182
7183 (define-public python2-tables
7184 (package-with-python2 python-tables))
7185
7186 (define-public python-pyasn1
7187 (package
7188 (name "python-pyasn1")
7189 (version "0.4.3")
7190 (source
7191 (origin
7192 (method url-fetch)
7193 (uri (pypi-uri "pyasn1" version))
7194 (sha256
7195 (base32
7196 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7197 (build-system python-build-system)
7198 (home-page "http://pyasn1.sourceforge.net/")
7199 (synopsis "ASN.1 types and codecs")
7200 (description
7201 "This is an implementation of ASN.1 types and codecs in Python. It is
7202 suitable for a wide range of protocols based on the ASN.1 specification.")
7203 (license license:bsd-2)))
7204
7205 (define-public python2-pyasn1
7206 (package-with-python2 python-pyasn1))
7207
7208 (define-public python-pyasn1-modules
7209 (package
7210 (name "python-pyasn1-modules")
7211 (version "0.2.2")
7212 (source
7213 (origin
7214 (method url-fetch)
7215 (uri (pypi-uri "pyasn1-modules" version))
7216 (sha256
7217 (base32
7218 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7219 (build-system python-build-system)
7220 (propagated-inputs
7221 `(("python-pyasn1" ,python-pyasn1)))
7222 (home-page "https://sourceforge.net/projects/pyasn1/")
7223 (synopsis "ASN.1 codec implementations")
7224 (description
7225 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7226 implementations of ASN.1-based codecs and protocols.")
7227 (license license:bsd-3)))
7228
7229 (define-public python2-pyasn1-modules
7230 (package-with-python2 python-pyasn1-modules))
7231
7232 (define-public python-ipaddress
7233 (package
7234 (name "python-ipaddress")
7235 (version "1.0.22")
7236 (source (origin
7237 (method url-fetch)
7238 (uri (pypi-uri "ipaddress" version))
7239 (sha256
7240 (base32
7241 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7242 (build-system python-build-system)
7243 (home-page "https://github.com/phihag/ipaddress")
7244 (synopsis "IP address manipulation library")
7245 (description
7246 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7247 in Python. This library is used to create, poke at, and manipulate IPv4 and
7248 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7249 module to older versions of Python.")
7250 (license license:psfl)))
7251
7252 (define-public python2-ipaddress
7253 (package-with-python2 python-ipaddress))
7254
7255 (define-public python2-ipaddr
7256 (package
7257 (name "python2-ipaddr")
7258 (version "2.1.11")
7259 (source
7260 (origin
7261 (method url-fetch)
7262 (uri (pypi-uri "ipaddr" version))
7263 (sha256
7264 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7265 (build-system python-build-system)
7266 (arguments
7267 `(#:python ,python-2 ;version 2 only
7268 #:phases
7269 (modify-phases %standard-phases
7270 (replace 'check
7271 (lambda _ (invoke "python" "ipaddr_test.py"))))))
7272 (home-page "https://github.com/google/ipaddr-py")
7273 (synopsis "IP address manipulation library")
7274 (description
7275 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7276 IPv6 addresses and networks.
7277
7278 For new implementations you may prefer to use the standard module
7279 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
7280 versions of Python.")
7281 (license license:asl2.0)))
7282
7283 (define-public python-idna
7284 (package
7285 (name "python-idna")
7286 (version "2.8")
7287 (source
7288 (origin
7289 (method url-fetch)
7290 (uri (pypi-uri "idna" version))
7291 (sha256
7292 (base32
7293 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
7294 (build-system python-build-system)
7295 (home-page "https://github.com/kjd/idna")
7296 (synopsis "Internationalized domain names in applications")
7297 (description
7298 "This is a library to support the Internationalised Domain Names in
7299 Applications (IDNA) protocol as specified in RFC 5891. This version of the
7300 protocol is often referred to as “IDNA2008” and can produce different results
7301 from the earlier standard from 2003. The library is also intended to act as a
7302 suitable drop-in replacement for the “encodings.idna” module that comes with
7303 the Python standard library but currently only supports the older 2003
7304 specification.")
7305 (license license:bsd-4)))
7306
7307 (define-public python-idna-2.7
7308 (package (inherit python-idna)
7309 (version "2.7")
7310 (source (origin
7311 (method url-fetch)
7312 (uri (pypi-uri "idna" version))
7313 (sha256
7314 (base32
7315 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7316
7317
7318 (define-public python2-idna
7319 (package-with-python2 python-idna))
7320
7321 (define-public python-idna-ssl
7322 (package
7323 (name "python-idna-ssl")
7324 (version "1.0.1")
7325 (source
7326 (origin
7327 (method url-fetch)
7328 (uri (pypi-uri "idna-ssl" version))
7329 (sha256
7330 (base32
7331 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7332 (build-system python-build-system)
7333 (arguments
7334 `(#:tests? #f)) ;circular dependency with python-aiohttp
7335 (home-page "https://github.com/aio-libs/idna-ssl")
7336 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7337 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7338 domains support.")
7339 (license license:expat)))
7340
7341 (define-public python-pretend
7342 (package
7343 (name "python-pretend")
7344 (version "1.0.9")
7345 (source
7346 (origin
7347 (method url-fetch)
7348 (uri (pypi-uri "pretend" version))
7349 (sha256
7350 (base32
7351 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7352 (build-system python-build-system)
7353 (home-page "https://github.com/alex/pretend")
7354 (synopsis "Library for stubbing in Python")
7355 (description
7356 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7357 technique for writing tests. You may hear the term mixed up with mocks,
7358 fakes, or doubles. Basically, a stub is an object that returns pre-canned
7359 responses, rather than doing any computation.")
7360 (license license:bsd-3)))
7361
7362 (define-public python2-pretend
7363 (package-with-python2 python-pretend))
7364
7365 (define-public python-pip
7366 (package
7367 (name "python-pip")
7368 (version "19.2.1")
7369 (source
7370 (origin
7371 (method url-fetch)
7372 (uri (pypi-uri "pip" version))
7373 (sha256
7374 (base32
7375 "100sd12ss4mbdj5lf3wawad29cm573b27765mq098x6xhcj71395"))))
7376 (build-system python-build-system)
7377 (arguments
7378 '(#:tests? #f)) ; there are no tests in the pypi archive.
7379 (home-page "https://pip.pypa.io/")
7380 (synopsis "Package manager for Python software")
7381 (description
7382 "Pip is a package manager for Python software, that finds packages on the
7383 Python Package Index (PyPI).")
7384 (license license:expat)))
7385
7386 (define-public python2-pip
7387 (package-with-python2 python-pip))
7388
7389 (define-public python-tlsh
7390 (package
7391 (name "python-tlsh")
7392 (version "3.4.5")
7393 (home-page "https://github.com/trendmicro/tlsh")
7394 (source
7395 (origin
7396 (method git-fetch)
7397 (uri (git-reference
7398 (url "https://github.com/trendmicro/tlsh.git")
7399 (commit (string-append "v" version))))
7400 (file-name (git-file-name name version))
7401 (sha256
7402 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
7403 (build-system cmake-build-system)
7404 (arguments
7405 '(#:out-of-source? #f
7406 #:phases (modify-phases %standard-phases
7407 (replace
7408 'install
7409 (lambda* (#:key outputs #:allow-other-keys)
7410 ;; Build and install the Python bindings. The underlying
7411 ;; C++ library is apparently not meant to be installed.
7412 (let ((out (assoc-ref outputs "out")))
7413 (with-directory-excursion "py_ext"
7414 (and (system* "python" "setup.py" "build")
7415 (system* "python" "setup.py" "install"
7416 (string-append "--prefix=" out))))))))))
7417 (inputs `(("python" ,python-wrapper))) ;for the bindings
7418 (synopsis "Fuzzy matching library for Python")
7419 (description
7420 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7421 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7422 value which can be used for similarity comparisons. Similar objects have
7423 similar hash values, which allows for the detection of similar objects by
7424 comparing their hash values. The byte stream should have a sufficient amount
7425 of complexity; for example, a byte stream of identical bytes will not generate
7426 a hash value.")
7427 (license license:asl2.0)))
7428
7429 (define-public python2-tlsh
7430 (package
7431 (inherit python-tlsh)
7432 (name "python2-tlsh")
7433 (inputs `(("python" ,python-2)))))
7434
7435 (define-public python-termcolor
7436 (package
7437 (name "python-termcolor")
7438 (version "1.1.0")
7439 (source
7440 (origin
7441 (method url-fetch)
7442 (uri (pypi-uri "termcolor" version))
7443 (sha256
7444 (base32
7445 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7446 (build-system python-build-system)
7447 (arguments
7448 ;; There are no tests.
7449 `(#:tests? #f))
7450 (home-page "https://pypi.python.org/pypi/termcolor")
7451 (synopsis "ANSII Color formatting for terminal output")
7452 (description
7453 "This package provides ANSII Color formatting for output in terminals.")
7454 (license license:expat)))
7455
7456 (define-public python2-termcolor
7457 (package-with-python2 python-termcolor))
7458
7459 (define-public python-libarchive-c
7460 (package
7461 (name "python-libarchive-c")
7462 (version "2.8")
7463 (source (origin
7464 (method url-fetch)
7465 (uri (pypi-uri "libarchive-c" version))
7466 (sha256
7467 (base32
7468 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
7469 (build-system python-build-system)
7470 (arguments
7471 '(#:phases (modify-phases %standard-phases
7472 (add-before
7473 'build 'reference-libarchive
7474 (lambda* (#:key inputs #:allow-other-keys)
7475 ;; Retain the absolute file name of libarchive.so.
7476 (let ((libarchive (assoc-ref inputs "libarchive")))
7477 (substitute* "libarchive/ffi.py"
7478 (("find_library\\('archive'\\)")
7479 (string-append "'" libarchive
7480 "/lib/libarchive.so'"))))))
7481 (replace 'check
7482 (lambda _ (invoke "pytest" "-vv"))))))
7483 (native-inputs
7484 `(("python-mock" ,python-mock)
7485 ("python-pytest" ,python-pytest)))
7486 (inputs
7487 `(("libarchive" ,libarchive)))
7488 (home-page "https://github.com/Changaco/python-libarchive-c")
7489 (synopsis "Python interface to libarchive")
7490 (description
7491 "This package provides Python bindings to libarchive, a C library to
7492 access possibly compressed archives in many different formats. It uses
7493 Python's @code{ctypes} foreign function interface (FFI).")
7494 (license license:lgpl2.0+)))
7495
7496 (define-public python2-libarchive-c
7497 (package-with-python2 python-libarchive-c))
7498
7499 (define-public python-file
7500 (package
7501 (inherit file)
7502 (name "python-file")
7503 (build-system python-build-system)
7504 (arguments
7505 '(#:tests? #f ;no tests
7506 #:configure-flags '("--single-version-externally-managed" "--root=/")
7507 #:phases (modify-phases %standard-phases
7508 (add-before 'build 'change-directory
7509 (lambda _
7510 (chdir "python")
7511 #t))
7512 (add-before 'build 'set-library-file-name
7513 (lambda* (#:key inputs #:allow-other-keys)
7514 (let ((file (assoc-ref inputs "file")))
7515 (substitute* "magic.py"
7516 (("find_library\\('magic'\\)")
7517 (string-append "'" file "/lib/libmagic.so'")))
7518 #t))))))
7519 (inputs `(("file" ,file)))
7520 (native-inputs (if (%current-target-system)
7521 `(("self" ,this-package))
7522 '()))
7523 (synopsis "Python bindings to the libmagic file type guesser. Note that
7524 this module and the python-magic module both provide a \"magic.py\" file;
7525 these two modules, which are different and were developed separately, both
7526 serve the same purpose: provide Python bindings for libmagic.")))
7527
7528 (define-public python2-file
7529 (package-with-python2 python-file))
7530
7531 (define-public python-debian
7532 (package
7533 (name "python-debian")
7534 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
7535 (version "0.1.36")
7536 (source
7537 (origin
7538 ;; Use git-fetch, as pypi doesn't include test suite.
7539 (method git-fetch)
7540 (uri (git-reference
7541 (url home-page)
7542 (commit version)))
7543 (file-name (git-file-name name version))
7544 (sha256
7545 (base32
7546 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
7547 (build-system python-build-system)
7548 (arguments
7549 `(#:phases (modify-phases %standard-phases
7550 (add-after 'unpack 'remove-debian-specific-tests
7551 ;; python-apt, apt and dpkg are not yet available in guix,
7552 ;; and these tests heavily depend on them.
7553 (lambda _
7554 (delete-file "lib/debian/tests/test_deb822.py")
7555 (delete-file "lib/debian/tests/test_debfile.py")
7556 #t)))))
7557 (propagated-inputs
7558 `(("python-six" ,python-six)
7559 ("python-chardet" ,python-chardet)))
7560 (synopsis "Debian package related modules")
7561 (description
7562 ;; XXX: Use @enumerate instead of @itemize to work around
7563 ;; <http://bugs.gnu.org/21772>.
7564 "This package provides Python modules that abstract many formats of
7565 Debian-related files, such as:
7566
7567 @enumerate
7568 @item Debtags information;
7569 @item @file{debian/changelog} files;
7570 @item packages files, pdiffs;
7571 @item control files of single or multiple RFC822-style paragraphs---e.g.
7572 @file{debian/control}, @file{.changes}, @file{.dsc};
7573 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7574 contained files and meta-information.
7575 @end enumerate\n")
7576
7577 ;; Modules are either GPLv2+ or GPLv3+.
7578 (license license:gpl3+)))
7579
7580 (define-public python2-debian
7581 (package-with-python2 python-debian))
7582
7583 (define-public python-nbformat
7584 (package
7585 (name "python-nbformat")
7586 (version "4.4.0")
7587 (source
7588 (origin
7589 (method url-fetch)
7590 (uri (pypi-uri "nbformat" version))
7591 (sha256
7592 (base32
7593 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7594 (build-system python-build-system)
7595 (arguments `(#:tests? #f)) ; no test target
7596 (propagated-inputs
7597 `(("python-ipython-genutils" ,python-ipython-genutils)
7598 ("python-jsonschema" ,python-jsonschema)
7599 ("python-jupyter-core" ,python-jupyter-core)
7600 ("python-traitlets" ,python-traitlets)))
7601 (home-page "http://jupyter.org")
7602 (synopsis "Jupyter Notebook format")
7603 (description "This package provides the reference implementation of the
7604 Jupyter Notebook format and Python APIs for working with notebooks.")
7605 (license license:bsd-3)))
7606
7607 (define-public python2-nbformat
7608 (package-with-python2 python-nbformat))
7609
7610 (define-public python-bleach
7611 (package
7612 (name "python-bleach")
7613 (version "3.1.0")
7614 (source
7615 (origin
7616 (method url-fetch)
7617 (uri (pypi-uri "bleach" version))
7618 (sha256
7619 (base32
7620 "1yhrgrhkln8bd6gn3imj69g1h4xqah9gaz9q26crqr6gmmvpzprz"))))
7621 (build-system python-build-system)
7622 (propagated-inputs
7623 `(("python-webencodings" ,python-webencodings)
7624 ("python-six" ,python-six)))
7625 (native-inputs
7626 `(("python-pytest" ,python-pytest)
7627 ("python-pytest-runner" ,python-pytest-runner-2)))
7628 (home-page "https://github.com/jsocol/bleach")
7629 (synopsis "Whitelist-based HTML-sanitizing tool")
7630 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7631 (license license:asl2.0)))
7632
7633 (define-public python2-bleach
7634 (package-with-python2 python-bleach))
7635
7636 (define-public python-entrypoints
7637 (package
7638 (name "python-entrypoints")
7639 (version "0.3")
7640 (source
7641 (origin
7642 (method url-fetch)
7643 (uri (pypi-uri "entrypoints" version))
7644 (sha256
7645 (base32
7646 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
7647 (build-system python-build-system)
7648 ;; The package does not come with a setup.py file, so we have to generate
7649 ;; one ourselves.
7650 (arguments
7651 `(#:tests? #f
7652 #:phases
7653 (modify-phases %standard-phases
7654 (add-after 'unpack 'create-setup.py
7655 (lambda _
7656 (call-with-output-file "setup.py"
7657 (lambda (port)
7658 (format port "\
7659 from setuptools import setup
7660 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7661 " ,version))))))))
7662 (home-page "https://github.com/takluyver/entrypoints")
7663 (synopsis "Discover and load entry points from installed Python packages")
7664 (description "Entry points are a way for Python packages to advertise
7665 objects with some common interface. The most common examples are
7666 @code{console_scripts} entry points, which define shell commands by
7667 identifying a Python function to run. The @code{entrypoints} module contains
7668 functions to find and load entry points.")
7669 (license license:expat)))
7670
7671 (define-public python2-entrypoints
7672 (package-with-python2 python-entrypoints))
7673
7674 (define-public python-nbconvert
7675 (package
7676 (name "python-nbconvert")
7677 (version "5.0.0b1")
7678 (source
7679 (origin
7680 (method url-fetch)
7681 (uri (pypi-uri "nbconvert" version))
7682 (sha256
7683 (base32
7684 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7685 (build-system python-build-system)
7686 (arguments
7687 `(;; The "bdist_egg" target is disabled by default, causing the installation
7688 ;; to fail.
7689 #:configure-flags (list "bdist_egg")
7690 ;; FIXME: 5 failures, 40 errors.
7691 #:tests? #f))
7692 ;; #:phases
7693 ;; (modify-phases %standard-phases
7694 ;; (replace 'check
7695 ;; (lambda _
7696 ;; (zero? (system* "py.test" "-v")))))
7697 (native-inputs
7698 `(("python-pytest" ,python-pytest)))
7699 (propagated-inputs
7700 `(("python-bleach" ,python-bleach)
7701 ("python-entrypoints" ,python-entrypoints)
7702 ("python-jinja2" ,python-jinja2)
7703 ("python-jupyter-core" ,python-jupyter-core)
7704 ("python-mistune" ,python-mistune)
7705 ("python-nbformat" ,python-nbformat)
7706 ("python-pygments" ,python-pygments)
7707 ("python-traitlets" ,python-traitlets)))
7708 (home-page "http://jupyter.org")
7709 (synopsis "Converting Jupyter Notebooks")
7710 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7711 notebooks to various other formats via Jinja templates. It allows you to
7712 convert an @code{.ipynb} notebook file into various static formats including:
7713
7714 @enumerate
7715 @item HTML
7716 @item LaTeX
7717 @item PDF
7718 @item Reveal JS
7719 @item Markdown (md)
7720 @item ReStructured Text (rst)
7721 @item executable script
7722 @end enumerate\n")
7723 (license license:bsd-3)))
7724
7725 (define-public python2-nbconvert
7726 (package-with-python2 python-nbconvert))
7727
7728 (define-public python-notebook
7729 (package
7730 (name "python-notebook")
7731 (version "5.7.4")
7732 (source (origin
7733 (method url-fetch)
7734 (uri (pypi-uri "notebook" version))
7735 (sha256
7736 (base32
7737 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7738 (build-system python-build-system)
7739 (arguments
7740 `(#:phases
7741 (modify-phases %standard-phases
7742 (replace 'check
7743 (lambda _
7744 ;; These tests require a browser
7745 (delete-file-recursively "notebook/tests/selenium")
7746 ;; Some tests need HOME
7747 (setenv "HOME" "/tmp")
7748 ;; This file contains "warningfilters", which are not supported
7749 ;; by this version of nose.
7750 (delete-file "setup.cfg")
7751 (with-directory-excursion "/tmp"
7752 (invoke "nosetests" "-v"))
7753 #t)))))
7754 (propagated-inputs
7755 `(("python-jupyter-core" ,python-jupyter-core)
7756 ("python-nbformat" ,python-nbformat)
7757 ("python-nbconvert" ,python-nbconvert)
7758 ("python-prometheus-client" ,python-prometheus-client)
7759 ("python-send2trash" ,python-send2trash)
7760 ("python-terminado" ,python-terminado)))
7761 (native-inputs
7762 `(("python-nose" ,python-nose)
7763 ("python-sphinx" ,python-sphinx)
7764 ("python-requests" ,python-requests)))
7765 (home-page "http://jupyter.org/")
7766 (synopsis "Web-based notebook environment for interactive computing")
7767 (description
7768 "The Jupyter HTML notebook is a web-based notebook environment for
7769 interactive computing.")
7770 (properties `((python2-variant . ,(delay python2-notebook))))
7771 (license license:bsd-3)))
7772
7773 (define-public python2-notebook
7774 (let ((base (package-with-python2
7775 (strip-python2-variant python-notebook))))
7776 (package (inherit base)
7777 (native-inputs
7778 `(("python2-mock" ,python2-mock)
7779 ,@(package-native-inputs base)))
7780 (arguments
7781 (substitute-keyword-arguments (package-arguments base)
7782 ((#:phases phases)
7783 `(modify-phases ,phases
7784 (add-before 'check 'disable-test-case
7785 ;; The test requires network access to localhost. Curiously it
7786 ;; fails with Python 2 only. Simply make the test-case return
7787 ;; immediately.
7788 (lambda _
7789 (substitute*
7790 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7791 (("formats = self.nbconvert_api") "return #")))))))))))
7792
7793 (define-public python-widgetsnbextension
7794 (package
7795 (name "python-widgetsnbextension")
7796 (version "3.4.2")
7797 (source
7798 (origin
7799 (method url-fetch)
7800 (uri (pypi-uri "widgetsnbextension" version))
7801 (sha256
7802 (base32
7803 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7804 (build-system python-build-system)
7805 (propagated-inputs
7806 `(("python-ipykernel" ,python-ipykernel)
7807 ("python-notebook" ,python-notebook)))
7808 (native-inputs
7809 `(("python-certifi" ,python-certifi)
7810 ("python-nose" ,python-nose)))
7811 (home-page "https://ipython.org")
7812 (synopsis "IPython HTML widgets for Jupyter")
7813 (description "This package provides interactive HTML widgets for Jupyter
7814 notebooks.")
7815 (license license:bsd-3)))
7816
7817 (define-public python2-widgetsnbextension
7818 (package-with-python2 python-widgetsnbextension))
7819
7820 (define-public python-ipywidgets
7821 (package
7822 (name "python-ipywidgets")
7823 (version "5.2.2")
7824 (source
7825 (origin
7826 (method url-fetch)
7827 (uri (pypi-uri "ipywidgets" version))
7828 (sha256
7829 (base32
7830 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7831 (build-system python-build-system)
7832 (propagated-inputs
7833 `(("python-ipython" ,python-ipython)
7834 ("python-traitlets" ,python-traitlets)
7835 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7836 (native-inputs
7837 `(("python-nose" ,python-nose)
7838 ("python-pytest" ,python-pytest)))
7839 (home-page "https://ipython.org")
7840 (synopsis "IPython HTML widgets for Jupyter")
7841 (description "Ipywidgets are interactive HTML widgets for Jupyter
7842 notebooks and the IPython kernel. Notebooks come alive when interactive
7843 widgets are used. Users gain control of their data and can visualize changes
7844 in the data.")
7845 (license license:bsd-3)))
7846
7847 (define-public python2-ipywidgets
7848 (package-with-python2 python-ipywidgets))
7849
7850 (define-public python-jupyter-console
7851 (package
7852 (name "python-jupyter-console")
7853 (version "6.0.0")
7854 (source
7855 (origin
7856 (method url-fetch)
7857 (uri (pypi-uri "jupyter_console" version))
7858 (sha256
7859 (base32
7860 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
7861 (build-system python-build-system)
7862 (propagated-inputs
7863 `(("python-ipykernel" ,python-ipykernel)
7864 ("python-jupyter-client" ,python-jupyter-client)
7865 ("python-prompt-toolkit" ,python-prompt-toolkit)
7866 ("python-pygments" ,python-pygments)))
7867 (native-inputs
7868 `(("python-nose" ,python-nose)))
7869 (home-page "https://jupyter.org")
7870 (synopsis "Jupyter terminal console")
7871 (description "This package provides a terminal-based console frontend for
7872 Jupyter kernels. It also allows for console-based interaction with non-Python
7873 Jupyter kernels such as IJulia and IRKernel.")
7874 (license license:bsd-3)))
7875
7876 (define-public python2-jupyter-console
7877 (package
7878 (name "python2-jupyter-console")
7879 (version "5.2.0")
7880 (source
7881 (origin
7882 (method url-fetch)
7883 (uri (pypi-uri "jupyter_console" version))
7884 (sha256
7885 (base32
7886 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7887 (build-system python-build-system)
7888 ;; Tests only run in an TTY.
7889 (arguments `(#:tests? #f))
7890 (propagated-inputs
7891 `(("python2-ipykernel" ,python2-ipykernel)
7892 ("python2-jupyter-client" ,python2-jupyter-client)
7893 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7894 ("python2-pygments" ,python2-pygments)))
7895 (native-inputs
7896 `(("python2-nose" ,python2-nose)))
7897 (home-page "https://jupyter.org")
7898 (synopsis "Jupyter terminal console")
7899 (description "This package provides a terminal-based console frontend for
7900 Jupyter kernels. It also allows for console-based interaction with non-Python
7901 Jupyter kernels such as IJulia and IRKernel.")
7902 (license license:bsd-3)))
7903
7904 ;; The python-ipython and python-jupyter-console require each other. To get
7905 ;; the functionality in both packages working, strip down the
7906 ;; python-jupyter-console package when using it as an input to python-ipython.
7907 (define python-jupyter-console-minimal
7908 (package
7909 (inherit python-jupyter-console)
7910 (name "python-jupyter-console-minimal")
7911 (arguments
7912 (substitute-keyword-arguments
7913 (package-arguments python-jupyter-console)
7914 ((#:phases phases)
7915 `(modify-phases ,phases
7916 (add-after 'install 'delete-bin
7917 (lambda* (#:key outputs #:allow-other-keys)
7918 ;; Delete the bin files, to avoid conflicts in profiles
7919 ;; where python-ipython and python-jupyter-console are
7920 ;; both present.
7921 (delete-file-recursively
7922 (string-append
7923 (assoc-ref outputs "out") "/bin"))))))))
7924 ;; Remove the python-ipython propagated input, to avoid the cycle
7925 (propagated-inputs
7926 (alist-delete
7927 "python-ipython"
7928 (package-propagated-inputs python-jupyter-console)))))
7929
7930 (define-public python-qtconsole
7931 (package
7932 (name "python-qtconsole")
7933 (version "4.4.3")
7934 (source
7935 (origin
7936 (method url-fetch)
7937 (uri (pypi-uri "qtconsole" version))
7938 (sha256
7939 (base32
7940 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
7941 (build-system python-build-system)
7942 (arguments
7943 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
7944 ;; but we only have the LTS version 5.x. This means that there might be
7945 ;; runtime errors, but since this is a dependency of the Jupyter package,
7946 ;; and Jupyter can be used without the qtconsole we can overlook this for
7947 ;; now.
7948 `(#:tests? #f
7949 #:phases
7950 (modify-phases %standard-phases
7951 (add-before 'check 'pre-check
7952 (lambda _
7953 (setenv "QT_QPA_PLATFORM" "offscreen")
7954 #t)))))
7955 (propagated-inputs
7956 `(("python-ipykernel" ,python-ipykernel)
7957 ("python-ipython" ,python-ipython)))
7958 (native-inputs
7959 `(("python-pytest" ,python-pytest)))
7960 (home-page "http://jupyter.org")
7961 (synopsis "Jupyter Qt console")
7962 (description "This package provides a Qt-based console for Jupyter with
7963 support for rich media output.")
7964 (license license:bsd-3)))
7965
7966 (define-public python-jsbeautifier
7967 (package
7968 (name "python-jsbeautifier")
7969 (version "1.10.2")
7970 (home-page "https://github.com/beautify-web/js-beautify")
7971 (source (origin
7972 (method git-fetch)
7973 (uri (git-reference
7974 (url home-page)
7975 (commit (string-append "v" version))))
7976 (file-name (git-file-name name version))
7977 (sha256
7978 (base32
7979 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
7980 (build-system python-build-system)
7981 (arguments
7982 `(#:phases (modify-phases %standard-phases
7983 (add-after 'unpack 'chdir
7984 (lambda _
7985 ;; The upstream Git repository contains all the code,
7986 ;; but this package only builds the python code.
7987 (chdir "python")
7988 #t))
7989 (add-after 'unpack 'patch-python-six-requirements
7990 (lambda _
7991 (substitute* "python/setup.py"
7992 (("six>=1.12.0")
7993 "six>=1.11.0"))
7994 #t)))))
7995 (propagated-inputs
7996 `(("python-editorconfig" ,python-editorconfig)
7997 ("python-six" ,python-six)))
7998 (native-inputs
7999 `(("python-pytest" ,python-pytest)))
8000 (synopsis "JavaScript unobfuscator and beautifier")
8001 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
8002 popular online obfuscators.")
8003 (license license:expat)))
8004
8005 (define-public jupyter
8006 (package
8007 (name "jupyter")
8008 (version "1.0.0")
8009 (source
8010 (origin
8011 (method url-fetch)
8012 (uri (pypi-uri "jupyter" version))
8013 (sha256
8014 (base32
8015 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8016 (build-system python-build-system)
8017 (arguments '(#:tests? #f)) ; there are none.
8018 (propagated-inputs
8019 `(("python-ipykernel" ,python-ipykernel)
8020 ("python-ipywidgets" ,python-ipywidgets)
8021 ("python-jupyter-console" ,python-jupyter-console)
8022 ("python-nbconvert" ,python-nbconvert)
8023 ("python-notebook" ,python-notebook)
8024 ("python-qtconsole" ,python-qtconsole)))
8025 (native-search-paths
8026 (list (search-path-specification
8027 (variable "JUPYTER_PATH")
8028 (files '("share/jupyter")))))
8029 (home-page "https://jupyter.org")
8030 (synopsis "Web application for interactive documents")
8031 (description
8032 "The Jupyter Notebook is a web application that allows you to create and
8033 share documents that contain live code, equations, visualizations and
8034 explanatory text. Uses include: data cleaning and transformation, numerical
8035 simulation, statistical modeling, machine learning and much more.")
8036 (license license:bsd-3)))
8037
8038 (define-public python-chardet
8039 (package
8040 (name "python-chardet")
8041 (version "3.0.4")
8042 (source
8043 (origin
8044 (method url-fetch)
8045 (uri (pypi-uri "chardet" version))
8046 (sha256
8047 (base32
8048 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
8049 (native-inputs
8050 `(("python-hypothesis" ,python-hypothesis)
8051 ("python-pytest" ,python-pytest)
8052 ("python-pytest-runner" ,python-pytest-runner)))
8053 (build-system python-build-system)
8054 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
8055 (arguments `(#:tests? #f))
8056 (home-page "https://github.com/chardet/chardet")
8057 (synopsis "Universal encoding detector for Python 2 and 3")
8058 (description
8059 "This package provides @code{chardet}, a Python module that can
8060 automatically detect a wide range of file encodings.")
8061 (license license:lgpl2.1+)))
8062
8063 (define-public python2-chardet
8064 (package-with-python2 python-chardet))
8065
8066 (define-public python-docopt
8067 (package
8068 (name "python-docopt")
8069 (version "0.6.2")
8070 (source
8071 (origin
8072 (method url-fetch)
8073 ;; The release on PyPI does not include tests.
8074 (uri (string-append
8075 "https://github.com/docopt/docopt/archive/"
8076 version ".tar.gz"))
8077 (file-name (string-append name "-" version ".tar.gz"))
8078 (sha256
8079 (base32
8080 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
8081 (build-system python-build-system)
8082 (native-inputs
8083 `(("python-pytest" ,python-pytest)))
8084 (arguments
8085 `(#:phases
8086 (modify-phases %standard-phases
8087 (replace 'check
8088 (lambda _ (invoke "py.test"))))))
8089 (home-page "http://docopt.org")
8090 (synopsis "Command-line interface description language for Python")
8091 (description "This library allows the user to define a command-line
8092 interface from a program's help message rather than specifying it
8093 programmatically with command-line parsers like @code{getopt} and
8094 @code{argparse}.")
8095 (license license:expat)))
8096
8097 (define-public python2-docopt
8098 (package-with-python2 python-docopt))
8099
8100 (define-public python-pythondialog
8101 (package
8102 (name "python-pythondialog")
8103 (version "3.4.0")
8104 (source
8105 (origin
8106 (method url-fetch)
8107 (uri (pypi-uri "pythondialog" version))
8108 (sha256
8109 (base32
8110 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8111 (build-system python-build-system)
8112 (arguments
8113 `(#:phases
8114 (modify-phases %standard-phases
8115 (add-after 'unpack 'patch-path
8116 (lambda* (#:key inputs #:allow-other-keys)
8117 (let* ((dialog (assoc-ref inputs "dialog")))
8118 ;; Since this library really wants to grovel the search path, we
8119 ;; must hardcode dialog's store path into it.
8120 (substitute* "dialog.py"
8121 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8122 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8123 #t))))
8124 #:tests? #f)) ; no test suite
8125 (propagated-inputs
8126 `(("dialog" ,dialog)))
8127 (home-page "http://pythondialog.sourceforge.net/")
8128 (synopsis "Python interface to the UNIX dialog utility")
8129 (description "A Python wrapper for the dialog utility. Its purpose is to
8130 provide an easy to use, pythonic and comprehensive Python interface to dialog.
8131 This allows one to make simple text-mode user interfaces on Unix-like systems")
8132 (license license:lgpl2.1)
8133 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8134
8135 (define-public python2-pythondialog
8136 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8137 (package
8138 (inherit base)
8139 (version (package-version python-pythondialog))
8140 (source (origin
8141 (method url-fetch)
8142 (uri (pypi-uri "python2-pythondialog" version))
8143 (sha256
8144 (base32
8145 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8146
8147 (define-public python-configobj
8148 (package
8149 (name "python-configobj")
8150 (version "5.0.6")
8151 (source (origin
8152 (method url-fetch)
8153 (uri (pypi-uri "configobj" version))
8154 (sha256
8155 (base32
8156 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8157 ;; Patch setup.py so it looks for python-setuptools, which is
8158 ;; required to parse the keyword 'install_requires' in setup.py.
8159 (patches (search-patches "python-configobj-setuptools.patch"))))
8160 (build-system python-build-system)
8161 (propagated-inputs
8162 `(("python-six" ,python-six)))
8163 (synopsis "Config file reading, writing and validation")
8164 (description "ConfigObj is a simple but powerful config file reader and
8165 writer: an ini file round tripper. Its main feature is that it is very easy to
8166 use, with a straightforward programmer’s interface and a simple syntax for
8167 config files.")
8168 (home-page "https://github.com/DiffSK/configobj")
8169 (license license:bsd-3)))
8170
8171 (define-public python2-configobj
8172 (package-with-python2 python-configobj))
8173
8174 (define-public python-configargparse
8175 (package
8176 (name "python-configargparse")
8177 (version "0.14.0")
8178 (source (origin
8179 (method url-fetch)
8180 (uri (pypi-uri "ConfigArgParse" version))
8181 (sha256
8182 (base32
8183 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
8184 (build-system python-build-system)
8185 (native-inputs
8186 `(("python-pyyaml" ,python-pyyaml)))
8187 (arguments
8188 `(#:phases
8189 (modify-phases %standard-phases
8190 (replace 'check
8191 (lambda _
8192 ;; Bypass setuptools-shim because one test relies on "setup.py"
8193 ;; being the first argument passed to the python call.
8194 ;;
8195 ;; NOTE: Many tests do not run because they rely on Python's
8196 ;; built-in test.test_argparse, but we remove the unit tests from
8197 ;; our Python installation.
8198 (invoke "python" "setup.py" "test"))))))
8199 (synopsis "Replacement for argparse")
8200 (description "A drop-in replacement for argparse that allows options to also
8201 be set via config files and/or environment variables.")
8202 (home-page "https://github.com/bw2/ConfigArgParse")
8203 (license license:expat)))
8204
8205 (define-public python2-configargparse
8206 (package-with-python2 python-configargparse))
8207
8208 (define-public python-argparse-manpage
8209 (package
8210 (name "python-argparse-manpage")
8211 (version "1.1")
8212 (source
8213 (origin
8214 (method url-fetch)
8215 (uri (pypi-uri "argparse-manpage" version))
8216 (sha256
8217 (base32
8218 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8219 (build-system python-build-system)
8220 (home-page "https://github.com/praiskup/argparse-manpage")
8221 (synopsis "Build manual page from Python's ArgumentParser object")
8222 (description
8223 "This package provides tools to build manual pages from Python's
8224 @code{ArgumentParser} object.")
8225 (license license:asl2.0)))
8226
8227 (define-public python-contextlib2
8228 (package
8229 (name "python-contextlib2")
8230 (version "0.5.5")
8231 (source
8232 (origin
8233 (method url-fetch)
8234 (uri (pypi-uri "contextlib2" version))
8235 (sha256
8236 (base32
8237 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8238 (build-system python-build-system)
8239 (home-page "http://contextlib2.readthedocs.org/")
8240 (synopsis "Tools for decorators and context managers")
8241 (description "This module is primarily a backport of the Python
8242 3.2 contextlib to earlier Python versions. Like contextlib, it
8243 provides utilities for common tasks involving decorators and context
8244 managers. It also contains additional features that are not part of
8245 the standard library.")
8246 (license license:psfl)))
8247
8248 (define-public python2-contextlib2
8249 (package
8250 (name "python2-contextlib2")
8251 (version "0.5.5")
8252 (source
8253 (origin
8254 (method url-fetch)
8255 (uri (pypi-uri "contextlib2" version))
8256 (sha256
8257 (base32
8258 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8259 (build-system python-build-system)
8260 (arguments
8261 `(#:python ,python-2
8262 #:phases
8263 (modify-phases %standard-phases
8264 (replace 'check
8265 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
8266 (native-inputs
8267 `(("python2-unittest2" ,python2-unittest2)))
8268 (home-page "http://contextlib2.readthedocs.org/")
8269 (synopsis "Tools for decorators and context managers")
8270 (description "This module is primarily a backport of the Python
8271 3.2 contextlib to earlier Python versions. Like contextlib, it
8272 provides utilities for common tasks involving decorators and context
8273 managers. It also contains additional features that are not part of
8274 the standard library.")
8275 (license license:psfl)))
8276
8277 (define-public python-texttable
8278 (package
8279 (name "python-texttable")
8280 (version "0.9.1")
8281 (source
8282 (origin
8283 (method url-fetch)
8284 (uri (pypi-uri "texttable" version))
8285 (sha256
8286 (base32
8287 "0yawv64c0zbawwv6zz84whb32fnb2n9jylwjcfsrcdgh7xvl340i"))))
8288 (build-system python-build-system)
8289 (arguments '(#:tests? #f)) ; no tests
8290 (home-page "https://github.com/foutaise/texttable/")
8291 (synopsis "Python module for creating simple ASCII tables")
8292 (description "Texttable is a Python module for creating simple ASCII
8293 tables.")
8294 (license license:lgpl2.1+)))
8295
8296 (define-public python2-texttable
8297 (package-with-python2 python-texttable))
8298
8299 (define-public python-atomicwrites
8300 (package
8301 (name "python-atomicwrites")
8302 (version "1.3.0")
8303 (source (origin
8304 (method url-fetch)
8305 (uri (pypi-uri "atomicwrites" version))
8306 (sha256
8307 (base32
8308 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
8309 (build-system python-build-system)
8310 (synopsis "Atomic file writes in Python")
8311 (description "Library for atomic file writes using platform dependent tools
8312 for atomic file system operations.")
8313 (home-page "https://github.com/untitaker/python-atomicwrites")
8314 (license license:expat)))
8315
8316 (define-public python2-atomicwrites
8317 (package-with-python2 python-atomicwrites))
8318
8319 (define-public python-click-threading
8320 (package
8321 (name "python-click-threading")
8322 (version "0.4.4")
8323 (source (origin
8324 (method url-fetch)
8325 (uri (pypi-uri "click-threading" version))
8326 (sha256
8327 (base32
8328 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8329 (build-system python-build-system)
8330 (propagated-inputs
8331 `(("python-click" ,python-click)))
8332 (synopsis "Utilities for multithreading in Click")
8333 (description "This package provides utilities for multithreading in Click
8334 applications.")
8335 (home-page "https://github.com/click-contrib/click-threading")
8336 (license license:expat)))
8337
8338 (define-public python-click-log
8339 (package
8340 (name "python-click-log")
8341 (version "0.3.2")
8342 (source (origin
8343 (method url-fetch)
8344 (uri (pypi-uri "click-log" version))
8345 (sha256
8346 (base32
8347 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8348 (build-system python-build-system)
8349 (propagated-inputs
8350 `(("python-click" ,python-click)))
8351 (synopsis "Logging for click applications")
8352 (description "This package provides a Python library for logging Click
8353 applications.")
8354 (home-page "https://github.com/click-contrib/click-log")
8355 (license license:expat)))
8356
8357 (define-public python-apipkg
8358 (package
8359 (name "python-apipkg")
8360 (version "1.4")
8361 (source (origin
8362 (method url-fetch)
8363 (uri (pypi-uri "apipkg" version))
8364 (sha256
8365 (base32
8366 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8367 (build-system python-build-system)
8368 (native-inputs
8369 `(("python-pytest" ,python-pytest)))
8370 (synopsis "Namespace control and lazy-import mechanism")
8371 (description "With apipkg you can control the exported namespace of a Python
8372 package and greatly reduce the number of imports for your users. It is a small
8373 pure Python module that works on virtually all Python versions.")
8374 (home-page "https://github.com/pytest-dev/apipkg")
8375 (license license:expat)))
8376
8377 (define-public python2-apipkg
8378 (package-with-python2 python-apipkg))
8379
8380 (define-public python-execnet
8381 (package
8382 (name "python-execnet")
8383 (version "1.4.1")
8384 (source (origin
8385 (method url-fetch)
8386 (uri (pypi-uri "execnet" version))
8387 (sha256
8388 (base32
8389 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8390 (build-system python-build-system)
8391 (arguments
8392 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8393 ;; The two test failures are caused by the lack of an `ssh` executable.
8394 ;; The test suite can be run with pytest after the 'install' phase.
8395 #:tests? #f))
8396 (native-inputs
8397 `(("python-pytest" ,python-pytest)
8398 ("python-setuptools-scm" ,python-setuptools-scm)))
8399 (propagated-inputs
8400 `(("python-apipkg" ,python-apipkg)))
8401 (synopsis "Rapid multi-Python deployment")
8402 (description "Execnet provides a share-nothing model with
8403 channel-send/receive communication for distributing execution across many
8404 Python interpreters across version, platform and network barriers. It has a
8405 minimal and fast API targeting the following uses:
8406 @enumerate
8407 @item distribute tasks to (many) local or remote CPUs
8408 @item write and deploy hybrid multi-process applications
8409 @item write scripts to administer multiple environments
8410 @end enumerate")
8411 (home-page "http://codespeak.net/execnet/")
8412 (license license:expat)))
8413
8414 (define-public python2-execnet
8415 (package-with-python2 python-execnet))
8416
8417 (define-public python-icalendar
8418 (package
8419 (name "python-icalendar")
8420 (version "4.0.4")
8421 (source (origin
8422 (method url-fetch)
8423 (uri (pypi-uri "icalendar" version))
8424 (sha256
8425 (base32
8426 "16gjvqv0n05jrb9g228pdjgzd3amz2pdhvcgsn1jypszjg5m2w9l"))))
8427 (build-system python-build-system)
8428 (propagated-inputs
8429 `(("python-dateutil" ,python-dateutil)
8430 ("python-pytz" ,python-pytz)))
8431 (synopsis "Python library for parsing iCalendar files")
8432 (description "The icalendar package is a parser/generator of iCalendar
8433 files for use with Python.")
8434 (home-page "https://github.com/collective/icalendar")
8435 (license license:bsd-2)))
8436
8437 (define-public python-args
8438 (package
8439 (name "python-args")
8440 (version "0.1.0")
8441 (source (origin
8442 (method url-fetch)
8443 (uri (pypi-uri "args" version))
8444 (sha256
8445 (base32
8446 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8447 (build-system python-build-system)
8448 (home-page "https://github.com/kennethreitz/args")
8449 (synopsis "Command-line argument parser")
8450 (description
8451 "This library provides a Python module to parse command-line arguments.")
8452 (license license:bsd-3)))
8453
8454 (define-public python2-args
8455 (package-with-python2 python-args))
8456
8457 (define-public python-clint
8458 (package
8459 (name "python-clint")
8460 (version "0.5.1")
8461 (source (origin
8462 (method url-fetch)
8463 (uri (pypi-uri "clint" version))
8464 (sha256
8465 (base32
8466 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8467 (build-system python-build-system)
8468 (arguments
8469 '(#:phases
8470 (modify-phases %standard-phases
8471 (replace 'check
8472 (lambda _ (invoke "py.test" "-v"))))))
8473 (native-inputs
8474 `(("python-pytest" ,python-pytest)))
8475 (propagated-inputs
8476 `(("python-args" ,python-args)))
8477 (home-page "https://github.com/kennethreitz/clint")
8478 (synopsis "Command-line interface tools")
8479 (description
8480 "Clint is a Python module filled with a set of tools for developing
8481 command-line applications, including tools for colored and indented
8482 output, progress bar display, and pipes.")
8483 (license license:isc)))
8484
8485 (define-public python2-clint
8486 (package-with-python2 python-clint))
8487
8488 (define-public python-rply
8489 (package
8490 (name "python-rply")
8491 (version "0.7.5")
8492 (source (origin
8493 (method url-fetch)
8494 (uri (pypi-uri "rply" version))
8495 (sha256
8496 (base32
8497 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8498 (build-system python-build-system)
8499 (propagated-inputs
8500 `(("python-appdirs" ,python-appdirs)))
8501 (home-page "https://github.com/alex/rply")
8502 (synopsis "Parser generator for Python")
8503 (description
8504 "This package provides a pure Python based parser generator, that also
8505 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8506 with a new public API, and RPython support.")
8507 (license license:bsd-3)))
8508
8509 (define-public python2-rply
8510 (package-with-python2 python-rply))
8511
8512 (define-public python-hy
8513 (package
8514 (name "python-hy")
8515 (version "0.13.0")
8516 (source (origin
8517 (method url-fetch)
8518 (uri (pypi-uri "hy" version))
8519 (sha256
8520 (base32
8521 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
8522 (build-system python-build-system)
8523 (arguments
8524 '(#:phases
8525 (modify-phases %standard-phases
8526 (add-before 'install 'set-HOME
8527 (lambda _
8528 (setenv "HOME" "/tmp")))
8529 (replace 'check
8530 (lambda _
8531 ;; Tests require write access to HOME.
8532 (setenv "HOME" "/tmp")
8533 (invoke "nosetests"))))))
8534 (native-inputs
8535 `(("python-coverage" ,python-coverage)
8536 ("python-nose" ,python-nose)))
8537 (propagated-inputs
8538 `(("python-astor" ,python-astor)
8539 ("python-clint" ,python-clint)
8540 ("python-rply" ,python-rply)))
8541 (home-page "http://hylang.org/")
8542 (synopsis "Lisp frontend to Python")
8543 (description
8544 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8545 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8546 Python at your fingertips, in Lisp form.")
8547 (license license:expat)))
8548
8549 (define-public python2-hy
8550 (package-with-python2 python-hy))
8551
8552 (define-public python2-functools32
8553 (package
8554 (name "python2-functools32")
8555 (version "3.2.3-2")
8556 (source
8557 (origin
8558 (method url-fetch)
8559 (uri (pypi-uri "functools32" version))
8560 (sha256
8561 (base32
8562 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8563 (build-system python-build-system)
8564 (arguments
8565 `(#:python ,python-2
8566 #:tests? #f)) ; no test target
8567 (home-page "https://github.com/MiCHiLU/python-functools32")
8568 (synopsis
8569 "Backport of the functools module from Python 3.2.3")
8570 (description
8571 "This package is a backport of the @code{functools} module from Python
8572 3.2.3 for use with older versions of Python and PyPy.")
8573 (license license:expat)))
8574
8575 (define-public python2-subprocess32
8576 (package
8577 (name "python2-subprocess32")
8578 (version "3.2.7")
8579 (source (origin
8580 (method url-fetch)
8581 (uri (pypi-uri "subprocess32" version))
8582 (sha256
8583 (base32
8584 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8585 (patches
8586 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8587 (build-system python-build-system)
8588 (arguments
8589 `(#:python ,python-2
8590 ;; The test suite fails with Python > 2.7.13:
8591 ;; import test.support
8592 ;; ImportError: No module named support
8593 #:tests? #f
8594 #:phases
8595 (modify-phases %standard-phases
8596 (add-after 'unpack 'patch-/bin/sh
8597 (lambda _
8598 (substitute* '("subprocess32.py"
8599 "test_subprocess32.py")
8600 (("/bin/sh") (which "sh")))
8601 #t)))))
8602 (home-page "https://github.com/google/python-subprocess32")
8603 (synopsis "Backport of the subprocess module from Python 3.2")
8604 (description
8605 "This is a backport of the @code{subprocess} standard library module
8606 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8607 new features. On POSIX systems it is guaranteed to be reliable when used
8608 in threaded applications. It includes timeout support from Python 3.3 but
8609 otherwise matches 3.2’s API.")
8610 (license license:psfl)))
8611
8612 (define-public python2-futures
8613 (package
8614 (name "python2-futures")
8615 (version "3.2.0")
8616 (source
8617 (origin
8618 (method url-fetch)
8619 (uri (pypi-uri "futures" version))
8620 (sha256
8621 (base32
8622 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8623 (build-system python-build-system)
8624 (arguments
8625 `(#:python ,python-2
8626 #:phases
8627 (modify-phases %standard-phases
8628 (replace 'check
8629 (lambda _
8630 (invoke "python" "test_futures.py")
8631 #t)))))
8632 (home-page "https://github.com/agronholm/pythonfutures")
8633 (synopsis
8634 "Backport of the concurrent.futures package from Python 3.2")
8635 (description
8636 "The concurrent.futures module provides a high-level interface for
8637 asynchronously executing callables. This package backports the
8638 concurrent.futures package from Python 3.2")
8639 (license license:bsd-3)))
8640
8641 (define-public python-promise
8642 (package
8643 (name "python-promise")
8644 (version "0.4.2")
8645 (source
8646 (origin
8647 (method url-fetch)
8648 (uri (pypi-uri "promise" version))
8649 (sha256
8650 (base32
8651 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8652 (build-system python-build-system)
8653 ;; Tests wants python-futures, which is a python2 only program, and
8654 ;; can't be found by python-promise at test time.
8655 (arguments `(#:tests? #f))
8656 (home-page "https://github.com/syrusakbary/promise")
8657 (synopsis "Promises/A+ implementation for Python")
8658 (description
8659 "Promises/A+ implementation for Python")
8660 (properties `((python2-variant . ,(delay python2-promise))))
8661 (license license:expat)))
8662
8663 (define-public python2-promise
8664 (let ((promise (package-with-python2
8665 (strip-python2-variant python-promise))))
8666 (package (inherit promise)
8667 (arguments (substitute-keyword-arguments (package-arguments promise)
8668 ((#:tests? _) #t)))
8669 (native-inputs
8670 `(("python2-futures" ,python2-futures)
8671 ("python2-pytest" ,python2-pytest)
8672 ,@(package-native-inputs promise))))))
8673
8674 (define-public python-progressbar33
8675 (package
8676 (name "python-progressbar33")
8677 (version "2.4")
8678 (source
8679 (origin
8680 (method url-fetch)
8681 (uri (pypi-uri "progressbar33" version))
8682 (sha256
8683 (base32
8684 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
8685 (build-system python-build-system)
8686 (home-page "http://github.com/germangh/python-progressbar")
8687 (synopsis "Text progress bar library for Python")
8688 (description
8689 "This package provides a text progress bar library for Python. This
8690 version only differs from the original @code{progressbar} package in that it
8691 uses relative package imports instead of absolute imports, which is necessary
8692 for the module to work under Python 3.3.")
8693 ;; Either or both of these licenses may be selected.
8694 (license (list license:lgpl2.1+ license:bsd-3))))
8695
8696 (define-public python-colorama
8697 (package
8698 (name "python-colorama")
8699 (version "0.3.9")
8700 (source
8701 (origin
8702 (method url-fetch)
8703 (uri (pypi-uri "colorama" version))
8704 (sha256
8705 (base32
8706 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
8707 (build-system python-build-system)
8708 (synopsis "Colored terminal text rendering for Python")
8709 (description "Colorama is a Python library for rendering colored terminal
8710 text.")
8711 (home-page "https://pypi.python.org/pypi/colorama")
8712 (license license:bsd-3)))
8713
8714 (define-public python2-colorama
8715 (package-with-python2 python-colorama))
8716
8717 (define-public python-rsa
8718 (package
8719 (name "python-rsa")
8720 (version "3.4.2")
8721 (source
8722 (origin
8723 (method url-fetch)
8724 (uri (pypi-uri "rsa" version))
8725 (sha256
8726 (base32
8727 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8728 (build-system python-build-system)
8729 (propagated-inputs
8730 `(("python-pyasn1" ,python-pyasn1)))
8731 (synopsis "Pure-Python RSA implementation")
8732 (description "Python-RSA is a pure-Python RSA implementation. It supports
8733 encryption and decryption, signing and verifying signatures, and key
8734 generation according to PKCS#1 version 1.5. It can be used as a Python
8735 library as well as on the command line.")
8736 (home-page "https://stuvel.eu/rsa")
8737 (license license:asl2.0)))
8738
8739 (define-public python2-rsa
8740 (package-with-python2 python-rsa))
8741
8742 (define-public python-pluggy
8743 (package
8744 (name "python-pluggy")
8745 (version "0.11.0")
8746 (source
8747 (origin
8748 (method url-fetch)
8749 (uri (pypi-uri "pluggy" version))
8750 (sha256
8751 (base32
8752 "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895"))))
8753 (build-system python-build-system)
8754 (native-inputs
8755 `(("python-setuptools-scm" ,python-setuptools-scm)))
8756 (synopsis "Plugin and hook calling mechanism for Python")
8757 (description "Pluggy is an extraction of the plugin manager as used by
8758 Pytest but stripped of Pytest specific details.")
8759 (home-page "https://pypi.python.org/pypi/pluggy")
8760 (license license:expat)))
8761
8762 (define-public python2-pluggy
8763 (package-with-python2 python-pluggy))
8764
8765 (define-public python-tox
8766 (package
8767 (name "python-tox")
8768 (version "2.8.1")
8769 (source
8770 (origin
8771 (method url-fetch)
8772 (uri (pypi-uri "tox" version))
8773 (sha256
8774 (base32
8775 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8776 (build-system python-build-system)
8777 (arguments
8778 ;; FIXME: Tests require pytest-timeout, which itself requires
8779 ;; pytest>=2.8.0 for installation.
8780 '(#:tests? #f))
8781 (propagated-inputs
8782 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8783 ("python-py" ,python-py)
8784 ("python-virtualenv" ,python-virtualenv)))
8785 (native-inputs
8786 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8787 ("python-pytest" ,python-pytest) ; >= 2.3.5
8788 ("python-setuptools-scm" ,python-setuptools-scm)))
8789 (home-page "http://tox.testrun.org/")
8790 (synopsis "Virtualenv-based automation of test activities")
8791 (description "Tox is a generic virtualenv management and test command line
8792 tool. It can be used to check that a package installs correctly with
8793 different Python versions and interpreters, or run tests in each type of
8794 supported environment, or act as a frontend to continuous integration
8795 servers.")
8796 (license license:expat)))
8797
8798 (define-public python2-tox
8799 (package-with-python2 python-tox))
8800
8801 (define-public python-jmespath
8802 (package
8803 (name "python-jmespath")
8804 (version "0.9.4")
8805 (source
8806 (origin
8807 (method url-fetch)
8808 (uri (pypi-uri "jmespath" version))
8809 (sha256
8810 (base32
8811 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
8812 (build-system python-build-system)
8813 (native-inputs
8814 `(("python-nose" ,python-nose)))
8815 (synopsis "JSON Matching Expressions")
8816 (description "JMESPath (pronounced “james path”) is a Python library that
8817 allows one to declaratively specify how to extract elements from a JSON
8818 document.")
8819 (home-page "https://github.com/jmespath/jmespath.py")
8820 (license license:expat)))
8821
8822 (define-public python2-jmespath
8823 (package-with-python2 python-jmespath))
8824
8825 (define-public python-botocore
8826 (package
8827 (name "python-botocore")
8828 (version "1.12.149")
8829 (source
8830 (origin
8831 (method url-fetch)
8832 (uri (pypi-uri "botocore" version))
8833 (sha256
8834 (base32
8835 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
8836 (build-system python-build-system)
8837 (arguments
8838 ;; FIXME: Many tests are failing.
8839 '(#:tests? #f))
8840 (propagated-inputs
8841 `(("python-dateutil" ,python-dateutil)
8842 ("python-docutils" ,python-docutils)
8843 ("python-jmespath" ,python-jmespath)))
8844 (native-inputs
8845 `(("python-mock" ,python-mock)
8846 ("python-nose" ,python-nose)
8847 ("behave" ,behave)
8848 ("python-tox" ,python-tox)
8849 ("python-urllib3" ,python-urllib3)
8850 ("python-wheel" ,python-wheel)))
8851 (home-page "https://github.com/boto/botocore")
8852 (synopsis "Low-level interface to AWS")
8853 (description "Botocore is a Python library that provides a low-level
8854 interface to the Amazon Web Services (AWS) API.")
8855 (license license:asl2.0)))
8856
8857 (define-public python2-botocore
8858 (package-with-python2 python-botocore))
8859
8860 (define-public python-xdo
8861 (package
8862 (name "python-xdo")
8863 (version "0.3")
8864 (source (origin
8865 (method url-fetch)
8866 (uri (string-append
8867 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8868 "python-xdo_" version ".orig.tar.gz"))
8869 (sha256
8870 (base32
8871 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8872 (build-system python-build-system)
8873 (arguments
8874 '(#:phases
8875 (modify-phases %standard-phases
8876 (add-before 'install 'patch-libxdo-path
8877 ;; Hardcode the path of dynamically loaded libxdo library.
8878 (lambda* (#:key inputs #:allow-other-keys)
8879 (let ((libxdo (string-append
8880 (assoc-ref inputs "xdotool")
8881 "/lib/libxdo.so")))
8882 (substitute* "xdo/_xdo.py"
8883 (("find_library\\(\"xdo\"\\)")
8884 (simple-format #f "\"~a\"" libxdo)))
8885 #t))))
8886 #:tests? #f)) ; no tests provided
8887 (propagated-inputs
8888 `(("python-six" ,python-six)))
8889 (inputs
8890 `(("xdotool" ,xdotool)
8891 ("libX11" ,libx11)))
8892 (home-page "https://tracker.debian.org/pkg/python-xdo")
8893 (synopsis "Python library for simulating X11 keyboard/mouse input")
8894 (description "Provides bindings to libxdo for manipulating X11 via simulated
8895 input. (Note that this is mostly a legacy library; you may wish to look at
8896 python-xdo for newer bindings.)")
8897 (license license:bsd-3)))
8898
8899 (define-public python2-xdo
8900 (package-with-python2 python-xdo))
8901
8902 (define-public python-mako
8903 (package
8904 (name "python-mako")
8905 (version "1.1.0")
8906 (source
8907 (origin
8908 (method url-fetch)
8909 (uri (pypi-uri "Mako" version))
8910 (sha256
8911 (base32
8912 "0jqa3qfpykyn4fmkn0kh6043sfls7br8i2bsdbccazcvk9cijsd3"))))
8913 (build-system python-build-system)
8914 (arguments
8915 `(#:phases (modify-phases %standard-phases
8916 (replace 'check
8917 (lambda _
8918 (invoke "pytest" "-vv"))))))
8919 (propagated-inputs
8920 `(("python-markupsafe" ,python-markupsafe)))
8921 (native-inputs
8922 `(("python-mock" ,python-mock)
8923 ("python-pytest" ,python-pytest)))
8924 (home-page "https://www.makotemplates.org/")
8925 (synopsis "Templating language for Python")
8926 (description "Mako is a templating language for Python that compiles
8927 templates into Python modules.")
8928 (license license:expat)))
8929
8930 (define-public python2-mako
8931 (package-with-python2 python-mako))
8932
8933 (define-public python-waitress
8934 (package
8935 (name "python-waitress")
8936 (version "1.1.0")
8937 (source
8938 (origin
8939 (method url-fetch)
8940 (uri (pypi-uri "waitress" version))
8941 (patches (search-patches "python-waitress-fix-tests.patch"))
8942 (sha256
8943 (base32
8944 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
8945 (build-system python-build-system)
8946 (home-page "https://github.com/Pylons/waitress")
8947 (synopsis "Waitress WSGI server")
8948 (description "Waitress is meant to be a production-quality pure-Python WSGI
8949 server with very acceptable performance.")
8950 (license license:zpl2.1)))
8951
8952 (define-public python2-waitress
8953 (package-with-python2 python-waitress))
8954
8955 (define-public python-whichcraft
8956 (package
8957 (name "python-whichcraft")
8958 (version "0.6.1")
8959 (source
8960 (origin
8961 (method url-fetch)
8962 (uri (pypi-uri "whichcraft" version))
8963 (sha256
8964 (base32
8965 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
8966 (build-system python-build-system)
8967 (native-inputs
8968 `(("python-pytest" ,python-pytest)))
8969 (home-page "https://github.com/pydanny/whichcraft")
8970 (synopsis "Cross-platform cross-python shutil.which functionality")
8971 (description
8972 "This package provides a shim of the shutil.which function that's
8973 designed to work across multiple versions of Python.")
8974 (license license:bsd-3)))
8975
8976 (define-public python-cookiecutter
8977 (package
8978 (name "python-cookiecutter")
8979 (version "1.6.0")
8980 (source
8981 (origin
8982 (method url-fetch)
8983 (uri (pypi-uri "cookiecutter" version))
8984 (sha256
8985 (base32
8986 "0glsvaz8igi2wy1hsnhm9fkn6560vdvdixzvkq6dn20z3hpaa5hk"))))
8987 (build-system python-build-system)
8988 (native-inputs
8989 `(("python-freezegun" ,python-freezegun)
8990 ("python-pytest" ,python-pytest)
8991 ("python-pytest-catchlog" ,python-pytest-catchlog)
8992 ("python-pytest-cov" ,python-pytest-cov)
8993 ("python-pytest-mock" ,python-pytest-mock)))
8994 (propagated-inputs
8995 `(("python-binaryornot" ,python-binaryornot)
8996 ("python-click" ,python-click)
8997 ("python-future" ,python-future)
8998 ("python-jinja2" ,python-jinja2)
8999 ("python-jinja2-time" ,python-jinja2-time)
9000 ("python-poyo" ,python-poyo)
9001 ("python-requests" ,python-requests)
9002 ("python-whichcraft" ,python-whichcraft)))
9003 (home-page "https://github.com/audreyr/cookiecutter")
9004 (synopsis
9005 "Command-line utility that creates projects from project templates")
9006 (description
9007 "This package provides a command-line utility that creates projects from
9008 project templates, e.g. creating a Python package project from a Python package
9009 project template.")
9010 (license license:bsd-3)))
9011
9012 (define-public python-pyquery
9013 (package
9014 (name "python-pyquery")
9015 (version "1.2.17")
9016 (source
9017 (origin
9018 (method url-fetch)
9019 (uri (pypi-uri "pyquery" version))
9020 (sha256
9021 (base32
9022 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9023 (build-system python-build-system)
9024 (native-inputs
9025 `(("python-webob" ,python-webob)
9026 ("python-webtest" ,python-webtest)))
9027 (propagated-inputs
9028 `(("python-lxml" ,python-lxml)
9029 ("python-cssselect" ,python-cssselect)))
9030 (home-page "https://github.com/gawel/pyquery")
9031 (synopsis "Make jQuery-like queries on xml documents")
9032 (description "pyquery allows you to make jQuery queries on xml documents.
9033 The API is as much as possible the similar to jQuery. pyquery uses lxml for
9034 fast xml and html manipulation.")
9035 (license license:bsd-3)))
9036
9037 (define-public python-anyjson
9038 (package
9039 (name "python-anyjson")
9040 (version "0.3.3")
9041 (source
9042 (origin
9043 (method url-fetch)
9044 (uri (pypi-uri "anyjson" version))
9045 (sha256
9046 (base32
9047 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9048 (build-system python-build-system)
9049 (arguments
9050 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9051 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9052 ;; whatever) so this transformation needs to be done before the tests
9053 ;; can be run. Maybe we could add a build step to transform beforehand
9054 ;; but it could be annoying/difficult.
9055 ;; We can enable tests for the Python 2 version, though, and do below.
9056 #:tests? #f))
9057 (home-page "https://bitbucket.org/runeh/anyjson/")
9058 (synopsis
9059 "Wraps best available JSON implementation in a common interface")
9060 (description
9061 "Anyjson loads whichever is the fastest JSON module installed
9062 and provides a uniform API regardless of which JSON implementation is used.")
9063 (license license:bsd-3)
9064 (properties `((python2-variant . ,(delay python2-anyjson))))))
9065
9066 (define-public python2-anyjson
9067 (let ((anyjson (package-with-python2
9068 (strip-python2-variant python-anyjson))))
9069 (package
9070 (inherit anyjson)
9071 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9072 #:tests? #t
9073 ,@(package-arguments anyjson)))
9074 (native-inputs `(("python2-nose" ,python2-nose))))))
9075
9076 (define-public python-amqp
9077 (package
9078 (name "python-amqp")
9079 (version "2.3.2")
9080 (source
9081 (origin
9082 (method url-fetch)
9083 (uri (pypi-uri "amqp" version))
9084 (sha256
9085 (base32
9086 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
9087 (build-system python-build-system)
9088 (native-inputs
9089 `(("python-case" ,python-case)
9090 ("python-pytest-sugar" ,python-pytest-sugar)
9091 ("python-mock" ,python-mock)))
9092 (propagated-inputs
9093 `(("python-vine" ,python-vine)))
9094 (home-page "https://github.com/celery/py-amqp")
9095 (synopsis
9096 "Low-level AMQP client for Python (fork of amqplib)")
9097 (description
9098 "This is a fork of amqplib which was originally written by Barry Pederson.
9099 It is maintained by the Celery project, and used by kombu as a pure python
9100 alternative when librabbitmq is not available.")
9101 (license license:lgpl2.1+)
9102 (properties `((python2-variant . ,(delay python2-amqp))))))
9103
9104 (define-public python2-amqp
9105 (let ((amqp (package-with-python2
9106 (strip-python2-variant python-amqp))))
9107 (package
9108 (inherit amqp)
9109 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9110 ;; unmaintained. Weirdly, does not do this on the python 3
9111 ;; version?
9112 #:tests? #f
9113 ,@(package-arguments amqp))))))
9114
9115 (define-public python-txamqp
9116 (package
9117 (name "python-txamqp")
9118 (version "0.8.2")
9119 (source
9120 (origin
9121 (method url-fetch)
9122 (uri (pypi-uri "txAMQP" version))
9123 (sha256
9124 (base32
9125 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
9126 (build-system python-build-system)
9127 (propagated-inputs
9128 `(("python-six" ,python-six)
9129 ("python-twisted" ,python-twisted)))
9130 (home-page "https://github.com/txamqp/txamqp")
9131 (synopsis "Communicate with AMQP peers and brokers using Twisted")
9132 (description
9133 "This package provides a Python library for communicating with AMQP peers
9134 and brokers using the asynchronous networking framework Twisted. It contains
9135 all the necessary code to connect, send and receive messages to/from an
9136 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
9137 also includes support for using Thrift RPC over AMQP in Twisted
9138 applications.")
9139 (license license:asl2.0)))
9140
9141 (define-public python2-txamqp
9142 (package-with-python2 python-txamqp))
9143
9144 (define-public python-kombu
9145 (package
9146 (name "python-kombu")
9147 (version "4.2.2")
9148 (source
9149 (origin
9150 (method url-fetch)
9151 (uri (pypi-uri "kombu" version))
9152 (sha256
9153 (base32
9154 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
9155 (build-system python-build-system)
9156 (native-inputs
9157 `(("python-mock" ,python-mock)
9158 ("python-case" ,python-case)
9159 ("python-pyro4" ,python-pyro4)
9160 ("python-pytest-sugar" ,python-pytest-sugar)
9161 ("python-pytz" ,python-pytz)))
9162 (propagated-inputs
9163 `(("python-anyjson" ,python-anyjson)
9164 ("python-amqp" ,python-amqp)
9165 ("python-redis" ,python-redis)))
9166 (home-page "https://kombu.readthedocs.io")
9167 (synopsis "Message passing library for Python")
9168 (description "The aim of Kombu is to make messaging in Python as easy as
9169 possible by providing an idiomatic high-level interface for the AMQ protocol,
9170 and also provide proven and tested solutions to common messaging problems.
9171 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9172 message orientation, queuing, routing, reliability and security, for which the
9173 RabbitMQ messaging server is the most popular implementation.")
9174 (license license:bsd-3)
9175 (properties `((python2-variant . ,(delay python2-kombu))))))
9176
9177 (define-public python2-kombu
9178 (let ((kombu (package-with-python2
9179 (strip-python2-variant python-kombu))))
9180 (package
9181 (inherit kombu)
9182 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9183 ;; It works fine on the python3 variant.
9184 #:tests? #f
9185 ,@(package-arguments kombu)))
9186 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9187 ,@(package-native-inputs kombu))))))
9188
9189 (define-public python-billiard
9190 (package
9191 (name "python-billiard")
9192 (version "3.5.0.5")
9193 (source
9194 (origin
9195 (method url-fetch)
9196 (uri (pypi-uri "billiard" version))
9197 (sha256
9198 (base32
9199 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9200 (build-system python-build-system)
9201 (native-inputs
9202 `(("python-case" ,python-case)
9203 ("python-pytest" ,python-pytest)))
9204 (home-page "https://github.com/celery/billiard")
9205 (synopsis
9206 "Python multiprocessing fork with improvements and bugfixes")
9207 (description
9208 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9209 multiprocessing package itself is a renamed and updated version of R Oudkerk's
9210 pyprocessing package. This standalone variant is intended to be compatible with
9211 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9212 (license license:bsd-3)
9213 (properties `((python2-variant . ,(delay python2-billiard))))))
9214
9215 (define-public python2-billiard
9216 (let ((billiard (package-with-python2
9217 (strip-python2-variant python-billiard))))
9218 (package
9219 (inherit billiard)
9220 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9221 ("python2-mock" ,python2-mock)
9222 ,@(package-native-inputs billiard))))))
9223
9224 (define-public python-celery
9225 (package
9226 (name "python-celery")
9227 (version "4.2.1")
9228 (source
9229 (origin
9230 (method url-fetch)
9231 (uri (pypi-uri "celery" version))
9232 (sha256
9233 (base32
9234 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9235 (build-system python-build-system)
9236 (arguments
9237 '(;; TODO The tests fail with Python 3.7
9238 ;; https://github.com/celery/celery/issues/4849
9239 #:tests? #f
9240 #:phases
9241 (modify-phases %standard-phases
9242 (add-after 'unpack 'patch-requirements
9243 (lambda _
9244 (substitute* "requirements/test.txt"
9245 (("pytest>=3\\.0,<3\\.3")
9246 "pytest>=3.0"))
9247 #t)))))
9248 (native-inputs
9249 `(("python-case" ,python-case)
9250 ("python-pytest" ,python-pytest)))
9251 (propagated-inputs
9252 `(("python-pytz" ,python-pytz)
9253 ("python-billiard" ,python-billiard)
9254 ("python-kombu" ,python-kombu)))
9255 (home-page "https://celeryproject.org")
9256 (synopsis "Distributed Task Queue")
9257 (description "Celery is an asynchronous task queue/job queue based on
9258 distributed message passing. It is focused on real-time operation, but
9259 supports scheduling as well. The execution units, called tasks, are executed
9260 concurrently on a single or more worker servers using multiprocessing,
9261 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9262 synchronously (wait until ready).")
9263 (license license:bsd-3)
9264 (properties `((python2-variant . ,(delay python2-celery))))))
9265
9266 (define-public python2-celery
9267 (let ((celery (package-with-python2
9268 (strip-python2-variant python-celery))))
9269 (package
9270 (inherit celery)
9271 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9272 ("python2-mock" ,python2-mock)
9273 ,@(package-native-inputs celery))))))
9274
9275 (define-public python-translitcodec
9276 (package
9277 (name "python-translitcodec")
9278 (version "0.4.0")
9279 (source
9280 (origin
9281 (method url-fetch)
9282 (uri (pypi-uri "translitcodec" version))
9283 (sha256
9284 (base32
9285 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9286 (build-system python-build-system)
9287 (arguments
9288 `(#:tests? #f)) ; no tests provided
9289 (home-page
9290 "https://github.com/claudep/translitcodec")
9291 (synopsis
9292 "Unicode to 8-bit charset transliteration codec")
9293 (description
9294 "This package contains codecs for transliterating ISO 10646 texts into
9295 best-effort representations using smaller coded character sets (ASCII,
9296 ISO 8859, etc.).")
9297 (license license:expat)))
9298
9299 (define-public python2-translitcodec
9300 (package-with-python2 python-translitcodec))
9301
9302 (define-public python-editor
9303 (package
9304 (name "python-editor")
9305 (version "0.5")
9306 (source
9307 (origin
9308 (method url-fetch)
9309 (uri (pypi-uri "python-editor" version))
9310 (sha256
9311 (base32
9312 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9313 (build-system python-build-system)
9314 (home-page
9315 "https://github.com/fmoo/python-editor")
9316 (synopsis
9317 "Programmatically open an editor, capture the result")
9318 (description
9319 "python-editor is a library that provides the editor module for
9320 programmatically interfacing with your system's $EDITOR.")
9321 (license license:asl2.0)))
9322
9323 (define-public python2-editor
9324 (package-with-python2 python-editor))
9325
9326 (define-public python-vobject
9327 (package
9328 (name "python-vobject")
9329 (version "0.9.5")
9330 (source (origin
9331 (method url-fetch)
9332 (uri (pypi-uri "vobject" version))
9333 (sha256
9334 (base32
9335 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9336 (build-system python-build-system)
9337 (arguments
9338 '(;; The test suite relies on some non-portable Windows interfaces.
9339 #:tests? #f))
9340 (propagated-inputs
9341 `(("python-dateutil" ,python-dateutil)
9342 ("python-pyicu" ,python-pyicu)))
9343 (synopsis "Parse and generate vCard and vCalendar files")
9344 (description "Vobject is intended to be a full featured Python package for
9345 parsing and generating vCard and vCalendar files. Currently, iCalendar files
9346 are supported and well tested. vCard 3.0 files are supported, and all data
9347 should be imported, but only a few components are understood in a sophisticated
9348 way.")
9349 (home-page "http://eventable.github.io/vobject/")
9350 (license license:asl2.0)))
9351
9352 (define-public python2-vobject
9353 (package-with-python2 python-vobject))
9354
9355 (define-public python-munkres
9356 (package
9357 (name "python-munkres")
9358 (version "1.0.8")
9359 (source (origin
9360 (method url-fetch)
9361 (uri (pypi-uri "munkres" version))
9362 (sha256
9363 (base32
9364 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9365 (build-system python-build-system)
9366 (arguments
9367 '(#:tests? #f)) ; no test suite
9368 (home-page "http://software.clapper.org/munkres/")
9369 (synopsis "Implementation of the Munkres algorithm")
9370 (description "The Munkres module provides an implementation of the Munkres
9371 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9372 useful for solving the Assignment Problem.")
9373 (license license:bsd-3)))
9374
9375 (define-public python2-munkres
9376 (package-with-python2 python-munkres))
9377
9378 (define-public python-whoosh
9379 (package
9380 (name "python-whoosh")
9381 (version "2.7.4")
9382 (source
9383 (origin
9384 (method url-fetch)
9385 (uri (pypi-uri "Whoosh" version))
9386 (sha256
9387 (base32
9388 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9389 (build-system python-build-system)
9390 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
9391 (native-inputs
9392 `(("python-pytest" ,python-pytest)))
9393 (home-page "https://bitbucket.org/mchaput/whoosh")
9394 (synopsis "Full text indexing, search, and spell checking library")
9395 (description
9396 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9397 checking library.")
9398 (license license:bsd-2)))
9399
9400 (define-public python2-whoosh
9401 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9402 (package (inherit whoosh)
9403 (propagated-inputs
9404 `(("python2-backport-ssl-match-hostname"
9405 ,python2-backport-ssl-match-hostname)
9406 ,@(package-propagated-inputs whoosh))))))
9407
9408 (define-public python-pathlib
9409 (package
9410 (name "python-pathlib")
9411 (version "1.0.1")
9412 (source (origin
9413 (method url-fetch)
9414 (uri (pypi-uri "pathlib" version))
9415 (sha256
9416 (base32
9417 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9418 (build-system python-build-system)
9419 ;; The tests depend on the internal "test" module, which does not provide
9420 ;; a stable interface.
9421 (arguments `(#:tests? #f))
9422 (home-page "https://pathlib.readthedocs.org/")
9423 (synopsis "Object-oriented file system paths")
9424 (description "Pathlib offers a set of classes to handle file system paths.
9425 It offers the following advantages over using string objects:
9426
9427 @enumerate
9428 @item No more cumbersome use of os and os.path functions. Everything can
9429 be done easily through operators, attribute accesses, and method calls.
9430 @item Embodies the semantics of different path types. For example,
9431 comparing Windows paths ignores casing.
9432 @item Well-defined semantics, eliminating any inconsistencies or
9433 ambiguities (forward vs. backward slashes, etc.).
9434 @end enumerate
9435
9436 Note: In Python 3.4, pathlib is now part of the standard library. For other
9437 Python versions please consider python-pathlib2 instead, which tracks the
9438 standard library module. This module (python-pathlib) isn't maintained
9439 anymore.")
9440 (license license:expat)))
9441
9442 (define-public python2-pathlib
9443 (package-with-python2 python-pathlib))
9444
9445 (define-public python2-pathlib2
9446 (package
9447 (name "python2-pathlib2")
9448 (version "2.3.3")
9449 (source (origin
9450 (method url-fetch)
9451 (uri (pypi-uri "pathlib2" version))
9452 (sha256
9453 (base32
9454 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
9455 (build-system python-build-system)
9456 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9457 ;; version is 3.4 which already includes this package as part of the
9458 ;; standard library.
9459 (arguments
9460 `(#:python ,python-2))
9461 (propagated-inputs
9462 `(("python2-scandir" ,python2-scandir)
9463 ("python2-six" ,python2-six)))
9464 (home-page "https://pypi.python.org/pypi/pathlib2/")
9465 (synopsis "Object-oriented file system paths - backport of standard
9466 pathlib module")
9467 (description "The goal of pathlib2 is to provide a backport of standard
9468 pathlib module which tracks the standard library module, so all the newest
9469 features of the standard pathlib can be used also on older Python versions.
9470
9471 Pathlib offers a set of classes to handle file system paths. It offers the
9472 following advantages over using string objects:
9473
9474 @enumerate
9475 @item No more cumbersome use of os and os.path functions. Everything can
9476 be done easily through operators, attribute accesses, and method calls.
9477 @item Embodies the semantics of different path types. For example,
9478 comparing Windows paths ignores casing.
9479 @item Well-defined semantics, eliminating any inconsistencies or
9480 ambiguities (forward vs. backward slashes, etc.).
9481 @end enumerate")
9482 (license license:expat)))
9483
9484 (define-public python2-pathlib2-bootstrap
9485 (hidden-package
9486 (package
9487 (inherit python2-pathlib2)
9488 (name "python2-pathlib2-bootstrap")
9489 (propagated-inputs
9490 `(("python2-scandir" ,python2-scandir)
9491 ("python2-six" ,python2-six-bootstrap))))))
9492
9493 (define-public python-jellyfish
9494 (package
9495 (name "python-jellyfish")
9496 (version "0.5.6")
9497 (source (origin
9498 (method url-fetch)
9499 (uri (pypi-uri "jellyfish" version))
9500 (sha256
9501 (base32
9502 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9503 (build-system python-build-system)
9504 (native-inputs
9505 `(("python-pytest" ,python-pytest)))
9506 (home-page "https://github.com/jamesturk/jellyfish")
9507 (synopsis "Approximate and phonetic matching of strings")
9508 (description "Jellyfish uses a variety of string comparison and phonetic
9509 encoding algorithms to do fuzzy string matching.")
9510 (license license:bsd-2)
9511 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9512
9513 (define-public python2-jellyfish
9514 (let ((jellyfish (package-with-python2
9515 (strip-python2-variant python-jellyfish))))
9516 (package (inherit jellyfish)
9517 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9518 ,@(package-native-inputs jellyfish))))))
9519
9520 (define-public python2-unicodecsv
9521 (package
9522 (name "python2-unicodecsv")
9523 (version "0.14.1")
9524 (source (origin
9525 (method url-fetch)
9526 ;; The test suite is not included in the PyPi release.
9527 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9528 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9529 "archive/" version ".tar.gz"))
9530 (file-name (string-append name "-" version ".tar.gz"))
9531 (sha256
9532 (base32
9533 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9534 (build-system python-build-system)
9535 (arguments
9536 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9537 #:python ,python-2))
9538 (native-inputs
9539 `(("python2-unittest2" ,python2-unittest2)))
9540 (home-page "https://github.com/jdunck/python-unicodecsv")
9541 (synopsis "Unicode CSV module for Python 2")
9542 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9543 module, adding support for Unicode strings.")
9544 (license license:bsd-2)))
9545
9546 (define-public python-rarfile
9547 (package
9548 (name "python-rarfile")
9549 (version "2.8")
9550 (source (origin
9551 (method url-fetch)
9552 (uri (pypi-uri "rarfile" version))
9553 (sha256
9554 (base32
9555 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9556 (build-system python-build-system)
9557 (arguments
9558 '(#:phases
9559 (modify-phases %standard-phases
9560 (replace 'check
9561 ;; Many tests fail, but the installation proceeds.
9562 (lambda _ (invoke "make" "-C" "test" "test"))))))
9563 (native-inputs
9564 `(("which" ,which))) ; required for tests
9565 (propagated-inputs
9566 `(("libarchive" ,libarchive)))
9567 (home-page "https://github.com/markokr/rarfile")
9568 (synopsis "RAR archive reader for Python")
9569 (description "This is Python module for RAR archive reading. The interface
9570 is made as zipfile like as possible.")
9571 (license license:isc)))
9572
9573 (define-public python2-rarfile
9574 (package-with-python2 python-rarfile))
9575
9576 (define-public python-magic
9577 (package
9578 (name "python-magic")
9579 (version "0.4.15")
9580 (source
9581 (origin
9582 (method url-fetch)
9583 (uri (pypi-uri "python-magic" version))
9584 (sha256
9585 (base32
9586 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9587 (file-name (string-append name "-" version "-checkout"))))
9588 (build-system python-build-system)
9589 (arguments
9590 ;; The tests are unreliable, so don't run them. The tests fail
9591 ;; under Python3 because they were written for Python2 and
9592 ;; contain import statements that do not work in Python3. One of
9593 ;; the tests fails under Python2 because its assertions are
9594 ;; overly stringent; it relies on comparing output strings which
9595 ;; are brittle and can change depending on the version of
9596 ;; libmagic being used and the system on which the test is
9597 ;; running. In my case, under GuixSD 0.10.0, only one test
9598 ;; failed, and it seems to have failed only because the version
9599 ;; of libmagic that is packaged in Guix outputs a slightly
9600 ;; different (but not wrong) string than the one that the test
9601 ;; expected.
9602 '(#:tests? #f
9603 #:phases (modify-phases %standard-phases
9604 ;; Replace a specific method call with a hard-coded
9605 ;; path to the necessary libmagic.so file in the
9606 ;; store. If we don't do this, then the method call
9607 ;; will fail to find the libmagic.so file, which in
9608 ;; turn will cause any application using
9609 ;; python-magic to fail.
9610 (add-before 'build 'hard-code-path-to-libmagic
9611 (lambda* (#:key inputs #:allow-other-keys)
9612 (let ((file (assoc-ref inputs "file")))
9613 (substitute* "magic.py"
9614 (("ctypes.util.find_library\\('magic'\\)")
9615 (string-append "'" file "/lib/libmagic.so'")))
9616 #t)))
9617 (add-before 'install 'disable-egg-compression
9618 (lambda _
9619 (let ((port (open-file "setup.cfg" "a")))
9620 (display "\n[easy_install]\nzip_ok = 0\n"
9621 port)
9622 (close-port port)
9623 #t))))))
9624 (inputs
9625 ;; python-magic needs to be able to find libmagic.so.
9626 `(("file" ,file)))
9627 (home-page
9628 "https://github.com/ahupp/python-magic")
9629 (synopsis
9630 "File type identification using libmagic")
9631 (description
9632 "This module uses ctypes to access the libmagic file type
9633 identification library. It makes use of the local magic database and
9634 supports both textual and MIME-type output. Note that this module and
9635 the python-file module both provide a \"magic.py\" file; these two
9636 modules, which are different and were developed separately, both serve
9637 the same purpose: to provide Python bindings for libmagic.")
9638 (license license:expat)))
9639
9640 (define-public python2-magic
9641 (package-with-python2 python-magic))
9642
9643 (define-public python2-s3cmd
9644 (package
9645 (name "python2-s3cmd")
9646 (version "1.6.1")
9647 (source
9648 (origin
9649 (method url-fetch)
9650 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9651 "s3cmd-" version ".tar.gz"))
9652 (sha256
9653 (base32
9654 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9655 (build-system python-build-system)
9656 (arguments
9657 ;; s3cmd is written for python2 only and contains no tests.
9658 `(#:python ,python-2
9659 #:tests? #f))
9660 (propagated-inputs
9661 `(("python2-dateutil" ,python2-dateutil)
9662 ;; The python-file package also provides a magic.py module.
9663 ;; This is an unfortunate state of affairs; however, s3cmd
9664 ;; fails to install if it cannot find specifically the
9665 ;; python-magic package. Thus we include it, instead of using
9666 ;; python-file. Ironically, s3cmd sometimes works better
9667 ;; without libmagic bindings at all:
9668 ;; https://github.com/s3tools/s3cmd/issues/198
9669 ("python2-magic" ,python2-magic)))
9670 (home-page "http://s3tools.org/s3cmd")
9671 (synopsis "Command line tool for S3-compatible storage services")
9672 (description
9673 "S3cmd is a command line tool for uploading, retrieving and managing data
9674 in storage services that are compatible with the Amazon Simple Storage
9675 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9676 GnuPG encryption, and more. It also supports management of Amazon's
9677 CloudFront content delivery network.")
9678 (license license:gpl2+)))
9679
9680 (define-public python-pkgconfig
9681 (package
9682 (name "python-pkgconfig")
9683 (version "1.3.1")
9684 (source
9685 (origin
9686 (method url-fetch)
9687 (uri (pypi-uri "pkgconfig" version))
9688 (sha256
9689 (base32
9690 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9691 (build-system python-build-system)
9692 (native-inputs
9693 `(("python-nose" ,python-nose)))
9694 (inputs
9695 `(("pkg-config" ,pkg-config)))
9696 (arguments
9697 `(#:phases
9698 (modify-phases %standard-phases
9699 (add-before 'build 'patch
9700 ;; Hard-code the path to pkg-config.
9701 (lambda _
9702 (substitute* "pkgconfig/pkgconfig.py"
9703 (("cmd = 'pkg-config")
9704 (string-append "cmd = '" (which "pkg-config"))))
9705 #t))
9706 (replace 'check
9707 (lambda _
9708 (invoke "nosetests" "test.py"))))))
9709 (home-page "https://github.com/matze/pkgconfig")
9710 (synopsis "Python interface for pkg-config")
9711 (description "This module provides a Python interface to pkg-config. It
9712 can be used to find all pkg-config packages, check if a package exists,
9713 check if a package meets certain version requirements, query CFLAGS and
9714 LDFLAGS and parse the output to build extensions with setup.py.")
9715 (license license:expat)))
9716
9717 (define-public python2-pkgconfig
9718 (package-with-python2 python-pkgconfig))
9719
9720 (define-public python-bz2file
9721 (package
9722 (name "python-bz2file")
9723 (version "0.98")
9724 (source
9725 (origin
9726 (method url-fetch)
9727 (uri (pypi-uri "bz2file" version))
9728 (sha256
9729 (base32
9730 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9731 (build-system python-build-system)
9732 (arguments
9733 `(#:tests? #f)) ; Tests use deprecated python modules.
9734 (home-page "https://github.com/nvawda/bz2file")
9735 (synopsis "Read and write bzip2-compressed files")
9736 (description
9737 "Bz2file is a Python library for reading and writing bzip2-compressed
9738 files. It contains a drop-in replacement for the I/O interface in the
9739 standard library's @code{bz2} module, including features from the latest
9740 development version of CPython that are not available in older releases.")
9741 (license license:asl2.0)))
9742
9743 (define-public python2-bz2file
9744 (package-with-python2 python-bz2file))
9745
9746 (define-public python-future
9747 (package
9748 (name "python-future")
9749 (version "0.17.1")
9750 (source
9751 (origin
9752 (method url-fetch)
9753 (uri (pypi-uri "future" version))
9754 (sha256
9755 (base32
9756 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
9757 (build-system python-build-system)
9758 ;; Many tests connect to the network or are otherwise flawed.
9759 ;; https://github.com/PythonCharmers/python-future/issues/210
9760 (arguments
9761 `(#:tests? #f))
9762 (home-page "http://python-future.org")
9763 (synopsis "Single-source support for Python 3 and 2")
9764 (description
9765 "@code{python-future} is the missing compatibility layer between Python 2 and
9766 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9767 to support both Python 2 and Python 3 with minimal overhead.")
9768 (license license:expat)))
9769
9770 (define-public python2-future
9771 (package-with-python2 python-future))
9772
9773 (define-public python-cysignals
9774 (package
9775 (name "python-cysignals")
9776 (version "1.9.0")
9777 (source
9778 (origin
9779 (method url-fetch)
9780 (uri (pypi-uri "cysignals" version))
9781 (sha256
9782 (base32
9783 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
9784 (build-system python-build-system)
9785 (native-inputs
9786 `(("python-cython" ,python-cython)
9787 ("python-sphinx" ,python-sphinx)))
9788 (inputs
9789 `(("pari-gp" ,pari-gp)))
9790 (arguments
9791 `(#:modules ((guix build python-build-system)
9792 ((guix build gnu-build-system) #:prefix gnu:)
9793 (guix build utils))
9794 ;; FIXME: Tests are executed after installation and currently fail
9795 ;; when not installing into standard locations; the author is working
9796 ;; on a fix.
9797 #:tests? #f
9798 #:phases
9799 (modify-phases %standard-phases
9800 (add-before
9801 'build 'configure
9802 (assoc-ref gnu:%standard-phases 'configure)))))
9803 (home-page
9804 "https://github.com/sagemath/cysignals")
9805 (synopsis
9806 "Handling of interrupts and signals for Cython")
9807 (description
9808 "The cysignals package provides mechanisms to handle interrupts (and
9809 other signals and errors) in Cython code, using two related approaches,
9810 for mixed Cython/Python code or external C libraries and pure Cython code,
9811 respectively.")
9812 (license license:lgpl3+)))
9813
9814 (define-public python2-cysignals
9815 (package-with-python2 python-cysignals))
9816
9817 (define-public python2-shedskin
9818 (package
9819 (name "python2-shedskin")
9820 (version "0.9.4")
9821 (source
9822 (origin
9823 (method url-fetch)
9824 (uri (string-append "https://github.com/shedskin/shedskin/"
9825 "releases/download/v" version
9826 "/shedskin-" version ".tgz"))
9827 (sha256
9828 (base32
9829 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9830 (build-system python-build-system)
9831 (arguments
9832 `(#:python ,python-2
9833 #:phases (modify-phases %standard-phases
9834 (add-after 'unpack 'fix-resulting-include-libs
9835 (lambda* (#:key inputs #:allow-other-keys)
9836 (let ((libgc (assoc-ref inputs "libgc"))
9837 (pcre (assoc-ref inputs "pcre")))
9838 (substitute* "shedskin/makefile.py"
9839 (("variable == 'CCFLAGS':[ ]*")
9840 (string-append "variable == 'CCFLAGS':\n"
9841 " line += ' -I " pcre "/include"
9842 " -I " libgc "/include'"))
9843 (("variable == 'LFLAGS':[ ]*")
9844 (string-append "variable == 'LFLAGS':\n"
9845 " line += ' -L" pcre "/lib"
9846 " -L " libgc "/lib'")))
9847 #t))))))
9848 (inputs `(("pcre" ,pcre)
9849 ("libgc" ,libgc)))
9850 (home-page "https://shedskin.github.io/")
9851 (synopsis "Experimental Python-2 to C++ Compiler")
9852 (description (string-append "This is an experimental compiler for a subset of
9853 Python. It generates C++ code and a Makefile."))
9854 (license (list license:gpl3 license:bsd-3 license:expat))))
9855
9856 (define-public python2-rope
9857 (package
9858 (name "python2-rope")
9859 (version "0.11.0")
9860 (source
9861 (origin
9862 (method url-fetch)
9863 (uri (pypi-uri "rope" version))
9864 (sha256
9865 (base32
9866 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
9867 (arguments
9868 ;; Rope has only partial python3 support, see `python-rope'
9869 `(#:python ,python-2))
9870 (build-system python-build-system)
9871 (native-inputs
9872 `(("python2-unittest2" ,python2-unittest2)))
9873 (home-page "https://github.com/python-rope/rope")
9874 (synopsis "Refactoring library for Python")
9875 (description "Rope is a refactoring library for Python. It facilitates
9876 the renaming, moving and extracting of attributes, functions, modules, fields
9877 and parameters in Python 2 source code. These refactorings can also be applied
9878 to occurrences in strings and comments.")
9879 (license license:gpl2)))
9880
9881 (define-public python-rope
9882 (package
9883 (inherit python2-rope)
9884 (name "python-rope")
9885 (arguments `(#:python ,python-wrapper
9886 ;; XXX: Only partial python3 support, results in some failing
9887 ;; tests: <https://github.com/python-rope/rope/issues/247>.
9888 #:tests? #f))
9889 (properties `((python2-variant . ,(delay python2-rope))))))
9890
9891 (define-public python-py3status
9892 (package
9893 (name "python-py3status")
9894 (version "3.21")
9895 (source
9896 (origin
9897 (method url-fetch)
9898 (uri (pypi-uri "py3status" version))
9899 (sha256
9900 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
9901 (build-system python-build-system)
9902 (inputs
9903 `(("file" ,file)))
9904 (arguments
9905 '(#:phases
9906 (modify-phases %standard-phases
9907 ;; 'file' is used for detection of configuration file encoding
9908 ;; let's make link the dependency to particular input
9909 (add-before 'build 'patch-file-path
9910 (lambda* (#:key inputs #:allow-other-keys)
9911 (let ((file-path (assoc-ref inputs "file")))
9912 (substitute* "py3status/parse_config.py"
9913 (("\\['file', '-b'")
9914 (string-append "['" file-path "/bin/file', '-b'")))
9915 #t))))
9916 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9917 (home-page "https://github.com/ultrabug/py3status")
9918 (synopsis "Extensible i3status wrapper written in Python")
9919 (description "py3status is an i3status wrapper which extends i3status
9920 functionality in a modular way, allowing you to extend your panel with your
9921 own code, responding to click events and updating clock every second.")
9922 (license license:bsd-3)))
9923
9924 (define-public python-tblib
9925 (package
9926 (name "python-tblib")
9927 (version "1.3.2")
9928 (source (origin
9929 (method url-fetch)
9930 (uri (pypi-uri "tblib" version))
9931 (sha256 (base32
9932 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9933 (build-system python-build-system)
9934 (arguments
9935 `(#:phases
9936 (modify-phases %standard-phases
9937 (add-before 'check 'adjust-tests
9938 (lambda _
9939 (when (which "python3")
9940 ;; Adjust the example output to match that of Python 3.7:
9941 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
9942 (substitute* "README.rst"
9943 (("Exception\\('fail',") "Exception('fail'"))
9944 #t)))
9945 (replace 'check
9946 (lambda _
9947 ;; Upstream runs tests after installation and the package itself
9948 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9949 ;; found.
9950 (setenv "PYTHONPATH"
9951 (string-append (getcwd) "/build/lib:"
9952 (getenv "PYTHONPATH")))
9953 (invoke "py.test" "-vv" "tests" "README.rst"))))))
9954 (native-inputs
9955 `(("python-pytest" ,python-pytest)
9956 ("python-six" ,python-six)))
9957 (home-page "https://github.com/ionelmc/python-tblib")
9958 (synopsis "Traceback serialization library")
9959 (description
9960 "Traceback serialization allows you to:
9961
9962 @enumerate
9963 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
9964 different processes. This allows better error handling when running code over
9965 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9966
9967 @item Parse traceback strings and raise with the parsed tracebacks.
9968 @end enumerate\n")
9969 (license license:bsd-3)))
9970
9971 (define-public python2-tblib
9972 (package-with-python2 python-tblib))
9973
9974 (define-public python-greenlet
9975 (package
9976 (name "python-greenlet")
9977 (version "0.4.15")
9978 (source (origin
9979 (method url-fetch)
9980 (uri (pypi-uri "greenlet" version))
9981 (sha256
9982 (base32
9983 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
9984 (build-system python-build-system)
9985 (home-page "https://greenlet.readthedocs.io/")
9986 (synopsis "Lightweight in-process concurrent programming")
9987 (description
9988 "Greenlet package is a spin-off of Stackless, a version of CPython
9989 that supports micro-threads called \"tasklets\". Tasklets run
9990 pseudo-concurrently (typically in a single or a few OS-level threads) and
9991 are synchronized with data exchanges on \"channels\".")
9992 (license (list license:psfl license:expat))))
9993
9994 (define-public python2-greenlet
9995 (package-with-python2 python-greenlet))
9996
9997 (define-public python-objgraph
9998 (package
9999 (name "python-objgraph")
10000 (version "3.4.0")
10001 (source
10002 (origin
10003 (method url-fetch)
10004 (uri (pypi-uri "objgraph" version))
10005 (sha256
10006 (base32
10007 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
10008 (build-system python-build-system)
10009 (propagated-inputs
10010 `(("python-graphviz" ,python-graphviz)))
10011 (native-inputs
10012 `(("python-mock" ,python-mock)
10013 ("graphviz" ,graphviz)))
10014 (home-page "https://mg.pov.lt/objgraph/")
10015 (synopsis "Draw Python object reference graphs with graphviz")
10016 (description
10017 "This package provides tools to draw Python object reference graphs with
10018 graphviz.")
10019 (license license:expat)))
10020
10021 (define-public python-gevent
10022 (package
10023 (name "python-gevent")
10024 (version "1.3.7")
10025 (source (origin
10026 (method url-fetch)
10027 (uri (pypi-uri "gevent" version))
10028 (sha256
10029 (base32
10030 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
10031 (modules '((guix build utils)))
10032 (snippet
10033 '(begin
10034 ;; unbunding libev and c-ares
10035 (delete-file-recursively "deps")
10036 #t))))
10037 (build-system python-build-system)
10038 (arguments
10039 `(#:modules ((ice-9 ftw)
10040 (ice-9 match)
10041 (srfi srfi-26)
10042 (guix build utils)
10043 (guix build python-build-system))
10044 #:phases (modify-phases %standard-phases
10045 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
10046 (lambda _
10047 (substitute* "src/gevent/subprocess.py"
10048 (("/bin/sh") (which "sh")))
10049 (for-each (lambda (file)
10050 (substitute* file
10051 (("/bin/sh") (which "sh"))
10052 (("/bin/true") (which "true"))))
10053 (find-files "src/greentest" "\\.py$"))
10054 #t))
10055 (add-before 'build 'do-not-use-bundled-sources
10056 (lambda* (#:key inputs #:allow-other-keys)
10057 (setenv "CONFIG_SHELL" (which "bash"))
10058 (setenv "LIBEV_EMBED" "false")
10059 (setenv "CARES_EMBED" "false")
10060 (setenv "EMBED" "false")
10061
10062 ;; Prevent building bundled libev.
10063 (substitute* "setup.py"
10064 (("run_make=_BUILDING")
10065 "run_make=False"))
10066
10067 (let ((greenlet (string-append
10068 (assoc-ref inputs "python-greenlet")
10069 "/include")))
10070 (match (scandir greenlet
10071 (lambda (item)
10072 (string-prefix? "python" item)))
10073 ((python)
10074 (setenv "C_INCLUDE_PATH"
10075 (string-append greenlet "/" python)))))
10076 #t))
10077 (add-before 'check 'skip-timer-test
10078 (lambda _
10079 ;; XXX: Skip 'TestTimerResolution', which appears to be
10080 ;; unreliable.
10081 (substitute* "src/greentest/test__core_timer.py"
10082 (("not greentest.RUNNING_ON_CI") "False"))
10083 #t))
10084 (replace 'check
10085 (lambda _
10086 ;; Make sure the build directory is on PYTHONPATH.
10087 (setenv "PYTHONPATH"
10088 (string-append
10089 (getenv "PYTHONPATH") ":"
10090 (getcwd) "/build/"
10091 (car (scandir "build" (cut string-prefix? "lib." <>)))))
10092 (with-directory-excursion "src/greentest"
10093 ;; XXX: Many tests require network access. Instead we only
10094 ;; run known-good tests. Unfortunately we cannot use
10095 ;; recursion here since this directory also contains
10096 ;; Python-version-specific subfolders.
10097 (apply invoke "python" "testrunner.py" "--config"
10098 "known_failures.py"
10099 (scandir "." (cut regexp-exec
10100 (make-regexp "test_+(subprocess|core)")
10101 <>)))))))))
10102 (propagated-inputs
10103 `(("python-greenlet" ,python-greenlet)
10104 ("python-objgraph" ,python-objgraph)))
10105 (native-inputs
10106 `(("python-six" ,python-six)))
10107 (inputs
10108 `(("c-ares" ,c-ares)
10109 ("libev" ,libev)))
10110 (home-page "http://www.gevent.org/")
10111 (synopsis "Coroutine-based network library")
10112 (description
10113 "gevent is a coroutine-based Python networking library that uses greenlet
10114 to provide a high-level synchronous API on top of the libev event loop.")
10115 (license license:expat)
10116 (properties `((python2-variant . ,(delay python2-gevent))))))
10117
10118 (define-public python2-gevent
10119 (let ((base (package-with-python2
10120 (strip-python2-variant python-gevent))))
10121 (package
10122 (inherit base)
10123 (native-inputs `(,@(package-native-inputs python-gevent)
10124 ("python-mock" ,python2-mock))))))
10125
10126 (define-public python-fastimport
10127 (package
10128 (name "python-fastimport")
10129 (version "0.9.6")
10130 (source
10131 (origin
10132 (method url-fetch)
10133 (uri (pypi-uri "fastimport" version))
10134 (sha256
10135 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10136 (build-system python-build-system)
10137 (home-page "https://github.com/jelmer/python-fastimport")
10138 (synopsis "VCS fastimport parser and generator in Python")
10139 (description "This package provides a parser for and generator of the Git
10140 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
10141 format.")
10142 (license license:gpl2+)))
10143
10144 (define-public python2-fastimport
10145 (package-with-python2 python-fastimport))
10146
10147 (define-public python-twisted
10148 (package
10149 (name "python-twisted")
10150 (version "19.7.0")
10151 (source (origin
10152 (method url-fetch)
10153 (uri (pypi-uri "Twisted" version ".tar.bz2"))
10154 (sha256
10155 (base32
10156 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
10157 (build-system python-build-system)
10158 (arguments
10159 '(#:tests? #f)) ; FIXME: some tests fail
10160 (propagated-inputs
10161 `(("python-zope-interface" ,python-zope-interface)
10162 ("python-pyhamcrest" ,python-pyhamcrest)
10163 ("python-incremental" ,python-incremental)
10164 ("python-hyperlink" ,python-hyperlink)
10165 ("python-constantly" ,python-constantly)
10166 ("python-automat" ,python-automat)))
10167 (home-page "https://twistedmatrix.com/")
10168 (synopsis "Asynchronous networking framework written in Python")
10169 (description
10170 "Twisted is an extensible framework for Python programming, with special
10171 focus on event-based network programming and multiprotocol integration.")
10172 (license license:expat)))
10173
10174 (define-public python2-twisted
10175 (package-with-python2 python-twisted))
10176
10177 (define-public python-pika
10178 (package
10179 (name "python-pika")
10180 (version "0.12.0")
10181 (source
10182 (origin
10183 (method url-fetch)
10184 (uri (pypi-uri "pika" version))
10185 (sha256
10186 (base32
10187 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10188 (build-system python-build-system)
10189 (native-inputs
10190 `(("python-pyev" ,python-pyev)
10191 ("python-tornado" ,python-tornado)
10192 ("python-twisted" ,python-twisted)))
10193 (home-page "https://pika.readthedocs.org")
10194 (synopsis "Pure Python AMQP Client Library")
10195 (description
10196 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10197 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10198 network support library.")
10199 (license license:bsd-3)))
10200
10201 (define-public python2-pika
10202 (package-with-python2 python-pika))
10203
10204 (define-public python-ply
10205 (package
10206 (name "python-ply")
10207 (version "3.10")
10208 (source
10209 (origin
10210 (method url-fetch)
10211 (uri (pypi-uri "ply" version))
10212 (sha256
10213 (base32
10214 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10215 (build-system python-build-system)
10216 (home-page "http://www.dabeaz.com/ply/")
10217 (synopsis "Python Lex & Yacc")
10218 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10219 It uses LR parsing and does extensive error checking.")
10220 (license license:bsd-3)))
10221
10222 (define-public python2-ply
10223 (package-with-python2 python-ply))
10224
10225 (define-public python-tabulate
10226 (package
10227 (name "python-tabulate")
10228 (version "0.7.7")
10229 (source (origin
10230 (method url-fetch)
10231 (uri (pypi-uri "tabulate" version))
10232 (sha256
10233 (base32
10234 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10235 (build-system python-build-system)
10236 (arguments
10237 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10238 ;; and the latest release is not tagged in the upstream repository.
10239 '(#:tests? #f))
10240 (home-page "https://bitbucket.org/astanin/python-tabulate")
10241 (synopsis "Pretty-print tabular data")
10242 (description
10243 "Tabulate is a library and command-line utility to pretty-print tabular
10244 data in Python.")
10245 (license license:expat)))
10246
10247 (define-public python2-tabulate
10248 (package-with-python2 python-tabulate))
10249
10250 (define-public python-kazoo
10251 (package
10252 (name "python-kazoo")
10253 (version "2.4.0")
10254 (source
10255 (origin
10256 (method url-fetch)
10257 (uri (pypi-uri "kazoo" version))
10258 (sha256
10259 (base32
10260 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10261 (build-system python-build-system)
10262 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10263 (propagated-inputs
10264 `(("python-six" ,python-six)))
10265 (home-page "https://kazoo.readthedocs.org")
10266 (synopsis "High-level Zookeeper client library")
10267 (description
10268 "Kazoo is a Python client library for the Apache Zookeeper distributed
10269 application service. It is designed to be easy to use and to avoid common
10270 programming errors.")
10271 (license license:asl2.0)))
10272
10273 (define-public python2-kazoo
10274 (package-with-python2 python-kazoo))
10275
10276 (define-public python-pykafka
10277 (package
10278 (name "python-pykafka")
10279 (version "2.4.0")
10280 (source (origin
10281 (method url-fetch)
10282 (uri (pypi-uri "pykafka" version))
10283 (sha256
10284 (base32
10285 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10286 (build-system python-build-system)
10287 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10288 (propagated-inputs
10289 `(("python-gevent" ,python-gevent)
10290 ("python-kazoo" ,python-kazoo)
10291 ("python-tabulate" ,python-tabulate)))
10292 (inputs
10293 `(("librdkafka" ,librdkafka)))
10294 (home-page "https://pykafka.readthedocs.io/")
10295 (synopsis "Apache Kafka client for Python")
10296 (description
10297 "PyKafka is a client for the Apache Kafka distributed messaging system.
10298 It includes Python implementations of Kafka producers and consumers, which
10299 are optionally backed by a C extension built on librdkafka.")
10300 (license license:asl2.0)))
10301
10302 (define-public python2-pykafka
10303 (package-with-python2 python-pykafka))
10304
10305 (define-public python-wcwidth
10306 (package
10307 (name "python-wcwidth")
10308 (version "0.1.7")
10309 (source
10310 (origin
10311 (method url-fetch)
10312 (uri (pypi-uri "wcwidth" version))
10313 (sha256
10314 (base32
10315 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
10316 (build-system python-build-system)
10317 (home-page "https://github.com/jquast/wcwidth")
10318 (synopsis "Measure number of terminal column cells of wide-character codes")
10319 (description "Wcwidth measures the number of terminal column cells of
10320 wide-character codes. It is useful for those implementing a terminal emulator,
10321 or programs that carefully produce output to be interpreted by one. It is a
10322 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10323 specified in POSIX.1-2001 and POSIX.1-2008.")
10324 (license license:expat)))
10325
10326 (define-public python2-wcwidth
10327 (package-with-python2 python-wcwidth))
10328
10329 (define-public python2-jsonrpclib
10330 (package
10331 (name "python2-jsonrpclib")
10332 (version "0.1.7")
10333 (source (origin
10334 (method url-fetch)
10335 (uri (pypi-uri "jsonrpclib" version))
10336 (sha256
10337 (base32
10338 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10339 (build-system python-build-system)
10340 (arguments
10341 `(#:tests? #f
10342 #:python ,python-2))
10343 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10344 (synopsis "Implementation of JSON-RPC specification for Python")
10345 (description
10346 "This library is an implementation of the JSON-RPC specification.
10347 It supports both the original 1.0 specification, as well as the
10348 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10349 etc.")
10350 (license license:asl2.0)))
10351
10352 (define-public python-chai
10353 (package
10354 (name "python-chai")
10355 (version "1.1.2")
10356 (source (origin
10357 (method url-fetch)
10358 (uri (pypi-uri "chai" version))
10359 (sha256
10360 (base32
10361 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10362 (build-system python-build-system)
10363 (home-page "https://github.com/agoragames/chai")
10364 (synopsis "Mocking framework for Python")
10365 (description
10366 "Chai provides an api for mocking, stubbing and spying your python
10367 objects, patterned after the Mocha library for Ruby.")
10368 (license license:bsd-3)))
10369
10370 (define-public python2-chai
10371 (package-with-python2 python-chai))
10372
10373 (define-public python-inflection
10374 (package
10375 (name "python-inflection")
10376 (version "0.3.1")
10377 (source
10378 (origin (method url-fetch)
10379 (uri (pypi-uri "inflection" version))
10380 (sha256
10381 (base32
10382 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10383 (build-system python-build-system)
10384 (native-inputs
10385 `(("python-pytest" ,python-pytest)))
10386 (home-page "https://github.com/jpvanhal/inflection")
10387 (synopsis "Python string transformation library")
10388 (description
10389 "Inflection is a string transformation library. It singularizes
10390 and pluralizes English words, and transforms strings from CamelCase to
10391 underscored string.")
10392 (license license:expat)))
10393
10394 (define-public python2-inflection
10395 (package-with-python2 python-inflection))
10396
10397 (define-public python-pylev
10398 (package
10399 (name "python-pylev")
10400 (version "1.3.0")
10401 (source (origin
10402 (method url-fetch)
10403 (uri (pypi-uri "pylev" version))
10404 (sha256
10405 (base32
10406 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10407 (build-system python-build-system)
10408 (home-page "https://github.com/toastdriven/pylev")
10409 (synopsis "Levenshtein distance implementation in Python")
10410 (description "Pure Python Levenshtein implementation, based off the
10411 Wikipedia code samples at
10412 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10413 (license license:bsd-3)))
10414
10415 (define-public python2-pylev
10416 (package-with-python2 python-pylev))
10417
10418 (define-public python-cleo
10419 (package
10420 (name "python-cleo")
10421 (version "0.6.8")
10422 (source (origin
10423 (method url-fetch)
10424 (uri (pypi-uri "cleo" version))
10425 (sha256
10426 (base32
10427 "06zp695hq835rkaq6irr1ds1dp2qfzyf32v60vxpd8rcnxv319l5"))))
10428 (build-system python-build-system)
10429 (native-inputs
10430 `( ;; For testing
10431 ("python-mock" ,python-mock)
10432 ("python-pytest-mock" ,python-pytest-mock)
10433 ("python-pytest" ,python-pytest)))
10434 (propagated-inputs
10435 `(("python-backpack" ,python-backpack)
10436 ("python-pastel" ,python-pastel)
10437 ("python-pylev" ,python-pylev)))
10438 (home-page "https://github.com/sdispater/cleo")
10439 (synopsis "Command-line arguments library for Python")
10440 (description
10441 "Cleo allows you to create command-line commands with signature in
10442 docstring and colored output.")
10443 (license license:expat)))
10444
10445 (define-public python2-cleo
10446 (package-with-python2 python-cleo))
10447
10448 (define-public python-tomlkit
10449 (package
10450 (name "python-tomlkit")
10451 (version "0.5.7")
10452 (source
10453 (origin
10454 (method url-fetch)
10455 (uri (pypi-uri "tomlkit" version))
10456 (sha256
10457 (base32
10458 "18820ga5z3if1w8dvykxrfm000akracq01ic402xrbljgbn5grn4"))))
10459 (build-system python-build-system)
10460 (native-inputs
10461 `(("python-pytest" ,python-pytest)))
10462 (home-page
10463 "https://github.com/sdispater/tomlkit")
10464 (synopsis "Style preserving TOML library")
10465 (description
10466 "TOML Kit is a 0.5.0-compliant TOML library. It includes a parser that
10467 preserves all comments, indentations, whitespace and internal element ordering,
10468 and makes them accessible and editable via an intuitive API. It can also
10469 create new TOML documents from scratch using the provided helpers. Part of the
10470 implementation as been adapted, improved and fixed from Molten.")
10471 (license license:expat)))
10472
10473 (define-public python-shellingham
10474 (package
10475 (name "python-shellingham")
10476 (version "1.3.1")
10477 (source
10478 (origin
10479 (method url-fetch)
10480 (uri (pypi-uri "shellingham" version))
10481 (sha256
10482 (base32
10483 "1q7kws7w4x2hji3g7y0ni9ddk4sd676ylrb3db54gbpys6xj6nwq"))))
10484 (build-system python-build-system)
10485 (home-page
10486 "https://github.com/sarugaku/shellingham")
10487 (synopsis "Tool to detect surrounding shell")
10488 (description
10489 "Shellingham detects what shell the current Python executable is
10490 running in.")
10491 (license license:isc)))
10492
10493 (define-public python-memcached
10494 (package
10495 (name "python-memcached")
10496 (version "1.59")
10497 (source
10498 (origin
10499 (method url-fetch)
10500 (uri (pypi-uri "python-memcached" version))
10501 (sha256
10502 (base32
10503 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))))
10504 (build-system python-build-system)
10505 (propagated-inputs `(("python-six" ,python-six)))
10506 (home-page
10507 "https://github.com/linsomniac/python-memcached")
10508 (synopsis "Pure python memcached client")
10509 (description
10510 "This software is a pure Python interface to the memcached memory cache
10511 daemon. It is the client side software which allows storing values in one or
10512 more, possibly remote, memcached servers.")
10513 (license license:psfl)))
10514
10515 (define-public python-clikit
10516 (package
10517 (name "python-clikit")
10518 (version "0.2.4")
10519 (source
10520 (origin
10521 (method url-fetch)
10522 (uri (pypi-uri "clikit" version))
10523 (sha256
10524 (base32
10525 "0dc8czib5f4j9px1ivcpqnmivnx2zjpc0xb00ldrhsqylks7r06n"))))
10526 (build-system python-build-system)
10527 (propagated-inputs
10528 `(("python-pastel" ,python-pastel)
10529 ("python-pylev" ,python-pylev)))
10530 (home-page "https://github.com/sdispater/clikit")
10531 (synopsis "Group of utilities to build command line interfaces")
10532 (description
10533 "CliKit is a group of utilities to build testable command line
10534 interfaces.")
10535 (license license:expat)))
10536
10537 (define-public python-msgpack-python
10538 (package
10539 (name "python-msgpack-python")
10540 (version "0.5.6")
10541 (source
10542 (origin
10543 (method url-fetch)
10544 (uri (pypi-uri "msgpack-python" version))
10545 (sha256
10546 (base32
10547 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
10548 (build-system python-build-system)
10549 (home-page "http://msgpack.org/")
10550 (synopsis "Package to deserialize messages in MessagePack binary format")
10551 (description
10552 "MessagePack is an efficient binary serialization format. It lets you
10553 exchange data among multiple languages like JSON. But it's faster and
10554 smaller. Small integers are encoded into a single byte, and typical short
10555 strings require only one extra byte in addition to the strings themselves.")
10556 (license license:asl2.0)))
10557
10558 (define-public python-cachy
10559 (package
10560 (name "python-cachy")
10561 (version "0.2.0")
10562 (source
10563 (origin
10564 (method url-fetch)
10565 (uri (pypi-uri "cachy" version))
10566 (sha256
10567 (base32
10568 "0v6mjyhgx6j7ya20bk69cr3gdzdkdf6psay0h090rscclgji65dp"))))
10569 (build-system python-build-system)
10570 (native-inputs
10571 `(("python-fakeredis" ,python-fakeredis)
10572 ("python-flexmock" ,python-flexmock)
10573 ("python-pytest" ,python-pytest)))
10574 (propagated-inputs
10575 `(("python-memcached" ,python-memcached)
10576 ("python-msgpack-python" ,python-msgpack-python)
10577 ("python-redis" ,python-redis)))
10578 (home-page "https://github.com/sdispater/cachy")
10579 (synopsis "Simple yet effective caching library")
10580 (description
10581 "Cachy provides a simple yet effective caching library. A simple but
10582 powerful API: thread-safety; decorator syntax; support for memcached, redis,
10583 database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
10584 (license license:expat)))
10585
10586 (define-public poetry
10587 (package
10588 (name "poetry")
10589 (version "0.12.17")
10590 ;; Poetry can only be built from source with poetry.
10591 (source
10592 (origin
10593 (method url-fetch)
10594 (uri (pypi-uri "poetry" version))
10595 (sha256
10596 (base32
10597 "0gxwcd65qjmzqzppf53x51sic1rbcd9py6cdzx3aprppipimslvf"))))
10598 (build-system python-build-system)
10599 (arguments
10600 `(#:tests? #f ;; Pypi does not have tests.
10601 #:phases
10602 (modify-phases %standard-phases
10603 (replace 'build
10604 (lambda _
10605 ;; Bug in poetry https://github.com/sdispater/poetry/issues/866.
10606 (invoke "sed" "-i" "-e" "s/from distutils.core/from setuptools/"
10607 "setup.py")
10608 #t)))))
10609 (propagated-inputs
10610 `(("python-cachecontrol" ,python-cachecontrol)
10611 ("python-cachy" ,python-cachy)
10612 ("python-cleo" ,python-cleo)
10613 ("python-glob2" ,python-glob2)
10614 ("python-html5lib" ,python-html5lib)
10615 ("python-jsonschema" ,python-jsonschema)
10616 ("python-msgpack" ,python-msgpack)
10617 ("python-pathlib2" ,python-pathlib2)
10618 ("python-pkginfo" ,python-pkginfo)
10619 ("python-pyparsing" ,python-pyparsing)
10620 ("python-pyrsistent" ,python-pyrsistent)
10621 ("python-requests" ,python-requests)
10622 ("python-requests-toolbelt" ,python-requests-toolbelt)
10623 ("python-shellingham" ,python-shellingham)
10624 ("python-tomlkit" ,python-tomlkit)
10625 ("python-virtualenv" ,python-virtualenv)))
10626 (home-page "https://poetry.eustace.io/")
10627 (synopsis "Python dependency management and packaging made easy")
10628 (description "Poetry is a tool for dependency management and packaging
10629 in Python. It allows you to declare the libraries your project depends on and
10630 it will manage (install/update) them for you.")
10631 (license license:expat)))
10632
10633 (define-public python-lazy-object-proxy
10634 (package
10635 (name "python-lazy-object-proxy")
10636 (version "1.4.3")
10637 (source (origin
10638 (method url-fetch)
10639 (uri (pypi-uri "lazy-object-proxy" version))
10640 (sha256
10641 (base32
10642 "1w1aaay424ciz8fz3fkzxb0pxzfxn184f2whpyn4fx72bn50x47k"))))
10643 (native-inputs
10644 `(("python-setuptools-scm" ,python-setuptools-scm-3.3)))
10645 (build-system python-build-system)
10646 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10647 (synopsis "Lazy object proxy for python")
10648 (description
10649 "Lazy object proxy is an object that wraps a callable but defers the call
10650 until the object is actually required, and caches the result of said call.")
10651 (license license:bsd-2)))
10652
10653 (define-public python2-lazy-object-proxy
10654 (package-with-python2 python-lazy-object-proxy))
10655
10656 (define-public python-dnspython
10657 (package
10658 (name "python-dnspython")
10659 (version "1.15.0")
10660 (source (origin
10661 (method url-fetch)
10662 (uri (string-append "http://www.dnspython.org/kits/"
10663 version "/dnspython-" version ".tar.gz"))
10664 (sha256
10665 (base32
10666 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10667 (build-system python-build-system)
10668 (arguments '(#:tests? #f)) ; XXX: requires internet access
10669 (home-page "http://www.dnspython.org")
10670 (synopsis "DNS toolkit for Python")
10671 (description
10672 "dnspython is a DNS toolkit for Python. It supports almost all record
10673 types. It can be used for queries, zone transfers, and dynamic updates.
10674 It supports TSIG authenticated messages and EDNS0.")
10675 (license license:expat)))
10676
10677 (define-public python2-dnspython
10678 (package-with-python2 python-dnspython))
10679
10680 (define-public python-email-validator
10681 (package
10682 (name "python-email-validator")
10683 (version "1.0.2")
10684 (source
10685 (origin (method url-fetch)
10686 (uri (pypi-uri "email_validator" version))
10687 (sha256
10688 (base32
10689 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10690 (build-system python-build-system)
10691 (arguments
10692 '(#:phases
10693 (modify-phases %standard-phases
10694 (add-before 'build 'use-dnspython
10695 (lambda _
10696 (substitute* "setup.py"
10697 (("dnspython3") "dnspython"))
10698 #t)))))
10699 (propagated-inputs
10700 `(("python-dnspython" ,python-dnspython)
10701 ("python-idna" ,python-idna)))
10702 (home-page "https://github.com/JoshData/python-email-validator")
10703 (synopsis "Email address validation library for Python")
10704 (description
10705 "This library validates email address syntax and deliverability.")
10706 (license license:cc0)))
10707
10708 (define-public python2-email-validator
10709 (package-with-python2 python-email-validator))
10710
10711 (define-public python-ukpostcodeparser
10712 (package
10713 (name "python-ukpostcodeparser")
10714 (version "1.0.3")
10715 (source (origin
10716 (method url-fetch)
10717 (uri (pypi-uri "UkPostcodeParser" version))
10718 (sha256
10719 (base32
10720 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10721 (build-system python-build-system)
10722 (home-page "https://github.com/hamstah/ukpostcodeparser")
10723 (synopsis "UK Postcode parser for Python")
10724 (description
10725 "This library provides the @code{parse_uk_postcode} function for
10726 parsing UK postcodes.")
10727 (license license:expat)))
10728
10729 (define-public python2-ukpostcodeparser
10730 (package-with-python2 python-ukpostcodeparser))
10731
10732 (define-public python-faker
10733 (package
10734 (name "python-faker")
10735 (version "0.7.9")
10736 (source (origin
10737 (method url-fetch)
10738 (uri (pypi-uri "Faker" version))
10739 (sha256
10740 (base32
10741 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10742 (patches
10743 (search-patches "python-faker-fix-build-32bit.patch"))
10744 (modules '((guix build utils)))
10745 (snippet
10746 '(begin
10747 (for-each delete-file (find-files "." "\\.pyc$"))
10748 #t))))
10749 (build-system python-build-system)
10750 (arguments
10751 '(#:phases
10752 (modify-phases %standard-phases
10753 (replace 'check
10754 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
10755 (native-inputs
10756 `(;; For testing
10757 ("python-email-validator" ,python-email-validator)
10758 ("python-mock" ,python-mock)
10759 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10760 (propagated-inputs
10761 `(("python-dateutil" ,python-dateutil)
10762 ("python-six" ,python-six)))
10763 (home-page "https://github.com/joke2k/faker")
10764 (synopsis "Python package that generates fake data")
10765 (description
10766 "Faker is a Python package that generates fake data such as names,
10767 addresses, and phone numbers.")
10768 (license license:expat)
10769 (properties `((python2-variant . ,(delay python2-faker))))))
10770
10771 (define-public python2-faker
10772 (let ((base (package-with-python2 (strip-python2-variant
10773 python-faker))))
10774 (package
10775 (inherit base)
10776 (propagated-inputs
10777 `(("python2-ipaddress" ,python2-ipaddress)
10778 ,@(package-propagated-inputs base))))))
10779
10780 (define-public python-pyaml
10781 (package
10782 (name "python-pyaml")
10783 (version "18.11.0")
10784 (source (origin
10785 (method url-fetch)
10786 (uri (pypi-uri "pyaml" version))
10787 (sha256
10788 (base32
10789 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
10790 (build-system python-build-system)
10791 (native-inputs
10792 `(("python-unidecode" ,python-unidecode)))
10793 (propagated-inputs
10794 `(("python-pyyaml" ,python-pyyaml)))
10795 (home-page "https://github.com/mk-fg/pretty-yaml")
10796 (synopsis "YAML pretty-print library for Python")
10797 (description
10798 "pyaml is a PyYAML based python module to produce pretty and readable
10799 YAML-serialized data.")
10800 (license license:wtfpl2)))
10801
10802 (define-public python2-pyaml
10803 (package-with-python2 python-pyaml))
10804
10805 (define-public python-backpack
10806 (package
10807 (name "python-backpack")
10808 (version "0.1")
10809 (source
10810 (origin
10811 (method url-fetch)
10812 (uri (pypi-uri "backpack" version))
10813 (sha256
10814 (base32
10815 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10816 (build-system python-build-system)
10817 (native-inputs
10818 `(("python-pytest" ,python-pytest)
10819 ("python-nose" ,python-nose)))
10820 (propagated-inputs
10821 `(("python-simplejson" ,python-simplejson)))
10822 (home-page "https://github.com/sdispater/backpack")
10823 (synopsis "Utilities for working with Python collections")
10824 (description "Backpack provides some useful utilities for working with
10825 collections of data.")
10826 (license license:expat)))
10827
10828 (define-public python2-backpack
10829 (package-with-python2 python-backpack))
10830
10831 (define-public python-prompt-toolkit
10832 (package
10833 (name "python-prompt-toolkit")
10834 (version "2.0.7")
10835 (source
10836 (origin
10837 (method url-fetch)
10838 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10839 (sha256
10840 (base32
10841 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10842 (build-system python-build-system)
10843 (arguments
10844 `(#:phases
10845 (modify-phases %standard-phases
10846 (delete 'check)
10847 (add-after 'install 'post-install-check
10848 (lambda* (#:key inputs outputs #:allow-other-keys)
10849 ;; HOME is needed for the test
10850 ;; "test_pathcompleter_can_expanduser".
10851 (setenv "HOME" "/tmp")
10852 (add-installed-pythonpath inputs outputs)
10853 (invoke "py.test"))))))
10854 (propagated-inputs
10855 `(("python-wcwidth" ,python-wcwidth)
10856 ("python-six" ,python-six)
10857 ("python-pygments" ,python-pygments)))
10858 (native-inputs
10859 `(("python-pytest" ,python-pytest)))
10860 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10861 (synopsis "Library for building command line interfaces in Python")
10862 (description
10863 "Prompt-Toolkit is a library for building interactive command line
10864 interfaces in Python. It's like GNU Readline but it also features syntax
10865 highlighting while typing, out-of-the-box multi-line input editing, advanced
10866 code completion, incremental search, support for Chinese double-width
10867 characters, mouse support, and auto suggestions.")
10868 (license license:bsd-3)))
10869
10870 (define-public python2-prompt-toolkit
10871 (package-with-python2 python-prompt-toolkit))
10872
10873 (define-public python-prompt-toolkit-1
10874 (package (inherit python-prompt-toolkit)
10875 (version "1.0.15")
10876 (source
10877 (origin
10878 (method url-fetch)
10879 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10880 (sha256
10881 (base32
10882 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
10883
10884 (define-public python2-prompt-toolkit-1
10885 (package-with-python2 python-prompt-toolkit-1))
10886
10887 (define-public python-jedi
10888 (package
10889 (name "python-jedi")
10890 (version "0.15.1")
10891 (source
10892 (origin
10893 (method url-fetch)
10894 (uri (pypi-uri "jedi" version))
10895 (sha256
10896 (base32
10897 "0bp4pxhsynaarbvzblsn5x32lzp29svy3sxfy8i6m5iwz9s9r1ds"))))
10898 (build-system python-build-system)
10899 (arguments
10900 `(#:phases
10901 (modify-phases %standard-phases
10902 (add-after 'unpack 'disable-file-completion-test
10903 ;; A single parameterized test currently fail (see:
10904 ;; https://github.com/davidhalter/jedi/issues/1395). Remove it.
10905 (lambda _
10906 (substitute* "test/test_api/test_completion.py"
10907 ((".*'example.py', 'rb\"' \\+ join\\('\\.\\.'.*") ""))
10908 #t))
10909 (replace 'check
10910 (lambda _
10911 (setenv "HOME" "/tmp")
10912 (invoke "python" "-m" "pytest"))))))
10913 (native-inputs
10914 `(("python-pytest" ,python-pytest)
10915 ("python-docopt" ,python-docopt)))
10916 (propagated-inputs
10917 `(("python-parso" ,python-parso)))
10918 (home-page "https://github.com/davidhalter/jedi")
10919 (synopsis "Autocompletion and static analysis library for Python")
10920 (description
10921 "Jedi is a static analysis tool for Python that can be used in Integrated
10922 Development Environments (@dfn{IDE}s) and text editors. It understands Python
10923 on a deeper level than many other static analysis frameworks for Python.
10924
10925 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
10926 well.")
10927 (license license:expat)))
10928
10929 (define-public python2-jedi
10930 (package-with-python2 python-jedi))
10931
10932 (define-public ptpython
10933 (package
10934 (name "ptpython")
10935 (version "0.34")
10936 (source (origin
10937 (method url-fetch)
10938 (uri (pypi-uri "ptpython" version))
10939 (sha256
10940 (base32
10941 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10942 (build-system python-build-system)
10943 (arguments
10944 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
10945 (propagated-inputs
10946 `(("python-docopt" ,python-docopt)
10947 ("python-jedi" ,python-jedi)
10948 ("python-prompt-toolkit" ,python-prompt-toolkit)
10949 ("python-pygments" ,python-pygments)))
10950 (home-page "https://github.com/jonathanslenders/ptpython")
10951 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10952 (description
10953 "ptpython is a Python read-eval-print loop with IDE-like features.
10954 It supports syntax highlighting, multiline editing, autocompletion, mouse,
10955 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10956 etc.")
10957 (license license:bsd-3)
10958 (properties `((python2-variant . ,(delay ptpython-2))))))
10959
10960 (define-public ptpython-2
10961 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10962 (package
10963 (inherit base)
10964 (name "ptpython2"))))
10965
10966 (define-public python-stem
10967 (package
10968 (name "python-stem")
10969 (version "1.7.1")
10970 (source
10971 (origin
10972 (method url-fetch)
10973 (uri (pypi-uri "stem" version))
10974 (sha256
10975 (base32
10976 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
10977 (build-system python-build-system)
10978 (arguments
10979 `(#:phases
10980 (modify-phases %standard-phases
10981 (replace 'check
10982 (lambda _
10983 (invoke "./run_tests.py" "--unit")
10984 #t)))))
10985 (native-inputs
10986 `(("python-mock" ,python-mock)
10987 ("python-pycodestyle" ,python-pycodestyle)
10988 ("python-pyflakes" ,python-pyflakes)))
10989 (home-page "https://stem.torproject.org/")
10990 (synopsis
10991 "Python controller library that allows applications to interact with Tor")
10992 (description
10993 "Stem is a Python controller library for Tor. With it you can use Tor's
10994 control protocol to script against the Tor process and read descriptor data
10995 relays publish about themselves.")
10996 (license license:lgpl3)))
10997
10998 (define-public python2-stem
10999 (package-with-python2 python-stem))
11000
11001 (define-public python-pyserial
11002 (package
11003 (name "python-pyserial")
11004 (version "3.1.1")
11005 (source
11006 (origin
11007 (method url-fetch)
11008 (uri (pypi-uri "pyserial" version))
11009 (sha256
11010 (base32
11011 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
11012 (build-system python-build-system)
11013 (arguments
11014 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
11015 ;; #:phases
11016 ;; (modify-phases %standard-phases
11017 ;; (replace 'check
11018 ;; (lambda _
11019 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
11020 (home-page
11021 "https://github.com/pyserial/pyserial")
11022 (synopsis "Python Serial Port Bindings")
11023 (description "@code{pyserial} provide serial port bindings for Python. It
11024 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11025 and/or Xon/Xoff. The port is accessed in RAW mode.")
11026 (license license:bsd-3)))
11027
11028 (define-public python2-pyserial
11029 (package-with-python2 python-pyserial))
11030
11031 (define-public python-kivy
11032 (package
11033 (name "python-kivy")
11034 (version "1.10.1")
11035 (source
11036 (origin
11037 (method url-fetch)
11038 (uri (pypi-uri "Kivy" version))
11039 (file-name (string-append name "-" version ".tar.gz"))
11040 (sha256
11041 (base32
11042 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
11043 (build-system python-build-system)
11044 (arguments
11045 `(#:tests? #f ; Tests require many optional packages
11046 #:phases
11047 (modify-phases %standard-phases
11048 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11049 (lambda* (#:key inputs #:allow-other-keys)
11050 (setenv "KIVY_SDL2_PATH"
11051 (string-append (assoc-ref inputs "sdl-union")
11052 "/include/SDL2"))
11053 #t)))))
11054 (native-inputs
11055 `(("git" ,git)
11056 ("pkg-config" ,pkg-config)
11057 ("python-cython" ,python-cython)))
11058 (inputs
11059 `(("gstreamer" ,gstreamer)
11060 ("mesa" ,mesa)
11061 ("sdl-union"
11062 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11063 (home-page "http://kivy.org")
11064 (synopsis
11065 "Multitouch application framework")
11066 (description
11067 "A software library for rapid development of
11068 hardware-accelerated multitouch applications.")
11069 (license license:expat)))
11070
11071 (define-public python2-kivy
11072 (package-with-python2 python-kivy))
11073
11074 (define-public python-kivy-next
11075 (deprecated-package "python-kivy-next" python-kivy))
11076
11077 (define-public python2-kivy-next
11078 (deprecated-package "python2-kivy-next" python2-kivy))
11079
11080 (define-public python-binaryornot
11081 (package
11082 (name "python-binaryornot")
11083 (version "0.4.4")
11084 (source (origin
11085 (method url-fetch)
11086 (uri (pypi-uri "binaryornot" version))
11087 (sha256
11088 (base32
11089 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
11090 (build-system python-build-system)
11091 (arguments
11092 `(#:phases
11093 (modify-phases %standard-phases
11094 (add-after 'unpack 'patch-tests
11095 (lambda _
11096 ;; TypeError: binary() got an unexpected keyword argument
11097 ;; 'average_size'.
11098 (substitute* "tests/test_check.py"
11099 (("average_size=512") ""))
11100 #t)))))
11101 (propagated-inputs
11102 `(("python-chardet" ,python-chardet)
11103 ("python-hypothesis" ,python-hypothesis)))
11104 (home-page "https://github.com/audreyr/binaryornot")
11105 (synopsis "Package to check if a file is binary or text")
11106 (description "Ultra-lightweight pure Python package to check if a file is
11107 binary or text.")
11108 (license license:bsd-3)
11109 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11110
11111 (define-public python2-binaryornot
11112 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11113 (package (inherit base)
11114 (propagated-inputs
11115 `(("python2-enum34" ,python2-enum34)
11116 ,@(package-propagated-inputs base))))))
11117
11118 (define-public python-binwalk
11119 (let ((commit "64201acfb5b0a9cdd9faa58c40a36dcff8612e29")
11120 (revision "0"))
11121 (package
11122 (name "python-binwalk")
11123 (version (git-version "2.1.1" revision commit))
11124 (source
11125 (origin
11126 (method git-fetch)
11127 (uri (git-reference
11128 (url "https://github.com/ReFirmLabs/binwalk")
11129 (commit commit)))
11130 (file-name (git-file-name name version))
11131 (sha256
11132 (base32
11133 "1z7ca6rfp887hw5jc3sb45mm4fa0xid4lsp2z8g4r590dr7k7w15"))))
11134 (build-system python-build-system)
11135 (arguments
11136 `(#:phases
11137 (modify-phases %standard-phases
11138 (add-before 'check 'set-pythonpath
11139 (lambda _
11140 (setenv "PYTHONPATH"
11141 (string-append
11142 (getcwd) "/src/"
11143 ":" (getenv "PYTHONPATH")))
11144 (setenv "HOME" "")
11145 #t)))))
11146 (native-inputs
11147 `(("python-coverage" ,python-coverage)
11148 ("python-nose" ,python-nose)))
11149 (home-page "https://github.com/ReFirmLabs/binwalk")
11150 (synopsis "Firmware analysis tool")
11151 (description "Binwalk is a tool for analyzing, reverse engineering, and extracting firmware images")
11152 (license license:expat))))
11153
11154 (define-public python-nltk
11155 (package
11156 (name "python-nltk")
11157 (version "3.2.1")
11158 (source (origin
11159 (method url-fetch)
11160 (uri (pypi-uri "nltk" version))
11161 (sha256
11162 (base32
11163 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11164 (build-system python-build-system)
11165 (arguments
11166 '(;; The tests require some extra resources to be downloaded.
11167 ;; TODO Try packaging these resources.
11168 #:tests? #f))
11169 (home-page "http://nltk.org/")
11170 (synopsis "Natural Language Toolkit")
11171 (description "It provides interfaces to over 50 corpora and lexical
11172 resources such as WordNet, along with a suite of text processing libraries
11173 for classification, tokenization, stemming, tagging, parsing, and semantic
11174 reasoning, wrappers for natural language processing libraries.")
11175 (license license:asl2.0)))
11176
11177 (define-public python2-nltk
11178 (package-with-python2 python-nltk))
11179
11180 (define-public python-pymongo
11181 (package
11182 (name "python-pymongo")
11183 (version "3.7.2")
11184 (source (origin
11185 (method url-fetch)
11186 (uri (pypi-uri "pymongo" version))
11187 (sha256
11188 (base32
11189 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
11190 (build-system python-build-system)
11191 (propagated-inputs
11192 `(("python-certifi" ,python-certifi)))
11193 (home-page "https://github.com/mongodb/mongo-python-driver")
11194 (synopsis "Python driver for MongoDB")
11195 (description "Python driver for MongoDB.")
11196 (license license:asl2.0)))
11197
11198 (define-public python2-pymongo
11199 (package-with-python2 python-pymongo))
11200
11201 (define-public python-consul
11202 (package
11203 (name "python-consul")
11204 (version "0.6.1")
11205 (source
11206 (origin
11207 (method url-fetch)
11208 (uri (pypi-uri "python-consul" version))
11209 (sha256
11210 (base32
11211 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11212 (build-system python-build-system)
11213 (arguments
11214 '(#:tests? #f)) ; The tests are not distributed
11215 (propagated-inputs
11216 `(("python-requests" ,python-requests)
11217 ("python-six" ,python-six)))
11218 (home-page "https://github.com/cablehead/python-consul")
11219 (synopsis "Python client for Consul")
11220 (description
11221 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11222 discovery, monitoring and configuration.")
11223 (license license:expat)))
11224
11225 (define-public python2-consul
11226 (package-with-python2 python-consul))
11227
11228 (define-public python-schematics
11229 (package
11230 (name "python-schematics")
11231 (version "1.1.1")
11232 (source
11233 (origin
11234 (method git-fetch)
11235 (uri (git-reference
11236 (url "https://github.com/schematics/schematics.git")
11237 (commit (string-append "v" version))))
11238 (file-name (git-file-name name version))
11239 (sha256
11240 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
11241 (build-system python-build-system)
11242 (propagated-inputs
11243 `(("python-six" ,python-six)))
11244 (arguments
11245 ;; The tests require a bunch of not very nice packages with fixed
11246 ;; version requirements (e.g. python-coveralls).
11247 `(#:tests? #f))
11248 (home-page "https://github.com/schematics/schematics")
11249 (synopsis "Python Data Structures for Humans")
11250 (description "Python Data Structures for Humans.")
11251 (license license:bsd-3)))
11252
11253 (define-public python2-schematics
11254 (package-with-python2 python-schematics))
11255
11256 (define-public python-odfpy
11257 (package
11258 (name "python-odfpy")
11259 (version "1.3.3")
11260 (source (origin
11261 (method url-fetch)
11262 (uri (pypi-uri "odfpy" version))
11263 (sha256
11264 (base32
11265 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11266 (arguments
11267 `(#:modules ((srfi srfi-1)
11268 (guix build python-build-system)
11269 (guix build utils))
11270 #:phases
11271 (modify-phases %standard-phases
11272 (replace 'check
11273 ;; The test runner invokes python2 and python3 for test*.py.
11274 ;; To avoid having both in inputs, we replicate it here.
11275 (lambda _
11276 (for-each (lambda (test-file) (invoke "python" test-file))
11277 (find-files "tests" "^test.*\\.py$"))
11278 #t)))))
11279 (build-system python-build-system)
11280 (home-page "https://github.com/eea/odfpy")
11281 (synopsis "Python API and tools to manipulate OpenDocument files")
11282 (description "Collection of libraries and utility programs written in
11283 Python to manipulate OpenDocument 1.2 files.")
11284 (license
11285 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11286 ;; number of files with other licenses.
11287 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11288
11289 (define-public python2-odfpy
11290 (package-with-python2 python-odfpy))
11291
11292 (define-public python-natsort
11293 (package
11294 (name "python-natsort")
11295 (version "5.4.1")
11296 (source (origin
11297 (method url-fetch)
11298 (uri (pypi-uri "natsort" version))
11299 (sha256
11300 (base32
11301 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
11302 (build-system python-build-system)
11303 (arguments
11304 `(#:modules ((guix build utils)
11305 (guix build python-build-system)
11306 (srfi srfi-1)
11307 (srfi srfi-26)
11308 (ice-9 ftw))
11309 #:phases
11310 (modify-phases %standard-phases
11311 (add-before 'check 'set-cachedir
11312 ;; Tests require write access to $HOME by default
11313 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
11314 (replace 'check
11315 (lambda _
11316 (let ((cwd (getcwd)))
11317 (setenv "PYTHONPATH"
11318 (string-append
11319 cwd "/build/"
11320 (find (cut string-prefix? "lib" <>)
11321 (scandir (string-append cwd "/build")))
11322 ":"
11323 (getenv "PYTHONPATH")))
11324 (invoke "pytest" "-v")))))))
11325 (native-inputs
11326 `(("python-hypothesis" ,python-hypothesis)
11327 ("python-pytest-cov" ,python-pytest-cov)
11328 ("python-pytest-mock" ,python-pytest-mock)
11329 ("python-pytest" ,python-pytest)))
11330 (propagated-inputs ; TODO: Add python-fastnumbers.
11331 `(("python-pyicu" ,python-pyicu)))
11332 (home-page "https://github.com/SethMMorton/natsort")
11333 (synopsis "Natural sorting for python and shell")
11334 (description
11335 "Natsort lets you apply natural sorting on lists instead of
11336 lexicographical. If you use the built-in @code{sorted} method in python
11337 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
11338 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
11339 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
11340 identifies numbers and sorts them separately from strings. It can also sort
11341 version numbers, real numbers, mixed types and more, and comes with a shell
11342 command @command{natsort} that exposes this functionality in the command line.")
11343 (license license:expat)
11344 (properties `((python2-variant . ,(delay python2-natsort))))))
11345
11346 (define-public python2-natsort
11347 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11348 (package (inherit base)
11349 (native-inputs
11350 `(("python2-pathlib" ,python2-pathlib)
11351 ,@(package-native-inputs base))))))
11352
11353 (define-public python-glances
11354 (package
11355 (name "python-glances")
11356 (version "3.1.1")
11357 (source
11358 (origin
11359 (method url-fetch)
11360 (uri (pypi-uri "Glances" version))
11361 (sha256
11362 (base32
11363 "07j1ggzsqiskyz1i4mrnyr9i95v0dqi0i0hibnv1l188km8shmi8"))
11364 (modules '((guix build utils)))
11365 (snippet
11366 '(begin
11367 ;; Glances phones PyPI for weekly update checks by default.
11368 ;; Disable these. The user can re-enable them if desired.
11369 (substitute* "glances/outdated.py"
11370 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
11371 (string-append indentation
11372 "self.args.disable_check_update = True\n"
11373 line)))
11374 #t))))
11375 (build-system python-build-system)
11376 (propagated-inputs
11377 `(("python-future" ,python-future)
11378 ("python-psutil" ,python-psutil)))
11379 (home-page
11380 "https://github.com/nicolargo/glances")
11381 (synopsis "Cross-platform curses-based monitoring tool")
11382 (description
11383 "Glances is a curses-based monitoring tool for a wide variety of platforms.
11384 Glances uses the PsUtil library to get information from your system. It
11385 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
11386 (license license:lgpl3+)))
11387
11388 (define-public python2-glances
11389 (package-with-python2 python-glances))
11390
11391 (define-public python-graphql-core
11392 (package
11393 (name "python-graphql-core")
11394 (version "0.5.3")
11395 (source
11396 (origin
11397 (method url-fetch)
11398 (uri (pypi-uri "graphql-core" version))
11399 (sha256
11400 (base32
11401 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11402 (build-system python-build-system)
11403 (arguments
11404 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11405 #:phases
11406 (modify-phases %standard-phases
11407 (add-after 'unpack 'patch-hardcoded-version
11408 (lambda _ (substitute*
11409 "setup.py"
11410 (("'gevent==1.1rc1'") "'gevent'"))
11411 #t)))))
11412 (native-inputs
11413 `(("python-gevent" ,python-gevent)
11414 ("python-mock" ,python-mock)
11415 ("python-pytest-mock" ,python-pytest-mock)))
11416 (propagated-inputs
11417 `(("python-promise" ,python-promise)
11418 ("python-six" ,python-six)))
11419 (home-page "https://github.com/graphql-python/graphql-core")
11420 (synopsis "GraphQL implementation for Python")
11421 (description
11422 "GraphQL implementation for Python. GraphQL is a data query language and
11423 runtime designed and used to request and deliver data to mobile and web apps.
11424 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11425 to Python.")
11426 (license license:expat)))
11427
11428 (define-public python2-graphql-core
11429 (package-with-python2 python-graphql-core))
11430
11431 (define-public python-graphql-relay
11432 (package
11433 (name "python-graphql-relay")
11434 (version "0.4.5")
11435 (source
11436 (origin
11437 (method url-fetch)
11438 (uri (pypi-uri "graphql-relay" version))
11439 (sha256
11440 (base32
11441 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
11442 (build-system python-build-system)
11443 (arguments
11444 '(#:tests? #f)) ; The tests are not distributed
11445 (propagated-inputs
11446 `(("python-graphql-core" ,python-graphql-core)
11447 ("python-promise" ,python-promise)
11448 ("python-six" ,python-six)))
11449 (home-page "https://github.com/graphql-python/graphql-relay-py")
11450 (synopsis "Relay implementation for Python")
11451 (description
11452 "This is a library to allow the easy creation of Relay-compliant servers
11453 using the GraphQL Python reference implementation of a GraphQL server. It
11454 should be noted that the code is a exact port of the original
11455 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11456 from Facebook.")
11457 (license license:expat)))
11458
11459 (define-public python2-graphql-relay
11460 (package-with-python2 python-graphql-relay))
11461
11462 (define-public python-graphene
11463 (package
11464 (name "python-graphene")
11465 (version "0.10.2")
11466 (source
11467 (origin
11468 (method url-fetch)
11469 (uri (pypi-uri "graphene" version))
11470 (sha256
11471 (base32
11472 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11473 (build-system python-build-system)
11474 (propagated-inputs
11475 `(("python-graphql-core" ,python-graphql-core)
11476 ("python-graphql-relay" ,python-graphql-relay)
11477 ("python-iso8601" ,python-iso8601)
11478 ("python-promise" ,python-promise)
11479 ("python-six" ,python-six)))
11480 (arguments
11481 `(#:tests? #f)) ; no tests/ in the PyPI tarball
11482 (home-page "http://graphene-python.org/")
11483 (synopsis "GraphQL Framework for Python")
11484 (description
11485 "Graphene is a Python library for building GraphQL schemas/types.
11486 A GraphQL schema describes your data model, and provides a GraphQL server
11487 with an associated set of resolve methods that know how to fetch data.")
11488 (properties `((python2-variant . ,(delay python2-graphene))))
11489 (license license:expat)))
11490
11491 (define-public python2-graphene
11492 (let ((base (package-with-python2
11493 (strip-python2-variant python-graphene))))
11494 (package (inherit base)
11495 (native-inputs
11496 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11497 ,@(package-native-inputs base))))))
11498
11499 (define-public python-nautilus
11500 (package
11501 (name "python-nautilus")
11502 (version "0.4.9")
11503 (source
11504 (origin
11505 (method url-fetch)
11506 (uri (pypi-uri "nautilus" version))
11507 (sha256
11508 (base32
11509 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11510 (build-system python-build-system)
11511 (arguments `(#:tests? #f)) ; fails to import test modules
11512 (propagated-inputs
11513 `(("python-bcrypt" ,python-bcrypt)
11514 ("python-click" ,python-click)
11515 ("python-consul" ,python-consul)
11516 ("python-graphene" ,python-graphene)
11517 ("python-jinja2" ,python-jinja2)
11518 ("python-peewee" ,python-peewee)
11519 ("python-pika" ,python-pika)
11520 ("python-tornado" ,python-tornado)
11521 ("python-wtforms" ,python-wtforms)))
11522 (native-inputs
11523 `(("python-nose2" ,python-nose2)))
11524 (home-page "https://github.com/AlecAivazis/nautilus")
11525 (synopsis "Library for creating microservice applications")
11526 (description
11527 "Nautilus is a framework for flux based microservices that looks to
11528 provide extendible implementations of common aspects of a cloud so that you can
11529 focus on building massively scalable web applications.")
11530 (license license:expat)))
11531
11532 (define-public python-snowballstemmer
11533 (package
11534 (name "python-snowballstemmer")
11535 (version "1.2.1")
11536 (source (origin
11537 (method url-fetch)
11538 (uri (pypi-uri "snowballstemmer" version))
11539 (sha256
11540 (base32
11541 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11542 (build-system python-build-system)
11543 (arguments
11544 `(;; No tests exist
11545 #:tests? #f))
11546 (home-page "https://github.com/shibukawa/snowball_py")
11547 (synopsis "Snowball stemming library collection for Python")
11548 (description "This package provides 16 word stemmer algorithms generated
11549 from Snowball algorithms. It includes the 15 original ones plus the Poerter
11550 English stemmer.")
11551 (license license:bsd-3)))
11552
11553 (define-public python2-snowballstemmer
11554 (package-with-python2 python-snowballstemmer))
11555
11556 (define-public python-setproctitle
11557 (package
11558 (name "python-setproctitle")
11559 (version "1.1.10")
11560 (source
11561 (origin
11562 (method url-fetch)
11563 (uri (pypi-uri "setproctitle" version))
11564 (sha256
11565 (base32
11566 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11567 (build-system python-build-system)
11568 (arguments
11569 '(#:phases
11570 (modify-phases %standard-phases
11571 (add-before 'check 'patch-Makefile
11572 ;; Stricly this is only required for the python2 variant.
11573 ;; But adding a phase in an inherited package seems to be
11574 ;; cumbersum. So we patch even for python3.
11575 (lambda _
11576 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11577 (when nose
11578 (substitute* "Makefile"
11579 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11580 (string-append nose "/bin/nosetests "))))
11581 #t)))
11582 (replace 'check
11583 (lambda _
11584 (setenv "PYTHON" (or (which "python3") (which "python")))
11585 (setenv "PYCONFIG" (or (which "python3-config")
11586 (which "python-config")))
11587 (setenv "CC" "gcc")
11588 ;; No need to extend PYTHONPATH to find the built package, since
11589 ;; the Makefile will build anyway
11590 (invoke "make" "check"))))))
11591 (native-inputs
11592 `(("procps" ,procps))) ; required for tests
11593 (home-page
11594 "https://github.com/dvarrazzo/py-setproctitle")
11595 (synopsis
11596 "Setproctitle implementation for Python to customize the process title")
11597 (description "The library allows a process to change its title (as displayed
11598 by system tools such as ps and top).
11599
11600 Changing the title is mostly useful in multi-process systems, for
11601 example when a master process is forked: changing the children's title
11602 allows to identify the task each process is busy with. The technique
11603 is used by PostgreSQL and the OpenSSH Server for example.")
11604 (license license:bsd-3)
11605 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11606
11607 (define-public python2-setproctitle
11608 (let ((base (package-with-python2
11609 (strip-python2-variant python-setproctitle))))
11610 (package
11611 (inherit base)
11612 (native-inputs `(("python2-nose" ,python2-nose)
11613 ,@(package-native-inputs base))))))
11614
11615 (define-public python-validictory
11616 (package
11617 (name "python-validictory")
11618 (version "1.0.1")
11619 (source
11620 (origin
11621 (method url-fetch)
11622 (uri (pypi-uri "validictory" version))
11623 (sha256
11624 (base32
11625 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11626 (build-system python-build-system)
11627 (arguments
11628 '(#:phases
11629 (modify-phases %standard-phases
11630 (add-after 'unpack 'bootstrap
11631 ;; Move the tests out of the package directory to avoid
11632 ;; packaging them.
11633 (lambda* _
11634 (rename-file "validictory/tests" "tests")
11635 (delete-file "tests/__init__.py")))
11636 (replace 'check
11637 (lambda _
11638 ;; Extend PYTHONPATH so the built package will be found.
11639 (setenv "PYTHONPATH"
11640 (string-append (getcwd) "/build/lib:"
11641 (getenv "PYTHONPATH")))
11642 (invoke "py.test" "-vv" ))))))
11643 (native-inputs
11644 `(("python-pytest" ,python-pytest)))
11645 (home-page
11646 "https://github.com/jamesturk/validictory")
11647 (synopsis "General purpose Python data validator")
11648 (description "It allows validation of arbitrary Python data structures.
11649
11650 The schema format is based on the JSON Schema
11651 proposal (http://json-schema.org), so combined with json the library is also
11652 useful as a validator for JSON data.")
11653 (license license:expat)))
11654
11655 (define-public python2-validictory
11656 (package-with-python2 python-validictory))
11657
11658 (define-public python-pyelftools
11659 (package
11660 (name "python-pyelftools")
11661 (version "0.25")
11662 (source
11663 (origin
11664 (method url-fetch)
11665 (uri (pypi-uri "pyelftools" version))
11666 (sha256
11667 (base32
11668 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11669 (build-system python-build-system)
11670 (arguments
11671 `(#:phases
11672 (modify-phases %standard-phases
11673 (add-before 'check 'set-pythonpath
11674 (lambda _
11675 (setenv "PYTHONPATH"
11676 (string-append
11677 (getcwd) "/test/"
11678 ":" (getenv "PYTHONPATH")))
11679 #t)))))
11680 (home-page
11681 "https://github.com/eliben/pyelftools")
11682 (synopsis
11683 "Analyze binary and library file information")
11684 (description "This Python library provides interfaces for parsing and
11685 analyzing two binary and library file formats; the Executable and Linking
11686 Format (ELF), and debugging information in the Debugging With Attributed
11687 Record Format (DWARF).")
11688 (license license:public-domain)))
11689
11690 (define-public python-pyev
11691 (package
11692 (name "python-pyev")
11693 (version "0.9.0")
11694 (source
11695 (origin
11696 (method url-fetch)
11697 (uri (pypi-uri "pyev" version))
11698 (sha256
11699 (base32
11700 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11701 (build-system python-build-system)
11702 (arguments
11703 `(#:tests? #f ; no test suite
11704 #:phases
11705 (modify-phases %standard-phases
11706 (add-after 'unpack 'patch
11707 (lambda* (#:key inputs #:allow-other-keys)
11708 (let ((libev (string-append (assoc-ref inputs "libev")
11709 "/lib/libev.so.4")))
11710 (substitute* "setup.py"
11711 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11712 (string-append "libev_dll_name = \"" libev "\"")))))))))
11713 (inputs
11714 `(("libev" ,libev)))
11715 (home-page "http://pythonhosted.org/pyev/")
11716 (synopsis "Python libev interface")
11717 (description "Pyev provides a Python interface to libev.")
11718 (license license:gpl3)))
11719
11720 (define-public python2-pyev
11721 (package-with-python2 python-pyev))
11722
11723 (define-public python-imagesize
11724 (package
11725 (name "python-imagesize")
11726 (version "1.1.0")
11727 (source
11728 (origin
11729 (method url-fetch)
11730 (uri (pypi-uri "imagesize" version))
11731 (sha256
11732 (base32
11733 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11734 (build-system python-build-system)
11735 (home-page "https://github.com/shibukawa/imagesize_py")
11736 (synopsis "Gets image size of files in various formats in Python")
11737 (description
11738 "This package allows determination of image size from
11739 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11740 (license license:expat)))
11741
11742 (define-public python2-imagesize
11743 (package-with-python2 python-imagesize))
11744
11745 (define-public python-termstyle
11746 (package
11747 (name "python-termstyle")
11748 (version "0.1.11")
11749 (source
11750 (origin
11751 (method url-fetch)
11752 (uri (pypi-uri "termstyle" version))
11753 (sha256
11754 (base32
11755 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11756 (build-system python-build-system)
11757 (arguments
11758 '(#:phases
11759 (modify-phases %standard-phases
11760 (replace 'check
11761 (lambda _
11762 (invoke "python" "test3.py"))))))
11763 (home-page "https://github.com/gfxmonk/termstyle")
11764 (synopsis "Console text coloring for Python")
11765 (description "This package provides console text coloring for Python.")
11766 (license license:bsd-3)))
11767
11768 (define-public python-argcomplete
11769 (package
11770 (name "python-argcomplete")
11771 (version "1.10.3")
11772 (source
11773 (origin
11774 (method url-fetch)
11775 (uri (pypi-uri "argcomplete" version))
11776 (sha256
11777 (base32
11778 "02jkc44drb0yjz6x28lvg6rj607n8r2irdpdvyylm8xnycn54zx3"))))
11779 (build-system python-build-system)
11780 (arguments
11781 `(#:phases
11782 (modify-phases %standard-phases
11783 (add-after 'unpack 'embed-tool-references
11784 (lambda _
11785 (substitute* "argcomplete/bash_completion.d/python-argcomplete.sh"
11786 ((" grep")
11787 (string-append " " (which "grep")))
11788 ((" egrep")
11789 (string-append " " (which "egrep")))
11790 (("elif which")
11791 (string-append "elif " (which "which")))
11792 (("\\$\\(which")
11793 (string-append "$(" (which "which"))))
11794 #t)))))
11795 (inputs
11796 `(("grep" ,grep)
11797 ("which" ,which)))
11798 (native-inputs
11799 `(("python-coverage" ,python-coverage)
11800 ("python-flake8" ,python-flake8)
11801 ("python-pexpect" ,python-pexpect)
11802 ("python-wheel" ,python-wheel)
11803 ("tcsh" ,tcsh)
11804 ("fish" ,fish)
11805 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
11806 (home-page "https://github.com/kislyuk/argcomplete")
11807 (synopsis "Shell tab completion for Python argparse")
11808 (description "argcomplete provides extensible command line tab completion
11809 of arguments and options for Python scripts using @code{argparse}. It's
11810 particularly useful for programs with many options or sub-parsers that can
11811 dynamically suggest completions; for example, when browsing resources over the
11812 network.")
11813 (license license:asl2.0)))
11814
11815 (define-public python2-argcomplete
11816 (package-with-python2 python-argcomplete))
11817
11818 (define-public python-xopen
11819 (package
11820 (name "python-xopen")
11821 (version "0.5.0")
11822 (source
11823 (origin
11824 (method url-fetch)
11825 (uri (pypi-uri "xopen" version))
11826 (sha256
11827 (base32
11828 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
11829 (build-system python-build-system)
11830 (propagated-inputs
11831 `(("python-setuptools-scm" ,python-setuptools-scm)))
11832 (home-page "https://github.com/marcelm/xopen/")
11833 (synopsis "Open compressed files transparently")
11834 (description "This module provides an @code{xopen} function that works like
11835 Python's built-in @code{open} function, but can also deal with compressed files.
11836 Supported compression formats are gzip, bzip2 and, xz, and are automatically
11837 recognized by their file extensions. The focus is on being as efficient as
11838 possible on all supported Python versions.")
11839 (license license:expat)))
11840
11841 (define-public python2-xopen
11842 (let ((base (package-with-python2
11843 (strip-python2-variant python-xopen))))
11844 (package
11845 (inherit base)
11846 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
11847 ,@(package-propagated-inputs base))))))
11848
11849 (define-public python-cheetah
11850 (package
11851 (name "python-cheetah")
11852 (version "3.1.0")
11853 (source
11854 (origin
11855 (method url-fetch)
11856 (uri (pypi-uri "Cheetah3" version))
11857 (sha256
11858 (base32
11859 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
11860 (build-system python-build-system)
11861 (arguments
11862 `(#:modules ((guix build utils)
11863 (guix build python-build-system)
11864 (ice-9 ftw)
11865 (srfi srfi-1)
11866 (srfi srfi-26))
11867 #:phases (modify-phases %standard-phases
11868 (add-after 'unpack 'use-absolute-python
11869 (lambda _
11870 (substitute* "Cheetah/CheetahWrapper.py"
11871 (("#!/usr/bin/env python")
11872 (string-append "#!" (which "python"))))
11873 #t))
11874 (replace 'check
11875 (lambda _
11876 (let ((cwd (getcwd)))
11877 (setenv "PYTHONPATH"
11878 (string-append
11879 cwd "/build/"
11880 (find (cut string-prefix? "lib" <>)
11881 (scandir (string-append cwd "/build")))
11882 ":" (getenv "PYTHONPATH")))
11883 (setenv "PATH"
11884 (string-append (getenv "PATH")
11885 ":" cwd "/bin"))
11886 (setenv "TMPDIR" "/tmp")
11887
11888 (substitute* "Cheetah/Tests/Test.py"
11889 (("unittest.TextTestRunner\\(\\)")
11890 "unittest.TextTestRunner(verbosity=2)"))
11891
11892 (invoke "python" "Cheetah/Tests/Test.py")))))))
11893 (propagated-inputs
11894 `(("python-markdown" ,python-markdown))) ;optional
11895 (home-page "http://cheetahtemplate.org/")
11896 (synopsis "Template engine")
11897 (description "Cheetah is a text-based template engine and Python code
11898 generator.
11899
11900 Cheetah can be used as a standalone templating utility or referenced as
11901 a library from other Python applications. It has many potential uses,
11902 but web developers looking for a viable alternative to ASP, JSP, PHP and
11903 PSP are expected to be its principle user group.
11904
11905 Features:
11906 @enumerate
11907 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
11908 text-based format.
11909 @item Cleanly separates content, graphic design, and program code.
11910 @item Blends the power and flexibility of Python with a simple template language
11911 that non-programmers can understand.
11912 @item Gives template writers full access to any Python data structure, module,
11913 function, object, or method in their templates.
11914 @item Makes code reuse easy by providing an object-orientated interface to
11915 templates that is accessible from Python code or other Cheetah templates.
11916 One template can subclass another and selectively reimplement sections of it.
11917 @item Provides a simple, yet powerful, caching mechanism that can dramatically
11918 improve the performance of a dynamic website.
11919 @item Compiles templates into optimized, yet readable, Python code.
11920 @end enumerate")
11921 (license (license:x11-style "file://LICENSE"))))
11922
11923 (define-public python2-cheetah
11924 (package-with-python2 python-cheetah))
11925
11926 (define-public python-dulwich
11927 (package
11928 (name "python-dulwich")
11929 (version "0.18.6")
11930 (source
11931 (origin
11932 (method url-fetch)
11933 (uri (list (string-append "https://www.dulwich.io/releases/"
11934 "dulwich-" version ".tar.gz")
11935 (pypi-uri "dulwich" version)))
11936 (sha256
11937 (base32
11938 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
11939 (build-system python-build-system)
11940 (arguments
11941 `(#:phases
11942 (modify-phases %standard-phases
11943 (add-before 'check 'fix-tests
11944 (lambda* (#:key inputs #:allow-other-keys)
11945 ;; The tests use Popen with a custom environment which doesn't
11946 ;; include PATH.
11947 (substitute* "dulwich/tests/compat/utils.py"
11948 (("'git'") (string-append "'"
11949 (which "git")
11950 "'")))
11951 (substitute* '("dulwich/tests/test_repository.py"
11952 "dulwich/tests/test_hooks.py")
11953 (("#!/bin/sh") (string-append "#!" (which "sh"))))
11954 (setenv "TEST_RUNNER" "unittest")
11955 (setenv "PYTHONHASHSEED" "random")
11956 #t)))))
11957 (propagated-inputs
11958 `(("python-fastimport" ,python-fastimport)))
11959 (native-inputs
11960 `(("python-mock" ,python-mock)
11961 ("python-geventhttpclient" ,python-geventhttpclient)
11962 ("git" ,git)))
11963 (home-page "https://www.dulwich.io/")
11964 (synopsis "Git implementation in Python")
11965 (description "Dulwich is an implementation of the Git file formats and
11966 protocols written in pure Python.")
11967 ;; Can be used with either license.
11968 (license (list license:asl2.0 license:gpl2+))))
11969
11970 (define-public python2-dulwich
11971 (package-with-python2 python-dulwich))
11972
11973 (define-public python-pbkdf2
11974 (package
11975 (name "python-pbkdf2")
11976 (version "1.3")
11977 (source
11978 (origin
11979 (method url-fetch)
11980 (uri (pypi-uri "pbkdf2" version))
11981 (sha256
11982 (base32
11983 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
11984 (build-system python-build-system)
11985 (arguments
11986 '(#:phases
11987 (modify-phases %standard-phases
11988 (replace 'check
11989 (lambda _
11990 (setenv "PYTHONPATH"
11991 (string-append (getcwd) "/build/lib:"
11992 (getenv "PYTHONPATH")))
11993 (invoke "python" "test/test_pbkdf2.py"))))))
11994 (propagated-inputs
11995 `(("python-pycrypto" ,python-pycrypto))) ; optional
11996 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
11997 (synopsis "Password-based key derivation")
11998 (description "This module implements the password-based key derivation
11999 function, PBKDF2, specified in RSA PKCS#5 v2.0.
12000
12001 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
12002 is part of the RSA Public Key Cryptography Standards series. The provided
12003 implementation takes a password or a passphrase and a salt value (and
12004 optionally a iteration count, a digest module, and a MAC module) and provides
12005 a file-like object from which an arbitrarly-sized key can be read.")
12006 (license license:expat)))
12007
12008 (define-public python2-pbkdf2
12009 (package-with-python2 python-pbkdf2))
12010
12011 (define-public python-qrcode
12012 (package
12013 (name "python-qrcode")
12014 (version "6.1")
12015 (source
12016 (origin
12017 (method url-fetch)
12018 (uri (pypi-uri "qrcode" version))
12019 (sha256
12020 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
12021 (build-system python-build-system)
12022 (arguments
12023 ;; FIXME: Tests require packaging 'pymaging'.
12024 '(#:tests? #f))
12025 (propagated-inputs
12026 `(("python-lxml" ,python-lxml) ; for SVG output
12027 ("python-pillow" ,python-pillow) ; for PNG output
12028 ("python-six" ,python-six)))
12029 (home-page "https://github.com/lincolnloop/python-qrcode")
12030 (synopsis "QR Code image generator")
12031 (description "This package provides a pure Python QR Code generator
12032 module. It uses the Python Imaging Library (PIL) to allow for the generation
12033 of QR Codes.
12034
12035 In addition this package provides a command line tool to generate QR codes and
12036 either write these QR codes to a file or do the output as ascii art at the
12037 console.")
12038 (license license:bsd-3)))
12039
12040 (define-public python2-qrcode
12041 (package-with-python2 python-qrcode))
12042
12043 (define-public python-rst2ansi
12044 (package
12045 (name "python-rst2ansi")
12046 (version "0.1.5")
12047 (source
12048 (origin
12049 (method url-fetch)
12050 (uri (pypi-uri "rst2ansi" version))
12051 (sha256
12052 (base32
12053 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
12054 (build-system python-build-system)
12055 (propagated-inputs
12056 `(("python-docutils" ,python-docutils)))
12057 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
12058 (synopsis "Convert RST to ANSI-decorated console output")
12059 (description
12060 "Python module dedicated to rendering RST (reStructuredText) documents
12061 to ansi-escaped strings suitable for display in a terminal.")
12062 (license license:expat)))
12063
12064 (define-public python-ansi2html
12065 (package
12066 (name "python-ansi2html")
12067 (version "1.2.0")
12068 (source
12069 (origin
12070 (method url-fetch)
12071 (uri (pypi-uri "ansi2html" version))
12072 (sha256
12073 (base32
12074 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
12075 (build-system python-build-system)
12076 (native-inputs
12077 `(("python-mock" ,python-mock)
12078 ("python-nose" ,python-nose)))
12079 (propagated-inputs
12080 `(("python-six" ,python-six)))
12081 (home-page "https://github.com/ralphbean/ansi2html")
12082 (synopsis "Convert ANSI-decorated console output to HTML")
12083 (description
12084 "@command{ansi2html} is a Python library and command line utility for
12085 convering text with ANSI color codes to HTML or LaTeX.")
12086 (license license:gpl3+)))
12087
12088 (define-public python2-ansi2html
12089 (package-with-python2 python-ansi2html))
12090
12091 (define-public python-ddt
12092 (package
12093 (name "python-ddt")
12094 (version "1.1.3")
12095 (source
12096 (origin
12097 (method url-fetch)
12098 (uri (pypi-uri "ddt" version))
12099 (sha256
12100 (base32
12101 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
12102 (build-system python-build-system)
12103 (native-inputs
12104 `(("python-mock" ,python-mock)
12105 ("python-nose" ,python-nose)))
12106 (propagated-inputs
12107 `(("python-six" ,python-six)
12108 ("python-pyyaml" ,python-pyyaml)))
12109 (home-page "https://github.com/txels/ddt")
12110 (synopsis "Data-Driven Tests")
12111 (description
12112 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
12113 running it with different test data, and make it appear as multiple test
12114 cases.")
12115 (license license:expat)))
12116
12117 (define-public python2-ddt
12118 (package-with-python2 python-ddt))
12119
12120 (define-public python-pycountry
12121 (package
12122 (name "python-pycountry")
12123 (version "18.5.26")
12124 (source
12125 (origin
12126 (method url-fetch)
12127 (uri (pypi-uri "pycountry" version))
12128 (sha256
12129 (base32
12130 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
12131 (build-system python-build-system)
12132 (home-page "https://bitbucket.org/flyingcircus/pycountry")
12133 (synopsis "ISO databases for languages, countries, currencies, etc.")
12134 (description
12135 "@code{pycountry} provides the ISO databases for the standards:
12136 @enumerate
12137 @item 639-3 (Languages)
12138 @item 3166 (Countries)
12139 @item 3166-3 (Deleted Countries)
12140 @item 3166-2 (Subdivisions of countries)
12141 @item 4217 (Currencies)
12142 @item 15924 (Scripts)
12143 @end enumerate
12144 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
12145 through a Python API.")
12146 (license license:lgpl2.1+)))
12147
12148 (define-public python2-pycountry
12149 (package-with-python2 python-pycountry))
12150
12151 (define-public python-pycosat
12152 (package
12153 (name "python-pycosat")
12154 (version "0.6.1")
12155 (source
12156 (origin
12157 (method url-fetch)
12158 (uri (pypi-uri "pycosat" version))
12159 (sha256
12160 (base32
12161 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
12162 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
12163 (build-system python-build-system)
12164 (home-page "https://github.com/ContinuumIO/pycosat")
12165 (synopsis "Bindings to picosat (a SAT solver)")
12166 (description
12167 "This package provides efficient Python bindings to @code{picosat} on
12168 the C level. When importing pycosat, the @code{picosat} solver becomes part
12169 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
12170 Problem} (SAT) solver.")
12171 (license license:expat)))
12172
12173 (define-public python2-pycosat
12174 (package-with-python2 python-pycosat))
12175
12176 (define-public python2-ruamel.ordereddict
12177 (package
12178 (name "python2-ruamel.ordereddict")
12179 (version "0.4.9")
12180 (source
12181 (origin
12182 (method url-fetch)
12183 (uri (pypi-uri "ruamel.ordereddict" version))
12184 (sha256
12185 (base32
12186 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
12187 (build-system python-build-system)
12188 (arguments
12189 `(#:python ,python-2
12190 #:phases
12191 (modify-phases %standard-phases
12192 (delete 'check)
12193 (add-after 'install 'check
12194 (lambda* (#:key inputs outputs #:allow-other-keys)
12195 (add-installed-pythonpath inputs outputs)
12196 (invoke "python" "test/testordereddict.py"))))))
12197 (home-page "https://bitbucket.org/ruamel/ordereddict")
12198 (synopsis "Version of dict that keeps keys in insertion order")
12199 (description
12200 "This is an implementation of an ordered dictionary with @dfn{Key
12201 Insertion Order} (KIO: updates of values do not affect the position of the
12202 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
12203 removed and put at the back). The standard library module @code{OrderedDict},
12204 implemented later, implements a subset of @code{ordereddict} functionality.
12205 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
12206 Order} (KSO, no sorting function can be specified, but a transform can be
12207 specified to apply on the key before comparison (e.g. @code{string.lower})).")
12208 (license license:expat)))
12209
12210 (define-public python-pypeg2
12211 (package
12212 (name "python-pypeg2")
12213 (version "2.15.2")
12214 (source
12215 (origin
12216 (method url-fetch)
12217 (uri (pypi-uri "pyPEG2" version))
12218 (sha256
12219 (base32
12220 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
12221 (build-system python-build-system)
12222 (propagated-inputs `(("python-lxml" ,python-lxml)))
12223 (arguments
12224 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
12225 '(#:tests? #f))
12226 (home-page "https://fdik.org/pyPEG/")
12227 (synopsis "Parsering Expression Grammars in Python")
12228 (description "PyPEG is an intrinsic parser interpreter framework for
12229 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
12230 parse many formal languages.")
12231 (license license:gpl2)))
12232
12233 (define-public python-incremental
12234 (package
12235 (name "python-incremental")
12236 (version "17.5.0")
12237 (source
12238 (origin
12239 (method url-fetch)
12240 (uri (pypi-uri "incremental" version))
12241 (sha256
12242 (base32
12243 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
12244 (build-system python-build-system)
12245 (home-page "https://github.com/hawkowl/incremental")
12246 (synopsis "Library for versioning Python projects")
12247 (description "Incremental is a small library that versions your Python
12248 projects.")
12249 (license license:expat)))
12250
12251 (define-public python2-incremental
12252 (package-with-python2 python-incremental))
12253
12254 (define-public python-invoke
12255 (package
12256 (name "python-invoke")
12257 (home-page "http://www.pyinvoke.org/")
12258 (version "1.3.0")
12259 (source (origin
12260 (method url-fetch)
12261 (uri (pypi-uri "invoke" version))
12262 (sha256
12263 (base32
12264 "1nn7gad0rvy492acpyhkrp01zsk86acf34qhsvq4xmm6x39788n5"))))
12265 (build-system python-build-system)
12266 (arguments
12267 ;; XXX: Requires many dependencies that are not yet in Guix.
12268 `(#:tests? #f))
12269 (synopsis "Pythonic task execution")
12270 (description
12271 "Invoke is a Python task execution tool and library, drawing inspiration
12272 from various sources to arrive at a powerful and clean feature set. It is
12273 evolved from the Fabric project, but focuses on local and abstract concerns
12274 instead of servers and network commands.")
12275 (license license:bsd-3)))
12276
12277 (define-public python2-invoke
12278 (package-with-python2 python-invoke))
12279
12280 (define-public python-automat
12281 (package
12282 (name "python-automat")
12283 (version "0.7.0")
12284 (source (origin
12285 (method url-fetch)
12286 (uri (pypi-uri "Automat" version))
12287 (sha256
12288 (base32
12289 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
12290 (build-system python-build-system)
12291 ;; We disable the tests because they require python-twisted, while
12292 ;; python-twisted depends on python-automat. Twisted is optional, but the
12293 ;; tests fail if it is not available. Also see
12294 ;; <https://github.com/glyph/automat/issues/71>.
12295 (arguments '(#:tests? #f))
12296 (native-inputs
12297 `(("python-m2r" ,python-m2r)
12298 ("python-setuptools-scm" ,python-setuptools-scm)
12299 ("python-graphviz" ,python-graphviz)))
12300 (propagated-inputs
12301 `(("python-six" ,python-six)
12302 ("python-attrs" ,python-attrs)))
12303 (home-page "https://github.com/glyph/Automat")
12304 (synopsis "Self-service finite-state machines")
12305 (description "Automat is a library for concise, idiomatic Python
12306 expression of finite-state automata (particularly deterministic finite-state
12307 transducers).")
12308 (license license:expat)))
12309
12310 (define-public python2-automat
12311 (package-with-python2 python-automat))
12312
12313 (define-public python-m2r
12314 (package
12315 (name "python-m2r")
12316 (version "0.2.1")
12317 (source (origin
12318 (method url-fetch)
12319 (uri (pypi-uri "m2r" version))
12320 (sha256
12321 (base32
12322 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
12323 (build-system python-build-system)
12324 (propagated-inputs
12325 `(("python-docutils" ,python-docutils)
12326 ("python-mistune" ,python-mistune)))
12327 (native-inputs
12328 `(("python-pygments" ,python-pygments)
12329 ("python-mock" ,python-mock)))
12330 (home-page "https://github.com/miyakogi/m2r")
12331 (synopsis "Markdown to reStructuredText converter")
12332 (description "M2R converts a markdown file including reST markups to valid
12333 reST format.")
12334 (license license:expat)))
12335
12336 (define-public python2-m2r
12337 (package-with-python2 python-m2r))
12338
12339 (define-public python-constantly
12340 (package
12341 (name "python-constantly")
12342 (version "15.1.0")
12343 (source (origin
12344 (method url-fetch)
12345 (uri (pypi-uri "constantly" version))
12346 (sha256
12347 (base32
12348 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
12349 (build-system python-build-system)
12350 (home-page "https://github.com/twisted/constantly")
12351 (synopsis "Symbolic constants in Python")
12352 (description "Constantly is a Python library that provides symbolic
12353 constant support. It includes collections and constants with text, numeric,
12354 and bit flag values.")
12355 (license license:expat)))
12356
12357 (define-public python2-constantly
12358 (package-with-python2 python-constantly))
12359
12360 (define-public python-attrs
12361 (package
12362 (name "python-attrs")
12363 (version "19.1.0")
12364 (source (origin
12365 (method url-fetch)
12366 (uri (pypi-uri "attrs" version))
12367 (sha256
12368 (base32
12369 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
12370 (build-system python-build-system)
12371 (arguments
12372 `(#:modules ((guix build utils)
12373 (guix build python-build-system)
12374 (ice-9 ftw)
12375 (srfi srfi-1)
12376 (srfi srfi-26))
12377 #:phases (modify-phases %standard-phases
12378 (replace 'check
12379 (lambda _
12380 (let ((cwd (getcwd)))
12381 (setenv "PYTHONPATH"
12382 (string-append
12383 cwd "/build/"
12384 (find (cut string-prefix? "lib" <>)
12385 (scandir (string-append cwd "/build")))
12386 ":"
12387 (getenv "PYTHONPATH")))
12388 (invoke "python" "-m" "pytest")))))))
12389 (native-inputs
12390 `(("python-coverage" ,python-coverage)
12391 ("python-hypothesis" ,python-hypothesis)
12392 ("python-pympler" ,python-pympler)
12393 ("python-pytest" ,python-pytest)
12394 ("python-six" ,python-six)
12395 ("python-sphinx" ,python-sphinx)
12396 ("python-zope-interface" ,python-zope-interface)))
12397 (home-page "https://github.com/python-attrs/attrs/")
12398 (synopsis "Attributes without boilerplate")
12399 (description "@code{attrs} is a Python package with class decorators that
12400 ease the chores of implementing the most common attribute-related object
12401 protocols.")
12402 (license license:expat)))
12403
12404 (define-public python2-attrs
12405 (package-with-python2 python-attrs))
12406
12407 (define-public python-attrs-bootstrap
12408 (package
12409 (inherit python-attrs)
12410 (name "python-attrs-bootstrap")
12411 (native-inputs `())
12412 (arguments `(#:tests? #f))))
12413
12414 (define-public python2-attrs-bootstrap
12415 (package-with-python2 python-attrs-bootstrap))
12416
12417 (define-public python2-cliapp
12418 (package
12419 (name "python2-cliapp")
12420 (version "1.20180812.1")
12421 (source
12422 (origin
12423 (method url-fetch)
12424 (uri (string-append
12425 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
12426 version ".tar.gz"))
12427 (sha256
12428 (base32
12429 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
12430 (build-system python-build-system)
12431 (arguments
12432 `(#:python ,python-2
12433 #:phases
12434 (modify-phases %standard-phases
12435 ;; check phase needs to be run before the build phase. If not,
12436 ;; coverage-test-runner looks for tests for the built source files,
12437 ;; and fails.
12438 (delete 'check)
12439 (add-before 'build 'check
12440 (lambda _
12441 ;; Disable python3 tests
12442 (substitute* "check"
12443 (("python3") "# python3"))
12444 (invoke "./check"))))))
12445 (native-inputs
12446 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12447 ("python2-pep8" ,python2-pep8)))
12448 (propagated-inputs
12449 `(("python2-pyaml" ,python2-pyaml)))
12450 (home-page "https://liw.fi/cliapp/")
12451 (synopsis "Python framework for command line programs")
12452 (description "@code{python2-cliapp} is a python framework for
12453 command line programs. It contains the typical stuff such programs
12454 need to do, such as parsing the command line for options, and
12455 iterating over input files.")
12456 (license license:gpl2+)))
12457
12458 (define-public python2-ttystatus
12459 (package
12460 (name "python2-ttystatus")
12461 (version "0.36")
12462 (source
12463 (origin
12464 (method url-fetch)
12465 (uri (string-append
12466 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
12467 version ".tar.gz"))
12468 (sha256
12469 (base32
12470 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
12471 (build-system python-build-system)
12472 (native-inputs
12473 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12474 ("python2-pep8" ,python2-pep8)))
12475 (arguments
12476 `(#:python ,python-2
12477 #:phases
12478 (modify-phases %standard-phases
12479 ;; check phase needs to be run before the build phase. If not,
12480 ;; coverage-test-runner looks for tests for the built source files,
12481 ;; and fails.
12482 (delete 'check)
12483 (add-before 'build 'check
12484 (lambda _ (invoke "make" "check"))))))
12485 (home-page "https://liw.fi/ttystatus/")
12486 (synopsis "Python library for showing progress reporting and
12487 status updates on terminals")
12488 (description "@code{python2-ttystatus} is a python library for
12489 showing progress reporting and status updates on terminals, for
12490 command line programs. Output is automatically adapted to the width
12491 of the terminal: truncated if it does not fit, and resized if the
12492 terminal size changes.")
12493 (license license:gpl3+)))
12494
12495 (define-public python2-tracing
12496 (package
12497 (name "python2-tracing")
12498 (version "0.10")
12499 (source
12500 (origin
12501 (method url-fetch)
12502 (uri (string-append
12503 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
12504 version ".tar.gz"))
12505 (sha256
12506 (base32
12507 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
12508 (build-system python-build-system)
12509 (arguments
12510 `(#:python ,python-2))
12511 (home-page "https://liw.fi/tracing/")
12512 (synopsis "Python debug logging helper")
12513 (description "@code{python2-tracing} is a python library for
12514 logging debug messages. It provides a way to turn debugging messages
12515 on and off, based on the filename they occur in. It is much faster
12516 than using @code{logging.Filter} to accomplish the same thing, which
12517 matters when code is run in production mode. The actual logging still
12518 happens using the @code{logging} library.")
12519 (license license:gpl3+)))
12520
12521 (define-public python2-larch
12522 (package
12523 (name "python2-larch")
12524 (version "1.20151025")
12525 (source
12526 (origin
12527 (method url-fetch)
12528 (uri (string-append
12529 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12530 version ".tar.gz"))
12531 (patches (search-patches
12532 "python2-larch-coverage-4.0a6-compatibility.patch"))
12533 (sha256
12534 (base32
12535 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12536 (build-system python-build-system)
12537 (arguments
12538 `(#:python ,python-2
12539 #:phases
12540 (modify-phases %standard-phases
12541 ;; check phase needs to be run before the build phase. If not,
12542 ;; coverage-test-runner looks for tests for the built source files,
12543 ;; and fails.
12544 (delete 'check)
12545 (add-before 'build 'check
12546 (lambda _ (invoke "make" "check"))))))
12547 (native-inputs
12548 `(("cmdtest" ,cmdtest)
12549 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12550 (propagated-inputs
12551 `(("python2-tracing" ,python2-tracing)))
12552 (home-page "https://liw.fi/larch/")
12553 (synopsis "Python copy-on-write B-tree library")
12554 (description "@code{python2-larch} is an implementation of
12555 particular kind of B-tree, based on research by Ohad Rodeh. See
12556 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12557 on the data structure.
12558
12559 The distinctive feature of this B-tree is that a node is never
12560 (conceptually) modified. Instead, all updates are done by
12561 copy-on-write. This makes it easy to clone a tree, and modify only the
12562 clone, while other processes access the original tree.")
12563 (license license:gpl3+)))
12564
12565 (define-public python-astroid
12566 (package
12567 (name "python-astroid")
12568 (version "2.3.3")
12569 (source
12570 (origin
12571 (method url-fetch)
12572 (uri (pypi-uri "astroid" version))
12573 (sha256
12574 (base32 "0fnibsl2cb5mvzbfm7sycj85smx48f8w8m7ks1sqlmpr9ps0gski"))))
12575 (build-system python-build-system)
12576 (propagated-inputs
12577 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12578 ("python-six" ,python-six)
12579 ("python-typed-ast" ,python-typed-ast)
12580 ("python-wrapt" ,python-wrapt)))
12581 (native-inputs
12582 `(("python-dateutil" ,python-dateutil)
12583 ("python-nose" ,python-nose)
12584 ("python-pytest" ,python-pytest)
12585 ("python-pytest-runner" ,python-pytest-runner)))
12586 (arguments
12587 `(#:phases
12588 (modify-phases %standard-phases
12589 (add-after 'unpack 'remove-spurious-test
12590 (lambda _
12591 ;; This can be removed after upgrading from python-3.7
12592 ;; https://github.com/PyCQA/astroid/issues/593
12593 ;; https://bugs.python.org/issue34056
12594 (delete-file "astroid/tests/unittest_modutils.py")
12595 #t))
12596 (replace 'check
12597 (lambda _
12598 (invoke "pytest" "astroid"))))))
12599 (home-page "https://github.com/PyCQA/astroid")
12600 (synopsis "Common base representation of python source code for pylint and
12601 other projects")
12602 (description "@code{python-astroid} provides a common base representation
12603 of python source code for projects such as pychecker, pyreverse, pylint, etc.
12604
12605 It provides a compatible representation which comes from the _ast module. It
12606 rebuilds the tree generated by the builtin _ast module by recursively walking
12607 down the AST and building an extended ast. The new node classes have
12608 additional methods and attributes for different usages. They include some
12609 support for static inference and local name scopes. Furthermore, astroid
12610 builds partial trees by inspecting living objects.")
12611 (license license:lgpl2.1+)
12612 (properties `((python2-variant . ,(delay python2-astroid))))))
12613
12614 (define-public python2-astroid
12615 (let ((base (package-with-python2
12616 (strip-python2-variant python-astroid))))
12617 (package (inherit base)
12618 ;; Version 2.x removes python2 support.
12619 (version "1.6.5")
12620 (source
12621 (origin
12622 (method url-fetch)
12623 (uri (pypi-uri "astroid" version))
12624 (sha256
12625 (base32
12626 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12627 (arguments
12628 (substitute-keyword-arguments (package-arguments base)
12629 ((#:phases phases)
12630 `(modify-phases ,phases
12631 (add-after 'unpack 'remove-spurious-test
12632 (lambda _
12633 ;; https://github.com/PyCQA/astroid/issues/276
12634 (delete-file "astroid/tests/unittest_brain.py")
12635 #t))
12636 (replace 'check
12637 (lambda _
12638 (invoke"python" "-m" "unittest" "discover"
12639 "-p" "unittest*.py")))))))
12640 (native-inputs `())
12641 (propagated-inputs
12642 `(("python2-backports-functools-lru-cache"
12643 ,python2-backports-functools-lru-cache)
12644 ("python2-enum34" ,python2-enum34)
12645 ("python2-singledispatch" ,python2-singledispatch)
12646 ,@(alist-delete "python-typed-ast"
12647 (package-propagated-inputs base)))))))
12648
12649 (define-public python-isort
12650 (package
12651 (name "python-isort")
12652 (version "4.3.4")
12653 (source
12654 (origin
12655 (method git-fetch)
12656 (uri (git-reference
12657 ;; Tests pass only from the Github sources
12658 (url "https://github.com/timothycrosley/isort")
12659 (commit version)))
12660 (file-name (git-file-name name version))
12661 (sha256
12662 (base32
12663 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
12664 (build-system python-build-system)
12665 (native-inputs
12666 `(("python-mock" ,python-mock)
12667 ("python-pytest" ,python-pytest)))
12668 (home-page "https://github.com/timothycrosley/isort")
12669 (synopsis "Python utility/library to sort python imports")
12670 (description "@code{python-isort} is a python utility/library to sort
12671 imports alphabetically, and automatically separated into sections. It
12672 provides a command line utility, a python library and plugins for various
12673 editors.")
12674 (license license:expat)
12675 (properties `((python2-variant . ,(delay python2-isort))))))
12676
12677 (define-public python2-isort
12678 (let ((base (package-with-python2
12679 (strip-python2-variant python-isort))))
12680 (package (inherit base)
12681 (native-inputs
12682 `(("python2-futures" ,python2-futures)
12683 ,@(package-native-inputs base))))))
12684
12685 (define-public python2-backports-functools-lru-cache
12686 (package
12687 (name "python2-backports-functools-lru-cache")
12688 (version "1.5")
12689 (source
12690 (origin
12691 (method url-fetch)
12692 ;; only the pypi tarballs contain the necessary metadata
12693 (uri (pypi-uri "backports.functools_lru_cache" version))
12694 (sha256
12695 (base32
12696 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12697 (build-system python-build-system)
12698 (native-inputs
12699 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12700 (arguments
12701 `(#:python ,python-2))
12702 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12703 (synopsis "Backport of functools.lru_cache from Python 3.3")
12704 (description "@code{python2-backports-functools-lru-cache} is a backport
12705 of @code{functools.lru_cache} from python 3.3.")
12706 (license license:expat)))
12707
12708 (define-public python-configparser
12709 (package
12710 (name "python-configparser")
12711 (version "3.7.1")
12712 (source
12713 (origin
12714 (method url-fetch)
12715 (uri (pypi-uri "configparser" version))
12716 (sha256
12717 (base32
12718 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
12719 (build-system python-build-system)
12720 (home-page "https://github.com/jaraco/configparser/")
12721 (synopsis "Backport of configparser from python 3.5")
12722 (description "@code{python-configparser} is a backport of
12723 @code{configparser} from Python 3.5 so that it can be used directly
12724 in other versions.")
12725 (license license:expat)))
12726
12727 (define-public python2-configparser
12728 (package-with-python2 python-configparser))
12729
12730 (define-public python-mando
12731 (package
12732 (name "python-mando")
12733 (version "0.6.4")
12734 (source (origin
12735 (method url-fetch)
12736 (uri (pypi-uri "mando" version))
12737 (sha256
12738 (base32
12739 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12740 (build-system python-build-system)
12741 (propagated-inputs
12742 `(("python-rst2ansi" ,python-rst2ansi)
12743 ("python-six" ,python-six)))
12744 (native-inputs
12745 `(("python-pytest" ,python-pytest)))
12746 (home-page "https://mando.readthedocs.org/")
12747 (synopsis
12748 "Wrapper around argparse, allowing creation of complete CLI applications")
12749 (description
12750 "This package is a wrapper around argparse, allowing you to write complete CLI
12751 applications in seconds while maintaining all the flexibility.")
12752 (license license:expat)))
12753
12754 (define-public python2-mando
12755 (package-with-python2 python-mando))
12756
12757 (define-public python2-argparse
12758 (package
12759 (name "python2-argparse")
12760 (version "1.4.0")
12761 (source
12762 (origin
12763 (method url-fetch)
12764 (uri (pypi-uri "argparse" version))
12765 (sha256
12766 (base32
12767 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12768 (build-system python-build-system)
12769 (arguments
12770 `(#:python ,python-2))
12771 (home-page "https://github.com/ThomasWaldmann/argparse/")
12772 (synopsis "Python command-line parsing library")
12773 (description
12774 "This package is mostly for people who want to have @code{argparse} on
12775 older Pythons because it was not part of the standard library back then.")
12776 (license license:psfl)))
12777
12778 (define-public python-fudge
12779 (package
12780 (name "python-fudge")
12781 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
12782 ;; package, which is currently the only use of this package.
12783 (version "0.9.6")
12784 (source
12785 (origin
12786 (method url-fetch)
12787 (uri (pypi-uri "fudge" version))
12788 (sha256
12789 (base32
12790 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
12791 (build-system python-build-system)
12792 (arguments
12793 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
12794 (home-page "https://github.com/fudge-py/fudge")
12795 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
12796 (description
12797 "Fudge is a Python module for using fake objects (mocks and stubs) to
12798 test real ones.
12799
12800 In readable Python code, you declare the methods available on your fake object
12801 and how they should be called. Then you inject that into your application and
12802 start testing. This declarative approach means you don’t have to record and
12803 playback actions and you don’t have to inspect your fakes after running code.
12804 If the fake object was used incorrectly then you’ll see an informative
12805 exception message with a traceback that points to the culprit.")
12806 (license license:expat)))
12807
12808 (define-public python2-fudge
12809 (package-with-python2 python-fudge))
12810
12811 (define-public python-mwclient
12812 (package
12813 (name "python-mwclient")
12814 (version "0.8.4")
12815 (source
12816 (origin
12817 (method url-fetch)
12818 ;; The PyPI version wouldn't contain tests.
12819 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
12820 "v" version ".tar.gz"))
12821 (file-name (string-append name "-" version ".tar.gz"))
12822 (sha256
12823 (base32
12824 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
12825 (build-system python-build-system)
12826 (propagated-inputs
12827 `(("python-requests" ,python-requests)
12828 ("python-requests-oauthlib"
12829 ,python-requests-oauthlib)
12830 ("python-six" ,python-six)))
12831 (native-inputs
12832 `(("python-mock" ,python-mock)
12833 ("python-pytest" ,python-pytest)
12834 ("python-pytest-pep8" ,python-pytest-pep8)
12835 ("python-pytest-cache" ,python-pytest-cache)
12836 ("python-pytest-cov" ,python-pytest-cov)
12837 ("python-responses" ,python-responses)))
12838 (home-page "https://github.com/btongminh/mwclient")
12839 (synopsis "MediaWiki API client")
12840 (description "This package provides a MediaWiki API client.")
12841 (license license:expat)))
12842
12843 (define-public python2-mwclient
12844 (package-with-python2 python-mwclient))
12845
12846 (define-public python-utils
12847 (package
12848 (name "python-utils")
12849 (version "2.1.0")
12850 (source (origin
12851 (method url-fetch)
12852 (uri (pypi-uri "python-utils" version))
12853 (sha256
12854 (base32
12855 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
12856 (build-system python-build-system)
12857 (native-inputs
12858 `(("pytest-runner" ,python-pytest-runner)
12859 ("pytest" ,python-pytest)
12860 ("six" ,python-six)))
12861 (home-page "https://github.com/WoLpH/python-utils")
12862 (synopsis "Convenient utilities not included with the standard Python install")
12863 (description
12864 "Python Utils is a collection of small Python functions and classes which
12865 make common patterns shorter and easier.")
12866 (license license:bsd-2)))
12867
12868 (define-public python2-utils
12869 (package-with-python2 python-utils))
12870
12871 (define-public python-diff-match-patch
12872 (package
12873 (name "python-diff-match-patch")
12874 (version "20121119")
12875 (source
12876 (origin
12877 (method url-fetch)
12878 (uri (pypi-uri "diff-match-patch" version))
12879 (sha256
12880 (base32
12881 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
12882 (build-system python-build-system)
12883 (home-page "https://code.google.com/p/google-diff-match-patch")
12884 (synopsis "Synchronize plain text")
12885 (description "Diff Match and Patch libraries offer robust algorithms to
12886 perform the operations required for synchronizing plain text.")
12887 (license license:asl2.0)))
12888
12889 (define-public python2-diff-match-patch
12890 (package-with-python2 python-diff-match-patch))
12891
12892 (define-public python-dirsync
12893 (package
12894 (name "python-dirsync")
12895 (version "2.2.3")
12896 (source
12897 (origin
12898 (method url-fetch)
12899 (uri (pypi-uri "dirsync" version))
12900 (sha256
12901 (base32
12902 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
12903 (build-system python-build-system)
12904 (propagated-inputs
12905 `(("six" ,python-six)))
12906 (home-page "https://bitbucket.org/tkhyn/dirsync")
12907 (synopsis "Advanced directory tree synchronisation tool")
12908 (description "Advanced directory tree synchronisation tool.")
12909 (license license:expat)))
12910
12911 (define-public python2-dirsync
12912 (package-with-python2 python-dirsync))
12913
12914 (define-public python-levenshtein
12915 (package
12916 (name "python-levenshtein")
12917 (version "0.12.0")
12918 (source
12919 (origin
12920 (method url-fetch)
12921 (uri (pypi-uri "python-Levenshtein" version))
12922 (sha256
12923 (base32
12924 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
12925 (build-system python-build-system)
12926 (home-page "https://github.com/ztane/python-Levenshtein")
12927 (synopsis "Fast computation of Levenshtein distance and string similarity")
12928 (description
12929 "The Levenshtein Python C extension module contains functions for fast computation of
12930 @enumerate
12931 @item Levenshtein (edit) distance, and edit operations
12932 @item string similarity
12933 @item approximate median strings, and generally string averaging
12934 @item string sequence and set similarity
12935 @end enumerate
12936 It supports both normal and Unicode strings.")
12937 (license license:gpl2+)))
12938
12939 (define-public python2-levenshtein
12940 (package-with-python2 python-levenshtein))
12941
12942 (define-public python-scandir
12943 (package
12944 (name "python-scandir")
12945 (version "1.9.0")
12946 (source
12947 (origin
12948 (method url-fetch)
12949 (uri (pypi-uri "scandir" version))
12950 (sha256
12951 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
12952 (build-system python-build-system)
12953 (arguments
12954 `(#:phases (modify-phases %standard-phases
12955 (replace 'check
12956 (lambda _
12957 (invoke "python" "test/run_tests.py"))))))
12958 (home-page "https://github.com/benhoyt/scandir")
12959 (synopsis "Directory iteration function")
12960 (description
12961 "Directory iteration function like os.listdir(), except that instead of
12962 returning a list of bare filenames, it yields DirEntry objects that include
12963 file type and stat information along with the name. Using scandir() increases
12964 the speed of os.walk() by 2-20 times (depending on the platform and file
12965 system) by avoiding unnecessary calls to os.stat() in most cases.
12966
12967 This package is part of the Python standard library since version 3.5.")
12968 (license license:bsd-3)))
12969
12970 (define-public python2-scandir
12971 (package-with-python2 python-scandir))
12972
12973 (define-public python2-stemming
12974 (package
12975 (name "python2-stemming")
12976 (version "1.0.1")
12977 (source
12978 (origin
12979 (method url-fetch)
12980 (uri (pypi-uri "stemming" version))
12981 (sha256
12982 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
12983 (build-system python-build-system)
12984 (arguments
12985 `(#:python ,python-2))
12986 (home-page "https://bitbucket.org/mchaput/stemming/overview")
12987 (synopsis "Python implementations of various stemming algorithms")
12988 (description
12989 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
12990 stemming algorithms for English. These implementations are straightforward and
12991 efficient, unlike some Python versions of the same algorithms available on the
12992 Web. This package is an extraction of the stemming code included in the Whoosh
12993 search engine.")
12994 (license license:public-domain)))
12995
12996 (define-public python-factory-boy
12997 (package
12998 (name "python-factory-boy")
12999 (version "2.8.1")
13000 (source
13001 (origin
13002 (method url-fetch)
13003 (uri (pypi-uri "factory_boy" version))
13004 (sha256
13005 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
13006 (build-system python-build-system)
13007 (arguments
13008 ;; Tests are not included in the tarball.
13009 `(#:tests? #f))
13010 (propagated-inputs
13011 `(("faker" ,python-faker)))
13012 (home-page "https://github.com/benhoyt/scandir")
13013 (synopsis "Versatile test fixtures replacement")
13014 (description
13015 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
13016
13017 As a fixtures replacement tool, it aims to replace static, hard to maintain
13018 fixtures with easy-to-use factories for complex object.
13019
13020 Instead of building an exhaustive test setup with every possible combination
13021 of corner cases, factory_boy allows you to use objects customized for the
13022 current test, while only declaring the test-specific fields")
13023 (license license:expat)))
13024
13025 (define-public python2-factory-boy
13026 (package-with-python2 python-factory-boy))
13027
13028 (define-public python-translate-toolkit
13029 (package
13030 (name "python-translate-toolkit")
13031 (version "2.1.0")
13032 (source
13033 (origin
13034 (method url-fetch)
13035 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
13036 (sha256
13037 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
13038 (build-system python-build-system)
13039 (native-inputs
13040 `(("python-pytest" ,python-pytest)
13041 ("python-sphinx" ,python-sphinx)))
13042 (propagated-inputs
13043 `(("python-babel" ,python-babel)
13044 ("python-beautifulsoup4" ,python-beautifulsoup4)
13045 ("python-chardet" ,python-chardet)
13046 ("python-diff-match-patch" ,python-diff-match-patch)
13047 ("python-levenshtein" ,python-levenshtein)
13048 ("python-lxml" ,python-lxml)
13049 ("python-six" ,python-six)
13050 ("python-vobject" ,python-vobject)
13051 ("python-pyyaml" ,python-pyyaml)))
13052 (arguments
13053 ;; TODO: tests are not run, because they end with
13054 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
13055 ;; 'parse_funcs'
13056 ;; during test setup.
13057 `(#:tests? #f))
13058 (home-page "https://toolkit.translatehouse.org")
13059 (synopsis "Tools and API for translation and localization engineering")
13060 (description
13061 "Tools and API for translation and localization engineering. It contains
13062 several utilities, as well as an API for building localization tools.")
13063 (license license:gpl2+)))
13064
13065 (define-public python2-translate-toolkit
13066 (package-with-python2 python-translate-toolkit))
13067
13068 (define-public python-packaging
13069 (package
13070 (name "python-packaging")
13071 (version "19.2")
13072 (source
13073 (origin
13074 (method url-fetch)
13075 (uri (pypi-uri "packaging" version))
13076 (sha256
13077 (base32
13078 "0izwlz9h0bw171a1chr311g2y7n657zjaf4mq4rgm8pp9lbj9f98"))))
13079 (build-system python-build-system)
13080 (arguments
13081 `(#:phases (modify-phases %standard-phases
13082 (replace 'check
13083 (lambda _ (invoke "py.test" "-vv"))))))
13084 (native-inputs
13085 `(("python-pretend" ,python-pretend)
13086 ("python-pytest" ,python-pytest)))
13087 (propagated-inputs
13088 `(("python-pyparsing" ,python-pyparsing)
13089 ("python-six" ,python-six)))
13090 (home-page "https://github.com/pypa/packaging")
13091 (synopsis "Core utilities for Python packages")
13092 (description "Packaging is a Python module for dealing with Python packages.
13093 It offers an interface for working with package versions, names, and dependency
13094 information.")
13095 ;; From 'LICENSE': This software is made available under the terms of
13096 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
13097 ;; Contributions to this software is made under the terms of *both* these
13098 ;; licenses.
13099 (license (list license:asl2.0 license:bsd-2))))
13100
13101 (define-public python2-packaging
13102 (package-with-python2 python-packaging))
13103
13104 (define-public python-relatorio
13105 (package
13106 (name "python-relatorio")
13107 (version "0.8.0")
13108 (source
13109 (origin
13110 (method url-fetch)
13111 (uri (pypi-uri "relatorio" version))
13112 (sha256
13113 (base32
13114 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
13115 (build-system python-build-system)
13116 (propagated-inputs
13117 `(("python-lxml" ,python-lxml)
13118 ("python-genshi" ,python-genshi)))
13119 (native-inputs
13120 `(("python-magic" ,python-magic)))
13121 (home-page "https://relatorio.tryton.org/")
13122 (synopsis "Templating library able to output ODT and PDF files")
13123 (description "Relatorio is a templating library which provides a way to
13124 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
13125 for more filetypes can be easily added by creating plugins for them.")
13126 (license license:gpl3+)))
13127
13128 (define-public python2-relatorio
13129 (package-with-python2 python-relatorio))
13130
13131 (define-public python-radon
13132 (package
13133 (name "python-radon")
13134 (version "2.2.0")
13135 (source
13136 (origin
13137 (method url-fetch)
13138 (uri (pypi-uri "radon" version))
13139 (sha256
13140 (base32
13141 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
13142 (build-system python-build-system)
13143 (arguments
13144 `(#:phases (modify-phases %standard-phases
13145 (replace 'check
13146 (lambda _
13147 (invoke "python" "radon/tests/run.py"))))))
13148 (propagated-inputs
13149 `(("python-colorama" ,python-colorama)
13150 ("python-flake8-polyfill" ,python-flake8-polyfill)
13151 ("python-mando" ,python-mando)))
13152 (native-inputs
13153 `(("python-pytest" ,python-pytest)
13154 ("python-pytest-mock" ,python-pytest-mock)))
13155 (home-page "https://radon.readthedocs.org/")
13156 (synopsis "Code Metrics in Python")
13157 (description "Radon is a Python tool which computes various code metrics.
13158 Supported metrics are:
13159 @itemize @bullet
13160 @item raw metrics: SLOC, comment lines, blank lines, &c.
13161 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
13162 @item Halstead metrics (all of them)
13163 @item the Maintainability Index (a Visual Studio metric)
13164 @end itemize")
13165 (license license:expat)))
13166
13167 (define-public python2-radon
13168 (package-with-python2 python-radon))
13169
13170 (define-public python-sure
13171 (package
13172 (name "python-sure")
13173 (version "1.4.11")
13174 (source
13175 (origin
13176 (method url-fetch)
13177 (uri (pypi-uri "sure" version))
13178 (sha256
13179 (base32
13180 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
13181 (build-system python-build-system)
13182 (propagated-inputs
13183 `(("python-mock" ,python-mock)
13184 ("python-six" ,python-six)))
13185 (native-inputs
13186 `(("python-nose" ,python-nose)))
13187 (home-page "https://github.com/gabrielfalcao/sure")
13188 (synopsis "Automated testing library in python for python")
13189 (description
13190 "Sure is a python library that leverages a DSL for writing assertions.
13191 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
13192 (license license:gpl3+)))
13193
13194 (define-public python2-sure
13195 (package-with-python2 python-sure))
13196
13197 (define-public python2-couleur
13198 ;; This package does not seem to support python3 at all, hence,
13199 ;; only the python2 variant definition is provided.
13200 (package
13201 (name "python2-couleur")
13202 (version "0.6.2")
13203 (source
13204 (origin
13205 (method url-fetch)
13206 (uri (pypi-uri "couleur" version))
13207 (sha256
13208 (base32
13209 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
13210 (build-system python-build-system)
13211 (arguments
13212 `(#:python ,python-2))
13213 (home-page "https://github.com/gabrielfalcao/couleur")
13214 (synopsis
13215 "ANSI terminal tool for python, colored shell and other handy fancy features")
13216 (description
13217 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
13218 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
13219 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
13220 ;; https://github.com/gabrielfalcao/couleur/issues/11
13221 (license license:lgpl3+)))
13222
13223 (define-public python-misaka
13224 (package
13225 (name "python-misaka")
13226 (version "2.1.1")
13227 (source
13228 (origin
13229 (method url-fetch)
13230 (uri (pypi-uri "misaka" version))
13231 (sha256
13232 (base32
13233 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
13234 (build-system python-build-system)
13235 (arguments
13236 `(;; Line 37 of setup.py calls self.run_command('develop')
13237 ;; in the 'check' phase. This command seems to be trying
13238 ;; to write to
13239 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
13240 ;; for which it does not have the permission to write.
13241 #:tests? #f))
13242 (propagated-inputs
13243 `(("python-cffi" ,python-cffi)))
13244 (home-page "https://github.com/FSX/misaka")
13245 (synopsis "Python binding for Hoedown")
13246 (description
13247 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
13248 library written in C. It features a fast HTML renderer and functionality to make custom
13249 renderers (e.g. man pages or LaTeX).")
13250 (license license:expat)))
13251
13252 (define-public python2-misaka
13253 (package-with-python2 python-misaka))
13254
13255 (define-public python2-steadymark
13256 ;; This is forced into being a python2 only variant
13257 ;; due to its dependence on couleur that has no support
13258 ;; for python3
13259 (package
13260 (name "python2-steadymark")
13261 (version "0.7.3")
13262 (source
13263 (origin
13264 (method url-fetch)
13265 (uri (pypi-uri "steadymark" version))
13266 (sha256
13267 (base32
13268 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
13269 (build-system python-build-system)
13270 (native-inputs
13271 `(("python-couleur" ,python2-couleur)
13272 ("python-sure" ,python2-sure)
13273 ("python-misaka" ,python2-misaka)))
13274 (arguments
13275 `(#:python ,python-2
13276 #:phases
13277 (modify-phases %standard-phases
13278 (add-before 'build 'patch-setup-py
13279 (lambda _
13280 ;; Update requirements from dependency==version
13281 ;; to dependency>=version
13282 (substitute* "setup.py"
13283 (("==") ">="))
13284 #t)))))
13285 (home-page "https://github.com/gabrielfalcao/steadymark")
13286 (synopsis "Markdown-based test runner for python")
13287 (description
13288 "@code{Steadymark} allows documentation to be written in github-flavoured
13289 markdown. The documentation may contain snippets of code surrounded by python
13290 code blocks and @code{Steadymark} will find these snippets and run them, making
13291 sure that there are no old malfunctional examples in the documentation examples.")
13292 (license license:expat)))
13293
13294 (define-public python-jsonpointer
13295 (package
13296 (name "python-jsonpointer")
13297 (version "1.10")
13298 (source
13299 (origin
13300 (method url-fetch)
13301 (uri (pypi-uri "jsonpointer" version))
13302 (sha256
13303 (base32
13304 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
13305 (build-system python-build-system)
13306 (home-page "https://github.com/stefankoegl/python-json-pointer")
13307 (synopsis "Identify specific nodes in a JSON document")
13308 (description "@code{jsonpointer} allows you to access specific nodes
13309 by path in a JSON document (see RFC 6901).")
13310 (license license:bsd-3)))
13311
13312 (define-public python2-jsonpointer
13313 (package-with-python2 python-jsonpointer))
13314
13315 (define-public python-jsonpatch
13316 (package
13317 (name "python-jsonpatch")
13318 (version "1.16")
13319 (source
13320 (origin
13321 (method url-fetch)
13322 ;; pypi version lacks tests.js
13323 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
13324 "archive/v" version ".tar.gz"))
13325 (file-name (string-append name "-" version ".tar.gz"))
13326 (sha256
13327 (base32
13328 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
13329 (build-system python-build-system)
13330 (native-inputs
13331 `(("python-jsonpointer" ,python-jsonpointer)))
13332 (home-page "https://github.com/stefankoegl/python-json-patch")
13333 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
13334 (description "@code{jsonpatch} is a library and program that allows
13335 applying JSON Patches according to RFC 6902.")
13336 (license license:bsd-3)))
13337
13338 (define-public python2-jsonpatch
13339 (package-with-python2 python-jsonpatch))
13340
13341 (define-public python-jsonpatch-0.4
13342 (package (inherit python-jsonpatch)
13343 (name "python-jsonpatch")
13344 (version "0.4")
13345 (source
13346 (origin
13347 (method url-fetch)
13348 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
13349 "archive/v" version ".tar.gz"))
13350 (file-name (string-append name "-" version ".tar.gz"))
13351 (sha256
13352 (base32
13353 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
13354
13355 (define-public python2-jsonpatch-0.4
13356 (package-with-python2 python-jsonpatch-0.4))
13357
13358 (define-public python-rfc3986
13359 (package
13360 (name "python-rfc3986")
13361 (version "1.1.0")
13362 (source (origin
13363 (method url-fetch)
13364 (uri (pypi-uri "rfc3986" version))
13365 (sha256
13366 (base32
13367 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
13368 (build-system python-build-system)
13369 (arguments
13370 `(#:modules ((guix build utils)
13371 (guix build python-build-system)
13372 (ice-9 ftw)
13373 (srfi srfi-1)
13374 (srfi srfi-26))
13375 #:phases
13376 (modify-phases %standard-phases
13377 (replace 'check
13378 (lambda _
13379 (let ((cwd (getcwd)))
13380 (setenv "PYTHONPATH"
13381 (string-append cwd "/build/"
13382 (find (cut string-prefix? "lib" <>)
13383 (scandir (string-append cwd "/build")))
13384 ":"
13385 (getenv "PYTHONPATH")))
13386 (invoke "pytest" "-v")))))))
13387 (native-inputs
13388 `(("python-pytest" ,python-pytest)))
13389 (home-page "https://rfc3986.readthedocs.io/")
13390 (synopsis "Parse and validate URI references")
13391 (description
13392 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
13393 validation and authority parsing. This module also supports RFC@tie{}6874
13394 which adds support for zone identifiers to IPv6 addresses.")
13395 (license license:asl2.0)))
13396
13397 (define-public python2-rfc3986
13398 (package-with-python2 python-rfc3986))
13399
13400 (define-public python-rfc3987
13401 (package
13402 (name "python-rfc3987")
13403 (version "1.3.7")
13404 (source
13405 (origin
13406 (method url-fetch)
13407 (uri (pypi-uri "rfc3987" version))
13408 (sha256
13409 (base32
13410 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
13411 (build-system python-build-system)
13412 (home-page "https://pypi.python.org/pypi/rfc3987")
13413 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
13414 (description "@code{rfc3987} provides routines for parsing and
13415 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
13416 (license license:gpl3+)))
13417
13418 (define-public python2-rfc3987
13419 (package-with-python2 python-rfc3987))
13420
13421 (define-public python-validate-email
13422 (package
13423 (name "python-validate-email")
13424 (version "1.3")
13425 (source
13426 (origin
13427 (method url-fetch)
13428 (uri (pypi-uri "validate_email" version))
13429 (sha256
13430 (base32
13431 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
13432 (build-system python-build-system)
13433 (home-page "https://github.com/syrusakbary/validate_email")
13434 (synopsis "Verifies if an email address is valid and really exists")
13435 (description "@code{validate_email} can be used to verify if an email
13436 address is valid and really exists.")
13437 (license license:lgpl3+)))
13438
13439 (define-public python2-validate-email
13440 (package-with-python2 python-validate-email))
13441
13442 (define-public python-flex
13443 (package
13444 (name "python-flex")
13445 (version "6.10.0")
13446 (source
13447 (origin
13448 (method url-fetch)
13449 (uri (pypi-uri "flex" version))
13450 (sha256
13451 (base32
13452 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
13453 (build-system python-build-system)
13454 (propagated-inputs
13455 `(("python-click" ,python-click)
13456 ("python-iso8601" ,python-iso8601)
13457 ("python-jsonpointer" ,python-jsonpointer)
13458 ("python-pyyaml" ,python-pyyaml)
13459 ("python-requests" ,python-requests)
13460 ("python-rfc3987" ,python-rfc3987)
13461 ("python-six" ,python-six)
13462 ("python-validate-email" ,python-validate-email)))
13463 (home-page "https://github.com/pipermerriam/flex")
13464 (synopsis "Validates Swagger schemata")
13465 (description "@code{flex} can be used to validate Swagger schemata.")
13466 (license license:bsd-3)))
13467
13468 (define-public python2-flex
13469 (package-with-python2 python-flex))
13470
13471 (define-public python-marshmallow
13472 (package
13473 (name "python-marshmallow")
13474 (version "3.0.0b14")
13475 (source
13476 (origin
13477 (method url-fetch)
13478 (uri (pypi-uri "marshmallow" version))
13479 (sha256
13480 (base32
13481 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
13482 (build-system python-build-system)
13483 (propagated-inputs
13484 `(("python-dateutil" ,python-dateutil)
13485 ("python-simplejson" ,python-simplejson)))
13486 (native-inputs
13487 `(("python-pytest" ,python-pytest)
13488 ("python-pytz" ,python-pytz)))
13489 (home-page "https://github.com/marshmallow-code/marshmallow")
13490 (synopsis "Convert complex datatypes to and from native
13491 Python datatypes.")
13492 (description "@code{marshmallow} provides a library for converting
13493 complex datatypes to and from native Python datatypes.")
13494 (license license:expat)))
13495
13496 (define-public python2-marshmallow
13497 (package-with-python2 python-marshmallow))
13498
13499 (define-public python-apispec
13500 (package
13501 (name "python-apispec")
13502 (version "0.25.3")
13503 (source
13504 (origin
13505 (method url-fetch)
13506 (uri (pypi-uri "apispec" version))
13507 (sha256
13508 (base32
13509 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
13510 (build-system python-build-system)
13511 (propagated-inputs
13512 `(("python-pyyaml" ,python-pyyaml)))
13513 (native-inputs
13514 `(("python-pytest" ,python-pytest)
13515 ("python-flask" ,python-flask)
13516 ("python-marshmallow" ,python-marshmallow)
13517 ("python-tornado" ,python-tornado)
13518 ("python-bottle" ,python-bottle)
13519 ("python-mock" ,python-mock)))
13520 (home-page "https://github.com/marshmallow-code/apispec")
13521 (synopsis "Swagger 2.0 API specification generator")
13522 (description "@code{python-apispec} is a pluggable API specification
13523 generator. Currently supports the OpenAPI specification (f.k.a.
13524 Swagger 2.0).")
13525 (license license:expat)))
13526
13527 (define-public python2-apispec
13528 (package-with-python2 python-apispec))
13529
13530 (define-public python-flasgger
13531 (package
13532 (name "python-flasgger")
13533 (version "0.6.3")
13534 (source
13535 (origin
13536 (method git-fetch)
13537 (uri (git-reference
13538 (url "https://github.com/rochacbruno/flasgger.git")
13539 (commit version)))
13540 (file-name (git-file-name name version))
13541 (sha256
13542 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
13543 (build-system python-build-system)
13544 (arguments
13545 `(#:phases
13546 (modify-phases %standard-phases
13547 (replace 'check
13548 (lambda* (#:key inputs outputs #:allow-other-keys)
13549 (substitute* "Makefile"
13550 (("flake8 flasgger --ignore=F403")
13551 "flake8 flasgger --ignore=E731,F403"))
13552 (setenv "PYTHONPATH" (string-append (getcwd)
13553 ":"
13554 (getenv "PYTHONPATH")))
13555 (invoke "py.test"))))))
13556 (propagated-inputs
13557 `(("python-flask" ,python-flask)
13558 ("python-pyyaml" ,python-pyyaml)
13559 ("python-jsonschema" ,python-jsonschema)
13560 ("python-mistune" ,python-mistune)
13561 ("python-six" ,python-six)))
13562 (native-inputs
13563 `(("python-decorator" ,python-decorator)
13564 ("python-flake8" ,python-flake8)
13565 ("python-flask-restful" ,python-flask-restful)
13566 ("python-flex" ,python-flex)
13567 ("python-pytest" ,python-pytest)
13568 ("python-pytest-cov" ,python-pytest-cov)
13569 ("python-marshmallow" ,python-marshmallow)
13570 ("python-apispec" ,python-apispec)))
13571 (home-page "https://github.com/rochacbruno/flasgger/")
13572 (synopsis "Extract Swagger specs from your Flask project")
13573 (description "@code{python-flasgger} allows extracting Swagger specs
13574 from your Flask project. It is a fork of Flask-Swagger.")
13575 (license license:expat)))
13576
13577 (define-public python2-flasgger
13578 (package-with-python2 python-flasgger))
13579
13580 (define-public python-swagger-spec-validator
13581 (package
13582 (name "python-swagger-spec-validator")
13583 (version "2.4.3")
13584 (source
13585 (origin
13586 (method url-fetch)
13587 (uri (pypi-uri "swagger-spec-validator" version))
13588 (sha256
13589 (base32
13590 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
13591 (build-system python-build-system)
13592 (propagated-inputs
13593 `(("python-jsonschema" ,python-jsonschema)
13594 ("python-pyyaml" ,python-pyyaml)
13595 ("python-six" ,python-six)))
13596 (home-page
13597 "https://github.com/Yelp/swagger_spec_validator")
13598 (synopsis "Validation of Swagger specifications")
13599 (description "@code{swagger_spec_validator} provides a library for
13600 validating Swagger API specifications.")
13601 (license license:asl2.0)))
13602
13603 (define-public python2-swagger-spec-validator
13604 (package-with-python2 python-swagger-spec-validator))
13605
13606 (define-public python-apache-libcloud
13607 (package
13608 (name "python-apache-libcloud")
13609 (version "2.4.0")
13610 (source
13611 (origin
13612 (method url-fetch)
13613 (uri (pypi-uri "apache-libcloud" version))
13614 (sha256
13615 (base32
13616 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13617 (build-system python-build-system)
13618 (arguments
13619 `(#:phases
13620 (modify-phases %standard-phases
13621 (add-after 'unpack 'patch-ssh
13622 (lambda* (#:key inputs #:allow-other-keys)
13623 (substitute* "libcloud/compute/ssh.py"
13624 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13625 "/bin/ssh" "'")))
13626 #t))
13627 (add-after 'unpack 'patch-tests
13628 (lambda _
13629 (substitute* "./libcloud/test/test_file_fixtures.py"
13630 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13631 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13632 return (httplib.OK,
13633 \"1234abcd\",
13634 {\"test\": \"value\"},
13635 httplib.responses[httplib.OK])
13636 def _ascii"))
13637 (substitute* "libcloud/test/compute/test_ssh_client.py"
13638 (("class ShellOutSSHClientTests")
13639 "@unittest.skip(\"Guix container doesn't have ssh service\")
13640 class ShellOutSSHClientTests")
13641 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13642 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13643 (("'.xF0', '.x90', '.x8D', '.x88'")
13644 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13645 #t))
13646 (add-before 'check 'copy-secret
13647 (lambda _
13648 (copy-file "libcloud/test/secrets.py-dist"
13649 "libcloud/test/secrets.py")
13650 #t)))))
13651 (inputs
13652 `(("openssh" ,openssh)))
13653 (propagated-inputs
13654 `(("python-paramiko" ,python-paramiko)
13655 ("python-requests" ,python-requests)))
13656 (native-inputs
13657 `(("python-lockfile" ,python-lockfile)
13658 ("python-mock" ,python-mock)
13659 ("python-pytest" ,python-pytest)
13660 ("python-pytest-runner" ,python-pytest-runner)
13661 ("python-requests-mock" ,python-requests-mock)))
13662 (home-page "https://libcloud.apache.org/")
13663 (synopsis "Unified Cloud API")
13664 (description "@code{libcloud} is a Python library for interacting with
13665 many of the popular cloud service providers using a unified API.")
13666 (license license:asl2.0)))
13667
13668 (define-public python2-apache-libcloud
13669 (package-with-python2 python-apache-libcloud))
13670
13671 (define-public python-smmap2
13672 (package
13673 (name "python-smmap2")
13674 (version "2.0.3")
13675 (source
13676 (origin
13677 (method url-fetch)
13678 (uri (pypi-uri "smmap2" version))
13679 (sha256
13680 (base32
13681 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
13682 (build-system python-build-system)
13683 (native-inputs
13684 `(("python-nosexcover" ,python-nosexcover)))
13685 (home-page "https://github.com/Byron/smmap")
13686 (synopsis "Python sliding window memory map manager")
13687 (description "@code{smmap2} is a pure Python implementation of a sliding
13688 window memory map manager.")
13689 (license license:bsd-3)))
13690
13691 (define-public python2-smmap2
13692 (package-with-python2 python-smmap2))
13693
13694 (define-public python-regex
13695 (package
13696 (name "python-regex")
13697 (version "2019.04.14")
13698 (source (origin
13699 (method url-fetch)
13700 (uri (pypi-uri "regex" version))
13701 (sha256
13702 (base32
13703 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
13704 ;; TODO: Fix and enable regex_test.py tests that complain about the
13705 ;; test.support module not existing.
13706 (build-system python-build-system)
13707 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13708 (synopsis "Alternative regular expression module")
13709 (description "This regular expression implementation is backwards-
13710 compatible with the standard @code{re} module, but offers additional
13711 functionality like full case-folding for case-insensitive matches in Unicode.")
13712 (license license:psfl)))
13713
13714 (define-public python2-regex
13715 (package-with-python2 python-regex))
13716
13717 (define-public python2-pyopengl
13718 (package
13719 (name "python2-pyopengl")
13720 (version "3.1.0")
13721 (source
13722 (origin
13723 (method url-fetch)
13724 (uri (pypi-uri "PyOpenGL" version))
13725 (sha256
13726 (base32
13727 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13728 (arguments
13729 `(#:python ,python-2))
13730 (build-system python-build-system)
13731 (home-page "http://pyopengl.sourceforge.net")
13732 (synopsis "Standard OpenGL bindings for Python")
13733 (description
13734 "PyOpenGL is the most common cross platform Python binding to OpenGL and
13735 related APIs. The binding is created using the standard @code{ctypes}
13736 library.")
13737 (license license:bsd-3)))
13738
13739 (define-public python2-pyopengl-accelerate
13740 (package
13741 (inherit python2-pyopengl)
13742 (name "python2-pyopengl-accelerate")
13743 (version "3.1.0")
13744 (source
13745 (origin
13746 (method url-fetch)
13747 (uri (pypi-uri "PyOpenGL-accelerate" version))
13748 (sha256
13749 (base32
13750 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
13751 (synopsis "Acceleration code for PyOpenGL")
13752 (description
13753 "This is the Cython-coded accelerator module for PyOpenGL.")))
13754
13755 (define-public python-rencode
13756 (package
13757 (name "python-rencode")
13758 (version "1.0.5")
13759 (source
13760 (origin
13761 (method url-fetch)
13762 (uri (pypi-uri "rencode" version))
13763 (sha256
13764 (base32
13765 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
13766 (build-system python-build-system)
13767 (arguments
13768 `(#:phases
13769 (modify-phases %standard-phases
13770 (add-before 'check 'delete-bogus-test
13771 ;; This test requires /home/aresch/Downloads, which is not provided by
13772 ;; the build environment.
13773 (lambda _
13774 (delete-file "rencode/t.py")
13775 #t)))))
13776 (native-inputs `(("pkg-config" ,pkg-config)
13777 ("python-cython" ,python-cython)))
13778 (home-page "https://github.com/aresch/rencode")
13779 (synopsis "Serialization of heterogeneous data structures")
13780 (description
13781 "The @code{rencode} module is a data structure serialization library,
13782 similar to @code{bencode} from the BitTorrent project. For complex,
13783 heterogeneous data structures with many small elements, r-encoding stake up
13784 significantly less space than b-encodings. This version of rencode is a
13785 complete rewrite in Cython to attempt to increase the performance over the
13786 pure Python module.")
13787 (license license:bsd-3)))
13788
13789 (define-public python2-rencode
13790 (package-with-python2 python-rencode))
13791
13792 (define-public python-xenon
13793 (package
13794 (name "python-xenon")
13795 (version "0.5.4")
13796 (source
13797 (origin
13798 (method url-fetch)
13799 (uri (pypi-uri "xenon" version))
13800 (sha256
13801 (base32
13802 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
13803 (build-system python-build-system)
13804 (native-inputs
13805 `(("python-pyyaml" ,python-pyyaml)
13806 ("python-radon" ,python-radon)
13807 ("python-requests" ,python-requests)
13808 ("python-flake8" ,python-flake8)
13809 ("python-tox" ,python-tox)))
13810 (arguments
13811 `(#:phases
13812 (modify-phases %standard-phases
13813 (add-before 'build 'patch-test-requirements
13814 (lambda _
13815 ;; Remove httpretty dependency for tests.
13816 (substitute* "setup.py"
13817 (("httpretty") ""))
13818 #t)))))
13819 (home-page "https://xenon.readthedocs.org/")
13820 (synopsis "Monitor code metrics for Python on your CI server")
13821 (description
13822 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
13823 Ideally, @code{xenon} is run every time code is committed. Through command
13824 line options, various thresholds can be set for the complexity of code. It
13825 will fail (i.e. it will exit with a non-zero exit code) when any of these
13826 requirements is not met.")
13827 (license license:expat)))
13828
13829 (define-public python2-xenon
13830 (package-with-python2 python-xenon))
13831
13832 (define-public python-pysocks
13833 (package
13834 (name "python-pysocks")
13835 (version "1.7.0")
13836 (source
13837 (origin
13838 (method url-fetch)
13839 (uri (pypi-uri "PySocks" version))
13840 (sha256
13841 (base32
13842 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
13843 (build-system python-build-system)
13844 (arguments `(#:tests? #f))
13845 (home-page "https://github.com/Anorov/PySocks")
13846 (synopsis "SOCKS client module")
13847 (description "@code{pysocks} is an updated and semi-actively maintained
13848 version of @code{SocksiPy} with bug fixes and extra features.")
13849 (license license:bsd-3)))
13850
13851 (define-public python2-pysocks
13852 (package-with-python2 python-pysocks))
13853
13854 (define-public python-pydiff
13855 (package
13856 (name "python-pydiff")
13857 (version "0.2")
13858 (source
13859 (origin
13860 (method url-fetch)
13861 (uri (pypi-uri "pydiff" version))
13862 (sha256
13863 (base32
13864 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
13865 (build-system python-build-system)
13866 (home-page "https://github.com/myint/pydiff")
13867 (synopsis "Library to diff two Python files at the bytecode level")
13868 (description
13869 "@code{pydiff} makes it easy to look for actual code changes while
13870 ignoring formatting changes.")
13871 (license license:expat)))
13872
13873 (define-public python2-pydiff
13874 (package-with-python2 python-pydiff))
13875
13876 (define-public python-tqdm
13877 (package
13878 (name "python-tqdm")
13879 (version "4.19.6")
13880 (source
13881 (origin
13882 (method url-fetch)
13883 (uri (pypi-uri "tqdm" version))
13884 (sha256
13885 (base32
13886 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
13887 (build-system python-build-system)
13888 (native-inputs
13889 `(("python-flake8" ,python-flake8)
13890 ("python-nose" ,python-nose)
13891 ("python-coverage" ,python-coverage)))
13892 (home-page "https://github.com/tqdm/tqdm")
13893 (synopsis "Fast, extensible progress meter")
13894 (description
13895 "Make loops show a progress bar on the console by just wrapping any
13896 iterable with @code{|tqdm(iterable)|}. Offers many options to define
13897 design and layout.")
13898 (license (list license:mpl2.0 license:expat))
13899 (properties `((python2-variant . ,(delay python2-tqdm))))))
13900
13901 (define-public python2-tqdm
13902 (let ((tqdm (package-with-python2
13903 (strip-python2-variant python-tqdm))))
13904 (package (inherit tqdm)
13905 (native-inputs `(("python2-functools32" ,python2-functools32)
13906 ,@(package-native-inputs tqdm))))))
13907
13908 (define-public python-pkginfo
13909 (package
13910 (name "python-pkginfo")
13911 (version "1.4.2")
13912 (source
13913 (origin
13914 (method url-fetch)
13915 (uri (pypi-uri "pkginfo" version))
13916 (sha256
13917 (base32
13918 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
13919 (build-system python-build-system)
13920 (arguments
13921 ;; The tests are broken upstream.
13922 '(#:tests? #f))
13923 (home-page
13924 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
13925 (synopsis
13926 "Query metadatdata from sdists, bdists, and installed packages")
13927 (description
13928 "API to query the distutils metadata written in @file{PKG-INFO} inside a
13929 source distriubtion (an sdist) or a binary distribution (e.g., created by
13930 running bdist_egg). It can also query the EGG-INFO directory of an installed
13931 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
13932 created by running @code{python setup.py develop}).")
13933 (license license:expat)))
13934
13935 (define-public python2-pkginfo
13936 (package-with-python2 python-pkginfo))
13937
13938 (define-public python-twine
13939 (package
13940 (name "python-twine")
13941 (version "1.9.1")
13942 (source
13943 (origin
13944 (method url-fetch)
13945 (uri (pypi-uri "twine" version))
13946 (sha256
13947 (base32
13948 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
13949 (build-system python-build-system)
13950 (propagated-inputs
13951 `(("python-tqdm" ,python-tqdm)
13952 ("python-pkginfo" ,python-pkginfo)
13953 ("python-requests" ,python-requests)
13954 ("python-requests-toolbelt" ,python-requests-toolbelt)))
13955 (home-page "https://github.com/pypa/twine")
13956 (synopsis "Collection of utilities for interacting with PyPI")
13957 (description
13958 "@code{twine} currently supports registering projects and uploading
13959 distributions. It authenticates the user over HTTPS, allows them to pre-sign
13960 their files and supports any packaging format (including wheels).")
13961 (license license:asl2.0)))
13962
13963 (define-public python2-twine
13964 (package-with-python2 python-twine))
13965
13966 (define-public python-linecache2
13967 (package
13968 (name "python-linecache2")
13969 (version "1.0.0")
13970 (source
13971 (origin
13972 (method url-fetch)
13973 (uri (pypi-uri "linecache2" version))
13974 (sha256
13975 (base32
13976 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
13977 (build-system python-build-system)
13978 (arguments
13979 `(;; The tests depend on unittest2, and our version is a bit too old.
13980 #:tests? #f))
13981 (native-inputs
13982 `(("python-pbr" ,python-pbr-minimal)))
13983 (home-page
13984 "https://github.com/testing-cabal/linecache2")
13985 (synopsis "Backports of the linecache module")
13986 (description
13987 "The linecache module allows one to get any line from any file, while
13988 attempting to optimize internally, using a cache, the common case where many
13989 lines are read from a single file.")
13990 (license license:psfl)))
13991
13992 (define-public python2-linecache2
13993 (package-with-python2 python-linecache2))
13994
13995 (define-public python-traceback2
13996 (package
13997 (name "python-traceback2")
13998 (version "1.4.0")
13999 (source
14000 (origin
14001 (method url-fetch)
14002 (uri (pypi-uri "traceback2" version))
14003 (sha256
14004 (base32
14005 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
14006 (build-system python-build-system)
14007 (arguments
14008 `(;; python-traceback2 and python-unittest2 depend on one another.
14009 #:tests? #f))
14010 (native-inputs
14011 `(("python-pbr" ,python-pbr-minimal)))
14012 (propagated-inputs
14013 `(("python-linecache2" ,python-linecache2)))
14014 (home-page
14015 "https://github.com/testing-cabal/traceback2")
14016 (synopsis "Backports of the traceback module")
14017 (description
14018 "This module provides a standard interface to extract, format and print
14019 stack traces of Python programs. It exactly mimics the behavior of the Python
14020 interpreter when it prints a stack trace.")
14021 (license license:psfl)))
14022
14023 (define-public python2-traceback2
14024 (package-with-python2 python-traceback2))
14025
14026 (define-public python-ratelimiter
14027 (package
14028 (name "python-ratelimiter")
14029 (version "1.2.0")
14030 (source
14031 (origin
14032 (method url-fetch)
14033 (uri (pypi-uri "ratelimiter" version))
14034 (sha256
14035 (base32
14036 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
14037 (build-system python-build-system)
14038 (arguments
14039 '(#:tests? #f)) ; There are no tests in the pypi archive.
14040 (home-page "https://github.com/RazerM/ratelimiter")
14041 (synopsis "Simple rate limiting object")
14042 (description
14043 "The @code{ratelimiter} module ensures that an operation will not be
14044 executed more than a given number of times during a given period.")
14045 (license license:asl2.0)))
14046
14047 (define-public python2-ratelimiter
14048 (package-with-python2 python-ratelimiter))
14049
14050 (define-public python-dukpy
14051 (package
14052 (name "python-dukpy")
14053 (version "0.3")
14054 (source
14055 (origin
14056 (method git-fetch)
14057 (uri (git-reference
14058 (url "https://github.com/kovidgoyal/dukpy.git")
14059 (commit (string-append "v" version))))
14060 (file-name (git-file-name name version))
14061 (sha256
14062 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
14063 (build-system python-build-system)
14064 (home-page "https://github.com/kovidgoyal/dukpy")
14065 (synopsis "Run JavaScript in python")
14066 (description
14067 "dukpy is a JavaScript runtime environment for Python using the duktape
14068 embeddable JavaScript engine.")
14069 ;; Dukpy is licensed under MIT like the embedded duktape library,
14070 ;; with 'errors.c' as GPL3.
14071 (license (list license:expat license:gpl3))))
14072
14073 (define-public python2-dukpy
14074 (package-with-python2 python-dukpy))
14075
14076 (define-public python-jsonrpclib-pelix
14077 (package
14078 (name "python-jsonrpclib-pelix")
14079 (version "0.3.2")
14080 (source
14081 (origin
14082 (method url-fetch)
14083 (uri (pypi-uri "jsonrpclib-pelix" version))
14084 (sha256
14085 (base32
14086 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
14087 (build-system python-build-system)
14088 (arguments
14089 `(#:tests? #f)) ; no tests in PyPI tarball
14090 (home-page "https://github.com/tcalmant/jsonrpclib/")
14091 (synopsis "JSON-RPC 2.0 client library for Python")
14092 (description
14093 "This library implements the JSON-RPC v2.0
14094 specification (backwards-compatible) as a client library for Python. This
14095 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
14096 services.")
14097 (license license:asl2.0)))
14098
14099 (define-public python2-jsonrpclib-pelix
14100 (package-with-python2 python-jsonrpclib-pelix))
14101
14102 (define-public python-setuptools-scm-git-archive
14103 (package
14104 (name "python-setuptools-scm-git-archive")
14105 (version "1.0")
14106 (source
14107 (origin
14108 (method url-fetch)
14109 (uri (pypi-uri "setuptools_scm_git_archive" version))
14110 (sha256
14111 (base32
14112 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
14113 (build-system python-build-system)
14114 (native-inputs
14115 `(("python-pytest" ,python-pytest)))
14116 (propagated-inputs
14117 `(("python-setuptools-scm" ,python-setuptools-scm)))
14118 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
14119 (synopsis "Setuptools_scm plugin for git archives")
14120 (description
14121 "The setuptools_scm_git_archive package is a plugin to
14122 setuptools_scm, which supports obtaining versions from git archives that
14123 belong to tagged versions.")
14124 (license license:expat)))
14125
14126 (define-public python2-setuptools-scm-git-archive
14127 (package-with-python2 python-setuptools-scm-git-archive))
14128
14129 (define-public python-setuptools-git
14130 (package
14131 (name "python-setuptools-git")
14132 (version "1.2")
14133 (source
14134 (origin
14135 (method url-fetch)
14136 (uri (pypi-uri "setuptools-git" version))
14137 (sha256
14138 (base32
14139 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
14140 (build-system python-build-system)
14141 (arguments
14142 `(#:phases
14143 (modify-phases %standard-phases
14144 ;; This is needed for tests.
14145 (add-after 'unpack 'configure-git
14146 (lambda _
14147 (setenv "HOME" "/tmp")
14148 (invoke "git" "config" "--global" "user.email" "guix")
14149 (invoke "git" "config" "--global" "user.name" "guix")
14150 #t)))))
14151 (native-inputs
14152 `(("git" ,git-minimal)))
14153 (home-page "https://github.com/msabramo/setuptools-git")
14154 (synopsis "Setuptools revision control system plugin for Git")
14155 (description
14156 "This package provides a plugin for Setuptools for revision control with
14157 Git.")
14158 (license license:bsd-3)))
14159
14160 (define-public python-pyclipper
14161 (package
14162 (name "python-pyclipper")
14163 (version "1.1.0.post3")
14164 (source
14165 (origin
14166 (method url-fetch)
14167 (uri (pypi-uri "pyclipper" version ".zip"))
14168 (sha256
14169 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
14170 (modules '((guix build utils)))
14171 (snippet
14172 '(begin
14173 ;; This file is generated by Cython.
14174 (delete-file "pyclipper/pyclipper.cpp") #t))))
14175 (build-system python-build-system)
14176 (arguments
14177 `(#:phases
14178 (modify-phases %standard-phases
14179 (add-before 'build 'cythonize-sources
14180 (lambda _
14181 (with-directory-excursion "pyclipper"
14182 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
14183 (propagated-inputs
14184 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
14185 (native-inputs
14186 `(("python-cython" ,python-cython)
14187 ("python-pytest" ,python-pytest)
14188 ("python-pytest-runner" ,python-pytest-runner)
14189 ("python-unittest2" ,python-unittest2)
14190 ("unzip" ,unzip)))
14191 (home-page "https://github.com/greginvm/pyclipper")
14192 (synopsis "Wrapper for Angus Johnson's Clipper library")
14193 (description
14194 "Pyclipper is a Cython wrapper for the C++ translation of the
14195 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
14196 (license license:expat)))
14197
14198 (define-public python2-pyclipper
14199 (package-with-python2 python-pyclipper))
14200
14201 (define-public python2-booleanoperations
14202 (package
14203 (name "python2-booleanoperations")
14204 (version "0.7.1")
14205 (source
14206 (origin
14207 (method url-fetch)
14208 (uri (pypi-uri "booleanOperations" version ".zip"))
14209 (sha256
14210 (base32
14211 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
14212 (build-system python-build-system)
14213 (arguments
14214 `(#:python ,python-2))
14215 (native-inputs
14216 `(("unzip" ,unzip)
14217 ("python2-pytest" ,python2-pytest)
14218 ("python2-pytest-runner" ,python2-pytest-runner)))
14219 (propagated-inputs
14220 `(("python-fonttools" ,python2-fonttools)
14221 ("python-pyclipper" ,python2-pyclipper)
14222 ("python-ufolib" ,python2-ufolib)))
14223 (home-page "https://github.com/typemytype/booleanOperations")
14224 (synopsis "Boolean operations on paths")
14225 (description
14226 "BooleanOperations provides a Python library that enables
14227 boolean operations on paths.")
14228 (license license:expat)))
14229
14230 (define-public python-tempdir
14231 (package
14232 (name "python-tempdir")
14233 (version "0.7.1")
14234 (source
14235 (origin
14236 (method url-fetch)
14237 (uri (pypi-uri "tempdir" version))
14238 (sha256
14239 (base32
14240 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
14241 (build-system python-build-system)
14242 (home-page "https://pypi.org/project/tempdir/")
14243 (arguments
14244 ;; the package has no tests
14245 '(#:tests? #f))
14246 (synopsis "Python library for managing temporary directories")
14247 (description
14248 "This library manages temporary directories that are automatically
14249 deleted with all their contents when they are no longer needed. It is
14250 particularly convenient for use in tests.")
14251 (license license:expat)))
14252
14253 (define-public python2-tempdir
14254 (package-with-python2 python-tempdir))
14255
14256 (define-public python-activepapers
14257 (package
14258 (name "python-activepapers")
14259 (version "0.2.2")
14260 (source
14261 (origin
14262 (method url-fetch)
14263 (uri (pypi-uri "ActivePapers.Py" version))
14264 (sha256
14265 (base32
14266 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
14267 (build-system python-build-system)
14268 (arguments
14269 `(#:modules ((ice-9 ftw)
14270 (srfi srfi-1)
14271 (guix build utils)
14272 (guix build python-build-system))
14273
14274 #:phases
14275 (modify-phases %standard-phases
14276 (add-after 'unpack 'delete-python2-code
14277 (lambda _
14278 (for-each delete-file
14279 '("lib/activepapers/builtins2.py"
14280 "lib/activepapers/standardlib2.py"
14281 "lib/activepapers/utility2.py"))))
14282 (replace 'check
14283 (lambda _
14284 ;; Deactivate the test cases that download files
14285 (setenv "NO_NETWORK_ACCESS" "1")
14286 ;; For some strange reason, some tests fail if nosetests runs all
14287 ;; test modules in a single execution. They pass if each test
14288 ;; module is run individually.
14289 (for-each (lambda (filename)
14290 (invoke "nosetests"
14291 (string-append "tests/" filename)))
14292 (scandir "tests"
14293 (lambda (filename)
14294 (string-suffix? ".py" filename)))))))))
14295 (native-inputs
14296 `(("python-tempdir" ,python-tempdir)
14297 ("python-nose" ,python-nose)))
14298 (propagated-inputs
14299 `(("python-h5py" ,python-h5py)))
14300 (home-page "http://www.activepapers.org/")
14301 (synopsis "Executable papers for scientific computing")
14302 (description
14303 "ActivePapers is a tool for working with executable papers, which
14304 combine data, code, and documentation in single-file packages,
14305 suitable for publication as supplementary material or on repositories
14306 such as figshare or Zenodo.")
14307 (properties `((python2-variant . ,(delay python2-activepapers))))
14308 (license license:bsd-3)))
14309
14310 (define-public python2-activepapers
14311 (let ((base (package-with-python2
14312 (strip-python2-variant python-activepapers))))
14313 (package
14314 (inherit base)
14315 (arguments
14316 (substitute-keyword-arguments (package-arguments base)
14317 ((#:phases phases)
14318 `(modify-phases ,phases
14319 (delete 'delete-python2-code)
14320 (add-after 'unpack 'delete-python3-code
14321 (lambda _
14322 (for-each delete-file
14323 '("lib/activepapers/builtins3.py"
14324 "lib/activepapers/standardlib3.py"
14325 "lib/activepapers/utility3.py")))))))))))
14326
14327 (define-public python-semver
14328 (package
14329 (name "python-semver")
14330 (version "2.9.0")
14331 (source
14332 (origin
14333 (method url-fetch)
14334 (uri (pypi-uri "semver" version))
14335 (sha256
14336 (base32
14337 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
14338 (build-system python-build-system)
14339 (native-inputs
14340 `(("python-tox" ,python-tox)
14341 ("python-virtualenv" ,python-virtualenv)))
14342 (home-page "https://github.com/k-bx/python-semver")
14343 (synopsis "Python helper for Semantic Versioning")
14344 (description "This package provides a Python library for
14345 @url{Semantic Versioning, http://semver.org/}.")
14346 (license license:bsd-3)))
14347
14348 (define-public python2-semver
14349 (package-with-python2 python-semver))
14350
14351 (define-public python-pyro4
14352 (package
14353 (name "python-pyro4")
14354 (version "4.77")
14355 (source
14356 (origin
14357 (method url-fetch)
14358 (uri (pypi-uri "Pyro4" version))
14359 (sha256
14360 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
14361 (build-system python-build-system)
14362 (arguments
14363 '(#:tests? #f)) ;FIXME: Some tests require network access.
14364 (native-inputs
14365 `(("python-cloudpickle" ,python-cloudpickle)
14366 ("python-dill" ,python-dill)
14367 ("python-msgpack" ,python-msgpack)))
14368 (propagated-inputs
14369 `(("python-serpent" ,python-serpent)))
14370 (home-page "https://pyro4.readthedocs.io")
14371 (synopsis "Distributed object middleware for Python")
14372 (description
14373 "Pyro enables you to build applications in which objects can talk to each
14374 other over the network. You can just use normal Python method calls to call
14375 objects on other machines, also known as remote procedure calls (RPC).")
14376 (license license:expat)))
14377
14378 (define-public python2-pyro
14379 (package
14380 (name "python2-pyro")
14381 (version "3.16")
14382 (source
14383 (origin
14384 (method url-fetch)
14385 (uri (pypi-uri "Pyro" version))
14386 (file-name (string-append "Pyro-" version ".tar.gz"))
14387 (sha256
14388 (base32
14389 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
14390 (build-system python-build-system)
14391 (arguments
14392 ;; Pyro is not compatible with Python 3
14393 `(#:python ,python-2
14394 ;; Pyro has no test cases for automatic execution
14395 #:tests? #f))
14396 (home-page "http://pythonhosted.org/Pyro/")
14397 (synopsis "Distributed object manager for Python")
14398 (description "Pyro is a Distributed Object Technology system
14399 written in Python that is designed to be easy to use. It resembles
14400 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
14401 which is a system and language independent Distributed Object Technology
14402 and has much more to offer than Pyro or RMI. Pyro 3.x is no
14403 longer maintained. New projects should use Pyro4 instead, which
14404 is the new Pyro version that is actively developed.")
14405 (license license:expat)))
14406
14407 (define-public python2-scientific
14408 (package
14409 (name "python2-scientific")
14410 (version "2.9.4")
14411 (source
14412 (origin
14413 (method git-fetch)
14414 (uri (git-reference
14415 (url "https://github.com/khinsen/ScientificPython")
14416 (commit (string-append "rel" version))))
14417 (file-name (git-file-name name version))
14418 (sha256
14419 (base32
14420 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
14421 (build-system python-build-system)
14422 (inputs
14423 `(("netcdf" ,netcdf)))
14424 (propagated-inputs
14425 `(("python-numpy" ,python2-numpy-1.8)
14426 ("python-pyro" ,python2-pyro)))
14427 (arguments
14428 ;; ScientificPython is not compatible with Python 3
14429 `(#:python ,python-2
14430 #:tests? #f ; No test suite
14431 #:phases
14432 (modify-phases %standard-phases
14433 (replace 'build
14434 (lambda* (#:key inputs #:allow-other-keys)
14435 (invoke "python" "setup.py" "build"
14436 (string-append "--netcdf_prefix="
14437 (assoc-ref inputs "netcdf"))))))))
14438 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
14439 (synopsis "Python modules for scientific computing")
14440 (description "ScientificPython is a collection of Python modules that are
14441 useful for scientific computing. Most modules are rather general (Geometry,
14442 physical units, automatic derivatives, ...) whereas others are more
14443 domain-specific (e.g. netCDF and PDB support). The library is currently
14444 not actively maintained and works only with Python 2 and NumPy < 1.9.")
14445 (license license:cecill-c)))
14446
14447 (define-public python2-mmtk
14448 (package
14449 (name "python2-mmtk")
14450 (version "2.7.12")
14451 (source
14452 (origin
14453 (method git-fetch)
14454 (uri (git-reference
14455 (url "https://github.com/khinsen/MMTK")
14456 (commit (string-append "rel" version))))
14457 (file-name (git-file-name name version))
14458 (sha256
14459 (base32
14460 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
14461 (build-system python-build-system)
14462 (native-inputs
14463 `(("netcdf" ,netcdf)))
14464 (propagated-inputs
14465 `(("python-scientific" ,python2-scientific)
14466 ("python-tkinter" ,python-2 "tk")))
14467 (arguments
14468 `(#:python ,python-2
14469 #:tests? #f
14470 #:phases
14471 (modify-phases %standard-phases
14472 (add-before 'build 'includes-from-scientific
14473 (lambda* (#:key inputs #:allow-other-keys)
14474 (mkdir-p "Include/Scientific")
14475 (copy-recursively
14476 (string-append
14477 (assoc-ref inputs "python-scientific")
14478 "/include/python2.7/Scientific")
14479 "Include/Scientific"))))))
14480 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
14481 (synopsis "Python library for molecular simulation")
14482 (description "MMTK is a library for molecular simulations with an emphasis
14483 on biomolecules. It provides widely used methods such as Molecular Dynamics
14484 and normal mode analysis, but also basic routines for implementing new methods
14485 for simulation and analysis. The library is currently not actively maintained
14486 and works only with Python 2 and NumPy < 1.9.")
14487 (license license:cecill-c)))
14488
14489 (define-public python-phonenumbers
14490 (package
14491 (name "python-phonenumbers")
14492 (version "8.9.1")
14493 (source
14494 (origin
14495 (method url-fetch)
14496 (uri (pypi-uri "phonenumbers" version))
14497 (sha256
14498 (base32
14499 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
14500 (build-system python-build-system)
14501 (home-page
14502 "https://github.com/daviddrysdale/python-phonenumbers")
14503 (synopsis
14504 "Python library for dealing with international phone numbers")
14505 (description
14506 "This package provides a Python port of Google's libphonenumber library.")
14507 (license license:asl2.0)))
14508
14509 (define-public python2-phonenumbers
14510 (package-with-python2 python-phonenumbers))
14511
14512 (define-public python-send2trash
14513 (package
14514 (name "python-send2trash")
14515 (version "1.5.0")
14516 (source
14517 (origin (method git-fetch)
14518 ;; Source tarball on PyPI doesn't include tests.
14519 (uri (git-reference
14520 (url "https://github.com/hsoft/send2trash.git")
14521 (commit version)))
14522 (file-name (git-file-name name version))
14523 (sha256
14524 (base32
14525 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
14526 (build-system python-build-system)
14527 (arguments
14528 '(#:phases
14529 (modify-phases %standard-phases
14530 (add-before 'check 'pre-check
14531 (lambda _
14532 (mkdir-p "/tmp/foo")
14533 (setenv "HOME" "/tmp/foo")
14534 #t)))))
14535 (home-page "https://github.com/hsoft/send2trash")
14536 (synopsis "Send files to the user's @file{~/Trash} directory")
14537 (description "This package provides a Python library to send files to the
14538 user's @file{~/Trash} directory.")
14539 (properties `((python2-variant . ,(delay python2-send2trash))))
14540 (license license:bsd-3)))
14541
14542 (define-public python2-send2trash
14543 (package
14544 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
14545 (arguments
14546 (substitute-keyword-arguments (package-arguments python-send2trash)
14547 ((#:phases phases)
14548 `(modify-phases ,phases
14549 (add-before 'check 'setenv
14550 (lambda _
14551 (setenv "PYTHONPATH"
14552 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
14553 #t))))))))
14554
14555 (define-public python-yapf
14556 (package
14557 (name "python-yapf")
14558 (version "0.24.0")
14559 (source
14560 (origin
14561 (method url-fetch)
14562 (uri (pypi-uri "yapf" version))
14563 (sha256
14564 (base32
14565 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
14566 (build-system python-build-system)
14567 (home-page "https://github.com/google/yapf")
14568 (synopsis "Formatter for Python code")
14569 (description "YAPF is a formatter for Python code. It's based off of
14570 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
14571 takes the code and reformats it to the best formatting that conforms to the
14572 style guide, even if the original code didn't violate the style guide.")
14573 (license license:asl2.0)))
14574
14575 (define-public python2-yapf
14576 (package-with-python2 python-yapf))
14577
14578 (define-public python-gyp
14579 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
14580 (revision "0"))
14581 (package
14582 (name "python-gyp")
14583 ;; Google does not release versions,
14584 ;; based on second most recent commit date.
14585 (version (git-version "0.0.0" revision commit))
14586 (source
14587 (origin
14588 ;; Google does not release tarballs,
14589 ;; git checkout is needed.
14590 (method git-fetch)
14591 (uri (git-reference
14592 (url "https://chromium.googlesource.com/external/gyp")
14593 (commit commit)))
14594 (file-name (git-file-name name version))
14595 (sha256
14596 (base32
14597 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14598 (build-system python-build-system)
14599 (home-page "https://gyp.gsrc.io/")
14600 (synopsis "GYP is a Meta-Build system")
14601 (description
14602 "GYP builds build systems for large, cross platform applications.
14603 It can be used to generate XCode projects, Visual Studio projects, Ninja build
14604 files, and Makefiles.")
14605 (license license:bsd-3))))
14606
14607 (define-public python2-gyp
14608 (package-with-python2 python-gyp))
14609
14610 (define-public python-whatever
14611 (package
14612 (name "python-whatever")
14613 (version "0.6")
14614 (source
14615 (origin
14616 (method url-fetch)
14617 (uri (string-append "https://github.com/Suor/whatever/archive/" version
14618 ".tar.gz"))
14619 (sha256
14620 (base32 "1rchg9hrlvw4sn20lq1zspczr4x1pv57c02gv73igiqx1hqpy2nc"))
14621 (file-name (string-append name "-" version ".tar.gz"))))
14622 (build-system python-build-system)
14623 (arguments
14624 `(#:phases
14625 (modify-phases %standard-phases
14626 (replace 'check
14627 (lambda _
14628 (invoke "py.test"))))))
14629 (native-inputs
14630 `(("python-pytest" ,python-pytest)))
14631 (home-page "http://github.com/Suor/whatever")
14632 (synopsis "Make anonymous functions by partial application of operators")
14633 (description "@code{whatever} provides an easy way to make anonymous
14634 functions by partial application of operators.")
14635 (license license:bsd-3)))
14636
14637 (define-public python2-whatever
14638 (package-with-python2 python-whatever))
14639
14640 (define-public python-funcy
14641 (package
14642 (name "python-funcy")
14643 (version "1.11")
14644 (source
14645 (origin
14646 (method git-fetch)
14647 (uri (git-reference
14648 (url "https://github.com/Suor/funcy.git")
14649 (commit version)))
14650 (sha256
14651 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14652 (file-name (git-file-name name version))))
14653 (build-system python-build-system)
14654 (arguments
14655 `(#:phases
14656 (modify-phases %standard-phases
14657 (replace 'check
14658 (lambda _
14659 (invoke "py.test"))))))
14660 (native-inputs
14661 `(("python-pytest" ,python-pytest)
14662 ("python-whatever" ,python-whatever)))
14663 (home-page "http://github.com/Suor/funcy")
14664 (synopsis "Functional tools")
14665 (description "@code{funcy} is a library that provides functional tools.
14666 Examples are:
14667 @enumerate
14668 @item merge - Merges collections of the same type
14669 @item walk - Type-preserving map
14670 @item select - Selects a part of a collection
14671 @item take - Takes the first n items of a collection
14672 @item first - Takes the first item of a collection
14673 @item remove - Predicated-removes items of a collection
14674 @item concat - Concatenates two collections
14675 @item flatten - Flattens a collection with subcollections
14676 @item distinct - Returns only distinct items
14677 @item split - Predicated-splits a collection
14678 @item split_at - Splits a collection at a given item
14679 @item group_by - Groups items by group
14680 @item pairwise - Pairs off adjacent items
14681 @item partial - Partially-applies a function
14682 @item curry - Curries a function
14683 @item compose - Composes functions
14684 @item complement - Complements a predicate
14685 @item all_fn - \"all\" with predicate
14686 @end enumerate")
14687 (license license:bsd-3)))
14688
14689 (define-public python2-funcy
14690 (package-with-python2 python-funcy))
14691
14692 (define-public python-isoweek
14693 (package
14694 (name "python-isoweek")
14695 (version "1.3.3")
14696 (source
14697 (origin
14698 (method url-fetch)
14699 (uri (pypi-uri "isoweek" version))
14700 (sha256
14701 (base32
14702 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14703 (build-system python-build-system)
14704 (home-page "https://github.com/gisle/isoweek")
14705 (synopsis "Objects representing a week")
14706 (description "The @code{isoweek} module provide the class Week that
14707 implements the week definition of ISO 8601. This standard also defines
14708 a notation for identifying weeks; yyyyWww (where the W is a literal).
14709 Week instances stringify to this form.")
14710 (license license:bsd-3)))
14711
14712 (define-public python2-isoweek
14713 (package-with-python2 python-isoweek))
14714
14715 (define-public python-tokenize-rt
14716 (package
14717 (name "python-tokenize-rt")
14718 (version "2.0.1")
14719 (source
14720 (origin
14721 (method url-fetch)
14722 (uri (pypi-uri "tokenize-rt" version))
14723 (sha256
14724 (base32
14725 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14726 (build-system python-build-system)
14727 (home-page "https://github.com/asottile/tokenize-rt")
14728 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14729 (description
14730 "This Python library is a wrapper around @code{tokenize} from the Python
14731 standard library. It provides two additional tokens @code{ESCAPED_NL} and
14732 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14733 and @code{tokens_to_src} to roundtrip.")
14734 (license license:expat)))
14735
14736 (define-public python-future-fstrings
14737 (package
14738 (name "python-future-fstrings")
14739 (version "0.4.1")
14740 (source
14741 (origin
14742 (method url-fetch)
14743 (uri (pypi-uri "future_fstrings" version))
14744 (sha256
14745 (base32
14746 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14747 (build-system python-build-system)
14748 (propagated-inputs
14749 `(("python-tokenize-rt" ,python-tokenize-rt)))
14750 (home-page "https://github.com/asottile/future-fstrings")
14751 (synopsis "Backport of fstrings to Python < 3.6")
14752 (description
14753 "This package provides a UTF-8 compatible encoding
14754 @code{future_fstrings}, which performs source manipulation. It decodes the
14755 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
14756 @code{f} strings.")
14757 (license license:expat)))
14758
14759 (define-public python-typed-ast
14760 (package
14761 (name "python-typed-ast")
14762 (version "1.4.0")
14763 (source
14764 (origin
14765 (method git-fetch)
14766 (uri (git-reference
14767 (url "https://github.com/python/typed_ast.git")
14768 (commit version)))
14769 (sha256
14770 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
14771 (file-name (git-file-name name version))))
14772 (build-system python-build-system)
14773 (arguments
14774 `(#:modules ((guix build utils)
14775 (guix build python-build-system)
14776 (ice-9 ftw)
14777 (srfi srfi-1)
14778 (srfi srfi-26))
14779 #:phases
14780 (modify-phases %standard-phases
14781 (replace 'check
14782 (lambda _
14783 (let ((cwd (getcwd)))
14784 (setenv "PYTHONPATH"
14785 (string-append cwd "/build/"
14786 (find (cut string-prefix? "lib" <>)
14787 (scandir (string-append cwd "/build")))
14788 ":"
14789 (getenv "PYTHONPATH"))))
14790 (invoke "pytest")
14791 #t)))))
14792 (native-inputs `(("python-pytest" ,python-pytest)))
14793 (home-page "https://github.com/python/typed_ast")
14794 (synopsis "Fork of Python @code{ast} modules with type comment support")
14795 (description "This package provides a parser similar to the standard
14796 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
14797 include PEP 484 type comments and are independent of the version of Python
14798 under which they are run. The @code{typed_ast} parsers produce the standard
14799 Python AST (plus type comments), and are both fast and correct, as they are
14800 based on the CPython 2.7 and 3.7 parsers.")
14801 ;; See the file "LICENSE" for the details.
14802 (license (list license:psfl
14803 license:asl2.0
14804 license:expat)))) ;ast27/Parser/spark.py
14805
14806 (define-public python-typing
14807 (package
14808 (name "python-typing")
14809 (version "3.6.6")
14810 (source
14811 (origin
14812 (method url-fetch)
14813 (uri (pypi-uri "typing" version))
14814 (sha256
14815 (base32
14816 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
14817 (build-system python-build-system)
14818 (home-page "https://docs.python.org/3/library/typing.html")
14819 (synopsis "Type hints for Python")
14820 (description "This is a backport of the standard library @code{typing}
14821 module to Python versions older than 3.5. Typing defines a standard notation
14822 for Python function and variable type annotations. The notation can be used
14823 for documenting code in a concise, standard format, and it has been designed
14824 to also be used by static and runtime type checkers, static analyzers, IDEs
14825 and other tools.")
14826 (license license:psfl)))
14827
14828 (define-public python2-typing
14829 (package-with-python2 python-typing))
14830
14831 (define-public python-typing-extensions
14832 (package
14833 (name "python-typing-extensions")
14834 (version "3.7.2")
14835 (source
14836 (origin
14837 (method url-fetch)
14838 (uri (pypi-uri "typing_extensions" version))
14839 (sha256
14840 (base32
14841 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
14842 (build-system python-build-system)
14843 (home-page
14844 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
14845 (synopsis "Experimental type hints for Python")
14846 (description
14847 "The typing_extensions module contains additional @code{typing} hints not
14848 yet present in the of the @code{typing} standard library.
14849 Included are implementations of:
14850 @enumerate
14851 @item ClassVar
14852 @item ContextManager
14853 @item Counter
14854 @item DefaultDict
14855 @item Deque
14856 @item NewType
14857 @item NoReturn
14858 @item overload
14859 @item Protocol
14860 @item runtime
14861 @item Text
14862 @item Type
14863 @item TYPE_CHECKING
14864 @item AsyncGenerator
14865 @end enumerate\n")
14866 (license license:psfl)))
14867
14868 (define-public bpython
14869 (package
14870 (name "bpython")
14871 (version "0.18")
14872 (source
14873 (origin
14874 (method url-fetch)
14875 (uri (pypi-uri "bpython" version))
14876 (sha256
14877 (base32 "1hl6frgvr2lqaxqczl8amg9xih32b3gzv429vs0qrjb8wpdj1k2n"))))
14878 (build-system python-build-system)
14879 (arguments
14880 `(#:phases
14881 (modify-phases %standard-phases
14882 (add-after 'unpack 'remove-failing-test
14883 (lambda _
14884 ;; Remove failing test. FIXME: make it pass
14885 (delete-file "bpython/test/test_args.py")
14886 #t))
14887 (add-after 'wrap 'add-aliases
14888 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
14889 (lambda* (#:key outputs #:allow-other-keys)
14890 (let ((out (assoc-ref outputs "out")))
14891 (for-each
14892 (lambda (old new)
14893 (symlink old (string-append out "/bin/" new)))
14894 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
14895 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
14896 #t)))))
14897 (propagated-inputs
14898 `(("python-pygments" ,python-pygments)
14899 ("python-requests" ,python-requests)
14900 ("python-babel" ,python-babel) ; optional, for internationalization
14901 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
14902 ("python-greenlet" ,python-greenlet)
14903 ("python-urwid" ,python-urwid) ; for bpython-urwid only
14904 ("python-six" ,python-six)))
14905 (native-inputs
14906 `(("python-sphinx" ,python-sphinx)
14907 ("python-mock" ,python-mock)))
14908 (home-page "https://bpython-interpreter.org/")
14909 (synopsis "Fancy interface to the Python interpreter")
14910 (description "Bpython is a fancy interface to the Python
14911 interpreter. bpython's main features are
14912
14913 @enumerate
14914 @item in-line syntax highlighting,
14915 @item readline-like autocomplete with suggestions displayed as you type,
14916 @item expected parameter list for any Python function,
14917 @item \"rewind\" function to pop the last line of code from memory and
14918 re-evaluate,
14919 @item send the code you've entered off to a pastebin,
14920 @item save the code you've entered to a file, and
14921 @item auto-indentation.
14922 @end enumerate")
14923 (license license:expat)))
14924
14925 (define-public bpython2
14926 (let ((base (package-with-python2
14927 (strip-python2-variant bpython))))
14928 (package (inherit base)
14929 (name "bpython2")
14930 (arguments
14931 `(#:python ,python-2
14932 #:phases
14933 (modify-phases %standard-phases
14934 (add-after 'unpack 'remove-failing-test
14935 (lambda _
14936 ;; Remove failing test. FIXME: make it pass
14937 (delete-file "bpython/test/test_args.py")
14938 ;; Disable failing test-cases (renaming inhibits they are
14939 ;; discovered)
14940 (substitute* "bpython/test/test_curtsies_repl.py"
14941 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
14942 (string-append a "xxx_off_" b))
14943 (("^(\\s*def )(test_complex\\W)" _ a b)
14944 (string-append a "xxx_off_" b)))
14945 #t))
14946 (add-before 'build 'rename-scripts
14947 ;; rename the scripts to bypthon2, bpdb2, etc.
14948 (lambda _
14949 (substitute* "setup.py"
14950 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
14951 (string-append name "2" rest "\n"))
14952 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
14953 (string-append name "2" (or sub "") rest "\n")))
14954 #t))))))))
14955
14956 (define-public python-pyinotify
14957 (package
14958 (name "python-pyinotify")
14959 (version "0.9.6")
14960 (source (origin
14961 (method url-fetch)
14962 (uri (pypi-uri "pyinotify" version))
14963 (sha256
14964 (base32
14965 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
14966 (build-system python-build-system)
14967 (arguments `(#:tests? #f)) ;no tests
14968 (home-page "https://github.com/seb-m/pyinotify")
14969 (synopsis "Python library for monitoring inotify events")
14970 (description
14971 "@code{pyinotify} provides a Python interface for monitoring
14972 file system events on Linux.")
14973 (license license:expat)))
14974
14975 (define-public python2-pyinotify
14976 (package-with-python2 python-pyinotify))
14977
14978 ;; Ada parser uses this version.
14979 (define-public python2-quex-0.67.3
14980 (package
14981 (name "python2-quex")
14982 (version "0.67.3")
14983 (source
14984 (origin
14985 (method url-fetch)
14986 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
14987 (version-major+minor version)
14988 "/quex-" version ".zip"))
14989 (sha256
14990 (base32
14991 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
14992 (build-system python-build-system)
14993 (native-inputs
14994 `(("unzip" ,unzip)))
14995 (arguments
14996 `(#:python ,python-2
14997 #:tests? #f
14998 #:phases
14999 (modify-phases %standard-phases
15000 (delete 'configure)
15001 (delete 'build)
15002 (replace 'install
15003 (lambda* (#:key outputs #:allow-other-keys)
15004 (let* ((out (assoc-ref outputs "out"))
15005 (share/quex (string-append out "/share/quex"))
15006 (bin (string-append out "/bin")))
15007 (copy-recursively "." share/quex)
15008 (mkdir-p bin)
15009 (symlink (string-append share/quex "/quex-exe.py")
15010 (string-append bin "/quex"))
15011 #t))))))
15012 (native-search-paths
15013 (list (search-path-specification
15014 (variable "QUEX_PATH")
15015 (files '("share/quex")))))
15016 (home-page "http://quex.sourceforge.net/")
15017 (synopsis "Lexical analyzer generator in Python")
15018 (description "@code{quex} is a lexical analyzer generator in Python.")
15019 (license license:lgpl2.1+))) ; Non-military
15020
15021 (define-public python2-quex
15022 (package (inherit python2-quex-0.67.3)
15023 (name "python2-quex")
15024 (version "0.68.1")
15025 (source
15026 (origin
15027 (method url-fetch)
15028 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
15029 (sha256
15030 (base32
15031 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
15032 (file-name (string-append name "-" version ".tar.gz"))))))
15033
15034 (define-public python-more-itertools
15035 (package
15036 (name "python-more-itertools")
15037 (version "7.1.0")
15038 (source
15039 (origin
15040 (method url-fetch)
15041 (uri (pypi-uri "more-itertools" version))
15042 (sha256
15043 (base32
15044 "16phg2f2dvm6ci5wr49ncha5lmc0m2in3bsl33c61vzca4gkvd4b"))))
15045 (build-system python-build-system)
15046 (home-page "https://github.com/erikrose/more-itertools")
15047 (synopsis "More routines for operating on iterables, beyond itertools")
15048 (description "Python's built-in @code{itertools} module implements a
15049 number of iterator building blocks inspired by constructs from APL, Haskell,
15050 and SML. @code{more-itertools} includes additional building blocks for
15051 working with iterables.")
15052 (properties `((python2-variant . ,(delay python2-more-itertools))))
15053 (license license:expat)))
15054
15055 ;; The 5.x series are the last versions supporting Python 2.7.
15056 (define-public python2-more-itertools
15057 (package
15058 (inherit python-more-itertools)
15059 (name "python2-more-itertools")
15060 (version "5.0.0")
15061 (source (origin
15062 (method url-fetch)
15063 (uri (pypi-uri "more-itertools" version))
15064 (sha256
15065 (base32
15066 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
15067 (arguments
15068 `(#:python ,python2-minimal))
15069 (propagated-inputs
15070 `(("python2-six" ,python2-six-bootstrap)))))
15071
15072 (define-public python-latexcodec
15073 (package
15074 (name "python-latexcodec")
15075 (version "1.0.7")
15076 (source
15077 (origin
15078 (method url-fetch)
15079 (uri (pypi-uri "latexcodec" version))
15080 (sha256
15081 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
15082 (build-system python-build-system)
15083 (inputs
15084 `(("python-six" ,python-six)))
15085 (home-page "https://readthedocs.org/projects/latexcodec/")
15086 (synopsis "Work with LaTeX code in Python")
15087 (description "Lexer and codec to work with LaTeX code in Python.")
15088 (license license:expat)))
15089
15090 (define-public python-pybtex
15091 (package
15092 (name "python-pybtex")
15093 (version "0.22.2")
15094 (source
15095 (origin
15096 (method url-fetch)
15097 (uri (pypi-uri "pybtex" version))
15098 (sha256
15099 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
15100 (build-system python-build-system)
15101 (native-inputs
15102 `(("python-nose" ,python-nose)))
15103 (inputs
15104 `(("python-latexcodec" ,python-latexcodec)
15105 ("python-pyyaml" ,python-pyyaml)
15106 ("python-six" ,python-six)))
15107 (arguments
15108 `(#:test-target "nosetests"))
15109 (home-page "https://pybtex.org/")
15110 (synopsis "BibTeX-compatible bibliography processor")
15111 (description "Pybtex is a BibTeX-compatible bibliography processor written
15112 in Python. You can simply type pybtex instead of bibtex.")
15113 (license license:expat)))
15114
15115 (define-public python-onetimepass
15116 (package
15117 (name "python-onetimepass")
15118 (version "1.0.1")
15119 (source
15120 (origin
15121 (method url-fetch)
15122 (uri (pypi-uri "onetimepass" version))
15123 (sha256
15124 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
15125 (build-system python-build-system)
15126 (propagated-inputs `(("python-six" ,python-six)))
15127 (home-page "https://github.com/tadeck/onetimepass/")
15128 (synopsis "One-time password library")
15129 (description "Python one-time password library for HMAC-based (HOTP) and
15130 time-based (TOTP) passwords.")
15131 (license license:expat)))
15132
15133 (define-public python-parso
15134 (package
15135 (name "python-parso")
15136 (version "0.5.1")
15137 (source
15138 (origin
15139 (method url-fetch)
15140 (uri (pypi-uri "parso" version))
15141 (sha256
15142 (base32
15143 "171a9ivhxwsd52h1cgsz40zgzpgzscn7yqb7sdjhy8m1lzj0wsv6"))))
15144 (native-inputs
15145 `(("python-pytest" ,python-pytest)))
15146 (build-system python-build-system)
15147 (arguments
15148 `(#:phases (modify-phases %standard-phases
15149 (replace 'check
15150 (lambda _ (invoke "pytest" "-vv"))))))
15151 (home-page "https://github.com/davidhalter/parso")
15152 (synopsis "Python Parser")
15153 (description "Parso is a Python parser that supports error recovery and
15154 round-trip parsing for different Python versions (in multiple Python versions).
15155 Parso is also able to list multiple syntax errors in your Python file.")
15156 (license license:expat)))
15157
15158 (define-public python2-parso
15159 (package-with-python2 python-parso))
15160
15161 (define-public python-async-generator
15162 (package
15163 (name "python-async-generator")
15164 (version "1.10")
15165 (source
15166 (origin
15167 (method url-fetch)
15168 (uri (pypi-uri "async_generator" version))
15169 (sha256
15170 (base32
15171 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
15172 (build-system python-build-system)
15173 (native-inputs
15174 `(("python-pytest" ,python-pytest)))
15175 (home-page "https://github.com/python-trio/async_generator")
15176 (synopsis "Async generators and context managers for Python 3.5+")
15177 (description "@code{async_generator} back-ports Python 3.6's native async
15178 generators and Python 3.7's context managers into Python 3.5.")
15179 ;; Dual licensed.
15180 (license (list license:expat license:asl2.0))))
15181
15182 (define-public python-async-timeout
15183 (package
15184 (name "python-async-timeout")
15185 (version "3.0.1")
15186 (source
15187 (origin
15188 (method url-fetch)
15189 (uri (pypi-uri "async-timeout" version))
15190 (sha256
15191 (base32
15192 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
15193 (build-system python-build-system)
15194 (home-page "https://github.com/aio-libs/async_timeout/")
15195 (synopsis "Timeout context manager for asyncio programs")
15196 (description "@code{async-timeout} provides a timeout timeout context
15197 manager compatible with @code{asyncio}.")
15198 (license license:asl2.0)))
15199
15200 (define-public python-glob2
15201 (package
15202 (name "python-glob2")
15203 (version "0.7")
15204 (source
15205 (origin
15206 (method git-fetch)
15207 (uri (git-reference
15208 (url "https://github.com/miracle2k/python-glob2.git")
15209 (commit (string-append "v" version))))
15210 (file-name (git-file-name name version))
15211 (sha256
15212 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
15213 (build-system python-build-system)
15214 (home-page "https://github.com/miracle2k/python-glob2/")
15215 (synopsis "Extended Version of the python buildin glob module")
15216 (description "This is an extended version of the Python
15217 @url{http://docs.python.org/library/glob.html, built-in glob module} which
15218 adds:
15219
15220 @itemize
15221 @item The ability to capture the text matched by glob patterns, and return
15222 those matches alongside the file names.
15223 @item A recursive @code{**} globbing syntax, akin for example to the
15224 @code{globstar} option of Bash.
15225 @item The ability to replace the file system functions used, in order to glob
15226 on virtual file systems.
15227 @item Compatible with Python 2 and Python 3 (tested with 3.3).
15228 @end itemize
15229
15230 Glob2 currently based on the glob code from Python 3.3.1.")
15231 (license license:bsd-2)))
15232
15233 (define-public python2-glob2
15234 (package-with-python2 python-glob2))
15235
15236 (define-public python-gipc
15237 (package
15238 (name "python-gipc")
15239 (version "0.6.0")
15240 (source
15241 (origin
15242 (method url-fetch)
15243 (uri (pypi-uri "gipc" version ".zip"))
15244 (sha256
15245 (base32
15246 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
15247 (build-system python-build-system)
15248 (native-inputs
15249 `(("unzip" ,unzip)))
15250 (propagated-inputs
15251 `(("python-gevent" ,python-gevent)))
15252 (home-page "http://gehrcke.de/gipc")
15253 (synopsis "Child process management in the context of gevent")
15254 (description "Usage of Python's multiprocessing package in a
15255 gevent-powered application may raise problems. With @code{gipc},
15256 process-based child processes can safely be created anywhere within a
15257 gevent-powered application.")
15258 (license license:expat)))
15259
15260 (define-public python2-gipc
15261 (package-with-python2 python-gipc))
15262
15263 (define-public python-fusepy
15264 (package
15265 (name "python-fusepy")
15266 (version "2.0.4")
15267 (source
15268 (origin
15269 (method url-fetch)
15270 (uri (pypi-uri "fusepy" version))
15271 (sha256
15272 (base32
15273 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
15274 (build-system python-build-system)
15275 (arguments
15276 `(#:phases
15277 (modify-phases %standard-phases
15278 (add-before 'build 'set-library-file-name
15279 (lambda* (#:key inputs #:allow-other-keys)
15280 (let ((fuse (assoc-ref inputs "fuse")))
15281 (substitute* "fuse.py"
15282 (("find_library\\('fuse'\\)")
15283 (string-append "'" fuse "/lib/libfuse.so'")))
15284 #t))))))
15285 (propagated-inputs
15286 `(("fuse" ,fuse)))
15287 (home-page "https://github.com/fusepy/fusepy")
15288 (synopsis "Simple ctypes bindings for FUSE")
15289 (description "Python module that provides a simple interface to FUSE and
15290 MacFUSE. The binding is created using the standard @code{ctypes} library.")
15291 (license license:isc)))
15292
15293 (define-public python2-fusepy
15294 (package-with-python2 python-fusepy))
15295
15296 (define-public python2-gdrivefs
15297 (package
15298 (name "python2-gdrivefs")
15299 (version "0.14.9")
15300 (source
15301 (origin
15302 (method url-fetch)
15303 (uri (pypi-uri "gdrivefs" version))
15304 (sha256
15305 (base32
15306 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
15307 (build-system python-build-system)
15308 (arguments
15309 `(#:python ,python-2
15310 #:phases
15311 (modify-phases %standard-phases
15312 (add-before 'build 'patch-setup-py
15313 (lambda _
15314 ;; Update requirements from dependency==version
15315 ;; to dependency>=version
15316 (substitute* "gdrivefs/resources/requirements.txt"
15317 (("==") ">="))
15318 #t)))))
15319 (native-inputs
15320 `(("python2-gipc" ,python2-gipc)
15321 ("python2-gevent" ,python2-gevent)
15322 ("python2-greenlet" ,python2-greenlet)
15323 ("python2-httplib2" ,python2-httplib2)
15324 ("python2-uritemplate" ,python2-uritemplate)
15325 ("python2-oauth2client" ,python2-oauth2client)
15326 ("python2-six" ,python2-six)))
15327 (propagated-inputs
15328 `(("python2-dateutil" ,python2-dateutil)
15329 ("python2-fusepy" ,python2-fusepy)
15330 ("python2-google-api-client" ,python2-google-api-client)))
15331 (home-page "https://github.com/dsoprea/GDriveFS")
15332 (synopsis "Mount Google Drive as a local file system")
15333 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
15334 under Python 2.7.")
15335 (license license:gpl2)))
15336
15337 (define-public pybind11
15338 (package
15339 (name "pybind11")
15340 (version "2.3.0")
15341 (source (origin
15342 (method git-fetch)
15343 (uri (git-reference
15344 (url "https://github.com/pybind/pybind11.git")
15345 (commit (string-append "v" version))))
15346 (sha256
15347 (base32
15348 "11b6dniri8m05spfd2a19irz82shf4sdca73566bniggrf3zclnf"))
15349 (file-name (git-file-name name version))))
15350 (build-system cmake-build-system)
15351 (native-inputs
15352 `(("python" ,python)
15353 ("python-pytest" ,python-pytest)))
15354 (arguments
15355 `(#:test-target "check"))
15356 (home-page "https://github.com/pybind/pybind11/")
15357 (synopsis "Seamless operability between C++11 and Python")
15358 (description "pybind11 is a lightweight header-only library that exposes
15359 C++ types in Python and vice versa, mainly to create Python bindings of
15360 existing C++ code. Its goals and syntax are similar to the excellent
15361 Boost.Python library by David Abrahams: to minimize boilerplate code in
15362 traditional extension modules by inferring type information using compile-time
15363 introspection.")
15364 (license license:expat)))
15365
15366 (define-public python-fasteners
15367 (package
15368 (name "python-fasteners")
15369 (version "0.14.1")
15370 (source
15371 (origin
15372 (method url-fetch)
15373 (uri (pypi-uri "fasteners" version))
15374 (sha256
15375 (base32
15376 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
15377 (build-system python-build-system)
15378 (propagated-inputs
15379 `(("python-monotonic" ,python-monotonic)
15380 ("python-six" ,python-six)
15381 ("python-testtools" ,python-testtools)))
15382 (home-page "https://github.com/harlowja/fasteners")
15383 (synopsis "Python package that provides useful locks")
15384 (description
15385 "This package provides a Python program that provides following locks:
15386
15387 @itemize
15388 @item Locking decorator
15389 @item Reader-writer locks
15390 @item Inter-process locks
15391 @item Generic helpers
15392 @end itemize\n")
15393 (properties `((python2-variant . ,(delay python2-fasteners))))
15394 (license license:asl2.0)))
15395
15396 (define-public python2-fasteners
15397 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
15398 (package
15399 (inherit base)
15400 (propagated-inputs
15401 `(("python2-futures" ,python2-futures)
15402 ,@(package-propagated-inputs base))))))
15403
15404 (define-public python-requests-file
15405 (package
15406 (name "python-requests-file")
15407 (version "1.4.3")
15408 (source
15409 (origin
15410 (method url-fetch)
15411 (uri (pypi-uri "requests-file" version))
15412 (sha256
15413 (base32
15414 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
15415 (build-system python-build-system)
15416 (propagated-inputs
15417 `(("python-requests" ,python-requests)
15418 ("python-six" ,python-six)))
15419 (home-page
15420 "https://github.com/dashea/requests-file")
15421 (synopsis "File transport adapter for Requests")
15422 (description
15423 "Requests-File is a transport adapter for use with the Requests Python
15424 library to allow local file system access via @code{file://} URLs.")
15425 (license license:asl2.0)))
15426
15427 (define-public python2-requests-file
15428 (package-with-python2 python-requests-file))
15429
15430 (define-public python-tldextract
15431 (package
15432 (name "python-tldextract")
15433 (version "2.2.0")
15434 (source
15435 (origin
15436 (method url-fetch)
15437 (uri (pypi-uri "tldextract" version))
15438 (sha256
15439 (base32
15440 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
15441 (build-system python-build-system)
15442 (native-inputs
15443 `(("python-pytest" ,python-pytest)
15444 ("python-responses" ,python-responses)))
15445 (propagated-inputs
15446 `(("python-idna" ,python-idna)
15447 ("python-requests" ,python-requests)
15448 ("python-requests-file" ,python-requests-file)))
15449 (home-page
15450 "https://github.com/john-kurkowski/tldextract")
15451 (synopsis
15452 "Separate the TLD from the registered domain and subdomains of a URL")
15453 (description
15454 "TLDExtract accurately separates the TLD from the registered domain and
15455 subdomains of a URL, using the Public Suffix List. By default, this includes
15456 the public ICANN TLDs and their exceptions. It can optionally support the
15457 Public Suffix List's private domains as well.")
15458 (license license:bsd-3)))
15459
15460 (define-public python2-tldextract
15461 (package-with-python2 python-tldextract))
15462
15463 (define-public python-pynamecheap
15464 (package
15465 (name "python-pynamecheap")
15466 (version "0.0.3")
15467 (source
15468 (origin
15469 (method url-fetch)
15470 (uri (pypi-uri "PyNamecheap" version))
15471 (sha256
15472 (base32
15473 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
15474 (build-system python-build-system)
15475 (propagated-inputs
15476 `(("python-requests" ,python-requests)))
15477 (home-page
15478 "https://github.com/Bemmu/PyNamecheap")
15479 (synopsis
15480 "Namecheap API client in Python")
15481 (description
15482 "PyNamecheap is a Namecheap API client in Python.")
15483 (license license:expat)))
15484
15485 (define-public python2-pynamecheap
15486 (package-with-python2 python-pynamecheap))
15487
15488 (define-public python-dns-lexicon
15489 (package
15490 (name "python-dns-lexicon")
15491 (version "2.4.0")
15492 (source
15493 (origin
15494 (method url-fetch)
15495 (uri (pypi-uri "dns-lexicon" version))
15496 (sha256
15497 (base32
15498 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
15499 (build-system python-build-system)
15500 (arguments
15501 `(#:tests? #f)) ;requires internet access
15502 (propagated-inputs
15503 `(("python-future" ,python-future)
15504 ("python-pynamecheap" ,python-pynamecheap)
15505 ("python-requests" ,python-requests)
15506 ("python-tldextract" ,python-tldextract)
15507 ("python-urllib3" ,python-urllib3)))
15508 (home-page "https://github.com/AnalogJ/lexicon")
15509 (synopsis
15510 "Manipulate DNS records on various DNS providers")
15511 (description
15512 "Lexicon provides a way to manipulate DNS records on multiple DNS
15513 providers in a standardized way. It has a CLI but it can also be used as a
15514 Python library. It was designed to be used in automation, specifically with
15515 Let's Encrypt.")
15516 (license license:expat)))
15517
15518 (define-public python2-dns-lexicon
15519 (package-with-python2 python-dns-lexicon))
15520
15521 (define-public python-commandlines
15522 (package
15523 (name "python-commandlines")
15524 (version "0.4.1")
15525 (source
15526 (origin
15527 (method url-fetch)
15528 (uri (pypi-uri "commandlines" version))
15529 (sha256
15530 (base32
15531 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15532 (build-system python-build-system)
15533 (home-page "https://github.com/chrissimpkins/commandlines")
15534 (synopsis "Command line argument to object parsing library")
15535 (description
15536 "@code{Commandlines} is a Python library for command line application
15537 development that supports command line argument parsing, command string
15538 validation testing and application logic.")
15539 (license license:expat)))
15540
15541 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15542 ;; python-numba. They have a very unflexible relationship.
15543 (define-public python-numba
15544 (package
15545 (name "python-numba")
15546 (version "0.42.0")
15547 (source
15548 (origin
15549 (method url-fetch)
15550 (uri (pypi-uri "numba" version))
15551 (sha256
15552 (base32
15553 "03rqdfx0512lcri2bcpngx5k3jwfbqnanqj3n19c7d6h6hqxvq9x"))))
15554 (build-system python-build-system)
15555 (arguments
15556 `(#:modules ((guix build utils)
15557 (guix build python-build-system)
15558 (ice-9 ftw)
15559 (srfi srfi-1)
15560 (srfi srfi-26))
15561 #:phases
15562 (modify-phases %standard-phases
15563 (add-after 'unpack 'disable-proprietary-features
15564 (lambda _
15565 (setenv "NUMBA_DISABLE_HSA" "1")
15566 (setenv "NUMBA_DISABLE_CUDA" "1")
15567 #t))
15568 (add-after 'unpack 'remove-failing-tests
15569 (lambda _
15570 ;; FIXME: these tests fail for unknown reasons:
15571 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15572 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15573 (substitute* "numba/tests/test_dispatcher.py"
15574 (("def test(_non_writable_pycache)" _ m)
15575 (string-append "def guix_skip" m))
15576 (("def test(_non_creatable_pycache)" _ m)
15577 (string-append "def guix_skip" m))
15578 (("def test(_frozen)" _ m)
15579 (string-append "def guix_skip" m)))
15580
15581 ;; These tests fail because we don't run the tests from the build
15582 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
15583 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
15584 (substitute* "numba/tests/test_pycc.py"
15585 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15586 (string-append "def guix_skip" m)))
15587 #t))
15588 (replace 'check
15589 (lambda _
15590 (let ((cwd (getcwd)))
15591 (setenv "PYTHONPATH"
15592 (string-append cwd "/build/"
15593 (find (cut string-prefix? "lib" <>)
15594 (scandir (string-append cwd "/build")))
15595 ":"
15596 (getenv "PYTHONPATH")))
15597 ;; Something is wrong with the PYTHONPATH when running the
15598 ;; tests from the build directory, as it complains about not being
15599 ;; able to import certain modules.
15600 (with-directory-excursion "/tmp"
15601 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15602 #t)))))
15603 (propagated-inputs
15604 `(("python-llvmlite" ,python-llvmlite)
15605 ("python-numpy" ,python-numpy)
15606 ("python-singledispatch" ,python-singledispatch)))
15607 ;; Needed for tests.
15608 (inputs
15609 `(("python-jinja2" ,python-jinja2)
15610 ("python-pygments" ,python-pygments)))
15611 (home-page "https://numba.pydata.org")
15612 (synopsis "Compile Python code using LLVM")
15613 (description "Numba gives you the power to speed up your applications with
15614 high performance functions written directly in Python. With a few
15615 annotations, array-oriented and math-heavy Python code can be just-in-time
15616 compiled to native machine instructions, similar in performance to C, C++ and
15617 Fortran, without having to switch languages or Python interpreters.
15618
15619 Numba works by generating optimized machine code using the LLVM compiler
15620 infrastructure at import time, runtime, or statically (using the included pycc
15621 tool).")
15622 (license license:bsd-3)))
15623
15624 (define-public python-anndata
15625 (package
15626 (name "python-anndata")
15627 (version "0.6.18")
15628 (source
15629 (origin
15630 (method url-fetch)
15631 (uri (pypi-uri "anndata" version))
15632 (sha256
15633 (base32
15634 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
15635 (build-system python-build-system)
15636 (propagated-inputs
15637 `(("python-h5py" ,python-h5py)
15638 ("python-natsort" ,python-natsort)
15639 ("python-pandas" ,python-pandas)
15640 ("python-scipy" ,python-scipy)))
15641 (home-page "https://github.com/theislab/anndata")
15642 (synopsis "Annotated data for data analysis pipelines")
15643 (description "Anndata is a package for simple (functional) high-level APIs
15644 for data analysis pipelines. In this context, it provides an efficient,
15645 scalable way of keeping track of data together with learned annotations and
15646 reduces the code overhead typically encountered when using a mostly
15647 object-oriented library such as @code{scikit-learn}.")
15648 (license license:bsd-3)))
15649
15650 (define-public python-dill
15651 (package
15652 (name "python-dill")
15653 (version "0.2.9")
15654 (source
15655 (origin
15656 (method url-fetch)
15657 (uri (pypi-uri "dill" version))
15658 (sha256
15659 (base32 "0vwqyi6hyz2r29zydc78dqymkbc5y7gia16xcdh215cikxph9mpn"))))
15660 (build-system python-build-system)
15661 ;; FIXME: The check phase fails with "don't know how to make test from: …".
15662 (arguments '(#:tests? #f))
15663 (home-page "https://pypi.org/project/dill")
15664 (synopsis "Serialize all of Python")
15665 (description "Dill extends Python's @code{pickle} module for serializing
15666 and de-serializing Python objects to the majority of the built-in Python
15667 types. Dill provides the user the same interface as the @code{pickle} module,
15668 and also includes some additional features. In addition to pickling Python
15669 objects, @code{dill} provides the ability to save the state of an interpreter
15670 session in a single command. Hence, it would be feasible to save a
15671 interpreter session, close the interpreter, ship the pickled file to another
15672 computer, open a new interpreter, unpickle the session and thus continue from
15673 the saved state of the original interpreter session.")
15674 (license license:bsd-3)))
15675
15676 (define-public python-multiprocess
15677 (package
15678 (name "python-multiprocess")
15679 (version "0.70.6.1")
15680 (source
15681 (origin
15682 (method url-fetch)
15683 (uri (pypi-uri "multiprocess" version))
15684 (sha256
15685 (base32
15686 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
15687 (build-system python-build-system)
15688 (propagated-inputs
15689 `(("python-dill" ,python-dill)))
15690 (home-page "https://pypi.org/project/multiprocess")
15691 (synopsis "Multiprocessing and multithreading in Python")
15692 (description
15693 "This package is a fork of the multiprocessing Python package, a package
15694 which supports the spawning of processes using the API of the standard
15695 library's @code{threading} module.")
15696 (license license:bsd-3)))
15697
15698 (define-public python-toolz
15699 (package
15700 (name "python-toolz")
15701 (version "0.9.0")
15702 (source
15703 (origin
15704 (method url-fetch)
15705 (uri (pypi-uri "toolz" version))
15706 (sha256
15707 (base32
15708 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
15709 (build-system python-build-system)
15710 ;; FIXME: tests cannot be computed: "Can't perform this operation for
15711 ;; unregistered loader type"
15712 (arguments '(#:tests? #f))
15713 (home-page "https://github.com/pytoolz/toolz/")
15714 (synopsis "List processing tools and functional utilities")
15715 (description
15716 "This package provides a set of utility functions for iterators,
15717 functions, and dictionaries.")
15718 (license license:bsd-3)))
15719
15720 (define-public python2-toolz
15721 (package-with-python2 python-toolz))
15722
15723 (define-public python-cytoolz
15724 (package
15725 (name "python-cytoolz")
15726 (version "0.9.0.1")
15727 (source
15728 (origin
15729 (method url-fetch)
15730 (uri (pypi-uri "cytoolz" version))
15731 (sha256
15732 (base32
15733 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
15734 (build-system python-build-system)
15735 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
15736 ;; 'exceptions'"
15737 (arguments '(#:tests? #f))
15738 (propagated-inputs
15739 `(("python-toolz" ,python-toolz)))
15740 (native-inputs
15741 `(("python-cython" ,python-cython)))
15742 (home-page "https://github.com/pytoolz/cytoolz")
15743 (synopsis "High performance functional utilities")
15744 (description
15745 "The cytoolz package implements the same API as provided by toolz. The
15746 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
15747 that is accessible to other projects developed in Cython.")
15748 (license license:bsd-3)))
15749
15750 (define-public python-sortedcontainers
15751 (package
15752 (name "python-sortedcontainers")
15753 (version "2.0.4")
15754 (source
15755 (origin
15756 (method url-fetch)
15757 (uri (pypi-uri "sortedcontainers" version))
15758 (sha256
15759 (base32
15760 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
15761 (build-system python-build-system)
15762 (native-inputs
15763 `(("python-tox" ,python-tox)))
15764 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
15765 (synopsis "Sorted List, Sorted Dict, Sorted Set")
15766 (description
15767 "This package provides a sorted collections library, written in
15768 pure-Python.")
15769 (license license:asl2.0)))
15770
15771 (define-public python-cloudpickle
15772 (package
15773 (name "python-cloudpickle")
15774 (version "0.6.1")
15775 (source
15776 (origin
15777 (method url-fetch)
15778 (uri (pypi-uri "cloudpickle" version))
15779 (sha256
15780 (base32
15781 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
15782 (build-system python-build-system)
15783 ;; FIXME: there are 5 errors in 122 tests:
15784 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
15785 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
15786 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15787 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15788 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
15789 ;; TypeError: cannot serialize '_io.BufferedRandom' object
15790 (arguments '(#:tests? #f))
15791 (native-inputs
15792 `(("python-pytest" ,python-pytest)
15793 ("python-mock" ,python-mock)
15794 ("python-tornado" ,python-tornado)))
15795 (home-page "https://github.com/cloudpipe/cloudpickle")
15796 (synopsis "Extended pickling support for Python objects")
15797 (description
15798 "Cloudpickle makes it possible to serialize Python constructs not
15799 supported by the default pickle module from the Python standard library. It
15800 is especially useful for cluster computing where Python expressions are
15801 shipped over the network to execute on remote hosts, possibly close to the
15802 data.")
15803 (license license:bsd-3)))
15804
15805 (define-public python2-cloudpickle
15806 (package-with-python2 python-cloudpickle))
15807
15808 (define-public python-locket
15809 (package
15810 (name "python-locket")
15811 (version "0.2.0")
15812 (source
15813 (origin
15814 (method url-fetch)
15815 (uri (pypi-uri "locket" version))
15816 (sha256
15817 (base32
15818 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
15819 (build-system python-build-system)
15820 (home-page "https://github.com/mwilliamson/locket.py")
15821 (synopsis "File-based locks for Python")
15822 (description
15823 "Locket implements a lock that can be used by multiple processes provided
15824 they use the same path.")
15825 (license license:bsd-2)))
15826
15827 (define-public python2-locket
15828 (package-with-python2 python-locket))
15829
15830 (define-public python-blosc
15831 (package
15832 (name "python-blosc")
15833 (version "1.5.1")
15834 (source
15835 (origin
15836 (method url-fetch)
15837 (uri (pypi-uri "blosc" version))
15838 (sha256
15839 (base32
15840 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
15841 (build-system python-build-system)
15842 ;; FIXME: all tests pass, but then this error is printed:
15843 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
15844 (arguments '(#:tests? #f))
15845 (propagated-inputs
15846 `(("python-numpy" ,python-numpy)))
15847 (home-page "https://github.com/blosc/python-blosc")
15848 (synopsis "Python wrapper for the Blosc data compressor library")
15849 (description "Blosc is a high performance compressor optimized for binary
15850 data. It has been designed to transmit data to the processor cache faster
15851 than the traditional, non-compressed, direct memory fetch approach via a
15852 @code{memcpy()} system call.
15853
15854 Blosc works well for compressing numerical arrays that contains data with
15855 relatively low entropy, like sparse data, time series, grids with
15856 regular-spaced values, etc.
15857
15858 This Python package wraps the Blosc library.")
15859 (license license:bsd-3)))
15860
15861 (define-public python2-blosc
15862 (package-with-python2 python-blosc))
15863
15864 (define-public python-partd
15865 (package
15866 (name "python-partd")
15867 (version "0.3.9")
15868 (source
15869 (origin
15870 (method url-fetch)
15871 (uri (pypi-uri "partd" version))
15872 (sha256
15873 (base32
15874 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
15875 (build-system python-build-system)
15876 (propagated-inputs
15877 `(("python-blosc" ,python-blosc)
15878 ("python-locket" ,python-locket)
15879 ("python-numpy" ,python-numpy)
15880 ("python-pandas" ,python-pandas)
15881 ("python-pyzmq" ,python-pyzmq)
15882 ("python-toolz" ,python-toolz)))
15883 (home-page "https://github.com/dask/partd/")
15884 (synopsis "Appendable key-value storage")
15885 (description "Partd stores key-value pairs. Values are raw bytes. We
15886 append on old values. Partd excels at shuffling operations.")
15887 (license license:bsd-3)))
15888
15889 (define-public python2-partd
15890 (package-with-python2 python-partd))
15891
15892 (define-public python-dask
15893 (package
15894 (name "python-dask")
15895 (version "1.2.2")
15896 (source
15897 (origin
15898 (method url-fetch)
15899 (uri (pypi-uri "dask" version))
15900 (sha256
15901 (base32 "0b29gvf96gmp20wicly3v3mhyc93zbm3mdv935fka6x0wax7cy2y"))))
15902 (build-system python-build-system)
15903 ;; A single test out of 5000+ fails. This test is marked as xfail when
15904 ;; pytest-xdist is used.
15905 (arguments
15906 `(#:phases
15907 (modify-phases %standard-phases
15908 (add-after 'unpack 'disable-broken-test
15909 (lambda _
15910 (substitute* "dask/tests/test_threaded.py"
15911 (("def test_interrupt\\(\\)" m)
15912 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15913 m)))
15914 (when (which "python2")
15915 ;; This test fails with recent Pandas:
15916 ;; <https://github.com/dask/dask/issues/3794>.
15917 (substitute* "dask/dataframe/tests/test_dataframe.py"
15918 (("def test_info\\(\\)" m)
15919 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15920 m))))
15921 #t))
15922 (replace 'check
15923 (lambda _ (invoke "pytest" "-vv"))))))
15924 (propagated-inputs
15925 `(("python-cloudpickle" ,python-cloudpickle)
15926 ("python-numpy" ,python-numpy)
15927 ("python-pandas" ,python-pandas)
15928 ("python-partd" ,python-partd)
15929 ("python-toolz" ,python-toolz)
15930 ("python-pyyaml" ,python-pyyaml)))
15931 (native-inputs
15932 `(("python-pytest" ,python-pytest)
15933 ("python-pytest-runner" ,python-pytest-runner)))
15934 (home-page "https://github.com/dask/dask/")
15935 (synopsis "Parallel computing with task scheduling")
15936 (description
15937 "Dask is a flexible parallel computing library for analytics. It
15938 consists of two components: dynamic task scheduling optimized for computation,
15939 and large data collections like parallel arrays, dataframes, and lists that
15940 extend common interfaces like NumPy, Pandas, or Python iterators to
15941 larger-than-memory or distributed environments. These parallel collections
15942 run on top of the dynamic task schedulers. ")
15943 (license license:bsd-3)))
15944
15945 (define-public python2-dask
15946 (package-with-python2 python-dask))
15947
15948 (define-public python-ilinkedlist
15949 (package
15950 (name "python-ilinkedlist")
15951 (version "0.4.0")
15952 (source
15953 (origin
15954 (method url-fetch)
15955 (uri (pypi-uri "ilinkedlist" version))
15956 (sha256
15957 (base32
15958 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
15959 (build-system python-build-system)
15960 (native-inputs `(("python-pytest" ,python-pytest)))
15961 (inputs `(("python" ,python)))
15962 (home-page "https://github.com/luther9/ilinkedlist-py")
15963 (synopsis "Immutable linked list library")
15964 (description
15965 "This is a implementation of immutable linked lists for Python. It
15966 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
15967 Since a linked list is treated as immutable, it is hashable, and its length
15968 can be retrieved in constant time. Some of the terminology is inspired by
15969 LISP. It is possible to create an improper list by creating a @code{Pair}
15970 with a non-list @code{cdr}.")
15971 (license license:gpl3+)))
15972
15973 (define-public python-readlike
15974 (package
15975 (name "python-readlike")
15976 (version "0.1.3")
15977 (source
15978 (origin
15979 (method url-fetch)
15980 (uri (pypi-uri "readlike" version))
15981 (sha256
15982 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
15983 (build-system python-build-system)
15984 (home-page "https://github.com/jangler/readlike")
15985 (synopsis "GNU Readline-like line editing module")
15986 (description
15987 "This Python module provides line editing functions similar to the default
15988 Emacs-style ones of GNU Readline. Unlike the Python standard library's
15989 @code{readline} package, this one allows access to those capabilties in settings
15990 outside of a standard command-line interface. It is especially well-suited to
15991 interfacing with Urwid, due to a shared syntax for describing key inputs.
15992
15993 Currently, all stateless Readline commands are implemented. Yanking and history
15994 are not supported.")
15995 (license license:expat)))
15996
15997 (define-public python2-readlike
15998 (package-with-python2 python-readlike))
15999
16000 (define-public python-reparser
16001 (package
16002 (name "python-reparser")
16003 (version "1.4.3")
16004 (source
16005 (origin
16006 (method url-fetch)
16007 (uri (pypi-uri "ReParser" version))
16008 (sha256
16009 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
16010 (build-system python-build-system)
16011 (home-page "https://github.com/xmikos/reparser")
16012 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
16013 (description
16014 "This Python library provides a simple lexer/parser for inline markup based
16015 on regular expressions.")
16016 (license license:expat)))
16017
16018 (define-public python2-reparser
16019 (let ((reparser (package-with-python2
16020 (strip-python2-variant python-reparser))))
16021 (package (inherit reparser)
16022 (propagated-inputs
16023 `(("python2-enum34" ,python2-enum34)
16024 ,@(package-propagated-inputs reparser))))))
16025
16026 (define-public python-precis-i18n
16027 (package
16028 (name "python-precis-i18n")
16029 (version "1.0.0")
16030 (source
16031 (origin
16032 (method url-fetch)
16033 (uri (pypi-uri "precis_i18n" version))
16034 (sha256
16035 (base32
16036 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
16037 (build-system python-build-system)
16038 (home-page "https://github.com/byllyfish/precis_i18n")
16039 (synopsis "Implementation of the PRECIS framework")
16040 (description
16041 "This module implements the PRECIS Framework as described in RFC 8264,
16042 RFC 8265 and RFC 8266.")
16043 (license license:expat)))
16044
16045 (define-public python-absl-py
16046 (package
16047 (name "python-absl-py")
16048 (version "0.6.1")
16049 (source
16050 (origin
16051 (method url-fetch)
16052 (uri (pypi-uri "absl-py" version))
16053 (sha256
16054 (base32
16055 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
16056 (build-system python-build-system)
16057 (propagated-inputs
16058 `(("python-six" ,python-six)))
16059 (home-page "https://github.com/abseil/abseil-py")
16060 (synopsis "Abseil Python common libraries")
16061 (description
16062 "This package provides the Abseil Python Common Libraries, a collection
16063 of Python libraries for building Python applications.")
16064 (license license:asl2.0)))
16065
16066 (define-public python-astor
16067 (package
16068 (name "python-astor")
16069 (version "0.7.1")
16070 (source
16071 (origin
16072 (method url-fetch)
16073 (uri (pypi-uri "astor" version))
16074 (sha256
16075 (base32
16076 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
16077 (build-system python-build-system)
16078 ;; FIXME: There are two errors and two test failures.
16079 (arguments `(#:tests? #f))
16080 (home-page "https://github.com/berkerpeksag/astor")
16081 (synopsis "Read and write Python ASTs")
16082 (description "Astor is designed to allow easy manipulation of Python
16083 source via the Abstract Syntax Tree.")
16084 (license license:bsd-3)))
16085
16086 (define-public python2-astor
16087 (package-with-python2 python-astor))
16088
16089 (define-public python-grpcio
16090 (package
16091 (name "python-grpcio")
16092 (version "1.17.1")
16093 (source
16094 (origin
16095 (method url-fetch)
16096 (uri (pypi-uri "grpcio" version))
16097 (sha256
16098 (base32
16099 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
16100 (build-system python-build-system)
16101 (propagated-inputs
16102 `(("python-six" ,python-six)))
16103 (home-page "https://grpc.io")
16104 (synopsis "HTTP/2-based RPC framework")
16105 (description "This package provides a Python library for communicating
16106 with the HTTP/2-based RPC framework gRPC.")
16107 (license license:asl2.0)))
16108
16109 (define-public python-astunparse
16110 (package
16111 (name "python-astunparse")
16112 (version "1.6.2")
16113 (source
16114 (origin
16115 (method url-fetch)
16116 (uri (pypi-uri "astunparse" version))
16117 (sha256
16118 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
16119 (build-system python-build-system)
16120 (arguments '(#:tests? #f)) ; there are none
16121 (propagated-inputs
16122 `(("python-six" ,python-six)
16123 ("python-wheel" ,python-wheel)))
16124 (home-page "https://github.com/simonpercivall/astunparse")
16125 (synopsis "AST unparser for Python")
16126 (description "This package provides an AST unparser for Python. It is a
16127 factored out version of @code{unparse} found in the Python source
16128 distribution.")
16129 (license license:bsd-3)))
16130
16131 (define-public python-gast
16132 (package
16133 (name "python-gast")
16134 (version "0.2.2")
16135 (source
16136 (origin
16137 (method url-fetch)
16138 (uri (pypi-uri "gast" version))
16139 (sha256
16140 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
16141 (build-system python-build-system)
16142 (propagated-inputs
16143 `(("python-astunparse" ,python-astunparse)))
16144 (home-page "https://pypi.org/project/gast/")
16145 (synopsis "Generic Python AST that abstracts the underlying Python version")
16146 (description
16147 "GAST provides a compatibility layer between the AST of various Python
16148 versions, as produced by @code{ast.parse} from the standard @code{ast}
16149 module.")
16150 (license license:bsd-3)))
16151
16152 (define-public python-wikidata
16153 (package
16154 (name "python-wikidata")
16155 (version "0.6.1")
16156 (source
16157 (origin
16158 (method url-fetch)
16159 (uri (pypi-uri "Wikidata" version))
16160 (sha256
16161 (base32
16162 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
16163 (build-system python-build-system)
16164 (propagated-inputs
16165 `(("python-babel" ,python-babel)))
16166 (home-page "https://github.com/dahlia/wikidata")
16167 (synopsis "Wikidata client library")
16168 (description
16169 "This package provides a Python interface to
16170 @url{https://www.wikidata.org/, Wikidata}.")
16171 (properties '((upstream-name . "Wikidata")))
16172 (license license:gpl3+)))
16173
16174 (define-public python-doctest-ignore-unicode
16175 (package
16176 (name "python-doctest-ignore-unicode")
16177 (version "0.1.2")
16178 (source
16179 (origin
16180 (method url-fetch)
16181 (uri (pypi-uri "doctest-ignore-unicode" version))
16182 (sha256
16183 (base32
16184 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
16185 (build-system python-build-system)
16186 (native-inputs
16187 `(("python-nose" ,python-nose)))
16188 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
16189 (synopsis "Ignore Unicode literal prefixes in doctests")
16190 (description
16191 "This package adds support for a flag to ignore Unicode literal prefixes
16192 in doctests.")
16193 (license license:asl2.0)))
16194
16195 (define-public python-attr
16196 (package
16197 (name "python-attr")
16198 (version "0.3.1")
16199 (source
16200 (origin
16201 (method url-fetch)
16202 (uri (pypi-uri "attr" version))
16203 (sha256
16204 (base32
16205 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
16206 (build-system python-build-system)
16207 (home-page "https://github.com/denis-ryzhkov/attr")
16208 (synopsis "Decorator for attributes of target function or class")
16209 (description "Simple decorator to set attributes of target function or
16210 class in a @acronym{DRY, Don't Repeat Yourself} way.")
16211 (license license:expat)))
16212
16213 (define-public python-construct
16214 (package
16215 (name "python-construct")
16216 (version "2.9.45")
16217 (source
16218 (origin
16219 (method url-fetch)
16220 (uri (pypi-uri "construct" version))
16221 (sha256
16222 (base32
16223 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
16224 (build-system python-build-system)
16225 (arguments
16226 `(#:tests? #f)) ; No tests exist.
16227 (propagated-inputs
16228 `(("python-extras" ,python-extras)
16229 ("python-arrow" ,python-arrow)
16230 ("python-numpy" ,python-numpy)
16231 ("python-ruamel.yaml" ,python-ruamel.yaml)))
16232 (home-page "http://construct.readthedocs.io")
16233 (synopsis "Declarative and symmetrical parser and builder for binary data")
16234 (description
16235 "This package provides both simple, atomic constructs (such as
16236 integers of various sizes), as well as composite ones which allow you
16237 form hierarchical and sequential structures of increasing complexity.
16238 It features bit and byte granularity, easy debugging and testing, an
16239 easy-to-extend subclass system, and lots of primitive constructs to
16240 make your work easier.")
16241 (license license:expat)))
16242
16243 (define-public python-humanize
16244 (package
16245 (name "python-humanize")
16246 (version "0.5.1")
16247 (source
16248 (origin
16249 (method url-fetch)
16250 (uri (pypi-uri "humanize" version))
16251 (sha256
16252 (base32
16253 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
16254 (arguments
16255 '(#:tests? #f)) ; tests not in pypi archive
16256 (build-system python-build-system)
16257 (home-page "https://github.com/jmoiron/humanize")
16258 (synopsis "Print numerical information in a human-readable form")
16259 (description "This package provides a Python module that displays numbers
16260 and dates in \"human readable\" forms. For example, it would display
16261 \"12345591313\" as \"12.3 billion\".")
16262 (license license:expat)))
16263
16264 (define-public python-txaio
16265 (package
16266 (name "python-txaio")
16267 (version "18.8.1")
16268 (source
16269 (origin
16270 (method url-fetch)
16271 (uri (pypi-uri "txaio" version))
16272 (sha256
16273 (base32
16274 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
16275 (build-system python-build-system)
16276 (propagated-inputs
16277 `(("python-twisted" ,python-twisted)
16278 ("python-six" ,python-six)))
16279 (home-page "https://github.com/crossbario/txaio")
16280 (synopsis "Compatibility layer between Python asyncio and Twisted")
16281 (description "Txaio provides a compatibility layer between the Python
16282 @code{asyncio} module and @code{Twisted}.")
16283 (license license:expat)))
16284
16285 (define-public python-toolshed
16286 (package
16287 (name "python-toolshed")
16288 (version "0.4.6")
16289 (source
16290 (origin
16291 (method url-fetch)
16292 (uri (pypi-uri "toolshed" version))
16293 (sha256
16294 (base32
16295 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
16296 (build-system python-build-system)
16297 (native-inputs
16298 `(("python-nose" ,python-nose)))
16299 (home-page "https://github.com/brentp/toolshed/")
16300 (synopsis "Collection of modules and functions for working with data")
16301 (description "This is a collection of well-tested, simple modules and
16302 functions that aim to reduce boilerplate when working with data.")
16303 (license license:bsd-2)))
16304
16305 (define-public python-annoy
16306 (package
16307 (name "python-annoy")
16308 (version "1.15.1")
16309 (source
16310 (origin
16311 (method url-fetch)
16312 (uri (pypi-uri "annoy" version))
16313 (sha256
16314 (base32
16315 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
16316 (build-system python-build-system)
16317 (native-inputs
16318 `(("python-nose" ,python-nose)))
16319 (home-page "https://github.com/spotify/annoy/")
16320 (synopsis "Approximate nearest neighbors library")
16321 (description
16322 "Annoy is a C++ library with Python bindings to search for points in
16323 space that are close to a given query point. It also creates large read-only
16324 file-based data structures that are @code{mmap}ped into memory so that many
16325 processes may share the same data.")
16326 (license license:asl2.0)))
16327
16328 (define-public python-pylzma
16329 (package
16330 (name "python-pylzma")
16331 (version "0.5.0")
16332 (source
16333 (origin
16334 (method url-fetch)
16335 (uri (pypi-uri "pylzma" version))
16336 (sha256
16337 (base32
16338 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
16339 (build-system python-build-system)
16340 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
16341 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
16342 (description "This package provides Python bindings for the LZMA library
16343 by Igor Pavlov.")
16344 (license license:lgpl2.1+)))
16345
16346 (define-public python2-pylzma
16347 (package-with-python2 python-pylzma))
16348
16349 (define-public python2-zeroconf
16350 (package
16351 (name "python2-zeroconf")
16352
16353 ;; This is the last version that supports Python 2.x.
16354 (version "0.19.1")
16355 (source
16356 (origin
16357 (method url-fetch)
16358 (uri (pypi-uri "zeroconf" version))
16359 (sha256
16360 (base32
16361 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
16362 (build-system python-build-system)
16363 (arguments
16364 `(#:python ,python-2
16365 #:phases
16366 (modify-phases %standard-phases
16367 (add-after 'unpack 'patch-requires
16368 (lambda* (#:key inputs #:allow-other-keys)
16369 (substitute* "setup.py"
16370 (("enum-compat")
16371 "enum34"))
16372 #t)))))
16373 (native-inputs
16374 `(("python2-six" ,python2-six)
16375 ("python2-enum32" ,python2-enum34)
16376 ("python2-netifaces" ,python2-netifaces)
16377 ("python2-typing" ,python2-typing)))
16378 (home-page "https://github.com/jstasiak/python-zeroconf")
16379 (synopsis "Pure Python mDNS service discovery")
16380 (description
16381 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
16382 compatible).")
16383 (license license:lgpl2.1+)))
16384
16385 (define-public python-bsddb3
16386 (package
16387 (name "python-bsddb3")
16388 (version "6.2.6")
16389 (source
16390 (origin
16391 (method url-fetch)
16392 (uri (pypi-uri "bsddb3" version))
16393 (sha256
16394 (base32
16395 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
16396 (build-system python-build-system)
16397 (inputs
16398 `(("bdb" ,bdb)))
16399 (arguments
16400 '(#:phases
16401 (modify-phases %standard-phases
16402 (add-after 'unpack 'configure-locations
16403 (lambda* (#:key inputs #:allow-other-keys)
16404 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
16405 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
16406 #t))
16407 (replace 'check
16408 (lambda _
16409 (invoke "python3" "test3.py" "-v"))))))
16410 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
16411 (synopsis "Python bindings for Oracle Berkeley DB")
16412 (description
16413 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
16414 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
16415 Transaction objects, and each of these is exposed as a Python type in the
16416 bsddb3.db module. The database objects can use various access methods: btree,
16417 hash, recno, and queue. Complete support of Berkeley DB distributed
16418 transactions. Complete support for Berkeley DB Replication Manager.
16419 Complete support for Berkeley DB Base Replication. Support for RPC.")
16420 (license license:bsd-3)))
16421
16422 (define-public python-dbfread
16423 (package
16424 (name "python-dbfread")
16425 (version "2.0.7")
16426 (source (origin
16427 (method url-fetch)
16428 (uri (pypi-uri "dbfread" version))
16429 (sha256
16430 (base32
16431 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
16432 (build-system python-build-system)
16433 (native-inputs
16434 `(("python-pytest" ,python-pytest)))
16435 (home-page "https://dbfread.readthedocs.io")
16436 (synopsis "Read DBF Files with Python")
16437 (description
16438 "This library reads DBF files and returns the data as native Python data
16439 types for further processing. It is primarily intended for batch jobs and
16440 one-off scripts.")
16441 (license license:expat)))
16442
16443 (define-public python-cached-property
16444 (package
16445 (name "python-cached-property")
16446 (version "1.5.1")
16447 (source
16448 (origin
16449 (method url-fetch)
16450 (uri (pypi-uri "cached-property" version))
16451 (sha256
16452 (base32
16453 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
16454 (build-system python-build-system)
16455 (arguments
16456 `(#:phases
16457 (modify-phases %standard-phases
16458 ;; https://github.com/pydanny/cached-property/issues/131
16459 ;; recent versions of freezegun break one test
16460 (add-after 'unpack 'disable-broken-test
16461 (lambda _
16462 (substitute* "tests/test_cached_property.py"
16463 (("def test_threads_ttl_expiry\\(self\\)" m)
16464 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
16465 " " m)))
16466 #t)))))
16467 (native-inputs
16468 `(("python-freezegun" ,python-freezegun)))
16469 (home-page
16470 "https://github.com/pydanny/cached-property")
16471 (synopsis
16472 "Decorator for caching properties in classes")
16473 (description
16474 "This package provides a decorator which makes caching
16475 time-or-computationally-expensive properties quick and easy and works in Python
16476 2 or 3.")
16477 (license license:bsd-3)))
16478
16479 (define-public python-folium
16480 (package
16481 (name "python-folium")
16482 (version "0.10.0")
16483 (source
16484 (origin
16485 (method url-fetch)
16486 (uri (pypi-uri "folium" version))
16487 (sha256
16488 (base32
16489 "18fzxijsgrb95r0a8anc9ba5ijyw3nlnv3rpavfbkqa5v878x84f"))))
16490 (build-system python-build-system)
16491 (propagated-inputs
16492 `(("python-branca" ,python-branca)
16493 ("python-jinja2" ,python-jinja2)
16494 ("python-numpy" ,python-numpy)
16495 ("python-requests" ,python-requests)))
16496 (native-inputs
16497 `(("python-pytest" ,python-pytest)))
16498 (home-page "https://github.com/python-visualization/folium")
16499 (synopsis "Make beautiful maps with Leaflet.js & Python")
16500 (description "@code{folium} makes it easy to visualize data that’s been
16501 manipulated in Python on an interactive leaflet map. It enables both the
16502 binding of data to a map for @code{choropleth} visualizations as well as
16503 passing rich vector/raster/HTML visualizations as markers on the map.
16504
16505 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
16506 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
16507 supports Image, Video, GeoJSON and TopoJSON overlays.")
16508 (license license:expat)))
16509
16510 (define-public jube
16511 (package
16512 ;; This is a command-line tool, so no "python-" prefix.
16513 (name "jube")
16514 (version "2.2.2")
16515 (source (origin
16516 (method url-fetch)
16517 (uri (string-append
16518 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
16519 version))
16520 (sha256
16521 (base32
16522 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
16523 (file-name (string-append "jube-" version ".tar.gz"))))
16524 (build-system python-build-system)
16525 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
16526 (synopsis "Benchmarking environment")
16527 (description
16528 "JUBE helps perform and analyze benchmarks in a systematic way. For each
16529 benchmarked application, benchmark data is stored in a format that allows JUBE
16530 to deduct the desired information. This data can be parsed by automatic pre-
16531 and post-processing scripts that draw information and store it more densely
16532 for manual interpretation.")
16533 (license license:gpl3+)))
16534
16535 (define-public python-pyroutelib3
16536 (package
16537 (name "python-pyroutelib3")
16538 (version "1.3.post1")
16539 (source
16540 (origin
16541 (method url-fetch)
16542 (uri (pypi-uri "pyroutelib3" version))
16543 (sha256
16544 (base32
16545 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
16546 (build-system python-build-system)
16547 (propagated-inputs
16548 `(("python-dateutil" ,python-dateutil)))
16549 (home-page "https://github.com/MKuranowski/pyroutelib3")
16550 (synopsis "Library for simple routing on OSM data")
16551 (description "Library for simple routing on OSM data")
16552 (license license:gpl3+)))
16553
16554 (define-public python-elementpath
16555 (package
16556 (name "python-elementpath")
16557 (version "1.2.0")
16558 (source
16559 (origin
16560 (method url-fetch)
16561 (uri (pypi-uri "elementpath" version))
16562 (sha256
16563 (base32
16564 "1syn2z543brab23dskh3fjd9pqvz6npqbcicrs2d88dbg26xl08p"))))
16565 (build-system python-build-system)
16566 (home-page
16567 "https://github.com/sissaschool/elementpath")
16568 (synopsis
16569 "XPath 1.0/2.0 parsers and selectors for ElementTree and lxml")
16570 (description
16571 "The proposal of this package is to provide XPath 1.0 and 2.0 selectors
16572 for Python's ElementTree XML data structures, both for the standard
16573 ElementTree library and for the @uref{http://lxml.de, lxml.etree} library.
16574
16575 For lxml.etree this package can be useful for providing XPath 2.0 selectors,
16576 because lxml.etree already has it's own implementation of XPath 1.0.")
16577 (license license:expat)))
16578
16579 (define-public python-bibtexparser
16580 (package
16581 (name "python-bibtexparser")
16582 (version "1.1.0")
16583 (source
16584 (origin
16585 (method url-fetch)
16586 (uri (pypi-uri "bibtexparser" version))
16587 (sha256
16588 (base32
16589 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
16590 (build-system python-build-system)
16591 (propagated-inputs
16592 `(("python-pyparsing" ,python-pyparsing)))
16593 (native-inputs
16594 `(("python-future" ,python-future)))
16595 (home-page "https://github.com/sciunto-org/python-bibtexparser")
16596 (synopsis "Python library to parse BibTeX files")
16597 (description "BibtexParser is a Python library to parse BibTeX files.")
16598 (license (list license:bsd-3 license:lgpl3))))
16599
16600 (define-public python-distro
16601 (package
16602 (name "python-distro")
16603 (version "1.4.0")
16604 (source
16605 (origin
16606 (method url-fetch)
16607 (uri (pypi-uri "distro" version))
16608 (sha256
16609 (base32
16610 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
16611 (build-system python-build-system)
16612 (native-inputs
16613 `(("python-pytest" ,python-pytest)))
16614 (home-page "https://github.com/nir0s/distro")
16615 (synopsis
16616 "OS platform information API")
16617 (description
16618 "@code{distro} provides information about the OS distribution it runs on,
16619 such as a reliable machine-readable ID, or version information.
16620
16621 It is the recommended replacement for Python's original
16622 `platform.linux_distribution` function (which will be removed in Python 3.8).
16623 @code{distro} also provides a command-line interface to output the platform
16624 information in various formats.")
16625 (license license:asl2.0)))
16626
16627 (define-public python-cairosvg
16628 (package
16629 (name "python-cairosvg")
16630 (version "2.4.2")
16631 (source
16632 (origin
16633 (method url-fetch)
16634 (uri (pypi-uri "CairoSVG" version))
16635 (sha256
16636 (base32 "1bb7irxbaxxb9ahm3z5wsx1q96mm5gzskc7b6q07h9ikcnb8yrjf"))))
16637 (build-system python-build-system)
16638 (arguments
16639 `(#:phases
16640 (modify-phases %standard-phases
16641 (replace 'check
16642 (lambda _ (invoke "pytest"))))))
16643 (propagated-inputs
16644 `(("python-cairocffi" ,python-cairocffi)
16645 ("python-cssselect2" ,python-cssselect2)
16646 ("python-defusedxml" ,python-defusedxml)
16647 ("python-pillow" ,python-pillow)
16648 ("python-tinycss2" ,python-tinycss2)))
16649 (native-inputs
16650 `(("python-pytest-flake8" ,python-pytest-flake8)
16651 ("python-pytest-isort" ,python-pytest-isort)
16652 ("python-pytest-runner" ,python-pytest-runner)))
16653 (home-page "https://cairosvg.org/")
16654 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
16655 (description "CairoSVG is a SVG converter based on Cairo. It can export
16656 SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
16657 SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
16658 parsed, the result is drawn to a Cairo surface that can be exported to
16659 qvarious formats: PDF, PostScript, PNG and even SVG.")
16660 (license license:lgpl3+)))
16661
16662 (define-public python-pyphen
16663 (package
16664 (name "python-pyphen")
16665 (version "0.9.5")
16666 (source
16667 (origin
16668 (method url-fetch)
16669 (uri (pypi-uri "Pyphen" version))
16670 (sha256
16671 (base32 "08c9y69ry9d6m4zalhnalg86lsp9v2j5n1ziw5vxfmiihx83lqrv"))))
16672 (build-system python-build-system)
16673 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
16674 ;; embedded set provided by upstream - like Debian does.
16675 (home-page "https://github.com/Kozea/Pyphen")
16676 (synopsis "Pure Python module to hyphenate text")
16677 (description "Pyphen is a pure Python module to hyphenate text using
16678 existing Hunspell hyphenation dictionaries.")
16679 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
16680
16681 (define-public python-intelhex
16682 (package
16683 (name "python-intelhex")
16684 (version "2.2.1")
16685 (source
16686 (origin
16687 (method url-fetch)
16688 (uri (pypi-uri "intelhex" version))
16689 (sha256
16690 (base32
16691 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
16692 (build-system python-build-system)
16693 (arguments '(#:tests? #f)) ;issue with version
16694 (home-page "https://pypi.org/project/IntelHex/")
16695 (synopsis "Python library for Intel HEX files manipulations")
16696 (description "The Intel HEX file format is widely used in microprocessors
16697 and microcontrollers area (embedded systems etc.) as the de facto standard for
16698 representation of code to be programmed into microelectronic devices. This
16699 package provides an intelhex Python library to read, write, create from
16700 scratch and manipulate data from Intel HEX file format. It also includes
16701 several convenience Python scripts, including \"classic\" hex2bin and bin2hex
16702 converters and more, those based on the library itself.")
16703 (license license:bsd-3)))
16704
16705 (define-public python-pykwalify
16706 (package
16707 (name "python-pykwalify")
16708 (version "1.7.0")
16709 (source
16710 (origin
16711 (method url-fetch)
16712 (uri (pypi-uri "pykwalify" version))
16713 (sha256
16714 (base32
16715 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
16716 (build-system python-build-system)
16717 (arguments '(#:tests? #f)) ;missing dependencies
16718 (propagated-inputs
16719 `(("python-dateutil" ,python-dateutil)
16720 ("python-docopt" ,python-docopt)
16721 ("python-pyyaml" ,python-pyyaml)))
16722 (home-page "https://github.com/grokzen/pykwalify")
16723 (synopsis
16724 "Python lib/cli for JSON/YAML schema validation")
16725 (description
16726 "This package provides a parser, schema validator, and data binding tool
16727 for YAML and JSON.")
16728 (license license:expat)))
16729
16730 (define-public python-dbusmock
16731 (package
16732 (name "python-dbusmock")
16733 (version "0.18.3")
16734 (source
16735 (origin
16736 (method url-fetch)
16737 (uri (pypi-uri "python-dbusmock" version))
16738 (sha256
16739 (base32
16740 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
16741 (build-system python-build-system)
16742 (arguments
16743 '(#:phases
16744 (modify-phases %standard-phases
16745 (add-after 'unpack 'patch-shell-path
16746 (lambda _
16747 (substitute* "tests/test_code.py"
16748 (("/bin/bash") (which "bash")))
16749 #t)))))
16750 (native-inputs
16751 `(;; For tests.
16752 ("dbus" ,dbus) ; for dbus-daemon
16753 ("python-nose" ,python-nose)
16754 ("which" ,which)))
16755 (propagated-inputs
16756 `(("python-dbus" ,python-dbus)
16757 ("python-pygobject" ,python-pygobject)))
16758 (home-page "https://github.com/martinpitt/python-dbusmock")
16759 (synopsis "Python library for mock D-Bus objects")
16760 (description "python-dbusmock allows for the easy creation of mock objects on
16761 D-Bus. This is useful for writing tests for software which talks to D-Bus
16762 services such as upower, systemd, logind, gnome-session or others, and it is
16763 hard (or impossible without root privileges) to set the state of the real
16764 services to what you expect in your tests.")
16765 (license license:lgpl3+)))
16766
16767 (define-public python-ujson
16768 (package
16769 (name "python-ujson")
16770 (version "1.35")
16771 (source
16772 (origin
16773 (method url-fetch)
16774 (uri (pypi-uri "ujson" version))
16775 (sha256
16776 (base32
16777 "11jz5wi7mbgqcsz52iqhpyykiaasila4lq8cmc2d54bfa3jp6q7n"))))
16778 (build-system python-build-system)
16779 (home-page "http://www.esn.me")
16780 (synopsis
16781 "Ultra fast JSON encoder and decoder for Python")
16782 (description
16783 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
16784 bindings for Python 2.5+ and 3.")
16785 (license license:bsd-3)))
16786
16787 (define-public python2-ujson
16788 (package-with-python2 python-ujson))