gnu: python-pathos: Run test suite.
[jackhill/guix/guix.git] / gnu / packages / python-xyz.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2013, 2014, 2015, 2016, 2019 Andreas Enge <andreas@enge.fr>
5 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2014, 2017 Eric Bavier <bavier@member.fsf.org>
7 ;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
8 ;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
9 ;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
10 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
11 ;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
12 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
13 ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
14 ;;; Copyright © 2015, 2016, 2017, 2019 Leo Famulari <leo@famulari.name>
15 ;;; Copyright © 2015, 2017 Ben Woodcroft <donttrustben@gmail.com>
16 ;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
17 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
18 ;;; Copyright © 2015, 2017 Kyle Meyer <kyle@kyleam.com>
19 ;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
20 ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
21 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
22 ;;; Copyright © 2016, 2018-2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
23 ;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
24 ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
25 ;;; Copyright © 2016, 2017 Troy Sankey <sankeytms@gmail.com>
26 ;;; Copyright © 2016, 2017 ng0 <ng0@n0.is>
27 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28 ;;; Copyright © 2016 David Craven <david@craven.ch>
29 ;;; Copyright © 2016, 2017, 2018, 2019 Marius Bakke <mbakke@fastmail.com>
30 ;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
31 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
32 ;;; Copyright © 2016, 2017, 2019 Alex Vong <alexvong1995@gmail.com>
33 ;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
34 ;;; Copyright © 2016, 2017, 2018 Julien Lepiller <julien@lepiller.eu>
35 ;;; Copyright © 2016, 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
36 ;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
37 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
38 ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
39 ;;; Copyright © 2017, 2018 Adriano Peluso <catonano@gmail.com>
40 ;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
41 ;;; Copyright © 2017, 2018, 2019 Mathieu Othacehe <m.othacehe@gmail.com>
42 ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
43 ;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
44 ;;; Copyright © 2017, 2018, 2019 Kei Kebreau <kkebreau@posteo.net>
45 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
46 ;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
47 ;;; Copyright © 2017, 2019 Brendan Tildesley <mail@brendan.scot>
48 ;;; Copyright © 2018 Ethan R. Jones <ethanrjones97@gmail.com
49 ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
50 ;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
51 ;;; Copyright © 2018 Mathieu Lirzin <mthl@gnu.org>
52 ;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
53 ;;; Copyright © 2016, 2018 Tomáš Čech <sleep_walker@gnu.org>
54 ;;; Copyright © 2018, 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
55 ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
56 ;;; Copyright © 2018, 2019 Clément Lassieur <clement@lassieur.org>
57 ;;; Copyright © 2018, 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
58 ;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
59 ;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
60 ;;; Copyright © 2019 Brett Gilio <brettg@gnu.org>
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 ;;; Copyright © 2019 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de>
71 ;;;
72 ;;; This file is part of GNU Guix.
73 ;;;
74 ;;; GNU Guix is free software; you can redistribute it and/or modify it
75 ;;; under the terms of the GNU General Public License as published by
76 ;;; the Free Software Foundation; either version 3 of the License, or (at
77 ;;; your option) any later version.
78 ;;;
79 ;;; GNU Guix is distributed in the hope that it will be useful, but
80 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
81 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
82 ;;; GNU General Public License for more details.
83 ;;;
84 ;;; You should have received a copy of the GNU General Public License
85 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
86
87 (define-module (gnu packages python-xyz)
88 #:use-module ((guix licenses) #:prefix license:)
89 #:use-module (gnu packages)
90 #:use-module (gnu packages algebra)
91 #:use-module (gnu packages adns)
92 #:use-module (gnu packages attr)
93 #:use-module (gnu packages backup)
94 #:use-module (gnu packages bash)
95 #:use-module (gnu packages check)
96 #:use-module (gnu packages compression)
97 #:use-module (gnu packages crypto)
98 #:use-module (gnu packages databases)
99 #:use-module (gnu packages dbm)
100 #:use-module (gnu packages file)
101 #:use-module (gnu packages fontutils)
102 #:use-module (gnu packages gcc)
103 #:use-module (gnu packages geo)
104 #:use-module (gnu packages ghostscript)
105 #:use-module (gnu packages gl)
106 #:use-module (gnu packages glib)
107 #:use-module (gnu packages gnome)
108 #:use-module (gnu packages graphviz)
109 #:use-module (gnu packages graphics)
110 #:use-module (gnu packages gstreamer)
111 #:use-module (gnu packages gtk)
112 #:use-module (gnu packages icu4c)
113 #:use-module (gnu packages image)
114 #:use-module (gnu packages imagemagick)
115 #:use-module (gnu packages libevent)
116 #:use-module (gnu packages libffi)
117 #:use-module (gnu packages linux)
118 #:use-module (gnu packages llvm)
119 #:use-module (gnu packages man)
120 #:use-module (gnu packages maths)
121 #:use-module (gnu packages monitoring)
122 #:use-module (gnu packages multiprecision)
123 #:use-module (gnu packages networking)
124 #:use-module (gnu packages ncurses)
125 #:use-module (gnu packages openstack)
126 #:use-module (gnu packages pcre)
127 #:use-module (gnu packages perl)
128 #:use-module (gnu packages pkg-config)
129 #:use-module (gnu packages python)
130 #:use-module (gnu packages python-check)
131 #:use-module (gnu packages python-compression)
132 #:use-module (gnu packages python-crypto)
133 #:use-module (gnu packages python-science)
134 #:use-module (gnu packages python-web)
135 #:use-module (gnu packages qt)
136 #:use-module (gnu packages readline)
137 #:use-module (gnu packages sdl)
138 #:use-module (gnu packages search)
139 #:use-module (gnu packages shells)
140 #:use-module (gnu packages sphinx)
141 #:use-module (gnu packages ssh)
142 #:use-module (gnu packages terminals)
143 #:use-module (gnu packages tex)
144 #:use-module (gnu packages texinfo)
145 #:use-module (gnu packages time)
146 #:use-module (gnu packages tls)
147 #:use-module (gnu packages version-control)
148 #:use-module (gnu packages video)
149 #:use-module (gnu packages web)
150 #:use-module (gnu packages base)
151 #:use-module (gnu packages xml)
152 #:use-module (gnu packages xorg)
153 #:use-module (gnu packages xdisorg)
154 #:use-module (gnu packages tcl)
155 #:use-module (gnu packages bdw-gc)
156 #:use-module (gnu packages serialization)
157 #:use-module (guix packages)
158 #:use-module (guix download)
159 #:use-module (guix git-download)
160 #:use-module (guix hg-download)
161 #:use-module (guix utils)
162 #:use-module (guix build-system gnu)
163 #:use-module (guix build-system cmake)
164 #:use-module (guix build-system python)
165 #:use-module (guix build-system trivial)
166 #:use-module (srfi srfi-1)
167 #:use-module (srfi srfi-26))
168
169 (define-public python-psutil
170 (package
171 (name "python-psutil")
172 (version "5.6.5")
173 (source
174 (origin
175 (method url-fetch)
176 (uri (pypi-uri "psutil" version))
177 (sha256
178 (base32 "0isil5jxwwd8awz54qk28rpgjg43i5l6yl70g40vxwa4r4m56lfh"))))
179 (build-system python-build-system)
180 (arguments
181 ;; FIXME: some tests does not return and times out.
182 '(#:tests? #f))
183 (home-page "https://www.github.com/giampaolo/psutil")
184 (synopsis "Library for retrieving information on running processes")
185 (description
186 "psutil (Python system and process utilities) is a library for retrieving
187 information on running processes and system utilization (CPU, memory, disks,
188 network) in Python. It is useful mainly for system monitoring, profiling and
189 limiting process resources and management of running processes. It implements
190 many functionalities offered by command line tools such as: ps, top, lsof,
191 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
192 pidof, tty, taskset, pmap.")
193 (properties `((python2-variant . ,(delay python2-psutil))))
194 (license license:bsd-3)))
195
196 (define-public python2-psutil
197 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
198 (package
199 (inherit base)
200 (propagated-inputs
201 `(("python2-enum34" ,python2-enum34) ;optional
202 ,@(package-propagated-inputs base))))))
203
204 (define-public python-shapely
205 (package
206 (name "python-shapely")
207 (version "1.6.4.post2")
208 (source
209 (origin
210 (method url-fetch)
211 (uri (pypi-uri "Shapely" version))
212 (sha256
213 (base32
214 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
215 (build-system python-build-system)
216 (native-inputs
217 `(("python-cython" ,python-cython)
218 ("python-matplotlib" ,python-matplotlib)
219 ("python-pytest" ,python-pytest)
220 ("python-pytest-cov" ,python-pytest-cov)))
221 (inputs
222 `(("geos" ,geos)))
223 (propagated-inputs
224 `(("python-numpy" ,python-numpy)))
225 (arguments
226 `(#:phases
227 (modify-phases %standard-phases
228 (add-after 'unpack 'patch-geos-path
229 (lambda* (#:key inputs #:allow-other-keys)
230 (let ((geos (assoc-ref inputs "geos"))
231 (glibc (assoc-ref inputs ,(if (%current-target-system)
232 "cross-libc" "libc"))))
233 (substitute* "shapely/geos.py"
234 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
235 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
236 geos "/lib/libgeos_c.so'])"))
237 (("free = load_dll\\('c'\\)\\.free")
238 (string-append "free = load_dll('c', fallbacks=['"
239 glibc "/lib/libc.so.6']).free"))))
240 #t)))))
241 (home-page "https://github.com/Toblerity/Shapely")
242 (synopsis "Library for the manipulation and analysis of geometric objects")
243 (description "Shapely is a Python package for manipulation and analysis of
244 planar geometric objects. It is based on the @code{GEOS} library.")
245 (license license:bsd-3)))
246
247 (define-public python-shortuuid
248 (package
249 (name "python-shortuuid")
250 (version "0.5.0")
251 (source
252 (origin
253 (method url-fetch)
254 (uri (pypi-uri "shortuuid" version))
255 (sha256
256 (base32
257 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
258 (build-system python-build-system)
259 (native-inputs
260 `(("python-pep8" ,python-pep8)))
261 (home-page "https://github.com/skorokithakis/shortuuid")
262 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
263 (description
264 "@code{shortuuid} is a Python library for generating concise, unambiguous
265 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
266 module and then similar looking characters are removed.")
267 (license license:bsd-3)))
268
269 (define-public python-logwrap
270 (package
271 (name "python-logwrap")
272 (version "3.2.1")
273 (source
274 (origin
275 (method url-fetch)
276 (uri (pypi-uri "logwrap" version ".zip"))
277 (sha256
278 (base32
279 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
280 (build-system python-build-system)
281 (propagated-inputs
282 `(("python-six" ,python-six)
283 ("python-typing" ,python-typing)))
284 (native-inputs
285 `(("unzip" ,unzip)
286 ("python-cython" ,python-cython)
287 ("python-pytest" ,python-pytest)
288 ("python-pytest-cov" ,python-pytest-cov)
289 ("python-pytest-runner" ,python-pytest-runner)))
290 (home-page "https://github.com/penguinolog/logwrap")
291 (synopsis "Decorator for logging function arguments")
292 (description "This package provides a decorator to log function arguments
293 and function call return values in a human-readable way.")
294 (license license:asl2.0)))
295
296 (define-public python2-shapely
297 (package-with-python2 python-shapely))
298
299 (define-public python-clyent
300 (package
301 (name "python-clyent")
302 (version "1.2.1")
303 (source
304 (origin
305 (method url-fetch)
306 (uri (pypi-uri "clyent" version))
307 (sha256
308 (base32
309 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
310 (build-system python-build-system)
311 (native-inputs
312 `(("python-mock" ,python-mock)))
313 (home-page "https://github.com/binstar/clyent")
314 (synopsis "Command line client library")
315 (description "Clyent is a Python command line utiliy library. It is used
316 by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
317 (license license:bsd-3)))
318
319 (define-public python2-clyent
320 (package-with-python2 python-clyent))
321
322 (define-public python-babel
323 (package
324 (name "python-babel")
325 (version "2.7.0")
326 (source
327 (origin
328 (method url-fetch)
329 (uri (pypi-uri "Babel" version))
330 (sha256
331 (base32
332 "0a7wawx8vsg7igvz6p3x909fskhg4b2y1910xk4f4c8y22p3aqg8"))))
333 (build-system python-build-system)
334 (native-inputs
335 `(("python-freezegun" ,python-freezegun)
336 ("python-pytest" ,python-pytest)))
337 (propagated-inputs
338 `(("python-pytz" ,python-pytz)))
339 (arguments
340 `(#:phases (modify-phases %standard-phases
341 (replace 'check
342 (lambda _
343 (invoke "pytest" "-vv" "-k"
344 (string-append
345 ;; XXX: These tests fail when using Pytest 4.x and
346 ;; Babel 2.6.0. Try removing this for later versions.
347 "not test_no_inherit_metazone_marker_never_in_output"
348 " and not test_smoke_dates"
349 " and not test_smoke_numbers")))))))
350 (home-page "http://babel.pocoo.org/")
351 (synopsis
352 "Tools for internationalizing Python applications")
353 (description
354 "Babel is composed of two major parts:
355 - tools to build and work with gettext message catalogs
356 - a Python interface to the CLDR (Common Locale Data Repository), providing
357 access to various locale display names, localized number and date formatting,
358 etc. ")
359 (license license:bsd-3)))
360
361 (define-public python2-babel
362 (package-with-python2 python-babel))
363
364 ;; Sphinx < 2.0 requires this version. Remove once no longer needed.
365 (define-public python2-babel-2.6
366 (package
367 (inherit python2-babel)
368 (version "2.6.0")
369 (source (origin
370 (method url-fetch)
371 (uri (pypi-uri "Babel" version))
372 (sha256
373 (base32
374 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
375
376 (define-public python2-backport-ssl-match-hostname
377 (package
378 (name "python2-backport-ssl-match-hostname")
379 (version "3.5.0.1")
380 (source
381 (origin
382 (method url-fetch)
383 (uri (pypi-uri "backports.ssl_match_hostname" version))
384 (sha256
385 (base32
386 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
387 (build-system python-build-system)
388 (arguments
389 `(#:python ,python-2
390 #:tests? #f)) ; no test target
391 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
392 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
393 (description
394 "This backport brings the ssl.match_hostname() function to users of
395 earlier versions of Python. The function checks the hostname in the
396 certificate returned by the server to which a connection has been established,
397 and verifies that it matches the intended target hostname.")
398 (license license:psfl)))
399
400 (define-public python-boolean.py
401 (package
402 (name "python-boolean.py")
403 (version "3.6")
404 (source
405 (origin
406 ;; There's no source tarball on PyPI.
407 (method git-fetch)
408 (uri (git-reference
409 (url "https://github.com/bastikr/boolean.py")
410 (commit (string-append "v" version))))
411 (file-name (git-file-name name version))
412 (sha256
413 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
414 (build-system python-build-system)
415 (home-page "https://github.com/bastikr/boolean.py")
416 (synopsis "Boolean algebra in one Python module")
417 (description
418 "This is a small Python library that implements boolean algebra.
419 It defines two base elements, @code{TRUE} and @code{FALSE}, and a
420 @code{Symbol} class that can take on one of these two values. Calculations
421 are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
422 compositions like @code{XOR} and @code{NAND} are emulated on top of them.
423 Expressions are constructed from parsed strings or directly in Python.")
424 (license license:bsd-2)))
425
426 (define-public python-hdf4
427 (package
428 (name "python-hdf4")
429 (version "0.9")
430 (source
431 (origin
432 (method url-fetch)
433 (uri (pypi-uri name version))
434 (sha256
435 (base32
436 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
437 (build-system python-build-system)
438 (native-inputs `(("nose" ,python-nose)))
439 (propagated-inputs `(("numpy" ,python-numpy)))
440 (inputs
441 `(("hdf4" ,hdf4)
442 ("libjpeg" ,libjpeg)
443 ("zlib" ,zlib)))
444 (arguments
445 `(#:phases
446 (modify-phases %standard-phases
447 (replace 'check
448 (lambda _
449 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
450 ;; on to import numpy. Somehow this works on their CI system.
451 ;; Let's just manage PYTHONPATH here instead.
452 (substitute* "runexamples.sh"
453 (("export PYTHONPATH=.*") ""))
454 (setenv "PYTHONPATH"
455 (string-append (getcwd) ":"
456 (getenv "PYTHONPATH")))
457 (invoke "./runexamples.sh")
458 (invoke "nosetests" "-v"))))))
459 (home-page "https://github.com/fhs/python-hdf4")
460 (synopsis "Python interface to the NCSA HDF4 library")
461 (description
462 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
463 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
464 NetCDF files can also be read and modified. Python-HDF4 is a fork of
465 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
466 (license license:expat)))
467
468 (define-public python2-hdf4
469 (package-with-python2 python-hdf4))
470
471 (define-public python-h5py
472 (package
473 (name "python-h5py")
474 (version "2.8.0")
475 (source
476 (origin
477 (method url-fetch)
478 (uri (pypi-uri "h5py" version))
479 (sha256
480 (base32
481 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
482 (build-system python-build-system)
483 (arguments
484 `(#:tests? #f ; no test target
485 #:phases
486 (modify-phases %standard-phases
487 (add-after 'unpack 'fix-hdf5-paths
488 (lambda* (#:key inputs #:allow-other-keys)
489 (let ((prefix (assoc-ref inputs "hdf5")))
490 (substitute* "setup_build.py"
491 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
492 (string-append "['" prefix "/lib" "']"))
493 (("'/opt/local/include', '/usr/local/include'")
494 (string-append "'" prefix "/include" "'")))
495 (substitute* "setup_configure.py"
496 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
497 (string-append "['" prefix "/lib" "']")))
498 #t))))))
499 (propagated-inputs
500 `(("python-six" ,python-six)
501 ("python-numpy" ,python-numpy)))
502 (inputs
503 `(("hdf5" ,hdf5)))
504 (native-inputs
505 `(("python-cython" ,python-cython)
506 ("python-pkgconfig" ,python-pkgconfig)))
507 (home-page "http://www.h5py.org/")
508 (synopsis "Read and write HDF5 files from Python")
509 (description
510 "The h5py package provides both a high- and low-level interface to the
511 HDF5 library from Python. The low-level interface is intended to be a
512 complete wrapping of the HDF5 API, while the high-level component supports
513 access to HDF5 files, datasets and groups using established Python and NumPy
514 concepts.")
515 (license license:bsd-3)))
516
517 (define-public python2-h5py
518 (package-with-python2 python-h5py))
519
520 (define-public python-sh
521 (package
522 (name "python-sh")
523 (version "1.12.14")
524 (source
525 (origin
526 (method url-fetch)
527 (uri (pypi-uri "sh" version))
528 (sha256
529 (base32
530 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
531 (build-system python-build-system)
532 (arguments
533 '(#:phases
534 (modify-phases %standard-phases
535 (replace 'check
536 (lambda _
537 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
538 (setenv "HOME" "/tmp")
539 (invoke "python" "sh.py" "test"))))))
540 (native-inputs
541 `(("python-coverage" ,python-coverage)))
542 (home-page "https://github.com/amoffat/sh")
543 (synopsis "Python subprocess replacement")
544 (description "This package provides a replacement for Python's
545 @code{subprocess} feature.")
546 (license license:expat)))
547
548 (define-public python2-sh
549 (package-with-python2 python-sh))
550
551 (define-public python-cftime
552 (package
553 (name "python-cftime")
554 (version "1.0.4.2")
555 (source
556 (origin
557 (method url-fetch)
558 (uri (pypi-uri "cftime" version))
559 (sha256
560 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
561 (build-system python-build-system)
562 (propagated-inputs
563 `(("python-numpy" ,python-numpy)))
564 (native-inputs
565 `(("python-coveralls" ,python-coveralls)
566 ("python-cython" ,python-cython)
567 ("python-pytest-cov" ,python-pytest-cov)))
568 (home-page "https://github.com/Unidata/cftime")
569 (synopsis "Library for time handling")
570 (description
571 "This package provides time-handling functionality that used to be part
572 of the netcdf4 package before.")
573 ;; This package claims to include code under the GPLv3 but is released
574 ;; under ISC.
575 (license (list license:isc license:gpl3+))))
576
577 (define-public python-netcdf4
578 (package
579 (name "python-netcdf4")
580 (version "1.4.2")
581 (source
582 (origin
583 (method url-fetch)
584 (uri (pypi-uri "netCDF4" version))
585 (sha256
586 (base32
587 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
588 (build-system python-build-system)
589 (arguments
590 '(#:phases
591 (modify-phases %standard-phases
592 (add-after 'unpack 'configure-locations
593 (lambda* (#:key inputs #:allow-other-keys)
594 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
595 #t)))))
596 (native-inputs
597 `(("python-cython" ,python-cython)))
598 (propagated-inputs
599 `(("python-numpy" ,python-numpy)
600 ("python-cftime" ,python-cftime)))
601 (inputs
602 `(("netcdf" ,netcdf)
603 ("hdf4" ,hdf4)
604 ("hdf5" ,hdf5)))
605 (home-page "https://github.com/Unidata/netcdf4-python")
606 (synopsis "Python/numpy interface to the netCDF library")
607 (description "Netcdf4-python is a Python interface to the netCDF C
608 library. netCDF version 4 has many features not found in earlier
609 versions of the library and is implemented on top of HDF5. This module
610 can read and write files in both the new netCDF 4 and the old netCDF 3
611 format, and can create files that are readable by HDF5 clients. The
612 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
613 to users of that module.")
614 ;; The software is mainly ISC, but includes some files covered
615 ;; by the Expat license.
616 (license (list license:isc license:expat))))
617
618 (define-public python2-netcdf4
619 (package-with-python2 python-netcdf4))
620
621 (define-public python-license-expression
622 (package
623 (name "python-license-expression")
624 (version "0.999")
625 (source
626 (origin
627 (method url-fetch)
628 (uri (pypi-uri "license-expression" version))
629 (sha256
630 (base32 "08ppb0bxbrsxazy88sgpl9yffvdsabw6dkk1nc332wcz2mphwwyf"))))
631 (build-system python-build-system)
632 (propagated-inputs
633 `(("python-boolean.py" ,python-boolean.py)))
634 (home-page "https://github.com/nexB/license-expression")
635 (synopsis "Apply boolean logic to license expressions")
636 (description
637 "This Python module defines a tiny language to evaluate and compare
638 license expressions using boolean logic. Logical combinations of licenses can
639 be tested for equality, containment, and equivalence. They can be normalised
640 and simplified. It supports SPDX license expressions as well as other naming
641 conventions and aliases in the same expression.")
642 (license license:gpl2+)))
643
644 (define-public python-lockfile
645 (package
646 (name "python-lockfile")
647 (version "0.12.2")
648 (source
649 (origin
650 (method url-fetch)
651 (uri (pypi-uri "lockfile" version))
652 (sha256
653 (base32
654 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
655 (build-system python-build-system)
656 (arguments '(#:test-target "check"))
657 (native-inputs
658 `(("python-pbr" ,python-pbr)))
659 (home-page "https://launchpad.net/pylockfile")
660 (synopsis "Platform-independent file locking module")
661 (description
662 "The lockfile package exports a LockFile class which provides a simple
663 API for locking files.")
664 (license license:expat)))
665
666 (define-public python2-lockfile
667 (package-with-python2 python-lockfile))
668
669 (define-public python-semantic-version
670 (package
671 (name "python-semantic-version")
672 (version "2.6.0")
673 (source
674 (origin
675 (method url-fetch)
676 (uri (pypi-uri "semantic_version" version))
677 (sha256
678 (base32
679 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
680 (build-system python-build-system)
681 (arguments
682 `(#:tests? #f)) ; PyPI tarball lacks tests
683 (home-page "https://github.com/rbarrois/python-semanticversion")
684 (synopsis "Semantic versioning module for Python")
685 (description
686 "The @code{semantic_version} class is a small library for handling
687 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
688
689 It can compare versions, generate a new version that represents a bump in one of
690 the version levels, and check whether any given string is a proper semantic
691 version identifier.")
692 (license license:bsd-3)))
693
694 (define-public python2-semantic-version
695 (package-with-python2 python-semantic-version))
696
697 (define-public python-serpent
698 (package
699 (name "python-serpent")
700 (version "1.28")
701 (source
702 (origin
703 (method url-fetch)
704 (uri (pypi-uri "serpent" version))
705 (sha256
706 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
707 (build-system python-build-system)
708 (native-inputs
709 `(("python-attrs" ,python-attrs)
710 ("python-pytz" ,python-pytz)))
711 (home-page "https://github.com/irmen/Serpent")
712 (synopsis "Serializer for literal Python expressions")
713 (description
714 "Serpent provides @code{ast.literal_eval()}-compatible object tree
715 serialization. It serializes an object tree into bytes (an utf-8 encoded
716 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
717 to rebuild the original object tree.
718
719 Because only safe literals are encoded, it is safe to send serpent data to
720 other machines, such as over the network.")
721 (license license:expat)))
722
723 (define-public python-setuptools
724 (package
725 (name "python-setuptools")
726 (version "41.0.1")
727 (source
728 (origin
729 (method url-fetch)
730 (uri (pypi-uri "setuptools" version ".zip"))
731 (sha256
732 (base32
733 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
734 (modules '((guix build utils)))
735 (snippet
736 '(begin
737 ;; Remove included binaries which are used to build self-extracting
738 ;; installers for Windows.
739 ;; TODO: Find some way to build them ourself so we can include them.
740 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
741 #t))))
742 (build-system python-build-system)
743 ;; FIXME: Tests require pytest, which itself relies on setuptools.
744 ;; One could bootstrap with an internal untested setuptools.
745 (arguments
746 `(#:tests? #f))
747 (home-page "https://pypi.python.org/pypi/setuptools")
748 (synopsis
749 "Library designed to facilitate packaging Python projects")
750 (description
751 "Setuptools is a fully-featured, stable library designed to facilitate
752 packaging Python projects, where packaging includes:
753 Python package and module definitions,
754 distribution package metadata,
755 test hooks,
756 project installation,
757 platform-specific details,
758 Python 3 support.")
759 ;; TODO: setuptools now bundles the following libraries:
760 ;; packaging, pyparsing, six and appdirs. How to unbundle?
761 (license (list license:psfl ; setuptools itself
762 license:expat ; six, appdirs, pyparsing
763 license:asl2.0 ; packaging is dual ASL2/BSD-2
764 license:bsd-2))))
765
766 (define-public python2-setuptools
767 (package-with-python2 python-setuptools))
768
769 ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
770 (define-public python-setuptools-for-tensorflow
771 (hidden-package
772 (package
773 (inherit python-setuptools)
774 (version "39.1.0")
775 (source (origin
776 (inherit (package-source python-setuptools))
777 (uri (pypi-uri "setuptools" version ".zip"))
778 (sha256
779 (base32
780 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
781
782 (define-public python-uniseg
783 (package
784 (name "python-uniseg")
785 (version "0.7.1")
786 (source
787 (origin
788 (method url-fetch)
789 (uri (pypi-uri "uniseg" version ".zip"))
790 (sha256
791 (base32
792 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
793 (build-system python-build-system)
794 (arguments
795 '(#:tests? #f)) ; The test suite requires network access.
796 (native-inputs
797 `(("unzip" ,unzip)))
798 (home-page
799 "https://bitbucket.org/emptypage/uniseg-python")
800 (synopsis
801 "Python library to determine Unicode text segmentations")
802 (description
803 "Uniseg is a Python package used to determine Unicode text segmentations.
804 Supported segmentations include:
805 @enumerate
806 @item @dfn{Code point} (any value in the Unicode codespace)
807 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
808 multiple Unicode code points, e.g. \"G\" + acute-accent)
809 @item Word break
810 @item Sentence break
811 @item Line break
812 @end enumerate")
813 (license license:expat)))
814
815 (define-public python2-uniseg
816 (package-with-python2 python-uniseg))
817
818 (define-public python-humanfriendly
819 (package
820 (name "python-humanfriendly")
821 (version "4.4.1")
822 (source
823 (origin
824 (method url-fetch)
825 (uri (pypi-uri "humanfriendly" version))
826 (sha256
827 (base32
828 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
829 (build-system python-build-system)
830 (arguments
831 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
832 #:tests? #f))
833 (propagated-inputs
834 `(("python-monotonic" ,python-monotonic)))
835 (home-page "https://humanfriendly.readthedocs.io")
836 (synopsis "Human-friendly input and output in Python")
837 (description
838 "The functions and classes in @code{humanfriendly} can be used to make
839 text interfaces more user-friendly. It includes tools to parse and format
840 numbers, file sizes, and timespans, timers for long-running operations, menus
841 to allow the user to choose from a list of options, and terminal interaction
842 helpers.")
843 (license license:expat)))
844
845 (define-public python2-humanfriendly
846 (package-with-python2 python-humanfriendly))
847
848 (define-public python-capturer
849 (package
850 (name "python-capturer")
851 (version "2.4")
852 (source
853 (origin
854 (method url-fetch)
855 (uri (pypi-uri "capturer" version))
856 (sha256
857 (base32
858 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
859 (build-system python-build-system)
860 (arguments
861 `(#:tests? #f))
862 (propagated-inputs
863 `(("python-humanfriendly" ,python-humanfriendly)))
864 (home-page "https://capturer.readthedocs.io")
865 (synopsis "Capture stdout and stderr streams of the current process")
866 (description
867 "The capturer package makes it easy to capture the stdout and stderr
868 streams of the current process and subprocesses. Output can be relayed
869 to the terminal in real time but is also available to the Python program
870 for additional processing.")
871 (license license:expat)))
872
873 (define-public python2-capturer
874 (package-with-python2 python-capturer))
875
876 (define-public python-case
877 (package
878 (name "python-case")
879 (version "1.5.3")
880 (source
881 (origin
882 (method url-fetch)
883 (uri (pypi-uri "case" version))
884 (sha256
885 (base32
886 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
887 (build-system python-build-system)
888 (propagated-inputs
889 `(("python-mock" ,python-mock)
890 ("python-nose" ,python-nose)
891 ("python-six" ,python-six)
892 ("python-unittest2" ,python-unittest2)))
893 (native-inputs
894 `(("python-coverage" ,python-coverage)))
895 (home-page "https://github.com/celery/case")
896 (synopsis "Unittest utilities and convenience methods")
897 (description
898 "The @code{case} package provides utilities on top of unittest, including
899 some helpful Python 2 compatibility convenience methods.")
900 (license license:bsd-3)))
901
902 (define-public python-verboselogs
903 (package
904 (name "python-verboselogs")
905 (version "1.7")
906 (source
907 (origin
908 (method url-fetch)
909 (uri (pypi-uri "verboselogs" version))
910 (sha256
911 (base32
912 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
913 (build-system python-build-system)
914 (arguments
915 `(#:phases
916 (modify-phases %standard-phases
917 (replace 'check
918 (lambda _
919 ;; Do not run pylint plugin test, as astroid is an old
920 ;; unsupported version.
921 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
922 "verboselogs/tests.py"))))))
923 (native-inputs
924 `(("python-mock" ,python-mock)
925 ("python-pytest" ,python-pytest)))
926 (home-page "https://verboselogs.readthedocs.io")
927 (synopsis "Verbose logging level for Python's logging module")
928 (description
929 "The @code{verboselogs} package extends Python's @code{logging} module to
930 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
931 (license license:expat)))
932
933 (define-public python2-verboselogs
934 (package-with-python2 python-verboselogs))
935
936 (define-public python-coloredlogs
937 (package
938 (name "python-coloredlogs")
939 (version "10.0")
940 (source
941 (origin
942 (method url-fetch)
943 (uri (pypi-uri "coloredlogs" version))
944 (sha256
945 (base32
946 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
947 (build-system python-build-system)
948 (arguments
949 `(;Tests require some updated modules
950 #:tests? #f))
951 (propagated-inputs
952 `(("python-capturer" ,python-capturer)))
953 (home-page "https://coloredlogs.readthedocs.io")
954 (synopsis "Colored stream handler for Python's logging module")
955 (description
956 "The @code{coloredlogs} package enables colored terminal output for
957 Python's logging module. The @code{ColoredFormatter} class inherits from
958 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
959 messages in color.")
960 (license license:expat)))
961
962 (define-public python2-coloredlogs
963 (package-with-python2 python-coloredlogs))
964
965 (define-public python-editorconfig
966 (package
967 (name "python-editorconfig")
968 (version "0.12.2")
969 (source
970 (origin
971 (method url-fetch)
972 (uri (pypi-uri "EditorConfig" version))
973 (sha256
974 (base32
975 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
976 (build-system python-build-system)
977 (home-page "https://editorconfig.org/")
978 (synopsis "EditorConfig bindings for python")
979 (description "The EditorConfig project consists of a file format for
980 defining coding styles and a collection of text editor plugins that enable
981 editors to read the file format and adhere to defined styles. EditorConfig
982 files are easily readable and they work nicely with version control systems.")
983 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
984 (license (list license:bsd-2 license:psfl))))
985
986 (define-public python-et-xmlfile
987 (package
988 (name "python-et-xmlfile")
989 (version "1.0.1")
990 (source
991 (origin
992 (method url-fetch)
993 (uri (pypi-uri "et_xmlfile" version))
994 (sha256
995 (base32
996 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
997 (build-system python-build-system)
998 (arguments
999 `(#:phases (modify-phases %standard-phases
1000 (replace 'check
1001 (lambda _
1002 (invoke "pytest"))))))
1003 (native-inputs
1004 `(("python-pytest" ,python-pytest)
1005 ("python-lxml" ,python-lxml))) ;used for the tests
1006 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
1007 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
1008 (description "This Python library is based upon the @code{xmlfile} module
1009 from @code{lxml}. It aims to provide a low memory, compatible implementation
1010 of @code{xmlfile}.")
1011 (license license:expat)))
1012
1013 (define-public python2-et-xmlfile
1014 (package-with-python2 python-et-xmlfile))
1015
1016 (define-public python-openpyxl
1017 (package
1018 (name "python-openpyxl")
1019 (version "2.6.2")
1020 (source
1021 (origin
1022 ;; We use the upstream repository, as the tests are not included in the
1023 ;; PyPI releases.
1024 (method hg-fetch)
1025 (uri (hg-reference
1026 (url "https://bitbucket.org/openpyxl/openpyxl")
1027 (changeset version)))
1028 (file-name (string-append name "-" version "-checkout"))
1029 (sha256
1030 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
1031 (build-system python-build-system)
1032 (arguments
1033 `(#:phases (modify-phases %standard-phases
1034 (replace 'check
1035 (lambda _
1036 (invoke "pytest"))))))
1037 (native-inputs
1038 ;; For the test suite.
1039 `(("python-lxml" ,python-lxml)
1040 ("python-pillow" ,python-pillow)
1041 ("python-pytest" ,python-pytest)))
1042 (propagated-inputs
1043 `(("python-et-xmlfile" ,python-et-xmlfile)
1044 ("python-jdcal" ,python-jdcal)))
1045 (home-page "https://openpyxl.readthedocs.io")
1046 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1047 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1048 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1049 standard.")
1050 (license license:expat)))
1051
1052 (define-public python-eventlet
1053 (package
1054 (name "python-eventlet")
1055 (version "0.25.1")
1056 (source
1057 (origin
1058 (method url-fetch)
1059 (uri (pypi-uri "eventlet" version))
1060 (sha256
1061 (base32
1062 "1hgz8jq19wlz8vwqj900ry8cjv578nz4scc91mlc8944yid6573c"))))
1063 (build-system python-build-system)
1064 (propagated-inputs
1065 `(("python-greenlet" ,python-greenlet)))
1066 (arguments
1067 ;; TODO: Requires unpackaged 'enum-compat'.
1068 '(#:tests? #f))
1069 (home-page "https://eventlet.net")
1070 (synopsis "Concurrent networking library for Python")
1071 (description
1072 "Eventlet is a concurrent networking library for Python that
1073 allows you to change how you run your code, not how you write it.
1074 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1075 Coroutines ensure that the developer uses a blocking style of programming
1076 that is similar to threading, but provide the benefits of non-blocking I/O.
1077 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1078 from the Python interpreter, or as a small part of a larger application.")
1079 (license license:expat)))
1080
1081 (define-public python2-eventlet
1082 (let ((base (package-with-python2
1083 (strip-python2-variant python-eventlet))))
1084 (package (inherit base)
1085 (propagated-inputs
1086 `(("python2-enum34" ,python2-enum34)
1087 ,@(package-propagated-inputs base))))))
1088
1089 (define-public python-six
1090 (package
1091 (name "python-six")
1092 (version "1.12.0")
1093 (source
1094 (origin
1095 (method url-fetch)
1096 (uri (pypi-uri "six" version))
1097 (sha256
1098 (base32
1099 "0wxs1q74v07ssjywbbm7x6h5v9qx209ld2yfsif4060sxi0h2sni"))))
1100 (build-system python-build-system)
1101 (arguments
1102 `(#:phases
1103 (modify-phases %standard-phases
1104 (replace 'check
1105 (lambda _
1106 (invoke "py.test" "-v"))))))
1107 (native-inputs
1108 `(("python-py" ,python-py)
1109 ("python-pytest" ,python-pytest-bootstrap)))
1110 (home-page "https://pypi.python.org/pypi/six/")
1111 (synopsis "Python 2 and 3 compatibility utilities")
1112 (description
1113 "Six is a Python 2 and 3 compatibility library. It provides utility
1114 functions for smoothing over the differences between the Python versions with
1115 the goal of writing Python code that is compatible on both Python versions.
1116 Six supports every Python version since 2.5. It is contained in only one
1117 Python file, so it can be easily copied into your project.")
1118 (license license:x11)))
1119
1120 (define-public python2-six
1121 (package-with-python2 python-six))
1122
1123 (define-public python-six-bootstrap
1124 (package
1125 (inherit python-six)
1126 (name "python-six-bootstrap")
1127 (native-inputs `())
1128 (arguments `(#:tests? #f))))
1129
1130 (define-public python2-six-bootstrap
1131 (package-with-python2 python-six-bootstrap))
1132
1133 (define-public python-schedule
1134 (package
1135 (name "python-schedule")
1136 (version "0.4.3")
1137 (source
1138 (origin
1139 (method url-fetch)
1140 (uri (pypi-uri "schedule" version))
1141 (sha256
1142 (base32
1143 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1144 (build-system python-build-system)
1145 (native-inputs
1146 `(("python-pytest" ,python-pytest)
1147 ("python-mock" ,python-mock)))
1148 (home-page "https://github.com/dbader/schedule")
1149 (synopsis "Schedule periodic function calls in Python")
1150 (description
1151 "Schedule is an in-process scheduler for periodic jobs that uses the
1152 builder pattern for configuration. Schedule lets you run Python functions (or
1153 any other callable) periodically at pre-determined intervals using a simple,
1154 human-friendly syntax.")
1155 (license license:expat)))
1156
1157 (define-public python2-schedule
1158 (package-with-python2 python-schedule))
1159
1160 (define-public python2-mechanize
1161 (package
1162 (name "python2-mechanize")
1163 (version "0.2.5")
1164 (source
1165 (origin
1166 (method url-fetch)
1167 (uri (pypi-uri "mechanize" version))
1168 (sha256
1169 (base32
1170 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1171 (build-system python-build-system)
1172 (arguments
1173 `(#:python ,python-2 ; apparently incompatible with Python 3
1174 #:tests? #f))
1175 ;; test fails with message
1176 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1177 ;; (python-3.3.2) or
1178 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1179 ;; (python-2.7.5).
1180 ;; The source code is from March 2011 and probably not up-to-date
1181 ;; with respect to python unit tests.
1182 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1183 (synopsis
1184 "Stateful programmatic web browsing in Python")
1185 (description
1186 "Mechanize implements stateful programmatic web browsing in Python,
1187 after Andy Lester’s Perl module WWW::Mechanize.")
1188 (license (license:non-copyleft
1189 "file://COPYING"
1190 "See COPYING in the distribution."))))
1191
1192
1193 (define-public python-simplejson
1194 (package
1195 (name "python-simplejson")
1196 (version "3.14.0")
1197 (source
1198 (origin
1199 (method url-fetch)
1200 (uri (pypi-uri "simplejson" version))
1201 (sha256
1202 (base32
1203 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1204 (build-system python-build-system)
1205 (home-page "http://simplejson.readthedocs.org/en/latest/")
1206 (synopsis
1207 "Json library for Python")
1208 (description
1209 "JSON (JavaScript Object Notation) is a subset of JavaScript
1210 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1211 format.
1212
1213 Simplejson exposes an API familiar to users of the standard library marshal
1214 and pickle modules. It is the externally maintained version of the json
1215 library contained in Python 2.6, but maintains compatibility with Python 2.5
1216 and (currently) has significant performance advantages, even without using
1217 the optional C extension for speedups. Simplejson is also supported on
1218 Python 3.3+.")
1219 (license license:x11)))
1220
1221 (define-public python2-simplejson
1222 (package-with-python2 python-simplejson))
1223
1224
1225 (define-public python-pyicu
1226 (package
1227 (name "python-pyicu")
1228 (version "2.3.1")
1229 (source
1230 (origin
1231 (method url-fetch)
1232 (uri (pypi-uri "PyICU" version))
1233 (sha256
1234 (base32
1235 "1x4w8m7ifki9z2a187pgjr33z6z0rp2fii9b73djak1vhm9v9cnx"))))
1236 (build-system python-build-system)
1237 (inputs
1238 `(("icu4c" ,icu4c)))
1239 (native-inputs
1240 `(("python-pytest" ,python-pytest)
1241 ("python-six" ,python-six)))
1242 (home-page "https://github.com/ovalhub/pyicu")
1243 (synopsis "Python extension wrapping the ICU C++ API")
1244 (description
1245 "PyICU is a python extension wrapping the ICU C++ API.")
1246 (properties `((python2-variant . ,(delay python2-pyicu))))
1247 (license license:x11)))
1248
1249 (define-public python2-pyicu
1250 (let ((base (package-with-python2
1251 (strip-python2-variant python-pyicu))))
1252 (package
1253 (inherit base)
1254 (arguments
1255 `(,@(package-arguments base)
1256 #:phases
1257 (modify-phases %standard-phases
1258 (add-before 'check 'delete-failing-test
1259 (λ _
1260 ;; XXX: This fails due to Unicode issues unique to Python 2,
1261 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1262 (delete-file "test/test_Script.py")
1263 #t))))))))
1264
1265 (define-public python2-dogtail
1266 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1267 ;; spaces in indentation" with Python 3.
1268 (package
1269 (name "python2-dogtail")
1270 (version "0.9.9")
1271 (source (origin
1272 (method url-fetch)
1273 (uri (pypi-uri "dogtail" version))
1274 (sha256
1275 (base32
1276 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1277 (build-system python-build-system)
1278 (arguments `(#:python ,python-2
1279 #:tests? #f)) ; invalid command "test"
1280 ;; Currently no offical homepage.
1281 (home-page "https://pypi.python.org/pypi/dogtail/")
1282 (synopsis "GUI test tool and automation framework written in Python")
1283 (description
1284 "Dogtail is a GUI test tool and automation framework written in Python.
1285 It uses Accessibility (a11y) technologies to communicate with desktop
1286 applications. dogtail scripts are written in Python and executed like any
1287 other Python program.")
1288 (license license:gpl2+)))
1289
1290 (define-public python-empy
1291 (package
1292 (name "python-empy")
1293 (version "3.3.3")
1294 (source (origin
1295 (method url-fetch)
1296 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1297 version ".tar.gz"))
1298 (sha256
1299 (base32
1300 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
1301 (build-system python-build-system)
1302 (arguments
1303 `(#:tests? #f)) ; python2 only
1304 (home-page "http://www.alcyone.com/software/empy/")
1305 (synopsis "Templating system for Python")
1306 (description
1307 "EmPy is a system for embedding Python expressions and statements in
1308 template text; it takes an EmPy source file, processes it, and produces
1309 output. This is accomplished via expansions, which are special signals to the
1310 EmPy system and are set off by a special prefix (by default the at sign, @@).
1311 EmPy can expand arbitrary Python expressions and statements in this way, as
1312 well as a variety of special forms. Textual data not explicitly delimited in
1313 this way is sent unaffected to the output, allowing Python to be used in
1314 effect as a markup language. Also supported are callbacks via hooks,
1315 recording and playback via diversions, and dynamic, chainable filters. The
1316 system is highly configurable via command line options and embedded
1317 commands.")
1318 (license license:lgpl2.1+)))
1319
1320 (define-public python2-empy
1321 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1322 (package
1323 (inherit base)
1324 (arguments `(,@(package-arguments base)
1325 #:tests? #t)))))
1326
1327 (define-public python2-element-tree
1328 (package
1329 (name "python2-element-tree")
1330 (version "1.2.6")
1331 (source (origin
1332 (method url-fetch)
1333 (uri (string-append
1334 "http://effbot.org/media/downloads/elementtree-"
1335 version "-20050316.tar.gz"))
1336 (sha256
1337 (base32
1338 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1339 (build-system python-build-system)
1340 (arguments
1341 `(#:python ,python-2 ; seems to be part of Python 3
1342 #:tests? #f)) ; no 'test' sub-command
1343 (synopsis "Toolkit for XML processing in Python")
1344 (description
1345 "ElementTree is a Python library supporting lightweight XML processing.")
1346 (home-page "http://effbot.org/zone/element-index.htm")
1347 (license (license:x11-style
1348 "http://docs.python.org/2/license.html"
1349 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1350
1351 (define-public python2-pybugz
1352 (package
1353 (name "python2-pybugz")
1354 (version "0.6.11")
1355 (source (origin
1356 (method url-fetch)
1357 (uri (string-append
1358 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1359 version ".tar.gz"))
1360 (sha256
1361 (base32
1362 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1363 (patches (search-patches "pybugz-stty.patch"
1364 "pybugz-encode-error.patch"))))
1365 (build-system python-build-system)
1366 (arguments
1367 `(#:python ,python-2 ; SyntaxError with Python 3
1368 #:tests? #f)) ; no 'test' sub-command
1369 (propagated-inputs
1370 `(("element-tree" ,python2-element-tree)))
1371 (synopsis "Python and command-line interface to Bugzilla")
1372 (description
1373 "PyBugz is a Python library and command-line tool to query the Bugzilla
1374 bug tracking system. It is meant as an aid to speed up interaction with the
1375 bug tracker.")
1376 (home-page "http://www.liquidx.net/pybugz/")
1377 (license license:gpl2)))
1378
1379 (define-public python2-enum
1380 (package
1381 (name "python2-enum")
1382 (version "0.4.6")
1383 (source (origin
1384 (method url-fetch)
1385 (uri (pypi-uri "enum" version))
1386 (sha256
1387 (base32
1388 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1389 (build-system python-build-system)
1390 (arguments
1391 `(#:python ,python-2))
1392 (home-page "http://pypi.python.org/pypi/enum/")
1393 (synopsis "Robust enumerated type support in Python")
1394 (description
1395 "This provides a module for robust enumerations in Python. It has
1396 been superseded by the Python standard library and is provided only for
1397 compatibility.")
1398 ;; Choice of either license.
1399 (license (list license:gpl3+ license:psfl))))
1400
1401 (define-public python-enum34
1402 (package
1403 (name "python-enum34")
1404 (version "1.1.6")
1405 (source
1406 (origin
1407 (method url-fetch)
1408 (uri (pypi-uri "enum34" version))
1409 (sha256
1410 (base32
1411 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1412 (build-system python-build-system)
1413 (home-page "https://pypi.python.org/pypi/enum34")
1414 (synopsis "Backported Python 3.4 Enum")
1415 (description
1416 "Enum34 is the new Python stdlib enum module available in Python 3.4
1417 backported for previous versions of Python from 2.4 to 3.3.")
1418 (license license:bsd-3)))
1419
1420 (define-public python2-enum34
1421 (package-with-python2 python-enum34))
1422
1423 (define-public python-parse-type
1424 (package
1425 (name "python-parse-type")
1426 (version "0.4.2")
1427 (source
1428 (origin
1429 (method url-fetch)
1430 (uri (pypi-uri "parse_type" version))
1431 (sha256
1432 (base32
1433 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1434 (build-system python-build-system)
1435 (propagated-inputs
1436 `(("python-six" ,python-six)
1437 ("python-parse" ,python-parse)))
1438 (native-inputs
1439 `(("python-pytest" ,python-pytest)
1440 ("python-pytest-runner" ,python-pytest-runner)))
1441 (home-page "https://github.com/jenisys/parse_type")
1442 (synopsis "Extended parse module")
1443 (description
1444 "Parse_type extends the python parse module.")
1445 (properties
1446 `((python2-variant . ,(delay python2-parse-type))))
1447 (license license:bsd-3)))
1448
1449 (define-public python2-parse-type
1450 (let ((base (package-with-python2
1451 (strip-python2-variant python-parse-type))))
1452 (package (inherit base)
1453 (propagated-inputs
1454 `(("python2-enum34" ,python2-enum34)
1455 ,@(package-propagated-inputs base))))))
1456
1457 (define-public python-parse
1458 (package
1459 (name "python-parse")
1460 (version "1.8.4")
1461 (source
1462 (origin
1463 (method url-fetch)
1464 (uri (pypi-uri "parse" version))
1465 (sha256
1466 (base32
1467 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1468 (build-system python-build-system)
1469 (arguments
1470 `(#:phases
1471 (modify-phases %standard-phases
1472 (replace 'check
1473 (lambda _ (invoke "python" "test_parse.py"))))))
1474 (home-page "https://github.com/r1chardj0n3s/parse")
1475 (synopsis "Parse strings")
1476 (description
1477 "Parse strings using a specification based on the Python @code{format()}
1478 syntax.")
1479 (license license:x11)))
1480
1481 (define-public python-polib
1482 (package
1483 (name "python-polib")
1484 (version "1.0.8")
1485 (source (origin
1486 (method url-fetch)
1487 (uri (pypi-uri "polib" version))
1488 (sha256
1489 (base32
1490 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1491 (build-system python-build-system)
1492 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1493 (synopsis "Manipulate, create and modify gettext files")
1494 (description "Polib can manipulate any gettext format (po, pot and mo)
1495 files. It can be used to create po files from scratch or to modify
1496 existing ones.")
1497 (license license:expat)))
1498
1499 (define-public python2-polib
1500 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1501 (package
1502 (inherit base)
1503 (arguments `(,@(package-arguments base)
1504 ;; Tests don't work with python2.
1505 #:tests? #f)))))
1506
1507 (define-public python-poyo
1508 (package
1509 (name "python-poyo")
1510 (version "0.5.0")
1511 (source
1512 (origin
1513 (method url-fetch)
1514 (uri (pypi-uri "poyo" version))
1515 (sha256
1516 (base32
1517 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
1518 (build-system python-build-system)
1519 (home-page "https://github.com/hackebrot/poyo")
1520 (synopsis "Lightweight YAML Parser for Python")
1521 (description
1522 "This package provides a lightweight YAML Parser for Python. It supports
1523 only a chosen subset of the YAML format that is required to parse cookiecutter
1524 user configuration files. It does not have support for serializing into YAML
1525 and is not compatible with JSON.")
1526 (license license:expat)))
1527
1528 (define-public scons
1529 (package
1530 (name "scons")
1531 (version "3.0.4")
1532 (source (origin
1533 (method git-fetch)
1534 (uri (git-reference
1535 (url "https://github.com/SCons/scons.git")
1536 (commit version)))
1537 (file-name (git-file-name name version))
1538 (sha256
1539 (base32
1540 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
1541 (build-system python-build-system)
1542 (arguments
1543 `(#:use-setuptools? #f ; still relies on distutils
1544 #:tests? #f ; no 'python setup.py test' command
1545 #:phases
1546 (modify-phases %standard-phases
1547 (add-before 'build 'bootstrap
1548 (lambda _
1549 (substitute* "src/engine/SCons/compat/__init__.py"
1550 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1551 "sys.modules[new] = __import__(old)"))
1552 (substitute* "src/engine/SCons/Platform/__init__.py"
1553 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1554 "mod = __import__(full_name)"))
1555 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1556 (chdir "build/scons")
1557 #t)))))
1558 (home-page "http://scons.org/")
1559 (synopsis "Software construction tool written in Python")
1560 (description
1561 "SCons is a software construction tool. Think of SCons as an improved,
1562 cross-platform substitute for the classic Make utility with integrated
1563 functionality similar to autoconf/automake and compiler caches such as ccache.
1564 In short, SCons is an easier, more reliable and faster way to build
1565 software.")
1566 (license license:x11)))
1567
1568 (define-public scons-python2
1569 (package
1570 (inherit (package-with-python2 scons))
1571 (name "scons-python2")))
1572
1573 (define-public python-extras
1574 (package
1575 (name "python-extras")
1576 (version "1.0.0")
1577 (source
1578 (origin
1579 (method url-fetch)
1580 (uri (pypi-uri "extras" version))
1581 (sha256
1582 (base32
1583 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1584 (build-system python-build-system)
1585 (arguments
1586 ;; FIXME: Circular dependency on testtools.
1587 '(#:tests? #f))
1588 (home-page "https://github.com/testing-cabal/extras")
1589 (synopsis "Useful extensions to the Python standard library")
1590 (description
1591 "Extras is a set of extensions to the Python standard library.")
1592 (license license:expat)))
1593
1594 (define-public python2-extras
1595 (package-with-python2 python-extras))
1596
1597 (define-public python-mimeparse
1598 (package
1599 (name "python-mimeparse")
1600 (version "1.6.0")
1601 (source
1602 (origin
1603 (method url-fetch)
1604 (uri (pypi-uri "python-mimeparse" version))
1605 (sha256
1606 (base32
1607 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1608 (build-system python-build-system)
1609 (arguments
1610 '(#:phases
1611 (modify-phases %standard-phases
1612 (replace 'check
1613 (lambda _
1614 (invoke "./mimeparse_test.py"))))))
1615 (home-page
1616 "https://github.com/dbtsai/python-mimeparse")
1617 (synopsis "Python library for parsing MIME types")
1618 (description
1619 "Mimeparse provides basic functions for parsing MIME type names and
1620 matching them against a list of media-ranges.")
1621 (license license:expat)))
1622
1623 (define-public python2-mimeparse
1624 (package-with-python2 python-mimeparse))
1625
1626 (define-public python-miniboa
1627 (package
1628 (name "python-miniboa")
1629 (version "1.0.7")
1630 (source
1631 (origin
1632 (method url-fetch)
1633 (uri (pypi-uri "miniboa" version))
1634 (sha256
1635 (base32
1636 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1637 (build-system python-build-system)
1638 (home-page "https://github.com/shmup/miniboa")
1639 (synopsis "Simple, single-threaded Telnet server")
1640 (description
1641 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1642 server.")
1643 (license license:asl2.0)))
1644
1645 (define-public python2-miniboa
1646 (package-with-python2 python-miniboa))
1647
1648 (define-public python-pafy
1649 (package
1650 (name "python-pafy")
1651 (version "0.5.3.1")
1652 (source
1653 (origin
1654 (method url-fetch)
1655 (uri (pypi-uri "pafy" version))
1656 (sha256
1657 (base32
1658 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1659 (build-system python-build-system)
1660 (arguments
1661 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1662 (propagated-inputs
1663 ;; Youtube-dl is a python package which is imported in the file
1664 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1665 `(("youtube-dl" ,youtube-dl)))
1666 (home-page "https://np1.github.io/pafy/")
1667 (synopsis "Retrieve YouTube content and metadata")
1668 (description
1669 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1670 (license license:lgpl3+)))
1671
1672 (define-public python2-funcsigs
1673 (package
1674 (name "python2-funcsigs")
1675 (version "1.0.2")
1676 (source (origin
1677 (method url-fetch)
1678 (uri (pypi-uri "funcsigs" version))
1679 (sha256
1680 (base32
1681 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1682 (build-system python-build-system)
1683 (arguments
1684 `(#:python ,python-2))
1685 (native-inputs
1686 `(("python2-unittest2" ,python2-unittest2)))
1687 (home-page "http://funcsigs.readthedocs.org")
1688 (synopsis "Python function signatures from PEP362")
1689 (description
1690 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1691 (license license:asl2.0)))
1692
1693 (define-public python2-funcsigs-bootstrap
1694 (package
1695 (inherit python2-funcsigs)
1696 (name "python2-funcsigs-bootstrap")
1697 (native-inputs `())
1698 (arguments
1699 `(#:tests? #f
1700 ,@(package-arguments python2-funcsigs)))))
1701
1702 (define-public python-py
1703 (package
1704 (name "python-py")
1705 (version "1.8.0")
1706 (source
1707 (origin
1708 (method url-fetch)
1709 (uri (pypi-uri "py" version))
1710 (sha256
1711 (base32
1712 "0lsy1gajva083pzc7csj1cvbmminb7b4l6a0prdzyb3fd829nqyw"))))
1713 (build-system python-build-system)
1714 (arguments
1715 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1716 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1717 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1718 ;; Is this module globally installed?"
1719 '(#:tests? #f))
1720 (native-inputs
1721 `(("python-setuptools-scm" ,python-setuptools-scm)))
1722 (home-page "https://github.com/pytest-dev/py")
1723 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1724 (description
1725 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1726 code introspection, and logging.")
1727 (license license:expat)))
1728
1729 (define-public python2-py
1730 (package-with-python2 python-py))
1731
1732 ;; Recent versions of python-fixtures and python-testrepository need
1733 ;; python-pbr for packaging, which itself needs these two packages for
1734 ;; testing.
1735 ;; To fix this circular dependency, we use a build of python-pbr, based on the
1736 ;; same source, just without any test dependencies and with tests disabled.
1737 ;; python-pbr-minmal is then used to package python-fixtures and
1738 ;; python-testrepository.
1739 ;; Strictly speaking we currently could remove the test-requirements from the
1740 ;; normal python-pbr package (and save this package) since test are disabled
1741 ;; there anyway. But this may change in future.
1742 (define-public python-pbr-minimal
1743 (package
1744 (name "python-pbr-minimal")
1745 (version "3.0.1")
1746 (source
1747 (origin
1748 (method url-fetch)
1749 (uri (pypi-uri "pbr" version))
1750 (sha256
1751 (base32
1752 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1753 (build-system python-build-system)
1754 (arguments
1755 `(#:tests? #f))
1756 (home-page "http://docs.openstack.org/developer/pbr/")
1757 (synopsis "Minimal build of python-pbr used for bootstrapping")
1758 (description
1759 "Used only for bootstrapping python2-pbr, you should not need this.")
1760 (license license:asl2.0)))
1761
1762 (define-public python2-pbr-minimal
1763 (package-with-python2 python-pbr-minimal))
1764
1765 (define-public python-pbr
1766 (package
1767 (inherit python-pbr-minimal)
1768 (name "python-pbr")
1769 (arguments
1770 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1771 (propagated-inputs
1772 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1773 (native-inputs
1774 `(("python-fixtures" ,python-fixtures-bootstrap)
1775 ;; discover, coverage, hacking, subunit
1776 ("python-mock" ,python-mock)
1777 ("python-six" ,python-six)
1778 ("python-sphinx" ,python-sphinx)
1779 ("python-testrepository" ,python-testrepository-bootstrap)
1780 ("python-testresources" ,python-testresources-bootstrap)
1781 ("python-testscenarios" ,python-testscenarios-bootstrap)
1782 ("python-testtools" ,python-testtools-bootstrap)
1783 ("python-virtualenv" ,python-virtualenv)))
1784 (synopsis "Enhance the default behavior of Python’s setuptools")
1785 (description
1786 "Python Build Reasonableness (PBR) is a library that injects some useful
1787 and sensible default behaviors into your setuptools run. It will set
1788 versions, process requirements files and generate AUTHORS and ChangeLog file
1789 from git information.
1790 ")))
1791
1792 (define-public python2-pbr
1793 (package-with-python2 python-pbr))
1794
1795 (define-public python-pyrsistent
1796 (package
1797 (name "python-pyrsistent")
1798 (version "0.14.11")
1799 (home-page "https://github.com/tobgu/pyrsistent")
1800 (source (origin
1801 (method url-fetch)
1802 (uri (pypi-uri "pyrsistent" version))
1803 (sha256
1804 (base32
1805 "1qkh74bm296mp5g3r11lgsksr6bh4w1bf8pji4nmxdlfj542ga1w"))))
1806 (build-system python-build-system)
1807 (native-inputs
1808 `(("python-hypothesis" ,python-hypothesis)
1809 ("python-pytest" ,python-pytest)
1810 ("python-pytest-runner" ,python-pytest-runner)))
1811 (propagated-inputs
1812 `(("python-six" ,python-six)))
1813 (synopsis "Persistent data structures for Python")
1814 (description
1815 "Pyrsistent is a number of persistent collections (by some referred to as
1816 functional data structures). Persistent in the sense that they are immutable.
1817
1818 All methods on a data structure that would normally mutate it instead return a
1819 new copy of the structure containing the requested updates. The original
1820 structure is left untouched.")
1821 (license license:expat)))
1822
1823 (define-public python2-pyrsistent
1824 (package-with-python2 python-pyrsistent))
1825
1826 (define-public python-exif-read
1827 (package
1828 (name "python-exif-read")
1829 (version "2.1.2")
1830 (source (origin
1831 (method url-fetch)
1832 (uri (pypi-uri "ExifRead" version))
1833 (sha256
1834 (base32
1835 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1836 (build-system python-build-system)
1837 (arguments `(#:tests? #f)) ; no tests
1838 (home-page "https://github.com/ianare/exif-py")
1839 (synopsis "Python library to extract EXIF data from image files")
1840 (description
1841 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1842 files.")
1843 (license license:bsd-3)))
1844
1845 (define-public python2-exif-read
1846 (package-with-python2 python-exif-read))
1847
1848 (define-public python-pyld
1849 (package
1850 (name "python-pyld")
1851 (version "1.0.5")
1852 (source (origin
1853 (method url-fetch)
1854 (uri (pypi-uri "PyLD" version))
1855 (sha256
1856 (base32
1857 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
1858 (build-system python-build-system)
1859 (home-page "https://github.com/digitalbazaar/pyld")
1860 (synopsis "Python implementation of the JSON-LD specification")
1861 (description
1862 "PyLD is an implementation of the JSON-LD specification.")
1863 (license license:bsd-3)))
1864
1865 (define-public python2-pyld
1866 (package-with-python2 python-pyld))
1867
1868 (define-public python-click
1869 (package
1870 (name "python-click")
1871 (version "7.0")
1872 (source
1873 (origin
1874 (method url-fetch)
1875 (uri (pypi-uri "click" version))
1876 (sha256
1877 (base32
1878 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
1879 (build-system python-build-system)
1880 (arguments
1881 `(#:phases
1882 (modify-phases %standard-phases
1883 (add-after 'unpack 'fix-paths
1884 (lambda* (#:key inputs #:allow-other-keys)
1885 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1886 "cross-libc" "libc"))))
1887 (substitute* "click/_unicodefun.py"
1888 (("'locale'")
1889 (string-append "'" glibc "/bin/locale'"))))
1890 #t))
1891 (replace 'check
1892 (lambda _
1893 (invoke "python" "-m" "pytest"))))))
1894 (native-inputs
1895 `(("python-pytest" ,python-pytest)))
1896 (home-page "https://palletsprojects.com/p/click/")
1897 (synopsis "Command line library for Python")
1898 (description
1899 "Click is a Python package for creating command line interfaces in a
1900 composable way with as little code as necessary. Its name stands for
1901 \"Command Line Interface Creation Kit\". It's highly configurable but comes
1902 with sensible defaults out of the box.")
1903 (license license:bsd-3)))
1904
1905 (define-public python2-click
1906 (package-with-python2 python-click))
1907
1908 (define-public python-wheel
1909 (package
1910 (name "python-wheel")
1911 (version "0.32.3")
1912 (source
1913 (origin
1914 (method url-fetch)
1915 (uri (pypi-uri "wheel" version))
1916 (sha256
1917 (base32
1918 "1dhxl1bf18bx9szmqcnxbg6204hp3im8089q3hkwh5jfa6zh75q2"))))
1919 (build-system python-build-system)
1920 (native-inputs
1921 `(("python-jsonschema" ,python-jsonschema)
1922 ("python-pytest-cov" ,python-pytest-cov)))
1923 (home-page "https://bitbucket.org/pypa/wheel/")
1924 (synopsis "Format for built Python packages")
1925 (description
1926 "A wheel is a ZIP-format archive with a specially formatted filename and
1927 the @code{.whl} extension. It is designed to contain all the files for a PEP
1928 376 compatible install in a way that is very close to the on-disk format. Many
1929 packages will be properly installed with only the @code{Unpack} step and the
1930 unpacked archive preserves enough information to @code{Spread} (copy data and
1931 scripts to their final locations) at any later time. Wheel files can be
1932 installed with a newer @code{pip} or with wheel's own command line utility.")
1933 (license license:expat)
1934 (properties `((python2-variant . ,(delay python2-wheel))))))
1935
1936 (define-public python2-wheel
1937 (let ((wheel (package-with-python2
1938 (strip-python2-variant python-wheel))))
1939 (package (inherit wheel)
1940 (native-inputs `(("python2-functools32" ,python2-functools32)
1941 ,@(package-native-inputs wheel))))))
1942
1943 (define-public python-vcversioner
1944 (package
1945 (name "python-vcversioner")
1946 (version "2.16.0.0")
1947 (source
1948 (origin
1949 (method url-fetch)
1950 (uri (pypi-uri "vcversioner" version))
1951 (sha256
1952 (base32
1953 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1954 (build-system python-build-system)
1955 (synopsis "Python library for version number discovery")
1956 (description "Vcversioner is a Python library that inspects tagging
1957 information in a variety of version control systems in order to discover
1958 version numbers.")
1959 (home-page "https://github.com/habnabit/vcversioner")
1960 (license license:isc)))
1961
1962 (define-public python2-vcversioner
1963 (package-with-python2 python-vcversioner))
1964
1965 (define-public python-jdcal
1966 (package
1967 (name "python-jdcal")
1968 (version "1.4")
1969 (source
1970 (origin
1971 (method url-fetch)
1972 (uri (pypi-uri "jdcal" version))
1973 (sha256
1974 (base32
1975 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
1976 (build-system python-build-system)
1977 (arguments
1978 `(#:phases (modify-phases %standard-phases
1979 (replace 'check
1980 (lambda _
1981 (invoke "pytest"))))))
1982 (native-inputs
1983 `(("python-pytest" ,python-pytest)))
1984 (home-page "https://github.com/phn/jdcal")
1985 (synopsis "Functions to convert between Julian dates Gregorian dates")
1986 (description "This Python library provides functions for converting
1987 between Julian dates and Gregorian dates.")
1988 (license license:bsd-2)))
1989
1990 (define-public python2-jdcal
1991 (package-with-python2 python-jdcal))
1992
1993 (define-public python-jsonschema
1994 (package
1995 (name "python-jsonschema")
1996 (version "3.0.1")
1997 (source (origin
1998 (method url-fetch)
1999 (uri (pypi-uri "jsonschema" version))
2000 (sha256
2001 (base32
2002 "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc"))))
2003 (build-system python-build-system)
2004 (arguments
2005 '(#:phases
2006 (modify-phases %standard-phases
2007 (replace 'check
2008 (lambda _
2009 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2010 (invoke "trial" "jsonschema"))))))
2011 (native-inputs
2012 `(("python-setuptools_scm" ,python-setuptools-scm)
2013 ("python-twisted" ,python-twisted)))
2014 (propagated-inputs
2015 `(("python-attrs" ,python-attrs)
2016 ("python-pyrsistent" ,python-pyrsistent)
2017 ("python-six" ,python-six)))
2018 (home-page "https://github.com/Julian/jsonschema")
2019 (synopsis "Implementation of JSON Schema for Python")
2020 (description
2021 "Jsonschema is an implementation of JSON Schema for Python.")
2022 (license license:expat)
2023 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2024
2025 (define-public python2-jsonschema
2026 (let ((jsonschema (package-with-python2
2027 (strip-python2-variant python-jsonschema))))
2028 (package (inherit jsonschema)
2029 (propagated-inputs
2030 `(("python2-functools32" ,python2-functools32)
2031 ,@(package-propagated-inputs jsonschema))))))
2032
2033 ;; This old version is still required by docker-compose as of 1.24.0.
2034 (define-public python-jsonschema-2.6
2035 (package
2036 (name "python-jsonschema")
2037 (version "2.6.0")
2038 (source (origin
2039 (method url-fetch)
2040 (uri (pypi-uri "jsonschema" version))
2041 (sha256
2042 (base32
2043 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
2044 (build-system python-build-system)
2045 (arguments
2046 '(#:phases
2047 (modify-phases %standard-phases
2048 (replace 'check (lambda _ (invoke "nosetests"))))))
2049 (native-inputs
2050 `(("python-nose" ,python-nose)
2051 ("python-vcversioner" ,python-vcversioner)))
2052 (home-page "https://github.com/Julian/jsonschema")
2053 (synopsis "Implementation of JSON Schema for Python")
2054 (description
2055 "Jsonschema is an implementation of JSON Schema for Python.")
2056 (license license:expat)
2057 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2058
2059 (define-public python-schema
2060 (package
2061 (name "python-schema")
2062 (version "0.6.6")
2063 (source
2064 (origin
2065 (method url-fetch)
2066 (uri (pypi-uri "schema" version))
2067 (sha256
2068 (base32
2069 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2070 (build-system python-build-system)
2071 (native-inputs
2072 `(("python-pytest" ,python-pytest)))
2073 (home-page "https://github.com/keleshev/schema")
2074 (synopsis "Simple data validation library")
2075 (description
2076 "@code{python-schema} is a library for validating Python data
2077 structures, such as those obtained from config-files, forms, external
2078 services or command-line parsing, converted from JSON/YAML (or
2079 something else) to Python data-types.")
2080 (license license:psfl)))
2081
2082 (define-public python2-schema
2083 (package-with-python2 python-schema))
2084
2085 (define-public python-schema-0.5
2086 (package (inherit python-schema)
2087 (version "0.5.0")
2088 (source
2089 (origin
2090 (method url-fetch)
2091 (uri (pypi-uri "schema" version))
2092 (sha256
2093 (base32
2094 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2095
2096 (define-public python2-schema-0.5
2097 (package-with-python2 python-schema-0.5))
2098
2099 (define-public python-kitchen
2100 (package
2101 (name "python-kitchen")
2102 (version "1.2.5")
2103 (source
2104 (origin
2105 (method url-fetch)
2106 (uri (pypi-uri "kitchen" version))
2107 (sha256
2108 (base32
2109 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2110 (build-system python-build-system)
2111 (propagated-inputs
2112 `(("python-chardet" ,python-chardet)))
2113 (home-page "https://github.com/fedora-infra/kitchen")
2114 (synopsis "Python API for snippets")
2115 (description "@code{kitchen} module provides a python API for all sorts of
2116 little useful snippets of code that everybody ends up writing for their projects
2117 but never seem big enough to build an independent release. Use kitchen and stop
2118 cutting and pasting that code over and over.")
2119 (license (list license:lgpl2.1+
2120 ;; subprocess.py, test_subprocess.py,
2121 ;; kitchen/pycompat25/defaultdict.py:
2122 license:psfl))))
2123
2124 (define-public python2-kitchen
2125 (package-with-python2 python-kitchen))
2126
2127 (define-public python-unidecode
2128 (package
2129 (name "python-unidecode")
2130 (version "1.1.1")
2131 (source (origin
2132 (method url-fetch)
2133 (uri (pypi-uri "Unidecode" version))
2134 (sha256
2135 (base32
2136 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
2137 (build-system python-build-system)
2138 (home-page "https://pypi.python.org/pypi/Unidecode")
2139 (synopsis "ASCII transliterations of Unicode text")
2140 (description
2141 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2142 useful when integrating with legacy code that doesn't support Unicode, or for
2143 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2144 machine identifiers from human-readable Unicode strings that should still be
2145 somewhat intelligible.")
2146 (license license:gpl2+)))
2147
2148 (define-public python2-unidecode
2149 (package-with-python2 python-unidecode))
2150
2151 (define-public python-pyjwt
2152 (package
2153 (name "python-pyjwt")
2154 (version "1.7.1")
2155 (source
2156 (origin
2157 (method url-fetch)
2158 (uri (pypi-uri "PyJWT" version))
2159 (sha256
2160 (base32
2161 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
2162 (modules '((guix build utils)))
2163 (snippet
2164 '(begin
2165 (for-each delete-file-recursively
2166 (find-files "." "\\.pyc$"))
2167 #t))))
2168 (build-system python-build-system)
2169 (native-inputs
2170 `(("python-pytest" ,python-pytest)
2171 ("python-pytest-cov" ,python-pytest-cov)
2172 ("python-pytest-runner" ,python-pytest-runner)))
2173 (home-page "https://github.com/progrium/pyjwt")
2174 (synopsis "JSON Web Token implementation in Python")
2175 (description
2176 "PyJWT is a JSON Web Token implementation written in Python.")
2177 (license license:expat)))
2178
2179 (define-public python2-pyjwt
2180 (package-with-python2 python-pyjwt))
2181
2182 (define-public python-pykka
2183 (package
2184 (name "python-pykka")
2185 (version "1.2.1")
2186 (source
2187 (origin
2188 (method url-fetch)
2189 (uri (pypi-uri "Pykka" version))
2190 (sha256
2191 (base32
2192 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2193 (build-system python-build-system)
2194 (native-inputs
2195 `(("python-mock" ,python-mock)
2196 ("python-nose" ,python-nose)
2197 ("python-gevent" ,python-gevent)
2198 ("python-eventlet" ,python-eventlet)))
2199 (home-page "https://www.pykka.org/")
2200 (synopsis "Pykka is a Python implementation of the actor model")
2201 (description
2202 "Pykka is a Python implementation of the actor model.
2203 The actor model introduces some simple rules to control the sharing
2204 of state and cooperation between execution units, which makes it
2205 easier to build concurrent applications.")
2206 (license license:asl2.0)))
2207
2208 (define-public python2-pykka
2209 (package-with-python2 python-pykka))
2210
2211 (define-public python-pymsgbox
2212 (package
2213 (name "python-pymsgbox")
2214 (version "1.0.6")
2215 (source
2216 (origin
2217 (method git-fetch)
2218 (uri (git-reference
2219 ;; LICENSE.txt is not present on pypi
2220 (url "https://github.com/asweigart/PyMsgBox")
2221 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2222 (file-name (git-file-name name version))
2223 (sha256
2224 (base32
2225 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2226 (arguments
2227 ;; Circular dependency to run tests:
2228 ;; Tests need pyautogui, which depends on pymsgbox.
2229 '(#:tests? #f))
2230 (build-system python-build-system)
2231 (home-page "https://github.com/asweigart/PyMsgBox")
2232 (synopsis "Python module for JavaScript-like message boxes")
2233 (description
2234 "PyMsgBox is a simple, cross-platform, pure Python module for
2235 JavaScript-like message boxes. Types of dialog boxes include:
2236 @enumerate
2237 @item alert
2238 @item confirm
2239 @item prompt
2240 @item password
2241 @end enumerate
2242 ")
2243 (license license:bsd-3)))
2244
2245 (define-public python-pympler
2246 (package
2247 (name "python-pympler")
2248 (home-page "https://pythonhosted.org/Pympler/")
2249 (version "0.7")
2250 (source (origin
2251 (method url-fetch)
2252 (uri (pypi-uri "Pympler" version))
2253 (sha256
2254 (base32
2255 "0ki7bqp1h9l1xc2k1h4vjyzsgs20i8ingvcdhszyi72s28wyf4bs"))))
2256 (build-system python-build-system)
2257 (arguments
2258 `(#:phases (modify-phases %standard-phases
2259 (delete 'check)
2260 (add-after 'install 'check
2261 (lambda* (#:key inputs outputs #:allow-other-keys)
2262 (add-installed-pythonpath inputs outputs)
2263 (invoke "python" "setup.py" "test"))))))
2264 (synopsis "Measure, monitor and analyze memory behavior")
2265 (description
2266 "Pympler is a development tool to measure, monitor and analyze
2267 the memory behavior of Python objects in a running Python application.
2268
2269 By pympling a Python application, detailed insight in the size and the
2270 lifetime of Python objects can be obtained. Undesirable or unexpected
2271 runtime behavior like memory bloat and other @samp{pymples} can easily
2272 be identified.
2273
2274 A web profiling frontend exposes process statistics, garbage
2275 visualisation and class tracker statistics.")
2276 (license license:asl2.0)))
2277
2278 (define-public python2-pympler
2279 (package-with-python2 python-pympler))
2280
2281 (define-public python-itsdangerous
2282 (package
2283 (name "python-itsdangerous")
2284 (version "1.1.0")
2285 (source
2286 (origin
2287 (method url-fetch)
2288 (uri (pypi-uri "itsdangerous" version))
2289 (sha256
2290 (base32
2291 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
2292 (build-system python-build-system)
2293 (home-page "https://palletsprojects.com/p/itsdangerous/")
2294 (synopsis "Python library for passing data to/from untrusted environments")
2295 (description
2296 "Itsdangerous provides various helpers to pass trusted data to untrusted
2297 environments and back.")
2298 (license license:bsd-3)))
2299
2300 (define-public python2-itsdangerous
2301 (package-with-python2 python-itsdangerous))
2302
2303 (define-public python-pyyaml
2304 (package
2305 (name "python-pyyaml")
2306 (version "3.13")
2307 (source
2308 (origin
2309 (method url-fetch)
2310 (uri (pypi-uri "PyYAML" version))
2311 (sha256
2312 (base32
2313 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2314 (build-system python-build-system)
2315 (inputs
2316 `(("libyaml" ,libyaml)))
2317 (home-page "http://pyyaml.org/wiki/PyYAML")
2318 (synopsis "YAML parser and emitter for Python")
2319 (description
2320 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2321 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2322 API, and sensible error messages. PyYAML supports standard YAML tags and
2323 provides Python-specific tags that allow to represent an arbitrary Python
2324 object.")
2325 (license license:expat)))
2326
2327 (define-public python2-pyyaml
2328 (package-with-python2 python-pyyaml))
2329
2330 (define-public python-vine
2331 (package
2332 (name "python-vine")
2333 (version "1.1.4")
2334 (source
2335 (origin
2336 (method url-fetch)
2337 (uri (pypi-uri "vine" version))
2338 (sha256
2339 (base32
2340 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2341 (build-system python-build-system)
2342 (native-inputs
2343 `(("python-pytest" ,python-pytest)
2344 ("python-case" ,python-case)))
2345 (home-page "https://github.com/celery/vine")
2346 (synopsis "Promises for Python")
2347 (description
2348 "@code{vine} provides a special implementation of promises in that it can
2349 be used both for \"promise of a value\" and lazy evaluation. The biggest
2350 upside for this is that everything in a promise can also be a promise,
2351 e.g. filters, callbacks and errbacks can all be promises.")
2352 (license license:bsd-3)))
2353
2354 (define-public python-virtualenv
2355 (package
2356 (name "python-virtualenv")
2357 (version "16.1.0")
2358 (source
2359 (origin
2360 (method url-fetch)
2361 (uri (pypi-uri "virtualenv" version))
2362 (sha256
2363 (base32
2364 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
2365 (build-system python-build-system)
2366 (arguments
2367 `(#:phases
2368 (modify-phases %standard-phases
2369 (add-before 'check 'disable-failing-test
2370 (lambda _
2371 ;; Disable failing test. See upstream bug report
2372 ;; https://github.com/pypa/virtualenv/issues/957
2373 (substitute* "tests/test_virtualenv.py"
2374 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2375 #t)))))
2376 (native-inputs
2377 `(("python-mock" ,python-mock)
2378 ("python-pytest" ,python-pytest)))
2379 (home-page "https://virtualenv.pypa.io/")
2380 (synopsis "Virtual Python environment builder")
2381 (description
2382 "Virtualenv is a tool to create isolated Python environments.")
2383 (license license:expat)))
2384
2385 (define-public python2-virtualenv
2386 (package-with-python2 python-virtualenv))
2387
2388 (define-public python-markupsafe
2389 (package
2390 (name "python-markupsafe")
2391 (version "1.1.1")
2392 (source
2393 (origin
2394 (method url-fetch)
2395 (uri (pypi-uri "MarkupSafe" version))
2396 (sha256
2397 (base32
2398 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
2399 (build-system python-build-system)
2400 (arguments
2401 `(#:modules ((ice-9 ftw)
2402 (srfi srfi-1)
2403 (srfi srfi-26)
2404 (guix build utils)
2405 (guix build python-build-system))
2406 #:phases (modify-phases %standard-phases
2407 (replace 'check
2408 (lambda _
2409 (let ((cwd (getcwd))
2410 (libdir (find (cut string-prefix? "lib." <>)
2411 (scandir "build"))))
2412 (setenv "PYTHONPATH"
2413 (string-append cwd "/build/" libdir ":"
2414 (getenv "PYTHONPATH")))
2415 (invoke "pytest" "-vv")))))))
2416 (native-inputs
2417 `(("python-pytest" ,python-pytest)))
2418 (home-page "https://github.com/mitsuhiko/markupsafe")
2419 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2420 (description
2421 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2422 for Python.")
2423 (license license:bsd-3)))
2424
2425 (define-public python2-markupsafe
2426 (package-with-python2 python-markupsafe))
2427
2428 (define-public python-jinja2
2429 (package
2430 (name "python-jinja2")
2431 (version "2.10.1")
2432 (source
2433 (origin
2434 (method url-fetch)
2435 (uri (pypi-uri "Jinja2" version))
2436 (sha256
2437 (base32
2438 "04shqrs56aj04ipyqykj512rw2l0zfammvj9krawzxz7xc14yp06"))))
2439 (build-system python-build-system)
2440 (propagated-inputs
2441 `(("python-markupsafe" ,python-markupsafe)))
2442 (home-page "http://jinja.pocoo.org/")
2443 (synopsis "Python template engine")
2444 (description
2445 "Jinja2 is a small but fast and easy to use stand-alone template engine
2446 written in pure Python.")
2447 (license license:bsd-3)))
2448
2449 (define-public python2-jinja2
2450 (package-with-python2 python-jinja2))
2451
2452 (define-public python-jinja2-time
2453 (package
2454 (name "python-jinja2-time")
2455 (version "0.2.0")
2456 (source
2457 (origin
2458 (method url-fetch)
2459 (uri (pypi-uri "jinja2-time" version))
2460 (sha256
2461 (base32
2462 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
2463 (build-system python-build-system)
2464 (propagated-inputs
2465 `(("python-arrow" ,python-arrow)
2466 ("python-jinja2" ,python-jinja2)))
2467 (home-page
2468 "https://github.com/hackebrot/jinja2-time")
2469 (synopsis "Jinja2 Extension for Dates and Times")
2470 (description
2471 "This package provides an extension for the template engine Jinja2. It
2472 adds a 'now' tag providing a convenient access to the arrow.now() API from
2473 templates. A format string can be provided to control the output.")
2474 (license license:expat)))
2475
2476 (define-public python-pystache
2477 (package
2478 (name "python-pystache")
2479 (version "0.5.4")
2480 (source (origin
2481 (method url-fetch)
2482 (uri (pypi-uri "pystache" version))
2483 (sha256
2484 (base32
2485 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2486 (build-system python-build-system)
2487 (arguments
2488 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2489 (home-page "http://defunkt.io/pystache/")
2490 (synopsis "Python logic-less template engine")
2491 (description
2492 "Pystache is a Python implementation of the framework agnostic,
2493 logic-free templating system Mustache.")
2494 (license license:expat)
2495 (properties `((python2-variant . ,(delay python2-pystache))))))
2496
2497 (define-public python2-pystache
2498 (package (inherit (package-with-python2
2499 (strip-python2-variant python-pystache)))
2500 (arguments
2501 `(#:python ,python-2
2502 #:phases
2503 (modify-phases %standard-phases
2504 (replace 'check
2505 (lambda _
2506 (invoke "python" "test_pystache.py"))))))))
2507
2508 (define-public python-joblib
2509 (package
2510 (name "python-joblib")
2511 (version "0.13.0")
2512 (source (origin
2513 (method url-fetch)
2514 (uri (pypi-uri "joblib" version))
2515 (sha256
2516 (base32
2517 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2518 (build-system python-build-system)
2519 (arguments
2520 `(#:phases
2521 (modify-phases %standard-phases
2522 (replace 'check
2523 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2524 (native-inputs
2525 `(("python-pytest" ,python-pytest)))
2526 (home-page "https://joblib.readthedocs.io/")
2527 (synopsis "Using Python functions as pipeline jobs")
2528 (description
2529 "Joblib is a set of tools to provide lightweight pipelining in Python.
2530 In particular, joblib offers: transparent disk-caching of the output values
2531 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2532 logging and tracing of the execution.")
2533 (license license:bsd-3)))
2534
2535 (define-public python2-joblib
2536 (package-with-python2 python-joblib))
2537
2538 (define-public python-daemon
2539 (package
2540 (name "python-daemon")
2541 (version "2.2.3")
2542 (source
2543 (origin
2544 (method url-fetch)
2545 (uri (pypi-uri "python-daemon" version))
2546 (sha256
2547 (base32
2548 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2549 (build-system python-build-system)
2550 (arguments
2551 `(#:phases
2552 (modify-phases %standard-phases
2553 (add-before 'check 'disable-tests
2554 (lambda _
2555 ;; FIXME: Determine why test fails
2556 (substitute* "test/test_daemon.py"
2557 (("test_detaches_process_context")
2558 "skip_test_detaches_process_context"))
2559 #t)))))
2560 (propagated-inputs
2561 `(("python-lockfile" ,python-lockfile)))
2562 (native-inputs
2563 `(("python-unittest2" ,python-unittest2)
2564 ("python-testtools" ,python-testtools)
2565 ("python-testscenarios" ,python-testscenarios)
2566 ("python-mock" ,python-mock)
2567 ("python-docutils" ,python-docutils)))
2568 (home-page "https://pagure.io/python-daemon/")
2569 (synopsis "Python library for making a Unix daemon process")
2570 (description "Python-daemon is a library that assists a Python program to
2571 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2572
2573 This library provides a @code{DaemonContext} class that manages the following
2574 important tasks for becoming a daemon process:
2575 @enumerate
2576 @item Detach the process into its own process group.
2577 @item Set process environment appropriate for running inside a chroot.
2578 @item Renounce suid and sgid privileges.
2579 @item Close all open file descriptors.
2580 @item Change the working directory, uid, gid, and umask.
2581 @item Set appropriate signal handlers.
2582 @item Open new file descriptors for stdin, stdout, and stderr.
2583 @item Manage a specified PID lock file.
2584 @item Register cleanup functions for at-exit processing.
2585 @end enumerate")
2586 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2587 (license (list license:asl2.0 license:gpl3+))))
2588
2589 (define-public python-docutils
2590 (package
2591 (name "python-docutils")
2592 (version "0.14")
2593 (source
2594 (origin
2595 (method url-fetch)
2596 (uri (pypi-uri "docutils" version))
2597 (sha256
2598 (base32
2599 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2600 (build-system python-build-system)
2601 (arguments
2602 '(#:tests? #f)) ; no setup.py test command
2603 (home-page "http://docutils.sourceforge.net/")
2604 (synopsis "Python Documentation Utilities")
2605 (description
2606 "Docutils is a modular system for processing documentation into useful
2607 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2608 reStructuredText.")
2609 ;; Most of the source code is public domain, but some source files are
2610 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2611 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2612
2613 (define-public python2-docutils
2614 (package-with-python2 python-docutils))
2615
2616 (define-public python-pygments
2617 (package
2618 (name "python-pygments")
2619 (version "2.4.2")
2620 (source
2621 (origin
2622 (method url-fetch)
2623 (uri (pypi-uri "Pygments" version))
2624 (sha256
2625 (base32
2626 "15v2sqm5g12bqa0c7wikfh9ck2nl97ayizy1hpqhmws5gqalq748"))))
2627 (build-system python-build-system)
2628 (arguments
2629 ;; FIXME: Tests require sphinx, which depends on this.
2630 '(#:tests? #f))
2631 (home-page "http://pygments.org/")
2632 (synopsis "Syntax highlighting")
2633 (description
2634 "Pygments is a syntax highlighting package written in Python.")
2635 (license license:bsd-2)))
2636
2637 (define-public python2-pygments
2638 (package-with-python2 python-pygments))
2639
2640 (define-public python-bumpversion
2641 (package
2642 (name "python-bumpversion")
2643 (version "0.5.3")
2644 (source
2645 (origin
2646 (method url-fetch)
2647 (uri (pypi-uri "bumpversion" version))
2648 (sha256
2649 (base32
2650 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
2651 (build-system python-build-system)
2652 (home-page "https://github.com/peritus/bumpversion")
2653 (synopsis "Tool to bump software version")
2654 (description "This tool provides a command-line interface (CLI) to bump a
2655 software version simply.")
2656 (license license:expat)))
2657
2658 (define-public python-deprecated
2659 (package
2660 (name "python-deprecated")
2661 (version "1.2.5")
2662 (source
2663 (origin
2664 (method git-fetch)
2665 (uri (git-reference
2666 (url "https://github.com/tantale/deprecated.git")
2667 (commit (string-append "v" version))))
2668 (file-name (git-file-name name version))
2669 (sha256
2670 (base32
2671 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
2672 (build-system python-build-system)
2673 (arguments
2674 `(#:phases (modify-phases %standard-phases
2675 (replace 'check
2676 (lambda _
2677 (invoke "pytest"))))))
2678 (propagated-inputs
2679 `(("python-wrapt" ,python-wrapt)))
2680 (native-inputs
2681 `(("python-bumpversion" ,python-bumpversion)
2682 ("python-pytest" ,python-pytest)
2683 ("python-pytest-cov" ,python-pytest-cov)
2684 ("python-sphinx" ,python-sphinx)
2685 ("python-tox" ,python-tox)))
2686 (home-page "https://github.com/tantale/deprecated")
2687 (synopsis "Python decorator to deprecate classes, functions or methods")
2688 (description "The @code{deprecated} decorator provides a convenient way to deprecate
2689 to deprecate classes, functions or methods.")
2690 (license license:expat)))
2691
2692 (define-public python-pygithub
2693 (package
2694 (name "python-pygithub")
2695 (version "1.43.8")
2696 (source
2697 ;; We fetch from the Git repo because there are no tests in the PyPI
2698 ;; archive.
2699 (origin
2700 (method git-fetch)
2701 (uri (git-reference
2702 (url "https://github.com/PyGithub/PyGithub.git")
2703 (commit (string-append "v" version))))
2704 (file-name (git-file-name name version))
2705 (sha256
2706 (base32 "1625v558xga5mwhl9jqmibywy5qafmg1vqrirqz6zfq1la1d22mw"))))
2707 (build-system python-build-system)
2708 (arguments
2709 `(#:phases (modify-phases %standard-phases
2710 ;; Some tests rely on the network.
2711 (add-after 'unpack 'disable-failing-tests
2712 (lambda _
2713 (substitute* "tests/Issue142.py"
2714 (("testDecodeJson") "disabled_testDecodeJson"))
2715 #t))
2716 (add-before 'check 'prepare-for-tests
2717 (lambda _
2718 (for-each (lambda (f)
2719 (chmod f #o666))
2720 (find-files "./tests"))
2721 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
2722 (setenv "PYTHONPATH"
2723 (string-append "./tests:" (getenv "PYTHONPATH")))
2724 #t)))))
2725 (propagated-inputs
2726 `(("python-deprecated" ,python-deprecated)
2727 ("python-pyjwt" ,python-pyjwt)
2728 ("python-requests" ,python-requests)))
2729 (native-inputs `(("python-httpretty" ,python-httpretty)))
2730 (home-page "https://pygithub.readthedocs.io/en/latest/")
2731 (synopsis "Python library for the GitHub API")
2732 (description "This library allows managing GitHub resources such as
2733 repositories, user profiles, and organizations in your Python applications,
2734 using version 3 of the GitHub application programming interface (API).")
2735 (license license:lgpl3+)))
2736
2737 (define-public python-rellu
2738 (package
2739 (name "python-rellu")
2740 (version "0.7")
2741 (source
2742 (origin
2743 (method url-fetch)
2744 (uri (pypi-uri "rellu" version))
2745 (sha256
2746 (base32
2747 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
2748 (build-system python-build-system)
2749 (propagated-inputs
2750 `(("python-invoke" ,python-invoke)
2751 ("python-pygithub" ,python-pygithub)))
2752 (home-page "https://github.com/robotframework/rellu")
2753 (synopsis "Utilities to create PyPI releases")
2754 (description "This collection of utilities contains tooling and templates
2755 to assist in creating releases on GitHub and publishing them on PyPI. It is
2756 designed to be used by Robot Framework and tools and libraries in its
2757 ecosystem, but can naturally be used also by other projects.")
2758 (license license:asl2.0)))
2759
2760 (define-public python-robotframework
2761 (package
2762 (name "python-robotframework")
2763 (version "3.1.2")
2764 ;; There are no tests in the PyPI archive.
2765 (source
2766 (origin
2767 (method git-fetch)
2768 (uri (git-reference
2769 (url "https://github.com/robotframework/robotframework.git")
2770 (commit (string-append "v" version))))
2771 (file-name (git-file-name name version))
2772 (sha256
2773 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
2774 (patches (search-patches
2775 "python-robotframework-honor-source-date-epoch.patch"))))
2776 (build-system python-build-system)
2777 (arguments
2778 `(#:phases (modify-phases %standard-phases
2779 (add-before 'build 'build-and-install-doc
2780 (lambda* (#:key outputs #:allow-other-keys)
2781 (let* ((doc-output (assoc-ref outputs "doc"))
2782 (doc (string-append doc-output "/share/"
2783 ,name "-" ,version "/")))
2784 (invoke "invoke" "library-docs" "all")
2785 (mkdir-p doc)
2786 (copy-recursively "doc/libraries"
2787 (string-append doc "/libraries"))
2788 #t)))
2789 (replace 'check
2790 (lambda _
2791 (invoke "python" "utest/run.py"))))))
2792 (native-inputs
2793 `(("python-invoke" ,python-invoke)
2794 ("python-rellu" ,python-rellu)
2795 ("python:tk" ,python "tk"))) ;used when building the HTML doc
2796 (outputs '("out" "doc"))
2797 (home-page "https://robotframework.org")
2798 (synopsis "Generic automation framework")
2799 (description "Robot Framework is a generic automation framework for
2800 acceptance testing, acceptance test driven development (ATDD), and robotic
2801 process automation (RPA).")
2802 (license license:asl2.0)))
2803
2804 (define-public python-robotframework-lint
2805 ;; There is no properly tagged release; the commit below seems to correspond
2806 ;; to the 0.9 stable release available from PyPI. The tests are not
2807 ;; included in the PyPI archive, so we fetch the sources from the upstream
2808 ;; Git repo.
2809 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
2810 (revision "1"))
2811 (package
2812 (name "python-robotframework-lint")
2813 (version (git-version "0.9.0" revision commit))
2814 (source
2815 (origin
2816 (method git-fetch)
2817 (uri (git-reference
2818 (url "https://github.com/boakley/robotframework-lint.git")
2819 (commit commit)))
2820 (file-name (git-file-name name version))
2821 (sha256
2822 (base32
2823 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
2824 (build-system python-build-system)
2825 (arguments
2826 `(#:phases
2827 (modify-phases %standard-phases
2828 (replace 'check
2829 (lambda _
2830 (invoke "python" "-m" "robot" "-A"
2831 "tests/conf/default.args" "tests"))))))
2832 (propagated-inputs
2833 `(("python-robotframework" ,python-robotframework)))
2834 (home-page "https://github.com/boakley/robotframework-lint/")
2835 (synopsis "Static analysis tool (linter) for Robot Framework")
2836 (description "This package provides the @code{rflint} command-line
2837 utility, a static analysis tool (linter) for Robot Framework source files.")
2838 (license license:asl2.0))))
2839
2840 (define-public python-robotframework-sshlibrary
2841 (package
2842 (name "python-robotframework-sshlibrary")
2843 (version "3.3.0")
2844 ;; There are no tests in the PyPI archive.
2845 (source
2846 (origin
2847 (method git-fetch)
2848 (uri (git-reference
2849 (url "https://github.com/robotframework/SSHLibrary.git")
2850 (commit (string-append "v" version))))
2851 (file-name (git-file-name name version))
2852 (sha256
2853 (base32
2854 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
2855 (build-system python-build-system)
2856 (arguments
2857 `(#:phases
2858 (modify-phases %standard-phases
2859 (add-before 'build 'build-and-install-doc
2860 (lambda* (#:key outputs #:allow-other-keys)
2861 (let* ((doc-output (assoc-ref outputs "doc"))
2862 (doc (string-append doc-output "/share/"
2863 ,name "-" ,version "/")))
2864 (invoke "chmod" "-R" "+w" "docs")
2865 (invoke "invoke" "kw-docs" "project-docs")
2866 (mkdir-p doc)
2867 (for-each delete-file (find-files "docs" "\\.rst"))
2868 (copy-recursively "docs" doc)
2869 #t)))
2870 (replace 'check
2871 (lambda _
2872 ;; Some tests require an SSH server; we remove them.
2873 (delete-file "utest/test_client_api.py")
2874 (delete-file "utest/test_scp.py")
2875 (invoke "python" "utest/run.py"))))))
2876 (propagated-inputs
2877 `(("python-robotframework" ,python-robotframework)
2878 ("python-paramiko" ,python-paramiko)
2879 ("python-scp" ,python-scp)))
2880 (native-inputs
2881 `(("openssh" ,openssh)
2882 ("which" ,which)
2883 ;; To generate the documentation
2884 ("python-docutils" ,python-docutils)
2885 ("python-invoke" ,python-invoke)
2886 ("python-pygments" ,python-pygments)
2887 ("python-rellu" ,python-rellu)))
2888 (outputs '("out" "doc"))
2889 (home-page "https://github.com/robotframework/SSHLibrary")
2890 (synopsis "Robot Framework library for SSH and SFTP")
2891 (description "SSHLibrary is a Robot Framework library providing support
2892 for SSH and SFTP. It has the following main usages:
2893 @itemize @bullet
2894 @item Executing commands on the remote machine, either blocking or non-blocking.
2895 @item Writing and reading in an interactive shell.
2896 @item Transferring files and directories over SFTP.
2897 @item Ensuring that files and directories exist on the remote machine.
2898 @end itemize")
2899 (license license:asl2.0)))
2900
2901 (define-public python-scp
2902 (package
2903 (name "python-scp")
2904 (version "0.13.2")
2905 (source
2906 (origin
2907 (method url-fetch)
2908 (uri (pypi-uri "scp" version))
2909 (sha256
2910 (base32
2911 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
2912 (build-system python-build-system)
2913 (arguments
2914 '(#:tests? #f)) ;tests require an SSH server
2915 (propagated-inputs
2916 `(("python-paramiko" ,python-paramiko)))
2917 (home-page "https://github.com/jbardin/scp.py")
2918 (synopsis "SCP protocol module for Python and Paramiko")
2919 (description "The scp module extends the Paramiko library to send and
2920 receive files via the SCP1 protocol, as implemented by the OpenSSH
2921 @command{scp} program.")
2922 (license license:gpl2+)))
2923
2924 (define-public python-rst.linker
2925 (package
2926 (name "python-rst.linker")
2927 (version "1.11")
2928 (source
2929 (origin
2930 (method url-fetch)
2931 (uri (pypi-uri "rst.linker" version))
2932 (sha256
2933 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
2934 (build-system python-build-system)
2935 (propagated-inputs
2936 `(("python-dateutil" ,python-dateutil)
2937 ("python-six" ,python-six)))
2938 (native-inputs
2939 `(("python-setuptools-scm" ,python-setuptools-scm)))
2940 ;; Test would require path.py, which would introduce a cyclic dependence.
2941 (arguments `(#:tests? #f))
2942 ;; Note: As of version 1.7 the documentation is not worth building.
2943 (home-page "https://github.com/jaraco/rst.linker")
2944 (synopsis "Sphinx plugin to add links and timestamps")
2945 (description "rst.linker allows to automatically replace text by a
2946 reStructuredText external reference or timestamps. It's primary purpose is to
2947 augment the changelog, but it can be used for other documents, too.")
2948 (license license:expat)))
2949
2950 (define-public python2-rst.linker
2951 (package-with-python2 python-rst.linker))
2952
2953 (define-public python-feedgenerator
2954 (package
2955 (name "python-feedgenerator")
2956 (version "1.9")
2957 (source
2958 (origin
2959 (method url-fetch)
2960 (uri (pypi-uri "feedgenerator" version))
2961 (sha256
2962 (base32
2963 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2964 (modules '((guix build utils)))
2965 (snippet
2966 '(begin
2967 ;; Remove pre-compiled .pyc files from source.
2968 (for-each delete-file-recursively
2969 (find-files "." "__pycache__" #:directories? #t))
2970 (for-each delete-file (find-files "." "\\.pyc$"))
2971 #t))))
2972 (build-system python-build-system)
2973 (propagated-inputs
2974 `(("python-pytz" ,python-pytz)
2975 ("python-six" ,python-six)))
2976 (home-page "https://github.com/getpelican/feedgenerator")
2977 (synopsis
2978 "Standalone version of Django's Atom/RSS feed generator")
2979 (description
2980 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2981 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2982 (license license:bsd-3)))
2983
2984 (define-public python2-feedgenerator
2985 (package-with-python2 python-feedgenerator))
2986
2987 (define-public python-toml
2988 (package
2989 (name "python-toml")
2990 (version "0.9.4")
2991 (source
2992 (origin
2993 (method url-fetch)
2994 (uri (pypi-uri "toml" version))
2995 (sha256
2996 (base32
2997 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
2998 (build-system python-build-system)
2999 (arguments
3000 `(#:tests? #f)) ;no tests suite in release
3001 (home-page "https://github.com/uiri/toml")
3002 (synopsis "Library for TOML")
3003 (description
3004 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
3005 Language (TOML) configuration files.")
3006 (license license:expat)))
3007
3008 (define-public python-jsonrpc-server
3009 (package
3010 (name "python-jsonrpc-server")
3011 (version "0.3.2")
3012 (source
3013 (origin
3014 (method url-fetch)
3015 (uri (pypi-uri "python-jsonrpc-server" version))
3016 (sha256
3017 (base32
3018 "0ddgdp26dfxaz6isjbb12974b3rxavgsqrn2zrmck62cmipg5g05"))))
3019 (build-system python-build-system)
3020 (propagated-inputs
3021 `(("python-future" ,python-future)
3022 ("python-mock" ,python-mock)
3023 ("python-pytest" ,python-pytest)
3024 ("python-ujson" ,python-ujson)))
3025 (home-page
3026 "https://github.com/palantir/python-jsonrpc-server")
3027 (synopsis "JSON RPC 2.0 server library")
3028 (description
3029 "This package provides a JSON RPC 2.0 server library for Python.")
3030 (license license:expat)))
3031
3032 (define-public python-pydocstyle
3033 (package
3034 (name "python-pydocstyle")
3035 (version "3.0.0")
3036 (source
3037 (origin
3038 (method url-fetch)
3039 (uri (pypi-uri "pydocstyle" version))
3040 (sha256
3041 (base32
3042 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
3043 (build-system python-build-system)
3044 (propagated-inputs
3045 `(("python-six" ,python-six)
3046 ("python-snowballstemmer" ,python-snowballstemmer)))
3047 (home-page
3048 "https://github.com/PyCQA/pydocstyle/")
3049 (synopsis "Python docstring style checker")
3050 (description
3051 "This package provides a style checker for the Python Language
3052 Server (PLS).")
3053 (license license:expat)))
3054
3055 (define-public python-language-server
3056 (package
3057 (name "python-language-server")
3058 (version "0.31.2")
3059 (source
3060 (origin
3061 (method url-fetch)
3062 (uri (pypi-uri "python-language-server" version))
3063 (sha256
3064 (base32
3065 "1iq69wc1fyhirfyq25ih41wq9yvr7bchiw0i116adpdgcq6m9idq"))))
3066 (build-system python-build-system)
3067 (propagated-inputs
3068 `(("python-pluggy" ,python-pluggy)
3069 ("python-jsonrpc-server" ,python-jsonrpc-server)
3070 ("python-jedi" ,python-jedi)
3071 ("python-yapf" ,python-yapf)
3072 ("python-pyflakes" ,python-pyflakes)
3073 ("python-pydocstyle" ,python-pydocstyle)
3074 ("python-pycodestyle" ,python-pycodestyle)
3075 ("python-mccabe" ,python-mccabe)
3076 ("python-rope" ,python-rope)
3077 ("python-autopep8" ,python-autopep8)
3078 ("python-flake8" ,python-flake8)
3079 ("python-pylint" ,python-pylint)))
3080 (home-page "https://github.com/palantir/python-language-server")
3081 (synopsis "Python implementation of the Language Server Protocol")
3082 (description
3083 "The Python Language Server (pyls) is an implementation of the Python 3
3084 language specification for the Language Server Protocol (LSP). This tool is
3085 used in text editing environments to provide a complete and integrated
3086 feature-set for programming Python effectively.")
3087 (license license:expat)))
3088
3089 (define-public python-black
3090 (package
3091 (name "python-black")
3092 (version "18.6b4")
3093 (source
3094 (origin
3095 (method url-fetch)
3096 (uri (pypi-uri "black" version))
3097 (sha256
3098 (base32
3099 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
3100 (build-system python-build-system)
3101 (arguments
3102 `(#:phases
3103 (modify-phases %standard-phases
3104 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3105 (lambda _
3106 (let ((python3 (which "python3")))
3107 (substitute* '("tests/data/fmtonoff.py"
3108 "tests/data/string_prefixes.py"
3109 "tests/data/function.py")
3110 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3111 (string-append "#!" python3 (if (string? minor-version)
3112 minor-version
3113 ""))))))))))
3114 (propagated-inputs
3115 `(("python-click" ,python-click)
3116 ("python-attrs" ,python-attrs)
3117 ("python-appdirs" ,python-appdirs)
3118 ("python-toml" ,python-toml)))
3119 (home-page "https://github.com/ambv/black")
3120 (synopsis "The uncompromising code formatter")
3121 (description "Black is the uncompromising Python code formatter.")
3122 (license license:expat)))
3123
3124 (define-public python-blinker
3125 (package
3126 (name "python-blinker")
3127 (version "1.4")
3128 (source
3129 (origin
3130 (method url-fetch)
3131 (uri (pypi-uri "blinker" version))
3132 (sha256
3133 (base32
3134 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3135 (build-system python-build-system)
3136 (home-page "http://pythonhosted.org/blinker/")
3137 (synopsis "Fast, simple object-to-object and broadcast signaling")
3138 (description
3139 "Blinker provides a fast dispatching system that allows any number of
3140 interested parties to subscribe to events, or \"signals\".")
3141 (license license:expat)))
3142
3143 (define-public python2-blinker
3144 (package-with-python2 python-blinker))
3145
3146 (define-public pelican
3147 (package
3148 (name "pelican")
3149 (version "4.0.1")
3150 (source
3151 (origin
3152 (method url-fetch)
3153 (uri (pypi-uri "pelican" version))
3154 (sha256
3155 (base32
3156 "05yda7n6r0ll18fpdjzkzyr0ls8hbb86fnjyb33k9jvv5avah2lr"))))
3157 (build-system python-build-system)
3158 (propagated-inputs
3159 `(("python-feedgenerator" ,python-feedgenerator)
3160 ("python-jinja2" ,python-jinja2)
3161 ("python-pygments" ,python-pygments)
3162 ("python-docutils" ,python-docutils)
3163 ("python-pytz" ,python-pytz)
3164 ("python-blinker" ,python-blinker)
3165 ("python-unidecode" ,python-unidecode)
3166 ("python-six" ,python-six)
3167 ("python-dateutil" ,python-dateutil)
3168 ("python-markdown" ,python-markdown)))
3169 (home-page "https://getpelican.com/")
3170 (arguments
3171 `(;; XXX Requires a lot more packages to do unit tests :P
3172 #:tests? #f
3173 #:phases (modify-phases %standard-phases
3174 (add-before
3175 'install 'adjust-requires
3176 ;; Since feedgenerator is installed from git, it doesn't
3177 ;; conform to the version requirements.
3178 ;;
3179 ;; We *do have* "feedgenerator >= 1.6", but strip off the
3180 ;; version requirement so setuptools doesn't get confused.
3181 (lambda _
3182 (substitute* "setup.py"
3183 (("['\"]feedgenerator.*?['\"]")
3184 "'feedgenerator'")))))))
3185 (synopsis "Python-based static site publishing system")
3186 (description
3187 "Pelican is a tool to generate a static blog from reStructuredText,
3188 Markdown input files, and more. Pelican uses Jinja2 for templating
3189 and is very extensible.")
3190 (license license:agpl3+)))
3191
3192 (define-public mallard-ducktype
3193 (package
3194 (name "mallard-ducktype")
3195 (version "1.0.2")
3196 (source
3197 (origin
3198 (method git-fetch)
3199 ;; git-reference because tests are not included in pypi source tarball
3200 ;; https://issues.guix.gnu.org/issue/36755#2
3201 (uri (git-reference
3202 (url "https://github.com/projectmallard/mallard-ducktype.git")
3203 (commit version)))
3204 (file-name (git-file-name name version))
3205 (sha256
3206 (base32
3207 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
3208 (build-system python-build-system)
3209 (arguments
3210 '(#:phases
3211 (modify-phases %standard-phases
3212 (replace 'check
3213 (lambda _
3214 (with-directory-excursion "tests"
3215 (invoke "sh" "runtests")))))))
3216 (home-page "http://projectmallard.org")
3217 (synopsis "Convert Ducktype to Mallard documentation markup")
3218 (description
3219 "Ducktype is a lightweight syntax that can represent all the semantics
3220 of the Mallard XML documentation system. Ducktype files can be converted to
3221 Mallard using the @command{ducktype} tool. The yelp-tools package
3222 provides additional functionality on the produced Mallard documents.")
3223 (license license:expat)))
3224
3225 (define-public python-cython
3226 (package
3227 (name "python-cython")
3228 (version "0.29.13")
3229 (source
3230 (origin
3231 (method url-fetch)
3232 (uri (pypi-uri "Cython" version))
3233 (sha256
3234 (base32
3235 "13k37lrcgagwwnzr5bzririsscb793vndj234d475x1h9ad0d7f2"))))
3236 (build-system python-build-system)
3237 ;; we need the full python package and not just the python-wrapper
3238 ;; because we need libpython3.3m.so
3239 (inputs
3240 `(("python" ,python)))
3241 (arguments
3242 `(#:phases
3243 (modify-phases %standard-phases
3244 (add-before 'check 'set-HOME
3245 ;; some tests require access to "$HOME/.cython"
3246 (lambda _ (setenv "HOME" "/tmp") #t))
3247
3248 ;; FIXME: These tests started failing on armhf after the 0.28 update
3249 ;; (commit c69d11c5930), both with an error such as this:
3250 ;; compiling (cpp) and running dictcomp ...
3251 ;; === C/C++ compiler error output: ===
3252 ;; ‘
3253 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
3254 ;; See <https://hydra.gnu.org/build/2948724> for logs.
3255 ,@(if (target-arm32?)
3256 `((add-before 'check 'disable-failing-tests
3257 (lambda _
3258 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
3259 (for-each (lambda (test)
3260 (format disabled-tests "~a\n" test))
3261 '("memslice" "dictcomp"))
3262 (close-port disabled-tests)))))
3263 '())
3264
3265 (replace 'check
3266 (lambda _
3267 ;; Disable compiler optimizations to greatly reduce the running
3268 ;; time of the test suite.
3269 (setenv "CFLAGS" "-O0")
3270
3271 (invoke "python" "runtests.py" "-vv"
3272 "-j" (number->string (parallel-job-count))))))))
3273 (home-page "https://cython.org/")
3274 (synopsis "C extensions for Python")
3275 (description "Cython is an optimising static compiler for both the Python
3276 programming language and the extended Cython programming language. It makes
3277 writing C extensions for Python as easy as Python itself.")
3278 (license license:asl2.0)
3279 (properties `((python2-variant . ,(delay python2-cython))))))
3280
3281 (define-public python2-cython
3282 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
3283 (package
3284 (inherit base)
3285 (name "python2-cython")
3286 (inputs
3287 `(("python-2" ,python-2))) ;this is not automatically changed
3288 (arguments
3289 (substitute-keyword-arguments (package-arguments base)
3290 ((#:phases phases)
3291 `(modify-phases ,phases
3292 (add-before 'check 'adjust-test_embed
3293 (lambda _
3294 (substitute* "runtests.py"
3295 ;; test_embed goes great lengths to find the static libpythonX.Y.a
3296 ;; so it can give the right -L flag to GCC when embedding static
3297 ;; builds of Python. It is unaware that the Python "config"
3298 ;; directory (where the static library lives) was renamed in
3299 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
3300 ;; which works fine, because that is where the shared library is.
3301 ;;
3302 ;; It also appears to be unaware that the Makefile in Demos/embed
3303 ;; already unconditionally pass the static library location to GCC,
3304 ;; after checking sysconfig.get_config_var('LIBPL).
3305 ;;
3306 ;; The effect is that the linker is unable to resolve libexpat
3307 ;; symbols when building for Python 2, because neither the Python 2
3308 ;; shared library nor Expat is available. To fix it, we can either
3309 ;; add Expat as an input and make it visible to the linker, or just
3310 ;; prevent it from overriding the Python shared library location.
3311 ;; The end result is identical, so we take the easy route.
3312 ((" or libname not in os\\.listdir\\(libdir\\)")
3313 ""))
3314 #t)))))))))
3315
3316 ;; The RPython toolchain currently does not support Python 3.
3317 (define-public python2-rpython
3318 (package
3319 (name "python2-rpython")
3320 (version "0.2.1")
3321 (source
3322 (origin
3323 (method url-fetch)
3324 (uri (pypi-uri "rpython" version))
3325 (sha256
3326 (base32
3327 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3328 (build-system python-build-system)
3329 (arguments `(#:python ,python-2))
3330 (native-inputs
3331 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3332 (home-page "https://rpython.readthedocs.org")
3333 (synopsis "Framework for implementing interpreters and virtual machines")
3334 (description "RPython is a translation and support framework for
3335 producing implementations of dynamic languages, emphasizing a clean separation
3336 between language specification and implementation aspects.")
3337 (license license:expat)))
3338
3339 ;; NOTE: when upgrading numpy please make sure that python-pandas and
3340 ;; python-scipy still build, as these three packages are often used together.
3341 (define-public python-numpy
3342 (package
3343 (name "python-numpy")
3344 (version "1.17.3")
3345 (source
3346 (origin
3347 (method url-fetch)
3348 (uri (string-append
3349 "https://github.com/numpy/numpy/releases/download/v"
3350 version "/numpy-" version ".tar.gz"))
3351 (sha256
3352 (base32
3353 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
3354 (build-system python-build-system)
3355 (inputs
3356 `(("openblas" ,openblas)
3357 ("lapack" ,lapack)))
3358 (native-inputs
3359 `(("python-cython" ,python-cython)
3360 ("python-pytest" ,python-pytest)
3361 ("gfortran" ,gfortran)))
3362 (arguments
3363 `(#:phases
3364 (modify-phases %standard-phases
3365 (add-before 'build 'configure-blas-lapack
3366 (lambda* (#:key inputs #:allow-other-keys)
3367 (call-with-output-file "site.cfg"
3368 (lambda (port)
3369 (format port
3370 "[openblas]
3371 libraries = openblas
3372 library_dirs = ~a/lib
3373 include_dirs = ~a/include
3374
3375 # backslash-n to make emacs happy
3376 \n[lapack]
3377 lapack_libs = lapack
3378 library_dirs = ~a/lib
3379 include_dirs = ~a/include
3380 "
3381 (assoc-ref inputs "openblas")
3382 (assoc-ref inputs "openblas")
3383 (assoc-ref inputs "lapack")
3384 (assoc-ref inputs "lapack"))))
3385 #t))
3386 (add-before 'build 'fix-executable-paths
3387 (lambda* (#:key inputs #:allow-other-keys)
3388 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3389 ;; instead of /bin/sh.
3390 (substitute* "numpy/distutils/exec_command.py"
3391 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3392 (string-append match-start (assoc-ref inputs "bash") match-end)))
3393 ;; Use "gcc" executable, not "cc".
3394 (substitute* "numpy/distutils/system_info.py"
3395 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3396 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3397 #t))
3398 ;; Tests can only be run after the library has been installed and not
3399 ;; within the source directory.
3400 (delete 'check)
3401 (add-after 'install 'check
3402 (lambda* (#:key outputs inputs #:allow-other-keys)
3403 ;; Make installed package available for running the tests
3404 (add-installed-pythonpath inputs outputs)
3405 ;; Make sure "f2py" etc is found.
3406 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3407 ":" (getenv "PATH")))
3408 (with-directory-excursion "/tmp"
3409 (invoke "python" "-c"
3410 "import numpy; numpy.test(verbose=2)")))))))
3411 (home-page "http://www.numpy.org/")
3412 (synopsis "Fundamental package for scientific computing with Python")
3413 (description "NumPy is the fundamental package for scientific computing
3414 with Python. It contains among other things: a powerful N-dimensional array
3415 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3416 and Fortran code, useful linear algebra, Fourier transform, and random number
3417 capabilities.")
3418 (properties `((python2-variant . ,(delay python2-numpy))))
3419 (license license:bsd-3)))
3420
3421 ;; Numpy 1.16.x are the last versions that support Python 2.
3422 (define-public python2-numpy
3423 (let ((numpy (package-with-python2
3424 (strip-python2-variant python-numpy))))
3425 (package/inherit
3426 numpy
3427 (version "1.16.5")
3428 (source (origin
3429 (method url-fetch)
3430 (uri (string-append
3431 "https://github.com/numpy/numpy/releases/download/v"
3432 version "/numpy-" version ".tar.gz"))
3433 (sha256
3434 (base32
3435 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
3436
3437 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3438 ;; interest only for legacy code going back to NumPy's predecessor
3439 ;; Numeric.
3440 (define-public python2-numpy-1.8
3441 (package (inherit python2-numpy)
3442 (version "1.8.2")
3443 (source
3444 (origin
3445 (method url-fetch)
3446 (uri (string-append
3447 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3448 (file-name (string-append "python2-numpy-" version ".tar.gz"))
3449 (sha256
3450 (base32
3451 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
3452 (arguments
3453 (substitute-keyword-arguments (package-arguments python2-numpy)
3454 ((#:phases phases)
3455 `(modify-phases ,phases
3456 (replace 'configure-blas-lapack
3457 (lambda* (#:key inputs #:allow-other-keys)
3458 (call-with-output-file "site.cfg"
3459 (lambda (port)
3460 (format port
3461 "[openblas]
3462 libraries = openblas,lapack
3463 library_dirs = ~a/lib:~a/lib
3464 include_dirs = ~a/include:~a/include
3465 "
3466 (assoc-ref inputs "openblas")
3467 (assoc-ref inputs "lapack")
3468 (assoc-ref inputs "openblas")
3469 (assoc-ref inputs "lapack"))))
3470 #t))))))
3471 (native-inputs
3472 `(("python2-nose" ,python2-nose)))
3473 (description "NumPy is the fundamental package for scientific computing
3474 with Python. It contains among other things: a powerful N-dimensional array
3475 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3476 and Fortran code, useful linear algebra, Fourier transform, and random number
3477 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3478 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3479 Numeric.")
3480 (license license:bsd-3)))
3481
3482 (define-public python-munch
3483 (package
3484 (name "python-munch")
3485 (version "2.0.4")
3486 (source
3487 (origin
3488 (method url-fetch)
3489 (uri (pypi-uri "munch" version))
3490 (sha256
3491 (base32
3492 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3493 (build-system python-build-system)
3494 (home-page "https://github.com/Infinidat/munch")
3495 (synopsis "Dot-accessible dictionary")
3496 (description "Munch is a dot-accessible dictionary similar to JavaScript
3497 objects.")
3498 (license license:expat)))
3499
3500 (define-public python2-munch
3501 (package-with-python2 python-munch))
3502
3503 (define-public python-colormath
3504 (package
3505 (name "python-colormath")
3506 (version "3.0.0")
3507 (source
3508 (origin
3509 (method url-fetch)
3510 (uri (pypi-uri "colormath" version))
3511 (sha256
3512 (base32
3513 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3514 (build-system python-build-system)
3515 (propagated-inputs
3516 `(("python-networkx" ,python-networkx)
3517 ("python-numpy" ,python-numpy)))
3518 (home-page "https://github.com/gtaylor/python-colormath")
3519 (synopsis "Color math and conversion library")
3520 (description
3521 "This is a Python library for color math and conversions.")
3522 (license license:bsd-3)))
3523
3524 (define-public python2-colormath
3525 (package-with-python2 python-colormath))
3526
3527 (define-public python-spectra
3528 (package
3529 (name "python-spectra")
3530 (version "0.0.11")
3531 (source
3532 (origin
3533 (method url-fetch)
3534 (uri (pypi-uri "spectra" version))
3535 (sha256
3536 (base32
3537 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3538 (build-system python-build-system)
3539 (arguments
3540 `(#:phases
3541 (modify-phases %standard-phases
3542 (replace 'check
3543 (lambda _ (invoke "nosetests" "-v"))))))
3544 (propagated-inputs
3545 `(("python-colormath" ,python-colormath)))
3546 (native-inputs
3547 `(("python-nose" ,python-nose)))
3548 (home-page "https://github.com/jsvine/spectra")
3549 (synopsis "Color scales and color conversion")
3550 (description
3551 "This package provides a Python library intended to make color math,
3552 color scales, and color space conversion easy. It has support for:
3553
3554 @enumerate
3555 @item Color scales
3556 @item Color ranges
3557 @item Color blending
3558 @item Brightening/darkening colors
3559 @item Saturating/desaturating colors
3560 @item Conversion to/from multiple color spaces.
3561 @end enumerate\n")
3562 (license license:expat)))
3563
3564 (define-public python2-spectra
3565 (package-with-python2 python-spectra))
3566
3567 (define-public python-numpy-documentation
3568 (package
3569 (name "python-numpy-documentation")
3570 (version (package-version python-numpy))
3571 (source (package-source python-numpy))
3572 (build-system python-build-system)
3573 (native-inputs
3574 `(("python-matplotlib" ,python-matplotlib)
3575 ("python-numpy" ,python-numpy)
3576 ("pkg-config" ,pkg-config)
3577 ("python-sphinx" ,python-sphinx)
3578 ("python-numpydoc" ,python-numpydoc)
3579 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
3580 texlive-fonts-ec
3581 texlive-generic-ifxetex
3582 texlive-generic-pdftex
3583 texlive-amsfonts
3584 texlive-latex-capt-of
3585 texlive-latex-cmap
3586 texlive-latex-environ
3587 texlive-latex-eqparbox
3588 texlive-latex-etoolbox
3589 texlive-latex-expdlist
3590 texlive-latex-fancyhdr
3591 texlive-latex-fancyvrb
3592 texlive-latex-fncychap
3593 texlive-latex-float
3594 texlive-latex-framed
3595 texlive-latex-geometry
3596 texlive-latex-graphics
3597 texlive-latex-hyperref
3598 texlive-latex-mdwtools
3599 texlive-latex-multirow
3600 texlive-latex-needspace
3601 texlive-latex-oberdiek
3602 texlive-latex-parskip
3603 texlive-latex-preview
3604 texlive-latex-tabulary
3605 texlive-latex-threeparttable
3606 texlive-latex-titlesec
3607 texlive-latex-trimspaces
3608 texlive-latex-ucs
3609 texlive-latex-upquote
3610 texlive-latex-url
3611 texlive-latex-varwidth
3612 texlive-latex-wrapfig)))
3613 ("texinfo" ,texinfo)
3614 ("perl" ,perl)
3615 ("scipy-sphinx-theme"
3616 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3617 (method git-fetch)
3618 (uri (git-reference
3619 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3620 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3621 (sha256
3622 (base32
3623 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3624 ,@(package-native-inputs python-numpy)))
3625 (arguments
3626 `(#:tests? #f ; we're only generating the documentation
3627 #:phases
3628 (modify-phases %standard-phases
3629 (delete 'build)
3630 (replace 'install
3631 (lambda* (#:key inputs outputs #:allow-other-keys)
3632 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3633 (doc (string-append
3634 data "/doc/" ,name "-"
3635 ,(package-version python-numpy)))
3636 (info-reader (string-append data "/info"))
3637 (html (string-append doc "/html"))
3638 (scipy-sphinx-theme "scipy-sphinx-theme")
3639 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3640 (pyver ,(string-append "PYVER=")))
3641
3642 ;; FIXME: this is needed to for texlive-union to generate
3643 ;; fonts, which are not found.
3644 (setenv "HOME" "/tmp")
3645
3646 (with-directory-excursion "doc"
3647 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3648 (mkdir-p html)
3649 (invoke "make" "html" pyver)
3650 (invoke "make" "latex" "PAPER=a4" pyver)
3651 (invoke "make" "-C" "build/latex"
3652 "all-pdf" "PAPER=a4" pyver)
3653 ;; FIXME: Generation of the info file fails.
3654 ;; (invoke "make" "info" pyver)
3655 ;; (mkdir-p info)
3656 ;; (copy-file "build/texinfo/numpy.info"
3657 ;; (string-append info "/numpy.info"))
3658 (for-each (lambda (file)
3659 (copy-file (string-append "build/latex" file)
3660 (string-append doc file)))
3661 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3662 (with-directory-excursion "build/html"
3663 (for-each (lambda (file)
3664 (let* ((dir (dirname file))
3665 (tgt-dir (string-append html "/" dir)))
3666 (unless (equal? "." dir)
3667 (mkdir-p tgt-dir))
3668 (install-file file html)))
3669 (find-files "." ".*")))))
3670 #t)))))
3671 (home-page (package-home-page python-numpy))
3672 (synopsis "Documentation for the python-numpy package")
3673 (description (package-description python-numpy))
3674 (license (package-license python-numpy))))
3675
3676 (define-public python2-numpy-documentation
3677 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3678 (package
3679 (inherit numpy-documentation)
3680 (native-inputs `(("python2-functools32" ,python2-functools32)
3681 ,@(package-native-inputs numpy-documentation))))))
3682
3683 (define-public python-pygit2
3684 (package
3685 (name "python-pygit2")
3686 (version "0.28.2")
3687 (source
3688 (origin
3689 (method url-fetch)
3690 (uri (pypi-uri "pygit2" version))
3691 (sha256
3692 (base32 "11kzj5mjkspvplnpdb6bj8dcj6rgmkk986k8hjcklyg5yaxkz32d"))))
3693 (build-system python-build-system)
3694 (arguments
3695 '(#:tests? #f)) ; tests don't run correctly in our environment
3696 (propagated-inputs
3697 `(("python-six" ,python-six)
3698 ("python-cffi" ,python-cffi)
3699 ("libgit2" ,libgit2)
3700 ("python-tox" ,python-tox)))
3701 (native-inputs
3702 `(("python-pytest" ,python-pytest)))
3703 (home-page "https://github.com/libgit2/pygit2")
3704 (synopsis "Python bindings for libgit2")
3705 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3706 library, libgit2 implements Git plumbing.")
3707 ;; GPL2.0 only, with linking exception.
3708 (license license:gpl2)))
3709
3710 (define-public python2-pygit2
3711 (package-with-python2 python-pygit2))
3712
3713 (define-public python-pyparsing
3714 (package
3715 (name "python-pyparsing")
3716 (version "2.3.1")
3717 (source
3718 (origin
3719 (method url-fetch)
3720 (uri (pypi-uri "pyparsing" version))
3721 (sha256
3722 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
3723 (build-system python-build-system)
3724 (outputs '("out" "doc"))
3725 (arguments
3726 `(#:tests? #f ; no test target
3727 #:phases
3728 (modify-phases %standard-phases
3729 (add-after 'install 'install-doc
3730 (lambda* (#:key outputs #:allow-other-keys)
3731 (let* ((doc (string-append (assoc-ref outputs "doc")
3732 "/share/doc/" ,name "-" ,version))
3733 (html-doc (string-append doc "/html"))
3734 (examples (string-append doc "/examples")))
3735 (mkdir-p html-doc)
3736 (mkdir-p examples)
3737 (for-each
3738 (lambda (dir tgt)
3739 (map (lambda (file)
3740 (install-file file tgt))
3741 (find-files dir ".*")))
3742 (list "docs" "htmldoc" "examples")
3743 (list doc html-doc examples))
3744 #t))))))
3745 (home-page "https://github.com/pyparsing/pyparsing")
3746 (synopsis "Python parsing class library")
3747 (description
3748 "The pyparsing module is an alternative approach to creating and
3749 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3750 of regular expressions. The pyparsing module provides a library of classes
3751 that client code uses to construct the grammar directly in Python code.")
3752 (license license:expat)))
3753
3754 (define-public python2-pyparsing
3755 (package-with-python2 python-pyparsing))
3756
3757 (define-public python-numpydoc
3758 (package
3759 (name "python-numpydoc")
3760 (version "0.8.0")
3761 (source
3762 (origin
3763 (method url-fetch)
3764 (uri (pypi-uri "numpydoc" version))
3765 (sha256
3766 (base32
3767 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3768 (build-system python-build-system)
3769 (propagated-inputs
3770 `(("python-sphinx" ,python-sphinx)))
3771 (native-inputs
3772 `(("python-nose" ,python-nose)))
3773 (home-page "https://pypi.python.org/pypi/numpydoc")
3774 (synopsis
3775 "Numpy's Sphinx extensions")
3776 (description
3777 "Sphinx extension to support docstrings in Numpy format.")
3778 (license license:bsd-2)))
3779
3780 (define-public python2-numpydoc
3781 (package-with-python2 python-numpydoc))
3782
3783 (define-public python-numexpr
3784 (package
3785 (name "python-numexpr")
3786 (version "2.6.5")
3787 (source
3788 (origin
3789 (method url-fetch)
3790 (uri (pypi-uri "numexpr" version))
3791 (sha256
3792 (base32
3793 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3794 (build-system python-build-system)
3795 (arguments `(#:tests? #f)) ; no tests included
3796 (propagated-inputs
3797 `(("python-numpy" ,python-numpy)))
3798 (home-page "https://github.com/pydata/numexpr")
3799 (synopsis "Fast numerical expression evaluator for NumPy")
3800 (description
3801 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3802 expressions that operate on arrays are accelerated and use less memory than
3803 doing the same calculation in Python. In addition, its multi-threaded
3804 capabilities can make use of all your cores, which may accelerate
3805 computations, most specially if they are not memory-bounded (e.g. those using
3806 transcendental functions).")
3807 (license license:expat)))
3808
3809 (define-public python2-numexpr
3810 (package-with-python2 python-numexpr))
3811
3812 (define-public python-cycler
3813 (package
3814 (name "python-cycler")
3815 (version "0.10.0")
3816 (source (origin
3817 (method url-fetch)
3818 (uri (pypi-uri "cycler" version))
3819 (sha256
3820 (base32
3821 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3822 (build-system python-build-system)
3823 (arguments
3824 ;; XXX: The current version requires 'coveralls' which we don't have.
3825 ;; Enable this for the next release which uses 'python-pytest'.
3826 '(#:tests? #f))
3827 (propagated-inputs
3828 `(("python-six" ,python-six)))
3829 (home-page "http://matplotlib.org/cycler/")
3830 (synopsis "Composable keyword argument iterator")
3831 (description
3832 "When using @code{matplotlib} and plotting more than one line, it is
3833 common to want to be able to want to be able to cycle over one or more artist
3834 styles; but the plotting logic can quickly become involved.
3835 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3836 @code{Cycler} class was developed.")
3837 (license license:bsd-3)))
3838
3839 (define-public python2-cycler
3840 (package-with-python2 python-cycler))
3841
3842 (define-public python-colorspacious
3843 (package
3844 (name "python-colorspacious")
3845 (version "1.1.2")
3846 (source
3847 (origin
3848 (method git-fetch)
3849 (uri (git-reference
3850 (url "https://github.com/njsmith/colorspacious.git")
3851 (commit (string-append "v" version))))
3852 (file-name (git-file-name name version))
3853 (sha256
3854 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
3855 (build-system python-build-system)
3856 (propagated-inputs
3857 `(("python-numpy" ,python-numpy)))
3858 (native-inputs
3859 `(("python-nose" ,python-nose)))
3860 (arguments
3861 `(#:phases
3862 (modify-phases %standard-phases
3863 (replace 'check
3864 (lambda _
3865 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
3866 (home-page "https://github.com/njsmith/colorspacious")
3867 (synopsis "Python library for colorspace conversions")
3868 (description "@code{colorspacious} is a Python library that lets you
3869 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3870 (license license:expat)))
3871
3872 (define-public python2-colorspacious
3873 (package-with-python2 python-colorspacious))
3874
3875 (define-public python-matplotlib
3876 (package
3877 (name "python-matplotlib")
3878 (version "3.1.2")
3879 (source
3880 (origin
3881 (method url-fetch)
3882 (uri (pypi-uri "matplotlib" version))
3883 (sha256
3884 (base32
3885 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))))
3886 (build-system python-build-system)
3887 (propagated-inputs ; the following packages are all needed at run time
3888 `(("python-cycler" ,python-cycler)
3889 ("python-kiwisolver" ,python-kiwisolver)
3890 ("python-pyparsing" ,python-pyparsing)
3891 ("python-pygobject" ,python-pygobject)
3892 ("gobject-introspection" ,gobject-introspection)
3893 ("python-tkinter" ,python "tk")
3894 ("python-dateutil" ,python-dateutil)
3895 ("python-numpy" ,python-numpy)
3896 ("python-pillow" ,python-pillow)
3897 ("python-pytz" ,python-pytz)
3898 ("python-six" ,python-six)
3899 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3900 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3901 ;; object. For this reason we need to import both libraries.
3902 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
3903 ("python-pycairo" ,python-pycairo)
3904 ("python-cairocffi" ,python-cairocffi)))
3905 (inputs
3906 `(("libpng" ,libpng)
3907 ("imagemagick" ,imagemagick)
3908 ("freetype" ,freetype)
3909 ("cairo" ,cairo)
3910 ("glib" ,glib)
3911 ;; FIXME: Add backends when available.
3912 ;("python-wxpython" ,python-wxpython)
3913 ("tcl" ,tcl)
3914 ("tk" ,tk)))
3915 (native-inputs
3916 `(("pkg-config" ,pkg-config)
3917 ("python-pytest" ,python-pytest)
3918 ("python-mock" ,python-mock)
3919 ("unzip" ,unzip)
3920 ("jquery-ui"
3921 ,(origin
3922 (method url-fetch)
3923 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
3924 (sha256
3925 (base32
3926 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
3927 (arguments
3928 `(#:phases
3929 (modify-phases %standard-phases
3930 ;; XXX We disable all image comparison tests because we're using a
3931 ;; newer version of FreeType than matplotlib expects. This leads to
3932 ;; minor differences throughout the tests.
3933 (add-after 'unpack 'fix-and-disable-failing-tests
3934 (lambda _
3935 (substitute* (append (find-files "lib/matplotlib/tests/"
3936 "test_.*\\.py$")
3937 (find-files "lib/mpl_toolkits/tests"
3938 "test_.*\\.py$"))
3939 (("^from matplotlib" match)
3940 (string-append "import pytest\n" match))
3941 (("( *)@image_comparison" match indent)
3942 (string-append indent
3943 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
3944 match)))
3945 (substitute* "lib/matplotlib/tests/test_animation.py"
3946 (("/bin/sh") (which "sh")))
3947 (for-each delete-file
3948 ;; test_normal_axes, test_get_tightbbox_polar
3949 '("lib/matplotlib/tests/test_axes.py"
3950 ;; We don't use the webagg backend and this test forces it.
3951 "lib/matplotlib/tests/test_backend_webagg.py"
3952 ;; test_outward_ticks
3953 "lib/matplotlib/tests/test_tightlayout.py"
3954 ;; test_hidden_axes fails with minor extent
3955 ;; differences, possibly due to the use of a
3956 ;; different version of FreeType.
3957 "lib/matplotlib/tests/test_constrainedlayout.py"
3958 ;; Fontconfig returns no fonts.
3959 "lib/matplotlib/tests/test_font_manager.py"))
3960 #t))
3961 (add-before 'install 'install-jquery-ui
3962 (lambda* (#:key outputs inputs #:allow-other-keys)
3963 (let ((dir (string-append (assoc-ref outputs "out")
3964 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
3965 (mkdir-p dir)
3966 (invoke "unzip"
3967 (assoc-ref inputs "jquery-ui")
3968 "-d" dir))
3969 #t))
3970 (replace 'check
3971 (lambda* (#:key outputs inputs #:allow-other-keys)
3972 (add-installed-pythonpath inputs outputs)
3973 (invoke "python" "tests.py" "-v"
3974 "-m" "not network and not webagg")))
3975 (add-before 'build 'configure-environment
3976 (lambda* (#:key outputs inputs #:allow-other-keys)
3977 (let ((cairo (assoc-ref inputs "cairo")))
3978 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
3979 ;; has not effect.
3980 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
3981 (setenv "HOME" (getcwd))
3982 (call-with-output-file "setup.cfg"
3983 (lambda (port)
3984 (format port "[directories]~%
3985 basedirlist = ~a,~a~%
3986 [packages]~%
3987 tests = True~%"
3988 (assoc-ref inputs "tcl")
3989 (assoc-ref inputs "tk")))))
3990 #t)))))
3991 (home-page "https://matplotlib.org/")
3992 (synopsis "2D plotting library for Python")
3993 (description
3994 "Matplotlib is a Python 2D plotting library which produces publication
3995 quality figures in a variety of hardcopy formats and interactive environments
3996 across platforms. Matplotlib can be used in Python scripts, the python and
3997 ipython shell, web application servers, and six graphical user interface
3998 toolkits.")
3999 (license license:psfl)
4000 (properties `((python2-variant . ,(delay python2-matplotlib))))))
4001
4002 (define-public python2-matplotlib
4003 (let ((matplotlib (package-with-python2
4004 (strip-python2-variant python-matplotlib))))
4005 (package (inherit matplotlib)
4006 (version "2.2.4")
4007 (source
4008 (origin
4009 (method url-fetch)
4010 (uri (pypi-uri "matplotlib" version))
4011 (sha256
4012 (base32
4013 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
4014 (arguments
4015 (substitute-keyword-arguments (package-arguments matplotlib)
4016 ((#:phases phases)
4017 `(modify-phases ,phases
4018 (replace 'install-jquery-ui
4019 (lambda* (#:key outputs inputs #:allow-other-keys)
4020 (let ((dir (string-append (assoc-ref outputs "out")
4021 "/lib/python2.7/site-packages/"
4022 "matplotlib/backends/web_backend/")))
4023 (mkdir-p dir)
4024 (invoke "unzip"
4025 (assoc-ref inputs "jquery-ui")
4026 "-d" dir))
4027 #t))
4028 (delete 'fix-and-disable-failing-tests)
4029 (delete 'check))))) ; These tests weren't run the the past.
4030 ;; Make sure to use special packages for Python 2 instead
4031 ;; of those automatically rewritten by package-with-python2.
4032 (propagated-inputs
4033 `(("python2-pycairo" ,python2-pycairo)
4034 ("python2-backports-functools-lru-cache"
4035 ,python2-backports-functools-lru-cache)
4036 ("python2-functools32" ,python2-functools32)
4037 ("python2-pygobject-2" ,python2-pygobject-2)
4038 ("python2-subprocess32" ,python2-subprocess32)
4039 ("python2-tkinter" ,python-2 "tk")
4040 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4041 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4042
4043 (define-public python-matplotlib-documentation
4044 (package
4045 (name "python-matplotlib-documentation")
4046 (version (package-version python-matplotlib))
4047 (source (package-source python-matplotlib))
4048 (build-system python-build-system)
4049 (native-inputs
4050 `(("python-matplotlib" ,python-matplotlib)
4051 ("python-colorspacious" ,python-colorspacious)
4052 ("python-sphinx" ,python-sphinx)
4053 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
4054 ("python-sphinx-gallery" ,python-sphinx-gallery)
4055 ("python-numpydoc" ,python-numpydoc)
4056 ("python-ipython" ,python-ipython)
4057 ("python-ipykernel" ,python-ipykernel)
4058 ("python-mock" ,python-mock)
4059 ("graphviz" ,graphviz)
4060 ("texlive" ,(texlive-union (list texlive-amsfonts
4061 texlive-latex-amsmath
4062 texlive-latex-enumitem
4063 texlive-latex-expdlist
4064 texlive-latex-geometry
4065 texlive-latex-preview
4066 texlive-latex-type1cm
4067 texlive-latex-ucs
4068
4069 texlive-generic-pdftex
4070
4071 texlive-fonts-ec
4072 texlive-fonts-adobe-times
4073 texlive-fonts-txfonts)))
4074 ("texinfo" ,texinfo)
4075 ,@(package-native-inputs python-matplotlib)))
4076 (arguments
4077 `(#:tests? #f ; we're only generating documentation
4078 #:phases
4079 (modify-phases %standard-phases
4080 ;; The tests in python-matplotlib are run after the install phase, so
4081 ;; we need to delete the extra phase here.
4082 (delete 'check)
4083 (replace 'build
4084 (lambda _
4085 (chdir "doc")
4086 (setenv "PYTHONPATH"
4087 (string-append (getenv "PYTHONPATH")
4088 ":" (getcwd) "/../examples/units"))
4089 (substitute* "conf.py"
4090 ;; Don't use git.
4091 (("^SHA = check_output.*")
4092 (string-append "SHA = \"" ,version "\"\n"))
4093 ;; Don't fetch intersphinx files from the Internet
4094 (("^explicit_order_folders" m)
4095 (string-append "intersphinx_mapping = {}\n" m))
4096 (("'sphinx.ext.intersphinx',") "")
4097 ;; Disable URL embedding which requires internet access.
4098 (("'https://docs.scipy.org/doc/numpy'") "None")
4099 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
4100 (invoke "make"
4101 "SPHINXBUILD=sphinx-build"
4102 "SPHINXOPTS=" ; don't abort on warnings
4103 "html" "texinfo")))
4104 (replace 'install
4105 (lambda* (#:key inputs outputs #:allow-other-keys)
4106 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4107 (doc (string-append data "/doc/python-matplotlib-" ,version))
4108 (info (string-append data "/info"))
4109 (html (string-append doc "/html")))
4110 (mkdir-p html)
4111 (mkdir-p info)
4112 (copy-recursively "build/html" html)
4113 (symlink (string-append html "/_images")
4114 (string-append info "/matplotlib-figures"))
4115 (with-directory-excursion "build/texinfo"
4116 (substitute* "matplotlib.texi"
4117 (("@image\\{([^,]*)" all file)
4118 (string-append "@image{matplotlib-figures/" file)))
4119 (symlink (string-append html "/_images")
4120 "./matplotlib-figures")
4121 (invoke "makeinfo" "--no-split"
4122 "-o" "matplotlib.info" "matplotlib.texi"))
4123 (install-file "build/texinfo/matplotlib.info" info))
4124 #t)))))
4125 (home-page (package-home-page python-matplotlib))
4126 (synopsis "Documentation for the python-matplotlib package")
4127 (description (package-description python-matplotlib))
4128 (license (package-license python-matplotlib))))
4129
4130 (define-public python2-matplotlib-documentation
4131 (let ((parent (package-with-python2 python-matplotlib-documentation)))
4132 (package
4133 (inherit parent)
4134 (native-inputs
4135 (alist-delete "python-sphinx-copybutton"
4136 (package-native-inputs parent))))))
4137
4138 (define-public python-matplotlib-venn
4139 (package
4140 (name "python-matplotlib-venn")
4141 (version "0.11.5")
4142 (source
4143 (origin
4144 (method url-fetch)
4145 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4146 (sha256
4147 (base32
4148 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4149 (build-system python-build-system)
4150 (arguments '(#:tests? #f)) ; tests are not included
4151 (propagated-inputs
4152 `(("python-matplotlib" ,python-matplotlib)
4153 ("python-numpy" ,python-numpy)
4154 ("python-scipy" ,python-scipy)))
4155 (native-inputs
4156 `(("unzip" ,unzip)))
4157 (home-page "https://github.com/konstantint/matplotlib-venn")
4158 (synopsis "Plot area-proportional Venn diagrams")
4159 (description
4160 "This package provides tools for plotting area-proportional two- and
4161 three-way Venn diagrams in @code{matplotlib}.")
4162 (license license:expat)))
4163
4164 (define-public python2-pysnptools
4165 (package
4166 (name "python2-pysnptools")
4167 (version "0.3.13")
4168 (source
4169 (origin
4170 (method url-fetch)
4171 (uri (pypi-uri "pysnptools" version))
4172 (sha256
4173 (base32
4174 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
4175 (build-system python-build-system)
4176 (arguments
4177 `(#:python ,python-2 ; only Python 2.7 is supported
4178 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
4179 (propagated-inputs
4180 `(("python2-numpy" ,python2-numpy)
4181 ("python2-scipy" ,python2-scipy)
4182 ("python2-pandas" ,python2-pandas)))
4183 (native-inputs
4184 `(("python2-cython" ,python2-cython)))
4185 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
4186 (synopsis "Library for reading and manipulating genetic data")
4187 (description
4188 "PySnpTools is a library for reading and manipulating genetic data. It
4189 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4190 those files. It can also efficiently manipulate ranges of integers using set
4191 operators such as union, intersection, and difference.")
4192 (license license:asl2.0)))
4193
4194 (define-public python-socksipy-branch
4195 (package
4196 (name "python-socksipy-branch")
4197 (version "1.01")
4198 (source
4199 (origin
4200 (method url-fetch)
4201 (uri (pypi-uri "SocksiPy-branch" version))
4202 (sha256
4203 (base32
4204 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4205 (build-system python-build-system)
4206 (arguments
4207 `(#:tests? #f)) ; There are no tests
4208 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4209 (synopsis "Python SOCKS module")
4210 (description
4211 "SocksiPy - A Python SOCKS client module. It provides a
4212 socket-like interface that supports connections to any TCP
4213 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4214 The original version was developed by Dan Haim, this is a
4215 branch created by Mario Vilas to address some open issues,
4216 as the original project seems to have been abandoned circa 2007.")
4217 (license license:bsd-3)))
4218
4219 (define-public python2-socksipy-branch
4220 (package-with-python2 python-socksipy-branch))
4221
4222 (define-public python-socksipychain
4223 (package
4224 (name "python-socksipychain")
4225 (version "2.1.0")
4226 (source
4227 (origin
4228 (method git-fetch)
4229 (uri (git-reference
4230 (url "https://github.com/pagekite/PySocksipyChain.git")
4231 (commit (string-append "v" version))))
4232 (file-name (git-file-name name version))
4233 (sha256
4234 (base32
4235 "0idm9a050rd2kbgbz2sk9ib9589kj4xh1xdnggs6xbq2v2y8f6zn"))))
4236 (build-system python-build-system)
4237 (arguments
4238 `(#:tests? #f)) ; Tests try to access the network.
4239 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
4240 (synopsis "Python SOCKS module with chained proxies support")
4241 (description
4242 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
4243 adds support for arbitrary chaining of proxy servers and various modes of
4244 TLS/SSL encryption. It was developed for use in PageKite, and also includes
4245 a simple netcat replacement with chaining support.")
4246 (license license:bsd-3)))
4247
4248 (define-public python-pycodestyle
4249 (package
4250 (name "python-pycodestyle")
4251 (version "2.5.0")
4252 (source
4253 (origin
4254 (method url-fetch)
4255 (uri (pypi-uri "pycodestyle" version))
4256 (sha256
4257 (base32
4258 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
4259 (build-system python-build-system)
4260 (home-page "https://pycodestyle.readthedocs.io/")
4261 (synopsis "Python style guide checker")
4262 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4263 Python code against some of the style conventions in
4264 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4265 (license license:expat)))
4266
4267 (define-public python2-pycodestyle
4268 (package-with-python2 python-pycodestyle))
4269
4270 (define-public python-multidict
4271 (package
4272 (name "python-multidict")
4273 (version "4.2.0")
4274 (source
4275 (origin
4276 (method url-fetch)
4277 (uri (pypi-uri "multidict" version))
4278 (sha256
4279 (base32
4280 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4281 (build-system python-build-system)
4282 (native-inputs
4283 `(("python-pytest" ,python-pytest)
4284 ("python-pytest-runner" ,python-pytest-runner)))
4285 (home-page "https://github.com/aio-libs/multidict/")
4286 (synopsis "Multidict implementation")
4287 (description "Multidict is dict-like collection of key-value pairs
4288 where key might be occurred more than once in the container.")
4289 (license license:asl2.0)))
4290
4291 (define-public python-orderedmultidict
4292 (package
4293 (name "python-orderedmultidict")
4294 (version "0.7.11")
4295 (source
4296 (origin
4297 (method url-fetch)
4298 (uri (pypi-uri "orderedmultidict" version))
4299 (sha256
4300 (base32
4301 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4302 (build-system python-build-system)
4303 (arguments
4304 `(#:phases
4305 (modify-phases %standard-phases
4306 (add-after 'unpack 'fix-tests
4307 (lambda _
4308 ;; The package uses nosetest for running the tests.
4309 ;; Adding this initfile allows to run the test suite
4310 ;; without requiring nosetest.
4311 (with-output-to-file "tests/__init__.py" newline)
4312 #t)))))
4313 (propagated-inputs
4314 `(("python-six" ,python-six)))
4315 (native-inputs
4316 `(("python-pycodestyle" ,python-pycodestyle)))
4317 (home-page "https://github.com/gruns/orderedmultidict")
4318 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4319 (description "This package contains a library for ordered multivalue
4320 dictionaries. A multivalue dictionary is a dictionary that can store
4321 multiple values for the same key. An ordered multivalue dictionary is a
4322 multivalue dictionary that retains the order of insertions and deletions.")
4323 (license license:unlicense)))
4324
4325 (define-public python2-orderedmultidict
4326 (package-with-python2 python-orderedmultidict))
4327
4328 (define-public python-autopep8
4329 (package
4330 (name "python-autopep8")
4331 (version "1.3.5")
4332 (source
4333 (origin
4334 (method url-fetch)
4335 (uri (pypi-uri "autopep8" version))
4336 (sha256
4337 (base32
4338 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4339 (build-system python-build-system)
4340 (propagated-inputs
4341 `(("python-pycodestyle" ,python-pycodestyle)))
4342 (home-page "https://github.com/hhatto/autopep8")
4343 (synopsis "Format Python code according to the PEP 8 style guide")
4344 (description
4345 "@code{autopep8} automatically formats Python code to conform to
4346 the PEP 8 style guide. It uses the pycodestyle utility to determine
4347 what parts of the code needs to be formatted. @code{autopep8} is
4348 capable of fixing most of the formatting issues that can be reported
4349 by pycodestyle.")
4350 (license (license:non-copyleft
4351 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4352
4353 (define-public python2-autopep8
4354 (package-with-python2 python-autopep8))
4355
4356 (define-public python-distutils-extra
4357 (package
4358 (name "python-distutils-extra")
4359 (version "2.38")
4360 (source
4361 (origin
4362 (method url-fetch)
4363 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4364 version "/+download/python-distutils-extra-"
4365 version ".tar.gz"))
4366 (sha256
4367 (base32
4368 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4369 (build-system python-build-system)
4370 (home-page "https://launchpad.net/python-distutils-extra/")
4371 (synopsis "Enhancements to Python's distutils")
4372 (description
4373 "The python-distutils-extra module enables you to easily integrate
4374 gettext support, themed icons, and scrollkeeper-based documentation into
4375 Python's distutils.")
4376 (license license:gpl2)))
4377
4378 (define-public python2-distutils-extra
4379 (package-with-python2 python-distutils-extra))
4380
4381 (define-public python2-elib.intl
4382 (package
4383 (name "python2-elib.intl")
4384 (version "0.0.3")
4385 (source
4386 (origin
4387 ;; This project doesn't tag releases or publish tarballs, so we take
4388 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4389 (method git-fetch)
4390 (uri (git-reference
4391 (url "https://github.com/dieterv/elib.intl.git")
4392 (commit "d09997cfef")))
4393 (file-name (string-append name "-" version "-checkout"))
4394 (sha256
4395 (base32
4396 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4397 (build-system python-build-system)
4398 (arguments
4399 ;; incompatible with Python 3 (exception syntax)
4400 `(#:python ,python-2
4401 #:tests? #f))
4402 (home-page "https://github.com/dieterv/elib.intl")
4403 (synopsis "Enhanced internationalization for Python")
4404 (description
4405 "The elib.intl module provides enhanced internationalization (I18N)
4406 services for your Python modules and applications.")
4407 (license license:lgpl3+)))
4408
4409 (define-public python-olefile
4410 (package
4411 (name "python-olefile")
4412 (version "0.46")
4413 (source
4414 (origin
4415 (method url-fetch)
4416 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4417 "download/v" version "/olefile-" version ".tar.gz"))
4418 (file-name (string-append name "-" version ".tar.gz"))
4419 (sha256
4420 (base32
4421 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
4422 (build-system python-build-system)
4423 (home-page "https://www.decalage.info/python/olefileio")
4424 (synopsis "Read and write Microsoft OLE2 files.")
4425 (description
4426 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4427 Storage or Compound Document, Microsoft Office). It is an improved version of
4428 the OleFileIO module from PIL, the Python Image Library.")
4429 (license license:bsd-3)))
4430
4431 (define-public python2-olefile
4432 (package-with-python2 python-olefile))
4433
4434 (define-public python-pillow
4435 (package
4436 (name "python-pillow")
4437 (version "6.2.1")
4438 (source
4439 (origin
4440 (method url-fetch)
4441 (uri (pypi-uri "Pillow" version))
4442 (sha256
4443 (base32
4444 "1c8wkzc58f5wdh006jvmwdk3wxld1xgagcbdvj7iv17qi0m9fkmz"))))
4445 (build-system python-build-system)
4446 (native-inputs
4447 `(("python-pytest" ,python-pytest)))
4448 (inputs
4449 `(("freetype" ,freetype)
4450 ("lcms" ,lcms)
4451 ("libjpeg" ,libjpeg)
4452 ("libtiff" ,libtiff)
4453 ("libwebp" ,libwebp)
4454 ("openjpeg" ,openjpeg)
4455 ("zlib" ,zlib)))
4456 (propagated-inputs
4457 `(("python-olefile" ,python-olefile)))
4458 (arguments
4459 `(#:phases
4460 (modify-phases %standard-phases
4461 (add-after 'unpack 'patch-ldconfig
4462 (lambda _
4463 (substitute* "setup.py"
4464 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4465 (replace 'check
4466 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
4467 (if tests?
4468 (begin
4469 (setenv "HOME" (getcwd))
4470 ;; Make installed package available for running the tests.
4471 (add-installed-pythonpath inputs outputs)
4472 (invoke "python" "selftest.py" "--installed")
4473 (invoke "python" "-m" "pytest" "-vv"))
4474 #t))))))
4475 (home-page "https://python-pillow.org")
4476 (synopsis "Fork of the Python Imaging Library")
4477 (description
4478 "The Python Imaging Library adds image processing capabilities to your
4479 Python interpreter. This library provides extensive file format support, an
4480 efficient internal representation, and fairly powerful image processing
4481 capabilities. The core image library is designed for fast access to data
4482 stored in a few basic pixel formats. It should provide a solid foundation for
4483 a general image processing tool.")
4484 (license (license:x11-style
4485 "http://www.pythonware.com/products/pil/license.htm"
4486 "The PIL Software License"))))
4487
4488 (define-public python2-pillow
4489 (package-with-python2 python-pillow))
4490
4491 (define-public python-pycparser
4492 (package
4493 (name "python-pycparser")
4494 (version "2.19")
4495 (source
4496 (origin
4497 (method url-fetch)
4498 (uri (pypi-uri "pycparser" version))
4499 (sha256
4500 (base32
4501 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
4502 (outputs '("out" "doc"))
4503 (build-system python-build-system)
4504 (native-inputs
4505 `(("pkg-config" ,pkg-config)))
4506 (arguments
4507 `(#:phases
4508 (modify-phases %standard-phases
4509 (replace 'check
4510 (lambda _
4511 (with-directory-excursion "tests"
4512 (invoke "python" "all_tests.py"))
4513 #t))
4514 (add-after 'install 'install-doc
4515 (lambda* (#:key outputs #:allow-other-keys)
4516 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4517 (doc (string-append data "/doc/" ,name "-" ,version))
4518 (examples (string-append doc "/examples")))
4519 (mkdir-p examples)
4520 (for-each (lambda (file)
4521 (copy-file (string-append "." file)
4522 (string-append doc file)))
4523 '("/README.rst" "/CHANGES" "/LICENSE"))
4524 (copy-recursively "examples" examples)
4525 #t))))))
4526 (home-page "https://github.com/eliben/pycparser")
4527 (synopsis "C parser in Python")
4528 (description
4529 "Pycparser is a complete parser of the C language, written in pure Python
4530 using the PLY parsing library. It parses C code into an AST and can serve as
4531 a front-end for C compilers or analysis tools.")
4532 (license license:bsd-3)))
4533
4534 (define-public python2-pycparser
4535 (package-with-python2 python-pycparser))
4536
4537 (define-public python-pywavelets
4538 (package
4539 (name "python-pywavelets")
4540 (version "1.0.1")
4541 (home-page "https://github.com/PyWavelets/pywt")
4542 (source (origin
4543 (method url-fetch)
4544 (uri (pypi-uri "PyWavelets" version))
4545 (sha256
4546 (base32
4547 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4548 (build-system python-build-system)
4549 (arguments
4550 '(#:modules ((ice-9 ftw)
4551 (srfi srfi-1)
4552 (srfi srfi-26)
4553 (guix build utils)
4554 (guix build python-build-system))
4555 #:phases (modify-phases %standard-phases
4556 (replace 'check
4557 (lambda _
4558 (let ((cwd (getcwd))
4559 (libdir (find (cut string-prefix? "lib." <>)
4560 (scandir "build"))))
4561 (with-directory-excursion (string-append cwd "/build/" libdir)
4562 (invoke "nosetests" "-v" "."))))))))
4563 (native-inputs
4564 `(("python-matplotlib" ,python-matplotlib) ;for tests
4565 ("python-nose" ,python-nose)))
4566 (propagated-inputs
4567 `(("python-numpy" ,python-numpy)))
4568 (synopsis "Wavelet transforms in Python")
4569 (description
4570 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4571 mathematical basis functions that are localized in both time and frequency.
4572 Wavelet transforms are time-frequency transforms employing wavelets. They are
4573 similar to Fourier transforms, the difference being that Fourier transforms are
4574 localized only in frequency instead of in time and frequency.")
4575 (license license:expat)))
4576
4577 (define-public python2-pywavelets
4578 (package-with-python2 python-pywavelets))
4579
4580 (define-public python-xcffib
4581 (package
4582 (name "python-xcffib")
4583 (version "0.6.0")
4584 (source
4585 (origin
4586 (method url-fetch)
4587 (uri (pypi-uri "xcffib" version))
4588 (sha256
4589 (base32
4590 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4591 (build-system python-build-system)
4592 (inputs
4593 `(("libxcb" ,libxcb)))
4594 (propagated-inputs
4595 `(("python-cffi" ,python-cffi) ; used at run time
4596 ("python-six" ,python-six)))
4597 (arguments
4598 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4599 #:tests? #f
4600 #:phases
4601 (modify-phases %standard-phases
4602 (add-after 'unpack 'fix-libxcb-path
4603 (lambda* (#:key inputs #:allow-other-keys)
4604 (let ((libxcb (assoc-ref inputs "libxcb")))
4605 (substitute* '("xcffib/__init__.py")
4606 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4607 #t)))
4608 (add-after 'install 'install-doc
4609 (lambda* (#:key outputs #:allow-other-keys)
4610 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4611 "/doc/" ,name "-" ,version)))
4612 (mkdir-p doc)
4613 (copy-file "README.md"
4614 (string-append doc "/README.md"))
4615 #t))))))
4616 (home-page "https://github.com/tych0/xcffib")
4617 (synopsis "XCB Python bindings")
4618 (description
4619 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4620 support for Python 3 and PyPy. It is based on cffi.")
4621 (license license:expat)))
4622
4623 (define-public python2-xcffib
4624 (package-with-python2 python-xcffib))
4625
4626 (define-public python-cairocffi
4627 (package
4628 (name "python-cairocffi")
4629 (version "0.9.0")
4630 (source
4631 (origin
4632 (method url-fetch)
4633 (uri (pypi-uri "cairocffi" version))
4634 (sha256
4635 (base32
4636 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4637 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4638 (build-system python-build-system)
4639 (outputs '("out" "doc"))
4640 (inputs
4641 `(("glib" ,glib)
4642 ("gtk+" ,gtk+)
4643 ("gdk-pixbuf" ,gdk-pixbuf)
4644 ("cairo" ,cairo)
4645 ("pango" ,pango)))
4646 (native-inputs
4647 `(("pkg-config" ,pkg-config)
4648 ("python-pytest" ,python-pytest)
4649 ("python-pytest-cov" ,python-pytest-cov)
4650 ("python-pytest-runner" ,python-pytest-runner)
4651 ("python-sphinx" ,python-sphinx)
4652 ("python-docutils" ,python-docutils)))
4653 (propagated-inputs
4654 `(("python-xcffib" ,python-xcffib))) ; used at run time
4655 (arguments
4656 `(#:phases
4657 (modify-phases %standard-phases
4658 (add-after 'unpack 'patch-paths
4659 (lambda* (#:key inputs outputs #:allow-other-keys)
4660 (substitute* (find-files "." "\\.py$")
4661 (("dlopen\\(ffi, 'cairo'")
4662 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4663 "/lib/libcairo.so.2'"))
4664 (("dlopen\\(ffi, 'gdk-3'")
4665 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4666 "/lib/libgtk-3.so.0'"))
4667 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4668 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4669 "/lib/libgdk_pixbuf-2.0.so.0'"))
4670 (("dlopen\\(ffi, 'glib-2.0'")
4671 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4672 "/lib/libglib-2.0.so.0'"))
4673 (("dlopen\\(ffi, 'gobject-2.0'")
4674 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4675 "/lib/libgobject-2.0.so.0'"))
4676 (("dlopen\\(ffi, 'pangocairo-1.0'")
4677 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4678 "/lib/libpangocairo-1.0.so.0'"))
4679 (("dlopen\\(ffi, 'pango-1.0'")
4680 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4681 "/lib/libpango-1.0.so.0'")))
4682 #t))
4683 (add-after 'install 'install-doc
4684 (lambda* (#:key inputs outputs #:allow-other-keys)
4685 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4686 (doc (string-append data "/doc/" ,name "-" ,version))
4687 (html (string-append doc "/html")))
4688 (setenv "LD_LIBRARY_PATH"
4689 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4690 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4691 (setenv "LANG" "en_US.UTF-8")
4692 (mkdir-p html)
4693 (for-each (lambda (file)
4694 (copy-file (string-append "." file)
4695 (string-append doc file)))
4696 '("/README.rst" "/CHANGES" "/LICENSE"))
4697 (system* "python" "setup.py" "build_sphinx")
4698 (copy-recursively "docs/_build/html" html)
4699 #t))))))
4700 (home-page "https://github.com/Kozea/cairocffi")
4701 (synopsis "Python bindings and object-oriented API for Cairo")
4702 (description
4703 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4704 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4705 graphics library with support for multiple backends including image buffers,
4706 PNG, PostScript, PDF, and SVG file output.")
4707 (license license:bsd-3)))
4708
4709 (define-public python2-cairocffi
4710 (package-with-python2 python-cairocffi))
4711
4712 (define-public python-decorator
4713 (package
4714 (name "python-decorator")
4715 (version "4.3.0")
4716 (source
4717 (origin
4718 (method url-fetch)
4719 (uri (pypi-uri "decorator" version))
4720 (sha256
4721 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4722 (build-system python-build-system)
4723 (home-page "https://pypi.python.org/pypi/decorator/")
4724 (synopsis "Python module to simplify usage of decorators")
4725 (description
4726 "The aim of the decorator module is to simplify the usage of decorators
4727 for the average programmer, and to popularize decorators usage giving examples
4728 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4729 etc. The core of this module is a decorator factory.")
4730 (license license:expat)))
4731
4732 (define-public python2-decorator
4733 (package-with-python2 python-decorator))
4734
4735 (define-public python-drmaa
4736 (package
4737 (name "python-drmaa")
4738 (version "0.7.7")
4739 (source
4740 (origin
4741 (method url-fetch)
4742 (uri (pypi-uri "drmaa" version))
4743 (sha256
4744 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4745 (build-system python-build-system)
4746 ;; The test suite requires libdrmaa which is provided by the cluster
4747 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4748 ;; should be set to the path of the libdrmaa library.
4749 (arguments '(#:tests? #f))
4750 (native-inputs
4751 `(("python-nose" ,python-nose)))
4752 (home-page "https://pypi.python.org/pypi/drmaa")
4753 (synopsis "Python bindings for the DRMAA library")
4754 (description
4755 "A Python package for Distributed Resource Management (DRM) job
4756 submission and control. This package is an implementation of the DRMAA 1.0
4757 Python language binding specification.")
4758 (license license:bsd-3)))
4759
4760 (define-public python2-drmaa
4761 (package-with-python2 python-drmaa))
4762
4763 (define-public python-grako
4764 (package
4765 (name "python-grako")
4766 (version "3.99.9")
4767 (source
4768 (origin
4769 (method url-fetch)
4770 (uri
4771 (pypi-uri "grako" version ".zip"))
4772 (sha256
4773 (base32
4774 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4775 (build-system python-build-system)
4776 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4777 (native-inputs
4778 `(("unzip" ,unzip)
4779 ("python-pytest" ,python-pytest)
4780 ("python-pytest-runner" ,python-pytest-runner)))
4781 (home-page "https://bitbucket.org/neogeny/grako")
4782 (synopsis "EBNF parser generator")
4783 (description
4784 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4785 memoizing PEG/Packrat parser in Python.")
4786 (license license:bsd-3)))
4787
4788 (define-public python2-grako
4789 (package-with-python2 python-grako))
4790
4791 (define-public python-gridmap
4792 (package
4793 (name "python-gridmap")
4794 (version "0.13.0")
4795 (source
4796 (origin
4797 (method git-fetch)
4798 (uri (git-reference
4799 (url "https://github.com/pygridtools/gridmap.git")
4800 (commit (string-append "v" version))))
4801 (file-name (git-file-name name version))
4802 (sha256
4803 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
4804 (build-system python-build-system)
4805 (arguments
4806 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4807 (propagated-inputs
4808 `(("python-psutil" ,python-psutil)
4809 ("python-drmaa" ,python-drmaa)
4810 ("python-pyzmq" ,python-pyzmq)))
4811 (home-page "https://github.com/pygridtools/gridmap")
4812 (synopsis "Create jobs on a cluster directly from Python")
4813 (description
4814 "Gridmap is a Python package to allow you to easily create jobs on the
4815 cluster directly from Python. You can directly map Python functions onto the
4816 cluster without needing to write any wrapper code yourself.")
4817 (license license:gpl3+)))
4818
4819 (define-public python2-gridmap
4820 (package-with-python2 python-gridmap))
4821
4822 (define-public python-honcho
4823 (package
4824 (name "python-honcho")
4825 (version "1.0.1")
4826 (source
4827 (origin
4828 (method git-fetch)
4829 (uri (git-reference
4830 (url "https://github.com/nickstenning/honcho.git")
4831 (commit (string-append "v" version))))
4832 (file-name (git-file-name name version))
4833 (sha256
4834 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
4835 (build-system python-build-system)
4836 (native-inputs
4837 `(("python-pytest" ,python-pytest)
4838 ("python-mock" ,python-mock)
4839 ("python-tox" ,python-tox)
4840 ("which" ,which))) ;for tests
4841 (propagated-inputs
4842 `(("python-jinja2" ,python-jinja2)))
4843 (arguments
4844 `(#:phases
4845 (modify-phases %standard-phases
4846 (delete 'check)
4847 (add-after 'install 'check
4848 (lambda* (#:key outputs inputs #:allow-other-keys)
4849 ;; fix honcho path in testsuite
4850 (substitute* "tests/conftest.py"
4851 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4852 "/bin/honcho" "'")))
4853 ;; It's easier to run tests after install.
4854 ;; Make installed package available for running the tests
4855 (add-installed-pythonpath inputs outputs)
4856 (invoke "py.test" "-v"))))))
4857 (home-page "https://github.com/nickstenning/honcho")
4858 (synopsis "Manage Procfile-based applications")
4859 (description
4860 "A Procfile is a file which describes how to run an application
4861 consisting of several processes. honcho starts all listed processes.
4862 The output of all running processes is collected by honcho and
4863 displayed.")
4864 (license license:expat)))
4865
4866 (define-public python2-honcho
4867 (package-with-python2 python-honcho))
4868
4869 (define-public python-pexpect
4870 (package
4871 (name "python-pexpect")
4872 (version "4.6.0")
4873 (source
4874 (origin
4875 (method url-fetch)
4876 (uri (pypi-uri "pexpect" version))
4877 (sha256
4878 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4879 (build-system python-build-system)
4880 (arguments
4881 `(#:phases
4882 (modify-phases %standard-phases
4883 (add-before 'check 'prepare-tests
4884 (lambda _
4885 (substitute* (find-files "tests")
4886 (("/bin/ls") (which "ls"))
4887 (("/bin/echo") (which "echo"))
4888 (("/bin/which") (which "which"))
4889 ;; Many tests try to use the /bin directory which
4890 ;; is not present in the build environment.
4891 ;; Use one that's non-empty and unlikely to change.
4892 (("/bin'") "/dev'"))
4893 ;; XXX: Socket connection test gets "Connection reset by peer".
4894 ;; Why does it not work? Delete for now.
4895 (delete-file "tests/test_socket.py")
4896 #t))
4897 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4898 (native-inputs
4899 `(("python-nose" ,python-nose)
4900 ("python-pytest" ,python-pytest)
4901 ("man-db" ,man-db)
4902 ("which" ,which)
4903 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4904 (propagated-inputs
4905 `(("python-ptyprocess" ,python-ptyprocess)))
4906 (home-page "http://pexpect.readthedocs.org/")
4907 (synopsis "Controlling interactive console applications")
4908 (description
4909 "Pexpect is a pure Python module for spawning child applications;
4910 controlling them; and responding to expected patterns in their output.
4911 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4912 child application and control it as if a human were typing commands.")
4913 (license license:isc)))
4914
4915 (define-public python2-pexpect
4916 (package-with-python2 python-pexpect))
4917
4918 (define-public python-setuptools-scm
4919 (package
4920 (name "python-setuptools-scm")
4921 (version "3.2.0")
4922 (source (origin
4923 (method url-fetch)
4924 (uri (pypi-uri "setuptools_scm" version))
4925 (sha256
4926 (base32
4927 "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj"))))
4928 (build-system python-build-system)
4929 (home-page "https://github.com/pypa/setuptools_scm/")
4930 (synopsis "Manage Python package versions in SCM metadata")
4931 (description
4932 "Setuptools_scm handles managing your Python package versions in
4933 @dfn{software configuration management} (SCM) metadata instead of declaring
4934 them as the version argument or in a SCM managed file.")
4935 (license license:expat)))
4936
4937 ;; Needed by python-lazy-object-proxy, remove on next update cycle.
4938 (define-public python-setuptools-scm-3.3
4939 (package
4940 (inherit python-setuptools-scm)
4941 (version "3.3.3")
4942 (source (origin
4943 (method url-fetch)
4944 (uri (pypi-uri "setuptools_scm" version))
4945 (sha256
4946 (base32
4947 "19cyndx23xmpbhz4qrwmfwsmnnaczd0dw7qg977ksq2dbvxy29dx"))))))
4948
4949 (define-public python2-setuptools-scm
4950 (package-with-python2 python-setuptools-scm))
4951
4952 (define-public python-pathlib2
4953 (package
4954 (name "python-pathlib2")
4955 (version "2.3.3")
4956 (source
4957 (origin
4958 (method url-fetch)
4959 (uri (pypi-uri "pathlib2" version))
4960 (sha256
4961 (base32
4962 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
4963 (build-system python-build-system)
4964 (propagated-inputs
4965 `(("python-scandir" ,python-scandir)
4966 ("python-six" ,python-six)))
4967 (home-page "https://pypi.python.org/pypi/pathlib2/")
4968 (synopsis "Object-oriented file system paths")
4969 (description "The goal of pathlib2 is to provide a backport of the
4970 standard @code{pathlib} module which tracks the standard library module, so
4971 all the newest features of the standard @code{pathlib} can be used also on
4972 older Python versions.")
4973 (license license:expat)))
4974
4975 (define-public python-importlib-metadata
4976 (package
4977 (name "python-importlib-metadata")
4978 (version "0.23")
4979 (source
4980 (origin
4981 (method url-fetch)
4982 (uri (pypi-uri "importlib_metadata" version))
4983 (sha256
4984 (base32 "09mdqdfv5rdrwz80jh9m379gxmvk2vhjfz0fg53hid00icvxf65a"))))
4985 (build-system python-build-system)
4986 (propagated-inputs
4987 `(("python-configparser" ,python-configparser)
4988 ("python-contextlib2" ,python-contextlib2)
4989 ("python-docutils" ,python-docutils)
4990 ("python-pathlib2" ,python-pathlib2)
4991 ("python-rst.linker" ,python-rst.linker)
4992 ("python-zipp" ,python-zipp)))
4993 (native-inputs
4994 `(("python-setuptools-scm" ,python-setuptools-scm)
4995 ("python-sphinx" ,python-sphinx)))
4996 (home-page "https://importlib-metadata.readthedocs.io/")
4997 (synopsis "Read metadata from Python packages")
4998 (description
4999 "@code{importlib_metadata} is a library which provides an API for
5000 accessing an installed Python package's metadata, such as its entry points or
5001 its top-level name. This functionality intends to replace most uses of
5002 @code{pkg_resources} entry point API and metadata API. Along with
5003 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
5004 need to use the older and less efficient @code{pkg_resources} package.")
5005 (license license:asl2.0)))
5006
5007 (define-public python-jaraco-packaging
5008 (package
5009 (name "python-jaraco-packaging")
5010 (version "6.1")
5011 (source
5012 (origin
5013 (method url-fetch)
5014 (uri (pypi-uri "jaraco.packaging" version))
5015 (sha256
5016 (base32
5017 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
5018 (build-system python-build-system)
5019 (propagated-inputs
5020 `(("python-pytest" ,python-pytest)
5021 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
5022 ("python-pytest-flake8" ,python-pytest-flake8)
5023 ("python-rst.linker" ,python-rst.linker)
5024 ("python-setuptools" ,python-setuptools)
5025 ("python-setuptools-scm" ,python-setuptools-scm)
5026 ("python-six" ,python-six)
5027 ("python-sphinx" ,python-sphinx)))
5028 (home-page "https://github.com/jaraco/jaraco.packaging")
5029 (synopsis "Tools to supplement packaging Python releases")
5030 (description
5031 "This package provides various tools to supplement packaging Python
5032 releases.")
5033 (license license:expat)))
5034
5035 (define-public python-pathpy
5036 (package
5037 (name "python-pathpy")
5038 (version "11.5.1")
5039 (source
5040 (origin
5041 (method url-fetch)
5042 (uri (pypi-uri "path.py" version))
5043 (sha256
5044 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
5045 (outputs '("out" "doc"))
5046 (build-system python-build-system)
5047 (propagated-inputs
5048 `(("python-appdirs" ,python-appdirs)
5049 ("python-importlib-metadata" ,python-importlib-metadata)))
5050 (native-inputs
5051 `(("python-setuptools-scm" ,python-setuptools-scm)
5052 ("python-sphinx" ,python-sphinx)
5053 ("python-rst.linker" ,python-rst.linker)
5054 ("python-pytest" ,python-pytest)
5055 ("python-pytest-runner" ,python-pytest-runner)
5056 ("python-jaraco-packaging" ,python-jaraco-packaging)))
5057 (arguments
5058 `(#:phases
5059 (modify-phases %standard-phases
5060 (add-after 'build 'build-doc
5061 (lambda _
5062 (setenv "LANG" "en_US.UTF-8")
5063 (invoke "python" "setup.py" "build_sphinx")))
5064 (add-after 'install 'install-doc
5065 (lambda* (#:key outputs #:allow-other-keys)
5066 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5067 (doc (string-append data "/doc/" ,name "-" ,version))
5068 (html (string-append doc "/html")))
5069 (mkdir-p html)
5070 (for-each (lambda (file)
5071 (copy-file file (string-append doc "/" file)))
5072 '("README.rst" "CHANGES.rst"))
5073 (copy-recursively "build/sphinx/html" html)
5074 #t)))
5075 (replace 'check
5076 (lambda _
5077 ;; The import time test aborts if an import takes longer than
5078 ;; 100ms. It may very well take a little longer than that.
5079 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
5080 (home-page "https://github.com/jaraco/path.py")
5081 (synopsis "Python module wrapper for built-in os.path")
5082 (description
5083 "@code{path.py} implements path objects as first-class entities, allowing
5084 common operations on files to be invoked on those path objects directly.")
5085 (license license:expat)))
5086
5087 (define-public python2-pathpy
5088 (package-with-python2 python-pathpy))
5089
5090 (define-public python-simplegeneric
5091 (package
5092 (name "python-simplegeneric")
5093 (version "0.8.1")
5094 (source
5095 (origin
5096 (method url-fetch)
5097 (uri (pypi-uri "simplegeneric" version ".zip"))
5098 (sha256
5099 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5100 (build-system python-build-system)
5101 (native-inputs
5102 `(("unzip" ,unzip)))
5103 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5104 (synopsis "Python module for simple generic functions")
5105 (description
5106 "The simplegeneric module lets you define simple single-dispatch generic
5107 functions, akin to Python’s built-in generic functions like @code{len()},
5108 @code{iter()} and so on. However, instead of using specially-named methods,
5109 these generic functions use simple lookup tables, akin to those used by
5110 e.g. @code{pickle.dump()} and other generic functions found in the Python
5111 standard library.")
5112 (license license:zpl2.1)))
5113
5114 (define-public python2-simplegeneric
5115 (package-with-python2 python-simplegeneric))
5116
5117 (define-public python-ipython-genutils
5118 ;; TODO: This package is retired, check if can be removed, see description.
5119 (package
5120 (name "python-ipython-genutils")
5121 (version "0.1.0")
5122 (source
5123 (origin
5124 (method url-fetch)
5125 (uri (pypi-uri "ipython_genutils" version))
5126 (sha256
5127 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5128 (build-system python-build-system)
5129 (arguments `(#:tests? #f)) ; no tests
5130 (home-page "https://ipython.org")
5131 (synopsis "Vestigial utilities from IPython")
5132 (description
5133 "This package provides retired utilities from IPython. No packages
5134 outside IPython/Jupyter should depend on it.
5135
5136 This package shouldn't exist. It contains some common utilities shared by
5137 Jupyter and IPython projects during The Big Split. As soon as possible, those
5138 packages will remove their dependency on this, and this package will go
5139 away.")
5140 (license license:bsd-3)))
5141
5142 (define-public python2-ipython-genutils
5143 (package-with-python2 python-ipython-genutils))
5144
5145 (define-public python-traitlets
5146 (package
5147 (name "python-traitlets")
5148 (version "4.3.3")
5149 (source
5150 (origin
5151 (method url-fetch)
5152 (uri (pypi-uri "traitlets" version))
5153 (sha256
5154 (base32
5155 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
5156 (build-system python-build-system)
5157 (arguments
5158 `(#:phases
5159 (modify-phases %standard-phases
5160 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5161 (propagated-inputs
5162 `(("python-ipython-genutils" ,python-ipython-genutils)
5163 ("python-decorator" ,python-decorator)))
5164 (native-inputs
5165 `(("python-pytest" ,python-pytest)))
5166 (properties `((python2-variant . ,(delay python2-traitlets))))
5167 (home-page "https://ipython.org")
5168 (synopsis "Configuration system for Python applications")
5169 (description
5170 "Traitlets is a framework that lets Python classes have attributes with
5171 type checking, dynamically calculated default values, and ‘on change’
5172 callbacks. The package also includes a mechanism to use traitlets for
5173 configuration, loading values from files or from command line arguments. This
5174 is a distinct layer on top of traitlets, so you can use traitlets in your code
5175 without using the configuration machinery.")
5176 (license license:bsd-3)))
5177
5178 (define-public python2-traitlets
5179 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5180 (package
5181 (inherit traitlets)
5182 (propagated-inputs
5183 `(("python2-enum34" ,python2-enum34)
5184 ,@(package-propagated-inputs traitlets))))))
5185
5186 (define-public python-jupyter-core
5187 (package
5188 (name "python-jupyter-core")
5189 (version "4.4.0")
5190 (source
5191 (origin
5192 (method url-fetch)
5193 (uri (string-append (pypi-uri "jupyter_core" version)))
5194 (sha256
5195 (base32
5196 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5197 (build-system python-build-system)
5198 ;; FIXME: not sure how to run the tests
5199 (arguments `(#:tests? #f))
5200 (propagated-inputs
5201 `(("python-traitlets" ,python-traitlets)))
5202 (home-page "http://jupyter.org/")
5203 (synopsis "Jupyter base package")
5204 (description
5205 "Jupyter core is the base package on which Jupyter projects rely.")
5206 (license license:bsd-3)))
5207
5208 (define-public python2-jupyter-core
5209 (package-with-python2 python-jupyter-core))
5210
5211 (define-public python-jupyter-client
5212 (package
5213 (name "python-jupyter-client")
5214 (version "5.2.4")
5215 (source
5216 (origin
5217 (method url-fetch)
5218 (uri (pypi-uri "jupyter_client" version))
5219 (sha256
5220 (base32
5221 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5222 (build-system python-build-system)
5223 ;; Tests fail because of missing native python kernel which I assume is
5224 ;; provided by the ipython package, which we cannot use because it would
5225 ;; cause a dependency cycle.
5226 (arguments
5227 `(#:tests? #f
5228
5229 #:phases (modify-phases %standard-phases
5230 (add-after 'unpack 'set-tool-file-names
5231 (lambda* (#:key inputs #:allow-other-keys)
5232 (let ((iproute (assoc-ref inputs "iproute")))
5233 (substitute* "jupyter_client/localinterfaces.py"
5234 (("'ip'")
5235 (string-append "'" iproute "/sbin/ip'")))
5236 #t))))))
5237 (inputs
5238 `(("iproute" ,iproute)))
5239 (propagated-inputs
5240 `(("python-pyzmq" ,python-pyzmq)
5241 ("python-traitlets" ,python-traitlets)
5242 ("python-jupyter-core" ,python-jupyter-core)))
5243 (home-page "http://jupyter.org/")
5244 (synopsis "Jupyter protocol implementation and client libraries")
5245 (description
5246 "The @code{jupyter_client} package contains the reference implementation
5247 of the Jupyter protocol. It also provides client and kernel management APIs
5248 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5249 installing @code{kernelspec}s for use with Jupyter frontends.")
5250 (license license:bsd-3)))
5251
5252 (define-public python2-jupyter-client
5253 (package-with-python2 python-jupyter-client))
5254
5255 (define-public python-ipykernel
5256 (package
5257 (name "python-ipykernel")
5258 (version "5.1.3")
5259 (source
5260 (origin
5261 (method url-fetch)
5262 (uri (pypi-uri "ipykernel" version))
5263 (sha256
5264 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
5265 (build-system python-build-system)
5266 (arguments
5267 `(#:phases
5268 (modify-phases %standard-phases
5269 (replace 'check
5270 (lambda _
5271 (setenv "HOME" "/tmp")
5272 (invoke "pytest" "-v")
5273 #t))
5274 (add-after 'install 'set-python-file-name
5275 (lambda* (#:key outputs #:allow-other-keys)
5276 ;; Record the absolute file name of the 'python' executable in
5277 ;; 'kernel.json'.
5278 (let ((out (assoc-ref outputs "out")))
5279 (substitute* (string-append out "/share/jupyter"
5280 "/kernels/python3/kernel.json")
5281 (("\"python\"")
5282 (string-append "\"" (which "python") "\"")))
5283 #t))))))
5284 (propagated-inputs
5285 `(("python-ipython" ,python-ipython)
5286 ;; imported at runtime during connect
5287 ("python-jupyter-client" ,python-jupyter-client)))
5288 (native-inputs
5289 `(("python-flaky" ,python-flaky)
5290 ("python-nose" ,python-nose)
5291 ("python-pytest" ,python-pytest)))
5292 (home-page "https://ipython.org")
5293 (synopsis "IPython Kernel for Jupyter")
5294 (description
5295 "This package provides the IPython kernel for Jupyter.")
5296 (license license:bsd-3)))
5297
5298 ;; Version 5.1.1 and above no longer support Python 2.
5299 (define-public python2-ipykernel
5300 (package
5301 (name "python2-ipykernel")
5302 (version "5.1.0")
5303 (source
5304 (origin
5305 (method url-fetch)
5306 (uri (pypi-uri "ipykernel" version))
5307 (sha256
5308 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5309 (build-system python-build-system)
5310 (arguments
5311 `(#:python ,python-2
5312 #:phases
5313 (modify-phases %standard-phases
5314 (replace 'check
5315 (lambda _
5316 (setenv "HOME" "/tmp")
5317 (invoke "pytest" "-v")
5318 #t)))))
5319 (propagated-inputs
5320 `(("python2-ipython" ,python2-ipython)
5321 ;; imported at runtime during connect
5322 ("python2-jupyter-client" ,python2-jupyter-client)))
5323 (native-inputs
5324 `(("python2-pytest" ,python2-pytest)
5325 ("python2-nose" ,python2-nose)))
5326 (home-page "https://ipython.org")
5327 (synopsis "IPython Kernel for Jupyter")
5328 (description
5329 "This package provides the IPython kernel for Jupyter.")
5330 (license license:bsd-3)))
5331
5332 (define-public python-pari-jupyter
5333 (package
5334 (name "python-pari-jupyter")
5335 (version "1.3.2")
5336 (source
5337 (origin
5338 (method url-fetch)
5339 (uri (pypi-uri "pari_jupyter" version))
5340 (sha256
5341 (base32
5342 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5343 (build-system python-build-system)
5344 (propagated-inputs
5345 `(("python-ipykernel" ,python-ipykernel)))
5346 (inputs
5347 `(("pari-gp" ,pari-gp)
5348 ("readline" ,readline)))
5349 (arguments
5350 `(#:tests? #f)) ; no test suite
5351 (home-page
5352 "https://github.com/jdemeyer/pari_jupyter")
5353 (synopsis "A Jupyter kernel for PARI/GP")
5354 (description "The package provides a PARI/GP kernel for Jupyter.")
5355 (license license:gpl3+)))
5356
5357 (define-public python-backcall
5358 (package
5359 (name "python-backcall")
5360 (version "0.1.0")
5361 (source
5362 (origin
5363 (method url-fetch)
5364 (uri (pypi-uri "backcall" version))
5365 (sha256
5366 (base32
5367 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5368 (build-system python-build-system)
5369 (home-page "https://github.com/takluyver/backcall/")
5370 (synopsis "Specifications for callback functions passed in to an API")
5371 (description
5372 "If your code lets other people supply callback functions, it's important
5373 to specify the function signature you expect, and check that functions support
5374 that. Adding extra parameters later would break other peoples code unless
5375 you're careful. The @code{backcall} package provides a way of specifying the
5376 callback signature using a prototype function.")
5377 (license license:bsd-3)))
5378
5379 ;; This is the latest release of the LTS version of ipython with support for
5380 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
5381 ;; dropped support for Python 2.7.
5382 (define-public python2-ipython
5383 (package
5384 (name "python2-ipython")
5385 (version "5.8.0")
5386 (source
5387 (origin
5388 (method url-fetch)
5389 (uri (pypi-uri "ipython" version ".tar.gz"))
5390 (sha256
5391 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5392 (build-system python-build-system)
5393 (propagated-inputs
5394 `(("python2-backports-shutil-get-terminal-size"
5395 ,python2-backports-shutil-get-terminal-size)
5396 ("python2-pathlib2" ,python2-pathlib2)
5397 ("python2-pyzmq" ,python2-pyzmq)
5398 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5399 ("python2-terminado" ,python2-terminado)
5400 ("python2-matplotlib" ,python2-matplotlib)
5401 ("python2-numpy" ,python2-numpy)
5402 ("python2-numpydoc" ,python2-numpydoc)
5403 ("python2-jinja2" ,python2-jinja2)
5404 ("python2-mistune" ,python2-mistune)
5405 ("python2-pexpect" ,python2-pexpect)
5406 ("python2-pickleshare" ,python2-pickleshare)
5407 ("python2-simplegeneric" ,python2-simplegeneric)
5408 ("python2-jsonschema" ,python2-jsonschema)
5409 ("python2-traitlets" ,python2-traitlets)
5410 ("python2-nbformat" ,python2-nbformat)
5411 ("python2-pygments" ,python2-pygments)))
5412 (inputs
5413 `(("readline" ,readline)
5414 ("which" ,which)))
5415 (native-inputs
5416 `(("graphviz" ,graphviz)
5417 ("pkg-config" ,pkg-config)
5418 ("python2-requests" ,python2-requests) ;; for tests
5419 ("python2-testpath" ,python2-testpath)
5420 ("python2-mock" ,python2-mock)
5421 ("python2-nose" ,python2-nose)))
5422 (arguments
5423 `(#:python ,python-2
5424 #:phases
5425 (modify-phases %standard-phases
5426 (add-before 'check 'delete-broken-tests
5427 (lambda* (#:key inputs #:allow-other-keys)
5428 ;; These tests throw errors for unknown reasons.
5429 (delete-file "IPython/core/tests/test_profile.py")
5430 (delete-file "IPython/core/tests/test_interactiveshell.py")
5431 (delete-file "IPython/core/tests/test_magic.py")
5432 #t)))))
5433 (home-page "https://ipython.org")
5434 (synopsis "IPython is a tool for interactive computing in Python")
5435 (description
5436 "IPython provides a rich architecture for interactive computing with:
5437 Powerful interactive shells, a browser-based notebook, support for interactive
5438 data visualization, embeddable interpreters and tools for parallel
5439 computing.")
5440 (license license:bsd-3)))
5441
5442 (define-public python-ipython
5443 (package
5444 (name "python-ipython")
5445 (version "7.9.0")
5446 (source
5447 (origin
5448 (method url-fetch)
5449 (uri (pypi-uri "ipython" version ".tar.gz"))
5450 (sha256
5451 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
5452 (build-system python-build-system)
5453 (propagated-inputs
5454 `(("python-backcall" ,python-backcall)
5455 ("python-pyzmq" ,python-pyzmq)
5456 ("python-prompt-toolkit" ,python-prompt-toolkit)
5457 ("python-terminado" ,python-terminado)
5458 ("python-matplotlib" ,python-matplotlib)
5459 ("python-numpy" ,python-numpy)
5460 ("python-numpydoc" ,python-numpydoc)
5461 ("python-jedi" ,python-jedi)
5462 ("python-jinja2" ,python-jinja2)
5463 ("python-mistune" ,python-mistune)
5464 ("python-pexpect" ,python-pexpect)
5465 ("python-pickleshare" ,python-pickleshare)
5466 ("python-simplegeneric" ,python-simplegeneric)
5467 ("python-jsonschema" ,python-jsonschema)
5468 ("python-traitlets" ,python-traitlets)
5469 ("python-nbformat" ,python-nbformat)
5470 ("python-pygments" ,python-pygments)))
5471 (inputs
5472 `(("readline" ,readline)
5473 ("which" ,which)))
5474 (native-inputs
5475 `(("graphviz" ,graphviz)
5476 ("pkg-config" ,pkg-config)
5477 ("python-requests" ,python-requests) ;; for tests
5478 ("python-testpath" ,python-testpath)
5479 ("python-nose" ,python-nose)))
5480 (arguments
5481 `(#:phases
5482 (modify-phases %standard-phases
5483 (add-after 'unpack 'make-docs-reproducible
5484 (lambda _
5485 (substitute* "IPython/sphinxext/ipython_directive.py"
5486 ((".*import datetime") "")
5487 ((".*datetime.datetime.now\\(\\)") "")
5488 (("%timeit") "# %timeit"))
5489 #t))
5490 ;; Tests can only be run after the library has been installed and not
5491 ;; within the source directory.
5492 (delete 'check)
5493 (add-after 'install 'check
5494 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5495 (if tests?
5496 (begin
5497 ;; Make installed package available for running the tests
5498 (add-installed-pythonpath inputs outputs)
5499 (setenv "HOME" "/tmp/") ;; required by a test
5500 ;; We only test the core because one of the other tests
5501 ;; tries to import ipykernel.
5502 (invoke "python" "IPython/testing/iptest.py"
5503 "-v" "IPython/core/tests"))
5504 #t)))
5505 (add-before 'check 'fix-tests
5506 (lambda* (#:key inputs #:allow-other-keys)
5507 (substitute* "./IPython/utils/_process_posix.py"
5508 (("/usr/bin/env', 'which") (which "which")))
5509 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5510 (("#!/usr/bin/env python")
5511 (string-append "#!" (which "python"))))
5512 ;; This test introduces a circular dependency on ipykernel
5513 ;; (which depends on ipython).
5514 (delete-file "IPython/core/tests/test_display.py")
5515 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
5516 (delete-file "IPython/core/tests/test_interactiveshell.py")
5517 #t)))))
5518 (home-page "https://ipython.org")
5519 (synopsis "IPython is a tool for interactive computing in Python")
5520 (description
5521 "IPython provides a rich architecture for interactive computing with:
5522 Powerful interactive shells, a browser-based notebook, support for interactive
5523 data visualization, embeddable interpreters and tools for parallel
5524 computing.")
5525 (license license:bsd-3)))
5526
5527 (define-public python-ipython-documentation
5528 (package
5529 (inherit python-ipython)
5530 (name "python-ipython-documentation")
5531 (version (package-version python-ipython))
5532 (arguments
5533 `(#:phases
5534 (modify-phases %standard-phases
5535 (delete 'build)
5536 (delete 'check)
5537 (replace 'install
5538 (lambda* (#:key outputs #:allow-other-keys)
5539 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5540 (doc (string-append data "/doc/" ,name "-" ,version))
5541 (html (string-append doc "/html"))
5542 (man1 (string-append data "/man/man1"))
5543 (info (string-append data "/info"))
5544 (examples (string-append doc "/examples"))
5545 (python-arg (string-append "PYTHON=" (which "python"))))
5546 (setenv "LANG" "en_US.utf8")
5547 (with-directory-excursion "docs"
5548 ;; FIXME: pdf fails to build
5549 ;;(system* "make" "pdf" "PAPER=a4")
5550 (system* "make" python-arg "html")
5551 ;; FIXME: the generated texi file contains ^@^@, which trips
5552 ;; up the parser.
5553 ;; (system* "make" python-arg "info")
5554 )
5555 (copy-recursively "docs/man" man1)
5556 (copy-recursively "examples" examples)
5557 (copy-recursively "docs/build/html" html)
5558 ;; (copy-file "docs/build/latex/ipython.pdf"
5559 ;; (string-append doc "/ipython.pdf"))
5560 (mkdir-p info)
5561 ;; (copy-file "docs/build/texinfo/ipython.info"
5562 ;; (string-append info "/ipython.info"))
5563 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5564 #t)))))
5565 (inputs
5566 `(("python-ipython" ,python-ipython)
5567 ("python-ipykernel" ,python-ipykernel)))
5568 (native-inputs
5569 `(("python-sphinx" ,python-sphinx)
5570 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
5571 ;; FIXME: It's possible that a smaller union would work just as well.
5572 ("texlive" ,(texlive-union (list texlive-amsfonts
5573 texlive-fonts-ec
5574 texlive-generic-ifxetex
5575 texlive-generic-pdftex
5576 texlive-latex-capt-of
5577 texlive-latex-cmap
5578 texlive-latex-environ
5579 texlive-latex-eqparbox
5580 texlive-latex-etoolbox
5581 texlive-latex-expdlist
5582 texlive-latex-fancyhdr
5583 texlive-latex-fancyvrb
5584 texlive-latex-fncychap
5585 texlive-latex-float
5586 texlive-latex-framed
5587 texlive-latex-geometry
5588 texlive-latex-graphics
5589 texlive-latex-hyperref
5590 texlive-latex-mdwtools
5591 texlive-latex-multirow
5592 texlive-latex-needspace
5593 texlive-latex-oberdiek
5594 texlive-latex-parskip
5595 texlive-latex-preview
5596 texlive-latex-tabulary
5597 texlive-latex-threeparttable
5598 texlive-latex-titlesec
5599 texlive-latex-trimspaces
5600 texlive-latex-ucs
5601 texlive-latex-upquote
5602 texlive-latex-url
5603 texlive-latex-varwidth
5604 texlive-latex-wrapfig)))
5605 ("texinfo" ,texinfo)))))
5606
5607 (define-public python-urwid
5608 (package
5609 (name "python-urwid")
5610 (version "2.0.1")
5611 (source
5612 (origin
5613 (method url-fetch)
5614 (uri (pypi-uri "urwid" version))
5615 (sha256
5616 (base32
5617 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5618 (build-system python-build-system)
5619 (home-page "http://urwid.org")
5620 (synopsis "Console user interface library for Python")
5621 (description
5622 "Urwid is a curses-based UI/widget library for Python. It includes many
5623 features useful for text console applications.")
5624 (license license:lgpl2.1+)))
5625
5626 (define-public python2-urwid
5627 (package-with-python2 python-urwid))
5628
5629 (define-public python-urwidtrees
5630 (package
5631 (name "python-urwidtrees")
5632 (version "1.0.2")
5633 (source
5634 (origin
5635 (method url-fetch)
5636 ;; package author intends on distributing via github rather than pypi:
5637 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5638 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5639 version ".tar.gz"))
5640 (file-name (string-append name "-" version ".tar.gz"))
5641 (sha256
5642 (base32
5643 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5644 (build-system python-build-system)
5645 (arguments
5646 '(#:tests? #f)) ; no tests
5647 (propagated-inputs `(("python-urwid" ,python-urwid)))
5648 (home-page "https://github.com/pazz/urwidtrees")
5649 (synopsis "Tree widgets for urwid")
5650 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5651 toolkit. Use it to build trees of widgets.")
5652 (license license:gpl3+)))
5653
5654 (define-public python2-urwidtrees
5655 (package-with-python2 python-urwidtrees))
5656
5657 (define-public python-ua-parser
5658 (package
5659 (name "python-ua-parser")
5660 (version "0.8.0")
5661 (source
5662 (origin
5663 (method url-fetch)
5664 (uri (pypi-uri "ua-parser" version))
5665 (sha256
5666 (base32
5667 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5668 (build-system python-build-system)
5669 (arguments
5670 `(#:tests? #f)) ;no test suite in release
5671 (native-inputs
5672 `(("python-pyyaml" ,python-pyyaml)))
5673 (home-page "https://github.com/ua-parser/uap-python")
5674 (synopsis "User agent parser")
5675 (description
5676 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5677 (license license:asl2.0)))
5678
5679 (define-public python2-ua-parser
5680 (package-with-python2 python-ua-parser))
5681
5682 (define-public python-user-agents
5683 (package
5684 (name "python-user-agents")
5685 (version "1.1.0")
5686 (source
5687 (origin
5688 (method url-fetch)
5689 (uri (pypi-uri "user-agents" version))
5690 (sha256
5691 (base32
5692 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5693 (build-system python-build-system)
5694 (arguments
5695 `(#:tests? #f)) ;missing devices.json test file in release
5696 (propagated-inputs
5697 `(("python-ua-parser" ,python-ua-parser)))
5698 (home-page "https://github.com/selwin/python-user-agents")
5699 (synopsis "User Agent strings parsing library")
5700 (description
5701 "A library to identify devices (phones, tablets) and their capabilities by
5702 parsing (browser/HTTP) user agent strings.")
5703 (license license:expat)))
5704
5705 (define-public python2-user-agents
5706 (package-with-python2 python-user-agents))
5707
5708 (define-public python-dbus
5709 (package
5710 (name "python-dbus")
5711 (version "1.2.14")
5712 (source
5713 (origin
5714 (method url-fetch)
5715 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5716 "dbus-python-" version ".tar.gz"))
5717 (sha256
5718 (base32 "0cdchkgnivlka4lf8q4qfk0yxq483i3r3aqickjf8hfn7nx0c0mi"))))
5719 (build-system gnu-build-system)
5720 (native-inputs
5721 `(("pkg-config" ,pkg-config)))
5722 (inputs
5723 `(("python" ,python-wrapper)
5724 ("dbus-glib" ,dbus-glib)))
5725 (synopsis "Python bindings for D-bus")
5726 (description "python-dbus provides bindings for libdbus, the reference
5727 implementation of D-Bus.")
5728 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5729 (license license:expat)))
5730
5731 (define-public python2-dbus
5732 (package (inherit python-dbus)
5733 (name "python2-dbus")
5734 (inputs `(("python" ,python-2)
5735 ,@(alist-delete "python"
5736 (package-inputs python-dbus)
5737 equal?)))))
5738
5739 (define-public python-notify2
5740 (package
5741 (name "python-notify2")
5742 (version "0.3.1")
5743 (source
5744 (origin
5745 (method url-fetch)
5746 (uri (pypi-uri "notify2" version))
5747 (sha256
5748 (base32
5749 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
5750 (build-system python-build-system)
5751 (arguments `(#:tests? #f)) ; tests depend on system state
5752 (native-inputs
5753 `(("python-dbus" ,python-dbus)))
5754 (home-page "https://bitbucket.org/takluyver/pynotify2")
5755 (synopsis "Python interface to D-Bus notifications")
5756 (description
5757 "Pynotify2 provides a Python interface for sending D-Bus notifications.
5758 It is a reimplementation of pynotify in pure Python, and an alternative to
5759 the GObject Introspection bindings to libnotify for non-GTK applications.")
5760 (license (list license:bsd-2
5761 license:lgpl2.1+))))
5762
5763 (define-public python2-notify2
5764 (package-with-python2 python-notify2))
5765
5766 (define-public python-lxml
5767 (package
5768 (name "python-lxml")
5769 (version "4.4.1")
5770 (source
5771 (origin
5772 (method url-fetch)
5773 (uri (pypi-uri "lxml" version))
5774 (sha256
5775 (base32
5776 "14jnpfcpgqr9sx8ppd286jzcbk0b36hbqsvd8jkvffipzw5v8768"))))
5777 (build-system python-build-system)
5778 (arguments
5779 `(#:phases (modify-phases %standard-phases
5780 (replace 'check
5781 (lambda _
5782 (invoke "make" "test"))))))
5783 (inputs
5784 `(("libxml2" ,libxml2)
5785 ("libxslt" ,libxslt)))
5786 (home-page "http://lxml.de/")
5787 (synopsis
5788 "Python XML processing library")
5789 (description
5790 "The lxml XML toolkit is a Pythonic binding for the C libraries
5791 libxml2 and libxslt.")
5792 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5793
5794 (define-public python2-lxml
5795 (package-with-python2 python-lxml))
5796
5797 ;; beautifulsoup4 has a totally different namespace than 3.x,
5798 ;; and pypi seems to put it under its own name, so I guess we should too
5799 (define-public python-beautifulsoup4
5800 (package
5801 (name "python-beautifulsoup4")
5802 (version "4.7.1")
5803 (source
5804 (origin
5805 (method url-fetch)
5806 (uri (pypi-uri "beautifulsoup4" version))
5807 (sha256
5808 (base32
5809 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
5810 (build-system python-build-system)
5811 (arguments
5812 `(#:phases
5813 (modify-phases %standard-phases
5814 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5815 ;; must use this conversion script when building with Python 3. The
5816 ;; conversion script also runs the tests.
5817 ;; For more information, see the file 'convert-py3k' in the source
5818 ;; distribution.
5819 (replace 'check
5820 (lambda _ (invoke "./convert-py3k"))))))
5821 (propagated-inputs
5822 `(("python-soupsieve" ,python-soupsieve)))
5823 (home-page
5824 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5825 (synopsis
5826 "Python screen-scraping library")
5827 (description
5828 "Beautiful Soup is a Python library designed for rapidly setting up
5829 screen-scraping projects. It offers Pythonic idioms for navigating,
5830 searching, and modifying a parse tree, providing a toolkit for
5831 dissecting a document and extracting what you need. It automatically
5832 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5833 (license license:expat)
5834 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5835
5836 (define-public python2-beautifulsoup4
5837 (package
5838 (inherit (package-with-python2
5839 (strip-python2-variant python-beautifulsoup4)))
5840 (arguments `(#:python ,python-2))))
5841
5842 (define-public python-soupsieve
5843 (package
5844 (name "python-soupsieve")
5845 (version "1.9.5")
5846 (source
5847 (origin
5848 (method url-fetch)
5849 (uri (pypi-uri "soupsieve" version))
5850 (sha256
5851 (base32
5852 "1nhd0q0ifwva9wn645s6pn74p1rd97asn3qfg75nphx1wkgcbhg2"))))
5853 (build-system python-build-system)
5854 (arguments `(#:tests? #f))
5855 ;;XXX: 2 tests fail currently despite claming they were to be
5856 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
5857 ;;don't want to create a circular dependency.
5858 (home-page "https://github.com/facelessuser/soupsieve")
5859 (synopsis "CSS selector library")
5860 (description
5861 "Soup Sieve is a CSS selector library designed to be used with Beautiful
5862 Soup 4. It aims to provide selecting, matching, and filtering using modern
5863 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
5864 specifications up through the latest CSS level 4 drafts and beyond (though
5865 some are not yet implemented).")
5866 (properties `((python2-variant . ,(delay python2-soupsieve))))
5867 (license license:expat)))
5868
5869 (define-public python2-soupsieve
5870 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
5871 (package
5872 (inherit base)
5873 (propagated-inputs
5874 `(("python2-backports-functools-lru-cache"
5875 ,python2-backports-functools-lru-cache)
5876 ,@(package-propagated-inputs base))))))
5877
5878 (define-public python-netifaces
5879 (package
5880 (name "python-netifaces")
5881 (version "0.10.7")
5882 (source
5883 (origin
5884 (method url-fetch)
5885 (uri (pypi-uri "netifaces" version))
5886 (sha256
5887 (base32
5888 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5889 (build-system python-build-system)
5890 (home-page "https://github.com/al45tair/netifaces")
5891 (synopsis
5892 "Python module for portable network interface information")
5893 (description
5894 "Netifaces is a Python module providing information on network
5895 interfaces in an easy and portable manner.")
5896 (license license:expat)))
5897
5898 (define-public python2-netifaces
5899 (package-with-python2 python-netifaces))
5900
5901 (define-public python-networkx
5902 (package
5903 (name "python-networkx")
5904 (version "2.2")
5905 (source
5906 (origin
5907 (method url-fetch)
5908 (uri (pypi-uri "networkx" version ".zip"))
5909 (sha256
5910 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5911 (build-system python-build-system)
5912 ;; python-decorator is needed at runtime.
5913 (propagated-inputs
5914 `(("python-decorator" ,python-decorator)))
5915 (native-inputs
5916 `(("python-nose" ,python-nose)
5917 ("unzip" ,unzip)))
5918 (home-page "https://networkx.github.io/")
5919 (synopsis "Python module for creating and manipulating graphs and networks")
5920 (description
5921 "NetworkX is a Python package for the creation, manipulation, and study
5922 of the structure, dynamics, and functions of complex networks.")
5923 (license license:bsd-3)))
5924
5925 (define-public python2-networkx
5926 (package-with-python2 python-networkx))
5927
5928 (define-public python-datrie
5929 (package
5930 (name "python-datrie")
5931 (version "0.8")
5932 (source
5933 (origin
5934 (method url-fetch)
5935 (uri (pypi-uri "datrie" version))
5936 (sha256
5937 (base32
5938 "0338r8xgmpy78556jhms0h6qkvyjr10p8bpgdvcpqzm9lrmxmmdx"))))
5939 (build-system python-build-system)
5940 (native-inputs
5941 `(("python-cython" ,python-cython)
5942 ("python-hypothesis" ,python-hypothesis)
5943 ("python-pytest" ,python-pytest)
5944 ("python-pytest-runner" ,python-pytest-runner)))
5945 (home-page "https://github.com/kmike/datrie")
5946 (synopsis "Fast, efficiently stored trie for Python")
5947 (description
5948 "This package provides a fast, efficiently stored trie implementation for
5949 Python.")
5950 (license license:lgpl2.1+)))
5951
5952 (define-public snakemake
5953 (package
5954 (name "snakemake")
5955 (version "5.7.1")
5956 (source
5957 (origin
5958 (method url-fetch)
5959 (uri (pypi-uri "snakemake" version))
5960 (sha256
5961 (base32 "1pnpvvn8n2a78cg360wz3ldmpqrsm2wzi0c0dmvki9fnsw6fxdas"))))
5962 (build-system python-build-system)
5963 (arguments
5964 ;; TODO: Package missing test dependencies.
5965 '(#:tests? #f
5966 #:phases
5967 (modify-phases %standard-phases
5968 ;; For cluster execution Snakemake will call Python. Since there is
5969 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5970 ;; this by calling the snakemake wrapper instead.
5971 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5972 (lambda* (#:key outputs #:allow-other-keys)
5973 (substitute* "snakemake/executors.py"
5974 (("\\{sys.executable\\} -m snakemake")
5975 (string-append (assoc-ref outputs "out")
5976 "/bin/snakemake")))
5977 #t)))))
5978 (propagated-inputs
5979 `(("python-appdirs" ,python-appdirs)
5980 ("python-configargparse" ,python-configargparse)
5981 ("python-datrie" ,python-datrie)
5982 ("python-docutils" ,python-docutils)
5983 ("python-gitpython" ,python-gitpython)
5984 ("python-jinja2" ,python-jinja2)
5985 ("python-jsonschema" ,python-jsonschema)
5986 ("python-networkx" ,python-networkx)
5987 ("python-psutil" ,python-psutil)
5988 ("python-pyyaml" ,python-pyyaml)
5989 ("python-ratelimiter" ,python-ratelimiter)
5990 ("python-requests" ,python-requests)
5991 ("python-wrapt" ,python-wrapt)))
5992 (home-page "https://snakemake.readthedocs.io")
5993 (synopsis "Python-based execution environment for make-like workflows")
5994 (description
5995 "Snakemake aims to reduce the complexity of creating workflows by
5996 providing a clean and modern domain specific specification language (DSL) in
5997 Python style, together with a fast and comfortable execution environment.")
5998 (license license:expat)))
5999
6000 (define-public python-pyqrcode
6001 (package
6002 (name "python-pyqrcode")
6003 (version "1.2.1")
6004 (source
6005 (origin
6006 (method url-fetch)
6007 (uri (pypi-uri "PyQRCode" version))
6008 (sha256
6009 (base32
6010 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
6011 (build-system python-build-system)
6012 (home-page
6013 "https://github.com/mnooner256/pyqrcode")
6014 (synopsis "QR code generator")
6015 (description
6016 "Pyqrcode is a QR code generator written purely in Python with
6017 SVG, EPS, PNG and terminal output.")
6018 (license license:bsd-3)))
6019
6020 (define-public python-seaborn
6021 (package
6022 (name "python-seaborn")
6023 (version "0.9.0")
6024 (source
6025 (origin
6026 (method url-fetch)
6027 (uri (pypi-uri "seaborn" version))
6028 (sha256
6029 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))
6030 (patches
6031 (list (origin
6032 (method url-fetch)
6033 ;; This has already been merged, but there is no new
6034 ;; release including this patch. It fixes problems
6035 ;; with axis rotation that would lead to test
6036 ;; failures.
6037 (uri "https://patch-diff.githubusercontent.com/raw/mwaskom/seaborn/pull/1716.diff")
6038 (sha256
6039 (base32
6040 "1lm870z316n9ivsyr86hpk1gxaraw0mrjvq42lqsm0znhjdp9q9w"))
6041 (file-name "seaborn-0.9.0-axis-rotation.patch"))))))
6042 (build-system python-build-system)
6043 (arguments
6044 `(#:phases
6045 (modify-phases %standard-phases
6046 (add-before 'check 'start-xserver
6047 (lambda* (#:key inputs #:allow-other-keys)
6048 (let ((xorg-server (assoc-ref inputs "xorg-server")))
6049 ;; There must be a running X server and make check doesn't
6050 ;; start one. Therefore we must do it.
6051 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
6052 (setenv "DISPLAY" ":1")
6053 #t)))
6054 (add-after 'unpack 'fix-tests
6055 (lambda _
6056 ;; test_cbar_ticks fails probably because of matplotlib's
6057 ;; expectation of using an older version of FreeType.
6058 (delete-file "seaborn/tests/test_matrix.py")
6059 #t))
6060 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
6061 (propagated-inputs
6062 `(("python-pandas" ,python-pandas)
6063 ("python-matplotlib" ,python-matplotlib)
6064 ("python-numpy" ,python-numpy)
6065 ("python-scipy" ,python-scipy)))
6066 (native-inputs
6067 `(("python-pytest" ,python-pytest)
6068 ("xorg-server" ,xorg-server-for-tests)))
6069 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6070 (synopsis "Statistical data visualization")
6071 (description
6072 "Seaborn is a library for making attractive and informative statistical
6073 graphics in Python. It is built on top of matplotlib and tightly integrated
6074 with the PyData stack, including support for numpy and pandas data structures
6075 and statistical routines from scipy and statsmodels.")
6076 (license license:bsd-3)))
6077
6078 (define-public python2-seaborn
6079 (package-with-python2 python-seaborn))
6080
6081 (define-public python-mpmath
6082 (package
6083 (name "python-mpmath")
6084 (version "0.19")
6085 (source (origin
6086 (method url-fetch)
6087 (uri (string-append "http://mpmath.org/files/mpmath-"
6088 version ".tar.gz"))
6089 (sha256
6090 (base32
6091 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6092 (build-system python-build-system)
6093 (arguments
6094 '(#:phases
6095 (modify-phases %standard-phases
6096 (replace 'check
6097 (lambda _
6098 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
6099 (home-page "http://mpmath.org")
6100 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6101 (description
6102 "@code{mpmath} can be used as an arbitrary-precision substitute for
6103 Python's float/complex types and math/cmath modules, but also does much
6104 more advanced mathematics.")
6105 (license license:bsd-3)))
6106
6107 (define-public python2-mpmath
6108 (package-with-python2 python-mpmath))
6109
6110 (define-public python-bigfloat
6111 (package
6112 (name "python-bigfloat")
6113 (version "0.3.0")
6114 (source
6115 (origin
6116 (method url-fetch)
6117 (uri (pypi-uri "bigfloat" version))
6118 (sha256
6119 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6120 (build-system python-build-system)
6121 (inputs
6122 `(("mpfr" ,mpfr)))
6123 (home-page "https://github.com/mdickinson/bigfloat")
6124 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6125 (description
6126 "This package provides a Python interface to the MPFR library for
6127 multiprecision arithmetic.")
6128 (license license:lgpl3+)))
6129
6130 (define-public python2-bigfloat
6131 (package-with-python2 python-bigfloat))
6132
6133 (define-public python-sympy
6134 (package
6135 (name "python-sympy")
6136 (version "1.1.1")
6137 (source
6138 (origin
6139 (method url-fetch)
6140 (uri (string-append
6141 "https://github.com/sympy/sympy/releases/download/sympy-"
6142 version "/sympy-" version ".tar.gz"))
6143 (sha256
6144 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6145 (build-system python-build-system)
6146 (arguments
6147 `(#:phases
6148 (modify-phases %standard-phases
6149 ;; Run the core tests after installation. By default it would run
6150 ;; *all* tests, which take a very long time to complete and are known
6151 ;; to be flaky.
6152 (delete 'check)
6153 (add-after 'install 'check
6154 (lambda* (#:key outputs #:allow-other-keys)
6155 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6156 #t)))))
6157 (propagated-inputs
6158 `(("python-mpmath" ,python-mpmath)))
6159 (home-page "http://www.sympy.org/")
6160 (synopsis "Python library for symbolic mathematics")
6161 (description
6162 "SymPy is a Python library for symbolic mathematics. It aims to become a
6163 full-featured computer algebra system (CAS) while keeping the code as simple
6164 as possible in order to be comprehensible and easily extensible.")
6165 (license license:bsd-3)))
6166
6167 (define-public python2-sympy
6168 (package
6169 (inherit (package-with-python2 python-sympy))
6170 (arguments
6171 `(#:phases
6172 (modify-phases %standard-phases
6173 ;; Run the core tests after installation. By default it would run
6174 ;; *all* tests, which take a very long time to complete and are known
6175 ;; to be flaky.
6176 (delete 'check)
6177 (add-after 'install 'check
6178 (lambda* (#:key outputs #:allow-other-keys)
6179 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6180 #t)))))))
6181
6182 (define-public python-q
6183 (package
6184 (name "python-q")
6185 (version "2.6")
6186 (source
6187 (origin
6188 (method url-fetch)
6189 (uri (pypi-uri "q" version))
6190 (sha256
6191 (base32
6192 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6193 (build-system python-build-system)
6194 (home-page "https://github.com/zestyping/q")
6195 (synopsis "Quick-and-dirty debugging output for tired programmers")
6196 (description
6197 "q is a Python module for \"print\" style of debugging Python code. It
6198 provides convenient short API for print out of values, tracebacks, and
6199 falling into the Python interpreter.")
6200 (license license:asl2.0)))
6201
6202 (define-public python2-q
6203 (package-with-python2 python-q))
6204
6205 (define-public python2-xlib
6206 (package
6207 (name "python2-xlib")
6208 (version "0.14")
6209 (source (origin
6210 (method url-fetch)
6211 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6212 "/" version "/"
6213 "python-xlib-" version ".tar.gz"))
6214 (sha256
6215 (base32
6216 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6217 (build-system python-build-system)
6218 (arguments
6219 `(#:python ,python-2 ;Python 2 only
6220 #:tests? #f)) ;no tests
6221 (home-page "http://python-xlib.sourceforge.net/")
6222 (synopsis "Python X11 client library")
6223 (description
6224 "The Python X Library is intended to be a fully functional X client
6225 library for Python programs. It is useful to implement low-level X clients.
6226 It is written entirely in Python.")
6227 (license license:gpl2+)))
6228
6229 (define-public python-singledispatch
6230 (package
6231 (name "python-singledispatch")
6232 (version "3.4.0.3")
6233 (source
6234 (origin
6235 (method url-fetch)
6236 (uri (pypi-uri "singledispatch" version))
6237 (sha256
6238 (base32
6239 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6240 (build-system python-build-system)
6241 (native-inputs
6242 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6243 (home-page
6244 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6245 (synopsis "Backport of singledispatch feature from Python 3.4")
6246 (description
6247 "This library brings functools.singledispatch from Python 3.4 to Python
6248 2.6-3.3.")
6249 (license license:expat)))
6250
6251 (define-public python2-singledispatch
6252 (package-with-python2 python-singledispatch))
6253
6254 ;; the python- version can be removed with python-3.5
6255 (define-public python-backports-abc
6256 (package
6257 (name "python-backports-abc")
6258 (version "0.5")
6259 (source
6260 (origin
6261 (method url-fetch)
6262 (uri (pypi-uri "backports_abc" version))
6263 (sha256
6264 (base32
6265 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6266 (build-system python-build-system)
6267 (home-page "https://github.com/cython/backports_abc")
6268 (synopsis "Backport of additions to the 'collections.abc' module")
6269 (description
6270 "Python-backports-abc provides a backport of additions to the
6271 @code{collections.abc} module in Python-3.5.")
6272 (license license:psfl)))
6273
6274 (define-public python2-backports-abc
6275 (package-with-python2 python-backports-abc))
6276
6277 (define-public python-backports-csv
6278 (package
6279 (name "python-backports-csv")
6280 (version "1.0.5")
6281 (source
6282 (origin
6283 (method url-fetch)
6284 (uri (pypi-uri "backports.csv" version))
6285 (sha256
6286 (base32
6287 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6288 (build-system python-build-system)
6289 (home-page "https://github.com/ryanhiebert/backports.csv")
6290 (synopsis "Backport of Python 3's csv module for Python 2")
6291 (description
6292 "Provides a backport of Python 3's @code{csv} module for parsing
6293 comma separated values. The API of the @code{csv} module in Python 2
6294 is drastically different from the @code{csv} module in Python 3.
6295 This is due, for the most part, to the difference between str in
6296 Python 2 and Python 3.")
6297 (license license:psfl)))
6298
6299 (define-public python2-backports-csv
6300 (package-with-python2 python-backports-csv))
6301
6302 (define-public python2-backports-shutil-get-terminal-size
6303 (package
6304 (name "python2-backports-shutil-get-terminal-size")
6305 (version "1.0.0")
6306 (source
6307 (origin
6308 (method url-fetch)
6309 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6310 (sha256
6311 (base32
6312 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6313 (build-system python-build-system)
6314 (arguments
6315 `(#:python ,python-2
6316 #:phases
6317 (modify-phases %standard-phases
6318 (replace 'check
6319 (lambda _
6320 (invoke "py.test" "-v"))))))
6321 (native-inputs
6322 `(("python2-pytest" ,python2-pytest)))
6323 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6324 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6325 (description
6326 "This package provides a backport of the @code{get_terminal_size
6327 function} from Python 3.3's @code{shutil}.
6328 Unlike the original version it is written in pure Python rather than C,
6329 so it might be a tiny bit slower.")
6330 (license license:expat)))
6331
6332 (define-public python-waf
6333 (package
6334 (name "python-waf")
6335 (version "2.0.11")
6336 (source (origin
6337 (method url-fetch)
6338 (uri (string-append "https://waf.io/"
6339 "waf-" version ".tar.bz2"))
6340 (sha256
6341 (base32
6342 "13zrniwkmfqgsgzi9v5m1367fppp9yzrz6z2ny6hy8dmpb8mj4z4"))))
6343 (build-system python-build-system)
6344 (arguments
6345 '(#:phases
6346 (modify-phases %standard-phases
6347 (replace 'build
6348 (lambda _
6349 (invoke "python" "waf-light" "configure" "build")))
6350 (replace 'check
6351 (lambda _
6352 (invoke "python" "waf" "--version")))
6353 (replace 'install
6354 (lambda* (#:key outputs #:allow-other-keys)
6355 (let ((out (assoc-ref outputs "out")))
6356 (install-file "waf" (string-append out "/bin")))
6357 #t))
6358 ;; waf breaks when it is wrapped.
6359 (delete 'wrap))))
6360 (home-page "https://waf.io/")
6361 (synopsis "Python-based build system")
6362 (description
6363 "Waf is a Python-based framework for configuring, compiling and installing
6364 applications.")
6365 (license license:bsd-3)))
6366
6367 (define-public python2-waf
6368 (package-with-python2 python-waf))
6369
6370 (define-public python-pyzmq
6371 (package
6372 (name "python-pyzmq")
6373 (version "17.1.2")
6374 (source
6375 (origin
6376 (method url-fetch)
6377 (uri (pypi-uri "pyzmq" version))
6378 (sha256
6379 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6380 (build-system python-build-system)
6381 (arguments
6382 `(#:configure-flags
6383 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6384 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6385 ;; --inplace' for 'python setup.py test' to work.
6386 #:tests? #f))
6387 (inputs
6388 `(("zeromq" ,zeromq)))
6389 (native-inputs
6390 `(("pkg-config" ,pkg-config)
6391 ("python-nose" ,python-nose)))
6392 (home-page "https://github.com/zeromq/pyzmq")
6393 (synopsis "Python bindings for 0MQ")
6394 (description
6395 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6396 (license license:bsd-4)))
6397
6398 (define-public python2-pyzmq
6399 (package-with-python2 python-pyzmq))
6400
6401 (define-public python-pep8
6402 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6403 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6404 ;; some dependents' test suites, and nothing more.
6405 (package
6406 (name "python-pep8")
6407 (version "1.7.0")
6408 (source
6409 (origin
6410 (method url-fetch)
6411 (uri (pypi-uri "pep8" version))
6412 (sha256
6413 (base32
6414 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
6415 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
6416 (build-system python-build-system)
6417 (home-page "https://pep8.readthedocs.org/")
6418 (synopsis "Python style guide checker")
6419 (description
6420 "This tools checks Python code against some of the style conventions in
6421 PEP 8.")
6422 (license license:expat)))
6423
6424 (define-public python2-pep8
6425 (package-with-python2 python-pep8))
6426
6427 (define-public python-pyflakes
6428 (package
6429 (name "python-pyflakes")
6430 (version "2.1.1")
6431 (source
6432 (origin
6433 (method url-fetch)
6434 (uri (pypi-uri "pyflakes" version))
6435 (sha256
6436 (base32
6437 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
6438 (build-system python-build-system)
6439 (home-page
6440 "https://github.com/pyflakes/pyflakes")
6441 (synopsis "Passive checker of Python programs")
6442 (description
6443 "Pyflakes statically checks Python source code for common errors.")
6444 (license license:expat)))
6445
6446 (define-public python2-pyflakes
6447 (package-with-python2 python-pyflakes))
6448
6449 (define-public python-mccabe
6450 (package
6451 (name "python-mccabe")
6452 (version "0.6.1")
6453 (source
6454 (origin
6455 (method url-fetch)
6456 (uri (pypi-uri "mccabe" version))
6457 (sha256
6458 (base32
6459 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6460 (build-system python-build-system)
6461 (native-inputs
6462 `(("python-pytest" ,python-pytest-bootstrap)
6463 ("python-pytest-runner" ,python-pytest-runner)))
6464 (home-page "https://github.com/flintwork/mccabe")
6465 (synopsis "McCabe checker, plugin for flake8")
6466 (description
6467 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6468 complexity of Python source code.")
6469 (license license:expat)))
6470
6471 (define-public python2-mccabe
6472 (package-with-python2 python-mccabe))
6473
6474 (define-public python-mccabe-0.2.1
6475 (package (inherit python-mccabe)
6476 (version "0.2.1")
6477 (source
6478 (origin
6479 (method url-fetch)
6480 (uri (pypi-uri "mccabe" version))
6481 (sha256
6482 (base32
6483 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6484
6485 (define-public python2-mccabe-0.2.1
6486 (package-with-python2 python-mccabe-0.2.1))
6487
6488 ;; Flake8 2.4.1 requires an older version of pep8.
6489 ;; This should be removed ASAP.
6490 (define-public python-pep8-1.5.7
6491 (package (inherit python-pep8)
6492 (version "1.5.7")
6493 (source
6494 (origin
6495 (method url-fetch)
6496 (uri (pypi-uri "pep8" version))
6497 (sha256
6498 (base32
6499 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6500 (arguments
6501 ;; XXX Tests not compatible with Python 3.5.
6502 '(#:tests? #f))))
6503
6504 (define-public python2-pep8-1.5.7
6505 (package-with-python2 python-pep8-1.5.7))
6506
6507 ;; Flake8 2.4.1 requires an older version of pyflakes.
6508 ;; This should be removed ASAP.
6509 (define-public python-pyflakes-0.8.1
6510 (package (inherit python-pyflakes)
6511 (version "0.8.1")
6512 (source
6513 (origin
6514 (method url-fetch)
6515 (uri (pypi-uri "pyflakes" version))
6516 (sha256
6517 (base32
6518 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6519 (arguments
6520 ;; XXX Tests not compatible with Python 3.5.
6521 '(#:tests? #f))))
6522
6523 (define-public python2-pyflakes-0.8.1
6524 (package-with-python2 python-pyflakes-0.8.1))
6525
6526 (define-public python-flake8
6527 (package
6528 (name "python-flake8")
6529 (version "3.7.7")
6530 (source (origin
6531 (method url-fetch)
6532 (uri (pypi-uri "flake8" version))
6533 (sha256
6534 (base32
6535 "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5"))))
6536 (build-system python-build-system)
6537 (arguments
6538 `(#:phases
6539 (modify-phases %standard-phases
6540 (delete 'check)
6541 (add-after 'install 'check
6542 (lambda* (#:key inputs outputs #:allow-other-keys)
6543 (add-installed-pythonpath inputs outputs)
6544 (invoke "pytest" "-v")
6545 #t)))))
6546 (propagated-inputs
6547 `(("python-pycodestyle" ,python-pycodestyle)
6548 ("python-entrypoints" ,python-entrypoints)
6549 ("python-pyflakes" ,python-pyflakes)
6550 ("python-mccabe" ,python-mccabe)))
6551 (native-inputs
6552 `(("python-mock" ,python-mock)
6553 ("python-pytest" ,python-pytest-bootstrap)
6554 ("python-pytest-runner" ,python-pytest-runner)))
6555 (home-page "https://gitlab.com/pycqa/flake8")
6556 (synopsis
6557 "The modular source code checker: pep8, pyflakes and co")
6558 (description
6559 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6560 (properties `((python2-variant . ,(delay python2-flake8))))
6561 (license license:expat)))
6562
6563 (define-public python2-flake8
6564 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
6565 (package (inherit base)
6566 (propagated-inputs
6567 `(("python2-configparser" ,python2-configparser)
6568 ("python2-enum34" ,python2-enum34)
6569 ("python2-typing" ,python2-typing)
6570 ,@(package-propagated-inputs base))))))
6571
6572 ;; python-hacking requires flake8 <2.6.0.
6573 (define-public python-flake8-2.5
6574 (package
6575 (inherit python-flake8)
6576 (version "2.5.5")
6577 (source (origin
6578 (method url-fetch)
6579 (uri (pypi-uri "flake8" version))
6580 (sha256
6581 (base32
6582 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6583 (propagated-inputs
6584 `(("python-pep8" ,python-pep8)
6585 ,@(package-propagated-inputs python-flake8)))
6586 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6587
6588 (define-public python2-flake8-2.5
6589 (package
6590 (inherit python2-flake8)
6591 (version (package-version python-flake8-2.5))
6592 (source (origin
6593 (inherit (package-source python-flake8-2.5))))
6594 (propagated-inputs
6595 `(("python2-pep8" ,python2-pep8)
6596 ,@(package-propagated-inputs python2-flake8)))))
6597
6598 (define-public python-flake8-polyfill
6599 (package
6600 (name "python-flake8-polyfill")
6601 (version "1.0.2")
6602 (source
6603 (origin
6604 (method url-fetch)
6605 (uri (pypi-uri "flake8-polyfill" version))
6606 (sha256
6607 (base32
6608 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6609 (build-system python-build-system)
6610 (arguments
6611 '(#:phases
6612 (modify-phases %standard-phases
6613 (replace 'check
6614 (lambda _
6615 ;; Be compatible with Pytest 4:
6616 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
6617 (substitute* "setup.cfg"
6618 (("\\[pytest\\]")
6619 "[tool:pytest]"))
6620
6621 (setenv "PYTHONPATH"
6622 (string-append (getcwd) "/build/lib:"
6623 (getenv "PYTHONPATH")))
6624 (invoke "py.test" "-v"))))))
6625 (native-inputs
6626 `(("python-flake8" ,python-flake8)
6627 ("python-mock" ,python-mock)
6628 ("python-pep8" ,python-pep8)
6629 ("python-pycodestyle" ,python-pycodestyle)
6630 ("python-pytest" ,python-pytest)))
6631 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6632 (synopsis "Polyfill package for Flake8 plugins")
6633 (description
6634 "This package that provides some compatibility helpers for Flake8
6635 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6636 (license license:expat)))
6637
6638 (define-public python2-flake8-polyfill
6639 (package-with-python2 python-flake8-polyfill))
6640
6641 (define-public python-mistune
6642 (package
6643 (name "python-mistune")
6644 (version "0.8.4")
6645 (source
6646 (origin
6647 (method url-fetch)
6648 (uri (pypi-uri "mistune" version))
6649 (sha256
6650 (base32
6651 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6652 (build-system python-build-system)
6653 (native-inputs
6654 `(("python-nose" ,python-nose)
6655 ("python-cython" ,python-cython)))
6656 (home-page "https://github.com/lepture/mistune")
6657 (synopsis "Markdown parser in pure Python")
6658 (description "This package provides a fast markdown parser in pure
6659 Python.")
6660 (license license:bsd-3)))
6661
6662 (define-public python2-mistune
6663 (package-with-python2 python-mistune))
6664
6665 (define-public python-markdown
6666 (package
6667 (name "python-markdown")
6668 (version "3.1.1")
6669 (source
6670 (origin
6671 (method url-fetch)
6672 (uri (pypi-uri "Markdown" version))
6673 (sha256
6674 (base32
6675 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f"))))
6676 (build-system python-build-system)
6677 (native-inputs
6678 `(("python-nose" ,python-nose)
6679 ("python-pyyaml" ,python-pyyaml)))
6680 (home-page "https://python-markdown.github.io/")
6681 (synopsis "Python implementation of Markdown")
6682 (description
6683 "This package provides a Python implementation of John Gruber's
6684 Markdown. The library features international input, various Markdown
6685 extensions, and several HTML output formats. A command line wrapper
6686 markdown_py is also provided to convert Markdown files to HTML.")
6687 (license license:bsd-3)))
6688
6689 (define-public python2-markdown
6690 (package-with-python2 python-markdown))
6691
6692 (define-public python-ptyprocess
6693 (package
6694 (name "python-ptyprocess")
6695 (version "0.5.2")
6696 (source
6697 (origin
6698 (method url-fetch)
6699 (uri (pypi-uri "ptyprocess" version))
6700 (sha256
6701 (base32
6702 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6703 (build-system python-build-system)
6704 (native-inputs
6705 `(("python-nose" ,python-nose)))
6706 (arguments
6707 `(#:phases
6708 (modify-phases %standard-phases
6709 (replace 'check
6710 (lambda _ (invoke "nosetests"))))))
6711 (home-page "https://github.com/pexpect/ptyprocess")
6712 (synopsis "Run a subprocess in a pseudo terminal")
6713 (description
6714 "This package provides a Python library used to launch a subprocess in a
6715 pseudo terminal (pty), and interact with both the process and its pty.")
6716 (license license:isc)))
6717
6718 (define-public python2-ptyprocess
6719 (package-with-python2 python-ptyprocess))
6720
6721 (define-public python-cram
6722 (package
6723 (name "python-cram")
6724 (version "0.7")
6725 (home-page "https://bitheap.org/cram/")
6726 (source (origin
6727 (method url-fetch)
6728 (uri (list (string-append home-page "cram-"
6729 version ".tar.gz")
6730 (pypi-uri "cram" version)))
6731 (sha256
6732 (base32
6733 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6734 (arguments
6735 '(#:phases
6736 (modify-phases %standard-phases
6737 (add-after 'unpack 'patch-source
6738 (lambda _
6739 (substitute* (find-files "cram" ".*\\.py$")
6740 ;; Replace default shell path.
6741 (("/bin/sh") (which "sh")))
6742 (substitute* (find-files "tests" ".*\\.t$")
6743 (("md5") "md5sum")
6744 (("/bin/bash") (which "bash"))
6745 (("/bin/sh") (which "sh")))
6746 (substitute* "cram/_test.py"
6747 ;; This hack works around a bug triggered by substituting
6748 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6749 ;; "cram -h", which breaks the output at 80 characters. This
6750 ;; causes the line showing the default shell to break into two
6751 ;; lines, but the test expects a single line...
6752 (("env\\['COLUMNS'\\] = '80'")
6753 "env['COLUMNS'] = '160'"))
6754
6755 (substitute* "Makefile"
6756 ;; Recent versions of python-coverage have caused the test
6757 ;; coverage to decrease (as of version 0.7). Allow that.
6758 (("--fail-under=100")
6759 "--fail-under=90"))
6760
6761 #t))
6762 (replace 'check
6763 ;; The test phase uses the built library and executable.
6764 (lambda* (#:key inputs outputs #:allow-other-keys)
6765 (add-installed-pythonpath inputs outputs)
6766 (setenv "PATH" (string-append (getenv "PATH") ":"
6767 (assoc-ref outputs "out") "/bin"))
6768 (invoke "make" "test"))))))
6769 (build-system python-build-system)
6770 (native-inputs
6771 `(("python-coverage" ,python-coverage)
6772 ("which" ,which)))
6773 (synopsis "Simple testing framework for command line applications")
6774 (description
6775 "Cram is a functional testing framework for command line applications.
6776 Cram tests look like snippets of interactive shell sessions. Cram runs each
6777 command and compares the command output in the test with the command’s actual
6778 output.")
6779 (license license:gpl2+)))
6780
6781 (define-public python2-cram
6782 (package-with-python2 python-cram))
6783
6784 (define-public python-straight-plugin
6785 (package
6786 (name "python-straight-plugin")
6787 (version "1.4.1")
6788 (source
6789 (origin
6790 (method url-fetch)
6791 (uri (pypi-uri "straight.plugin" version))
6792 (sha256
6793 (base32
6794 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6795 (build-system python-build-system)
6796 (home-page "https://github.com/ironfroggy/straight.plugin")
6797 (synopsis "Simple namespaced plugin facility")
6798 (description "Straight Plugin provides a type of plugin you can create from
6799 almost any existing Python modules, and an easy way for outside developers to
6800 add functionality and customization to your projects with their own plugins.")
6801 (license license:expat)))
6802
6803 (define-public python2-straight-plugin
6804 (package-with-python2 python-straight-plugin))
6805
6806 (define-public python-fonttools
6807 (package
6808 (name "python-fonttools")
6809 (version "3.38.0")
6810 (source (origin
6811 (method url-fetch)
6812 (uri (pypi-uri "fonttools" version ".zip"))
6813 (sha256
6814 (base32
6815 "12ripk3s7skgxr1bs9r8n13r94ym3s8iir7ivfixls9fa4dabmlh"))))
6816 (build-system python-build-system)
6817 (native-inputs
6818 `(("unzip" ,unzip)
6819 ("python-pytest" ,python-pytest)
6820 ("python-pytest-runner" ,python-pytest-runner)))
6821 (home-page "https://github.com/behdad/fonttools")
6822 (synopsis "Tools to manipulate font files")
6823 (description
6824 "FontTools/TTX is a library to manipulate font files from Python. It
6825 supports reading and writing of TrueType/OpenType fonts, reading and writing
6826 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6827 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6828 from an XML-based format.")
6829 (license license:expat)))
6830
6831 (define-public python2-fonttools
6832 (package-with-python2 python-fonttools))
6833
6834 (define-public python-ly
6835 (package
6836 (name "python-ly")
6837 (version "0.9.5")
6838 (source
6839 (origin
6840 (method url-fetch)
6841 (uri (pypi-uri name version))
6842 (sha256
6843 (base32
6844 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6845 (build-system python-build-system)
6846 (arguments
6847 ;; FIXME: Some tests need network access.
6848 '(#:tests? #f))
6849 (synopsis "Tool and library for manipulating LilyPond files")
6850 (description "This package provides a Python library to parse, manipulate
6851 or create documents in LilyPond format. A command line program ly is also
6852 provided that can be used to do various manipulations with LilyPond files.")
6853 (home-page "https://pypi.python.org/pypi/python-ly")
6854 (license license:gpl2+)))
6855
6856 (define-public python-appdirs
6857 (package
6858 (name "python-appdirs")
6859 (version "1.4.3")
6860 (source
6861 (origin
6862 (method url-fetch)
6863 (uri (pypi-uri "appdirs" version))
6864 (sha256
6865 (base32
6866 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6867 (build-system python-build-system)
6868 (home-page "https://github.com/ActiveState/appdirs")
6869 (synopsis
6870 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6871 (description
6872 "This module provides a portable way of finding out where user data
6873 should be stored on various operating systems.")
6874 (license license:expat)))
6875
6876 (define-public python2-appdirs
6877 (package-with-python2 python-appdirs))
6878
6879 (define-public python-llfuse
6880 (package
6881 (name "python-llfuse")
6882 (version "1.3.5")
6883 (source (origin
6884 (method url-fetch)
6885 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6886 (sha256
6887 (base32
6888 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6889 (build-system python-build-system)
6890 (inputs
6891 `(("fuse" ,fuse)
6892 ("attr" ,attr)))
6893 (native-inputs
6894 `(("pkg-config" ,pkg-config)))
6895 (synopsis "Python bindings for FUSE")
6896 (description
6897 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6898 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6899 (license license:lgpl2.0+)
6900 (properties `((python2-variant . ,(delay python2-llfuse))))))
6901
6902 (define-public python2-llfuse
6903 (package (inherit (package-with-python2
6904 (strip-python2-variant python-llfuse)))
6905 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6906
6907 ;; For attic-0.16
6908 (define-public python-llfuse-0.41
6909 (package (inherit python-llfuse)
6910 (version "0.41.1")
6911 (source (origin
6912 (method url-fetch)
6913 (uri (string-append
6914 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6915 "llfuse-" version ".tar.bz2"))
6916 (sha256
6917 (base32
6918 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6919 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6920 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6921 (license (list license:expat license:lgpl2.0+))))
6922
6923 (define-public python-msgpack
6924 (package
6925 (name "python-msgpack")
6926 (version "0.5.6")
6927 (source (origin
6928 (method url-fetch)
6929 (uri (pypi-uri "msgpack" version))
6930 (sha256
6931 (base32
6932 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6933 (build-system python-build-system)
6934 (arguments
6935 `(#:modules ((guix build utils)
6936 (guix build python-build-system)
6937 (ice-9 ftw)
6938 (srfi srfi-1)
6939 (srfi srfi-26))
6940 #:phases
6941 (modify-phases %standard-phases
6942 (replace 'check
6943 (lambda _
6944 (let ((cwd (getcwd)))
6945 (setenv "PYTHONPATH"
6946 (string-append cwd "/build/"
6947 (find (cut string-prefix? "lib" <>)
6948 (scandir (string-append cwd "/build")))
6949 ":"
6950 (getenv "PYTHONPATH")))
6951 (invoke "pytest" "-v" "test")))))))
6952 (native-inputs
6953 `(("python-pytest" ,python-pytest)))
6954 (synopsis "MessagePack (de)serializer")
6955 (description "MessagePack is a fast, compact binary serialization format,
6956 suitable for similar data to JSON. This package provides CPython bindings for
6957 reading and writing MessagePack data.")
6958 (home-page "https://pypi.python.org/pypi/msgpack/")
6959 (license license:asl2.0)))
6960
6961 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6962 ;; release 0.5. Some packages like borg still call it by the old name for now.
6963 ;; <https://bugs.gnu.org/30662>
6964 (define-public python-msgpack-transitional
6965 (package
6966 (inherit python-msgpack)
6967 (name "python-msgpack-transitional")
6968 (arguments
6969 (substitute-keyword-arguments (package-arguments python-msgpack)
6970 ((#:phases phases)
6971 `(modify-phases ,phases
6972 (add-after 'unpack 'configure-transitional
6973 (lambda _
6974 ;; Keep using the old name.
6975 (substitute* "setup.py"
6976 (("TRANSITIONAL = False")
6977 "TRANSITIONAL = 1"))
6978 #t))))))))
6979
6980 (define-public python2-msgpack
6981 (package-with-python2 python-msgpack))
6982
6983 (define-public python-netaddr
6984 (package
6985 (name "python-netaddr")
6986 (version "0.7.19")
6987 (source
6988 (origin
6989 (method url-fetch)
6990 (uri (pypi-uri "netaddr" version))
6991 (sha256
6992 (base32
6993 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6994 (build-system python-build-system)
6995 (arguments `(#:tests? #f)) ;; No tests.
6996 (home-page "https://github.com/drkjam/netaddr/")
6997 (synopsis "Pythonic manipulation of network addresses")
6998 (description
6999 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
7000 and MAC network addresses.")
7001 (license license:bsd-3)))
7002
7003 (define-public python2-netaddr
7004 (package-with-python2 python-netaddr))
7005
7006 (define-public python2-pyroute2
7007 (package
7008 (name "python2-pyroute2")
7009 (version "0.5.6")
7010 (source
7011 (origin
7012 (method url-fetch)
7013 (uri (pypi-uri "pyroute2" version))
7014 (sha256
7015 (base32
7016 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
7017 (build-system python-build-system)
7018 (arguments
7019 `(#:python ,python-2)) ;Python 3.x is not supported
7020 (home-page "https://github.com/svinota/pyroute2")
7021 (synopsis "Python netlink library")
7022 (description
7023 "Pyroute2 is a pure Python netlink library with minimal dependencies.
7024 Supported netlink families and protocols include:
7025 @itemize
7026 @item rtnl, network settings - addresses, routes, traffic controls
7027 @item nfnetlink - netfilter API: ipset, nftables, ...
7028 @item ipq - simplest userspace packet filtering, iptables QUEUE target
7029 @item devlink - manage and monitor devlink-enabled hardware
7030 @item generic - generic netlink families
7031 @itemize
7032 @item nl80211 - wireless functions API (basic support)
7033 @item taskstats - extended process statistics
7034 @item acpi_events - ACPI events monitoring
7035 @item thermal_events - thermal events monitoring
7036 @item VFS_DQUOT - disk quota events monitoring
7037 @end itemize
7038 @end itemize")
7039 (license license:gpl2+)))
7040
7041 (define-public python-wrapt
7042 (package
7043 (name "python-wrapt")
7044 (version "1.11.2")
7045 (source
7046 (origin
7047 (method url-fetch)
7048 (uri (pypi-uri "wrapt" version))
7049 (sha256
7050 (base32
7051 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
7052 (build-system python-build-system)
7053 (arguments
7054 ;; Tests are not included in the tarball, they are only available in the
7055 ;; git repository.
7056 `(#:tests? #f))
7057 (home-page "https://github.com/GrahamDumpleton/wrapt")
7058 (synopsis "Module for decorators, wrappers and monkey patching")
7059 (description
7060 "The aim of the wrapt module is to provide a transparent object proxy for
7061 Python, which can be used as the basis for the construction of function
7062 wrappers and decorator functions.")
7063 (license license:bsd-2)))
7064
7065 (define-public python2-wrapt
7066 (package-with-python2 python-wrapt))
7067
7068 (define-public python-xlrd
7069 (package
7070 (name "python-xlrd")
7071 (version "1.2.0")
7072 (source (origin
7073 (method url-fetch)
7074 (uri (pypi-uri "xlrd" version))
7075 (sha256
7076 (base32
7077 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
7078 (build-system python-build-system)
7079 (arguments
7080 `(#:phases
7081 (modify-phases %standard-phases
7082 ;; Some tests depend on writing a temporary file to the user's home
7083 ;; directory.
7084 (add-after 'unpack 'fix-tests
7085 (lambda _
7086 (delete-file "tests/test_open_workbook.py")
7087 #t)))))
7088 (home-page "http://www.python-excel.org/")
7089 (synopsis "Library for extracting data from Excel files")
7090 (description "This package provides a library to extract data from
7091 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7092 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7093 Unicode-aware. It is not intended as an end-user tool.")
7094 (license license:bsd-3)))
7095
7096 (define-public python2-xlrd
7097 (package-with-python2 python-xlrd))
7098
7099 (define-public python-prettytable
7100 (package
7101 (name "python-prettytable")
7102 (version "0.7.2")
7103 (source
7104 (origin
7105 (method url-fetch)
7106 (uri (pypi-uri "prettytable" version ".tar.bz2"))
7107 (sha256
7108 (base32
7109 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7110 (build-system python-build-system)
7111 (home-page "http://code.google.com/p/prettytable/")
7112 (synopsis "Display tabular data in an ASCII table format")
7113 (description
7114 "A library designed to represent tabular data in visually appealing ASCII
7115 tables. PrettyTable allows for selection of which columns are to be printed,
7116 independent alignment of columns (left or right justified or centred) and
7117 printing of sub-tables by specifying a row range.")
7118 (license license:bsd-3)))
7119
7120 (define-public python2-prettytable
7121 (package-with-python2 python-prettytable))
7122
7123 (define-public python-tables
7124 (package
7125 (name "python-tables")
7126 (version "3.4.4")
7127 (source
7128 (origin
7129 (method url-fetch)
7130 (uri (pypi-uri "tables" version))
7131 (sha256
7132 (base32
7133 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7134 (modules '((guix build utils)))
7135 (snippet
7136 '(begin
7137 ;; Remove pre-compiled .pyc files from source.
7138 (for-each delete-file-recursively
7139 (find-files "." "__pycache__" #:directories? #t))
7140 (for-each delete-file (find-files "." "\\.pyc$"))
7141 #t))))
7142 (build-system python-build-system)
7143 (arguments
7144 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7145 ;; or "check", so we must override the build and check phases.
7146 #:phases
7147 (modify-phases %standard-phases
7148 (add-after 'unpack 'use-gcc
7149 (lambda _
7150 (substitute* "setup.py"
7151 (("compiler = new_compiler\\(\\)" line)
7152 (string-append line
7153 "\ncompiler.set_executables(compiler='gcc',"
7154 "compiler_so='gcc',"
7155 "linker_exe='gcc',"
7156 "linker_so='gcc -shared')")))
7157 #t))
7158 (replace 'build
7159 (lambda* (#:key inputs #:allow-other-keys)
7160 (invoke "python" "setup.py" "build"
7161 (string-append "--hdf5="
7162 (assoc-ref inputs "hdf5")))))
7163 (replace 'check
7164 (lambda* (#:key inputs #:allow-other-keys)
7165 (invoke "python" "setup.py" "check"
7166 (string-append "--hdf5="
7167 (assoc-ref inputs "hdf5"))))))))
7168 (propagated-inputs
7169 `(("python-numexpr" ,python-numexpr)
7170 ("python-numpy" ,python-numpy)))
7171 (native-inputs
7172 `(("python-cython" ,python-cython)
7173 ("pkg-config" ,pkg-config)))
7174 (inputs
7175 `(("hdf5" ,hdf5)
7176 ("bzip2" ,bzip2)
7177 ("zlib" ,zlib)))
7178 (home-page "http://www.pytables.org/")
7179 (synopsis "Hierarchical datasets for Python")
7180 (description "PyTables is a package for managing hierarchical datasets and
7181 designed to efficiently cope with extremely large amounts of data.")
7182 (license license:bsd-3)))
7183
7184 (define-public python2-tables
7185 (package-with-python2 python-tables))
7186
7187 (define-public python-pyasn1
7188 (package
7189 (name "python-pyasn1")
7190 (version "0.4.3")
7191 (source
7192 (origin
7193 (method url-fetch)
7194 (uri (pypi-uri "pyasn1" version))
7195 (sha256
7196 (base32
7197 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7198 (build-system python-build-system)
7199 (home-page "http://pyasn1.sourceforge.net/")
7200 (synopsis "ASN.1 types and codecs")
7201 (description
7202 "This is an implementation of ASN.1 types and codecs in Python. It is
7203 suitable for a wide range of protocols based on the ASN.1 specification.")
7204 (license license:bsd-2)))
7205
7206 (define-public python2-pyasn1
7207 (package-with-python2 python-pyasn1))
7208
7209 (define-public python-pyasn1-modules
7210 (package
7211 (name "python-pyasn1-modules")
7212 (version "0.2.2")
7213 (source
7214 (origin
7215 (method url-fetch)
7216 (uri (pypi-uri "pyasn1-modules" version))
7217 (sha256
7218 (base32
7219 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7220 (build-system python-build-system)
7221 (propagated-inputs
7222 `(("python-pyasn1" ,python-pyasn1)))
7223 (home-page "https://sourceforge.net/projects/pyasn1/")
7224 (synopsis "ASN.1 codec implementations")
7225 (description
7226 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7227 implementations of ASN.1-based codecs and protocols.")
7228 (license license:bsd-3)))
7229
7230 (define-public python2-pyasn1-modules
7231 (package-with-python2 python-pyasn1-modules))
7232
7233 (define-public python-ipaddress
7234 (package
7235 (name "python-ipaddress")
7236 (version "1.0.22")
7237 (source (origin
7238 (method url-fetch)
7239 (uri (pypi-uri "ipaddress" version))
7240 (sha256
7241 (base32
7242 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7243 (build-system python-build-system)
7244 (home-page "https://github.com/phihag/ipaddress")
7245 (synopsis "IP address manipulation library")
7246 (description
7247 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7248 in Python. This library is used to create, poke at, and manipulate IPv4 and
7249 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7250 module to older versions of Python.")
7251 (license license:psfl)))
7252
7253 (define-public python2-ipaddress
7254 (package-with-python2 python-ipaddress))
7255
7256 (define-public python2-ipaddr
7257 (package
7258 (name "python2-ipaddr")
7259 (version "2.1.11")
7260 (source
7261 (origin
7262 (method url-fetch)
7263 (uri (pypi-uri "ipaddr" version))
7264 (sha256
7265 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7266 (build-system python-build-system)
7267 (arguments
7268 `(#:python ,python-2 ;version 2 only
7269 #:phases
7270 (modify-phases %standard-phases
7271 (replace 'check
7272 (lambda _ (invoke "python" "ipaddr_test.py"))))))
7273 (home-page "https://github.com/google/ipaddr-py")
7274 (synopsis "IP address manipulation library")
7275 (description
7276 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7277 IPv6 addresses and networks.
7278
7279 For new implementations you may prefer to use the standard module
7280 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
7281 versions of Python.")
7282 (license license:asl2.0)))
7283
7284 (define-public python-idna
7285 (package
7286 (name "python-idna")
7287 (version "2.8")
7288 (source
7289 (origin
7290 (method url-fetch)
7291 (uri (pypi-uri "idna" version))
7292 (sha256
7293 (base32
7294 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
7295 (build-system python-build-system)
7296 (home-page "https://github.com/kjd/idna")
7297 (synopsis "Internationalized domain names in applications")
7298 (description
7299 "This is a library to support the Internationalised Domain Names in
7300 Applications (IDNA) protocol as specified in RFC 5891. This version of the
7301 protocol is often referred to as “IDNA2008” and can produce different results
7302 from the earlier standard from 2003. The library is also intended to act as a
7303 suitable drop-in replacement for the “encodings.idna” module that comes with
7304 the Python standard library but currently only supports the older 2003
7305 specification.")
7306 (license license:bsd-4)))
7307
7308 (define-public python-idna-2.7
7309 (package (inherit python-idna)
7310 (version "2.7")
7311 (source (origin
7312 (method url-fetch)
7313 (uri (pypi-uri "idna" version))
7314 (sha256
7315 (base32
7316 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7317
7318
7319 (define-public python2-idna
7320 (package-with-python2 python-idna))
7321
7322 (define-public python-idna-ssl
7323 (package
7324 (name "python-idna-ssl")
7325 (version "1.0.1")
7326 (source
7327 (origin
7328 (method url-fetch)
7329 (uri (pypi-uri "idna-ssl" version))
7330 (sha256
7331 (base32
7332 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7333 (build-system python-build-system)
7334 (arguments
7335 `(#:tests? #f)) ;circular dependency with python-aiohttp
7336 (home-page "https://github.com/aio-libs/idna-ssl")
7337 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7338 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7339 domains support.")
7340 (license license:expat)))
7341
7342 (define-public python-pretend
7343 (package
7344 (name "python-pretend")
7345 (version "1.0.9")
7346 (source
7347 (origin
7348 (method url-fetch)
7349 (uri (pypi-uri "pretend" version))
7350 (sha256
7351 (base32
7352 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7353 (build-system python-build-system)
7354 (home-page "https://github.com/alex/pretend")
7355 (synopsis "Library for stubbing in Python")
7356 (description
7357 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7358 technique for writing tests. You may hear the term mixed up with mocks,
7359 fakes, or doubles. Basically, a stub is an object that returns pre-canned
7360 responses, rather than doing any computation.")
7361 (license license:bsd-3)))
7362
7363 (define-public python2-pretend
7364 (package-with-python2 python-pretend))
7365
7366 (define-public python-pip
7367 (package
7368 (name "python-pip")
7369 (version "19.2.1")
7370 (source
7371 (origin
7372 (method url-fetch)
7373 (uri (pypi-uri "pip" version))
7374 (sha256
7375 (base32
7376 "100sd12ss4mbdj5lf3wawad29cm573b27765mq098x6xhcj71395"))))
7377 (build-system python-build-system)
7378 (arguments
7379 '(#:tests? #f)) ; there are no tests in the pypi archive.
7380 (home-page "https://pip.pypa.io/")
7381 (synopsis "Package manager for Python software")
7382 (description
7383 "Pip is a package manager for Python software, that finds packages on the
7384 Python Package Index (PyPI).")
7385 (license license:expat)))
7386
7387 (define-public python2-pip
7388 (package-with-python2 python-pip))
7389
7390 (define-public python-tlsh
7391 (package
7392 (name "python-tlsh")
7393 (version "3.4.5")
7394 (home-page "https://github.com/trendmicro/tlsh")
7395 (source
7396 (origin
7397 (method git-fetch)
7398 (uri (git-reference
7399 (url "https://github.com/trendmicro/tlsh.git")
7400 (commit (string-append "v" version))))
7401 (file-name (git-file-name name version))
7402 (sha256
7403 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
7404 (build-system cmake-build-system)
7405 (arguments
7406 '(#:out-of-source? #f
7407 #:phases (modify-phases %standard-phases
7408 (replace
7409 'install
7410 (lambda* (#:key outputs #:allow-other-keys)
7411 ;; Build and install the Python bindings. The underlying
7412 ;; C++ library is apparently not meant to be installed.
7413 (let ((out (assoc-ref outputs "out")))
7414 (with-directory-excursion "py_ext"
7415 (and (system* "python" "setup.py" "build")
7416 (system* "python" "setup.py" "install"
7417 (string-append "--prefix=" out))))))))))
7418 (inputs `(("python" ,python-wrapper))) ;for the bindings
7419 (synopsis "Fuzzy matching library for Python")
7420 (description
7421 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7422 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7423 value which can be used for similarity comparisons. Similar objects have
7424 similar hash values, which allows for the detection of similar objects by
7425 comparing their hash values. The byte stream should have a sufficient amount
7426 of complexity; for example, a byte stream of identical bytes will not generate
7427 a hash value.")
7428 (license license:asl2.0)))
7429
7430 (define-public python2-tlsh
7431 (package
7432 (inherit python-tlsh)
7433 (name "python2-tlsh")
7434 (inputs `(("python" ,python-2)))))
7435
7436 (define-public python-termcolor
7437 (package
7438 (name "python-termcolor")
7439 (version "1.1.0")
7440 (source
7441 (origin
7442 (method url-fetch)
7443 (uri (pypi-uri "termcolor" version))
7444 (sha256
7445 (base32
7446 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7447 (build-system python-build-system)
7448 (arguments
7449 ;; There are no tests.
7450 `(#:tests? #f))
7451 (home-page "https://pypi.python.org/pypi/termcolor")
7452 (synopsis "ANSII Color formatting for terminal output")
7453 (description
7454 "This package provides ANSII Color formatting for output in terminals.")
7455 (license license:expat)))
7456
7457 (define-public python2-termcolor
7458 (package-with-python2 python-termcolor))
7459
7460 (define-public python-libarchive-c
7461 (package
7462 (name "python-libarchive-c")
7463 (version "2.8")
7464 (source (origin
7465 (method url-fetch)
7466 (uri (pypi-uri "libarchive-c" version))
7467 (sha256
7468 (base32
7469 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
7470 (build-system python-build-system)
7471 (arguments
7472 '(#:phases (modify-phases %standard-phases
7473 (add-before
7474 'build 'reference-libarchive
7475 (lambda* (#:key inputs #:allow-other-keys)
7476 ;; Retain the absolute file name of libarchive.so.
7477 (let ((libarchive (assoc-ref inputs "libarchive")))
7478 (substitute* "libarchive/ffi.py"
7479 (("find_library\\('archive'\\)")
7480 (string-append "'" libarchive
7481 "/lib/libarchive.so'"))))))
7482 (replace 'check
7483 (lambda _ (invoke "pytest" "-vv"))))))
7484 (native-inputs
7485 `(("python-mock" ,python-mock)
7486 ("python-pytest" ,python-pytest)))
7487 (inputs
7488 `(("libarchive" ,libarchive)))
7489 (home-page "https://github.com/Changaco/python-libarchive-c")
7490 (synopsis "Python interface to libarchive")
7491 (description
7492 "This package provides Python bindings to libarchive, a C library to
7493 access possibly compressed archives in many different formats. It uses
7494 Python's @code{ctypes} foreign function interface (FFI).")
7495 (license license:lgpl2.0+)))
7496
7497 (define-public python2-libarchive-c
7498 (package-with-python2 python-libarchive-c))
7499
7500 (define-public python-file
7501 (package
7502 (inherit file)
7503 (name "python-file")
7504 (build-system python-build-system)
7505 (arguments
7506 '(#:tests? #f ;no tests
7507 #:configure-flags '("--single-version-externally-managed" "--root=/")
7508 #:phases (modify-phases %standard-phases
7509 (add-before 'build 'change-directory
7510 (lambda _
7511 (chdir "python")
7512 #t))
7513 (add-before 'build 'set-library-file-name
7514 (lambda* (#:key inputs #:allow-other-keys)
7515 (let ((file (assoc-ref inputs "file")))
7516 (substitute* "magic.py"
7517 (("find_library\\('magic'\\)")
7518 (string-append "'" file "/lib/libmagic.so'")))
7519 #t))))))
7520 (inputs `(("file" ,file)))
7521 (native-inputs (if (%current-target-system)
7522 `(("self" ,this-package))
7523 '()))
7524 (synopsis "Python bindings to the libmagic file type guesser. Note that
7525 this module and the python-magic module both provide a \"magic.py\" file;
7526 these two modules, which are different and were developed separately, both
7527 serve the same purpose: provide Python bindings for libmagic.")))
7528
7529 (define-public python2-file
7530 (package-with-python2 python-file))
7531
7532 (define-public python-debian
7533 (package
7534 (name "python-debian")
7535 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
7536 (version "0.1.36")
7537 (source
7538 (origin
7539 ;; Use git-fetch, as pypi doesn't include test suite.
7540 (method git-fetch)
7541 (uri (git-reference
7542 (url home-page)
7543 (commit version)))
7544 (file-name (git-file-name name version))
7545 (sha256
7546 (base32
7547 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
7548 (build-system python-build-system)
7549 (arguments
7550 `(#:phases (modify-phases %standard-phases
7551 (add-after 'unpack 'remove-debian-specific-tests
7552 ;; python-apt, apt and dpkg are not yet available in guix,
7553 ;; and these tests heavily depend on them.
7554 (lambda _
7555 (delete-file "lib/debian/tests/test_deb822.py")
7556 (delete-file "lib/debian/tests/test_debfile.py")
7557 #t)))))
7558 (propagated-inputs
7559 `(("python-six" ,python-six)
7560 ("python-chardet" ,python-chardet)))
7561 (synopsis "Debian package related modules")
7562 (description
7563 ;; XXX: Use @enumerate instead of @itemize to work around
7564 ;; <http://bugs.gnu.org/21772>.
7565 "This package provides Python modules that abstract many formats of
7566 Debian-related files, such as:
7567
7568 @enumerate
7569 @item Debtags information;
7570 @item @file{debian/changelog} files;
7571 @item packages files, pdiffs;
7572 @item control files of single or multiple RFC822-style paragraphs---e.g.
7573 @file{debian/control}, @file{.changes}, @file{.dsc};
7574 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7575 contained files and meta-information.
7576 @end enumerate\n")
7577
7578 ;; Modules are either GPLv2+ or GPLv3+.
7579 (license license:gpl3+)))
7580
7581 (define-public python2-debian
7582 (package-with-python2 python-debian))
7583
7584 (define-public python-nbformat
7585 (package
7586 (name "python-nbformat")
7587 (version "4.4.0")
7588 (source
7589 (origin
7590 (method url-fetch)
7591 (uri (pypi-uri "nbformat" version))
7592 (sha256
7593 (base32
7594 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7595 (build-system python-build-system)
7596 (arguments `(#:tests? #f)) ; no test target
7597 (propagated-inputs
7598 `(("python-ipython-genutils" ,python-ipython-genutils)
7599 ("python-jsonschema" ,python-jsonschema)
7600 ("python-jupyter-core" ,python-jupyter-core)
7601 ("python-traitlets" ,python-traitlets)))
7602 (home-page "http://jupyter.org")
7603 (synopsis "Jupyter Notebook format")
7604 (description "This package provides the reference implementation of the
7605 Jupyter Notebook format and Python APIs for working with notebooks.")
7606 (license license:bsd-3)))
7607
7608 (define-public python2-nbformat
7609 (package-with-python2 python-nbformat))
7610
7611 (define-public python-bleach
7612 (package
7613 (name "python-bleach")
7614 (version "3.1.0")
7615 (source
7616 (origin
7617 (method url-fetch)
7618 (uri (pypi-uri "bleach" version))
7619 (sha256
7620 (base32
7621 "1yhrgrhkln8bd6gn3imj69g1h4xqah9gaz9q26crqr6gmmvpzprz"))))
7622 (build-system python-build-system)
7623 (propagated-inputs
7624 `(("python-webencodings" ,python-webencodings)
7625 ("python-six" ,python-six)))
7626 (native-inputs
7627 `(("python-pytest" ,python-pytest)
7628 ("python-pytest-runner" ,python-pytest-runner-2)))
7629 (home-page "https://github.com/jsocol/bleach")
7630 (synopsis "Whitelist-based HTML-sanitizing tool")
7631 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7632 (license license:asl2.0)))
7633
7634 (define-public python2-bleach
7635 (package-with-python2 python-bleach))
7636
7637 (define-public python-entrypoints
7638 (package
7639 (name "python-entrypoints")
7640 (version "0.3")
7641 (source
7642 (origin
7643 (method url-fetch)
7644 (uri (pypi-uri "entrypoints" version))
7645 (sha256
7646 (base32
7647 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
7648 (build-system python-build-system)
7649 ;; The package does not come with a setup.py file, so we have to generate
7650 ;; one ourselves.
7651 (arguments
7652 `(#:tests? #f
7653 #:phases
7654 (modify-phases %standard-phases
7655 (add-after 'unpack 'create-setup.py
7656 (lambda _
7657 (call-with-output-file "setup.py"
7658 (lambda (port)
7659 (format port "\
7660 from setuptools import setup
7661 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7662 " ,version))))))))
7663 (home-page "https://github.com/takluyver/entrypoints")
7664 (synopsis "Discover and load entry points from installed Python packages")
7665 (description "Entry points are a way for Python packages to advertise
7666 objects with some common interface. The most common examples are
7667 @code{console_scripts} entry points, which define shell commands by
7668 identifying a Python function to run. The @code{entrypoints} module contains
7669 functions to find and load entry points.")
7670 (license license:expat)))
7671
7672 (define-public python2-entrypoints
7673 (package-with-python2 python-entrypoints))
7674
7675 (define-public python-nbconvert
7676 (package
7677 (name "python-nbconvert")
7678 (version "5.0.0b1")
7679 (source
7680 (origin
7681 (method url-fetch)
7682 (uri (pypi-uri "nbconvert" version))
7683 (sha256
7684 (base32
7685 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7686 (build-system python-build-system)
7687 (arguments
7688 `(;; The "bdist_egg" target is disabled by default, causing the installation
7689 ;; to fail.
7690 #:configure-flags (list "bdist_egg")
7691 ;; FIXME: 5 failures, 40 errors.
7692 #:tests? #f))
7693 ;; #:phases
7694 ;; (modify-phases %standard-phases
7695 ;; (replace 'check
7696 ;; (lambda _
7697 ;; (zero? (system* "py.test" "-v")))))
7698 (native-inputs
7699 `(("python-pytest" ,python-pytest)))
7700 (propagated-inputs
7701 `(("python-bleach" ,python-bleach)
7702 ("python-entrypoints" ,python-entrypoints)
7703 ("python-jinja2" ,python-jinja2)
7704 ("python-jupyter-core" ,python-jupyter-core)
7705 ("python-mistune" ,python-mistune)
7706 ("python-nbformat" ,python-nbformat)
7707 ("python-pygments" ,python-pygments)
7708 ("python-traitlets" ,python-traitlets)))
7709 (home-page "http://jupyter.org")
7710 (synopsis "Converting Jupyter Notebooks")
7711 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7712 notebooks to various other formats via Jinja templates. It allows you to
7713 convert an @code{.ipynb} notebook file into various static formats including:
7714
7715 @enumerate
7716 @item HTML
7717 @item LaTeX
7718 @item PDF
7719 @item Reveal JS
7720 @item Markdown (md)
7721 @item ReStructured Text (rst)
7722 @item executable script
7723 @end enumerate\n")
7724 (license license:bsd-3)))
7725
7726 (define-public python2-nbconvert
7727 (package-with-python2 python-nbconvert))
7728
7729 (define-public python-notebook
7730 (package
7731 (name "python-notebook")
7732 (version "5.7.4")
7733 (source (origin
7734 (method url-fetch)
7735 (uri (pypi-uri "notebook" version))
7736 (sha256
7737 (base32
7738 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7739 (build-system python-build-system)
7740 (arguments
7741 `(#:phases
7742 (modify-phases %standard-phases
7743 (replace 'check
7744 (lambda _
7745 ;; These tests require a browser
7746 (delete-file-recursively "notebook/tests/selenium")
7747 ;; Some tests need HOME
7748 (setenv "HOME" "/tmp")
7749 ;; This file contains "warningfilters", which are not supported
7750 ;; by this version of nose.
7751 (delete-file "setup.cfg")
7752 (with-directory-excursion "/tmp"
7753 (invoke "nosetests" "-v"))
7754 #t)))))
7755 (propagated-inputs
7756 `(("python-jupyter-core" ,python-jupyter-core)
7757 ("python-nbformat" ,python-nbformat)
7758 ("python-nbconvert" ,python-nbconvert)
7759 ("python-prometheus-client" ,python-prometheus-client)
7760 ("python-send2trash" ,python-send2trash)
7761 ("python-terminado" ,python-terminado)))
7762 (native-inputs
7763 `(("python-nose" ,python-nose)
7764 ("python-sphinx" ,python-sphinx)
7765 ("python-requests" ,python-requests)))
7766 (home-page "http://jupyter.org/")
7767 (synopsis "Web-based notebook environment for interactive computing")
7768 (description
7769 "The Jupyter HTML notebook is a web-based notebook environment for
7770 interactive computing.")
7771 (properties `((python2-variant . ,(delay python2-notebook))))
7772 (license license:bsd-3)))
7773
7774 (define-public python2-notebook
7775 (let ((base (package-with-python2
7776 (strip-python2-variant python-notebook))))
7777 (package (inherit base)
7778 (native-inputs
7779 `(("python2-mock" ,python2-mock)
7780 ,@(package-native-inputs base)))
7781 (arguments
7782 (substitute-keyword-arguments (package-arguments base)
7783 ((#:phases phases)
7784 `(modify-phases ,phases
7785 (add-before 'check 'disable-test-case
7786 ;; The test requires network access to localhost. Curiously it
7787 ;; fails with Python 2 only. Simply make the test-case return
7788 ;; immediately.
7789 (lambda _
7790 (substitute*
7791 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7792 (("formats = self.nbconvert_api") "return #")))))))))))
7793
7794 (define-public python-widgetsnbextension
7795 (package
7796 (name "python-widgetsnbextension")
7797 (version "3.4.2")
7798 (source
7799 (origin
7800 (method url-fetch)
7801 (uri (pypi-uri "widgetsnbextension" version))
7802 (sha256
7803 (base32
7804 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7805 (build-system python-build-system)
7806 (propagated-inputs
7807 `(("python-ipykernel" ,python-ipykernel)
7808 ("python-notebook" ,python-notebook)))
7809 (native-inputs
7810 `(("python-certifi" ,python-certifi)
7811 ("python-nose" ,python-nose)))
7812 (home-page "https://ipython.org")
7813 (synopsis "IPython HTML widgets for Jupyter")
7814 (description "This package provides interactive HTML widgets for Jupyter
7815 notebooks.")
7816 (license license:bsd-3)))
7817
7818 (define-public python2-widgetsnbextension
7819 (package-with-python2 python-widgetsnbextension))
7820
7821 (define-public python-ipywidgets
7822 (package
7823 (name "python-ipywidgets")
7824 (version "5.2.2")
7825 (source
7826 (origin
7827 (method url-fetch)
7828 (uri (pypi-uri "ipywidgets" version))
7829 (sha256
7830 (base32
7831 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7832 (build-system python-build-system)
7833 (propagated-inputs
7834 `(("python-ipython" ,python-ipython)
7835 ("python-traitlets" ,python-traitlets)
7836 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7837 (native-inputs
7838 `(("python-nose" ,python-nose)
7839 ("python-pytest" ,python-pytest)))
7840 (home-page "https://ipython.org")
7841 (synopsis "IPython HTML widgets for Jupyter")
7842 (description "Ipywidgets are interactive HTML widgets for Jupyter
7843 notebooks and the IPython kernel. Notebooks come alive when interactive
7844 widgets are used. Users gain control of their data and can visualize changes
7845 in the data.")
7846 (license license:bsd-3)))
7847
7848 (define-public python2-ipywidgets
7849 (package-with-python2 python-ipywidgets))
7850
7851 (define-public python-jupyter-console
7852 (package
7853 (name "python-jupyter-console")
7854 (version "6.0.0")
7855 (source
7856 (origin
7857 (method url-fetch)
7858 (uri (pypi-uri "jupyter_console" version))
7859 (sha256
7860 (base32
7861 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
7862 (build-system python-build-system)
7863 (propagated-inputs
7864 `(("python-ipykernel" ,python-ipykernel)
7865 ("python-jupyter-client" ,python-jupyter-client)
7866 ("python-prompt-toolkit" ,python-prompt-toolkit)
7867 ("python-pygments" ,python-pygments)))
7868 (native-inputs
7869 `(("python-nose" ,python-nose)))
7870 (home-page "https://jupyter.org")
7871 (synopsis "Jupyter terminal console")
7872 (description "This package provides a terminal-based console frontend for
7873 Jupyter kernels. It also allows for console-based interaction with non-Python
7874 Jupyter kernels such as IJulia and IRKernel.")
7875 (license license:bsd-3)))
7876
7877 (define-public python2-jupyter-console
7878 (package
7879 (name "python2-jupyter-console")
7880 (version "5.2.0")
7881 (source
7882 (origin
7883 (method url-fetch)
7884 (uri (pypi-uri "jupyter_console" version))
7885 (sha256
7886 (base32
7887 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7888 (build-system python-build-system)
7889 ;; Tests only run in an TTY.
7890 (arguments `(#:tests? #f))
7891 (propagated-inputs
7892 `(("python2-ipykernel" ,python2-ipykernel)
7893 ("python2-jupyter-client" ,python2-jupyter-client)
7894 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7895 ("python2-pygments" ,python2-pygments)))
7896 (native-inputs
7897 `(("python2-nose" ,python2-nose)))
7898 (home-page "https://jupyter.org")
7899 (synopsis "Jupyter terminal console")
7900 (description "This package provides a terminal-based console frontend for
7901 Jupyter kernels. It also allows for console-based interaction with non-Python
7902 Jupyter kernels such as IJulia and IRKernel.")
7903 (license license:bsd-3)))
7904
7905 ;; The python-ipython and python-jupyter-console require each other. To get
7906 ;; the functionality in both packages working, strip down the
7907 ;; python-jupyter-console package when using it as an input to python-ipython.
7908 (define python-jupyter-console-minimal
7909 (package
7910 (inherit python-jupyter-console)
7911 (name "python-jupyter-console-minimal")
7912 (arguments
7913 (substitute-keyword-arguments
7914 (package-arguments python-jupyter-console)
7915 ((#:phases phases)
7916 `(modify-phases ,phases
7917 (add-after 'install 'delete-bin
7918 (lambda* (#:key outputs #:allow-other-keys)
7919 ;; Delete the bin files, to avoid conflicts in profiles
7920 ;; where python-ipython and python-jupyter-console are
7921 ;; both present.
7922 (delete-file-recursively
7923 (string-append
7924 (assoc-ref outputs "out") "/bin"))))))))
7925 ;; Remove the python-ipython propagated input, to avoid the cycle
7926 (propagated-inputs
7927 (alist-delete
7928 "python-ipython"
7929 (package-propagated-inputs python-jupyter-console)))))
7930
7931 (define-public python-qtconsole
7932 (package
7933 (name "python-qtconsole")
7934 (version "4.4.3")
7935 (source
7936 (origin
7937 (method url-fetch)
7938 (uri (pypi-uri "qtconsole" version))
7939 (sha256
7940 (base32
7941 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
7942 (build-system python-build-system)
7943 (arguments
7944 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
7945 ;; but we only have the LTS version 5.x. This means that there might be
7946 ;; runtime errors, but since this is a dependency of the Jupyter package,
7947 ;; and Jupyter can be used without the qtconsole we can overlook this for
7948 ;; now.
7949 `(#:tests? #f
7950 #:phases
7951 (modify-phases %standard-phases
7952 (add-before 'check 'pre-check
7953 (lambda _
7954 (setenv "QT_QPA_PLATFORM" "offscreen")
7955 #t)))))
7956 (propagated-inputs
7957 `(("python-ipykernel" ,python-ipykernel)
7958 ("python-ipython" ,python-ipython)))
7959 (native-inputs
7960 `(("python-pytest" ,python-pytest)))
7961 (home-page "http://jupyter.org")
7962 (synopsis "Jupyter Qt console")
7963 (description "This package provides a Qt-based console for Jupyter with
7964 support for rich media output.")
7965 (license license:bsd-3)))
7966
7967 (define-public python-jsbeautifier
7968 (package
7969 (name "python-jsbeautifier")
7970 (version "1.10.2")
7971 (home-page "https://github.com/beautify-web/js-beautify")
7972 (source (origin
7973 (method git-fetch)
7974 (uri (git-reference
7975 (url home-page)
7976 (commit (string-append "v" version))))
7977 (file-name (git-file-name name version))
7978 (sha256
7979 (base32
7980 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
7981 (build-system python-build-system)
7982 (arguments
7983 `(#:phases (modify-phases %standard-phases
7984 (add-after 'unpack 'chdir
7985 (lambda _
7986 ;; The upstream Git repository contains all the code,
7987 ;; but this package only builds the python code.
7988 (chdir "python")
7989 #t))
7990 (add-after 'unpack 'patch-python-six-requirements
7991 (lambda _
7992 (substitute* "python/setup.py"
7993 (("six>=1.12.0")
7994 "six>=1.11.0"))
7995 #t)))))
7996 (propagated-inputs
7997 `(("python-editorconfig" ,python-editorconfig)
7998 ("python-six" ,python-six)))
7999 (native-inputs
8000 `(("python-pytest" ,python-pytest)))
8001 (synopsis "JavaScript unobfuscator and beautifier")
8002 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
8003 popular online obfuscators.")
8004 (license license:expat)))
8005
8006 (define-public jupyter
8007 (package
8008 (name "jupyter")
8009 (version "1.0.0")
8010 (source
8011 (origin
8012 (method url-fetch)
8013 (uri (pypi-uri "jupyter" version))
8014 (sha256
8015 (base32
8016 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8017 (build-system python-build-system)
8018 (arguments '(#:tests? #f)) ; there are none.
8019 (propagated-inputs
8020 `(("python-ipykernel" ,python-ipykernel)
8021 ("python-ipywidgets" ,python-ipywidgets)
8022 ("python-jupyter-console" ,python-jupyter-console)
8023 ("python-nbconvert" ,python-nbconvert)
8024 ("python-notebook" ,python-notebook)
8025 ("python-qtconsole" ,python-qtconsole)))
8026 (native-search-paths
8027 (list (search-path-specification
8028 (variable "JUPYTER_PATH")
8029 (files '("share/jupyter")))))
8030 (home-page "https://jupyter.org")
8031 (synopsis "Web application for interactive documents")
8032 (description
8033 "The Jupyter Notebook is a web application that allows you to create and
8034 share documents that contain live code, equations, visualizations and
8035 explanatory text. Uses include: data cleaning and transformation, numerical
8036 simulation, statistical modeling, machine learning and much more.")
8037 (license license:bsd-3)))
8038
8039 (define-public python-chardet
8040 (package
8041 (name "python-chardet")
8042 (version "3.0.4")
8043 (source
8044 (origin
8045 (method url-fetch)
8046 (uri (pypi-uri "chardet" version))
8047 (sha256
8048 (base32
8049 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
8050 (native-inputs
8051 `(("python-hypothesis" ,python-hypothesis)
8052 ("python-pytest" ,python-pytest)
8053 ("python-pytest-runner" ,python-pytest-runner)))
8054 (build-system python-build-system)
8055 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
8056 (arguments `(#:tests? #f))
8057 (home-page "https://github.com/chardet/chardet")
8058 (synopsis "Universal encoding detector for Python 2 and 3")
8059 (description
8060 "This package provides @code{chardet}, a Python module that can
8061 automatically detect a wide range of file encodings.")
8062 (license license:lgpl2.1+)))
8063
8064 (define-public python2-chardet
8065 (package-with-python2 python-chardet))
8066
8067 (define-public python-docopt
8068 (package
8069 (name "python-docopt")
8070 (version "0.6.2")
8071 (source
8072 (origin
8073 (method url-fetch)
8074 ;; The release on PyPI does not include tests.
8075 (uri (string-append
8076 "https://github.com/docopt/docopt/archive/"
8077 version ".tar.gz"))
8078 (file-name (string-append name "-" version ".tar.gz"))
8079 (sha256
8080 (base32
8081 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
8082 (build-system python-build-system)
8083 (native-inputs
8084 `(("python-pytest" ,python-pytest)))
8085 (arguments
8086 `(#:phases
8087 (modify-phases %standard-phases
8088 (replace 'check
8089 (lambda _ (invoke "py.test"))))))
8090 (home-page "http://docopt.org")
8091 (synopsis "Command-line interface description language for Python")
8092 (description "This library allows the user to define a command-line
8093 interface from a program's help message rather than specifying it
8094 programmatically with command-line parsers like @code{getopt} and
8095 @code{argparse}.")
8096 (license license:expat)))
8097
8098 (define-public python2-docopt
8099 (package-with-python2 python-docopt))
8100
8101 (define-public python-pythondialog
8102 (package
8103 (name "python-pythondialog")
8104 (version "3.4.0")
8105 (source
8106 (origin
8107 (method url-fetch)
8108 (uri (pypi-uri "pythondialog" version))
8109 (sha256
8110 (base32
8111 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8112 (build-system python-build-system)
8113 (arguments
8114 `(#:phases
8115 (modify-phases %standard-phases
8116 (add-after 'unpack 'patch-path
8117 (lambda* (#:key inputs #:allow-other-keys)
8118 (let* ((dialog (assoc-ref inputs "dialog")))
8119 ;; Since this library really wants to grovel the search path, we
8120 ;; must hardcode dialog's store path into it.
8121 (substitute* "dialog.py"
8122 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8123 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8124 #t))))
8125 #:tests? #f)) ; no test suite
8126 (propagated-inputs
8127 `(("dialog" ,dialog)))
8128 (home-page "http://pythondialog.sourceforge.net/")
8129 (synopsis "Python interface to the UNIX dialog utility")
8130 (description "A Python wrapper for the dialog utility. Its purpose is to
8131 provide an easy to use, pythonic and comprehensive Python interface to dialog.
8132 This allows one to make simple text-mode user interfaces on Unix-like systems")
8133 (license license:lgpl2.1)
8134 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8135
8136 (define-public python2-pythondialog
8137 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8138 (package
8139 (inherit base)
8140 (version (package-version python-pythondialog))
8141 (source (origin
8142 (method url-fetch)
8143 (uri (pypi-uri "python2-pythondialog" version))
8144 (sha256
8145 (base32
8146 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8147
8148 (define-public python-configobj
8149 (package
8150 (name "python-configobj")
8151 (version "5.0.6")
8152 (source (origin
8153 (method url-fetch)
8154 (uri (pypi-uri "configobj" version))
8155 (sha256
8156 (base32
8157 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8158 ;; Patch setup.py so it looks for python-setuptools, which is
8159 ;; required to parse the keyword 'install_requires' in setup.py.
8160 (patches (search-patches "python-configobj-setuptools.patch"))))
8161 (build-system python-build-system)
8162 (propagated-inputs
8163 `(("python-six" ,python-six)))
8164 (synopsis "Config file reading, writing and validation")
8165 (description "ConfigObj is a simple but powerful config file reader and
8166 writer: an ini file round tripper. Its main feature is that it is very easy to
8167 use, with a straightforward programmer’s interface and a simple syntax for
8168 config files.")
8169 (home-page "https://github.com/DiffSK/configobj")
8170 (license license:bsd-3)))
8171
8172 (define-public python2-configobj
8173 (package-with-python2 python-configobj))
8174
8175 (define-public python-configargparse
8176 (package
8177 (name "python-configargparse")
8178 (version "0.14.0")
8179 (source (origin
8180 (method url-fetch)
8181 (uri (pypi-uri "ConfigArgParse" version))
8182 (sha256
8183 (base32
8184 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
8185 (build-system python-build-system)
8186 (native-inputs
8187 `(("python-pyyaml" ,python-pyyaml)))
8188 (arguments
8189 `(#:phases
8190 (modify-phases %standard-phases
8191 (replace 'check
8192 (lambda _
8193 ;; Bypass setuptools-shim because one test relies on "setup.py"
8194 ;; being the first argument passed to the python call.
8195 ;;
8196 ;; NOTE: Many tests do not run because they rely on Python's
8197 ;; built-in test.test_argparse, but we remove the unit tests from
8198 ;; our Python installation.
8199 (invoke "python" "setup.py" "test"))))))
8200 (synopsis "Replacement for argparse")
8201 (description "A drop-in replacement for argparse that allows options to also
8202 be set via config files and/or environment variables.")
8203 (home-page "https://github.com/bw2/ConfigArgParse")
8204 (license license:expat)))
8205
8206 (define-public python2-configargparse
8207 (package-with-python2 python-configargparse))
8208
8209 (define-public python-argparse-manpage
8210 (package
8211 (name "python-argparse-manpage")
8212 (version "1.1")
8213 (source
8214 (origin
8215 (method url-fetch)
8216 (uri (pypi-uri "argparse-manpage" version))
8217 (sha256
8218 (base32
8219 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8220 (build-system python-build-system)
8221 (home-page "https://github.com/praiskup/argparse-manpage")
8222 (synopsis "Build manual page from Python's ArgumentParser object")
8223 (description
8224 "This package provides tools to build manual pages from Python's
8225 @code{ArgumentParser} object.")
8226 (license license:asl2.0)))
8227
8228 (define-public python-contextlib2
8229 (package
8230 (name "python-contextlib2")
8231 (version "0.5.5")
8232 (source
8233 (origin
8234 (method url-fetch)
8235 (uri (pypi-uri "contextlib2" version))
8236 (sha256
8237 (base32
8238 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8239 (build-system python-build-system)
8240 (home-page "http://contextlib2.readthedocs.org/")
8241 (synopsis "Tools for decorators and context managers")
8242 (description "This module is primarily a backport of the Python
8243 3.2 contextlib to earlier Python versions. Like contextlib, it
8244 provides utilities for common tasks involving decorators and context
8245 managers. It also contains additional features that are not part of
8246 the standard library.")
8247 (license license:psfl)))
8248
8249 (define-public python2-contextlib2
8250 (package
8251 (name "python2-contextlib2")
8252 (version "0.5.5")
8253 (source
8254 (origin
8255 (method url-fetch)
8256 (uri (pypi-uri "contextlib2" version))
8257 (sha256
8258 (base32
8259 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8260 (build-system python-build-system)
8261 (arguments
8262 `(#:python ,python-2
8263 #:phases
8264 (modify-phases %standard-phases
8265 (replace 'check
8266 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
8267 (native-inputs
8268 `(("python2-unittest2" ,python2-unittest2)))
8269 (home-page "http://contextlib2.readthedocs.org/")
8270 (synopsis "Tools for decorators and context managers")
8271 (description "This module is primarily a backport of the Python
8272 3.2 contextlib to earlier Python versions. Like contextlib, it
8273 provides utilities for common tasks involving decorators and context
8274 managers. It also contains additional features that are not part of
8275 the standard library.")
8276 (license license:psfl)))
8277
8278 (define-public python-texttable
8279 (package
8280 (name "python-texttable")
8281 (version "0.9.1")
8282 (source
8283 (origin
8284 (method url-fetch)
8285 (uri (pypi-uri "texttable" version))
8286 (sha256
8287 (base32
8288 "0yawv64c0zbawwv6zz84whb32fnb2n9jylwjcfsrcdgh7xvl340i"))))
8289 (build-system python-build-system)
8290 (arguments '(#:tests? #f)) ; no tests
8291 (home-page "https://github.com/foutaise/texttable/")
8292 (synopsis "Python module for creating simple ASCII tables")
8293 (description "Texttable is a Python module for creating simple ASCII
8294 tables.")
8295 (license license:lgpl2.1+)))
8296
8297 (define-public python2-texttable
8298 (package-with-python2 python-texttable))
8299
8300 (define-public python-atomicwrites
8301 (package
8302 (name "python-atomicwrites")
8303 (version "1.3.0")
8304 (source (origin
8305 (method url-fetch)
8306 (uri (pypi-uri "atomicwrites" version))
8307 (sha256
8308 (base32
8309 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
8310 (build-system python-build-system)
8311 (synopsis "Atomic file writes in Python")
8312 (description "Library for atomic file writes using platform dependent tools
8313 for atomic file system operations.")
8314 (home-page "https://github.com/untitaker/python-atomicwrites")
8315 (license license:expat)))
8316
8317 (define-public python2-atomicwrites
8318 (package-with-python2 python-atomicwrites))
8319
8320 (define-public python-click-threading
8321 (package
8322 (name "python-click-threading")
8323 (version "0.4.4")
8324 (source (origin
8325 (method url-fetch)
8326 (uri (pypi-uri "click-threading" version))
8327 (sha256
8328 (base32
8329 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8330 (build-system python-build-system)
8331 (propagated-inputs
8332 `(("python-click" ,python-click)))
8333 (synopsis "Utilities for multithreading in Click")
8334 (description "This package provides utilities for multithreading in Click
8335 applications.")
8336 (home-page "https://github.com/click-contrib/click-threading")
8337 (license license:expat)))
8338
8339 (define-public python-click-log
8340 (package
8341 (name "python-click-log")
8342 (version "0.3.2")
8343 (source (origin
8344 (method url-fetch)
8345 (uri (pypi-uri "click-log" version))
8346 (sha256
8347 (base32
8348 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8349 (build-system python-build-system)
8350 (propagated-inputs
8351 `(("python-click" ,python-click)))
8352 (synopsis "Logging for click applications")
8353 (description "This package provides a Python library for logging Click
8354 applications.")
8355 (home-page "https://github.com/click-contrib/click-log")
8356 (license license:expat)))
8357
8358 (define-public python-apipkg
8359 (package
8360 (name "python-apipkg")
8361 (version "1.4")
8362 (source (origin
8363 (method url-fetch)
8364 (uri (pypi-uri "apipkg" version))
8365 (sha256
8366 (base32
8367 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8368 (build-system python-build-system)
8369 (native-inputs
8370 `(("python-pytest" ,python-pytest)))
8371 (synopsis "Namespace control and lazy-import mechanism")
8372 (description "With apipkg you can control the exported namespace of a Python
8373 package and greatly reduce the number of imports for your users. It is a small
8374 pure Python module that works on virtually all Python versions.")
8375 (home-page "https://github.com/pytest-dev/apipkg")
8376 (license license:expat)))
8377
8378 (define-public python2-apipkg
8379 (package-with-python2 python-apipkg))
8380
8381 (define-public python-execnet
8382 (package
8383 (name "python-execnet")
8384 (version "1.4.1")
8385 (source (origin
8386 (method url-fetch)
8387 (uri (pypi-uri "execnet" version))
8388 (sha256
8389 (base32
8390 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8391 (build-system python-build-system)
8392 (arguments
8393 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8394 ;; The two test failures are caused by the lack of an `ssh` executable.
8395 ;; The test suite can be run with pytest after the 'install' phase.
8396 #:tests? #f))
8397 (native-inputs
8398 `(("python-pytest" ,python-pytest)
8399 ("python-setuptools-scm" ,python-setuptools-scm)))
8400 (propagated-inputs
8401 `(("python-apipkg" ,python-apipkg)))
8402 (synopsis "Rapid multi-Python deployment")
8403 (description "Execnet provides a share-nothing model with
8404 channel-send/receive communication for distributing execution across many
8405 Python interpreters across version, platform and network barriers. It has a
8406 minimal and fast API targeting the following uses:
8407 @enumerate
8408 @item distribute tasks to (many) local or remote CPUs
8409 @item write and deploy hybrid multi-process applications
8410 @item write scripts to administer multiple environments
8411 @end enumerate")
8412 (home-page "http://codespeak.net/execnet/")
8413 (license license:expat)))
8414
8415 (define-public python2-execnet
8416 (package-with-python2 python-execnet))
8417
8418 (define-public python-icalendar
8419 (package
8420 (name "python-icalendar")
8421 (version "4.0.4")
8422 (source (origin
8423 (method url-fetch)
8424 (uri (pypi-uri "icalendar" version))
8425 (sha256
8426 (base32
8427 "16gjvqv0n05jrb9g228pdjgzd3amz2pdhvcgsn1jypszjg5m2w9l"))))
8428 (build-system python-build-system)
8429 (propagated-inputs
8430 `(("python-dateutil" ,python-dateutil)
8431 ("python-pytz" ,python-pytz)))
8432 (synopsis "Python library for parsing iCalendar files")
8433 (description "The icalendar package is a parser/generator of iCalendar
8434 files for use with Python.")
8435 (home-page "https://github.com/collective/icalendar")
8436 (license license:bsd-2)))
8437
8438 (define-public python-args
8439 (package
8440 (name "python-args")
8441 (version "0.1.0")
8442 (source (origin
8443 (method url-fetch)
8444 (uri (pypi-uri "args" version))
8445 (sha256
8446 (base32
8447 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8448 (build-system python-build-system)
8449 (home-page "https://github.com/kennethreitz/args")
8450 (synopsis "Command-line argument parser")
8451 (description
8452 "This library provides a Python module to parse command-line arguments.")
8453 (license license:bsd-3)))
8454
8455 (define-public python2-args
8456 (package-with-python2 python-args))
8457
8458 (define-public python-clint
8459 (package
8460 (name "python-clint")
8461 (version "0.5.1")
8462 (source (origin
8463 (method url-fetch)
8464 (uri (pypi-uri "clint" version))
8465 (sha256
8466 (base32
8467 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8468 (build-system python-build-system)
8469 (arguments
8470 '(#:phases
8471 (modify-phases %standard-phases
8472 (replace 'check
8473 (lambda _ (invoke "py.test" "-v"))))))
8474 (native-inputs
8475 `(("python-pytest" ,python-pytest)))
8476 (propagated-inputs
8477 `(("python-args" ,python-args)))
8478 (home-page "https://github.com/kennethreitz/clint")
8479 (synopsis "Command-line interface tools")
8480 (description
8481 "Clint is a Python module filled with a set of tools for developing
8482 command-line applications, including tools for colored and indented
8483 output, progress bar display, and pipes.")
8484 (license license:isc)))
8485
8486 (define-public python2-clint
8487 (package-with-python2 python-clint))
8488
8489 (define-public python-rply
8490 (package
8491 (name "python-rply")
8492 (version "0.7.5")
8493 (source (origin
8494 (method url-fetch)
8495 (uri (pypi-uri "rply" version))
8496 (sha256
8497 (base32
8498 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8499 (build-system python-build-system)
8500 (propagated-inputs
8501 `(("python-appdirs" ,python-appdirs)))
8502 (home-page "https://github.com/alex/rply")
8503 (synopsis "Parser generator for Python")
8504 (description
8505 "This package provides a pure Python based parser generator, that also
8506 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8507 with a new public API, and RPython support.")
8508 (license license:bsd-3)))
8509
8510 (define-public python2-rply
8511 (package-with-python2 python-rply))
8512
8513 (define-public python-hy
8514 (package
8515 (name "python-hy")
8516 (version "0.17.0")
8517 (source (origin
8518 (method url-fetch)
8519 (uri (pypi-uri "hy" version))
8520 (sha256
8521 (base32
8522 "1gdbqsirsdxj320wnp7my5awzs1kfs6m4fqmkzbd1zd47qzj0zfi"))))
8523 (build-system python-build-system)
8524 (arguments
8525 '(#:phases
8526 (modify-phases %standard-phases
8527 (add-before 'install 'set-HOME
8528 (lambda _
8529 (setenv "HOME" "/tmp")))
8530 (replace 'check
8531 (lambda _
8532 ;; Tests require write access to HOME.
8533 (setenv "HOME" "/tmp")
8534 (invoke "nosetests"))))))
8535 (native-inputs
8536 `(("python-coverage" ,python-coverage)
8537 ("python-nose" ,python-nose)))
8538 (propagated-inputs
8539 `(("python-astor" ,python-astor)
8540 ("python-clint" ,python-clint)
8541 ("python-rply" ,python-rply)
8542 ("python-fastentrypoints"
8543 ,python-fastentrypoints)
8544 ("python-funcparserlib"
8545 ,python-funcparserlib)))
8546 (home-page "http://hylang.org/")
8547 (synopsis "Lisp frontend to Python")
8548 (description
8549 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8550 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8551 Python at your fingertips, in Lisp form.")
8552 (license license:expat)))
8553
8554 (define-public python2-hy
8555 (package-with-python2 python-hy))
8556
8557 (define-public python2-functools32
8558 (package
8559 (name "python2-functools32")
8560 (version "3.2.3-2")
8561 (source
8562 (origin
8563 (method url-fetch)
8564 (uri (pypi-uri "functools32" version))
8565 (sha256
8566 (base32
8567 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8568 (build-system python-build-system)
8569 (arguments
8570 `(#:python ,python-2
8571 #:tests? #f)) ; no test target
8572 (home-page "https://github.com/MiCHiLU/python-functools32")
8573 (synopsis
8574 "Backport of the functools module from Python 3.2.3")
8575 (description
8576 "This package is a backport of the @code{functools} module from Python
8577 3.2.3 for use with older versions of Python and PyPy.")
8578 (license license:expat)))
8579
8580 (define-public python2-subprocess32
8581 (package
8582 (name "python2-subprocess32")
8583 (version "3.2.7")
8584 (source (origin
8585 (method url-fetch)
8586 (uri (pypi-uri "subprocess32" version))
8587 (sha256
8588 (base32
8589 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8590 (patches
8591 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8592 (build-system python-build-system)
8593 (arguments
8594 `(#:python ,python-2
8595 ;; The test suite fails with Python > 2.7.13:
8596 ;; import test.support
8597 ;; ImportError: No module named support
8598 #:tests? #f
8599 #:phases
8600 (modify-phases %standard-phases
8601 (add-after 'unpack 'patch-/bin/sh
8602 (lambda _
8603 (substitute* '("subprocess32.py"
8604 "test_subprocess32.py")
8605 (("/bin/sh") (which "sh")))
8606 #t)))))
8607 (home-page "https://github.com/google/python-subprocess32")
8608 (synopsis "Backport of the subprocess module from Python 3.2")
8609 (description
8610 "This is a backport of the @code{subprocess} standard library module
8611 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8612 new features. On POSIX systems it is guaranteed to be reliable when used
8613 in threaded applications. It includes timeout support from Python 3.3 but
8614 otherwise matches 3.2’s API.")
8615 (license license:psfl)))
8616
8617 (define-public python2-futures
8618 (package
8619 (name "python2-futures")
8620 (version "3.2.0")
8621 (source
8622 (origin
8623 (method url-fetch)
8624 (uri (pypi-uri "futures" version))
8625 (sha256
8626 (base32
8627 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8628 (build-system python-build-system)
8629 (arguments
8630 `(#:python ,python-2
8631 #:phases
8632 (modify-phases %standard-phases
8633 (replace 'check
8634 (lambda _
8635 (invoke "python" "test_futures.py")
8636 #t)))))
8637 (home-page "https://github.com/agronholm/pythonfutures")
8638 (synopsis
8639 "Backport of the concurrent.futures package from Python 3.2")
8640 (description
8641 "The concurrent.futures module provides a high-level interface for
8642 asynchronously executing callables. This package backports the
8643 concurrent.futures package from Python 3.2")
8644 (license license:bsd-3)))
8645
8646 (define-public python-promise
8647 (package
8648 (name "python-promise")
8649 (version "0.4.2")
8650 (source
8651 (origin
8652 (method url-fetch)
8653 (uri (pypi-uri "promise" version))
8654 (sha256
8655 (base32
8656 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8657 (build-system python-build-system)
8658 ;; Tests wants python-futures, which is a python2 only program, and
8659 ;; can't be found by python-promise at test time.
8660 (arguments `(#:tests? #f))
8661 (home-page "https://github.com/syrusakbary/promise")
8662 (synopsis "Promises/A+ implementation for Python")
8663 (description
8664 "Promises/A+ implementation for Python")
8665 (properties `((python2-variant . ,(delay python2-promise))))
8666 (license license:expat)))
8667
8668 (define-public python2-promise
8669 (let ((promise (package-with-python2
8670 (strip-python2-variant python-promise))))
8671 (package (inherit promise)
8672 (arguments (substitute-keyword-arguments (package-arguments promise)
8673 ((#:tests? _) #t)))
8674 (native-inputs
8675 `(("python2-futures" ,python2-futures)
8676 ("python2-pytest" ,python2-pytest)
8677 ,@(package-native-inputs promise))))))
8678
8679 (define-public python-progressbar33
8680 (package
8681 (name "python-progressbar33")
8682 (version "2.4")
8683 (source
8684 (origin
8685 (method url-fetch)
8686 (uri (pypi-uri "progressbar33" version))
8687 (sha256
8688 (base32
8689 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
8690 (build-system python-build-system)
8691 (home-page "http://github.com/germangh/python-progressbar")
8692 (synopsis "Text progress bar library for Python")
8693 (description
8694 "This package provides a text progress bar library for Python. This
8695 version only differs from the original @code{progressbar} package in that it
8696 uses relative package imports instead of absolute imports, which is necessary
8697 for the module to work under Python 3.3.")
8698 ;; Either or both of these licenses may be selected.
8699 (license (list license:lgpl2.1+ license:bsd-3))))
8700
8701 (define-public python-colorama
8702 (package
8703 (name "python-colorama")
8704 (version "0.3.9")
8705 (source
8706 (origin
8707 (method url-fetch)
8708 (uri (pypi-uri "colorama" version))
8709 (sha256
8710 (base32
8711 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
8712 (build-system python-build-system)
8713 (synopsis "Colored terminal text rendering for Python")
8714 (description "Colorama is a Python library for rendering colored terminal
8715 text.")
8716 (home-page "https://pypi.python.org/pypi/colorama")
8717 (license license:bsd-3)))
8718
8719 (define-public python2-colorama
8720 (package-with-python2 python-colorama))
8721
8722 (define-public python-rsa
8723 (package
8724 (name "python-rsa")
8725 (version "3.4.2")
8726 (source
8727 (origin
8728 (method url-fetch)
8729 (uri (pypi-uri "rsa" version))
8730 (sha256
8731 (base32
8732 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8733 (build-system python-build-system)
8734 (propagated-inputs
8735 `(("python-pyasn1" ,python-pyasn1)))
8736 (synopsis "Pure-Python RSA implementation")
8737 (description "Python-RSA is a pure-Python RSA implementation. It supports
8738 encryption and decryption, signing and verifying signatures, and key
8739 generation according to PKCS#1 version 1.5. It can be used as a Python
8740 library as well as on the command line.")
8741 (home-page "https://stuvel.eu/rsa")
8742 (license license:asl2.0)))
8743
8744 (define-public python2-rsa
8745 (package-with-python2 python-rsa))
8746
8747 (define-public python-pluggy
8748 (package
8749 (name "python-pluggy")
8750 (version "0.11.0")
8751 (source
8752 (origin
8753 (method url-fetch)
8754 (uri (pypi-uri "pluggy" version))
8755 (sha256
8756 (base32
8757 "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895"))))
8758 (build-system python-build-system)
8759 (native-inputs
8760 `(("python-setuptools-scm" ,python-setuptools-scm)))
8761 (synopsis "Plugin and hook calling mechanism for Python")
8762 (description "Pluggy is an extraction of the plugin manager as used by
8763 Pytest but stripped of Pytest specific details.")
8764 (home-page "https://pypi.python.org/pypi/pluggy")
8765 (license license:expat)))
8766
8767 (define-public python2-pluggy
8768 (package-with-python2 python-pluggy))
8769
8770 (define-public python-tox
8771 (package
8772 (name "python-tox")
8773 (version "2.8.1")
8774 (source
8775 (origin
8776 (method url-fetch)
8777 (uri (pypi-uri "tox" version))
8778 (sha256
8779 (base32
8780 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8781 (build-system python-build-system)
8782 (arguments
8783 ;; FIXME: Tests require pytest-timeout, which itself requires
8784 ;; pytest>=2.8.0 for installation.
8785 '(#:tests? #f))
8786 (propagated-inputs
8787 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8788 ("python-py" ,python-py)
8789 ("python-virtualenv" ,python-virtualenv)))
8790 (native-inputs
8791 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8792 ("python-pytest" ,python-pytest) ; >= 2.3.5
8793 ("python-setuptools-scm" ,python-setuptools-scm)))
8794 (home-page "http://tox.testrun.org/")
8795 (synopsis "Virtualenv-based automation of test activities")
8796 (description "Tox is a generic virtualenv management and test command line
8797 tool. It can be used to check that a package installs correctly with
8798 different Python versions and interpreters, or run tests in each type of
8799 supported environment, or act as a frontend to continuous integration
8800 servers.")
8801 (license license:expat)))
8802
8803 (define-public python2-tox
8804 (package-with-python2 python-tox))
8805
8806 (define-public python-jmespath
8807 (package
8808 (name "python-jmespath")
8809 (version "0.9.4")
8810 (source
8811 (origin
8812 (method url-fetch)
8813 (uri (pypi-uri "jmespath" version))
8814 (sha256
8815 (base32
8816 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
8817 (build-system python-build-system)
8818 (native-inputs
8819 `(("python-nose" ,python-nose)))
8820 (synopsis "JSON Matching Expressions")
8821 (description "JMESPath (pronounced “james path”) is a Python library that
8822 allows one to declaratively specify how to extract elements from a JSON
8823 document.")
8824 (home-page "https://github.com/jmespath/jmespath.py")
8825 (license license:expat)))
8826
8827 (define-public python2-jmespath
8828 (package-with-python2 python-jmespath))
8829
8830 (define-public python-botocore
8831 (package
8832 (name "python-botocore")
8833 (version "1.12.149")
8834 (source
8835 (origin
8836 (method url-fetch)
8837 (uri (pypi-uri "botocore" version))
8838 (sha256
8839 (base32
8840 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
8841 (build-system python-build-system)
8842 (arguments
8843 ;; FIXME: Many tests are failing.
8844 '(#:tests? #f))
8845 (propagated-inputs
8846 `(("python-dateutil" ,python-dateutil)
8847 ("python-docutils" ,python-docutils)
8848 ("python-jmespath" ,python-jmespath)))
8849 (native-inputs
8850 `(("python-mock" ,python-mock)
8851 ("python-nose" ,python-nose)
8852 ("behave" ,behave)
8853 ("python-tox" ,python-tox)
8854 ("python-urllib3" ,python-urllib3)
8855 ("python-wheel" ,python-wheel)))
8856 (home-page "https://github.com/boto/botocore")
8857 (synopsis "Low-level interface to AWS")
8858 (description "Botocore is a Python library that provides a low-level
8859 interface to the Amazon Web Services (AWS) API.")
8860 (license license:asl2.0)))
8861
8862 (define-public python2-botocore
8863 (package-with-python2 python-botocore))
8864
8865 (define-public python-xdo
8866 (package
8867 (name "python-xdo")
8868 (version "0.3")
8869 (source (origin
8870 (method url-fetch)
8871 (uri (string-append
8872 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8873 "python-xdo_" version ".orig.tar.gz"))
8874 (sha256
8875 (base32
8876 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8877 (build-system python-build-system)
8878 (arguments
8879 '(#:phases
8880 (modify-phases %standard-phases
8881 (add-before 'install 'patch-libxdo-path
8882 ;; Hardcode the path of dynamically loaded libxdo library.
8883 (lambda* (#:key inputs #:allow-other-keys)
8884 (let ((libxdo (string-append
8885 (assoc-ref inputs "xdotool")
8886 "/lib/libxdo.so")))
8887 (substitute* "xdo/_xdo.py"
8888 (("find_library\\(\"xdo\"\\)")
8889 (simple-format #f "\"~a\"" libxdo)))
8890 #t))))
8891 #:tests? #f)) ; no tests provided
8892 (propagated-inputs
8893 `(("python-six" ,python-six)))
8894 (inputs
8895 `(("xdotool" ,xdotool)
8896 ("libX11" ,libx11)))
8897 (home-page "https://tracker.debian.org/pkg/python-xdo")
8898 (synopsis "Python library for simulating X11 keyboard/mouse input")
8899 (description "Provides bindings to libxdo for manipulating X11 via simulated
8900 input. (Note that this is mostly a legacy library; you may wish to look at
8901 python-xdo for newer bindings.)")
8902 (license license:bsd-3)))
8903
8904 (define-public python2-xdo
8905 (package-with-python2 python-xdo))
8906
8907 (define-public python-mako
8908 (package
8909 (name "python-mako")
8910 (version "1.1.0")
8911 (source
8912 (origin
8913 (method url-fetch)
8914 (uri (pypi-uri "Mako" version))
8915 (sha256
8916 (base32
8917 "0jqa3qfpykyn4fmkn0kh6043sfls7br8i2bsdbccazcvk9cijsd3"))))
8918 (build-system python-build-system)
8919 (arguments
8920 `(#:phases (modify-phases %standard-phases
8921 (replace 'check
8922 (lambda _
8923 (invoke "pytest" "-vv"))))))
8924 (propagated-inputs
8925 `(("python-markupsafe" ,python-markupsafe)))
8926 (native-inputs
8927 `(("python-mock" ,python-mock)
8928 ("python-pytest" ,python-pytest)))
8929 (home-page "https://www.makotemplates.org/")
8930 (synopsis "Templating language for Python")
8931 (description "Mako is a templating language for Python that compiles
8932 templates into Python modules.")
8933 (license license:expat)))
8934
8935 (define-public python2-mako
8936 (package-with-python2 python-mako))
8937
8938 (define-public python-waitress
8939 (package
8940 (name "python-waitress")
8941 (version "1.1.0")
8942 (source
8943 (origin
8944 (method url-fetch)
8945 (uri (pypi-uri "waitress" version))
8946 (patches (search-patches "python-waitress-fix-tests.patch"))
8947 (sha256
8948 (base32
8949 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
8950 (build-system python-build-system)
8951 (home-page "https://github.com/Pylons/waitress")
8952 (synopsis "Waitress WSGI server")
8953 (description "Waitress is meant to be a production-quality pure-Python WSGI
8954 server with very acceptable performance.")
8955 (license license:zpl2.1)))
8956
8957 (define-public python2-waitress
8958 (package-with-python2 python-waitress))
8959
8960 (define-public python-whichcraft
8961 (package
8962 (name "python-whichcraft")
8963 (version "0.6.1")
8964 (source
8965 (origin
8966 (method url-fetch)
8967 (uri (pypi-uri "whichcraft" version))
8968 (sha256
8969 (base32
8970 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
8971 (build-system python-build-system)
8972 (native-inputs
8973 `(("python-pytest" ,python-pytest)))
8974 (home-page "https://github.com/pydanny/whichcraft")
8975 (synopsis "Cross-platform cross-python shutil.which functionality")
8976 (description
8977 "This package provides a shim of the shutil.which function that's
8978 designed to work across multiple versions of Python.")
8979 (license license:bsd-3)))
8980
8981 (define-public python-cookiecutter
8982 (package
8983 (name "python-cookiecutter")
8984 (version "1.6.0")
8985 (source
8986 (origin
8987 (method url-fetch)
8988 (uri (pypi-uri "cookiecutter" version))
8989 (sha256
8990 (base32
8991 "0glsvaz8igi2wy1hsnhm9fkn6560vdvdixzvkq6dn20z3hpaa5hk"))))
8992 (build-system python-build-system)
8993 (native-inputs
8994 `(("python-freezegun" ,python-freezegun)
8995 ("python-pytest" ,python-pytest)
8996 ("python-pytest-catchlog" ,python-pytest-catchlog)
8997 ("python-pytest-cov" ,python-pytest-cov)
8998 ("python-pytest-mock" ,python-pytest-mock)))
8999 (propagated-inputs
9000 `(("python-binaryornot" ,python-binaryornot)
9001 ("python-click" ,python-click)
9002 ("python-future" ,python-future)
9003 ("python-jinja2" ,python-jinja2)
9004 ("python-jinja2-time" ,python-jinja2-time)
9005 ("python-poyo" ,python-poyo)
9006 ("python-requests" ,python-requests)
9007 ("python-whichcraft" ,python-whichcraft)))
9008 (home-page "https://github.com/audreyr/cookiecutter")
9009 (synopsis
9010 "Command-line utility that creates projects from project templates")
9011 (description
9012 "This package provides a command-line utility that creates projects from
9013 project templates, e.g. creating a Python package project from a Python package
9014 project template.")
9015 (license license:bsd-3)))
9016
9017 (define-public python-pyquery
9018 (package
9019 (name "python-pyquery")
9020 (version "1.2.17")
9021 (source
9022 (origin
9023 (method url-fetch)
9024 (uri (pypi-uri "pyquery" version))
9025 (sha256
9026 (base32
9027 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9028 (build-system python-build-system)
9029 (native-inputs
9030 `(("python-webob" ,python-webob)
9031 ("python-webtest" ,python-webtest)))
9032 (propagated-inputs
9033 `(("python-lxml" ,python-lxml)
9034 ("python-cssselect" ,python-cssselect)))
9035 (home-page "https://github.com/gawel/pyquery")
9036 (synopsis "Make jQuery-like queries on xml documents")
9037 (description "pyquery allows you to make jQuery queries on xml documents.
9038 The API is as much as possible the similar to jQuery. pyquery uses lxml for
9039 fast xml and html manipulation.")
9040 (license license:bsd-3)))
9041
9042 (define-public python-anyjson
9043 (package
9044 (name "python-anyjson")
9045 (version "0.3.3")
9046 (source
9047 (origin
9048 (method url-fetch)
9049 (uri (pypi-uri "anyjson" version))
9050 (sha256
9051 (base32
9052 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9053 (build-system python-build-system)
9054 (arguments
9055 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9056 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9057 ;; whatever) so this transformation needs to be done before the tests
9058 ;; can be run. Maybe we could add a build step to transform beforehand
9059 ;; but it could be annoying/difficult.
9060 ;; We can enable tests for the Python 2 version, though, and do below.
9061 #:tests? #f))
9062 (home-page "https://bitbucket.org/runeh/anyjson/")
9063 (synopsis
9064 "Wraps best available JSON implementation in a common interface")
9065 (description
9066 "Anyjson loads whichever is the fastest JSON module installed
9067 and provides a uniform API regardless of which JSON implementation is used.")
9068 (license license:bsd-3)
9069 (properties `((python2-variant . ,(delay python2-anyjson))))))
9070
9071 (define-public python2-anyjson
9072 (let ((anyjson (package-with-python2
9073 (strip-python2-variant python-anyjson))))
9074 (package
9075 (inherit anyjson)
9076 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9077 #:tests? #t
9078 ,@(package-arguments anyjson)))
9079 (native-inputs `(("python2-nose" ,python2-nose))))))
9080
9081 (define-public python-amqp
9082 (package
9083 (name "python-amqp")
9084 (version "2.3.2")
9085 (source
9086 (origin
9087 (method url-fetch)
9088 (uri (pypi-uri "amqp" version))
9089 (sha256
9090 (base32
9091 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
9092 (build-system python-build-system)
9093 (native-inputs
9094 `(("python-case" ,python-case)
9095 ("python-pytest-sugar" ,python-pytest-sugar)
9096 ("python-mock" ,python-mock)))
9097 (propagated-inputs
9098 `(("python-vine" ,python-vine)))
9099 (home-page "https://github.com/celery/py-amqp")
9100 (synopsis
9101 "Low-level AMQP client for Python (fork of amqplib)")
9102 (description
9103 "This is a fork of amqplib which was originally written by Barry Pederson.
9104 It is maintained by the Celery project, and used by kombu as a pure python
9105 alternative when librabbitmq is not available.")
9106 (license license:lgpl2.1+)
9107 (properties `((python2-variant . ,(delay python2-amqp))))))
9108
9109 (define-public python2-amqp
9110 (let ((amqp (package-with-python2
9111 (strip-python2-variant python-amqp))))
9112 (package
9113 (inherit amqp)
9114 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9115 ;; unmaintained. Weirdly, does not do this on the python 3
9116 ;; version?
9117 #:tests? #f
9118 ,@(package-arguments amqp))))))
9119
9120 (define-public python-txamqp
9121 (package
9122 (name "python-txamqp")
9123 (version "0.8.2")
9124 (source
9125 (origin
9126 (method url-fetch)
9127 (uri (pypi-uri "txAMQP" version))
9128 (sha256
9129 (base32
9130 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
9131 (build-system python-build-system)
9132 (propagated-inputs
9133 `(("python-six" ,python-six)
9134 ("python-twisted" ,python-twisted)))
9135 (home-page "https://github.com/txamqp/txamqp")
9136 (synopsis "Communicate with AMQP peers and brokers using Twisted")
9137 (description
9138 "This package provides a Python library for communicating with AMQP peers
9139 and brokers using the asynchronous networking framework Twisted. It contains
9140 all the necessary code to connect, send and receive messages to/from an
9141 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
9142 also includes support for using Thrift RPC over AMQP in Twisted
9143 applications.")
9144 (license license:asl2.0)))
9145
9146 (define-public python2-txamqp
9147 (package-with-python2 python-txamqp))
9148
9149 (define-public python-kombu
9150 (package
9151 (name "python-kombu")
9152 (version "4.2.2")
9153 (source
9154 (origin
9155 (method url-fetch)
9156 (uri (pypi-uri "kombu" version))
9157 (sha256
9158 (base32
9159 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
9160 (build-system python-build-system)
9161 (native-inputs
9162 `(("python-mock" ,python-mock)
9163 ("python-case" ,python-case)
9164 ("python-pyro4" ,python-pyro4)
9165 ("python-pytest-sugar" ,python-pytest-sugar)
9166 ("python-pytz" ,python-pytz)))
9167 (propagated-inputs
9168 `(("python-anyjson" ,python-anyjson)
9169 ("python-amqp" ,python-amqp)
9170 ("python-redis" ,python-redis)))
9171 (home-page "https://kombu.readthedocs.io")
9172 (synopsis "Message passing library for Python")
9173 (description "The aim of Kombu is to make messaging in Python as easy as
9174 possible by providing an idiomatic high-level interface for the AMQ protocol,
9175 and also provide proven and tested solutions to common messaging problems.
9176 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9177 message orientation, queuing, routing, reliability and security, for which the
9178 RabbitMQ messaging server is the most popular implementation.")
9179 (license license:bsd-3)
9180 (properties `((python2-variant . ,(delay python2-kombu))))))
9181
9182 (define-public python2-kombu
9183 (let ((kombu (package-with-python2
9184 (strip-python2-variant python-kombu))))
9185 (package
9186 (inherit kombu)
9187 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9188 ;; It works fine on the python3 variant.
9189 #:tests? #f
9190 ,@(package-arguments kombu)))
9191 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9192 ,@(package-native-inputs kombu))))))
9193
9194 (define-public python-billiard
9195 (package
9196 (name "python-billiard")
9197 (version "3.5.0.5")
9198 (source
9199 (origin
9200 (method url-fetch)
9201 (uri (pypi-uri "billiard" version))
9202 (sha256
9203 (base32
9204 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9205 (build-system python-build-system)
9206 (native-inputs
9207 `(("python-case" ,python-case)
9208 ("python-pytest" ,python-pytest)))
9209 (home-page "https://github.com/celery/billiard")
9210 (synopsis
9211 "Python multiprocessing fork with improvements and bugfixes")
9212 (description
9213 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9214 multiprocessing package itself is a renamed and updated version of R Oudkerk's
9215 pyprocessing package. This standalone variant is intended to be compatible with
9216 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9217 (license license:bsd-3)
9218 (properties `((python2-variant . ,(delay python2-billiard))))))
9219
9220 (define-public python2-billiard
9221 (let ((billiard (package-with-python2
9222 (strip-python2-variant python-billiard))))
9223 (package
9224 (inherit billiard)
9225 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9226 ("python2-mock" ,python2-mock)
9227 ,@(package-native-inputs billiard))))))
9228
9229 (define-public python-celery
9230 (package
9231 (name "python-celery")
9232 (version "4.2.1")
9233 (source
9234 (origin
9235 (method url-fetch)
9236 (uri (pypi-uri "celery" version))
9237 (sha256
9238 (base32
9239 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9240 (build-system python-build-system)
9241 (arguments
9242 '(;; TODO The tests fail with Python 3.7
9243 ;; https://github.com/celery/celery/issues/4849
9244 #:tests? #f
9245 #:phases
9246 (modify-phases %standard-phases
9247 (add-after 'unpack 'patch-requirements
9248 (lambda _
9249 (substitute* "requirements/test.txt"
9250 (("pytest>=3\\.0,<3\\.3")
9251 "pytest>=3.0"))
9252 #t)))))
9253 (native-inputs
9254 `(("python-case" ,python-case)
9255 ("python-pytest" ,python-pytest)))
9256 (propagated-inputs
9257 `(("python-pytz" ,python-pytz)
9258 ("python-billiard" ,python-billiard)
9259 ("python-kombu" ,python-kombu)))
9260 (home-page "https://celeryproject.org")
9261 (synopsis "Distributed Task Queue")
9262 (description "Celery is an asynchronous task queue/job queue based on
9263 distributed message passing. It is focused on real-time operation, but
9264 supports scheduling as well. The execution units, called tasks, are executed
9265 concurrently on a single or more worker servers using multiprocessing,
9266 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9267 synchronously (wait until ready).")
9268 (license license:bsd-3)
9269 (properties `((python2-variant . ,(delay python2-celery))))))
9270
9271 (define-public python2-celery
9272 (let ((celery (package-with-python2
9273 (strip-python2-variant python-celery))))
9274 (package
9275 (inherit celery)
9276 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9277 ("python2-mock" ,python2-mock)
9278 ,@(package-native-inputs celery))))))
9279
9280 (define-public python-translitcodec
9281 (package
9282 (name "python-translitcodec")
9283 (version "0.4.0")
9284 (source
9285 (origin
9286 (method url-fetch)
9287 (uri (pypi-uri "translitcodec" version))
9288 (sha256
9289 (base32
9290 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9291 (build-system python-build-system)
9292 (arguments
9293 `(#:tests? #f)) ; no tests provided
9294 (home-page
9295 "https://github.com/claudep/translitcodec")
9296 (synopsis
9297 "Unicode to 8-bit charset transliteration codec")
9298 (description
9299 "This package contains codecs for transliterating ISO 10646 texts into
9300 best-effort representations using smaller coded character sets (ASCII,
9301 ISO 8859, etc.).")
9302 (license license:expat)))
9303
9304 (define-public python2-translitcodec
9305 (package-with-python2 python-translitcodec))
9306
9307 (define-public python-editor
9308 (package
9309 (name "python-editor")
9310 (version "0.5")
9311 (source
9312 (origin
9313 (method url-fetch)
9314 (uri (pypi-uri "python-editor" version))
9315 (sha256
9316 (base32
9317 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9318 (build-system python-build-system)
9319 (home-page
9320 "https://github.com/fmoo/python-editor")
9321 (synopsis
9322 "Programmatically open an editor, capture the result")
9323 (description
9324 "python-editor is a library that provides the editor module for
9325 programmatically interfacing with your system's $EDITOR.")
9326 (license license:asl2.0)))
9327
9328 (define-public python2-editor
9329 (package-with-python2 python-editor))
9330
9331 (define-public python-vobject
9332 (package
9333 (name "python-vobject")
9334 (version "0.9.5")
9335 (source (origin
9336 (method url-fetch)
9337 (uri (pypi-uri "vobject" version))
9338 (sha256
9339 (base32
9340 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9341 (build-system python-build-system)
9342 (arguments
9343 '(;; The test suite relies on some non-portable Windows interfaces.
9344 #:tests? #f))
9345 (propagated-inputs
9346 `(("python-dateutil" ,python-dateutil)
9347 ("python-pyicu" ,python-pyicu)))
9348 (synopsis "Parse and generate vCard and vCalendar files")
9349 (description "Vobject is intended to be a full featured Python package for
9350 parsing and generating vCard and vCalendar files. Currently, iCalendar files
9351 are supported and well tested. vCard 3.0 files are supported, and all data
9352 should be imported, but only a few components are understood in a sophisticated
9353 way.")
9354 (home-page "http://eventable.github.io/vobject/")
9355 (license license:asl2.0)))
9356
9357 (define-public python2-vobject
9358 (package-with-python2 python-vobject))
9359
9360 (define-public python-munkres
9361 (package
9362 (name "python-munkres")
9363 (version "1.0.8")
9364 (source (origin
9365 (method url-fetch)
9366 (uri (pypi-uri "munkres" version))
9367 (sha256
9368 (base32
9369 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9370 (build-system python-build-system)
9371 (arguments
9372 '(#:tests? #f)) ; no test suite
9373 (home-page "http://software.clapper.org/munkres/")
9374 (synopsis "Implementation of the Munkres algorithm")
9375 (description "The Munkres module provides an implementation of the Munkres
9376 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9377 useful for solving the Assignment Problem.")
9378 (license license:bsd-3)))
9379
9380 (define-public python2-munkres
9381 (package-with-python2 python-munkres))
9382
9383 (define-public python-whoosh
9384 (package
9385 (name "python-whoosh")
9386 (version "2.7.4")
9387 (source
9388 (origin
9389 (method url-fetch)
9390 (uri (pypi-uri "Whoosh" version))
9391 (sha256
9392 (base32
9393 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9394 (build-system python-build-system)
9395 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
9396 (native-inputs
9397 `(("python-pytest" ,python-pytest)))
9398 (home-page "https://bitbucket.org/mchaput/whoosh")
9399 (synopsis "Full text indexing, search, and spell checking library")
9400 (description
9401 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9402 checking library.")
9403 (license license:bsd-2)))
9404
9405 (define-public python2-whoosh
9406 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9407 (package (inherit whoosh)
9408 (propagated-inputs
9409 `(("python2-backport-ssl-match-hostname"
9410 ,python2-backport-ssl-match-hostname)
9411 ,@(package-propagated-inputs whoosh))))))
9412
9413 (define-public python-pathlib
9414 (package
9415 (name "python-pathlib")
9416 (version "1.0.1")
9417 (source (origin
9418 (method url-fetch)
9419 (uri (pypi-uri "pathlib" version))
9420 (sha256
9421 (base32
9422 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9423 (build-system python-build-system)
9424 ;; The tests depend on the internal "test" module, which does not provide
9425 ;; a stable interface.
9426 (arguments `(#:tests? #f))
9427 (home-page "https://pathlib.readthedocs.org/")
9428 (synopsis "Object-oriented file system paths")
9429 (description "Pathlib offers a set of classes to handle file system paths.
9430 It offers the following advantages over using string objects:
9431
9432 @enumerate
9433 @item No more cumbersome use of os and os.path functions. Everything can
9434 be done easily through operators, attribute accesses, and method calls.
9435 @item Embodies the semantics of different path types. For example,
9436 comparing Windows paths ignores casing.
9437 @item Well-defined semantics, eliminating any inconsistencies or
9438 ambiguities (forward vs. backward slashes, etc.).
9439 @end enumerate
9440
9441 Note: In Python 3.4, pathlib is now part of the standard library. For other
9442 Python versions please consider python-pathlib2 instead, which tracks the
9443 standard library module. This module (python-pathlib) isn't maintained
9444 anymore.")
9445 (license license:expat)))
9446
9447 (define-public python2-pathlib
9448 (package-with-python2 python-pathlib))
9449
9450 (define-public python2-pathlib2
9451 (package
9452 (name "python2-pathlib2")
9453 (version "2.3.3")
9454 (source (origin
9455 (method url-fetch)
9456 (uri (pypi-uri "pathlib2" version))
9457 (sha256
9458 (base32
9459 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
9460 (build-system python-build-system)
9461 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9462 ;; version is 3.4 which already includes this package as part of the
9463 ;; standard library.
9464 (arguments
9465 `(#:python ,python-2))
9466 (propagated-inputs
9467 `(("python2-scandir" ,python2-scandir)
9468 ("python2-six" ,python2-six)))
9469 (home-page "https://pypi.python.org/pypi/pathlib2/")
9470 (synopsis "Object-oriented file system paths - backport of standard
9471 pathlib module")
9472 (description "The goal of pathlib2 is to provide a backport of standard
9473 pathlib module which tracks the standard library module, so all the newest
9474 features of the standard pathlib can be used also on older Python versions.
9475
9476 Pathlib offers a set of classes to handle file system paths. It offers the
9477 following advantages over using string objects:
9478
9479 @enumerate
9480 @item No more cumbersome use of os and os.path functions. Everything can
9481 be done easily through operators, attribute accesses, and method calls.
9482 @item Embodies the semantics of different path types. For example,
9483 comparing Windows paths ignores casing.
9484 @item Well-defined semantics, eliminating any inconsistencies or
9485 ambiguities (forward vs. backward slashes, etc.).
9486 @end enumerate")
9487 (license license:expat)))
9488
9489 (define-public python2-pathlib2-bootstrap
9490 (hidden-package
9491 (package
9492 (inherit python2-pathlib2)
9493 (name "python2-pathlib2-bootstrap")
9494 (propagated-inputs
9495 `(("python2-scandir" ,python2-scandir)
9496 ("python2-six" ,python2-six-bootstrap))))))
9497
9498 (define-public python-jellyfish
9499 (package
9500 (name "python-jellyfish")
9501 (version "0.5.6")
9502 (source (origin
9503 (method url-fetch)
9504 (uri (pypi-uri "jellyfish" version))
9505 (sha256
9506 (base32
9507 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9508 (build-system python-build-system)
9509 (native-inputs
9510 `(("python-pytest" ,python-pytest)))
9511 (home-page "https://github.com/jamesturk/jellyfish")
9512 (synopsis "Approximate and phonetic matching of strings")
9513 (description "Jellyfish uses a variety of string comparison and phonetic
9514 encoding algorithms to do fuzzy string matching.")
9515 (license license:bsd-2)
9516 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9517
9518 (define-public python2-jellyfish
9519 (let ((jellyfish (package-with-python2
9520 (strip-python2-variant python-jellyfish))))
9521 (package (inherit jellyfish)
9522 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9523 ,@(package-native-inputs jellyfish))))))
9524
9525 (define-public python2-unicodecsv
9526 (package
9527 (name "python2-unicodecsv")
9528 (version "0.14.1")
9529 (source (origin
9530 (method url-fetch)
9531 ;; The test suite is not included in the PyPi release.
9532 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9533 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9534 "archive/" version ".tar.gz"))
9535 (file-name (string-append name "-" version ".tar.gz"))
9536 (sha256
9537 (base32
9538 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9539 (build-system python-build-system)
9540 (arguments
9541 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9542 #:python ,python-2))
9543 (native-inputs
9544 `(("python2-unittest2" ,python2-unittest2)))
9545 (home-page "https://github.com/jdunck/python-unicodecsv")
9546 (synopsis "Unicode CSV module for Python 2")
9547 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9548 module, adding support for Unicode strings.")
9549 (license license:bsd-2)))
9550
9551 (define-public python-rarfile
9552 (package
9553 (name "python-rarfile")
9554 (version "2.8")
9555 (source (origin
9556 (method url-fetch)
9557 (uri (pypi-uri "rarfile" version))
9558 (sha256
9559 (base32
9560 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9561 (build-system python-build-system)
9562 (arguments
9563 '(#:phases
9564 (modify-phases %standard-phases
9565 (replace 'check
9566 ;; Many tests fail, but the installation proceeds.
9567 (lambda _ (invoke "make" "-C" "test" "test"))))))
9568 (native-inputs
9569 `(("which" ,which))) ; required for tests
9570 (propagated-inputs
9571 `(("libarchive" ,libarchive)))
9572 (home-page "https://github.com/markokr/rarfile")
9573 (synopsis "RAR archive reader for Python")
9574 (description "This is Python module for RAR archive reading. The interface
9575 is made as zipfile like as possible.")
9576 (license license:isc)))
9577
9578 (define-public python2-rarfile
9579 (package-with-python2 python-rarfile))
9580
9581 (define-public python-magic
9582 (package
9583 (name "python-magic")
9584 (version "0.4.15")
9585 (source
9586 (origin
9587 (method url-fetch)
9588 (uri (pypi-uri "python-magic" version))
9589 (sha256
9590 (base32
9591 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9592 (file-name (string-append name "-" version "-checkout"))))
9593 (build-system python-build-system)
9594 (arguments
9595 ;; The tests are unreliable, so don't run them. The tests fail
9596 ;; under Python3 because they were written for Python2 and
9597 ;; contain import statements that do not work in Python3. One of
9598 ;; the tests fails under Python2 because its assertions are
9599 ;; overly stringent; it relies on comparing output strings which
9600 ;; are brittle and can change depending on the version of
9601 ;; libmagic being used and the system on which the test is
9602 ;; running. In my case, under GuixSD 0.10.0, only one test
9603 ;; failed, and it seems to have failed only because the version
9604 ;; of libmagic that is packaged in Guix outputs a slightly
9605 ;; different (but not wrong) string than the one that the test
9606 ;; expected.
9607 '(#:tests? #f
9608 #:phases (modify-phases %standard-phases
9609 ;; Replace a specific method call with a hard-coded
9610 ;; path to the necessary libmagic.so file in the
9611 ;; store. If we don't do this, then the method call
9612 ;; will fail to find the libmagic.so file, which in
9613 ;; turn will cause any application using
9614 ;; python-magic to fail.
9615 (add-before 'build 'hard-code-path-to-libmagic
9616 (lambda* (#:key inputs #:allow-other-keys)
9617 (let ((file (assoc-ref inputs "file")))
9618 (substitute* "magic.py"
9619 (("ctypes.util.find_library\\('magic'\\)")
9620 (string-append "'" file "/lib/libmagic.so'")))
9621 #t)))
9622 (add-before 'install 'disable-egg-compression
9623 (lambda _
9624 (let ((port (open-file "setup.cfg" "a")))
9625 (display "\n[easy_install]\nzip_ok = 0\n"
9626 port)
9627 (close-port port)
9628 #t))))))
9629 (inputs
9630 ;; python-magic needs to be able to find libmagic.so.
9631 `(("file" ,file)))
9632 (home-page
9633 "https://github.com/ahupp/python-magic")
9634 (synopsis
9635 "File type identification using libmagic")
9636 (description
9637 "This module uses ctypes to access the libmagic file type
9638 identification library. It makes use of the local magic database and
9639 supports both textual and MIME-type output. Note that this module and
9640 the python-file module both provide a \"magic.py\" file; these two
9641 modules, which are different and were developed separately, both serve
9642 the same purpose: to provide Python bindings for libmagic.")
9643 (license license:expat)))
9644
9645 (define-public python2-magic
9646 (package-with-python2 python-magic))
9647
9648 (define-public python2-s3cmd
9649 (package
9650 (name "python2-s3cmd")
9651 (version "1.6.1")
9652 (source
9653 (origin
9654 (method url-fetch)
9655 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9656 "s3cmd-" version ".tar.gz"))
9657 (sha256
9658 (base32
9659 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9660 (build-system python-build-system)
9661 (arguments
9662 ;; s3cmd is written for python2 only and contains no tests.
9663 `(#:python ,python-2
9664 #:tests? #f))
9665 (propagated-inputs
9666 `(("python2-dateutil" ,python2-dateutil)
9667 ;; The python-file package also provides a magic.py module.
9668 ;; This is an unfortunate state of affairs; however, s3cmd
9669 ;; fails to install if it cannot find specifically the
9670 ;; python-magic package. Thus we include it, instead of using
9671 ;; python-file. Ironically, s3cmd sometimes works better
9672 ;; without libmagic bindings at all:
9673 ;; https://github.com/s3tools/s3cmd/issues/198
9674 ("python2-magic" ,python2-magic)))
9675 (home-page "http://s3tools.org/s3cmd")
9676 (synopsis "Command line tool for S3-compatible storage services")
9677 (description
9678 "S3cmd is a command line tool for uploading, retrieving and managing data
9679 in storage services that are compatible with the Amazon Simple Storage
9680 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9681 GnuPG encryption, and more. It also supports management of Amazon's
9682 CloudFront content delivery network.")
9683 (license license:gpl2+)))
9684
9685 (define-public python-pkgconfig
9686 (package
9687 (name "python-pkgconfig")
9688 (version "1.3.1")
9689 (source
9690 (origin
9691 (method url-fetch)
9692 (uri (pypi-uri "pkgconfig" version))
9693 (sha256
9694 (base32
9695 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9696 (build-system python-build-system)
9697 (native-inputs
9698 `(("python-nose" ,python-nose)))
9699 (inputs
9700 `(("pkg-config" ,pkg-config)))
9701 (arguments
9702 `(#:phases
9703 (modify-phases %standard-phases
9704 (add-before 'build 'patch
9705 ;; Hard-code the path to pkg-config.
9706 (lambda _
9707 (substitute* "pkgconfig/pkgconfig.py"
9708 (("cmd = 'pkg-config")
9709 (string-append "cmd = '" (which "pkg-config"))))
9710 #t))
9711 (replace 'check
9712 (lambda _
9713 (invoke "nosetests" "test.py"))))))
9714 (home-page "https://github.com/matze/pkgconfig")
9715 (synopsis "Python interface for pkg-config")
9716 (description "This module provides a Python interface to pkg-config. It
9717 can be used to find all pkg-config packages, check if a package exists,
9718 check if a package meets certain version requirements, query CFLAGS and
9719 LDFLAGS and parse the output to build extensions with setup.py.")
9720 (license license:expat)))
9721
9722 (define-public python2-pkgconfig
9723 (package-with-python2 python-pkgconfig))
9724
9725 (define-public python-bz2file
9726 (package
9727 (name "python-bz2file")
9728 (version "0.98")
9729 (source
9730 (origin
9731 (method url-fetch)
9732 (uri (pypi-uri "bz2file" version))
9733 (sha256
9734 (base32
9735 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9736 (build-system python-build-system)
9737 (arguments
9738 `(#:tests? #f)) ; Tests use deprecated python modules.
9739 (home-page "https://github.com/nvawda/bz2file")
9740 (synopsis "Read and write bzip2-compressed files")
9741 (description
9742 "Bz2file is a Python library for reading and writing bzip2-compressed
9743 files. It contains a drop-in replacement for the I/O interface in the
9744 standard library's @code{bz2} module, including features from the latest
9745 development version of CPython that are not available in older releases.")
9746 (license license:asl2.0)))
9747
9748 (define-public python2-bz2file
9749 (package-with-python2 python-bz2file))
9750
9751 (define-public python-future
9752 (package
9753 (name "python-future")
9754 (version "0.17.1")
9755 (source
9756 (origin
9757 (method url-fetch)
9758 (uri (pypi-uri "future" version))
9759 (sha256
9760 (base32
9761 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
9762 (build-system python-build-system)
9763 ;; Many tests connect to the network or are otherwise flawed.
9764 ;; https://github.com/PythonCharmers/python-future/issues/210
9765 (arguments
9766 `(#:tests? #f))
9767 (home-page "http://python-future.org")
9768 (synopsis "Single-source support for Python 3 and 2")
9769 (description
9770 "@code{python-future} is the missing compatibility layer between Python 2 and
9771 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9772 to support both Python 2 and Python 3 with minimal overhead.")
9773 (license license:expat)))
9774
9775 (define-public python2-future
9776 (package-with-python2 python-future))
9777
9778 (define-public python-cysignals
9779 (package
9780 (name "python-cysignals")
9781 (version "1.9.0")
9782 (source
9783 (origin
9784 (method url-fetch)
9785 (uri (pypi-uri "cysignals" version))
9786 (sha256
9787 (base32
9788 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
9789 (build-system python-build-system)
9790 (native-inputs
9791 `(("python-cython" ,python-cython)
9792 ("python-sphinx" ,python-sphinx)))
9793 (inputs
9794 `(("pari-gp" ,pari-gp)))
9795 (arguments
9796 `(#:modules ((guix build python-build-system)
9797 ((guix build gnu-build-system) #:prefix gnu:)
9798 (guix build utils))
9799 ;; FIXME: Tests are executed after installation and currently fail
9800 ;; when not installing into standard locations; the author is working
9801 ;; on a fix.
9802 #:tests? #f
9803 #:phases
9804 (modify-phases %standard-phases
9805 (add-before
9806 'build 'configure
9807 (assoc-ref gnu:%standard-phases 'configure)))))
9808 (home-page
9809 "https://github.com/sagemath/cysignals")
9810 (synopsis
9811 "Handling of interrupts and signals for Cython")
9812 (description
9813 "The cysignals package provides mechanisms to handle interrupts (and
9814 other signals and errors) in Cython code, using two related approaches,
9815 for mixed Cython/Python code or external C libraries and pure Cython code,
9816 respectively.")
9817 (license license:lgpl3+)))
9818
9819 (define-public python2-cysignals
9820 (package-with-python2 python-cysignals))
9821
9822 (define-public python2-shedskin
9823 (package
9824 (name "python2-shedskin")
9825 (version "0.9.4")
9826 (source
9827 (origin
9828 (method url-fetch)
9829 (uri (string-append "https://github.com/shedskin/shedskin/"
9830 "releases/download/v" version
9831 "/shedskin-" version ".tgz"))
9832 (sha256
9833 (base32
9834 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9835 (build-system python-build-system)
9836 (arguments
9837 `(#:python ,python-2
9838 #:phases (modify-phases %standard-phases
9839 (add-after 'unpack 'fix-resulting-include-libs
9840 (lambda* (#:key inputs #:allow-other-keys)
9841 (let ((libgc (assoc-ref inputs "libgc"))
9842 (pcre (assoc-ref inputs "pcre")))
9843 (substitute* "shedskin/makefile.py"
9844 (("variable == 'CCFLAGS':[ ]*")
9845 (string-append "variable == 'CCFLAGS':\n"
9846 " line += ' -I " pcre "/include"
9847 " -I " libgc "/include'"))
9848 (("variable == 'LFLAGS':[ ]*")
9849 (string-append "variable == 'LFLAGS':\n"
9850 " line += ' -L" pcre "/lib"
9851 " -L " libgc "/lib'")))
9852 #t))))))
9853 (inputs `(("pcre" ,pcre)
9854 ("libgc" ,libgc)))
9855 (home-page "https://shedskin.github.io/")
9856 (synopsis "Experimental Python-2 to C++ Compiler")
9857 (description (string-append "This is an experimental compiler for a subset of
9858 Python. It generates C++ code and a Makefile."))
9859 (license (list license:gpl3 license:bsd-3 license:expat))))
9860
9861 (define-public python2-rope
9862 (package
9863 (name "python2-rope")
9864 (version "0.11.0")
9865 (source
9866 (origin
9867 (method url-fetch)
9868 (uri (pypi-uri "rope" version))
9869 (sha256
9870 (base32
9871 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
9872 (arguments
9873 ;; Rope has only partial python3 support, see `python-rope'
9874 `(#:python ,python-2))
9875 (build-system python-build-system)
9876 (native-inputs
9877 `(("python2-unittest2" ,python2-unittest2)))
9878 (home-page "https://github.com/python-rope/rope")
9879 (synopsis "Refactoring library for Python")
9880 (description "Rope is a refactoring library for Python. It facilitates
9881 the renaming, moving and extracting of attributes, functions, modules, fields
9882 and parameters in Python 2 source code. These refactorings can also be applied
9883 to occurrences in strings and comments.")
9884 (license license:gpl2)))
9885
9886 (define-public python-rope
9887 (package
9888 (inherit python2-rope)
9889 (name "python-rope")
9890 (arguments `(#:python ,python-wrapper
9891 ;; XXX: Only partial python3 support, results in some failing
9892 ;; tests: <https://github.com/python-rope/rope/issues/247>.
9893 #:tests? #f))
9894 (properties `((python2-variant . ,(delay python2-rope))))))
9895
9896 (define-public python-py3status
9897 (package
9898 (name "python-py3status")
9899 (version "3.21")
9900 (source
9901 (origin
9902 (method url-fetch)
9903 (uri (pypi-uri "py3status" version))
9904 (sha256
9905 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
9906 (build-system python-build-system)
9907 (inputs
9908 `(("file" ,file)))
9909 (arguments
9910 '(#:phases
9911 (modify-phases %standard-phases
9912 ;; 'file' is used for detection of configuration file encoding
9913 ;; let's make link the dependency to particular input
9914 (add-before 'build 'patch-file-path
9915 (lambda* (#:key inputs #:allow-other-keys)
9916 (let ((file-path (assoc-ref inputs "file")))
9917 (substitute* "py3status/parse_config.py"
9918 (("\\['file', '-b'")
9919 (string-append "['" file-path "/bin/file', '-b'")))
9920 #t))))
9921 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9922 (home-page "https://github.com/ultrabug/py3status")
9923 (synopsis "Extensible i3status wrapper written in Python")
9924 (description "py3status is an i3status wrapper which extends i3status
9925 functionality in a modular way, allowing you to extend your panel with your
9926 own code, responding to click events and updating clock every second.")
9927 (license license:bsd-3)))
9928
9929 (define-public python-tblib
9930 (package
9931 (name "python-tblib")
9932 (version "1.3.2")
9933 (source (origin
9934 (method url-fetch)
9935 (uri (pypi-uri "tblib" version))
9936 (sha256 (base32
9937 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9938 (build-system python-build-system)
9939 (arguments
9940 `(#:phases
9941 (modify-phases %standard-phases
9942 (add-before 'check 'adjust-tests
9943 (lambda _
9944 (when (which "python3")
9945 ;; Adjust the example output to match that of Python 3.7:
9946 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
9947 (substitute* "README.rst"
9948 (("Exception\\('fail',") "Exception('fail'"))
9949 #t)))
9950 (replace 'check
9951 (lambda _
9952 ;; Upstream runs tests after installation and the package itself
9953 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9954 ;; found.
9955 (setenv "PYTHONPATH"
9956 (string-append (getcwd) "/build/lib:"
9957 (getenv "PYTHONPATH")))
9958 (invoke "py.test" "-vv" "tests" "README.rst"))))))
9959 (native-inputs
9960 `(("python-pytest" ,python-pytest)
9961 ("python-six" ,python-six)))
9962 (home-page "https://github.com/ionelmc/python-tblib")
9963 (synopsis "Traceback serialization library")
9964 (description
9965 "Traceback serialization allows you to:
9966
9967 @enumerate
9968 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
9969 different processes. This allows better error handling when running code over
9970 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9971
9972 @item Parse traceback strings and raise with the parsed tracebacks.
9973 @end enumerate\n")
9974 (license license:bsd-3)))
9975
9976 (define-public python2-tblib
9977 (package-with-python2 python-tblib))
9978
9979 (define-public python-greenlet
9980 (package
9981 (name "python-greenlet")
9982 (version "0.4.15")
9983 (source (origin
9984 (method url-fetch)
9985 (uri (pypi-uri "greenlet" version))
9986 (sha256
9987 (base32
9988 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
9989 (build-system python-build-system)
9990 (home-page "https://greenlet.readthedocs.io/")
9991 (synopsis "Lightweight in-process concurrent programming")
9992 (description
9993 "Greenlet package is a spin-off of Stackless, a version of CPython
9994 that supports micro-threads called \"tasklets\". Tasklets run
9995 pseudo-concurrently (typically in a single or a few OS-level threads) and
9996 are synchronized with data exchanges on \"channels\".")
9997 (license (list license:psfl license:expat))))
9998
9999 (define-public python2-greenlet
10000 (package-with-python2 python-greenlet))
10001
10002 (define-public python-objgraph
10003 (package
10004 (name "python-objgraph")
10005 (version "3.4.0")
10006 (source
10007 (origin
10008 (method url-fetch)
10009 (uri (pypi-uri "objgraph" version))
10010 (sha256
10011 (base32
10012 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
10013 (build-system python-build-system)
10014 (propagated-inputs
10015 `(("python-graphviz" ,python-graphviz)))
10016 (native-inputs
10017 `(("python-mock" ,python-mock)
10018 ("graphviz" ,graphviz)))
10019 (home-page "https://mg.pov.lt/objgraph/")
10020 (synopsis "Draw Python object reference graphs with graphviz")
10021 (description
10022 "This package provides tools to draw Python object reference graphs with
10023 graphviz.")
10024 (license license:expat)))
10025
10026 (define-public python-gevent
10027 (package
10028 (name "python-gevent")
10029 (version "1.3.7")
10030 (source (origin
10031 (method url-fetch)
10032 (uri (pypi-uri "gevent" version))
10033 (sha256
10034 (base32
10035 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
10036 (modules '((guix build utils)))
10037 (snippet
10038 '(begin
10039 ;; unbunding libev and c-ares
10040 (delete-file-recursively "deps")
10041 #t))))
10042 (build-system python-build-system)
10043 (arguments
10044 `(#:modules ((ice-9 ftw)
10045 (ice-9 match)
10046 (srfi srfi-26)
10047 (guix build utils)
10048 (guix build python-build-system))
10049 #:phases (modify-phases %standard-phases
10050 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
10051 (lambda _
10052 (substitute* "src/gevent/subprocess.py"
10053 (("/bin/sh") (which "sh")))
10054 (for-each (lambda (file)
10055 (substitute* file
10056 (("/bin/sh") (which "sh"))
10057 (("/bin/true") (which "true"))))
10058 (find-files "src/greentest" "\\.py$"))
10059 #t))
10060 (add-before 'build 'do-not-use-bundled-sources
10061 (lambda* (#:key inputs #:allow-other-keys)
10062 (setenv "CONFIG_SHELL" (which "bash"))
10063 (setenv "LIBEV_EMBED" "false")
10064 (setenv "CARES_EMBED" "false")
10065 (setenv "EMBED" "false")
10066
10067 ;; Prevent building bundled libev.
10068 (substitute* "setup.py"
10069 (("run_make=_BUILDING")
10070 "run_make=False"))
10071
10072 (let ((greenlet (string-append
10073 (assoc-ref inputs "python-greenlet")
10074 "/include")))
10075 (match (scandir greenlet
10076 (lambda (item)
10077 (string-prefix? "python" item)))
10078 ((python)
10079 (setenv "C_INCLUDE_PATH"
10080 (string-append greenlet "/" python)))))
10081 #t))
10082 (add-before 'check 'skip-timer-test
10083 (lambda _
10084 ;; XXX: Skip 'TestTimerResolution', which appears to be
10085 ;; unreliable.
10086 (substitute* "src/greentest/test__core_timer.py"
10087 (("not greentest.RUNNING_ON_CI") "False"))
10088 #t))
10089 (replace 'check
10090 (lambda _
10091 ;; Make sure the build directory is on PYTHONPATH.
10092 (setenv "PYTHONPATH"
10093 (string-append
10094 (getenv "PYTHONPATH") ":"
10095 (getcwd) "/build/"
10096 (car (scandir "build" (cut string-prefix? "lib." <>)))))
10097 (with-directory-excursion "src/greentest"
10098 ;; XXX: Many tests require network access. Instead we only
10099 ;; run known-good tests. Unfortunately we cannot use
10100 ;; recursion here since this directory also contains
10101 ;; Python-version-specific subfolders.
10102 (apply invoke "python" "testrunner.py" "--config"
10103 "known_failures.py"
10104 (scandir "." (cut regexp-exec
10105 (make-regexp "test_+(subprocess|core)")
10106 <>)))))))))
10107 (propagated-inputs
10108 `(("python-greenlet" ,python-greenlet)
10109 ("python-objgraph" ,python-objgraph)))
10110 (native-inputs
10111 `(("python-six" ,python-six)))
10112 (inputs
10113 `(("c-ares" ,c-ares)
10114 ("libev" ,libev)))
10115 (home-page "http://www.gevent.org/")
10116 (synopsis "Coroutine-based network library")
10117 (description
10118 "gevent is a coroutine-based Python networking library that uses greenlet
10119 to provide a high-level synchronous API on top of the libev event loop.")
10120 (license license:expat)
10121 (properties `((python2-variant . ,(delay python2-gevent))))))
10122
10123 (define-public python2-gevent
10124 (let ((base (package-with-python2
10125 (strip-python2-variant python-gevent))))
10126 (package
10127 (inherit base)
10128 (native-inputs `(,@(package-native-inputs python-gevent)
10129 ("python-mock" ,python2-mock))))))
10130
10131 (define-public python-fastimport
10132 (package
10133 (name "python-fastimport")
10134 (version "0.9.6")
10135 (source
10136 (origin
10137 (method url-fetch)
10138 (uri (pypi-uri "fastimport" version))
10139 (sha256
10140 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10141 (build-system python-build-system)
10142 (home-page "https://github.com/jelmer/python-fastimport")
10143 (synopsis "VCS fastimport parser and generator in Python")
10144 (description "This package provides a parser for and generator of the Git
10145 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
10146 format.")
10147 (license license:gpl2+)))
10148
10149 (define-public python2-fastimport
10150 (package-with-python2 python-fastimport))
10151
10152 (define-public python-twisted
10153 (package
10154 (name "python-twisted")
10155 (version "19.7.0")
10156 (source (origin
10157 (method url-fetch)
10158 (uri (pypi-uri "Twisted" version ".tar.bz2"))
10159 (sha256
10160 (base32
10161 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
10162 (build-system python-build-system)
10163 (arguments
10164 '(#:tests? #f)) ; FIXME: some tests fail
10165 (propagated-inputs
10166 `(("python-zope-interface" ,python-zope-interface)
10167 ("python-pyhamcrest" ,python-pyhamcrest)
10168 ("python-incremental" ,python-incremental)
10169 ("python-hyperlink" ,python-hyperlink)
10170 ("python-constantly" ,python-constantly)
10171 ("python-automat" ,python-automat)))
10172 (home-page "https://twistedmatrix.com/")
10173 (synopsis "Asynchronous networking framework written in Python")
10174 (description
10175 "Twisted is an extensible framework for Python programming, with special
10176 focus on event-based network programming and multiprotocol integration.")
10177 (license license:expat)))
10178
10179 (define-public python2-twisted
10180 (package-with-python2 python-twisted))
10181
10182 (define-public python-pika
10183 (package
10184 (name "python-pika")
10185 (version "0.12.0")
10186 (source
10187 (origin
10188 (method url-fetch)
10189 (uri (pypi-uri "pika" version))
10190 (sha256
10191 (base32
10192 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10193 (build-system python-build-system)
10194 (native-inputs
10195 `(("python-pyev" ,python-pyev)
10196 ("python-tornado" ,python-tornado)
10197 ("python-twisted" ,python-twisted)))
10198 (home-page "https://pika.readthedocs.org")
10199 (synopsis "Pure Python AMQP Client Library")
10200 (description
10201 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10202 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10203 network support library.")
10204 (license license:bsd-3)))
10205
10206 (define-public python2-pika
10207 (package-with-python2 python-pika))
10208
10209 (define-public python-ply
10210 (package
10211 (name "python-ply")
10212 (version "3.10")
10213 (source
10214 (origin
10215 (method url-fetch)
10216 (uri (pypi-uri "ply" version))
10217 (sha256
10218 (base32
10219 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10220 (build-system python-build-system)
10221 (home-page "http://www.dabeaz.com/ply/")
10222 (synopsis "Python Lex & Yacc")
10223 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10224 It uses LR parsing and does extensive error checking.")
10225 (license license:bsd-3)))
10226
10227 (define-public python2-ply
10228 (package-with-python2 python-ply))
10229
10230 (define-public python-tabulate
10231 (package
10232 (name "python-tabulate")
10233 (version "0.7.7")
10234 (source (origin
10235 (method url-fetch)
10236 (uri (pypi-uri "tabulate" version))
10237 (sha256
10238 (base32
10239 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10240 (build-system python-build-system)
10241 (arguments
10242 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10243 ;; and the latest release is not tagged in the upstream repository.
10244 '(#:tests? #f))
10245 (home-page "https://bitbucket.org/astanin/python-tabulate")
10246 (synopsis "Pretty-print tabular data")
10247 (description
10248 "Tabulate is a library and command-line utility to pretty-print tabular
10249 data in Python.")
10250 (license license:expat)))
10251
10252 (define-public python2-tabulate
10253 (package-with-python2 python-tabulate))
10254
10255 (define-public python-kazoo
10256 (package
10257 (name "python-kazoo")
10258 (version "2.4.0")
10259 (source
10260 (origin
10261 (method url-fetch)
10262 (uri (pypi-uri "kazoo" version))
10263 (sha256
10264 (base32
10265 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10266 (build-system python-build-system)
10267 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10268 (propagated-inputs
10269 `(("python-six" ,python-six)))
10270 (home-page "https://kazoo.readthedocs.org")
10271 (synopsis "High-level Zookeeper client library")
10272 (description
10273 "Kazoo is a Python client library for the Apache Zookeeper distributed
10274 application service. It is designed to be easy to use and to avoid common
10275 programming errors.")
10276 (license license:asl2.0)))
10277
10278 (define-public python2-kazoo
10279 (package-with-python2 python-kazoo))
10280
10281 (define-public python-pykafka
10282 (package
10283 (name "python-pykafka")
10284 (version "2.4.0")
10285 (source (origin
10286 (method url-fetch)
10287 (uri (pypi-uri "pykafka" version))
10288 (sha256
10289 (base32
10290 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10291 (build-system python-build-system)
10292 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10293 (propagated-inputs
10294 `(("python-gevent" ,python-gevent)
10295 ("python-kazoo" ,python-kazoo)
10296 ("python-tabulate" ,python-tabulate)))
10297 (inputs
10298 `(("librdkafka" ,librdkafka)))
10299 (home-page "https://pykafka.readthedocs.io/")
10300 (synopsis "Apache Kafka client for Python")
10301 (description
10302 "PyKafka is a client for the Apache Kafka distributed messaging system.
10303 It includes Python implementations of Kafka producers and consumers, which
10304 are optionally backed by a C extension built on librdkafka.")
10305 (license license:asl2.0)))
10306
10307 (define-public python2-pykafka
10308 (package-with-python2 python-pykafka))
10309
10310 (define-public python-wcwidth
10311 (package
10312 (name "python-wcwidth")
10313 (version "0.1.7")
10314 (source
10315 (origin
10316 (method url-fetch)
10317 (uri (pypi-uri "wcwidth" version))
10318 (sha256
10319 (base32
10320 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
10321 (build-system python-build-system)
10322 (home-page "https://github.com/jquast/wcwidth")
10323 (synopsis "Measure number of terminal column cells of wide-character codes")
10324 (description "Wcwidth measures the number of terminal column cells of
10325 wide-character codes. It is useful for those implementing a terminal emulator,
10326 or programs that carefully produce output to be interpreted by one. It is a
10327 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10328 specified in POSIX.1-2001 and POSIX.1-2008.")
10329 (license license:expat)))
10330
10331 (define-public python2-wcwidth
10332 (package-with-python2 python-wcwidth))
10333
10334 (define-public python2-jsonrpclib
10335 (package
10336 (name "python2-jsonrpclib")
10337 (version "0.1.7")
10338 (source (origin
10339 (method url-fetch)
10340 (uri (pypi-uri "jsonrpclib" version))
10341 (sha256
10342 (base32
10343 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10344 (build-system python-build-system)
10345 (arguments
10346 `(#:tests? #f
10347 #:python ,python-2))
10348 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10349 (synopsis "Implementation of JSON-RPC specification for Python")
10350 (description
10351 "This library is an implementation of the JSON-RPC specification.
10352 It supports both the original 1.0 specification, as well as the
10353 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10354 etc.")
10355 (license license:asl2.0)))
10356
10357 (define-public python-chai
10358 (package
10359 (name "python-chai")
10360 (version "1.1.2")
10361 (source (origin
10362 (method url-fetch)
10363 (uri (pypi-uri "chai" version))
10364 (sha256
10365 (base32
10366 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10367 (build-system python-build-system)
10368 (home-page "https://github.com/agoragames/chai")
10369 (synopsis "Mocking framework for Python")
10370 (description
10371 "Chai provides an api for mocking, stubbing and spying your python
10372 objects, patterned after the Mocha library for Ruby.")
10373 (license license:bsd-3)))
10374
10375 (define-public python2-chai
10376 (package-with-python2 python-chai))
10377
10378 (define-public python-inflection
10379 (package
10380 (name "python-inflection")
10381 (version "0.3.1")
10382 (source
10383 (origin (method url-fetch)
10384 (uri (pypi-uri "inflection" version))
10385 (sha256
10386 (base32
10387 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10388 (build-system python-build-system)
10389 (native-inputs
10390 `(("python-pytest" ,python-pytest)))
10391 (home-page "https://github.com/jpvanhal/inflection")
10392 (synopsis "Python string transformation library")
10393 (description
10394 "Inflection is a string transformation library. It singularizes
10395 and pluralizes English words, and transforms strings from CamelCase to
10396 underscored string.")
10397 (license license:expat)))
10398
10399 (define-public python2-inflection
10400 (package-with-python2 python-inflection))
10401
10402 (define-public python-pylev
10403 (package
10404 (name "python-pylev")
10405 (version "1.3.0")
10406 (source (origin
10407 (method url-fetch)
10408 (uri (pypi-uri "pylev" version))
10409 (sha256
10410 (base32
10411 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10412 (build-system python-build-system)
10413 (home-page "https://github.com/toastdriven/pylev")
10414 (synopsis "Levenshtein distance implementation in Python")
10415 (description "Pure Python Levenshtein implementation, based off the
10416 Wikipedia code samples at
10417 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10418 (license license:bsd-3)))
10419
10420 (define-public python2-pylev
10421 (package-with-python2 python-pylev))
10422
10423 (define-public python-cleo
10424 (package
10425 (name "python-cleo")
10426 (version "0.6.8")
10427 (source (origin
10428 (method url-fetch)
10429 (uri (pypi-uri "cleo" version))
10430 (sha256
10431 (base32
10432 "06zp695hq835rkaq6irr1ds1dp2qfzyf32v60vxpd8rcnxv319l5"))))
10433 (build-system python-build-system)
10434 (native-inputs
10435 `( ;; For testing
10436 ("python-mock" ,python-mock)
10437 ("python-pytest-mock" ,python-pytest-mock)
10438 ("python-pytest" ,python-pytest)))
10439 (propagated-inputs
10440 `(("python-backpack" ,python-backpack)
10441 ("python-pastel" ,python-pastel)
10442 ("python-pylev" ,python-pylev)))
10443 (home-page "https://github.com/sdispater/cleo")
10444 (synopsis "Command-line arguments library for Python")
10445 (description
10446 "Cleo allows you to create command-line commands with signature in
10447 docstring and colored output.")
10448 (license license:expat)))
10449
10450 (define-public python2-cleo
10451 (package-with-python2 python-cleo))
10452
10453 (define-public python-tomlkit
10454 (package
10455 (name "python-tomlkit")
10456 (version "0.5.7")
10457 (source
10458 (origin
10459 (method url-fetch)
10460 (uri (pypi-uri "tomlkit" version))
10461 (sha256
10462 (base32
10463 "18820ga5z3if1w8dvykxrfm000akracq01ic402xrbljgbn5grn4"))))
10464 (build-system python-build-system)
10465 (native-inputs
10466 `(("python-pytest" ,python-pytest)))
10467 (home-page
10468 "https://github.com/sdispater/tomlkit")
10469 (synopsis "Style preserving TOML library")
10470 (description
10471 "TOML Kit is a 0.5.0-compliant TOML library. It includes a parser that
10472 preserves all comments, indentations, whitespace and internal element ordering,
10473 and makes them accessible and editable via an intuitive API. It can also
10474 create new TOML documents from scratch using the provided helpers. Part of the
10475 implementation as been adapted, improved and fixed from Molten.")
10476 (license license:expat)))
10477
10478 (define-public python-shellingham
10479 (package
10480 (name "python-shellingham")
10481 (version "1.3.1")
10482 (source
10483 (origin
10484 (method url-fetch)
10485 (uri (pypi-uri "shellingham" version))
10486 (sha256
10487 (base32
10488 "1q7kws7w4x2hji3g7y0ni9ddk4sd676ylrb3db54gbpys6xj6nwq"))))
10489 (build-system python-build-system)
10490 (home-page
10491 "https://github.com/sarugaku/shellingham")
10492 (synopsis "Tool to detect surrounding shell")
10493 (description
10494 "Shellingham detects what shell the current Python executable is
10495 running in.")
10496 (license license:isc)))
10497
10498 (define-public python-memcached
10499 (package
10500 (name "python-memcached")
10501 (version "1.59")
10502 (source
10503 (origin
10504 (method url-fetch)
10505 (uri (pypi-uri "python-memcached" version))
10506 (sha256
10507 (base32
10508 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))))
10509 (build-system python-build-system)
10510 (propagated-inputs `(("python-six" ,python-six)))
10511 (home-page
10512 "https://github.com/linsomniac/python-memcached")
10513 (synopsis "Pure python memcached client")
10514 (description
10515 "This software is a pure Python interface to the memcached memory cache
10516 daemon. It is the client side software which allows storing values in one or
10517 more, possibly remote, memcached servers.")
10518 (license license:psfl)))
10519
10520 (define-public python-clikit
10521 (package
10522 (name "python-clikit")
10523 (version "0.2.4")
10524 (source
10525 (origin
10526 (method url-fetch)
10527 (uri (pypi-uri "clikit" version))
10528 (sha256
10529 (base32
10530 "0dc8czib5f4j9px1ivcpqnmivnx2zjpc0xb00ldrhsqylks7r06n"))))
10531 (build-system python-build-system)
10532 (propagated-inputs
10533 `(("python-pastel" ,python-pastel)
10534 ("python-pylev" ,python-pylev)))
10535 (home-page "https://github.com/sdispater/clikit")
10536 (synopsis "Group of utilities to build command line interfaces")
10537 (description
10538 "CliKit is a group of utilities to build testable command line
10539 interfaces.")
10540 (license license:expat)))
10541
10542 (define-public python-msgpack-python
10543 (package
10544 (name "python-msgpack-python")
10545 (version "0.5.6")
10546 (source
10547 (origin
10548 (method url-fetch)
10549 (uri (pypi-uri "msgpack-python" version))
10550 (sha256
10551 (base32
10552 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
10553 (build-system python-build-system)
10554 (home-page "http://msgpack.org/")
10555 (synopsis "Package to deserialize messages in MessagePack binary format")
10556 (description
10557 "MessagePack is an efficient binary serialization format. It lets you
10558 exchange data among multiple languages like JSON. But it's faster and
10559 smaller. Small integers are encoded into a single byte, and typical short
10560 strings require only one extra byte in addition to the strings themselves.")
10561 (license license:asl2.0)))
10562
10563 (define-public python-cachy
10564 (package
10565 (name "python-cachy")
10566 (version "0.2.0")
10567 (source
10568 (origin
10569 (method url-fetch)
10570 (uri (pypi-uri "cachy" version))
10571 (sha256
10572 (base32
10573 "0v6mjyhgx6j7ya20bk69cr3gdzdkdf6psay0h090rscclgji65dp"))))
10574 (build-system python-build-system)
10575 (native-inputs
10576 `(("python-fakeredis" ,python-fakeredis)
10577 ("python-flexmock" ,python-flexmock)
10578 ("python-pytest" ,python-pytest)))
10579 (propagated-inputs
10580 `(("python-memcached" ,python-memcached)
10581 ("python-msgpack-python" ,python-msgpack-python)
10582 ("python-redis" ,python-redis)))
10583 (home-page "https://github.com/sdispater/cachy")
10584 (synopsis "Simple yet effective caching library")
10585 (description
10586 "Cachy provides a simple yet effective caching library. A simple but
10587 powerful API: thread-safety; decorator syntax; support for memcached, redis,
10588 database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
10589 (license license:expat)))
10590
10591 (define-public poetry
10592 (package
10593 (name "poetry")
10594 (version "0.12.17")
10595 ;; Poetry can only be built from source with poetry.
10596 (source
10597 (origin
10598 (method url-fetch)
10599 (uri (pypi-uri "poetry" version))
10600 (sha256
10601 (base32
10602 "0gxwcd65qjmzqzppf53x51sic1rbcd9py6cdzx3aprppipimslvf"))))
10603 (build-system python-build-system)
10604 (arguments
10605 `(#:tests? #f ;; Pypi does not have tests.
10606 #:phases
10607 (modify-phases %standard-phases
10608 (replace 'build
10609 (lambda _
10610 ;; Bug in poetry https://github.com/sdispater/poetry/issues/866.
10611 (invoke "sed" "-i" "-e" "s/from distutils.core/from setuptools/"
10612 "setup.py")
10613 #t)))))
10614 (propagated-inputs
10615 `(("python-cachecontrol" ,python-cachecontrol)
10616 ("python-cachy" ,python-cachy)
10617 ("python-cleo" ,python-cleo)
10618 ("python-glob2" ,python-glob2)
10619 ("python-html5lib" ,python-html5lib)
10620 ("python-jsonschema" ,python-jsonschema)
10621 ("python-msgpack" ,python-msgpack)
10622 ("python-pathlib2" ,python-pathlib2)
10623 ("python-pkginfo" ,python-pkginfo)
10624 ("python-pyparsing" ,python-pyparsing)
10625 ("python-pyrsistent" ,python-pyrsistent)
10626 ("python-requests" ,python-requests)
10627 ("python-requests-toolbelt" ,python-requests-toolbelt)
10628 ("python-shellingham" ,python-shellingham)
10629 ("python-tomlkit" ,python-tomlkit)
10630 ("python-virtualenv" ,python-virtualenv)))
10631 (home-page "https://poetry.eustace.io/")
10632 (synopsis "Python dependency management and packaging made easy")
10633 (description "Poetry is a tool for dependency management and packaging
10634 in Python. It allows you to declare the libraries your project depends on and
10635 it will manage (install/update) them for you.")
10636 (license license:expat)))
10637
10638 (define-public python-lazy-object-proxy
10639 (package
10640 (name "python-lazy-object-proxy")
10641 (version "1.4.3")
10642 (source (origin
10643 (method url-fetch)
10644 (uri (pypi-uri "lazy-object-proxy" version))
10645 (sha256
10646 (base32
10647 "1w1aaay424ciz8fz3fkzxb0pxzfxn184f2whpyn4fx72bn50x47k"))))
10648 (native-inputs
10649 `(("python-setuptools-scm" ,python-setuptools-scm-3.3)))
10650 (build-system python-build-system)
10651 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10652 (synopsis "Lazy object proxy for python")
10653 (description
10654 "Lazy object proxy is an object that wraps a callable but defers the call
10655 until the object is actually required, and caches the result of said call.")
10656 (license license:bsd-2)))
10657
10658 (define-public python2-lazy-object-proxy
10659 (package-with-python2 python-lazy-object-proxy))
10660
10661 (define-public python-dnspython
10662 (package
10663 (name "python-dnspython")
10664 (version "1.15.0")
10665 (source (origin
10666 (method url-fetch)
10667 (uri (string-append "http://www.dnspython.org/kits/"
10668 version "/dnspython-" version ".tar.gz"))
10669 (sha256
10670 (base32
10671 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10672 (build-system python-build-system)
10673 (arguments '(#:tests? #f)) ; XXX: requires internet access
10674 (home-page "http://www.dnspython.org")
10675 (synopsis "DNS toolkit for Python")
10676 (description
10677 "dnspython is a DNS toolkit for Python. It supports almost all record
10678 types. It can be used for queries, zone transfers, and dynamic updates.
10679 It supports TSIG authenticated messages and EDNS0.")
10680 (license license:expat)))
10681
10682 (define-public python2-dnspython
10683 (package-with-python2 python-dnspython))
10684
10685 (define-public python-email-validator
10686 (package
10687 (name "python-email-validator")
10688 (version "1.0.2")
10689 (source
10690 (origin (method url-fetch)
10691 (uri (pypi-uri "email_validator" version))
10692 (sha256
10693 (base32
10694 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10695 (build-system python-build-system)
10696 (arguments
10697 '(#:phases
10698 (modify-phases %standard-phases
10699 (add-before 'build 'use-dnspython
10700 (lambda _
10701 (substitute* "setup.py"
10702 (("dnspython3") "dnspython"))
10703 #t)))))
10704 (propagated-inputs
10705 `(("python-dnspython" ,python-dnspython)
10706 ("python-idna" ,python-idna)))
10707 (home-page "https://github.com/JoshData/python-email-validator")
10708 (synopsis "Email address validation library for Python")
10709 (description
10710 "This library validates email address syntax and deliverability.")
10711 (license license:cc0)))
10712
10713 (define-public python2-email-validator
10714 (package-with-python2 python-email-validator))
10715
10716 (define-public python-ukpostcodeparser
10717 (package
10718 (name "python-ukpostcodeparser")
10719 (version "1.0.3")
10720 (source (origin
10721 (method url-fetch)
10722 (uri (pypi-uri "UkPostcodeParser" version))
10723 (sha256
10724 (base32
10725 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10726 (build-system python-build-system)
10727 (home-page "https://github.com/hamstah/ukpostcodeparser")
10728 (synopsis "UK Postcode parser for Python")
10729 (description
10730 "This library provides the @code{parse_uk_postcode} function for
10731 parsing UK postcodes.")
10732 (license license:expat)))
10733
10734 (define-public python2-ukpostcodeparser
10735 (package-with-python2 python-ukpostcodeparser))
10736
10737 (define-public python-faker
10738 (package
10739 (name "python-faker")
10740 (version "0.7.9")
10741 (source (origin
10742 (method url-fetch)
10743 (uri (pypi-uri "Faker" version))
10744 (sha256
10745 (base32
10746 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10747 (patches
10748 (search-patches "python-faker-fix-build-32bit.patch"))
10749 (modules '((guix build utils)))
10750 (snippet
10751 '(begin
10752 (for-each delete-file (find-files "." "\\.pyc$"))
10753 #t))))
10754 (build-system python-build-system)
10755 (arguments
10756 '(#:phases
10757 (modify-phases %standard-phases
10758 (replace 'check
10759 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
10760 (native-inputs
10761 `(;; For testing
10762 ("python-email-validator" ,python-email-validator)
10763 ("python-mock" ,python-mock)
10764 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10765 (propagated-inputs
10766 `(("python-dateutil" ,python-dateutil)
10767 ("python-six" ,python-six)))
10768 (home-page "https://github.com/joke2k/faker")
10769 (synopsis "Python package that generates fake data")
10770 (description
10771 "Faker is a Python package that generates fake data such as names,
10772 addresses, and phone numbers.")
10773 (license license:expat)
10774 (properties `((python2-variant . ,(delay python2-faker))))))
10775
10776 (define-public python2-faker
10777 (let ((base (package-with-python2 (strip-python2-variant
10778 python-faker))))
10779 (package
10780 (inherit base)
10781 (propagated-inputs
10782 `(("python2-ipaddress" ,python2-ipaddress)
10783 ,@(package-propagated-inputs base))))))
10784
10785 (define-public python-pyaml
10786 (package
10787 (name "python-pyaml")
10788 (version "18.11.0")
10789 (source (origin
10790 (method url-fetch)
10791 (uri (pypi-uri "pyaml" version))
10792 (sha256
10793 (base32
10794 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
10795 (build-system python-build-system)
10796 (native-inputs
10797 `(("python-unidecode" ,python-unidecode)))
10798 (propagated-inputs
10799 `(("python-pyyaml" ,python-pyyaml)))
10800 (home-page "https://github.com/mk-fg/pretty-yaml")
10801 (synopsis "YAML pretty-print library for Python")
10802 (description
10803 "pyaml is a PyYAML based python module to produce pretty and readable
10804 YAML-serialized data.")
10805 (license license:wtfpl2)))
10806
10807 (define-public python2-pyaml
10808 (package-with-python2 python-pyaml))
10809
10810 (define-public python-backpack
10811 (package
10812 (name "python-backpack")
10813 (version "0.1")
10814 (source
10815 (origin
10816 (method url-fetch)
10817 (uri (pypi-uri "backpack" version))
10818 (sha256
10819 (base32
10820 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10821 (build-system python-build-system)
10822 (native-inputs
10823 `(("python-pytest" ,python-pytest)
10824 ("python-nose" ,python-nose)))
10825 (propagated-inputs
10826 `(("python-simplejson" ,python-simplejson)))
10827 (home-page "https://github.com/sdispater/backpack")
10828 (synopsis "Utilities for working with Python collections")
10829 (description "Backpack provides some useful utilities for working with
10830 collections of data.")
10831 (license license:expat)))
10832
10833 (define-public python2-backpack
10834 (package-with-python2 python-backpack))
10835
10836 (define-public python-prompt-toolkit
10837 (package
10838 (name "python-prompt-toolkit")
10839 (version "2.0.7")
10840 (source
10841 (origin
10842 (method url-fetch)
10843 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10844 (sha256
10845 (base32
10846 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10847 (build-system python-build-system)
10848 (arguments
10849 `(#:phases
10850 (modify-phases %standard-phases
10851 (delete 'check)
10852 (add-after 'install 'post-install-check
10853 (lambda* (#:key inputs outputs #:allow-other-keys)
10854 ;; HOME is needed for the test
10855 ;; "test_pathcompleter_can_expanduser".
10856 (setenv "HOME" "/tmp")
10857 (add-installed-pythonpath inputs outputs)
10858 (invoke "py.test"))))))
10859 (propagated-inputs
10860 `(("python-wcwidth" ,python-wcwidth)
10861 ("python-six" ,python-six)
10862 ("python-pygments" ,python-pygments)))
10863 (native-inputs
10864 `(("python-pytest" ,python-pytest)))
10865 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10866 (synopsis "Library for building command line interfaces in Python")
10867 (description
10868 "Prompt-Toolkit is a library for building interactive command line
10869 interfaces in Python. It's like GNU Readline but it also features syntax
10870 highlighting while typing, out-of-the-box multi-line input editing, advanced
10871 code completion, incremental search, support for Chinese double-width
10872 characters, mouse support, and auto suggestions.")
10873 (license license:bsd-3)))
10874
10875 (define-public python2-prompt-toolkit
10876 (package-with-python2 python-prompt-toolkit))
10877
10878 (define-public python-prompt-toolkit-1
10879 (package (inherit python-prompt-toolkit)
10880 (version "1.0.15")
10881 (source
10882 (origin
10883 (method url-fetch)
10884 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10885 (sha256
10886 (base32
10887 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
10888
10889 (define-public python2-prompt-toolkit-1
10890 (package-with-python2 python-prompt-toolkit-1))
10891
10892 (define-public python-jedi
10893 (package
10894 (name "python-jedi")
10895 (version "0.15.1")
10896 (source
10897 (origin
10898 (method url-fetch)
10899 (uri (pypi-uri "jedi" version))
10900 (sha256
10901 (base32
10902 "0bp4pxhsynaarbvzblsn5x32lzp29svy3sxfy8i6m5iwz9s9r1ds"))))
10903 (build-system python-build-system)
10904 (arguments
10905 `(#:phases
10906 (modify-phases %standard-phases
10907 (add-after 'unpack 'disable-file-completion-test
10908 ;; A single parameterized test currently fail (see:
10909 ;; https://github.com/davidhalter/jedi/issues/1395). Remove it.
10910 (lambda _
10911 (substitute* "test/test_api/test_completion.py"
10912 ((".*'example.py', 'rb\"' \\+ join\\('\\.\\.'.*") ""))
10913 #t))
10914 (replace 'check
10915 (lambda _
10916 (setenv "HOME" "/tmp")
10917 (invoke "python" "-m" "pytest"))))))
10918 (native-inputs
10919 `(("python-pytest" ,python-pytest)
10920 ("python-docopt" ,python-docopt)))
10921 (propagated-inputs
10922 `(("python-parso" ,python-parso)))
10923 (home-page "https://github.com/davidhalter/jedi")
10924 (synopsis "Autocompletion and static analysis library for Python")
10925 (description
10926 "Jedi is a static analysis tool for Python that can be used in Integrated
10927 Development Environments (@dfn{IDE}s) and text editors. It understands Python
10928 on a deeper level than many other static analysis frameworks for Python.
10929
10930 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
10931 well.")
10932 (license license:expat)))
10933
10934 (define-public python2-jedi
10935 (package-with-python2 python-jedi))
10936
10937 (define-public ptpython
10938 (package
10939 (name "ptpython")
10940 (version "0.34")
10941 (source (origin
10942 (method url-fetch)
10943 (uri (pypi-uri "ptpython" version))
10944 (sha256
10945 (base32
10946 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10947 (build-system python-build-system)
10948 (arguments
10949 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
10950 (propagated-inputs
10951 `(("python-docopt" ,python-docopt)
10952 ("python-jedi" ,python-jedi)
10953 ("python-prompt-toolkit" ,python-prompt-toolkit)
10954 ("python-pygments" ,python-pygments)))
10955 (home-page "https://github.com/jonathanslenders/ptpython")
10956 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10957 (description
10958 "ptpython is a Python read-eval-print loop with IDE-like features.
10959 It supports syntax highlighting, multiline editing, autocompletion, mouse,
10960 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10961 etc.")
10962 (license license:bsd-3)
10963 (properties `((python2-variant . ,(delay ptpython-2))))))
10964
10965 (define-public ptpython-2
10966 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10967 (package
10968 (inherit base)
10969 (name "ptpython2"))))
10970
10971 (define-public python-stem
10972 (package
10973 (name "python-stem")
10974 (version "1.7.1")
10975 (source
10976 (origin
10977 (method url-fetch)
10978 (uri (pypi-uri "stem" version))
10979 (sha256
10980 (base32
10981 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
10982 (build-system python-build-system)
10983 (arguments
10984 `(#:phases
10985 (modify-phases %standard-phases
10986 (replace 'check
10987 (lambda _
10988 (invoke "./run_tests.py" "--unit")
10989 #t)))))
10990 (native-inputs
10991 `(("python-mock" ,python-mock)
10992 ("python-pycodestyle" ,python-pycodestyle)
10993 ("python-pyflakes" ,python-pyflakes)))
10994 (home-page "https://stem.torproject.org/")
10995 (synopsis
10996 "Python controller library that allows applications to interact with Tor")
10997 (description
10998 "Stem is a Python controller library for Tor. With it you can use Tor's
10999 control protocol to script against the Tor process and read descriptor data
11000 relays publish about themselves.")
11001 (license license:lgpl3)))
11002
11003 (define-public python2-stem
11004 (package-with-python2 python-stem))
11005
11006 (define-public python-pyserial
11007 (package
11008 (name "python-pyserial")
11009 (version "3.1.1")
11010 (source
11011 (origin
11012 (method url-fetch)
11013 (uri (pypi-uri "pyserial" version))
11014 (sha256
11015 (base32
11016 "0k1nfdrxxkdlv4zgaqsdv8li0pj3gbh2pyxw8q2bsg6f9490amyn"))))
11017 (build-system python-build-system)
11018 (arguments
11019 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
11020 ;; #:phases
11021 ;; (modify-phases %standard-phases
11022 ;; (replace 'check
11023 ;; (lambda _
11024 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
11025 (home-page
11026 "https://github.com/pyserial/pyserial")
11027 (synopsis "Python Serial Port Bindings")
11028 (description "@code{pyserial} provide serial port bindings for Python. It
11029 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11030 and/or Xon/Xoff. The port is accessed in RAW mode.")
11031 (license license:bsd-3)))
11032
11033 (define-public python2-pyserial
11034 (package-with-python2 python-pyserial))
11035
11036 (define-public python-kivy
11037 (package
11038 (name "python-kivy")
11039 (version "1.10.1")
11040 (source
11041 (origin
11042 (method url-fetch)
11043 (uri (pypi-uri "Kivy" version))
11044 (file-name (string-append name "-" version ".tar.gz"))
11045 (sha256
11046 (base32
11047 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
11048 (build-system python-build-system)
11049 (arguments
11050 `(#:tests? #f ; Tests require many optional packages
11051 #:phases
11052 (modify-phases %standard-phases
11053 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11054 (lambda* (#:key inputs #:allow-other-keys)
11055 (setenv "KIVY_SDL2_PATH"
11056 (string-append (assoc-ref inputs "sdl-union")
11057 "/include/SDL2"))
11058 #t)))))
11059 (native-inputs
11060 `(("git" ,git)
11061 ("pkg-config" ,pkg-config)
11062 ("python-cython" ,python-cython)))
11063 (inputs
11064 `(("gstreamer" ,gstreamer)
11065 ("mesa" ,mesa)
11066 ("sdl-union"
11067 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11068 (home-page "http://kivy.org")
11069 (synopsis
11070 "Multitouch application framework")
11071 (description
11072 "A software library for rapid development of
11073 hardware-accelerated multitouch applications.")
11074 (license license:expat)))
11075
11076 (define-public python2-kivy
11077 (package-with-python2 python-kivy))
11078
11079 (define-public python-kivy-next
11080 (deprecated-package "python-kivy-next" python-kivy))
11081
11082 (define-public python2-kivy-next
11083 (deprecated-package "python2-kivy-next" python2-kivy))
11084
11085 (define-public python-binaryornot
11086 (package
11087 (name "python-binaryornot")
11088 (version "0.4.4")
11089 (source (origin
11090 (method url-fetch)
11091 (uri (pypi-uri "binaryornot" version))
11092 (sha256
11093 (base32
11094 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
11095 (build-system python-build-system)
11096 (arguments
11097 `(#:phases
11098 (modify-phases %standard-phases
11099 (add-after 'unpack 'patch-tests
11100 (lambda _
11101 ;; TypeError: binary() got an unexpected keyword argument
11102 ;; 'average_size'.
11103 (substitute* "tests/test_check.py"
11104 (("average_size=512") ""))
11105 #t)))))
11106 (propagated-inputs
11107 `(("python-chardet" ,python-chardet)
11108 ("python-hypothesis" ,python-hypothesis)))
11109 (home-page "https://github.com/audreyr/binaryornot")
11110 (synopsis "Package to check if a file is binary or text")
11111 (description "Ultra-lightweight pure Python package to check if a file is
11112 binary or text.")
11113 (license license:bsd-3)
11114 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11115
11116 (define-public python2-binaryornot
11117 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11118 (package (inherit base)
11119 (propagated-inputs
11120 `(("python2-enum34" ,python2-enum34)
11121 ,@(package-propagated-inputs base))))))
11122
11123 (define-public python-binwalk
11124 (let ((commit "64201acfb5b0a9cdd9faa58c40a36dcff8612e29")
11125 (revision "0"))
11126 (package
11127 (name "python-binwalk")
11128 (version (git-version "2.1.1" revision commit))
11129 (source
11130 (origin
11131 (method git-fetch)
11132 (uri (git-reference
11133 (url "https://github.com/ReFirmLabs/binwalk")
11134 (commit commit)))
11135 (file-name (git-file-name name version))
11136 (sha256
11137 (base32
11138 "1z7ca6rfp887hw5jc3sb45mm4fa0xid4lsp2z8g4r590dr7k7w15"))))
11139 (build-system python-build-system)
11140 (arguments
11141 `(#:phases
11142 (modify-phases %standard-phases
11143 (add-before 'check 'set-pythonpath
11144 (lambda _
11145 (setenv "PYTHONPATH"
11146 (string-append
11147 (getcwd) "/src/"
11148 ":" (getenv "PYTHONPATH")))
11149 (setenv "HOME" "")
11150 #t)))))
11151 (native-inputs
11152 `(("python-coverage" ,python-coverage)
11153 ("python-nose" ,python-nose)))
11154 (home-page "https://github.com/ReFirmLabs/binwalk")
11155 (synopsis "Firmware analysis tool")
11156 (description "Binwalk is a tool for analyzing, reverse engineering, and extracting firmware images")
11157 (license license:expat))))
11158
11159 (define-public python-nltk
11160 (package
11161 (name "python-nltk")
11162 (version "3.2.1")
11163 (source (origin
11164 (method url-fetch)
11165 (uri (pypi-uri "nltk" version))
11166 (sha256
11167 (base32
11168 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11169 (build-system python-build-system)
11170 (arguments
11171 '(;; The tests require some extra resources to be downloaded.
11172 ;; TODO Try packaging these resources.
11173 #:tests? #f))
11174 (home-page "http://nltk.org/")
11175 (synopsis "Natural Language Toolkit")
11176 (description "It provides interfaces to over 50 corpora and lexical
11177 resources such as WordNet, along with a suite of text processing libraries
11178 for classification, tokenization, stemming, tagging, parsing, and semantic
11179 reasoning, wrappers for natural language processing libraries.")
11180 (license license:asl2.0)))
11181
11182 (define-public python2-nltk
11183 (package-with-python2 python-nltk))
11184
11185 (define-public python-pymongo
11186 (package
11187 (name "python-pymongo")
11188 (version "3.7.2")
11189 (source (origin
11190 (method url-fetch)
11191 (uri (pypi-uri "pymongo" version))
11192 (sha256
11193 (base32
11194 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
11195 (build-system python-build-system)
11196 (propagated-inputs
11197 `(("python-certifi" ,python-certifi)))
11198 (home-page "https://github.com/mongodb/mongo-python-driver")
11199 (synopsis "Python driver for MongoDB")
11200 (description "Python driver for MongoDB.")
11201 (license license:asl2.0)))
11202
11203 (define-public python2-pymongo
11204 (package-with-python2 python-pymongo))
11205
11206 (define-public python-consul
11207 (package
11208 (name "python-consul")
11209 (version "0.6.1")
11210 (source
11211 (origin
11212 (method url-fetch)
11213 (uri (pypi-uri "python-consul" version))
11214 (sha256
11215 (base32
11216 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11217 (build-system python-build-system)
11218 (arguments
11219 '(#:tests? #f)) ; The tests are not distributed
11220 (propagated-inputs
11221 `(("python-requests" ,python-requests)
11222 ("python-six" ,python-six)))
11223 (home-page "https://github.com/cablehead/python-consul")
11224 (synopsis "Python client for Consul")
11225 (description
11226 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11227 discovery, monitoring and configuration.")
11228 (license license:expat)))
11229
11230 (define-public python2-consul
11231 (package-with-python2 python-consul))
11232
11233 (define-public python-schematics
11234 (package
11235 (name "python-schematics")
11236 (version "1.1.1")
11237 (source
11238 (origin
11239 (method git-fetch)
11240 (uri (git-reference
11241 (url "https://github.com/schematics/schematics.git")
11242 (commit (string-append "v" version))))
11243 (file-name (git-file-name name version))
11244 (sha256
11245 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
11246 (build-system python-build-system)
11247 (propagated-inputs
11248 `(("python-six" ,python-six)))
11249 (arguments
11250 ;; The tests require a bunch of not very nice packages with fixed
11251 ;; version requirements (e.g. python-coveralls).
11252 `(#:tests? #f))
11253 (home-page "https://github.com/schematics/schematics")
11254 (synopsis "Python Data Structures for Humans")
11255 (description "Python Data Structures for Humans.")
11256 (license license:bsd-3)))
11257
11258 (define-public python2-schematics
11259 (package-with-python2 python-schematics))
11260
11261 (define-public python-odfpy
11262 (package
11263 (name "python-odfpy")
11264 (version "1.3.3")
11265 (source (origin
11266 (method url-fetch)
11267 (uri (pypi-uri "odfpy" version))
11268 (sha256
11269 (base32
11270 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11271 (arguments
11272 `(#:modules ((srfi srfi-1)
11273 (guix build python-build-system)
11274 (guix build utils))
11275 #:phases
11276 (modify-phases %standard-phases
11277 (replace 'check
11278 ;; The test runner invokes python2 and python3 for test*.py.
11279 ;; To avoid having both in inputs, we replicate it here.
11280 (lambda _
11281 (for-each (lambda (test-file) (invoke "python" test-file))
11282 (find-files "tests" "^test.*\\.py$"))
11283 #t)))))
11284 (build-system python-build-system)
11285 (home-page "https://github.com/eea/odfpy")
11286 (synopsis "Python API and tools to manipulate OpenDocument files")
11287 (description "Collection of libraries and utility programs written in
11288 Python to manipulate OpenDocument 1.2 files.")
11289 (license
11290 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11291 ;; number of files with other licenses.
11292 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11293
11294 (define-public python2-odfpy
11295 (package-with-python2 python-odfpy))
11296
11297 (define-public python-natsort
11298 (package
11299 (name "python-natsort")
11300 (version "5.4.1")
11301 (source (origin
11302 (method url-fetch)
11303 (uri (pypi-uri "natsort" version))
11304 (sha256
11305 (base32
11306 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
11307 (build-system python-build-system)
11308 (arguments
11309 `(#:modules ((guix build utils)
11310 (guix build python-build-system)
11311 (srfi srfi-1)
11312 (srfi srfi-26)
11313 (ice-9 ftw))
11314 #:phases
11315 (modify-phases %standard-phases
11316 (add-before 'check 'set-cachedir
11317 ;; Tests require write access to $HOME by default
11318 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
11319 (replace 'check
11320 (lambda _
11321 (let ((cwd (getcwd)))
11322 (setenv "PYTHONPATH"
11323 (string-append
11324 cwd "/build/"
11325 (find (cut string-prefix? "lib" <>)
11326 (scandir (string-append cwd "/build")))
11327 ":"
11328 (getenv "PYTHONPATH")))
11329 (invoke "pytest" "-v")))))))
11330 (native-inputs
11331 `(("python-hypothesis" ,python-hypothesis)
11332 ("python-pytest-cov" ,python-pytest-cov)
11333 ("python-pytest-mock" ,python-pytest-mock)
11334 ("python-pytest" ,python-pytest)))
11335 (propagated-inputs ; TODO: Add python-fastnumbers.
11336 `(("python-pyicu" ,python-pyicu)))
11337 (home-page "https://github.com/SethMMorton/natsort")
11338 (synopsis "Natural sorting for python and shell")
11339 (description
11340 "Natsort lets you apply natural sorting on lists instead of
11341 lexicographical. If you use the built-in @code{sorted} method in python
11342 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
11343 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
11344 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
11345 identifies numbers and sorts them separately from strings. It can also sort
11346 version numbers, real numbers, mixed types and more, and comes with a shell
11347 command @command{natsort} that exposes this functionality in the command line.")
11348 (license license:expat)
11349 (properties `((python2-variant . ,(delay python2-natsort))))))
11350
11351 (define-public python2-natsort
11352 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11353 (package (inherit base)
11354 (native-inputs
11355 `(("python2-pathlib" ,python2-pathlib)
11356 ,@(package-native-inputs base))))))
11357
11358 (define-public python-glances
11359 (package
11360 (name "python-glances")
11361 (version "3.1.1")
11362 (source
11363 (origin
11364 (method url-fetch)
11365 (uri (pypi-uri "Glances" version))
11366 (sha256
11367 (base32
11368 "07j1ggzsqiskyz1i4mrnyr9i95v0dqi0i0hibnv1l188km8shmi8"))
11369 (modules '((guix build utils)))
11370 (snippet
11371 '(begin
11372 ;; Glances phones PyPI for weekly update checks by default.
11373 ;; Disable these. The user can re-enable them if desired.
11374 (substitute* "glances/outdated.py"
11375 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
11376 (string-append indentation
11377 "self.args.disable_check_update = True\n"
11378 line)))
11379 #t))))
11380 (build-system python-build-system)
11381 (propagated-inputs
11382 `(("python-future" ,python-future)
11383 ("python-psutil" ,python-psutil)))
11384 (home-page
11385 "https://github.com/nicolargo/glances")
11386 (synopsis "Cross-platform curses-based monitoring tool")
11387 (description
11388 "Glances is a curses-based monitoring tool for a wide variety of platforms.
11389 Glances uses the PsUtil library to get information from your system. It
11390 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
11391 (license license:lgpl3+)))
11392
11393 (define-public python2-glances
11394 (package-with-python2 python-glances))
11395
11396 (define-public python-graphql-core
11397 (package
11398 (name "python-graphql-core")
11399 (version "0.5.3")
11400 (source
11401 (origin
11402 (method url-fetch)
11403 (uri (pypi-uri "graphql-core" version))
11404 (sha256
11405 (base32
11406 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11407 (build-system python-build-system)
11408 (arguments
11409 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11410 #:phases
11411 (modify-phases %standard-phases
11412 (add-after 'unpack 'patch-hardcoded-version
11413 (lambda _ (substitute*
11414 "setup.py"
11415 (("'gevent==1.1rc1'") "'gevent'"))
11416 #t)))))
11417 (native-inputs
11418 `(("python-gevent" ,python-gevent)
11419 ("python-mock" ,python-mock)
11420 ("python-pytest-mock" ,python-pytest-mock)))
11421 (propagated-inputs
11422 `(("python-promise" ,python-promise)
11423 ("python-six" ,python-six)))
11424 (home-page "https://github.com/graphql-python/graphql-core")
11425 (synopsis "GraphQL implementation for Python")
11426 (description
11427 "GraphQL implementation for Python. GraphQL is a data query language and
11428 runtime designed and used to request and deliver data to mobile and web apps.
11429 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11430 to Python.")
11431 (license license:expat)))
11432
11433 (define-public python2-graphql-core
11434 (package-with-python2 python-graphql-core))
11435
11436 (define-public python-graphql-relay
11437 (package
11438 (name "python-graphql-relay")
11439 (version "0.4.5")
11440 (source
11441 (origin
11442 (method url-fetch)
11443 (uri (pypi-uri "graphql-relay" version))
11444 (sha256
11445 (base32
11446 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
11447 (build-system python-build-system)
11448 (arguments
11449 '(#:tests? #f)) ; The tests are not distributed
11450 (propagated-inputs
11451 `(("python-graphql-core" ,python-graphql-core)
11452 ("python-promise" ,python-promise)
11453 ("python-six" ,python-six)))
11454 (home-page "https://github.com/graphql-python/graphql-relay-py")
11455 (synopsis "Relay implementation for Python")
11456 (description
11457 "This is a library to allow the easy creation of Relay-compliant servers
11458 using the GraphQL Python reference implementation of a GraphQL server. It
11459 should be noted that the code is a exact port of the original
11460 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11461 from Facebook.")
11462 (license license:expat)))
11463
11464 (define-public python2-graphql-relay
11465 (package-with-python2 python-graphql-relay))
11466
11467 (define-public python-graphene
11468 (package
11469 (name "python-graphene")
11470 (version "0.10.2")
11471 (source
11472 (origin
11473 (method url-fetch)
11474 (uri (pypi-uri "graphene" version))
11475 (sha256
11476 (base32
11477 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11478 (build-system python-build-system)
11479 (propagated-inputs
11480 `(("python-graphql-core" ,python-graphql-core)
11481 ("python-graphql-relay" ,python-graphql-relay)
11482 ("python-iso8601" ,python-iso8601)
11483 ("python-promise" ,python-promise)
11484 ("python-six" ,python-six)))
11485 (arguments
11486 `(#:tests? #f)) ; no tests/ in the PyPI tarball
11487 (home-page "http://graphene-python.org/")
11488 (synopsis "GraphQL Framework for Python")
11489 (description
11490 "Graphene is a Python library for building GraphQL schemas/types.
11491 A GraphQL schema describes your data model, and provides a GraphQL server
11492 with an associated set of resolve methods that know how to fetch data.")
11493 (properties `((python2-variant . ,(delay python2-graphene))))
11494 (license license:expat)))
11495
11496 (define-public python2-graphene
11497 (let ((base (package-with-python2
11498 (strip-python2-variant python-graphene))))
11499 (package (inherit base)
11500 (native-inputs
11501 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11502 ,@(package-native-inputs base))))))
11503
11504 (define-public python-nautilus
11505 (package
11506 (name "python-nautilus")
11507 (version "0.4.9")
11508 (source
11509 (origin
11510 (method url-fetch)
11511 (uri (pypi-uri "nautilus" version))
11512 (sha256
11513 (base32
11514 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11515 (build-system python-build-system)
11516 (arguments `(#:tests? #f)) ; fails to import test modules
11517 (propagated-inputs
11518 `(("python-bcrypt" ,python-bcrypt)
11519 ("python-click" ,python-click)
11520 ("python-consul" ,python-consul)
11521 ("python-graphene" ,python-graphene)
11522 ("python-jinja2" ,python-jinja2)
11523 ("python-peewee" ,python-peewee)
11524 ("python-pika" ,python-pika)
11525 ("python-tornado" ,python-tornado)
11526 ("python-wtforms" ,python-wtforms)))
11527 (native-inputs
11528 `(("python-nose2" ,python-nose2)))
11529 (home-page "https://github.com/AlecAivazis/nautilus")
11530 (synopsis "Library for creating microservice applications")
11531 (description
11532 "Nautilus is a framework for flux based microservices that looks to
11533 provide extendible implementations of common aspects of a cloud so that you can
11534 focus on building massively scalable web applications.")
11535 (license license:expat)))
11536
11537 (define-public python-snowballstemmer
11538 (package
11539 (name "python-snowballstemmer")
11540 (version "1.2.1")
11541 (source (origin
11542 (method url-fetch)
11543 (uri (pypi-uri "snowballstemmer" version))
11544 (sha256
11545 (base32
11546 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11547 (build-system python-build-system)
11548 (arguments
11549 `(;; No tests exist
11550 #:tests? #f))
11551 (home-page "https://github.com/shibukawa/snowball_py")
11552 (synopsis "Snowball stemming library collection for Python")
11553 (description "This package provides 16 word stemmer algorithms generated
11554 from Snowball algorithms. It includes the 15 original ones plus the Poerter
11555 English stemmer.")
11556 (license license:bsd-3)))
11557
11558 (define-public python2-snowballstemmer
11559 (package-with-python2 python-snowballstemmer))
11560
11561 (define-public python-setproctitle
11562 (package
11563 (name "python-setproctitle")
11564 (version "1.1.10")
11565 (source
11566 (origin
11567 (method url-fetch)
11568 (uri (pypi-uri "setproctitle" version))
11569 (sha256
11570 (base32
11571 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11572 (build-system python-build-system)
11573 (arguments
11574 '(#:phases
11575 (modify-phases %standard-phases
11576 (add-before 'check 'patch-Makefile
11577 ;; Stricly this is only required for the python2 variant.
11578 ;; But adding a phase in an inherited package seems to be
11579 ;; cumbersum. So we patch even for python3.
11580 (lambda _
11581 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11582 (when nose
11583 (substitute* "Makefile"
11584 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11585 (string-append nose "/bin/nosetests "))))
11586 #t)))
11587 (replace 'check
11588 (lambda _
11589 (setenv "PYTHON" (or (which "python3") (which "python")))
11590 (setenv "PYCONFIG" (or (which "python3-config")
11591 (which "python-config")))
11592 (setenv "CC" "gcc")
11593 ;; No need to extend PYTHONPATH to find the built package, since
11594 ;; the Makefile will build anyway
11595 (invoke "make" "check"))))))
11596 (native-inputs
11597 `(("procps" ,procps))) ; required for tests
11598 (home-page
11599 "https://github.com/dvarrazzo/py-setproctitle")
11600 (synopsis
11601 "Setproctitle implementation for Python to customize the process title")
11602 (description "The library allows a process to change its title (as displayed
11603 by system tools such as ps and top).
11604
11605 Changing the title is mostly useful in multi-process systems, for
11606 example when a master process is forked: changing the children's title
11607 allows to identify the task each process is busy with. The technique
11608 is used by PostgreSQL and the OpenSSH Server for example.")
11609 (license license:bsd-3)
11610 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11611
11612 (define-public python2-setproctitle
11613 (let ((base (package-with-python2
11614 (strip-python2-variant python-setproctitle))))
11615 (package
11616 (inherit base)
11617 (native-inputs `(("python2-nose" ,python2-nose)
11618 ,@(package-native-inputs base))))))
11619
11620 (define-public python-validictory
11621 (package
11622 (name "python-validictory")
11623 (version "1.0.1")
11624 (source
11625 (origin
11626 (method url-fetch)
11627 (uri (pypi-uri "validictory" version))
11628 (sha256
11629 (base32
11630 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11631 (build-system python-build-system)
11632 (arguments
11633 '(#:phases
11634 (modify-phases %standard-phases
11635 (add-after 'unpack 'bootstrap
11636 ;; Move the tests out of the package directory to avoid
11637 ;; packaging them.
11638 (lambda* _
11639 (rename-file "validictory/tests" "tests")
11640 (delete-file "tests/__init__.py")))
11641 (replace 'check
11642 (lambda _
11643 ;; Extend PYTHONPATH so the built package will be found.
11644 (setenv "PYTHONPATH"
11645 (string-append (getcwd) "/build/lib:"
11646 (getenv "PYTHONPATH")))
11647 (invoke "py.test" "-vv" ))))))
11648 (native-inputs
11649 `(("python-pytest" ,python-pytest)))
11650 (home-page
11651 "https://github.com/jamesturk/validictory")
11652 (synopsis "General purpose Python data validator")
11653 (description "It allows validation of arbitrary Python data structures.
11654
11655 The schema format is based on the JSON Schema
11656 proposal (http://json-schema.org), so combined with json the library is also
11657 useful as a validator for JSON data.")
11658 (license license:expat)))
11659
11660 (define-public python2-validictory
11661 (package-with-python2 python-validictory))
11662
11663 (define-public python-pyelftools
11664 (package
11665 (name "python-pyelftools")
11666 (version "0.25")
11667 (source
11668 (origin
11669 (method url-fetch)
11670 (uri (pypi-uri "pyelftools" version))
11671 (sha256
11672 (base32
11673 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11674 (build-system python-build-system)
11675 (arguments
11676 `(#:phases
11677 (modify-phases %standard-phases
11678 (add-before 'check 'set-pythonpath
11679 (lambda _
11680 (setenv "PYTHONPATH"
11681 (string-append
11682 (getcwd) "/test/"
11683 ":" (getenv "PYTHONPATH")))
11684 #t)))))
11685 (home-page
11686 "https://github.com/eliben/pyelftools")
11687 (synopsis
11688 "Analyze binary and library file information")
11689 (description "This Python library provides interfaces for parsing and
11690 analyzing two binary and library file formats; the Executable and Linking
11691 Format (ELF), and debugging information in the Debugging With Attributed
11692 Record Format (DWARF).")
11693 (license license:public-domain)))
11694
11695 (define-public python-pyev
11696 (package
11697 (name "python-pyev")
11698 (version "0.9.0")
11699 (source
11700 (origin
11701 (method url-fetch)
11702 (uri (pypi-uri "pyev" version))
11703 (sha256
11704 (base32
11705 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11706 (build-system python-build-system)
11707 (arguments
11708 `(#:tests? #f ; no test suite
11709 #:phases
11710 (modify-phases %standard-phases
11711 (add-after 'unpack 'patch
11712 (lambda* (#:key inputs #:allow-other-keys)
11713 (let ((libev (string-append (assoc-ref inputs "libev")
11714 "/lib/libev.so.4")))
11715 (substitute* "setup.py"
11716 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11717 (string-append "libev_dll_name = \"" libev "\"")))))))))
11718 (inputs
11719 `(("libev" ,libev)))
11720 (home-page "http://pythonhosted.org/pyev/")
11721 (synopsis "Python libev interface")
11722 (description "Pyev provides a Python interface to libev.")
11723 (license license:gpl3)))
11724
11725 (define-public python2-pyev
11726 (package-with-python2 python-pyev))
11727
11728 (define-public python-imagesize
11729 (package
11730 (name "python-imagesize")
11731 (version "1.1.0")
11732 (source
11733 (origin
11734 (method url-fetch)
11735 (uri (pypi-uri "imagesize" version))
11736 (sha256
11737 (base32
11738 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11739 (build-system python-build-system)
11740 (home-page "https://github.com/shibukawa/imagesize_py")
11741 (synopsis "Gets image size of files in various formats in Python")
11742 (description
11743 "This package allows determination of image size from
11744 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11745 (license license:expat)))
11746
11747 (define-public python2-imagesize
11748 (package-with-python2 python-imagesize))
11749
11750 (define-public python-termstyle
11751 (package
11752 (name "python-termstyle")
11753 (version "0.1.11")
11754 (source
11755 (origin
11756 (method url-fetch)
11757 (uri (pypi-uri "termstyle" version))
11758 (sha256
11759 (base32
11760 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11761 (build-system python-build-system)
11762 (arguments
11763 '(#:phases
11764 (modify-phases %standard-phases
11765 (replace 'check
11766 (lambda _
11767 (invoke "python" "test3.py"))))))
11768 (home-page "https://github.com/gfxmonk/termstyle")
11769 (synopsis "Console text coloring for Python")
11770 (description "This package provides console text coloring for Python.")
11771 (license license:bsd-3)))
11772
11773 (define-public python-argcomplete
11774 (package
11775 (name "python-argcomplete")
11776 (version "1.10.3")
11777 (source
11778 (origin
11779 (method url-fetch)
11780 (uri (pypi-uri "argcomplete" version))
11781 (sha256
11782 (base32
11783 "02jkc44drb0yjz6x28lvg6rj607n8r2irdpdvyylm8xnycn54zx3"))))
11784 (build-system python-build-system)
11785 (arguments
11786 `(#:phases
11787 (modify-phases %standard-phases
11788 (add-after 'unpack 'embed-tool-references
11789 (lambda _
11790 (substitute* "argcomplete/bash_completion.d/python-argcomplete.sh"
11791 ((" grep")
11792 (string-append " " (which "grep")))
11793 ((" egrep")
11794 (string-append " " (which "egrep")))
11795 (("elif which")
11796 (string-append "elif " (which "which")))
11797 (("\\$\\(which")
11798 (string-append "$(" (which "which"))))
11799 #t)))))
11800 (inputs
11801 `(("grep" ,grep)
11802 ("which" ,which)))
11803 (native-inputs
11804 `(("python-coverage" ,python-coverage)
11805 ("python-flake8" ,python-flake8)
11806 ("python-pexpect" ,python-pexpect)
11807 ("python-wheel" ,python-wheel)
11808 ("tcsh" ,tcsh)
11809 ("fish" ,fish)
11810 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
11811 (home-page "https://github.com/kislyuk/argcomplete")
11812 (synopsis "Shell tab completion for Python argparse")
11813 (description "argcomplete provides extensible command line tab completion
11814 of arguments and options for Python scripts using @code{argparse}. It's
11815 particularly useful for programs with many options or sub-parsers that can
11816 dynamically suggest completions; for example, when browsing resources over the
11817 network.")
11818 (license license:asl2.0)))
11819
11820 (define-public python2-argcomplete
11821 (package-with-python2 python-argcomplete))
11822
11823 (define-public python-xopen
11824 (package
11825 (name "python-xopen")
11826 (version "0.5.0")
11827 (source
11828 (origin
11829 (method url-fetch)
11830 (uri (pypi-uri "xopen" version))
11831 (sha256
11832 (base32
11833 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
11834 (build-system python-build-system)
11835 (propagated-inputs
11836 `(("python-setuptools-scm" ,python-setuptools-scm)))
11837 (home-page "https://github.com/marcelm/xopen/")
11838 (synopsis "Open compressed files transparently")
11839 (description "This module provides an @code{xopen} function that works like
11840 Python's built-in @code{open} function, but can also deal with compressed files.
11841 Supported compression formats are gzip, bzip2 and, xz, and are automatically
11842 recognized by their file extensions. The focus is on being as efficient as
11843 possible on all supported Python versions.")
11844 (license license:expat)))
11845
11846 (define-public python2-xopen
11847 (let ((base (package-with-python2
11848 (strip-python2-variant python-xopen))))
11849 (package
11850 (inherit base)
11851 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
11852 ,@(package-propagated-inputs base))))))
11853
11854 (define-public python-cheetah
11855 (package
11856 (name "python-cheetah")
11857 (version "3.1.0")
11858 (source
11859 (origin
11860 (method url-fetch)
11861 (uri (pypi-uri "Cheetah3" version))
11862 (sha256
11863 (base32
11864 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
11865 (build-system python-build-system)
11866 (arguments
11867 `(#:modules ((guix build utils)
11868 (guix build python-build-system)
11869 (ice-9 ftw)
11870 (srfi srfi-1)
11871 (srfi srfi-26))
11872 #:phases (modify-phases %standard-phases
11873 (add-after 'unpack 'use-absolute-python
11874 (lambda _
11875 (substitute* "Cheetah/CheetahWrapper.py"
11876 (("#!/usr/bin/env python")
11877 (string-append "#!" (which "python"))))
11878 #t))
11879 (replace 'check
11880 (lambda _
11881 (let ((cwd (getcwd)))
11882 (setenv "PYTHONPATH"
11883 (string-append
11884 cwd "/build/"
11885 (find (cut string-prefix? "lib" <>)
11886 (scandir (string-append cwd "/build")))
11887 ":" (getenv "PYTHONPATH")))
11888 (setenv "PATH"
11889 (string-append (getenv "PATH")
11890 ":" cwd "/bin"))
11891 (setenv "TMPDIR" "/tmp")
11892
11893 (substitute* "Cheetah/Tests/Test.py"
11894 (("unittest.TextTestRunner\\(\\)")
11895 "unittest.TextTestRunner(verbosity=2)"))
11896
11897 (invoke "python" "Cheetah/Tests/Test.py")))))))
11898 (propagated-inputs
11899 `(("python-markdown" ,python-markdown))) ;optional
11900 (home-page "http://cheetahtemplate.org/")
11901 (synopsis "Template engine")
11902 (description "Cheetah is a text-based template engine and Python code
11903 generator.
11904
11905 Cheetah can be used as a standalone templating utility or referenced as
11906 a library from other Python applications. It has many potential uses,
11907 but web developers looking for a viable alternative to ASP, JSP, PHP and
11908 PSP are expected to be its principle user group.
11909
11910 Features:
11911 @enumerate
11912 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
11913 text-based format.
11914 @item Cleanly separates content, graphic design, and program code.
11915 @item Blends the power and flexibility of Python with a simple template language
11916 that non-programmers can understand.
11917 @item Gives template writers full access to any Python data structure, module,
11918 function, object, or method in their templates.
11919 @item Makes code reuse easy by providing an object-orientated interface to
11920 templates that is accessible from Python code or other Cheetah templates.
11921 One template can subclass another and selectively reimplement sections of it.
11922 @item Provides a simple, yet powerful, caching mechanism that can dramatically
11923 improve the performance of a dynamic website.
11924 @item Compiles templates into optimized, yet readable, Python code.
11925 @end enumerate")
11926 (license (license:x11-style "file://LICENSE"))))
11927
11928 (define-public python2-cheetah
11929 (package-with-python2 python-cheetah))
11930
11931 (define-public python-dulwich
11932 (package
11933 (name "python-dulwich")
11934 (version "0.18.6")
11935 (source
11936 (origin
11937 (method url-fetch)
11938 (uri (list (string-append "https://www.dulwich.io/releases/"
11939 "dulwich-" version ".tar.gz")
11940 (pypi-uri "dulwich" version)))
11941 (sha256
11942 (base32
11943 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
11944 (build-system python-build-system)
11945 (arguments
11946 `(#:phases
11947 (modify-phases %standard-phases
11948 (add-before 'check 'fix-tests
11949 (lambda* (#:key inputs #:allow-other-keys)
11950 ;; The tests use Popen with a custom environment which doesn't
11951 ;; include PATH.
11952 (substitute* "dulwich/tests/compat/utils.py"
11953 (("'git'") (string-append "'"
11954 (which "git")
11955 "'")))
11956 (substitute* '("dulwich/tests/test_repository.py"
11957 "dulwich/tests/test_hooks.py")
11958 (("#!/bin/sh") (string-append "#!" (which "sh"))))
11959 (setenv "TEST_RUNNER" "unittest")
11960 (setenv "PYTHONHASHSEED" "random")
11961 #t)))))
11962 (propagated-inputs
11963 `(("python-fastimport" ,python-fastimport)))
11964 (native-inputs
11965 `(("python-mock" ,python-mock)
11966 ("python-geventhttpclient" ,python-geventhttpclient)
11967 ("git" ,git)))
11968 (home-page "https://www.dulwich.io/")
11969 (synopsis "Git implementation in Python")
11970 (description "Dulwich is an implementation of the Git file formats and
11971 protocols written in pure Python.")
11972 ;; Can be used with either license.
11973 (license (list license:asl2.0 license:gpl2+))))
11974
11975 (define-public python2-dulwich
11976 (package-with-python2 python-dulwich))
11977
11978 (define-public python-pbkdf2
11979 (package
11980 (name "python-pbkdf2")
11981 (version "1.3")
11982 (source
11983 (origin
11984 (method url-fetch)
11985 (uri (pypi-uri "pbkdf2" version))
11986 (sha256
11987 (base32
11988 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
11989 (build-system python-build-system)
11990 (arguments
11991 '(#:phases
11992 (modify-phases %standard-phases
11993 (replace 'check
11994 (lambda _
11995 (setenv "PYTHONPATH"
11996 (string-append (getcwd) "/build/lib:"
11997 (getenv "PYTHONPATH")))
11998 (invoke "python" "test/test_pbkdf2.py"))))))
11999 (propagated-inputs
12000 `(("python-pycrypto" ,python-pycrypto))) ; optional
12001 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
12002 (synopsis "Password-based key derivation")
12003 (description "This module implements the password-based key derivation
12004 function, PBKDF2, specified in RSA PKCS#5 v2.0.
12005
12006 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
12007 is part of the RSA Public Key Cryptography Standards series. The provided
12008 implementation takes a password or a passphrase and a salt value (and
12009 optionally a iteration count, a digest module, and a MAC module) and provides
12010 a file-like object from which an arbitrarly-sized key can be read.")
12011 (license license:expat)))
12012
12013 (define-public python2-pbkdf2
12014 (package-with-python2 python-pbkdf2))
12015
12016 (define-public python-qrcode
12017 (package
12018 (name "python-qrcode")
12019 (version "6.1")
12020 (source
12021 (origin
12022 (method url-fetch)
12023 (uri (pypi-uri "qrcode" version))
12024 (sha256
12025 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
12026 (build-system python-build-system)
12027 (arguments
12028 ;; FIXME: Tests require packaging 'pymaging'.
12029 '(#:tests? #f))
12030 (propagated-inputs
12031 `(("python-lxml" ,python-lxml) ; for SVG output
12032 ("python-pillow" ,python-pillow) ; for PNG output
12033 ("python-six" ,python-six)))
12034 (home-page "https://github.com/lincolnloop/python-qrcode")
12035 (synopsis "QR Code image generator")
12036 (description "This package provides a pure Python QR Code generator
12037 module. It uses the Python Imaging Library (PIL) to allow for the generation
12038 of QR Codes.
12039
12040 In addition this package provides a command line tool to generate QR codes and
12041 either write these QR codes to a file or do the output as ascii art at the
12042 console.")
12043 (license license:bsd-3)))
12044
12045 (define-public python2-qrcode
12046 (package-with-python2 python-qrcode))
12047
12048 (define-public python-rst2ansi
12049 (package
12050 (name "python-rst2ansi")
12051 (version "0.1.5")
12052 (source
12053 (origin
12054 (method url-fetch)
12055 (uri (pypi-uri "rst2ansi" version))
12056 (sha256
12057 (base32
12058 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
12059 (build-system python-build-system)
12060 (propagated-inputs
12061 `(("python-docutils" ,python-docutils)))
12062 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
12063 (synopsis "Convert RST to ANSI-decorated console output")
12064 (description
12065 "Python module dedicated to rendering RST (reStructuredText) documents
12066 to ansi-escaped strings suitable for display in a terminal.")
12067 (license license:expat)))
12068
12069 (define-public python-ansi2html
12070 (package
12071 (name "python-ansi2html")
12072 (version "1.2.0")
12073 (source
12074 (origin
12075 (method url-fetch)
12076 (uri (pypi-uri "ansi2html" version))
12077 (sha256
12078 (base32
12079 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
12080 (build-system python-build-system)
12081 (native-inputs
12082 `(("python-mock" ,python-mock)
12083 ("python-nose" ,python-nose)))
12084 (propagated-inputs
12085 `(("python-six" ,python-six)))
12086 (home-page "https://github.com/ralphbean/ansi2html")
12087 (synopsis "Convert ANSI-decorated console output to HTML")
12088 (description
12089 "@command{ansi2html} is a Python library and command line utility for
12090 convering text with ANSI color codes to HTML or LaTeX.")
12091 (license license:gpl3+)))
12092
12093 (define-public python2-ansi2html
12094 (package-with-python2 python-ansi2html))
12095
12096 (define-public python-ddt
12097 (package
12098 (name "python-ddt")
12099 (version "1.1.3")
12100 (source
12101 (origin
12102 (method url-fetch)
12103 (uri (pypi-uri "ddt" version))
12104 (sha256
12105 (base32
12106 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
12107 (build-system python-build-system)
12108 (native-inputs
12109 `(("python-mock" ,python-mock)
12110 ("python-nose" ,python-nose)))
12111 (propagated-inputs
12112 `(("python-six" ,python-six)
12113 ("python-pyyaml" ,python-pyyaml)))
12114 (home-page "https://github.com/txels/ddt")
12115 (synopsis "Data-Driven Tests")
12116 (description
12117 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
12118 running it with different test data, and make it appear as multiple test
12119 cases.")
12120 (license license:expat)))
12121
12122 (define-public python2-ddt
12123 (package-with-python2 python-ddt))
12124
12125 (define-public python-pycountry
12126 (package
12127 (name "python-pycountry")
12128 (version "18.5.26")
12129 (source
12130 (origin
12131 (method url-fetch)
12132 (uri (pypi-uri "pycountry" version))
12133 (sha256
12134 (base32
12135 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
12136 (build-system python-build-system)
12137 (home-page "https://bitbucket.org/flyingcircus/pycountry")
12138 (synopsis "ISO databases for languages, countries, currencies, etc.")
12139 (description
12140 "@code{pycountry} provides the ISO databases for the standards:
12141 @enumerate
12142 @item 639-3 (Languages)
12143 @item 3166 (Countries)
12144 @item 3166-3 (Deleted Countries)
12145 @item 3166-2 (Subdivisions of countries)
12146 @item 4217 (Currencies)
12147 @item 15924 (Scripts)
12148 @end enumerate
12149 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
12150 through a Python API.")
12151 (license license:lgpl2.1+)))
12152
12153 (define-public python2-pycountry
12154 (package-with-python2 python-pycountry))
12155
12156 (define-public python-pycosat
12157 (package
12158 (name "python-pycosat")
12159 (version "0.6.1")
12160 (source
12161 (origin
12162 (method url-fetch)
12163 (uri (pypi-uri "pycosat" version))
12164 (sha256
12165 (base32
12166 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
12167 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
12168 (build-system python-build-system)
12169 (home-page "https://github.com/ContinuumIO/pycosat")
12170 (synopsis "Bindings to picosat (a SAT solver)")
12171 (description
12172 "This package provides efficient Python bindings to @code{picosat} on
12173 the C level. When importing pycosat, the @code{picosat} solver becomes part
12174 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
12175 Problem} (SAT) solver.")
12176 (license license:expat)))
12177
12178 (define-public python2-pycosat
12179 (package-with-python2 python-pycosat))
12180
12181 (define-public python2-ruamel.ordereddict
12182 (package
12183 (name "python2-ruamel.ordereddict")
12184 (version "0.4.9")
12185 (source
12186 (origin
12187 (method url-fetch)
12188 (uri (pypi-uri "ruamel.ordereddict" version))
12189 (sha256
12190 (base32
12191 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
12192 (build-system python-build-system)
12193 (arguments
12194 `(#:python ,python-2
12195 #:phases
12196 (modify-phases %standard-phases
12197 (delete 'check)
12198 (add-after 'install 'check
12199 (lambda* (#:key inputs outputs #:allow-other-keys)
12200 (add-installed-pythonpath inputs outputs)
12201 (invoke "python" "test/testordereddict.py"))))))
12202 (home-page "https://bitbucket.org/ruamel/ordereddict")
12203 (synopsis "Version of dict that keeps keys in insertion order")
12204 (description
12205 "This is an implementation of an ordered dictionary with @dfn{Key
12206 Insertion Order} (KIO: updates of values do not affect the position of the
12207 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
12208 removed and put at the back). The standard library module @code{OrderedDict},
12209 implemented later, implements a subset of @code{ordereddict} functionality.
12210 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
12211 Order} (KSO, no sorting function can be specified, but a transform can be
12212 specified to apply on the key before comparison (e.g. @code{string.lower})).")
12213 (license license:expat)))
12214
12215 (define-public python-pypeg2
12216 (package
12217 (name "python-pypeg2")
12218 (version "2.15.2")
12219 (source
12220 (origin
12221 (method url-fetch)
12222 (uri (pypi-uri "pyPEG2" version))
12223 (sha256
12224 (base32
12225 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
12226 (build-system python-build-system)
12227 (propagated-inputs `(("python-lxml" ,python-lxml)))
12228 (arguments
12229 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
12230 '(#:tests? #f))
12231 (home-page "https://fdik.org/pyPEG/")
12232 (synopsis "Parsering Expression Grammars in Python")
12233 (description "PyPEG is an intrinsic parser interpreter framework for
12234 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
12235 parse many formal languages.")
12236 (license license:gpl2)))
12237
12238 (define-public python-incremental
12239 (package
12240 (name "python-incremental")
12241 (version "17.5.0")
12242 (source
12243 (origin
12244 (method url-fetch)
12245 (uri (pypi-uri "incremental" version))
12246 (sha256
12247 (base32
12248 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
12249 (build-system python-build-system)
12250 (home-page "https://github.com/hawkowl/incremental")
12251 (synopsis "Library for versioning Python projects")
12252 (description "Incremental is a small library that versions your Python
12253 projects.")
12254 (license license:expat)))
12255
12256 (define-public python2-incremental
12257 (package-with-python2 python-incremental))
12258
12259 (define-public python-invoke
12260 (package
12261 (name "python-invoke")
12262 (home-page "http://www.pyinvoke.org/")
12263 (version "1.3.0")
12264 (source (origin
12265 (method url-fetch)
12266 (uri (pypi-uri "invoke" version))
12267 (sha256
12268 (base32
12269 "1nn7gad0rvy492acpyhkrp01zsk86acf34qhsvq4xmm6x39788n5"))))
12270 (build-system python-build-system)
12271 (arguments
12272 ;; XXX: Requires many dependencies that are not yet in Guix.
12273 `(#:tests? #f))
12274 (synopsis "Pythonic task execution")
12275 (description
12276 "Invoke is a Python task execution tool and library, drawing inspiration
12277 from various sources to arrive at a powerful and clean feature set. It is
12278 evolved from the Fabric project, but focuses on local and abstract concerns
12279 instead of servers and network commands.")
12280 (license license:bsd-3)))
12281
12282 (define-public python2-invoke
12283 (package-with-python2 python-invoke))
12284
12285 (define-public python-automat
12286 (package
12287 (name "python-automat")
12288 (version "0.7.0")
12289 (source (origin
12290 (method url-fetch)
12291 (uri (pypi-uri "Automat" version))
12292 (sha256
12293 (base32
12294 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
12295 (build-system python-build-system)
12296 ;; We disable the tests because they require python-twisted, while
12297 ;; python-twisted depends on python-automat. Twisted is optional, but the
12298 ;; tests fail if it is not available. Also see
12299 ;; <https://github.com/glyph/automat/issues/71>.
12300 (arguments '(#:tests? #f))
12301 (native-inputs
12302 `(("python-m2r" ,python-m2r)
12303 ("python-setuptools-scm" ,python-setuptools-scm)
12304 ("python-graphviz" ,python-graphviz)))
12305 (propagated-inputs
12306 `(("python-six" ,python-six)
12307 ("python-attrs" ,python-attrs)))
12308 (home-page "https://github.com/glyph/Automat")
12309 (synopsis "Self-service finite-state machines")
12310 (description "Automat is a library for concise, idiomatic Python
12311 expression of finite-state automata (particularly deterministic finite-state
12312 transducers).")
12313 (license license:expat)))
12314
12315 (define-public python2-automat
12316 (package-with-python2 python-automat))
12317
12318 (define-public python-m2r
12319 (package
12320 (name "python-m2r")
12321 (version "0.2.1")
12322 (source (origin
12323 (method url-fetch)
12324 (uri (pypi-uri "m2r" version))
12325 (sha256
12326 (base32
12327 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
12328 (build-system python-build-system)
12329 (propagated-inputs
12330 `(("python-docutils" ,python-docutils)
12331 ("python-mistune" ,python-mistune)))
12332 (native-inputs
12333 `(("python-pygments" ,python-pygments)
12334 ("python-mock" ,python-mock)))
12335 (home-page "https://github.com/miyakogi/m2r")
12336 (synopsis "Markdown to reStructuredText converter")
12337 (description "M2R converts a markdown file including reST markups to valid
12338 reST format.")
12339 (license license:expat)))
12340
12341 (define-public python2-m2r
12342 (package-with-python2 python-m2r))
12343
12344 (define-public python-constantly
12345 (package
12346 (name "python-constantly")
12347 (version "15.1.0")
12348 (source (origin
12349 (method url-fetch)
12350 (uri (pypi-uri "constantly" version))
12351 (sha256
12352 (base32
12353 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
12354 (build-system python-build-system)
12355 (home-page "https://github.com/twisted/constantly")
12356 (synopsis "Symbolic constants in Python")
12357 (description "Constantly is a Python library that provides symbolic
12358 constant support. It includes collections and constants with text, numeric,
12359 and bit flag values.")
12360 (license license:expat)))
12361
12362 (define-public python2-constantly
12363 (package-with-python2 python-constantly))
12364
12365 (define-public python-attrs
12366 (package
12367 (name "python-attrs")
12368 (version "19.1.0")
12369 (source (origin
12370 (method url-fetch)
12371 (uri (pypi-uri "attrs" version))
12372 (sha256
12373 (base32
12374 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
12375 (build-system python-build-system)
12376 (arguments
12377 `(#:modules ((guix build utils)
12378 (guix build python-build-system)
12379 (ice-9 ftw)
12380 (srfi srfi-1)
12381 (srfi srfi-26))
12382 #:phases (modify-phases %standard-phases
12383 (replace 'check
12384 (lambda _
12385 (let ((cwd (getcwd)))
12386 (setenv "PYTHONPATH"
12387 (string-append
12388 cwd "/build/"
12389 (find (cut string-prefix? "lib" <>)
12390 (scandir (string-append cwd "/build")))
12391 ":"
12392 (getenv "PYTHONPATH")))
12393 (invoke "python" "-m" "pytest")))))))
12394 (native-inputs
12395 `(("python-coverage" ,python-coverage)
12396 ("python-hypothesis" ,python-hypothesis)
12397 ("python-pympler" ,python-pympler)
12398 ("python-pytest" ,python-pytest)
12399 ("python-six" ,python-six)
12400 ("python-sphinx" ,python-sphinx)
12401 ("python-zope-interface" ,python-zope-interface)))
12402 (home-page "https://github.com/python-attrs/attrs/")
12403 (synopsis "Attributes without boilerplate")
12404 (description "@code{attrs} is a Python package with class decorators that
12405 ease the chores of implementing the most common attribute-related object
12406 protocols.")
12407 (license license:expat)))
12408
12409 (define-public python2-attrs
12410 (package-with-python2 python-attrs))
12411
12412 (define-public python-attrs-bootstrap
12413 (package
12414 (inherit python-attrs)
12415 (name "python-attrs-bootstrap")
12416 (native-inputs `())
12417 (arguments `(#:tests? #f))))
12418
12419 (define-public python2-attrs-bootstrap
12420 (package-with-python2 python-attrs-bootstrap))
12421
12422 (define-public python2-cliapp
12423 (package
12424 (name "python2-cliapp")
12425 (version "1.20180812.1")
12426 (source
12427 (origin
12428 (method url-fetch)
12429 (uri (string-append
12430 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
12431 version ".tar.gz"))
12432 (sha256
12433 (base32
12434 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
12435 (build-system python-build-system)
12436 (arguments
12437 `(#:python ,python-2
12438 #:phases
12439 (modify-phases %standard-phases
12440 ;; check phase needs to be run before the build phase. If not,
12441 ;; coverage-test-runner looks for tests for the built source files,
12442 ;; and fails.
12443 (delete 'check)
12444 (add-before 'build 'check
12445 (lambda _
12446 ;; Disable python3 tests
12447 (substitute* "check"
12448 (("python3") "# python3"))
12449 (invoke "./check"))))))
12450 (native-inputs
12451 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12452 ("python2-pep8" ,python2-pep8)))
12453 (propagated-inputs
12454 `(("python2-pyaml" ,python2-pyaml)))
12455 (home-page "https://liw.fi/cliapp/")
12456 (synopsis "Python framework for command line programs")
12457 (description "@code{python2-cliapp} is a python framework for
12458 command line programs. It contains the typical stuff such programs
12459 need to do, such as parsing the command line for options, and
12460 iterating over input files.")
12461 (license license:gpl2+)))
12462
12463 (define-public python2-ttystatus
12464 (package
12465 (name "python2-ttystatus")
12466 (version "0.36")
12467 (source
12468 (origin
12469 (method url-fetch)
12470 (uri (string-append
12471 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
12472 version ".tar.gz"))
12473 (sha256
12474 (base32
12475 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
12476 (build-system python-build-system)
12477 (native-inputs
12478 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12479 ("python2-pep8" ,python2-pep8)))
12480 (arguments
12481 `(#:python ,python-2
12482 #:phases
12483 (modify-phases %standard-phases
12484 ;; check phase needs to be run before the build phase. If not,
12485 ;; coverage-test-runner looks for tests for the built source files,
12486 ;; and fails.
12487 (delete 'check)
12488 (add-before 'build 'check
12489 (lambda _ (invoke "make" "check"))))))
12490 (home-page "https://liw.fi/ttystatus/")
12491 (synopsis "Python library for showing progress reporting and
12492 status updates on terminals")
12493 (description "@code{python2-ttystatus} is a python library for
12494 showing progress reporting and status updates on terminals, for
12495 command line programs. Output is automatically adapted to the width
12496 of the terminal: truncated if it does not fit, and resized if the
12497 terminal size changes.")
12498 (license license:gpl3+)))
12499
12500 (define-public python2-tracing
12501 (package
12502 (name "python2-tracing")
12503 (version "0.10")
12504 (source
12505 (origin
12506 (method url-fetch)
12507 (uri (string-append
12508 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
12509 version ".tar.gz"))
12510 (sha256
12511 (base32
12512 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
12513 (build-system python-build-system)
12514 (arguments
12515 `(#:python ,python-2))
12516 (home-page "https://liw.fi/tracing/")
12517 (synopsis "Python debug logging helper")
12518 (description "@code{python2-tracing} is a python library for
12519 logging debug messages. It provides a way to turn debugging messages
12520 on and off, based on the filename they occur in. It is much faster
12521 than using @code{logging.Filter} to accomplish the same thing, which
12522 matters when code is run in production mode. The actual logging still
12523 happens using the @code{logging} library.")
12524 (license license:gpl3+)))
12525
12526 (define-public python2-larch
12527 (package
12528 (name "python2-larch")
12529 (version "1.20151025")
12530 (source
12531 (origin
12532 (method url-fetch)
12533 (uri (string-append
12534 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12535 version ".tar.gz"))
12536 (patches (search-patches
12537 "python2-larch-coverage-4.0a6-compatibility.patch"))
12538 (sha256
12539 (base32
12540 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12541 (build-system python-build-system)
12542 (arguments
12543 `(#:python ,python-2
12544 #:phases
12545 (modify-phases %standard-phases
12546 ;; check phase needs to be run before the build phase. If not,
12547 ;; coverage-test-runner looks for tests for the built source files,
12548 ;; and fails.
12549 (delete 'check)
12550 (add-before 'build 'check
12551 (lambda _ (invoke "make" "check"))))))
12552 (native-inputs
12553 `(("cmdtest" ,cmdtest)
12554 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12555 (propagated-inputs
12556 `(("python2-tracing" ,python2-tracing)))
12557 (home-page "https://liw.fi/larch/")
12558 (synopsis "Python copy-on-write B-tree library")
12559 (description "@code{python2-larch} is an implementation of
12560 particular kind of B-tree, based on research by Ohad Rodeh. See
12561 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12562 on the data structure.
12563
12564 The distinctive feature of this B-tree is that a node is never
12565 (conceptually) modified. Instead, all updates are done by
12566 copy-on-write. This makes it easy to clone a tree, and modify only the
12567 clone, while other processes access the original tree.")
12568 (license license:gpl3+)))
12569
12570 (define-public python-astroid
12571 (package
12572 (name "python-astroid")
12573 (version "2.3.3")
12574 (source
12575 (origin
12576 (method url-fetch)
12577 (uri (pypi-uri "astroid" version))
12578 (sha256
12579 (base32 "0fnibsl2cb5mvzbfm7sycj85smx48f8w8m7ks1sqlmpr9ps0gski"))))
12580 (build-system python-build-system)
12581 (propagated-inputs
12582 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12583 ("python-six" ,python-six)
12584 ("python-typed-ast" ,python-typed-ast)
12585 ("python-wrapt" ,python-wrapt)))
12586 (native-inputs
12587 `(("python-dateutil" ,python-dateutil)
12588 ("python-nose" ,python-nose)
12589 ("python-pytest" ,python-pytest)
12590 ("python-pytest-runner" ,python-pytest-runner)))
12591 (arguments
12592 `(#:phases
12593 (modify-phases %standard-phases
12594 (add-after 'unpack 'remove-spurious-test
12595 (lambda _
12596 ;; This can be removed after upgrading from python-3.7
12597 ;; https://github.com/PyCQA/astroid/issues/593
12598 ;; https://bugs.python.org/issue34056
12599 (delete-file "astroid/tests/unittest_modutils.py")
12600 #t))
12601 (replace 'check
12602 (lambda _
12603 (invoke "pytest" "astroid"))))))
12604 (home-page "https://github.com/PyCQA/astroid")
12605 (synopsis "Common base representation of python source code for pylint and
12606 other projects")
12607 (description "@code{python-astroid} provides a common base representation
12608 of python source code for projects such as pychecker, pyreverse, pylint, etc.
12609
12610 It provides a compatible representation which comes from the _ast module. It
12611 rebuilds the tree generated by the builtin _ast module by recursively walking
12612 down the AST and building an extended ast. The new node classes have
12613 additional methods and attributes for different usages. They include some
12614 support for static inference and local name scopes. Furthermore, astroid
12615 builds partial trees by inspecting living objects.")
12616 (license license:lgpl2.1+)
12617 (properties `((python2-variant . ,(delay python2-astroid))))))
12618
12619 (define-public python2-astroid
12620 (let ((base (package-with-python2
12621 (strip-python2-variant python-astroid))))
12622 (package (inherit base)
12623 ;; Version 2.x removes python2 support.
12624 (version "1.6.5")
12625 (source
12626 (origin
12627 (method url-fetch)
12628 (uri (pypi-uri "astroid" version))
12629 (sha256
12630 (base32
12631 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12632 (arguments
12633 (substitute-keyword-arguments (package-arguments base)
12634 ((#:phases phases)
12635 `(modify-phases ,phases
12636 (add-after 'unpack 'remove-spurious-test
12637 (lambda _
12638 ;; https://github.com/PyCQA/astroid/issues/276
12639 (delete-file "astroid/tests/unittest_brain.py")
12640 #t))
12641 (replace 'check
12642 (lambda _
12643 (invoke"python" "-m" "unittest" "discover"
12644 "-p" "unittest*.py")))))))
12645 (native-inputs `())
12646 (propagated-inputs
12647 `(("python2-backports-functools-lru-cache"
12648 ,python2-backports-functools-lru-cache)
12649 ("python2-enum34" ,python2-enum34)
12650 ("python2-singledispatch" ,python2-singledispatch)
12651 ,@(alist-delete "python-typed-ast"
12652 (package-propagated-inputs base)))))))
12653
12654 (define-public python-isort
12655 (package
12656 (name "python-isort")
12657 (version "4.3.4")
12658 (source
12659 (origin
12660 (method git-fetch)
12661 (uri (git-reference
12662 ;; Tests pass only from the Github sources
12663 (url "https://github.com/timothycrosley/isort")
12664 (commit version)))
12665 (file-name (git-file-name name version))
12666 (sha256
12667 (base32
12668 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
12669 (build-system python-build-system)
12670 (native-inputs
12671 `(("python-mock" ,python-mock)
12672 ("python-pytest" ,python-pytest)))
12673 (home-page "https://github.com/timothycrosley/isort")
12674 (synopsis "Python utility/library to sort python imports")
12675 (description "@code{python-isort} is a python utility/library to sort
12676 imports alphabetically, and automatically separated into sections. It
12677 provides a command line utility, a python library and plugins for various
12678 editors.")
12679 (license license:expat)
12680 (properties `((python2-variant . ,(delay python2-isort))))))
12681
12682 (define-public python2-isort
12683 (let ((base (package-with-python2
12684 (strip-python2-variant python-isort))))
12685 (package (inherit base)
12686 (native-inputs
12687 `(("python2-futures" ,python2-futures)
12688 ,@(package-native-inputs base))))))
12689
12690 (define-public python2-backports-functools-lru-cache
12691 (package
12692 (name "python2-backports-functools-lru-cache")
12693 (version "1.5")
12694 (source
12695 (origin
12696 (method url-fetch)
12697 ;; only the pypi tarballs contain the necessary metadata
12698 (uri (pypi-uri "backports.functools_lru_cache" version))
12699 (sha256
12700 (base32
12701 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12702 (build-system python-build-system)
12703 (native-inputs
12704 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12705 (arguments
12706 `(#:python ,python-2))
12707 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12708 (synopsis "Backport of functools.lru_cache from Python 3.3")
12709 (description "@code{python2-backports-functools-lru-cache} is a backport
12710 of @code{functools.lru_cache} from python 3.3.")
12711 (license license:expat)))
12712
12713 (define-public python-configparser
12714 (package
12715 (name "python-configparser")
12716 (version "3.7.1")
12717 (source
12718 (origin
12719 (method url-fetch)
12720 (uri (pypi-uri "configparser" version))
12721 (sha256
12722 (base32
12723 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
12724 (build-system python-build-system)
12725 (home-page "https://github.com/jaraco/configparser/")
12726 (synopsis "Backport of configparser from python 3.5")
12727 (description "@code{python-configparser} is a backport of
12728 @code{configparser} from Python 3.5 so that it can be used directly
12729 in other versions.")
12730 (license license:expat)))
12731
12732 (define-public python2-configparser
12733 (package-with-python2 python-configparser))
12734
12735 (define-public python-mando
12736 (package
12737 (name "python-mando")
12738 (version "0.6.4")
12739 (source (origin
12740 (method url-fetch)
12741 (uri (pypi-uri "mando" version))
12742 (sha256
12743 (base32
12744 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12745 (build-system python-build-system)
12746 (propagated-inputs
12747 `(("python-rst2ansi" ,python-rst2ansi)
12748 ("python-six" ,python-six)))
12749 (native-inputs
12750 `(("python-pytest" ,python-pytest)))
12751 (home-page "https://mando.readthedocs.org/")
12752 (synopsis
12753 "Wrapper around argparse, allowing creation of complete CLI applications")
12754 (description
12755 "This package is a wrapper around argparse, allowing you to write complete CLI
12756 applications in seconds while maintaining all the flexibility.")
12757 (license license:expat)))
12758
12759 (define-public python2-mando
12760 (package-with-python2 python-mando))
12761
12762 (define-public python2-argparse
12763 (package
12764 (name "python2-argparse")
12765 (version "1.4.0")
12766 (source
12767 (origin
12768 (method url-fetch)
12769 (uri (pypi-uri "argparse" version))
12770 (sha256
12771 (base32
12772 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12773 (build-system python-build-system)
12774 (arguments
12775 `(#:python ,python-2))
12776 (home-page "https://github.com/ThomasWaldmann/argparse/")
12777 (synopsis "Python command-line parsing library")
12778 (description
12779 "This package is mostly for people who want to have @code{argparse} on
12780 older Pythons because it was not part of the standard library back then.")
12781 (license license:psfl)))
12782
12783 (define-public python-fudge
12784 (package
12785 (name "python-fudge")
12786 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
12787 ;; package, which is currently the only use of this package.
12788 (version "0.9.6")
12789 (source
12790 (origin
12791 (method url-fetch)
12792 (uri (pypi-uri "fudge" version))
12793 (sha256
12794 (base32
12795 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
12796 (build-system python-build-system)
12797 (arguments
12798 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
12799 (home-page "https://github.com/fudge-py/fudge")
12800 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
12801 (description
12802 "Fudge is a Python module for using fake objects (mocks and stubs) to
12803 test real ones.
12804
12805 In readable Python code, you declare the methods available on your fake object
12806 and how they should be called. Then you inject that into your application and
12807 start testing. This declarative approach means you don’t have to record and
12808 playback actions and you don’t have to inspect your fakes after running code.
12809 If the fake object was used incorrectly then you’ll see an informative
12810 exception message with a traceback that points to the culprit.")
12811 (license license:expat)))
12812
12813 (define-public python2-fudge
12814 (package-with-python2 python-fudge))
12815
12816 (define-public python-mwclient
12817 (package
12818 (name "python-mwclient")
12819 (version "0.8.4")
12820 (source
12821 (origin
12822 (method url-fetch)
12823 ;; The PyPI version wouldn't contain tests.
12824 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
12825 "v" version ".tar.gz"))
12826 (file-name (string-append name "-" version ".tar.gz"))
12827 (sha256
12828 (base32
12829 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
12830 (build-system python-build-system)
12831 (propagated-inputs
12832 `(("python-requests" ,python-requests)
12833 ("python-requests-oauthlib"
12834 ,python-requests-oauthlib)
12835 ("python-six" ,python-six)))
12836 (native-inputs
12837 `(("python-mock" ,python-mock)
12838 ("python-pytest" ,python-pytest)
12839 ("python-pytest-pep8" ,python-pytest-pep8)
12840 ("python-pytest-cache" ,python-pytest-cache)
12841 ("python-pytest-cov" ,python-pytest-cov)
12842 ("python-responses" ,python-responses)))
12843 (home-page "https://github.com/btongminh/mwclient")
12844 (synopsis "MediaWiki API client")
12845 (description "This package provides a MediaWiki API client.")
12846 (license license:expat)))
12847
12848 (define-public python2-mwclient
12849 (package-with-python2 python-mwclient))
12850
12851 (define-public python-utils
12852 (package
12853 (name "python-utils")
12854 (version "2.1.0")
12855 (source (origin
12856 (method url-fetch)
12857 (uri (pypi-uri "python-utils" version))
12858 (sha256
12859 (base32
12860 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
12861 (build-system python-build-system)
12862 (native-inputs
12863 `(("pytest-runner" ,python-pytest-runner)
12864 ("pytest" ,python-pytest)
12865 ("six" ,python-six)))
12866 (home-page "https://github.com/WoLpH/python-utils")
12867 (synopsis "Convenient utilities not included with the standard Python install")
12868 (description
12869 "Python Utils is a collection of small Python functions and classes which
12870 make common patterns shorter and easier.")
12871 (license license:bsd-2)))
12872
12873 (define-public python2-utils
12874 (package-with-python2 python-utils))
12875
12876 (define-public python-diff-match-patch
12877 (package
12878 (name "python-diff-match-patch")
12879 (version "20121119")
12880 (source
12881 (origin
12882 (method url-fetch)
12883 (uri (pypi-uri "diff-match-patch" version))
12884 (sha256
12885 (base32
12886 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
12887 (build-system python-build-system)
12888 (home-page "https://code.google.com/p/google-diff-match-patch")
12889 (synopsis "Synchronize plain text")
12890 (description "Diff Match and Patch libraries offer robust algorithms to
12891 perform the operations required for synchronizing plain text.")
12892 (license license:asl2.0)))
12893
12894 (define-public python2-diff-match-patch
12895 (package-with-python2 python-diff-match-patch))
12896
12897 (define-public python-dirsync
12898 (package
12899 (name "python-dirsync")
12900 (version "2.2.3")
12901 (source
12902 (origin
12903 (method url-fetch)
12904 (uri (pypi-uri "dirsync" version))
12905 (sha256
12906 (base32
12907 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
12908 (build-system python-build-system)
12909 (propagated-inputs
12910 `(("six" ,python-six)))
12911 (home-page "https://bitbucket.org/tkhyn/dirsync")
12912 (synopsis "Advanced directory tree synchronisation tool")
12913 (description "Advanced directory tree synchronisation tool.")
12914 (license license:expat)))
12915
12916 (define-public python2-dirsync
12917 (package-with-python2 python-dirsync))
12918
12919 (define-public python-levenshtein
12920 (package
12921 (name "python-levenshtein")
12922 (version "0.12.0")
12923 (source
12924 (origin
12925 (method url-fetch)
12926 (uri (pypi-uri "python-Levenshtein" version))
12927 (sha256
12928 (base32
12929 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
12930 (build-system python-build-system)
12931 (home-page "https://github.com/ztane/python-Levenshtein")
12932 (synopsis "Fast computation of Levenshtein distance and string similarity")
12933 (description
12934 "The Levenshtein Python C extension module contains functions for fast computation of
12935 @enumerate
12936 @item Levenshtein (edit) distance, and edit operations
12937 @item string similarity
12938 @item approximate median strings, and generally string averaging
12939 @item string sequence and set similarity
12940 @end enumerate
12941 It supports both normal and Unicode strings.")
12942 (license license:gpl2+)))
12943
12944 (define-public python2-levenshtein
12945 (package-with-python2 python-levenshtein))
12946
12947 (define-public python-scandir
12948 (package
12949 (name "python-scandir")
12950 (version "1.9.0")
12951 (source
12952 (origin
12953 (method url-fetch)
12954 (uri (pypi-uri "scandir" version))
12955 (sha256
12956 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
12957 (build-system python-build-system)
12958 (arguments
12959 `(#:phases (modify-phases %standard-phases
12960 (replace 'check
12961 (lambda _
12962 (invoke "python" "test/run_tests.py"))))))
12963 (home-page "https://github.com/benhoyt/scandir")
12964 (synopsis "Directory iteration function")
12965 (description
12966 "Directory iteration function like os.listdir(), except that instead of
12967 returning a list of bare filenames, it yields DirEntry objects that include
12968 file type and stat information along with the name. Using scandir() increases
12969 the speed of os.walk() by 2-20 times (depending on the platform and file
12970 system) by avoiding unnecessary calls to os.stat() in most cases.
12971
12972 This package is part of the Python standard library since version 3.5.")
12973 (license license:bsd-3)))
12974
12975 (define-public python2-scandir
12976 (package-with-python2 python-scandir))
12977
12978 (define-public python2-stemming
12979 (package
12980 (name "python2-stemming")
12981 (version "1.0.1")
12982 (source
12983 (origin
12984 (method url-fetch)
12985 (uri (pypi-uri "stemming" version))
12986 (sha256
12987 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
12988 (build-system python-build-system)
12989 (arguments
12990 `(#:python ,python-2))
12991 (home-page "https://bitbucket.org/mchaput/stemming/overview")
12992 (synopsis "Python implementations of various stemming algorithms")
12993 (description
12994 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
12995 stemming algorithms for English. These implementations are straightforward and
12996 efficient, unlike some Python versions of the same algorithms available on the
12997 Web. This package is an extraction of the stemming code included in the Whoosh
12998 search engine.")
12999 (license license:public-domain)))
13000
13001 (define-public python-factory-boy
13002 (package
13003 (name "python-factory-boy")
13004 (version "2.8.1")
13005 (source
13006 (origin
13007 (method url-fetch)
13008 (uri (pypi-uri "factory_boy" version))
13009 (sha256
13010 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
13011 (build-system python-build-system)
13012 (arguments
13013 ;; Tests are not included in the tarball.
13014 `(#:tests? #f))
13015 (propagated-inputs
13016 `(("faker" ,python-faker)))
13017 (home-page "https://github.com/benhoyt/scandir")
13018 (synopsis "Versatile test fixtures replacement")
13019 (description
13020 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
13021
13022 As a fixtures replacement tool, it aims to replace static, hard to maintain
13023 fixtures with easy-to-use factories for complex object.
13024
13025 Instead of building an exhaustive test setup with every possible combination
13026 of corner cases, factory_boy allows you to use objects customized for the
13027 current test, while only declaring the test-specific fields")
13028 (license license:expat)))
13029
13030 (define-public python2-factory-boy
13031 (package-with-python2 python-factory-boy))
13032
13033 (define-public python-translate-toolkit
13034 (package
13035 (name "python-translate-toolkit")
13036 (version "2.1.0")
13037 (source
13038 (origin
13039 (method url-fetch)
13040 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
13041 (sha256
13042 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
13043 (build-system python-build-system)
13044 (native-inputs
13045 `(("python-pytest" ,python-pytest)
13046 ("python-sphinx" ,python-sphinx)))
13047 (propagated-inputs
13048 `(("python-babel" ,python-babel)
13049 ("python-beautifulsoup4" ,python-beautifulsoup4)
13050 ("python-chardet" ,python-chardet)
13051 ("python-diff-match-patch" ,python-diff-match-patch)
13052 ("python-levenshtein" ,python-levenshtein)
13053 ("python-lxml" ,python-lxml)
13054 ("python-six" ,python-six)
13055 ("python-vobject" ,python-vobject)
13056 ("python-pyyaml" ,python-pyyaml)))
13057 (arguments
13058 ;; TODO: tests are not run, because they end with
13059 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
13060 ;; 'parse_funcs'
13061 ;; during test setup.
13062 `(#:tests? #f))
13063 (home-page "https://toolkit.translatehouse.org")
13064 (synopsis "Tools and API for translation and localization engineering")
13065 (description
13066 "Tools and API for translation and localization engineering. It contains
13067 several utilities, as well as an API for building localization tools.")
13068 (license license:gpl2+)))
13069
13070 (define-public python2-translate-toolkit
13071 (package-with-python2 python-translate-toolkit))
13072
13073 (define-public python-packaging
13074 (package
13075 (name "python-packaging")
13076 (version "19.2")
13077 (source
13078 (origin
13079 (method url-fetch)
13080 (uri (pypi-uri "packaging" version))
13081 (sha256
13082 (base32
13083 "0izwlz9h0bw171a1chr311g2y7n657zjaf4mq4rgm8pp9lbj9f98"))))
13084 (build-system python-build-system)
13085 (arguments
13086 `(#:phases (modify-phases %standard-phases
13087 (replace 'check
13088 (lambda _ (invoke "py.test" "-vv"))))))
13089 (native-inputs
13090 `(("python-pretend" ,python-pretend)
13091 ("python-pytest" ,python-pytest)))
13092 (propagated-inputs
13093 `(("python-pyparsing" ,python-pyparsing)
13094 ("python-six" ,python-six)))
13095 (home-page "https://github.com/pypa/packaging")
13096 (synopsis "Core utilities for Python packages")
13097 (description "Packaging is a Python module for dealing with Python packages.
13098 It offers an interface for working with package versions, names, and dependency
13099 information.")
13100 ;; From 'LICENSE': This software is made available under the terms of
13101 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
13102 ;; Contributions to this software is made under the terms of *both* these
13103 ;; licenses.
13104 (license (list license:asl2.0 license:bsd-2))))
13105
13106 (define-public python2-packaging
13107 (package-with-python2 python-packaging))
13108
13109 (define-public python-relatorio
13110 (package
13111 (name "python-relatorio")
13112 (version "0.8.0")
13113 (source
13114 (origin
13115 (method url-fetch)
13116 (uri (pypi-uri "relatorio" version))
13117 (sha256
13118 (base32
13119 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
13120 (build-system python-build-system)
13121 (propagated-inputs
13122 `(("python-lxml" ,python-lxml)
13123 ("python-genshi" ,python-genshi)))
13124 (native-inputs
13125 `(("python-magic" ,python-magic)))
13126 (home-page "https://relatorio.tryton.org/")
13127 (synopsis "Templating library able to output ODT and PDF files")
13128 (description "Relatorio is a templating library which provides a way to
13129 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
13130 for more filetypes can be easily added by creating plugins for them.")
13131 (license license:gpl3+)))
13132
13133 (define-public python2-relatorio
13134 (package-with-python2 python-relatorio))
13135
13136 (define-public python-radon
13137 (package
13138 (name "python-radon")
13139 (version "2.2.0")
13140 (source
13141 (origin
13142 (method url-fetch)
13143 (uri (pypi-uri "radon" version))
13144 (sha256
13145 (base32
13146 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
13147 (build-system python-build-system)
13148 (arguments
13149 `(#:phases (modify-phases %standard-phases
13150 (replace 'check
13151 (lambda _
13152 (invoke "python" "radon/tests/run.py"))))))
13153 (propagated-inputs
13154 `(("python-colorama" ,python-colorama)
13155 ("python-flake8-polyfill" ,python-flake8-polyfill)
13156 ("python-mando" ,python-mando)))
13157 (native-inputs
13158 `(("python-pytest" ,python-pytest)
13159 ("python-pytest-mock" ,python-pytest-mock)))
13160 (home-page "https://radon.readthedocs.org/")
13161 (synopsis "Code Metrics in Python")
13162 (description "Radon is a Python tool which computes various code metrics.
13163 Supported metrics are:
13164 @itemize @bullet
13165 @item raw metrics: SLOC, comment lines, blank lines, &c.
13166 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
13167 @item Halstead metrics (all of them)
13168 @item the Maintainability Index (a Visual Studio metric)
13169 @end itemize")
13170 (license license:expat)))
13171
13172 (define-public python2-radon
13173 (package-with-python2 python-radon))
13174
13175 (define-public python-sure
13176 (package
13177 (name "python-sure")
13178 (version "1.4.11")
13179 (source
13180 (origin
13181 (method url-fetch)
13182 (uri (pypi-uri "sure" version))
13183 (sha256
13184 (base32
13185 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
13186 (build-system python-build-system)
13187 (propagated-inputs
13188 `(("python-mock" ,python-mock)
13189 ("python-six" ,python-six)))
13190 (native-inputs
13191 `(("python-nose" ,python-nose)))
13192 (home-page "https://github.com/gabrielfalcao/sure")
13193 (synopsis "Automated testing library in python for python")
13194 (description
13195 "Sure is a python library that leverages a DSL for writing assertions.
13196 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
13197 (license license:gpl3+)))
13198
13199 (define-public python2-sure
13200 (package-with-python2 python-sure))
13201
13202 (define-public python2-couleur
13203 ;; This package does not seem to support python3 at all, hence,
13204 ;; only the python2 variant definition is provided.
13205 (package
13206 (name "python2-couleur")
13207 (version "0.6.2")
13208 (source
13209 (origin
13210 (method url-fetch)
13211 (uri (pypi-uri "couleur" version))
13212 (sha256
13213 (base32
13214 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
13215 (build-system python-build-system)
13216 (arguments
13217 `(#:python ,python-2))
13218 (home-page "https://github.com/gabrielfalcao/couleur")
13219 (synopsis
13220 "ANSI terminal tool for python, colored shell and other handy fancy features")
13221 (description
13222 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
13223 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
13224 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
13225 ;; https://github.com/gabrielfalcao/couleur/issues/11
13226 (license license:lgpl3+)))
13227
13228 (define-public python-misaka
13229 (package
13230 (name "python-misaka")
13231 (version "2.1.1")
13232 (source
13233 (origin
13234 (method url-fetch)
13235 (uri (pypi-uri "misaka" version))
13236 (sha256
13237 (base32
13238 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
13239 (build-system python-build-system)
13240 (arguments
13241 `(;; Line 37 of setup.py calls self.run_command('develop')
13242 ;; in the 'check' phase. This command seems to be trying
13243 ;; to write to
13244 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
13245 ;; for which it does not have the permission to write.
13246 #:tests? #f))
13247 (propagated-inputs
13248 `(("python-cffi" ,python-cffi)))
13249 (home-page "https://github.com/FSX/misaka")
13250 (synopsis "Python binding for Hoedown")
13251 (description
13252 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
13253 library written in C. It features a fast HTML renderer and functionality to make custom
13254 renderers (e.g. man pages or LaTeX).")
13255 (license license:expat)))
13256
13257 (define-public python2-misaka
13258 (package-with-python2 python-misaka))
13259
13260 (define-public python2-steadymark
13261 ;; This is forced into being a python2 only variant
13262 ;; due to its dependence on couleur that has no support
13263 ;; for python3
13264 (package
13265 (name "python2-steadymark")
13266 (version "0.7.3")
13267 (source
13268 (origin
13269 (method url-fetch)
13270 (uri (pypi-uri "steadymark" version))
13271 (sha256
13272 (base32
13273 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
13274 (build-system python-build-system)
13275 (native-inputs
13276 `(("python-couleur" ,python2-couleur)
13277 ("python-sure" ,python2-sure)
13278 ("python-misaka" ,python2-misaka)))
13279 (arguments
13280 `(#:python ,python-2
13281 #:phases
13282 (modify-phases %standard-phases
13283 (add-before 'build 'patch-setup-py
13284 (lambda _
13285 ;; Update requirements from dependency==version
13286 ;; to dependency>=version
13287 (substitute* "setup.py"
13288 (("==") ">="))
13289 #t)))))
13290 (home-page "https://github.com/gabrielfalcao/steadymark")
13291 (synopsis "Markdown-based test runner for python")
13292 (description
13293 "@code{Steadymark} allows documentation to be written in github-flavoured
13294 markdown. The documentation may contain snippets of code surrounded by python
13295 code blocks and @code{Steadymark} will find these snippets and run them, making
13296 sure that there are no old malfunctional examples in the documentation examples.")
13297 (license license:expat)))
13298
13299 (define-public python-jsonpointer
13300 (package
13301 (name "python-jsonpointer")
13302 (version "1.10")
13303 (source
13304 (origin
13305 (method url-fetch)
13306 (uri (pypi-uri "jsonpointer" version))
13307 (sha256
13308 (base32
13309 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
13310 (build-system python-build-system)
13311 (home-page "https://github.com/stefankoegl/python-json-pointer")
13312 (synopsis "Identify specific nodes in a JSON document")
13313 (description "@code{jsonpointer} allows you to access specific nodes
13314 by path in a JSON document (see RFC 6901).")
13315 (license license:bsd-3)))
13316
13317 (define-public python2-jsonpointer
13318 (package-with-python2 python-jsonpointer))
13319
13320 (define-public python-jsonpatch
13321 (package
13322 (name "python-jsonpatch")
13323 (version "1.16")
13324 (source
13325 (origin
13326 (method url-fetch)
13327 ;; pypi version lacks tests.js
13328 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
13329 "archive/v" version ".tar.gz"))
13330 (file-name (string-append name "-" version ".tar.gz"))
13331 (sha256
13332 (base32
13333 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
13334 (build-system python-build-system)
13335 (native-inputs
13336 `(("python-jsonpointer" ,python-jsonpointer)))
13337 (home-page "https://github.com/stefankoegl/python-json-patch")
13338 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
13339 (description "@code{jsonpatch} is a library and program that allows
13340 applying JSON Patches according to RFC 6902.")
13341 (license license:bsd-3)))
13342
13343 (define-public python2-jsonpatch
13344 (package-with-python2 python-jsonpatch))
13345
13346 (define-public python-jsonpatch-0.4
13347 (package (inherit python-jsonpatch)
13348 (name "python-jsonpatch")
13349 (version "0.4")
13350 (source
13351 (origin
13352 (method url-fetch)
13353 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
13354 "archive/v" version ".tar.gz"))
13355 (file-name (string-append name "-" version ".tar.gz"))
13356 (sha256
13357 (base32
13358 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
13359
13360 (define-public python2-jsonpatch-0.4
13361 (package-with-python2 python-jsonpatch-0.4))
13362
13363 (define-public python-rfc3986
13364 (package
13365 (name "python-rfc3986")
13366 (version "1.1.0")
13367 (source (origin
13368 (method url-fetch)
13369 (uri (pypi-uri "rfc3986" version))
13370 (sha256
13371 (base32
13372 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
13373 (build-system python-build-system)
13374 (arguments
13375 `(#:modules ((guix build utils)
13376 (guix build python-build-system)
13377 (ice-9 ftw)
13378 (srfi srfi-1)
13379 (srfi srfi-26))
13380 #:phases
13381 (modify-phases %standard-phases
13382 (replace 'check
13383 (lambda _
13384 (let ((cwd (getcwd)))
13385 (setenv "PYTHONPATH"
13386 (string-append cwd "/build/"
13387 (find (cut string-prefix? "lib" <>)
13388 (scandir (string-append cwd "/build")))
13389 ":"
13390 (getenv "PYTHONPATH")))
13391 (invoke "pytest" "-v")))))))
13392 (native-inputs
13393 `(("python-pytest" ,python-pytest)))
13394 (home-page "https://rfc3986.readthedocs.io/")
13395 (synopsis "Parse and validate URI references")
13396 (description
13397 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
13398 validation and authority parsing. This module also supports RFC@tie{}6874
13399 which adds support for zone identifiers to IPv6 addresses.")
13400 (license license:asl2.0)))
13401
13402 (define-public python2-rfc3986
13403 (package-with-python2 python-rfc3986))
13404
13405 (define-public python-rfc3987
13406 (package
13407 (name "python-rfc3987")
13408 (version "1.3.7")
13409 (source
13410 (origin
13411 (method url-fetch)
13412 (uri (pypi-uri "rfc3987" version))
13413 (sha256
13414 (base32
13415 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
13416 (build-system python-build-system)
13417 (home-page "https://pypi.python.org/pypi/rfc3987")
13418 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
13419 (description "@code{rfc3987} provides routines for parsing and
13420 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
13421 (license license:gpl3+)))
13422
13423 (define-public python2-rfc3987
13424 (package-with-python2 python-rfc3987))
13425
13426 (define-public python-validate-email
13427 (package
13428 (name "python-validate-email")
13429 (version "1.3")
13430 (source
13431 (origin
13432 (method url-fetch)
13433 (uri (pypi-uri "validate_email" version))
13434 (sha256
13435 (base32
13436 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
13437 (build-system python-build-system)
13438 (home-page "https://github.com/syrusakbary/validate_email")
13439 (synopsis "Verifies if an email address is valid and really exists")
13440 (description "@code{validate_email} can be used to verify if an email
13441 address is valid and really exists.")
13442 (license license:lgpl3+)))
13443
13444 (define-public python2-validate-email
13445 (package-with-python2 python-validate-email))
13446
13447 (define-public python-flex
13448 (package
13449 (name "python-flex")
13450 (version "6.10.0")
13451 (source
13452 (origin
13453 (method url-fetch)
13454 (uri (pypi-uri "flex" version))
13455 (sha256
13456 (base32
13457 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
13458 (build-system python-build-system)
13459 (propagated-inputs
13460 `(("python-click" ,python-click)
13461 ("python-iso8601" ,python-iso8601)
13462 ("python-jsonpointer" ,python-jsonpointer)
13463 ("python-pyyaml" ,python-pyyaml)
13464 ("python-requests" ,python-requests)
13465 ("python-rfc3987" ,python-rfc3987)
13466 ("python-six" ,python-six)
13467 ("python-validate-email" ,python-validate-email)))
13468 (home-page "https://github.com/pipermerriam/flex")
13469 (synopsis "Validates Swagger schemata")
13470 (description "@code{flex} can be used to validate Swagger schemata.")
13471 (license license:bsd-3)))
13472
13473 (define-public python2-flex
13474 (package-with-python2 python-flex))
13475
13476 (define-public python-marshmallow
13477 (package
13478 (name "python-marshmallow")
13479 (version "3.0.0b14")
13480 (source
13481 (origin
13482 (method url-fetch)
13483 (uri (pypi-uri "marshmallow" version))
13484 (sha256
13485 (base32
13486 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
13487 (build-system python-build-system)
13488 (propagated-inputs
13489 `(("python-dateutil" ,python-dateutil)
13490 ("python-simplejson" ,python-simplejson)))
13491 (native-inputs
13492 `(("python-pytest" ,python-pytest)
13493 ("python-pytz" ,python-pytz)))
13494 (home-page "https://github.com/marshmallow-code/marshmallow")
13495 (synopsis "Convert complex datatypes to and from native
13496 Python datatypes.")
13497 (description "@code{marshmallow} provides a library for converting
13498 complex datatypes to and from native Python datatypes.")
13499 (license license:expat)))
13500
13501 (define-public python2-marshmallow
13502 (package-with-python2 python-marshmallow))
13503
13504 (define-public python-apispec
13505 (package
13506 (name "python-apispec")
13507 (version "0.25.3")
13508 (source
13509 (origin
13510 (method url-fetch)
13511 (uri (pypi-uri "apispec" version))
13512 (sha256
13513 (base32
13514 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
13515 (build-system python-build-system)
13516 (propagated-inputs
13517 `(("python-pyyaml" ,python-pyyaml)))
13518 (native-inputs
13519 `(("python-pytest" ,python-pytest)
13520 ("python-flask" ,python-flask)
13521 ("python-marshmallow" ,python-marshmallow)
13522 ("python-tornado" ,python-tornado)
13523 ("python-bottle" ,python-bottle)
13524 ("python-mock" ,python-mock)))
13525 (home-page "https://github.com/marshmallow-code/apispec")
13526 (synopsis "Swagger 2.0 API specification generator")
13527 (description "@code{python-apispec} is a pluggable API specification
13528 generator. Currently supports the OpenAPI specification (f.k.a.
13529 Swagger 2.0).")
13530 (license license:expat)))
13531
13532 (define-public python2-apispec
13533 (package-with-python2 python-apispec))
13534
13535 (define-public python-flasgger
13536 (package
13537 (name "python-flasgger")
13538 (version "0.6.3")
13539 (source
13540 (origin
13541 (method git-fetch)
13542 (uri (git-reference
13543 (url "https://github.com/rochacbruno/flasgger.git")
13544 (commit version)))
13545 (file-name (git-file-name name version))
13546 (sha256
13547 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
13548 (build-system python-build-system)
13549 (arguments
13550 `(#:phases
13551 (modify-phases %standard-phases
13552 (replace 'check
13553 (lambda* (#:key inputs outputs #:allow-other-keys)
13554 (substitute* "Makefile"
13555 (("flake8 flasgger --ignore=F403")
13556 "flake8 flasgger --ignore=E731,F403"))
13557 (setenv "PYTHONPATH" (string-append (getcwd)
13558 ":"
13559 (getenv "PYTHONPATH")))
13560 (invoke "py.test"))))))
13561 (propagated-inputs
13562 `(("python-flask" ,python-flask)
13563 ("python-pyyaml" ,python-pyyaml)
13564 ("python-jsonschema" ,python-jsonschema)
13565 ("python-mistune" ,python-mistune)
13566 ("python-six" ,python-six)))
13567 (native-inputs
13568 `(("python-decorator" ,python-decorator)
13569 ("python-flake8" ,python-flake8)
13570 ("python-flask-restful" ,python-flask-restful)
13571 ("python-flex" ,python-flex)
13572 ("python-pytest" ,python-pytest)
13573 ("python-pytest-cov" ,python-pytest-cov)
13574 ("python-marshmallow" ,python-marshmallow)
13575 ("python-apispec" ,python-apispec)))
13576 (home-page "https://github.com/rochacbruno/flasgger/")
13577 (synopsis "Extract Swagger specs from your Flask project")
13578 (description "@code{python-flasgger} allows extracting Swagger specs
13579 from your Flask project. It is a fork of Flask-Swagger.")
13580 (license license:expat)))
13581
13582 (define-public python2-flasgger
13583 (package-with-python2 python-flasgger))
13584
13585 (define-public python-swagger-spec-validator
13586 (package
13587 (name "python-swagger-spec-validator")
13588 (version "2.4.3")
13589 (source
13590 (origin
13591 (method url-fetch)
13592 (uri (pypi-uri "swagger-spec-validator" version))
13593 (sha256
13594 (base32
13595 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
13596 (build-system python-build-system)
13597 (propagated-inputs
13598 `(("python-jsonschema" ,python-jsonschema)
13599 ("python-pyyaml" ,python-pyyaml)
13600 ("python-six" ,python-six)))
13601 (home-page
13602 "https://github.com/Yelp/swagger_spec_validator")
13603 (synopsis "Validation of Swagger specifications")
13604 (description "@code{swagger_spec_validator} provides a library for
13605 validating Swagger API specifications.")
13606 (license license:asl2.0)))
13607
13608 (define-public python2-swagger-spec-validator
13609 (package-with-python2 python-swagger-spec-validator))
13610
13611 (define-public python-apache-libcloud
13612 (package
13613 (name "python-apache-libcloud")
13614 (version "2.4.0")
13615 (source
13616 (origin
13617 (method url-fetch)
13618 (uri (pypi-uri "apache-libcloud" version))
13619 (sha256
13620 (base32
13621 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13622 (build-system python-build-system)
13623 (arguments
13624 `(#:phases
13625 (modify-phases %standard-phases
13626 (add-after 'unpack 'patch-ssh
13627 (lambda* (#:key inputs #:allow-other-keys)
13628 (substitute* "libcloud/compute/ssh.py"
13629 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13630 "/bin/ssh" "'")))
13631 #t))
13632 (add-after 'unpack 'patch-tests
13633 (lambda _
13634 (substitute* "./libcloud/test/test_file_fixtures.py"
13635 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13636 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13637 return (httplib.OK,
13638 \"1234abcd\",
13639 {\"test\": \"value\"},
13640 httplib.responses[httplib.OK])
13641 def _ascii"))
13642 (substitute* "libcloud/test/compute/test_ssh_client.py"
13643 (("class ShellOutSSHClientTests")
13644 "@unittest.skip(\"Guix container doesn't have ssh service\")
13645 class ShellOutSSHClientTests")
13646 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13647 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13648 (("'.xF0', '.x90', '.x8D', '.x88'")
13649 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13650 #t))
13651 (add-before 'check 'copy-secret
13652 (lambda _
13653 (copy-file "libcloud/test/secrets.py-dist"
13654 "libcloud/test/secrets.py")
13655 #t)))))
13656 (inputs
13657 `(("openssh" ,openssh)))
13658 (propagated-inputs
13659 `(("python-paramiko" ,python-paramiko)
13660 ("python-requests" ,python-requests)))
13661 (native-inputs
13662 `(("python-lockfile" ,python-lockfile)
13663 ("python-mock" ,python-mock)
13664 ("python-pytest" ,python-pytest)
13665 ("python-pytest-runner" ,python-pytest-runner)
13666 ("python-requests-mock" ,python-requests-mock)))
13667 (home-page "https://libcloud.apache.org/")
13668 (synopsis "Unified Cloud API")
13669 (description "@code{libcloud} is a Python library for interacting with
13670 many of the popular cloud service providers using a unified API.")
13671 (license license:asl2.0)))
13672
13673 (define-public python2-apache-libcloud
13674 (package-with-python2 python-apache-libcloud))
13675
13676 (define-public python-smmap2
13677 (package
13678 (name "python-smmap2")
13679 (version "2.0.3")
13680 (source
13681 (origin
13682 (method url-fetch)
13683 (uri (pypi-uri "smmap2" version))
13684 (sha256
13685 (base32
13686 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
13687 (build-system python-build-system)
13688 (native-inputs
13689 `(("python-nosexcover" ,python-nosexcover)))
13690 (home-page "https://github.com/Byron/smmap")
13691 (synopsis "Python sliding window memory map manager")
13692 (description "@code{smmap2} is a pure Python implementation of a sliding
13693 window memory map manager.")
13694 (license license:bsd-3)))
13695
13696 (define-public python2-smmap2
13697 (package-with-python2 python-smmap2))
13698
13699 (define-public python-regex
13700 (package
13701 (name "python-regex")
13702 (version "2019.04.14")
13703 (source (origin
13704 (method url-fetch)
13705 (uri (pypi-uri "regex" version))
13706 (sha256
13707 (base32
13708 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
13709 ;; TODO: Fix and enable regex_test.py tests that complain about the
13710 ;; test.support module not existing.
13711 (build-system python-build-system)
13712 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13713 (synopsis "Alternative regular expression module")
13714 (description "This regular expression implementation is backwards-
13715 compatible with the standard @code{re} module, but offers additional
13716 functionality like full case-folding for case-insensitive matches in Unicode.")
13717 (license license:psfl)))
13718
13719 (define-public python2-regex
13720 (package-with-python2 python-regex))
13721
13722 (define-public python2-pyopengl
13723 (package
13724 (name "python2-pyopengl")
13725 (version "3.1.0")
13726 (source
13727 (origin
13728 (method url-fetch)
13729 (uri (pypi-uri "PyOpenGL" version))
13730 (sha256
13731 (base32
13732 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13733 (arguments
13734 `(#:python ,python-2))
13735 (build-system python-build-system)
13736 (home-page "http://pyopengl.sourceforge.net")
13737 (synopsis "Standard OpenGL bindings for Python")
13738 (description
13739 "PyOpenGL is the most common cross platform Python binding to OpenGL and
13740 related APIs. The binding is created using the standard @code{ctypes}
13741 library.")
13742 (license license:bsd-3)))
13743
13744 (define-public python2-pyopengl-accelerate
13745 (package
13746 (inherit python2-pyopengl)
13747 (name "python2-pyopengl-accelerate")
13748 (version "3.1.0")
13749 (source
13750 (origin
13751 (method url-fetch)
13752 (uri (pypi-uri "PyOpenGL-accelerate" version))
13753 (sha256
13754 (base32
13755 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
13756 (synopsis "Acceleration code for PyOpenGL")
13757 (description
13758 "This is the Cython-coded accelerator module for PyOpenGL.")))
13759
13760 (define-public python-rencode
13761 (package
13762 (name "python-rencode")
13763 (version "1.0.5")
13764 (source
13765 (origin
13766 (method url-fetch)
13767 (uri (pypi-uri "rencode" version))
13768 (sha256
13769 (base32
13770 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
13771 (build-system python-build-system)
13772 (arguments
13773 `(#:phases
13774 (modify-phases %standard-phases
13775 (add-before 'check 'delete-bogus-test
13776 ;; This test requires /home/aresch/Downloads, which is not provided by
13777 ;; the build environment.
13778 (lambda _
13779 (delete-file "rencode/t.py")
13780 #t)))))
13781 (native-inputs `(("pkg-config" ,pkg-config)
13782 ("python-cython" ,python-cython)))
13783 (home-page "https://github.com/aresch/rencode")
13784 (synopsis "Serialization of heterogeneous data structures")
13785 (description
13786 "The @code{rencode} module is a data structure serialization library,
13787 similar to @code{bencode} from the BitTorrent project. For complex,
13788 heterogeneous data structures with many small elements, r-encoding stake up
13789 significantly less space than b-encodings. This version of rencode is a
13790 complete rewrite in Cython to attempt to increase the performance over the
13791 pure Python module.")
13792 (license license:bsd-3)))
13793
13794 (define-public python2-rencode
13795 (package-with-python2 python-rencode))
13796
13797 (define-public python-xenon
13798 (package
13799 (name "python-xenon")
13800 (version "0.5.4")
13801 (source
13802 (origin
13803 (method url-fetch)
13804 (uri (pypi-uri "xenon" version))
13805 (sha256
13806 (base32
13807 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
13808 (build-system python-build-system)
13809 (native-inputs
13810 `(("python-pyyaml" ,python-pyyaml)
13811 ("python-radon" ,python-radon)
13812 ("python-requests" ,python-requests)
13813 ("python-flake8" ,python-flake8)
13814 ("python-tox" ,python-tox)))
13815 (arguments
13816 `(#:phases
13817 (modify-phases %standard-phases
13818 (add-before 'build 'patch-test-requirements
13819 (lambda _
13820 ;; Remove httpretty dependency for tests.
13821 (substitute* "setup.py"
13822 (("httpretty") ""))
13823 #t)))))
13824 (home-page "https://xenon.readthedocs.org/")
13825 (synopsis "Monitor code metrics for Python on your CI server")
13826 (description
13827 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
13828 Ideally, @code{xenon} is run every time code is committed. Through command
13829 line options, various thresholds can be set for the complexity of code. It
13830 will fail (i.e. it will exit with a non-zero exit code) when any of these
13831 requirements is not met.")
13832 (license license:expat)))
13833
13834 (define-public python2-xenon
13835 (package-with-python2 python-xenon))
13836
13837 (define-public python-pysocks
13838 (package
13839 (name "python-pysocks")
13840 (version "1.7.0")
13841 (source
13842 (origin
13843 (method url-fetch)
13844 (uri (pypi-uri "PySocks" version))
13845 (sha256
13846 (base32
13847 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
13848 (build-system python-build-system)
13849 (arguments `(#:tests? #f))
13850 (home-page "https://github.com/Anorov/PySocks")
13851 (synopsis "SOCKS client module")
13852 (description "@code{pysocks} is an updated and semi-actively maintained
13853 version of @code{SocksiPy} with bug fixes and extra features.")
13854 (license license:bsd-3)))
13855
13856 (define-public python2-pysocks
13857 (package-with-python2 python-pysocks))
13858
13859 (define-public python-pydiff
13860 (package
13861 (name "python-pydiff")
13862 (version "0.2")
13863 (source
13864 (origin
13865 (method url-fetch)
13866 (uri (pypi-uri "pydiff" version))
13867 (sha256
13868 (base32
13869 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
13870 (build-system python-build-system)
13871 (home-page "https://github.com/myint/pydiff")
13872 (synopsis "Library to diff two Python files at the bytecode level")
13873 (description
13874 "@code{pydiff} makes it easy to look for actual code changes while
13875 ignoring formatting changes.")
13876 (license license:expat)))
13877
13878 (define-public python2-pydiff
13879 (package-with-python2 python-pydiff))
13880
13881 (define-public python-tqdm
13882 (package
13883 (name "python-tqdm")
13884 (version "4.19.6")
13885 (source
13886 (origin
13887 (method url-fetch)
13888 (uri (pypi-uri "tqdm" version))
13889 (sha256
13890 (base32
13891 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
13892 (build-system python-build-system)
13893 (native-inputs
13894 `(("python-flake8" ,python-flake8)
13895 ("python-nose" ,python-nose)
13896 ("python-coverage" ,python-coverage)))
13897 (home-page "https://github.com/tqdm/tqdm")
13898 (synopsis "Fast, extensible progress meter")
13899 (description
13900 "Make loops show a progress bar on the console by just wrapping any
13901 iterable with @code{|tqdm(iterable)|}. Offers many options to define
13902 design and layout.")
13903 (license (list license:mpl2.0 license:expat))
13904 (properties `((python2-variant . ,(delay python2-tqdm))))))
13905
13906 (define-public python2-tqdm
13907 (let ((tqdm (package-with-python2
13908 (strip-python2-variant python-tqdm))))
13909 (package (inherit tqdm)
13910 (native-inputs `(("python2-functools32" ,python2-functools32)
13911 ,@(package-native-inputs tqdm))))))
13912
13913 (define-public python-pkginfo
13914 (package
13915 (name "python-pkginfo")
13916 (version "1.4.2")
13917 (source
13918 (origin
13919 (method url-fetch)
13920 (uri (pypi-uri "pkginfo" version))
13921 (sha256
13922 (base32
13923 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
13924 (build-system python-build-system)
13925 (arguments
13926 ;; The tests are broken upstream.
13927 '(#:tests? #f))
13928 (home-page
13929 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
13930 (synopsis
13931 "Query metadatdata from sdists, bdists, and installed packages")
13932 (description
13933 "API to query the distutils metadata written in @file{PKG-INFO} inside a
13934 source distriubtion (an sdist) or a binary distribution (e.g., created by
13935 running bdist_egg). It can also query the EGG-INFO directory of an installed
13936 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
13937 created by running @code{python setup.py develop}).")
13938 (license license:expat)))
13939
13940 (define-public python2-pkginfo
13941 (package-with-python2 python-pkginfo))
13942
13943 (define-public python-twine
13944 (package
13945 (name "python-twine")
13946 (version "1.9.1")
13947 (source
13948 (origin
13949 (method url-fetch)
13950 (uri (pypi-uri "twine" version))
13951 (sha256
13952 (base32
13953 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
13954 (build-system python-build-system)
13955 (propagated-inputs
13956 `(("python-tqdm" ,python-tqdm)
13957 ("python-pkginfo" ,python-pkginfo)
13958 ("python-requests" ,python-requests)
13959 ("python-requests-toolbelt" ,python-requests-toolbelt)))
13960 (home-page "https://github.com/pypa/twine")
13961 (synopsis "Collection of utilities for interacting with PyPI")
13962 (description
13963 "@code{twine} currently supports registering projects and uploading
13964 distributions. It authenticates the user over HTTPS, allows them to pre-sign
13965 their files and supports any packaging format (including wheels).")
13966 (license license:asl2.0)))
13967
13968 (define-public python2-twine
13969 (package-with-python2 python-twine))
13970
13971 (define-public python-linecache2
13972 (package
13973 (name "python-linecache2")
13974 (version "1.0.0")
13975 (source
13976 (origin
13977 (method url-fetch)
13978 (uri (pypi-uri "linecache2" version))
13979 (sha256
13980 (base32
13981 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
13982 (build-system python-build-system)
13983 (arguments
13984 `(;; The tests depend on unittest2, and our version is a bit too old.
13985 #:tests? #f))
13986 (native-inputs
13987 `(("python-pbr" ,python-pbr-minimal)))
13988 (home-page
13989 "https://github.com/testing-cabal/linecache2")
13990 (synopsis "Backports of the linecache module")
13991 (description
13992 "The linecache module allows one to get any line from any file, while
13993 attempting to optimize internally, using a cache, the common case where many
13994 lines are read from a single file.")
13995 (license license:psfl)))
13996
13997 (define-public python2-linecache2
13998 (package-with-python2 python-linecache2))
13999
14000 (define-public python-traceback2
14001 (package
14002 (name "python-traceback2")
14003 (version "1.4.0")
14004 (source
14005 (origin
14006 (method url-fetch)
14007 (uri (pypi-uri "traceback2" version))
14008 (sha256
14009 (base32
14010 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
14011 (build-system python-build-system)
14012 (arguments
14013 `(;; python-traceback2 and python-unittest2 depend on one another.
14014 #:tests? #f))
14015 (native-inputs
14016 `(("python-pbr" ,python-pbr-minimal)))
14017 (propagated-inputs
14018 `(("python-linecache2" ,python-linecache2)))
14019 (home-page
14020 "https://github.com/testing-cabal/traceback2")
14021 (synopsis "Backports of the traceback module")
14022 (description
14023 "This module provides a standard interface to extract, format and print
14024 stack traces of Python programs. It exactly mimics the behavior of the Python
14025 interpreter when it prints a stack trace.")
14026 (license license:psfl)))
14027
14028 (define-public python2-traceback2
14029 (package-with-python2 python-traceback2))
14030
14031 (define-public python-ratelimiter
14032 (package
14033 (name "python-ratelimiter")
14034 (version "1.2.0")
14035 (source
14036 (origin
14037 (method url-fetch)
14038 (uri (pypi-uri "ratelimiter" version))
14039 (sha256
14040 (base32
14041 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
14042 (build-system python-build-system)
14043 (arguments
14044 '(#:tests? #f)) ; There are no tests in the pypi archive.
14045 (home-page "https://github.com/RazerM/ratelimiter")
14046 (synopsis "Simple rate limiting object")
14047 (description
14048 "The @code{ratelimiter} module ensures that an operation will not be
14049 executed more than a given number of times during a given period.")
14050 (license license:asl2.0)))
14051
14052 (define-public python2-ratelimiter
14053 (package-with-python2 python-ratelimiter))
14054
14055 (define-public python-dukpy
14056 (package
14057 (name "python-dukpy")
14058 (version "0.3")
14059 (source
14060 (origin
14061 (method git-fetch)
14062 (uri (git-reference
14063 (url "https://github.com/kovidgoyal/dukpy.git")
14064 (commit (string-append "v" version))))
14065 (file-name (git-file-name name version))
14066 (sha256
14067 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
14068 (build-system python-build-system)
14069 (home-page "https://github.com/kovidgoyal/dukpy")
14070 (synopsis "Run JavaScript in python")
14071 (description
14072 "dukpy is a JavaScript runtime environment for Python using the duktape
14073 embeddable JavaScript engine.")
14074 ;; Dukpy is licensed under MIT like the embedded duktape library,
14075 ;; with 'errors.c' as GPL3.
14076 (license (list license:expat license:gpl3))))
14077
14078 (define-public python2-dukpy
14079 (package-with-python2 python-dukpy))
14080
14081 (define-public python-jsonrpclib-pelix
14082 (package
14083 (name "python-jsonrpclib-pelix")
14084 (version "0.3.2")
14085 (source
14086 (origin
14087 (method url-fetch)
14088 (uri (pypi-uri "jsonrpclib-pelix" version))
14089 (sha256
14090 (base32
14091 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
14092 (build-system python-build-system)
14093 (arguments
14094 `(#:tests? #f)) ; no tests in PyPI tarball
14095 (home-page "https://github.com/tcalmant/jsonrpclib/")
14096 (synopsis "JSON-RPC 2.0 client library for Python")
14097 (description
14098 "This library implements the JSON-RPC v2.0
14099 specification (backwards-compatible) as a client library for Python. This
14100 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
14101 services.")
14102 (license license:asl2.0)))
14103
14104 (define-public python2-jsonrpclib-pelix
14105 (package-with-python2 python-jsonrpclib-pelix))
14106
14107 (define-public python-setuptools-scm-git-archive
14108 (package
14109 (name "python-setuptools-scm-git-archive")
14110 (version "1.0")
14111 (source
14112 (origin
14113 (method url-fetch)
14114 (uri (pypi-uri "setuptools_scm_git_archive" version))
14115 (sha256
14116 (base32
14117 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
14118 (build-system python-build-system)
14119 (native-inputs
14120 `(("python-pytest" ,python-pytest)))
14121 (propagated-inputs
14122 `(("python-setuptools-scm" ,python-setuptools-scm)))
14123 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
14124 (synopsis "Setuptools_scm plugin for git archives")
14125 (description
14126 "The setuptools_scm_git_archive package is a plugin to
14127 setuptools_scm, which supports obtaining versions from git archives that
14128 belong to tagged versions.")
14129 (license license:expat)))
14130
14131 (define-public python2-setuptools-scm-git-archive
14132 (package-with-python2 python-setuptools-scm-git-archive))
14133
14134 (define-public python-setuptools-git
14135 (package
14136 (name "python-setuptools-git")
14137 (version "1.2")
14138 (source
14139 (origin
14140 (method url-fetch)
14141 (uri (pypi-uri "setuptools-git" version))
14142 (sha256
14143 (base32
14144 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
14145 (build-system python-build-system)
14146 (arguments
14147 `(#:phases
14148 (modify-phases %standard-phases
14149 ;; This is needed for tests.
14150 (add-after 'unpack 'configure-git
14151 (lambda _
14152 (setenv "HOME" "/tmp")
14153 (invoke "git" "config" "--global" "user.email" "guix")
14154 (invoke "git" "config" "--global" "user.name" "guix")
14155 #t)))))
14156 (native-inputs
14157 `(("git" ,git-minimal)))
14158 (home-page "https://github.com/msabramo/setuptools-git")
14159 (synopsis "Setuptools revision control system plugin for Git")
14160 (description
14161 "This package provides a plugin for Setuptools for revision control with
14162 Git.")
14163 (license license:bsd-3)))
14164
14165 (define-public python-pyclipper
14166 (package
14167 (name "python-pyclipper")
14168 (version "1.1.0.post3")
14169 (source
14170 (origin
14171 (method url-fetch)
14172 (uri (pypi-uri "pyclipper" version ".zip"))
14173 (sha256
14174 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
14175 (modules '((guix build utils)))
14176 (snippet
14177 '(begin
14178 ;; This file is generated by Cython.
14179 (delete-file "pyclipper/pyclipper.cpp") #t))))
14180 (build-system python-build-system)
14181 (arguments
14182 `(#:phases
14183 (modify-phases %standard-phases
14184 (add-before 'build 'cythonize-sources
14185 (lambda _
14186 (with-directory-excursion "pyclipper"
14187 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
14188 (propagated-inputs
14189 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
14190 (native-inputs
14191 `(("python-cython" ,python-cython)
14192 ("python-pytest" ,python-pytest)
14193 ("python-pytest-runner" ,python-pytest-runner)
14194 ("python-unittest2" ,python-unittest2)
14195 ("unzip" ,unzip)))
14196 (home-page "https://github.com/greginvm/pyclipper")
14197 (synopsis "Wrapper for Angus Johnson's Clipper library")
14198 (description
14199 "Pyclipper is a Cython wrapper for the C++ translation of the
14200 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
14201 (license license:expat)))
14202
14203 (define-public python2-pyclipper
14204 (package-with-python2 python-pyclipper))
14205
14206 (define-public python2-booleanoperations
14207 (package
14208 (name "python2-booleanoperations")
14209 (version "0.7.1")
14210 (source
14211 (origin
14212 (method url-fetch)
14213 (uri (pypi-uri "booleanOperations" version ".zip"))
14214 (sha256
14215 (base32
14216 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
14217 (build-system python-build-system)
14218 (arguments
14219 `(#:python ,python-2))
14220 (native-inputs
14221 `(("unzip" ,unzip)
14222 ("python2-pytest" ,python2-pytest)
14223 ("python2-pytest-runner" ,python2-pytest-runner)))
14224 (propagated-inputs
14225 `(("python-fonttools" ,python2-fonttools)
14226 ("python-pyclipper" ,python2-pyclipper)
14227 ("python-ufolib" ,python2-ufolib)))
14228 (home-page "https://github.com/typemytype/booleanOperations")
14229 (synopsis "Boolean operations on paths")
14230 (description
14231 "BooleanOperations provides a Python library that enables
14232 boolean operations on paths.")
14233 (license license:expat)))
14234
14235 (define-public python-tempdir
14236 (package
14237 (name "python-tempdir")
14238 (version "0.7.1")
14239 (source
14240 (origin
14241 (method url-fetch)
14242 (uri (pypi-uri "tempdir" version))
14243 (sha256
14244 (base32
14245 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
14246 (build-system python-build-system)
14247 (home-page "https://pypi.org/project/tempdir/")
14248 (arguments
14249 ;; the package has no tests
14250 '(#:tests? #f))
14251 (synopsis "Python library for managing temporary directories")
14252 (description
14253 "This library manages temporary directories that are automatically
14254 deleted with all their contents when they are no longer needed. It is
14255 particularly convenient for use in tests.")
14256 (license license:expat)))
14257
14258 (define-public python2-tempdir
14259 (package-with-python2 python-tempdir))
14260
14261 (define-public python-activepapers
14262 (package
14263 (name "python-activepapers")
14264 (version "0.2.2")
14265 (source
14266 (origin
14267 (method url-fetch)
14268 (uri (pypi-uri "ActivePapers.Py" version))
14269 (sha256
14270 (base32
14271 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
14272 (build-system python-build-system)
14273 (arguments
14274 `(#:modules ((ice-9 ftw)
14275 (srfi srfi-1)
14276 (guix build utils)
14277 (guix build python-build-system))
14278
14279 #:phases
14280 (modify-phases %standard-phases
14281 (add-after 'unpack 'delete-python2-code
14282 (lambda _
14283 (for-each delete-file
14284 '("lib/activepapers/builtins2.py"
14285 "lib/activepapers/standardlib2.py"
14286 "lib/activepapers/utility2.py"))))
14287 (replace 'check
14288 (lambda _
14289 ;; Deactivate the test cases that download files
14290 (setenv "NO_NETWORK_ACCESS" "1")
14291 ;; For some strange reason, some tests fail if nosetests runs all
14292 ;; test modules in a single execution. They pass if each test
14293 ;; module is run individually.
14294 (for-each (lambda (filename)
14295 (invoke "nosetests"
14296 (string-append "tests/" filename)))
14297 (scandir "tests"
14298 (lambda (filename)
14299 (string-suffix? ".py" filename)))))))))
14300 (native-inputs
14301 `(("python-tempdir" ,python-tempdir)
14302 ("python-nose" ,python-nose)))
14303 (propagated-inputs
14304 `(("python-h5py" ,python-h5py)))
14305 (home-page "http://www.activepapers.org/")
14306 (synopsis "Executable papers for scientific computing")
14307 (description
14308 "ActivePapers is a tool for working with executable papers, which
14309 combine data, code, and documentation in single-file packages,
14310 suitable for publication as supplementary material or on repositories
14311 such as figshare or Zenodo.")
14312 (properties `((python2-variant . ,(delay python2-activepapers))))
14313 (license license:bsd-3)))
14314
14315 (define-public python2-activepapers
14316 (let ((base (package-with-python2
14317 (strip-python2-variant python-activepapers))))
14318 (package
14319 (inherit base)
14320 (arguments
14321 (substitute-keyword-arguments (package-arguments base)
14322 ((#:phases phases)
14323 `(modify-phases ,phases
14324 (delete 'delete-python2-code)
14325 (add-after 'unpack 'delete-python3-code
14326 (lambda _
14327 (for-each delete-file
14328 '("lib/activepapers/builtins3.py"
14329 "lib/activepapers/standardlib3.py"
14330 "lib/activepapers/utility3.py")))))))))))
14331
14332 (define-public python-semver
14333 (package
14334 (name "python-semver")
14335 (version "2.9.0")
14336 (source
14337 (origin
14338 (method url-fetch)
14339 (uri (pypi-uri "semver" version))
14340 (sha256
14341 (base32
14342 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
14343 (build-system python-build-system)
14344 (native-inputs
14345 `(("python-tox" ,python-tox)
14346 ("python-virtualenv" ,python-virtualenv)))
14347 (home-page "https://github.com/k-bx/python-semver")
14348 (synopsis "Python helper for Semantic Versioning")
14349 (description "This package provides a Python library for
14350 @url{Semantic Versioning, http://semver.org/}.")
14351 (license license:bsd-3)))
14352
14353 (define-public python2-semver
14354 (package-with-python2 python-semver))
14355
14356 (define-public python-pyro4
14357 (package
14358 (name "python-pyro4")
14359 (version "4.77")
14360 (source
14361 (origin
14362 (method url-fetch)
14363 (uri (pypi-uri "Pyro4" version))
14364 (sha256
14365 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
14366 (build-system python-build-system)
14367 (arguments
14368 '(#:tests? #f)) ;FIXME: Some tests require network access.
14369 (native-inputs
14370 `(("python-cloudpickle" ,python-cloudpickle)
14371 ("python-dill" ,python-dill)
14372 ("python-msgpack" ,python-msgpack)))
14373 (propagated-inputs
14374 `(("python-serpent" ,python-serpent)))
14375 (home-page "https://pyro4.readthedocs.io")
14376 (synopsis "Distributed object middleware for Python")
14377 (description
14378 "Pyro enables you to build applications in which objects can talk to each
14379 other over the network. You can just use normal Python method calls to call
14380 objects on other machines, also known as remote procedure calls (RPC).")
14381 (license license:expat)))
14382
14383 (define-public python2-pyro
14384 (package
14385 (name "python2-pyro")
14386 (version "3.16")
14387 (source
14388 (origin
14389 (method url-fetch)
14390 (uri (pypi-uri "Pyro" version))
14391 (file-name (string-append "Pyro-" version ".tar.gz"))
14392 (sha256
14393 (base32
14394 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
14395 (build-system python-build-system)
14396 (arguments
14397 ;; Pyro is not compatible with Python 3
14398 `(#:python ,python-2
14399 ;; Pyro has no test cases for automatic execution
14400 #:tests? #f))
14401 (home-page "http://pythonhosted.org/Pyro/")
14402 (synopsis "Distributed object manager for Python")
14403 (description "Pyro is a Distributed Object Technology system
14404 written in Python that is designed to be easy to use. It resembles
14405 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
14406 which is a system and language independent Distributed Object Technology
14407 and has much more to offer than Pyro or RMI. Pyro 3.x is no
14408 longer maintained. New projects should use Pyro4 instead, which
14409 is the new Pyro version that is actively developed.")
14410 (license license:expat)))
14411
14412 (define-public python2-scientific
14413 (package
14414 (name "python2-scientific")
14415 (version "2.9.4")
14416 (source
14417 (origin
14418 (method git-fetch)
14419 (uri (git-reference
14420 (url "https://github.com/khinsen/ScientificPython")
14421 (commit (string-append "rel" version))))
14422 (file-name (git-file-name name version))
14423 (sha256
14424 (base32
14425 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
14426 (build-system python-build-system)
14427 (inputs
14428 `(("netcdf" ,netcdf)))
14429 (propagated-inputs
14430 `(("python-numpy" ,python2-numpy-1.8)
14431 ("python-pyro" ,python2-pyro)))
14432 (arguments
14433 ;; ScientificPython is not compatible with Python 3
14434 `(#:python ,python-2
14435 #:tests? #f ; No test suite
14436 #:phases
14437 (modify-phases %standard-phases
14438 (replace 'build
14439 (lambda* (#:key inputs #:allow-other-keys)
14440 (invoke "python" "setup.py" "build"
14441 (string-append "--netcdf_prefix="
14442 (assoc-ref inputs "netcdf"))))))))
14443 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
14444 (synopsis "Python modules for scientific computing")
14445 (description "ScientificPython is a collection of Python modules that are
14446 useful for scientific computing. Most modules are rather general (Geometry,
14447 physical units, automatic derivatives, ...) whereas others are more
14448 domain-specific (e.g. netCDF and PDB support). The library is currently
14449 not actively maintained and works only with Python 2 and NumPy < 1.9.")
14450 (license license:cecill-c)))
14451
14452 (define-public python2-mmtk
14453 (package
14454 (name "python2-mmtk")
14455 (version "2.7.12")
14456 (source
14457 (origin
14458 (method git-fetch)
14459 (uri (git-reference
14460 (url "https://github.com/khinsen/MMTK")
14461 (commit (string-append "rel" version))))
14462 (file-name (git-file-name name version))
14463 (sha256
14464 (base32
14465 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
14466 (build-system python-build-system)
14467 (native-inputs
14468 `(("netcdf" ,netcdf)))
14469 (propagated-inputs
14470 `(("python-scientific" ,python2-scientific)
14471 ("python-tkinter" ,python-2 "tk")))
14472 (arguments
14473 `(#:python ,python-2
14474 #:tests? #f
14475 #:phases
14476 (modify-phases %standard-phases
14477 (add-before 'build 'includes-from-scientific
14478 (lambda* (#:key inputs #:allow-other-keys)
14479 (mkdir-p "Include/Scientific")
14480 (copy-recursively
14481 (string-append
14482 (assoc-ref inputs "python-scientific")
14483 "/include/python2.7/Scientific")
14484 "Include/Scientific"))))))
14485 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
14486 (synopsis "Python library for molecular simulation")
14487 (description "MMTK is a library for molecular simulations with an emphasis
14488 on biomolecules. It provides widely used methods such as Molecular Dynamics
14489 and normal mode analysis, but also basic routines for implementing new methods
14490 for simulation and analysis. The library is currently not actively maintained
14491 and works only with Python 2 and NumPy < 1.9.")
14492 (license license:cecill-c)))
14493
14494 (define-public python-phonenumbers
14495 (package
14496 (name "python-phonenumbers")
14497 (version "8.9.1")
14498 (source
14499 (origin
14500 (method url-fetch)
14501 (uri (pypi-uri "phonenumbers" version))
14502 (sha256
14503 (base32
14504 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
14505 (build-system python-build-system)
14506 (home-page
14507 "https://github.com/daviddrysdale/python-phonenumbers")
14508 (synopsis
14509 "Python library for dealing with international phone numbers")
14510 (description
14511 "This package provides a Python port of Google's libphonenumber library.")
14512 (license license:asl2.0)))
14513
14514 (define-public python2-phonenumbers
14515 (package-with-python2 python-phonenumbers))
14516
14517 (define-public python-send2trash
14518 (package
14519 (name "python-send2trash")
14520 (version "1.5.0")
14521 (source
14522 (origin (method git-fetch)
14523 ;; Source tarball on PyPI doesn't include tests.
14524 (uri (git-reference
14525 (url "https://github.com/hsoft/send2trash.git")
14526 (commit version)))
14527 (file-name (git-file-name name version))
14528 (sha256
14529 (base32
14530 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
14531 (build-system python-build-system)
14532 (arguments
14533 '(#:phases
14534 (modify-phases %standard-phases
14535 (add-before 'check 'pre-check
14536 (lambda _
14537 (mkdir-p "/tmp/foo")
14538 (setenv "HOME" "/tmp/foo")
14539 #t)))))
14540 (home-page "https://github.com/hsoft/send2trash")
14541 (synopsis "Send files to the user's @file{~/Trash} directory")
14542 (description "This package provides a Python library to send files to the
14543 user's @file{~/Trash} directory.")
14544 (properties `((python2-variant . ,(delay python2-send2trash))))
14545 (license license:bsd-3)))
14546
14547 (define-public python2-send2trash
14548 (package
14549 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
14550 (arguments
14551 (substitute-keyword-arguments (package-arguments python-send2trash)
14552 ((#:phases phases)
14553 `(modify-phases ,phases
14554 (add-before 'check 'setenv
14555 (lambda _
14556 (setenv "PYTHONPATH"
14557 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
14558 #t))))))))
14559
14560 (define-public python-yapf
14561 (package
14562 (name "python-yapf")
14563 (version "0.29.0")
14564 (source
14565 (origin
14566 (method url-fetch)
14567 (uri (pypi-uri "yapf" version))
14568 (sha256
14569 (base32
14570 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
14571 (build-system python-build-system)
14572 (home-page "https://github.com/google/yapf")
14573 (synopsis "Formatter for Python code")
14574 (description "YAPF is a formatter for Python code. It's based off of
14575 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
14576 takes the code and reformats it to the best formatting that conforms to the
14577 style guide, even if the original code didn't violate the style guide.")
14578 (license license:asl2.0)))
14579
14580 (define-public python2-yapf
14581 (package-with-python2 python-yapf))
14582
14583 (define-public python-gyp
14584 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
14585 (revision "0"))
14586 (package
14587 (name "python-gyp")
14588 ;; Google does not release versions,
14589 ;; based on second most recent commit date.
14590 (version (git-version "0.0.0" revision commit))
14591 (source
14592 (origin
14593 ;; Google does not release tarballs,
14594 ;; git checkout is needed.
14595 (method git-fetch)
14596 (uri (git-reference
14597 (url "https://chromium.googlesource.com/external/gyp")
14598 (commit commit)))
14599 (file-name (git-file-name name version))
14600 (sha256
14601 (base32
14602 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14603 (build-system python-build-system)
14604 (home-page "https://gyp.gsrc.io/")
14605 (synopsis "GYP is a Meta-Build system")
14606 (description
14607 "GYP builds build systems for large, cross platform applications.
14608 It can be used to generate XCode projects, Visual Studio projects, Ninja build
14609 files, and Makefiles.")
14610 (license license:bsd-3))))
14611
14612 (define-public python2-gyp
14613 (package-with-python2 python-gyp))
14614
14615 (define-public python-whatever
14616 (package
14617 (name "python-whatever")
14618 (version "0.6")
14619 (source
14620 (origin
14621 (method url-fetch)
14622 (uri (string-append "https://github.com/Suor/whatever/archive/" version
14623 ".tar.gz"))
14624 (sha256
14625 (base32 "1rchg9hrlvw4sn20lq1zspczr4x1pv57c02gv73igiqx1hqpy2nc"))
14626 (file-name (string-append name "-" version ".tar.gz"))))
14627 (build-system python-build-system)
14628 (arguments
14629 `(#:phases
14630 (modify-phases %standard-phases
14631 (replace 'check
14632 (lambda _
14633 (invoke "py.test"))))))
14634 (native-inputs
14635 `(("python-pytest" ,python-pytest)))
14636 (home-page "http://github.com/Suor/whatever")
14637 (synopsis "Make anonymous functions by partial application of operators")
14638 (description "@code{whatever} provides an easy way to make anonymous
14639 functions by partial application of operators.")
14640 (license license:bsd-3)))
14641
14642 (define-public python2-whatever
14643 (package-with-python2 python-whatever))
14644
14645 (define-public python-funcy
14646 (package
14647 (name "python-funcy")
14648 (version "1.11")
14649 (source
14650 (origin
14651 (method git-fetch)
14652 (uri (git-reference
14653 (url "https://github.com/Suor/funcy.git")
14654 (commit version)))
14655 (sha256
14656 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14657 (file-name (git-file-name name version))))
14658 (build-system python-build-system)
14659 (arguments
14660 `(#:phases
14661 (modify-phases %standard-phases
14662 (replace 'check
14663 (lambda _
14664 (invoke "py.test"))))))
14665 (native-inputs
14666 `(("python-pytest" ,python-pytest)
14667 ("python-whatever" ,python-whatever)))
14668 (home-page "http://github.com/Suor/funcy")
14669 (synopsis "Functional tools")
14670 (description "@code{funcy} is a library that provides functional tools.
14671 Examples are:
14672 @enumerate
14673 @item merge - Merges collections of the same type
14674 @item walk - Type-preserving map
14675 @item select - Selects a part of a collection
14676 @item take - Takes the first n items of a collection
14677 @item first - Takes the first item of a collection
14678 @item remove - Predicated-removes items of a collection
14679 @item concat - Concatenates two collections
14680 @item flatten - Flattens a collection with subcollections
14681 @item distinct - Returns only distinct items
14682 @item split - Predicated-splits a collection
14683 @item split_at - Splits a collection at a given item
14684 @item group_by - Groups items by group
14685 @item pairwise - Pairs off adjacent items
14686 @item partial - Partially-applies a function
14687 @item curry - Curries a function
14688 @item compose - Composes functions
14689 @item complement - Complements a predicate
14690 @item all_fn - \"all\" with predicate
14691 @end enumerate")
14692 (license license:bsd-3)))
14693
14694 (define-public python2-funcy
14695 (package-with-python2 python-funcy))
14696
14697 (define-public python-isoweek
14698 (package
14699 (name "python-isoweek")
14700 (version "1.3.3")
14701 (source
14702 (origin
14703 (method url-fetch)
14704 (uri (pypi-uri "isoweek" version))
14705 (sha256
14706 (base32
14707 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14708 (build-system python-build-system)
14709 (home-page "https://github.com/gisle/isoweek")
14710 (synopsis "Objects representing a week")
14711 (description "The @code{isoweek} module provide the class Week that
14712 implements the week definition of ISO 8601. This standard also defines
14713 a notation for identifying weeks; yyyyWww (where the W is a literal).
14714 Week instances stringify to this form.")
14715 (license license:bsd-3)))
14716
14717 (define-public python2-isoweek
14718 (package-with-python2 python-isoweek))
14719
14720 (define-public python-tokenize-rt
14721 (package
14722 (name "python-tokenize-rt")
14723 (version "2.0.1")
14724 (source
14725 (origin
14726 (method url-fetch)
14727 (uri (pypi-uri "tokenize-rt" version))
14728 (sha256
14729 (base32
14730 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14731 (build-system python-build-system)
14732 (home-page "https://github.com/asottile/tokenize-rt")
14733 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14734 (description
14735 "This Python library is a wrapper around @code{tokenize} from the Python
14736 standard library. It provides two additional tokens @code{ESCAPED_NL} and
14737 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14738 and @code{tokens_to_src} to roundtrip.")
14739 (license license:expat)))
14740
14741 (define-public python-future-fstrings
14742 (package
14743 (name "python-future-fstrings")
14744 (version "0.4.1")
14745 (source
14746 (origin
14747 (method url-fetch)
14748 (uri (pypi-uri "future_fstrings" version))
14749 (sha256
14750 (base32
14751 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14752 (build-system python-build-system)
14753 (propagated-inputs
14754 `(("python-tokenize-rt" ,python-tokenize-rt)))
14755 (home-page "https://github.com/asottile/future-fstrings")
14756 (synopsis "Backport of fstrings to Python < 3.6")
14757 (description
14758 "This package provides a UTF-8 compatible encoding
14759 @code{future_fstrings}, which performs source manipulation. It decodes the
14760 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
14761 @code{f} strings.")
14762 (license license:expat)))
14763
14764 (define-public python-typed-ast
14765 (package
14766 (name "python-typed-ast")
14767 (version "1.4.0")
14768 (source
14769 (origin
14770 (method git-fetch)
14771 (uri (git-reference
14772 (url "https://github.com/python/typed_ast.git")
14773 (commit version)))
14774 (sha256
14775 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
14776 (file-name (git-file-name name version))))
14777 (build-system python-build-system)
14778 (arguments
14779 `(#:modules ((guix build utils)
14780 (guix build python-build-system)
14781 (ice-9 ftw)
14782 (srfi srfi-1)
14783 (srfi srfi-26))
14784 #:phases
14785 (modify-phases %standard-phases
14786 (replace 'check
14787 (lambda _
14788 (let ((cwd (getcwd)))
14789 (setenv "PYTHONPATH"
14790 (string-append cwd "/build/"
14791 (find (cut string-prefix? "lib" <>)
14792 (scandir (string-append cwd "/build")))
14793 ":"
14794 (getenv "PYTHONPATH"))))
14795 (invoke "pytest")
14796 #t)))))
14797 (native-inputs `(("python-pytest" ,python-pytest)))
14798 (home-page "https://github.com/python/typed_ast")
14799 (synopsis "Fork of Python @code{ast} modules with type comment support")
14800 (description "This package provides a parser similar to the standard
14801 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
14802 include PEP 484 type comments and are independent of the version of Python
14803 under which they are run. The @code{typed_ast} parsers produce the standard
14804 Python AST (plus type comments), and are both fast and correct, as they are
14805 based on the CPython 2.7 and 3.7 parsers.")
14806 ;; See the file "LICENSE" for the details.
14807 (license (list license:psfl
14808 license:asl2.0
14809 license:expat)))) ;ast27/Parser/spark.py
14810
14811 (define-public python-typing
14812 (package
14813 (name "python-typing")
14814 (version "3.6.6")
14815 (source
14816 (origin
14817 (method url-fetch)
14818 (uri (pypi-uri "typing" version))
14819 (sha256
14820 (base32
14821 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
14822 (build-system python-build-system)
14823 (home-page "https://docs.python.org/3/library/typing.html")
14824 (synopsis "Type hints for Python")
14825 (description "This is a backport of the standard library @code{typing}
14826 module to Python versions older than 3.5. Typing defines a standard notation
14827 for Python function and variable type annotations. The notation can be used
14828 for documenting code in a concise, standard format, and it has been designed
14829 to also be used by static and runtime type checkers, static analyzers, IDEs
14830 and other tools.")
14831 (license license:psfl)))
14832
14833 (define-public python2-typing
14834 (package-with-python2 python-typing))
14835
14836 (define-public python-typing-extensions
14837 (package
14838 (name "python-typing-extensions")
14839 (version "3.7.2")
14840 (source
14841 (origin
14842 (method url-fetch)
14843 (uri (pypi-uri "typing_extensions" version))
14844 (sha256
14845 (base32
14846 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
14847 (build-system python-build-system)
14848 (home-page
14849 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
14850 (synopsis "Experimental type hints for Python")
14851 (description
14852 "The typing_extensions module contains additional @code{typing} hints not
14853 yet present in the of the @code{typing} standard library.
14854 Included are implementations of:
14855 @enumerate
14856 @item ClassVar
14857 @item ContextManager
14858 @item Counter
14859 @item DefaultDict
14860 @item Deque
14861 @item NewType
14862 @item NoReturn
14863 @item overload
14864 @item Protocol
14865 @item runtime
14866 @item Text
14867 @item Type
14868 @item TYPE_CHECKING
14869 @item AsyncGenerator
14870 @end enumerate\n")
14871 (license license:psfl)))
14872
14873 (define-public bpython
14874 (package
14875 (name "bpython")
14876 (version "0.18")
14877 (source
14878 (origin
14879 (method url-fetch)
14880 (uri (pypi-uri "bpython" version))
14881 (sha256
14882 (base32 "1hl6frgvr2lqaxqczl8amg9xih32b3gzv429vs0qrjb8wpdj1k2n"))))
14883 (build-system python-build-system)
14884 (arguments
14885 `(#:phases
14886 (modify-phases %standard-phases
14887 (add-after 'unpack 'remove-failing-test
14888 (lambda _
14889 ;; Remove failing test. FIXME: make it pass
14890 (delete-file "bpython/test/test_args.py")
14891 #t))
14892 (add-after 'wrap 'add-aliases
14893 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
14894 (lambda* (#:key outputs #:allow-other-keys)
14895 (let ((out (assoc-ref outputs "out")))
14896 (for-each
14897 (lambda (old new)
14898 (symlink old (string-append out "/bin/" new)))
14899 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
14900 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
14901 #t)))))
14902 (propagated-inputs
14903 `(("python-pygments" ,python-pygments)
14904 ("python-requests" ,python-requests)
14905 ("python-babel" ,python-babel) ; optional, for internationalization
14906 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
14907 ("python-greenlet" ,python-greenlet)
14908 ("python-urwid" ,python-urwid) ; for bpython-urwid only
14909 ("python-six" ,python-six)))
14910 (native-inputs
14911 `(("python-sphinx" ,python-sphinx)
14912 ("python-mock" ,python-mock)))
14913 (home-page "https://bpython-interpreter.org/")
14914 (synopsis "Fancy interface to the Python interpreter")
14915 (description "Bpython is a fancy interface to the Python
14916 interpreter. bpython's main features are
14917
14918 @enumerate
14919 @item in-line syntax highlighting,
14920 @item readline-like autocomplete with suggestions displayed as you type,
14921 @item expected parameter list for any Python function,
14922 @item \"rewind\" function to pop the last line of code from memory and
14923 re-evaluate,
14924 @item send the code you've entered off to a pastebin,
14925 @item save the code you've entered to a file, and
14926 @item auto-indentation.
14927 @end enumerate")
14928 (license license:expat)))
14929
14930 (define-public bpython2
14931 (let ((base (package-with-python2
14932 (strip-python2-variant bpython))))
14933 (package (inherit base)
14934 (name "bpython2")
14935 (arguments
14936 `(#:python ,python-2
14937 #:phases
14938 (modify-phases %standard-phases
14939 (add-after 'unpack 'remove-failing-test
14940 (lambda _
14941 ;; Remove failing test. FIXME: make it pass
14942 (delete-file "bpython/test/test_args.py")
14943 ;; Disable failing test-cases (renaming inhibits they are
14944 ;; discovered)
14945 (substitute* "bpython/test/test_curtsies_repl.py"
14946 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
14947 (string-append a "xxx_off_" b))
14948 (("^(\\s*def )(test_complex\\W)" _ a b)
14949 (string-append a "xxx_off_" b)))
14950 #t))
14951 (add-before 'build 'rename-scripts
14952 ;; rename the scripts to bypthon2, bpdb2, etc.
14953 (lambda _
14954 (substitute* "setup.py"
14955 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
14956 (string-append name "2" rest "\n"))
14957 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
14958 (string-append name "2" (or sub "") rest "\n")))
14959 #t))))))))
14960
14961 (define-public python-pyinotify
14962 (package
14963 (name "python-pyinotify")
14964 (version "0.9.6")
14965 (source (origin
14966 (method url-fetch)
14967 (uri (pypi-uri "pyinotify" version))
14968 (sha256
14969 (base32
14970 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
14971 (build-system python-build-system)
14972 (arguments `(#:tests? #f)) ;no tests
14973 (home-page "https://github.com/seb-m/pyinotify")
14974 (synopsis "Python library for monitoring inotify events")
14975 (description
14976 "@code{pyinotify} provides a Python interface for monitoring
14977 file system events on Linux.")
14978 (license license:expat)))
14979
14980 (define-public python2-pyinotify
14981 (package-with-python2 python-pyinotify))
14982
14983 ;; Ada parser uses this version.
14984 (define-public python2-quex-0.67.3
14985 (package
14986 (name "python2-quex")
14987 (version "0.67.3")
14988 (source
14989 (origin
14990 (method url-fetch)
14991 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
14992 (version-major+minor version)
14993 "/quex-" version ".zip"))
14994 (sha256
14995 (base32
14996 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
14997 (build-system python-build-system)
14998 (native-inputs
14999 `(("unzip" ,unzip)))
15000 (arguments
15001 `(#:python ,python-2
15002 #:tests? #f
15003 #:phases
15004 (modify-phases %standard-phases
15005 (delete 'configure)
15006 (delete 'build)
15007 (replace 'install
15008 (lambda* (#:key outputs #:allow-other-keys)
15009 (let* ((out (assoc-ref outputs "out"))
15010 (share/quex (string-append out "/share/quex"))
15011 (bin (string-append out "/bin")))
15012 (copy-recursively "." share/quex)
15013 (mkdir-p bin)
15014 (symlink (string-append share/quex "/quex-exe.py")
15015 (string-append bin "/quex"))
15016 #t))))))
15017 (native-search-paths
15018 (list (search-path-specification
15019 (variable "QUEX_PATH")
15020 (files '("share/quex")))))
15021 (home-page "http://quex.sourceforge.net/")
15022 (synopsis "Lexical analyzer generator in Python")
15023 (description "@code{quex} is a lexical analyzer generator in Python.")
15024 (license license:lgpl2.1+))) ; Non-military
15025
15026 (define-public python2-quex
15027 (package (inherit python2-quex-0.67.3)
15028 (name "python2-quex")
15029 (version "0.68.1")
15030 (source
15031 (origin
15032 (method url-fetch)
15033 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
15034 (sha256
15035 (base32
15036 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
15037 (file-name (string-append name "-" version ".tar.gz"))))))
15038
15039 (define-public python-more-itertools
15040 (package
15041 (name "python-more-itertools")
15042 (version "7.1.0")
15043 (source
15044 (origin
15045 (method url-fetch)
15046 (uri (pypi-uri "more-itertools" version))
15047 (sha256
15048 (base32
15049 "16phg2f2dvm6ci5wr49ncha5lmc0m2in3bsl33c61vzca4gkvd4b"))))
15050 (build-system python-build-system)
15051 (home-page "https://github.com/erikrose/more-itertools")
15052 (synopsis "More routines for operating on iterables, beyond itertools")
15053 (description "Python's built-in @code{itertools} module implements a
15054 number of iterator building blocks inspired by constructs from APL, Haskell,
15055 and SML. @code{more-itertools} includes additional building blocks for
15056 working with iterables.")
15057 (properties `((python2-variant . ,(delay python2-more-itertools))))
15058 (license license:expat)))
15059
15060 ;; The 5.x series are the last versions supporting Python 2.7.
15061 (define-public python2-more-itertools
15062 (package
15063 (inherit python-more-itertools)
15064 (name "python2-more-itertools")
15065 (version "5.0.0")
15066 (source (origin
15067 (method url-fetch)
15068 (uri (pypi-uri "more-itertools" version))
15069 (sha256
15070 (base32
15071 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
15072 (arguments
15073 `(#:python ,python2-minimal))
15074 (propagated-inputs
15075 `(("python2-six" ,python2-six-bootstrap)))))
15076
15077 (define-public python-latexcodec
15078 (package
15079 (name "python-latexcodec")
15080 (version "1.0.7")
15081 (source
15082 (origin
15083 (method url-fetch)
15084 (uri (pypi-uri "latexcodec" version))
15085 (sha256
15086 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
15087 (build-system python-build-system)
15088 (inputs
15089 `(("python-six" ,python-six)))
15090 (home-page "https://readthedocs.org/projects/latexcodec/")
15091 (synopsis "Work with LaTeX code in Python")
15092 (description "Lexer and codec to work with LaTeX code in Python.")
15093 (license license:expat)))
15094
15095 (define-public python-pybtex
15096 (package
15097 (name "python-pybtex")
15098 (version "0.22.2")
15099 (source
15100 (origin
15101 (method url-fetch)
15102 (uri (pypi-uri "pybtex" version))
15103 (sha256
15104 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
15105 (build-system python-build-system)
15106 (native-inputs
15107 `(("python-nose" ,python-nose)))
15108 (inputs
15109 `(("python-latexcodec" ,python-latexcodec)
15110 ("python-pyyaml" ,python-pyyaml)
15111 ("python-six" ,python-six)))
15112 (arguments
15113 `(#:test-target "nosetests"))
15114 (home-page "https://pybtex.org/")
15115 (synopsis "BibTeX-compatible bibliography processor")
15116 (description "Pybtex is a BibTeX-compatible bibliography processor written
15117 in Python. You can simply type pybtex instead of bibtex.")
15118 (license license:expat)))
15119
15120 (define-public python-onetimepass
15121 (package
15122 (name "python-onetimepass")
15123 (version "1.0.1")
15124 (source
15125 (origin
15126 (method url-fetch)
15127 (uri (pypi-uri "onetimepass" version))
15128 (sha256
15129 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
15130 (build-system python-build-system)
15131 (propagated-inputs `(("python-six" ,python-six)))
15132 (home-page "https://github.com/tadeck/onetimepass/")
15133 (synopsis "One-time password library")
15134 (description "Python one-time password library for HMAC-based (HOTP) and
15135 time-based (TOTP) passwords.")
15136 (license license:expat)))
15137
15138 (define-public python-parso
15139 (package
15140 (name "python-parso")
15141 (version "0.5.1")
15142 (source
15143 (origin
15144 (method url-fetch)
15145 (uri (pypi-uri "parso" version))
15146 (sha256
15147 (base32
15148 "171a9ivhxwsd52h1cgsz40zgzpgzscn7yqb7sdjhy8m1lzj0wsv6"))))
15149 (native-inputs
15150 `(("python-pytest" ,python-pytest)))
15151 (build-system python-build-system)
15152 (arguments
15153 `(#:phases (modify-phases %standard-phases
15154 (replace 'check
15155 (lambda _ (invoke "pytest" "-vv"))))))
15156 (home-page "https://github.com/davidhalter/parso")
15157 (synopsis "Python Parser")
15158 (description "Parso is a Python parser that supports error recovery and
15159 round-trip parsing for different Python versions (in multiple Python versions).
15160 Parso is also able to list multiple syntax errors in your Python file.")
15161 (license license:expat)))
15162
15163 (define-public python2-parso
15164 (package-with-python2 python-parso))
15165
15166 (define-public python-async-generator
15167 (package
15168 (name "python-async-generator")
15169 (version "1.10")
15170 (source
15171 (origin
15172 (method url-fetch)
15173 (uri (pypi-uri "async_generator" version))
15174 (sha256
15175 (base32
15176 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
15177 (build-system python-build-system)
15178 (native-inputs
15179 `(("python-pytest" ,python-pytest)))
15180 (home-page "https://github.com/python-trio/async_generator")
15181 (synopsis "Async generators and context managers for Python 3.5+")
15182 (description "@code{async_generator} back-ports Python 3.6's native async
15183 generators and Python 3.7's context managers into Python 3.5.")
15184 ;; Dual licensed.
15185 (license (list license:expat license:asl2.0))))
15186
15187 (define-public python-async-timeout
15188 (package
15189 (name "python-async-timeout")
15190 (version "3.0.1")
15191 (source
15192 (origin
15193 (method url-fetch)
15194 (uri (pypi-uri "async-timeout" version))
15195 (sha256
15196 (base32
15197 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
15198 (build-system python-build-system)
15199 (home-page "https://github.com/aio-libs/async_timeout/")
15200 (synopsis "Timeout context manager for asyncio programs")
15201 (description "@code{async-timeout} provides a timeout timeout context
15202 manager compatible with @code{asyncio}.")
15203 (license license:asl2.0)))
15204
15205 (define-public python-glob2
15206 (package
15207 (name "python-glob2")
15208 (version "0.7")
15209 (source
15210 (origin
15211 (method git-fetch)
15212 (uri (git-reference
15213 (url "https://github.com/miracle2k/python-glob2.git")
15214 (commit (string-append "v" version))))
15215 (file-name (git-file-name name version))
15216 (sha256
15217 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
15218 (build-system python-build-system)
15219 (home-page "https://github.com/miracle2k/python-glob2/")
15220 (synopsis "Extended Version of the python buildin glob module")
15221 (description "This is an extended version of the Python
15222 @url{http://docs.python.org/library/glob.html, built-in glob module} which
15223 adds:
15224
15225 @itemize
15226 @item The ability to capture the text matched by glob patterns, and return
15227 those matches alongside the file names.
15228 @item A recursive @code{**} globbing syntax, akin for example to the
15229 @code{globstar} option of Bash.
15230 @item The ability to replace the file system functions used, in order to glob
15231 on virtual file systems.
15232 @item Compatible with Python 2 and Python 3 (tested with 3.3).
15233 @end itemize
15234
15235 Glob2 currently based on the glob code from Python 3.3.1.")
15236 (license license:bsd-2)))
15237
15238 (define-public python2-glob2
15239 (package-with-python2 python-glob2))
15240
15241 (define-public python-gipc
15242 (package
15243 (name "python-gipc")
15244 (version "0.6.0")
15245 (source
15246 (origin
15247 (method url-fetch)
15248 (uri (pypi-uri "gipc" version ".zip"))
15249 (sha256
15250 (base32
15251 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
15252 (build-system python-build-system)
15253 (native-inputs
15254 `(("unzip" ,unzip)))
15255 (propagated-inputs
15256 `(("python-gevent" ,python-gevent)))
15257 (home-page "http://gehrcke.de/gipc")
15258 (synopsis "Child process management in the context of gevent")
15259 (description "Usage of Python's multiprocessing package in a
15260 gevent-powered application may raise problems. With @code{gipc},
15261 process-based child processes can safely be created anywhere within a
15262 gevent-powered application.")
15263 (license license:expat)))
15264
15265 (define-public python2-gipc
15266 (package-with-python2 python-gipc))
15267
15268 (define-public python-fusepy
15269 (package
15270 (name "python-fusepy")
15271 (version "2.0.4")
15272 (source
15273 (origin
15274 (method url-fetch)
15275 (uri (pypi-uri "fusepy" version))
15276 (sha256
15277 (base32
15278 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
15279 (build-system python-build-system)
15280 (arguments
15281 `(#:phases
15282 (modify-phases %standard-phases
15283 (add-before 'build 'set-library-file-name
15284 (lambda* (#:key inputs #:allow-other-keys)
15285 (let ((fuse (assoc-ref inputs "fuse")))
15286 (substitute* "fuse.py"
15287 (("find_library\\('fuse'\\)")
15288 (string-append "'" fuse "/lib/libfuse.so'")))
15289 #t))))))
15290 (propagated-inputs
15291 `(("fuse" ,fuse)))
15292 (home-page "https://github.com/fusepy/fusepy")
15293 (synopsis "Simple ctypes bindings for FUSE")
15294 (description "Python module that provides a simple interface to FUSE and
15295 MacFUSE. The binding is created using the standard @code{ctypes} library.")
15296 (license license:isc)))
15297
15298 (define-public python2-fusepy
15299 (package-with-python2 python-fusepy))
15300
15301 (define-public python2-gdrivefs
15302 (package
15303 (name "python2-gdrivefs")
15304 (version "0.14.9")
15305 (source
15306 (origin
15307 (method url-fetch)
15308 (uri (pypi-uri "gdrivefs" version))
15309 (sha256
15310 (base32
15311 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
15312 (build-system python-build-system)
15313 (arguments
15314 `(#:python ,python-2
15315 #:phases
15316 (modify-phases %standard-phases
15317 (add-before 'build 'patch-setup-py
15318 (lambda _
15319 ;; Update requirements from dependency==version
15320 ;; to dependency>=version
15321 (substitute* "gdrivefs/resources/requirements.txt"
15322 (("==") ">="))
15323 #t)))))
15324 (native-inputs
15325 `(("python2-gipc" ,python2-gipc)
15326 ("python2-gevent" ,python2-gevent)
15327 ("python2-greenlet" ,python2-greenlet)
15328 ("python2-httplib2" ,python2-httplib2)
15329 ("python2-uritemplate" ,python2-uritemplate)
15330 ("python2-oauth2client" ,python2-oauth2client)
15331 ("python2-six" ,python2-six)))
15332 (propagated-inputs
15333 `(("python2-dateutil" ,python2-dateutil)
15334 ("python2-fusepy" ,python2-fusepy)
15335 ("python2-google-api-client" ,python2-google-api-client)))
15336 (home-page "https://github.com/dsoprea/GDriveFS")
15337 (synopsis "Mount Google Drive as a local file system")
15338 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
15339 under Python 2.7.")
15340 (license license:gpl2)))
15341
15342 (define-public pybind11
15343 (package
15344 (name "pybind11")
15345 (version "2.3.0")
15346 (source (origin
15347 (method git-fetch)
15348 (uri (git-reference
15349 (url "https://github.com/pybind/pybind11.git")
15350 (commit (string-append "v" version))))
15351 (sha256
15352 (base32
15353 "11b6dniri8m05spfd2a19irz82shf4sdca73566bniggrf3zclnf"))
15354 (file-name (git-file-name name version))))
15355 (build-system cmake-build-system)
15356 (native-inputs
15357 `(("python" ,python)
15358 ("python-pytest" ,python-pytest)))
15359 (arguments
15360 `(#:test-target "check"))
15361 (home-page "https://github.com/pybind/pybind11/")
15362 (synopsis "Seamless operability between C++11 and Python")
15363 (description "pybind11 is a lightweight header-only library that exposes
15364 C++ types in Python and vice versa, mainly to create Python bindings of
15365 existing C++ code. Its goals and syntax are similar to the excellent
15366 Boost.Python library by David Abrahams: to minimize boilerplate code in
15367 traditional extension modules by inferring type information using compile-time
15368 introspection.")
15369 (license license:expat)))
15370
15371 (define-public python-fasteners
15372 (package
15373 (name "python-fasteners")
15374 (version "0.14.1")
15375 (source
15376 (origin
15377 (method url-fetch)
15378 (uri (pypi-uri "fasteners" version))
15379 (sha256
15380 (base32
15381 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
15382 (build-system python-build-system)
15383 (propagated-inputs
15384 `(("python-monotonic" ,python-monotonic)
15385 ("python-six" ,python-six)
15386 ("python-testtools" ,python-testtools)))
15387 (home-page "https://github.com/harlowja/fasteners")
15388 (synopsis "Python package that provides useful locks")
15389 (description
15390 "This package provides a Python program that provides following locks:
15391
15392 @itemize
15393 @item Locking decorator
15394 @item Reader-writer locks
15395 @item Inter-process locks
15396 @item Generic helpers
15397 @end itemize\n")
15398 (properties `((python2-variant . ,(delay python2-fasteners))))
15399 (license license:asl2.0)))
15400
15401 (define-public python2-fasteners
15402 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
15403 (package
15404 (inherit base)
15405 (propagated-inputs
15406 `(("python2-futures" ,python2-futures)
15407 ,@(package-propagated-inputs base))))))
15408
15409 (define-public python-requests-file
15410 (package
15411 (name "python-requests-file")
15412 (version "1.4.3")
15413 (source
15414 (origin
15415 (method url-fetch)
15416 (uri (pypi-uri "requests-file" version))
15417 (sha256
15418 (base32
15419 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
15420 (build-system python-build-system)
15421 (propagated-inputs
15422 `(("python-requests" ,python-requests)
15423 ("python-six" ,python-six)))
15424 (home-page
15425 "https://github.com/dashea/requests-file")
15426 (synopsis "File transport adapter for Requests")
15427 (description
15428 "Requests-File is a transport adapter for use with the Requests Python
15429 library to allow local file system access via @code{file://} URLs.")
15430 (license license:asl2.0)))
15431
15432 (define-public python2-requests-file
15433 (package-with-python2 python-requests-file))
15434
15435 (define-public python-tldextract
15436 (package
15437 (name "python-tldextract")
15438 (version "2.2.0")
15439 (source
15440 (origin
15441 (method url-fetch)
15442 (uri (pypi-uri "tldextract" version))
15443 (sha256
15444 (base32
15445 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
15446 (build-system python-build-system)
15447 (native-inputs
15448 `(("python-pytest" ,python-pytest)
15449 ("python-responses" ,python-responses)))
15450 (propagated-inputs
15451 `(("python-idna" ,python-idna)
15452 ("python-requests" ,python-requests)
15453 ("python-requests-file" ,python-requests-file)))
15454 (home-page
15455 "https://github.com/john-kurkowski/tldextract")
15456 (synopsis
15457 "Separate the TLD from the registered domain and subdomains of a URL")
15458 (description
15459 "TLDExtract accurately separates the TLD from the registered domain and
15460 subdomains of a URL, using the Public Suffix List. By default, this includes
15461 the public ICANN TLDs and their exceptions. It can optionally support the
15462 Public Suffix List's private domains as well.")
15463 (license license:bsd-3)))
15464
15465 (define-public python2-tldextract
15466 (package-with-python2 python-tldextract))
15467
15468 (define-public python-pynamecheap
15469 (package
15470 (name "python-pynamecheap")
15471 (version "0.0.3")
15472 (source
15473 (origin
15474 (method url-fetch)
15475 (uri (pypi-uri "PyNamecheap" version))
15476 (sha256
15477 (base32
15478 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
15479 (build-system python-build-system)
15480 (propagated-inputs
15481 `(("python-requests" ,python-requests)))
15482 (home-page
15483 "https://github.com/Bemmu/PyNamecheap")
15484 (synopsis
15485 "Namecheap API client in Python")
15486 (description
15487 "PyNamecheap is a Namecheap API client in Python.")
15488 (license license:expat)))
15489
15490 (define-public python2-pynamecheap
15491 (package-with-python2 python-pynamecheap))
15492
15493 (define-public python-dns-lexicon
15494 (package
15495 (name "python-dns-lexicon")
15496 (version "2.4.0")
15497 (source
15498 (origin
15499 (method url-fetch)
15500 (uri (pypi-uri "dns-lexicon" version))
15501 (sha256
15502 (base32
15503 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
15504 (build-system python-build-system)
15505 (arguments
15506 `(#:tests? #f)) ;requires internet access
15507 (propagated-inputs
15508 `(("python-future" ,python-future)
15509 ("python-pynamecheap" ,python-pynamecheap)
15510 ("python-requests" ,python-requests)
15511 ("python-tldextract" ,python-tldextract)
15512 ("python-urllib3" ,python-urllib3)))
15513 (home-page "https://github.com/AnalogJ/lexicon")
15514 (synopsis
15515 "Manipulate DNS records on various DNS providers")
15516 (description
15517 "Lexicon provides a way to manipulate DNS records on multiple DNS
15518 providers in a standardized way. It has a CLI but it can also be used as a
15519 Python library. It was designed to be used in automation, specifically with
15520 Let's Encrypt.")
15521 (license license:expat)))
15522
15523 (define-public python2-dns-lexicon
15524 (package-with-python2 python-dns-lexicon))
15525
15526 (define-public python-commandlines
15527 (package
15528 (name "python-commandlines")
15529 (version "0.4.1")
15530 (source
15531 (origin
15532 (method url-fetch)
15533 (uri (pypi-uri "commandlines" version))
15534 (sha256
15535 (base32
15536 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15537 (build-system python-build-system)
15538 (home-page "https://github.com/chrissimpkins/commandlines")
15539 (synopsis "Command line argument to object parsing library")
15540 (description
15541 "@code{Commandlines} is a Python library for command line application
15542 development that supports command line argument parsing, command string
15543 validation testing and application logic.")
15544 (license license:expat)))
15545
15546 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15547 ;; python-numba. They have a very unflexible relationship.
15548 (define-public python-numba
15549 (package
15550 (name "python-numba")
15551 (version "0.46.0")
15552 (source
15553 (origin
15554 (method url-fetch)
15555 (uri (pypi-uri "numba" version))
15556 (sha256
15557 (base32
15558 "1vnfzcq6fcnkmdms6114d49awvvj5181fl7z1wlha27qc2paxjy2"))))
15559 (build-system python-build-system)
15560 (arguments
15561 `(#:modules ((guix build utils)
15562 (guix build python-build-system)
15563 (ice-9 ftw)
15564 (srfi srfi-1)
15565 (srfi srfi-26))
15566 #:phases
15567 (modify-phases %standard-phases
15568 (add-after 'unpack 'disable-proprietary-features
15569 (lambda _
15570 (setenv "NUMBA_DISABLE_HSA" "1")
15571 (setenv "NUMBA_DISABLE_CUDA" "1")
15572 #t))
15573 (add-after 'unpack 'remove-failing-tests
15574 (lambda _
15575 ;; FIXME: These tests fail for unknown reasons:
15576 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15577 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15578 (substitute* "numba/tests/test_dispatcher.py"
15579 (("def test(_non_writable_pycache)" _ m)
15580 (string-append "def guix_skip" m))
15581 (("def test(_non_creatable_pycache)" _ m)
15582 (string-append "def guix_skip" m))
15583 (("def test(_frozen)" _ m)
15584 (string-append "def guix_skip" m)))
15585
15586 ;; These tests fail because we don't run the tests from the build
15587 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
15588 ;; They are in numba.tests.test_pycc.TestDistutilsSupport.
15589 (substitute* "numba/tests/test_pycc.py"
15590 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15591 (string-append "def guix_skip" m)))
15592
15593 ;; These tests fail because our version of Python does not have
15594 ;; a recognizable front-end for the Numba distribution to use
15595 ;; to check against.
15596 (substitute* "numba/tests/test_entrypoints.py"
15597 (("def test(_init_entrypoint)" _ m)
15598 (string-append "def guix_skip" m)))
15599 (substitute* "numba/tests/test_jitclasses.py"
15600 (("def test(_jitclass_longlabel_not_truncated)" _ m)
15601 (string-append "def guix_skip" m)))
15602 #t))
15603 (replace 'check
15604 (lambda _
15605 (let ((cwd (getcwd)))
15606 (setenv "PYTHONPATH"
15607 (string-append cwd "/build/"
15608 (find (cut string-prefix? "lib" <>)
15609 (scandir (string-append cwd "/build")))
15610 ":"
15611 (getenv "PYTHONPATH")))
15612 ;; Something is wrong with the PYTHONPATH when running the
15613 ;; tests from the build directory, as it complains about not being
15614 ;; able to import certain modules.
15615 (with-directory-excursion "/tmp"
15616 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15617 #t)))))
15618 (propagated-inputs
15619 `(("python-llvmlite" ,python-llvmlite)
15620 ("python-numpy" ,python-numpy)
15621 ("python-singledispatch" ,python-singledispatch)))
15622 ;; Needed for tests.
15623 (inputs
15624 `(("python-jinja2" ,python-jinja2)
15625 ("python-pygments" ,python-pygments)))
15626 (home-page "https://numba.pydata.org")
15627 (synopsis "Compile Python code using LLVM")
15628 (description "Numba gives you the power to speed up your applications with
15629 high performance functions written directly in Python. With a few
15630 annotations, array-oriented and math-heavy Python code can be just-in-time
15631 compiled to native machine instructions, similar in performance to C, C++ and
15632 Fortran, without having to switch languages or Python interpreters.
15633
15634 Numba works by generating optimized machine code using the LLVM compiler
15635 infrastructure at import time, runtime, or statically (using the included pycc
15636 tool).")
15637 (license license:bsd-3)))
15638
15639 (define-public python-anndata
15640 (package
15641 (name "python-anndata")
15642 (version "0.6.18")
15643 (source
15644 (origin
15645 (method url-fetch)
15646 (uri (pypi-uri "anndata" version))
15647 (sha256
15648 (base32
15649 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
15650 (build-system python-build-system)
15651 (propagated-inputs
15652 `(("python-h5py" ,python-h5py)
15653 ("python-natsort" ,python-natsort)
15654 ("python-pandas" ,python-pandas)
15655 ("python-scipy" ,python-scipy)))
15656 (home-page "https://github.com/theislab/anndata")
15657 (synopsis "Annotated data for data analysis pipelines")
15658 (description "Anndata is a package for simple (functional) high-level APIs
15659 for data analysis pipelines. In this context, it provides an efficient,
15660 scalable way of keeping track of data together with learned annotations and
15661 reduces the code overhead typically encountered when using a mostly
15662 object-oriented library such as @code{scikit-learn}.")
15663 (license license:bsd-3)))
15664
15665 (define-public python-dill
15666 (package
15667 (name "python-dill")
15668 (version "0.3.1.1")
15669 (source
15670 (origin
15671 (method url-fetch)
15672 (uri (pypi-uri "dill" version))
15673 (sha256
15674 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
15675 (build-system python-build-system)
15676 (arguments
15677 `(#:phases
15678 (modify-phases %standard-phases
15679 (replace 'check
15680 (lambda _
15681 (with-directory-excursion "/tmp"
15682 (invoke "nosetests" "-v"))
15683 #t)))))
15684 (native-inputs
15685 `(("python-nose" ,python-nose)))
15686 (home-page "https://pypi.org/project/dill/")
15687 (synopsis "Serialize all of Python")
15688 (description "Dill extends Python's @code{pickle} module for serializing
15689 and de-serializing Python objects to the majority of the built-in Python
15690 types. Dill provides the user the same interface as the @code{pickle} module,
15691 and also includes some additional features. In addition to pickling Python
15692 objects, @code{dill} provides the ability to save the state of an interpreter
15693 session in a single command. Hence, it would be feasible to save a
15694 interpreter session, close the interpreter, ship the pickled file to another
15695 computer, open a new interpreter, unpickle the session and thus continue from
15696 the saved state of the original interpreter session.")
15697 (license license:bsd-3)))
15698
15699 (define-public python-multiprocess
15700 (package
15701 (name "python-multiprocess")
15702 (version "0.70.9")
15703 (source
15704 (origin
15705 (method url-fetch)
15706 (uri (pypi-uri "multiprocess" version))
15707 (sha256
15708 (base32
15709 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
15710 (build-system python-build-system)
15711 (arguments
15712 `(#:phases
15713 (modify-phases %standard-phases
15714 (add-after 'unpack 'disable-broken-tests
15715 (lambda _
15716 ;; This test is broken as there is no keyboard interrupt.
15717 (substitute* "py3.7/multiprocess/tests/__init__.py"
15718 (("^(.*)def test_wait_result"
15719 line indent)
15720 (string-append indent
15721 "@unittest.skip(\"Disabled by Guix\")\n"
15722 line)))
15723 #t))
15724 ;; Tests must be run after installation.
15725 (delete 'check)
15726 (add-after 'install 'check
15727 (lambda* (#:key inputs outputs #:allow-other-keys)
15728 (add-installed-pythonpath inputs outputs)
15729 (invoke "python" "-m" "multiprocess.tests")
15730 #t)))))
15731 (propagated-inputs
15732 `(("python-dill" ,python-dill)))
15733 (home-page "https://pypi.org/project/multiprocess/")
15734 (synopsis "Multiprocessing and multithreading in Python")
15735 (description
15736 "This package is a fork of the multiprocessing Python package, a package
15737 which supports the spawning of processes using the API of the standard
15738 library's @code{threading} module.")
15739 (license license:bsd-3)))
15740
15741 (define-public python-toolz
15742 (package
15743 (name "python-toolz")
15744 (version "0.9.0")
15745 (source
15746 (origin
15747 (method url-fetch)
15748 (uri (pypi-uri "toolz" version))
15749 (sha256
15750 (base32
15751 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
15752 (build-system python-build-system)
15753 ;; FIXME: tests cannot be computed: "Can't perform this operation for
15754 ;; unregistered loader type"
15755 (arguments '(#:tests? #f))
15756 (home-page "https://github.com/pytoolz/toolz/")
15757 (synopsis "List processing tools and functional utilities")
15758 (description
15759 "This package provides a set of utility functions for iterators,
15760 functions, and dictionaries.")
15761 (license license:bsd-3)))
15762
15763 (define-public python2-toolz
15764 (package-with-python2 python-toolz))
15765
15766 (define-public python-cytoolz
15767 (package
15768 (name "python-cytoolz")
15769 (version "0.9.0.1")
15770 (source
15771 (origin
15772 (method url-fetch)
15773 (uri (pypi-uri "cytoolz" version))
15774 (sha256
15775 (base32
15776 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
15777 (build-system python-build-system)
15778 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
15779 ;; 'exceptions'"
15780 (arguments '(#:tests? #f))
15781 (propagated-inputs
15782 `(("python-toolz" ,python-toolz)))
15783 (native-inputs
15784 `(("python-cython" ,python-cython)))
15785 (home-page "https://github.com/pytoolz/cytoolz")
15786 (synopsis "High performance functional utilities")
15787 (description
15788 "The cytoolz package implements the same API as provided by toolz. The
15789 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
15790 that is accessible to other projects developed in Cython.")
15791 (license license:bsd-3)))
15792
15793 (define-public python-sortedcontainers
15794 (package
15795 (name "python-sortedcontainers")
15796 (version "2.0.4")
15797 (source
15798 (origin
15799 (method url-fetch)
15800 (uri (pypi-uri "sortedcontainers" version))
15801 (sha256
15802 (base32
15803 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
15804 (build-system python-build-system)
15805 (native-inputs
15806 `(("python-tox" ,python-tox)))
15807 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
15808 (synopsis "Sorted List, Sorted Dict, Sorted Set")
15809 (description
15810 "This package provides a sorted collections library, written in
15811 pure-Python.")
15812 (license license:asl2.0)))
15813
15814 (define-public python-cloudpickle
15815 (package
15816 (name "python-cloudpickle")
15817 (version "0.6.1")
15818 (source
15819 (origin
15820 (method url-fetch)
15821 (uri (pypi-uri "cloudpickle" version))
15822 (sha256
15823 (base32
15824 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
15825 (build-system python-build-system)
15826 ;; FIXME: there are 5 errors in 122 tests:
15827 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
15828 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
15829 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15830 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15831 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
15832 ;; TypeError: cannot serialize '_io.BufferedRandom' object
15833 (arguments '(#:tests? #f))
15834 (native-inputs
15835 `(("python-pytest" ,python-pytest)
15836 ("python-mock" ,python-mock)
15837 ("python-tornado" ,python-tornado)))
15838 (home-page "https://github.com/cloudpipe/cloudpickle")
15839 (synopsis "Extended pickling support for Python objects")
15840 (description
15841 "Cloudpickle makes it possible to serialize Python constructs not
15842 supported by the default pickle module from the Python standard library. It
15843 is especially useful for cluster computing where Python expressions are
15844 shipped over the network to execute on remote hosts, possibly close to the
15845 data.")
15846 (license license:bsd-3)))
15847
15848 (define-public python2-cloudpickle
15849 (package-with-python2 python-cloudpickle))
15850
15851 (define-public python-locket
15852 (package
15853 (name "python-locket")
15854 (version "0.2.0")
15855 (source
15856 (origin
15857 (method url-fetch)
15858 (uri (pypi-uri "locket" version))
15859 (sha256
15860 (base32
15861 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
15862 (build-system python-build-system)
15863 (home-page "https://github.com/mwilliamson/locket.py")
15864 (synopsis "File-based locks for Python")
15865 (description
15866 "Locket implements a lock that can be used by multiple processes provided
15867 they use the same path.")
15868 (license license:bsd-2)))
15869
15870 (define-public python2-locket
15871 (package-with-python2 python-locket))
15872
15873 (define-public python-blosc
15874 (package
15875 (name "python-blosc")
15876 (version "1.5.1")
15877 (source
15878 (origin
15879 (method url-fetch)
15880 (uri (pypi-uri "blosc" version))
15881 (sha256
15882 (base32
15883 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
15884 (build-system python-build-system)
15885 ;; FIXME: all tests pass, but then this error is printed:
15886 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
15887 (arguments '(#:tests? #f))
15888 (propagated-inputs
15889 `(("python-numpy" ,python-numpy)))
15890 (home-page "https://github.com/blosc/python-blosc")
15891 (synopsis "Python wrapper for the Blosc data compressor library")
15892 (description "Blosc is a high performance compressor optimized for binary
15893 data. It has been designed to transmit data to the processor cache faster
15894 than the traditional, non-compressed, direct memory fetch approach via a
15895 @code{memcpy()} system call.
15896
15897 Blosc works well for compressing numerical arrays that contains data with
15898 relatively low entropy, like sparse data, time series, grids with
15899 regular-spaced values, etc.
15900
15901 This Python package wraps the Blosc library.")
15902 (license license:bsd-3)))
15903
15904 (define-public python2-blosc
15905 (package-with-python2 python-blosc))
15906
15907 (define-public python-partd
15908 (package
15909 (name "python-partd")
15910 (version "0.3.9")
15911 (source
15912 (origin
15913 (method url-fetch)
15914 (uri (pypi-uri "partd" version))
15915 (sha256
15916 (base32
15917 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
15918 (build-system python-build-system)
15919 (propagated-inputs
15920 `(("python-blosc" ,python-blosc)
15921 ("python-locket" ,python-locket)
15922 ("python-numpy" ,python-numpy)
15923 ("python-pandas" ,python-pandas)
15924 ("python-pyzmq" ,python-pyzmq)
15925 ("python-toolz" ,python-toolz)))
15926 (home-page "https://github.com/dask/partd/")
15927 (synopsis "Appendable key-value storage")
15928 (description "Partd stores key-value pairs. Values are raw bytes. We
15929 append on old values. Partd excels at shuffling operations.")
15930 (license license:bsd-3)))
15931
15932 (define-public python2-partd
15933 (package-with-python2 python-partd))
15934
15935 (define-public python-fsspec
15936 (package
15937 (name "python-fsspec")
15938 (version "0.6.1")
15939 (source
15940 (origin
15941 (method url-fetch)
15942 (uri (pypi-uri "fsspec" version))
15943 (sha256
15944 (base32
15945 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
15946 (build-system python-build-system)
15947 (arguments '(#:tests? #f)) ; there are none
15948 (home-page "https://github.com/intake/filesystem_spec")
15949 (synopsis "File-system specification")
15950 (description "The purpose of this package is to produce a template or
15951 specification for a file-system interface, that specific implementations
15952 should follow, so that applications making use of them can rely on a common
15953 behavior and not have to worry about the specific internal implementation
15954 decisions with any given backend.")
15955 (license license:bsd-3)))
15956
15957 (define-public python-dask
15958 (package
15959 (name "python-dask")
15960 (version "2.9.0")
15961 (source
15962 (origin
15963 (method url-fetch)
15964 (uri (pypi-uri "dask" version))
15965 (sha256
15966 (base32 "1w1hqr8vyx6ygwflj2737dcy0mmgvrc0s602gnny8pzlcbs9m76b"))))
15967 (build-system python-build-system)
15968 (arguments
15969 `(#:phases
15970 (modify-phases %standard-phases
15971 (add-after 'unpack 'disable-broken-tests
15972 (lambda _
15973 ;; This test is marked as xfail when pytest-xdist is used.
15974 (substitute* "dask/tests/test_threaded.py"
15975 (("def test_interrupt\\(\\)" m)
15976 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15977 m)))
15978 ;; This one fails with a type error:
15979 ;; TypeError: Already tz-aware, use tz_convert to convert.
15980 (substitute* "dask/dataframe/tests/test_shuffle.py"
15981 (("def test_set_index_timestamp\\(\\)" m)
15982 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15983 m)))
15984 #t))
15985 (replace 'check
15986 (lambda _ (invoke "pytest" "-vv"))))))
15987 (propagated-inputs
15988 `(("python-cloudpickle" ,python-cloudpickle)
15989 ("python-fsspec" ,python-fsspec)
15990 ("python-numpy" ,python-numpy)
15991 ("python-packaging" ,python-packaging)
15992 ("python-pandas" ,python-pandas)
15993 ("python-partd" ,python-partd)
15994 ("python-toolz" ,python-toolz)
15995 ("python-pyyaml" ,python-pyyaml)))
15996 (native-inputs
15997 `(("python-pytest" ,python-pytest)
15998 ("python-pytest-runner" ,python-pytest-runner)))
15999 (home-page "https://github.com/dask/dask/")
16000 (synopsis "Parallel computing with task scheduling")
16001 (description
16002 "Dask is a flexible parallel computing library for analytics. It
16003 consists of two components: dynamic task scheduling optimized for computation,
16004 and large data collections like parallel arrays, dataframes, and lists that
16005 extend common interfaces like NumPy, Pandas, or Python iterators to
16006 larger-than-memory or distributed environments. These parallel collections
16007 run on top of the dynamic task schedulers. ")
16008 (license license:bsd-3)))
16009
16010 (define-public python-ilinkedlist
16011 (package
16012 (name "python-ilinkedlist")
16013 (version "0.4.0")
16014 (source
16015 (origin
16016 (method url-fetch)
16017 (uri (pypi-uri "ilinkedlist" version))
16018 (sha256
16019 (base32
16020 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
16021 (build-system python-build-system)
16022 (native-inputs `(("python-pytest" ,python-pytest)))
16023 (inputs `(("python" ,python)))
16024 (home-page "https://github.com/luther9/ilinkedlist-py")
16025 (synopsis "Immutable linked list library")
16026 (description
16027 "This is a implementation of immutable linked lists for Python. It
16028 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
16029 Since a linked list is treated as immutable, it is hashable, and its length
16030 can be retrieved in constant time. Some of the terminology is inspired by
16031 LISP. It is possible to create an improper list by creating a @code{Pair}
16032 with a non-list @code{cdr}.")
16033 (license license:gpl3+)))
16034
16035 (define-public python-readlike
16036 (package
16037 (name "python-readlike")
16038 (version "0.1.3")
16039 (source
16040 (origin
16041 (method url-fetch)
16042 (uri (pypi-uri "readlike" version))
16043 (sha256
16044 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
16045 (build-system python-build-system)
16046 (home-page "https://github.com/jangler/readlike")
16047 (synopsis "GNU Readline-like line editing module")
16048 (description
16049 "This Python module provides line editing functions similar to the default
16050 Emacs-style ones of GNU Readline. Unlike the Python standard library's
16051 @code{readline} package, this one allows access to those capabilties in settings
16052 outside of a standard command-line interface. It is especially well-suited to
16053 interfacing with Urwid, due to a shared syntax for describing key inputs.
16054
16055 Currently, all stateless Readline commands are implemented. Yanking and history
16056 are not supported.")
16057 (license license:expat)))
16058
16059 (define-public python2-readlike
16060 (package-with-python2 python-readlike))
16061
16062 (define-public python-reparser
16063 (package
16064 (name "python-reparser")
16065 (version "1.4.3")
16066 (source
16067 (origin
16068 (method url-fetch)
16069 (uri (pypi-uri "ReParser" version))
16070 (sha256
16071 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
16072 (build-system python-build-system)
16073 (home-page "https://github.com/xmikos/reparser")
16074 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
16075 (description
16076 "This Python library provides a simple lexer/parser for inline markup based
16077 on regular expressions.")
16078 (license license:expat)))
16079
16080 (define-public python2-reparser
16081 (let ((reparser (package-with-python2
16082 (strip-python2-variant python-reparser))))
16083 (package (inherit reparser)
16084 (propagated-inputs
16085 `(("python2-enum34" ,python2-enum34)
16086 ,@(package-propagated-inputs reparser))))))
16087
16088 (define-public python-precis-i18n
16089 (package
16090 (name "python-precis-i18n")
16091 (version "1.0.0")
16092 (source
16093 (origin
16094 (method url-fetch)
16095 (uri (pypi-uri "precis_i18n" version))
16096 (sha256
16097 (base32
16098 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
16099 (build-system python-build-system)
16100 (home-page "https://github.com/byllyfish/precis_i18n")
16101 (synopsis "Implementation of the PRECIS framework")
16102 (description
16103 "This module implements the PRECIS Framework as described in RFC 8264,
16104 RFC 8265 and RFC 8266.")
16105 (license license:expat)))
16106
16107 (define-public python-absl-py
16108 (package
16109 (name "python-absl-py")
16110 (version "0.6.1")
16111 (source
16112 (origin
16113 (method url-fetch)
16114 (uri (pypi-uri "absl-py" version))
16115 (sha256
16116 (base32
16117 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
16118 (build-system python-build-system)
16119 (propagated-inputs
16120 `(("python-six" ,python-six)))
16121 (home-page "https://github.com/abseil/abseil-py")
16122 (synopsis "Abseil Python common libraries")
16123 (description
16124 "This package provides the Abseil Python Common Libraries, a collection
16125 of Python libraries for building Python applications.")
16126 (license license:asl2.0)))
16127
16128 (define-public python-astor
16129 (package
16130 (name "python-astor")
16131 (version "0.7.1")
16132 (source
16133 (origin
16134 (method url-fetch)
16135 (uri (pypi-uri "astor" version))
16136 (sha256
16137 (base32
16138 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
16139 (build-system python-build-system)
16140 ;; FIXME: There are two errors and two test failures.
16141 (arguments `(#:tests? #f))
16142 (home-page "https://github.com/berkerpeksag/astor")
16143 (synopsis "Read and write Python ASTs")
16144 (description "Astor is designed to allow easy manipulation of Python
16145 source via the Abstract Syntax Tree.")
16146 (license license:bsd-3)))
16147
16148 (define-public python2-astor
16149 (package-with-python2 python-astor))
16150
16151 (define-public python-grpcio
16152 (package
16153 (name "python-grpcio")
16154 (version "1.17.1")
16155 (source
16156 (origin
16157 (method url-fetch)
16158 (uri (pypi-uri "grpcio" version))
16159 (sha256
16160 (base32
16161 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
16162 (build-system python-build-system)
16163 (propagated-inputs
16164 `(("python-six" ,python-six)))
16165 (home-page "https://grpc.io")
16166 (synopsis "HTTP/2-based RPC framework")
16167 (description "This package provides a Python library for communicating
16168 with the HTTP/2-based RPC framework gRPC.")
16169 (license license:asl2.0)))
16170
16171 (define-public python-astunparse
16172 (package
16173 (name "python-astunparse")
16174 (version "1.6.2")
16175 (source
16176 (origin
16177 (method url-fetch)
16178 (uri (pypi-uri "astunparse" version))
16179 (sha256
16180 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
16181 (build-system python-build-system)
16182 (arguments '(#:tests? #f)) ; there are none
16183 (propagated-inputs
16184 `(("python-six" ,python-six)
16185 ("python-wheel" ,python-wheel)))
16186 (home-page "https://github.com/simonpercivall/astunparse")
16187 (synopsis "AST unparser for Python")
16188 (description "This package provides an AST unparser for Python. It is a
16189 factored out version of @code{unparse} found in the Python source
16190 distribution.")
16191 (license license:bsd-3)))
16192
16193 (define-public python-gast
16194 (package
16195 (name "python-gast")
16196 (version "0.2.2")
16197 (source
16198 (origin
16199 (method url-fetch)
16200 (uri (pypi-uri "gast" version))
16201 (sha256
16202 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
16203 (build-system python-build-system)
16204 (propagated-inputs
16205 `(("python-astunparse" ,python-astunparse)))
16206 (home-page "https://pypi.org/project/gast/")
16207 (synopsis "Generic Python AST that abstracts the underlying Python version")
16208 (description
16209 "GAST provides a compatibility layer between the AST of various Python
16210 versions, as produced by @code{ast.parse} from the standard @code{ast}
16211 module.")
16212 (license license:bsd-3)))
16213
16214 (define-public python-wikidata
16215 (package
16216 (name "python-wikidata")
16217 (version "0.6.1")
16218 (source
16219 (origin
16220 (method url-fetch)
16221 (uri (pypi-uri "Wikidata" version))
16222 (sha256
16223 (base32
16224 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
16225 (build-system python-build-system)
16226 (propagated-inputs
16227 `(("python-babel" ,python-babel)))
16228 (home-page "https://github.com/dahlia/wikidata")
16229 (synopsis "Wikidata client library")
16230 (description
16231 "This package provides a Python interface to
16232 @url{https://www.wikidata.org/, Wikidata}.")
16233 (properties '((upstream-name . "Wikidata")))
16234 (license license:gpl3+)))
16235
16236 (define-public python-doctest-ignore-unicode
16237 (package
16238 (name "python-doctest-ignore-unicode")
16239 (version "0.1.2")
16240 (source
16241 (origin
16242 (method url-fetch)
16243 (uri (pypi-uri "doctest-ignore-unicode" version))
16244 (sha256
16245 (base32
16246 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
16247 (build-system python-build-system)
16248 (native-inputs
16249 `(("python-nose" ,python-nose)))
16250 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
16251 (synopsis "Ignore Unicode literal prefixes in doctests")
16252 (description
16253 "This package adds support for a flag to ignore Unicode literal prefixes
16254 in doctests.")
16255 (license license:asl2.0)))
16256
16257 (define-public python-attr
16258 (package
16259 (name "python-attr")
16260 (version "0.3.1")
16261 (source
16262 (origin
16263 (method url-fetch)
16264 (uri (pypi-uri "attr" version))
16265 (sha256
16266 (base32
16267 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
16268 (build-system python-build-system)
16269 (home-page "https://github.com/denis-ryzhkov/attr")
16270 (synopsis "Decorator for attributes of target function or class")
16271 (description "Simple decorator to set attributes of target function or
16272 class in a @acronym{DRY, Don't Repeat Yourself} way.")
16273 (license license:expat)))
16274
16275 (define-public python-construct
16276 (package
16277 (name "python-construct")
16278 (version "2.9.45")
16279 (source
16280 (origin
16281 (method url-fetch)
16282 (uri (pypi-uri "construct" version))
16283 (sha256
16284 (base32
16285 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
16286 (build-system python-build-system)
16287 (arguments
16288 `(#:tests? #f)) ; No tests exist.
16289 (propagated-inputs
16290 `(("python-extras" ,python-extras)
16291 ("python-arrow" ,python-arrow)
16292 ("python-numpy" ,python-numpy)
16293 ("python-ruamel.yaml" ,python-ruamel.yaml)))
16294 (home-page "http://construct.readthedocs.io")
16295 (synopsis "Declarative and symmetrical parser and builder for binary data")
16296 (description
16297 "This package provides both simple, atomic constructs (such as
16298 integers of various sizes), as well as composite ones which allow you
16299 form hierarchical and sequential structures of increasing complexity.
16300 It features bit and byte granularity, easy debugging and testing, an
16301 easy-to-extend subclass system, and lots of primitive constructs to
16302 make your work easier.")
16303 (license license:expat)))
16304
16305 (define-public python-humanize
16306 (package
16307 (name "python-humanize")
16308 (version "0.5.1")
16309 (source
16310 (origin
16311 (method url-fetch)
16312 (uri (pypi-uri "humanize" version))
16313 (sha256
16314 (base32
16315 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
16316 (arguments
16317 '(#:tests? #f)) ; tests not in pypi archive
16318 (build-system python-build-system)
16319 (home-page "https://github.com/jmoiron/humanize")
16320 (synopsis "Print numerical information in a human-readable form")
16321 (description "This package provides a Python module that displays numbers
16322 and dates in \"human readable\" forms. For example, it would display
16323 \"12345591313\" as \"12.3 billion\".")
16324 (license license:expat)))
16325
16326 (define-public python-txaio
16327 (package
16328 (name "python-txaio")
16329 (version "18.8.1")
16330 (source
16331 (origin
16332 (method url-fetch)
16333 (uri (pypi-uri "txaio" version))
16334 (sha256
16335 (base32
16336 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
16337 (build-system python-build-system)
16338 (propagated-inputs
16339 `(("python-twisted" ,python-twisted)
16340 ("python-six" ,python-six)))
16341 (home-page "https://github.com/crossbario/txaio")
16342 (synopsis "Compatibility layer between Python asyncio and Twisted")
16343 (description "Txaio provides a compatibility layer between the Python
16344 @code{asyncio} module and @code{Twisted}.")
16345 (license license:expat)))
16346
16347 (define-public python-toolshed
16348 (package
16349 (name "python-toolshed")
16350 (version "0.4.6")
16351 (source
16352 (origin
16353 (method url-fetch)
16354 (uri (pypi-uri "toolshed" version))
16355 (sha256
16356 (base32
16357 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
16358 (build-system python-build-system)
16359 (native-inputs
16360 `(("python-nose" ,python-nose)))
16361 (home-page "https://github.com/brentp/toolshed/")
16362 (synopsis "Collection of modules and functions for working with data")
16363 (description "This is a collection of well-tested, simple modules and
16364 functions that aim to reduce boilerplate when working with data.")
16365 (license license:bsd-2)))
16366
16367 (define-public python-annoy
16368 (package
16369 (name "python-annoy")
16370 (version "1.15.1")
16371 (source
16372 (origin
16373 (method url-fetch)
16374 (uri (pypi-uri "annoy" version))
16375 (sha256
16376 (base32
16377 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
16378 (build-system python-build-system)
16379 (native-inputs
16380 `(("python-nose" ,python-nose)))
16381 (home-page "https://github.com/spotify/annoy/")
16382 (synopsis "Approximate nearest neighbors library")
16383 (description
16384 "Annoy is a C++ library with Python bindings to search for points in
16385 space that are close to a given query point. It also creates large read-only
16386 file-based data structures that are @code{mmap}ped into memory so that many
16387 processes may share the same data.")
16388 (license license:asl2.0)))
16389
16390 (define-public python-pylzma
16391 (package
16392 (name "python-pylzma")
16393 (version "0.5.0")
16394 (source
16395 (origin
16396 (method url-fetch)
16397 (uri (pypi-uri "pylzma" version))
16398 (sha256
16399 (base32
16400 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
16401 (build-system python-build-system)
16402 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
16403 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
16404 (description "This package provides Python bindings for the LZMA library
16405 by Igor Pavlov.")
16406 (license license:lgpl2.1+)))
16407
16408 (define-public python2-pylzma
16409 (package-with-python2 python-pylzma))
16410
16411 (define-public python2-zeroconf
16412 (package
16413 (name "python2-zeroconf")
16414
16415 ;; This is the last version that supports Python 2.x.
16416 (version "0.19.1")
16417 (source
16418 (origin
16419 (method url-fetch)
16420 (uri (pypi-uri "zeroconf" version))
16421 (sha256
16422 (base32
16423 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
16424 (build-system python-build-system)
16425 (arguments
16426 `(#:python ,python-2
16427 #:phases
16428 (modify-phases %standard-phases
16429 (add-after 'unpack 'patch-requires
16430 (lambda* (#:key inputs #:allow-other-keys)
16431 (substitute* "setup.py"
16432 (("enum-compat")
16433 "enum34"))
16434 #t)))))
16435 (native-inputs
16436 `(("python2-six" ,python2-six)
16437 ("python2-enum32" ,python2-enum34)
16438 ("python2-netifaces" ,python2-netifaces)
16439 ("python2-typing" ,python2-typing)))
16440 (home-page "https://github.com/jstasiak/python-zeroconf")
16441 (synopsis "Pure Python mDNS service discovery")
16442 (description
16443 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
16444 compatible).")
16445 (license license:lgpl2.1+)))
16446
16447 (define-public python-bsddb3
16448 (package
16449 (name "python-bsddb3")
16450 (version "6.2.6")
16451 (source
16452 (origin
16453 (method url-fetch)
16454 (uri (pypi-uri "bsddb3" version))
16455 (sha256
16456 (base32
16457 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
16458 (build-system python-build-system)
16459 (inputs
16460 `(("bdb" ,bdb)))
16461 (arguments
16462 '(#:phases
16463 (modify-phases %standard-phases
16464 (add-after 'unpack 'configure-locations
16465 (lambda* (#:key inputs #:allow-other-keys)
16466 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
16467 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
16468 #t))
16469 (replace 'check
16470 (lambda _
16471 (invoke "python3" "test3.py" "-v"))))))
16472 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
16473 (synopsis "Python bindings for Oracle Berkeley DB")
16474 (description
16475 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
16476 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
16477 Transaction objects, and each of these is exposed as a Python type in the
16478 bsddb3.db module. The database objects can use various access methods: btree,
16479 hash, recno, and queue. Complete support of Berkeley DB distributed
16480 transactions. Complete support for Berkeley DB Replication Manager.
16481 Complete support for Berkeley DB Base Replication. Support for RPC.")
16482 (license license:bsd-3)))
16483
16484 (define-public python-dbfread
16485 (package
16486 (name "python-dbfread")
16487 (version "2.0.7")
16488 (source (origin
16489 (method url-fetch)
16490 (uri (pypi-uri "dbfread" version))
16491 (sha256
16492 (base32
16493 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
16494 (build-system python-build-system)
16495 (native-inputs
16496 `(("python-pytest" ,python-pytest)))
16497 (home-page "https://dbfread.readthedocs.io")
16498 (synopsis "Read DBF Files with Python")
16499 (description
16500 "This library reads DBF files and returns the data as native Python data
16501 types for further processing. It is primarily intended for batch jobs and
16502 one-off scripts.")
16503 (license license:expat)))
16504
16505 (define-public python-cached-property
16506 (package
16507 (name "python-cached-property")
16508 (version "1.5.1")
16509 (source
16510 (origin
16511 (method url-fetch)
16512 (uri (pypi-uri "cached-property" version))
16513 (sha256
16514 (base32
16515 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
16516 (build-system python-build-system)
16517 (arguments
16518 `(#:phases
16519 (modify-phases %standard-phases
16520 ;; https://github.com/pydanny/cached-property/issues/131
16521 ;; recent versions of freezegun break one test
16522 (add-after 'unpack 'disable-broken-test
16523 (lambda _
16524 (substitute* "tests/test_cached_property.py"
16525 (("def test_threads_ttl_expiry\\(self\\)" m)
16526 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
16527 " " m)))
16528 #t)))))
16529 (native-inputs
16530 `(("python-freezegun" ,python-freezegun)))
16531 (home-page
16532 "https://github.com/pydanny/cached-property")
16533 (synopsis
16534 "Decorator for caching properties in classes")
16535 (description
16536 "This package provides a decorator which makes caching
16537 time-or-computationally-expensive properties quick and easy and works in Python
16538 2 or 3.")
16539 (license license:bsd-3)))
16540
16541 (define-public python-folium
16542 (package
16543 (name "python-folium")
16544 (version "0.10.0")
16545 (source
16546 (origin
16547 (method url-fetch)
16548 (uri (pypi-uri "folium" version))
16549 (sha256
16550 (base32
16551 "18fzxijsgrb95r0a8anc9ba5ijyw3nlnv3rpavfbkqa5v878x84f"))))
16552 (build-system python-build-system)
16553 (propagated-inputs
16554 `(("python-branca" ,python-branca)
16555 ("python-jinja2" ,python-jinja2)
16556 ("python-numpy" ,python-numpy)
16557 ("python-requests" ,python-requests)))
16558 (native-inputs
16559 `(("python-pytest" ,python-pytest)))
16560 (home-page "https://github.com/python-visualization/folium")
16561 (synopsis "Make beautiful maps with Leaflet.js & Python")
16562 (description "@code{folium} makes it easy to visualize data that’s been
16563 manipulated in Python on an interactive leaflet map. It enables both the
16564 binding of data to a map for @code{choropleth} visualizations as well as
16565 passing rich vector/raster/HTML visualizations as markers on the map.
16566
16567 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
16568 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
16569 supports Image, Video, GeoJSON and TopoJSON overlays.")
16570 (license license:expat)))
16571
16572 (define-public jube
16573 (package
16574 ;; This is a command-line tool, so no "python-" prefix.
16575 (name "jube")
16576 (version "2.2.2")
16577 (source (origin
16578 (method url-fetch)
16579 (uri (string-append
16580 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
16581 version))
16582 (sha256
16583 (base32
16584 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
16585 (file-name (string-append "jube-" version ".tar.gz"))))
16586 (build-system python-build-system)
16587 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
16588 (synopsis "Benchmarking environment")
16589 (description
16590 "JUBE helps perform and analyze benchmarks in a systematic way. For each
16591 benchmarked application, benchmark data is stored in a format that allows JUBE
16592 to deduct the desired information. This data can be parsed by automatic pre-
16593 and post-processing scripts that draw information and store it more densely
16594 for manual interpretation.")
16595 (license license:gpl3+)))
16596
16597 (define-public python-pyroutelib3
16598 (package
16599 (name "python-pyroutelib3")
16600 (version "1.3.post1")
16601 (source
16602 (origin
16603 (method url-fetch)
16604 (uri (pypi-uri "pyroutelib3" version))
16605 (sha256
16606 (base32
16607 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
16608 (build-system python-build-system)
16609 (propagated-inputs
16610 `(("python-dateutil" ,python-dateutil)))
16611 (home-page "https://github.com/MKuranowski/pyroutelib3")
16612 (synopsis "Library for simple routing on OSM data")
16613 (description "Library for simple routing on OSM data")
16614 (license license:gpl3+)))
16615
16616 (define-public python-elementpath
16617 (package
16618 (name "python-elementpath")
16619 (version "1.2.0")
16620 (source
16621 (origin
16622 (method url-fetch)
16623 (uri (pypi-uri "elementpath" version))
16624 (sha256
16625 (base32
16626 "1syn2z543brab23dskh3fjd9pqvz6npqbcicrs2d88dbg26xl08p"))))
16627 (build-system python-build-system)
16628 (home-page
16629 "https://github.com/sissaschool/elementpath")
16630 (synopsis
16631 "XPath 1.0/2.0 parsers and selectors for ElementTree and lxml")
16632 (description
16633 "The proposal of this package is to provide XPath 1.0 and 2.0 selectors
16634 for Python's ElementTree XML data structures, both for the standard
16635 ElementTree library and for the @uref{http://lxml.de, lxml.etree} library.
16636
16637 For lxml.etree this package can be useful for providing XPath 2.0 selectors,
16638 because lxml.etree already has it's own implementation of XPath 1.0.")
16639 (license license:expat)))
16640
16641 (define-public python-bibtexparser
16642 (package
16643 (name "python-bibtexparser")
16644 (version "1.1.0")
16645 (source
16646 (origin
16647 (method url-fetch)
16648 (uri (pypi-uri "bibtexparser" version))
16649 (sha256
16650 (base32
16651 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
16652 (build-system python-build-system)
16653 (propagated-inputs
16654 `(("python-pyparsing" ,python-pyparsing)))
16655 (native-inputs
16656 `(("python-future" ,python-future)))
16657 (home-page "https://github.com/sciunto-org/python-bibtexparser")
16658 (synopsis "Python library to parse BibTeX files")
16659 (description "BibtexParser is a Python library to parse BibTeX files.")
16660 (license (list license:bsd-3 license:lgpl3))))
16661
16662 (define-public python-distro
16663 (package
16664 (name "python-distro")
16665 (version "1.4.0")
16666 (source
16667 (origin
16668 (method url-fetch)
16669 (uri (pypi-uri "distro" version))
16670 (sha256
16671 (base32
16672 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
16673 (build-system python-build-system)
16674 (native-inputs
16675 `(("python-pytest" ,python-pytest)))
16676 (home-page "https://github.com/nir0s/distro")
16677 (synopsis
16678 "OS platform information API")
16679 (description
16680 "@code{distro} provides information about the OS distribution it runs on,
16681 such as a reliable machine-readable ID, or version information.
16682
16683 It is the recommended replacement for Python's original
16684 `platform.linux_distribution` function (which will be removed in Python 3.8).
16685 @code{distro} also provides a command-line interface to output the platform
16686 information in various formats.")
16687 (license license:asl2.0)))
16688
16689 (define-public python-cairosvg
16690 (package
16691 (name "python-cairosvg")
16692 (version "2.4.2")
16693 (source
16694 (origin
16695 (method url-fetch)
16696 (uri (pypi-uri "CairoSVG" version))
16697 (sha256
16698 (base32 "1bb7irxbaxxb9ahm3z5wsx1q96mm5gzskc7b6q07h9ikcnb8yrjf"))))
16699 (build-system python-build-system)
16700 (arguments
16701 `(#:phases
16702 (modify-phases %standard-phases
16703 (replace 'check
16704 (lambda _ (invoke "pytest"))))))
16705 (propagated-inputs
16706 `(("python-cairocffi" ,python-cairocffi)
16707 ("python-cssselect2" ,python-cssselect2)
16708 ("python-defusedxml" ,python-defusedxml)
16709 ("python-pillow" ,python-pillow)
16710 ("python-tinycss2" ,python-tinycss2)))
16711 (native-inputs
16712 `(("python-pytest-flake8" ,python-pytest-flake8)
16713 ("python-pytest-isort" ,python-pytest-isort)
16714 ("python-pytest-runner" ,python-pytest-runner)))
16715 (home-page "https://cairosvg.org/")
16716 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
16717 (description "CairoSVG is a SVG converter based on Cairo. It can export
16718 SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
16719 SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
16720 parsed, the result is drawn to a Cairo surface that can be exported to
16721 qvarious formats: PDF, PostScript, PNG and even SVG.")
16722 (license license:lgpl3+)))
16723
16724 (define-public python-pyphen
16725 (package
16726 (name "python-pyphen")
16727 (version "0.9.5")
16728 (source
16729 (origin
16730 (method url-fetch)
16731 (uri (pypi-uri "Pyphen" version))
16732 (sha256
16733 (base32 "08c9y69ry9d6m4zalhnalg86lsp9v2j5n1ziw5vxfmiihx83lqrv"))))
16734 (build-system python-build-system)
16735 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
16736 ;; embedded set provided by upstream - like Debian does.
16737 (home-page "https://github.com/Kozea/Pyphen")
16738 (synopsis "Pure Python module to hyphenate text")
16739 (description "Pyphen is a pure Python module to hyphenate text using
16740 existing Hunspell hyphenation dictionaries.")
16741 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
16742
16743 (define-public python-intelhex
16744 (package
16745 (name "python-intelhex")
16746 (version "2.2.1")
16747 (source
16748 (origin
16749 (method url-fetch)
16750 (uri (pypi-uri "intelhex" version))
16751 (sha256
16752 (base32
16753 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
16754 (build-system python-build-system)
16755 (arguments '(#:tests? #f)) ;issue with version
16756 (home-page "https://pypi.org/project/IntelHex/")
16757 (synopsis "Python library for Intel HEX files manipulations")
16758 (description "The Intel HEX file format is widely used in microprocessors
16759 and microcontrollers area (embedded systems etc.) as the de facto standard for
16760 representation of code to be programmed into microelectronic devices. This
16761 package provides an intelhex Python library to read, write, create from
16762 scratch and manipulate data from Intel HEX file format. It also includes
16763 several convenience Python scripts, including \"classic\" hex2bin and bin2hex
16764 converters and more, those based on the library itself.")
16765 (license license:bsd-3)))
16766
16767 (define-public python-pykwalify
16768 (package
16769 (name "python-pykwalify")
16770 (version "1.7.0")
16771 (source
16772 (origin
16773 (method url-fetch)
16774 (uri (pypi-uri "pykwalify" version))
16775 (sha256
16776 (base32
16777 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
16778 (build-system python-build-system)
16779 (arguments '(#:tests? #f)) ;missing dependencies
16780 (propagated-inputs
16781 `(("python-dateutil" ,python-dateutil)
16782 ("python-docopt" ,python-docopt)
16783 ("python-pyyaml" ,python-pyyaml)))
16784 (home-page "https://github.com/grokzen/pykwalify")
16785 (synopsis
16786 "Python lib/cli for JSON/YAML schema validation")
16787 (description
16788 "This package provides a parser, schema validator, and data binding tool
16789 for YAML and JSON.")
16790 (license license:expat)))
16791
16792 (define-public python-dbusmock
16793 (package
16794 (name "python-dbusmock")
16795 (version "0.18.3")
16796 (source
16797 (origin
16798 (method url-fetch)
16799 (uri (pypi-uri "python-dbusmock" version))
16800 (sha256
16801 (base32
16802 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
16803 (build-system python-build-system)
16804 (arguments
16805 '(#:phases
16806 (modify-phases %standard-phases
16807 (add-after 'unpack 'patch-shell-path
16808 (lambda _
16809 (substitute* "tests/test_code.py"
16810 (("/bin/bash") (which "bash")))
16811 #t)))))
16812 (native-inputs
16813 `(;; For tests.
16814 ("dbus" ,dbus) ; for dbus-daemon
16815 ("python-nose" ,python-nose)
16816 ("which" ,which)))
16817 (propagated-inputs
16818 `(("python-dbus" ,python-dbus)
16819 ("python-pygobject" ,python-pygobject)))
16820 (home-page "https://github.com/martinpitt/python-dbusmock")
16821 (synopsis "Python library for mock D-Bus objects")
16822 (description "python-dbusmock allows for the easy creation of mock objects on
16823 D-Bus. This is useful for writing tests for software which talks to D-Bus
16824 services such as upower, systemd, logind, gnome-session or others, and it is
16825 hard (or impossible without root privileges) to set the state of the real
16826 services to what you expect in your tests.")
16827 (license license:lgpl3+)))
16828
16829 (define-public python-ujson
16830 (package
16831 (name "python-ujson")
16832 (version "1.35")
16833 (source
16834 (origin
16835 (method url-fetch)
16836 (uri (pypi-uri "ujson" version))
16837 (sha256
16838 (base32
16839 "11jz5wi7mbgqcsz52iqhpyykiaasila4lq8cmc2d54bfa3jp6q7n"))))
16840 (build-system python-build-system)
16841 (home-page "http://www.esn.me")
16842 (synopsis
16843 "Ultra fast JSON encoder and decoder for Python")
16844 (description
16845 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
16846 bindings for Python 2.5+ and 3.")
16847 (license license:bsd-3)))
16848
16849 (define-public python2-ujson
16850 (package-with-python2 python-ujson))
16851
16852 (define-public python-iocapture
16853 ;; The latest release is more than a year older than this commit.
16854 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
16855 (revision "1"))
16856 (package
16857 (name "python-iocapture")
16858 (version "0.1.2")
16859 (source
16860 (origin
16861 (method git-fetch)
16862 (uri (git-reference
16863 (url "https://github.com/oinume/iocapture.git")
16864 (commit commit)))
16865 (file-name (git-file-name name version))
16866 (sha256
16867 (base32
16868 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
16869 (build-system python-build-system)
16870 (arguments
16871 `(#:phases
16872 (modify-phases %standard-phases
16873 (delete 'check)
16874 (add-after 'install 'check
16875 (lambda* (#:key inputs outputs #:allow-other-keys)
16876 (add-installed-pythonpath inputs outputs)
16877 (invoke "py.test" "-v" "tests")
16878 #t)))))
16879 (propagated-inputs
16880 `(("python-flexmock" ,python-flexmock)
16881 ("python-pytest" ,python-pytest)
16882 ("python-pytest-cov" ,python-pytest-cov)
16883 ("python-six" ,python-six)))
16884 (home-page "https://github.com/oinume/iocapture")
16885 (synopsis "Python capturing tool for stdout and stderr")
16886 (description
16887 "This package helps you to capture the standard out (stdout) and the
16888 standard error channel (stderr) in your program.")
16889 (license license:expat))))
16890
16891 (define-public python-argh
16892 ;; There are 21 commits since the latest release containing important
16893 ;; improvements.
16894 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
16895 (revision "1"))
16896 (package
16897 (name "python-argh")
16898 (version (git-version "0.26.2" revision commit))
16899 (source
16900 (origin
16901 (method git-fetch)
16902 (uri (git-reference
16903 (url "https://github.com/neithere/argh.git")
16904 (commit commit)))
16905 (file-name (git-file-name name version))
16906 (sha256
16907 (base32
16908 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
16909 (build-system python-build-system)
16910 (propagated-inputs
16911 `(("python-iocapture" ,python-iocapture)
16912 ("python-mock" ,python-mock)
16913 ("python-pytest" ,python-pytest)
16914 ("python-pytest-cov" ,python-pytest-cov)
16915 ("python-pytest-xdist" ,python-pytest-xdist)
16916 ("python-tox" ,python-tox)))
16917 (home-page "https://github.com/neithere/argh/")
16918 (synopsis "Argparse wrapper with natural syntax")
16919 (description
16920 "python-argh is a small library that provides several layers of
16921 abstraction on top of @code{python-argparse}. The layers can be mixed. It is
16922 always possible to declare a command with the highest possible (and least
16923 flexible) layer and then tune the behaviour with any of the lower layers
16924 including the native API of @code{python-argparse}.")
16925 (license license:lgpl3+))))
16926
16927 (define-public python-ppft
16928 (package
16929 (name "python-ppft")
16930 (version "1.6.6.1")
16931 (source
16932 (origin
16933 (method url-fetch)
16934 (uri (pypi-uri "ppft" version))
16935 (sha256
16936 (base32
16937 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
16938 (build-system python-build-system)
16939 (arguments '(#:tests? #f)) ; there are none
16940 (propagated-inputs
16941 `(("python-six" ,python-six)))
16942 (home-page "https://pypi.org/project/ppft/")
16943 (synopsis "Fork of Parallel Python")
16944 (description
16945 "This package is a fork of Parallel Python. The Parallel Python
16946 module (@code{pp}) provides an easy and efficient way to create
16947 parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
16948 computers and clusters. It features cross-platform portability and dynamic
16949 load balancing.")
16950 (license license:bsd-3)))
16951
16952 (define-public python-pox
16953 (package
16954 (name "python-pox")
16955 (version "0.2.7")
16956 (source
16957 (origin
16958 (method url-fetch)
16959 (uri (pypi-uri "pox" version))
16960 (sha256
16961 (base32
16962 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
16963 (build-system python-build-system)
16964 (arguments
16965 `(#:phases
16966 (modify-phases %standard-phases
16967 (replace 'check
16968 (lambda _
16969 (mkdir-p "/tmp/guix")
16970 (setenv "SHELL" "bash")
16971 (setenv "USERNAME" "guix")
16972 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
16973 (invoke "py.test" "-vv")
16974 #t)))))
16975 (native-inputs
16976 `(("python-pytest" ,python-pytest)
16977 ("which" ,which)))
16978 (home-page "https://pypi.org/project/pox/")
16979 (synopsis "Python utilities for filesystem exploration and automated builds")
16980 (description
16981 "Pox provides a collection of utilities for navigating and manipulating
16982 filesystems. This module is designed to facilitate some of the low level
16983 operating system interactions that are useful when exploring a filesystem on a
16984 remote host. Pox provides Python equivalents of several shell commands such
16985 as @command{which} and @command{find}. These commands allow automated
16986 discovery of what has been installed on an operating system, and where the
16987 essential tools are located.")
16988 (license license:bsd-3)))
16989
16990 (define-public python-pathos
16991 (package
16992 (name "python-pathos")
16993 (version "0.2.5")
16994 (source
16995 (origin
16996 (method url-fetch)
16997 (uri (pypi-uri "pathos" version))
16998 (sha256
16999 (base32
17000 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
17001 (build-system python-build-system)
17002 (arguments
17003 '(#:phases
17004 (modify-phases %standard-phases
17005 (replace 'check
17006 (lambda _
17007 (setenv "PYTHONPATH"
17008 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
17009 (invoke "python" "./tests/__main__.py"))))))
17010 (propagated-inputs
17011 `(("python-dill" ,python-dill)
17012 ("python-multiprocess" ,python-multiprocess)
17013 ("python-pox" ,python-pox)
17014 ("python-ppft" ,python-ppft)))
17015 (native-inputs
17016 `(("python-pytest" ,python-pytest)))
17017 (home-page "https://pypi.org/project/pathos/")
17018 (synopsis
17019 "Parallel graph management and execution in heterogeneous computing")
17020 (description
17021 "Python-pathos is a framework for heterogenous computing. It provides a
17022 consistent high-level interface for configuring and launching parallel
17023 computations across heterogenous resources. Python-pathos provides configurable
17024 launchers for parallel and distributed computing, where each launcher contains
17025 the syntactic logic to configure and launch jobs in an execution environment.")
17026 (license license:bsd-3)))
17027
17028 (define-public python-flit
17029 (package
17030 (name "python-flit")
17031 (version "2.1.0")
17032 (source
17033 (origin
17034 (method url-fetch)
17035 (uri (pypi-uri "flit" version))
17036 (sha256
17037 (base32
17038 "0h5vvmqinqzn97mr3ix7zx53af9ad4fimjjwqpx88yp8qhz4r5bc"))))
17039 (build-system python-build-system)
17040 (arguments
17041 `(#:tests? #f)) ; XXX: Check requires network access.
17042 (home-page "https://flit.readthedocs.io/")
17043 (synopsis
17044 "Simple packaging tool for simple packages")
17045 (description
17046 "Flit is a simple way to put Python packages and modules on PyPI. Flit
17047 packages a single importable module or package at a time, using the import
17048 name as the name on PyPI. All subpackages and data files within a package
17049 are included automatically.")
17050 (license license:bsd-3)))
17051
17052 (define-public python-pathtools
17053 (package
17054 (name "python-pathtools")
17055 (version "0.1.2")
17056 (source
17057 (origin
17058 (method url-fetch)
17059 (uri (pypi-uri "pathtools" version))
17060 (sha256
17061 (base32
17062 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
17063 (build-system python-build-system)
17064 (home-page
17065 "https://github.com/gorakhargosh/pathtools")
17066 (synopsis "Path utilities for Python")
17067 (description "Pattern matching and various utilities for file systems
17068 paths.")
17069 (license license:expat)))
17070
17071 (define-public python-fastentrypoints
17072 (package
17073 (name "python-fastentrypoints")
17074 (version "0.12")
17075 (source
17076 (origin
17077 (method url-fetch)
17078 (uri (pypi-uri "fastentrypoints" version))
17079 (sha256
17080 (base32
17081 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
17082 (build-system python-build-system)
17083 (home-page
17084 "https://github.com/ninjaaron/fast-entry_points")
17085 (synopsis
17086 "Makes entry_points specified in setup.py load more quickly")
17087 (description
17088 "Using entry_points in your setup.py makes scripts that start really
17089 slowly because it imports pkg_resources. This package allows such setup
17090 scripts to load entry points more quickly.")
17091 (license license:bsd-3)))
17092
17093 (define-public python-funcparserlib
17094 (package
17095 (name "python-funcparserlib")
17096 (version "0.3.6")
17097 (source
17098 (origin
17099 (method url-fetch)
17100 (uri (pypi-uri "funcparserlib" version))
17101 (sha256
17102 (base32
17103 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
17104 (native-inputs
17105 `(("python-tox" ,python-tox)))
17106 (arguments
17107 `(#:phases
17108 (modify-phases %standard-phases
17109 (replace 'check
17110 (lambda _
17111 (invoke "tox"))))))
17112 (build-system python-build-system)
17113 (home-page
17114 "https://github.com/vlasovskikh/funcparserlib")
17115 (synopsis
17116 "Recursive descent parsing library based on functional combinators")
17117 (description
17118 "This package is a recurisve descent parsing library for Python based on
17119 functional combinators. Parser combinators are just higher-order functions
17120 that take parsers as their arguments and return them as result values.")
17121 (license license:expat)))