gnu: python2-fonttools: Update to 3.44.0.
[jackhill/guix/guix.git] / gnu / packages / python-xyz.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2013, 2014, 2015, 2016, 2019 Andreas Enge <andreas@enge.fr>
5 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2014, 2017 Eric Bavier <bavier@member.fsf.org>
7 ;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
8 ;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
9 ;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
10 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
11 ;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
12 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
13 ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
14 ;;; Copyright © 2015, 2016, 2017, 2019 Leo Famulari <leo@famulari.name>
15 ;;; Copyright © 2015, 2017 Ben Woodcroft <donttrustben@gmail.com>
16 ;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
17 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
18 ;;; Copyright © 2015, 2017 Kyle Meyer <kyle@kyleam.com>
19 ;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
20 ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
21 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
22 ;;; Copyright © 2016, 2018-2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
23 ;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
24 ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
25 ;;; Copyright © 2016, 2017 Troy Sankey <sankeytms@gmail.com>
26 ;;; Copyright © 2016, 2017 ng0 <ng0@n0.is>
27 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28 ;;; Copyright © 2016 David Craven <david@craven.ch>
29 ;;; Copyright © 2016, 2017, 2018, 2019 Marius Bakke <mbakke@fastmail.com>
30 ;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
31 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
32 ;;; Copyright © 2016, 2017, 2019 Alex Vong <alexvong1995@gmail.com>
33 ;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
34 ;;; Copyright © 2016, 2017, 2018 Julien Lepiller <julien@lepiller.eu>
35 ;;; Copyright © 2016, 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
36 ;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
37 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
38 ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
39 ;;; Copyright © 2017, 2018 Adriano Peluso <catonano@gmail.com>
40 ;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
41 ;;; Copyright © 2017, 2018, 2019 Mathieu Othacehe <m.othacehe@gmail.com>
42 ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
43 ;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
44 ;;; Copyright © 2017, 2018 Kei Kebreau <kkebreau@posteo.net>
45 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
46 ;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
47 ;;; Copyright © 2017, 2019 Brendan Tildesley <mail@brendan.scot>
48 ;;; Copyright © 2018 Ethan R. Jones <ethanrjones97@gmail.com
49 ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
50 ;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
51 ;;; Copyright © 2018 Mathieu Lirzin <mthl@gnu.org>
52 ;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
53 ;;; Copyright © 2016, 2018 Tomáš Čech <sleep_walker@gnu.org>
54 ;;; Copyright © 2018, 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
55 ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
56 ;;; Copyright © 2018, 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 graphviz)
107 #:use-module (gnu packages graphics)
108 #:use-module (gnu packages gstreamer)
109 #:use-module (gnu packages gtk)
110 #:use-module (gnu packages icu4c)
111 #:use-module (gnu packages image)
112 #:use-module (gnu packages imagemagick)
113 #:use-module (gnu packages libevent)
114 #:use-module (gnu packages libffi)
115 #:use-module (gnu packages linux)
116 #:use-module (gnu packages llvm)
117 #:use-module (gnu packages man)
118 #:use-module (gnu packages maths)
119 #:use-module (gnu packages monitoring)
120 #:use-module (gnu packages multiprecision)
121 #:use-module (gnu packages networking)
122 #:use-module (gnu packages ncurses)
123 #:use-module (gnu packages openstack)
124 #:use-module (gnu packages pcre)
125 #:use-module (gnu packages perl)
126 #:use-module (gnu packages pkg-config)
127 #:use-module (gnu packages python)
128 #:use-module (gnu packages python-check)
129 #:use-module (gnu packages python-compression)
130 #:use-module (gnu packages python-crypto)
131 #:use-module (gnu packages python-science)
132 #:use-module (gnu packages python-web)
133 #:use-module (gnu packages qt)
134 #:use-module (gnu packages readline)
135 #:use-module (gnu packages sdl)
136 #:use-module (gnu packages search)
137 #:use-module (gnu packages shells)
138 #:use-module (gnu packages sphinx)
139 #:use-module (gnu packages ssh)
140 #:use-module (gnu packages terminals)
141 #:use-module (gnu packages tex)
142 #:use-module (gnu packages texinfo)
143 #:use-module (gnu packages time)
144 #:use-module (gnu packages tls)
145 #:use-module (gnu packages version-control)
146 #:use-module (gnu packages video)
147 #:use-module (gnu packages web)
148 #:use-module (gnu packages base)
149 #:use-module (gnu packages xml)
150 #:use-module (gnu packages xorg)
151 #:use-module (gnu packages xdisorg)
152 #:use-module (gnu packages tcl)
153 #:use-module (gnu packages bdw-gc)
154 #:use-module (gnu packages serialization)
155 #:use-module (guix packages)
156 #:use-module (guix download)
157 #:use-module (guix git-download)
158 #:use-module (guix hg-download)
159 #:use-module (guix utils)
160 #:use-module (guix build-system gnu)
161 #:use-module (guix build-system cmake)
162 #:use-module (guix build-system python)
163 #:use-module (guix build-system trivial)
164 #:use-module (srfi srfi-1)
165 #:use-module (srfi srfi-26))
166
167 (define-public python-psutil
168 (package
169 (name "python-psutil")
170 (version "5.6.5")
171 (source
172 (origin
173 (method url-fetch)
174 (uri (pypi-uri "psutil" version))
175 (sha256
176 (base32 "0isil5jxwwd8awz54qk28rpgjg43i5l6yl70g40vxwa4r4m56lfh"))))
177 (build-system python-build-system)
178 (arguments
179 ;; FIXME: some tests does not return and times out.
180 '(#:tests? #f))
181 (home-page "https://www.github.com/giampaolo/psutil")
182 (synopsis "Library for retrieving information on running processes")
183 (description
184 "psutil (Python system and process utilities) is a library for retrieving
185 information on running processes and system utilization (CPU, memory, disks,
186 network) in Python. It is useful mainly for system monitoring, profiling and
187 limiting process resources and management of running processes. It implements
188 many functionalities offered by command line tools such as: ps, top, lsof,
189 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
190 pidof, tty, taskset, pmap.")
191 (properties `((python2-variant . ,(delay python2-psutil))))
192 (license license:bsd-3)))
193
194 (define-public python2-psutil
195 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
196 (package
197 (inherit base)
198 (propagated-inputs
199 `(("python2-enum34" ,python2-enum34) ;optional
200 ,@(package-propagated-inputs base))))))
201
202 (define-public python-shapely
203 (package
204 (name "python-shapely")
205 (version "1.6.4.post2")
206 (source
207 (origin
208 (method url-fetch)
209 (uri (pypi-uri "Shapely" version))
210 (sha256
211 (base32
212 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
213 (build-system python-build-system)
214 (native-inputs
215 `(("python-cython" ,python-cython)
216 ("python-matplotlib" ,python-matplotlib)
217 ("python-pytest" ,python-pytest)
218 ("python-pytest-cov" ,python-pytest-cov)))
219 (inputs
220 `(("geos" ,geos)))
221 (propagated-inputs
222 `(("python-numpy" ,python-numpy)))
223 (arguments
224 `(#:phases
225 (modify-phases %standard-phases
226 (add-after 'unpack 'patch-geos-path
227 (lambda* (#:key inputs #:allow-other-keys)
228 (let ((geos (assoc-ref inputs "geos"))
229 (glibc (assoc-ref inputs ,(if (%current-target-system)
230 "cross-libc" "libc"))))
231 (substitute* "shapely/geos.py"
232 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
233 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
234 geos "/lib/libgeos_c.so'])"))
235 (("free = load_dll\\('c'\\)\\.free")
236 (string-append "free = load_dll('c', fallbacks=['"
237 glibc "/lib/libc.so.6']).free"))))
238 #t)))))
239 (home-page "https://github.com/Toblerity/Shapely")
240 (synopsis "Library for the manipulation and analysis of geometric objects")
241 (description "Shapely is a Python package for manipulation and analysis of
242 planar geometric objects. It is based on the @code{GEOS} library.")
243 (license license:bsd-3)))
244
245 (define-public python-shortuuid
246 (package
247 (name "python-shortuuid")
248 (version "0.5.0")
249 (source
250 (origin
251 (method url-fetch)
252 (uri (pypi-uri "shortuuid" version))
253 (sha256
254 (base32
255 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
256 (build-system python-build-system)
257 (native-inputs
258 `(("python-pep8" ,python-pep8)))
259 (home-page "https://github.com/skorokithakis/shortuuid")
260 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
261 (description
262 "@code{shortuuid} is a Python library for generating concise, unambiguous
263 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
264 module and then similar looking characters are removed.")
265 (license license:bsd-3)))
266
267 (define-public python-logwrap
268 (package
269 (name "python-logwrap")
270 (version "3.2.1")
271 (source
272 (origin
273 (method url-fetch)
274 (uri (pypi-uri "logwrap" version ".zip"))
275 (sha256
276 (base32
277 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
278 (build-system python-build-system)
279 (propagated-inputs
280 `(("python-six" ,python-six)
281 ("python-typing" ,python-typing)))
282 (native-inputs
283 `(("unzip" ,unzip)
284 ("python-cython" ,python-cython)
285 ("python-pytest" ,python-pytest)
286 ("python-pytest-cov" ,python-pytest-cov)
287 ("python-pytest-runner" ,python-pytest-runner)))
288 (home-page "https://github.com/penguinolog/logwrap")
289 (synopsis "Decorator for logging function arguments")
290 (description "This package provides a decorator to log function arguments
291 and function call return values in a human-readable way.")
292 (license license:asl2.0)))
293
294 (define-public python2-shapely
295 (package-with-python2 python-shapely))
296
297 (define-public python-clyent
298 (package
299 (name "python-clyent")
300 (version "1.2.1")
301 (source
302 (origin
303 (method url-fetch)
304 (uri (pypi-uri "clyent" version))
305 (sha256
306 (base32
307 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
308 (build-system python-build-system)
309 (native-inputs
310 `(("python-mock" ,python-mock)))
311 (home-page "https://github.com/binstar/clyent")
312 (synopsis "Command line client library")
313 (description "Clyent is a Python command line utiliy library. It is used
314 by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
315 (license license:bsd-3)))
316
317 (define-public python2-clyent
318 (package-with-python2 python-clyent))
319
320 (define-public python-babel
321 (package
322 (name "python-babel")
323 (version "2.7.0")
324 (source
325 (origin
326 (method url-fetch)
327 (uri (pypi-uri "Babel" version))
328 (sha256
329 (base32
330 "0a7wawx8vsg7igvz6p3x909fskhg4b2y1910xk4f4c8y22p3aqg8"))))
331 (build-system python-build-system)
332 (native-inputs
333 `(("python-freezegun" ,python-freezegun)
334 ("python-pytest" ,python-pytest)))
335 (propagated-inputs
336 `(("python-pytz" ,python-pytz)))
337 (arguments
338 `(#:phases (modify-phases %standard-phases
339 (replace 'check
340 (lambda _
341 (invoke "pytest" "-vv" "-k"
342 (string-append
343 ;; XXX: These tests fail when using Pytest 4.x and
344 ;; Babel 2.6.0. Try removing this for later versions.
345 "not test_no_inherit_metazone_marker_never_in_output"
346 " and not test_smoke_dates"
347 " and not test_smoke_numbers")))))))
348 (home-page "http://babel.pocoo.org/")
349 (synopsis
350 "Tools for internationalizing Python applications")
351 (description
352 "Babel is composed of two major parts:
353 - tools to build and work with gettext message catalogs
354 - a Python interface to the CLDR (Common Locale Data Repository), providing
355 access to various locale display names, localized number and date formatting,
356 etc. ")
357 (license license:bsd-3)))
358
359 (define-public python2-babel
360 (package-with-python2 python-babel))
361
362 ;; Sphinx < 2.0 requires this version. Remove once no longer needed.
363 (define-public python2-babel-2.6
364 (package
365 (inherit python2-babel)
366 (version "2.6.0")
367 (source (origin
368 (method url-fetch)
369 (uri (pypi-uri "Babel" version))
370 (sha256
371 (base32
372 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
373
374 (define-public python2-backport-ssl-match-hostname
375 (package
376 (name "python2-backport-ssl-match-hostname")
377 (version "3.5.0.1")
378 (source
379 (origin
380 (method url-fetch)
381 (uri (pypi-uri "backports.ssl_match_hostname" version))
382 (sha256
383 (base32
384 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
385 (build-system python-build-system)
386 (arguments
387 `(#:python ,python-2
388 #:tests? #f)) ; no test target
389 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
390 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
391 (description
392 "This backport brings the ssl.match_hostname() function to users of
393 earlier versions of Python. The function checks the hostname in the
394 certificate returned by the server to which a connection has been established,
395 and verifies that it matches the intended target hostname.")
396 (license license:psfl)))
397
398 (define-public python-boolean.py
399 (package
400 (name "python-boolean.py")
401 (version "3.6")
402 (source
403 (origin
404 ;; There's no source tarball on PyPI.
405 (method git-fetch)
406 (uri (git-reference
407 (url "https://github.com/bastikr/boolean.py")
408 (commit (string-append "v" version))))
409 (file-name (git-file-name name version))
410 (sha256
411 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
412 (build-system python-build-system)
413 (home-page "https://github.com/bastikr/boolean.py")
414 (synopsis "Boolean algebra in one Python module")
415 (description
416 "This is a small Python library that implements boolean algebra.
417 It defines two base elements, @code{TRUE} and @code{FALSE}, and a
418 @code{Symbol} class that can take on one of these two values. Calculations
419 are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
420 compositions like @code{XOR} and @code{NAND} are emulated on top of them.
421 Expressions are constructed from parsed strings or directly in Python.")
422 (license license:bsd-2)))
423
424 (define-public python-hdf4
425 (package
426 (name "python-hdf4")
427 (version "0.9")
428 (source
429 (origin
430 (method url-fetch)
431 (uri (pypi-uri name version))
432 (sha256
433 (base32
434 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
435 (build-system python-build-system)
436 (native-inputs `(("nose" ,python-nose)))
437 (propagated-inputs `(("numpy" ,python-numpy)))
438 (inputs
439 `(("hdf4" ,hdf4)
440 ("libjpeg" ,libjpeg)
441 ("zlib" ,zlib)))
442 (arguments
443 `(#:phases
444 (modify-phases %standard-phases
445 (replace 'check
446 (lambda _
447 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
448 ;; on to import numpy. Somehow this works on their CI system.
449 ;; Let's just manage PYTHONPATH here instead.
450 (substitute* "runexamples.sh"
451 (("export PYTHONPATH=.*") ""))
452 (setenv "PYTHONPATH"
453 (string-append (getcwd) ":"
454 (getenv "PYTHONPATH")))
455 (invoke "./runexamples.sh")
456 (invoke "nosetests" "-v"))))))
457 (home-page "https://github.com/fhs/python-hdf4")
458 (synopsis "Python interface to the NCSA HDF4 library")
459 (description
460 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
461 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
462 NetCDF files can also be read and modified. Python-HDF4 is a fork of
463 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
464 (license license:expat)))
465
466 (define-public python2-hdf4
467 (package-with-python2 python-hdf4))
468
469 (define-public python-h5py
470 (package
471 (name "python-h5py")
472 (version "2.8.0")
473 (source
474 (origin
475 (method url-fetch)
476 (uri (pypi-uri "h5py" version))
477 (sha256
478 (base32
479 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
480 (build-system python-build-system)
481 (arguments
482 `(#:tests? #f ; no test target
483 #:phases
484 (modify-phases %standard-phases
485 (add-after 'unpack 'fix-hdf5-paths
486 (lambda* (#:key inputs #:allow-other-keys)
487 (let ((prefix (assoc-ref inputs "hdf5")))
488 (substitute* "setup_build.py"
489 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
490 (string-append "['" prefix "/lib" "']"))
491 (("'/opt/local/include', '/usr/local/include'")
492 (string-append "'" prefix "/include" "'")))
493 (substitute* "setup_configure.py"
494 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
495 (string-append "['" prefix "/lib" "']")))
496 #t))))))
497 (propagated-inputs
498 `(("python-six" ,python-six)
499 ("python-numpy" ,python-numpy)))
500 (inputs
501 `(("hdf5" ,hdf5)))
502 (native-inputs
503 `(("python-cython" ,python-cython)
504 ("python-pkgconfig" ,python-pkgconfig)))
505 (home-page "http://www.h5py.org/")
506 (synopsis "Read and write HDF5 files from Python")
507 (description
508 "The h5py package provides both a high- and low-level interface to the
509 HDF5 library from Python. The low-level interface is intended to be a
510 complete wrapping of the HDF5 API, while the high-level component supports
511 access to HDF5 files, datasets and groups using established Python and NumPy
512 concepts.")
513 (license license:bsd-3)))
514
515 (define-public python2-h5py
516 (package-with-python2 python-h5py))
517
518 (define-public python-sh
519 (package
520 (name "python-sh")
521 (version "1.12.14")
522 (source
523 (origin
524 (method url-fetch)
525 (uri (pypi-uri "sh" version))
526 (sha256
527 (base32
528 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
529 (build-system python-build-system)
530 (arguments
531 '(#:phases
532 (modify-phases %standard-phases
533 (replace 'check
534 (lambda _
535 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
536 (setenv "HOME" "/tmp")
537 (invoke "python" "sh.py" "test"))))))
538 (native-inputs
539 `(("python-coverage" ,python-coverage)))
540 (home-page "https://github.com/amoffat/sh")
541 (synopsis "Python subprocess replacement")
542 (description "This package provides a replacement for Python's
543 @code{subprocess} feature.")
544 (license license:expat)))
545
546 (define-public python2-sh
547 (package-with-python2 python-sh))
548
549 (define-public python-cftime
550 (package
551 (name "python-cftime")
552 (version "1.0.4.2")
553 (source
554 (origin
555 (method url-fetch)
556 (uri (pypi-uri "cftime" version))
557 (sha256
558 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
559 (build-system python-build-system)
560 (propagated-inputs
561 `(("python-numpy" ,python-numpy)))
562 (native-inputs
563 `(("python-coveralls" ,python-coveralls)
564 ("python-cython" ,python-cython)
565 ("python-pytest-cov" ,python-pytest-cov)))
566 (home-page "https://github.com/Unidata/cftime")
567 (synopsis "Library for time handling")
568 (description
569 "This package provides time-handling functionality that used to be part
570 of the netcdf4 package before.")
571 ;; This package claims to include code under the GPLv3 but is released
572 ;; under ISC.
573 (license (list license:isc license:gpl3+))))
574
575 (define-public python-netcdf4
576 (package
577 (name "python-netcdf4")
578 (version "1.4.2")
579 (source
580 (origin
581 (method url-fetch)
582 (uri (pypi-uri "netCDF4" version))
583 (sha256
584 (base32
585 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
586 (build-system python-build-system)
587 (arguments
588 '(#:phases
589 (modify-phases %standard-phases
590 (add-after 'unpack 'configure-locations
591 (lambda* (#:key inputs #:allow-other-keys)
592 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
593 #t)))))
594 (native-inputs
595 `(("python-cython" ,python-cython)))
596 (propagated-inputs
597 `(("python-numpy" ,python-numpy)
598 ("python-cftime" ,python-cftime)))
599 (inputs
600 `(("netcdf" ,netcdf)
601 ("hdf4" ,hdf4)
602 ("hdf5" ,hdf5)))
603 (home-page "https://github.com/Unidata/netcdf4-python")
604 (synopsis "Python/numpy interface to the netCDF library")
605 (description "Netcdf4-python is a Python interface to the netCDF C
606 library. netCDF version 4 has many features not found in earlier
607 versions of the library and is implemented on top of HDF5. This module
608 can read and write files in both the new netCDF 4 and the old netCDF 3
609 format, and can create files that are readable by HDF5 clients. The
610 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
611 to users of that module.")
612 ;; The software is mainly ISC, but includes some files covered
613 ;; by the Expat license.
614 (license (list license:isc license:expat))))
615
616 (define-public python2-netcdf4
617 (package-with-python2 python-netcdf4))
618
619 (define-public python-license-expression
620 (package
621 (name "python-license-expression")
622 (version "0.999")
623 (source
624 (origin
625 (method url-fetch)
626 (uri (pypi-uri "license-expression" version))
627 (sha256
628 (base32 "08ppb0bxbrsxazy88sgpl9yffvdsabw6dkk1nc332wcz2mphwwyf"))))
629 (build-system python-build-system)
630 (propagated-inputs
631 `(("python-boolean.py" ,python-boolean.py)))
632 (home-page "https://github.com/nexB/license-expression")
633 (synopsis "Apply boolean logic to license expressions")
634 (description
635 "This Python module defines a tiny language to evaluate and compare
636 license expressions using boolean logic. Logical combinations of licenses can
637 be tested for equality, containment, and equivalence. They can be normalised
638 and simplified. It supports SPDX license expressions as well as other naming
639 conventions and aliases in the same expression.")
640 (license license:gpl2+)))
641
642 (define-public python-lockfile
643 (package
644 (name "python-lockfile")
645 (version "0.12.2")
646 (source
647 (origin
648 (method url-fetch)
649 (uri (pypi-uri "lockfile" version))
650 (sha256
651 (base32
652 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
653 (build-system python-build-system)
654 (arguments '(#:test-target "check"))
655 (native-inputs
656 `(("python-pbr" ,python-pbr)))
657 (home-page "https://launchpad.net/pylockfile")
658 (synopsis "Platform-independent file locking module")
659 (description
660 "The lockfile package exports a LockFile class which provides a simple
661 API for locking files.")
662 (license license:expat)))
663
664 (define-public python2-lockfile
665 (package-with-python2 python-lockfile))
666
667 (define-public python-semantic-version
668 (package
669 (name "python-semantic-version")
670 (version "2.6.0")
671 (source
672 (origin
673 (method url-fetch)
674 (uri (pypi-uri "semantic_version" version))
675 (sha256
676 (base32
677 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
678 (build-system python-build-system)
679 (arguments
680 `(#:tests? #f)) ; PyPI tarball lacks tests
681 (home-page "https://github.com/rbarrois/python-semanticversion")
682 (synopsis "Semantic versioning module for Python")
683 (description
684 "The @code{semantic_version} class is a small library for handling
685 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
686
687 It can compare versions, generate a new version that represents a bump in one of
688 the version levels, and check whether any given string is a proper semantic
689 version identifier.")
690 (license license:bsd-3)))
691
692 (define-public python2-semantic-version
693 (package-with-python2 python-semantic-version))
694
695 (define-public python-serpent
696 (package
697 (name "python-serpent")
698 (version "1.28")
699 (source
700 (origin
701 (method url-fetch)
702 (uri (pypi-uri "serpent" version))
703 (sha256
704 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
705 (build-system python-build-system)
706 (native-inputs
707 `(("python-attrs" ,python-attrs)
708 ("python-pytz" ,python-pytz)))
709 (home-page "https://github.com/irmen/Serpent")
710 (synopsis "Serializer for literal Python expressions")
711 (description
712 "Serpent provides @code{ast.literal_eval()}-compatible object tree
713 serialization. It serializes an object tree into bytes (an utf-8 encoded
714 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
715 to rebuild the original object tree.
716
717 Because only safe literals are encoded, it is safe to send serpent data to
718 other machines, such as over the network.")
719 (license license:expat)))
720
721 (define-public python-setuptools
722 (package
723 (name "python-setuptools")
724 (version "41.0.1")
725 (source
726 (origin
727 (method url-fetch)
728 (uri (pypi-uri "setuptools" version ".zip"))
729 (sha256
730 (base32
731 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
732 (modules '((guix build utils)))
733 (snippet
734 '(begin
735 ;; Remove included binaries which are used to build self-extracting
736 ;; installers for Windows.
737 ;; TODO: Find some way to build them ourself so we can include them.
738 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
739 #t))))
740 (build-system python-build-system)
741 ;; FIXME: Tests require pytest, which itself relies on setuptools.
742 ;; One could bootstrap with an internal untested setuptools.
743 (arguments
744 `(#:tests? #f))
745 (home-page "https://pypi.python.org/pypi/setuptools")
746 (synopsis
747 "Library designed to facilitate packaging Python projects")
748 (description
749 "Setuptools is a fully-featured, stable library designed to facilitate
750 packaging Python projects, where packaging includes:
751 Python package and module definitions,
752 distribution package metadata,
753 test hooks,
754 project installation,
755 platform-specific details,
756 Python 3 support.")
757 ;; TODO: setuptools now bundles the following libraries:
758 ;; packaging, pyparsing, six and appdirs. How to unbundle?
759 (license (list license:psfl ; setuptools itself
760 license:expat ; six, appdirs, pyparsing
761 license:asl2.0 ; packaging is dual ASL2/BSD-2
762 license:bsd-2))))
763
764 (define-public python2-setuptools
765 (package-with-python2 python-setuptools))
766
767 ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
768 (define-public python-setuptools-for-tensorflow
769 (hidden-package
770 (package
771 (inherit python-setuptools)
772 (version "39.1.0")
773 (source (origin
774 (inherit (package-source python-setuptools))
775 (uri (pypi-uri "setuptools" version ".zip"))
776 (sha256
777 (base32
778 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
779
780 (define-public python-uniseg
781 (package
782 (name "python-uniseg")
783 (version "0.7.1")
784 (source
785 (origin
786 (method url-fetch)
787 (uri (pypi-uri "uniseg" version ".zip"))
788 (sha256
789 (base32
790 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
791 (build-system python-build-system)
792 (arguments
793 '(#:tests? #f)) ; The test suite requires network access.
794 (native-inputs
795 `(("unzip" ,unzip)))
796 (home-page
797 "https://bitbucket.org/emptypage/uniseg-python")
798 (synopsis
799 "Python library to determine Unicode text segmentations")
800 (description
801 "Uniseg is a Python package used to determine Unicode text segmentations.
802 Supported segmentations include:
803 @enumerate
804 @item @dfn{Code point} (any value in the Unicode codespace)
805 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
806 multiple Unicode code points, e.g. \"G\" + acute-accent)
807 @item Word break
808 @item Sentence break
809 @item Line break
810 @end enumerate")
811 (license license:expat)))
812
813 (define-public python2-uniseg
814 (package-with-python2 python-uniseg))
815
816 (define-public python-humanfriendly
817 (package
818 (name "python-humanfriendly")
819 (version "4.4.1")
820 (source
821 (origin
822 (method url-fetch)
823 (uri (pypi-uri "humanfriendly" version))
824 (sha256
825 (base32
826 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
827 (build-system python-build-system)
828 (arguments
829 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
830 #:tests? #f))
831 (propagated-inputs
832 `(("python-monotonic" ,python-monotonic)))
833 (home-page "https://humanfriendly.readthedocs.io")
834 (synopsis "Human-friendly input and output in Python")
835 (description
836 "The functions and classes in @code{humanfriendly} can be used to make
837 text interfaces more user-friendly. It includes tools to parse and format
838 numbers, file sizes, and timespans, timers for long-running operations, menus
839 to allow the user to choose from a list of options, and terminal interaction
840 helpers.")
841 (license license:expat)))
842
843 (define-public python2-humanfriendly
844 (package-with-python2 python-humanfriendly))
845
846 (define-public python-capturer
847 (package
848 (name "python-capturer")
849 (version "2.4")
850 (source
851 (origin
852 (method url-fetch)
853 (uri (pypi-uri "capturer" version))
854 (sha256
855 (base32
856 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
857 (build-system python-build-system)
858 (arguments
859 `(#:tests? #f))
860 (propagated-inputs
861 `(("python-humanfriendly" ,python-humanfriendly)))
862 (home-page "https://capturer.readthedocs.io")
863 (synopsis "Capture stdout and stderr streams of the current process")
864 (description
865 "The capturer package makes it easy to capture the stdout and stderr
866 streams of the current process and subprocesses. Output can be relayed
867 to the terminal in real time but is also available to the Python program
868 for additional processing.")
869 (license license:expat)))
870
871 (define-public python2-capturer
872 (package-with-python2 python-capturer))
873
874 (define-public python-case
875 (package
876 (name "python-case")
877 (version "1.5.3")
878 (source
879 (origin
880 (method url-fetch)
881 (uri (pypi-uri "case" version))
882 (sha256
883 (base32
884 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
885 (build-system python-build-system)
886 (propagated-inputs
887 `(("python-mock" ,python-mock)
888 ("python-nose" ,python-nose)
889 ("python-six" ,python-six)
890 ("python-unittest2" ,python-unittest2)))
891 (native-inputs
892 `(("python-coverage" ,python-coverage)))
893 (home-page "https://github.com/celery/case")
894 (synopsis "Unittest utilities and convenience methods")
895 (description
896 "The @code{case} package provides utilities on top of unittest, including
897 some helpful Python 2 compatibility convenience methods.")
898 (license license:bsd-3)))
899
900 (define-public python-verboselogs
901 (package
902 (name "python-verboselogs")
903 (version "1.7")
904 (source
905 (origin
906 (method url-fetch)
907 (uri (pypi-uri "verboselogs" version))
908 (sha256
909 (base32
910 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
911 (build-system python-build-system)
912 (arguments
913 `(#:phases
914 (modify-phases %standard-phases
915 (replace 'check
916 (lambda _
917 ;; Do not run pylint plugin test, as astroid is an old
918 ;; unsupported version.
919 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
920 "verboselogs/tests.py"))))))
921 (native-inputs
922 `(("python-mock" ,python-mock)
923 ("python-pytest" ,python-pytest)))
924 (home-page "https://verboselogs.readthedocs.io")
925 (synopsis "Verbose logging level for Python's logging module")
926 (description
927 "The @code{verboselogs} package extends Python's @code{logging} module to
928 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
929 (license license:expat)))
930
931 (define-public python2-verboselogs
932 (package-with-python2 python-verboselogs))
933
934 (define-public python-coloredlogs
935 (package
936 (name "python-coloredlogs")
937 (version "10.0")
938 (source
939 (origin
940 (method url-fetch)
941 (uri (pypi-uri "coloredlogs" version))
942 (sha256
943 (base32
944 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
945 (build-system python-build-system)
946 (arguments
947 `(;Tests require some updated modules
948 #:tests? #f))
949 (propagated-inputs
950 `(("python-capturer" ,python-capturer)))
951 (home-page "https://coloredlogs.readthedocs.io")
952 (synopsis "Colored stream handler for Python's logging module")
953 (description
954 "The @code{coloredlogs} package enables colored terminal output for
955 Python's logging module. The @code{ColoredFormatter} class inherits from
956 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
957 messages in color.")
958 (license license:expat)))
959
960 (define-public python2-coloredlogs
961 (package-with-python2 python-coloredlogs))
962
963 (define-public python-editorconfig
964 (package
965 (name "python-editorconfig")
966 (version "0.12.2")
967 (source
968 (origin
969 (method url-fetch)
970 (uri (pypi-uri "EditorConfig" version))
971 (sha256
972 (base32
973 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
974 (build-system python-build-system)
975 (home-page "https://editorconfig.org/")
976 (synopsis "EditorConfig bindings for python")
977 (description "The EditorConfig project consists of a file format for
978 defining coding styles and a collection of text editor plugins that enable
979 editors to read the file format and adhere to defined styles. EditorConfig
980 files are easily readable and they work nicely with version control systems.")
981 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
982 (license (list license:bsd-2 license:psfl))))
983
984 (define-public python-et-xmlfile
985 (package
986 (name "python-et-xmlfile")
987 (version "1.0.1")
988 (source
989 (origin
990 (method url-fetch)
991 (uri (pypi-uri "et_xmlfile" version))
992 (sha256
993 (base32
994 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
995 (build-system python-build-system)
996 (arguments
997 `(#:phases (modify-phases %standard-phases
998 (replace 'check
999 (lambda _
1000 (invoke "pytest"))))))
1001 (native-inputs
1002 `(("python-pytest" ,python-pytest)
1003 ("python-lxml" ,python-lxml))) ;used for the tests
1004 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
1005 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
1006 (description "This Python library is based upon the @code{xmlfile} module
1007 from @code{lxml}. It aims to provide a low memory, compatible implementation
1008 of @code{xmlfile}.")
1009 (license license:expat)))
1010
1011 (define-public python2-et-xmlfile
1012 (package-with-python2 python-et-xmlfile))
1013
1014 (define-public python-openpyxl
1015 (package
1016 (name "python-openpyxl")
1017 (version "2.6.2")
1018 (source
1019 (origin
1020 ;; We use the upstream repository, as the tests are not included in the
1021 ;; PyPI releases.
1022 (method hg-fetch)
1023 (uri (hg-reference
1024 (url "https://bitbucket.org/openpyxl/openpyxl")
1025 (changeset version)))
1026 (file-name (string-append name "-" version "-checkout"))
1027 (sha256
1028 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
1029 (build-system python-build-system)
1030 (arguments
1031 `(#:phases (modify-phases %standard-phases
1032 (replace 'check
1033 (lambda _
1034 (invoke "pytest"))))))
1035 (native-inputs
1036 ;; For the test suite.
1037 `(("python-lxml" ,python-lxml)
1038 ("python-pillow" ,python-pillow)
1039 ("python-pytest" ,python-pytest)))
1040 (propagated-inputs
1041 `(("python-et-xmlfile" ,python-et-xmlfile)
1042 ("python-jdcal" ,python-jdcal)))
1043 (home-page "https://openpyxl.readthedocs.io")
1044 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1045 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1046 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1047 standard.")
1048 (license license:expat)))
1049
1050 (define-public python-eventlet
1051 (package
1052 (name "python-eventlet")
1053 (version "0.20.1")
1054 (source
1055 (origin
1056 (method url-fetch)
1057 (uri (pypi-uri "eventlet" version))
1058 (sha256
1059 (base32
1060 "0f3q55mq4n021wb7qa53pz3ix6i2py64sap66vsaqm2scjw83m9s"))))
1061 (build-system python-build-system)
1062 (propagated-inputs
1063 `(("python-greenlet" ,python-greenlet)))
1064 (arguments
1065 ;; TODO: Requires unpackaged 'enum-compat'.
1066 '(#:tests? #f))
1067 (home-page "http://eventlet.net")
1068 (synopsis "Concurrent networking library for Python")
1069 (description
1070 "Eventlet is a concurrent networking library for Python that
1071 allows you to change how you run your code, not how you write it.
1072 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1073 Coroutines ensure that the developer uses a blocking style of programming
1074 that is similar to threading, but provide the benefits of non-blocking I/O.
1075 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1076 from the Python interpreter, or as a small part of a larger application.")
1077 (license license:expat)))
1078
1079 (define-public python2-eventlet
1080 (let ((base (package-with-python2
1081 (strip-python2-variant python-eventlet))))
1082 (package (inherit base)
1083 (propagated-inputs
1084 `(("python2-enum34" ,python2-enum34)
1085 ,@(package-propagated-inputs base))))))
1086
1087 (define-public python-six
1088 (package
1089 (name "python-six")
1090 (version "1.12.0")
1091 (source
1092 (origin
1093 (method url-fetch)
1094 (uri (pypi-uri "six" version))
1095 (sha256
1096 (base32
1097 "0wxs1q74v07ssjywbbm7x6h5v9qx209ld2yfsif4060sxi0h2sni"))))
1098 (build-system python-build-system)
1099 (arguments
1100 `(#:phases
1101 (modify-phases %standard-phases
1102 (replace 'check
1103 (lambda _
1104 (invoke "py.test" "-v"))))))
1105 (native-inputs
1106 `(("python-py" ,python-py)
1107 ("python-pytest" ,python-pytest-bootstrap)))
1108 (home-page "https://pypi.python.org/pypi/six/")
1109 (synopsis "Python 2 and 3 compatibility utilities")
1110 (description
1111 "Six is a Python 2 and 3 compatibility library. It provides utility
1112 functions for smoothing over the differences between the Python versions with
1113 the goal of writing Python code that is compatible on both Python versions.
1114 Six supports every Python version since 2.5. It is contained in only one
1115 Python file, so it can be easily copied into your project.")
1116 (license license:x11)))
1117
1118 (define-public python2-six
1119 (package-with-python2 python-six))
1120
1121 (define-public python-six-bootstrap
1122 (package
1123 (inherit python-six)
1124 (name "python-six-bootstrap")
1125 (native-inputs `())
1126 (arguments `(#:tests? #f))))
1127
1128 (define-public python2-six-bootstrap
1129 (package-with-python2 python-six-bootstrap))
1130
1131 (define-public python-schedule
1132 (package
1133 (name "python-schedule")
1134 (version "0.4.3")
1135 (source
1136 (origin
1137 (method url-fetch)
1138 (uri (pypi-uri "schedule" version))
1139 (sha256
1140 (base32
1141 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1142 (build-system python-build-system)
1143 (native-inputs
1144 `(("python-pytest" ,python-pytest)
1145 ("python-mock" ,python-mock)))
1146 (home-page "https://github.com/dbader/schedule")
1147 (synopsis "Schedule periodic function calls in Python")
1148 (description
1149 "Schedule is an in-process scheduler for periodic jobs that uses the
1150 builder pattern for configuration. Schedule lets you run Python functions (or
1151 any other callable) periodically at pre-determined intervals using a simple,
1152 human-friendly syntax.")
1153 (license license:expat)))
1154
1155 (define-public python2-schedule
1156 (package-with-python2 python-schedule))
1157
1158 (define-public python2-mechanize
1159 (package
1160 (name "python2-mechanize")
1161 (version "0.2.5")
1162 (source
1163 (origin
1164 (method url-fetch)
1165 (uri (pypi-uri "mechanize" version))
1166 (sha256
1167 (base32
1168 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1169 (build-system python-build-system)
1170 (arguments
1171 `(#:python ,python-2 ; apparently incompatible with Python 3
1172 #:tests? #f))
1173 ;; test fails with message
1174 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1175 ;; (python-3.3.2) or
1176 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1177 ;; (python-2.7.5).
1178 ;; The source code is from March 2011 and probably not up-to-date
1179 ;; with respect to python unit tests.
1180 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1181 (synopsis
1182 "Stateful programmatic web browsing in Python")
1183 (description
1184 "Mechanize implements stateful programmatic web browsing in Python,
1185 after Andy Lester’s Perl module WWW::Mechanize.")
1186 (license (license:non-copyleft
1187 "file://COPYING"
1188 "See COPYING in the distribution."))))
1189
1190
1191 (define-public python-simplejson
1192 (package
1193 (name "python-simplejson")
1194 (version "3.14.0")
1195 (source
1196 (origin
1197 (method url-fetch)
1198 (uri (pypi-uri "simplejson" version))
1199 (sha256
1200 (base32
1201 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1202 (build-system python-build-system)
1203 (home-page "http://simplejson.readthedocs.org/en/latest/")
1204 (synopsis
1205 "Json library for Python")
1206 (description
1207 "JSON (JavaScript Object Notation) is a subset of JavaScript
1208 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1209 format.
1210
1211 Simplejson exposes an API familiar to users of the standard library marshal
1212 and pickle modules. It is the externally maintained version of the json
1213 library contained in Python 2.6, but maintains compatibility with Python 2.5
1214 and (currently) has significant performance advantages, even without using
1215 the optional C extension for speedups. Simplejson is also supported on
1216 Python 3.3+.")
1217 (license license:x11)))
1218
1219 (define-public python2-simplejson
1220 (package-with-python2 python-simplejson))
1221
1222
1223 (define-public python-pyicu
1224 (package
1225 (name "python-pyicu")
1226 (version "2.3.1")
1227 (source
1228 (origin
1229 (method url-fetch)
1230 (uri (pypi-uri "PyICU" version))
1231 (sha256
1232 (base32
1233 "1x4w8m7ifki9z2a187pgjr33z6z0rp2fii9b73djak1vhm9v9cnx"))))
1234 (build-system python-build-system)
1235 (inputs
1236 `(("icu4c" ,icu4c)))
1237 (native-inputs
1238 `(("python-pytest" ,python-pytest)
1239 ("python-six" ,python-six)))
1240 (home-page "https://github.com/ovalhub/pyicu")
1241 (synopsis "Python extension wrapping the ICU C++ API")
1242 (description
1243 "PyICU is a python extension wrapping the ICU C++ API.")
1244 (properties `((python2-variant . ,(delay python2-pyicu))))
1245 (license license:x11)))
1246
1247 (define-public python2-pyicu
1248 (let ((base (package-with-python2
1249 (strip-python2-variant python-pyicu))))
1250 (package
1251 (inherit base)
1252 (arguments
1253 `(,@(package-arguments base)
1254 #:phases
1255 (modify-phases %standard-phases
1256 (add-before 'check 'delete-failing-test
1257 (λ _
1258 ;; XXX: This fails due to Unicode issues unique to Python 2,
1259 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1260 (delete-file "test/test_Script.py")
1261 #t))))))))
1262
1263 (define-public python2-dogtail
1264 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1265 ;; spaces in indentation" with Python 3.
1266 (package
1267 (name "python2-dogtail")
1268 (version "0.9.9")
1269 (source (origin
1270 (method url-fetch)
1271 (uri (pypi-uri "dogtail" version))
1272 (sha256
1273 (base32
1274 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1275 (build-system python-build-system)
1276 (arguments `(#:python ,python-2
1277 #:tests? #f)) ; invalid command "test"
1278 ;; Currently no offical homepage.
1279 (home-page "https://pypi.python.org/pypi/dogtail/")
1280 (synopsis "GUI test tool and automation framework written in Python")
1281 (description
1282 "Dogtail is a GUI test tool and automation framework written in Python.
1283 It uses Accessibility (a11y) technologies to communicate with desktop
1284 applications. dogtail scripts are written in Python and executed like any
1285 other Python program.")
1286 (license license:gpl2+)))
1287
1288 (define-public python-empy
1289 (package
1290 (name "python-empy")
1291 (version "3.3.3")
1292 (source (origin
1293 (method url-fetch)
1294 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1295 version ".tar.gz"))
1296 (sha256
1297 (base32
1298 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
1299 (build-system python-build-system)
1300 (arguments
1301 `(#:tests? #f)) ; python2 only
1302 (home-page "http://www.alcyone.com/software/empy/")
1303 (synopsis "Templating system for Python")
1304 (description
1305 "EmPy is a system for embedding Python expressions and statements in
1306 template text; it takes an EmPy source file, processes it, and produces
1307 output. This is accomplished via expansions, which are special signals to the
1308 EmPy system and are set off by a special prefix (by default the at sign, @@).
1309 EmPy can expand arbitrary Python expressions and statements in this way, as
1310 well as a variety of special forms. Textual data not explicitly delimited in
1311 this way is sent unaffected to the output, allowing Python to be used in
1312 effect as a markup language. Also supported are callbacks via hooks,
1313 recording and playback via diversions, and dynamic, chainable filters. The
1314 system is highly configurable via command line options and embedded
1315 commands.")
1316 (license license:lgpl2.1+)))
1317
1318 (define-public python2-empy
1319 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1320 (package
1321 (inherit base)
1322 (arguments `(,@(package-arguments base)
1323 #:tests? #t)))))
1324
1325 (define-public python2-element-tree
1326 (package
1327 (name "python2-element-tree")
1328 (version "1.2.6")
1329 (source (origin
1330 (method url-fetch)
1331 (uri (string-append
1332 "http://effbot.org/media/downloads/elementtree-"
1333 version "-20050316.tar.gz"))
1334 (sha256
1335 (base32
1336 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1337 (build-system python-build-system)
1338 (arguments
1339 `(#:python ,python-2 ; seems to be part of Python 3
1340 #:tests? #f)) ; no 'test' sub-command
1341 (synopsis "Toolkit for XML processing in Python")
1342 (description
1343 "ElementTree is a Python library supporting lightweight XML processing.")
1344 (home-page "http://effbot.org/zone/element-index.htm")
1345 (license (license:x11-style
1346 "http://docs.python.org/2/license.html"
1347 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1348
1349 (define-public python2-pybugz
1350 (package
1351 (name "python2-pybugz")
1352 (version "0.6.11")
1353 (source (origin
1354 (method url-fetch)
1355 (uri (string-append
1356 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1357 version ".tar.gz"))
1358 (sha256
1359 (base32
1360 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1361 (patches (search-patches "pybugz-stty.patch"
1362 "pybugz-encode-error.patch"))))
1363 (build-system python-build-system)
1364 (arguments
1365 `(#:python ,python-2 ; SyntaxError with Python 3
1366 #:tests? #f)) ; no 'test' sub-command
1367 (propagated-inputs
1368 `(("element-tree" ,python2-element-tree)))
1369 (synopsis "Python and command-line interface to Bugzilla")
1370 (description
1371 "PyBugz is a Python library and command-line tool to query the Bugzilla
1372 bug tracking system. It is meant as an aid to speed up interaction with the
1373 bug tracker.")
1374 (home-page "http://www.liquidx.net/pybugz/")
1375 (license license:gpl2)))
1376
1377 (define-public python2-enum
1378 (package
1379 (name "python2-enum")
1380 (version "0.4.6")
1381 (source (origin
1382 (method url-fetch)
1383 (uri (pypi-uri "enum" version))
1384 (sha256
1385 (base32
1386 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1387 (build-system python-build-system)
1388 (arguments
1389 `(#:python ,python-2))
1390 (home-page "http://pypi.python.org/pypi/enum/")
1391 (synopsis "Robust enumerated type support in Python")
1392 (description
1393 "This provides a module for robust enumerations in Python. It has
1394 been superseded by the Python standard library and is provided only for
1395 compatibility.")
1396 ;; Choice of either license.
1397 (license (list license:gpl3+ license:psfl))))
1398
1399 (define-public python-enum34
1400 (package
1401 (name "python-enum34")
1402 (version "1.1.6")
1403 (source
1404 (origin
1405 (method url-fetch)
1406 (uri (pypi-uri "enum34" version))
1407 (sha256
1408 (base32
1409 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1410 (build-system python-build-system)
1411 (home-page "https://pypi.python.org/pypi/enum34")
1412 (synopsis "Backported Python 3.4 Enum")
1413 (description
1414 "Enum34 is the new Python stdlib enum module available in Python 3.4
1415 backported for previous versions of Python from 2.4 to 3.3.")
1416 (license license:bsd-3)))
1417
1418 (define-public python2-enum34
1419 (package-with-python2 python-enum34))
1420
1421 (define-public python-parse-type
1422 (package
1423 (name "python-parse-type")
1424 (version "0.4.2")
1425 (source
1426 (origin
1427 (method url-fetch)
1428 (uri (pypi-uri "parse_type" version))
1429 (sha256
1430 (base32
1431 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1432 (build-system python-build-system)
1433 (propagated-inputs
1434 `(("python-six" ,python-six)
1435 ("python-parse" ,python-parse)))
1436 (native-inputs
1437 `(("python-pytest" ,python-pytest)
1438 ("python-pytest-runner" ,python-pytest-runner)))
1439 (home-page "https://github.com/jenisys/parse_type")
1440 (synopsis "Extended parse module")
1441 (description
1442 "Parse_type extends the python parse module.")
1443 (properties
1444 `((python2-variant . ,(delay python2-parse-type))))
1445 (license license:bsd-3)))
1446
1447 (define-public python2-parse-type
1448 (let ((base (package-with-python2
1449 (strip-python2-variant python-parse-type))))
1450 (package (inherit base)
1451 (propagated-inputs
1452 `(("python2-enum34" ,python2-enum34)
1453 ,@(package-propagated-inputs base))))))
1454
1455 (define-public python-parse
1456 (package
1457 (name "python-parse")
1458 (version "1.8.4")
1459 (source
1460 (origin
1461 (method url-fetch)
1462 (uri (pypi-uri "parse" version))
1463 (sha256
1464 (base32
1465 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1466 (build-system python-build-system)
1467 (arguments
1468 `(#:phases
1469 (modify-phases %standard-phases
1470 (replace 'check
1471 (lambda _ (invoke "python" "test_parse.py"))))))
1472 (home-page "https://github.com/r1chardj0n3s/parse")
1473 (synopsis "Parse strings")
1474 (description
1475 "Parse strings using a specification based on the Python @code{format()}
1476 syntax.")
1477 (license license:x11)))
1478
1479 (define-public python-polib
1480 (package
1481 (name "python-polib")
1482 (version "1.0.8")
1483 (source (origin
1484 (method url-fetch)
1485 (uri (pypi-uri "polib" version))
1486 (sha256
1487 (base32
1488 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1489 (build-system python-build-system)
1490 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1491 (synopsis "Manipulate, create and modify gettext files")
1492 (description "Polib can manipulate any gettext format (po, pot and mo)
1493 files. It can be used to create po files from scratch or to modify
1494 existing ones.")
1495 (license license:expat)))
1496
1497 (define-public python2-polib
1498 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1499 (package
1500 (inherit base)
1501 (arguments `(,@(package-arguments base)
1502 ;; Tests don't work with python2.
1503 #:tests? #f)))))
1504
1505 (define-public python-poyo
1506 (package
1507 (name "python-poyo")
1508 (version "0.5.0")
1509 (source
1510 (origin
1511 (method url-fetch)
1512 (uri (pypi-uri "poyo" version))
1513 (sha256
1514 (base32
1515 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
1516 (build-system python-build-system)
1517 (home-page "https://github.com/hackebrot/poyo")
1518 (synopsis "Lightweight YAML Parser for Python")
1519 (description
1520 "This package provides a lightweight YAML Parser for Python. It supports
1521 only a chosen subset of the YAML format that is required to parse cookiecutter
1522 user configuration files. It does not have support for serializing into YAML
1523 and is not compatible with JSON.")
1524 (license license:expat)))
1525
1526 (define-public scons
1527 (package
1528 (name "scons")
1529 (version "3.0.4")
1530 (source (origin
1531 (method git-fetch)
1532 (uri (git-reference
1533 (url "https://github.com/SCons/scons.git")
1534 (commit version)))
1535 (file-name (git-file-name name version))
1536 (sha256
1537 (base32
1538 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
1539 (build-system python-build-system)
1540 (arguments
1541 `(#:use-setuptools? #f ; still relies on distutils
1542 #:tests? #f ; no 'python setup.py test' command
1543 #:phases
1544 (modify-phases %standard-phases
1545 (add-before 'build 'bootstrap
1546 (lambda _
1547 (substitute* "src/engine/SCons/compat/__init__.py"
1548 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1549 "sys.modules[new] = __import__(old)"))
1550 (substitute* "src/engine/SCons/Platform/__init__.py"
1551 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1552 "mod = __import__(full_name)"))
1553 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1554 (chdir "build/scons")
1555 #t)))))
1556 (home-page "http://scons.org/")
1557 (synopsis "Software construction tool written in Python")
1558 (description
1559 "SCons is a software construction tool. Think of SCons as an improved,
1560 cross-platform substitute for the classic Make utility with integrated
1561 functionality similar to autoconf/automake and compiler caches such as ccache.
1562 In short, SCons is an easier, more reliable and faster way to build
1563 software.")
1564 (license license:x11)))
1565
1566 (define-public scons-python2
1567 (package
1568 (inherit (package-with-python2 scons))
1569 (name "scons-python2")))
1570
1571 (define-public python-extras
1572 (package
1573 (name "python-extras")
1574 (version "1.0.0")
1575 (source
1576 (origin
1577 (method url-fetch)
1578 (uri (pypi-uri "extras" version))
1579 (sha256
1580 (base32
1581 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1582 (build-system python-build-system)
1583 (arguments
1584 ;; FIXME: Circular dependency on testtools.
1585 '(#:tests? #f))
1586 (home-page "https://github.com/testing-cabal/extras")
1587 (synopsis "Useful extensions to the Python standard library")
1588 (description
1589 "Extras is a set of extensions to the Python standard library.")
1590 (license license:expat)))
1591
1592 (define-public python2-extras
1593 (package-with-python2 python-extras))
1594
1595 (define-public python-mimeparse
1596 (package
1597 (name "python-mimeparse")
1598 (version "1.6.0")
1599 (source
1600 (origin
1601 (method url-fetch)
1602 (uri (pypi-uri "python-mimeparse" version))
1603 (sha256
1604 (base32
1605 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1606 (build-system python-build-system)
1607 (arguments
1608 '(#:phases
1609 (modify-phases %standard-phases
1610 (replace 'check
1611 (lambda _
1612 (invoke "./mimeparse_test.py"))))))
1613 (home-page
1614 "https://github.com/dbtsai/python-mimeparse")
1615 (synopsis "Python library for parsing MIME types")
1616 (description
1617 "Mimeparse provides basic functions for parsing MIME type names and
1618 matching them against a list of media-ranges.")
1619 (license license:expat)))
1620
1621 (define-public python2-mimeparse
1622 (package-with-python2 python-mimeparse))
1623
1624 (define-public python-miniboa
1625 (package
1626 (name "python-miniboa")
1627 (version "1.0.7")
1628 (source
1629 (origin
1630 (method url-fetch)
1631 (uri (pypi-uri "miniboa" version))
1632 (sha256
1633 (base32
1634 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1635 (build-system python-build-system)
1636 (home-page "https://github.com/shmup/miniboa")
1637 (synopsis "Simple, single-threaded Telnet server")
1638 (description
1639 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1640 server.")
1641 (license license:asl2.0)))
1642
1643 (define-public python2-miniboa
1644 (package-with-python2 python-miniboa))
1645
1646 (define-public python-pafy
1647 (package
1648 (name "python-pafy")
1649 (version "0.5.3.1")
1650 (source
1651 (origin
1652 (method url-fetch)
1653 (uri (pypi-uri "pafy" version))
1654 (sha256
1655 (base32
1656 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1657 (build-system python-build-system)
1658 (arguments
1659 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1660 (propagated-inputs
1661 ;; Youtube-dl is a python package which is imported in the file
1662 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1663 `(("youtube-dl" ,youtube-dl)))
1664 (home-page "https://np1.github.io/pafy/")
1665 (synopsis "Retrieve YouTube content and metadata")
1666 (description
1667 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1668 (license license:lgpl3+)))
1669
1670 (define-public python2-funcsigs
1671 (package
1672 (name "python2-funcsigs")
1673 (version "1.0.2")
1674 (source (origin
1675 (method url-fetch)
1676 (uri (pypi-uri "funcsigs" version))
1677 (sha256
1678 (base32
1679 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1680 (build-system python-build-system)
1681 (arguments
1682 `(#:python ,python-2))
1683 (native-inputs
1684 `(("python2-unittest2" ,python2-unittest2)))
1685 (home-page "http://funcsigs.readthedocs.org")
1686 (synopsis "Python function signatures from PEP362")
1687 (description
1688 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1689 (license license:asl2.0)))
1690
1691 (define-public python2-funcsigs-bootstrap
1692 (package
1693 (inherit python2-funcsigs)
1694 (name "python2-funcsigs-bootstrap")
1695 (native-inputs `())
1696 (arguments
1697 `(#:tests? #f
1698 ,@(package-arguments python2-funcsigs)))))
1699
1700 (define-public python-py
1701 (package
1702 (name "python-py")
1703 (version "1.8.0")
1704 (source
1705 (origin
1706 (method url-fetch)
1707 (uri (pypi-uri "py" version))
1708 (sha256
1709 (base32
1710 "0lsy1gajva083pzc7csj1cvbmminb7b4l6a0prdzyb3fd829nqyw"))))
1711 (build-system python-build-system)
1712 (arguments
1713 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1714 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1715 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1716 ;; Is this module globally installed?"
1717 '(#:tests? #f))
1718 (native-inputs
1719 `(("python-setuptools-scm" ,python-setuptools-scm)))
1720 (home-page "https://github.com/pytest-dev/py")
1721 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1722 (description
1723 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1724 code introspection, and logging.")
1725 (license license:expat)))
1726
1727 (define-public python2-py
1728 (package-with-python2 python-py))
1729
1730 ;; Recent versions of python-fixtures and python-testrepository need
1731 ;; python-pbr for packaging, which itself needs these two packages for
1732 ;; testing.
1733 ;; To fix this circular dependency, we use a build of python-pbr, based on the
1734 ;; same source, just without any test dependencies and with tests disabled.
1735 ;; python-pbr-minmal is then used to package python-fixtures and
1736 ;; python-testrepository.
1737 ;; Strictly speaking we currently could remove the test-requirements from the
1738 ;; normal python-pbr package (and save this package) since test are disabled
1739 ;; there anyway. But this may change in future.
1740 (define-public python-pbr-minimal
1741 (package
1742 (name "python-pbr-minimal")
1743 (version "3.0.1")
1744 (source
1745 (origin
1746 (method url-fetch)
1747 (uri (pypi-uri "pbr" version))
1748 (sha256
1749 (base32
1750 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1751 (build-system python-build-system)
1752 (arguments
1753 `(#:tests? #f))
1754 (home-page "http://docs.openstack.org/developer/pbr/")
1755 (synopsis "Minimal build of python-pbr used for bootstrapping")
1756 (description
1757 "Used only for bootstrapping python2-pbr, you should not need this.")
1758 (license license:asl2.0)))
1759
1760 (define-public python2-pbr-minimal
1761 (package-with-python2 python-pbr-minimal))
1762
1763 (define-public python-pbr
1764 (package
1765 (inherit python-pbr-minimal)
1766 (name "python-pbr")
1767 (arguments
1768 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1769 (propagated-inputs
1770 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1771 (native-inputs
1772 `(("python-fixtures" ,python-fixtures-bootstrap)
1773 ;; discover, coverage, hacking, subunit
1774 ("python-mock" ,python-mock)
1775 ("python-six" ,python-six)
1776 ("python-sphinx" ,python-sphinx)
1777 ("python-testrepository" ,python-testrepository-bootstrap)
1778 ("python-testresources" ,python-testresources-bootstrap)
1779 ("python-testscenarios" ,python-testscenarios-bootstrap)
1780 ("python-testtools" ,python-testtools-bootstrap)
1781 ("python-virtualenv" ,python-virtualenv)))
1782 (synopsis "Enhance the default behavior of Python’s setuptools")
1783 (description
1784 "Python Build Reasonableness (PBR) is a library that injects some useful
1785 and sensible default behaviors into your setuptools run. It will set
1786 versions, process requirements files and generate AUTHORS and ChangeLog file
1787 from git information.
1788 ")))
1789
1790 (define-public python2-pbr
1791 (package-with-python2 python-pbr))
1792
1793 (define-public python-pyrsistent
1794 (package
1795 (name "python-pyrsistent")
1796 (version "0.14.11")
1797 (home-page "https://github.com/tobgu/pyrsistent")
1798 (source (origin
1799 (method url-fetch)
1800 (uri (pypi-uri "pyrsistent" version))
1801 (sha256
1802 (base32
1803 "1qkh74bm296mp5g3r11lgsksr6bh4w1bf8pji4nmxdlfj542ga1w"))))
1804 (build-system python-build-system)
1805 (native-inputs
1806 `(("python-hypothesis" ,python-hypothesis)
1807 ("python-pytest" ,python-pytest)
1808 ("python-pytest-runner" ,python-pytest-runner)))
1809 (propagated-inputs
1810 `(("python-six" ,python-six)))
1811 (synopsis "Persistent data structures for Python")
1812 (description
1813 "Pyrsistent is a number of persistent collections (by some referred to as
1814 functional data structures). Persistent in the sense that they are immutable.
1815
1816 All methods on a data structure that would normally mutate it instead return a
1817 new copy of the structure containing the requested updates. The original
1818 structure is left untouched.")
1819 (license license:expat)))
1820
1821 (define-public python2-pyrsistent
1822 (package-with-python2 python-pyrsistent))
1823
1824 (define-public python-exif-read
1825 (package
1826 (name "python-exif-read")
1827 (version "2.1.2")
1828 (source (origin
1829 (method url-fetch)
1830 (uri (pypi-uri "ExifRead" version))
1831 (sha256
1832 (base32
1833 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1834 (build-system python-build-system)
1835 (arguments `(#:tests? #f)) ; no tests
1836 (home-page "https://github.com/ianare/exif-py")
1837 (synopsis "Python library to extract EXIF data from image files")
1838 (description
1839 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1840 files.")
1841 (license license:bsd-3)))
1842
1843 (define-public python2-exif-read
1844 (package-with-python2 python-exif-read))
1845
1846 (define-public python-pyld
1847 (package
1848 (name "python-pyld")
1849 (version "1.0.5")
1850 (source (origin
1851 (method url-fetch)
1852 (uri (pypi-uri "PyLD" version))
1853 (sha256
1854 (base32
1855 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
1856 (build-system python-build-system)
1857 (home-page "https://github.com/digitalbazaar/pyld")
1858 (synopsis "Python implementation of the JSON-LD specification")
1859 (description
1860 "PyLD is an implementation of the JSON-LD specification.")
1861 (license license:bsd-3)))
1862
1863 (define-public python2-pyld
1864 (package-with-python2 python-pyld))
1865
1866 (define-public python-click
1867 (package
1868 (name "python-click")
1869 (version "7.0")
1870 (source
1871 (origin
1872 (method url-fetch)
1873 (uri (pypi-uri "click" version))
1874 (sha256
1875 (base32
1876 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
1877 (build-system python-build-system)
1878 (arguments
1879 `(#:phases
1880 (modify-phases %standard-phases
1881 (add-after 'unpack 'fix-paths
1882 (lambda* (#:key inputs #:allow-other-keys)
1883 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1884 "cross-libc" "libc"))))
1885 (substitute* "click/_unicodefun.py"
1886 (("'locale'")
1887 (string-append "'" glibc "/bin/locale'"))))
1888 #t))
1889 (replace 'check
1890 (lambda _
1891 (invoke "python" "-m" "pytest"))))))
1892 (native-inputs
1893 `(("python-pytest" ,python-pytest)))
1894 (home-page "https://palletsprojects.com/p/click/")
1895 (synopsis "Command line library for Python")
1896 (description
1897 "Click is a Python package for creating command line interfaces in a
1898 composable way with as little code as necessary. Its name stands for
1899 \"Command Line Interface Creation Kit\". It's highly configurable but comes
1900 with sensible defaults out of the box.")
1901 (license license:bsd-3)))
1902
1903 (define-public python2-click
1904 (package-with-python2 python-click))
1905
1906 (define-public python-wheel
1907 (package
1908 (name "python-wheel")
1909 (version "0.32.3")
1910 (source
1911 (origin
1912 (method url-fetch)
1913 (uri (pypi-uri "wheel" version))
1914 (sha256
1915 (base32
1916 "1dhxl1bf18bx9szmqcnxbg6204hp3im8089q3hkwh5jfa6zh75q2"))))
1917 (build-system python-build-system)
1918 (native-inputs
1919 `(("python-jsonschema" ,python-jsonschema)
1920 ("python-pytest-cov" ,python-pytest-cov)))
1921 (home-page "https://bitbucket.org/pypa/wheel/")
1922 (synopsis "Format for built Python packages")
1923 (description
1924 "A wheel is a ZIP-format archive with a specially formatted filename and
1925 the @code{.whl} extension. It is designed to contain all the files for a PEP
1926 376 compatible install in a way that is very close to the on-disk format. Many
1927 packages will be properly installed with only the @code{Unpack} step and the
1928 unpacked archive preserves enough information to @code{Spread} (copy data and
1929 scripts to their final locations) at any later time. Wheel files can be
1930 installed with a newer @code{pip} or with wheel's own command line utility.")
1931 (license license:expat)
1932 (properties `((python2-variant . ,(delay python2-wheel))))))
1933
1934 (define-public python2-wheel
1935 (let ((wheel (package-with-python2
1936 (strip-python2-variant python-wheel))))
1937 (package (inherit wheel)
1938 (native-inputs `(("python2-functools32" ,python2-functools32)
1939 ,@(package-native-inputs wheel))))))
1940
1941 (define-public python-vcversioner
1942 (package
1943 (name "python-vcversioner")
1944 (version "2.16.0.0")
1945 (source
1946 (origin
1947 (method url-fetch)
1948 (uri (pypi-uri "vcversioner" version))
1949 (sha256
1950 (base32
1951 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1952 (build-system python-build-system)
1953 (synopsis "Python library for version number discovery")
1954 (description "Vcversioner is a Python library that inspects tagging
1955 information in a variety of version control systems in order to discover
1956 version numbers.")
1957 (home-page "https://github.com/habnabit/vcversioner")
1958 (license license:isc)))
1959
1960 (define-public python2-vcversioner
1961 (package-with-python2 python-vcversioner))
1962
1963 (define-public python-jdcal
1964 (package
1965 (name "python-jdcal")
1966 (version "1.4")
1967 (source
1968 (origin
1969 (method url-fetch)
1970 (uri (pypi-uri "jdcal" version))
1971 (sha256
1972 (base32
1973 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
1974 (build-system python-build-system)
1975 (arguments
1976 `(#:phases (modify-phases %standard-phases
1977 (replace 'check
1978 (lambda _
1979 (invoke "pytest"))))))
1980 (native-inputs
1981 `(("python-pytest" ,python-pytest)))
1982 (home-page "https://github.com/phn/jdcal")
1983 (synopsis "Functions to convert between Julian dates Gregorian dates")
1984 (description "This Python library provides functions for converting
1985 between Julian dates and Gregorian dates.")
1986 (license license:bsd-2)))
1987
1988 (define-public python2-jdcal
1989 (package-with-python2 python-jdcal))
1990
1991 (define-public python-jsonschema
1992 (package
1993 (name "python-jsonschema")
1994 (version "3.0.1")
1995 (source (origin
1996 (method url-fetch)
1997 (uri (pypi-uri "jsonschema" version))
1998 (sha256
1999 (base32
2000 "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc"))))
2001 (build-system python-build-system)
2002 (arguments
2003 '(#:phases
2004 (modify-phases %standard-phases
2005 (replace 'check
2006 (lambda _
2007 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2008 (invoke "trial" "jsonschema"))))))
2009 (native-inputs
2010 `(("python-setuptools_scm" ,python-setuptools-scm)
2011 ("python-twisted" ,python-twisted)))
2012 (propagated-inputs
2013 `(("python-attrs" ,python-attrs)
2014 ("python-pyrsistent" ,python-pyrsistent)
2015 ("python-six" ,python-six)))
2016 (home-page "https://github.com/Julian/jsonschema")
2017 (synopsis "Implementation of JSON Schema for Python")
2018 (description
2019 "Jsonschema is an implementation of JSON Schema for Python.")
2020 (license license:expat)
2021 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2022
2023 (define-public python2-jsonschema
2024 (let ((jsonschema (package-with-python2
2025 (strip-python2-variant python-jsonschema))))
2026 (package (inherit jsonschema)
2027 (propagated-inputs
2028 `(("python2-functools32" ,python2-functools32)
2029 ,@(package-propagated-inputs jsonschema))))))
2030
2031 ;; This old version is still required by docker-compose as of 1.24.0.
2032 (define-public python-jsonschema-2.6
2033 (package
2034 (name "python-jsonschema")
2035 (version "2.6.0")
2036 (source (origin
2037 (method url-fetch)
2038 (uri (pypi-uri "jsonschema" version))
2039 (sha256
2040 (base32
2041 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
2042 (build-system python-build-system)
2043 (arguments
2044 '(#:phases
2045 (modify-phases %standard-phases
2046 (replace 'check (lambda _ (invoke "nosetests"))))))
2047 (native-inputs
2048 `(("python-nose" ,python-nose)
2049 ("python-vcversioner" ,python-vcversioner)))
2050 (home-page "https://github.com/Julian/jsonschema")
2051 (synopsis "Implementation of JSON Schema for Python")
2052 (description
2053 "Jsonschema is an implementation of JSON Schema for Python.")
2054 (license license:expat)
2055 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2056
2057 (define-public python-schema
2058 (package
2059 (name "python-schema")
2060 (version "0.6.6")
2061 (source
2062 (origin
2063 (method url-fetch)
2064 (uri (pypi-uri "schema" version))
2065 (sha256
2066 (base32
2067 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2068 (build-system python-build-system)
2069 (native-inputs
2070 `(("python-pytest" ,python-pytest)))
2071 (home-page "https://github.com/keleshev/schema")
2072 (synopsis "Simple data validation library")
2073 (description
2074 "@code{python-schema} is a library for validating Python data
2075 structures, such as those obtained from config-files, forms, external
2076 services or command-line parsing, converted from JSON/YAML (or
2077 something else) to Python data-types.")
2078 (license license:psfl)))
2079
2080 (define-public python2-schema
2081 (package-with-python2 python-schema))
2082
2083 (define-public python-schema-0.5
2084 (package (inherit python-schema)
2085 (version "0.5.0")
2086 (source
2087 (origin
2088 (method url-fetch)
2089 (uri (pypi-uri "schema" version))
2090 (sha256
2091 (base32
2092 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2093
2094 (define-public python2-schema-0.5
2095 (package-with-python2 python-schema-0.5))
2096
2097 (define-public python-kitchen
2098 (package
2099 (name "python-kitchen")
2100 (version "1.2.5")
2101 (source
2102 (origin
2103 (method url-fetch)
2104 (uri (pypi-uri "kitchen" version))
2105 (sha256
2106 (base32
2107 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2108 (build-system python-build-system)
2109 (propagated-inputs
2110 `(("python-chardet" ,python-chardet)))
2111 (home-page "https://github.com/fedora-infra/kitchen")
2112 (synopsis "Python API for snippets")
2113 (description "@code{kitchen} module provides a python API for all sorts of
2114 little useful snippets of code that everybody ends up writing for their projects
2115 but never seem big enough to build an independent release. Use kitchen and stop
2116 cutting and pasting that code over and over.")
2117 (license (list license:lgpl2.1+
2118 ;; subprocess.py, test_subprocess.py,
2119 ;; kitchen/pycompat25/defaultdict.py:
2120 license:psfl))))
2121
2122 (define-public python2-kitchen
2123 (package-with-python2 python-kitchen))
2124
2125 (define-public python-unidecode
2126 (package
2127 (name "python-unidecode")
2128 (version "1.1.1")
2129 (source (origin
2130 (method url-fetch)
2131 (uri (pypi-uri "Unidecode" version))
2132 (sha256
2133 (base32
2134 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
2135 (build-system python-build-system)
2136 (home-page "https://pypi.python.org/pypi/Unidecode")
2137 (synopsis "ASCII transliterations of Unicode text")
2138 (description
2139 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2140 useful when integrating with legacy code that doesn't support Unicode, or for
2141 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2142 machine identifiers from human-readable Unicode strings that should still be
2143 somewhat intelligible.")
2144 (license license:gpl2+)))
2145
2146 (define-public python2-unidecode
2147 (package-with-python2 python-unidecode))
2148
2149 (define-public python-pyjwt
2150 (package
2151 (name "python-pyjwt")
2152 (version "1.7.1")
2153 (source
2154 (origin
2155 (method url-fetch)
2156 (uri (pypi-uri "PyJWT" version))
2157 (sha256
2158 (base32
2159 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
2160 (modules '((guix build utils)))
2161 (snippet
2162 '(begin
2163 (for-each delete-file-recursively
2164 (find-files "." "\\.pyc$"))
2165 #t))))
2166 (build-system python-build-system)
2167 (native-inputs
2168 `(("python-pytest" ,python-pytest)
2169 ("python-pytest-cov" ,python-pytest-cov)
2170 ("python-pytest-runner" ,python-pytest-runner)))
2171 (home-page "https://github.com/progrium/pyjwt")
2172 (synopsis "JSON Web Token implementation in Python")
2173 (description
2174 "PyJWT is a JSON Web Token implementation written in Python.")
2175 (license license:expat)))
2176
2177 (define-public python2-pyjwt
2178 (package-with-python2 python-pyjwt))
2179
2180 (define-public python-pykka
2181 (package
2182 (name "python-pykka")
2183 (version "1.2.1")
2184 (source
2185 (origin
2186 (method url-fetch)
2187 (uri (pypi-uri "Pykka" version))
2188 (sha256
2189 (base32
2190 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2191 (build-system python-build-system)
2192 (native-inputs
2193 `(("python-mock" ,python-mock)
2194 ("python-nose" ,python-nose)
2195 ("python-gevent" ,python-gevent)
2196 ("python-eventlet" ,python-eventlet)))
2197 (home-page "https://www.pykka.org/")
2198 (synopsis "Pykka is a Python implementation of the actor model")
2199 (description
2200 "Pykka is a Python implementation of the actor model.
2201 The actor model introduces some simple rules to control the sharing
2202 of state and cooperation between execution units, which makes it
2203 easier to build concurrent applications.")
2204 (license license:asl2.0)))
2205
2206 (define-public python2-pykka
2207 (package-with-python2 python-pykka))
2208
2209 (define-public python-pymsgbox
2210 (package
2211 (name "python-pymsgbox")
2212 (version "1.0.6")
2213 (source
2214 (origin
2215 (method git-fetch)
2216 (uri (git-reference
2217 ;; LICENSE.txt is not present on pypi
2218 (url "https://github.com/asweigart/PyMsgBox")
2219 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2220 (file-name (git-file-name name version))
2221 (sha256
2222 (base32
2223 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2224 (arguments
2225 ;; Circular dependency to run tests:
2226 ;; Tests need pyautogui, which depends on pymsgbox.
2227 '(#:tests? #f))
2228 (build-system python-build-system)
2229 (home-page "https://github.com/asweigart/PyMsgBox")
2230 (synopsis "Python module for JavaScript-like message boxes")
2231 (description
2232 "PyMsgBox is a simple, cross-platform, pure Python module for
2233 JavaScript-like message boxes. Types of dialog boxes include:
2234 @enumerate
2235 @item alert
2236 @item confirm
2237 @item prompt
2238 @item password
2239 @end enumerate
2240 ")
2241 (license license:bsd-3)))
2242
2243 (define-public python-pympler
2244 (package
2245 (name "python-pympler")
2246 (home-page "https://pythonhosted.org/Pympler/")
2247 (version "0.7")
2248 (source (origin
2249 (method url-fetch)
2250 (uri (pypi-uri "Pympler" version))
2251 (sha256
2252 (base32
2253 "0ki7bqp1h9l1xc2k1h4vjyzsgs20i8ingvcdhszyi72s28wyf4bs"))))
2254 (build-system python-build-system)
2255 (arguments
2256 `(#:phases (modify-phases %standard-phases
2257 (delete 'check)
2258 (add-after 'install 'check
2259 (lambda* (#:key inputs outputs #:allow-other-keys)
2260 (add-installed-pythonpath inputs outputs)
2261 (invoke "python" "setup.py" "test"))))))
2262 (synopsis "Measure, monitor and analyze memory behavior")
2263 (description
2264 "Pympler is a development tool to measure, monitor and analyze
2265 the memory behavior of Python objects in a running Python application.
2266
2267 By pympling a Python application, detailed insight in the size and the
2268 lifetime of Python objects can be obtained. Undesirable or unexpected
2269 runtime behavior like memory bloat and other @samp{pymples} can easily
2270 be identified.
2271
2272 A web profiling frontend exposes process statistics, garbage
2273 visualisation and class tracker statistics.")
2274 (license license:asl2.0)))
2275
2276 (define-public python2-pympler
2277 (package-with-python2 python-pympler))
2278
2279 (define-public python-itsdangerous
2280 (package
2281 (name "python-itsdangerous")
2282 (version "1.1.0")
2283 (source
2284 (origin
2285 (method url-fetch)
2286 (uri (pypi-uri "itsdangerous" version))
2287 (sha256
2288 (base32
2289 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
2290 (build-system python-build-system)
2291 (home-page "https://palletsprojects.com/p/itsdangerous/")
2292 (synopsis "Python library for passing data to/from untrusted environments")
2293 (description
2294 "Itsdangerous provides various helpers to pass trusted data to untrusted
2295 environments and back.")
2296 (license license:bsd-3)))
2297
2298 (define-public python2-itsdangerous
2299 (package-with-python2 python-itsdangerous))
2300
2301 (define-public python-pyyaml
2302 (package
2303 (name "python-pyyaml")
2304 (version "3.13")
2305 (source
2306 (origin
2307 (method url-fetch)
2308 (uri (pypi-uri "PyYAML" version))
2309 (sha256
2310 (base32
2311 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2312 (build-system python-build-system)
2313 (inputs
2314 `(("libyaml" ,libyaml)))
2315 (home-page "http://pyyaml.org/wiki/PyYAML")
2316 (synopsis "YAML parser and emitter for Python")
2317 (description
2318 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2319 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2320 API, and sensible error messages. PyYAML supports standard YAML tags and
2321 provides Python-specific tags that allow to represent an arbitrary Python
2322 object.")
2323 (license license:expat)))
2324
2325 (define-public python2-pyyaml
2326 (package-with-python2 python-pyyaml))
2327
2328 (define-public python-vine
2329 (package
2330 (name "python-vine")
2331 (version "1.1.4")
2332 (source
2333 (origin
2334 (method url-fetch)
2335 (uri (pypi-uri "vine" version))
2336 (sha256
2337 (base32
2338 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2339 (build-system python-build-system)
2340 (native-inputs
2341 `(("python-pytest" ,python-pytest)
2342 ("python-case" ,python-case)))
2343 (home-page "https://github.com/celery/vine")
2344 (synopsis "Promises for Python")
2345 (description
2346 "@code{vine} provides a special implementation of promises in that it can
2347 be used both for \"promise of a value\" and lazy evaluation. The biggest
2348 upside for this is that everything in a promise can also be a promise,
2349 e.g. filters, callbacks and errbacks can all be promises.")
2350 (license license:bsd-3)))
2351
2352 (define-public python-virtualenv
2353 (package
2354 (name "python-virtualenv")
2355 (version "16.1.0")
2356 (source
2357 (origin
2358 (method url-fetch)
2359 (uri (pypi-uri "virtualenv" version))
2360 (sha256
2361 (base32
2362 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
2363 (build-system python-build-system)
2364 (arguments
2365 `(#:phases
2366 (modify-phases %standard-phases
2367 (add-before 'check 'disable-failing-test
2368 (lambda _
2369 ;; Disable failing test. See upstream bug report
2370 ;; https://github.com/pypa/virtualenv/issues/957
2371 (substitute* "tests/test_virtualenv.py"
2372 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2373 #t)))))
2374 (native-inputs
2375 `(("python-mock" ,python-mock)
2376 ("python-pytest" ,python-pytest)))
2377 (home-page "https://virtualenv.pypa.io/")
2378 (synopsis "Virtual Python environment builder")
2379 (description
2380 "Virtualenv is a tool to create isolated Python environments.")
2381 (license license:expat)))
2382
2383 (define-public python2-virtualenv
2384 (package-with-python2 python-virtualenv))
2385
2386 (define-public python-markupsafe
2387 (package
2388 (name "python-markupsafe")
2389 (version "1.1.1")
2390 (source
2391 (origin
2392 (method url-fetch)
2393 (uri (pypi-uri "MarkupSafe" version))
2394 (sha256
2395 (base32
2396 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
2397 (build-system python-build-system)
2398 (arguments
2399 `(#:modules ((ice-9 ftw)
2400 (srfi srfi-1)
2401 (srfi srfi-26)
2402 (guix build utils)
2403 (guix build python-build-system))
2404 #:phases (modify-phases %standard-phases
2405 (replace 'check
2406 (lambda _
2407 (let ((cwd (getcwd))
2408 (libdir (find (cut string-prefix? "lib." <>)
2409 (scandir "build"))))
2410 (setenv "PYTHONPATH"
2411 (string-append cwd "/build/" libdir ":"
2412 (getenv "PYTHONPATH")))
2413 (invoke "pytest" "-vv")))))))
2414 (native-inputs
2415 `(("python-pytest" ,python-pytest)))
2416 (home-page "https://github.com/mitsuhiko/markupsafe")
2417 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2418 (description
2419 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2420 for Python.")
2421 (license license:bsd-3)))
2422
2423 (define-public python2-markupsafe
2424 (package-with-python2 python-markupsafe))
2425
2426 (define-public python-jinja2
2427 (package
2428 (name "python-jinja2")
2429 (version "2.10.1")
2430 (source
2431 (origin
2432 (method url-fetch)
2433 (uri (pypi-uri "Jinja2" version))
2434 (sha256
2435 (base32
2436 "04shqrs56aj04ipyqykj512rw2l0zfammvj9krawzxz7xc14yp06"))))
2437 (build-system python-build-system)
2438 (propagated-inputs
2439 `(("python-markupsafe" ,python-markupsafe)))
2440 (home-page "http://jinja.pocoo.org/")
2441 (synopsis "Python template engine")
2442 (description
2443 "Jinja2 is a small but fast and easy to use stand-alone template engine
2444 written in pure Python.")
2445 (license license:bsd-3)))
2446
2447 (define-public python2-jinja2
2448 (package-with-python2 python-jinja2))
2449
2450 (define-public python-jinja2-time
2451 (package
2452 (name "python-jinja2-time")
2453 (version "0.2.0")
2454 (source
2455 (origin
2456 (method url-fetch)
2457 (uri (pypi-uri "jinja2-time" version))
2458 (sha256
2459 (base32
2460 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
2461 (build-system python-build-system)
2462 (propagated-inputs
2463 `(("python-arrow" ,python-arrow)
2464 ("python-jinja2" ,python-jinja2)))
2465 (home-page
2466 "https://github.com/hackebrot/jinja2-time")
2467 (synopsis "Jinja2 Extension for Dates and Times")
2468 (description
2469 "This package provides an extension for the template engine Jinja2. It
2470 adds a 'now' tag providing a convenient access to the arrow.now() API from
2471 templates. A format string can be provided to control the output.")
2472 (license license:expat)))
2473
2474 (define-public python-pystache
2475 (package
2476 (name "python-pystache")
2477 (version "0.5.4")
2478 (source (origin
2479 (method url-fetch)
2480 (uri (pypi-uri "pystache" version))
2481 (sha256
2482 (base32
2483 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2484 (build-system python-build-system)
2485 (arguments
2486 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2487 (home-page "http://defunkt.io/pystache/")
2488 (synopsis "Python logic-less template engine")
2489 (description
2490 "Pystache is a Python implementation of the framework agnostic,
2491 logic-free templating system Mustache.")
2492 (license license:expat)
2493 (properties `((python2-variant . ,(delay python2-pystache))))))
2494
2495 (define-public python2-pystache
2496 (package (inherit (package-with-python2
2497 (strip-python2-variant python-pystache)))
2498 (arguments
2499 `(#:python ,python-2
2500 #:phases
2501 (modify-phases %standard-phases
2502 (replace 'check
2503 (lambda _
2504 (invoke "python" "test_pystache.py"))))))))
2505
2506 (define-public python-joblib
2507 (package
2508 (name "python-joblib")
2509 (version "0.13.0")
2510 (source (origin
2511 (method url-fetch)
2512 (uri (pypi-uri "joblib" version))
2513 (sha256
2514 (base32
2515 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2516 (build-system python-build-system)
2517 (arguments
2518 `(#:phases
2519 (modify-phases %standard-phases
2520 (replace 'check
2521 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2522 (native-inputs
2523 `(("python-pytest" ,python-pytest)))
2524 (home-page "https://joblib.readthedocs.io/")
2525 (synopsis "Using Python functions as pipeline jobs")
2526 (description
2527 "Joblib is a set of tools to provide lightweight pipelining in Python.
2528 In particular, joblib offers: transparent disk-caching of the output values
2529 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2530 logging and tracing of the execution.")
2531 (license license:bsd-3)))
2532
2533 (define-public python2-joblib
2534 (package-with-python2 python-joblib))
2535
2536 (define-public python-daemon
2537 (package
2538 (name "python-daemon")
2539 (version "2.2.3")
2540 (source
2541 (origin
2542 (method url-fetch)
2543 (uri (pypi-uri "python-daemon" version))
2544 (sha256
2545 (base32
2546 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2547 (build-system python-build-system)
2548 (arguments
2549 `(#:phases
2550 (modify-phases %standard-phases
2551 (add-before 'check 'disable-tests
2552 (lambda _
2553 ;; FIXME: Determine why test fails
2554 (substitute* "test/test_daemon.py"
2555 (("test_detaches_process_context")
2556 "skip_test_detaches_process_context"))
2557 #t)))))
2558 (propagated-inputs
2559 `(("python-lockfile" ,python-lockfile)))
2560 (native-inputs
2561 `(("python-unittest2" ,python-unittest2)
2562 ("python-testtools" ,python-testtools)
2563 ("python-testscenarios" ,python-testscenarios)
2564 ("python-mock" ,python-mock)
2565 ("python-docutils" ,python-docutils)))
2566 (home-page "https://pagure.io/python-daemon/")
2567 (synopsis "Python library for making a Unix daemon process")
2568 (description "Python-daemon is a library that assists a Python program to
2569 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2570
2571 This library provides a @code{DaemonContext} class that manages the following
2572 important tasks for becoming a daemon process:
2573 @enumerate
2574 @item Detach the process into its own process group.
2575 @item Set process environment appropriate for running inside a chroot.
2576 @item Renounce suid and sgid privileges.
2577 @item Close all open file descriptors.
2578 @item Change the working directory, uid, gid, and umask.
2579 @item Set appropriate signal handlers.
2580 @item Open new file descriptors for stdin, stdout, and stderr.
2581 @item Manage a specified PID lock file.
2582 @item Register cleanup functions for at-exit processing.
2583 @end enumerate")
2584 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2585 (license (list license:asl2.0 license:gpl3+))))
2586
2587 (define-public python-docutils
2588 (package
2589 (name "python-docutils")
2590 (version "0.14")
2591 (source
2592 (origin
2593 (method url-fetch)
2594 (uri (pypi-uri "docutils" version))
2595 (sha256
2596 (base32
2597 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2598 (build-system python-build-system)
2599 (arguments
2600 '(#:tests? #f)) ; no setup.py test command
2601 (home-page "http://docutils.sourceforge.net/")
2602 (synopsis "Python Documentation Utilities")
2603 (description
2604 "Docutils is a modular system for processing documentation into useful
2605 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2606 reStructuredText.")
2607 ;; Most of the source code is public domain, but some source files are
2608 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2609 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2610
2611 (define-public python2-docutils
2612 (package-with-python2 python-docutils))
2613
2614 (define-public python-pygments
2615 (package
2616 (name "python-pygments")
2617 (version "2.4.2")
2618 (source
2619 (origin
2620 (method url-fetch)
2621 (uri (pypi-uri "Pygments" version))
2622 (sha256
2623 (base32
2624 "15v2sqm5g12bqa0c7wikfh9ck2nl97ayizy1hpqhmws5gqalq748"))))
2625 (build-system python-build-system)
2626 (arguments
2627 ;; FIXME: Tests require sphinx, which depends on this.
2628 '(#:tests? #f))
2629 (home-page "http://pygments.org/")
2630 (synopsis "Syntax highlighting")
2631 (description
2632 "Pygments is a syntax highlighting package written in Python.")
2633 (license license:bsd-2)))
2634
2635 (define-public python2-pygments
2636 (package-with-python2 python-pygments))
2637
2638 (define-public python-bumpversion
2639 (package
2640 (name "python-bumpversion")
2641 (version "0.5.3")
2642 (source
2643 (origin
2644 (method url-fetch)
2645 (uri (pypi-uri "bumpversion" version))
2646 (sha256
2647 (base32
2648 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
2649 (build-system python-build-system)
2650 (home-page "https://github.com/peritus/bumpversion")
2651 (synopsis "Tool to bump software version")
2652 (description "This tool provides a command-line interface (CLI) to bump a
2653 software version simply.")
2654 (license license:expat)))
2655
2656 (define-public python-deprecated
2657 (package
2658 (name "python-deprecated")
2659 (version "1.2.5")
2660 (source
2661 (origin
2662 (method git-fetch)
2663 (uri (git-reference
2664 (url "https://github.com/tantale/deprecated.git")
2665 (commit (string-append "v" version))))
2666 (file-name (git-file-name name version))
2667 (sha256
2668 (base32
2669 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
2670 (build-system python-build-system)
2671 (arguments
2672 `(#:phases (modify-phases %standard-phases
2673 (replace 'check
2674 (lambda _
2675 (invoke "pytest"))))))
2676 (propagated-inputs
2677 `(("python-wrapt" ,python-wrapt)))
2678 (native-inputs
2679 `(("python-bumpversion" ,python-bumpversion)
2680 ("python-pytest" ,python-pytest)
2681 ("python-pytest-cov" ,python-pytest-cov)
2682 ("python-sphinx" ,python-sphinx)
2683 ("python-tox" ,python-tox)))
2684 (home-page "https://github.com/tantale/deprecated")
2685 (synopsis "Python decorator to deprecate classes, functions or methods")
2686 (description "The @code{deprecated} decorator provides a convenient way to deprecate
2687 to deprecate classes, functions or methods.")
2688 (license license:expat)))
2689
2690 (define-public python-pygithub
2691 (package
2692 (name "python-pygithub")
2693 (version "1.43.8")
2694 (source
2695 ;; We fetch from the Git repo because there are no tests in the PyPI
2696 ;; archive.
2697 (origin
2698 (method git-fetch)
2699 (uri (git-reference
2700 (url "https://github.com/PyGithub/PyGithub.git")
2701 (commit (string-append "v" version))))
2702 (file-name (git-file-name name version))
2703 (sha256
2704 (base32 "1625v558xga5mwhl9jqmibywy5qafmg1vqrirqz6zfq1la1d22mw"))))
2705 (build-system python-build-system)
2706 (arguments
2707 `(#:phases (modify-phases %standard-phases
2708 ;; Some tests rely on the network.
2709 (add-after 'unpack 'disable-failing-tests
2710 (lambda _
2711 (substitute* "tests/Issue142.py"
2712 (("testDecodeJson") "disabled_testDecodeJson"))
2713 #t))
2714 (add-before 'check 'prepare-for-tests
2715 (lambda _
2716 (for-each (lambda (f)
2717 (chmod f #o666))
2718 (find-files "./tests"))
2719 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
2720 (setenv "PYTHONPATH"
2721 (string-append "./tests:" (getenv "PYTHONPATH")))
2722 #t)))))
2723 (propagated-inputs
2724 `(("python-deprecated" ,python-deprecated)
2725 ("python-pyjwt" ,python-pyjwt)
2726 ("python-requests" ,python-requests)))
2727 (native-inputs `(("python-httpretty" ,python-httpretty)))
2728 (home-page "https://pygithub.readthedocs.io/en/latest/")
2729 (synopsis "Python library for the GitHub API")
2730 (description "This library allows managing GitHub resources such as
2731 repositories, user profiles, and organizations in your Python applications,
2732 using version 3 of the GitHub application programming interface (API).")
2733 (license license:lgpl3+)))
2734
2735 (define-public python-rellu
2736 (package
2737 (name "python-rellu")
2738 (version "0.7")
2739 (source
2740 (origin
2741 (method url-fetch)
2742 (uri (pypi-uri "rellu" version))
2743 (sha256
2744 (base32
2745 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
2746 (build-system python-build-system)
2747 (propagated-inputs
2748 `(("python-invoke" ,python-invoke)
2749 ("python-pygithub" ,python-pygithub)))
2750 (home-page "https://github.com/robotframework/rellu")
2751 (synopsis "Utilities to create PyPI releases")
2752 (description "This collection of utilities contains tooling and templates
2753 to assist in creating releases on GitHub and publishing them on PyPI. It is
2754 designed to be used by Robot Framework and tools and libraries in its
2755 ecosystem, but can naturally be used also by other projects.")
2756 (license license:asl2.0)))
2757
2758 (define-public python-robotframework
2759 (package
2760 (name "python-robotframework")
2761 (version "3.1.2")
2762 ;; There are no tests in the PyPI archive.
2763 (source
2764 (origin
2765 (method git-fetch)
2766 (uri (git-reference
2767 (url "https://github.com/robotframework/robotframework.git")
2768 (commit (string-append "v" version))))
2769 (file-name (git-file-name name version))
2770 (sha256
2771 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
2772 (patches (search-patches
2773 "python-robotframework-honor-source-date-epoch.patch"))))
2774 (build-system python-build-system)
2775 (arguments
2776 `(#:phases (modify-phases %standard-phases
2777 (add-before 'build 'build-and-install-doc
2778 (lambda* (#:key outputs #:allow-other-keys)
2779 (let* ((doc-output (assoc-ref outputs "doc"))
2780 (doc (string-append doc-output "/share/"
2781 ,name "-" ,version "/")))
2782 (invoke "invoke" "library-docs" "all")
2783 (mkdir-p doc)
2784 (copy-recursively "doc/libraries"
2785 (string-append doc "/libraries"))
2786 #t)))
2787 (replace 'check
2788 (lambda _
2789 (invoke "python" "utest/run.py"))))))
2790 (native-inputs
2791 `(("python-invoke" ,python-invoke)
2792 ("python-rellu" ,python-rellu)
2793 ("python:tk" ,python "tk"))) ;used when building the HTML doc
2794 (outputs '("out" "doc"))
2795 (home-page "https://robotframework.org")
2796 (synopsis "Generic automation framework")
2797 (description "Robot Framework is a generic automation framework for
2798 acceptance testing, acceptance test driven development (ATDD), and robotic
2799 process automation (RPA).")
2800 (license license:asl2.0)))
2801
2802 (define-public python-robotframework-lint
2803 ;; There is no properly tagged release; the commit below seems to correspond
2804 ;; to the 0.9 stable release available from PyPI. The tests are not
2805 ;; included in the PyPI archive, so we fetch the sources from the upstream
2806 ;; Git repo.
2807 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
2808 (revision "1"))
2809 (package
2810 (name "python-robotframework-lint")
2811 (version (git-version "0.9.0" revision commit))
2812 (source
2813 (origin
2814 (method git-fetch)
2815 (uri (git-reference
2816 (url "https://github.com/boakley/robotframework-lint.git")
2817 (commit commit)))
2818 (file-name (git-file-name name version))
2819 (sha256
2820 (base32
2821 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
2822 (build-system python-build-system)
2823 (arguments
2824 `(#:phases
2825 (modify-phases %standard-phases
2826 (replace 'check
2827 (lambda _
2828 (invoke "python" "-m" "robot" "-A"
2829 "tests/conf/default.args" "tests"))))))
2830 (propagated-inputs
2831 `(("python-robotframework" ,python-robotframework)))
2832 (home-page "https://github.com/boakley/robotframework-lint/")
2833 (synopsis "Static analysis tool (linter) for Robot Framework")
2834 (description "This package provides the @code{rflint} command-line
2835 utility, a static analysis tool (linter) for Robot Framework source files.")
2836 (license license:asl2.0))))
2837
2838 (define-public python-robotframework-sshlibrary
2839 (package
2840 (name "python-robotframework-sshlibrary")
2841 (version "3.3.0")
2842 ;; There are no tests in the PyPI archive.
2843 (source
2844 (origin
2845 (method git-fetch)
2846 (uri (git-reference
2847 (url "https://github.com/robotframework/SSHLibrary.git")
2848 (commit (string-append "v" version))))
2849 (file-name (git-file-name name version))
2850 (sha256
2851 (base32
2852 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
2853 (build-system python-build-system)
2854 (arguments
2855 `(#:phases
2856 (modify-phases %standard-phases
2857 (add-before 'build 'build-and-install-doc
2858 (lambda* (#:key outputs #:allow-other-keys)
2859 (let* ((doc-output (assoc-ref outputs "doc"))
2860 (doc (string-append doc-output "/share/"
2861 ,name "-" ,version "/")))
2862 (invoke "chmod" "-R" "+w" "docs")
2863 (invoke "invoke" "kw-docs" "project-docs")
2864 (mkdir-p doc)
2865 (for-each delete-file (find-files "docs" "\\.rst"))
2866 (copy-recursively "docs" doc)
2867 #t)))
2868 (replace 'check
2869 (lambda _
2870 ;; Some tests require an SSH server; we remove them.
2871 (delete-file "utest/test_client_api.py")
2872 (delete-file "utest/test_scp.py")
2873 (invoke "python" "utest/run.py"))))))
2874 (propagated-inputs
2875 `(("python-robotframework" ,python-robotframework)
2876 ("python-paramiko" ,python-paramiko)
2877 ("python-scp" ,python-scp)))
2878 (native-inputs
2879 `(("openssh" ,openssh)
2880 ("which" ,which)
2881 ;; To generate the documentation
2882 ("python-docutils" ,python-docutils)
2883 ("python-invoke" ,python-invoke)
2884 ("python-pygments" ,python-pygments)
2885 ("python-rellu" ,python-rellu)))
2886 (outputs '("out" "doc"))
2887 (home-page "https://github.com/robotframework/SSHLibrary")
2888 (synopsis "Robot Framework library for SSH and SFTP")
2889 (description "SSHLibrary is a Robot Framework library providing support
2890 for SSH and SFTP. It has the following main usages:
2891 @itemize @bullet
2892 @item Executing commands on the remote machine, either blocking or non-blocking.
2893 @item Writing and reading in an interactive shell.
2894 @item Transferring files and directories over SFTP.
2895 @item Ensuring that files and directories exist on the remote machine.
2896 @end itemize")
2897 (license license:asl2.0)))
2898
2899 (define-public python-scp
2900 (package
2901 (name "python-scp")
2902 (version "0.13.2")
2903 (source
2904 (origin
2905 (method url-fetch)
2906 (uri (pypi-uri "scp" version))
2907 (sha256
2908 (base32
2909 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
2910 (build-system python-build-system)
2911 (arguments
2912 '(#:tests? #f)) ;tests require an SSH server
2913 (propagated-inputs
2914 `(("python-paramiko" ,python-paramiko)))
2915 (home-page "https://github.com/jbardin/scp.py")
2916 (synopsis "SCP protocol module for Python and Paramiko")
2917 (description "The scp module extends the Paramiko library to send and
2918 receive files via the SCP1 protocol, as implemented by the OpenSSH
2919 @command{scp} program.")
2920 (license license:gpl2+)))
2921
2922 (define-public python-rst.linker
2923 (package
2924 (name "python-rst.linker")
2925 (version "1.11")
2926 (source
2927 (origin
2928 (method url-fetch)
2929 (uri (pypi-uri "rst.linker" version))
2930 (sha256
2931 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
2932 (build-system python-build-system)
2933 (propagated-inputs
2934 `(("python-dateutil" ,python-dateutil)
2935 ("python-six" ,python-six)))
2936 (native-inputs
2937 `(("python-setuptools-scm" ,python-setuptools-scm)))
2938 ;; Test would require path.py, which would introduce a cyclic dependence.
2939 (arguments `(#:tests? #f))
2940 ;; Note: As of version 1.7 the documentation is not worth building.
2941 (home-page "https://github.com/jaraco/rst.linker")
2942 (synopsis "Sphinx plugin to add links and timestamps")
2943 (description "rst.linker allows to automatically replace text by a
2944 reStructuredText external reference or timestamps. It's primary purpose is to
2945 augment the changelog, but it can be used for other documents, too.")
2946 (license license:expat)))
2947
2948 (define-public python2-rst.linker
2949 (package-with-python2 python-rst.linker))
2950
2951 (define-public python-feedgenerator
2952 (package
2953 (name "python-feedgenerator")
2954 (version "1.9")
2955 (source
2956 (origin
2957 (method url-fetch)
2958 (uri (pypi-uri "feedgenerator" version))
2959 (sha256
2960 (base32
2961 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2962 (modules '((guix build utils)))
2963 (snippet
2964 '(begin
2965 ;; Remove pre-compiled .pyc files from source.
2966 (for-each delete-file-recursively
2967 (find-files "." "__pycache__" #:directories? #t))
2968 (for-each delete-file (find-files "." "\\.pyc$"))
2969 #t))))
2970 (build-system python-build-system)
2971 (propagated-inputs
2972 `(("python-pytz" ,python-pytz)
2973 ("python-six" ,python-six)))
2974 (home-page "https://github.com/getpelican/feedgenerator")
2975 (synopsis
2976 "Standalone version of Django's Atom/RSS feed generator")
2977 (description
2978 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2979 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2980 (license license:bsd-3)))
2981
2982 (define-public python2-feedgenerator
2983 (package-with-python2 python-feedgenerator))
2984
2985 (define-public python-toml
2986 (package
2987 (name "python-toml")
2988 (version "0.9.4")
2989 (source
2990 (origin
2991 (method url-fetch)
2992 (uri (pypi-uri "toml" version))
2993 (sha256
2994 (base32
2995 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
2996 (build-system python-build-system)
2997 (arguments
2998 `(#:tests? #f)) ;no tests suite in release
2999 (home-page "https://github.com/uiri/toml")
3000 (synopsis "Library for TOML")
3001 (description
3002 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
3003 Language (TOML) configuration files.")
3004 (license license:expat)))
3005
3006 (define-public python-jsonrpc-server
3007 (package
3008 (name "python-jsonrpc-server")
3009 (version "0.1.2")
3010 (source
3011 (origin
3012 (method url-fetch)
3013 (uri (pypi-uri "python-jsonrpc-server" version))
3014 (sha256
3015 (base32
3016 "0m4ykpcdy52x37n1ikysp07j7p8ialcdvvvsrjp3545sn7iiid09"))))
3017 (build-system python-build-system)
3018 (propagated-inputs
3019 `(("python-future" ,python-future)
3020 ("python-mock" ,python-mock)
3021 ("python-pytest" ,python-pytest)))
3022 (home-page
3023 "https://github.com/palantir/python-jsonrpc-server")
3024 (synopsis "JSON RPC 2.0 server library")
3025 (description
3026 "This package provides a JSON RPC 2.0 server library for Python.")
3027 (license license:expat)))
3028
3029 (define-public python-pydocstyle
3030 (package
3031 (name "python-pydocstyle")
3032 (version "3.0.0")
3033 (source
3034 (origin
3035 (method url-fetch)
3036 (uri (pypi-uri "pydocstyle" version))
3037 (sha256
3038 (base32
3039 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
3040 (build-system python-build-system)
3041 (propagated-inputs
3042 `(("python-six" ,python-six)
3043 ("python-snowballstemmer" ,python-snowballstemmer)))
3044 (home-page
3045 "https://github.com/PyCQA/pydocstyle/")
3046 (synopsis "Python docstring style checker")
3047 (description
3048 "This package provides a style checker for the Python Language
3049 Server (PLS).")
3050 (license license:expat)))
3051
3052 (define-public python-language-server
3053 (package
3054 (name "python-language-server")
3055 (version "0.29.1")
3056 (source
3057 (origin
3058 (method url-fetch)
3059 (uri (pypi-uri "python-language-server" version))
3060 (sha256
3061 (base32
3062 "1f8qlflh6j3s7qfmzhirpl8fgidl6f0qbakdmiml96wdxzvka0s3"))))
3063 (build-system python-build-system)
3064 (propagated-inputs
3065 `(("python-pluggy" ,python-pluggy)
3066 ("python-jsonrpc-server" ,python-jsonrpc-server)
3067 ("python-jedi" ,python-jedi)
3068 ("python-yapf" ,python-yapf)
3069 ("python-pyflakes" ,python-pyflakes)
3070 ("python-pydocstyle" ,python-pydocstyle)
3071 ("python-pycodestyle" ,python-pycodestyle)
3072 ("python-mccabe" ,python-mccabe)
3073 ("python-rope" ,python-rope)
3074 ("python-autopep8" ,python-autopep8)
3075 ("python-flake8" ,python-flake8)
3076 ("python-pylint" ,python-pylint)))
3077 (home-page "https://github.com/palantir/python-language-server")
3078 (synopsis "Python implementation of the Language Server Protocol")
3079 (description
3080 "The Python Language Server (pyls) is an implementation of the Python 3
3081 language specification for the Language Server Protocol (LSP). This tool is
3082 used in text editing environments to provide a complete and integrated
3083 feature-set for programming Python effectively.")
3084 (license license:expat)))
3085
3086 (define-public python-black
3087 (package
3088 (name "python-black")
3089 (version "18.6b4")
3090 (source
3091 (origin
3092 (method url-fetch)
3093 (uri (pypi-uri "black" version))
3094 (sha256
3095 (base32
3096 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
3097 (build-system python-build-system)
3098 (arguments
3099 `(#:phases
3100 (modify-phases %standard-phases
3101 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3102 (lambda _
3103 (let ((python3 (which "python3")))
3104 (substitute* '("tests/data/fmtonoff.py"
3105 "tests/data/string_prefixes.py"
3106 "tests/data/function.py")
3107 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3108 (string-append "#!" python3 (if (string? minor-version)
3109 minor-version
3110 ""))))))))))
3111 (propagated-inputs
3112 `(("python-click" ,python-click)
3113 ("python-attrs" ,python-attrs)
3114 ("python-appdirs" ,python-appdirs)
3115 ("python-toml" ,python-toml)))
3116 (home-page "https://github.com/ambv/black")
3117 (synopsis "The uncompromising code formatter")
3118 (description "Black is the uncompromising Python code formatter.")
3119 (license license:expat)))
3120
3121 (define-public python-blinker
3122 (package
3123 (name "python-blinker")
3124 (version "1.4")
3125 (source
3126 (origin
3127 (method url-fetch)
3128 (uri (pypi-uri "blinker" version))
3129 (sha256
3130 (base32
3131 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3132 (build-system python-build-system)
3133 (home-page "http://pythonhosted.org/blinker/")
3134 (synopsis "Fast, simple object-to-object and broadcast signaling")
3135 (description
3136 "Blinker provides a fast dispatching system that allows any number of
3137 interested parties to subscribe to events, or \"signals\".")
3138 (license license:expat)))
3139
3140 (define-public python2-blinker
3141 (package-with-python2 python-blinker))
3142
3143 (define-public pelican
3144 (package
3145 (name "pelican")
3146 (version "4.0.1")
3147 (source
3148 (origin
3149 (method url-fetch)
3150 (uri (pypi-uri "pelican" version))
3151 (sha256
3152 (base32
3153 "05yda7n6r0ll18fpdjzkzyr0ls8hbb86fnjyb33k9jvv5avah2lr"))))
3154 (build-system python-build-system)
3155 (propagated-inputs
3156 `(("python-feedgenerator" ,python-feedgenerator)
3157 ("python-jinja2" ,python-jinja2)
3158 ("python-pygments" ,python-pygments)
3159 ("python-docutils" ,python-docutils)
3160 ("python-pytz" ,python-pytz)
3161 ("python-blinker" ,python-blinker)
3162 ("python-unidecode" ,python-unidecode)
3163 ("python-six" ,python-six)
3164 ("python-dateutil" ,python-dateutil)
3165 ("python-markdown" ,python-markdown)))
3166 (home-page "https://getpelican.com/")
3167 (arguments
3168 `(;; XXX Requires a lot more packages to do unit tests :P
3169 #:tests? #f
3170 #:phases (modify-phases %standard-phases
3171 (add-before
3172 'install 'adjust-requires
3173 ;; Since feedgenerator is installed from git, it doesn't
3174 ;; conform to the version requirements.
3175 ;;
3176 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3177 ;; version requirement so setuptools doesn't get confused.
3178 (lambda _
3179 (substitute* "setup.py"
3180 (("['\"]feedgenerator.*?['\"]")
3181 "'feedgenerator'")))))))
3182 (synopsis "Python-based static site publishing system")
3183 (description
3184 "Pelican is a tool to generate a static blog from reStructuredText,
3185 Markdown input files, and more. Pelican uses Jinja2 for templating
3186 and is very extensible.")
3187 (license license:agpl3+)))
3188
3189 (define-public mallard-ducktype
3190 (package
3191 (name "mallard-ducktype")
3192 (version "1.0.2")
3193 (source
3194 (origin
3195 (method git-fetch)
3196 ;; git-reference because tests are not included in pypi source tarball
3197 ;; https://issues.guix.gnu.org/issue/36755#2
3198 (uri (git-reference
3199 (url "https://github.com/projectmallard/mallard-ducktype.git")
3200 (commit version)))
3201 (file-name (git-file-name name version))
3202 (sha256
3203 (base32
3204 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
3205 (build-system python-build-system)
3206 (arguments
3207 '(#:phases
3208 (modify-phases %standard-phases
3209 (replace 'check
3210 (lambda _
3211 (with-directory-excursion "tests"
3212 (invoke "sh" "runtests")))))))
3213 (home-page "http://projectmallard.org")
3214 (synopsis "Convert Ducktype to Mallard documentation markup")
3215 (description
3216 "Ducktype is a lightweight syntax that can represent all the semantics
3217 of the Mallard XML documentation system. Ducktype files can be converted to
3218 Mallard using the @command{ducktype} tool. The yelp-tools package
3219 provides additional functionality on the produced Mallard documents.")
3220 (license license:expat)))
3221
3222 (define-public python-cython
3223 (package
3224 (name "python-cython")
3225 (version "0.29.13")
3226 (source
3227 (origin
3228 (method url-fetch)
3229 (uri (pypi-uri "Cython" version))
3230 (sha256
3231 (base32
3232 "13k37lrcgagwwnzr5bzririsscb793vndj234d475x1h9ad0d7f2"))))
3233 (build-system python-build-system)
3234 ;; we need the full python package and not just the python-wrapper
3235 ;; because we need libpython3.3m.so
3236 (inputs
3237 `(("python" ,python)))
3238 (arguments
3239 `(#:phases
3240 (modify-phases %standard-phases
3241 (add-before 'check 'set-HOME
3242 ;; some tests require access to "$HOME/.cython"
3243 (lambda _ (setenv "HOME" "/tmp") #t))
3244
3245 ;; FIXME: These tests started failing on armhf after the 0.28 update
3246 ;; (commit c69d11c5930), both with an error such as this:
3247 ;; compiling (cpp) and running dictcomp ...
3248 ;; === C/C++ compiler error output: ===
3249 ;; ‘
3250 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
3251 ;; See <https://hydra.gnu.org/build/2948724> for logs.
3252 ,@(if (target-arm32?)
3253 `((add-before 'check 'disable-failing-tests
3254 (lambda _
3255 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
3256 (for-each (lambda (test)
3257 (format disabled-tests "~a\n" test))
3258 '("memslice" "dictcomp"))
3259 (close-port disabled-tests)))))
3260 '())
3261
3262 (replace 'check
3263 (lambda _
3264 ;; Disable compiler optimizations to greatly reduce the running
3265 ;; time of the test suite.
3266 (setenv "CFLAGS" "-O0")
3267
3268 (invoke "python" "runtests.py" "-vv"
3269 "-j" (number->string (parallel-job-count))))))))
3270 (home-page "https://cython.org/")
3271 (synopsis "C extensions for Python")
3272 (description "Cython is an optimising static compiler for both the Python
3273 programming language and the extended Cython programming language. It makes
3274 writing C extensions for Python as easy as Python itself.")
3275 (license license:asl2.0)
3276 (properties `((python2-variant . ,(delay python2-cython))))))
3277
3278 (define-public python2-cython
3279 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
3280 (package
3281 (inherit base)
3282 (name "python2-cython")
3283 (inputs
3284 `(("python-2" ,python-2))) ;this is not automatically changed
3285 (arguments
3286 (substitute-keyword-arguments (package-arguments base)
3287 ((#:phases phases)
3288 `(modify-phases ,phases
3289 (add-before 'check 'adjust-test_embed
3290 (lambda _
3291 (substitute* "runtests.py"
3292 ;; test_embed goes great lengths to find the static libpythonX.Y.a
3293 ;; so it can give the right -L flag to GCC when embedding static
3294 ;; builds of Python. It is unaware that the Python "config"
3295 ;; directory (where the static library lives) was renamed in
3296 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
3297 ;; which works fine, because that is where the shared library is.
3298 ;;
3299 ;; It also appears to be unaware that the Makefile in Demos/embed
3300 ;; already unconditionally pass the static library location to GCC,
3301 ;; after checking sysconfig.get_config_var('LIBPL).
3302 ;;
3303 ;; The effect is that the linker is unable to resolve libexpat
3304 ;; symbols when building for Python 2, because neither the Python 2
3305 ;; shared library nor Expat is available. To fix it, we can either
3306 ;; add Expat as an input and make it visible to the linker, or just
3307 ;; prevent it from overriding the Python shared library location.
3308 ;; The end result is identical, so we take the easy route.
3309 ((" or libname not in os\\.listdir\\(libdir\\)")
3310 ""))
3311 #t)))))))))
3312
3313 ;; The RPython toolchain currently does not support Python 3.
3314 (define-public python2-rpython
3315 (package
3316 (name "python2-rpython")
3317 (version "0.2.1")
3318 (source
3319 (origin
3320 (method url-fetch)
3321 (uri (pypi-uri "rpython" version))
3322 (sha256
3323 (base32
3324 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3325 (build-system python-build-system)
3326 (arguments `(#:python ,python-2))
3327 (native-inputs
3328 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3329 (home-page "https://rpython.readthedocs.org")
3330 (synopsis "Framework for implementing interpreters and virtual machines")
3331 (description "RPython is a translation and support framework for
3332 producing implementations of dynamic languages, emphasizing a clean separation
3333 between language specification and implementation aspects.")
3334 (license license:expat)))
3335
3336 ;; NOTE: when upgrading numpy please make sure that python-pandas and
3337 ;; python-scipy still build, as these three packages are often used together.
3338 (define-public python-numpy
3339 (package
3340 (name "python-numpy")
3341 (version "1.17.3")
3342 (source
3343 (origin
3344 (method url-fetch)
3345 (uri (string-append
3346 "https://github.com/numpy/numpy/releases/download/v"
3347 version "/numpy-" version ".tar.gz"))
3348 (sha256
3349 (base32
3350 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
3351 (build-system python-build-system)
3352 (inputs
3353 `(("openblas" ,openblas)
3354 ("lapack" ,lapack)))
3355 (native-inputs
3356 `(("python-cython" ,python-cython)
3357 ("python-pytest" ,python-pytest)
3358 ("gfortran" ,gfortran)))
3359 (arguments
3360 `(#:phases
3361 (modify-phases %standard-phases
3362 (add-before 'build 'configure-blas-lapack
3363 (lambda* (#:key inputs #:allow-other-keys)
3364 (call-with-output-file "site.cfg"
3365 (lambda (port)
3366 (format port
3367 "[openblas]
3368 libraries = openblas
3369 library_dirs = ~a/lib
3370 include_dirs = ~a/include
3371
3372 # backslash-n to make emacs happy
3373 \n[lapack]
3374 lapack_libs = lapack
3375 library_dirs = ~a/lib
3376 include_dirs = ~a/include
3377 "
3378 (assoc-ref inputs "openblas")
3379 (assoc-ref inputs "openblas")
3380 (assoc-ref inputs "lapack")
3381 (assoc-ref inputs "lapack"))))
3382 #t))
3383 (add-before 'build 'fix-executable-paths
3384 (lambda* (#:key inputs #:allow-other-keys)
3385 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3386 ;; instead of /bin/sh.
3387 (substitute* "numpy/distutils/exec_command.py"
3388 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3389 (string-append match-start (assoc-ref inputs "bash") match-end)))
3390 ;; Use "gcc" executable, not "cc".
3391 (substitute* "numpy/distutils/system_info.py"
3392 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3393 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3394 #t))
3395 ;; Tests can only be run after the library has been installed and not
3396 ;; within the source directory.
3397 (delete 'check)
3398 (add-after 'install 'check
3399 (lambda* (#:key outputs inputs #:allow-other-keys)
3400 ;; Make installed package available for running the tests
3401 (add-installed-pythonpath inputs outputs)
3402 ;; Make sure "f2py" etc is found.
3403 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3404 ":" (getenv "PATH")))
3405 (with-directory-excursion "/tmp"
3406 (invoke "python" "-c"
3407 "import numpy; numpy.test(verbose=2)")))))))
3408 (home-page "http://www.numpy.org/")
3409 (synopsis "Fundamental package for scientific computing with Python")
3410 (description "NumPy is the fundamental package for scientific computing
3411 with Python. It contains among other things: a powerful N-dimensional array
3412 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3413 and Fortran code, useful linear algebra, Fourier transform, and random number
3414 capabilities.")
3415 (properties `((python2-variant . ,(delay python2-numpy))))
3416 (license license:bsd-3)))
3417
3418 ;; Numpy 1.16.x are the last versions that support Python 2.
3419 (define-public python2-numpy
3420 (let ((numpy (package-with-python2
3421 (strip-python2-variant python-numpy))))
3422 (package/inherit
3423 numpy
3424 (version "1.16.5")
3425 (source (origin
3426 (method url-fetch)
3427 (uri (string-append
3428 "https://github.com/numpy/numpy/releases/download/v"
3429 version "/numpy-" version ".tar.gz"))
3430 (sha256
3431 (base32
3432 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
3433
3434 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3435 ;; interest only for legacy code going back to NumPy's predecessor
3436 ;; Numeric.
3437 (define-public python2-numpy-1.8
3438 (package (inherit python2-numpy)
3439 (version "1.8.2")
3440 (source
3441 (origin
3442 (method url-fetch)
3443 (uri (string-append
3444 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3445 (file-name (string-append "python2-numpy-" version ".tar.gz"))
3446 (sha256
3447 (base32
3448 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
3449 (arguments
3450 (substitute-keyword-arguments (package-arguments python2-numpy)
3451 ((#:phases phases)
3452 `(modify-phases ,phases
3453 (replace 'configure-blas-lapack
3454 (lambda* (#:key inputs #:allow-other-keys)
3455 (call-with-output-file "site.cfg"
3456 (lambda (port)
3457 (format port
3458 "[openblas]
3459 libraries = openblas,lapack
3460 library_dirs = ~a/lib:~a/lib
3461 include_dirs = ~a/include:~a/include
3462 "
3463 (assoc-ref inputs "openblas")
3464 (assoc-ref inputs "lapack")
3465 (assoc-ref inputs "openblas")
3466 (assoc-ref inputs "lapack"))))
3467 #t))))))
3468 (native-inputs
3469 `(("python2-nose" ,python2-nose)))
3470 (description "NumPy is the fundamental package for scientific computing
3471 with Python. It contains among other things: a powerful N-dimensional array
3472 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3473 and Fortran code, useful linear algebra, Fourier transform, and random number
3474 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3475 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3476 Numeric.")
3477 (license license:bsd-3)))
3478
3479 (define-public python-munch
3480 (package
3481 (name "python-munch")
3482 (version "2.0.4")
3483 (source
3484 (origin
3485 (method url-fetch)
3486 (uri (pypi-uri "munch" version))
3487 (sha256
3488 (base32
3489 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3490 (build-system python-build-system)
3491 (home-page "https://github.com/Infinidat/munch")
3492 (synopsis "Dot-accessible dictionary")
3493 (description "Munch is a dot-accessible dictionary similar to JavaScript
3494 objects.")
3495 (license license:expat)))
3496
3497 (define-public python2-munch
3498 (package-with-python2 python-munch))
3499
3500 (define-public python-colormath
3501 (package
3502 (name "python-colormath")
3503 (version "3.0.0")
3504 (source
3505 (origin
3506 (method url-fetch)
3507 (uri (pypi-uri "colormath" version))
3508 (sha256
3509 (base32
3510 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3511 (build-system python-build-system)
3512 (propagated-inputs
3513 `(("python-networkx" ,python-networkx)
3514 ("python-numpy" ,python-numpy)))
3515 (home-page "https://github.com/gtaylor/python-colormath")
3516 (synopsis "Color math and conversion library")
3517 (description
3518 "This is a Python library for color math and conversions.")
3519 (license license:bsd-3)))
3520
3521 (define-public python2-colormath
3522 (package-with-python2 python-colormath))
3523
3524 (define-public python-spectra
3525 (package
3526 (name "python-spectra")
3527 (version "0.0.11")
3528 (source
3529 (origin
3530 (method url-fetch)
3531 (uri (pypi-uri "spectra" version))
3532 (sha256
3533 (base32
3534 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3535 (build-system python-build-system)
3536 (arguments
3537 `(#:phases
3538 (modify-phases %standard-phases
3539 (replace 'check
3540 (lambda _ (invoke "nosetests" "-v"))))))
3541 (propagated-inputs
3542 `(("python-colormath" ,python-colormath)))
3543 (native-inputs
3544 `(("python-nose" ,python-nose)))
3545 (home-page "https://github.com/jsvine/spectra")
3546 (synopsis "Color scales and color conversion")
3547 (description
3548 "This package provides a Python library intended to make color math,
3549 color scales, and color space conversion easy. It has support for:
3550
3551 @enumerate
3552 @item Color scales
3553 @item Color ranges
3554 @item Color blending
3555 @item Brightening/darkening colors
3556 @item Saturating/desaturating colors
3557 @item Conversion to/from multiple color spaces.
3558 @end enumerate\n")
3559 (license license:expat)))
3560
3561 (define-public python2-spectra
3562 (package-with-python2 python-spectra))
3563
3564 (define-public python-numpy-documentation
3565 (package
3566 (name "python-numpy-documentation")
3567 (version (package-version python-numpy))
3568 (source (package-source python-numpy))
3569 (build-system python-build-system)
3570 (native-inputs
3571 `(("python-matplotlib" ,python-matplotlib)
3572 ("python-numpy" ,python-numpy)
3573 ("pkg-config" ,pkg-config)
3574 ("python-sphinx" ,python-sphinx)
3575 ("python-numpydoc" ,python-numpydoc)
3576 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
3577 texlive-fonts-ec
3578 texlive-generic-ifxetex
3579 texlive-generic-pdftex
3580 texlive-amsfonts
3581 texlive-latex-capt-of
3582 texlive-latex-cmap
3583 texlive-latex-environ
3584 texlive-latex-eqparbox
3585 texlive-latex-etoolbox
3586 texlive-latex-expdlist
3587 texlive-latex-fancyhdr
3588 texlive-latex-fancyvrb
3589 texlive-latex-fncychap
3590 texlive-latex-float
3591 texlive-latex-framed
3592 texlive-latex-geometry
3593 texlive-latex-graphics
3594 texlive-latex-hyperref
3595 texlive-latex-mdwtools
3596 texlive-latex-multirow
3597 texlive-latex-needspace
3598 texlive-latex-oberdiek
3599 texlive-latex-parskip
3600 texlive-latex-preview
3601 texlive-latex-tabulary
3602 texlive-latex-threeparttable
3603 texlive-latex-titlesec
3604 texlive-latex-trimspaces
3605 texlive-latex-ucs
3606 texlive-latex-upquote
3607 texlive-latex-url
3608 texlive-latex-varwidth
3609 texlive-latex-wrapfig)))
3610 ("texinfo" ,texinfo)
3611 ("perl" ,perl)
3612 ("scipy-sphinx-theme"
3613 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3614 (method git-fetch)
3615 (uri (git-reference
3616 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3617 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3618 (sha256
3619 (base32
3620 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3621 ,@(package-native-inputs python-numpy)))
3622 (arguments
3623 `(#:tests? #f ; we're only generating the documentation
3624 #:phases
3625 (modify-phases %standard-phases
3626 (delete 'build)
3627 (replace 'install
3628 (lambda* (#:key inputs outputs #:allow-other-keys)
3629 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3630 (doc (string-append
3631 data "/doc/" ,name "-"
3632 ,(package-version python-numpy)))
3633 (info-reader (string-append data "/info"))
3634 (html (string-append doc "/html"))
3635 (scipy-sphinx-theme "scipy-sphinx-theme")
3636 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3637 (pyver ,(string-append "PYVER=")))
3638
3639 ;; FIXME: this is needed to for texlive-union to generate
3640 ;; fonts, which are not found.
3641 (setenv "HOME" "/tmp")
3642
3643 (with-directory-excursion "doc"
3644 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3645 (mkdir-p html)
3646 (invoke "make" "html" pyver)
3647 (invoke "make" "latex" "PAPER=a4" pyver)
3648 (invoke "make" "-C" "build/latex"
3649 "all-pdf" "PAPER=a4" pyver)
3650 ;; FIXME: Generation of the info file fails.
3651 ;; (invoke "make" "info" pyver)
3652 ;; (mkdir-p info)
3653 ;; (copy-file "build/texinfo/numpy.info"
3654 ;; (string-append info "/numpy.info"))
3655 (for-each (lambda (file)
3656 (copy-file (string-append "build/latex" file)
3657 (string-append doc file)))
3658 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3659 (with-directory-excursion "build/html"
3660 (for-each (lambda (file)
3661 (let* ((dir (dirname file))
3662 (tgt-dir (string-append html "/" dir)))
3663 (unless (equal? "." dir)
3664 (mkdir-p tgt-dir))
3665 (install-file file html)))
3666 (find-files "." ".*")))))
3667 #t)))))
3668 (home-page (package-home-page python-numpy))
3669 (synopsis "Documentation for the python-numpy package")
3670 (description (package-description python-numpy))
3671 (license (package-license python-numpy))))
3672
3673 (define-public python2-numpy-documentation
3674 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3675 (package
3676 (inherit numpy-documentation)
3677 (native-inputs `(("python2-functools32" ,python2-functools32)
3678 ,@(package-native-inputs numpy-documentation))))))
3679
3680 (define-public python-pygit2
3681 (package
3682 (name "python-pygit2")
3683 (version "0.28.2")
3684 (source
3685 (origin
3686 (method url-fetch)
3687 (uri (pypi-uri "pygit2" version))
3688 (sha256
3689 (base32 "11kzj5mjkspvplnpdb6bj8dcj6rgmkk986k8hjcklyg5yaxkz32d"))))
3690 (build-system python-build-system)
3691 (arguments
3692 '(#:tests? #f)) ; tests don't run correctly in our environment
3693 (propagated-inputs
3694 `(("python-six" ,python-six)
3695 ("python-cffi" ,python-cffi)
3696 ("libgit2" ,libgit2)
3697 ("python-tox" ,python-tox)))
3698 (native-inputs
3699 `(("python-pytest" ,python-pytest)))
3700 (home-page "https://github.com/libgit2/pygit2")
3701 (synopsis "Python bindings for libgit2")
3702 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3703 library, libgit2 implements Git plumbing.")
3704 ;; GPL2.0 only, with linking exception.
3705 (license license:gpl2)))
3706
3707 (define-public python2-pygit2
3708 (package-with-python2 python-pygit2))
3709
3710 (define-public python-pyparsing
3711 (package
3712 (name "python-pyparsing")
3713 (version "2.3.1")
3714 (source
3715 (origin
3716 (method url-fetch)
3717 (uri (pypi-uri "pyparsing" version))
3718 (sha256
3719 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
3720 (build-system python-build-system)
3721 (outputs '("out" "doc"))
3722 (arguments
3723 `(#:tests? #f ; no test target
3724 #:phases
3725 (modify-phases %standard-phases
3726 (add-after 'install 'install-doc
3727 (lambda* (#:key outputs #:allow-other-keys)
3728 (let* ((doc (string-append (assoc-ref outputs "doc")
3729 "/share/doc/" ,name "-" ,version))
3730 (html-doc (string-append doc "/html"))
3731 (examples (string-append doc "/examples")))
3732 (mkdir-p html-doc)
3733 (mkdir-p examples)
3734 (for-each
3735 (lambda (dir tgt)
3736 (map (lambda (file)
3737 (install-file file tgt))
3738 (find-files dir ".*")))
3739 (list "docs" "htmldoc" "examples")
3740 (list doc html-doc examples))
3741 #t))))))
3742 (home-page "https://github.com/pyparsing/pyparsing")
3743 (synopsis "Python parsing class library")
3744 (description
3745 "The pyparsing module is an alternative approach to creating and
3746 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3747 of regular expressions. The pyparsing module provides a library of classes
3748 that client code uses to construct the grammar directly in Python code.")
3749 (license license:expat)))
3750
3751 (define-public python2-pyparsing
3752 (package-with-python2 python-pyparsing))
3753
3754 (define-public python-numpydoc
3755 (package
3756 (name "python-numpydoc")
3757 (version "0.8.0")
3758 (source
3759 (origin
3760 (method url-fetch)
3761 (uri (pypi-uri "numpydoc" version))
3762 (sha256
3763 (base32
3764 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3765 (build-system python-build-system)
3766 (propagated-inputs
3767 `(("python-sphinx" ,python-sphinx)))
3768 (native-inputs
3769 `(("python-nose" ,python-nose)))
3770 (home-page "https://pypi.python.org/pypi/numpydoc")
3771 (synopsis
3772 "Numpy's Sphinx extensions")
3773 (description
3774 "Sphinx extension to support docstrings in Numpy format.")
3775 (license license:bsd-2)))
3776
3777 (define-public python2-numpydoc
3778 (package-with-python2 python-numpydoc))
3779
3780 (define-public python-numexpr
3781 (package
3782 (name "python-numexpr")
3783 (version "2.6.5")
3784 (source
3785 (origin
3786 (method url-fetch)
3787 (uri (pypi-uri "numexpr" version))
3788 (sha256
3789 (base32
3790 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3791 (build-system python-build-system)
3792 (arguments `(#:tests? #f)) ; no tests included
3793 (propagated-inputs
3794 `(("python-numpy" ,python-numpy)))
3795 (home-page "https://github.com/pydata/numexpr")
3796 (synopsis "Fast numerical expression evaluator for NumPy")
3797 (description
3798 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3799 expressions that operate on arrays are accelerated and use less memory than
3800 doing the same calculation in Python. In addition, its multi-threaded
3801 capabilities can make use of all your cores, which may accelerate
3802 computations, most specially if they are not memory-bounded (e.g. those using
3803 transcendental functions).")
3804 (license license:expat)))
3805
3806 (define-public python2-numexpr
3807 (package-with-python2 python-numexpr))
3808
3809 (define-public python-cycler
3810 (package
3811 (name "python-cycler")
3812 (version "0.10.0")
3813 (source (origin
3814 (method url-fetch)
3815 (uri (pypi-uri "cycler" version))
3816 (sha256
3817 (base32
3818 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3819 (build-system python-build-system)
3820 (arguments
3821 ;; XXX: The current version requires 'coveralls' which we don't have.
3822 ;; Enable this for the next release which uses 'python-pytest'.
3823 '(#:tests? #f))
3824 (propagated-inputs
3825 `(("python-six" ,python-six)))
3826 (home-page "http://matplotlib.org/cycler/")
3827 (synopsis "Composable keyword argument iterator")
3828 (description
3829 "When using @code{matplotlib} and plotting more than one line, it is
3830 common to want to be able to want to be able to cycle over one or more artist
3831 styles; but the plotting logic can quickly become involved.
3832 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3833 @code{Cycler} class was developed.")
3834 (license license:bsd-3)))
3835
3836 (define-public python2-cycler
3837 (package-with-python2 python-cycler))
3838
3839 (define-public python-colorspacious
3840 (package
3841 (name "python-colorspacious")
3842 (version "1.1.2")
3843 (source
3844 (origin
3845 (method git-fetch)
3846 (uri (git-reference
3847 (url "https://github.com/njsmith/colorspacious.git")
3848 (commit (string-append "v" version))))
3849 (file-name (git-file-name name version))
3850 (sha256
3851 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
3852 (build-system python-build-system)
3853 (propagated-inputs
3854 `(("python-numpy" ,python-numpy)))
3855 (native-inputs
3856 `(("python-nose" ,python-nose)))
3857 (arguments
3858 `(#:phases
3859 (modify-phases %standard-phases
3860 (replace 'check
3861 (lambda _
3862 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
3863 (home-page "https://github.com/njsmith/colorspacious")
3864 (synopsis "Python library for colorspace conversions")
3865 (description "@code{colorspacious} is a Python library that lets you
3866 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3867 (license license:expat)))
3868
3869 (define-public python2-colorspacious
3870 (package-with-python2 python-colorspacious))
3871
3872 (define-public python-matplotlib
3873 (package
3874 (name "python-matplotlib")
3875 (version "3.1.2")
3876 (source
3877 (origin
3878 (method url-fetch)
3879 (uri (pypi-uri "matplotlib" version))
3880 (sha256
3881 (base32
3882 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))))
3883 (build-system python-build-system)
3884 (propagated-inputs ; the following packages are all needed at run time
3885 `(("python-cycler" ,python-cycler)
3886 ("python-kiwisolver" ,python-kiwisolver)
3887 ("python-pyparsing" ,python-pyparsing)
3888 ("python-pygobject" ,python-pygobject)
3889 ("gobject-introspection" ,gobject-introspection)
3890 ("python-tkinter" ,python "tk")
3891 ("python-dateutil" ,python-dateutil)
3892 ("python-numpy" ,python-numpy)
3893 ("python-pillow" ,python-pillow)
3894 ("python-pytz" ,python-pytz)
3895 ("python-six" ,python-six)
3896 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3897 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3898 ;; object. For this reason we need to import both libraries.
3899 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
3900 ("python-pycairo" ,python-pycairo)
3901 ("python-cairocffi" ,python-cairocffi)))
3902 (inputs
3903 `(("libpng" ,libpng)
3904 ("imagemagick" ,imagemagick)
3905 ("freetype" ,freetype)
3906 ("cairo" ,cairo)
3907 ("glib" ,glib)
3908 ;; FIXME: Add backends when available.
3909 ;("python-wxpython" ,python-wxpython)
3910 ("tcl" ,tcl)
3911 ("tk" ,tk)))
3912 (native-inputs
3913 `(("pkg-config" ,pkg-config)
3914 ("python-pytest" ,python-pytest)
3915 ("python-mock" ,python-mock)
3916 ("unzip" ,unzip)
3917 ("jquery-ui"
3918 ,(origin
3919 (method url-fetch)
3920 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
3921 (sha256
3922 (base32
3923 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
3924 (arguments
3925 `(#:phases
3926 (modify-phases %standard-phases
3927 ;; XXX We disable all image comparison tests because we're using a
3928 ;; newer version of FreeType than matplotlib expects. This leads to
3929 ;; minor differences throughout the tests.
3930 (add-after 'unpack 'fix-and-disable-failing-tests
3931 (lambda _
3932 (substitute* (append (find-files "lib/matplotlib/tests/"
3933 "test_.*\\.py$")
3934 (find-files "lib/mpl_toolkits/tests"
3935 "test_.*\\.py$"))
3936 (("^from matplotlib" match)
3937 (string-append "import pytest\n" match))
3938 (("( *)@image_comparison" match indent)
3939 (string-append indent
3940 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
3941 match)))
3942 (substitute* "lib/matplotlib/tests/test_animation.py"
3943 (("/bin/sh") (which "sh")))
3944 (for-each delete-file
3945 ;; test_normal_axes, test_get_tightbbox_polar
3946 '("lib/matplotlib/tests/test_axes.py"
3947 ;; We don't use the webagg backend and this test forces it.
3948 "lib/matplotlib/tests/test_backend_webagg.py"
3949 ;; test_outward_ticks
3950 "lib/matplotlib/tests/test_tightlayout.py"
3951 ;; test_hidden_axes fails with minor extent
3952 ;; differences, possibly due to the use of a
3953 ;; different version of FreeType.
3954 "lib/matplotlib/tests/test_constrainedlayout.py"
3955 ;; Fontconfig returns no fonts.
3956 "lib/matplotlib/tests/test_font_manager.py"))
3957 #t))
3958 (add-before 'install 'install-jquery-ui
3959 (lambda* (#:key outputs inputs #:allow-other-keys)
3960 (let ((dir (string-append (assoc-ref outputs "out")
3961 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
3962 (mkdir-p dir)
3963 (invoke "unzip"
3964 (assoc-ref inputs "jquery-ui")
3965 "-d" dir))
3966 #t))
3967 (replace 'check
3968 (lambda* (#:key outputs inputs #:allow-other-keys)
3969 (add-installed-pythonpath inputs outputs)
3970 (invoke "python" "tests.py" "-v"
3971 "-m" "not network and not webagg")))
3972 (add-before 'build 'configure-environment
3973 (lambda* (#:key outputs inputs #:allow-other-keys)
3974 (let ((cairo (assoc-ref inputs "cairo")))
3975 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
3976 ;; has not effect.
3977 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
3978 (setenv "HOME" (getcwd))
3979 (call-with-output-file "setup.cfg"
3980 (lambda (port)
3981 (format port "[directories]~%
3982 basedirlist = ~a,~a~%
3983 [packages]~%
3984 tests = True~%"
3985 (assoc-ref inputs "tcl")
3986 (assoc-ref inputs "tk")))))
3987 #t)))))
3988 (home-page "https://matplotlib.org/")
3989 (synopsis "2D plotting library for Python")
3990 (description
3991 "Matplotlib is a Python 2D plotting library which produces publication
3992 quality figures in a variety of hardcopy formats and interactive environments
3993 across platforms. Matplotlib can be used in Python scripts, the python and
3994 ipython shell, web application servers, and six graphical user interface
3995 toolkits.")
3996 (license license:psfl)
3997 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3998
3999 (define-public python2-matplotlib
4000 (let ((matplotlib (package-with-python2
4001 (strip-python2-variant python-matplotlib))))
4002 (package (inherit matplotlib)
4003 (version "2.2.4")
4004 (source
4005 (origin
4006 (method url-fetch)
4007 (uri (pypi-uri "matplotlib" version))
4008 (sha256
4009 (base32
4010 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
4011 (arguments
4012 (substitute-keyword-arguments (package-arguments matplotlib)
4013 ((#:phases phases)
4014 `(modify-phases ,phases
4015 (replace 'install-jquery-ui
4016 (lambda* (#:key outputs inputs #:allow-other-keys)
4017 (let ((dir (string-append (assoc-ref outputs "out")
4018 "/lib/python2.7/site-packages/"
4019 "matplotlib/backends/web_backend/")))
4020 (mkdir-p dir)
4021 (invoke "unzip"
4022 (assoc-ref inputs "jquery-ui")
4023 "-d" dir))
4024 #t))
4025 (delete 'fix-and-disable-failing-tests)
4026 (delete 'check))))) ; These tests weren't run the the past.
4027 ;; Make sure to use special packages for Python 2 instead
4028 ;; of those automatically rewritten by package-with-python2.
4029 (propagated-inputs
4030 `(("python2-pycairo" ,python2-pycairo)
4031 ("python2-backports-functools-lru-cache"
4032 ,python2-backports-functools-lru-cache)
4033 ("python2-functools32" ,python2-functools32)
4034 ("python2-pygobject-2" ,python2-pygobject-2)
4035 ("python2-subprocess32" ,python2-subprocess32)
4036 ("python2-tkinter" ,python-2 "tk")
4037 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4038 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4039
4040 (define-public python-matplotlib-documentation
4041 (package
4042 (name "python-matplotlib-documentation")
4043 (version (package-version python-matplotlib))
4044 (source (package-source python-matplotlib))
4045 (build-system python-build-system)
4046 (native-inputs
4047 `(("python-matplotlib" ,python-matplotlib)
4048 ("python-colorspacious" ,python-colorspacious)
4049 ("python-sphinx" ,python-sphinx)
4050 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
4051 ("python-sphinx-gallery" ,python-sphinx-gallery)
4052 ("python-numpydoc" ,python-numpydoc)
4053 ("python-ipython" ,python-ipython)
4054 ("python-ipykernel" ,python-ipykernel)
4055 ("python-mock" ,python-mock)
4056 ("graphviz" ,graphviz)
4057 ("texlive" ,(texlive-union (list texlive-amsfonts
4058 texlive-latex-amsmath
4059 texlive-latex-enumitem
4060 texlive-latex-expdlist
4061 texlive-latex-geometry
4062 texlive-latex-preview
4063 texlive-latex-type1cm
4064 texlive-latex-ucs
4065
4066 texlive-generic-pdftex
4067
4068 texlive-fonts-ec
4069 texlive-fonts-adobe-times
4070 texlive-fonts-txfonts)))
4071 ("texinfo" ,texinfo)
4072 ,@(package-native-inputs python-matplotlib)))
4073 (arguments
4074 `(#:tests? #f ; we're only generating documentation
4075 #:phases
4076 (modify-phases %standard-phases
4077 ;; The tests in python-matplotlib are run after the install phase, so
4078 ;; we need to delete the extra phase here.
4079 (delete 'check)
4080 (replace 'build
4081 (lambda _
4082 (chdir "doc")
4083 (setenv "PYTHONPATH"
4084 (string-append (getenv "PYTHONPATH")
4085 ":" (getcwd) "/../examples/units"))
4086 (substitute* "conf.py"
4087 ;; Don't use git.
4088 (("^SHA = check_output.*")
4089 (string-append "SHA = \"" ,version "\"\n"))
4090 ;; Don't fetch intersphinx files from the Internet
4091 (("^explicit_order_folders" m)
4092 (string-append "intersphinx_mapping = {}\n" m))
4093 (("'sphinx.ext.intersphinx',") "")
4094 ;; Disable URL embedding which requires internet access.
4095 (("'https://docs.scipy.org/doc/numpy'") "None")
4096 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
4097 (invoke "make"
4098 "SPHINXBUILD=sphinx-build"
4099 "SPHINXOPTS=" ; don't abort on warnings
4100 "html" "texinfo")))
4101 (replace 'install
4102 (lambda* (#:key inputs outputs #:allow-other-keys)
4103 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4104 (doc (string-append data "/doc/python-matplotlib-" ,version))
4105 (info (string-append data "/info"))
4106 (html (string-append doc "/html")))
4107 (mkdir-p html)
4108 (mkdir-p info)
4109 (copy-recursively "build/html" html)
4110 (symlink (string-append html "/_images")
4111 (string-append info "/matplotlib-figures"))
4112 (with-directory-excursion "build/texinfo"
4113 (substitute* "matplotlib.texi"
4114 (("@image\\{([^,]*)" all file)
4115 (string-append "@image{matplotlib-figures/" file)))
4116 (symlink (string-append html "/_images")
4117 "./matplotlib-figures")
4118 (invoke "makeinfo" "--no-split"
4119 "-o" "matplotlib.info" "matplotlib.texi"))
4120 (install-file "build/texinfo/matplotlib.info" info))
4121 #t)))))
4122 (home-page (package-home-page python-matplotlib))
4123 (synopsis "Documentation for the python-matplotlib package")
4124 (description (package-description python-matplotlib))
4125 (license (package-license python-matplotlib))))
4126
4127 (define-public python2-matplotlib-documentation
4128 (let ((parent (package-with-python2 python-matplotlib-documentation)))
4129 (package
4130 (inherit parent)
4131 (native-inputs
4132 (alist-delete "python-sphinx-copybutton"
4133 (package-native-inputs parent))))))
4134
4135 (define-public python-matplotlib-venn
4136 (package
4137 (name "python-matplotlib-venn")
4138 (version "0.11.5")
4139 (source
4140 (origin
4141 (method url-fetch)
4142 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4143 (sha256
4144 (base32
4145 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4146 (build-system python-build-system)
4147 (arguments '(#:tests? #f)) ; tests are not included
4148 (propagated-inputs
4149 `(("python-matplotlib" ,python-matplotlib)
4150 ("python-numpy" ,python-numpy)
4151 ("python-scipy" ,python-scipy)))
4152 (native-inputs
4153 `(("unzip" ,unzip)))
4154 (home-page "https://github.com/konstantint/matplotlib-venn")
4155 (synopsis "Plot area-proportional Venn diagrams")
4156 (description
4157 "This package provides tools for plotting area-proportional two- and
4158 three-way Venn diagrams in @code{matplotlib}.")
4159 (license license:expat)))
4160
4161 (define-public python2-pysnptools
4162 (package
4163 (name "python2-pysnptools")
4164 (version "0.3.13")
4165 (source
4166 (origin
4167 (method url-fetch)
4168 (uri (pypi-uri "pysnptools" version))
4169 (sha256
4170 (base32
4171 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
4172 (build-system python-build-system)
4173 (arguments
4174 `(#:python ,python-2 ; only Python 2.7 is supported
4175 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
4176 (propagated-inputs
4177 `(("python2-numpy" ,python2-numpy)
4178 ("python2-scipy" ,python2-scipy)
4179 ("python2-pandas" ,python2-pandas)))
4180 (native-inputs
4181 `(("python2-cython" ,python2-cython)))
4182 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
4183 (synopsis "Library for reading and manipulating genetic data")
4184 (description
4185 "PySnpTools is a library for reading and manipulating genetic data. It
4186 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4187 those files. It can also efficiently manipulate ranges of integers using set
4188 operators such as union, intersection, and difference.")
4189 (license license:asl2.0)))
4190
4191 (define-public python-socksipy-branch
4192 (package
4193 (name "python-socksipy-branch")
4194 (version "1.01")
4195 (source
4196 (origin
4197 (method url-fetch)
4198 (uri (pypi-uri "SocksiPy-branch" version))
4199 (sha256
4200 (base32
4201 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4202 (build-system python-build-system)
4203 (arguments
4204 `(#:tests? #f)) ; There are no tests
4205 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4206 (synopsis "Python SOCKS module")
4207 (description
4208 "SocksiPy - A Python SOCKS client module. It provides a
4209 socket-like interface that supports connections to any TCP
4210 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4211 The original version was developed by Dan Haim, this is a
4212 branch created by Mario Vilas to address some open issues,
4213 as the original project seems to have been abandoned circa 2007.")
4214 (license license:bsd-3)))
4215
4216 (define-public python2-socksipy-branch
4217 (package-with-python2 python-socksipy-branch))
4218
4219 (define-public python-socksipychain
4220 (package
4221 (name "python-socksipychain")
4222 (version "2.1.0")
4223 (source
4224 (origin
4225 (method git-fetch)
4226 (uri (git-reference
4227 (url "https://github.com/pagekite/PySocksipyChain.git")
4228 (commit (string-append "v" version))))
4229 (file-name (git-file-name name version))
4230 (sha256
4231 (base32
4232 "0idm9a050rd2kbgbz2sk9ib9589kj4xh1xdnggs6xbq2v2y8f6zn"))))
4233 (build-system python-build-system)
4234 (arguments
4235 `(#:tests? #f)) ; Tests try to access the network.
4236 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
4237 (synopsis "Python SOCKS module with chained proxies support")
4238 (description
4239 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
4240 adds support for arbitrary chaining of proxy servers and various modes of
4241 TLS/SSL encryption. It was developed for use in PageKite, and also includes
4242 a simple netcat replacement with chaining support.")
4243 (license license:bsd-3)))
4244
4245 (define-public python-pycodestyle
4246 (package
4247 (name "python-pycodestyle")
4248 (version "2.5.0")
4249 (source
4250 (origin
4251 (method url-fetch)
4252 (uri (pypi-uri "pycodestyle" version))
4253 (sha256
4254 (base32
4255 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
4256 (build-system python-build-system)
4257 (home-page "https://pycodestyle.readthedocs.io/")
4258 (synopsis "Python style guide checker")
4259 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4260 Python code against some of the style conventions in
4261 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4262 (license license:expat)))
4263
4264 (define-public python2-pycodestyle
4265 (package-with-python2 python-pycodestyle))
4266
4267 (define-public python-multidict
4268 (package
4269 (name "python-multidict")
4270 (version "4.2.0")
4271 (source
4272 (origin
4273 (method url-fetch)
4274 (uri (pypi-uri "multidict" version))
4275 (sha256
4276 (base32
4277 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4278 (build-system python-build-system)
4279 (native-inputs
4280 `(("python-pytest" ,python-pytest)
4281 ("python-pytest-runner" ,python-pytest-runner)))
4282 (home-page "https://github.com/aio-libs/multidict/")
4283 (synopsis "Multidict implementation")
4284 (description "Multidict is dict-like collection of key-value pairs
4285 where key might be occurred more than once in the container.")
4286 (license license:asl2.0)))
4287
4288 (define-public python-orderedmultidict
4289 (package
4290 (name "python-orderedmultidict")
4291 (version "0.7.11")
4292 (source
4293 (origin
4294 (method url-fetch)
4295 (uri (pypi-uri "orderedmultidict" version))
4296 (sha256
4297 (base32
4298 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4299 (build-system python-build-system)
4300 (arguments
4301 `(#:phases
4302 (modify-phases %standard-phases
4303 (add-after 'unpack 'fix-tests
4304 (lambda _
4305 ;; The package uses nosetest for running the tests.
4306 ;; Adding this initfile allows to run the test suite
4307 ;; without requiring nosetest.
4308 (with-output-to-file "tests/__init__.py" newline)
4309 #t)))))
4310 (propagated-inputs
4311 `(("python-six" ,python-six)))
4312 (native-inputs
4313 `(("python-pycodestyle" ,python-pycodestyle)))
4314 (home-page "https://github.com/gruns/orderedmultidict")
4315 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4316 (description "This package contains a library for ordered multivalue
4317 dictionaries. A multivalue dictionary is a dictionary that can store
4318 multiple values for the same key. An ordered multivalue dictionary is a
4319 multivalue dictionary that retains the order of insertions and deletions.")
4320 (license license:unlicense)))
4321
4322 (define-public python2-orderedmultidict
4323 (package-with-python2 python-orderedmultidict))
4324
4325 (define-public python-autopep8
4326 (package
4327 (name "python-autopep8")
4328 (version "1.3.5")
4329 (source
4330 (origin
4331 (method url-fetch)
4332 (uri (pypi-uri "autopep8" version))
4333 (sha256
4334 (base32
4335 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4336 (build-system python-build-system)
4337 (propagated-inputs
4338 `(("python-pycodestyle" ,python-pycodestyle)))
4339 (home-page "https://github.com/hhatto/autopep8")
4340 (synopsis "Format Python code according to the PEP 8 style guide")
4341 (description
4342 "@code{autopep8} automatically formats Python code to conform to
4343 the PEP 8 style guide. It uses the pycodestyle utility to determine
4344 what parts of the code needs to be formatted. @code{autopep8} is
4345 capable of fixing most of the formatting issues that can be reported
4346 by pycodestyle.")
4347 (license (license:non-copyleft
4348 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4349
4350 (define-public python2-autopep8
4351 (package-with-python2 python-autopep8))
4352
4353 (define-public python-distutils-extra
4354 (package
4355 (name "python-distutils-extra")
4356 (version "2.38")
4357 (source
4358 (origin
4359 (method url-fetch)
4360 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4361 version "/+download/python-distutils-extra-"
4362 version ".tar.gz"))
4363 (sha256
4364 (base32
4365 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4366 (build-system python-build-system)
4367 (home-page "https://launchpad.net/python-distutils-extra/")
4368 (synopsis "Enhancements to Python's distutils")
4369 (description
4370 "The python-distutils-extra module enables you to easily integrate
4371 gettext support, themed icons, and scrollkeeper-based documentation into
4372 Python's distutils.")
4373 (license license:gpl2)))
4374
4375 (define-public python2-distutils-extra
4376 (package-with-python2 python-distutils-extra))
4377
4378 (define-public python2-elib.intl
4379 (package
4380 (name "python2-elib.intl")
4381 (version "0.0.3")
4382 (source
4383 (origin
4384 ;; This project doesn't tag releases or publish tarballs, so we take
4385 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4386 (method git-fetch)
4387 (uri (git-reference
4388 (url "https://github.com/dieterv/elib.intl.git")
4389 (commit "d09997cfef")))
4390 (file-name (string-append name "-" version "-checkout"))
4391 (sha256
4392 (base32
4393 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4394 (build-system python-build-system)
4395 (arguments
4396 ;; incompatible with Python 3 (exception syntax)
4397 `(#:python ,python-2
4398 #:tests? #f))
4399 (home-page "https://github.com/dieterv/elib.intl")
4400 (synopsis "Enhanced internationalization for Python")
4401 (description
4402 "The elib.intl module provides enhanced internationalization (I18N)
4403 services for your Python modules and applications.")
4404 (license license:lgpl3+)))
4405
4406 (define-public python-olefile
4407 (package
4408 (name "python-olefile")
4409 (version "0.46")
4410 (source
4411 (origin
4412 (method url-fetch)
4413 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4414 "download/v" version "/olefile-" version ".tar.gz"))
4415 (file-name (string-append name "-" version ".tar.gz"))
4416 (sha256
4417 (base32
4418 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
4419 (build-system python-build-system)
4420 (home-page "https://www.decalage.info/python/olefileio")
4421 (synopsis "Read and write Microsoft OLE2 files.")
4422 (description
4423 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4424 Storage or Compound Document, Microsoft Office). It is an improved version of
4425 the OleFileIO module from PIL, the Python Image Library.")
4426 (license license:bsd-3)))
4427
4428 (define-public python2-olefile
4429 (package-with-python2 python-olefile))
4430
4431 (define-public python-pillow
4432 (package
4433 (name "python-pillow")
4434 (version "6.2.1")
4435 (source
4436 (origin
4437 (method url-fetch)
4438 (uri (pypi-uri "Pillow" version))
4439 (sha256
4440 (base32
4441 "1c8wkzc58f5wdh006jvmwdk3wxld1xgagcbdvj7iv17qi0m9fkmz"))))
4442 (build-system python-build-system)
4443 (native-inputs
4444 `(("python-pytest" ,python-pytest)))
4445 (inputs
4446 `(("freetype" ,freetype)
4447 ("lcms" ,lcms)
4448 ("libjpeg" ,libjpeg)
4449 ("libtiff" ,libtiff)
4450 ("libwebp" ,libwebp)
4451 ("openjpeg" ,openjpeg)
4452 ("zlib" ,zlib)))
4453 (propagated-inputs
4454 `(("python-olefile" ,python-olefile)))
4455 (arguments
4456 `(#:phases
4457 (modify-phases %standard-phases
4458 (add-after 'unpack 'patch-ldconfig
4459 (lambda _
4460 (substitute* "setup.py"
4461 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4462 (replace 'check
4463 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
4464 (if tests?
4465 (begin
4466 (setenv "HOME" (getcwd))
4467 ;; Make installed package available for running the tests.
4468 (add-installed-pythonpath inputs outputs)
4469 (invoke "python" "selftest.py" "--installed")
4470 (invoke "python" "-m" "pytest" "-vv"))
4471 #t))))))
4472 (home-page "https://python-pillow.org")
4473 (synopsis "Fork of the Python Imaging Library")
4474 (description
4475 "The Python Imaging Library adds image processing capabilities to your
4476 Python interpreter. This library provides extensive file format support, an
4477 efficient internal representation, and fairly powerful image processing
4478 capabilities. The core image library is designed for fast access to data
4479 stored in a few basic pixel formats. It should provide a solid foundation for
4480 a general image processing tool.")
4481 (license (license:x11-style
4482 "http://www.pythonware.com/products/pil/license.htm"
4483 "The PIL Software License"))))
4484
4485 (define-public python2-pillow
4486 (package-with-python2 python-pillow))
4487
4488 (define-public python-pycparser
4489 (package
4490 (name "python-pycparser")
4491 (version "2.19")
4492 (source
4493 (origin
4494 (method url-fetch)
4495 (uri (pypi-uri "pycparser" version))
4496 (sha256
4497 (base32
4498 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
4499 (outputs '("out" "doc"))
4500 (build-system python-build-system)
4501 (native-inputs
4502 `(("pkg-config" ,pkg-config)))
4503 (arguments
4504 `(#:phases
4505 (modify-phases %standard-phases
4506 (replace 'check
4507 (lambda _
4508 (with-directory-excursion "tests"
4509 (invoke "python" "all_tests.py"))
4510 #t))
4511 (add-after 'install 'install-doc
4512 (lambda* (#:key outputs #:allow-other-keys)
4513 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4514 (doc (string-append data "/doc/" ,name "-" ,version))
4515 (examples (string-append doc "/examples")))
4516 (mkdir-p examples)
4517 (for-each (lambda (file)
4518 (copy-file (string-append "." file)
4519 (string-append doc file)))
4520 '("/README.rst" "/CHANGES" "/LICENSE"))
4521 (copy-recursively "examples" examples)
4522 #t))))))
4523 (home-page "https://github.com/eliben/pycparser")
4524 (synopsis "C parser in Python")
4525 (description
4526 "Pycparser is a complete parser of the C language, written in pure Python
4527 using the PLY parsing library. It parses C code into an AST and can serve as
4528 a front-end for C compilers or analysis tools.")
4529 (license license:bsd-3)))
4530
4531 (define-public python2-pycparser
4532 (package-with-python2 python-pycparser))
4533
4534 (define-public python-pywavelets
4535 (package
4536 (name "python-pywavelets")
4537 (version "1.0.1")
4538 (home-page "https://github.com/PyWavelets/pywt")
4539 (source (origin
4540 (method url-fetch)
4541 (uri (pypi-uri "PyWavelets" version))
4542 (sha256
4543 (base32
4544 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4545 (build-system python-build-system)
4546 (arguments
4547 '(#:modules ((ice-9 ftw)
4548 (srfi srfi-1)
4549 (srfi srfi-26)
4550 (guix build utils)
4551 (guix build python-build-system))
4552 #:phases (modify-phases %standard-phases
4553 (replace 'check
4554 (lambda _
4555 (let ((cwd (getcwd))
4556 (libdir (find (cut string-prefix? "lib." <>)
4557 (scandir "build"))))
4558 (with-directory-excursion (string-append cwd "/build/" libdir)
4559 (invoke "nosetests" "-v" "."))))))))
4560 (native-inputs
4561 `(("python-matplotlib" ,python-matplotlib) ;for tests
4562 ("python-nose" ,python-nose)))
4563 (propagated-inputs
4564 `(("python-numpy" ,python-numpy)))
4565 (synopsis "Wavelet transforms in Python")
4566 (description
4567 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4568 mathematical basis functions that are localized in both time and frequency.
4569 Wavelet transforms are time-frequency transforms employing wavelets. They are
4570 similar to Fourier transforms, the difference being that Fourier transforms are
4571 localized only in frequency instead of in time and frequency.")
4572 (license license:expat)))
4573
4574 (define-public python2-pywavelets
4575 (package-with-python2 python-pywavelets))
4576
4577 (define-public python-xcffib
4578 (package
4579 (name "python-xcffib")
4580 (version "0.6.0")
4581 (source
4582 (origin
4583 (method url-fetch)
4584 (uri (pypi-uri "xcffib" version))
4585 (sha256
4586 (base32
4587 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4588 (build-system python-build-system)
4589 (inputs
4590 `(("libxcb" ,libxcb)))
4591 (propagated-inputs
4592 `(("python-cffi" ,python-cffi) ; used at run time
4593 ("python-six" ,python-six)))
4594 (arguments
4595 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4596 #:tests? #f
4597 #:phases
4598 (modify-phases %standard-phases
4599 (add-after 'unpack 'fix-libxcb-path
4600 (lambda* (#:key inputs #:allow-other-keys)
4601 (let ((libxcb (assoc-ref inputs "libxcb")))
4602 (substitute* '("xcffib/__init__.py")
4603 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4604 #t)))
4605 (add-after 'install 'install-doc
4606 (lambda* (#:key outputs #:allow-other-keys)
4607 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4608 "/doc/" ,name "-" ,version)))
4609 (mkdir-p doc)
4610 (copy-file "README.md"
4611 (string-append doc "/README.md"))
4612 #t))))))
4613 (home-page "https://github.com/tych0/xcffib")
4614 (synopsis "XCB Python bindings")
4615 (description
4616 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4617 support for Python 3 and PyPy. It is based on cffi.")
4618 (license license:expat)))
4619
4620 (define-public python2-xcffib
4621 (package-with-python2 python-xcffib))
4622
4623 (define-public python-cairocffi
4624 (package
4625 (name "python-cairocffi")
4626 (version "0.9.0")
4627 (source
4628 (origin
4629 (method url-fetch)
4630 (uri (pypi-uri "cairocffi" version))
4631 (sha256
4632 (base32
4633 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4634 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4635 (build-system python-build-system)
4636 (outputs '("out" "doc"))
4637 (inputs
4638 `(("glib" ,glib)
4639 ("gtk+" ,gtk+)
4640 ("gdk-pixbuf" ,gdk-pixbuf)
4641 ("cairo" ,cairo)
4642 ("pango" ,pango)))
4643 (native-inputs
4644 `(("pkg-config" ,pkg-config)
4645 ("python-pytest" ,python-pytest)
4646 ("python-pytest-cov" ,python-pytest-cov)
4647 ("python-pytest-runner" ,python-pytest-runner)
4648 ("python-sphinx" ,python-sphinx)
4649 ("python-docutils" ,python-docutils)))
4650 (propagated-inputs
4651 `(("python-xcffib" ,python-xcffib))) ; used at run time
4652 (arguments
4653 `(#:phases
4654 (modify-phases %standard-phases
4655 (add-after 'unpack 'patch-paths
4656 (lambda* (#:key inputs outputs #:allow-other-keys)
4657 (substitute* (find-files "." "\\.py$")
4658 (("dlopen\\(ffi, 'cairo'")
4659 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4660 "/lib/libcairo.so.2'"))
4661 (("dlopen\\(ffi, 'gdk-3'")
4662 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4663 "/lib/libgtk-3.so.0'"))
4664 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4665 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4666 "/lib/libgdk_pixbuf-2.0.so.0'"))
4667 (("dlopen\\(ffi, 'glib-2.0'")
4668 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4669 "/lib/libglib-2.0.so.0'"))
4670 (("dlopen\\(ffi, 'gobject-2.0'")
4671 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4672 "/lib/libgobject-2.0.so.0'"))
4673 (("dlopen\\(ffi, 'pangocairo-1.0'")
4674 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4675 "/lib/libpangocairo-1.0.so.0'"))
4676 (("dlopen\\(ffi, 'pango-1.0'")
4677 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4678 "/lib/libpango-1.0.so.0'")))
4679 #t))
4680 (add-after 'install 'install-doc
4681 (lambda* (#:key inputs outputs #:allow-other-keys)
4682 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4683 (doc (string-append data "/doc/" ,name "-" ,version))
4684 (html (string-append doc "/html")))
4685 (setenv "LD_LIBRARY_PATH"
4686 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4687 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4688 (setenv "LANG" "en_US.UTF-8")
4689 (mkdir-p html)
4690 (for-each (lambda (file)
4691 (copy-file (string-append "." file)
4692 (string-append doc file)))
4693 '("/README.rst" "/CHANGES" "/LICENSE"))
4694 (system* "python" "setup.py" "build_sphinx")
4695 (copy-recursively "docs/_build/html" html)
4696 #t))))))
4697 (home-page "https://github.com/Kozea/cairocffi")
4698 (synopsis "Python bindings and object-oriented API for Cairo")
4699 (description
4700 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4701 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4702 graphics library with support for multiple backends including image buffers,
4703 PNG, PostScript, PDF, and SVG file output.")
4704 (license license:bsd-3)))
4705
4706 (define-public python2-cairocffi
4707 (package-with-python2 python-cairocffi))
4708
4709 (define-public python-decorator
4710 (package
4711 (name "python-decorator")
4712 (version "4.3.0")
4713 (source
4714 (origin
4715 (method url-fetch)
4716 (uri (pypi-uri "decorator" version))
4717 (sha256
4718 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4719 (build-system python-build-system)
4720 (home-page "https://pypi.python.org/pypi/decorator/")
4721 (synopsis "Python module to simplify usage of decorators")
4722 (description
4723 "The aim of the decorator module is to simplify the usage of decorators
4724 for the average programmer, and to popularize decorators usage giving examples
4725 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4726 etc. The core of this module is a decorator factory.")
4727 (license license:expat)))
4728
4729 (define-public python2-decorator
4730 (package-with-python2 python-decorator))
4731
4732 (define-public python-drmaa
4733 (package
4734 (name "python-drmaa")
4735 (version "0.7.7")
4736 (source
4737 (origin
4738 (method url-fetch)
4739 (uri (pypi-uri "drmaa" version))
4740 (sha256
4741 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4742 (build-system python-build-system)
4743 ;; The test suite requires libdrmaa which is provided by the cluster
4744 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4745 ;; should be set to the path of the libdrmaa library.
4746 (arguments '(#:tests? #f))
4747 (native-inputs
4748 `(("python-nose" ,python-nose)))
4749 (home-page "https://pypi.python.org/pypi/drmaa")
4750 (synopsis "Python bindings for the DRMAA library")
4751 (description
4752 "A Python package for Distributed Resource Management (DRM) job
4753 submission and control. This package is an implementation of the DRMAA 1.0
4754 Python language binding specification.")
4755 (license license:bsd-3)))
4756
4757 (define-public python2-drmaa
4758 (package-with-python2 python-drmaa))
4759
4760 (define-public python-grako
4761 (package
4762 (name "python-grako")
4763 (version "3.99.9")
4764 (source
4765 (origin
4766 (method url-fetch)
4767 (uri
4768 (pypi-uri "grako" version ".zip"))
4769 (sha256
4770 (base32
4771 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4772 (build-system python-build-system)
4773 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4774 (native-inputs
4775 `(("unzip" ,unzip)
4776 ("python-pytest" ,python-pytest)
4777 ("python-pytest-runner" ,python-pytest-runner)))
4778 (home-page "https://bitbucket.org/neogeny/grako")
4779 (synopsis "EBNF parser generator")
4780 (description
4781 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4782 memoizing PEG/Packrat parser in Python.")
4783 (license license:bsd-3)))
4784
4785 (define-public python2-grako
4786 (package-with-python2 python-grako))
4787
4788 (define-public python-gridmap
4789 (package
4790 (name "python-gridmap")
4791 (version "0.13.0")
4792 (source
4793 (origin
4794 (method git-fetch)
4795 (uri (git-reference
4796 (url "https://github.com/pygridtools/gridmap.git")
4797 (commit (string-append "v" version))))
4798 (file-name (git-file-name name version))
4799 (sha256
4800 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
4801 (build-system python-build-system)
4802 (arguments
4803 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4804 (propagated-inputs
4805 `(("python-psutil" ,python-psutil)
4806 ("python-drmaa" ,python-drmaa)
4807 ("python-pyzmq" ,python-pyzmq)))
4808 (home-page "https://github.com/pygridtools/gridmap")
4809 (synopsis "Create jobs on a cluster directly from Python")
4810 (description
4811 "Gridmap is a Python package to allow you to easily create jobs on the
4812 cluster directly from Python. You can directly map Python functions onto the
4813 cluster without needing to write any wrapper code yourself.")
4814 (license license:gpl3+)))
4815
4816 (define-public python2-gridmap
4817 (package-with-python2 python-gridmap))
4818
4819 (define-public python-honcho
4820 (package
4821 (name "python-honcho")
4822 (version "1.0.1")
4823 (source
4824 (origin
4825 (method git-fetch)
4826 (uri (git-reference
4827 (url "https://github.com/nickstenning/honcho.git")
4828 (commit (string-append "v" version))))
4829 (file-name (git-file-name name version))
4830 (sha256
4831 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
4832 (build-system python-build-system)
4833 (native-inputs
4834 `(("python-pytest" ,python-pytest)
4835 ("python-mock" ,python-mock)
4836 ("python-tox" ,python-tox)
4837 ("which" ,which))) ;for tests
4838 (propagated-inputs
4839 `(("python-jinja2" ,python-jinja2)))
4840 (arguments
4841 `(#:phases
4842 (modify-phases %standard-phases
4843 (delete 'check)
4844 (add-after 'install 'check
4845 (lambda* (#:key outputs inputs #:allow-other-keys)
4846 ;; fix honcho path in testsuite
4847 (substitute* "tests/conftest.py"
4848 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4849 "/bin/honcho" "'")))
4850 ;; It's easier to run tests after install.
4851 ;; Make installed package available for running the tests
4852 (add-installed-pythonpath inputs outputs)
4853 (invoke "py.test" "-v"))))))
4854 (home-page "https://github.com/nickstenning/honcho")
4855 (synopsis "Manage Procfile-based applications")
4856 (description
4857 "A Procfile is a file which describes how to run an application
4858 consisting of several processes. honcho starts all listed processes.
4859 The output of all running processes is collected by honcho and
4860 displayed.")
4861 (license license:expat)))
4862
4863 (define-public python2-honcho
4864 (package-with-python2 python-honcho))
4865
4866 (define-public python-pexpect
4867 (package
4868 (name "python-pexpect")
4869 (version "4.6.0")
4870 (source
4871 (origin
4872 (method url-fetch)
4873 (uri (pypi-uri "pexpect" version))
4874 (sha256
4875 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4876 (build-system python-build-system)
4877 (arguments
4878 `(#:phases
4879 (modify-phases %standard-phases
4880 (add-before 'check 'prepare-tests
4881 (lambda _
4882 (substitute* (find-files "tests")
4883 (("/bin/ls") (which "ls"))
4884 (("/bin/echo") (which "echo"))
4885 (("/bin/which") (which "which"))
4886 ;; Many tests try to use the /bin directory which
4887 ;; is not present in the build environment.
4888 ;; Use one that's non-empty and unlikely to change.
4889 (("/bin'") "/dev'"))
4890 ;; XXX: Socket connection test gets "Connection reset by peer".
4891 ;; Why does it not work? Delete for now.
4892 (delete-file "tests/test_socket.py")
4893 #t))
4894 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4895 (native-inputs
4896 `(("python-nose" ,python-nose)
4897 ("python-pytest" ,python-pytest)
4898 ("man-db" ,man-db)
4899 ("which" ,which)
4900 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4901 (propagated-inputs
4902 `(("python-ptyprocess" ,python-ptyprocess)))
4903 (home-page "http://pexpect.readthedocs.org/")
4904 (synopsis "Controlling interactive console applications")
4905 (description
4906 "Pexpect is a pure Python module for spawning child applications;
4907 controlling them; and responding to expected patterns in their output.
4908 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4909 child application and control it as if a human were typing commands.")
4910 (license license:isc)))
4911
4912 (define-public python2-pexpect
4913 (package-with-python2 python-pexpect))
4914
4915 (define-public python-setuptools-scm
4916 (package
4917 (name "python-setuptools-scm")
4918 (version "3.2.0")
4919 (source (origin
4920 (method url-fetch)
4921 (uri (pypi-uri "setuptools_scm" version))
4922 (sha256
4923 (base32
4924 "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj"))))
4925 (build-system python-build-system)
4926 (home-page "https://github.com/pypa/setuptools_scm/")
4927 (synopsis "Manage Python package versions in SCM metadata")
4928 (description
4929 "Setuptools_scm handles managing your Python package versions in
4930 @dfn{software configuration management} (SCM) metadata instead of declaring
4931 them as the version argument or in a SCM managed file.")
4932 (license license:expat)))
4933
4934 ;; Needed by python-lazy-object-proxy, remove on next update cycle.
4935 (define-public python-setuptools-scm-3.3
4936 (package
4937 (inherit python-setuptools-scm)
4938 (version "3.3.3")
4939 (source (origin
4940 (method url-fetch)
4941 (uri (pypi-uri "setuptools_scm" version))
4942 (sha256
4943 (base32
4944 "19cyndx23xmpbhz4qrwmfwsmnnaczd0dw7qg977ksq2dbvxy29dx"))))))
4945
4946 (define-public python2-setuptools-scm
4947 (package-with-python2 python-setuptools-scm))
4948
4949 (define-public python-pathlib2
4950 (package
4951 (name "python-pathlib2")
4952 (version "2.3.3")
4953 (source
4954 (origin
4955 (method url-fetch)
4956 (uri (pypi-uri "pathlib2" version))
4957 (sha256
4958 (base32
4959 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
4960 (build-system python-build-system)
4961 (propagated-inputs
4962 `(("python-scandir" ,python-scandir)
4963 ("python-six" ,python-six)))
4964 (home-page "https://pypi.python.org/pypi/pathlib2/")
4965 (synopsis "Object-oriented file system paths")
4966 (description "The goal of pathlib2 is to provide a backport of the
4967 standard @code{pathlib} module which tracks the standard library module, so
4968 all the newest features of the standard @code{pathlib} can be used also on
4969 older Python versions.")
4970 (license license:expat)))
4971
4972 (define-public python-importlib-metadata
4973 (package
4974 (name "python-importlib-metadata")
4975 (version "0.23")
4976 (source
4977 (origin
4978 (method url-fetch)
4979 (uri (pypi-uri "importlib_metadata" version))
4980 (sha256
4981 (base32 "09mdqdfv5rdrwz80jh9m379gxmvk2vhjfz0fg53hid00icvxf65a"))))
4982 (build-system python-build-system)
4983 (propagated-inputs
4984 `(("python-configparser" ,python-configparser)
4985 ("python-contextlib2" ,python-contextlib2)
4986 ("python-docutils" ,python-docutils)
4987 ("python-pathlib2" ,python-pathlib2)
4988 ("python-rst.linker" ,python-rst.linker)
4989 ("python-zipp" ,python-zipp)))
4990 (native-inputs
4991 `(("python-setuptools-scm" ,python-setuptools-scm)
4992 ("python-sphinx" ,python-sphinx)))
4993 (home-page "https://importlib-metadata.readthedocs.io/")
4994 (synopsis "Read metadata from Python packages")
4995 (description
4996 "@code{importlib_metadata} is a library which provides an API for
4997 accessing an installed Python package's metadata, such as its entry points or
4998 its top-level name. This functionality intends to replace most uses of
4999 @code{pkg_resources} entry point API and metadata API. Along with
5000 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
5001 need to use the older and less efficient @code{pkg_resources} package.")
5002 (license license:asl2.0)))
5003
5004 (define-public python-jaraco-packaging
5005 (package
5006 (name "python-jaraco-packaging")
5007 (version "6.1")
5008 (source
5009 (origin
5010 (method url-fetch)
5011 (uri (pypi-uri "jaraco.packaging" version))
5012 (sha256
5013 (base32
5014 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
5015 (build-system python-build-system)
5016 (propagated-inputs
5017 `(("python-pytest" ,python-pytest)
5018 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
5019 ("python-pytest-flake8" ,python-pytest-flake8)
5020 ("python-rst.linker" ,python-rst.linker)
5021 ("python-setuptools" ,python-setuptools)
5022 ("python-setuptools-scm" ,python-setuptools-scm)
5023 ("python-six" ,python-six)
5024 ("python-sphinx" ,python-sphinx)))
5025 (home-page "https://github.com/jaraco/jaraco.packaging")
5026 (synopsis "Tools to supplement packaging Python releases")
5027 (description
5028 "This package provides various tools to supplement packaging Python
5029 releases.")
5030 (license license:expat)))
5031
5032 (define-public python-pathpy
5033 (package
5034 (name "python-pathpy")
5035 (version "11.5.1")
5036 (source
5037 (origin
5038 (method url-fetch)
5039 (uri (pypi-uri "path.py" version))
5040 (sha256
5041 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
5042 (outputs '("out" "doc"))
5043 (build-system python-build-system)
5044 (propagated-inputs
5045 `(("python-appdirs" ,python-appdirs)
5046 ("python-importlib-metadata" ,python-importlib-metadata)))
5047 (native-inputs
5048 `(("python-setuptools-scm" ,python-setuptools-scm)
5049 ("python-sphinx" ,python-sphinx)
5050 ("python-rst.linker" ,python-rst.linker)
5051 ("python-pytest" ,python-pytest)
5052 ("python-pytest-runner" ,python-pytest-runner)
5053 ("python-jaraco-packaging" ,python-jaraco-packaging)))
5054 (arguments
5055 `(#:phases
5056 (modify-phases %standard-phases
5057 (add-after 'build 'build-doc
5058 (lambda _
5059 (setenv "LANG" "en_US.UTF-8")
5060 (invoke "python" "setup.py" "build_sphinx")))
5061 (add-after 'install 'install-doc
5062 (lambda* (#:key outputs #:allow-other-keys)
5063 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5064 (doc (string-append data "/doc/" ,name "-" ,version))
5065 (html (string-append doc "/html")))
5066 (mkdir-p html)
5067 (for-each (lambda (file)
5068 (copy-file file (string-append doc "/" file)))
5069 '("README.rst" "CHANGES.rst"))
5070 (copy-recursively "build/sphinx/html" html)
5071 #t)))
5072 (replace 'check
5073 (lambda _
5074 ;; The import time test aborts if an import takes longer than
5075 ;; 100ms. It may very well take a little longer than that.
5076 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
5077 (home-page "https://github.com/jaraco/path.py")
5078 (synopsis "Python module wrapper for built-in os.path")
5079 (description
5080 "@code{path.py} implements path objects as first-class entities, allowing
5081 common operations on files to be invoked on those path objects directly.")
5082 (license license:expat)))
5083
5084 (define-public python2-pathpy
5085 (package-with-python2 python-pathpy))
5086
5087 (define-public python-simplegeneric
5088 (package
5089 (name "python-simplegeneric")
5090 (version "0.8.1")
5091 (source
5092 (origin
5093 (method url-fetch)
5094 (uri (pypi-uri "simplegeneric" version ".zip"))
5095 (sha256
5096 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5097 (build-system python-build-system)
5098 (native-inputs
5099 `(("unzip" ,unzip)))
5100 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5101 (synopsis "Python module for simple generic functions")
5102 (description
5103 "The simplegeneric module lets you define simple single-dispatch generic
5104 functions, akin to Python’s built-in generic functions like @code{len()},
5105 @code{iter()} and so on. However, instead of using specially-named methods,
5106 these generic functions use simple lookup tables, akin to those used by
5107 e.g. @code{pickle.dump()} and other generic functions found in the Python
5108 standard library.")
5109 (license license:zpl2.1)))
5110
5111 (define-public python2-simplegeneric
5112 (package-with-python2 python-simplegeneric))
5113
5114 (define-public python-ipython-genutils
5115 ;; TODO: This package is retired, check if can be removed, see description.
5116 (package
5117 (name "python-ipython-genutils")
5118 (version "0.1.0")
5119 (source
5120 (origin
5121 (method url-fetch)
5122 (uri (pypi-uri "ipython_genutils" version))
5123 (sha256
5124 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5125 (build-system python-build-system)
5126 (arguments `(#:tests? #f)) ; no tests
5127 (home-page "https://ipython.org")
5128 (synopsis "Vestigial utilities from IPython")
5129 (description
5130 "This package provides retired utilities from IPython. No packages
5131 outside IPython/Jupyter should depend on it.
5132
5133 This package shouldn't exist. It contains some common utilities shared by
5134 Jupyter and IPython projects during The Big Split. As soon as possible, those
5135 packages will remove their dependency on this, and this package will go
5136 away.")
5137 (license license:bsd-3)))
5138
5139 (define-public python2-ipython-genutils
5140 (package-with-python2 python-ipython-genutils))
5141
5142 (define-public python-traitlets
5143 (package
5144 (name "python-traitlets")
5145 (version "4.3.3")
5146 (source
5147 (origin
5148 (method url-fetch)
5149 (uri (pypi-uri "traitlets" version))
5150 (sha256
5151 (base32
5152 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
5153 (build-system python-build-system)
5154 (arguments
5155 `(#:phases
5156 (modify-phases %standard-phases
5157 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5158 (propagated-inputs
5159 `(("python-ipython-genutils" ,python-ipython-genutils)
5160 ("python-decorator" ,python-decorator)))
5161 (native-inputs
5162 `(("python-pytest" ,python-pytest)))
5163 (properties `((python2-variant . ,(delay python2-traitlets))))
5164 (home-page "https://ipython.org")
5165 (synopsis "Configuration system for Python applications")
5166 (description
5167 "Traitlets is a framework that lets Python classes have attributes with
5168 type checking, dynamically calculated default values, and ‘on change’
5169 callbacks. The package also includes a mechanism to use traitlets for
5170 configuration, loading values from files or from command line arguments. This
5171 is a distinct layer on top of traitlets, so you can use traitlets in your code
5172 without using the configuration machinery.")
5173 (license license:bsd-3)))
5174
5175 (define-public python2-traitlets
5176 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5177 (package
5178 (inherit traitlets)
5179 (propagated-inputs
5180 `(("python2-enum34" ,python2-enum34)
5181 ,@(package-propagated-inputs traitlets))))))
5182
5183 (define-public python-jupyter-core
5184 (package
5185 (name "python-jupyter-core")
5186 (version "4.4.0")
5187 (source
5188 (origin
5189 (method url-fetch)
5190 (uri (string-append (pypi-uri "jupyter_core" version)))
5191 (sha256
5192 (base32
5193 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5194 (build-system python-build-system)
5195 ;; FIXME: not sure how to run the tests
5196 (arguments `(#:tests? #f))
5197 (propagated-inputs
5198 `(("python-traitlets" ,python-traitlets)))
5199 (home-page "http://jupyter.org/")
5200 (synopsis "Jupyter base package")
5201 (description
5202 "Jupyter core is the base package on which Jupyter projects rely.")
5203 (license license:bsd-3)))
5204
5205 (define-public python2-jupyter-core
5206 (package-with-python2 python-jupyter-core))
5207
5208 (define-public python-jupyter-client
5209 (package
5210 (name "python-jupyter-client")
5211 (version "5.2.4")
5212 (source
5213 (origin
5214 (method url-fetch)
5215 (uri (pypi-uri "jupyter_client" version))
5216 (sha256
5217 (base32
5218 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5219 (build-system python-build-system)
5220 ;; Tests fail because of missing native python kernel which I assume is
5221 ;; provided by the ipython package, which we cannot use because it would
5222 ;; cause a dependency cycle.
5223 (arguments
5224 `(#:tests? #f
5225
5226 #:phases (modify-phases %standard-phases
5227 (add-after 'unpack 'set-tool-file-names
5228 (lambda* (#:key inputs #:allow-other-keys)
5229 (let ((iproute (assoc-ref inputs "iproute")))
5230 (substitute* "jupyter_client/localinterfaces.py"
5231 (("'ip'")
5232 (string-append "'" iproute "/sbin/ip'")))
5233 #t))))))
5234 (inputs
5235 `(("iproute" ,iproute)))
5236 (propagated-inputs
5237 `(("python-pyzmq" ,python-pyzmq)
5238 ("python-traitlets" ,python-traitlets)
5239 ("python-jupyter-core" ,python-jupyter-core)))
5240 (home-page "http://jupyter.org/")
5241 (synopsis "Jupyter protocol implementation and client libraries")
5242 (description
5243 "The @code{jupyter_client} package contains the reference implementation
5244 of the Jupyter protocol. It also provides client and kernel management APIs
5245 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5246 installing @code{kernelspec}s for use with Jupyter frontends.")
5247 (license license:bsd-3)))
5248
5249 (define-public python2-jupyter-client
5250 (package-with-python2 python-jupyter-client))
5251
5252 (define-public python-ipykernel
5253 (package
5254 (name "python-ipykernel")
5255 (version "5.1.3")
5256 (source
5257 (origin
5258 (method url-fetch)
5259 (uri (pypi-uri "ipykernel" version))
5260 (sha256
5261 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
5262 (build-system python-build-system)
5263 (arguments
5264 `(#:phases
5265 (modify-phases %standard-phases
5266 (replace 'check
5267 (lambda _
5268 (setenv "HOME" "/tmp")
5269 (invoke "pytest" "-v")
5270 #t))
5271 (add-after 'install 'set-python-file-name
5272 (lambda* (#:key outputs #:allow-other-keys)
5273 ;; Record the absolute file name of the 'python' executable in
5274 ;; 'kernel.json'.
5275 (let ((out (assoc-ref outputs "out")))
5276 (substitute* (string-append out "/share/jupyter"
5277 "/kernels/python3/kernel.json")
5278 (("\"python\"")
5279 (string-append "\"" (which "python") "\"")))
5280 #t))))))
5281 (propagated-inputs
5282 `(("python-ipython" ,python-ipython)
5283 ;; imported at runtime during connect
5284 ("python-jupyter-client" ,python-jupyter-client)))
5285 (native-inputs
5286 `(("python-flaky" ,python-flaky)
5287 ("python-nose" ,python-nose)
5288 ("python-pytest" ,python-pytest)))
5289 (home-page "https://ipython.org")
5290 (synopsis "IPython Kernel for Jupyter")
5291 (description
5292 "This package provides the IPython kernel for Jupyter.")
5293 (license license:bsd-3)))
5294
5295 ;; Version 5.1.1 and above no longer support Python 2.
5296 (define-public python2-ipykernel
5297 (package
5298 (name "python2-ipykernel")
5299 (version "5.1.0")
5300 (source
5301 (origin
5302 (method url-fetch)
5303 (uri (pypi-uri "ipykernel" version))
5304 (sha256
5305 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5306 (build-system python-build-system)
5307 (arguments
5308 `(#:python ,python-2
5309 #:phases
5310 (modify-phases %standard-phases
5311 (replace 'check
5312 (lambda _
5313 (setenv "HOME" "/tmp")
5314 (invoke "pytest" "-v")
5315 #t)))))
5316 (propagated-inputs
5317 `(("python2-ipython" ,python2-ipython)
5318 ;; imported at runtime during connect
5319 ("python2-jupyter-client" ,python2-jupyter-client)))
5320 (native-inputs
5321 `(("python2-pytest" ,python2-pytest)
5322 ("python2-nose" ,python2-nose)))
5323 (home-page "https://ipython.org")
5324 (synopsis "IPython Kernel for Jupyter")
5325 (description
5326 "This package provides the IPython kernel for Jupyter.")
5327 (license license:bsd-3)))
5328
5329 (define-public python-pari-jupyter
5330 (package
5331 (name "python-pari-jupyter")
5332 (version "1.3.2")
5333 (source
5334 (origin
5335 (method url-fetch)
5336 (uri (pypi-uri "pari_jupyter" version))
5337 (sha256
5338 (base32
5339 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5340 (build-system python-build-system)
5341 (propagated-inputs
5342 `(("python-ipykernel" ,python-ipykernel)))
5343 (inputs
5344 `(("pari-gp" ,pari-gp)
5345 ("readline" ,readline)))
5346 (arguments
5347 `(#:tests? #f)) ; no test suite
5348 (home-page
5349 "https://github.com/jdemeyer/pari_jupyter")
5350 (synopsis "A Jupyter kernel for PARI/GP")
5351 (description "The package provides a PARI/GP kernel for Jupyter.")
5352 (license license:gpl3+)))
5353
5354 (define-public python-backcall
5355 (package
5356 (name "python-backcall")
5357 (version "0.1.0")
5358 (source
5359 (origin
5360 (method url-fetch)
5361 (uri (pypi-uri "backcall" version))
5362 (sha256
5363 (base32
5364 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5365 (build-system python-build-system)
5366 (home-page "https://github.com/takluyver/backcall/")
5367 (synopsis "Specifications for callback functions passed in to an API")
5368 (description
5369 "If your code lets other people supply callback functions, it's important
5370 to specify the function signature you expect, and check that functions support
5371 that. Adding extra parameters later would break other peoples code unless
5372 you're careful. The @code{backcall} package provides a way of specifying the
5373 callback signature using a prototype function.")
5374 (license license:bsd-3)))
5375
5376 ;; This is the latest release of the LTS version of ipython with support for
5377 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
5378 ;; dropped support for Python 2.7.
5379 (define-public python2-ipython
5380 (package
5381 (name "python2-ipython")
5382 (version "5.8.0")
5383 (source
5384 (origin
5385 (method url-fetch)
5386 (uri (pypi-uri "ipython" version ".tar.gz"))
5387 (sha256
5388 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5389 (build-system python-build-system)
5390 (propagated-inputs
5391 `(("python2-backports-shutil-get-terminal-size"
5392 ,python2-backports-shutil-get-terminal-size)
5393 ("python2-pathlib2" ,python2-pathlib2)
5394 ("python2-pyzmq" ,python2-pyzmq)
5395 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5396 ("python2-terminado" ,python2-terminado)
5397 ("python2-matplotlib" ,python2-matplotlib)
5398 ("python2-numpy" ,python2-numpy)
5399 ("python2-numpydoc" ,python2-numpydoc)
5400 ("python2-jinja2" ,python2-jinja2)
5401 ("python2-mistune" ,python2-mistune)
5402 ("python2-pexpect" ,python2-pexpect)
5403 ("python2-pickleshare" ,python2-pickleshare)
5404 ("python2-simplegeneric" ,python2-simplegeneric)
5405 ("python2-jsonschema" ,python2-jsonschema)
5406 ("python2-traitlets" ,python2-traitlets)
5407 ("python2-nbformat" ,python2-nbformat)
5408 ("python2-pygments" ,python2-pygments)))
5409 (inputs
5410 `(("readline" ,readline)
5411 ("which" ,which)))
5412 (native-inputs
5413 `(("graphviz" ,graphviz)
5414 ("pkg-config" ,pkg-config)
5415 ("python2-requests" ,python2-requests) ;; for tests
5416 ("python2-testpath" ,python2-testpath)
5417 ("python2-mock" ,python2-mock)
5418 ("python2-nose" ,python2-nose)))
5419 (arguments
5420 `(#:python ,python-2
5421 #:phases
5422 (modify-phases %standard-phases
5423 (add-before 'check 'delete-broken-tests
5424 (lambda* (#:key inputs #:allow-other-keys)
5425 ;; These tests throw errors for unknown reasons.
5426 (delete-file "IPython/core/tests/test_profile.py")
5427 (delete-file "IPython/core/tests/test_interactiveshell.py")
5428 (delete-file "IPython/core/tests/test_magic.py")
5429 #t)))))
5430 (home-page "https://ipython.org")
5431 (synopsis "IPython is a tool for interactive computing in Python")
5432 (description
5433 "IPython provides a rich architecture for interactive computing with:
5434 Powerful interactive shells, a browser-based notebook, support for interactive
5435 data visualization, embeddable interpreters and tools for parallel
5436 computing.")
5437 (license license:bsd-3)))
5438
5439 (define-public python-ipython
5440 (package
5441 (name "python-ipython")
5442 (version "7.9.0")
5443 (source
5444 (origin
5445 (method url-fetch)
5446 (uri (pypi-uri "ipython" version ".tar.gz"))
5447 (sha256
5448 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
5449 (build-system python-build-system)
5450 (propagated-inputs
5451 `(("python-backcall" ,python-backcall)
5452 ("python-pyzmq" ,python-pyzmq)
5453 ("python-prompt-toolkit" ,python-prompt-toolkit)
5454 ("python-terminado" ,python-terminado)
5455 ("python-matplotlib" ,python-matplotlib)
5456 ("python-numpy" ,python-numpy)
5457 ("python-numpydoc" ,python-numpydoc)
5458 ("python-jedi" ,python-jedi)
5459 ("python-jinja2" ,python-jinja2)
5460 ("python-mistune" ,python-mistune)
5461 ("python-pexpect" ,python-pexpect)
5462 ("python-pickleshare" ,python-pickleshare)
5463 ("python-simplegeneric" ,python-simplegeneric)
5464 ("python-jsonschema" ,python-jsonschema)
5465 ("python-traitlets" ,python-traitlets)
5466 ("python-nbformat" ,python-nbformat)
5467 ("python-pygments" ,python-pygments)))
5468 (inputs
5469 `(("readline" ,readline)
5470 ("which" ,which)))
5471 (native-inputs
5472 `(("graphviz" ,graphviz)
5473 ("pkg-config" ,pkg-config)
5474 ("python-requests" ,python-requests) ;; for tests
5475 ("python-testpath" ,python-testpath)
5476 ("python-nose" ,python-nose)))
5477 (arguments
5478 `(#:phases
5479 (modify-phases %standard-phases
5480 (add-after 'unpack 'make-docs-reproducible
5481 (lambda _
5482 (substitute* "IPython/sphinxext/ipython_directive.py"
5483 ((".*import datetime") "")
5484 ((".*datetime.datetime.now\\(\\)") "")
5485 (("%timeit") "# %timeit"))
5486 #t))
5487 ;; Tests can only be run after the library has been installed and not
5488 ;; within the source directory.
5489 (delete 'check)
5490 (add-after 'install 'check
5491 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5492 (if tests?
5493 (begin
5494 ;; Make installed package available for running the tests
5495 (add-installed-pythonpath inputs outputs)
5496 (setenv "HOME" "/tmp/") ;; required by a test
5497 ;; We only test the core because one of the other tests
5498 ;; tries to import ipykernel.
5499 (invoke "python" "IPython/testing/iptest.py"
5500 "-v" "IPython/core/tests"))
5501 #t)))
5502 (add-before 'check 'fix-tests
5503 (lambda* (#:key inputs #:allow-other-keys)
5504 (substitute* "./IPython/utils/_process_posix.py"
5505 (("/usr/bin/env', 'which") (which "which")))
5506 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5507 (("#!/usr/bin/env python")
5508 (string-append "#!" (which "python"))))
5509 ;; This test introduces a circular dependency on ipykernel
5510 ;; (which depends on ipython).
5511 (delete-file "IPython/core/tests/test_display.py")
5512 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
5513 (delete-file "IPython/core/tests/test_interactiveshell.py")
5514 #t)))))
5515 (home-page "https://ipython.org")
5516 (synopsis "IPython is a tool for interactive computing in Python")
5517 (description
5518 "IPython provides a rich architecture for interactive computing with:
5519 Powerful interactive shells, a browser-based notebook, support for interactive
5520 data visualization, embeddable interpreters and tools for parallel
5521 computing.")
5522 (license license:bsd-3)))
5523
5524 (define-public python-ipython-documentation
5525 (package
5526 (inherit python-ipython)
5527 (name "python-ipython-documentation")
5528 (version (package-version python-ipython))
5529 (arguments
5530 `(#:phases
5531 (modify-phases %standard-phases
5532 (delete 'build)
5533 (delete 'check)
5534 (replace 'install
5535 (lambda* (#:key outputs #:allow-other-keys)
5536 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5537 (doc (string-append data "/doc/" ,name "-" ,version))
5538 (html (string-append doc "/html"))
5539 (man1 (string-append data "/man/man1"))
5540 (info (string-append data "/info"))
5541 (examples (string-append doc "/examples"))
5542 (python-arg (string-append "PYTHON=" (which "python"))))
5543 (setenv "LANG" "en_US.utf8")
5544 (with-directory-excursion "docs"
5545 ;; FIXME: pdf fails to build
5546 ;;(system* "make" "pdf" "PAPER=a4")
5547 (system* "make" python-arg "html")
5548 ;; FIXME: the generated texi file contains ^@^@, which trips
5549 ;; up the parser.
5550 ;; (system* "make" python-arg "info")
5551 )
5552 (copy-recursively "docs/man" man1)
5553 (copy-recursively "examples" examples)
5554 (copy-recursively "docs/build/html" html)
5555 ;; (copy-file "docs/build/latex/ipython.pdf"
5556 ;; (string-append doc "/ipython.pdf"))
5557 (mkdir-p info)
5558 ;; (copy-file "docs/build/texinfo/ipython.info"
5559 ;; (string-append info "/ipython.info"))
5560 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5561 #t)))))
5562 (inputs
5563 `(("python-ipython" ,python-ipython)
5564 ("python-ipykernel" ,python-ipykernel)))
5565 (native-inputs
5566 `(("python-sphinx" ,python-sphinx)
5567 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
5568 ;; FIXME: It's possible that a smaller union would work just as well.
5569 ("texlive" ,(texlive-union (list texlive-amsfonts
5570 texlive-fonts-ec
5571 texlive-generic-ifxetex
5572 texlive-generic-pdftex
5573 texlive-latex-capt-of
5574 texlive-latex-cmap
5575 texlive-latex-environ
5576 texlive-latex-eqparbox
5577 texlive-latex-etoolbox
5578 texlive-latex-expdlist
5579 texlive-latex-fancyhdr
5580 texlive-latex-fancyvrb
5581 texlive-latex-fncychap
5582 texlive-latex-float
5583 texlive-latex-framed
5584 texlive-latex-geometry
5585 texlive-latex-graphics
5586 texlive-latex-hyperref
5587 texlive-latex-mdwtools
5588 texlive-latex-multirow
5589 texlive-latex-needspace
5590 texlive-latex-oberdiek
5591 texlive-latex-parskip
5592 texlive-latex-preview
5593 texlive-latex-tabulary
5594 texlive-latex-threeparttable
5595 texlive-latex-titlesec
5596 texlive-latex-trimspaces
5597 texlive-latex-ucs
5598 texlive-latex-upquote
5599 texlive-latex-url
5600 texlive-latex-varwidth
5601 texlive-latex-wrapfig)))
5602 ("texinfo" ,texinfo)))))
5603
5604 (define-public python-urwid
5605 (package
5606 (name "python-urwid")
5607 (version "2.0.1")
5608 (source
5609 (origin
5610 (method url-fetch)
5611 (uri (pypi-uri "urwid" version))
5612 (sha256
5613 (base32
5614 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5615 (build-system python-build-system)
5616 (home-page "http://urwid.org")
5617 (synopsis "Console user interface library for Python")
5618 (description
5619 "Urwid is a curses-based UI/widget library for Python. It includes many
5620 features useful for text console applications.")
5621 (license license:lgpl2.1+)))
5622
5623 (define-public python2-urwid
5624 (package-with-python2 python-urwid))
5625
5626 (define-public python-urwidtrees
5627 (package
5628 (name "python-urwidtrees")
5629 (version "1.0.2")
5630 (source
5631 (origin
5632 (method url-fetch)
5633 ;; package author intends on distributing via github rather than pypi:
5634 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5635 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5636 version ".tar.gz"))
5637 (file-name (string-append name "-" version ".tar.gz"))
5638 (sha256
5639 (base32
5640 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5641 (build-system python-build-system)
5642 (arguments
5643 '(#:tests? #f)) ; no tests
5644 (propagated-inputs `(("python-urwid" ,python-urwid)))
5645 (home-page "https://github.com/pazz/urwidtrees")
5646 (synopsis "Tree widgets for urwid")
5647 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5648 toolkit. Use it to build trees of widgets.")
5649 (license license:gpl3+)))
5650
5651 (define-public python2-urwidtrees
5652 (package-with-python2 python-urwidtrees))
5653
5654 (define-public python-ua-parser
5655 (package
5656 (name "python-ua-parser")
5657 (version "0.8.0")
5658 (source
5659 (origin
5660 (method url-fetch)
5661 (uri (pypi-uri "ua-parser" version))
5662 (sha256
5663 (base32
5664 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5665 (build-system python-build-system)
5666 (arguments
5667 `(#:tests? #f)) ;no test suite in release
5668 (native-inputs
5669 `(("python-pyyaml" ,python-pyyaml)))
5670 (home-page "https://github.com/ua-parser/uap-python")
5671 (synopsis "User agent parser")
5672 (description
5673 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5674 (license license:asl2.0)))
5675
5676 (define-public python2-ua-parser
5677 (package-with-python2 python-ua-parser))
5678
5679 (define-public python-user-agents
5680 (package
5681 (name "python-user-agents")
5682 (version "1.1.0")
5683 (source
5684 (origin
5685 (method url-fetch)
5686 (uri (pypi-uri "user-agents" version))
5687 (sha256
5688 (base32
5689 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5690 (build-system python-build-system)
5691 (arguments
5692 `(#:tests? #f)) ;missing devices.json test file in release
5693 (propagated-inputs
5694 `(("python-ua-parser" ,python-ua-parser)))
5695 (home-page "https://github.com/selwin/python-user-agents")
5696 (synopsis "User Agent strings parsing library")
5697 (description
5698 "A library to identify devices (phones, tablets) and their capabilities by
5699 parsing (browser/HTTP) user agent strings.")
5700 (license license:expat)))
5701
5702 (define-public python2-user-agents
5703 (package-with-python2 python-user-agents))
5704
5705 (define-public python-dbus
5706 (package
5707 (name "python-dbus")
5708 (version "1.2.14")
5709 (source
5710 (origin
5711 (method url-fetch)
5712 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5713 "dbus-python-" version ".tar.gz"))
5714 (sha256
5715 (base32 "0cdchkgnivlka4lf8q4qfk0yxq483i3r3aqickjf8hfn7nx0c0mi"))))
5716 (build-system gnu-build-system)
5717 (native-inputs
5718 `(("pkg-config" ,pkg-config)))
5719 (inputs
5720 `(("python" ,python-wrapper)
5721 ("dbus-glib" ,dbus-glib)))
5722 (synopsis "Python bindings for D-bus")
5723 (description "python-dbus provides bindings for libdbus, the reference
5724 implementation of D-Bus.")
5725 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5726 (license license:expat)))
5727
5728 (define-public python2-dbus
5729 (package (inherit python-dbus)
5730 (name "python2-dbus")
5731 (inputs `(("python" ,python-2)
5732 ,@(alist-delete "python"
5733 (package-inputs python-dbus)
5734 equal?)))))
5735
5736 (define-public python-notify2
5737 (package
5738 (name "python-notify2")
5739 (version "0.3.1")
5740 (source
5741 (origin
5742 (method url-fetch)
5743 (uri (pypi-uri "notify2" version))
5744 (sha256
5745 (base32
5746 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
5747 (build-system python-build-system)
5748 (arguments `(#:tests? #f)) ; tests depend on system state
5749 (native-inputs
5750 `(("python-dbus" ,python-dbus)))
5751 (home-page "https://bitbucket.org/takluyver/pynotify2")
5752 (synopsis "Python interface to D-Bus notifications")
5753 (description
5754 "Pynotify2 provides a Python interface for sending D-Bus notifications.
5755 It is a reimplementation of pynotify in pure Python, and an alternative to
5756 the GObject Introspection bindings to libnotify for non-GTK applications.")
5757 (license (list license:bsd-2
5758 license:lgpl2.1+))))
5759
5760 (define-public python2-notify2
5761 (package-with-python2 python-notify2))
5762
5763 (define-public python-lxml
5764 (package
5765 (name "python-lxml")
5766 (version "4.4.1")
5767 (source
5768 (origin
5769 (method url-fetch)
5770 (uri (pypi-uri "lxml" version))
5771 (sha256
5772 (base32
5773 "14jnpfcpgqr9sx8ppd286jzcbk0b36hbqsvd8jkvffipzw5v8768"))))
5774 (build-system python-build-system)
5775 (arguments
5776 `(#:phases (modify-phases %standard-phases
5777 (replace 'check
5778 (lambda _
5779 (invoke "make" "test"))))))
5780 (inputs
5781 `(("libxml2" ,libxml2)
5782 ("libxslt" ,libxslt)))
5783 (home-page "http://lxml.de/")
5784 (synopsis
5785 "Python XML processing library")
5786 (description
5787 "The lxml XML toolkit is a Pythonic binding for the C libraries
5788 libxml2 and libxslt.")
5789 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5790
5791 (define-public python2-lxml
5792 (package-with-python2 python-lxml))
5793
5794 ;; beautifulsoup4 has a totally different namespace than 3.x,
5795 ;; and pypi seems to put it under its own name, so I guess we should too
5796 (define-public python-beautifulsoup4
5797 (package
5798 (name "python-beautifulsoup4")
5799 (version "4.7.1")
5800 (source
5801 (origin
5802 (method url-fetch)
5803 (uri (pypi-uri "beautifulsoup4" version))
5804 (sha256
5805 (base32
5806 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
5807 (build-system python-build-system)
5808 (arguments
5809 `(#:phases
5810 (modify-phases %standard-phases
5811 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5812 ;; must use this conversion script when building with Python 3. The
5813 ;; conversion script also runs the tests.
5814 ;; For more information, see the file 'convert-py3k' in the source
5815 ;; distribution.
5816 (replace 'check
5817 (lambda _ (invoke "./convert-py3k"))))))
5818 (propagated-inputs
5819 `(("python-soupsieve" ,python-soupsieve)))
5820 (home-page
5821 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5822 (synopsis
5823 "Python screen-scraping library")
5824 (description
5825 "Beautiful Soup is a Python library designed for rapidly setting up
5826 screen-scraping projects. It offers Pythonic idioms for navigating,
5827 searching, and modifying a parse tree, providing a toolkit for
5828 dissecting a document and extracting what you need. It automatically
5829 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5830 (license license:expat)
5831 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5832
5833 (define-public python2-beautifulsoup4
5834 (package
5835 (inherit (package-with-python2
5836 (strip-python2-variant python-beautifulsoup4)))
5837 (arguments `(#:python ,python-2))))
5838
5839 (define-public python-soupsieve
5840 (package
5841 (name "python-soupsieve")
5842 (version "1.9.5")
5843 (source
5844 (origin
5845 (method url-fetch)
5846 (uri (pypi-uri "soupsieve" version))
5847 (sha256
5848 (base32
5849 "1nhd0q0ifwva9wn645s6pn74p1rd97asn3qfg75nphx1wkgcbhg2"))))
5850 (build-system python-build-system)
5851 (arguments `(#:tests? #f))
5852 ;;XXX: 2 tests fail currently despite claming they were to be
5853 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
5854 ;;don't want to create a circular dependency.
5855 (home-page "https://github.com/facelessuser/soupsieve")
5856 (synopsis "CSS selector library")
5857 (description
5858 "Soup Sieve is a CSS selector library designed to be used with Beautiful
5859 Soup 4. It aims to provide selecting, matching, and filtering using modern
5860 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
5861 specifications up through the latest CSS level 4 drafts and beyond (though
5862 some are not yet implemented).")
5863 (properties `((python2-variant . ,(delay python2-soupsieve))))
5864 (license license:expat)))
5865
5866 (define-public python2-soupsieve
5867 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
5868 (package
5869 (inherit base)
5870 (propagated-inputs
5871 `(("python2-backports-functools-lru-cache"
5872 ,python2-backports-functools-lru-cache)
5873 ,@(package-propagated-inputs base))))))
5874
5875 (define-public python-netifaces
5876 (package
5877 (name "python-netifaces")
5878 (version "0.10.7")
5879 (source
5880 (origin
5881 (method url-fetch)
5882 (uri (pypi-uri "netifaces" version))
5883 (sha256
5884 (base32
5885 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5886 (build-system python-build-system)
5887 (home-page "https://github.com/al45tair/netifaces")
5888 (synopsis
5889 "Python module for portable network interface information")
5890 (description
5891 "Netifaces is a Python module providing information on network
5892 interfaces in an easy and portable manner.")
5893 (license license:expat)))
5894
5895 (define-public python2-netifaces
5896 (package-with-python2 python-netifaces))
5897
5898 (define-public python-networkx
5899 (package
5900 (name "python-networkx")
5901 (version "2.2")
5902 (source
5903 (origin
5904 (method url-fetch)
5905 (uri (pypi-uri "networkx" version ".zip"))
5906 (sha256
5907 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5908 (build-system python-build-system)
5909 ;; python-decorator is needed at runtime.
5910 (propagated-inputs
5911 `(("python-decorator" ,python-decorator)))
5912 (native-inputs
5913 `(("python-nose" ,python-nose)
5914 ("unzip" ,unzip)))
5915 (home-page "https://networkx.github.io/")
5916 (synopsis "Python module for creating and manipulating graphs and networks")
5917 (description
5918 "NetworkX is a Python package for the creation, manipulation, and study
5919 of the structure, dynamics, and functions of complex networks.")
5920 (license license:bsd-3)))
5921
5922 (define-public python2-networkx
5923 (package-with-python2 python-networkx))
5924
5925 (define-public python-datrie
5926 (package
5927 (name "python-datrie")
5928 (version "0.8")
5929 (source
5930 (origin
5931 (method url-fetch)
5932 (uri (pypi-uri "datrie" version))
5933 (sha256
5934 (base32
5935 "0338r8xgmpy78556jhms0h6qkvyjr10p8bpgdvcpqzm9lrmxmmdx"))))
5936 (build-system python-build-system)
5937 (native-inputs
5938 `(("python-cython" ,python-cython)
5939 ("python-hypothesis" ,python-hypothesis)
5940 ("python-pytest" ,python-pytest)
5941 ("python-pytest-runner" ,python-pytest-runner)))
5942 (home-page "https://github.com/kmike/datrie")
5943 (synopsis "Fast, efficiently stored trie for Python")
5944 (description
5945 "This package provides a fast, efficiently stored trie implementation for
5946 Python.")
5947 (license license:lgpl2.1+)))
5948
5949 (define-public snakemake
5950 (package
5951 (name "snakemake")
5952 (version "5.7.1")
5953 (source
5954 (origin
5955 (method url-fetch)
5956 (uri (pypi-uri "snakemake" version))
5957 (sha256
5958 (base32 "1pnpvvn8n2a78cg360wz3ldmpqrsm2wzi0c0dmvki9fnsw6fxdas"))))
5959 (build-system python-build-system)
5960 (arguments
5961 ;; TODO: Package missing test dependencies.
5962 '(#:tests? #f
5963 #:phases
5964 (modify-phases %standard-phases
5965 ;; For cluster execution Snakemake will call Python. Since there is
5966 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5967 ;; this by calling the snakemake wrapper instead.
5968 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5969 (lambda* (#:key outputs #:allow-other-keys)
5970 (substitute* "snakemake/executors.py"
5971 (("\\{sys.executable\\} -m snakemake")
5972 (string-append (assoc-ref outputs "out")
5973 "/bin/snakemake")))
5974 #t)))))
5975 (propagated-inputs
5976 `(("python-appdirs" ,python-appdirs)
5977 ("python-configargparse" ,python-configargparse)
5978 ("python-datrie" ,python-datrie)
5979 ("python-docutils" ,python-docutils)
5980 ("python-gitpython" ,python-gitpython)
5981 ("python-jinja2" ,python-jinja2)
5982 ("python-jsonschema" ,python-jsonschema)
5983 ("python-networkx" ,python-networkx)
5984 ("python-psutil" ,python-psutil)
5985 ("python-pyyaml" ,python-pyyaml)
5986 ("python-ratelimiter" ,python-ratelimiter)
5987 ("python-requests" ,python-requests)
5988 ("python-wrapt" ,python-wrapt)))
5989 (home-page "https://snakemake.readthedocs.io")
5990 (synopsis "Python-based execution environment for make-like workflows")
5991 (description
5992 "Snakemake aims to reduce the complexity of creating workflows by
5993 providing a clean and modern domain specific specification language (DSL) in
5994 Python style, together with a fast and comfortable execution environment.")
5995 (license license:expat)))
5996
5997 (define-public python-pyqrcode
5998 (package
5999 (name "python-pyqrcode")
6000 (version "1.2.1")
6001 (source
6002 (origin
6003 (method url-fetch)
6004 (uri (pypi-uri "PyQRCode" version))
6005 (sha256
6006 (base32
6007 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
6008 (build-system python-build-system)
6009 (home-page
6010 "https://github.com/mnooner256/pyqrcode")
6011 (synopsis "QR code generator")
6012 (description
6013 "Pyqrcode is a QR code generator written purely in Python with
6014 SVG, EPS, PNG and terminal output.")
6015 (license license:bsd-3)))
6016
6017 (define-public python-seaborn
6018 (package
6019 (name "python-seaborn")
6020 (version "0.9.0")
6021 (source
6022 (origin
6023 (method url-fetch)
6024 (uri (pypi-uri "seaborn" version))
6025 (sha256
6026 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))
6027 (patches
6028 (list (origin
6029 (method url-fetch)
6030 ;; This has already been merged, but there is no new
6031 ;; release including this patch. It fixes problems
6032 ;; with axis rotation that would lead to test
6033 ;; failures.
6034 (uri "https://patch-diff.githubusercontent.com/raw/mwaskom/seaborn/pull/1716.diff")
6035 (sha256
6036 (base32
6037 "1lm870z316n9ivsyr86hpk1gxaraw0mrjvq42lqsm0znhjdp9q9w"))
6038 (file-name "seaborn-0.9.0-axis-rotation.patch"))))))
6039 (build-system python-build-system)
6040 (arguments
6041 `(#:phases
6042 (modify-phases %standard-phases
6043 (add-before 'check 'start-xserver
6044 (lambda* (#:key inputs #:allow-other-keys)
6045 (let ((xorg-server (assoc-ref inputs "xorg-server")))
6046 ;; There must be a running X server and make check doesn't
6047 ;; start one. Therefore we must do it.
6048 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
6049 (setenv "DISPLAY" ":1")
6050 #t)))
6051 (add-after 'unpack 'fix-tests
6052 (lambda _
6053 ;; test_cbar_ticks fails probably because of matplotlib's
6054 ;; expectation of using an older version of FreeType.
6055 (delete-file "seaborn/tests/test_matrix.py")
6056 #t))
6057 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
6058 (propagated-inputs
6059 `(("python-pandas" ,python-pandas)
6060 ("python-matplotlib" ,python-matplotlib)
6061 ("python-numpy" ,python-numpy)
6062 ("python-scipy" ,python-scipy)))
6063 (native-inputs
6064 `(("python-pytest" ,python-pytest)
6065 ("xorg-server" ,xorg-server-for-tests)))
6066 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6067 (synopsis "Statistical data visualization")
6068 (description
6069 "Seaborn is a library for making attractive and informative statistical
6070 graphics in Python. It is built on top of matplotlib and tightly integrated
6071 with the PyData stack, including support for numpy and pandas data structures
6072 and statistical routines from scipy and statsmodels.")
6073 (license license:bsd-3)))
6074
6075 (define-public python2-seaborn
6076 (package-with-python2 python-seaborn))
6077
6078 (define-public python-mpmath
6079 (package
6080 (name "python-mpmath")
6081 (version "0.19")
6082 (source (origin
6083 (method url-fetch)
6084 (uri (string-append "http://mpmath.org/files/mpmath-"
6085 version ".tar.gz"))
6086 (sha256
6087 (base32
6088 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6089 (build-system python-build-system)
6090 (arguments
6091 '(#:phases
6092 (modify-phases %standard-phases
6093 (replace 'check
6094 (lambda _
6095 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
6096 (home-page "http://mpmath.org")
6097 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6098 (description
6099 "@code{mpmath} can be used as an arbitrary-precision substitute for
6100 Python's float/complex types and math/cmath modules, but also does much
6101 more advanced mathematics.")
6102 (license license:bsd-3)))
6103
6104 (define-public python2-mpmath
6105 (package-with-python2 python-mpmath))
6106
6107 (define-public python-bigfloat
6108 (package
6109 (name "python-bigfloat")
6110 (version "0.3.0")
6111 (source
6112 (origin
6113 (method url-fetch)
6114 (uri (pypi-uri "bigfloat" version))
6115 (sha256
6116 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6117 (build-system python-build-system)
6118 (inputs
6119 `(("mpfr" ,mpfr)))
6120 (home-page "https://github.com/mdickinson/bigfloat")
6121 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6122 (description
6123 "This package provides a Python interface to the MPFR library for
6124 multiprecision arithmetic.")
6125 (license license:lgpl3+)))
6126
6127 (define-public python2-bigfloat
6128 (package-with-python2 python-bigfloat))
6129
6130 (define-public python-sympy
6131 (package
6132 (name "python-sympy")
6133 (version "1.1.1")
6134 (source
6135 (origin
6136 (method url-fetch)
6137 (uri (string-append
6138 "https://github.com/sympy/sympy/releases/download/sympy-"
6139 version "/sympy-" version ".tar.gz"))
6140 (sha256
6141 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6142 (build-system python-build-system)
6143 (arguments
6144 `(#:phases
6145 (modify-phases %standard-phases
6146 ;; Run the core tests after installation. By default it would run
6147 ;; *all* tests, which take a very long time to complete and are known
6148 ;; to be flaky.
6149 (delete 'check)
6150 (add-after 'install 'check
6151 (lambda* (#:key outputs #:allow-other-keys)
6152 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6153 #t)))))
6154 (propagated-inputs
6155 `(("python-mpmath" ,python-mpmath)))
6156 (home-page "http://www.sympy.org/")
6157 (synopsis "Python library for symbolic mathematics")
6158 (description
6159 "SymPy is a Python library for symbolic mathematics. It aims to become a
6160 full-featured computer algebra system (CAS) while keeping the code as simple
6161 as possible in order to be comprehensible and easily extensible.")
6162 (license license:bsd-3)))
6163
6164 (define-public python2-sympy
6165 (package
6166 (inherit (package-with-python2 python-sympy))
6167 (arguments
6168 `(#:phases
6169 (modify-phases %standard-phases
6170 ;; Run the core tests after installation. By default it would run
6171 ;; *all* tests, which take a very long time to complete and are known
6172 ;; to be flaky.
6173 (delete 'check)
6174 (add-after 'install 'check
6175 (lambda* (#:key outputs #:allow-other-keys)
6176 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6177 #t)))))))
6178
6179 (define-public python-q
6180 (package
6181 (name "python-q")
6182 (version "2.6")
6183 (source
6184 (origin
6185 (method url-fetch)
6186 (uri (pypi-uri "q" version))
6187 (sha256
6188 (base32
6189 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6190 (build-system python-build-system)
6191 (home-page "https://github.com/zestyping/q")
6192 (synopsis "Quick-and-dirty debugging output for tired programmers")
6193 (description
6194 "q is a Python module for \"print\" style of debugging Python code. It
6195 provides convenient short API for print out of values, tracebacks, and
6196 falling into the Python interpreter.")
6197 (license license:asl2.0)))
6198
6199 (define-public python2-q
6200 (package-with-python2 python-q))
6201
6202 (define-public python2-xlib
6203 (package
6204 (name "python2-xlib")
6205 (version "0.14")
6206 (source (origin
6207 (method url-fetch)
6208 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6209 "/" version "/"
6210 "python-xlib-" version ".tar.gz"))
6211 (sha256
6212 (base32
6213 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6214 (build-system python-build-system)
6215 (arguments
6216 `(#:python ,python-2 ;Python 2 only
6217 #:tests? #f)) ;no tests
6218 (home-page "http://python-xlib.sourceforge.net/")
6219 (synopsis "Python X11 client library")
6220 (description
6221 "The Python X Library is intended to be a fully functional X client
6222 library for Python programs. It is useful to implement low-level X clients.
6223 It is written entirely in Python.")
6224 (license license:gpl2+)))
6225
6226 (define-public python-singledispatch
6227 (package
6228 (name "python-singledispatch")
6229 (version "3.4.0.3")
6230 (source
6231 (origin
6232 (method url-fetch)
6233 (uri (pypi-uri "singledispatch" version))
6234 (sha256
6235 (base32
6236 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6237 (build-system python-build-system)
6238 (native-inputs
6239 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6240 (home-page
6241 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6242 (synopsis "Backport of singledispatch feature from Python 3.4")
6243 (description
6244 "This library brings functools.singledispatch from Python 3.4 to Python
6245 2.6-3.3.")
6246 (license license:expat)))
6247
6248 (define-public python2-singledispatch
6249 (package-with-python2 python-singledispatch))
6250
6251 ;; the python- version can be removed with python-3.5
6252 (define-public python-backports-abc
6253 (package
6254 (name "python-backports-abc")
6255 (version "0.5")
6256 (source
6257 (origin
6258 (method url-fetch)
6259 (uri (pypi-uri "backports_abc" version))
6260 (sha256
6261 (base32
6262 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6263 (build-system python-build-system)
6264 (home-page "https://github.com/cython/backports_abc")
6265 (synopsis "Backport of additions to the 'collections.abc' module")
6266 (description
6267 "Python-backports-abc provides a backport of additions to the
6268 @code{collections.abc} module in Python-3.5.")
6269 (license license:psfl)))
6270
6271 (define-public python2-backports-abc
6272 (package-with-python2 python-backports-abc))
6273
6274 (define-public python-backports-csv
6275 (package
6276 (name "python-backports-csv")
6277 (version "1.0.5")
6278 (source
6279 (origin
6280 (method url-fetch)
6281 (uri (pypi-uri "backports.csv" version))
6282 (sha256
6283 (base32
6284 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6285 (build-system python-build-system)
6286 (home-page "https://github.com/ryanhiebert/backports.csv")
6287 (synopsis "Backport of Python 3's csv module for Python 2")
6288 (description
6289 "Provides a backport of Python 3's @code{csv} module for parsing
6290 comma separated values. The API of the @code{csv} module in Python 2
6291 is drastically different from the @code{csv} module in Python 3.
6292 This is due, for the most part, to the difference between str in
6293 Python 2 and Python 3.")
6294 (license license:psfl)))
6295
6296 (define-public python2-backports-csv
6297 (package-with-python2 python-backports-csv))
6298
6299 (define-public python2-backports-shutil-get-terminal-size
6300 (package
6301 (name "python2-backports-shutil-get-terminal-size")
6302 (version "1.0.0")
6303 (source
6304 (origin
6305 (method url-fetch)
6306 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6307 (sha256
6308 (base32
6309 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6310 (build-system python-build-system)
6311 (arguments
6312 `(#:python ,python-2
6313 #:phases
6314 (modify-phases %standard-phases
6315 (replace 'check
6316 (lambda _
6317 (invoke "py.test" "-v"))))))
6318 (native-inputs
6319 `(("python2-pytest" ,python2-pytest)))
6320 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6321 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6322 (description
6323 "This package provides a backport of the @code{get_terminal_size
6324 function} from Python 3.3's @code{shutil}.
6325 Unlike the original version it is written in pure Python rather than C,
6326 so it might be a tiny bit slower.")
6327 (license license:expat)))
6328
6329 (define-public python-waf
6330 (package
6331 (name "python-waf")
6332 (version "2.0.11")
6333 (source (origin
6334 (method url-fetch)
6335 (uri (string-append "https://waf.io/"
6336 "waf-" version ".tar.bz2"))
6337 (sha256
6338 (base32
6339 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
6340 (build-system python-build-system)
6341 (arguments
6342 '(#:phases
6343 (modify-phases %standard-phases
6344 (replace 'build
6345 (lambda _
6346 (invoke "python" "waf-light" "configure" "build")))
6347 (replace 'check
6348 (lambda _
6349 (invoke "python" "waf" "--version")))
6350 (replace 'install
6351 (lambda* (#:key outputs #:allow-other-keys)
6352 (let ((out (assoc-ref outputs "out")))
6353 (install-file "waf" (string-append out "/bin")))
6354 #t))
6355 ;; waf breaks when it is wrapped.
6356 (delete 'wrap))))
6357 (home-page "https://waf.io/")
6358 (synopsis "Python-based build system")
6359 (description
6360 "Waf is a Python-based framework for configuring, compiling and installing
6361 applications.")
6362 (license license:bsd-3)))
6363
6364 (define-public python2-waf
6365 (package-with-python2 python-waf))
6366
6367 (define-public python-pyzmq
6368 (package
6369 (name "python-pyzmq")
6370 (version "17.1.2")
6371 (source
6372 (origin
6373 (method url-fetch)
6374 (uri (pypi-uri "pyzmq" version))
6375 (sha256
6376 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6377 (build-system python-build-system)
6378 (arguments
6379 `(#:configure-flags
6380 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6381 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6382 ;; --inplace' for 'python setup.py test' to work.
6383 #:tests? #f))
6384 (inputs
6385 `(("zeromq" ,zeromq)))
6386 (native-inputs
6387 `(("pkg-config" ,pkg-config)
6388 ("python-nose" ,python-nose)))
6389 (home-page "https://github.com/zeromq/pyzmq")
6390 (synopsis "Python bindings for 0MQ")
6391 (description
6392 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6393 (license license:bsd-4)))
6394
6395 (define-public python2-pyzmq
6396 (package-with-python2 python-pyzmq))
6397
6398 (define-public python-pep8
6399 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6400 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6401 ;; some dependents' test suites, and nothing more.
6402 (package
6403 (name "python-pep8")
6404 (version "1.7.0")
6405 (source
6406 (origin
6407 (method url-fetch)
6408 (uri (pypi-uri "pep8" version))
6409 (sha256
6410 (base32
6411 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
6412 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
6413 (build-system python-build-system)
6414 (home-page "https://pep8.readthedocs.org/")
6415 (synopsis "Python style guide checker")
6416 (description
6417 "This tools checks Python code against some of the style conventions in
6418 PEP 8.")
6419 (license license:expat)))
6420
6421 (define-public python2-pep8
6422 (package-with-python2 python-pep8))
6423
6424 (define-public python-pyflakes
6425 (package
6426 (name "python-pyflakes")
6427 (version "2.1.1")
6428 (source
6429 (origin
6430 (method url-fetch)
6431 (uri (pypi-uri "pyflakes" version))
6432 (sha256
6433 (base32
6434 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
6435 (build-system python-build-system)
6436 (home-page
6437 "https://github.com/pyflakes/pyflakes")
6438 (synopsis "Passive checker of Python programs")
6439 (description
6440 "Pyflakes statically checks Python source code for common errors.")
6441 (license license:expat)))
6442
6443 (define-public python2-pyflakes
6444 (package-with-python2 python-pyflakes))
6445
6446 (define-public python-mccabe
6447 (package
6448 (name "python-mccabe")
6449 (version "0.6.1")
6450 (source
6451 (origin
6452 (method url-fetch)
6453 (uri (pypi-uri "mccabe" version))
6454 (sha256
6455 (base32
6456 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6457 (build-system python-build-system)
6458 (native-inputs
6459 `(("python-pytest" ,python-pytest-bootstrap)
6460 ("python-pytest-runner" ,python-pytest-runner)))
6461 (home-page "https://github.com/flintwork/mccabe")
6462 (synopsis "McCabe checker, plugin for flake8")
6463 (description
6464 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6465 complexity of Python source code.")
6466 (license license:expat)))
6467
6468 (define-public python2-mccabe
6469 (package-with-python2 python-mccabe))
6470
6471 (define-public python-mccabe-0.2.1
6472 (package (inherit python-mccabe)
6473 (version "0.2.1")
6474 (source
6475 (origin
6476 (method url-fetch)
6477 (uri (pypi-uri "mccabe" version))
6478 (sha256
6479 (base32
6480 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6481
6482 (define-public python2-mccabe-0.2.1
6483 (package-with-python2 python-mccabe-0.2.1))
6484
6485 ;; Flake8 2.4.1 requires an older version of pep8.
6486 ;; This should be removed ASAP.
6487 (define-public python-pep8-1.5.7
6488 (package (inherit python-pep8)
6489 (version "1.5.7")
6490 (source
6491 (origin
6492 (method url-fetch)
6493 (uri (pypi-uri "pep8" version))
6494 (sha256
6495 (base32
6496 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6497 (arguments
6498 ;; XXX Tests not compatible with Python 3.5.
6499 '(#:tests? #f))))
6500
6501 (define-public python2-pep8-1.5.7
6502 (package-with-python2 python-pep8-1.5.7))
6503
6504 ;; Flake8 2.4.1 requires an older version of pyflakes.
6505 ;; This should be removed ASAP.
6506 (define-public python-pyflakes-0.8.1
6507 (package (inherit python-pyflakes)
6508 (version "0.8.1")
6509 (source
6510 (origin
6511 (method url-fetch)
6512 (uri (pypi-uri "pyflakes" version))
6513 (sha256
6514 (base32
6515 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6516 (arguments
6517 ;; XXX Tests not compatible with Python 3.5.
6518 '(#:tests? #f))))
6519
6520 (define-public python2-pyflakes-0.8.1
6521 (package-with-python2 python-pyflakes-0.8.1))
6522
6523 (define-public python-flake8
6524 (package
6525 (name "python-flake8")
6526 (version "3.7.7")
6527 (source (origin
6528 (method url-fetch)
6529 (uri (pypi-uri "flake8" version))
6530 (sha256
6531 (base32
6532 "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5"))))
6533 (build-system python-build-system)
6534 (arguments
6535 `(#:phases
6536 (modify-phases %standard-phases
6537 (delete 'check)
6538 (add-after 'install 'check
6539 (lambda* (#:key inputs outputs #:allow-other-keys)
6540 (add-installed-pythonpath inputs outputs)
6541 (invoke "pytest" "-v")
6542 #t)))))
6543 (propagated-inputs
6544 `(("python-pycodestyle" ,python-pycodestyle)
6545 ("python-entrypoints" ,python-entrypoints)
6546 ("python-pyflakes" ,python-pyflakes)
6547 ("python-mccabe" ,python-mccabe)))
6548 (native-inputs
6549 `(("python-mock" ,python-mock)
6550 ("python-pytest" ,python-pytest-bootstrap)
6551 ("python-pytest-runner" ,python-pytest-runner)))
6552 (home-page "https://gitlab.com/pycqa/flake8")
6553 (synopsis
6554 "The modular source code checker: pep8, pyflakes and co")
6555 (description
6556 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6557 (properties `((python2-variant . ,(delay python2-flake8))))
6558 (license license:expat)))
6559
6560 (define-public python2-flake8
6561 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
6562 (package (inherit base)
6563 (propagated-inputs
6564 `(("python2-configparser" ,python2-configparser)
6565 ("python2-enum34" ,python2-enum34)
6566 ("python2-typing" ,python2-typing)
6567 ,@(package-propagated-inputs base))))))
6568
6569 ;; python-hacking requires flake8 <2.6.0.
6570 (define-public python-flake8-2.5
6571 (package
6572 (inherit python-flake8)
6573 (version "2.5.5")
6574 (source (origin
6575 (method url-fetch)
6576 (uri (pypi-uri "flake8" version))
6577 (sha256
6578 (base32
6579 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6580 (propagated-inputs
6581 `(("python-pep8" ,python-pep8)
6582 ,@(package-propagated-inputs python-flake8)))
6583 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6584
6585 (define-public python2-flake8-2.5
6586 (package
6587 (inherit python2-flake8)
6588 (version (package-version python-flake8-2.5))
6589 (source (origin
6590 (inherit (package-source python-flake8-2.5))))
6591 (propagated-inputs
6592 `(("python2-pep8" ,python2-pep8)
6593 ,@(package-propagated-inputs python2-flake8)))))
6594
6595 (define-public python-flake8-polyfill
6596 (package
6597 (name "python-flake8-polyfill")
6598 (version "1.0.2")
6599 (source
6600 (origin
6601 (method url-fetch)
6602 (uri (pypi-uri "flake8-polyfill" version))
6603 (sha256
6604 (base32
6605 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6606 (build-system python-build-system)
6607 (arguments
6608 '(#:phases
6609 (modify-phases %standard-phases
6610 (replace 'check
6611 (lambda _
6612 ;; Be compatible with Pytest 4:
6613 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
6614 (substitute* "setup.cfg"
6615 (("\\[pytest\\]")
6616 "[tool:pytest]"))
6617
6618 (setenv "PYTHONPATH"
6619 (string-append (getcwd) "/build/lib:"
6620 (getenv "PYTHONPATH")))
6621 (invoke "py.test" "-v"))))))
6622 (native-inputs
6623 `(("python-flake8" ,python-flake8)
6624 ("python-mock" ,python-mock)
6625 ("python-pep8" ,python-pep8)
6626 ("python-pycodestyle" ,python-pycodestyle)
6627 ("python-pytest" ,python-pytest)))
6628 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6629 (synopsis "Polyfill package for Flake8 plugins")
6630 (description
6631 "This package that provides some compatibility helpers for Flake8
6632 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6633 (license license:expat)))
6634
6635 (define-public python2-flake8-polyfill
6636 (package-with-python2 python-flake8-polyfill))
6637
6638 (define-public python-mistune
6639 (package
6640 (name "python-mistune")
6641 (version "0.8.4")
6642 (source
6643 (origin
6644 (method url-fetch)
6645 (uri (pypi-uri "mistune" version))
6646 (sha256
6647 (base32
6648 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6649 (build-system python-build-system)
6650 (native-inputs
6651 `(("python-nose" ,python-nose)
6652 ("python-cython" ,python-cython)))
6653 (home-page "https://github.com/lepture/mistune")
6654 (synopsis "Markdown parser in pure Python")
6655 (description "This package provides a fast markdown parser in pure
6656 Python.")
6657 (license license:bsd-3)))
6658
6659 (define-public python2-mistune
6660 (package-with-python2 python-mistune))
6661
6662 (define-public python-markdown
6663 (package
6664 (name "python-markdown")
6665 (version "3.1.1")
6666 (source
6667 (origin
6668 (method url-fetch)
6669 (uri (pypi-uri "Markdown" version))
6670 (sha256
6671 (base32
6672 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f"))))
6673 (build-system python-build-system)
6674 (native-inputs
6675 `(("python-nose" ,python-nose)
6676 ("python-pyyaml" ,python-pyyaml)))
6677 (home-page "https://python-markdown.github.io/")
6678 (synopsis "Python implementation of Markdown")
6679 (description
6680 "This package provides a Python implementation of John Gruber's
6681 Markdown. The library features international input, various Markdown
6682 extensions, and several HTML output formats. A command line wrapper
6683 markdown_py is also provided to convert Markdown files to HTML.")
6684 (license license:bsd-3)))
6685
6686 (define-public python2-markdown
6687 (package-with-python2 python-markdown))
6688
6689 (define-public python-ptyprocess
6690 (package
6691 (name "python-ptyprocess")
6692 (version "0.5.2")
6693 (source
6694 (origin
6695 (method url-fetch)
6696 (uri (pypi-uri "ptyprocess" version))
6697 (sha256
6698 (base32
6699 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6700 (build-system python-build-system)
6701 (native-inputs
6702 `(("python-nose" ,python-nose)))
6703 (arguments
6704 `(#:phases
6705 (modify-phases %standard-phases
6706 (replace 'check
6707 (lambda _ (invoke "nosetests"))))))
6708 (home-page "https://github.com/pexpect/ptyprocess")
6709 (synopsis "Run a subprocess in a pseudo terminal")
6710 (description
6711 "This package provides a Python library used to launch a subprocess in a
6712 pseudo terminal (pty), and interact with both the process and its pty.")
6713 (license license:isc)))
6714
6715 (define-public python2-ptyprocess
6716 (package-with-python2 python-ptyprocess))
6717
6718 (define-public python-cram
6719 (package
6720 (name "python-cram")
6721 (version "0.7")
6722 (home-page "https://bitheap.org/cram/")
6723 (source (origin
6724 (method url-fetch)
6725 (uri (list (string-append home-page "cram-"
6726 version ".tar.gz")
6727 (pypi-uri "cram" version)))
6728 (sha256
6729 (base32
6730 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6731 (arguments
6732 '(#:phases
6733 (modify-phases %standard-phases
6734 (add-after 'unpack 'patch-source
6735 (lambda _
6736 (substitute* (find-files "cram" ".*\\.py$")
6737 ;; Replace default shell path.
6738 (("/bin/sh") (which "sh")))
6739 (substitute* (find-files "tests" ".*\\.t$")
6740 (("md5") "md5sum")
6741 (("/bin/bash") (which "bash"))
6742 (("/bin/sh") (which "sh")))
6743 (substitute* "cram/_test.py"
6744 ;; This hack works around a bug triggered by substituting
6745 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6746 ;; "cram -h", which breaks the output at 80 characters. This
6747 ;; causes the line showing the default shell to break into two
6748 ;; lines, but the test expects a single line...
6749 (("env\\['COLUMNS'\\] = '80'")
6750 "env['COLUMNS'] = '160'"))
6751
6752 (substitute* "Makefile"
6753 ;; Recent versions of python-coverage have caused the test
6754 ;; coverage to decrease (as of version 0.7). Allow that.
6755 (("--fail-under=100")
6756 "--fail-under=90"))
6757
6758 #t))
6759 (replace 'check
6760 ;; The test phase uses the built library and executable.
6761 (lambda* (#:key inputs outputs #:allow-other-keys)
6762 (add-installed-pythonpath inputs outputs)
6763 (setenv "PATH" (string-append (getenv "PATH") ":"
6764 (assoc-ref outputs "out") "/bin"))
6765 (invoke "make" "test"))))))
6766 (build-system python-build-system)
6767 (native-inputs
6768 `(("python-coverage" ,python-coverage)
6769 ("which" ,which)))
6770 (synopsis "Simple testing framework for command line applications")
6771 (description
6772 "Cram is a functional testing framework for command line applications.
6773 Cram tests look like snippets of interactive shell sessions. Cram runs each
6774 command and compares the command output in the test with the command’s actual
6775 output.")
6776 (license license:gpl2+)))
6777
6778 (define-public python2-cram
6779 (package-with-python2 python-cram))
6780
6781 (define-public python-straight-plugin
6782 (package
6783 (name "python-straight-plugin")
6784 (version "1.4.1")
6785 (source
6786 (origin
6787 (method url-fetch)
6788 (uri (pypi-uri "straight.plugin" version))
6789 (sha256
6790 (base32
6791 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6792 (build-system python-build-system)
6793 (home-page "https://github.com/ironfroggy/straight.plugin")
6794 (synopsis "Simple namespaced plugin facility")
6795 (description "Straight Plugin provides a type of plugin you can create from
6796 almost any existing Python modules, and an easy way for outside developers to
6797 add functionality and customization to your projects with their own plugins.")
6798 (license license:expat)))
6799
6800 (define-public python2-straight-plugin
6801 (package-with-python2 python-straight-plugin))
6802
6803 (define-public python-fonttools
6804 (package
6805 (name "python-fonttools")
6806 (version "4.2.0")
6807 (source (origin
6808 (method url-fetch)
6809 (uri (pypi-uri "fonttools" version ".zip"))
6810 (sha256
6811 (base32
6812 "0psy6z52jn49wp93s3k7kj0jzji1cad3wnwgm6c26vphv5appk4v"))))
6813 (build-system python-build-system)
6814 (native-inputs
6815 `(("unzip" ,unzip)
6816 ("python-pytest" ,python-pytest)
6817 ("python-pytest-runner" ,python-pytest-runner)))
6818 (home-page "https://github.com/behdad/fonttools")
6819 (synopsis "Tools to manipulate font files")
6820 (description
6821 "FontTools/TTX is a library to manipulate font files from Python. It
6822 supports reading and writing of TrueType/OpenType fonts, reading and writing
6823 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6824 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6825 from an XML-based format.")
6826 (license license:expat)))
6827
6828 ;; Fonttools 4.x dropped support for Python 2, so stick with 3.x here.
6829 (define-public python2-fonttools
6830 (let ((base (package-with-python2 (strip-python2-variant python-fonttools))))
6831 (package/inherit
6832 base
6833 (version "3.44.0")
6834 (source (origin
6835 (method url-fetch)
6836 (uri (pypi-uri "fonttools" version ".zip"))
6837 (sha256
6838 (base32
6839 "0v6399g755f2hn1ry62i5b6gdinf2fpx2966v3bxh6bjw1accb5p")))))))
6840
6841 (define-public python-ly
6842 (package
6843 (name "python-ly")
6844 (version "0.9.5")
6845 (source
6846 (origin
6847 (method url-fetch)
6848 (uri (pypi-uri name version))
6849 (sha256
6850 (base32
6851 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6852 (build-system python-build-system)
6853 (arguments
6854 ;; FIXME: Some tests need network access.
6855 '(#:tests? #f))
6856 (synopsis "Tool and library for manipulating LilyPond files")
6857 (description "This package provides a Python library to parse, manipulate
6858 or create documents in LilyPond format. A command line program ly is also
6859 provided that can be used to do various manipulations with LilyPond files.")
6860 (home-page "https://pypi.python.org/pypi/python-ly")
6861 (license license:gpl2+)))
6862
6863 (define-public python-appdirs
6864 (package
6865 (name "python-appdirs")
6866 (version "1.4.3")
6867 (source
6868 (origin
6869 (method url-fetch)
6870 (uri (pypi-uri "appdirs" version))
6871 (sha256
6872 (base32
6873 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6874 (build-system python-build-system)
6875 (home-page "https://github.com/ActiveState/appdirs")
6876 (synopsis
6877 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6878 (description
6879 "This module provides a portable way of finding out where user data
6880 should be stored on various operating systems.")
6881 (license license:expat)))
6882
6883 (define-public python2-appdirs
6884 (package-with-python2 python-appdirs))
6885
6886 (define-public python-llfuse
6887 (package
6888 (name "python-llfuse")
6889 (version "1.3.5")
6890 (source (origin
6891 (method url-fetch)
6892 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6893 (sha256
6894 (base32
6895 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6896 (build-system python-build-system)
6897 (inputs
6898 `(("fuse" ,fuse)
6899 ("attr" ,attr)))
6900 (native-inputs
6901 `(("pkg-config" ,pkg-config)))
6902 (synopsis "Python bindings for FUSE")
6903 (description
6904 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6905 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6906 (license license:lgpl2.0+)
6907 (properties `((python2-variant . ,(delay python2-llfuse))))))
6908
6909 (define-public python2-llfuse
6910 (package (inherit (package-with-python2
6911 (strip-python2-variant python-llfuse)))
6912 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6913
6914 ;; For attic-0.16
6915 (define-public python-llfuse-0.41
6916 (package (inherit python-llfuse)
6917 (version "0.41.1")
6918 (source (origin
6919 (method url-fetch)
6920 (uri (string-append
6921 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6922 "llfuse-" version ".tar.bz2"))
6923 (sha256
6924 (base32
6925 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6926 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6927 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6928 (license (list license:expat license:lgpl2.0+))))
6929
6930 (define-public python-msgpack
6931 (package
6932 (name "python-msgpack")
6933 (version "0.5.6")
6934 (source (origin
6935 (method url-fetch)
6936 (uri (pypi-uri "msgpack" version))
6937 (sha256
6938 (base32
6939 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6940 (build-system python-build-system)
6941 (arguments
6942 `(#:modules ((guix build utils)
6943 (guix build python-build-system)
6944 (ice-9 ftw)
6945 (srfi srfi-1)
6946 (srfi srfi-26))
6947 #:phases
6948 (modify-phases %standard-phases
6949 (replace 'check
6950 (lambda _
6951 (let ((cwd (getcwd)))
6952 (setenv "PYTHONPATH"
6953 (string-append cwd "/build/"
6954 (find (cut string-prefix? "lib" <>)
6955 (scandir (string-append cwd "/build")))
6956 ":"
6957 (getenv "PYTHONPATH")))
6958 (invoke "pytest" "-v" "test")))))))
6959 (native-inputs
6960 `(("python-pytest" ,python-pytest)))
6961 (synopsis "MessagePack (de)serializer")
6962 (description "MessagePack is a fast, compact binary serialization format,
6963 suitable for similar data to JSON. This package provides CPython bindings for
6964 reading and writing MessagePack data.")
6965 (home-page "https://pypi.python.org/pypi/msgpack/")
6966 (license license:asl2.0)))
6967
6968 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6969 ;; release 0.5. Some packages like borg still call it by the old name for now.
6970 ;; <https://bugs.gnu.org/30662>
6971 (define-public python-msgpack-transitional
6972 (package
6973 (inherit python-msgpack)
6974 (name "python-msgpack-transitional")
6975 (arguments
6976 (substitute-keyword-arguments (package-arguments python-msgpack)
6977 ((#:phases phases)
6978 `(modify-phases ,phases
6979 (add-after 'unpack 'configure-transitional
6980 (lambda _
6981 ;; Keep using the old name.
6982 (substitute* "setup.py"
6983 (("TRANSITIONAL = False")
6984 "TRANSITIONAL = 1"))
6985 #t))))))))
6986
6987 (define-public python2-msgpack
6988 (package-with-python2 python-msgpack))
6989
6990 (define-public python-netaddr
6991 (package
6992 (name "python-netaddr")
6993 (version "0.7.19")
6994 (source
6995 (origin
6996 (method url-fetch)
6997 (uri (pypi-uri "netaddr" version))
6998 (sha256
6999 (base32
7000 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
7001 (build-system python-build-system)
7002 (arguments `(#:tests? #f)) ;; No tests.
7003 (home-page "https://github.com/drkjam/netaddr/")
7004 (synopsis "Pythonic manipulation of network addresses")
7005 (description
7006 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
7007 and MAC network addresses.")
7008 (license license:bsd-3)))
7009
7010 (define-public python2-netaddr
7011 (package-with-python2 python-netaddr))
7012
7013 (define-public python2-pyroute2
7014 (package
7015 (name "python2-pyroute2")
7016 (version "0.5.6")
7017 (source
7018 (origin
7019 (method url-fetch)
7020 (uri (pypi-uri "pyroute2" version))
7021 (sha256
7022 (base32
7023 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
7024 (build-system python-build-system)
7025 (arguments
7026 `(#:python ,python-2)) ;Python 3.x is not supported
7027 (home-page "https://github.com/svinota/pyroute2")
7028 (synopsis "Python netlink library")
7029 (description
7030 "Pyroute2 is a pure Python netlink library with minimal dependencies.
7031 Supported netlink families and protocols include:
7032 @itemize
7033 @item rtnl, network settings - addresses, routes, traffic controls
7034 @item nfnetlink - netfilter API: ipset, nftables, ...
7035 @item ipq - simplest userspace packet filtering, iptables QUEUE target
7036 @item devlink - manage and monitor devlink-enabled hardware
7037 @item generic - generic netlink families
7038 @itemize
7039 @item nl80211 - wireless functions API (basic support)
7040 @item taskstats - extended process statistics
7041 @item acpi_events - ACPI events monitoring
7042 @item thermal_events - thermal events monitoring
7043 @item VFS_DQUOT - disk quota events monitoring
7044 @end itemize
7045 @end itemize")
7046 (license license:gpl2+)))
7047
7048 (define-public python-wrapt
7049 (package
7050 (name "python-wrapt")
7051 (version "1.11.2")
7052 (source
7053 (origin
7054 (method url-fetch)
7055 (uri (pypi-uri "wrapt" version))
7056 (sha256
7057 (base32
7058 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
7059 (build-system python-build-system)
7060 (arguments
7061 ;; Tests are not included in the tarball, they are only available in the
7062 ;; git repository.
7063 `(#:tests? #f))
7064 (home-page "https://github.com/GrahamDumpleton/wrapt")
7065 (synopsis "Module for decorators, wrappers and monkey patching")
7066 (description
7067 "The aim of the wrapt module is to provide a transparent object proxy for
7068 Python, which can be used as the basis for the construction of function
7069 wrappers and decorator functions.")
7070 (license license:bsd-2)))
7071
7072 (define-public python2-wrapt
7073 (package-with-python2 python-wrapt))
7074
7075 (define-public python-xlrd
7076 (package
7077 (name "python-xlrd")
7078 (version "1.2.0")
7079 (source (origin
7080 (method url-fetch)
7081 (uri (pypi-uri "xlrd" version))
7082 (sha256
7083 (base32
7084 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
7085 (build-system python-build-system)
7086 (arguments
7087 `(#:phases
7088 (modify-phases %standard-phases
7089 ;; Some tests depend on writing a temporary file to the user's home
7090 ;; directory.
7091 (add-after 'unpack 'fix-tests
7092 (lambda _
7093 (delete-file "tests/test_open_workbook.py")
7094 #t)))))
7095 (home-page "http://www.python-excel.org/")
7096 (synopsis "Library for extracting data from Excel files")
7097 (description "This package provides a library to extract data from
7098 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7099 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7100 Unicode-aware. It is not intended as an end-user tool.")
7101 (license license:bsd-3)))
7102
7103 (define-public python2-xlrd
7104 (package-with-python2 python-xlrd))
7105
7106 (define-public python-prettytable
7107 (package
7108 (name "python-prettytable")
7109 (version "0.7.2")
7110 (source
7111 (origin
7112 (method url-fetch)
7113 (uri (pypi-uri "prettytable" version ".tar.bz2"))
7114 (sha256
7115 (base32
7116 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7117 (build-system python-build-system)
7118 (home-page "http://code.google.com/p/prettytable/")
7119 (synopsis "Display tabular data in an ASCII table format")
7120 (description
7121 "A library designed to represent tabular data in visually appealing ASCII
7122 tables. PrettyTable allows for selection of which columns are to be printed,
7123 independent alignment of columns (left or right justified or centred) and
7124 printing of sub-tables by specifying a row range.")
7125 (license license:bsd-3)))
7126
7127 (define-public python2-prettytable
7128 (package-with-python2 python-prettytable))
7129
7130 (define-public python-tables
7131 (package
7132 (name "python-tables")
7133 (version "3.4.4")
7134 (source
7135 (origin
7136 (method url-fetch)
7137 (uri (pypi-uri "tables" version))
7138 (sha256
7139 (base32
7140 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7141 (modules '((guix build utils)))
7142 (snippet
7143 '(begin
7144 ;; Remove pre-compiled .pyc files from source.
7145 (for-each delete-file-recursively
7146 (find-files "." "__pycache__" #:directories? #t))
7147 (for-each delete-file (find-files "." "\\.pyc$"))
7148 #t))))
7149 (build-system python-build-system)
7150 (arguments
7151 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7152 ;; or "check", so we must override the build and check phases.
7153 #:phases
7154 (modify-phases %standard-phases
7155 (add-after 'unpack 'use-gcc
7156 (lambda _
7157 (substitute* "setup.py"
7158 (("compiler = new_compiler\\(\\)" line)
7159 (string-append line
7160 "\ncompiler.set_executables(compiler='gcc',"
7161 "compiler_so='gcc',"
7162 "linker_exe='gcc',"
7163 "linker_so='gcc -shared')")))
7164 #t))
7165 (replace 'build
7166 (lambda* (#:key inputs #:allow-other-keys)
7167 (invoke "python" "setup.py" "build"
7168 (string-append "--hdf5="
7169 (assoc-ref inputs "hdf5")))))
7170 (replace 'check
7171 (lambda* (#:key inputs #:allow-other-keys)
7172 (invoke "python" "setup.py" "check"
7173 (string-append "--hdf5="
7174 (assoc-ref inputs "hdf5"))))))))
7175 (propagated-inputs
7176 `(("python-numexpr" ,python-numexpr)
7177 ("python-numpy" ,python-numpy)))
7178 (native-inputs
7179 `(("python-cython" ,python-cython)
7180 ("pkg-config" ,pkg-config)))
7181 (inputs
7182 `(("hdf5" ,hdf5)
7183 ("bzip2" ,bzip2)
7184 ("zlib" ,zlib)))
7185 (home-page "http://www.pytables.org/")
7186 (synopsis "Hierarchical datasets for Python")
7187 (description "PyTables is a package for managing hierarchical datasets and
7188 designed to efficiently cope with extremely large amounts of data.")
7189 (license license:bsd-3)))
7190
7191 (define-public python2-tables
7192 (package-with-python2 python-tables))
7193
7194 (define-public python-pyasn1
7195 (package
7196 (name "python-pyasn1")
7197 (version "0.4.3")
7198 (source
7199 (origin
7200 (method url-fetch)
7201 (uri (pypi-uri "pyasn1" version))
7202 (sha256
7203 (base32
7204 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7205 (build-system python-build-system)
7206 (home-page "http://pyasn1.sourceforge.net/")
7207 (synopsis "ASN.1 types and codecs")
7208 (description
7209 "This is an implementation of ASN.1 types and codecs in Python. It is
7210 suitable for a wide range of protocols based on the ASN.1 specification.")
7211 (license license:bsd-2)))
7212
7213 (define-public python2-pyasn1
7214 (package-with-python2 python-pyasn1))
7215
7216 (define-public python-pyasn1-modules
7217 (package
7218 (name "python-pyasn1-modules")
7219 (version "0.2.2")
7220 (source
7221 (origin
7222 (method url-fetch)
7223 (uri (pypi-uri "pyasn1-modules" version))
7224 (sha256
7225 (base32
7226 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7227 (build-system python-build-system)
7228 (propagated-inputs
7229 `(("python-pyasn1" ,python-pyasn1)))
7230 (home-page "https://sourceforge.net/projects/pyasn1/")
7231 (synopsis "ASN.1 codec implementations")
7232 (description
7233 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7234 implementations of ASN.1-based codecs and protocols.")
7235 (license license:bsd-3)))
7236
7237 (define-public python2-pyasn1-modules
7238 (package-with-python2 python-pyasn1-modules))
7239
7240 (define-public python-ipaddress
7241 (package
7242 (name "python-ipaddress")
7243 (version "1.0.22")
7244 (source (origin
7245 (method url-fetch)
7246 (uri (pypi-uri "ipaddress" version))
7247 (sha256
7248 (base32
7249 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7250 (build-system python-build-system)
7251 (home-page "https://github.com/phihag/ipaddress")
7252 (synopsis "IP address manipulation library")
7253 (description
7254 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7255 in Python. This library is used to create, poke at, and manipulate IPv4 and
7256 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7257 module to older versions of Python.")
7258 (license license:psfl)))
7259
7260 (define-public python2-ipaddress
7261 (package-with-python2 python-ipaddress))
7262
7263 (define-public python2-ipaddr
7264 (package
7265 (name "python2-ipaddr")
7266 (version "2.1.11")
7267 (source
7268 (origin
7269 (method url-fetch)
7270 (uri (pypi-uri "ipaddr" version))
7271 (sha256
7272 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7273 (build-system python-build-system)
7274 (arguments
7275 `(#:python ,python-2 ;version 2 only
7276 #:phases
7277 (modify-phases %standard-phases
7278 (replace 'check
7279 (lambda _ (invoke "python" "ipaddr_test.py"))))))
7280 (home-page "https://github.com/google/ipaddr-py")
7281 (synopsis "IP address manipulation library")
7282 (description
7283 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7284 IPv6 addresses and networks.
7285
7286 For new implementations you may prefer to use the standard module
7287 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
7288 versions of Python.")
7289 (license license:asl2.0)))
7290
7291 (define-public python-idna
7292 (package
7293 (name "python-idna")
7294 (version "2.8")
7295 (source
7296 (origin
7297 (method url-fetch)
7298 (uri (pypi-uri "idna" version))
7299 (sha256
7300 (base32
7301 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
7302 (build-system python-build-system)
7303 (home-page "https://github.com/kjd/idna")
7304 (synopsis "Internationalized domain names in applications")
7305 (description
7306 "This is a library to support the Internationalised Domain Names in
7307 Applications (IDNA) protocol as specified in RFC 5891. This version of the
7308 protocol is often referred to as “IDNA2008” and can produce different results
7309 from the earlier standard from 2003. The library is also intended to act as a
7310 suitable drop-in replacement for the “encodings.idna” module that comes with
7311 the Python standard library but currently only supports the older 2003
7312 specification.")
7313 (license license:bsd-4)))
7314
7315 (define-public python-idna-2.7
7316 (package (inherit python-idna)
7317 (version "2.7")
7318 (source (origin
7319 (method url-fetch)
7320 (uri (pypi-uri "idna" version))
7321 (sha256
7322 (base32
7323 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7324
7325
7326 (define-public python2-idna
7327 (package-with-python2 python-idna))
7328
7329 (define-public python-idna-ssl
7330 (package
7331 (name "python-idna-ssl")
7332 (version "1.0.1")
7333 (source
7334 (origin
7335 (method url-fetch)
7336 (uri (pypi-uri "idna-ssl" version))
7337 (sha256
7338 (base32
7339 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7340 (build-system python-build-system)
7341 (arguments
7342 `(#:tests? #f)) ;circular dependency with python-aiohttp
7343 (home-page "https://github.com/aio-libs/idna-ssl")
7344 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7345 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7346 domains support.")
7347 (license license:expat)))
7348
7349 (define-public python-pretend
7350 (package
7351 (name "python-pretend")
7352 (version "1.0.9")
7353 (source
7354 (origin
7355 (method url-fetch)
7356 (uri (pypi-uri "pretend" version))
7357 (sha256
7358 (base32
7359 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7360 (build-system python-build-system)
7361 (home-page "https://github.com/alex/pretend")
7362 (synopsis "Library for stubbing in Python")
7363 (description
7364 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7365 technique for writing tests. You may hear the term mixed up with mocks,
7366 fakes, or doubles. Basically, a stub is an object that returns pre-canned
7367 responses, rather than doing any computation.")
7368 (license license:bsd-3)))
7369
7370 (define-public python2-pretend
7371 (package-with-python2 python-pretend))
7372
7373 (define-public python-pip
7374 (package
7375 (name "python-pip")
7376 (version "19.2.1")
7377 (source
7378 (origin
7379 (method url-fetch)
7380 (uri (pypi-uri "pip" version))
7381 (sha256
7382 (base32
7383 "100sd12ss4mbdj5lf3wawad29cm573b27765mq098x6xhcj71395"))))
7384 (build-system python-build-system)
7385 (arguments
7386 '(#:tests? #f)) ; there are no tests in the pypi archive.
7387 (home-page "https://pip.pypa.io/")
7388 (synopsis "Package manager for Python software")
7389 (description
7390 "Pip is a package manager for Python software, that finds packages on the
7391 Python Package Index (PyPI).")
7392 (license license:expat)))
7393
7394 (define-public python2-pip
7395 (package-with-python2 python-pip))
7396
7397 (define-public python-tlsh
7398 (package
7399 (name "python-tlsh")
7400 (version "3.4.5")
7401 (home-page "https://github.com/trendmicro/tlsh")
7402 (source
7403 (origin
7404 (method git-fetch)
7405 (uri (git-reference
7406 (url "https://github.com/trendmicro/tlsh.git")
7407 (commit (string-append "v" version))))
7408 (file-name (git-file-name name version))
7409 (sha256
7410 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
7411 (build-system cmake-build-system)
7412 (arguments
7413 '(#:out-of-source? #f
7414 #:phases (modify-phases %standard-phases
7415 (replace
7416 'install
7417 (lambda* (#:key outputs #:allow-other-keys)
7418 ;; Build and install the Python bindings. The underlying
7419 ;; C++ library is apparently not meant to be installed.
7420 (let ((out (assoc-ref outputs "out")))
7421 (with-directory-excursion "py_ext"
7422 (and (system* "python" "setup.py" "build")
7423 (system* "python" "setup.py" "install"
7424 (string-append "--prefix=" out))))))))))
7425 (inputs `(("python" ,python-wrapper))) ;for the bindings
7426 (synopsis "Fuzzy matching library for Python")
7427 (description
7428 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7429 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7430 value which can be used for similarity comparisons. Similar objects have
7431 similar hash values, which allows for the detection of similar objects by
7432 comparing their hash values. The byte stream should have a sufficient amount
7433 of complexity; for example, a byte stream of identical bytes will not generate
7434 a hash value.")
7435 (license license:asl2.0)))
7436
7437 (define-public python2-tlsh
7438 (package
7439 (inherit python-tlsh)
7440 (name "python2-tlsh")
7441 (inputs `(("python" ,python-2)))))
7442
7443 (define-public python-termcolor
7444 (package
7445 (name "python-termcolor")
7446 (version "1.1.0")
7447 (source
7448 (origin
7449 (method url-fetch)
7450 (uri (pypi-uri "termcolor" version))
7451 (sha256
7452 (base32
7453 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7454 (build-system python-build-system)
7455 (arguments
7456 ;; There are no tests.
7457 `(#:tests? #f))
7458 (home-page "https://pypi.python.org/pypi/termcolor")
7459 (synopsis "ANSII Color formatting for terminal output")
7460 (description
7461 "This package provides ANSII Color formatting for output in terminals.")
7462 (license license:expat)))
7463
7464 (define-public python2-termcolor
7465 (package-with-python2 python-termcolor))
7466
7467 (define-public python-libarchive-c
7468 (package
7469 (name "python-libarchive-c")
7470 (version "2.8")
7471 (source (origin
7472 (method url-fetch)
7473 (uri (pypi-uri "libarchive-c" version))
7474 (sha256
7475 (base32
7476 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
7477 (build-system python-build-system)
7478 (arguments
7479 '(#:phases (modify-phases %standard-phases
7480 (add-before
7481 'build 'reference-libarchive
7482 (lambda* (#:key inputs #:allow-other-keys)
7483 ;; Retain the absolute file name of libarchive.so.
7484 (let ((libarchive (assoc-ref inputs "libarchive")))
7485 (substitute* "libarchive/ffi.py"
7486 (("find_library\\('archive'\\)")
7487 (string-append "'" libarchive
7488 "/lib/libarchive.so'"))))))
7489 (replace 'check
7490 (lambda _ (invoke "pytest" "-vv"))))))
7491 (native-inputs
7492 `(("python-mock" ,python-mock)
7493 ("python-pytest" ,python-pytest)))
7494 (inputs
7495 `(("libarchive" ,libarchive)))
7496 (home-page "https://github.com/Changaco/python-libarchive-c")
7497 (synopsis "Python interface to libarchive")
7498 (description
7499 "This package provides Python bindings to libarchive, a C library to
7500 access possibly compressed archives in many different formats. It uses
7501 Python's @code{ctypes} foreign function interface (FFI).")
7502 (license license:lgpl2.0+)))
7503
7504 (define-public python2-libarchive-c
7505 (package-with-python2 python-libarchive-c))
7506
7507 (define-public python-file
7508 (package
7509 (inherit file)
7510 (name "python-file")
7511 (build-system python-build-system)
7512 (arguments
7513 '(#:tests? #f ;no tests
7514 #:configure-flags '("--single-version-externally-managed" "--root=/")
7515 #:phases (modify-phases %standard-phases
7516 (add-before 'build 'change-directory
7517 (lambda _
7518 (chdir "python")
7519 #t))
7520 (add-before 'build 'set-library-file-name
7521 (lambda* (#:key inputs #:allow-other-keys)
7522 (let ((file (assoc-ref inputs "file")))
7523 (substitute* "magic.py"
7524 (("find_library\\('magic'\\)")
7525 (string-append "'" file "/lib/libmagic.so'")))
7526 #t))))))
7527 (inputs `(("file" ,file)))
7528 (native-inputs (if (%current-target-system)
7529 `(("self" ,this-package))
7530 '()))
7531 (synopsis "Python bindings to the libmagic file type guesser. Note that
7532 this module and the python-magic module both provide a \"magic.py\" file;
7533 these two modules, which are different and were developed separately, both
7534 serve the same purpose: provide Python bindings for libmagic.")))
7535
7536 (define-public python2-file
7537 (package-with-python2 python-file))
7538
7539 (define-public python-debian
7540 (package
7541 (name "python-debian")
7542 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
7543 (version "0.1.36")
7544 (source
7545 (origin
7546 ;; Use git-fetch, as pypi doesn't include test suite.
7547 (method git-fetch)
7548 (uri (git-reference
7549 (url home-page)
7550 (commit version)))
7551 (file-name (git-file-name name version))
7552 (sha256
7553 (base32
7554 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
7555 (build-system python-build-system)
7556 (arguments
7557 `(#:phases (modify-phases %standard-phases
7558 (add-after 'unpack 'remove-debian-specific-tests
7559 ;; python-apt, apt and dpkg are not yet available in guix,
7560 ;; and these tests heavily depend on them.
7561 (lambda _
7562 (delete-file "lib/debian/tests/test_deb822.py")
7563 (delete-file "lib/debian/tests/test_debfile.py")
7564 #t)))))
7565 (propagated-inputs
7566 `(("python-six" ,python-six)
7567 ("python-chardet" ,python-chardet)))
7568 (synopsis "Debian package related modules")
7569 (description
7570 ;; XXX: Use @enumerate instead of @itemize to work around
7571 ;; <http://bugs.gnu.org/21772>.
7572 "This package provides Python modules that abstract many formats of
7573 Debian-related files, such as:
7574
7575 @enumerate
7576 @item Debtags information;
7577 @item @file{debian/changelog} files;
7578 @item packages files, pdiffs;
7579 @item control files of single or multiple RFC822-style paragraphs---e.g.
7580 @file{debian/control}, @file{.changes}, @file{.dsc};
7581 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7582 contained files and meta-information.
7583 @end enumerate\n")
7584
7585 ;; Modules are either GPLv2+ or GPLv3+.
7586 (license license:gpl3+)))
7587
7588 (define-public python2-debian
7589 (package-with-python2 python-debian))
7590
7591 (define-public python-nbformat
7592 (package
7593 (name "python-nbformat")
7594 (version "4.4.0")
7595 (source
7596 (origin
7597 (method url-fetch)
7598 (uri (pypi-uri "nbformat" version))
7599 (sha256
7600 (base32
7601 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7602 (build-system python-build-system)
7603 (arguments `(#:tests? #f)) ; no test target
7604 (propagated-inputs
7605 `(("python-ipython-genutils" ,python-ipython-genutils)
7606 ("python-jsonschema" ,python-jsonschema)
7607 ("python-jupyter-core" ,python-jupyter-core)
7608 ("python-traitlets" ,python-traitlets)))
7609 (home-page "http://jupyter.org")
7610 (synopsis "Jupyter Notebook format")
7611 (description "This package provides the reference implementation of the
7612 Jupyter Notebook format and Python APIs for working with notebooks.")
7613 (license license:bsd-3)))
7614
7615 (define-public python2-nbformat
7616 (package-with-python2 python-nbformat))
7617
7618 (define-public python-bleach
7619 (package
7620 (name "python-bleach")
7621 (version "3.1.0")
7622 (source
7623 (origin
7624 (method url-fetch)
7625 (uri (pypi-uri "bleach" version))
7626 (sha256
7627 (base32
7628 "1yhrgrhkln8bd6gn3imj69g1h4xqah9gaz9q26crqr6gmmvpzprz"))))
7629 (build-system python-build-system)
7630 (propagated-inputs
7631 `(("python-webencodings" ,python-webencodings)
7632 ("python-six" ,python-six)))
7633 (native-inputs
7634 `(("python-pytest" ,python-pytest)
7635 ("python-pytest-runner" ,python-pytest-runner-2)))
7636 (home-page "https://github.com/jsocol/bleach")
7637 (synopsis "Whitelist-based HTML-sanitizing tool")
7638 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7639 (license license:asl2.0)))
7640
7641 (define-public python2-bleach
7642 (package-with-python2 python-bleach))
7643
7644 (define-public python-entrypoints
7645 (package
7646 (name "python-entrypoints")
7647 (version "0.3")
7648 (source
7649 (origin
7650 (method url-fetch)
7651 (uri (pypi-uri "entrypoints" version))
7652 (sha256
7653 (base32
7654 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
7655 (build-system python-build-system)
7656 ;; The package does not come with a setup.py file, so we have to generate
7657 ;; one ourselves.
7658 (arguments
7659 `(#:tests? #f
7660 #:phases
7661 (modify-phases %standard-phases
7662 (add-after 'unpack 'create-setup.py
7663 (lambda _
7664 (call-with-output-file "setup.py"
7665 (lambda (port)
7666 (format port "\
7667 from setuptools import setup
7668 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7669 " ,version))))))))
7670 (home-page "https://github.com/takluyver/entrypoints")
7671 (synopsis "Discover and load entry points from installed Python packages")
7672 (description "Entry points are a way for Python packages to advertise
7673 objects with some common interface. The most common examples are
7674 @code{console_scripts} entry points, which define shell commands by
7675 identifying a Python function to run. The @code{entrypoints} module contains
7676 functions to find and load entry points.")
7677 (license license:expat)))
7678
7679 (define-public python2-entrypoints
7680 (package-with-python2 python-entrypoints))
7681
7682 (define-public python-nbconvert
7683 (package
7684 (name "python-nbconvert")
7685 (version "5.0.0b1")
7686 (source
7687 (origin
7688 (method url-fetch)
7689 (uri (pypi-uri "nbconvert" version))
7690 (sha256
7691 (base32
7692 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7693 (build-system python-build-system)
7694 (arguments
7695 `(;; The "bdist_egg" target is disabled by default, causing the installation
7696 ;; to fail.
7697 #:configure-flags (list "bdist_egg")
7698 ;; FIXME: 5 failures, 40 errors.
7699 #:tests? #f))
7700 ;; #:phases
7701 ;; (modify-phases %standard-phases
7702 ;; (replace 'check
7703 ;; (lambda _
7704 ;; (zero? (system* "py.test" "-v")))))
7705 (native-inputs
7706 `(("python-pytest" ,python-pytest)))
7707 (propagated-inputs
7708 `(("python-bleach" ,python-bleach)
7709 ("python-entrypoints" ,python-entrypoints)
7710 ("python-jinja2" ,python-jinja2)
7711 ("python-jupyter-core" ,python-jupyter-core)
7712 ("python-mistune" ,python-mistune)
7713 ("python-nbformat" ,python-nbformat)
7714 ("python-pygments" ,python-pygments)
7715 ("python-traitlets" ,python-traitlets)))
7716 (home-page "http://jupyter.org")
7717 (synopsis "Converting Jupyter Notebooks")
7718 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7719 notebooks to various other formats via Jinja templates. It allows you to
7720 convert an @code{.ipynb} notebook file into various static formats including:
7721
7722 @enumerate
7723 @item HTML
7724 @item LaTeX
7725 @item PDF
7726 @item Reveal JS
7727 @item Markdown (md)
7728 @item ReStructured Text (rst)
7729 @item executable script
7730 @end enumerate\n")
7731 (license license:bsd-3)))
7732
7733 (define-public python2-nbconvert
7734 (package-with-python2 python-nbconvert))
7735
7736 (define-public python-notebook
7737 (package
7738 (name "python-notebook")
7739 (version "5.7.4")
7740 (source (origin
7741 (method url-fetch)
7742 (uri (pypi-uri "notebook" version))
7743 (sha256
7744 (base32
7745 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7746 (build-system python-build-system)
7747 (arguments
7748 `(#:phases
7749 (modify-phases %standard-phases
7750 (replace 'check
7751 (lambda _
7752 ;; These tests require a browser
7753 (delete-file-recursively "notebook/tests/selenium")
7754 ;; Some tests need HOME
7755 (setenv "HOME" "/tmp")
7756 ;; This file contains "warningfilters", which are not supported
7757 ;; by this version of nose.
7758 (delete-file "setup.cfg")
7759 (with-directory-excursion "/tmp"
7760 (invoke "nosetests" "-v"))
7761 #t)))))
7762 (propagated-inputs
7763 `(("python-jupyter-core" ,python-jupyter-core)
7764 ("python-nbformat" ,python-nbformat)
7765 ("python-nbconvert" ,python-nbconvert)
7766 ("python-prometheus-client" ,python-prometheus-client)
7767 ("python-send2trash" ,python-send2trash)
7768 ("python-terminado" ,python-terminado)))
7769 (native-inputs
7770 `(("python-nose" ,python-nose)
7771 ("python-sphinx" ,python-sphinx)
7772 ("python-requests" ,python-requests)))
7773 (home-page "http://jupyter.org/")
7774 (synopsis "Web-based notebook environment for interactive computing")
7775 (description
7776 "The Jupyter HTML notebook is a web-based notebook environment for
7777 interactive computing.")
7778 (properties `((python2-variant . ,(delay python2-notebook))))
7779 (license license:bsd-3)))
7780
7781 (define-public python2-notebook
7782 (let ((base (package-with-python2
7783 (strip-python2-variant python-notebook))))
7784 (package (inherit base)
7785 (native-inputs
7786 `(("python2-mock" ,python2-mock)
7787 ,@(package-native-inputs base)))
7788 (arguments
7789 (substitute-keyword-arguments (package-arguments base)
7790 ((#:phases phases)
7791 `(modify-phases ,phases
7792 (add-before 'check 'disable-test-case
7793 ;; The test requires network access to localhost. Curiously it
7794 ;; fails with Python 2 only. Simply make the test-case return
7795 ;; immediately.
7796 (lambda _
7797 (substitute*
7798 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7799 (("formats = self.nbconvert_api") "return #")))))))))))
7800
7801 (define-public python-widgetsnbextension
7802 (package
7803 (name "python-widgetsnbextension")
7804 (version "3.4.2")
7805 (source
7806 (origin
7807 (method url-fetch)
7808 (uri (pypi-uri "widgetsnbextension" version))
7809 (sha256
7810 (base32
7811 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7812 (build-system python-build-system)
7813 (propagated-inputs
7814 `(("python-ipykernel" ,python-ipykernel)
7815 ("python-notebook" ,python-notebook)))
7816 (native-inputs
7817 `(("python-certifi" ,python-certifi)
7818 ("python-nose" ,python-nose)))
7819 (home-page "https://ipython.org")
7820 (synopsis "IPython HTML widgets for Jupyter")
7821 (description "This package provides interactive HTML widgets for Jupyter
7822 notebooks.")
7823 (license license:bsd-3)))
7824
7825 (define-public python2-widgetsnbextension
7826 (package-with-python2 python-widgetsnbextension))
7827
7828 (define-public python-ipywidgets
7829 (package
7830 (name "python-ipywidgets")
7831 (version "5.2.2")
7832 (source
7833 (origin
7834 (method url-fetch)
7835 (uri (pypi-uri "ipywidgets" version))
7836 (sha256
7837 (base32
7838 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7839 (build-system python-build-system)
7840 (propagated-inputs
7841 `(("python-ipython" ,python-ipython)
7842 ("python-traitlets" ,python-traitlets)
7843 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7844 (native-inputs
7845 `(("python-nose" ,python-nose)
7846 ("python-pytest" ,python-pytest)))
7847 (home-page "https://ipython.org")
7848 (synopsis "IPython HTML widgets for Jupyter")
7849 (description "Ipywidgets are interactive HTML widgets for Jupyter
7850 notebooks and the IPython kernel. Notebooks come alive when interactive
7851 widgets are used. Users gain control of their data and can visualize changes
7852 in the data.")
7853 (license license:bsd-3)))
7854
7855 (define-public python2-ipywidgets
7856 (package-with-python2 python-ipywidgets))
7857
7858 (define-public python-jupyter-console
7859 (package
7860 (name "python-jupyter-console")
7861 (version "6.0.0")
7862 (source
7863 (origin
7864 (method url-fetch)
7865 (uri (pypi-uri "jupyter_console" version))
7866 (sha256
7867 (base32
7868 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
7869 (build-system python-build-system)
7870 (propagated-inputs
7871 `(("python-ipykernel" ,python-ipykernel)
7872 ("python-jupyter-client" ,python-jupyter-client)
7873 ("python-prompt-toolkit" ,python-prompt-toolkit)
7874 ("python-pygments" ,python-pygments)))
7875 (native-inputs
7876 `(("python-nose" ,python-nose)))
7877 (home-page "https://jupyter.org")
7878 (synopsis "Jupyter terminal console")
7879 (description "This package provides a terminal-based console frontend for
7880 Jupyter kernels. It also allows for console-based interaction with non-Python
7881 Jupyter kernels such as IJulia and IRKernel.")
7882 (license license:bsd-3)))
7883
7884 (define-public python2-jupyter-console
7885 (package
7886 (name "python2-jupyter-console")
7887 (version "5.2.0")
7888 (source
7889 (origin
7890 (method url-fetch)
7891 (uri (pypi-uri "jupyter_console" version))
7892 (sha256
7893 (base32
7894 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7895 (build-system python-build-system)
7896 ;; Tests only run in an TTY.
7897 (arguments `(#:tests? #f))
7898 (propagated-inputs
7899 `(("python2-ipykernel" ,python2-ipykernel)
7900 ("python2-jupyter-client" ,python2-jupyter-client)
7901 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7902 ("python2-pygments" ,python2-pygments)))
7903 (native-inputs
7904 `(("python2-nose" ,python2-nose)))
7905 (home-page "https://jupyter.org")
7906 (synopsis "Jupyter terminal console")
7907 (description "This package provides a terminal-based console frontend for
7908 Jupyter kernels. It also allows for console-based interaction with non-Python
7909 Jupyter kernels such as IJulia and IRKernel.")
7910 (license license:bsd-3)))
7911
7912 ;; The python-ipython and python-jupyter-console require each other. To get
7913 ;; the functionality in both packages working, strip down the
7914 ;; python-jupyter-console package when using it as an input to python-ipython.
7915 (define python-jupyter-console-minimal
7916 (package
7917 (inherit python-jupyter-console)
7918 (name "python-jupyter-console-minimal")
7919 (arguments
7920 (substitute-keyword-arguments
7921 (package-arguments python-jupyter-console)
7922 ((#:phases phases)
7923 `(modify-phases ,phases
7924 (add-after 'install 'delete-bin
7925 (lambda* (#:key outputs #:allow-other-keys)
7926 ;; Delete the bin files, to avoid conflicts in profiles
7927 ;; where python-ipython and python-jupyter-console are
7928 ;; both present.
7929 (delete-file-recursively
7930 (string-append
7931 (assoc-ref outputs "out") "/bin"))))))))
7932 ;; Remove the python-ipython propagated input, to avoid the cycle
7933 (propagated-inputs
7934 (alist-delete
7935 "python-ipython"
7936 (package-propagated-inputs python-jupyter-console)))))
7937
7938 (define-public python-qtconsole
7939 (package
7940 (name "python-qtconsole")
7941 (version "4.4.3")
7942 (source
7943 (origin
7944 (method url-fetch)
7945 (uri (pypi-uri "qtconsole" version))
7946 (sha256
7947 (base32
7948 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
7949 (build-system python-build-system)
7950 (arguments
7951 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
7952 ;; but we only have the LTS version 5.x. This means that there might be
7953 ;; runtime errors, but since this is a dependency of the Jupyter package,
7954 ;; and Jupyter can be used without the qtconsole we can overlook this for
7955 ;; now.
7956 `(#:tests? #f
7957 #:phases
7958 (modify-phases %standard-phases
7959 (add-before 'check 'pre-check
7960 (lambda _
7961 (setenv "QT_QPA_PLATFORM" "offscreen")
7962 #t)))))
7963 (propagated-inputs
7964 `(("python-ipykernel" ,python-ipykernel)
7965 ("python-ipython" ,python-ipython)))
7966 (native-inputs
7967 `(("python-pytest" ,python-pytest)))
7968 (home-page "http://jupyter.org")
7969 (synopsis "Jupyter Qt console")
7970 (description "This package provides a Qt-based console for Jupyter with
7971 support for rich media output.")
7972 (license license:bsd-3)))
7973
7974 (define-public python-jsbeautifier
7975 (package
7976 (name "python-jsbeautifier")
7977 (version "1.10.2")
7978 (home-page "https://github.com/beautify-web/js-beautify")
7979 (source (origin
7980 (method git-fetch)
7981 (uri (git-reference
7982 (url home-page)
7983 (commit (string-append "v" version))))
7984 (file-name (git-file-name name version))
7985 (sha256
7986 (base32
7987 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
7988 (build-system python-build-system)
7989 (arguments
7990 `(#:phases (modify-phases %standard-phases
7991 (add-after 'unpack 'chdir
7992 (lambda _
7993 ;; The upstream Git repository contains all the code,
7994 ;; but this package only builds the python code.
7995 (chdir "python")
7996 #t))
7997 (add-after 'unpack 'patch-python-six-requirements
7998 (lambda _
7999 (substitute* "python/setup.py"
8000 (("six>=1.12.0")
8001 "six>=1.11.0"))
8002 #t)))))
8003 (propagated-inputs
8004 `(("python-editorconfig" ,python-editorconfig)
8005 ("python-six" ,python-six)))
8006 (native-inputs
8007 `(("python-pytest" ,python-pytest)))
8008 (synopsis "JavaScript unobfuscator and beautifier")
8009 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
8010 popular online obfuscators.")
8011 (license license:expat)))
8012
8013 (define-public jupyter
8014 (package
8015 (name "jupyter")
8016 (version "1.0.0")
8017 (source
8018 (origin
8019 (method url-fetch)
8020 (uri (pypi-uri "jupyter" version))
8021 (sha256
8022 (base32
8023 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8024 (build-system python-build-system)
8025 (arguments '(#:tests? #f)) ; there are none.
8026 (propagated-inputs
8027 `(("python-ipykernel" ,python-ipykernel)
8028 ("python-ipywidgets" ,python-ipywidgets)
8029 ("python-jupyter-console" ,python-jupyter-console)
8030 ("python-nbconvert" ,python-nbconvert)
8031 ("python-notebook" ,python-notebook)
8032 ("python-qtconsole" ,python-qtconsole)))
8033 (native-search-paths
8034 (list (search-path-specification
8035 (variable "JUPYTER_PATH")
8036 (files '("share/jupyter")))))
8037 (home-page "https://jupyter.org")
8038 (synopsis "Web application for interactive documents")
8039 (description
8040 "The Jupyter Notebook is a web application that allows you to create and
8041 share documents that contain live code, equations, visualizations and
8042 explanatory text. Uses include: data cleaning and transformation, numerical
8043 simulation, statistical modeling, machine learning and much more.")
8044 (license license:bsd-3)))
8045
8046 (define-public python-chardet
8047 (package
8048 (name "python-chardet")
8049 (version "3.0.4")
8050 (source
8051 (origin
8052 (method url-fetch)
8053 (uri (pypi-uri "chardet" version))
8054 (sha256
8055 (base32
8056 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
8057 (native-inputs
8058 `(("python-hypothesis" ,python-hypothesis)
8059 ("python-pytest" ,python-pytest)
8060 ("python-pytest-runner" ,python-pytest-runner)))
8061 (build-system python-build-system)
8062 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
8063 (arguments `(#:tests? #f))
8064 (home-page "https://github.com/chardet/chardet")
8065 (synopsis "Universal encoding detector for Python 2 and 3")
8066 (description
8067 "This package provides @code{chardet}, a Python module that can
8068 automatically detect a wide range of file encodings.")
8069 (license license:lgpl2.1+)))
8070
8071 (define-public python2-chardet
8072 (package-with-python2 python-chardet))
8073
8074 (define-public python-docopt
8075 (package
8076 (name "python-docopt")
8077 (version "0.6.2")
8078 (source
8079 (origin
8080 (method url-fetch)
8081 ;; The release on PyPI does not include tests.
8082 (uri (string-append
8083 "https://github.com/docopt/docopt/archive/"
8084 version ".tar.gz"))
8085 (file-name (string-append name "-" version ".tar.gz"))
8086 (sha256
8087 (base32
8088 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
8089 (build-system python-build-system)
8090 (native-inputs
8091 `(("python-pytest" ,python-pytest)))
8092 (arguments
8093 `(#:phases
8094 (modify-phases %standard-phases
8095 (replace 'check
8096 (lambda _ (invoke "py.test"))))))
8097 (home-page "http://docopt.org")
8098 (synopsis "Command-line interface description language for Python")
8099 (description "This library allows the user to define a command-line
8100 interface from a program's help message rather than specifying it
8101 programmatically with command-line parsers like @code{getopt} and
8102 @code{argparse}.")
8103 (license license:expat)))
8104
8105 (define-public python2-docopt
8106 (package-with-python2 python-docopt))
8107
8108 (define-public python-pythondialog
8109 (package
8110 (name "python-pythondialog")
8111 (version "3.4.0")
8112 (source
8113 (origin
8114 (method url-fetch)
8115 (uri (pypi-uri "pythondialog" version))
8116 (sha256
8117 (base32
8118 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8119 (build-system python-build-system)
8120 (arguments
8121 `(#:phases
8122 (modify-phases %standard-phases
8123 (add-after 'unpack 'patch-path
8124 (lambda* (#:key inputs #:allow-other-keys)
8125 (let* ((dialog (assoc-ref inputs "dialog")))
8126 ;; Since this library really wants to grovel the search path, we
8127 ;; must hardcode dialog's store path into it.
8128 (substitute* "dialog.py"
8129 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8130 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8131 #t))))
8132 #:tests? #f)) ; no test suite
8133 (propagated-inputs
8134 `(("dialog" ,dialog)))
8135 (home-page "http://pythondialog.sourceforge.net/")
8136 (synopsis "Python interface to the UNIX dialog utility")
8137 (description "A Python wrapper for the dialog utility. Its purpose is to
8138 provide an easy to use, pythonic and comprehensive Python interface to dialog.
8139 This allows one to make simple text-mode user interfaces on Unix-like systems")
8140 (license license:lgpl2.1)
8141 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8142
8143 (define-public python2-pythondialog
8144 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8145 (package
8146 (inherit base)
8147 (version (package-version python-pythondialog))
8148 (source (origin
8149 (method url-fetch)
8150 (uri (pypi-uri "python2-pythondialog" version))
8151 (sha256
8152 (base32
8153 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8154
8155 (define-public python-configobj
8156 (package
8157 (name "python-configobj")
8158 (version "5.0.6")
8159 (source (origin
8160 (method url-fetch)
8161 (uri (pypi-uri "configobj" version))
8162 (sha256
8163 (base32
8164 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8165 ;; Patch setup.py so it looks for python-setuptools, which is
8166 ;; required to parse the keyword 'install_requires' in setup.py.
8167 (patches (search-patches "python-configobj-setuptools.patch"))))
8168 (build-system python-build-system)
8169 (propagated-inputs
8170 `(("python-six" ,python-six)))
8171 (synopsis "Config file reading, writing and validation")
8172 (description "ConfigObj is a simple but powerful config file reader and
8173 writer: an ini file round tripper. Its main feature is that it is very easy to
8174 use, with a straightforward programmer’s interface and a simple syntax for
8175 config files.")
8176 (home-page "https://github.com/DiffSK/configobj")
8177 (license license:bsd-3)))
8178
8179 (define-public python2-configobj
8180 (package-with-python2 python-configobj))
8181
8182 (define-public python-configargparse
8183 (package
8184 (name "python-configargparse")
8185 (version "0.14.0")
8186 (source (origin
8187 (method url-fetch)
8188 (uri (pypi-uri "ConfigArgParse" version))
8189 (sha256
8190 (base32
8191 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
8192 (build-system python-build-system)
8193 (native-inputs
8194 `(("python-pyyaml" ,python-pyyaml)))
8195 (arguments
8196 `(#:phases
8197 (modify-phases %standard-phases
8198 (replace 'check
8199 (lambda _
8200 ;; Bypass setuptools-shim because one test relies on "setup.py"
8201 ;; being the first argument passed to the python call.
8202 ;;
8203 ;; NOTE: Many tests do not run because they rely on Python's
8204 ;; built-in test.test_argparse, but we remove the unit tests from
8205 ;; our Python installation.
8206 (invoke "python" "setup.py" "test"))))))
8207 (synopsis "Replacement for argparse")
8208 (description "A drop-in replacement for argparse that allows options to also
8209 be set via config files and/or environment variables.")
8210 (home-page "https://github.com/bw2/ConfigArgParse")
8211 (license license:expat)))
8212
8213 (define-public python2-configargparse
8214 (package-with-python2 python-configargparse))
8215
8216 (define-public python-argparse-manpage
8217 (package
8218 (name "python-argparse-manpage")
8219 (version "1.1")
8220 (source
8221 (origin
8222 (method url-fetch)
8223 (uri (pypi-uri "argparse-manpage" version))
8224 (sha256
8225 (base32
8226 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8227 (build-system python-build-system)
8228 (home-page "https://github.com/praiskup/argparse-manpage")
8229 (synopsis "Build manual page from Python's ArgumentParser object")
8230 (description
8231 "This package provides tools to build manual pages from Python's
8232 @code{ArgumentParser} object.")
8233 (license license:asl2.0)))
8234
8235 (define-public python-contextlib2
8236 (package
8237 (name "python-contextlib2")
8238 (version "0.5.5")
8239 (source
8240 (origin
8241 (method url-fetch)
8242 (uri (pypi-uri "contextlib2" version))
8243 (sha256
8244 (base32
8245 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8246 (build-system python-build-system)
8247 (home-page "http://contextlib2.readthedocs.org/")
8248 (synopsis "Tools for decorators and context managers")
8249 (description "This module is primarily a backport of the Python
8250 3.2 contextlib to earlier Python versions. Like contextlib, it
8251 provides utilities for common tasks involving decorators and context
8252 managers. It also contains additional features that are not part of
8253 the standard library.")
8254 (license license:psfl)))
8255
8256 (define-public python2-contextlib2
8257 (package
8258 (name "python2-contextlib2")
8259 (version "0.5.5")
8260 (source
8261 (origin
8262 (method url-fetch)
8263 (uri (pypi-uri "contextlib2" version))
8264 (sha256
8265 (base32
8266 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8267 (build-system python-build-system)
8268 (arguments
8269 `(#:python ,python-2
8270 #:phases
8271 (modify-phases %standard-phases
8272 (replace 'check
8273 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
8274 (native-inputs
8275 `(("python2-unittest2" ,python2-unittest2)))
8276 (home-page "http://contextlib2.readthedocs.org/")
8277 (synopsis "Tools for decorators and context managers")
8278 (description "This module is primarily a backport of the Python
8279 3.2 contextlib to earlier Python versions. Like contextlib, it
8280 provides utilities for common tasks involving decorators and context
8281 managers. It also contains additional features that are not part of
8282 the standard library.")
8283 (license license:psfl)))
8284
8285 (define-public python-texttable
8286 (package
8287 (name "python-texttable")
8288 (version "0.9.1")
8289 (source
8290 (origin
8291 (method url-fetch)
8292 (uri (pypi-uri "texttable" version))
8293 (sha256
8294 (base32
8295 "0yawv64c0zbawwv6zz84whb32fnb2n9jylwjcfsrcdgh7xvl340i"))))
8296 (build-system python-build-system)
8297 (arguments '(#:tests? #f)) ; no tests
8298 (home-page "https://github.com/foutaise/texttable/")
8299 (synopsis "Python module for creating simple ASCII tables")
8300 (description "Texttable is a Python module for creating simple ASCII
8301 tables.")
8302 (license license:lgpl2.1+)))
8303
8304 (define-public python2-texttable
8305 (package-with-python2 python-texttable))
8306
8307 (define-public python-atomicwrites
8308 (package
8309 (name "python-atomicwrites")
8310 (version "1.3.0")
8311 (source (origin
8312 (method url-fetch)
8313 (uri (pypi-uri "atomicwrites" version))
8314 (sha256
8315 (base32
8316 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
8317 (build-system python-build-system)
8318 (synopsis "Atomic file writes in Python")
8319 (description "Library for atomic file writes using platform dependent tools
8320 for atomic file system operations.")
8321 (home-page "https://github.com/untitaker/python-atomicwrites")
8322 (license license:expat)))
8323
8324 (define-public python2-atomicwrites
8325 (package-with-python2 python-atomicwrites))
8326
8327 (define-public python-click-threading
8328 (package
8329 (name "python-click-threading")
8330 (version "0.4.4")
8331 (source (origin
8332 (method url-fetch)
8333 (uri (pypi-uri "click-threading" version))
8334 (sha256
8335 (base32
8336 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8337 (build-system python-build-system)
8338 (propagated-inputs
8339 `(("python-click" ,python-click)))
8340 (synopsis "Utilities for multithreading in Click")
8341 (description "This package provides utilities for multithreading in Click
8342 applications.")
8343 (home-page "https://github.com/click-contrib/click-threading")
8344 (license license:expat)))
8345
8346 (define-public python-click-log
8347 (package
8348 (name "python-click-log")
8349 (version "0.3.2")
8350 (source (origin
8351 (method url-fetch)
8352 (uri (pypi-uri "click-log" version))
8353 (sha256
8354 (base32
8355 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8356 (build-system python-build-system)
8357 (propagated-inputs
8358 `(("python-click" ,python-click)))
8359 (synopsis "Logging for click applications")
8360 (description "This package provides a Python library for logging Click
8361 applications.")
8362 (home-page "https://github.com/click-contrib/click-log")
8363 (license license:expat)))
8364
8365 (define-public python-apipkg
8366 (package
8367 (name "python-apipkg")
8368 (version "1.4")
8369 (source (origin
8370 (method url-fetch)
8371 (uri (pypi-uri "apipkg" version))
8372 (sha256
8373 (base32
8374 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8375 (build-system python-build-system)
8376 (native-inputs
8377 `(("python-pytest" ,python-pytest)))
8378 (synopsis "Namespace control and lazy-import mechanism")
8379 (description "With apipkg you can control the exported namespace of a Python
8380 package and greatly reduce the number of imports for your users. It is a small
8381 pure Python module that works on virtually all Python versions.")
8382 (home-page "https://github.com/pytest-dev/apipkg")
8383 (license license:expat)))
8384
8385 (define-public python2-apipkg
8386 (package-with-python2 python-apipkg))
8387
8388 (define-public python-execnet
8389 (package
8390 (name "python-execnet")
8391 (version "1.4.1")
8392 (source (origin
8393 (method url-fetch)
8394 (uri (pypi-uri "execnet" version))
8395 (sha256
8396 (base32
8397 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8398 (build-system python-build-system)
8399 (arguments
8400 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8401 ;; The two test failures are caused by the lack of an `ssh` executable.
8402 ;; The test suite can be run with pytest after the 'install' phase.
8403 #:tests? #f))
8404 (native-inputs
8405 `(("python-pytest" ,python-pytest)
8406 ("python-setuptools-scm" ,python-setuptools-scm)))
8407 (propagated-inputs
8408 `(("python-apipkg" ,python-apipkg)))
8409 (synopsis "Rapid multi-Python deployment")
8410 (description "Execnet provides a share-nothing model with
8411 channel-send/receive communication for distributing execution across many
8412 Python interpreters across version, platform and network barriers. It has a
8413 minimal and fast API targeting the following uses:
8414 @enumerate
8415 @item distribute tasks to (many) local or remote CPUs
8416 @item write and deploy hybrid multi-process applications
8417 @item write scripts to administer multiple environments
8418 @end enumerate")
8419 (home-page "http://codespeak.net/execnet/")
8420 (license license:expat)))
8421
8422 (define-public python2-execnet
8423 (package-with-python2 python-execnet))
8424
8425 (define-public python-icalendar
8426 (package
8427 (name "python-icalendar")
8428 (version "4.0.4")
8429 (source (origin
8430 (method url-fetch)
8431 (uri (pypi-uri "icalendar" version))
8432 (sha256
8433 (base32
8434 "16gjvqv0n05jrb9g228pdjgzd3amz2pdhvcgsn1jypszjg5m2w9l"))))
8435 (build-system python-build-system)
8436 (propagated-inputs
8437 `(("python-dateutil" ,python-dateutil)
8438 ("python-pytz" ,python-pytz)))
8439 (synopsis "Python library for parsing iCalendar files")
8440 (description "The icalendar package is a parser/generator of iCalendar
8441 files for use with Python.")
8442 (home-page "https://github.com/collective/icalendar")
8443 (license license:bsd-2)))
8444
8445 (define-public python-args
8446 (package
8447 (name "python-args")
8448 (version "0.1.0")
8449 (source (origin
8450 (method url-fetch)
8451 (uri (pypi-uri "args" version))
8452 (sha256
8453 (base32
8454 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8455 (build-system python-build-system)
8456 (home-page "https://github.com/kennethreitz/args")
8457 (synopsis "Command-line argument parser")
8458 (description
8459 "This library provides a Python module to parse command-line arguments.")
8460 (license license:bsd-3)))
8461
8462 (define-public python2-args
8463 (package-with-python2 python-args))
8464
8465 (define-public python-clint
8466 (package
8467 (name "python-clint")
8468 (version "0.5.1")
8469 (source (origin
8470 (method url-fetch)
8471 (uri (pypi-uri "clint" version))
8472 (sha256
8473 (base32
8474 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8475 (build-system python-build-system)
8476 (arguments
8477 '(#:phases
8478 (modify-phases %standard-phases
8479 (replace 'check
8480 (lambda _ (invoke "py.test" "-v"))))))
8481 (native-inputs
8482 `(("python-pytest" ,python-pytest)))
8483 (propagated-inputs
8484 `(("python-args" ,python-args)))
8485 (home-page "https://github.com/kennethreitz/clint")
8486 (synopsis "Command-line interface tools")
8487 (description
8488 "Clint is a Python module filled with a set of tools for developing
8489 command-line applications, including tools for colored and indented
8490 output, progress bar display, and pipes.")
8491 (license license:isc)))
8492
8493 (define-public python2-clint
8494 (package-with-python2 python-clint))
8495
8496 (define-public python-rply
8497 (package
8498 (name "python-rply")
8499 (version "0.7.5")
8500 (source (origin
8501 (method url-fetch)
8502 (uri (pypi-uri "rply" version))
8503 (sha256
8504 (base32
8505 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8506 (build-system python-build-system)
8507 (propagated-inputs
8508 `(("python-appdirs" ,python-appdirs)))
8509 (home-page "https://github.com/alex/rply")
8510 (synopsis "Parser generator for Python")
8511 (description
8512 "This package provides a pure Python based parser generator, that also
8513 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8514 with a new public API, and RPython support.")
8515 (license license:bsd-3)))
8516
8517 (define-public python2-rply
8518 (package-with-python2 python-rply))
8519
8520 (define-public python-hy
8521 (package
8522 (name "python-hy")
8523 (version "0.13.0")
8524 (source (origin
8525 (method url-fetch)
8526 (uri (pypi-uri "hy" version))
8527 (sha256
8528 (base32
8529 "19sfymaksx9jhksfnb15ahid46mzrhdfzz6yy2craz2qnzvpmky8"))))
8530 (build-system python-build-system)
8531 (arguments
8532 '(#:phases
8533 (modify-phases %standard-phases
8534 (add-before 'install 'set-HOME
8535 (lambda _
8536 (setenv "HOME" "/tmp")))
8537 (replace 'check
8538 (lambda _
8539 ;; Tests require write access to HOME.
8540 (setenv "HOME" "/tmp")
8541 (invoke "nosetests"))))))
8542 (native-inputs
8543 `(("python-coverage" ,python-coverage)
8544 ("python-nose" ,python-nose)))
8545 (propagated-inputs
8546 `(("python-astor" ,python-astor)
8547 ("python-clint" ,python-clint)
8548 ("python-rply" ,python-rply)))
8549 (home-page "http://hylang.org/")
8550 (synopsis "Lisp frontend to Python")
8551 (description
8552 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8553 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8554 Python at your fingertips, in Lisp form.")
8555 (license license:expat)))
8556
8557 (define-public python2-hy
8558 (package-with-python2 python-hy))
8559
8560 (define-public python2-functools32
8561 (package
8562 (name "python2-functools32")
8563 (version "3.2.3-2")
8564 (source
8565 (origin
8566 (method url-fetch)
8567 (uri (pypi-uri "functools32" version))
8568 (sha256
8569 (base32
8570 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8571 (build-system python-build-system)
8572 (arguments
8573 `(#:python ,python-2
8574 #:tests? #f)) ; no test target
8575 (home-page "https://github.com/MiCHiLU/python-functools32")
8576 (synopsis
8577 "Backport of the functools module from Python 3.2.3")
8578 (description
8579 "This package is a backport of the @code{functools} module from Python
8580 3.2.3 for use with older versions of Python and PyPy.")
8581 (license license:expat)))
8582
8583 (define-public python2-subprocess32
8584 (package
8585 (name "python2-subprocess32")
8586 (version "3.2.7")
8587 (source (origin
8588 (method url-fetch)
8589 (uri (pypi-uri "subprocess32" version))
8590 (sha256
8591 (base32
8592 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8593 (patches
8594 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8595 (build-system python-build-system)
8596 (arguments
8597 `(#:python ,python-2
8598 ;; The test suite fails with Python > 2.7.13:
8599 ;; import test.support
8600 ;; ImportError: No module named support
8601 #:tests? #f
8602 #:phases
8603 (modify-phases %standard-phases
8604 (add-after 'unpack 'patch-/bin/sh
8605 (lambda _
8606 (substitute* '("subprocess32.py"
8607 "test_subprocess32.py")
8608 (("/bin/sh") (which "sh")))
8609 #t)))))
8610 (home-page "https://github.com/google/python-subprocess32")
8611 (synopsis "Backport of the subprocess module from Python 3.2")
8612 (description
8613 "This is a backport of the @code{subprocess} standard library module
8614 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8615 new features. On POSIX systems it is guaranteed to be reliable when used
8616 in threaded applications. It includes timeout support from Python 3.3 but
8617 otherwise matches 3.2’s API.")
8618 (license license:psfl)))
8619
8620 (define-public python2-futures
8621 (package
8622 (name "python2-futures")
8623 (version "3.2.0")
8624 (source
8625 (origin
8626 (method url-fetch)
8627 (uri (pypi-uri "futures" version))
8628 (sha256
8629 (base32
8630 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8631 (build-system python-build-system)
8632 (arguments
8633 `(#:python ,python-2
8634 #:phases
8635 (modify-phases %standard-phases
8636 (replace 'check
8637 (lambda _
8638 (invoke "python" "test_futures.py")
8639 #t)))))
8640 (home-page "https://github.com/agronholm/pythonfutures")
8641 (synopsis
8642 "Backport of the concurrent.futures package from Python 3.2")
8643 (description
8644 "The concurrent.futures module provides a high-level interface for
8645 asynchronously executing callables. This package backports the
8646 concurrent.futures package from Python 3.2")
8647 (license license:bsd-3)))
8648
8649 (define-public python-promise
8650 (package
8651 (name "python-promise")
8652 (version "0.4.2")
8653 (source
8654 (origin
8655 (method url-fetch)
8656 (uri (pypi-uri "promise" version))
8657 (sha256
8658 (base32
8659 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8660 (build-system python-build-system)
8661 ;; Tests wants python-futures, which is a python2 only program, and
8662 ;; can't be found by python-promise at test time.
8663 (arguments `(#:tests? #f))
8664 (home-page "https://github.com/syrusakbary/promise")
8665 (synopsis "Promises/A+ implementation for Python")
8666 (description
8667 "Promises/A+ implementation for Python")
8668 (properties `((python2-variant . ,(delay python2-promise))))
8669 (license license:expat)))
8670
8671 (define-public python2-promise
8672 (let ((promise (package-with-python2
8673 (strip-python2-variant python-promise))))
8674 (package (inherit promise)
8675 (arguments (substitute-keyword-arguments (package-arguments promise)
8676 ((#:tests? _) #t)))
8677 (native-inputs
8678 `(("python2-futures" ,python2-futures)
8679 ("python2-pytest" ,python2-pytest)
8680 ,@(package-native-inputs promise))))))
8681
8682 (define-public python-progressbar33
8683 (package
8684 (name "python-progressbar33")
8685 (version "2.4")
8686 (source
8687 (origin
8688 (method url-fetch)
8689 (uri (pypi-uri "progressbar33" version))
8690 (sha256
8691 (base32
8692 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
8693 (build-system python-build-system)
8694 (home-page "http://github.com/germangh/python-progressbar")
8695 (synopsis "Text progress bar library for Python")
8696 (description
8697 "This package provides a text progress bar library for Python. This
8698 version only differs from the original @code{progressbar} package in that it
8699 uses relative package imports instead of absolute imports, which is necessary
8700 for the module to work under Python 3.3.")
8701 ;; Either or both of these licenses may be selected.
8702 (license (list license:lgpl2.1+ license:bsd-3))))
8703
8704 (define-public python-colorama
8705 (package
8706 (name "python-colorama")
8707 (version "0.3.9")
8708 (source
8709 (origin
8710 (method url-fetch)
8711 (uri (pypi-uri "colorama" version))
8712 (sha256
8713 (base32
8714 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
8715 (build-system python-build-system)
8716 (synopsis "Colored terminal text rendering for Python")
8717 (description "Colorama is a Python library for rendering colored terminal
8718 text.")
8719 (home-page "https://pypi.python.org/pypi/colorama")
8720 (license license:bsd-3)))
8721
8722 (define-public python2-colorama
8723 (package-with-python2 python-colorama))
8724
8725 (define-public python-rsa
8726 (package
8727 (name "python-rsa")
8728 (version "3.4.2")
8729 (source
8730 (origin
8731 (method url-fetch)
8732 (uri (pypi-uri "rsa" version))
8733 (sha256
8734 (base32
8735 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8736 (build-system python-build-system)
8737 (propagated-inputs
8738 `(("python-pyasn1" ,python-pyasn1)))
8739 (synopsis "Pure-Python RSA implementation")
8740 (description "Python-RSA is a pure-Python RSA implementation. It supports
8741 encryption and decryption, signing and verifying signatures, and key
8742 generation according to PKCS#1 version 1.5. It can be used as a Python
8743 library as well as on the command line.")
8744 (home-page "https://stuvel.eu/rsa")
8745 (license license:asl2.0)))
8746
8747 (define-public python2-rsa
8748 (package-with-python2 python-rsa))
8749
8750 (define-public python-pluggy
8751 (package
8752 (name "python-pluggy")
8753 (version "0.11.0")
8754 (source
8755 (origin
8756 (method url-fetch)
8757 (uri (pypi-uri "pluggy" version))
8758 (sha256
8759 (base32
8760 "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895"))))
8761 (build-system python-build-system)
8762 (native-inputs
8763 `(("python-setuptools-scm" ,python-setuptools-scm)))
8764 (synopsis "Plugin and hook calling mechanism for Python")
8765 (description "Pluggy is an extraction of the plugin manager as used by
8766 Pytest but stripped of Pytest specific details.")
8767 (home-page "https://pypi.python.org/pypi/pluggy")
8768 (license license:expat)))
8769
8770 (define-public python2-pluggy
8771 (package-with-python2 python-pluggy))
8772
8773 (define-public python-tox
8774 (package
8775 (name "python-tox")
8776 (version "2.8.1")
8777 (source
8778 (origin
8779 (method url-fetch)
8780 (uri (pypi-uri "tox" version))
8781 (sha256
8782 (base32
8783 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8784 (build-system python-build-system)
8785 (arguments
8786 ;; FIXME: Tests require pytest-timeout, which itself requires
8787 ;; pytest>=2.8.0 for installation.
8788 '(#:tests? #f))
8789 (propagated-inputs
8790 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8791 ("python-py" ,python-py)
8792 ("python-virtualenv" ,python-virtualenv)))
8793 (native-inputs
8794 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8795 ("python-pytest" ,python-pytest) ; >= 2.3.5
8796 ("python-setuptools-scm" ,python-setuptools-scm)))
8797 (home-page "http://tox.testrun.org/")
8798 (synopsis "Virtualenv-based automation of test activities")
8799 (description "Tox is a generic virtualenv management and test command line
8800 tool. It can be used to check that a package installs correctly with
8801 different Python versions and interpreters, or run tests in each type of
8802 supported environment, or act as a frontend to continuous integration
8803 servers.")
8804 (license license:expat)))
8805
8806 (define-public python2-tox
8807 (package-with-python2 python-tox))
8808
8809 (define-public python-jmespath
8810 (package
8811 (name "python-jmespath")
8812 (version "0.9.4")
8813 (source
8814 (origin
8815 (method url-fetch)
8816 (uri (pypi-uri "jmespath" version))
8817 (sha256
8818 (base32
8819 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
8820 (build-system python-build-system)
8821 (native-inputs
8822 `(("python-nose" ,python-nose)))
8823 (synopsis "JSON Matching Expressions")
8824 (description "JMESPath (pronounced “james path”) is a Python library that
8825 allows one to declaratively specify how to extract elements from a JSON
8826 document.")
8827 (home-page "https://github.com/jmespath/jmespath.py")
8828 (license license:expat)))
8829
8830 (define-public python2-jmespath
8831 (package-with-python2 python-jmespath))
8832
8833 (define-public python-botocore
8834 (package
8835 (name "python-botocore")
8836 (version "1.12.149")
8837 (source
8838 (origin
8839 (method url-fetch)
8840 (uri (pypi-uri "botocore" version))
8841 (sha256
8842 (base32
8843 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
8844 (build-system python-build-system)
8845 (arguments
8846 ;; FIXME: Many tests are failing.
8847 '(#:tests? #f))
8848 (propagated-inputs
8849 `(("python-dateutil" ,python-dateutil)
8850 ("python-docutils" ,python-docutils)
8851 ("python-jmespath" ,python-jmespath)))
8852 (native-inputs
8853 `(("python-mock" ,python-mock)
8854 ("python-nose" ,python-nose)
8855 ("behave" ,behave)
8856 ("python-tox" ,python-tox)
8857 ("python-urllib3" ,python-urllib3)
8858 ("python-wheel" ,python-wheel)))
8859 (home-page "https://github.com/boto/botocore")
8860 (synopsis "Low-level interface to AWS")
8861 (description "Botocore is a Python library that provides a low-level
8862 interface to the Amazon Web Services (AWS) API.")
8863 (license license:asl2.0)))
8864
8865 (define-public python2-botocore
8866 (package-with-python2 python-botocore))
8867
8868 (define-public python-xdo
8869 (package
8870 (name "python-xdo")
8871 (version "0.3")
8872 (source (origin
8873 (method url-fetch)
8874 (uri (string-append
8875 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8876 "python-xdo_" version ".orig.tar.gz"))
8877 (sha256
8878 (base32
8879 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8880 (build-system python-build-system)
8881 (arguments
8882 '(#:phases
8883 (modify-phases %standard-phases
8884 (add-before 'install 'patch-libxdo-path
8885 ;; Hardcode the path of dynamically loaded libxdo library.
8886 (lambda* (#:key inputs #:allow-other-keys)
8887 (let ((libxdo (string-append
8888 (assoc-ref inputs "xdotool")
8889 "/lib/libxdo.so")))
8890 (substitute* "xdo/_xdo.py"
8891 (("find_library\\(\"xdo\"\\)")
8892 (simple-format #f "\"~a\"" libxdo)))
8893 #t))))
8894 #:tests? #f)) ; no tests provided
8895 (propagated-inputs
8896 `(("python-six" ,python-six)))
8897 (inputs
8898 `(("xdotool" ,xdotool)
8899 ("libX11" ,libx11)))
8900 (home-page "https://tracker.debian.org/pkg/python-xdo")
8901 (synopsis "Python library for simulating X11 keyboard/mouse input")
8902 (description "Provides bindings to libxdo for manipulating X11 via simulated
8903 input. (Note that this is mostly a legacy library; you may wish to look at
8904 python-xdo for newer bindings.)")
8905 (license license:bsd-3)))
8906
8907 (define-public python2-xdo
8908 (package-with-python2 python-xdo))
8909
8910 (define-public python-mako
8911 (package
8912 (name "python-mako")
8913 (version "1.1.0")
8914 (source
8915 (origin
8916 (method url-fetch)
8917 (uri (pypi-uri "Mako" version))
8918 (sha256
8919 (base32
8920 "0jqa3qfpykyn4fmkn0kh6043sfls7br8i2bsdbccazcvk9cijsd3"))))
8921 (build-system python-build-system)
8922 (arguments
8923 `(#:phases (modify-phases %standard-phases
8924 (replace 'check
8925 (lambda _
8926 (invoke "pytest" "-vv"))))))
8927 (propagated-inputs
8928 `(("python-markupsafe" ,python-markupsafe)))
8929 (native-inputs
8930 `(("python-mock" ,python-mock)
8931 ("python-pytest" ,python-pytest)))
8932 (home-page "https://www.makotemplates.org/")
8933 (synopsis "Templating language for Python")
8934 (description "Mako is a templating language for Python that compiles
8935 templates into Python modules.")
8936 (license license:expat)))
8937
8938 (define-public python2-mako
8939 (package-with-python2 python-mako))
8940
8941 (define-public python-waitress
8942 (package
8943 (name "python-waitress")
8944 (version "1.1.0")
8945 (source
8946 (origin
8947 (method url-fetch)
8948 (uri (pypi-uri "waitress" version))
8949 (patches (search-patches "python-waitress-fix-tests.patch"))
8950 (sha256
8951 (base32
8952 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
8953 (build-system python-build-system)
8954 (home-page "https://github.com/Pylons/waitress")
8955 (synopsis "Waitress WSGI server")
8956 (description "Waitress is meant to be a production-quality pure-Python WSGI
8957 server with very acceptable performance.")
8958 (license license:zpl2.1)))
8959
8960 (define-public python2-waitress
8961 (package-with-python2 python-waitress))
8962
8963 (define-public python-whichcraft
8964 (package
8965 (name "python-whichcraft")
8966 (version "0.6.1")
8967 (source
8968 (origin
8969 (method url-fetch)
8970 (uri (pypi-uri "whichcraft" version))
8971 (sha256
8972 (base32
8973 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
8974 (build-system python-build-system)
8975 (native-inputs
8976 `(("python-pytest" ,python-pytest)))
8977 (home-page "https://github.com/pydanny/whichcraft")
8978 (synopsis "Cross-platform cross-python shutil.which functionality")
8979 (description
8980 "This package provides a shim of the shutil.which function that's
8981 designed to work across multiple versions of Python.")
8982 (license license:bsd-3)))
8983
8984 (define-public python-cookiecutter
8985 (package
8986 (name "python-cookiecutter")
8987 (version "1.6.0")
8988 (source
8989 (origin
8990 (method url-fetch)
8991 (uri (pypi-uri "cookiecutter" version))
8992 (sha256
8993 (base32
8994 "0glsvaz8igi2wy1hsnhm9fkn6560vdvdixzvkq6dn20z3hpaa5hk"))))
8995 (build-system python-build-system)
8996 (native-inputs
8997 `(("python-freezegun" ,python-freezegun)
8998 ("python-pytest" ,python-pytest)
8999 ("python-pytest-catchlog" ,python-pytest-catchlog)
9000 ("python-pytest-cov" ,python-pytest-cov)
9001 ("python-pytest-mock" ,python-pytest-mock)))
9002 (propagated-inputs
9003 `(("python-binaryornot" ,python-binaryornot)
9004 ("python-click" ,python-click)
9005 ("python-future" ,python-future)
9006 ("python-jinja2" ,python-jinja2)
9007 ("python-jinja2-time" ,python-jinja2-time)
9008 ("python-poyo" ,python-poyo)
9009 ("python-requests" ,python-requests)
9010 ("python-whichcraft" ,python-whichcraft)))
9011 (home-page "https://github.com/audreyr/cookiecutter")
9012 (synopsis
9013 "Command-line utility that creates projects from project templates")
9014 (description
9015 "This package provides a command-line utility that creates projects from
9016 project templates, e.g. creating a Python package project from a Python package
9017 project template.")
9018 (license license:bsd-3)))
9019
9020 (define-public python-pyquery
9021 (package
9022 (name "python-pyquery")
9023 (version "1.2.17")
9024 (source
9025 (origin
9026 (method url-fetch)
9027 (uri (pypi-uri "pyquery" version))
9028 (sha256
9029 (base32
9030 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9031 (build-system python-build-system)
9032 (native-inputs
9033 `(("python-webob" ,python-webob)
9034 ("python-webtest" ,python-webtest)))
9035 (propagated-inputs
9036 `(("python-lxml" ,python-lxml)
9037 ("python-cssselect" ,python-cssselect)))
9038 (home-page "https://github.com/gawel/pyquery")
9039 (synopsis "Make jQuery-like queries on xml documents")
9040 (description "pyquery allows you to make jQuery queries on xml documents.
9041 The API is as much as possible the similar to jQuery. pyquery uses lxml for
9042 fast xml and html manipulation.")
9043 (license license:bsd-3)))
9044
9045 (define-public python-anyjson
9046 (package
9047 (name "python-anyjson")
9048 (version "0.3.3")
9049 (source
9050 (origin
9051 (method url-fetch)
9052 (uri (pypi-uri "anyjson" version))
9053 (sha256
9054 (base32
9055 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9056 (build-system python-build-system)
9057 (arguments
9058 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9059 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9060 ;; whatever) so this transformation needs to be done before the tests
9061 ;; can be run. Maybe we could add a build step to transform beforehand
9062 ;; but it could be annoying/difficult.
9063 ;; We can enable tests for the Python 2 version, though, and do below.
9064 #:tests? #f))
9065 (home-page "https://bitbucket.org/runeh/anyjson/")
9066 (synopsis
9067 "Wraps best available JSON implementation in a common interface")
9068 (description
9069 "Anyjson loads whichever is the fastest JSON module installed
9070 and provides a uniform API regardless of which JSON implementation is used.")
9071 (license license:bsd-3)
9072 (properties `((python2-variant . ,(delay python2-anyjson))))))
9073
9074 (define-public python2-anyjson
9075 (let ((anyjson (package-with-python2
9076 (strip-python2-variant python-anyjson))))
9077 (package
9078 (inherit anyjson)
9079 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9080 #:tests? #t
9081 ,@(package-arguments anyjson)))
9082 (native-inputs `(("python2-nose" ,python2-nose))))))
9083
9084 (define-public python-amqp
9085 (package
9086 (name "python-amqp")
9087 (version "2.3.2")
9088 (source
9089 (origin
9090 (method url-fetch)
9091 (uri (pypi-uri "amqp" version))
9092 (sha256
9093 (base32
9094 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
9095 (build-system python-build-system)
9096 (native-inputs
9097 `(("python-case" ,python-case)
9098 ("python-pytest-sugar" ,python-pytest-sugar)
9099 ("python-mock" ,python-mock)))
9100 (propagated-inputs
9101 `(("python-vine" ,python-vine)))
9102 (home-page "https://github.com/celery/py-amqp")
9103 (synopsis
9104 "Low-level AMQP client for Python (fork of amqplib)")
9105 (description
9106 "This is a fork of amqplib which was originally written by Barry Pederson.
9107 It is maintained by the Celery project, and used by kombu as a pure python
9108 alternative when librabbitmq is not available.")
9109 (license license:lgpl2.1+)
9110 (properties `((python2-variant . ,(delay python2-amqp))))))
9111
9112 (define-public python2-amqp
9113 (let ((amqp (package-with-python2
9114 (strip-python2-variant python-amqp))))
9115 (package
9116 (inherit amqp)
9117 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9118 ;; unmaintained. Weirdly, does not do this on the python 3
9119 ;; version?
9120 #:tests? #f
9121 ,@(package-arguments amqp))))))
9122
9123 (define-public python-txamqp
9124 (package
9125 (name "python-txamqp")
9126 (version "0.8.2")
9127 (source
9128 (origin
9129 (method url-fetch)
9130 (uri (pypi-uri "txAMQP" version))
9131 (sha256
9132 (base32
9133 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
9134 (build-system python-build-system)
9135 (propagated-inputs
9136 `(("python-six" ,python-six)
9137 ("python-twisted" ,python-twisted)))
9138 (home-page "https://github.com/txamqp/txamqp")
9139 (synopsis "Communicate with AMQP peers and brokers using Twisted")
9140 (description
9141 "This package provides a Python library for communicating with AMQP peers
9142 and brokers using the asynchronous networking framework Twisted. It contains
9143 all the necessary code to connect, send and receive messages to/from an
9144 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
9145 also includes support for using Thrift RPC over AMQP in Twisted
9146 applications.")
9147 (license license:asl2.0)))
9148
9149 (define-public python2-txamqp
9150 (package-with-python2 python-txamqp))
9151
9152 (define-public python-kombu
9153 (package
9154 (name "python-kombu")
9155 (version "4.2.2")
9156 (source
9157 (origin
9158 (method url-fetch)
9159 (uri (pypi-uri "kombu" version))
9160 (sha256
9161 (base32
9162 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
9163 (build-system python-build-system)
9164 (native-inputs
9165 `(("python-mock" ,python-mock)
9166 ("python-case" ,python-case)
9167 ("python-pyro4" ,python-pyro4)
9168 ("python-pytest-sugar" ,python-pytest-sugar)
9169 ("python-pytz" ,python-pytz)))
9170 (propagated-inputs
9171 `(("python-anyjson" ,python-anyjson)
9172 ("python-amqp" ,python-amqp)
9173 ("python-redis" ,python-redis)))
9174 (home-page "https://kombu.readthedocs.io")
9175 (synopsis "Message passing library for Python")
9176 (description "The aim of Kombu is to make messaging in Python as easy as
9177 possible by providing an idiomatic high-level interface for the AMQ protocol,
9178 and also provide proven and tested solutions to common messaging problems.
9179 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9180 message orientation, queuing, routing, reliability and security, for which the
9181 RabbitMQ messaging server is the most popular implementation.")
9182 (license license:bsd-3)
9183 (properties `((python2-variant . ,(delay python2-kombu))))))
9184
9185 (define-public python2-kombu
9186 (let ((kombu (package-with-python2
9187 (strip-python2-variant python-kombu))))
9188 (package
9189 (inherit kombu)
9190 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9191 ;; It works fine on the python3 variant.
9192 #:tests? #f
9193 ,@(package-arguments kombu)))
9194 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9195 ,@(package-native-inputs kombu))))))
9196
9197 (define-public python-billiard
9198 (package
9199 (name "python-billiard")
9200 (version "3.5.0.5")
9201 (source
9202 (origin
9203 (method url-fetch)
9204 (uri (pypi-uri "billiard" version))
9205 (sha256
9206 (base32
9207 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9208 (build-system python-build-system)
9209 (native-inputs
9210 `(("python-case" ,python-case)
9211 ("python-pytest" ,python-pytest)))
9212 (home-page "https://github.com/celery/billiard")
9213 (synopsis
9214 "Python multiprocessing fork with improvements and bugfixes")
9215 (description
9216 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9217 multiprocessing package itself is a renamed and updated version of R Oudkerk's
9218 pyprocessing package. This standalone variant is intended to be compatible with
9219 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9220 (license license:bsd-3)
9221 (properties `((python2-variant . ,(delay python2-billiard))))))
9222
9223 (define-public python2-billiard
9224 (let ((billiard (package-with-python2
9225 (strip-python2-variant python-billiard))))
9226 (package
9227 (inherit billiard)
9228 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9229 ("python2-mock" ,python2-mock)
9230 ,@(package-native-inputs billiard))))))
9231
9232 (define-public python-celery
9233 (package
9234 (name "python-celery")
9235 (version "4.2.1")
9236 (source
9237 (origin
9238 (method url-fetch)
9239 (uri (pypi-uri "celery" version))
9240 (sha256
9241 (base32
9242 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9243 (build-system python-build-system)
9244 (arguments
9245 '(;; TODO The tests fail with Python 3.7
9246 ;; https://github.com/celery/celery/issues/4849
9247 #:tests? #f
9248 #:phases
9249 (modify-phases %standard-phases
9250 (add-after 'unpack 'patch-requirements
9251 (lambda _
9252 (substitute* "requirements/test.txt"
9253 (("pytest>=3\\.0,<3\\.3")
9254 "pytest>=3.0"))
9255 #t)))))
9256 (native-inputs
9257 `(("python-case" ,python-case)
9258 ("python-pytest" ,python-pytest)))
9259 (propagated-inputs
9260 `(("python-pytz" ,python-pytz)
9261 ("python-billiard" ,python-billiard)
9262 ("python-kombu" ,python-kombu)))
9263 (home-page "https://celeryproject.org")
9264 (synopsis "Distributed Task Queue")
9265 (description "Celery is an asynchronous task queue/job queue based on
9266 distributed message passing. It is focused on real-time operation, but
9267 supports scheduling as well. The execution units, called tasks, are executed
9268 concurrently on a single or more worker servers using multiprocessing,
9269 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9270 synchronously (wait until ready).")
9271 (license license:bsd-3)
9272 (properties `((python2-variant . ,(delay python2-celery))))))
9273
9274 (define-public python2-celery
9275 (let ((celery (package-with-python2
9276 (strip-python2-variant python-celery))))
9277 (package
9278 (inherit celery)
9279 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9280 ("python2-mock" ,python2-mock)
9281 ,@(package-native-inputs celery))))))
9282
9283 (define-public python-translitcodec
9284 (package
9285 (name "python-translitcodec")
9286 (version "0.4.0")
9287 (source
9288 (origin
9289 (method url-fetch)
9290 (uri (pypi-uri "translitcodec" version))
9291 (sha256
9292 (base32
9293 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9294 (build-system python-build-system)
9295 (arguments
9296 `(#:tests? #f)) ; no tests provided
9297 (home-page
9298 "https://github.com/claudep/translitcodec")
9299 (synopsis
9300 "Unicode to 8-bit charset transliteration codec")
9301 (description
9302 "This package contains codecs for transliterating ISO 10646 texts into
9303 best-effort representations using smaller coded character sets (ASCII,
9304 ISO 8859, etc.).")
9305 (license license:expat)))
9306
9307 (define-public python2-translitcodec
9308 (package-with-python2 python-translitcodec))
9309
9310 (define-public python-editor
9311 (package
9312 (name "python-editor")
9313 (version "0.5")
9314 (source
9315 (origin
9316 (method url-fetch)
9317 (uri (pypi-uri "python-editor" version))
9318 (sha256
9319 (base32
9320 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9321 (build-system python-build-system)
9322 (home-page
9323 "https://github.com/fmoo/python-editor")
9324 (synopsis
9325 "Programmatically open an editor, capture the result")
9326 (description
9327 "python-editor is a library that provides the editor module for
9328 programmatically interfacing with your system's $EDITOR.")
9329 (license license:asl2.0)))
9330
9331 (define-public python2-editor
9332 (package-with-python2 python-editor))
9333
9334 (define-public python-vobject
9335 (package
9336 (name "python-vobject")
9337 (version "0.9.5")
9338 (source (origin
9339 (method url-fetch)
9340 (uri (pypi-uri "vobject" version))
9341 (sha256
9342 (base32
9343 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9344 (build-system python-build-system)
9345 (arguments
9346 '(;; The test suite relies on some non-portable Windows interfaces.
9347 #:tests? #f))
9348 (propagated-inputs
9349 `(("python-dateutil" ,python-dateutil)
9350 ("python-pyicu" ,python-pyicu)))
9351 (synopsis "Parse and generate vCard and vCalendar files")
9352 (description "Vobject is intended to be a full featured Python package for
9353 parsing and generating vCard and vCalendar files. Currently, iCalendar files
9354 are supported and well tested. vCard 3.0 files are supported, and all data
9355 should be imported, but only a few components are understood in a sophisticated
9356 way.")
9357 (home-page "http://eventable.github.io/vobject/")
9358 (license license:asl2.0)))
9359
9360 (define-public python2-vobject
9361 (package-with-python2 python-vobject))
9362
9363 (define-public python-munkres
9364 (package
9365 (name "python-munkres")
9366 (version "1.0.8")
9367 (source (origin
9368 (method url-fetch)
9369 (uri (pypi-uri "munkres" version))
9370 (sha256
9371 (base32
9372 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9373 (build-system python-build-system)
9374 (arguments
9375 '(#:tests? #f)) ; no test suite
9376 (home-page "http://software.clapper.org/munkres/")
9377 (synopsis "Implementation of the Munkres algorithm")
9378 (description "The Munkres module provides an implementation of the Munkres
9379 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9380 useful for solving the Assignment Problem.")
9381 (license license:bsd-3)))
9382
9383 (define-public python2-munkres
9384 (package-with-python2 python-munkres))
9385
9386 (define-public python-whoosh
9387 (package
9388 (name "python-whoosh")
9389 (version "2.7.4")
9390 (source
9391 (origin
9392 (method url-fetch)
9393 (uri (pypi-uri "Whoosh" version))
9394 (sha256
9395 (base32
9396 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9397 (build-system python-build-system)
9398 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
9399 (native-inputs
9400 `(("python-pytest" ,python-pytest)))
9401 (home-page "https://bitbucket.org/mchaput/whoosh")
9402 (synopsis "Full text indexing, search, and spell checking library")
9403 (description
9404 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9405 checking library.")
9406 (license license:bsd-2)))
9407
9408 (define-public python2-whoosh
9409 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9410 (package (inherit whoosh)
9411 (propagated-inputs
9412 `(("python2-backport-ssl-match-hostname"
9413 ,python2-backport-ssl-match-hostname)
9414 ,@(package-propagated-inputs whoosh))))))
9415
9416 (define-public python-pathlib
9417 (package
9418 (name "python-pathlib")
9419 (version "1.0.1")
9420 (source (origin
9421 (method url-fetch)
9422 (uri (pypi-uri "pathlib" version))
9423 (sha256
9424 (base32
9425 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9426 (build-system python-build-system)
9427 ;; The tests depend on the internal "test" module, which does not provide
9428 ;; a stable interface.
9429 (arguments `(#:tests? #f))
9430 (home-page "https://pathlib.readthedocs.org/")
9431 (synopsis "Object-oriented file system paths")
9432 (description "Pathlib offers a set of classes to handle file system paths.
9433 It offers the following advantages over using string objects:
9434
9435 @enumerate
9436 @item No more cumbersome use of os and os.path functions. Everything can
9437 be done easily through operators, attribute accesses, and method calls.
9438 @item Embodies the semantics of different path types. For example,
9439 comparing Windows paths ignores casing.
9440 @item Well-defined semantics, eliminating any inconsistencies or
9441 ambiguities (forward vs. backward slashes, etc.).
9442 @end enumerate
9443
9444 Note: In Python 3.4, pathlib is now part of the standard library. For other
9445 Python versions please consider python-pathlib2 instead, which tracks the
9446 standard library module. This module (python-pathlib) isn't maintained
9447 anymore.")
9448 (license license:expat)))
9449
9450 (define-public python2-pathlib
9451 (package-with-python2 python-pathlib))
9452
9453 (define-public python2-pathlib2
9454 (package
9455 (name "python2-pathlib2")
9456 (version "2.3.3")
9457 (source (origin
9458 (method url-fetch)
9459 (uri (pypi-uri "pathlib2" version))
9460 (sha256
9461 (base32
9462 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
9463 (build-system python-build-system)
9464 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9465 ;; version is 3.4 which already includes this package as part of the
9466 ;; standard library.
9467 (arguments
9468 `(#:python ,python-2))
9469 (propagated-inputs
9470 `(("python2-scandir" ,python2-scandir)
9471 ("python2-six" ,python2-six)))
9472 (home-page "https://pypi.python.org/pypi/pathlib2/")
9473 (synopsis "Object-oriented file system paths - backport of standard
9474 pathlib module")
9475 (description "The goal of pathlib2 is to provide a backport of standard
9476 pathlib module which tracks the standard library module, so all the newest
9477 features of the standard pathlib can be used also on older Python versions.
9478
9479 Pathlib offers a set of classes to handle file system paths. It offers the
9480 following advantages over using string objects:
9481
9482 @enumerate
9483 @item No more cumbersome use of os and os.path functions. Everything can
9484 be done easily through operators, attribute accesses, and method calls.
9485 @item Embodies the semantics of different path types. For example,
9486 comparing Windows paths ignores casing.
9487 @item Well-defined semantics, eliminating any inconsistencies or
9488 ambiguities (forward vs. backward slashes, etc.).
9489 @end enumerate")
9490 (license license:expat)))
9491
9492 (define-public python2-pathlib2-bootstrap
9493 (hidden-package
9494 (package
9495 (inherit python2-pathlib2)
9496 (name "python2-pathlib2-bootstrap")
9497 (propagated-inputs
9498 `(("python2-scandir" ,python2-scandir)
9499 ("python2-six" ,python2-six-bootstrap))))))
9500
9501 (define-public python-jellyfish
9502 (package
9503 (name "python-jellyfish")
9504 (version "0.5.6")
9505 (source (origin
9506 (method url-fetch)
9507 (uri (pypi-uri "jellyfish" version))
9508 (sha256
9509 (base32
9510 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9511 (build-system python-build-system)
9512 (native-inputs
9513 `(("python-pytest" ,python-pytest)))
9514 (home-page "https://github.com/jamesturk/jellyfish")
9515 (synopsis "Approximate and phonetic matching of strings")
9516 (description "Jellyfish uses a variety of string comparison and phonetic
9517 encoding algorithms to do fuzzy string matching.")
9518 (license license:bsd-2)
9519 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9520
9521 (define-public python2-jellyfish
9522 (let ((jellyfish (package-with-python2
9523 (strip-python2-variant python-jellyfish))))
9524 (package (inherit jellyfish)
9525 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9526 ,@(package-native-inputs jellyfish))))))
9527
9528 (define-public python2-unicodecsv
9529 (package
9530 (name "python2-unicodecsv")
9531 (version "0.14.1")
9532 (source (origin
9533 (method url-fetch)
9534 ;; The test suite is not included in the PyPi release.
9535 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9536 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9537 "archive/" version ".tar.gz"))
9538 (file-name (string-append name "-" version ".tar.gz"))
9539 (sha256
9540 (base32
9541 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9542 (build-system python-build-system)
9543 (arguments
9544 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9545 #:python ,python-2))
9546 (native-inputs
9547 `(("python2-unittest2" ,python2-unittest2)))
9548 (home-page "https://github.com/jdunck/python-unicodecsv")
9549 (synopsis "Unicode CSV module for Python 2")
9550 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9551 module, adding support for Unicode strings.")
9552 (license license:bsd-2)))
9553
9554 (define-public python-rarfile
9555 (package
9556 (name "python-rarfile")
9557 (version "2.8")
9558 (source (origin
9559 (method url-fetch)
9560 (uri (pypi-uri "rarfile" version))
9561 (sha256
9562 (base32
9563 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9564 (build-system python-build-system)
9565 (arguments
9566 '(#:phases
9567 (modify-phases %standard-phases
9568 (replace 'check
9569 ;; Many tests fail, but the installation proceeds.
9570 (lambda _ (invoke "make" "-C" "test" "test"))))))
9571 (native-inputs
9572 `(("which" ,which))) ; required for tests
9573 (propagated-inputs
9574 `(("libarchive" ,libarchive)))
9575 (home-page "https://github.com/markokr/rarfile")
9576 (synopsis "RAR archive reader for Python")
9577 (description "This is Python module for RAR archive reading. The interface
9578 is made as zipfile like as possible.")
9579 (license license:isc)))
9580
9581 (define-public python2-rarfile
9582 (package-with-python2 python-rarfile))
9583
9584 (define-public python-magic
9585 (package
9586 (name "python-magic")
9587 (version "0.4.15")
9588 (source
9589 (origin
9590 (method url-fetch)
9591 (uri (pypi-uri "python-magic" version))
9592 (sha256
9593 (base32
9594 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9595 (file-name (string-append name "-" version "-checkout"))))
9596 (build-system python-build-system)
9597 (arguments
9598 ;; The tests are unreliable, so don't run them. The tests fail
9599 ;; under Python3 because they were written for Python2 and
9600 ;; contain import statements that do not work in Python3. One of
9601 ;; the tests fails under Python2 because its assertions are
9602 ;; overly stringent; it relies on comparing output strings which
9603 ;; are brittle and can change depending on the version of
9604 ;; libmagic being used and the system on which the test is
9605 ;; running. In my case, under GuixSD 0.10.0, only one test
9606 ;; failed, and it seems to have failed only because the version
9607 ;; of libmagic that is packaged in Guix outputs a slightly
9608 ;; different (but not wrong) string than the one that the test
9609 ;; expected.
9610 '(#:tests? #f
9611 #:phases (modify-phases %standard-phases
9612 ;; Replace a specific method call with a hard-coded
9613 ;; path to the necessary libmagic.so file in the
9614 ;; store. If we don't do this, then the method call
9615 ;; will fail to find the libmagic.so file, which in
9616 ;; turn will cause any application using
9617 ;; python-magic to fail.
9618 (add-before 'build 'hard-code-path-to-libmagic
9619 (lambda* (#:key inputs #:allow-other-keys)
9620 (let ((file (assoc-ref inputs "file")))
9621 (substitute* "magic.py"
9622 (("ctypes.util.find_library\\('magic'\\)")
9623 (string-append "'" file "/lib/libmagic.so'")))
9624 #t)))
9625 (add-before 'install 'disable-egg-compression
9626 (lambda _
9627 (let ((port (open-file "setup.cfg" "a")))
9628 (display "\n[easy_install]\nzip_ok = 0\n"
9629 port)
9630 (close-port port)
9631 #t))))))
9632 (inputs
9633 ;; python-magic needs to be able to find libmagic.so.
9634 `(("file" ,file)))
9635 (home-page
9636 "https://github.com/ahupp/python-magic")
9637 (synopsis
9638 "File type identification using libmagic")
9639 (description
9640 "This module uses ctypes to access the libmagic file type
9641 identification library. It makes use of the local magic database and
9642 supports both textual and MIME-type output. Note that this module and
9643 the python-file module both provide a \"magic.py\" file; these two
9644 modules, which are different and were developed separately, both serve
9645 the same purpose: to provide Python bindings for libmagic.")
9646 (license license:expat)))
9647
9648 (define-public python2-magic
9649 (package-with-python2 python-magic))
9650
9651 (define-public python2-s3cmd
9652 (package
9653 (name "python2-s3cmd")
9654 (version "1.6.1")
9655 (source
9656 (origin
9657 (method url-fetch)
9658 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9659 "s3cmd-" version ".tar.gz"))
9660 (sha256
9661 (base32
9662 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9663 (build-system python-build-system)
9664 (arguments
9665 ;; s3cmd is written for python2 only and contains no tests.
9666 `(#:python ,python-2
9667 #:tests? #f))
9668 (propagated-inputs
9669 `(("python2-dateutil" ,python2-dateutil)
9670 ;; The python-file package also provides a magic.py module.
9671 ;; This is an unfortunate state of affairs; however, s3cmd
9672 ;; fails to install if it cannot find specifically the
9673 ;; python-magic package. Thus we include it, instead of using
9674 ;; python-file. Ironically, s3cmd sometimes works better
9675 ;; without libmagic bindings at all:
9676 ;; https://github.com/s3tools/s3cmd/issues/198
9677 ("python2-magic" ,python2-magic)))
9678 (home-page "http://s3tools.org/s3cmd")
9679 (synopsis "Command line tool for S3-compatible storage services")
9680 (description
9681 "S3cmd is a command line tool for uploading, retrieving and managing data
9682 in storage services that are compatible with the Amazon Simple Storage
9683 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9684 GnuPG encryption, and more. It also supports management of Amazon's
9685 CloudFront content delivery network.")
9686 (license license:gpl2+)))
9687
9688 (define-public python-pkgconfig
9689 (package
9690 (name "python-pkgconfig")
9691 (version "1.3.1")
9692 (source
9693 (origin
9694 (method url-fetch)
9695 (uri (pypi-uri "pkgconfig" version))
9696 (sha256
9697 (base32
9698 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9699 (build-system python-build-system)
9700 (native-inputs
9701 `(("python-nose" ,python-nose)))
9702 (inputs
9703 `(("pkg-config" ,pkg-config)))
9704 (arguments
9705 `(#:phases
9706 (modify-phases %standard-phases
9707 (add-before 'build 'patch
9708 ;; Hard-code the path to pkg-config.
9709 (lambda _
9710 (substitute* "pkgconfig/pkgconfig.py"
9711 (("cmd = 'pkg-config")
9712 (string-append "cmd = '" (which "pkg-config"))))
9713 #t))
9714 (replace 'check
9715 (lambda _
9716 (invoke "nosetests" "test.py"))))))
9717 (home-page "https://github.com/matze/pkgconfig")
9718 (synopsis "Python interface for pkg-config")
9719 (description "This module provides a Python interface to pkg-config. It
9720 can be used to find all pkg-config packages, check if a package exists,
9721 check if a package meets certain version requirements, query CFLAGS and
9722 LDFLAGS and parse the output to build extensions with setup.py.")
9723 (license license:expat)))
9724
9725 (define-public python2-pkgconfig
9726 (package-with-python2 python-pkgconfig))
9727
9728 (define-public python-bz2file
9729 (package
9730 (name "python-bz2file")
9731 (version "0.98")
9732 (source
9733 (origin
9734 (method url-fetch)
9735 (uri (pypi-uri "bz2file" version))
9736 (sha256
9737 (base32
9738 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9739 (build-system python-build-system)
9740 (arguments
9741 `(#:tests? #f)) ; Tests use deprecated python modules.
9742 (home-page "https://github.com/nvawda/bz2file")
9743 (synopsis "Read and write bzip2-compressed files")
9744 (description
9745 "Bz2file is a Python library for reading and writing bzip2-compressed
9746 files. It contains a drop-in replacement for the I/O interface in the
9747 standard library's @code{bz2} module, including features from the latest
9748 development version of CPython that are not available in older releases.")
9749 (license license:asl2.0)))
9750
9751 (define-public python2-bz2file
9752 (package-with-python2 python-bz2file))
9753
9754 (define-public python-future
9755 (package
9756 (name "python-future")
9757 (version "0.17.1")
9758 (source
9759 (origin
9760 (method url-fetch)
9761 (uri (pypi-uri "future" version))
9762 (sha256
9763 (base32
9764 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
9765 (build-system python-build-system)
9766 ;; Many tests connect to the network or are otherwise flawed.
9767 ;; https://github.com/PythonCharmers/python-future/issues/210
9768 (arguments
9769 `(#:tests? #f))
9770 (home-page "http://python-future.org")
9771 (synopsis "Single-source support for Python 3 and 2")
9772 (description
9773 "@code{python-future} is the missing compatibility layer between Python 2 and
9774 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9775 to support both Python 2 and Python 3 with minimal overhead.")
9776 (license license:expat)))
9777
9778 (define-public python2-future
9779 (package-with-python2 python-future))
9780
9781 (define-public python-cysignals
9782 (package
9783 (name "python-cysignals")
9784 (version "1.9.0")
9785 (source
9786 (origin
9787 (method url-fetch)
9788 (uri (pypi-uri "cysignals" version))
9789 (sha256
9790 (base32
9791 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
9792 (build-system python-build-system)
9793 (native-inputs
9794 `(("python-cython" ,python-cython)
9795 ("python-sphinx" ,python-sphinx)))
9796 (inputs
9797 `(("pari-gp" ,pari-gp)))
9798 (arguments
9799 `(#:modules ((guix build python-build-system)
9800 ((guix build gnu-build-system) #:prefix gnu:)
9801 (guix build utils))
9802 ;; FIXME: Tests are executed after installation and currently fail
9803 ;; when not installing into standard locations; the author is working
9804 ;; on a fix.
9805 #:tests? #f
9806 #:phases
9807 (modify-phases %standard-phases
9808 (add-before
9809 'build 'configure
9810 (assoc-ref gnu:%standard-phases 'configure)))))
9811 (home-page
9812 "https://github.com/sagemath/cysignals")
9813 (synopsis
9814 "Handling of interrupts and signals for Cython")
9815 (description
9816 "The cysignals package provides mechanisms to handle interrupts (and
9817 other signals and errors) in Cython code, using two related approaches,
9818 for mixed Cython/Python code or external C libraries and pure Cython code,
9819 respectively.")
9820 (license license:lgpl3+)))
9821
9822 (define-public python2-cysignals
9823 (package-with-python2 python-cysignals))
9824
9825 (define-public python2-shedskin
9826 (package
9827 (name "python2-shedskin")
9828 (version "0.9.4")
9829 (source
9830 (origin
9831 (method url-fetch)
9832 (uri (string-append "https://github.com/shedskin/shedskin/"
9833 "releases/download/v" version
9834 "/shedskin-" version ".tgz"))
9835 (sha256
9836 (base32
9837 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9838 (build-system python-build-system)
9839 (arguments
9840 `(#:python ,python-2
9841 #:phases (modify-phases %standard-phases
9842 (add-after 'unpack 'fix-resulting-include-libs
9843 (lambda* (#:key inputs #:allow-other-keys)
9844 (let ((libgc (assoc-ref inputs "libgc"))
9845 (pcre (assoc-ref inputs "pcre")))
9846 (substitute* "shedskin/makefile.py"
9847 (("variable == 'CCFLAGS':[ ]*")
9848 (string-append "variable == 'CCFLAGS':\n"
9849 " line += ' -I " pcre "/include"
9850 " -I " libgc "/include'"))
9851 (("variable == 'LFLAGS':[ ]*")
9852 (string-append "variable == 'LFLAGS':\n"
9853 " line += ' -L" pcre "/lib"
9854 " -L " libgc "/lib'")))
9855 #t))))))
9856 (inputs `(("pcre" ,pcre)
9857 ("libgc" ,libgc)))
9858 (home-page "https://shedskin.github.io/")
9859 (synopsis "Experimental Python-2 to C++ Compiler")
9860 (description (string-append "This is an experimental compiler for a subset of
9861 Python. It generates C++ code and a Makefile."))
9862 (license (list license:gpl3 license:bsd-3 license:expat))))
9863
9864 (define-public python2-rope
9865 (package
9866 (name "python2-rope")
9867 (version "0.11.0")
9868 (source
9869 (origin
9870 (method url-fetch)
9871 (uri (pypi-uri "rope" version))
9872 (sha256
9873 (base32
9874 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
9875 (arguments
9876 ;; Rope has only partial python3 support, see `python-rope'
9877 `(#:python ,python-2))
9878 (build-system python-build-system)
9879 (native-inputs
9880 `(("python2-unittest2" ,python2-unittest2)))
9881 (home-page "https://github.com/python-rope/rope")
9882 (synopsis "Refactoring library for Python")
9883 (description "Rope is a refactoring library for Python. It facilitates
9884 the renaming, moving and extracting of attributes, functions, modules, fields
9885 and parameters in Python 2 source code. These refactorings can also be applied
9886 to occurrences in strings and comments.")
9887 (license license:gpl2)))
9888
9889 (define-public python-rope
9890 (package
9891 (inherit python2-rope)
9892 (name "python-rope")
9893 (arguments `(#:python ,python-wrapper
9894 ;; XXX: Only partial python3 support, results in some failing
9895 ;; tests: <https://github.com/python-rope/rope/issues/247>.
9896 #:tests? #f))
9897 (properties `((python2-variant . ,(delay python2-rope))))))
9898
9899 (define-public python-py3status
9900 (package
9901 (name "python-py3status")
9902 (version "3.21")
9903 (source
9904 (origin
9905 (method url-fetch)
9906 (uri (pypi-uri "py3status" version))
9907 (sha256
9908 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
9909 (build-system python-build-system)
9910 (inputs
9911 `(("file" ,file)))
9912 (arguments
9913 '(#:phases
9914 (modify-phases %standard-phases
9915 ;; 'file' is used for detection of configuration file encoding
9916 ;; let's make link the dependency to particular input
9917 (add-before 'build 'patch-file-path
9918 (lambda* (#:key inputs #:allow-other-keys)
9919 (let ((file-path (assoc-ref inputs "file")))
9920 (substitute* "py3status/parse_config.py"
9921 (("\\['file', '-b'")
9922 (string-append "['" file-path "/bin/file', '-b'")))
9923 #t))))
9924 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9925 (home-page "https://github.com/ultrabug/py3status")
9926 (synopsis "Extensible i3status wrapper written in Python")
9927 (description "py3status is an i3status wrapper which extends i3status
9928 functionality in a modular way, allowing you to extend your panel with your
9929 own code, responding to click events and updating clock every second.")
9930 (license license:bsd-3)))
9931
9932 (define-public python-tblib
9933 (package
9934 (name "python-tblib")
9935 (version "1.3.2")
9936 (source (origin
9937 (method url-fetch)
9938 (uri (pypi-uri "tblib" version))
9939 (sha256 (base32
9940 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9941 (build-system python-build-system)
9942 (arguments
9943 `(#:phases
9944 (modify-phases %standard-phases
9945 (add-before 'check 'adjust-tests
9946 (lambda _
9947 (when (which "python3")
9948 ;; Adjust the example output to match that of Python 3.7:
9949 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
9950 (substitute* "README.rst"
9951 (("Exception\\('fail',") "Exception('fail'"))
9952 #t)))
9953 (replace 'check
9954 (lambda _
9955 ;; Upstream runs tests after installation and the package itself
9956 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9957 ;; found.
9958 (setenv "PYTHONPATH"
9959 (string-append (getcwd) "/build/lib:"
9960 (getenv "PYTHONPATH")))
9961 (invoke "py.test" "-vv" "tests" "README.rst"))))))
9962 (native-inputs
9963 `(("python-pytest" ,python-pytest)
9964 ("python-six" ,python-six)))
9965 (home-page "https://github.com/ionelmc/python-tblib")
9966 (synopsis "Traceback serialization library")
9967 (description
9968 "Traceback serialization allows you to:
9969
9970 @enumerate
9971 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
9972 different processes. This allows better error handling when running code over
9973 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9974
9975 @item Parse traceback strings and raise with the parsed tracebacks.
9976 @end enumerate\n")
9977 (license license:bsd-3)))
9978
9979 (define-public python2-tblib
9980 (package-with-python2 python-tblib))
9981
9982 (define-public python-greenlet
9983 (package
9984 (name "python-greenlet")
9985 (version "0.4.15")
9986 (source (origin
9987 (method url-fetch)
9988 (uri (pypi-uri "greenlet" version))
9989 (sha256
9990 (base32
9991 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
9992 (build-system python-build-system)
9993 (home-page "https://greenlet.readthedocs.io/")
9994 (synopsis "Lightweight in-process concurrent programming")
9995 (description
9996 "Greenlet package is a spin-off of Stackless, a version of CPython
9997 that supports micro-threads called \"tasklets\". Tasklets run
9998 pseudo-concurrently (typically in a single or a few OS-level threads) and
9999 are synchronized with data exchanges on \"channels\".")
10000 (license (list license:psfl license:expat))))
10001
10002 (define-public python2-greenlet
10003 (package-with-python2 python-greenlet))
10004
10005 (define-public python-objgraph
10006 (package
10007 (name "python-objgraph")
10008 (version "3.4.0")
10009 (source
10010 (origin
10011 (method url-fetch)
10012 (uri (pypi-uri "objgraph" version))
10013 (sha256
10014 (base32
10015 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
10016 (build-system python-build-system)
10017 (propagated-inputs
10018 `(("python-graphviz" ,python-graphviz)))
10019 (native-inputs
10020 `(("python-mock" ,python-mock)
10021 ("graphviz" ,graphviz)))
10022 (home-page "https://mg.pov.lt/objgraph/")
10023 (synopsis "Draw Python object reference graphs with graphviz")
10024 (description
10025 "This package provides tools to draw Python object reference graphs with
10026 graphviz.")
10027 (license license:expat)))
10028
10029 (define-public python-gevent
10030 (package
10031 (name "python-gevent")
10032 (version "1.3.7")
10033 (source (origin
10034 (method url-fetch)
10035 (uri (pypi-uri "gevent" version))
10036 (sha256
10037 (base32
10038 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
10039 (modules '((guix build utils)))
10040 (snippet
10041 '(begin
10042 ;; unbunding libev and c-ares
10043 (delete-file-recursively "deps")
10044 #t))))
10045 (build-system python-build-system)
10046 (arguments
10047 `(#:modules ((ice-9 ftw)
10048 (ice-9 match)
10049 (srfi srfi-26)
10050 (guix build utils)
10051 (guix build python-build-system))
10052 #:phases (modify-phases %standard-phases
10053 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
10054 (lambda _
10055 (substitute* "src/gevent/subprocess.py"
10056 (("/bin/sh") (which "sh")))
10057 (for-each (lambda (file)
10058 (substitute* file
10059 (("/bin/sh") (which "sh"))
10060 (("/bin/true") (which "true"))))
10061 (find-files "src/greentest" "\\.py$"))
10062 #t))
10063 (add-before 'build 'do-not-use-bundled-sources
10064 (lambda* (#:key inputs #:allow-other-keys)
10065 (setenv "CONFIG_SHELL" (which "bash"))
10066 (setenv "LIBEV_EMBED" "false")
10067 (setenv "CARES_EMBED" "false")
10068 (setenv "EMBED" "false")
10069
10070 ;; Prevent building bundled libev.
10071 (substitute* "setup.py"
10072 (("run_make=_BUILDING")
10073 "run_make=False"))
10074
10075 (let ((greenlet (string-append
10076 (assoc-ref inputs "python-greenlet")
10077 "/include")))
10078 (match (scandir greenlet
10079 (lambda (item)
10080 (string-prefix? "python" item)))
10081 ((python)
10082 (setenv "C_INCLUDE_PATH"
10083 (string-append greenlet "/" python)))))
10084 #t))
10085 (add-before 'check 'skip-timer-test
10086 (lambda _
10087 ;; XXX: Skip 'TestTimerResolution', which appears to be
10088 ;; unreliable.
10089 (substitute* "src/greentest/test__core_timer.py"
10090 (("not greentest.RUNNING_ON_CI") "False"))
10091 #t))
10092 (replace 'check
10093 (lambda _
10094 ;; Make sure the build directory is on PYTHONPATH.
10095 (setenv "PYTHONPATH"
10096 (string-append
10097 (getenv "PYTHONPATH") ":"
10098 (getcwd) "/build/"
10099 (car (scandir "build" (cut string-prefix? "lib." <>)))))
10100 (with-directory-excursion "src/greentest"
10101 ;; XXX: Many tests require network access. Instead we only
10102 ;; run known-good tests. Unfortunately we cannot use
10103 ;; recursion here since this directory also contains
10104 ;; Python-version-specific subfolders.
10105 (apply invoke "python" "testrunner.py" "--config"
10106 "known_failures.py"
10107 (scandir "." (cut regexp-exec
10108 (make-regexp "test_+(subprocess|core)")
10109 <>)))))))))
10110 (propagated-inputs
10111 `(("python-greenlet" ,python-greenlet)
10112 ("python-objgraph" ,python-objgraph)))
10113 (native-inputs
10114 `(("python-six" ,python-six)))
10115 (inputs
10116 `(("c-ares" ,c-ares)
10117 ("libev" ,libev)))
10118 (home-page "http://www.gevent.org/")
10119 (synopsis "Coroutine-based network library")
10120 (description
10121 "gevent is a coroutine-based Python networking library that uses greenlet
10122 to provide a high-level synchronous API on top of the libev event loop.")
10123 (license license:expat)
10124 (properties `((python2-variant . ,(delay python2-gevent))))))
10125
10126 (define-public python2-gevent
10127 (let ((base (package-with-python2
10128 (strip-python2-variant python-gevent))))
10129 (package
10130 (inherit base)
10131 (native-inputs `(,@(package-native-inputs python-gevent)
10132 ("python-mock" ,python2-mock))))))
10133
10134 (define-public python-fastimport
10135 (package
10136 (name "python-fastimport")
10137 (version "0.9.6")
10138 (source
10139 (origin
10140 (method url-fetch)
10141 (uri (pypi-uri "fastimport" version))
10142 (sha256
10143 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10144 (build-system python-build-system)
10145 (home-page "https://github.com/jelmer/python-fastimport")
10146 (synopsis "VCS fastimport parser and generator in Python")
10147 (description "This package provides a parser for and generator of the Git
10148 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
10149 format.")
10150 (license license:gpl2+)))
10151
10152 (define-public python2-fastimport
10153 (package-with-python2 python-fastimport))
10154
10155 (define-public python-twisted
10156 (package
10157 (name "python-twisted")
10158 (version "19.7.0")
10159 (source (origin
10160 (method url-fetch)
10161 (uri (pypi-uri "Twisted" version ".tar.bz2"))
10162 (sha256
10163 (base32
10164 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
10165 (build-system python-build-system)
10166 (arguments
10167 '(#:tests? #f)) ; FIXME: some tests fail
10168 (propagated-inputs
10169 `(("python-zope-interface" ,python-zope-interface)
10170 ("python-pyhamcrest" ,python-pyhamcrest)
10171 ("python-incremental" ,python-incremental)
10172 ("python-hyperlink" ,python-hyperlink)
10173 ("python-constantly" ,python-constantly)
10174 ("python-automat" ,python-automat)))
10175 (home-page "https://twistedmatrix.com/")
10176 (synopsis "Asynchronous networking framework written in Python")
10177 (description
10178 "Twisted is an extensible framework for Python programming, with special
10179 focus on event-based network programming and multiprotocol integration.")
10180 (license license:expat)))
10181
10182 (define-public python2-twisted
10183 (package-with-python2 python-twisted))
10184
10185 (define-public python-pika
10186 (package
10187 (name "python-pika")
10188 (version "0.12.0")
10189 (source
10190 (origin
10191 (method url-fetch)
10192 (uri (pypi-uri "pika" version))
10193 (sha256
10194 (base32
10195 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10196 (build-system python-build-system)
10197 (native-inputs
10198 `(("python-pyev" ,python-pyev)
10199 ("python-tornado" ,python-tornado)
10200 ("python-twisted" ,python-twisted)))
10201 (home-page "https://pika.readthedocs.org")
10202 (synopsis "Pure Python AMQP Client Library")
10203 (description
10204 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10205 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10206 network support library.")
10207 (license license:bsd-3)))
10208
10209 (define-public python2-pika
10210 (package-with-python2 python-pika))
10211
10212 (define-public python-ply
10213 (package
10214 (name "python-ply")
10215 (version "3.10")
10216 (source
10217 (origin
10218 (method url-fetch)
10219 (uri (pypi-uri "ply" version))
10220 (sha256
10221 (base32
10222 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10223 (build-system python-build-system)
10224 (home-page "http://www.dabeaz.com/ply/")
10225 (synopsis "Python Lex & Yacc")
10226 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10227 It uses LR parsing and does extensive error checking.")
10228 (license license:bsd-3)))
10229
10230 (define-public python2-ply
10231 (package-with-python2 python-ply))
10232
10233 (define-public python-tabulate
10234 (package
10235 (name "python-tabulate")
10236 (version "0.7.7")
10237 (source (origin
10238 (method url-fetch)
10239 (uri (pypi-uri "tabulate" version))
10240 (sha256
10241 (base32
10242 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10243 (build-system python-build-system)
10244 (arguments
10245 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10246 ;; and the latest release is not tagged in the upstream repository.
10247 '(#:tests? #f))
10248 (home-page "https://bitbucket.org/astanin/python-tabulate")
10249 (synopsis "Pretty-print tabular data")
10250 (description
10251 "Tabulate is a library and command-line utility to pretty-print tabular
10252 data in Python.")
10253 (license license:expat)))
10254
10255 (define-public python2-tabulate
10256 (package-with-python2 python-tabulate))
10257
10258 (define-public python-kazoo
10259 (package
10260 (name "python-kazoo")
10261 (version "2.4.0")
10262 (source
10263 (origin
10264 (method url-fetch)
10265 (uri (pypi-uri "kazoo" version))
10266 (sha256
10267 (base32
10268 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10269 (build-system python-build-system)
10270 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10271 (propagated-inputs
10272 `(("python-six" ,python-six)))
10273 (home-page "https://kazoo.readthedocs.org")
10274 (synopsis "High-level Zookeeper client library")
10275 (description
10276 "Kazoo is a Python client library for the Apache Zookeeper distributed
10277 application service. It is designed to be easy to use and to avoid common
10278 programming errors.")
10279 (license license:asl2.0)))
10280
10281 (define-public python2-kazoo
10282 (package-with-python2 python-kazoo))
10283
10284 (define-public python-pykafka
10285 (package
10286 (name "python-pykafka")
10287 (version "2.4.0")
10288 (source (origin
10289 (method url-fetch)
10290 (uri (pypi-uri "pykafka" version))
10291 (sha256
10292 (base32
10293 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10294 (build-system python-build-system)
10295 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10296 (propagated-inputs
10297 `(("python-gevent" ,python-gevent)
10298 ("python-kazoo" ,python-kazoo)
10299 ("python-tabulate" ,python-tabulate)))
10300 (inputs
10301 `(("librdkafka" ,librdkafka)))
10302 (home-page "https://pykafka.readthedocs.io/")
10303 (synopsis "Apache Kafka client for Python")
10304 (description
10305 "PyKafka is a client for the Apache Kafka distributed messaging system.
10306 It includes Python implementations of Kafka producers and consumers, which
10307 are optionally backed by a C extension built on librdkafka.")
10308 (license license:asl2.0)))
10309
10310 (define-public python2-pykafka
10311 (package-with-python2 python-pykafka))
10312
10313 (define-public python-wcwidth
10314 (package
10315 (name "python-wcwidth")
10316 (version "0.1.7")
10317 (source
10318 (origin
10319 (method url-fetch)
10320 (uri (pypi-uri "wcwidth" version))
10321 (sha256
10322 (base32
10323 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
10324 (build-system python-build-system)
10325 (home-page "https://github.com/jquast/wcwidth")
10326 (synopsis "Measure number of terminal column cells of wide-character codes")
10327 (description "Wcwidth measures the number of terminal column cells of
10328 wide-character codes. It is useful for those implementing a terminal emulator,
10329 or programs that carefully produce output to be interpreted by one. It is a
10330 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10331 specified in POSIX.1-2001 and POSIX.1-2008.")
10332 (license license:expat)))
10333
10334 (define-public python2-wcwidth
10335 (package-with-python2 python-wcwidth))
10336
10337 (define-public python2-jsonrpclib
10338 (package
10339 (name "python2-jsonrpclib")
10340 (version "0.1.7")
10341 (source (origin
10342 (method url-fetch)
10343 (uri (pypi-uri "jsonrpclib" version))
10344 (sha256
10345 (base32
10346 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10347 (build-system python-build-system)
10348 (arguments
10349 `(#:tests? #f
10350 #:python ,python-2))
10351 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10352 (synopsis "Implementation of JSON-RPC specification for Python")
10353 (description
10354 "This library is an implementation of the JSON-RPC specification.
10355 It supports both the original 1.0 specification, as well as the
10356 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10357 etc.")
10358 (license license:asl2.0)))
10359
10360 (define-public python-chai
10361 (package
10362 (name "python-chai")
10363 (version "1.1.2")
10364 (source (origin
10365 (method url-fetch)
10366 (uri (pypi-uri "chai" version))
10367 (sha256
10368 (base32
10369 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10370 (build-system python-build-system)
10371 (home-page "https://github.com/agoragames/chai")
10372 (synopsis "Mocking framework for Python")
10373 (description
10374 "Chai provides an api for mocking, stubbing and spying your python
10375 objects, patterned after the Mocha library for Ruby.")
10376 (license license:bsd-3)))
10377
10378 (define-public python2-chai
10379 (package-with-python2 python-chai))
10380
10381 (define-public python-inflection
10382 (package
10383 (name "python-inflection")
10384 (version "0.3.1")
10385 (source
10386 (origin (method url-fetch)
10387 (uri (pypi-uri "inflection" version))
10388 (sha256
10389 (base32
10390 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10391 (build-system python-build-system)
10392 (native-inputs
10393 `(("python-pytest" ,python-pytest)))
10394 (home-page "https://github.com/jpvanhal/inflection")
10395 (synopsis "Python string transformation library")
10396 (description
10397 "Inflection is a string transformation library. It singularizes
10398 and pluralizes English words, and transforms strings from CamelCase to
10399 underscored string.")
10400 (license license:expat)))
10401
10402 (define-public python2-inflection
10403 (package-with-python2 python-inflection))
10404
10405 (define-public python-pylev
10406 (package
10407 (name "python-pylev")
10408 (version "1.3.0")
10409 (source (origin
10410 (method url-fetch)
10411 (uri (pypi-uri "pylev" version))
10412 (sha256
10413 (base32
10414 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10415 (build-system python-build-system)
10416 (home-page "https://github.com/toastdriven/pylev")
10417 (synopsis "Levenshtein distance implementation in Python")
10418 (description "Pure Python Levenshtein implementation, based off the
10419 Wikipedia code samples at
10420 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10421 (license license:bsd-3)))
10422
10423 (define-public python2-pylev
10424 (package-with-python2 python-pylev))
10425
10426 (define-public python-cleo
10427 (package
10428 (name "python-cleo")
10429 (version "0.6.8")
10430 (source (origin
10431 (method url-fetch)
10432 (uri (pypi-uri "cleo" version))
10433 (sha256
10434 (base32
10435 "06zp695hq835rkaq6irr1ds1dp2qfzyf32v60vxpd8rcnxv319l5"))))
10436 (build-system python-build-system)
10437 (native-inputs
10438 `( ;; For testing
10439 ("python-mock" ,python-mock)
10440 ("python-pytest-mock" ,python-pytest-mock)
10441 ("python-pytest" ,python-pytest)))
10442 (propagated-inputs
10443 `(("python-backpack" ,python-backpack)
10444 ("python-pastel" ,python-pastel)
10445 ("python-pylev" ,python-pylev)))
10446 (home-page "https://github.com/sdispater/cleo")
10447 (synopsis "Command-line arguments library for Python")
10448 (description
10449 "Cleo allows you to create command-line commands with signature in
10450 docstring and colored output.")
10451 (license license:expat)))
10452
10453 (define-public python2-cleo
10454 (package-with-python2 python-cleo))
10455
10456 (define-public python-tomlkit
10457 (package
10458 (name "python-tomlkit")
10459 (version "0.5.7")
10460 (source
10461 (origin
10462 (method url-fetch)
10463 (uri (pypi-uri "tomlkit" version))
10464 (sha256
10465 (base32
10466 "18820ga5z3if1w8dvykxrfm000akracq01ic402xrbljgbn5grn4"))))
10467 (build-system python-build-system)
10468 (native-inputs
10469 `(("python-pytest" ,python-pytest)))
10470 (home-page
10471 "https://github.com/sdispater/tomlkit")
10472 (synopsis "Style preserving TOML library")
10473 (description
10474 "TOML Kit is a 0.5.0-compliant TOML library. It includes a parser that
10475 preserves all comments, indentations, whitespace and internal element ordering,
10476 and makes them accessible and editable via an intuitive API. It can also
10477 create new TOML documents from scratch using the provided helpers. Part of the
10478 implementation as been adapted, improved and fixed from Molten.")
10479 (license license:expat)))
10480
10481 (define-public python-shellingham
10482 (package
10483 (name "python-shellingham")
10484 (version "1.3.1")
10485 (source
10486 (origin
10487 (method url-fetch)
10488 (uri (pypi-uri "shellingham" version))
10489 (sha256
10490 (base32
10491 "1q7kws7w4x2hji3g7y0ni9ddk4sd676ylrb3db54gbpys6xj6nwq"))))
10492 (build-system python-build-system)
10493 (home-page
10494 "https://github.com/sarugaku/shellingham")
10495 (synopsis "Tool to detect surrounding shell")
10496 (description
10497 "Shellingham detects what shell the current Python executable is
10498 running in.")
10499 (license license:isc)))
10500
10501 (define-public python-memcached
10502 (package
10503 (name "python-memcached")
10504 (version "1.59")
10505 (source
10506 (origin
10507 (method url-fetch)
10508 (uri (pypi-uri "python-memcached" version))
10509 (sha256
10510 (base32
10511 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))))
10512 (build-system python-build-system)
10513 (propagated-inputs `(("python-six" ,python-six)))
10514 (home-page
10515 "https://github.com/linsomniac/python-memcached")
10516 (synopsis "Pure python memcached client")
10517 (description
10518 "This software is a pure Python interface to the memcached memory cache
10519 daemon. It is the client side software which allows storing values in one or
10520 more, possibly remote, memcached servers.")
10521 (license license:psfl)))
10522
10523 (define-public python-clikit
10524 (package
10525 (name "python-clikit")
10526 (version "0.2.4")
10527 (source
10528 (origin
10529 (method url-fetch)
10530 (uri (pypi-uri "clikit" version))
10531 (sha256
10532 (base32
10533 "0dc8czib5f4j9px1ivcpqnmivnx2zjpc0xb00ldrhsqylks7r06n"))))
10534 (build-system python-build-system)
10535 (propagated-inputs
10536 `(("python-pastel" ,python-pastel)
10537 ("python-pylev" ,python-pylev)))
10538 (home-page "https://github.com/sdispater/clikit")
10539 (synopsis "Group of utilities to build command line interfaces")
10540 (description
10541 "CliKit is a group of utilities to build testable command line
10542 interfaces.")
10543 (license license:expat)))
10544
10545 (define-public python-msgpack-python
10546 (package
10547 (name "python-msgpack-python")
10548 (version "0.5.6")
10549 (source
10550 (origin
10551 (method url-fetch)
10552 (uri (pypi-uri "msgpack-python" version))
10553 (sha256
10554 (base32
10555 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
10556 (build-system python-build-system)
10557 (home-page "http://msgpack.org/")
10558 (synopsis "Package to deserialize messages in MessagePack binary format")
10559 (description
10560 "MessagePack is an efficient binary serialization format. It lets you
10561 exchange data among multiple languages like JSON. But it's faster and
10562 smaller. Small integers are encoded into a single byte, and typical short
10563 strings require only one extra byte in addition to the strings themselves.")
10564 (license license:asl2.0)))
10565
10566 (define-public python-cachy
10567 (package
10568 (name "python-cachy")
10569 (version "0.2.0")
10570 (source
10571 (origin
10572 (method url-fetch)
10573 (uri (pypi-uri "cachy" version))
10574 (sha256
10575 (base32
10576 "0v6mjyhgx6j7ya20bk69cr3gdzdkdf6psay0h090rscclgji65dp"))))
10577 (build-system python-build-system)
10578 (native-inputs
10579 `(("python-fakeredis" ,python-fakeredis)
10580 ("python-flexmock" ,python-flexmock)
10581 ("python-pytest" ,python-pytest)))
10582 (propagated-inputs
10583 `(("python-memcached" ,python-memcached)
10584 ("python-msgpack-python" ,python-msgpack-python)
10585 ("python-redis" ,python-redis)))
10586 (home-page "https://github.com/sdispater/cachy")
10587 (synopsis "Simple yet effective caching library")
10588 (description
10589 "Cachy provides a simple yet effective caching library. A simple but
10590 powerful API: thread-safety; decorator syntax; support for memcached, redis,
10591 database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
10592 (license license:expat)))
10593
10594 (define-public poetry
10595 (package
10596 (name "poetry")
10597 (version "0.12.17")
10598 ;; Poetry can only be built from source with poetry.
10599 (source
10600 (origin
10601 (method url-fetch)
10602 (uri (pypi-uri "poetry" version))
10603 (sha256
10604 (base32
10605 "0gxwcd65qjmzqzppf53x51sic1rbcd9py6cdzx3aprppipimslvf"))))
10606 (build-system python-build-system)
10607 (arguments
10608 `(#:tests? #f ;; Pypi does not have tests.
10609 #:phases
10610 (modify-phases %standard-phases
10611 (replace 'build
10612 (lambda _
10613 ;; Bug in poetry https://github.com/sdispater/poetry/issues/866.
10614 (invoke "sed" "-i" "-e" "s/from distutils.core/from setuptools/"
10615 "setup.py")
10616 #t)))))
10617 (propagated-inputs
10618 `(("python-cachecontrol" ,python-cachecontrol)
10619 ("python-cachy" ,python-cachy)
10620 ("python-cleo" ,python-cleo)
10621 ("python-glob2" ,python-glob2)
10622 ("python-html5lib" ,python-html5lib)
10623 ("python-jsonschema" ,python-jsonschema)
10624 ("python-msgpack" ,python-msgpack)
10625 ("python-pathlib2" ,python-pathlib2)
10626 ("python-pkginfo" ,python-pkginfo)
10627 ("python-pyparsing" ,python-pyparsing)
10628 ("python-pyrsistent" ,python-pyrsistent)
10629 ("python-requests" ,python-requests)
10630 ("python-requests-toolbelt" ,python-requests-toolbelt)
10631 ("python-shellingham" ,python-shellingham)
10632 ("python-tomlkit" ,python-tomlkit)
10633 ("python-virtualenv" ,python-virtualenv)))
10634 (home-page "https://poetry.eustace.io/")
10635 (synopsis "Python dependency management and packaging made easy")
10636 (description "Poetry is a tool for dependency management and packaging
10637 in Python. It allows you to declare the libraries your project depends on and
10638 it will manage (install/update) them for you.")
10639 (license license:expat)))
10640
10641 (define-public python-lazy-object-proxy
10642 (package
10643 (name "python-lazy-object-proxy")
10644 (version "1.4.3")
10645 (source (origin
10646 (method url-fetch)
10647 (uri (pypi-uri "lazy-object-proxy" version))
10648 (sha256
10649 (base32
10650 "1w1aaay424ciz8fz3fkzxb0pxzfxn184f2whpyn4fx72bn50x47k"))))
10651 (native-inputs
10652 `(("python-setuptools-scm" ,python-setuptools-scm-3.3)))
10653 (build-system python-build-system)
10654 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10655 (synopsis "Lazy object proxy for python")
10656 (description
10657 "Lazy object proxy is an object that wraps a callable but defers the call
10658 until the object is actually required, and caches the result of said call.")
10659 (license license:bsd-2)))
10660
10661 (define-public python2-lazy-object-proxy
10662 (package-with-python2 python-lazy-object-proxy))
10663
10664 (define-public python-dnspython
10665 (package
10666 (name "python-dnspython")
10667 (version "1.15.0")
10668 (source (origin
10669 (method url-fetch)
10670 (uri (string-append "http://www.dnspython.org/kits/"
10671 version "/dnspython-" version ".tar.gz"))
10672 (sha256
10673 (base32
10674 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10675 (build-system python-build-system)
10676 (arguments '(#:tests? #f)) ; XXX: requires internet access
10677 (home-page "http://www.dnspython.org")
10678 (synopsis "DNS toolkit for Python")
10679 (description
10680 "dnspython is a DNS toolkit for Python. It supports almost all record
10681 types. It can be used for queries, zone transfers, and dynamic updates.
10682 It supports TSIG authenticated messages and EDNS0.")
10683 (license license:expat)))
10684
10685 (define-public python2-dnspython
10686 (package-with-python2 python-dnspython))
10687
10688 (define-public python-email-validator
10689 (package
10690 (name "python-email-validator")
10691 (version "1.0.2")
10692 (source
10693 (origin (method url-fetch)
10694 (uri (pypi-uri "email_validator" version))
10695 (sha256
10696 (base32
10697 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10698 (build-system python-build-system)
10699 (arguments
10700 '(#:phases
10701 (modify-phases %standard-phases
10702 (add-before 'build 'use-dnspython
10703 (lambda _
10704 (substitute* "setup.py"
10705 (("dnspython3") "dnspython"))
10706 #t)))))
10707 (propagated-inputs
10708 `(("python-dnspython" ,python-dnspython)
10709 ("python-idna" ,python-idna)))
10710 (home-page "https://github.com/JoshData/python-email-validator")
10711 (synopsis "Email address validation library for Python")
10712 (description
10713 "This library validates email address syntax and deliverability.")
10714 (license license:cc0)))
10715
10716 (define-public python2-email-validator
10717 (package-with-python2 python-email-validator))
10718
10719 (define-public python-ukpostcodeparser
10720 (package
10721 (name "python-ukpostcodeparser")
10722 (version "1.0.3")
10723 (source (origin
10724 (method url-fetch)
10725 (uri (pypi-uri "UkPostcodeParser" version))
10726 (sha256
10727 (base32
10728 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10729 (build-system python-build-system)
10730 (home-page "https://github.com/hamstah/ukpostcodeparser")
10731 (synopsis "UK Postcode parser for Python")
10732 (description
10733 "This library provides the @code{parse_uk_postcode} function for
10734 parsing UK postcodes.")
10735 (license license:expat)))
10736
10737 (define-public python2-ukpostcodeparser
10738 (package-with-python2 python-ukpostcodeparser))
10739
10740 (define-public python-faker
10741 (package
10742 (name "python-faker")
10743 (version "0.7.9")
10744 (source (origin
10745 (method url-fetch)
10746 (uri (pypi-uri "Faker" version))
10747 (sha256
10748 (base32
10749 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10750 (patches
10751 (search-patches "python-faker-fix-build-32bit.patch"))
10752 (modules '((guix build utils)))
10753 (snippet
10754 '(begin
10755 (for-each delete-file (find-files "." "\\.pyc$"))
10756 #t))))
10757 (build-system python-build-system)
10758 (arguments
10759 '(#:phases
10760 (modify-phases %standard-phases
10761 (replace 'check
10762 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
10763 (native-inputs
10764 `(;; For testing
10765 ("python-email-validator" ,python-email-validator)
10766 ("python-mock" ,python-mock)
10767 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10768 (propagated-inputs
10769 `(("python-dateutil" ,python-dateutil)
10770 ("python-six" ,python-six)))
10771 (home-page "https://github.com/joke2k/faker")
10772 (synopsis "Python package that generates fake data")
10773 (description
10774 "Faker is a Python package that generates fake data such as names,
10775 addresses, and phone numbers.")
10776 (license license:expat)
10777 (properties `((python2-variant . ,(delay python2-faker))))))
10778
10779 (define-public python2-faker
10780 (let ((base (package-with-python2 (strip-python2-variant
10781 python-faker))))
10782 (package
10783 (inherit base)
10784 (propagated-inputs
10785 `(("python2-ipaddress" ,python2-ipaddress)
10786 ,@(package-propagated-inputs base))))))
10787
10788 (define-public python-pyaml
10789 (package
10790 (name "python-pyaml")
10791 (version "18.11.0")
10792 (source (origin
10793 (method url-fetch)
10794 (uri (pypi-uri "pyaml" version))
10795 (sha256
10796 (base32
10797 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
10798 (build-system python-build-system)
10799 (native-inputs
10800 `(("python-unidecode" ,python-unidecode)))
10801 (propagated-inputs
10802 `(("python-pyyaml" ,python-pyyaml)))
10803 (home-page "https://github.com/mk-fg/pretty-yaml")
10804 (synopsis "YAML pretty-print library for Python")
10805 (description
10806 "pyaml is a PyYAML based python module to produce pretty and readable
10807 YAML-serialized data.")
10808 (license license:wtfpl2)))
10809
10810 (define-public python2-pyaml
10811 (package-with-python2 python-pyaml))
10812
10813 (define-public python-backpack
10814 (package
10815 (name "python-backpack")
10816 (version "0.1")
10817 (source
10818 (origin
10819 (method url-fetch)
10820 (uri (pypi-uri "backpack" version))
10821 (sha256
10822 (base32
10823 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10824 (build-system python-build-system)
10825 (native-inputs
10826 `(("python-pytest" ,python-pytest)
10827 ("python-nose" ,python-nose)))
10828 (propagated-inputs
10829 `(("python-simplejson" ,python-simplejson)))
10830 (home-page "https://github.com/sdispater/backpack")
10831 (synopsis "Utilities for working with Python collections")
10832 (description "Backpack provides some useful utilities for working with
10833 collections of data.")
10834 (license license:expat)))
10835
10836 (define-public python2-backpack
10837 (package-with-python2 python-backpack))
10838
10839 (define-public python-prompt-toolkit
10840 (package
10841 (name "python-prompt-toolkit")
10842 (version "2.0.7")
10843 (source
10844 (origin
10845 (method url-fetch)
10846 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10847 (sha256
10848 (base32
10849 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10850 (build-system python-build-system)
10851 (arguments
10852 `(#:phases
10853 (modify-phases %standard-phases
10854 (delete 'check)
10855 (add-after 'install 'post-install-check
10856 (lambda* (#:key inputs outputs #:allow-other-keys)
10857 ;; HOME is needed for the test
10858 ;; "test_pathcompleter_can_expanduser".
10859 (setenv "HOME" "/tmp")
10860 (add-installed-pythonpath inputs outputs)
10861 (invoke "py.test"))))))
10862 (propagated-inputs
10863 `(("python-wcwidth" ,python-wcwidth)
10864 ("python-six" ,python-six)
10865 ("python-pygments" ,python-pygments)))
10866 (native-inputs
10867 `(("python-pytest" ,python-pytest)))
10868 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10869 (synopsis "Library for building command line interfaces in Python")
10870 (description
10871 "Prompt-Toolkit is a library for building interactive command line
10872 interfaces in Python. It's like GNU Readline but it also features syntax
10873 highlighting while typing, out-of-the-box multi-line input editing, advanced
10874 code completion, incremental search, support for Chinese double-width
10875 characters, mouse support, and auto suggestions.")
10876 (license license:bsd-3)))
10877
10878 (define-public python2-prompt-toolkit
10879 (package-with-python2 python-prompt-toolkit))
10880
10881 (define-public python-prompt-toolkit-1
10882 (package (inherit python-prompt-toolkit)
10883 (version "1.0.15")
10884 (source
10885 (origin
10886 (method url-fetch)
10887 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10888 (sha256
10889 (base32
10890 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
10891
10892 (define-public python2-prompt-toolkit-1
10893 (package-with-python2 python-prompt-toolkit-1))
10894
10895 (define-public python-jedi
10896 (package
10897 (name "python-jedi")
10898 (version "0.15.1")
10899 (source
10900 (origin
10901 (method url-fetch)
10902 (uri (pypi-uri "jedi" version))
10903 (sha256
10904 (base32
10905 "0bp4pxhsynaarbvzblsn5x32lzp29svy3sxfy8i6m5iwz9s9r1ds"))))
10906 (build-system python-build-system)
10907 (arguments
10908 `(#:phases
10909 (modify-phases %standard-phases
10910 (add-after 'unpack 'disable-file-completion-test
10911 ;; A single parameterized test currently fail (see:
10912 ;; https://github.com/davidhalter/jedi/issues/1395). Remove it.
10913 (lambda _
10914 (substitute* "test/test_api/test_completion.py"
10915 ((".*'example.py', 'rb\"' \\+ join\\('\\.\\.'.*") ""))
10916 #t))
10917 (replace 'check
10918 (lambda _
10919 (setenv "HOME" "/tmp")
10920 (invoke "python" "-m" "pytest"))))))
10921 (native-inputs
10922 `(("python-pytest" ,python-pytest)
10923 ("python-docopt" ,python-docopt)))
10924 (propagated-inputs
10925 `(("python-parso" ,python-parso)))
10926 (home-page "https://github.com/davidhalter/jedi")
10927 (synopsis "Autocompletion and static analysis library for Python")
10928 (description
10929 "Jedi is a static analysis tool for Python that can be used in Integrated
10930 Development Environments (@dfn{IDE}s) and text editors. It understands Python
10931 on a deeper level than many other static analysis frameworks for Python.
10932
10933 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
10934 well.")
10935 (license license:expat)))
10936
10937 (define-public python2-jedi
10938 (package-with-python2 python-jedi))
10939
10940 (define-public ptpython
10941 (package
10942 (name "ptpython")
10943 (version "0.34")
10944 (source (origin
10945 (method url-fetch)
10946 (uri (pypi-uri "ptpython" version))
10947 (sha256
10948 (base32
10949 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10950 (build-system python-build-system)
10951 (arguments
10952 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
10953 (propagated-inputs
10954 `(("python-docopt" ,python-docopt)
10955 ("python-jedi" ,python-jedi)
10956 ("python-prompt-toolkit" ,python-prompt-toolkit)
10957 ("python-pygments" ,python-pygments)))
10958 (home-page "https://github.com/jonathanslenders/ptpython")
10959 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10960 (description
10961 "ptpython is a Python read-eval-print loop with IDE-like features.
10962 It supports syntax highlighting, multiline editing, autocompletion, mouse,
10963 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10964 etc.")
10965 (license license:bsd-3)
10966 (properties `((python2-variant . ,(delay ptpython-2))))))
10967
10968 (define-public ptpython-2
10969 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10970 (package
10971 (inherit base)
10972 (name "ptpython2"))))
10973
10974 (define-public python-stem
10975 (package
10976 (name "python-stem")
10977 (version "1.7.1")
10978 (source
10979 (origin
10980 (method url-fetch)
10981 (uri (pypi-uri "stem" version))
10982 (sha256
10983 (base32
10984 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
10985 (build-system python-build-system)
10986 (arguments
10987 `(#:phases
10988 (modify-phases %standard-phases
10989 (replace 'check
10990 (lambda _
10991 (invoke "./run_tests.py" "--unit")
10992 #t)))))
10993 (native-inputs
10994 `(("python-mock" ,python-mock)
10995 ("python-pycodestyle" ,python-pycodestyle)
10996 ("python-pyflakes" ,python-pyflakes)))
10997 (home-page "https://stem.torproject.org/")
10998 (synopsis
10999 "Python controller library that allows applications to interact with Tor")
11000 (description
11001 "Stem is a Python controller library for Tor. With it you can use Tor's
11002 control protocol to script against the Tor process and read descriptor data
11003 relays publish about themselves.")
11004 (license license:lgpl3)))
11005
11006 (define-public python2-stem
11007 (package-with-python2 python-stem))
11008
11009 (define-public python-pyserial
11010 (package
11011 (name "python-pyserial")
11012 (version "3.1.1")
11013 (source
11014 (origin
11015 (method url-fetch)
11016 (uri (pypi-uri "pyserial" version))
11017 (sha256
11018 (base32
11019 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
11020 (build-system python-build-system)
11021 (arguments
11022 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
11023 ;; #:phases
11024 ;; (modify-phases %standard-phases
11025 ;; (replace 'check
11026 ;; (lambda _
11027 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
11028 (home-page
11029 "https://github.com/pyserial/pyserial")
11030 (synopsis "Python Serial Port Bindings")
11031 (description "@code{pyserial} provide serial port bindings for Python. It
11032 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11033 and/or Xon/Xoff. The port is accessed in RAW mode.")
11034 (license license:bsd-3)))
11035
11036 (define-public python2-pyserial
11037 (package-with-python2 python-pyserial))
11038
11039 (define-public python-kivy
11040 (package
11041 (name "python-kivy")
11042 (version "1.10.1")
11043 (source
11044 (origin
11045 (method url-fetch)
11046 (uri (pypi-uri "Kivy" version))
11047 (file-name (string-append name "-" version ".tar.gz"))
11048 (sha256
11049 (base32
11050 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
11051 (build-system python-build-system)
11052 (arguments
11053 `(#:tests? #f ; Tests require many optional packages
11054 #:phases
11055 (modify-phases %standard-phases
11056 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11057 (lambda* (#:key inputs #:allow-other-keys)
11058 (setenv "KIVY_SDL2_PATH"
11059 (string-append (assoc-ref inputs "sdl-union")
11060 "/include/SDL2"))
11061 #t)))))
11062 (native-inputs
11063 `(("git" ,git)
11064 ("pkg-config" ,pkg-config)
11065 ("python-cython" ,python-cython)))
11066 (inputs
11067 `(("gstreamer" ,gstreamer)
11068 ("mesa" ,mesa)
11069 ("sdl-union"
11070 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11071 (home-page "http://kivy.org")
11072 (synopsis
11073 "Multitouch application framework")
11074 (description
11075 "A software library for rapid development of
11076 hardware-accelerated multitouch applications.")
11077 (license license:expat)))
11078
11079 (define-public python2-kivy
11080 (package-with-python2 python-kivy))
11081
11082 (define-public python-kivy-next
11083 (deprecated-package "python-kivy-next" python-kivy))
11084
11085 (define-public python2-kivy-next
11086 (deprecated-package "python2-kivy-next" python2-kivy))
11087
11088 (define-public python-binaryornot
11089 (package
11090 (name "python-binaryornot")
11091 (version "0.4.4")
11092 (source (origin
11093 (method url-fetch)
11094 (uri (pypi-uri "binaryornot" version))
11095 (sha256
11096 (base32
11097 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
11098 (build-system python-build-system)
11099 (arguments
11100 `(#:phases
11101 (modify-phases %standard-phases
11102 (add-after 'unpack 'patch-tests
11103 (lambda _
11104 ;; TypeError: binary() got an unexpected keyword argument
11105 ;; 'average_size'.
11106 (substitute* "tests/test_check.py"
11107 (("average_size=512") ""))
11108 #t)))))
11109 (propagated-inputs
11110 `(("python-chardet" ,python-chardet)
11111 ("python-hypothesis" ,python-hypothesis)))
11112 (home-page "https://github.com/audreyr/binaryornot")
11113 (synopsis "Package to check if a file is binary or text")
11114 (description "Ultra-lightweight pure Python package to check if a file is
11115 binary or text.")
11116 (license license:bsd-3)
11117 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11118
11119 (define-public python2-binaryornot
11120 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11121 (package (inherit base)
11122 (propagated-inputs
11123 `(("python2-enum34" ,python2-enum34)
11124 ,@(package-propagated-inputs base))))))
11125
11126 (define-public python-binwalk
11127 (let ((commit "64201acfb5b0a9cdd9faa58c40a36dcff8612e29")
11128 (revision "0"))
11129 (package
11130 (name "python-binwalk")
11131 (version (git-version "2.1.1" revision commit))
11132 (source
11133 (origin
11134 (method git-fetch)
11135 (uri (git-reference
11136 (url "https://github.com/ReFirmLabs/binwalk")
11137 (commit commit)))
11138 (file-name (git-file-name name version))
11139 (sha256
11140 (base32
11141 "1z7ca6rfp887hw5jc3sb45mm4fa0xid4lsp2z8g4r590dr7k7w15"))))
11142 (build-system python-build-system)
11143 (arguments
11144 `(#:phases
11145 (modify-phases %standard-phases
11146 (add-before 'check 'set-pythonpath
11147 (lambda _
11148 (setenv "PYTHONPATH"
11149 (string-append
11150 (getcwd) "/src/"
11151 ":" (getenv "PYTHONPATH")))
11152 (setenv "HOME" "")
11153 #t)))))
11154 (native-inputs
11155 `(("python-coverage" ,python-coverage)
11156 ("python-nose" ,python-nose)))
11157 (home-page "https://github.com/ReFirmLabs/binwalk")
11158 (synopsis "Firmware analysis tool")
11159 (description "Binwalk is a tool for analyzing, reverse engineering, and extracting firmware images")
11160 (license license:expat))))
11161
11162 (define-public python-nltk
11163 (package
11164 (name "python-nltk")
11165 (version "3.2.1")
11166 (source (origin
11167 (method url-fetch)
11168 (uri (pypi-uri "nltk" version))
11169 (sha256
11170 (base32
11171 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11172 (build-system python-build-system)
11173 (arguments
11174 '(;; The tests require some extra resources to be downloaded.
11175 ;; TODO Try packaging these resources.
11176 #:tests? #f))
11177 (home-page "http://nltk.org/")
11178 (synopsis "Natural Language Toolkit")
11179 (description "It provides interfaces to over 50 corpora and lexical
11180 resources such as WordNet, along with a suite of text processing libraries
11181 for classification, tokenization, stemming, tagging, parsing, and semantic
11182 reasoning, wrappers for natural language processing libraries.")
11183 (license license:asl2.0)))
11184
11185 (define-public python2-nltk
11186 (package-with-python2 python-nltk))
11187
11188 (define-public python-pymongo
11189 (package
11190 (name "python-pymongo")
11191 (version "3.7.2")
11192 (source (origin
11193 (method url-fetch)
11194 (uri (pypi-uri "pymongo" version))
11195 (sha256
11196 (base32
11197 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
11198 (build-system python-build-system)
11199 (propagated-inputs
11200 `(("python-certifi" ,python-certifi)))
11201 (home-page "https://github.com/mongodb/mongo-python-driver")
11202 (synopsis "Python driver for MongoDB")
11203 (description "Python driver for MongoDB.")
11204 (license license:asl2.0)))
11205
11206 (define-public python2-pymongo
11207 (package-with-python2 python-pymongo))
11208
11209 (define-public python-consul
11210 (package
11211 (name "python-consul")
11212 (version "0.6.1")
11213 (source
11214 (origin
11215 (method url-fetch)
11216 (uri (pypi-uri "python-consul" version))
11217 (sha256
11218 (base32
11219 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11220 (build-system python-build-system)
11221 (arguments
11222 '(#:tests? #f)) ; The tests are not distributed
11223 (propagated-inputs
11224 `(("python-requests" ,python-requests)
11225 ("python-six" ,python-six)))
11226 (home-page "https://github.com/cablehead/python-consul")
11227 (synopsis "Python client for Consul")
11228 (description
11229 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11230 discovery, monitoring and configuration.")
11231 (license license:expat)))
11232
11233 (define-public python2-consul
11234 (package-with-python2 python-consul))
11235
11236 (define-public python-schematics
11237 (package
11238 (name "python-schematics")
11239 (version "1.1.1")
11240 (source
11241 (origin
11242 (method git-fetch)
11243 (uri (git-reference
11244 (url "https://github.com/schematics/schematics.git")
11245 (commit (string-append "v" version))))
11246 (file-name (git-file-name name version))
11247 (sha256
11248 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
11249 (build-system python-build-system)
11250 (propagated-inputs
11251 `(("python-six" ,python-six)))
11252 (arguments
11253 ;; The tests require a bunch of not very nice packages with fixed
11254 ;; version requirements (e.g. python-coveralls).
11255 `(#:tests? #f))
11256 (home-page "https://github.com/schematics/schematics")
11257 (synopsis "Python Data Structures for Humans")
11258 (description "Python Data Structures for Humans.")
11259 (license license:bsd-3)))
11260
11261 (define-public python2-schematics
11262 (package-with-python2 python-schematics))
11263
11264 (define-public python-odfpy
11265 (package
11266 (name "python-odfpy")
11267 (version "1.3.3")
11268 (source (origin
11269 (method url-fetch)
11270 (uri (pypi-uri "odfpy" version))
11271 (sha256
11272 (base32
11273 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11274 (arguments
11275 `(#:modules ((srfi srfi-1)
11276 (guix build python-build-system)
11277 (guix build utils))
11278 #:phases
11279 (modify-phases %standard-phases
11280 (replace 'check
11281 ;; The test runner invokes python2 and python3 for test*.py.
11282 ;; To avoid having both in inputs, we replicate it here.
11283 (lambda _
11284 (for-each (lambda (test-file) (invoke "python" test-file))
11285 (find-files "tests" "^test.*\\.py$"))
11286 #t)))))
11287 (build-system python-build-system)
11288 (home-page "https://github.com/eea/odfpy")
11289 (synopsis "Python API and tools to manipulate OpenDocument files")
11290 (description "Collection of libraries and utility programs written in
11291 Python to manipulate OpenDocument 1.2 files.")
11292 (license
11293 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11294 ;; number of files with other licenses.
11295 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11296
11297 (define-public python2-odfpy
11298 (package-with-python2 python-odfpy))
11299
11300 (define-public python-natsort
11301 (package
11302 (name "python-natsort")
11303 (version "5.4.1")
11304 (source (origin
11305 (method url-fetch)
11306 (uri (pypi-uri "natsort" version))
11307 (sha256
11308 (base32
11309 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
11310 (build-system python-build-system)
11311 (arguments
11312 `(#:modules ((guix build utils)
11313 (guix build python-build-system)
11314 (srfi srfi-1)
11315 (srfi srfi-26)
11316 (ice-9 ftw))
11317 #:phases
11318 (modify-phases %standard-phases
11319 (add-before 'check 'set-cachedir
11320 ;; Tests require write access to $HOME by default
11321 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
11322 (replace 'check
11323 (lambda _
11324 (let ((cwd (getcwd)))
11325 (setenv "PYTHONPATH"
11326 (string-append
11327 cwd "/build/"
11328 (find (cut string-prefix? "lib" <>)
11329 (scandir (string-append cwd "/build")))
11330 ":"
11331 (getenv "PYTHONPATH")))
11332 (invoke "pytest" "-v")))))))
11333 (native-inputs
11334 `(("python-hypothesis" ,python-hypothesis)
11335 ("python-pytest-cov" ,python-pytest-cov)
11336 ("python-pytest-mock" ,python-pytest-mock)
11337 ("python-pytest" ,python-pytest)))
11338 (propagated-inputs ; TODO: Add python-fastnumbers.
11339 `(("python-pyicu" ,python-pyicu)))
11340 (home-page "https://github.com/SethMMorton/natsort")
11341 (synopsis "Natural sorting for python and shell")
11342 (description
11343 "Natsort lets you apply natural sorting on lists instead of
11344 lexicographical. If you use the built-in @code{sorted} method in python
11345 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
11346 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
11347 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
11348 identifies numbers and sorts them separately from strings. It can also sort
11349 version numbers, real numbers, mixed types and more, and comes with a shell
11350 command @command{natsort} that exposes this functionality in the command line.")
11351 (license license:expat)
11352 (properties `((python2-variant . ,(delay python2-natsort))))))
11353
11354 (define-public python2-natsort
11355 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11356 (package (inherit base)
11357 (native-inputs
11358 `(("python2-pathlib" ,python2-pathlib)
11359 ,@(package-native-inputs base))))))
11360
11361 (define-public python-glances
11362 (package
11363 (name "python-glances")
11364 (version "3.1.1")
11365 (source
11366 (origin
11367 (method url-fetch)
11368 (uri (pypi-uri "Glances" version))
11369 (sha256
11370 (base32
11371 "07j1ggzsqiskyz1i4mrnyr9i95v0dqi0i0hibnv1l188km8shmi8"))
11372 (modules '((guix build utils)))
11373 (snippet
11374 '(begin
11375 ;; Glances phones PyPI for weekly update checks by default.
11376 ;; Disable these. The user can re-enable them if desired.
11377 (substitute* "glances/outdated.py"
11378 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
11379 (string-append indentation
11380 "self.args.disable_check_update = True\n"
11381 line)))
11382 #t))))
11383 (build-system python-build-system)
11384 (propagated-inputs
11385 `(("python-future" ,python-future)
11386 ("python-psutil" ,python-psutil)))
11387 (home-page
11388 "https://github.com/nicolargo/glances")
11389 (synopsis "Cross-platform curses-based monitoring tool")
11390 (description
11391 "Glances is a curses-based monitoring tool for a wide variety of platforms.
11392 Glances uses the PsUtil library to get information from your system. It
11393 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
11394 (license license:lgpl3+)))
11395
11396 (define-public python2-glances
11397 (package-with-python2 python-glances))
11398
11399 (define-public python-graphql-core
11400 (package
11401 (name "python-graphql-core")
11402 (version "0.5.3")
11403 (source
11404 (origin
11405 (method url-fetch)
11406 (uri (pypi-uri "graphql-core" version))
11407 (sha256
11408 (base32
11409 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11410 (build-system python-build-system)
11411 (arguments
11412 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11413 #:phases
11414 (modify-phases %standard-phases
11415 (add-after 'unpack 'patch-hardcoded-version
11416 (lambda _ (substitute*
11417 "setup.py"
11418 (("'gevent==1.1rc1'") "'gevent'"))
11419 #t)))))
11420 (native-inputs
11421 `(("python-gevent" ,python-gevent)
11422 ("python-mock" ,python-mock)
11423 ("python-pytest-mock" ,python-pytest-mock)))
11424 (propagated-inputs
11425 `(("python-promise" ,python-promise)
11426 ("python-six" ,python-six)))
11427 (home-page "https://github.com/graphql-python/graphql-core")
11428 (synopsis "GraphQL implementation for Python")
11429 (description
11430 "GraphQL implementation for Python. GraphQL is a data query language and
11431 runtime designed and used to request and deliver data to mobile and web apps.
11432 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11433 to Python.")
11434 (license license:expat)))
11435
11436 (define-public python2-graphql-core
11437 (package-with-python2 python-graphql-core))
11438
11439 (define-public python-graphql-relay
11440 (package
11441 (name "python-graphql-relay")
11442 (version "0.4.5")
11443 (source
11444 (origin
11445 (method url-fetch)
11446 (uri (pypi-uri "graphql-relay" version))
11447 (sha256
11448 (base32
11449 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
11450 (build-system python-build-system)
11451 (arguments
11452 '(#:tests? #f)) ; The tests are not distributed
11453 (propagated-inputs
11454 `(("python-graphql-core" ,python-graphql-core)
11455 ("python-promise" ,python-promise)
11456 ("python-six" ,python-six)))
11457 (home-page "https://github.com/graphql-python/graphql-relay-py")
11458 (synopsis "Relay implementation for Python")
11459 (description
11460 "This is a library to allow the easy creation of Relay-compliant servers
11461 using the GraphQL Python reference implementation of a GraphQL server. It
11462 should be noted that the code is a exact port of the original
11463 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11464 from Facebook.")
11465 (license license:expat)))
11466
11467 (define-public python2-graphql-relay
11468 (package-with-python2 python-graphql-relay))
11469
11470 (define-public python-graphene
11471 (package
11472 (name "python-graphene")
11473 (version "0.10.2")
11474 (source
11475 (origin
11476 (method url-fetch)
11477 (uri (pypi-uri "graphene" version))
11478 (sha256
11479 (base32
11480 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11481 (build-system python-build-system)
11482 (propagated-inputs
11483 `(("python-graphql-core" ,python-graphql-core)
11484 ("python-graphql-relay" ,python-graphql-relay)
11485 ("python-iso8601" ,python-iso8601)
11486 ("python-promise" ,python-promise)
11487 ("python-six" ,python-six)))
11488 (arguments
11489 `(#:tests? #f)) ; no tests/ in the PyPI tarball
11490 (home-page "http://graphene-python.org/")
11491 (synopsis "GraphQL Framework for Python")
11492 (description
11493 "Graphene is a Python library for building GraphQL schemas/types.
11494 A GraphQL schema describes your data model, and provides a GraphQL server
11495 with an associated set of resolve methods that know how to fetch data.")
11496 (properties `((python2-variant . ,(delay python2-graphene))))
11497 (license license:expat)))
11498
11499 (define-public python2-graphene
11500 (let ((base (package-with-python2
11501 (strip-python2-variant python-graphene))))
11502 (package (inherit base)
11503 (native-inputs
11504 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11505 ,@(package-native-inputs base))))))
11506
11507 (define-public python-nautilus
11508 (package
11509 (name "python-nautilus")
11510 (version "0.4.9")
11511 (source
11512 (origin
11513 (method url-fetch)
11514 (uri (pypi-uri "nautilus" version))
11515 (sha256
11516 (base32
11517 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11518 (build-system python-build-system)
11519 (arguments `(#:tests? #f)) ; fails to import test modules
11520 (propagated-inputs
11521 `(("python-bcrypt" ,python-bcrypt)
11522 ("python-click" ,python-click)
11523 ("python-consul" ,python-consul)
11524 ("python-graphene" ,python-graphene)
11525 ("python-jinja2" ,python-jinja2)
11526 ("python-peewee" ,python-peewee)
11527 ("python-pika" ,python-pika)
11528 ("python-tornado" ,python-tornado)
11529 ("python-wtforms" ,python-wtforms)))
11530 (native-inputs
11531 `(("python-nose2" ,python-nose2)))
11532 (home-page "https://github.com/AlecAivazis/nautilus")
11533 (synopsis "Library for creating microservice applications")
11534 (description
11535 "Nautilus is a framework for flux based microservices that looks to
11536 provide extendible implementations of common aspects of a cloud so that you can
11537 focus on building massively scalable web applications.")
11538 (license license:expat)))
11539
11540 (define-public python-snowballstemmer
11541 (package
11542 (name "python-snowballstemmer")
11543 (version "1.2.1")
11544 (source (origin
11545 (method url-fetch)
11546 (uri (pypi-uri "snowballstemmer" version))
11547 (sha256
11548 (base32
11549 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11550 (build-system python-build-system)
11551 (arguments
11552 `(;; No tests exist
11553 #:tests? #f))
11554 (home-page "https://github.com/shibukawa/snowball_py")
11555 (synopsis "Snowball stemming library collection for Python")
11556 (description "This package provides 16 word stemmer algorithms generated
11557 from Snowball algorithms. It includes the 15 original ones plus the Poerter
11558 English stemmer.")
11559 (license license:bsd-3)))
11560
11561 (define-public python2-snowballstemmer
11562 (package-with-python2 python-snowballstemmer))
11563
11564 (define-public python-setproctitle
11565 (package
11566 (name "python-setproctitle")
11567 (version "1.1.10")
11568 (source
11569 (origin
11570 (method url-fetch)
11571 (uri (pypi-uri "setproctitle" version))
11572 (sha256
11573 (base32
11574 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11575 (build-system python-build-system)
11576 (arguments
11577 '(#:phases
11578 (modify-phases %standard-phases
11579 (add-before 'check 'patch-Makefile
11580 ;; Stricly this is only required for the python2 variant.
11581 ;; But adding a phase in an inherited package seems to be
11582 ;; cumbersum. So we patch even for python3.
11583 (lambda _
11584 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11585 (when nose
11586 (substitute* "Makefile"
11587 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11588 (string-append nose "/bin/nosetests "))))
11589 #t)))
11590 (replace 'check
11591 (lambda _
11592 (setenv "PYTHON" (or (which "python3") (which "python")))
11593 (setenv "PYCONFIG" (or (which "python3-config")
11594 (which "python-config")))
11595 (setenv "CC" "gcc")
11596 ;; No need to extend PYTHONPATH to find the built package, since
11597 ;; the Makefile will build anyway
11598 (invoke "make" "check"))))))
11599 (native-inputs
11600 `(("procps" ,procps))) ; required for tests
11601 (home-page
11602 "https://github.com/dvarrazzo/py-setproctitle")
11603 (synopsis
11604 "Setproctitle implementation for Python to customize the process title")
11605 (description "The library allows a process to change its title (as displayed
11606 by system tools such as ps and top).
11607
11608 Changing the title is mostly useful in multi-process systems, for
11609 example when a master process is forked: changing the children's title
11610 allows to identify the task each process is busy with. The technique
11611 is used by PostgreSQL and the OpenSSH Server for example.")
11612 (license license:bsd-3)
11613 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11614
11615 (define-public python2-setproctitle
11616 (let ((base (package-with-python2
11617 (strip-python2-variant python-setproctitle))))
11618 (package
11619 (inherit base)
11620 (native-inputs `(("python2-nose" ,python2-nose)
11621 ,@(package-native-inputs base))))))
11622
11623 (define-public python-validictory
11624 (package
11625 (name "python-validictory")
11626 (version "1.0.1")
11627 (source
11628 (origin
11629 (method url-fetch)
11630 (uri (pypi-uri "validictory" version))
11631 (sha256
11632 (base32
11633 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11634 (build-system python-build-system)
11635 (arguments
11636 '(#:phases
11637 (modify-phases %standard-phases
11638 (add-after 'unpack 'bootstrap
11639 ;; Move the tests out of the package directory to avoid
11640 ;; packaging them.
11641 (lambda* _
11642 (rename-file "validictory/tests" "tests")
11643 (delete-file "tests/__init__.py")))
11644 (replace 'check
11645 (lambda _
11646 ;; Extend PYTHONPATH so the built package will be found.
11647 (setenv "PYTHONPATH"
11648 (string-append (getcwd) "/build/lib:"
11649 (getenv "PYTHONPATH")))
11650 (invoke "py.test" "-vv" ))))))
11651 (native-inputs
11652 `(("python-pytest" ,python-pytest)))
11653 (home-page
11654 "https://github.com/jamesturk/validictory")
11655 (synopsis "General purpose Python data validator")
11656 (description "It allows validation of arbitrary Python data structures.
11657
11658 The schema format is based on the JSON Schema
11659 proposal (http://json-schema.org), so combined with json the library is also
11660 useful as a validator for JSON data.")
11661 (license license:expat)))
11662
11663 (define-public python2-validictory
11664 (package-with-python2 python-validictory))
11665
11666 (define-public python-pyelftools
11667 (package
11668 (name "python-pyelftools")
11669 (version "0.25")
11670 (source
11671 (origin
11672 (method url-fetch)
11673 (uri (pypi-uri "pyelftools" version))
11674 (sha256
11675 (base32
11676 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11677 (build-system python-build-system)
11678 (arguments
11679 `(#:phases
11680 (modify-phases %standard-phases
11681 (add-before 'check 'set-pythonpath
11682 (lambda _
11683 (setenv "PYTHONPATH"
11684 (string-append
11685 (getcwd) "/test/"
11686 ":" (getenv "PYTHONPATH")))
11687 #t)))))
11688 (home-page
11689 "https://github.com/eliben/pyelftools")
11690 (synopsis
11691 "Analyze binary and library file information")
11692 (description "This Python library provides interfaces for parsing and
11693 analyzing two binary and library file formats; the Executable and Linking
11694 Format (ELF), and debugging information in the Debugging With Attributed
11695 Record Format (DWARF).")
11696 (license license:public-domain)))
11697
11698 (define-public python-pyev
11699 (package
11700 (name "python-pyev")
11701 (version "0.9.0")
11702 (source
11703 (origin
11704 (method url-fetch)
11705 (uri (pypi-uri "pyev" version))
11706 (sha256
11707 (base32
11708 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11709 (build-system python-build-system)
11710 (arguments
11711 `(#:tests? #f ; no test suite
11712 #:phases
11713 (modify-phases %standard-phases
11714 (add-after 'unpack 'patch
11715 (lambda* (#:key inputs #:allow-other-keys)
11716 (let ((libev (string-append (assoc-ref inputs "libev")
11717 "/lib/libev.so.4")))
11718 (substitute* "setup.py"
11719 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11720 (string-append "libev_dll_name = \"" libev "\"")))))))))
11721 (inputs
11722 `(("libev" ,libev)))
11723 (home-page "http://pythonhosted.org/pyev/")
11724 (synopsis "Python libev interface")
11725 (description "Pyev provides a Python interface to libev.")
11726 (license license:gpl3)))
11727
11728 (define-public python2-pyev
11729 (package-with-python2 python-pyev))
11730
11731 (define-public python-imagesize
11732 (package
11733 (name "python-imagesize")
11734 (version "1.1.0")
11735 (source
11736 (origin
11737 (method url-fetch)
11738 (uri (pypi-uri "imagesize" version))
11739 (sha256
11740 (base32
11741 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11742 (build-system python-build-system)
11743 (home-page "https://github.com/shibukawa/imagesize_py")
11744 (synopsis "Gets image size of files in various formats in Python")
11745 (description
11746 "This package allows determination of image size from
11747 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11748 (license license:expat)))
11749
11750 (define-public python2-imagesize
11751 (package-with-python2 python-imagesize))
11752
11753 (define-public python-termstyle
11754 (package
11755 (name "python-termstyle")
11756 (version "0.1.11")
11757 (source
11758 (origin
11759 (method url-fetch)
11760 (uri (pypi-uri "termstyle" version))
11761 (sha256
11762 (base32
11763 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11764 (build-system python-build-system)
11765 (arguments
11766 '(#:phases
11767 (modify-phases %standard-phases
11768 (replace 'check
11769 (lambda _
11770 (invoke "python" "test3.py"))))))
11771 (home-page "https://github.com/gfxmonk/termstyle")
11772 (synopsis "Console text coloring for Python")
11773 (description "This package provides console text coloring for Python.")
11774 (license license:bsd-3)))
11775
11776 (define-public python-argcomplete
11777 (package
11778 (name "python-argcomplete")
11779 (version "1.7.0")
11780 (source
11781 (origin
11782 (method url-fetch)
11783 (uri (pypi-uri "argcomplete" version))
11784 (sha256
11785 (base32
11786 "11bwiw6j0nilgz81xnw6f1npyga3prp8asjqrm87cdr3ria5l03x"))))
11787 (build-system python-build-system)
11788 (native-inputs
11789 `(("python-pexpect" ,python-pexpect)
11790 ("tcsh" ,tcsh)
11791 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
11792 (home-page "https://github.com/kislyuk/argcomplete")
11793 (synopsis "Shell tab completion for Python argparse")
11794 (description "argcomplete provides extensible command line tab completion
11795 of arguments and options for Python scripts using @code{argparse}. It's
11796 particularly useful for programs with many options or sub-parsers that can
11797 dynamically suggest completions; for example, when browsing resources over the
11798 network.")
11799 (license license:asl2.0)))
11800
11801 (define-public python2-argcomplete
11802 (package-with-python2 python-argcomplete))
11803
11804 (define-public python-xopen
11805 (package
11806 (name "python-xopen")
11807 (version "0.5.0")
11808 (source
11809 (origin
11810 (method url-fetch)
11811 (uri (pypi-uri "xopen" version))
11812 (sha256
11813 (base32
11814 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
11815 (build-system python-build-system)
11816 (propagated-inputs
11817 `(("python-setuptools-scm" ,python-setuptools-scm)))
11818 (home-page "https://github.com/marcelm/xopen/")
11819 (synopsis "Open compressed files transparently")
11820 (description "This module provides an @code{xopen} function that works like
11821 Python's built-in @code{open} function, but can also deal with compressed files.
11822 Supported compression formats are gzip, bzip2 and, xz, and are automatically
11823 recognized by their file extensions. The focus is on being as efficient as
11824 possible on all supported Python versions.")
11825 (license license:expat)))
11826
11827 (define-public python2-xopen
11828 (let ((base (package-with-python2
11829 (strip-python2-variant python-xopen))))
11830 (package
11831 (inherit base)
11832 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
11833 ,@(package-propagated-inputs base))))))
11834
11835 (define-public python-cheetah
11836 (package
11837 (name "python-cheetah")
11838 (version "3.1.0")
11839 (source
11840 (origin
11841 (method url-fetch)
11842 (uri (pypi-uri "Cheetah3" version))
11843 (sha256
11844 (base32
11845 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
11846 (build-system python-build-system)
11847 (arguments
11848 `(#:modules ((guix build utils)
11849 (guix build python-build-system)
11850 (ice-9 ftw)
11851 (srfi srfi-1)
11852 (srfi srfi-26))
11853 #:phases (modify-phases %standard-phases
11854 (add-after 'unpack 'use-absolute-python
11855 (lambda _
11856 (substitute* "Cheetah/CheetahWrapper.py"
11857 (("#!/usr/bin/env python")
11858 (string-append "#!" (which "python"))))
11859 #t))
11860 (replace 'check
11861 (lambda _
11862 (let ((cwd (getcwd)))
11863 (setenv "PYTHONPATH"
11864 (string-append
11865 cwd "/build/"
11866 (find (cut string-prefix? "lib" <>)
11867 (scandir (string-append cwd "/build")))
11868 ":" (getenv "PYTHONPATH")))
11869 (setenv "PATH"
11870 (string-append (getenv "PATH")
11871 ":" cwd "/bin"))
11872 (setenv "TMPDIR" "/tmp")
11873
11874 (substitute* "Cheetah/Tests/Test.py"
11875 (("unittest.TextTestRunner\\(\\)")
11876 "unittest.TextTestRunner(verbosity=2)"))
11877
11878 (invoke "python" "Cheetah/Tests/Test.py")))))))
11879 (propagated-inputs
11880 `(("python-markdown" ,python-markdown))) ;optional
11881 (home-page "http://cheetahtemplate.org/")
11882 (synopsis "Template engine")
11883 (description "Cheetah is a text-based template engine and Python code
11884 generator.
11885
11886 Cheetah can be used as a standalone templating utility or referenced as
11887 a library from other Python applications. It has many potential uses,
11888 but web developers looking for a viable alternative to ASP, JSP, PHP and
11889 PSP are expected to be its principle user group.
11890
11891 Features:
11892 @enumerate
11893 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
11894 text-based format.
11895 @item Cleanly separates content, graphic design, and program code.
11896 @item Blends the power and flexibility of Python with a simple template language
11897 that non-programmers can understand.
11898 @item Gives template writers full access to any Python data structure, module,
11899 function, object, or method in their templates.
11900 @item Makes code reuse easy by providing an object-orientated interface to
11901 templates that is accessible from Python code or other Cheetah templates.
11902 One template can subclass another and selectively reimplement sections of it.
11903 @item Provides a simple, yet powerful, caching mechanism that can dramatically
11904 improve the performance of a dynamic website.
11905 @item Compiles templates into optimized, yet readable, Python code.
11906 @end enumerate")
11907 (license (license:x11-style "file://LICENSE"))))
11908
11909 (define-public python2-cheetah
11910 (package-with-python2 python-cheetah))
11911
11912 (define-public python-dulwich
11913 (package
11914 (name "python-dulwich")
11915 (version "0.18.6")
11916 (source
11917 (origin
11918 (method url-fetch)
11919 (uri (list (string-append "https://www.dulwich.io/releases/"
11920 "dulwich-" version ".tar.gz")
11921 (pypi-uri "dulwich" version)))
11922 (sha256
11923 (base32
11924 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
11925 (build-system python-build-system)
11926 (arguments
11927 `(#:phases
11928 (modify-phases %standard-phases
11929 (add-before 'check 'fix-tests
11930 (lambda* (#:key inputs #:allow-other-keys)
11931 ;; The tests use Popen with a custom environment which doesn't
11932 ;; include PATH.
11933 (substitute* "dulwich/tests/compat/utils.py"
11934 (("'git'") (string-append "'"
11935 (which "git")
11936 "'")))
11937 (substitute* '("dulwich/tests/test_repository.py"
11938 "dulwich/tests/test_hooks.py")
11939 (("#!/bin/sh") (string-append "#!" (which "sh"))))
11940 (setenv "TEST_RUNNER" "unittest")
11941 (setenv "PYTHONHASHSEED" "random")
11942 #t)))))
11943 (propagated-inputs
11944 `(("python-fastimport" ,python-fastimport)))
11945 (native-inputs
11946 `(("python-mock" ,python-mock)
11947 ("python-geventhttpclient" ,python-geventhttpclient)
11948 ("git" ,git)))
11949 (home-page "https://www.dulwich.io/")
11950 (synopsis "Git implementation in Python")
11951 (description "Dulwich is an implementation of the Git file formats and
11952 protocols written in pure Python.")
11953 ;; Can be used with either license.
11954 (license (list license:asl2.0 license:gpl2+))))
11955
11956 (define-public python2-dulwich
11957 (package-with-python2 python-dulwich))
11958
11959 (define-public python-pbkdf2
11960 (package
11961 (name "python-pbkdf2")
11962 (version "1.3")
11963 (source
11964 (origin
11965 (method url-fetch)
11966 (uri (pypi-uri "pbkdf2" version))
11967 (sha256
11968 (base32
11969 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
11970 (build-system python-build-system)
11971 (arguments
11972 '(#:phases
11973 (modify-phases %standard-phases
11974 (replace 'check
11975 (lambda _
11976 (setenv "PYTHONPATH"
11977 (string-append (getcwd) "/build/lib:"
11978 (getenv "PYTHONPATH")))
11979 (invoke "python" "test/test_pbkdf2.py"))))))
11980 (propagated-inputs
11981 `(("python-pycrypto" ,python-pycrypto))) ; optional
11982 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
11983 (synopsis "Password-based key derivation")
11984 (description "This module implements the password-based key derivation
11985 function, PBKDF2, specified in RSA PKCS#5 v2.0.
11986
11987 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
11988 is part of the RSA Public Key Cryptography Standards series. The provided
11989 implementation takes a password or a passphrase and a salt value (and
11990 optionally a iteration count, a digest module, and a MAC module) and provides
11991 a file-like object from which an arbitrarly-sized key can be read.")
11992 (license license:expat)))
11993
11994 (define-public python2-pbkdf2
11995 (package-with-python2 python-pbkdf2))
11996
11997 (define-public python-qrcode
11998 (package
11999 (name "python-qrcode")
12000 (version "6.1")
12001 (source
12002 (origin
12003 (method url-fetch)
12004 (uri (pypi-uri "qrcode" version))
12005 (sha256
12006 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
12007 (build-system python-build-system)
12008 (arguments
12009 ;; FIXME: Tests require packaging 'pymaging'.
12010 '(#:tests? #f))
12011 (propagated-inputs
12012 `(("python-lxml" ,python-lxml) ; for SVG output
12013 ("python-pillow" ,python-pillow) ; for PNG output
12014 ("python-six" ,python-six)))
12015 (home-page "https://github.com/lincolnloop/python-qrcode")
12016 (synopsis "QR Code image generator")
12017 (description "This package provides a pure Python QR Code generator
12018 module. It uses the Python Imaging Library (PIL) to allow for the generation
12019 of QR Codes.
12020
12021 In addition this package provides a command line tool to generate QR codes and
12022 either write these QR codes to a file or do the output as ascii art at the
12023 console.")
12024 (license license:bsd-3)))
12025
12026 (define-public python2-qrcode
12027 (package-with-python2 python-qrcode))
12028
12029 (define-public python-rst2ansi
12030 (package
12031 (name "python-rst2ansi")
12032 (version "0.1.5")
12033 (source
12034 (origin
12035 (method url-fetch)
12036 (uri (pypi-uri "rst2ansi" version))
12037 (sha256
12038 (base32
12039 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
12040 (build-system python-build-system)
12041 (propagated-inputs
12042 `(("python-docutils" ,python-docutils)))
12043 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
12044 (synopsis "Convert RST to ANSI-decorated console output")
12045 (description
12046 "Python module dedicated to rendering RST (reStructuredText) documents
12047 to ansi-escaped strings suitable for display in a terminal.")
12048 (license license:expat)))
12049
12050 (define-public python-ansi2html
12051 (package
12052 (name "python-ansi2html")
12053 (version "1.2.0")
12054 (source
12055 (origin
12056 (method url-fetch)
12057 (uri (pypi-uri "ansi2html" version))
12058 (sha256
12059 (base32
12060 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
12061 (build-system python-build-system)
12062 (native-inputs
12063 `(("python-mock" ,python-mock)
12064 ("python-nose" ,python-nose)))
12065 (propagated-inputs
12066 `(("python-six" ,python-six)))
12067 (home-page "https://github.com/ralphbean/ansi2html")
12068 (synopsis "Convert ANSI-decorated console output to HTML")
12069 (description
12070 "@command{ansi2html} is a Python library and command line utility for
12071 convering text with ANSI color codes to HTML or LaTeX.")
12072 (license license:gpl3+)))
12073
12074 (define-public python2-ansi2html
12075 (package-with-python2 python-ansi2html))
12076
12077 (define-public python-ddt
12078 (package
12079 (name "python-ddt")
12080 (version "1.1.3")
12081 (source
12082 (origin
12083 (method url-fetch)
12084 (uri (pypi-uri "ddt" version))
12085 (sha256
12086 (base32
12087 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
12088 (build-system python-build-system)
12089 (native-inputs
12090 `(("python-mock" ,python-mock)
12091 ("python-nose" ,python-nose)))
12092 (propagated-inputs
12093 `(("python-six" ,python-six)
12094 ("python-pyyaml" ,python-pyyaml)))
12095 (home-page "https://github.com/txels/ddt")
12096 (synopsis "Data-Driven Tests")
12097 (description
12098 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
12099 running it with different test data, and make it appear as multiple test
12100 cases.")
12101 (license license:expat)))
12102
12103 (define-public python2-ddt
12104 (package-with-python2 python-ddt))
12105
12106 (define-public python-pycountry
12107 (package
12108 (name "python-pycountry")
12109 (version "18.5.26")
12110 (source
12111 (origin
12112 (method url-fetch)
12113 (uri (pypi-uri "pycountry" version))
12114 (sha256
12115 (base32
12116 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
12117 (build-system python-build-system)
12118 (home-page "https://bitbucket.org/flyingcircus/pycountry")
12119 (synopsis "ISO databases for languages, countries, currencies, etc.")
12120 (description
12121 "@code{pycountry} provides the ISO databases for the standards:
12122 @enumerate
12123 @item 639-3 (Languages)
12124 @item 3166 (Countries)
12125 @item 3166-3 (Deleted Countries)
12126 @item 3166-2 (Subdivisions of countries)
12127 @item 4217 (Currencies)
12128 @item 15924 (Scripts)
12129 @end enumerate
12130 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
12131 through a Python API.")
12132 (license license:lgpl2.1+)))
12133
12134 (define-public python2-pycountry
12135 (package-with-python2 python-pycountry))
12136
12137 (define-public python-pycosat
12138 (package
12139 (name "python-pycosat")
12140 (version "0.6.1")
12141 (source
12142 (origin
12143 (method url-fetch)
12144 (uri (pypi-uri "pycosat" version))
12145 (sha256
12146 (base32
12147 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
12148 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
12149 (build-system python-build-system)
12150 (home-page "https://github.com/ContinuumIO/pycosat")
12151 (synopsis "Bindings to picosat (a SAT solver)")
12152 (description
12153 "This package provides efficient Python bindings to @code{picosat} on
12154 the C level. When importing pycosat, the @code{picosat} solver becomes part
12155 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
12156 Problem} (SAT) solver.")
12157 (license license:expat)))
12158
12159 (define-public python2-pycosat
12160 (package-with-python2 python-pycosat))
12161
12162 (define-public python2-ruamel.ordereddict
12163 (package
12164 (name "python2-ruamel.ordereddict")
12165 (version "0.4.9")
12166 (source
12167 (origin
12168 (method url-fetch)
12169 (uri (pypi-uri "ruamel.ordereddict" version))
12170 (sha256
12171 (base32
12172 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
12173 (build-system python-build-system)
12174 (arguments
12175 `(#:python ,python-2
12176 #:phases
12177 (modify-phases %standard-phases
12178 (delete 'check)
12179 (add-after 'install 'check
12180 (lambda* (#:key inputs outputs #:allow-other-keys)
12181 (add-installed-pythonpath inputs outputs)
12182 (invoke "python" "test/testordereddict.py"))))))
12183 (home-page "https://bitbucket.org/ruamel/ordereddict")
12184 (synopsis "Version of dict that keeps keys in insertion order")
12185 (description
12186 "This is an implementation of an ordered dictionary with @dfn{Key
12187 Insertion Order} (KIO: updates of values do not affect the position of the
12188 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
12189 removed and put at the back). The standard library module @code{OrderedDict},
12190 implemented later, implements a subset of @code{ordereddict} functionality.
12191 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
12192 Order} (KSO, no sorting function can be specified, but a transform can be
12193 specified to apply on the key before comparison (e.g. @code{string.lower})).")
12194 (license license:expat)))
12195
12196 (define-public python-pypeg2
12197 (package
12198 (name "python-pypeg2")
12199 (version "2.15.2")
12200 (source
12201 (origin
12202 (method url-fetch)
12203 (uri (pypi-uri "pyPEG2" version))
12204 (sha256
12205 (base32
12206 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
12207 (build-system python-build-system)
12208 (propagated-inputs `(("python-lxml" ,python-lxml)))
12209 (arguments
12210 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
12211 '(#:tests? #f))
12212 (home-page "https://fdik.org/pyPEG/")
12213 (synopsis "Parsering Expression Grammars in Python")
12214 (description "PyPEG is an intrinsic parser interpreter framework for
12215 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
12216 parse many formal languages.")
12217 (license license:gpl2)))
12218
12219 (define-public python-incremental
12220 (package
12221 (name "python-incremental")
12222 (version "17.5.0")
12223 (source
12224 (origin
12225 (method url-fetch)
12226 (uri (pypi-uri "incremental" version))
12227 (sha256
12228 (base32
12229 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
12230 (build-system python-build-system)
12231 (home-page "https://github.com/hawkowl/incremental")
12232 (synopsis "Library for versioning Python projects")
12233 (description "Incremental is a small library that versions your Python
12234 projects.")
12235 (license license:expat)))
12236
12237 (define-public python2-incremental
12238 (package-with-python2 python-incremental))
12239
12240 (define-public python-invoke
12241 (package
12242 (name "python-invoke")
12243 (home-page "http://www.pyinvoke.org/")
12244 (version "1.3.0")
12245 (source (origin
12246 (method url-fetch)
12247 (uri (pypi-uri "invoke" version))
12248 (sha256
12249 (base32
12250 "1nn7gad0rvy492acpyhkrp01zsk86acf34qhsvq4xmm6x39788n5"))))
12251 (build-system python-build-system)
12252 (arguments
12253 ;; XXX: Requires many dependencies that are not yet in Guix.
12254 `(#:tests? #f))
12255 (synopsis "Pythonic task execution")
12256 (description
12257 "Invoke is a Python task execution tool and library, drawing inspiration
12258 from various sources to arrive at a powerful and clean feature set. It is
12259 evolved from the Fabric project, but focuses on local and abstract concerns
12260 instead of servers and network commands.")
12261 (license license:bsd-3)))
12262
12263 (define-public python2-invoke
12264 (package-with-python2 python-invoke))
12265
12266 (define-public python-automat
12267 (package
12268 (name "python-automat")
12269 (version "0.7.0")
12270 (source (origin
12271 (method url-fetch)
12272 (uri (pypi-uri "Automat" version))
12273 (sha256
12274 (base32
12275 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
12276 (build-system python-build-system)
12277 ;; We disable the tests because they require python-twisted, while
12278 ;; python-twisted depends on python-automat. Twisted is optional, but the
12279 ;; tests fail if it is not available. Also see
12280 ;; <https://github.com/glyph/automat/issues/71>.
12281 (arguments '(#:tests? #f))
12282 (native-inputs
12283 `(("python-m2r" ,python-m2r)
12284 ("python-setuptools-scm" ,python-setuptools-scm)
12285 ("python-graphviz" ,python-graphviz)))
12286 (propagated-inputs
12287 `(("python-six" ,python-six)
12288 ("python-attrs" ,python-attrs)))
12289 (home-page "https://github.com/glyph/Automat")
12290 (synopsis "Self-service finite-state machines")
12291 (description "Automat is a library for concise, idiomatic Python
12292 expression of finite-state automata (particularly deterministic finite-state
12293 transducers).")
12294 (license license:expat)))
12295
12296 (define-public python2-automat
12297 (package-with-python2 python-automat))
12298
12299 (define-public python-m2r
12300 (package
12301 (name "python-m2r")
12302 (version "0.2.1")
12303 (source (origin
12304 (method url-fetch)
12305 (uri (pypi-uri "m2r" version))
12306 (sha256
12307 (base32
12308 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
12309 (build-system python-build-system)
12310 (propagated-inputs
12311 `(("python-docutils" ,python-docutils)
12312 ("python-mistune" ,python-mistune)))
12313 (native-inputs
12314 `(("python-pygments" ,python-pygments)
12315 ("python-mock" ,python-mock)))
12316 (home-page "https://github.com/miyakogi/m2r")
12317 (synopsis "Markdown to reStructuredText converter")
12318 (description "M2R converts a markdown file including reST markups to valid
12319 reST format.")
12320 (license license:expat)))
12321
12322 (define-public python2-m2r
12323 (package-with-python2 python-m2r))
12324
12325 (define-public python-constantly
12326 (package
12327 (name "python-constantly")
12328 (version "15.1.0")
12329 (source (origin
12330 (method url-fetch)
12331 (uri (pypi-uri "constantly" version))
12332 (sha256
12333 (base32
12334 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
12335 (build-system python-build-system)
12336 (home-page "https://github.com/twisted/constantly")
12337 (synopsis "Symbolic constants in Python")
12338 (description "Constantly is a Python library that provides symbolic
12339 constant support. It includes collections and constants with text, numeric,
12340 and bit flag values.")
12341 (license license:expat)))
12342
12343 (define-public python2-constantly
12344 (package-with-python2 python-constantly))
12345
12346 (define-public python-attrs
12347 (package
12348 (name "python-attrs")
12349 (version "19.1.0")
12350 (source (origin
12351 (method url-fetch)
12352 (uri (pypi-uri "attrs" version))
12353 (sha256
12354 (base32
12355 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
12356 (build-system python-build-system)
12357 (arguments
12358 `(#:modules ((guix build utils)
12359 (guix build python-build-system)
12360 (ice-9 ftw)
12361 (srfi srfi-1)
12362 (srfi srfi-26))
12363 #:phases (modify-phases %standard-phases
12364 (replace 'check
12365 (lambda _
12366 (let ((cwd (getcwd)))
12367 (setenv "PYTHONPATH"
12368 (string-append
12369 cwd "/build/"
12370 (find (cut string-prefix? "lib" <>)
12371 (scandir (string-append cwd "/build")))
12372 ":"
12373 (getenv "PYTHONPATH")))
12374 (invoke "python" "-m" "pytest")))))))
12375 (native-inputs
12376 `(("python-coverage" ,python-coverage)
12377 ("python-hypothesis" ,python-hypothesis)
12378 ("python-pympler" ,python-pympler)
12379 ("python-pytest" ,python-pytest)
12380 ("python-six" ,python-six)
12381 ("python-sphinx" ,python-sphinx)
12382 ("python-zope-interface" ,python-zope-interface)))
12383 (home-page "https://github.com/python-attrs/attrs/")
12384 (synopsis "Attributes without boilerplate")
12385 (description "@code{attrs} is a Python package with class decorators that
12386 ease the chores of implementing the most common attribute-related object
12387 protocols.")
12388 (license license:expat)))
12389
12390 (define-public python2-attrs
12391 (package-with-python2 python-attrs))
12392
12393 (define-public python-attrs-bootstrap
12394 (package
12395 (inherit python-attrs)
12396 (name "python-attrs-bootstrap")
12397 (native-inputs `())
12398 (arguments `(#:tests? #f))))
12399
12400 (define-public python2-attrs-bootstrap
12401 (package-with-python2 python-attrs-bootstrap))
12402
12403 (define-public python2-cliapp
12404 (package
12405 (name "python2-cliapp")
12406 (version "1.20180812.1")
12407 (source
12408 (origin
12409 (method url-fetch)
12410 (uri (string-append
12411 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
12412 version ".tar.gz"))
12413 (sha256
12414 (base32
12415 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
12416 (build-system python-build-system)
12417 (arguments
12418 `(#:python ,python-2
12419 #:phases
12420 (modify-phases %standard-phases
12421 ;; check phase needs to be run before the build phase. If not,
12422 ;; coverage-test-runner looks for tests for the built source files,
12423 ;; and fails.
12424 (delete 'check)
12425 (add-before 'build 'check
12426 (lambda _
12427 ;; Disable python3 tests
12428 (substitute* "check"
12429 (("python3") "# python3"))
12430 (invoke "./check"))))))
12431 (native-inputs
12432 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12433 ("python2-pep8" ,python2-pep8)))
12434 (propagated-inputs
12435 `(("python2-pyaml" ,python2-pyaml)))
12436 (home-page "https://liw.fi/cliapp/")
12437 (synopsis "Python framework for command line programs")
12438 (description "@code{python2-cliapp} is a python framework for
12439 command line programs. It contains the typical stuff such programs
12440 need to do, such as parsing the command line for options, and
12441 iterating over input files.")
12442 (license license:gpl2+)))
12443
12444 (define-public python2-ttystatus
12445 (package
12446 (name "python2-ttystatus")
12447 (version "0.36")
12448 (source
12449 (origin
12450 (method url-fetch)
12451 (uri (string-append
12452 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
12453 version ".tar.gz"))
12454 (sha256
12455 (base32
12456 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
12457 (build-system python-build-system)
12458 (native-inputs
12459 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12460 ("python2-pep8" ,python2-pep8)))
12461 (arguments
12462 `(#:python ,python-2
12463 #:phases
12464 (modify-phases %standard-phases
12465 ;; check phase needs to be run before the build phase. If not,
12466 ;; coverage-test-runner looks for tests for the built source files,
12467 ;; and fails.
12468 (delete 'check)
12469 (add-before 'build 'check
12470 (lambda _ (invoke "make" "check"))))))
12471 (home-page "https://liw.fi/ttystatus/")
12472 (synopsis "Python library for showing progress reporting and
12473 status updates on terminals")
12474 (description "@code{python2-ttystatus} is a python library for
12475 showing progress reporting and status updates on terminals, for
12476 command line programs. Output is automatically adapted to the width
12477 of the terminal: truncated if it does not fit, and resized if the
12478 terminal size changes.")
12479 (license license:gpl3+)))
12480
12481 (define-public python2-tracing
12482 (package
12483 (name "python2-tracing")
12484 (version "0.10")
12485 (source
12486 (origin
12487 (method url-fetch)
12488 (uri (string-append
12489 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
12490 version ".tar.gz"))
12491 (sha256
12492 (base32
12493 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
12494 (build-system python-build-system)
12495 (arguments
12496 `(#:python ,python-2))
12497 (home-page "https://liw.fi/tracing/")
12498 (synopsis "Python debug logging helper")
12499 (description "@code{python2-tracing} is a python library for
12500 logging debug messages. It provides a way to turn debugging messages
12501 on and off, based on the filename they occur in. It is much faster
12502 than using @code{logging.Filter} to accomplish the same thing, which
12503 matters when code is run in production mode. The actual logging still
12504 happens using the @code{logging} library.")
12505 (license license:gpl3+)))
12506
12507 (define-public python2-larch
12508 (package
12509 (name "python2-larch")
12510 (version "1.20151025")
12511 (source
12512 (origin
12513 (method url-fetch)
12514 (uri (string-append
12515 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12516 version ".tar.gz"))
12517 (patches (search-patches
12518 "python2-larch-coverage-4.0a6-compatibility.patch"))
12519 (sha256
12520 (base32
12521 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12522 (build-system python-build-system)
12523 (arguments
12524 `(#:python ,python-2
12525 #:phases
12526 (modify-phases %standard-phases
12527 ;; check phase needs to be run before the build phase. If not,
12528 ;; coverage-test-runner looks for tests for the built source files,
12529 ;; and fails.
12530 (delete 'check)
12531 (add-before 'build 'check
12532 (lambda _ (invoke "make" "check"))))))
12533 (native-inputs
12534 `(("cmdtest" ,cmdtest)
12535 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12536 (propagated-inputs
12537 `(("python2-tracing" ,python2-tracing)))
12538 (home-page "https://liw.fi/larch/")
12539 (synopsis "Python copy-on-write B-tree library")
12540 (description "@code{python2-larch} is an implementation of
12541 particular kind of B-tree, based on research by Ohad Rodeh. See
12542 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12543 on the data structure.
12544
12545 The distinctive feature of this B-tree is that a node is never
12546 (conceptually) modified. Instead, all updates are done by
12547 copy-on-write. This makes it easy to clone a tree, and modify only the
12548 clone, while other processes access the original tree.")
12549 (license license:gpl3+)))
12550
12551 (define-public python-astroid
12552 (package
12553 (name "python-astroid")
12554 (version "2.3.3")
12555 (source
12556 (origin
12557 (method url-fetch)
12558 (uri (pypi-uri "astroid" version))
12559 (sha256
12560 (base32 "0fnibsl2cb5mvzbfm7sycj85smx48f8w8m7ks1sqlmpr9ps0gski"))))
12561 (build-system python-build-system)
12562 (propagated-inputs
12563 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12564 ("python-six" ,python-six)
12565 ("python-typed-ast" ,python-typed-ast)
12566 ("python-wrapt" ,python-wrapt)))
12567 (native-inputs
12568 `(("python-dateutil" ,python-dateutil)
12569 ("python-nose" ,python-nose)
12570 ("python-pytest" ,python-pytest)
12571 ("python-pytest-runner" ,python-pytest-runner)))
12572 (arguments
12573 `(#:phases
12574 (modify-phases %standard-phases
12575 (add-after 'unpack 'remove-spurious-test
12576 (lambda _
12577 ;; This can be removed after upgrading from python-3.7
12578 ;; https://github.com/PyCQA/astroid/issues/593
12579 ;; https://bugs.python.org/issue34056
12580 (delete-file "astroid/tests/unittest_modutils.py")
12581 #t))
12582 (replace 'check
12583 (lambda _
12584 (invoke "pytest" "astroid"))))))
12585 (home-page "https://github.com/PyCQA/astroid")
12586 (synopsis "Common base representation of python source code for pylint and
12587 other projects")
12588 (description "@code{python-astroid} provides a common base representation
12589 of python source code for projects such as pychecker, pyreverse, pylint, etc.
12590
12591 It provides a compatible representation which comes from the _ast module. It
12592 rebuilds the tree generated by the builtin _ast module by recursively walking
12593 down the AST and building an extended ast. The new node classes have
12594 additional methods and attributes for different usages. They include some
12595 support for static inference and local name scopes. Furthermore, astroid
12596 builds partial trees by inspecting living objects.")
12597 (license license:lgpl2.1+)
12598 (properties `((python2-variant . ,(delay python2-astroid))))))
12599
12600 (define-public python2-astroid
12601 (let ((base (package-with-python2
12602 (strip-python2-variant python-astroid))))
12603 (package (inherit base)
12604 ;; Version 2.x removes python2 support.
12605 (version "1.6.5")
12606 (source
12607 (origin
12608 (method url-fetch)
12609 (uri (pypi-uri "astroid" version))
12610 (sha256
12611 (base32
12612 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12613 (arguments
12614 (substitute-keyword-arguments (package-arguments base)
12615 ((#:phases phases)
12616 `(modify-phases ,phases
12617 (add-after 'unpack 'remove-spurious-test
12618 (lambda _
12619 ;; https://github.com/PyCQA/astroid/issues/276
12620 (delete-file "astroid/tests/unittest_brain.py")
12621 #t))
12622 (replace 'check
12623 (lambda _
12624 (invoke"python" "-m" "unittest" "discover"
12625 "-p" "unittest*.py")))))))
12626 (native-inputs `())
12627 (propagated-inputs
12628 `(("python2-backports-functools-lru-cache"
12629 ,python2-backports-functools-lru-cache)
12630 ("python2-enum34" ,python2-enum34)
12631 ("python2-singledispatch" ,python2-singledispatch)
12632 ,@(alist-delete "python-typed-ast"
12633 (package-propagated-inputs base)))))))
12634
12635 (define-public python-isort
12636 (package
12637 (name "python-isort")
12638 (version "4.3.4")
12639 (source
12640 (origin
12641 (method git-fetch)
12642 (uri (git-reference
12643 ;; Tests pass only from the Github sources
12644 (url "https://github.com/timothycrosley/isort")
12645 (commit version)))
12646 (file-name (git-file-name name version))
12647 (sha256
12648 (base32
12649 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
12650 (build-system python-build-system)
12651 (native-inputs
12652 `(("python-mock" ,python-mock)
12653 ("python-pytest" ,python-pytest)))
12654 (home-page "https://github.com/timothycrosley/isort")
12655 (synopsis "Python utility/library to sort python imports")
12656 (description "@code{python-isort} is a python utility/library to sort
12657 imports alphabetically, and automatically separated into sections. It
12658 provides a command line utility, a python library and plugins for various
12659 editors.")
12660 (license license:expat)
12661 (properties `((python2-variant . ,(delay python2-isort))))))
12662
12663 (define-public python2-isort
12664 (let ((base (package-with-python2
12665 (strip-python2-variant python-isort))))
12666 (package (inherit base)
12667 (native-inputs
12668 `(("python2-futures" ,python2-futures)
12669 ,@(package-native-inputs base))))))
12670
12671 (define-public python2-backports-functools-lru-cache
12672 (package
12673 (name "python2-backports-functools-lru-cache")
12674 (version "1.5")
12675 (source
12676 (origin
12677 (method url-fetch)
12678 ;; only the pypi tarballs contain the necessary metadata
12679 (uri (pypi-uri "backports.functools_lru_cache" version))
12680 (sha256
12681 (base32
12682 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12683 (build-system python-build-system)
12684 (native-inputs
12685 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12686 (arguments
12687 `(#:python ,python-2))
12688 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12689 (synopsis "Backport of functools.lru_cache from Python 3.3")
12690 (description "@code{python2-backports-functools-lru-cache} is a backport
12691 of @code{functools.lru_cache} from python 3.3.")
12692 (license license:expat)))
12693
12694 (define-public python-configparser
12695 (package
12696 (name "python-configparser")
12697 (version "3.7.1")
12698 (source
12699 (origin
12700 (method url-fetch)
12701 (uri (pypi-uri "configparser" version))
12702 (sha256
12703 (base32
12704 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
12705 (build-system python-build-system)
12706 (home-page "https://github.com/jaraco/configparser/")
12707 (synopsis "Backport of configparser from python 3.5")
12708 (description "@code{python-configparser} is a backport of
12709 @code{configparser} from Python 3.5 so that it can be used directly
12710 in other versions.")
12711 (license license:expat)))
12712
12713 (define-public python2-configparser
12714 (package-with-python2 python-configparser))
12715
12716 (define-public python-mando
12717 (package
12718 (name "python-mando")
12719 (version "0.6.4")
12720 (source (origin
12721 (method url-fetch)
12722 (uri (pypi-uri "mando" version))
12723 (sha256
12724 (base32
12725 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12726 (build-system python-build-system)
12727 (propagated-inputs
12728 `(("python-rst2ansi" ,python-rst2ansi)
12729 ("python-six" ,python-six)))
12730 (native-inputs
12731 `(("python-pytest" ,python-pytest)))
12732 (home-page "https://mando.readthedocs.org/")
12733 (synopsis
12734 "Wrapper around argparse, allowing creation of complete CLI applications")
12735 (description
12736 "This package is a wrapper around argparse, allowing you to write complete CLI
12737 applications in seconds while maintaining all the flexibility.")
12738 (license license:expat)))
12739
12740 (define-public python2-mando
12741 (package-with-python2 python-mando))
12742
12743 (define-public python2-argparse
12744 (package
12745 (name "python2-argparse")
12746 (version "1.4.0")
12747 (source
12748 (origin
12749 (method url-fetch)
12750 (uri (pypi-uri "argparse" version))
12751 (sha256
12752 (base32
12753 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12754 (build-system python-build-system)
12755 (arguments
12756 `(#:python ,python-2))
12757 (home-page "https://github.com/ThomasWaldmann/argparse/")
12758 (synopsis "Python command-line parsing library")
12759 (description
12760 "This package is mostly for people who want to have @code{argparse} on
12761 older Pythons because it was not part of the standard library back then.")
12762 (license license:psfl)))
12763
12764 (define-public python-fudge
12765 (package
12766 (name "python-fudge")
12767 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
12768 ;; package, which is currently the only use of this package.
12769 (version "0.9.6")
12770 (source
12771 (origin
12772 (method url-fetch)
12773 (uri (pypi-uri "fudge" version))
12774 (sha256
12775 (base32
12776 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
12777 (build-system python-build-system)
12778 (arguments
12779 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
12780 (home-page "https://github.com/fudge-py/fudge")
12781 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
12782 (description
12783 "Fudge is a Python module for using fake objects (mocks and stubs) to
12784 test real ones.
12785
12786 In readable Python code, you declare the methods available on your fake object
12787 and how they should be called. Then you inject that into your application and
12788 start testing. This declarative approach means you don’t have to record and
12789 playback actions and you don’t have to inspect your fakes after running code.
12790 If the fake object was used incorrectly then you’ll see an informative
12791 exception message with a traceback that points to the culprit.")
12792 (license license:expat)))
12793
12794 (define-public python2-fudge
12795 (package-with-python2 python-fudge))
12796
12797 (define-public python-mwclient
12798 (package
12799 (name "python-mwclient")
12800 (version "0.8.4")
12801 (source
12802 (origin
12803 (method url-fetch)
12804 ;; The PyPI version wouldn't contain tests.
12805 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
12806 "v" version ".tar.gz"))
12807 (file-name (string-append name "-" version ".tar.gz"))
12808 (sha256
12809 (base32
12810 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
12811 (build-system python-build-system)
12812 (propagated-inputs
12813 `(("python-requests" ,python-requests)
12814 ("python-requests-oauthlib"
12815 ,python-requests-oauthlib)
12816 ("python-six" ,python-six)))
12817 (native-inputs
12818 `(("python-mock" ,python-mock)
12819 ("python-pytest" ,python-pytest)
12820 ("python-pytest-pep8" ,python-pytest-pep8)
12821 ("python-pytest-cache" ,python-pytest-cache)
12822 ("python-pytest-cov" ,python-pytest-cov)
12823 ("python-responses" ,python-responses)))
12824 (home-page "https://github.com/btongminh/mwclient")
12825 (synopsis "MediaWiki API client")
12826 (description "This package provides a MediaWiki API client.")
12827 (license license:expat)))
12828
12829 (define-public python2-mwclient
12830 (package-with-python2 python-mwclient))
12831
12832 (define-public python-utils
12833 (package
12834 (name "python-utils")
12835 (version "2.1.0")
12836 (source (origin
12837 (method url-fetch)
12838 (uri (pypi-uri "python-utils" version))
12839 (sha256
12840 (base32
12841 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
12842 (build-system python-build-system)
12843 (native-inputs
12844 `(("pytest-runner" ,python-pytest-runner)
12845 ("pytest" ,python-pytest)
12846 ("six" ,python-six)))
12847 (home-page "https://github.com/WoLpH/python-utils")
12848 (synopsis "Convenient utilities not included with the standard Python install")
12849 (description
12850 "Python Utils is a collection of small Python functions and classes which
12851 make common patterns shorter and easier.")
12852 (license license:bsd-2)))
12853
12854 (define-public python2-utils
12855 (package-with-python2 python-utils))
12856
12857 (define-public python-diff-match-patch
12858 (package
12859 (name "python-diff-match-patch")
12860 (version "20121119")
12861 (source
12862 (origin
12863 (method url-fetch)
12864 (uri (pypi-uri "diff-match-patch" version))
12865 (sha256
12866 (base32
12867 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
12868 (build-system python-build-system)
12869 (home-page "https://code.google.com/p/google-diff-match-patch")
12870 (synopsis "Synchronize plain text")
12871 (description "Diff Match and Patch libraries offer robust algorithms to
12872 perform the operations required for synchronizing plain text.")
12873 (license license:asl2.0)))
12874
12875 (define-public python2-diff-match-patch
12876 (package-with-python2 python-diff-match-patch))
12877
12878 (define-public python-dirsync
12879 (package
12880 (name "python-dirsync")
12881 (version "2.2.3")
12882 (source
12883 (origin
12884 (method url-fetch)
12885 (uri (pypi-uri "dirsync" version))
12886 (sha256
12887 (base32
12888 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
12889 (build-system python-build-system)
12890 (propagated-inputs
12891 `(("six" ,python-six)))
12892 (home-page "https://bitbucket.org/tkhyn/dirsync")
12893 (synopsis "Advanced directory tree synchronisation tool")
12894 (description "Advanced directory tree synchronisation tool.")
12895 (license license:expat)))
12896
12897 (define-public python2-dirsync
12898 (package-with-python2 python-dirsync))
12899
12900 (define-public python-levenshtein
12901 (package
12902 (name "python-levenshtein")
12903 (version "0.12.0")
12904 (source
12905 (origin
12906 (method url-fetch)
12907 (uri (pypi-uri "python-Levenshtein" version))
12908 (sha256
12909 (base32
12910 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
12911 (build-system python-build-system)
12912 (home-page "https://github.com/ztane/python-Levenshtein")
12913 (synopsis "Fast computation of Levenshtein distance and string similarity")
12914 (description
12915 "The Levenshtein Python C extension module contains functions for fast computation of
12916 @enumerate
12917 @item Levenshtein (edit) distance, and edit operations
12918 @item string similarity
12919 @item approximate median strings, and generally string averaging
12920 @item string sequence and set similarity
12921 @end enumerate
12922 It supports both normal and Unicode strings.")
12923 (license license:gpl2+)))
12924
12925 (define-public python2-levenshtein
12926 (package-with-python2 python-levenshtein))
12927
12928 (define-public python-scandir
12929 (package
12930 (name "python-scandir")
12931 (version "1.9.0")
12932 (source
12933 (origin
12934 (method url-fetch)
12935 (uri (pypi-uri "scandir" version))
12936 (sha256
12937 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
12938 (build-system python-build-system)
12939 (arguments
12940 `(#:phases (modify-phases %standard-phases
12941 (replace 'check
12942 (lambda _
12943 (invoke "python" "test/run_tests.py"))))))
12944 (home-page "https://github.com/benhoyt/scandir")
12945 (synopsis "Directory iteration function")
12946 (description
12947 "Directory iteration function like os.listdir(), except that instead of
12948 returning a list of bare filenames, it yields DirEntry objects that include
12949 file type and stat information along with the name. Using scandir() increases
12950 the speed of os.walk() by 2-20 times (depending on the platform and file
12951 system) by avoiding unnecessary calls to os.stat() in most cases.
12952
12953 This package is part of the Python standard library since version 3.5.")
12954 (license license:bsd-3)))
12955
12956 (define-public python2-scandir
12957 (package-with-python2 python-scandir))
12958
12959 (define-public python2-stemming
12960 (package
12961 (name "python2-stemming")
12962 (version "1.0.1")
12963 (source
12964 (origin
12965 (method url-fetch)
12966 (uri (pypi-uri "stemming" version))
12967 (sha256
12968 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
12969 (build-system python-build-system)
12970 (arguments
12971 `(#:python ,python-2))
12972 (home-page "https://bitbucket.org/mchaput/stemming/overview")
12973 (synopsis "Python implementations of various stemming algorithms")
12974 (description
12975 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
12976 stemming algorithms for English. These implementations are straightforward and
12977 efficient, unlike some Python versions of the same algorithms available on the
12978 Web. This package is an extraction of the stemming code included in the Whoosh
12979 search engine.")
12980 (license license:public-domain)))
12981
12982 (define-public python-factory-boy
12983 (package
12984 (name "python-factory-boy")
12985 (version "2.8.1")
12986 (source
12987 (origin
12988 (method url-fetch)
12989 (uri (pypi-uri "factory_boy" version))
12990 (sha256
12991 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
12992 (build-system python-build-system)
12993 (arguments
12994 ;; Tests are not included in the tarball.
12995 `(#:tests? #f))
12996 (propagated-inputs
12997 `(("faker" ,python-faker)))
12998 (home-page "https://github.com/benhoyt/scandir")
12999 (synopsis "Versatile test fixtures replacement")
13000 (description
13001 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
13002
13003 As a fixtures replacement tool, it aims to replace static, hard to maintain
13004 fixtures with easy-to-use factories for complex object.
13005
13006 Instead of building an exhaustive test setup with every possible combination
13007 of corner cases, factory_boy allows you to use objects customized for the
13008 current test, while only declaring the test-specific fields")
13009 (license license:expat)))
13010
13011 (define-public python2-factory-boy
13012 (package-with-python2 python-factory-boy))
13013
13014 (define-public python-translate-toolkit
13015 (package
13016 (name "python-translate-toolkit")
13017 (version "2.1.0")
13018 (source
13019 (origin
13020 (method url-fetch)
13021 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
13022 (sha256
13023 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
13024 (build-system python-build-system)
13025 (native-inputs
13026 `(("python-pytest" ,python-pytest)
13027 ("python-sphinx" ,python-sphinx)))
13028 (propagated-inputs
13029 `(("python-babel" ,python-babel)
13030 ("python-beautifulsoup4" ,python-beautifulsoup4)
13031 ("python-chardet" ,python-chardet)
13032 ("python-diff-match-patch" ,python-diff-match-patch)
13033 ("python-levenshtein" ,python-levenshtein)
13034 ("python-lxml" ,python-lxml)
13035 ("python-six" ,python-six)
13036 ("python-vobject" ,python-vobject)
13037 ("python-pyyaml" ,python-pyyaml)))
13038 (arguments
13039 ;; TODO: tests are not run, because they end with
13040 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
13041 ;; 'parse_funcs'
13042 ;; during test setup.
13043 `(#:tests? #f))
13044 (home-page "https://toolkit.translatehouse.org")
13045 (synopsis "Tools and API for translation and localization engineering")
13046 (description
13047 "Tools and API for translation and localization engineering. It contains
13048 several utilities, as well as an API for building localization tools.")
13049 (license license:gpl2+)))
13050
13051 (define-public python2-translate-toolkit
13052 (package-with-python2 python-translate-toolkit))
13053
13054 (define-public python-packaging
13055 (package
13056 (name "python-packaging")
13057 (version "19.2")
13058 (source
13059 (origin
13060 (method url-fetch)
13061 (uri (pypi-uri "packaging" version))
13062 (sha256
13063 (base32
13064 "0izwlz9h0bw171a1chr311g2y7n657zjaf4mq4rgm8pp9lbj9f98"))))
13065 (build-system python-build-system)
13066 (arguments
13067 `(#:phases (modify-phases %standard-phases
13068 (replace 'check
13069 (lambda _ (invoke "py.test" "-vv"))))))
13070 (native-inputs
13071 `(("python-pretend" ,python-pretend)
13072 ("python-pytest" ,python-pytest)))
13073 (propagated-inputs
13074 `(("python-pyparsing" ,python-pyparsing)
13075 ("python-six" ,python-six)))
13076 (home-page "https://github.com/pypa/packaging")
13077 (synopsis "Core utilities for Python packages")
13078 (description "Packaging is a Python module for dealing with Python packages.
13079 It offers an interface for working with package versions, names, and dependency
13080 information.")
13081 ;; From 'LICENSE': This software is made available under the terms of
13082 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
13083 ;; Contributions to this software is made under the terms of *both* these
13084 ;; licenses.
13085 (license (list license:asl2.0 license:bsd-2))))
13086
13087 (define-public python2-packaging
13088 (package-with-python2 python-packaging))
13089
13090 (define-public python-relatorio
13091 (package
13092 (name "python-relatorio")
13093 (version "0.8.0")
13094 (source
13095 (origin
13096 (method url-fetch)
13097 (uri (pypi-uri "relatorio" version))
13098 (sha256
13099 (base32
13100 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
13101 (build-system python-build-system)
13102 (propagated-inputs
13103 `(("python-lxml" ,python-lxml)
13104 ("python-genshi" ,python-genshi)))
13105 (native-inputs
13106 `(("python-magic" ,python-magic)))
13107 (home-page "https://relatorio.tryton.org/")
13108 (synopsis "Templating library able to output ODT and PDF files")
13109 (description "Relatorio is a templating library which provides a way to
13110 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
13111 for more filetypes can be easily added by creating plugins for them.")
13112 (license license:gpl3+)))
13113
13114 (define-public python2-relatorio
13115 (package-with-python2 python-relatorio))
13116
13117 (define-public python-radon
13118 (package
13119 (name "python-radon")
13120 (version "2.2.0")
13121 (source
13122 (origin
13123 (method url-fetch)
13124 (uri (pypi-uri "radon" version))
13125 (sha256
13126 (base32
13127 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
13128 (build-system python-build-system)
13129 (arguments
13130 `(#:phases (modify-phases %standard-phases
13131 (replace 'check
13132 (lambda _
13133 (invoke "python" "radon/tests/run.py"))))))
13134 (propagated-inputs
13135 `(("python-colorama" ,python-colorama)
13136 ("python-flake8-polyfill" ,python-flake8-polyfill)
13137 ("python-mando" ,python-mando)))
13138 (native-inputs
13139 `(("python-pytest" ,python-pytest)
13140 ("python-pytest-mock" ,python-pytest-mock)))
13141 (home-page "https://radon.readthedocs.org/")
13142 (synopsis "Code Metrics in Python")
13143 (description "Radon is a Python tool which computes various code metrics.
13144 Supported metrics are:
13145 @itemize @bullet
13146 @item raw metrics: SLOC, comment lines, blank lines, &c.
13147 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
13148 @item Halstead metrics (all of them)
13149 @item the Maintainability Index (a Visual Studio metric)
13150 @end itemize")
13151 (license license:expat)))
13152
13153 (define-public python2-radon
13154 (package-with-python2 python-radon))
13155
13156 (define-public python-sure
13157 (package
13158 (name "python-sure")
13159 (version "1.4.11")
13160 (source
13161 (origin
13162 (method url-fetch)
13163 (uri (pypi-uri "sure" version))
13164 (sha256
13165 (base32
13166 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
13167 (build-system python-build-system)
13168 (propagated-inputs
13169 `(("python-mock" ,python-mock)
13170 ("python-six" ,python-six)))
13171 (native-inputs
13172 `(("python-nose" ,python-nose)))
13173 (home-page "https://github.com/gabrielfalcao/sure")
13174 (synopsis "Automated testing library in python for python")
13175 (description
13176 "Sure is a python library that leverages a DSL for writing assertions.
13177 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
13178 (license license:gpl3+)))
13179
13180 (define-public python2-sure
13181 (package-with-python2 python-sure))
13182
13183 (define-public python2-couleur
13184 ;; This package does not seem to support python3 at all, hence,
13185 ;; only the python2 variant definition is provided.
13186 (package
13187 (name "python2-couleur")
13188 (version "0.6.2")
13189 (source
13190 (origin
13191 (method url-fetch)
13192 (uri (pypi-uri "couleur" version))
13193 (sha256
13194 (base32
13195 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
13196 (build-system python-build-system)
13197 (arguments
13198 `(#:python ,python-2))
13199 (home-page "https://github.com/gabrielfalcao/couleur")
13200 (synopsis
13201 "ANSI terminal tool for python, colored shell and other handy fancy features")
13202 (description
13203 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
13204 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
13205 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
13206 ;; https://github.com/gabrielfalcao/couleur/issues/11
13207 (license license:lgpl3+)))
13208
13209 (define-public python-misaka
13210 (package
13211 (name "python-misaka")
13212 (version "2.1.1")
13213 (source
13214 (origin
13215 (method url-fetch)
13216 (uri (pypi-uri "misaka" version))
13217 (sha256
13218 (base32
13219 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
13220 (build-system python-build-system)
13221 (arguments
13222 `(;; Line 37 of setup.py calls self.run_command('develop')
13223 ;; in the 'check' phase. This command seems to be trying
13224 ;; to write to
13225 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
13226 ;; for which it does not have the permission to write.
13227 #:tests? #f))
13228 (propagated-inputs
13229 `(("python-cffi" ,python-cffi)))
13230 (home-page "https://github.com/FSX/misaka")
13231 (synopsis "Python binding for Hoedown")
13232 (description
13233 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
13234 library written in C. It features a fast HTML renderer and functionality to make custom
13235 renderers (e.g. man pages or LaTeX).")
13236 (license license:expat)))
13237
13238 (define-public python2-misaka
13239 (package-with-python2 python-misaka))
13240
13241 (define-public python2-steadymark
13242 ;; This is forced into being a python2 only variant
13243 ;; due to its dependence on couleur that has no support
13244 ;; for python3
13245 (package
13246 (name "python2-steadymark")
13247 (version "0.7.3")
13248 (source
13249 (origin
13250 (method url-fetch)
13251 (uri (pypi-uri "steadymark" version))
13252 (sha256
13253 (base32
13254 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
13255 (build-system python-build-system)
13256 (native-inputs
13257 `(("python-couleur" ,python2-couleur)
13258 ("python-sure" ,python2-sure)
13259 ("python-misaka" ,python2-misaka)))
13260 (arguments
13261 `(#:python ,python-2
13262 #:phases
13263 (modify-phases %standard-phases
13264 (add-before 'build 'patch-setup-py
13265 (lambda _
13266 ;; Update requirements from dependency==version
13267 ;; to dependency>=version
13268 (substitute* "setup.py"
13269 (("==") ">="))
13270 #t)))))
13271 (home-page "https://github.com/gabrielfalcao/steadymark")
13272 (synopsis "Markdown-based test runner for python")
13273 (description
13274 "@code{Steadymark} allows documentation to be written in github-flavoured
13275 markdown. The documentation may contain snippets of code surrounded by python
13276 code blocks and @code{Steadymark} will find these snippets and run them, making
13277 sure that there are no old malfunctional examples in the documentation examples.")
13278 (license license:expat)))
13279
13280 (define-public python-jsonpointer
13281 (package
13282 (name "python-jsonpointer")
13283 (version "1.10")
13284 (source
13285 (origin
13286 (method url-fetch)
13287 (uri (pypi-uri "jsonpointer" version))
13288 (sha256
13289 (base32
13290 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
13291 (build-system python-build-system)
13292 (home-page "https://github.com/stefankoegl/python-json-pointer")
13293 (synopsis "Identify specific nodes in a JSON document")
13294 (description "@code{jsonpointer} allows you to access specific nodes
13295 by path in a JSON document (see RFC 6901).")
13296 (license license:bsd-3)))
13297
13298 (define-public python2-jsonpointer
13299 (package-with-python2 python-jsonpointer))
13300
13301 (define-public python-jsonpatch
13302 (package
13303 (name "python-jsonpatch")
13304 (version "1.16")
13305 (source
13306 (origin
13307 (method url-fetch)
13308 ;; pypi version lacks tests.js
13309 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
13310 "archive/v" version ".tar.gz"))
13311 (file-name (string-append name "-" version ".tar.gz"))
13312 (sha256
13313 (base32
13314 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
13315 (build-system python-build-system)
13316 (native-inputs
13317 `(("python-jsonpointer" ,python-jsonpointer)))
13318 (home-page "https://github.com/stefankoegl/python-json-patch")
13319 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
13320 (description "@code{jsonpatch} is a library and program that allows
13321 applying JSON Patches according to RFC 6902.")
13322 (license license:bsd-3)))
13323
13324 (define-public python2-jsonpatch
13325 (package-with-python2 python-jsonpatch))
13326
13327 (define-public python-jsonpatch-0.4
13328 (package (inherit python-jsonpatch)
13329 (name "python-jsonpatch")
13330 (version "0.4")
13331 (source
13332 (origin
13333 (method url-fetch)
13334 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
13335 "archive/v" version ".tar.gz"))
13336 (file-name (string-append name "-" version ".tar.gz"))
13337 (sha256
13338 (base32
13339 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
13340
13341 (define-public python2-jsonpatch-0.4
13342 (package-with-python2 python-jsonpatch-0.4))
13343
13344 (define-public python-rfc3986
13345 (package
13346 (name "python-rfc3986")
13347 (version "1.1.0")
13348 (source (origin
13349 (method url-fetch)
13350 (uri (pypi-uri "rfc3986" version))
13351 (sha256
13352 (base32
13353 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
13354 (build-system python-build-system)
13355 (arguments
13356 `(#:modules ((guix build utils)
13357 (guix build python-build-system)
13358 (ice-9 ftw)
13359 (srfi srfi-1)
13360 (srfi srfi-26))
13361 #:phases
13362 (modify-phases %standard-phases
13363 (replace 'check
13364 (lambda _
13365 (let ((cwd (getcwd)))
13366 (setenv "PYTHONPATH"
13367 (string-append cwd "/build/"
13368 (find (cut string-prefix? "lib" <>)
13369 (scandir (string-append cwd "/build")))
13370 ":"
13371 (getenv "PYTHONPATH")))
13372 (invoke "pytest" "-v")))))))
13373 (native-inputs
13374 `(("python-pytest" ,python-pytest)))
13375 (home-page "https://rfc3986.readthedocs.io/")
13376 (synopsis "Parse and validate URI references")
13377 (description
13378 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
13379 validation and authority parsing. This module also supports RFC@tie{}6874
13380 which adds support for zone identifiers to IPv6 addresses.")
13381 (license license:asl2.0)))
13382
13383 (define-public python2-rfc3986
13384 (package-with-python2 python-rfc3986))
13385
13386 (define-public python-rfc3987
13387 (package
13388 (name "python-rfc3987")
13389 (version "1.3.7")
13390 (source
13391 (origin
13392 (method url-fetch)
13393 (uri (pypi-uri "rfc3987" version))
13394 (sha256
13395 (base32
13396 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
13397 (build-system python-build-system)
13398 (home-page "https://pypi.python.org/pypi/rfc3987")
13399 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
13400 (description "@code{rfc3987} provides routines for parsing and
13401 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
13402 (license license:gpl3+)))
13403
13404 (define-public python2-rfc3987
13405 (package-with-python2 python-rfc3987))
13406
13407 (define-public python-validate-email
13408 (package
13409 (name "python-validate-email")
13410 (version "1.3")
13411 (source
13412 (origin
13413 (method url-fetch)
13414 (uri (pypi-uri "validate_email" version))
13415 (sha256
13416 (base32
13417 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
13418 (build-system python-build-system)
13419 (home-page "https://github.com/syrusakbary/validate_email")
13420 (synopsis "Verifies if an email address is valid and really exists")
13421 (description "@code{validate_email} can be used to verify if an email
13422 address is valid and really exists.")
13423 (license license:lgpl3+)))
13424
13425 (define-public python2-validate-email
13426 (package-with-python2 python-validate-email))
13427
13428 (define-public python-flex
13429 (package
13430 (name "python-flex")
13431 (version "6.10.0")
13432 (source
13433 (origin
13434 (method url-fetch)
13435 (uri (pypi-uri "flex" version))
13436 (sha256
13437 (base32
13438 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
13439 (build-system python-build-system)
13440 (propagated-inputs
13441 `(("python-click" ,python-click)
13442 ("python-iso8601" ,python-iso8601)
13443 ("python-jsonpointer" ,python-jsonpointer)
13444 ("python-pyyaml" ,python-pyyaml)
13445 ("python-requests" ,python-requests)
13446 ("python-rfc3987" ,python-rfc3987)
13447 ("python-six" ,python-six)
13448 ("python-validate-email" ,python-validate-email)))
13449 (home-page "https://github.com/pipermerriam/flex")
13450 (synopsis "Validates Swagger schemata")
13451 (description "@code{flex} can be used to validate Swagger schemata.")
13452 (license license:bsd-3)))
13453
13454 (define-public python2-flex
13455 (package-with-python2 python-flex))
13456
13457 (define-public python-marshmallow
13458 (package
13459 (name "python-marshmallow")
13460 (version "3.0.0b14")
13461 (source
13462 (origin
13463 (method url-fetch)
13464 (uri (pypi-uri "marshmallow" version))
13465 (sha256
13466 (base32
13467 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
13468 (build-system python-build-system)
13469 (propagated-inputs
13470 `(("python-dateutil" ,python-dateutil)
13471 ("python-simplejson" ,python-simplejson)))
13472 (native-inputs
13473 `(("python-pytest" ,python-pytest)
13474 ("python-pytz" ,python-pytz)))
13475 (home-page "https://github.com/marshmallow-code/marshmallow")
13476 (synopsis "Convert complex datatypes to and from native
13477 Python datatypes.")
13478 (description "@code{marshmallow} provides a library for converting
13479 complex datatypes to and from native Python datatypes.")
13480 (license license:expat)))
13481
13482 (define-public python2-marshmallow
13483 (package-with-python2 python-marshmallow))
13484
13485 (define-public python-apispec
13486 (package
13487 (name "python-apispec")
13488 (version "0.25.3")
13489 (source
13490 (origin
13491 (method url-fetch)
13492 (uri (pypi-uri "apispec" version))
13493 (sha256
13494 (base32
13495 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
13496 (build-system python-build-system)
13497 (propagated-inputs
13498 `(("python-pyyaml" ,python-pyyaml)))
13499 (native-inputs
13500 `(("python-pytest" ,python-pytest)
13501 ("python-flask" ,python-flask)
13502 ("python-marshmallow" ,python-marshmallow)
13503 ("python-tornado" ,python-tornado)
13504 ("python-bottle" ,python-bottle)
13505 ("python-mock" ,python-mock)))
13506 (home-page "https://github.com/marshmallow-code/apispec")
13507 (synopsis "Swagger 2.0 API specification generator")
13508 (description "@code{python-apispec} is a pluggable API specification
13509 generator. Currently supports the OpenAPI specification (f.k.a.
13510 Swagger 2.0).")
13511 (license license:expat)))
13512
13513 (define-public python2-apispec
13514 (package-with-python2 python-apispec))
13515
13516 (define-public python-flasgger
13517 (package
13518 (name "python-flasgger")
13519 (version "0.6.3")
13520 (source
13521 (origin
13522 (method git-fetch)
13523 (uri (git-reference
13524 (url "https://github.com/rochacbruno/flasgger.git")
13525 (commit version)))
13526 (file-name (git-file-name name version))
13527 (sha256
13528 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
13529 (build-system python-build-system)
13530 (arguments
13531 `(#:phases
13532 (modify-phases %standard-phases
13533 (replace 'check
13534 (lambda* (#:key inputs outputs #:allow-other-keys)
13535 (substitute* "Makefile"
13536 (("flake8 flasgger --ignore=F403")
13537 "flake8 flasgger --ignore=E731,F403"))
13538 (setenv "PYTHONPATH" (string-append (getcwd)
13539 ":"
13540 (getenv "PYTHONPATH")))
13541 (invoke "py.test"))))))
13542 (propagated-inputs
13543 `(("python-flask" ,python-flask)
13544 ("python-pyyaml" ,python-pyyaml)
13545 ("python-jsonschema" ,python-jsonschema)
13546 ("python-mistune" ,python-mistune)
13547 ("python-six" ,python-six)))
13548 (native-inputs
13549 `(("python-decorator" ,python-decorator)
13550 ("python-flake8" ,python-flake8)
13551 ("python-flask-restful" ,python-flask-restful)
13552 ("python-flex" ,python-flex)
13553 ("python-pytest" ,python-pytest)
13554 ("python-pytest-cov" ,python-pytest-cov)
13555 ("python-marshmallow" ,python-marshmallow)
13556 ("python-apispec" ,python-apispec)))
13557 (home-page "https://github.com/rochacbruno/flasgger/")
13558 (synopsis "Extract Swagger specs from your Flask project")
13559 (description "@code{python-flasgger} allows extracting Swagger specs
13560 from your Flask project. It is a fork of Flask-Swagger.")
13561 (license license:expat)))
13562
13563 (define-public python2-flasgger
13564 (package-with-python2 python-flasgger))
13565
13566 (define-public python-swagger-spec-validator
13567 (package
13568 (name "python-swagger-spec-validator")
13569 (version "2.4.3")
13570 (source
13571 (origin
13572 (method url-fetch)
13573 (uri (pypi-uri "swagger-spec-validator" version))
13574 (sha256
13575 (base32
13576 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
13577 (build-system python-build-system)
13578 (propagated-inputs
13579 `(("python-jsonschema" ,python-jsonschema)
13580 ("python-pyyaml" ,python-pyyaml)
13581 ("python-six" ,python-six)))
13582 (home-page
13583 "https://github.com/Yelp/swagger_spec_validator")
13584 (synopsis "Validation of Swagger specifications")
13585 (description "@code{swagger_spec_validator} provides a library for
13586 validating Swagger API specifications.")
13587 (license license:asl2.0)))
13588
13589 (define-public python2-swagger-spec-validator
13590 (package-with-python2 python-swagger-spec-validator))
13591
13592 (define-public python-apache-libcloud
13593 (package
13594 (name "python-apache-libcloud")
13595 (version "2.4.0")
13596 (source
13597 (origin
13598 (method url-fetch)
13599 (uri (pypi-uri "apache-libcloud" version))
13600 (sha256
13601 (base32
13602 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13603 (build-system python-build-system)
13604 (arguments
13605 `(#:phases
13606 (modify-phases %standard-phases
13607 (add-after 'unpack 'patch-ssh
13608 (lambda* (#:key inputs #:allow-other-keys)
13609 (substitute* "libcloud/compute/ssh.py"
13610 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13611 "/bin/ssh" "'")))
13612 #t))
13613 (add-after 'unpack 'patch-tests
13614 (lambda _
13615 (substitute* "./libcloud/test/test_file_fixtures.py"
13616 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13617 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13618 return (httplib.OK,
13619 \"1234abcd\",
13620 {\"test\": \"value\"},
13621 httplib.responses[httplib.OK])
13622 def _ascii"))
13623 (substitute* "libcloud/test/compute/test_ssh_client.py"
13624 (("class ShellOutSSHClientTests")
13625 "@unittest.skip(\"Guix container doesn't have ssh service\")
13626 class ShellOutSSHClientTests")
13627 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13628 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13629 (("'.xF0', '.x90', '.x8D', '.x88'")
13630 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13631 #t))
13632 (add-before 'check 'copy-secret
13633 (lambda _
13634 (copy-file "libcloud/test/secrets.py-dist"
13635 "libcloud/test/secrets.py")
13636 #t)))))
13637 (inputs
13638 `(("openssh" ,openssh)))
13639 (propagated-inputs
13640 `(("python-paramiko" ,python-paramiko)
13641 ("python-requests" ,python-requests)))
13642 (native-inputs
13643 `(("python-lockfile" ,python-lockfile)
13644 ("python-mock" ,python-mock)
13645 ("python-pytest" ,python-pytest)
13646 ("python-pytest-runner" ,python-pytest-runner)
13647 ("python-requests-mock" ,python-requests-mock)))
13648 (home-page "https://libcloud.apache.org/")
13649 (synopsis "Unified Cloud API")
13650 (description "@code{libcloud} is a Python library for interacting with
13651 many of the popular cloud service providers using a unified API.")
13652 (license license:asl2.0)))
13653
13654 (define-public python2-apache-libcloud
13655 (package-with-python2 python-apache-libcloud))
13656
13657 (define-public python-smmap2
13658 (package
13659 (name "python-smmap2")
13660 (version "2.0.3")
13661 (source
13662 (origin
13663 (method url-fetch)
13664 (uri (pypi-uri "smmap2" version))
13665 (sha256
13666 (base32
13667 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
13668 (build-system python-build-system)
13669 (native-inputs
13670 `(("python-nosexcover" ,python-nosexcover)))
13671 (home-page "https://github.com/Byron/smmap")
13672 (synopsis "Python sliding window memory map manager")
13673 (description "@code{smmap2} is a pure Python implementation of a sliding
13674 window memory map manager.")
13675 (license license:bsd-3)))
13676
13677 (define-public python2-smmap2
13678 (package-with-python2 python-smmap2))
13679
13680 (define-public python-regex
13681 (package
13682 (name "python-regex")
13683 (version "2019.04.14")
13684 (source (origin
13685 (method url-fetch)
13686 (uri (pypi-uri "regex" version))
13687 (sha256
13688 (base32
13689 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
13690 ;; TODO: Fix and enable regex_test.py tests that complain about the
13691 ;; test.support module not existing.
13692 (build-system python-build-system)
13693 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13694 (synopsis "Alternative regular expression module")
13695 (description "This regular expression implementation is backwards-
13696 compatible with the standard @code{re} module, but offers additional
13697 functionality like full case-folding for case-insensitive matches in Unicode.")
13698 (license license:psfl)))
13699
13700 (define-public python2-regex
13701 (package-with-python2 python-regex))
13702
13703 (define-public python2-pyopengl
13704 (package
13705 (name "python2-pyopengl")
13706 (version "3.1.0")
13707 (source
13708 (origin
13709 (method url-fetch)
13710 (uri (pypi-uri "PyOpenGL" version))
13711 (sha256
13712 (base32
13713 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13714 (arguments
13715 `(#:python ,python-2))
13716 (build-system python-build-system)
13717 (home-page "http://pyopengl.sourceforge.net")
13718 (synopsis "Standard OpenGL bindings for Python")
13719 (description
13720 "PyOpenGL is the most common cross platform Python binding to OpenGL and
13721 related APIs. The binding is created using the standard @code{ctypes}
13722 library.")
13723 (license license:bsd-3)))
13724
13725 (define-public python2-pyopengl-accelerate
13726 (package
13727 (inherit python2-pyopengl)
13728 (name "python2-pyopengl-accelerate")
13729 (version "3.1.0")
13730 (source
13731 (origin
13732 (method url-fetch)
13733 (uri (pypi-uri "PyOpenGL-accelerate" version))
13734 (sha256
13735 (base32
13736 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
13737 (synopsis "Acceleration code for PyOpenGL")
13738 (description
13739 "This is the Cython-coded accelerator module for PyOpenGL.")))
13740
13741 (define-public python-rencode
13742 (package
13743 (name "python-rencode")
13744 (version "1.0.5")
13745 (source
13746 (origin
13747 (method url-fetch)
13748 (uri (pypi-uri "rencode" version))
13749 (sha256
13750 (base32
13751 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
13752 (build-system python-build-system)
13753 (arguments
13754 `(#:phases
13755 (modify-phases %standard-phases
13756 (add-before 'check 'delete-bogus-test
13757 ;; This test requires /home/aresch/Downloads, which is not provided by
13758 ;; the build environment.
13759 (lambda _
13760 (delete-file "rencode/t.py")
13761 #t)))))
13762 (native-inputs `(("pkg-config" ,pkg-config)
13763 ("python-cython" ,python-cython)))
13764 (home-page "https://github.com/aresch/rencode")
13765 (synopsis "Serialization of heterogeneous data structures")
13766 (description
13767 "The @code{rencode} module is a data structure serialization library,
13768 similar to @code{bencode} from the BitTorrent project. For complex,
13769 heterogeneous data structures with many small elements, r-encoding stake up
13770 significantly less space than b-encodings. This version of rencode is a
13771 complete rewrite in Cython to attempt to increase the performance over the
13772 pure Python module.")
13773 (license license:bsd-3)))
13774
13775 (define-public python2-rencode
13776 (package-with-python2 python-rencode))
13777
13778 (define-public python-xenon
13779 (package
13780 (name "python-xenon")
13781 (version "0.5.4")
13782 (source
13783 (origin
13784 (method url-fetch)
13785 (uri (pypi-uri "xenon" version))
13786 (sha256
13787 (base32
13788 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
13789 (build-system python-build-system)
13790 (native-inputs
13791 `(("python-pyyaml" ,python-pyyaml)
13792 ("python-radon" ,python-radon)
13793 ("python-requests" ,python-requests)
13794 ("python-flake8" ,python-flake8)
13795 ("python-tox" ,python-tox)))
13796 (arguments
13797 `(#:phases
13798 (modify-phases %standard-phases
13799 (add-before 'build 'patch-test-requirements
13800 (lambda _
13801 ;; Remove httpretty dependency for tests.
13802 (substitute* "setup.py"
13803 (("httpretty") ""))
13804 #t)))))
13805 (home-page "https://xenon.readthedocs.org/")
13806 (synopsis "Monitor code metrics for Python on your CI server")
13807 (description
13808 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
13809 Ideally, @code{xenon} is run every time code is committed. Through command
13810 line options, various thresholds can be set for the complexity of code. It
13811 will fail (i.e. it will exit with a non-zero exit code) when any of these
13812 requirements is not met.")
13813 (license license:expat)))
13814
13815 (define-public python2-xenon
13816 (package-with-python2 python-xenon))
13817
13818 (define-public python-pysocks
13819 (package
13820 (name "python-pysocks")
13821 (version "1.7.0")
13822 (source
13823 (origin
13824 (method url-fetch)
13825 (uri (pypi-uri "PySocks" version))
13826 (sha256
13827 (base32
13828 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
13829 (build-system python-build-system)
13830 (arguments `(#:tests? #f))
13831 (home-page "https://github.com/Anorov/PySocks")
13832 (synopsis "SOCKS client module")
13833 (description "@code{pysocks} is an updated and semi-actively maintained
13834 version of @code{SocksiPy} with bug fixes and extra features.")
13835 (license license:bsd-3)))
13836
13837 (define-public python2-pysocks
13838 (package-with-python2 python-pysocks))
13839
13840 (define-public python-pydiff
13841 (package
13842 (name "python-pydiff")
13843 (version "0.2")
13844 (source
13845 (origin
13846 (method url-fetch)
13847 (uri (pypi-uri "pydiff" version))
13848 (sha256
13849 (base32
13850 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
13851 (build-system python-build-system)
13852 (home-page "https://github.com/myint/pydiff")
13853 (synopsis "Library to diff two Python files at the bytecode level")
13854 (description
13855 "@code{pydiff} makes it easy to look for actual code changes while
13856 ignoring formatting changes.")
13857 (license license:expat)))
13858
13859 (define-public python2-pydiff
13860 (package-with-python2 python-pydiff))
13861
13862 (define-public python-tqdm
13863 (package
13864 (name "python-tqdm")
13865 (version "4.19.6")
13866 (source
13867 (origin
13868 (method url-fetch)
13869 (uri (pypi-uri "tqdm" version))
13870 (sha256
13871 (base32
13872 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
13873 (build-system python-build-system)
13874 (native-inputs
13875 `(("python-flake8" ,python-flake8)
13876 ("python-nose" ,python-nose)
13877 ("python-coverage" ,python-coverage)))
13878 (home-page "https://github.com/tqdm/tqdm")
13879 (synopsis "Fast, extensible progress meter")
13880 (description
13881 "Make loops show a progress bar on the console by just wrapping any
13882 iterable with @code{|tqdm(iterable)|}. Offers many options to define
13883 design and layout.")
13884 (license (list license:mpl2.0 license:expat))
13885 (properties `((python2-variant . ,(delay python2-tqdm))))))
13886
13887 (define-public python2-tqdm
13888 (let ((tqdm (package-with-python2
13889 (strip-python2-variant python-tqdm))))
13890 (package (inherit tqdm)
13891 (native-inputs `(("python2-functools32" ,python2-functools32)
13892 ,@(package-native-inputs tqdm))))))
13893
13894 (define-public python-pkginfo
13895 (package
13896 (name "python-pkginfo")
13897 (version "1.4.2")
13898 (source
13899 (origin
13900 (method url-fetch)
13901 (uri (pypi-uri "pkginfo" version))
13902 (sha256
13903 (base32
13904 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
13905 (build-system python-build-system)
13906 (arguments
13907 ;; The tests are broken upstream.
13908 '(#:tests? #f))
13909 (home-page
13910 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
13911 (synopsis
13912 "Query metadatdata from sdists, bdists, and installed packages")
13913 (description
13914 "API to query the distutils metadata written in @file{PKG-INFO} inside a
13915 source distriubtion (an sdist) or a binary distribution (e.g., created by
13916 running bdist_egg). It can also query the EGG-INFO directory of an installed
13917 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
13918 created by running @code{python setup.py develop}).")
13919 (license license:expat)))
13920
13921 (define-public python2-pkginfo
13922 (package-with-python2 python-pkginfo))
13923
13924 (define-public python-twine
13925 (package
13926 (name "python-twine")
13927 (version "1.9.1")
13928 (source
13929 (origin
13930 (method url-fetch)
13931 (uri (pypi-uri "twine" version))
13932 (sha256
13933 (base32
13934 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
13935 (build-system python-build-system)
13936 (propagated-inputs
13937 `(("python-tqdm" ,python-tqdm)
13938 ("python-pkginfo" ,python-pkginfo)
13939 ("python-requests" ,python-requests)
13940 ("python-requests-toolbelt" ,python-requests-toolbelt)))
13941 (home-page "https://github.com/pypa/twine")
13942 (synopsis "Collection of utilities for interacting with PyPI")
13943 (description
13944 "@code{twine} currently supports registering projects and uploading
13945 distributions. It authenticates the user over HTTPS, allows them to pre-sign
13946 their files and supports any packaging format (including wheels).")
13947 (license license:asl2.0)))
13948
13949 (define-public python2-twine
13950 (package-with-python2 python-twine))
13951
13952 (define-public python-linecache2
13953 (package
13954 (name "python-linecache2")
13955 (version "1.0.0")
13956 (source
13957 (origin
13958 (method url-fetch)
13959 (uri (pypi-uri "linecache2" version))
13960 (sha256
13961 (base32
13962 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
13963 (build-system python-build-system)
13964 (arguments
13965 `(;; The tests depend on unittest2, and our version is a bit too old.
13966 #:tests? #f))
13967 (native-inputs
13968 `(("python-pbr" ,python-pbr-minimal)))
13969 (home-page
13970 "https://github.com/testing-cabal/linecache2")
13971 (synopsis "Backports of the linecache module")
13972 (description
13973 "The linecache module allows one to get any line from any file, while
13974 attempting to optimize internally, using a cache, the common case where many
13975 lines are read from a single file.")
13976 (license license:psfl)))
13977
13978 (define-public python2-linecache2
13979 (package-with-python2 python-linecache2))
13980
13981 (define-public python-traceback2
13982 (package
13983 (name "python-traceback2")
13984 (version "1.4.0")
13985 (source
13986 (origin
13987 (method url-fetch)
13988 (uri (pypi-uri "traceback2" version))
13989 (sha256
13990 (base32
13991 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
13992 (build-system python-build-system)
13993 (arguments
13994 `(;; python-traceback2 and python-unittest2 depend on one another.
13995 #:tests? #f))
13996 (native-inputs
13997 `(("python-pbr" ,python-pbr-minimal)))
13998 (propagated-inputs
13999 `(("python-linecache2" ,python-linecache2)))
14000 (home-page
14001 "https://github.com/testing-cabal/traceback2")
14002 (synopsis "Backports of the traceback module")
14003 (description
14004 "This module provides a standard interface to extract, format and print
14005 stack traces of Python programs. It exactly mimics the behavior of the Python
14006 interpreter when it prints a stack trace.")
14007 (license license:psfl)))
14008
14009 (define-public python2-traceback2
14010 (package-with-python2 python-traceback2))
14011
14012 (define-public python-ratelimiter
14013 (package
14014 (name "python-ratelimiter")
14015 (version "1.2.0")
14016 (source
14017 (origin
14018 (method url-fetch)
14019 (uri (pypi-uri "ratelimiter" version))
14020 (sha256
14021 (base32
14022 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
14023 (build-system python-build-system)
14024 (arguments
14025 '(#:tests? #f)) ; There are no tests in the pypi archive.
14026 (home-page "https://github.com/RazerM/ratelimiter")
14027 (synopsis "Simple rate limiting object")
14028 (description
14029 "The @code{ratelimiter} module ensures that an operation will not be
14030 executed more than a given number of times during a given period.")
14031 (license license:asl2.0)))
14032
14033 (define-public python2-ratelimiter
14034 (package-with-python2 python-ratelimiter))
14035
14036 (define-public python-dukpy
14037 (package
14038 (name "python-dukpy")
14039 (version "0.3")
14040 (source
14041 (origin
14042 (method git-fetch)
14043 (uri (git-reference
14044 (url "https://github.com/kovidgoyal/dukpy.git")
14045 (commit (string-append "v" version))))
14046 (file-name (git-file-name name version))
14047 (sha256
14048 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
14049 (build-system python-build-system)
14050 (home-page "https://github.com/kovidgoyal/dukpy")
14051 (synopsis "Run JavaScript in python")
14052 (description
14053 "dukpy is a JavaScript runtime environment for Python using the duktape
14054 embeddable JavaScript engine.")
14055 ;; Dukpy is licensed under MIT like the embedded duktape library,
14056 ;; with 'errors.c' as GPL3.
14057 (license (list license:expat license:gpl3))))
14058
14059 (define-public python2-dukpy
14060 (package-with-python2 python-dukpy))
14061
14062 (define-public python-jsonrpclib-pelix
14063 (package
14064 (name "python-jsonrpclib-pelix")
14065 (version "0.3.2")
14066 (source
14067 (origin
14068 (method url-fetch)
14069 (uri (pypi-uri "jsonrpclib-pelix" version))
14070 (sha256
14071 (base32
14072 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
14073 (build-system python-build-system)
14074 (arguments
14075 `(#:tests? #f)) ; no tests in PyPI tarball
14076 (home-page "https://github.com/tcalmant/jsonrpclib/")
14077 (synopsis "JSON-RPC 2.0 client library for Python")
14078 (description
14079 "This library implements the JSON-RPC v2.0
14080 specification (backwards-compatible) as a client library for Python. This
14081 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
14082 services.")
14083 (license license:asl2.0)))
14084
14085 (define-public python2-jsonrpclib-pelix
14086 (package-with-python2 python-jsonrpclib-pelix))
14087
14088 (define-public python-setuptools-scm-git-archive
14089 (package
14090 (name "python-setuptools-scm-git-archive")
14091 (version "1.0")
14092 (source
14093 (origin
14094 (method url-fetch)
14095 (uri (pypi-uri "setuptools_scm_git_archive" version))
14096 (sha256
14097 (base32
14098 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
14099 (build-system python-build-system)
14100 (native-inputs
14101 `(("python-pytest" ,python-pytest)))
14102 (propagated-inputs
14103 `(("python-setuptools-scm" ,python-setuptools-scm)))
14104 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
14105 (synopsis "Setuptools_scm plugin for git archives")
14106 (description
14107 "The setuptools_scm_git_archive package is a plugin to
14108 setuptools_scm, which supports obtaining versions from git archives that
14109 belong to tagged versions.")
14110 (license license:expat)))
14111
14112 (define-public python2-setuptools-scm-git-archive
14113 (package-with-python2 python-setuptools-scm-git-archive))
14114
14115 (define-public python-setuptools-git
14116 (package
14117 (name "python-setuptools-git")
14118 (version "1.2")
14119 (source
14120 (origin
14121 (method url-fetch)
14122 (uri (pypi-uri "setuptools-git" version))
14123 (sha256
14124 (base32
14125 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
14126 (build-system python-build-system)
14127 (arguments
14128 `(#:phases
14129 (modify-phases %standard-phases
14130 ;; This is needed for tests.
14131 (add-after 'unpack 'configure-git
14132 (lambda _
14133 (setenv "HOME" "/tmp")
14134 (invoke "git" "config" "--global" "user.email" "guix")
14135 (invoke "git" "config" "--global" "user.name" "guix")
14136 #t)))))
14137 (native-inputs
14138 `(("git" ,git-minimal)))
14139 (home-page "https://github.com/msabramo/setuptools-git")
14140 (synopsis "Setuptools revision control system plugin for Git")
14141 (description
14142 "This package provides a plugin for Setuptools for revision control with
14143 Git.")
14144 (license license:bsd-3)))
14145
14146 (define-public python-pyclipper
14147 (package
14148 (name "python-pyclipper")
14149 (version "1.1.0.post3")
14150 (source
14151 (origin
14152 (method url-fetch)
14153 (uri (pypi-uri "pyclipper" version ".zip"))
14154 (sha256
14155 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
14156 (modules '((guix build utils)))
14157 (snippet
14158 '(begin
14159 ;; This file is generated by Cython.
14160 (delete-file "pyclipper/pyclipper.cpp") #t))))
14161 (build-system python-build-system)
14162 (arguments
14163 `(#:phases
14164 (modify-phases %standard-phases
14165 (add-before 'build 'cythonize-sources
14166 (lambda _
14167 (with-directory-excursion "pyclipper"
14168 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
14169 (propagated-inputs
14170 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
14171 (native-inputs
14172 `(("python-cython" ,python-cython)
14173 ("python-pytest" ,python-pytest)
14174 ("python-pytest-runner" ,python-pytest-runner)
14175 ("python-unittest2" ,python-unittest2)
14176 ("unzip" ,unzip)))
14177 (home-page "https://github.com/greginvm/pyclipper")
14178 (synopsis "Wrapper for Angus Johnson's Clipper library")
14179 (description
14180 "Pyclipper is a Cython wrapper for the C++ translation of the
14181 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
14182 (license license:expat)))
14183
14184 (define-public python2-pyclipper
14185 (package-with-python2 python-pyclipper))
14186
14187 (define-public python2-booleanoperations
14188 (package
14189 (name "python2-booleanoperations")
14190 (version "0.7.1")
14191 (source
14192 (origin
14193 (method url-fetch)
14194 (uri (pypi-uri "booleanOperations" version ".zip"))
14195 (sha256
14196 (base32
14197 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
14198 (build-system python-build-system)
14199 (arguments
14200 `(#:python ,python-2))
14201 (native-inputs
14202 `(("unzip" ,unzip)
14203 ("python2-pytest" ,python2-pytest)
14204 ("python2-pytest-runner" ,python2-pytest-runner)))
14205 (propagated-inputs
14206 `(("python-fonttools" ,python2-fonttools)
14207 ("python-pyclipper" ,python2-pyclipper)
14208 ("python-ufolib" ,python2-ufolib)))
14209 (home-page "https://github.com/typemytype/booleanOperations")
14210 (synopsis "Boolean operations on paths")
14211 (description
14212 "BooleanOperations provides a Python library that enables
14213 boolean operations on paths.")
14214 (license license:expat)))
14215
14216 (define-public python-tempdir
14217 (package
14218 (name "python-tempdir")
14219 (version "0.7.1")
14220 (source
14221 (origin
14222 (method url-fetch)
14223 (uri (pypi-uri "tempdir" version))
14224 (sha256
14225 (base32
14226 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
14227 (build-system python-build-system)
14228 (home-page "https://pypi.org/project/tempdir/")
14229 (arguments
14230 ;; the package has no tests
14231 '(#:tests? #f))
14232 (synopsis "Python library for managing temporary directories")
14233 (description
14234 "This library manages temporary directories that are automatically
14235 deleted with all their contents when they are no longer needed. It is
14236 particularly convenient for use in tests.")
14237 (license license:expat)))
14238
14239 (define-public python2-tempdir
14240 (package-with-python2 python-tempdir))
14241
14242 (define-public python-activepapers
14243 (package
14244 (name "python-activepapers")
14245 (version "0.2.2")
14246 (source
14247 (origin
14248 (method url-fetch)
14249 (uri (pypi-uri "ActivePapers.Py" version))
14250 (sha256
14251 (base32
14252 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
14253 (build-system python-build-system)
14254 (arguments
14255 `(#:modules ((ice-9 ftw)
14256 (srfi srfi-1)
14257 (guix build utils)
14258 (guix build python-build-system))
14259
14260 #:phases
14261 (modify-phases %standard-phases
14262 (add-after 'unpack 'delete-python2-code
14263 (lambda _
14264 (for-each delete-file
14265 '("lib/activepapers/builtins2.py"
14266 "lib/activepapers/standardlib2.py"
14267 "lib/activepapers/utility2.py"))))
14268 (replace 'check
14269 (lambda _
14270 ;; Deactivate the test cases that download files
14271 (setenv "NO_NETWORK_ACCESS" "1")
14272 ;; For some strange reason, some tests fail if nosetests runs all
14273 ;; test modules in a single execution. They pass if each test
14274 ;; module is run individually.
14275 (for-each (lambda (filename)
14276 (invoke "nosetests"
14277 (string-append "tests/" filename)))
14278 (scandir "tests"
14279 (lambda (filename)
14280 (string-suffix? ".py" filename)))))))))
14281 (native-inputs
14282 `(("python-tempdir" ,python-tempdir)
14283 ("python-nose" ,python-nose)))
14284 (propagated-inputs
14285 `(("python-h5py" ,python-h5py)))
14286 (home-page "http://www.activepapers.org/")
14287 (synopsis "Executable papers for scientific computing")
14288 (description
14289 "ActivePapers is a tool for working with executable papers, which
14290 combine data, code, and documentation in single-file packages,
14291 suitable for publication as supplementary material or on repositories
14292 such as figshare or Zenodo.")
14293 (properties `((python2-variant . ,(delay python2-activepapers))))
14294 (license license:bsd-3)))
14295
14296 (define-public python2-activepapers
14297 (let ((base (package-with-python2
14298 (strip-python2-variant python-activepapers))))
14299 (package
14300 (inherit base)
14301 (arguments
14302 (substitute-keyword-arguments (package-arguments base)
14303 ((#:phases phases)
14304 `(modify-phases ,phases
14305 (delete 'delete-python2-code)
14306 (add-after 'unpack 'delete-python3-code
14307 (lambda _
14308 (for-each delete-file
14309 '("lib/activepapers/builtins3.py"
14310 "lib/activepapers/standardlib3.py"
14311 "lib/activepapers/utility3.py")))))))))))
14312
14313 (define-public python-semver
14314 (package
14315 (name "python-semver")
14316 (version "2.7.9")
14317 (source
14318 (origin
14319 (method url-fetch)
14320 (uri (pypi-uri "semver" version))
14321 (sha256
14322 (base32
14323 "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz"))))
14324 (build-system python-build-system)
14325 (arguments
14326 `(#:phases
14327 (modify-phases %standard-phases
14328 (add-after 'unpack 'patch-test-requirements
14329 (lambda _
14330 (substitute* "setup.py"
14331 ;; Our Python is new enough.
14332 (("'virtualenv<14\\.0\\.0'") "'virtualenv'"))
14333 #t)))))
14334 (native-inputs
14335 `(("python-tox" ,python-tox)
14336 ("python-virtualenv" ,python-virtualenv)))
14337 (home-page "https://github.com/k-bx/python-semver")
14338 (synopsis "Python helper for Semantic Versioning")
14339 (description "This package provides a Python library for
14340 @url{Semantic Versioning, http://semver.org/}.")
14341 (license license:bsd-3)))
14342
14343 (define-public python2-semver
14344 (package-with-python2 python-semver))
14345
14346 (define-public python-pyro4
14347 (package
14348 (name "python-pyro4")
14349 (version "4.77")
14350 (source
14351 (origin
14352 (method url-fetch)
14353 (uri (pypi-uri "Pyro4" version))
14354 (sha256
14355 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
14356 (build-system python-build-system)
14357 (arguments
14358 '(#:tests? #f)) ;FIXME: Some tests require network access.
14359 (native-inputs
14360 `(("python-cloudpickle" ,python-cloudpickle)
14361 ("python-dill" ,python-dill)
14362 ("python-msgpack" ,python-msgpack)))
14363 (propagated-inputs
14364 `(("python-serpent" ,python-serpent)))
14365 (home-page "https://pyro4.readthedocs.io")
14366 (synopsis "Distributed object middleware for Python")
14367 (description
14368 "Pyro enables you to build applications in which objects can talk to each
14369 other over the network. You can just use normal Python method calls to call
14370 objects on other machines, also known as remote procedure calls (RPC).")
14371 (license license:expat)))
14372
14373 (define-public python2-pyro
14374 (package
14375 (name "python2-pyro")
14376 (version "3.16")
14377 (source
14378 (origin
14379 (method url-fetch)
14380 (uri (pypi-uri "Pyro" version))
14381 (file-name (string-append "Pyro-" version ".tar.gz"))
14382 (sha256
14383 (base32
14384 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
14385 (build-system python-build-system)
14386 (arguments
14387 ;; Pyro is not compatible with Python 3
14388 `(#:python ,python-2
14389 ;; Pyro has no test cases for automatic execution
14390 #:tests? #f))
14391 (home-page "http://pythonhosted.org/Pyro/")
14392 (synopsis "Distributed object manager for Python")
14393 (description "Pyro is a Distributed Object Technology system
14394 written in Python that is designed to be easy to use. It resembles
14395 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
14396 which is a system and language independent Distributed Object Technology
14397 and has much more to offer than Pyro or RMI. Pyro 3.x is no
14398 longer maintained. New projects should use Pyro4 instead, which
14399 is the new Pyro version that is actively developed.")
14400 (license license:expat)))
14401
14402 (define-public python2-scientific
14403 (package
14404 (name "python2-scientific")
14405 (version "2.9.4")
14406 (source
14407 (origin
14408 (method git-fetch)
14409 (uri (git-reference
14410 (url "https://github.com/khinsen/ScientificPython")
14411 (commit (string-append "rel" version))))
14412 (file-name (git-file-name name version))
14413 (sha256
14414 (base32
14415 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
14416 (build-system python-build-system)
14417 (inputs
14418 `(("netcdf" ,netcdf)))
14419 (propagated-inputs
14420 `(("python-numpy" ,python2-numpy-1.8)
14421 ("python-pyro" ,python2-pyro)))
14422 (arguments
14423 ;; ScientificPython is not compatible with Python 3
14424 `(#:python ,python-2
14425 #:tests? #f ; No test suite
14426 #:phases
14427 (modify-phases %standard-phases
14428 (replace 'build
14429 (lambda* (#:key inputs #:allow-other-keys)
14430 (invoke "python" "setup.py" "build"
14431 (string-append "--netcdf_prefix="
14432 (assoc-ref inputs "netcdf"))))))))
14433 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
14434 (synopsis "Python modules for scientific computing")
14435 (description "ScientificPython is a collection of Python modules that are
14436 useful for scientific computing. Most modules are rather general (Geometry,
14437 physical units, automatic derivatives, ...) whereas others are more
14438 domain-specific (e.g. netCDF and PDB support). The library is currently
14439 not actively maintained and works only with Python 2 and NumPy < 1.9.")
14440 (license license:cecill-c)))
14441
14442 (define-public python2-mmtk
14443 (package
14444 (name "python2-mmtk")
14445 (version "2.7.12")
14446 (source
14447 (origin
14448 (method git-fetch)
14449 (uri (git-reference
14450 (url "https://github.com/khinsen/MMTK")
14451 (commit (string-append "rel" version))))
14452 (file-name (git-file-name name version))
14453 (sha256
14454 (base32
14455 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
14456 (build-system python-build-system)
14457 (native-inputs
14458 `(("netcdf" ,netcdf)))
14459 (propagated-inputs
14460 `(("python-scientific" ,python2-scientific)
14461 ("python-tkinter" ,python-2 "tk")))
14462 (arguments
14463 `(#:python ,python-2
14464 #:tests? #f
14465 #:phases
14466 (modify-phases %standard-phases
14467 (add-before 'build 'includes-from-scientific
14468 (lambda* (#:key inputs #:allow-other-keys)
14469 (mkdir-p "Include/Scientific")
14470 (copy-recursively
14471 (string-append
14472 (assoc-ref inputs "python-scientific")
14473 "/include/python2.7/Scientific")
14474 "Include/Scientific"))))))
14475 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
14476 (synopsis "Python library for molecular simulation")
14477 (description "MMTK is a library for molecular simulations with an emphasis
14478 on biomolecules. It provides widely used methods such as Molecular Dynamics
14479 and normal mode analysis, but also basic routines for implementing new methods
14480 for simulation and analysis. The library is currently not actively maintained
14481 and works only with Python 2 and NumPy < 1.9.")
14482 (license license:cecill-c)))
14483
14484 (define-public python-phonenumbers
14485 (package
14486 (name "python-phonenumbers")
14487 (version "8.9.1")
14488 (source
14489 (origin
14490 (method url-fetch)
14491 (uri (pypi-uri "phonenumbers" version))
14492 (sha256
14493 (base32
14494 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
14495 (build-system python-build-system)
14496 (home-page
14497 "https://github.com/daviddrysdale/python-phonenumbers")
14498 (synopsis
14499 "Python library for dealing with international phone numbers")
14500 (description
14501 "This package provides a Python port of Google's libphonenumber library.")
14502 (license license:asl2.0)))
14503
14504 (define-public python2-phonenumbers
14505 (package-with-python2 python-phonenumbers))
14506
14507 (define-public python-send2trash
14508 (package
14509 (name "python-send2trash")
14510 (version "1.5.0")
14511 (source
14512 (origin (method git-fetch)
14513 ;; Source tarball on PyPI doesn't include tests.
14514 (uri (git-reference
14515 (url "https://github.com/hsoft/send2trash.git")
14516 (commit version)))
14517 (file-name (git-file-name name version))
14518 (sha256
14519 (base32
14520 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
14521 (build-system python-build-system)
14522 (arguments
14523 '(#:phases
14524 (modify-phases %standard-phases
14525 (add-before 'check 'pre-check
14526 (lambda _
14527 (mkdir-p "/tmp/foo")
14528 (setenv "HOME" "/tmp/foo")
14529 #t)))))
14530 (home-page "https://github.com/hsoft/send2trash")
14531 (synopsis "Send files to the user's @file{~/Trash} directory")
14532 (description "This package provides a Python library to send files to the
14533 user's @file{~/Trash} directory.")
14534 (properties `((python2-variant . ,(delay python2-send2trash))))
14535 (license license:bsd-3)))
14536
14537 (define-public python2-send2trash
14538 (package
14539 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
14540 (arguments
14541 (substitute-keyword-arguments (package-arguments python-send2trash)
14542 ((#:phases phases)
14543 `(modify-phases ,phases
14544 (add-before 'check 'setenv
14545 (lambda _
14546 (setenv "PYTHONPATH"
14547 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
14548 #t))))))))
14549
14550 (define-public python-yapf
14551 (package
14552 (name "python-yapf")
14553 (version "0.24.0")
14554 (source
14555 (origin
14556 (method url-fetch)
14557 (uri (pypi-uri "yapf" version))
14558 (sha256
14559 (base32
14560 "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf"))))
14561 (build-system python-build-system)
14562 (home-page "https://github.com/google/yapf")
14563 (synopsis "Formatter for Python code")
14564 (description "YAPF is a formatter for Python code. It's based off of
14565 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
14566 takes the code and reformats it to the best formatting that conforms to the
14567 style guide, even if the original code didn't violate the style guide.")
14568 (license license:asl2.0)))
14569
14570 (define-public python2-yapf
14571 (package-with-python2 python-yapf))
14572
14573 (define-public python-gyp
14574 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
14575 (revision "0"))
14576 (package
14577 (name "python-gyp")
14578 ;; Google does not release versions,
14579 ;; based on second most recent commit date.
14580 (version (git-version "0.0.0" revision commit))
14581 (source
14582 (origin
14583 ;; Google does not release tarballs,
14584 ;; git checkout is needed.
14585 (method git-fetch)
14586 (uri (git-reference
14587 (url "https://chromium.googlesource.com/external/gyp")
14588 (commit commit)))
14589 (file-name (git-file-name name version))
14590 (sha256
14591 (base32
14592 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14593 (build-system python-build-system)
14594 (home-page "https://gyp.gsrc.io/")
14595 (synopsis "GYP is a Meta-Build system")
14596 (description
14597 "GYP builds build systems for large, cross platform applications.
14598 It can be used to generate XCode projects, Visual Studio projects, Ninja build
14599 files, and Makefiles.")
14600 (license license:bsd-3))))
14601
14602 (define-public python2-gyp
14603 (package-with-python2 python-gyp))
14604
14605 (define-public python-whatever
14606 (package
14607 (name "python-whatever")
14608 (version "0.6")
14609 (source
14610 (origin
14611 (method url-fetch)
14612 (uri (string-append "https://github.com/Suor/whatever/archive/" version
14613 ".tar.gz"))
14614 (sha256
14615 (base32 "1rchg9hrlvw4sn20lq1zspczr4x1pv57c02gv73igiqx1hqpy2nc"))
14616 (file-name (string-append name "-" version ".tar.gz"))))
14617 (build-system python-build-system)
14618 (arguments
14619 `(#:phases
14620 (modify-phases %standard-phases
14621 (replace 'check
14622 (lambda _
14623 (invoke "py.test"))))))
14624 (native-inputs
14625 `(("python-pytest" ,python-pytest)))
14626 (home-page "http://github.com/Suor/whatever")
14627 (synopsis "Make anonymous functions by partial application of operators")
14628 (description "@code{whatever} provides an easy way to make anonymous
14629 functions by partial application of operators.")
14630 (license license:bsd-3)))
14631
14632 (define-public python2-whatever
14633 (package-with-python2 python-whatever))
14634
14635 (define-public python-funcy
14636 (package
14637 (name "python-funcy")
14638 (version "1.11")
14639 (source
14640 (origin
14641 (method git-fetch)
14642 (uri (git-reference
14643 (url "https://github.com/Suor/funcy.git")
14644 (commit version)))
14645 (sha256
14646 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14647 (file-name (git-file-name name version))))
14648 (build-system python-build-system)
14649 (arguments
14650 `(#:phases
14651 (modify-phases %standard-phases
14652 (replace 'check
14653 (lambda _
14654 (invoke "py.test"))))))
14655 (native-inputs
14656 `(("python-pytest" ,python-pytest)
14657 ("python-whatever" ,python-whatever)))
14658 (home-page "http://github.com/Suor/funcy")
14659 (synopsis "Functional tools")
14660 (description "@code{funcy} is a library that provides functional tools.
14661 Examples are:
14662 @enumerate
14663 @item merge - Merges collections of the same type
14664 @item walk - Type-preserving map
14665 @item select - Selects a part of a collection
14666 @item take - Takes the first n items of a collection
14667 @item first - Takes the first item of a collection
14668 @item remove - Predicated-removes items of a collection
14669 @item concat - Concatenates two collections
14670 @item flatten - Flattens a collection with subcollections
14671 @item distinct - Returns only distinct items
14672 @item split - Predicated-splits a collection
14673 @item split_at - Splits a collection at a given item
14674 @item group_by - Groups items by group
14675 @item pairwise - Pairs off adjacent items
14676 @item partial - Partially-applies a function
14677 @item curry - Curries a function
14678 @item compose - Composes functions
14679 @item complement - Complements a predicate
14680 @item all_fn - \"all\" with predicate
14681 @end enumerate")
14682 (license license:bsd-3)))
14683
14684 (define-public python2-funcy
14685 (package-with-python2 python-funcy))
14686
14687 (define-public python-isoweek
14688 (package
14689 (name "python-isoweek")
14690 (version "1.3.3")
14691 (source
14692 (origin
14693 (method url-fetch)
14694 (uri (pypi-uri "isoweek" version))
14695 (sha256
14696 (base32
14697 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14698 (build-system python-build-system)
14699 (home-page "https://github.com/gisle/isoweek")
14700 (synopsis "Objects representing a week")
14701 (description "The @code{isoweek} module provide the class Week that
14702 implements the week definition of ISO 8601. This standard also defines
14703 a notation for identifying weeks; yyyyWww (where the W is a literal).
14704 Week instances stringify to this form.")
14705 (license license:bsd-3)))
14706
14707 (define-public python2-isoweek
14708 (package-with-python2 python-isoweek))
14709
14710 (define-public python-tokenize-rt
14711 (package
14712 (name "python-tokenize-rt")
14713 (version "2.0.1")
14714 (source
14715 (origin
14716 (method url-fetch)
14717 (uri (pypi-uri "tokenize-rt" version))
14718 (sha256
14719 (base32
14720 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14721 (build-system python-build-system)
14722 (home-page "https://github.com/asottile/tokenize-rt")
14723 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14724 (description
14725 "This Python library is a wrapper around @code{tokenize} from the Python
14726 standard library. It provides two additional tokens @code{ESCAPED_NL} and
14727 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14728 and @code{tokens_to_src} to roundtrip.")
14729 (license license:expat)))
14730
14731 (define-public python-future-fstrings
14732 (package
14733 (name "python-future-fstrings")
14734 (version "0.4.1")
14735 (source
14736 (origin
14737 (method url-fetch)
14738 (uri (pypi-uri "future_fstrings" version))
14739 (sha256
14740 (base32
14741 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14742 (build-system python-build-system)
14743 (propagated-inputs
14744 `(("python-tokenize-rt" ,python-tokenize-rt)))
14745 (home-page "https://github.com/asottile/future-fstrings")
14746 (synopsis "Backport of fstrings to Python < 3.6")
14747 (description
14748 "This package provides a UTF-8 compatible encoding
14749 @code{future_fstrings}, which performs source manipulation. It decodes the
14750 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
14751 @code{f} strings.")
14752 (license license:expat)))
14753
14754 (define-public python-typed-ast
14755 (package
14756 (name "python-typed-ast")
14757 (version "1.4.0")
14758 (source
14759 (origin
14760 (method git-fetch)
14761 (uri (git-reference
14762 (url "https://github.com/python/typed_ast.git")
14763 (commit version)))
14764 (sha256
14765 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
14766 (file-name (git-file-name name version))))
14767 (build-system python-build-system)
14768 (arguments
14769 `(#:modules ((guix build utils)
14770 (guix build python-build-system)
14771 (ice-9 ftw)
14772 (srfi srfi-1)
14773 (srfi srfi-26))
14774 #:phases
14775 (modify-phases %standard-phases
14776 (replace 'check
14777 (lambda _
14778 (let ((cwd (getcwd)))
14779 (setenv "PYTHONPATH"
14780 (string-append cwd "/build/"
14781 (find (cut string-prefix? "lib" <>)
14782 (scandir (string-append cwd "/build")))
14783 ":"
14784 (getenv "PYTHONPATH"))))
14785 (invoke "pytest")
14786 #t)))))
14787 (native-inputs `(("python-pytest" ,python-pytest)))
14788 (home-page "https://github.com/python/typed_ast")
14789 (synopsis "Fork of Python @code{ast} modules with type comment support")
14790 (description "This package provides a parser similar to the standard
14791 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
14792 include PEP 484 type comments and are independent of the version of Python
14793 under which they are run. The @code{typed_ast} parsers produce the standard
14794 Python AST (plus type comments), and are both fast and correct, as they are
14795 based on the CPython 2.7 and 3.7 parsers.")
14796 ;; See the file "LICENSE" for the details.
14797 (license (list license:psfl
14798 license:asl2.0
14799 license:expat)))) ;ast27/Parser/spark.py
14800
14801 (define-public python-typing
14802 (package
14803 (name "python-typing")
14804 (version "3.6.6")
14805 (source
14806 (origin
14807 (method url-fetch)
14808 (uri (pypi-uri "typing" version))
14809 (sha256
14810 (base32
14811 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
14812 (build-system python-build-system)
14813 (home-page "https://docs.python.org/3/library/typing.html")
14814 (synopsis "Type hints for Python")
14815 (description "This is a backport of the standard library @code{typing}
14816 module to Python versions older than 3.5. Typing defines a standard notation
14817 for Python function and variable type annotations. The notation can be used
14818 for documenting code in a concise, standard format, and it has been designed
14819 to also be used by static and runtime type checkers, static analyzers, IDEs
14820 and other tools.")
14821 (license license:psfl)))
14822
14823 (define-public python2-typing
14824 (package-with-python2 python-typing))
14825
14826 (define-public python-typing-extensions
14827 (package
14828 (name "python-typing-extensions")
14829 (version "3.7.2")
14830 (source
14831 (origin
14832 (method url-fetch)
14833 (uri (pypi-uri "typing_extensions" version))
14834 (sha256
14835 (base32
14836 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
14837 (build-system python-build-system)
14838 (home-page
14839 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
14840 (synopsis "Experimental type hints for Python")
14841 (description
14842 "The typing_extensions module contains additional @code{typing} hints not
14843 yet present in the of the @code{typing} standard library.
14844 Included are implementations of:
14845 @enumerate
14846 @item ClassVar
14847 @item ContextManager
14848 @item Counter
14849 @item DefaultDict
14850 @item Deque
14851 @item NewType
14852 @item NoReturn
14853 @item overload
14854 @item Protocol
14855 @item runtime
14856 @item Text
14857 @item Type
14858 @item TYPE_CHECKING
14859 @item AsyncGenerator
14860 @end enumerate\n")
14861 (license license:psfl)))
14862
14863 (define-public bpython
14864 (package
14865 (name "bpython")
14866 (version "0.18")
14867 (source
14868 (origin
14869 (method url-fetch)
14870 (uri (pypi-uri "bpython" version))
14871 (sha256
14872 (base32 "1hl6frgvr2lqaxqczl8amg9xih32b3gzv429vs0qrjb8wpdj1k2n"))))
14873 (build-system python-build-system)
14874 (arguments
14875 `(#:phases
14876 (modify-phases %standard-phases
14877 (add-after 'unpack 'remove-failing-test
14878 (lambda _
14879 ;; Remove failing test. FIXME: make it pass
14880 (delete-file "bpython/test/test_args.py")
14881 #t))
14882 (add-after 'wrap 'add-aliases
14883 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
14884 (lambda* (#:key outputs #:allow-other-keys)
14885 (let ((out (assoc-ref outputs "out")))
14886 (for-each
14887 (lambda (old new)
14888 (symlink old (string-append out "/bin/" new)))
14889 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
14890 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
14891 #t)))))
14892 (propagated-inputs
14893 `(("python-pygments" ,python-pygments)
14894 ("python-requests" ,python-requests)
14895 ("python-babel" ,python-babel) ; optional, for internationalization
14896 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
14897 ("python-greenlet" ,python-greenlet)
14898 ("python-urwid" ,python-urwid) ; for bpython-urwid only
14899 ("python-six" ,python-six)))
14900 (native-inputs
14901 `(("python-sphinx" ,python-sphinx)
14902 ("python-mock" ,python-mock)))
14903 (home-page "https://bpython-interpreter.org/")
14904 (synopsis "Fancy interface to the Python interpreter")
14905 (description "Bpython is a fancy interface to the Python
14906 interpreter. bpython's main features are
14907
14908 @enumerate
14909 @item in-line syntax highlighting,
14910 @item readline-like autocomplete with suggestions displayed as you type,
14911 @item expected parameter list for any Python function,
14912 @item \"rewind\" function to pop the last line of code from memory and
14913 re-evaluate,
14914 @item send the code you've entered off to a pastebin,
14915 @item save the code you've entered to a file, and
14916 @item auto-indentation.
14917 @end enumerate")
14918 (license license:expat)))
14919
14920 (define-public bpython2
14921 (let ((base (package-with-python2
14922 (strip-python2-variant bpython))))
14923 (package (inherit base)
14924 (name "bpython2")
14925 (arguments
14926 `(#:python ,python-2
14927 #:phases
14928 (modify-phases %standard-phases
14929 (add-after 'unpack 'remove-failing-test
14930 (lambda _
14931 ;; Remove failing test. FIXME: make it pass
14932 (delete-file "bpython/test/test_args.py")
14933 ;; Disable failing test-cases (renaming inhibits they are
14934 ;; discovered)
14935 (substitute* "bpython/test/test_curtsies_repl.py"
14936 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
14937 (string-append a "xxx_off_" b))
14938 (("^(\\s*def )(test_complex\\W)" _ a b)
14939 (string-append a "xxx_off_" b)))
14940 #t))
14941 (add-before 'build 'rename-scripts
14942 ;; rename the scripts to bypthon2, bpdb2, etc.
14943 (lambda _
14944 (substitute* "setup.py"
14945 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
14946 (string-append name "2" rest "\n"))
14947 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
14948 (string-append name "2" (or sub "") rest "\n")))
14949 #t))))))))
14950
14951 (define-public python-pyinotify
14952 (package
14953 (name "python-pyinotify")
14954 (version "0.9.6")
14955 (source (origin
14956 (method url-fetch)
14957 (uri (pypi-uri "pyinotify" version))
14958 (sha256
14959 (base32
14960 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
14961 (build-system python-build-system)
14962 (arguments `(#:tests? #f)) ;no tests
14963 (home-page "https://github.com/seb-m/pyinotify")
14964 (synopsis "Python library for monitoring inotify events")
14965 (description
14966 "@code{pyinotify} provides a Python interface for monitoring
14967 file system events on Linux.")
14968 (license license:expat)))
14969
14970 (define-public python2-pyinotify
14971 (package-with-python2 python-pyinotify))
14972
14973 ;; Ada parser uses this version.
14974 (define-public python2-quex-0.67.3
14975 (package
14976 (name "python2-quex")
14977 (version "0.67.3")
14978 (source
14979 (origin
14980 (method url-fetch)
14981 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
14982 (version-major+minor version)
14983 "/quex-" version ".zip"))
14984 (sha256
14985 (base32
14986 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
14987 (build-system python-build-system)
14988 (native-inputs
14989 `(("unzip" ,unzip)))
14990 (arguments
14991 `(#:python ,python-2
14992 #:tests? #f
14993 #:phases
14994 (modify-phases %standard-phases
14995 (delete 'configure)
14996 (delete 'build)
14997 (replace 'install
14998 (lambda* (#:key outputs #:allow-other-keys)
14999 (let* ((out (assoc-ref outputs "out"))
15000 (share/quex (string-append out "/share/quex"))
15001 (bin (string-append out "/bin")))
15002 (copy-recursively "." share/quex)
15003 (mkdir-p bin)
15004 (symlink (string-append share/quex "/quex-exe.py")
15005 (string-append bin "/quex"))
15006 #t))))))
15007 (native-search-paths
15008 (list (search-path-specification
15009 (variable "QUEX_PATH")
15010 (files '("share/quex")))))
15011 (home-page "http://quex.sourceforge.net/")
15012 (synopsis "Lexical analyzer generator in Python")
15013 (description "@code{quex} is a lexical analyzer generator in Python.")
15014 (license license:lgpl2.1+))) ; Non-military
15015
15016 (define-public python2-quex
15017 (package (inherit python2-quex-0.67.3)
15018 (name "python2-quex")
15019 (version "0.68.1")
15020 (source
15021 (origin
15022 (method url-fetch)
15023 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
15024 (sha256
15025 (base32
15026 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
15027 (file-name (string-append name "-" version ".tar.gz"))))))
15028
15029 (define-public python-more-itertools
15030 (package
15031 (name "python-more-itertools")
15032 (version "7.1.0")
15033 (source
15034 (origin
15035 (method url-fetch)
15036 (uri (pypi-uri "more-itertools" version))
15037 (sha256
15038 (base32
15039 "16phg2f2dvm6ci5wr49ncha5lmc0m2in3bsl33c61vzca4gkvd4b"))))
15040 (build-system python-build-system)
15041 (home-page "https://github.com/erikrose/more-itertools")
15042 (synopsis "More routines for operating on iterables, beyond itertools")
15043 (description "Python's built-in @code{itertools} module implements a
15044 number of iterator building blocks inspired by constructs from APL, Haskell,
15045 and SML. @code{more-itertools} includes additional building blocks for
15046 working with iterables.")
15047 (properties `((python2-variant . ,(delay python2-more-itertools))))
15048 (license license:expat)))
15049
15050 ;; The 5.x series are the last versions supporting Python 2.7.
15051 (define-public python2-more-itertools
15052 (package
15053 (inherit python-more-itertools)
15054 (name "python2-more-itertools")
15055 (version "5.0.0")
15056 (source (origin
15057 (method url-fetch)
15058 (uri (pypi-uri "more-itertools" version))
15059 (sha256
15060 (base32
15061 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
15062 (arguments
15063 `(#:python ,python2-minimal))
15064 (propagated-inputs
15065 `(("python2-six" ,python2-six-bootstrap)))))
15066
15067 (define-public python-latexcodec
15068 (package
15069 (name "python-latexcodec")
15070 (version "1.0.7")
15071 (source
15072 (origin
15073 (method url-fetch)
15074 (uri (pypi-uri "latexcodec" version))
15075 (sha256
15076 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
15077 (build-system python-build-system)
15078 (inputs
15079 `(("python-six" ,python-six)))
15080 (home-page "https://readthedocs.org/projects/latexcodec/")
15081 (synopsis "Work with LaTeX code in Python")
15082 (description "Lexer and codec to work with LaTeX code in Python.")
15083 (license license:expat)))
15084
15085 (define-public python-pybtex
15086 (package
15087 (name "python-pybtex")
15088 (version "0.22.2")
15089 (source
15090 (origin
15091 (method url-fetch)
15092 (uri (pypi-uri "pybtex" version))
15093 (sha256
15094 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
15095 (build-system python-build-system)
15096 (native-inputs
15097 `(("python-nose" ,python-nose)))
15098 (inputs
15099 `(("python-latexcodec" ,python-latexcodec)
15100 ("python-pyyaml" ,python-pyyaml)
15101 ("python-six" ,python-six)))
15102 (arguments
15103 `(#:test-target "nosetests"))
15104 (home-page "https://pybtex.org/")
15105 (synopsis "BibTeX-compatible bibliography processor")
15106 (description "Pybtex is a BibTeX-compatible bibliography processor written
15107 in Python. You can simply type pybtex instead of bibtex.")
15108 (license license:expat)))
15109
15110 (define-public python-onetimepass
15111 (package
15112 (name "python-onetimepass")
15113 (version "1.0.1")
15114 (source
15115 (origin
15116 (method url-fetch)
15117 (uri (pypi-uri "onetimepass" version))
15118 (sha256
15119 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
15120 (build-system python-build-system)
15121 (propagated-inputs `(("python-six" ,python-six)))
15122 (home-page "https://github.com/tadeck/onetimepass/")
15123 (synopsis "One-time password library")
15124 (description "Python one-time password library for HMAC-based (HOTP) and
15125 time-based (TOTP) passwords.")
15126 (license license:expat)))
15127
15128 (define-public python-parso
15129 (package
15130 (name "python-parso")
15131 (version "0.5.1")
15132 (source
15133 (origin
15134 (method url-fetch)
15135 (uri (pypi-uri "parso" version))
15136 (sha256
15137 (base32
15138 "171a9ivhxwsd52h1cgsz40zgzpgzscn7yqb7sdjhy8m1lzj0wsv6"))))
15139 (native-inputs
15140 `(("python-pytest" ,python-pytest)))
15141 (build-system python-build-system)
15142 (arguments
15143 `(#:phases (modify-phases %standard-phases
15144 (replace 'check
15145 (lambda _ (invoke "pytest" "-vv"))))))
15146 (home-page "https://github.com/davidhalter/parso")
15147 (synopsis "Python Parser")
15148 (description "Parso is a Python parser that supports error recovery and
15149 round-trip parsing for different Python versions (in multiple Python versions).
15150 Parso is also able to list multiple syntax errors in your Python file.")
15151 (license license:expat)))
15152
15153 (define-public python2-parso
15154 (package-with-python2 python-parso))
15155
15156 (define-public python-async-generator
15157 (package
15158 (name "python-async-generator")
15159 (version "1.10")
15160 (source
15161 (origin
15162 (method url-fetch)
15163 (uri (pypi-uri "async_generator" version))
15164 (sha256
15165 (base32
15166 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
15167 (build-system python-build-system)
15168 (native-inputs
15169 `(("python-pytest" ,python-pytest)))
15170 (home-page "https://github.com/python-trio/async_generator")
15171 (synopsis "Async generators and context managers for Python 3.5+")
15172 (description "@code{async_generator} back-ports Python 3.6's native async
15173 generators and Python 3.7's context managers into Python 3.5.")
15174 ;; Dual licensed.
15175 (license (list license:expat license:asl2.0))))
15176
15177 (define-public python-async-timeout
15178 (package
15179 (name "python-async-timeout")
15180 (version "3.0.1")
15181 (source
15182 (origin
15183 (method url-fetch)
15184 (uri (pypi-uri "async-timeout" version))
15185 (sha256
15186 (base32
15187 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
15188 (build-system python-build-system)
15189 (home-page "https://github.com/aio-libs/async_timeout/")
15190 (synopsis "Timeout context manager for asyncio programs")
15191 (description "@code{async-timeout} provides a timeout timeout context
15192 manager compatible with @code{asyncio}.")
15193 (license license:asl2.0)))
15194
15195 (define-public python-glob2
15196 (package
15197 (name "python-glob2")
15198 (version "0.7")
15199 (source
15200 (origin
15201 (method git-fetch)
15202 (uri (git-reference
15203 (url "https://github.com/miracle2k/python-glob2.git")
15204 (commit (string-append "v" version))))
15205 (file-name (git-file-name name version))
15206 (sha256
15207 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
15208 (build-system python-build-system)
15209 (home-page "https://github.com/miracle2k/python-glob2/")
15210 (synopsis "Extended Version of the python buildin glob module")
15211 (description "This is an extended version of the Python
15212 @url{http://docs.python.org/library/glob.html, built-in glob module} which
15213 adds:
15214
15215 @itemize
15216 @item The ability to capture the text matched by glob patterns, and return
15217 those matches alongside the file names.
15218 @item A recursive @code{**} globbing syntax, akin for example to the
15219 @code{globstar} option of Bash.
15220 @item The ability to replace the file system functions used, in order to glob
15221 on virtual file systems.
15222 @item Compatible with Python 2 and Python 3 (tested with 3.3).
15223 @end itemize
15224
15225 Glob2 currently based on the glob code from Python 3.3.1.")
15226 (license license:bsd-2)))
15227
15228 (define-public python2-glob2
15229 (package-with-python2 python-glob2))
15230
15231 (define-public python-gipc
15232 (package
15233 (name "python-gipc")
15234 (version "0.6.0")
15235 (source
15236 (origin
15237 (method url-fetch)
15238 (uri (pypi-uri "gipc" version ".zip"))
15239 (sha256
15240 (base32
15241 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
15242 (build-system python-build-system)
15243 (native-inputs
15244 `(("unzip" ,unzip)))
15245 (propagated-inputs
15246 `(("python-gevent" ,python-gevent)))
15247 (home-page "http://gehrcke.de/gipc")
15248 (synopsis "Child process management in the context of gevent")
15249 (description "Usage of Python's multiprocessing package in a
15250 gevent-powered application may raise problems. With @code{gipc},
15251 process-based child processes can safely be created anywhere within a
15252 gevent-powered application.")
15253 (license license:expat)))
15254
15255 (define-public python2-gipc
15256 (package-with-python2 python-gipc))
15257
15258 (define-public python-fusepy
15259 (package
15260 (name "python-fusepy")
15261 (version "2.0.4")
15262 (source
15263 (origin
15264 (method url-fetch)
15265 (uri (pypi-uri "fusepy" version))
15266 (sha256
15267 (base32
15268 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
15269 (build-system python-build-system)
15270 (arguments
15271 `(#:phases
15272 (modify-phases %standard-phases
15273 (add-before 'build 'set-library-file-name
15274 (lambda* (#:key inputs #:allow-other-keys)
15275 (let ((fuse (assoc-ref inputs "fuse")))
15276 (substitute* "fuse.py"
15277 (("find_library\\('fuse'\\)")
15278 (string-append "'" fuse "/lib/libfuse.so'")))
15279 #t))))))
15280 (propagated-inputs
15281 `(("fuse" ,fuse)))
15282 (home-page "https://github.com/fusepy/fusepy")
15283 (synopsis "Simple ctypes bindings for FUSE")
15284 (description "Python module that provides a simple interface to FUSE and
15285 MacFUSE. The binding is created using the standard @code{ctypes} library.")
15286 (license license:isc)))
15287
15288 (define-public python2-fusepy
15289 (package-with-python2 python-fusepy))
15290
15291 (define-public python2-gdrivefs
15292 (package
15293 (name "python2-gdrivefs")
15294 (version "0.14.9")
15295 (source
15296 (origin
15297 (method url-fetch)
15298 (uri (pypi-uri "gdrivefs" version))
15299 (sha256
15300 (base32
15301 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
15302 (build-system python-build-system)
15303 (arguments
15304 `(#:python ,python-2
15305 #:phases
15306 (modify-phases %standard-phases
15307 (add-before 'build 'patch-setup-py
15308 (lambda _
15309 ;; Update requirements from dependency==version
15310 ;; to dependency>=version
15311 (substitute* "gdrivefs/resources/requirements.txt"
15312 (("==") ">="))
15313 #t)))))
15314 (native-inputs
15315 `(("python2-gipc" ,python2-gipc)
15316 ("python2-gevent" ,python2-gevent)
15317 ("python2-greenlet" ,python2-greenlet)
15318 ("python2-httplib2" ,python2-httplib2)
15319 ("python2-uritemplate" ,python2-uritemplate)
15320 ("python2-oauth2client" ,python2-oauth2client)
15321 ("python2-six" ,python2-six)))
15322 (propagated-inputs
15323 `(("python2-dateutil" ,python2-dateutil)
15324 ("python2-fusepy" ,python2-fusepy)
15325 ("python2-google-api-client" ,python2-google-api-client)))
15326 (home-page "https://github.com/dsoprea/GDriveFS")
15327 (synopsis "Mount Google Drive as a local file system")
15328 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
15329 under Python 2.7.")
15330 (license license:gpl2)))
15331
15332 (define-public pybind11
15333 (package
15334 (name "pybind11")
15335 (version "2.3.0")
15336 (source (origin
15337 (method git-fetch)
15338 (uri (git-reference
15339 (url "https://github.com/pybind/pybind11.git")
15340 (commit (string-append "v" version))))
15341 (sha256
15342 (base32
15343 "11b6dniri8m05spfd2a19irz82shf4sdca73566bniggrf3zclnf"))
15344 (file-name (git-file-name name version))))
15345 (build-system cmake-build-system)
15346 (native-inputs
15347 `(("python" ,python)
15348 ("python-pytest" ,python-pytest)))
15349 (arguments
15350 `(#:test-target "check"))
15351 (home-page "https://github.com/pybind/pybind11/")
15352 (synopsis "Seamless operability between C++11 and Python")
15353 (description "pybind11 is a lightweight header-only library that exposes
15354 C++ types in Python and vice versa, mainly to create Python bindings of
15355 existing C++ code. Its goals and syntax are similar to the excellent
15356 Boost.Python library by David Abrahams: to minimize boilerplate code in
15357 traditional extension modules by inferring type information using compile-time
15358 introspection.")
15359 (license license:expat)))
15360
15361 (define-public python-fasteners
15362 (package
15363 (name "python-fasteners")
15364 (version "0.14.1")
15365 (source
15366 (origin
15367 (method url-fetch)
15368 (uri (pypi-uri "fasteners" version))
15369 (sha256
15370 (base32
15371 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
15372 (build-system python-build-system)
15373 (propagated-inputs
15374 `(("python-monotonic" ,python-monotonic)
15375 ("python-six" ,python-six)
15376 ("python-testtools" ,python-testtools)))
15377 (home-page "https://github.com/harlowja/fasteners")
15378 (synopsis "Python package that provides useful locks")
15379 (description
15380 "This package provides a Python program that provides following locks:
15381
15382 @itemize
15383 @item Locking decorator
15384 @item Reader-writer locks
15385 @item Inter-process locks
15386 @item Generic helpers
15387 @end itemize\n")
15388 (properties `((python2-variant . ,(delay python2-fasteners))))
15389 (license license:asl2.0)))
15390
15391 (define-public python2-fasteners
15392 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
15393 (package
15394 (inherit base)
15395 (propagated-inputs
15396 `(("python2-futures" ,python2-futures)
15397 ,@(package-propagated-inputs base))))))
15398
15399 (define-public python-requests-file
15400 (package
15401 (name "python-requests-file")
15402 (version "1.4.3")
15403 (source
15404 (origin
15405 (method url-fetch)
15406 (uri (pypi-uri "requests-file" version))
15407 (sha256
15408 (base32
15409 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
15410 (build-system python-build-system)
15411 (propagated-inputs
15412 `(("python-requests" ,python-requests)
15413 ("python-six" ,python-six)))
15414 (home-page
15415 "https://github.com/dashea/requests-file")
15416 (synopsis "File transport adapter for Requests")
15417 (description
15418 "Requests-File is a transport adapter for use with the Requests Python
15419 library to allow local file system access via @code{file://} URLs.")
15420 (license license:asl2.0)))
15421
15422 (define-public python2-requests-file
15423 (package-with-python2 python-requests-file))
15424
15425 (define-public python-tldextract
15426 (package
15427 (name "python-tldextract")
15428 (version "2.2.0")
15429 (source
15430 (origin
15431 (method url-fetch)
15432 (uri (pypi-uri "tldextract" version))
15433 (sha256
15434 (base32
15435 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
15436 (build-system python-build-system)
15437 (native-inputs
15438 `(("python-pytest" ,python-pytest)
15439 ("python-responses" ,python-responses)))
15440 (propagated-inputs
15441 `(("python-idna" ,python-idna)
15442 ("python-requests" ,python-requests)
15443 ("python-requests-file" ,python-requests-file)))
15444 (home-page
15445 "https://github.com/john-kurkowski/tldextract")
15446 (synopsis
15447 "Separate the TLD from the registered domain and subdomains of a URL")
15448 (description
15449 "TLDExtract accurately separates the TLD from the registered domain and
15450 subdomains of a URL, using the Public Suffix List. By default, this includes
15451 the public ICANN TLDs and their exceptions. It can optionally support the
15452 Public Suffix List's private domains as well.")
15453 (license license:bsd-3)))
15454
15455 (define-public python2-tldextract
15456 (package-with-python2 python-tldextract))
15457
15458 (define-public python-pynamecheap
15459 (package
15460 (name "python-pynamecheap")
15461 (version "0.0.3")
15462 (source
15463 (origin
15464 (method url-fetch)
15465 (uri (pypi-uri "PyNamecheap" version))
15466 (sha256
15467 (base32
15468 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
15469 (build-system python-build-system)
15470 (propagated-inputs
15471 `(("python-requests" ,python-requests)))
15472 (home-page
15473 "https://github.com/Bemmu/PyNamecheap")
15474 (synopsis
15475 "Namecheap API client in Python")
15476 (description
15477 "PyNamecheap is a Namecheap API client in Python.")
15478 (license license:expat)))
15479
15480 (define-public python2-pynamecheap
15481 (package-with-python2 python-pynamecheap))
15482
15483 (define-public python-dns-lexicon
15484 (package
15485 (name "python-dns-lexicon")
15486 (version "2.4.0")
15487 (source
15488 (origin
15489 (method url-fetch)
15490 (uri (pypi-uri "dns-lexicon" version))
15491 (sha256
15492 (base32
15493 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
15494 (build-system python-build-system)
15495 (arguments
15496 `(#:tests? #f)) ;requires internet access
15497 (propagated-inputs
15498 `(("python-future" ,python-future)
15499 ("python-pynamecheap" ,python-pynamecheap)
15500 ("python-requests" ,python-requests)
15501 ("python-tldextract" ,python-tldextract)
15502 ("python-urllib3" ,python-urllib3)))
15503 (home-page "https://github.com/AnalogJ/lexicon")
15504 (synopsis
15505 "Manipulate DNS records on various DNS providers")
15506 (description
15507 "Lexicon provides a way to manipulate DNS records on multiple DNS
15508 providers in a standardized way. It has a CLI but it can also be used as a
15509 Python library. It was designed to be used in automation, specifically with
15510 Let's Encrypt.")
15511 (license license:expat)))
15512
15513 (define-public python2-dns-lexicon
15514 (package-with-python2 python-dns-lexicon))
15515
15516 (define-public python-commandlines
15517 (package
15518 (name "python-commandlines")
15519 (version "0.4.1")
15520 (source
15521 (origin
15522 (method url-fetch)
15523 (uri (pypi-uri "commandlines" version))
15524 (sha256
15525 (base32
15526 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15527 (build-system python-build-system)
15528 (home-page "https://github.com/chrissimpkins/commandlines")
15529 (synopsis "Command line argument to object parsing library")
15530 (description
15531 "@code{Commandlines} is a Python library for command line application
15532 development that supports command line argument parsing, command string
15533 validation testing and application logic.")
15534 (license license:expat)))
15535
15536 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15537 ;; python-numba. They have a very unflexible relationship.
15538 (define-public python-numba
15539 (package
15540 (name "python-numba")
15541 (version "0.42.0")
15542 (source
15543 (origin
15544 (method url-fetch)
15545 (uri (pypi-uri "numba" version))
15546 (sha256
15547 (base32
15548 "03rqdfx0512lcri2bcpngx5k3jwfbqnanqj3n19c7d6h6hqxvq9x"))))
15549 (build-system python-build-system)
15550 (arguments
15551 `(#:modules ((guix build utils)
15552 (guix build python-build-system)
15553 (ice-9 ftw)
15554 (srfi srfi-1)
15555 (srfi srfi-26))
15556 #:phases
15557 (modify-phases %standard-phases
15558 (add-after 'unpack 'disable-proprietary-features
15559 (lambda _
15560 (setenv "NUMBA_DISABLE_HSA" "1")
15561 (setenv "NUMBA_DISABLE_CUDA" "1")
15562 #t))
15563 (add-after 'unpack 'remove-failing-tests
15564 (lambda _
15565 ;; FIXME: these tests fail for unknown reasons:
15566 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15567 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15568 (substitute* "numba/tests/test_dispatcher.py"
15569 (("def test(_non_writable_pycache)" _ m)
15570 (string-append "def guix_skip" m))
15571 (("def test(_non_creatable_pycache)" _ m)
15572 (string-append "def guix_skip" m))
15573 (("def test(_frozen)" _ m)
15574 (string-append "def guix_skip" m)))
15575
15576 ;; These tests fail because we don't run the tests from the build
15577 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
15578 ;; They ar in numba.tests.test_pycc.TestDistutilsSupport.
15579 (substitute* "numba/tests/test_pycc.py"
15580 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15581 (string-append "def guix_skip" m)))
15582 #t))
15583 (replace 'check
15584 (lambda _
15585 (let ((cwd (getcwd)))
15586 (setenv "PYTHONPATH"
15587 (string-append cwd "/build/"
15588 (find (cut string-prefix? "lib" <>)
15589 (scandir (string-append cwd "/build")))
15590 ":"
15591 (getenv "PYTHONPATH")))
15592 ;; Something is wrong with the PYTHONPATH when running the
15593 ;; tests from the build directory, as it complains about not being
15594 ;; able to import certain modules.
15595 (with-directory-excursion "/tmp"
15596 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15597 #t)))))
15598 (propagated-inputs
15599 `(("python-llvmlite" ,python-llvmlite)
15600 ("python-numpy" ,python-numpy)
15601 ("python-singledispatch" ,python-singledispatch)))
15602 ;; Needed for tests.
15603 (inputs
15604 `(("python-jinja2" ,python-jinja2)
15605 ("python-pygments" ,python-pygments)))
15606 (home-page "https://numba.pydata.org")
15607 (synopsis "Compile Python code using LLVM")
15608 (description "Numba gives you the power to speed up your applications with
15609 high performance functions written directly in Python. With a few
15610 annotations, array-oriented and math-heavy Python code can be just-in-time
15611 compiled to native machine instructions, similar in performance to C, C++ and
15612 Fortran, without having to switch languages or Python interpreters.
15613
15614 Numba works by generating optimized machine code using the LLVM compiler
15615 infrastructure at import time, runtime, or statically (using the included pycc
15616 tool).")
15617 (license license:bsd-3)))
15618
15619 (define-public python-anndata
15620 (package
15621 (name "python-anndata")
15622 (version "0.6.18")
15623 (source
15624 (origin
15625 (method url-fetch)
15626 (uri (pypi-uri "anndata" version))
15627 (sha256
15628 (base32
15629 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
15630 (build-system python-build-system)
15631 (propagated-inputs
15632 `(("python-h5py" ,python-h5py)
15633 ("python-natsort" ,python-natsort)
15634 ("python-pandas" ,python-pandas)
15635 ("python-scipy" ,python-scipy)))
15636 (home-page "https://github.com/theislab/anndata")
15637 (synopsis "Annotated data for data analysis pipelines")
15638 (description "Anndata is a package for simple (functional) high-level APIs
15639 for data analysis pipelines. In this context, it provides an efficient,
15640 scalable way of keeping track of data together with learned annotations and
15641 reduces the code overhead typically encountered when using a mostly
15642 object-oriented library such as @code{scikit-learn}.")
15643 (license license:bsd-3)))
15644
15645 (define-public python-dill
15646 (package
15647 (name "python-dill")
15648 (version "0.2.9")
15649 (source
15650 (origin
15651 (method url-fetch)
15652 (uri (pypi-uri "dill" version))
15653 (sha256
15654 (base32 "0vwqyi6hyz2r29zydc78dqymkbc5y7gia16xcdh215cikxph9mpn"))))
15655 (build-system python-build-system)
15656 ;; FIXME: The check phase fails with "don't know how to make test from: …".
15657 (arguments '(#:tests? #f))
15658 (home-page "https://pypi.org/project/dill")
15659 (synopsis "Serialize all of Python")
15660 (description "Dill extends Python's @code{pickle} module for serializing
15661 and de-serializing Python objects to the majority of the built-in Python
15662 types. Dill provides the user the same interface as the @code{pickle} module,
15663 and also includes some additional features. In addition to pickling Python
15664 objects, @code{dill} provides the ability to save the state of an interpreter
15665 session in a single command. Hence, it would be feasible to save a
15666 interpreter session, close the interpreter, ship the pickled file to another
15667 computer, open a new interpreter, unpickle the session and thus continue from
15668 the saved state of the original interpreter session.")
15669 (license license:bsd-3)))
15670
15671 (define-public python-multiprocess
15672 (package
15673 (name "python-multiprocess")
15674 (version "0.70.6.1")
15675 (source
15676 (origin
15677 (method url-fetch)
15678 (uri (pypi-uri "multiprocess" version))
15679 (sha256
15680 (base32
15681 "1ip5caz67b3q0553mr8gm8xwsb8x500jn8ml0gihgyfy52m2ypcq"))))
15682 (build-system python-build-system)
15683 (propagated-inputs
15684 `(("python-dill" ,python-dill)))
15685 (home-page "https://pypi.org/project/multiprocess")
15686 (synopsis "Multiprocessing and multithreading in Python")
15687 (description
15688 "This package is a fork of the multiprocessing Python package, a package
15689 which supports the spawning of processes using the API of the standard
15690 library's @code{threading} module.")
15691 (license license:bsd-3)))
15692
15693 (define-public python-toolz
15694 (package
15695 (name "python-toolz")
15696 (version "0.9.0")
15697 (source
15698 (origin
15699 (method url-fetch)
15700 (uri (pypi-uri "toolz" version))
15701 (sha256
15702 (base32
15703 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
15704 (build-system python-build-system)
15705 ;; FIXME: tests cannot be computed: "Can't perform this operation for
15706 ;; unregistered loader type"
15707 (arguments '(#:tests? #f))
15708 (home-page "https://github.com/pytoolz/toolz/")
15709 (synopsis "List processing tools and functional utilities")
15710 (description
15711 "This package provides a set of utility functions for iterators,
15712 functions, and dictionaries.")
15713 (license license:bsd-3)))
15714
15715 (define-public python2-toolz
15716 (package-with-python2 python-toolz))
15717
15718 (define-public python-cytoolz
15719 (package
15720 (name "python-cytoolz")
15721 (version "0.9.0.1")
15722 (source
15723 (origin
15724 (method url-fetch)
15725 (uri (pypi-uri "cytoolz" version))
15726 (sha256
15727 (base32
15728 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
15729 (build-system python-build-system)
15730 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
15731 ;; 'exceptions'"
15732 (arguments '(#:tests? #f))
15733 (propagated-inputs
15734 `(("python-toolz" ,python-toolz)))
15735 (native-inputs
15736 `(("python-cython" ,python-cython)))
15737 (home-page "https://github.com/pytoolz/cytoolz")
15738 (synopsis "High performance functional utilities")
15739 (description
15740 "The cytoolz package implements the same API as provided by toolz. The
15741 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
15742 that is accessible to other projects developed in Cython.")
15743 (license license:bsd-3)))
15744
15745 (define-public python-sortedcontainers
15746 (package
15747 (name "python-sortedcontainers")
15748 (version "2.0.4")
15749 (source
15750 (origin
15751 (method url-fetch)
15752 (uri (pypi-uri "sortedcontainers" version))
15753 (sha256
15754 (base32
15755 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
15756 (build-system python-build-system)
15757 (native-inputs
15758 `(("python-tox" ,python-tox)))
15759 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
15760 (synopsis "Sorted List, Sorted Dict, Sorted Set")
15761 (description
15762 "This package provides a sorted collections library, written in
15763 pure-Python.")
15764 (license license:asl2.0)))
15765
15766 (define-public python-cloudpickle
15767 (package
15768 (name "python-cloudpickle")
15769 (version "0.6.1")
15770 (source
15771 (origin
15772 (method url-fetch)
15773 (uri (pypi-uri "cloudpickle" version))
15774 (sha256
15775 (base32
15776 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
15777 (build-system python-build-system)
15778 ;; FIXME: there are 5 errors in 122 tests:
15779 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
15780 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
15781 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15782 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15783 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
15784 ;; TypeError: cannot serialize '_io.BufferedRandom' object
15785 (arguments '(#:tests? #f))
15786 (native-inputs
15787 `(("python-pytest" ,python-pytest)
15788 ("python-mock" ,python-mock)
15789 ("python-tornado" ,python-tornado)))
15790 (home-page "https://github.com/cloudpipe/cloudpickle")
15791 (synopsis "Extended pickling support for Python objects")
15792 (description
15793 "Cloudpickle makes it possible to serialize Python constructs not
15794 supported by the default pickle module from the Python standard library. It
15795 is especially useful for cluster computing where Python expressions are
15796 shipped over the network to execute on remote hosts, possibly close to the
15797 data.")
15798 (license license:bsd-3)))
15799
15800 (define-public python2-cloudpickle
15801 (package-with-python2 python-cloudpickle))
15802
15803 (define-public python-locket
15804 (package
15805 (name "python-locket")
15806 (version "0.2.0")
15807 (source
15808 (origin
15809 (method url-fetch)
15810 (uri (pypi-uri "locket" version))
15811 (sha256
15812 (base32
15813 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
15814 (build-system python-build-system)
15815 (home-page "https://github.com/mwilliamson/locket.py")
15816 (synopsis "File-based locks for Python")
15817 (description
15818 "Locket implements a lock that can be used by multiple processes provided
15819 they use the same path.")
15820 (license license:bsd-2)))
15821
15822 (define-public python2-locket
15823 (package-with-python2 python-locket))
15824
15825 (define-public python-blosc
15826 (package
15827 (name "python-blosc")
15828 (version "1.5.1")
15829 (source
15830 (origin
15831 (method url-fetch)
15832 (uri (pypi-uri "blosc" version))
15833 (sha256
15834 (base32
15835 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
15836 (build-system python-build-system)
15837 ;; FIXME: all tests pass, but then this error is printed:
15838 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
15839 (arguments '(#:tests? #f))
15840 (propagated-inputs
15841 `(("python-numpy" ,python-numpy)))
15842 (home-page "https://github.com/blosc/python-blosc")
15843 (synopsis "Python wrapper for the Blosc data compressor library")
15844 (description "Blosc is a high performance compressor optimized for binary
15845 data. It has been designed to transmit data to the processor cache faster
15846 than the traditional, non-compressed, direct memory fetch approach via a
15847 @code{memcpy()} system call.
15848
15849 Blosc works well for compressing numerical arrays that contains data with
15850 relatively low entropy, like sparse data, time series, grids with
15851 regular-spaced values, etc.
15852
15853 This Python package wraps the Blosc library.")
15854 (license license:bsd-3)))
15855
15856 (define-public python2-blosc
15857 (package-with-python2 python-blosc))
15858
15859 (define-public python-partd
15860 (package
15861 (name "python-partd")
15862 (version "0.3.9")
15863 (source
15864 (origin
15865 (method url-fetch)
15866 (uri (pypi-uri "partd" version))
15867 (sha256
15868 (base32
15869 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
15870 (build-system python-build-system)
15871 (propagated-inputs
15872 `(("python-blosc" ,python-blosc)
15873 ("python-locket" ,python-locket)
15874 ("python-numpy" ,python-numpy)
15875 ("python-pandas" ,python-pandas)
15876 ("python-pyzmq" ,python-pyzmq)
15877 ("python-toolz" ,python-toolz)))
15878 (home-page "https://github.com/dask/partd/")
15879 (synopsis "Appendable key-value storage")
15880 (description "Partd stores key-value pairs. Values are raw bytes. We
15881 append on old values. Partd excels at shuffling operations.")
15882 (license license:bsd-3)))
15883
15884 (define-public python2-partd
15885 (package-with-python2 python-partd))
15886
15887 (define-public python-dask
15888 (package
15889 (name "python-dask")
15890 (version "1.2.2")
15891 (source
15892 (origin
15893 (method url-fetch)
15894 (uri (pypi-uri "dask" version))
15895 (sha256
15896 (base32 "0b29gvf96gmp20wicly3v3mhyc93zbm3mdv935fka6x0wax7cy2y"))))
15897 (build-system python-build-system)
15898 ;; A single test out of 5000+ fails. This test is marked as xfail when
15899 ;; pytest-xdist is used.
15900 (arguments
15901 `(#:phases
15902 (modify-phases %standard-phases
15903 (add-after 'unpack 'disable-broken-test
15904 (lambda _
15905 (substitute* "dask/tests/test_threaded.py"
15906 (("def test_interrupt\\(\\)" m)
15907 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15908 m)))
15909 (when (which "python2")
15910 ;; This test fails with recent Pandas:
15911 ;; <https://github.com/dask/dask/issues/3794>.
15912 (substitute* "dask/dataframe/tests/test_dataframe.py"
15913 (("def test_info\\(\\)" m)
15914 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15915 m))))
15916 #t))
15917 (replace 'check
15918 (lambda _ (invoke "pytest" "-vv"))))))
15919 (propagated-inputs
15920 `(("python-cloudpickle" ,python-cloudpickle)
15921 ("python-numpy" ,python-numpy)
15922 ("python-pandas" ,python-pandas)
15923 ("python-partd" ,python-partd)
15924 ("python-toolz" ,python-toolz)
15925 ("python-pyyaml" ,python-pyyaml)))
15926 (native-inputs
15927 `(("python-pytest" ,python-pytest)
15928 ("python-pytest-runner" ,python-pytest-runner)))
15929 (home-page "https://github.com/dask/dask/")
15930 (synopsis "Parallel computing with task scheduling")
15931 (description
15932 "Dask is a flexible parallel computing library for analytics. It
15933 consists of two components: dynamic task scheduling optimized for computation,
15934 and large data collections like parallel arrays, dataframes, and lists that
15935 extend common interfaces like NumPy, Pandas, or Python iterators to
15936 larger-than-memory or distributed environments. These parallel collections
15937 run on top of the dynamic task schedulers. ")
15938 (license license:bsd-3)))
15939
15940 (define-public python2-dask
15941 (package-with-python2 python-dask))
15942
15943 (define-public python-ilinkedlist
15944 (package
15945 (name "python-ilinkedlist")
15946 (version "0.4.0")
15947 (source
15948 (origin
15949 (method url-fetch)
15950 (uri (pypi-uri "ilinkedlist" version))
15951 (sha256
15952 (base32
15953 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
15954 (build-system python-build-system)
15955 (native-inputs `(("python-pytest" ,python-pytest)))
15956 (inputs `(("python" ,python)))
15957 (home-page "https://github.com/luther9/ilinkedlist-py")
15958 (synopsis "Immutable linked list library")
15959 (description
15960 "This is a implementation of immutable linked lists for Python. It
15961 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
15962 Since a linked list is treated as immutable, it is hashable, and its length
15963 can be retrieved in constant time. Some of the terminology is inspired by
15964 LISP. It is possible to create an improper list by creating a @code{Pair}
15965 with a non-list @code{cdr}.")
15966 (license license:gpl3+)))
15967
15968 (define-public python-readlike
15969 (package
15970 (name "python-readlike")
15971 (version "0.1.3")
15972 (source
15973 (origin
15974 (method url-fetch)
15975 (uri (pypi-uri "readlike" version))
15976 (sha256
15977 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
15978 (build-system python-build-system)
15979 (home-page "https://github.com/jangler/readlike")
15980 (synopsis "GNU Readline-like line editing module")
15981 (description
15982 "This Python module provides line editing functions similar to the default
15983 Emacs-style ones of GNU Readline. Unlike the Python standard library's
15984 @code{readline} package, this one allows access to those capabilties in settings
15985 outside of a standard command-line interface. It is especially well-suited to
15986 interfacing with Urwid, due to a shared syntax for describing key inputs.
15987
15988 Currently, all stateless Readline commands are implemented. Yanking and history
15989 are not supported.")
15990 (license license:expat)))
15991
15992 (define-public python2-readlike
15993 (package-with-python2 python-readlike))
15994
15995 (define-public python-reparser
15996 (package
15997 (name "python-reparser")
15998 (version "1.4.3")
15999 (source
16000 (origin
16001 (method url-fetch)
16002 (uri (pypi-uri "ReParser" version))
16003 (sha256
16004 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
16005 (build-system python-build-system)
16006 (home-page "https://github.com/xmikos/reparser")
16007 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
16008 (description
16009 "This Python library provides a simple lexer/parser for inline markup based
16010 on regular expressions.")
16011 (license license:expat)))
16012
16013 (define-public python2-reparser
16014 (let ((reparser (package-with-python2
16015 (strip-python2-variant python-reparser))))
16016 (package (inherit reparser)
16017 (propagated-inputs
16018 `(("python2-enum34" ,python2-enum34)
16019 ,@(package-propagated-inputs reparser))))))
16020
16021 (define-public python-precis-i18n
16022 (package
16023 (name "python-precis-i18n")
16024 (version "1.0.0")
16025 (source
16026 (origin
16027 (method url-fetch)
16028 (uri (pypi-uri "precis_i18n" version))
16029 (sha256
16030 (base32
16031 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
16032 (build-system python-build-system)
16033 (home-page "https://github.com/byllyfish/precis_i18n")
16034 (synopsis "Implementation of the PRECIS framework")
16035 (description
16036 "This module implements the PRECIS Framework as described in RFC 8264,
16037 RFC 8265 and RFC 8266.")
16038 (license license:expat)))
16039
16040 (define-public python-absl-py
16041 (package
16042 (name "python-absl-py")
16043 (version "0.6.1")
16044 (source
16045 (origin
16046 (method url-fetch)
16047 (uri (pypi-uri "absl-py" version))
16048 (sha256
16049 (base32
16050 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
16051 (build-system python-build-system)
16052 (propagated-inputs
16053 `(("python-six" ,python-six)))
16054 (home-page "https://github.com/abseil/abseil-py")
16055 (synopsis "Abseil Python common libraries")
16056 (description
16057 "This package provides the Abseil Python Common Libraries, a collection
16058 of Python libraries for building Python applications.")
16059 (license license:asl2.0)))
16060
16061 (define-public python-astor
16062 (package
16063 (name "python-astor")
16064 (version "0.7.1")
16065 (source
16066 (origin
16067 (method url-fetch)
16068 (uri (pypi-uri "astor" version))
16069 (sha256
16070 (base32
16071 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
16072 (build-system python-build-system)
16073 ;; FIXME: There are two errors and two test failures.
16074 (arguments `(#:tests? #f))
16075 (home-page "https://github.com/berkerpeksag/astor")
16076 (synopsis "Read and write Python ASTs")
16077 (description "Astor is designed to allow easy manipulation of Python
16078 source via the Abstract Syntax Tree.")
16079 (license license:bsd-3)))
16080
16081 (define-public python2-astor
16082 (package-with-python2 python-astor))
16083
16084 (define-public python-grpcio
16085 (package
16086 (name "python-grpcio")
16087 (version "1.17.1")
16088 (source
16089 (origin
16090 (method url-fetch)
16091 (uri (pypi-uri "grpcio" version))
16092 (sha256
16093 (base32
16094 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
16095 (build-system python-build-system)
16096 (propagated-inputs
16097 `(("python-six" ,python-six)))
16098 (home-page "https://grpc.io")
16099 (synopsis "HTTP/2-based RPC framework")
16100 (description "This package provides a Python library for communicating
16101 with the HTTP/2-based RPC framework gRPC.")
16102 (license license:asl2.0)))
16103
16104 (define-public python-astunparse
16105 (package
16106 (name "python-astunparse")
16107 (version "1.6.2")
16108 (source
16109 (origin
16110 (method url-fetch)
16111 (uri (pypi-uri "astunparse" version))
16112 (sha256
16113 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
16114 (build-system python-build-system)
16115 (arguments '(#:tests? #f)) ; there are none
16116 (propagated-inputs
16117 `(("python-six" ,python-six)
16118 ("python-wheel" ,python-wheel)))
16119 (home-page "https://github.com/simonpercivall/astunparse")
16120 (synopsis "AST unparser for Python")
16121 (description "This package provides an AST unparser for Python. It is a
16122 factored out version of @code{unparse} found in the Python source
16123 distribution.")
16124 (license license:bsd-3)))
16125
16126 (define-public python-gast
16127 (package
16128 (name "python-gast")
16129 (version "0.2.2")
16130 (source
16131 (origin
16132 (method url-fetch)
16133 (uri (pypi-uri "gast" version))
16134 (sha256
16135 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
16136 (build-system python-build-system)
16137 (propagated-inputs
16138 `(("python-astunparse" ,python-astunparse)))
16139 (home-page "https://pypi.org/project/gast/")
16140 (synopsis "Generic Python AST that abstracts the underlying Python version")
16141 (description
16142 "GAST provides a compatibility layer between the AST of various Python
16143 versions, as produced by @code{ast.parse} from the standard @code{ast}
16144 module.")
16145 (license license:bsd-3)))
16146
16147 (define-public python-wikidata
16148 (package
16149 (name "python-wikidata")
16150 (version "0.6.1")
16151 (source
16152 (origin
16153 (method url-fetch)
16154 (uri (pypi-uri "Wikidata" version))
16155 (sha256
16156 (base32
16157 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
16158 (build-system python-build-system)
16159 (propagated-inputs
16160 `(("python-babel" ,python-babel)))
16161 (home-page "https://github.com/dahlia/wikidata")
16162 (synopsis "Wikidata client library")
16163 (description
16164 "This package provides a Python interface to
16165 @url{https://www.wikidata.org/, Wikidata}.")
16166 (properties '((upstream-name . "Wikidata")))
16167 (license license:gpl3+)))
16168
16169 (define-public python-doctest-ignore-unicode
16170 (package
16171 (name "python-doctest-ignore-unicode")
16172 (version "0.1.2")
16173 (source
16174 (origin
16175 (method url-fetch)
16176 (uri (pypi-uri "doctest-ignore-unicode" version))
16177 (sha256
16178 (base32
16179 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
16180 (build-system python-build-system)
16181 (native-inputs
16182 `(("python-nose" ,python-nose)))
16183 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
16184 (synopsis "Ignore Unicode literal prefixes in doctests")
16185 (description
16186 "This package adds support for a flag to ignore Unicode literal prefixes
16187 in doctests.")
16188 (license license:asl2.0)))
16189
16190 (define-public python-attr
16191 (package
16192 (name "python-attr")
16193 (version "0.3.1")
16194 (source
16195 (origin
16196 (method url-fetch)
16197 (uri (pypi-uri "attr" version))
16198 (sha256
16199 (base32
16200 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
16201 (build-system python-build-system)
16202 (home-page "https://github.com/denis-ryzhkov/attr")
16203 (synopsis "Decorator for attributes of target function or class")
16204 (description "Simple decorator to set attributes of target function or
16205 class in a @acronym{DRY, Don't Repeat Yourself} way.")
16206 (license license:expat)))
16207
16208 (define-public python-construct
16209 (package
16210 (name "python-construct")
16211 (version "2.9.45")
16212 (source
16213 (origin
16214 (method url-fetch)
16215 (uri (pypi-uri "construct" version))
16216 (sha256
16217 (base32
16218 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
16219 (build-system python-build-system)
16220 (arguments
16221 `(#:tests? #f)) ; No tests exist.
16222 (propagated-inputs
16223 `(("python-extras" ,python-extras)
16224 ("python-arrow" ,python-arrow)
16225 ("python-numpy" ,python-numpy)
16226 ("python-ruamel.yaml" ,python-ruamel.yaml)))
16227 (home-page "http://construct.readthedocs.io")
16228 (synopsis "Declarative and symmetrical parser and builder for binary data")
16229 (description
16230 "This package provides both simple, atomic constructs (such as
16231 integers of various sizes), as well as composite ones which allow you
16232 form hierarchical and sequential structures of increasing complexity.
16233 It features bit and byte granularity, easy debugging and testing, an
16234 easy-to-extend subclass system, and lots of primitive constructs to
16235 make your work easier.")
16236 (license license:expat)))
16237
16238 (define-public python-humanize
16239 (package
16240 (name "python-humanize")
16241 (version "0.5.1")
16242 (source
16243 (origin
16244 (method url-fetch)
16245 (uri (pypi-uri "humanize" version))
16246 (sha256
16247 (base32
16248 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
16249 (arguments
16250 '(#:tests? #f)) ; tests not in pypi archive
16251 (build-system python-build-system)
16252 (home-page "https://github.com/jmoiron/humanize")
16253 (synopsis "Print numerical information in a human-readable form")
16254 (description "This package provides a Python module that displays numbers
16255 and dates in \"human readable\" forms. For example, it would display
16256 \"12345591313\" as \"12.3 billion\".")
16257 (license license:expat)))
16258
16259 (define-public python-txaio
16260 (package
16261 (name "python-txaio")
16262 (version "18.8.1")
16263 (source
16264 (origin
16265 (method url-fetch)
16266 (uri (pypi-uri "txaio" version))
16267 (sha256
16268 (base32
16269 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
16270 (build-system python-build-system)
16271 (propagated-inputs
16272 `(("python-twisted" ,python-twisted)
16273 ("python-six" ,python-six)))
16274 (home-page "https://github.com/crossbario/txaio")
16275 (synopsis "Compatibility layer between Python asyncio and Twisted")
16276 (description "Txaio provides a compatibility layer between the Python
16277 @code{asyncio} module and @code{Twisted}.")
16278 (license license:expat)))
16279
16280 (define-public python-toolshed
16281 (package
16282 (name "python-toolshed")
16283 (version "0.4.6")
16284 (source
16285 (origin
16286 (method url-fetch)
16287 (uri (pypi-uri "toolshed" version))
16288 (sha256
16289 (base32
16290 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
16291 (build-system python-build-system)
16292 (native-inputs
16293 `(("python-nose" ,python-nose)))
16294 (home-page "https://github.com/brentp/toolshed/")
16295 (synopsis "Collection of modules and functions for working with data")
16296 (description "This is a collection of well-tested, simple modules and
16297 functions that aim to reduce boilerplate when working with data.")
16298 (license license:bsd-2)))
16299
16300 (define-public python-annoy
16301 (package
16302 (name "python-annoy")
16303 (version "1.15.1")
16304 (source
16305 (origin
16306 (method url-fetch)
16307 (uri (pypi-uri "annoy" version))
16308 (sha256
16309 (base32
16310 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
16311 (build-system python-build-system)
16312 (native-inputs
16313 `(("python-nose" ,python-nose)))
16314 (home-page "https://github.com/spotify/annoy/")
16315 (synopsis "Approximate nearest neighbors library")
16316 (description
16317 "Annoy is a C++ library with Python bindings to search for points in
16318 space that are close to a given query point. It also creates large read-only
16319 file-based data structures that are @code{mmap}ped into memory so that many
16320 processes may share the same data.")
16321 (license license:asl2.0)))
16322
16323 (define-public python-pylzma
16324 (package
16325 (name "python-pylzma")
16326 (version "0.5.0")
16327 (source
16328 (origin
16329 (method url-fetch)
16330 (uri (pypi-uri "pylzma" version))
16331 (sha256
16332 (base32
16333 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
16334 (build-system python-build-system)
16335 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
16336 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
16337 (description "This package provides Python bindings for the LZMA library
16338 by Igor Pavlov.")
16339 (license license:lgpl2.1+)))
16340
16341 (define-public python2-pylzma
16342 (package-with-python2 python-pylzma))
16343
16344 (define-public python2-zeroconf
16345 (package
16346 (name "python2-zeroconf")
16347
16348 ;; This is the last version that supports Python 2.x.
16349 (version "0.19.1")
16350 (source
16351 (origin
16352 (method url-fetch)
16353 (uri (pypi-uri "zeroconf" version))
16354 (sha256
16355 (base32
16356 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
16357 (build-system python-build-system)
16358 (arguments
16359 `(#:python ,python-2
16360 #:phases
16361 (modify-phases %standard-phases
16362 (add-after 'unpack 'patch-requires
16363 (lambda* (#:key inputs #:allow-other-keys)
16364 (substitute* "setup.py"
16365 (("enum-compat")
16366 "enum34"))
16367 #t)))))
16368 (native-inputs
16369 `(("python2-six" ,python2-six)
16370 ("python2-enum32" ,python2-enum34)
16371 ("python2-netifaces" ,python2-netifaces)
16372 ("python2-typing" ,python2-typing)))
16373 (home-page "https://github.com/jstasiak/python-zeroconf")
16374 (synopsis "Pure Python mDNS service discovery")
16375 (description
16376 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
16377 compatible).")
16378 (license license:lgpl2.1+)))
16379
16380 (define-public python-bsddb3
16381 (package
16382 (name "python-bsddb3")
16383 (version "6.2.6")
16384 (source
16385 (origin
16386 (method url-fetch)
16387 (uri (pypi-uri "bsddb3" version))
16388 (sha256
16389 (base32
16390 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
16391 (build-system python-build-system)
16392 (inputs
16393 `(("bdb" ,bdb)))
16394 (arguments
16395 '(#:phases
16396 (modify-phases %standard-phases
16397 (add-after 'unpack 'configure-locations
16398 (lambda* (#:key inputs #:allow-other-keys)
16399 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
16400 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
16401 #t))
16402 (replace 'check
16403 (lambda _
16404 (invoke "python3" "test3.py" "-v"))))))
16405 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
16406 (synopsis "Python bindings for Oracle Berkeley DB")
16407 (description
16408 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
16409 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
16410 Transaction objects, and each of these is exposed as a Python type in the
16411 bsddb3.db module. The database objects can use various access methods: btree,
16412 hash, recno, and queue. Complete support of Berkeley DB distributed
16413 transactions. Complete support for Berkeley DB Replication Manager.
16414 Complete support for Berkeley DB Base Replication. Support for RPC.")
16415 (license license:bsd-3)))
16416
16417 (define-public python-dbfread
16418 (package
16419 (name "python-dbfread")
16420 (version "2.0.7")
16421 (source (origin
16422 (method url-fetch)
16423 (uri (pypi-uri "dbfread" version))
16424 (sha256
16425 (base32
16426 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
16427 (build-system python-build-system)
16428 (native-inputs
16429 `(("python-pytest" ,python-pytest)))
16430 (home-page "https://dbfread.readthedocs.io")
16431 (synopsis "Read DBF Files with Python")
16432 (description
16433 "This library reads DBF files and returns the data as native Python data
16434 types for further processing. It is primarily intended for batch jobs and
16435 one-off scripts.")
16436 (license license:expat)))
16437
16438 (define-public python-cached-property
16439 (package
16440 (name "python-cached-property")
16441 (version "1.5.1")
16442 (source
16443 (origin
16444 (method url-fetch)
16445 (uri (pypi-uri "cached-property" version))
16446 (sha256
16447 (base32
16448 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
16449 (build-system python-build-system)
16450 (arguments
16451 `(#:phases
16452 (modify-phases %standard-phases
16453 ;; https://github.com/pydanny/cached-property/issues/131
16454 ;; recent versions of freezegun break one test
16455 (add-after 'unpack 'disable-broken-test
16456 (lambda _
16457 (substitute* "tests/test_cached_property.py"
16458 (("def test_threads_ttl_expiry\\(self\\)" m)
16459 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
16460 " " m)))
16461 #t)))))
16462 (native-inputs
16463 `(("python-freezegun" ,python-freezegun)))
16464 (home-page
16465 "https://github.com/pydanny/cached-property")
16466 (synopsis
16467 "Decorator for caching properties in classes")
16468 (description
16469 "This package provides a decorator which makes caching
16470 time-or-computationally-expensive properties quick and easy and works in Python
16471 2 or 3.")
16472 (license license:bsd-3)))
16473
16474 (define-public python-folium
16475 (package
16476 (name "python-folium")
16477 (version "0.10.0")
16478 (source
16479 (origin
16480 (method url-fetch)
16481 (uri (pypi-uri "folium" version))
16482 (sha256
16483 (base32
16484 "18fzxijsgrb95r0a8anc9ba5ijyw3nlnv3rpavfbkqa5v878x84f"))))
16485 (build-system python-build-system)
16486 (propagated-inputs
16487 `(("python-branca" ,python-branca)
16488 ("python-jinja2" ,python-jinja2)
16489 ("python-numpy" ,python-numpy)
16490 ("python-requests" ,python-requests)))
16491 (native-inputs
16492 `(("python-pytest" ,python-pytest)))
16493 (home-page "https://github.com/python-visualization/folium")
16494 (synopsis "Make beautiful maps with Leaflet.js & Python")
16495 (description "@code{folium} makes it easy to visualize data that’s been
16496 manipulated in Python on an interactive leaflet map. It enables both the
16497 binding of data to a map for @code{choropleth} visualizations as well as
16498 passing rich vector/raster/HTML visualizations as markers on the map.
16499
16500 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
16501 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
16502 supports Image, Video, GeoJSON and TopoJSON overlays.")
16503 (license license:expat)))
16504
16505 (define-public jube
16506 (package
16507 ;; This is a command-line tool, so no "python-" prefix.
16508 (name "jube")
16509 (version "2.2.2")
16510 (source (origin
16511 (method url-fetch)
16512 (uri (string-append
16513 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
16514 version))
16515 (sha256
16516 (base32
16517 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
16518 (file-name (string-append "jube-" version ".tar.gz"))))
16519 (build-system python-build-system)
16520 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
16521 (synopsis "Benchmarking environment")
16522 (description
16523 "JUBE helps perform and analyze benchmarks in a systematic way. For each
16524 benchmarked application, benchmark data is stored in a format that allows JUBE
16525 to deduct the desired information. This data can be parsed by automatic pre-
16526 and post-processing scripts that draw information and store it more densely
16527 for manual interpretation.")
16528 (license license:gpl3+)))
16529
16530 (define-public python-pyroutelib3
16531 (package
16532 (name "python-pyroutelib3")
16533 (version "1.3.post1")
16534 (source
16535 (origin
16536 (method url-fetch)
16537 (uri (pypi-uri "pyroutelib3" version))
16538 (sha256
16539 (base32
16540 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
16541 (build-system python-build-system)
16542 (propagated-inputs
16543 `(("python-dateutil" ,python-dateutil)))
16544 (home-page "https://github.com/MKuranowski/pyroutelib3")
16545 (synopsis "Library for simple routing on OSM data")
16546 (description "Library for simple routing on OSM data")
16547 (license license:gpl3+)))
16548
16549 (define-public python-elementpath
16550 (package
16551 (name "python-elementpath")
16552 (version "1.2.0")
16553 (source
16554 (origin
16555 (method url-fetch)
16556 (uri (pypi-uri "elementpath" version))
16557 (sha256
16558 (base32
16559 "1syn2z543brab23dskh3fjd9pqvz6npqbcicrs2d88dbg26xl08p"))))
16560 (build-system python-build-system)
16561 (home-page
16562 "https://github.com/sissaschool/elementpath")
16563 (synopsis
16564 "XPath 1.0/2.0 parsers and selectors for ElementTree and lxml")
16565 (description
16566 "The proposal of this package is to provide XPath 1.0 and 2.0 selectors
16567 for Python's ElementTree XML data structures, both for the standard
16568 ElementTree library and for the @uref{http://lxml.de, lxml.etree} library.
16569
16570 For lxml.etree this package can be useful for providing XPath 2.0 selectors,
16571 because lxml.etree already has it's own implementation of XPath 1.0.")
16572 (license license:expat)))
16573
16574 (define-public python-bibtexparser
16575 (package
16576 (name "python-bibtexparser")
16577 (version "1.1.0")
16578 (source
16579 (origin
16580 (method url-fetch)
16581 (uri (pypi-uri "bibtexparser" version))
16582 (sha256
16583 (base32
16584 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
16585 (build-system python-build-system)
16586 (propagated-inputs
16587 `(("python-pyparsing" ,python-pyparsing)))
16588 (native-inputs
16589 `(("python-future" ,python-future)))
16590 (home-page "https://github.com/sciunto-org/python-bibtexparser")
16591 (synopsis "Python library to parse BibTeX files")
16592 (description "BibtexParser is a Python library to parse BibTeX files.")
16593 (license (list license:bsd-3 license:lgpl3))))
16594
16595 (define-public python-distro
16596 (package
16597 (name "python-distro")
16598 (version "1.4.0")
16599 (source
16600 (origin
16601 (method url-fetch)
16602 (uri (pypi-uri "distro" version))
16603 (sha256
16604 (base32
16605 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
16606 (build-system python-build-system)
16607 (native-inputs
16608 `(("python-pytest" ,python-pytest)))
16609 (home-page "https://github.com/nir0s/distro")
16610 (synopsis
16611 "OS platform information API")
16612 (description
16613 "@code{distro} provides information about the OS distribution it runs on,
16614 such as a reliable machine-readable ID, or version information.
16615
16616 It is the recommended replacement for Python's original
16617 `platform.linux_distribution` function (which will be removed in Python 3.8).
16618 @code{distro} also provides a command-line interface to output the platform
16619 information in various formats.")
16620 (license license:asl2.0)))
16621
16622 (define-public python-cairosvg
16623 (package
16624 (name "python-cairosvg")
16625 (version "2.4.2")
16626 (source
16627 (origin
16628 (method url-fetch)
16629 (uri (pypi-uri "CairoSVG" version))
16630 (sha256
16631 (base32 "1bb7irxbaxxb9ahm3z5wsx1q96mm5gzskc7b6q07h9ikcnb8yrjf"))))
16632 (build-system python-build-system)
16633 (arguments
16634 `(#:phases
16635 (modify-phases %standard-phases
16636 (replace 'check
16637 (lambda _ (invoke "pytest"))))))
16638 (propagated-inputs
16639 `(("python-cairocffi" ,python-cairocffi)
16640 ("python-cssselect2" ,python-cssselect2)
16641 ("python-defusedxml" ,python-defusedxml)
16642 ("python-pillow" ,python-pillow)
16643 ("python-tinycss2" ,python-tinycss2)))
16644 (native-inputs
16645 `(("python-pytest-flake8" ,python-pytest-flake8)
16646 ("python-pytest-isort" ,python-pytest-isort)
16647 ("python-pytest-runner" ,python-pytest-runner)))
16648 (home-page "https://cairosvg.org/")
16649 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
16650 (description "CairoSVG is a SVG converter based on Cairo. It can export
16651 SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
16652 SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
16653 parsed, the result is drawn to a Cairo surface that can be exported to
16654 qvarious formats: PDF, PostScript, PNG and even SVG.")
16655 (license license:lgpl3+)))
16656
16657 (define-public python-pyphen
16658 (package
16659 (name "python-pyphen")
16660 (version "0.9.5")
16661 (source
16662 (origin
16663 (method url-fetch)
16664 (uri (pypi-uri "Pyphen" version))
16665 (sha256
16666 (base32 "08c9y69ry9d6m4zalhnalg86lsp9v2j5n1ziw5vxfmiihx83lqrv"))))
16667 (build-system python-build-system)
16668 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
16669 ;; embedded set provided by upstream - like Debian does.
16670 (home-page "https://github.com/Kozea/Pyphen")
16671 (synopsis "Pure Python module to hyphenate text")
16672 (description "Pyphen is a pure Python module to hyphenate text using
16673 existing Hunspell hyphenation dictionaries.")
16674 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
16675
16676 (define-public python-intelhex
16677 (package
16678 (name "python-intelhex")
16679 (version "2.2.1")
16680 (source
16681 (origin
16682 (method url-fetch)
16683 (uri (pypi-uri "intelhex" version))
16684 (sha256
16685 (base32
16686 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
16687 (build-system python-build-system)
16688 (arguments '(#:tests? #f)) ;issue with version
16689 (home-page "https://pypi.org/project/IntelHex/")
16690 (synopsis "Python library for Intel HEX files manipulations")
16691 (description "The Intel HEX file format is widely used in microprocessors
16692 and microcontrollers area (embedded systems etc.) as the de facto standard for
16693 representation of code to be programmed into microelectronic devices. This
16694 package provides an intelhex Python library to read, write, create from
16695 scratch and manipulate data from Intel HEX file format. It also includes
16696 several convenience Python scripts, including \"classic\" hex2bin and bin2hex
16697 converters and more, those based on the library itself.")
16698 (license license:bsd-3)))
16699
16700 (define-public python-pykwalify
16701 (package
16702 (name "python-pykwalify")
16703 (version "1.7.0")
16704 (source
16705 (origin
16706 (method url-fetch)
16707 (uri (pypi-uri "pykwalify" version))
16708 (sha256
16709 (base32
16710 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
16711 (build-system python-build-system)
16712 (arguments '(#:tests? #f)) ;missing dependencies
16713 (propagated-inputs
16714 `(("python-dateutil" ,python-dateutil)
16715 ("python-docopt" ,python-docopt)
16716 ("python-pyyaml" ,python-pyyaml)))
16717 (home-page "https://github.com/grokzen/pykwalify")
16718 (synopsis
16719 "Python lib/cli for JSON/YAML schema validation")
16720 (description
16721 "This package provides a parser, schema validator, and data binding tool
16722 for YAML and JSON.")
16723 (license license:expat)))