gnu: python-wheel: Update to 0.33.6.
[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, 2020 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, 2020 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, 2020 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.33.6")
1912 (source
1913 (origin
1914 (method url-fetch)
1915 (uri (pypi-uri "wheel" version))
1916 (sha256
1917 (base32
1918 "0ii6f34rvpjg3nmw4bc2h7fhdsy38y1h93hghncfs5akfrldmj8h"))))
1919 (build-system python-build-system)
1920 (arguments
1921 ;; FIXME: The test suite runs "python setup.py bdist_wheel", which in turn
1922 ;; fails to find the newly-built bdist_wheel library, even though it is
1923 ;; available on PYTHONPATH. What search path is consulted by setup.py?
1924 '(#:tests? #f))
1925 (home-page "https://bitbucket.org/pypa/wheel/")
1926 (synopsis "Format for built Python packages")
1927 (description
1928 "A wheel is a ZIP-format archive with a specially formatted filename and
1929 the @code{.whl} extension. It is designed to contain all the files for a PEP
1930 376 compatible install in a way that is very close to the on-disk format. Many
1931 packages will be properly installed with only the @code{Unpack} step and the
1932 unpacked archive preserves enough information to @code{Spread} (copy data and
1933 scripts to their final locations) at any later time. Wheel files can be
1934 installed with a newer @code{pip} or with wheel's own command line utility.")
1935 (license license:expat)))
1936
1937 (define-public python2-wheel
1938 (package-with-python2 python-wheel))
1939
1940 (define-public python-vcversioner
1941 (package
1942 (name "python-vcversioner")
1943 (version "2.16.0.0")
1944 (source
1945 (origin
1946 (method url-fetch)
1947 (uri (pypi-uri "vcversioner" version))
1948 (sha256
1949 (base32
1950 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1951 (build-system python-build-system)
1952 (synopsis "Python library for version number discovery")
1953 (description "Vcversioner is a Python library that inspects tagging
1954 information in a variety of version control systems in order to discover
1955 version numbers.")
1956 (home-page "https://github.com/habnabit/vcversioner")
1957 (license license:isc)))
1958
1959 (define-public python2-vcversioner
1960 (package-with-python2 python-vcversioner))
1961
1962 (define-public python-jdcal
1963 (package
1964 (name "python-jdcal")
1965 (version "1.4")
1966 (source
1967 (origin
1968 (method url-fetch)
1969 (uri (pypi-uri "jdcal" version))
1970 (sha256
1971 (base32
1972 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
1973 (build-system python-build-system)
1974 (arguments
1975 `(#:phases (modify-phases %standard-phases
1976 (replace 'check
1977 (lambda _
1978 (invoke "pytest"))))))
1979 (native-inputs
1980 `(("python-pytest" ,python-pytest)))
1981 (home-page "https://github.com/phn/jdcal")
1982 (synopsis "Functions to convert between Julian dates Gregorian dates")
1983 (description "This Python library provides functions for converting
1984 between Julian dates and Gregorian dates.")
1985 (license license:bsd-2)))
1986
1987 (define-public python2-jdcal
1988 (package-with-python2 python-jdcal))
1989
1990 (define-public python-jsonschema
1991 (package
1992 (name "python-jsonschema")
1993 (version "3.0.1")
1994 (source (origin
1995 (method url-fetch)
1996 (uri (pypi-uri "jsonschema" version))
1997 (sha256
1998 (base32
1999 "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc"))))
2000 (build-system python-build-system)
2001 (arguments
2002 '(#:phases
2003 (modify-phases %standard-phases
2004 (replace 'check
2005 (lambda _
2006 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2007 (invoke "trial" "jsonschema"))))))
2008 (native-inputs
2009 `(("python-setuptools_scm" ,python-setuptools-scm)
2010 ("python-twisted" ,python-twisted)))
2011 (propagated-inputs
2012 `(("python-attrs" ,python-attrs)
2013 ("python-pyrsistent" ,python-pyrsistent)
2014 ("python-six" ,python-six)))
2015 (home-page "https://github.com/Julian/jsonschema")
2016 (synopsis "Implementation of JSON Schema for Python")
2017 (description
2018 "Jsonschema is an implementation of JSON Schema for Python.")
2019 (license license:expat)
2020 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2021
2022 (define-public python2-jsonschema
2023 (let ((jsonschema (package-with-python2
2024 (strip-python2-variant python-jsonschema))))
2025 (package (inherit jsonschema)
2026 (propagated-inputs
2027 `(("python2-functools32" ,python2-functools32)
2028 ,@(package-propagated-inputs jsonschema))))))
2029
2030 ;; This old version is still required by docker-compose as of 1.24.0.
2031 (define-public python-jsonschema-2.6
2032 (package
2033 (name "python-jsonschema")
2034 (version "2.6.0")
2035 (source (origin
2036 (method url-fetch)
2037 (uri (pypi-uri "jsonschema" version))
2038 (sha256
2039 (base32
2040 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
2041 (build-system python-build-system)
2042 (arguments
2043 '(#:phases
2044 (modify-phases %standard-phases
2045 (replace 'check (lambda _ (invoke "nosetests"))))))
2046 (native-inputs
2047 `(("python-nose" ,python-nose)
2048 ("python-vcversioner" ,python-vcversioner)))
2049 (home-page "https://github.com/Julian/jsonschema")
2050 (synopsis "Implementation of JSON Schema for Python")
2051 (description
2052 "Jsonschema is an implementation of JSON Schema for Python.")
2053 (license license:expat)
2054 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2055
2056 (define-public python-schema
2057 (package
2058 (name "python-schema")
2059 (version "0.6.6")
2060 (source
2061 (origin
2062 (method url-fetch)
2063 (uri (pypi-uri "schema" version))
2064 (sha256
2065 (base32
2066 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2067 (build-system python-build-system)
2068 (native-inputs
2069 `(("python-pytest" ,python-pytest)))
2070 (home-page "https://github.com/keleshev/schema")
2071 (synopsis "Simple data validation library")
2072 (description
2073 "@code{python-schema} is a library for validating Python data
2074 structures, such as those obtained from config-files, forms, external
2075 services or command-line parsing, converted from JSON/YAML (or
2076 something else) to Python data-types.")
2077 (license license:psfl)))
2078
2079 (define-public python2-schema
2080 (package-with-python2 python-schema))
2081
2082 (define-public python-schema-0.5
2083 (package (inherit python-schema)
2084 (version "0.5.0")
2085 (source
2086 (origin
2087 (method url-fetch)
2088 (uri (pypi-uri "schema" version))
2089 (sha256
2090 (base32
2091 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2092
2093 (define-public python2-schema-0.5
2094 (package-with-python2 python-schema-0.5))
2095
2096 (define-public python-kitchen
2097 (package
2098 (name "python-kitchen")
2099 (version "1.2.5")
2100 (source
2101 (origin
2102 (method url-fetch)
2103 (uri (pypi-uri "kitchen" version))
2104 (sha256
2105 (base32
2106 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2107 (build-system python-build-system)
2108 (propagated-inputs
2109 `(("python-chardet" ,python-chardet)))
2110 (home-page "https://github.com/fedora-infra/kitchen")
2111 (synopsis "Python API for snippets")
2112 (description "@code{kitchen} module provides a python API for all sorts of
2113 little useful snippets of code that everybody ends up writing for their projects
2114 but never seem big enough to build an independent release. Use kitchen and stop
2115 cutting and pasting that code over and over.")
2116 (license (list license:lgpl2.1+
2117 ;; subprocess.py, test_subprocess.py,
2118 ;; kitchen/pycompat25/defaultdict.py:
2119 license:psfl))))
2120
2121 (define-public python2-kitchen
2122 (package-with-python2 python-kitchen))
2123
2124 (define-public python-unidecode
2125 (package
2126 (name "python-unidecode")
2127 (version "1.1.1")
2128 (source (origin
2129 (method url-fetch)
2130 (uri (pypi-uri "Unidecode" version))
2131 (sha256
2132 (base32
2133 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
2134 (build-system python-build-system)
2135 (home-page "https://pypi.python.org/pypi/Unidecode")
2136 (synopsis "ASCII transliterations of Unicode text")
2137 (description
2138 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2139 useful when integrating with legacy code that doesn't support Unicode, or for
2140 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2141 machine identifiers from human-readable Unicode strings that should still be
2142 somewhat intelligible.")
2143 (license license:gpl2+)))
2144
2145 (define-public python2-unidecode
2146 (package-with-python2 python-unidecode))
2147
2148 (define-public python-pyjwt
2149 (package
2150 (name "python-pyjwt")
2151 (version "1.7.1")
2152 (source
2153 (origin
2154 (method url-fetch)
2155 (uri (pypi-uri "PyJWT" version))
2156 (sha256
2157 (base32
2158 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
2159 (modules '((guix build utils)))
2160 (snippet
2161 '(begin
2162 (for-each delete-file-recursively
2163 (find-files "." "\\.pyc$"))
2164 #t))))
2165 (build-system python-build-system)
2166 (native-inputs
2167 `(("python-pytest" ,python-pytest)
2168 ("python-pytest-cov" ,python-pytest-cov)
2169 ("python-pytest-runner" ,python-pytest-runner)))
2170 (home-page "https://github.com/progrium/pyjwt")
2171 (synopsis "JSON Web Token implementation in Python")
2172 (description
2173 "PyJWT is a JSON Web Token implementation written in Python.")
2174 (license license:expat)))
2175
2176 (define-public python2-pyjwt
2177 (package-with-python2 python-pyjwt))
2178
2179 (define-public python-pykka
2180 (package
2181 (name "python-pykka")
2182 (version "1.2.1")
2183 (source
2184 (origin
2185 (method url-fetch)
2186 (uri (pypi-uri "Pykka" version))
2187 (sha256
2188 (base32
2189 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2190 (build-system python-build-system)
2191 (native-inputs
2192 `(("python-mock" ,python-mock)
2193 ("python-nose" ,python-nose)
2194 ("python-gevent" ,python-gevent)
2195 ("python-eventlet" ,python-eventlet)))
2196 (home-page "https://www.pykka.org/")
2197 (synopsis "Pykka is a Python implementation of the actor model")
2198 (description
2199 "Pykka is a Python implementation of the actor model.
2200 The actor model introduces some simple rules to control the sharing
2201 of state and cooperation between execution units, which makes it
2202 easier to build concurrent applications.")
2203 (license license:asl2.0)))
2204
2205 (define-public python2-pykka
2206 (package-with-python2 python-pykka))
2207
2208 (define-public python-pymsgbox
2209 (package
2210 (name "python-pymsgbox")
2211 (version "1.0.6")
2212 (source
2213 (origin
2214 (method git-fetch)
2215 (uri (git-reference
2216 ;; LICENSE.txt is not present on pypi
2217 (url "https://github.com/asweigart/PyMsgBox")
2218 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2219 (file-name (git-file-name name version))
2220 (sha256
2221 (base32
2222 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2223 (arguments
2224 ;; Circular dependency to run tests:
2225 ;; Tests need pyautogui, which depends on pymsgbox.
2226 '(#:tests? #f))
2227 (build-system python-build-system)
2228 (home-page "https://github.com/asweigart/PyMsgBox")
2229 (synopsis "Python module for JavaScript-like message boxes")
2230 (description
2231 "PyMsgBox is a simple, cross-platform, pure Python module for
2232 JavaScript-like message boxes. Types of dialog boxes include:
2233 @enumerate
2234 @item alert
2235 @item confirm
2236 @item prompt
2237 @item password
2238 @end enumerate
2239 ")
2240 (license license:bsd-3)))
2241
2242 (define-public python-pympler
2243 (package
2244 (name "python-pympler")
2245 (home-page "https://pythonhosted.org/Pympler/")
2246 (version "0.7")
2247 (source (origin
2248 (method url-fetch)
2249 (uri (pypi-uri "Pympler" version))
2250 (sha256
2251 (base32
2252 "0ki7bqp1h9l1xc2k1h4vjyzsgs20i8ingvcdhszyi72s28wyf4bs"))))
2253 (build-system python-build-system)
2254 (arguments
2255 `(#:phases (modify-phases %standard-phases
2256 (delete 'check)
2257 (add-after 'install 'check
2258 (lambda* (#:key inputs outputs #:allow-other-keys)
2259 (add-installed-pythonpath inputs outputs)
2260 (invoke "python" "setup.py" "test"))))))
2261 (synopsis "Measure, monitor and analyze memory behavior")
2262 (description
2263 "Pympler is a development tool to measure, monitor and analyze
2264 the memory behavior of Python objects in a running Python application.
2265
2266 By pympling a Python application, detailed insight in the size and the
2267 lifetime of Python objects can be obtained. Undesirable or unexpected
2268 runtime behavior like memory bloat and other @samp{pymples} can easily
2269 be identified.
2270
2271 A web profiling frontend exposes process statistics, garbage
2272 visualisation and class tracker statistics.")
2273 (license license:asl2.0)))
2274
2275 (define-public python2-pympler
2276 (package-with-python2 python-pympler))
2277
2278 (define-public python-itsdangerous
2279 (package
2280 (name "python-itsdangerous")
2281 (version "1.1.0")
2282 (source
2283 (origin
2284 (method url-fetch)
2285 (uri (pypi-uri "itsdangerous" version))
2286 (sha256
2287 (base32
2288 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
2289 (build-system python-build-system)
2290 (home-page "https://palletsprojects.com/p/itsdangerous/")
2291 (synopsis "Python library for passing data to/from untrusted environments")
2292 (description
2293 "Itsdangerous provides various helpers to pass trusted data to untrusted
2294 environments and back.")
2295 (license license:bsd-3)))
2296
2297 (define-public python2-itsdangerous
2298 (package-with-python2 python-itsdangerous))
2299
2300 (define-public python-pyyaml
2301 (package
2302 (name "python-pyyaml")
2303 (version "3.13")
2304 (source
2305 (origin
2306 (method url-fetch)
2307 (uri (pypi-uri "PyYAML" version))
2308 (sha256
2309 (base32
2310 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2311 (build-system python-build-system)
2312 (inputs
2313 `(("libyaml" ,libyaml)))
2314 (home-page "http://pyyaml.org/wiki/PyYAML")
2315 (synopsis "YAML parser and emitter for Python")
2316 (description
2317 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2318 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2319 API, and sensible error messages. PyYAML supports standard YAML tags and
2320 provides Python-specific tags that allow to represent an arbitrary Python
2321 object.")
2322 (license license:expat)))
2323
2324 (define-public python2-pyyaml
2325 (package-with-python2 python-pyyaml))
2326
2327 (define-public python-vine
2328 (package
2329 (name "python-vine")
2330 (version "1.1.4")
2331 (source
2332 (origin
2333 (method url-fetch)
2334 (uri (pypi-uri "vine" version))
2335 (sha256
2336 (base32
2337 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2338 (build-system python-build-system)
2339 (native-inputs
2340 `(("python-pytest" ,python-pytest)
2341 ("python-case" ,python-case)))
2342 (home-page "https://github.com/celery/vine")
2343 (synopsis "Promises for Python")
2344 (description
2345 "@code{vine} provides a special implementation of promises in that it can
2346 be used both for \"promise of a value\" and lazy evaluation. The biggest
2347 upside for this is that everything in a promise can also be a promise,
2348 e.g. filters, callbacks and errbacks can all be promises.")
2349 (license license:bsd-3)))
2350
2351 (define-public python-virtualenv
2352 (package
2353 (name "python-virtualenv")
2354 (version "16.1.0")
2355 (source
2356 (origin
2357 (method url-fetch)
2358 (uri (pypi-uri "virtualenv" version))
2359 (sha256
2360 (base32
2361 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
2362 (build-system python-build-system)
2363 (arguments
2364 `(#:phases
2365 (modify-phases %standard-phases
2366 (add-before 'check 'disable-failing-test
2367 (lambda _
2368 ;; Disable failing test. See upstream bug report
2369 ;; https://github.com/pypa/virtualenv/issues/957
2370 (substitute* "tests/test_virtualenv.py"
2371 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2372 #t)))))
2373 (native-inputs
2374 `(("python-mock" ,python-mock)
2375 ("python-pytest" ,python-pytest)))
2376 (home-page "https://virtualenv.pypa.io/")
2377 (synopsis "Virtual Python environment builder")
2378 (description
2379 "Virtualenv is a tool to create isolated Python environments.")
2380 (license license:expat)))
2381
2382 (define-public python2-virtualenv
2383 (package-with-python2 python-virtualenv))
2384
2385 (define-public python-markupsafe
2386 (package
2387 (name "python-markupsafe")
2388 (version "1.1.1")
2389 (source
2390 (origin
2391 (method url-fetch)
2392 (uri (pypi-uri "MarkupSafe" version))
2393 (sha256
2394 (base32
2395 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
2396 (build-system python-build-system)
2397 (arguments
2398 `(#:modules ((ice-9 ftw)
2399 (srfi srfi-1)
2400 (srfi srfi-26)
2401 (guix build utils)
2402 (guix build python-build-system))
2403 #:phases (modify-phases %standard-phases
2404 (replace 'check
2405 (lambda _
2406 (let ((cwd (getcwd))
2407 (libdir (find (cut string-prefix? "lib." <>)
2408 (scandir "build"))))
2409 (setenv "PYTHONPATH"
2410 (string-append cwd "/build/" libdir ":"
2411 (getenv "PYTHONPATH")))
2412 (invoke "pytest" "-vv")))))))
2413 (native-inputs
2414 `(("python-pytest" ,python-pytest)))
2415 (home-page "https://github.com/mitsuhiko/markupsafe")
2416 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2417 (description
2418 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2419 for Python.")
2420 (license license:bsd-3)))
2421
2422 (define-public python2-markupsafe
2423 (package-with-python2 python-markupsafe))
2424
2425 (define-public python-jinja2
2426 (package
2427 (name "python-jinja2")
2428 (version "2.10.1")
2429 (source
2430 (origin
2431 (method url-fetch)
2432 (uri (pypi-uri "Jinja2" version))
2433 (sha256
2434 (base32
2435 "04shqrs56aj04ipyqykj512rw2l0zfammvj9krawzxz7xc14yp06"))))
2436 (build-system python-build-system)
2437 (propagated-inputs
2438 `(("python-markupsafe" ,python-markupsafe)))
2439 (home-page "http://jinja.pocoo.org/")
2440 (synopsis "Python template engine")
2441 (description
2442 "Jinja2 is a small but fast and easy to use stand-alone template engine
2443 written in pure Python.")
2444 (license license:bsd-3)))
2445
2446 (define-public python2-jinja2
2447 (package-with-python2 python-jinja2))
2448
2449 (define-public python-jinja2-time
2450 (package
2451 (name "python-jinja2-time")
2452 (version "0.2.0")
2453 (source
2454 (origin
2455 (method url-fetch)
2456 (uri (pypi-uri "jinja2-time" version))
2457 (sha256
2458 (base32
2459 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
2460 (build-system python-build-system)
2461 (propagated-inputs
2462 `(("python-arrow" ,python-arrow)
2463 ("python-jinja2" ,python-jinja2)))
2464 (home-page
2465 "https://github.com/hackebrot/jinja2-time")
2466 (synopsis "Jinja2 Extension for Dates and Times")
2467 (description
2468 "This package provides an extension for the template engine Jinja2. It
2469 adds a 'now' tag providing a convenient access to the arrow.now() API from
2470 templates. A format string can be provided to control the output.")
2471 (license license:expat)))
2472
2473 (define-public python-pystache
2474 (package
2475 (name "python-pystache")
2476 (version "0.5.4")
2477 (source (origin
2478 (method url-fetch)
2479 (uri (pypi-uri "pystache" version))
2480 (sha256
2481 (base32
2482 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2483 (build-system python-build-system)
2484 (arguments
2485 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2486 (home-page "http://defunkt.io/pystache/")
2487 (synopsis "Python logic-less template engine")
2488 (description
2489 "Pystache is a Python implementation of the framework agnostic,
2490 logic-free templating system Mustache.")
2491 (license license:expat)
2492 (properties `((python2-variant . ,(delay python2-pystache))))))
2493
2494 (define-public python2-pystache
2495 (package (inherit (package-with-python2
2496 (strip-python2-variant python-pystache)))
2497 (arguments
2498 `(#:python ,python-2
2499 #:phases
2500 (modify-phases %standard-phases
2501 (replace 'check
2502 (lambda _
2503 (invoke "python" "test_pystache.py"))))))))
2504
2505 (define-public python-joblib
2506 (package
2507 (name "python-joblib")
2508 (version "0.13.0")
2509 (source (origin
2510 (method url-fetch)
2511 (uri (pypi-uri "joblib" version))
2512 (sha256
2513 (base32
2514 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2515 (build-system python-build-system)
2516 (arguments
2517 `(#:phases
2518 (modify-phases %standard-phases
2519 (replace 'check
2520 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2521 (native-inputs
2522 `(("python-pytest" ,python-pytest)))
2523 (home-page "https://joblib.readthedocs.io/")
2524 (synopsis "Using Python functions as pipeline jobs")
2525 (description
2526 "Joblib is a set of tools to provide lightweight pipelining in Python.
2527 In particular, joblib offers: transparent disk-caching of the output values
2528 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2529 logging and tracing of the execution.")
2530 (license license:bsd-3)))
2531
2532 (define-public python2-joblib
2533 (package-with-python2 python-joblib))
2534
2535 (define-public python-daemon
2536 (package
2537 (name "python-daemon")
2538 (version "2.2.3")
2539 (source
2540 (origin
2541 (method url-fetch)
2542 (uri (pypi-uri "python-daemon" version))
2543 (sha256
2544 (base32
2545 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2546 (build-system python-build-system)
2547 (arguments
2548 `(#:phases
2549 (modify-phases %standard-phases
2550 (add-before 'check 'disable-tests
2551 (lambda _
2552 ;; FIXME: Determine why test fails
2553 (substitute* "test/test_daemon.py"
2554 (("test_detaches_process_context")
2555 "skip_test_detaches_process_context"))
2556 #t)))))
2557 (propagated-inputs
2558 `(("python-lockfile" ,python-lockfile)))
2559 (native-inputs
2560 `(("python-unittest2" ,python-unittest2)
2561 ("python-testtools" ,python-testtools)
2562 ("python-testscenarios" ,python-testscenarios)
2563 ("python-mock" ,python-mock)
2564 ("python-docutils" ,python-docutils)))
2565 (home-page "https://pagure.io/python-daemon/")
2566 (synopsis "Python library for making a Unix daemon process")
2567 (description "Python-daemon is a library that assists a Python program to
2568 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2569
2570 This library provides a @code{DaemonContext} class that manages the following
2571 important tasks for becoming a daemon process:
2572 @enumerate
2573 @item Detach the process into its own process group.
2574 @item Set process environment appropriate for running inside a chroot.
2575 @item Renounce suid and sgid privileges.
2576 @item Close all open file descriptors.
2577 @item Change the working directory, uid, gid, and umask.
2578 @item Set appropriate signal handlers.
2579 @item Open new file descriptors for stdin, stdout, and stderr.
2580 @item Manage a specified PID lock file.
2581 @item Register cleanup functions for at-exit processing.
2582 @end enumerate")
2583 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2584 (license (list license:asl2.0 license:gpl3+))))
2585
2586 (define-public python-docutils
2587 (package
2588 (name "python-docutils")
2589 (version "0.14")
2590 (source
2591 (origin
2592 (method url-fetch)
2593 (uri (pypi-uri "docutils" version))
2594 (sha256
2595 (base32
2596 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2597 (build-system python-build-system)
2598 (arguments
2599 '(#:tests? #f)) ; no setup.py test command
2600 (home-page "http://docutils.sourceforge.net/")
2601 (synopsis "Python Documentation Utilities")
2602 (description
2603 "Docutils is a modular system for processing documentation into useful
2604 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2605 reStructuredText.")
2606 ;; Most of the source code is public domain, but some source files are
2607 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2608 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2609
2610 (define-public python2-docutils
2611 (package-with-python2 python-docutils))
2612
2613 (define-public python-pygments
2614 (package
2615 (name "python-pygments")
2616 (version "2.4.2")
2617 (source
2618 (origin
2619 (method url-fetch)
2620 (uri (pypi-uri "Pygments" version))
2621 (sha256
2622 (base32
2623 "15v2sqm5g12bqa0c7wikfh9ck2nl97ayizy1hpqhmws5gqalq748"))))
2624 (build-system python-build-system)
2625 (arguments
2626 ;; FIXME: Tests require sphinx, which depends on this.
2627 '(#:tests? #f))
2628 (home-page "http://pygments.org/")
2629 (synopsis "Syntax highlighting")
2630 (description
2631 "Pygments is a syntax highlighting package written in Python.")
2632 (license license:bsd-2)))
2633
2634 (define-public python2-pygments
2635 (package-with-python2 python-pygments))
2636
2637 (define-public python-bumpversion
2638 (package
2639 (name "python-bumpversion")
2640 (version "0.5.3")
2641 (source
2642 (origin
2643 (method url-fetch)
2644 (uri (pypi-uri "bumpversion" version))
2645 (sha256
2646 (base32
2647 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
2648 (build-system python-build-system)
2649 (home-page "https://github.com/peritus/bumpversion")
2650 (synopsis "Tool to bump software version")
2651 (description "This tool provides a command-line interface (CLI) to bump a
2652 software version simply.")
2653 (license license:expat)))
2654
2655 (define-public python-deprecated
2656 (package
2657 (name "python-deprecated")
2658 (version "1.2.5")
2659 (source
2660 (origin
2661 (method git-fetch)
2662 (uri (git-reference
2663 (url "https://github.com/tantale/deprecated.git")
2664 (commit (string-append "v" version))))
2665 (file-name (git-file-name name version))
2666 (sha256
2667 (base32
2668 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
2669 (build-system python-build-system)
2670 (arguments
2671 `(#:phases (modify-phases %standard-phases
2672 (replace 'check
2673 (lambda _
2674 (invoke "pytest"))))))
2675 (propagated-inputs
2676 `(("python-wrapt" ,python-wrapt)))
2677 (native-inputs
2678 `(("python-bumpversion" ,python-bumpversion)
2679 ("python-pytest" ,python-pytest)
2680 ("python-pytest-cov" ,python-pytest-cov)
2681 ("python-sphinx" ,python-sphinx)
2682 ("python-tox" ,python-tox)))
2683 (home-page "https://github.com/tantale/deprecated")
2684 (synopsis "Python decorator to deprecate classes, functions or methods")
2685 (description "The @code{deprecated} decorator provides a convenient way to deprecate
2686 to deprecate classes, functions or methods.")
2687 (license license:expat)))
2688
2689 (define-public python-pygithub
2690 (package
2691 (name "python-pygithub")
2692 (version "1.43.8")
2693 (source
2694 ;; We fetch from the Git repo because there are no tests in the PyPI
2695 ;; archive.
2696 (origin
2697 (method git-fetch)
2698 (uri (git-reference
2699 (url "https://github.com/PyGithub/PyGithub.git")
2700 (commit (string-append "v" version))))
2701 (file-name (git-file-name name version))
2702 (sha256
2703 (base32 "1625v558xga5mwhl9jqmibywy5qafmg1vqrirqz6zfq1la1d22mw"))))
2704 (build-system python-build-system)
2705 (arguments
2706 `(#:phases (modify-phases %standard-phases
2707 ;; Some tests rely on the network.
2708 (add-after 'unpack 'disable-failing-tests
2709 (lambda _
2710 (substitute* "tests/Issue142.py"
2711 (("testDecodeJson") "disabled_testDecodeJson"))
2712 #t))
2713 (add-before 'check 'prepare-for-tests
2714 (lambda _
2715 (for-each (lambda (f)
2716 (chmod f #o666))
2717 (find-files "./tests"))
2718 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
2719 (setenv "PYTHONPATH"
2720 (string-append "./tests:" (getenv "PYTHONPATH")))
2721 #t)))))
2722 (propagated-inputs
2723 `(("python-deprecated" ,python-deprecated)
2724 ("python-pyjwt" ,python-pyjwt)
2725 ("python-requests" ,python-requests)))
2726 (native-inputs `(("python-httpretty" ,python-httpretty)))
2727 (home-page "https://pygithub.readthedocs.io/en/latest/")
2728 (synopsis "Python library for the GitHub API")
2729 (description "This library allows managing GitHub resources such as
2730 repositories, user profiles, and organizations in your Python applications,
2731 using version 3 of the GitHub application programming interface (API).")
2732 (license license:lgpl3+)))
2733
2734 (define-public python-rellu
2735 (package
2736 (name "python-rellu")
2737 (version "0.7")
2738 (source
2739 (origin
2740 (method url-fetch)
2741 (uri (pypi-uri "rellu" version))
2742 (sha256
2743 (base32
2744 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
2745 (build-system python-build-system)
2746 (propagated-inputs
2747 `(("python-invoke" ,python-invoke)
2748 ("python-pygithub" ,python-pygithub)))
2749 (home-page "https://github.com/robotframework/rellu")
2750 (synopsis "Utilities to create PyPI releases")
2751 (description "This collection of utilities contains tooling and templates
2752 to assist in creating releases on GitHub and publishing them on PyPI. It is
2753 designed to be used by Robot Framework and tools and libraries in its
2754 ecosystem, but can naturally be used also by other projects.")
2755 (license license:asl2.0)))
2756
2757 (define-public python-robotframework
2758 (package
2759 (name "python-robotframework")
2760 (version "3.1.2")
2761 ;; There are no tests in the PyPI archive.
2762 (source
2763 (origin
2764 (method git-fetch)
2765 (uri (git-reference
2766 (url "https://github.com/robotframework/robotframework.git")
2767 (commit (string-append "v" version))))
2768 (file-name (git-file-name name version))
2769 (sha256
2770 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
2771 (patches (search-patches
2772 "python-robotframework-honor-source-date-epoch.patch"))))
2773 (build-system python-build-system)
2774 (arguments
2775 `(#:phases (modify-phases %standard-phases
2776 (add-before 'build 'build-and-install-doc
2777 (lambda* (#:key outputs #:allow-other-keys)
2778 (let* ((doc-output (assoc-ref outputs "doc"))
2779 (doc (string-append doc-output "/share/"
2780 ,name "-" ,version "/")))
2781 (invoke "invoke" "library-docs" "all")
2782 (mkdir-p doc)
2783 (copy-recursively "doc/libraries"
2784 (string-append doc "/libraries"))
2785 #t)))
2786 (replace 'check
2787 (lambda _
2788 (invoke "python" "utest/run.py"))))))
2789 (native-inputs
2790 `(("python-invoke" ,python-invoke)
2791 ("python-rellu" ,python-rellu)
2792 ("python:tk" ,python "tk"))) ;used when building the HTML doc
2793 (outputs '("out" "doc"))
2794 (home-page "https://robotframework.org")
2795 (synopsis "Generic automation framework")
2796 (description "Robot Framework is a generic automation framework for
2797 acceptance testing, acceptance test driven development (ATDD), and robotic
2798 process automation (RPA).")
2799 (license license:asl2.0)))
2800
2801 (define-public python-robotframework-lint
2802 ;; There is no properly tagged release; the commit below seems to correspond
2803 ;; to the 0.9 stable release available from PyPI. The tests are not
2804 ;; included in the PyPI archive, so we fetch the sources from the upstream
2805 ;; Git repo.
2806 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
2807 (revision "1"))
2808 (package
2809 (name "python-robotframework-lint")
2810 (version (git-version "0.9.0" revision commit))
2811 (source
2812 (origin
2813 (method git-fetch)
2814 (uri (git-reference
2815 (url "https://github.com/boakley/robotframework-lint.git")
2816 (commit commit)))
2817 (file-name (git-file-name name version))
2818 (sha256
2819 (base32
2820 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
2821 (build-system python-build-system)
2822 (arguments
2823 `(#:phases
2824 (modify-phases %standard-phases
2825 (replace 'check
2826 (lambda _
2827 (invoke "python" "-m" "robot" "-A"
2828 "tests/conf/default.args" "tests"))))))
2829 (propagated-inputs
2830 `(("python-robotframework" ,python-robotframework)))
2831 (home-page "https://github.com/boakley/robotframework-lint/")
2832 (synopsis "Static analysis tool (linter) for Robot Framework")
2833 (description "This package provides the @code{rflint} command-line
2834 utility, a static analysis tool (linter) for Robot Framework source files.")
2835 (license license:asl2.0))))
2836
2837 (define-public python-robotframework-sshlibrary
2838 (package
2839 (name "python-robotframework-sshlibrary")
2840 (version "3.3.0")
2841 ;; There are no tests in the PyPI archive.
2842 (source
2843 (origin
2844 (method git-fetch)
2845 (uri (git-reference
2846 (url "https://github.com/robotframework/SSHLibrary.git")
2847 (commit (string-append "v" version))))
2848 (file-name (git-file-name name version))
2849 (sha256
2850 (base32
2851 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
2852 (build-system python-build-system)
2853 (arguments
2854 `(#:phases
2855 (modify-phases %standard-phases
2856 (add-before 'build 'build-and-install-doc
2857 (lambda* (#:key outputs #:allow-other-keys)
2858 (let* ((doc-output (assoc-ref outputs "doc"))
2859 (doc (string-append doc-output "/share/"
2860 ,name "-" ,version "/")))
2861 (invoke "chmod" "-R" "+w" "docs")
2862 (invoke "invoke" "kw-docs" "project-docs")
2863 (mkdir-p doc)
2864 (for-each delete-file (find-files "docs" "\\.rst"))
2865 (copy-recursively "docs" doc)
2866 #t)))
2867 (replace 'check
2868 (lambda _
2869 ;; Some tests require an SSH server; we remove them.
2870 (delete-file "utest/test_client_api.py")
2871 (delete-file "utest/test_scp.py")
2872 (invoke "python" "utest/run.py"))))))
2873 (propagated-inputs
2874 `(("python-robotframework" ,python-robotframework)
2875 ("python-paramiko" ,python-paramiko)
2876 ("python-scp" ,python-scp)))
2877 (native-inputs
2878 `(("openssh" ,openssh)
2879 ("which" ,which)
2880 ;; To generate the documentation
2881 ("python-docutils" ,python-docutils)
2882 ("python-invoke" ,python-invoke)
2883 ("python-pygments" ,python-pygments)
2884 ("python-rellu" ,python-rellu)))
2885 (outputs '("out" "doc"))
2886 (home-page "https://github.com/robotframework/SSHLibrary")
2887 (synopsis "Robot Framework library for SSH and SFTP")
2888 (description "SSHLibrary is a Robot Framework library providing support
2889 for SSH and SFTP. It has the following main usages:
2890 @itemize @bullet
2891 @item Executing commands on the remote machine, either blocking or non-blocking.
2892 @item Writing and reading in an interactive shell.
2893 @item Transferring files and directories over SFTP.
2894 @item Ensuring that files and directories exist on the remote machine.
2895 @end itemize")
2896 (license license:asl2.0)))
2897
2898 (define-public python-scp
2899 (package
2900 (name "python-scp")
2901 (version "0.13.2")
2902 (source
2903 (origin
2904 (method url-fetch)
2905 (uri (pypi-uri "scp" version))
2906 (sha256
2907 (base32
2908 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
2909 (build-system python-build-system)
2910 (arguments
2911 '(#:tests? #f)) ;tests require an SSH server
2912 (propagated-inputs
2913 `(("python-paramiko" ,python-paramiko)))
2914 (home-page "https://github.com/jbardin/scp.py")
2915 (synopsis "SCP protocol module for Python and Paramiko")
2916 (description "The scp module extends the Paramiko library to send and
2917 receive files via the SCP1 protocol, as implemented by the OpenSSH
2918 @command{scp} program.")
2919 (license license:gpl2+)))
2920
2921 (define-public python-rst.linker
2922 (package
2923 (name "python-rst.linker")
2924 (version "1.11")
2925 (source
2926 (origin
2927 (method url-fetch)
2928 (uri (pypi-uri "rst.linker" version))
2929 (sha256
2930 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
2931 (build-system python-build-system)
2932 (propagated-inputs
2933 `(("python-dateutil" ,python-dateutil)
2934 ("python-six" ,python-six)))
2935 (native-inputs
2936 `(("python-setuptools-scm" ,python-setuptools-scm)))
2937 ;; Test would require path.py, which would introduce a cyclic dependence.
2938 (arguments `(#:tests? #f))
2939 ;; Note: As of version 1.7 the documentation is not worth building.
2940 (home-page "https://github.com/jaraco/rst.linker")
2941 (synopsis "Sphinx plugin to add links and timestamps")
2942 (description "rst.linker allows to automatically replace text by a
2943 reStructuredText external reference or timestamps. It's primary purpose is to
2944 augment the changelog, but it can be used for other documents, too.")
2945 (license license:expat)))
2946
2947 (define-public python2-rst.linker
2948 (package-with-python2 python-rst.linker))
2949
2950 (define-public python-feedgenerator
2951 (package
2952 (name "python-feedgenerator")
2953 (version "1.9")
2954 (source
2955 (origin
2956 (method url-fetch)
2957 (uri (pypi-uri "feedgenerator" version))
2958 (sha256
2959 (base32
2960 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2961 (modules '((guix build utils)))
2962 (snippet
2963 '(begin
2964 ;; Remove pre-compiled .pyc files from source.
2965 (for-each delete-file-recursively
2966 (find-files "." "__pycache__" #:directories? #t))
2967 (for-each delete-file (find-files "." "\\.pyc$"))
2968 #t))))
2969 (build-system python-build-system)
2970 (propagated-inputs
2971 `(("python-pytz" ,python-pytz)
2972 ("python-six" ,python-six)))
2973 (home-page "https://github.com/getpelican/feedgenerator")
2974 (synopsis
2975 "Standalone version of Django's Atom/RSS feed generator")
2976 (description
2977 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2978 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2979 (license license:bsd-3)))
2980
2981 (define-public python2-feedgenerator
2982 (package-with-python2 python-feedgenerator))
2983
2984 (define-public python-toml
2985 (package
2986 (name "python-toml")
2987 (version "0.9.4")
2988 (source
2989 (origin
2990 (method url-fetch)
2991 (uri (pypi-uri "toml" version))
2992 (sha256
2993 (base32
2994 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
2995 (build-system python-build-system)
2996 (arguments
2997 `(#:tests? #f)) ;no tests suite in release
2998 (home-page "https://github.com/uiri/toml")
2999 (synopsis "Library for TOML")
3000 (description
3001 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
3002 Language (TOML) configuration files.")
3003 (license license:expat)))
3004
3005 (define-public python-jsonrpc-server
3006 (package
3007 (name "python-jsonrpc-server")
3008 (version "0.3.2")
3009 (source
3010 (origin
3011 (method url-fetch)
3012 (uri (pypi-uri "python-jsonrpc-server" version))
3013 (sha256
3014 (base32
3015 "0ddgdp26dfxaz6isjbb12974b3rxavgsqrn2zrmck62cmipg5g05"))))
3016 (build-system python-build-system)
3017 (propagated-inputs
3018 `(("python-future" ,python-future)
3019 ("python-mock" ,python-mock)
3020 ("python-pytest" ,python-pytest)
3021 ("python-ujson" ,python-ujson)))
3022 (home-page
3023 "https://github.com/palantir/python-jsonrpc-server")
3024 (synopsis "JSON RPC 2.0 server library")
3025 (description
3026 "This package provides a JSON RPC 2.0 server library for Python.")
3027 (license license:expat)))
3028
3029 (define-public python-pydocstyle
3030 (package
3031 (name "python-pydocstyle")
3032 (version "3.0.0")
3033 (source
3034 (origin
3035 (method url-fetch)
3036 (uri (pypi-uri "pydocstyle" version))
3037 (sha256
3038 (base32
3039 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
3040 (build-system python-build-system)
3041 (propagated-inputs
3042 `(("python-six" ,python-six)
3043 ("python-snowballstemmer" ,python-snowballstemmer)))
3044 (home-page
3045 "https://github.com/PyCQA/pydocstyle/")
3046 (synopsis "Python docstring style checker")
3047 (description
3048 "This package provides a style checker for the Python Language
3049 Server (PLS).")
3050 (license license:expat)))
3051
3052 (define-public python-language-server
3053 (package
3054 (name "python-language-server")
3055 (version "0.31.4")
3056 (source
3057 (origin
3058 (method url-fetch)
3059 (uri (pypi-uri "python-language-server" version))
3060 (sha256
3061 (base32
3062 "1nrs56jpx7dvghaas0kc5k9lxas5vr3awj3k87p4akki43nsblb8"))))
3063 (build-system python-build-system)
3064 (propagated-inputs
3065 `(("python-pluggy" ,python-pluggy)
3066 ("python-jsonrpc-server" ,python-jsonrpc-server)
3067 ("python-jedi" ,python-jedi)
3068 ("python-yapf" ,python-yapf)
3069 ("python-pyflakes" ,python-pyflakes)
3070 ("python-pydocstyle" ,python-pydocstyle)
3071 ("python-pycodestyle" ,python-pycodestyle)
3072 ("python-mccabe" ,python-mccabe)
3073 ("python-rope" ,python-rope)
3074 ("python-autopep8" ,python-autopep8)
3075 ("python-flake8" ,python-flake8)
3076 ("python-pylint" ,python-pylint)))
3077 (home-page "https://github.com/palantir/python-language-server")
3078 (synopsis "Python implementation of the Language Server Protocol")
3079 (description
3080 "The Python Language Server (pyls) is an implementation of the Python 3
3081 language specification for the Language Server Protocol (LSP). This tool is
3082 used in text editing environments to provide a complete and integrated
3083 feature-set for programming Python effectively.")
3084 (license license:expat)))
3085
3086 (define-public python-black
3087 (package
3088 (name "python-black")
3089 (version "18.6b4")
3090 (source
3091 (origin
3092 (method url-fetch)
3093 (uri (pypi-uri "black" version))
3094 (sha256
3095 (base32
3096 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
3097 (build-system python-build-system)
3098 (arguments
3099 `(#:phases
3100 (modify-phases %standard-phases
3101 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3102 (lambda _
3103 (let ((python3 (which "python3")))
3104 (substitute* '("tests/data/fmtonoff.py"
3105 "tests/data/string_prefixes.py"
3106 "tests/data/function.py")
3107 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3108 (string-append "#!" python3 (if (string? minor-version)
3109 minor-version
3110 ""))))))))))
3111 (propagated-inputs
3112 `(("python-click" ,python-click)
3113 ("python-attrs" ,python-attrs)
3114 ("python-appdirs" ,python-appdirs)
3115 ("python-toml" ,python-toml)))
3116 (home-page "https://github.com/ambv/black")
3117 (synopsis "The uncompromising code formatter")
3118 (description "Black is the uncompromising Python code formatter.")
3119 (license license:expat)))
3120
3121 (define-public python-blinker
3122 (package
3123 (name "python-blinker")
3124 (version "1.4")
3125 (source
3126 (origin
3127 (method url-fetch)
3128 (uri (pypi-uri "blinker" version))
3129 (sha256
3130 (base32
3131 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3132 (build-system python-build-system)
3133 (home-page "http://pythonhosted.org/blinker/")
3134 (synopsis "Fast, simple object-to-object and broadcast signaling")
3135 (description
3136 "Blinker provides a fast dispatching system that allows any number of
3137 interested parties to subscribe to events, or \"signals\".")
3138 (license license:expat)))
3139
3140 (define-public python2-blinker
3141 (package-with-python2 python-blinker))
3142
3143 (define-public pelican
3144 (package
3145 (name "pelican")
3146 (version "4.2.0")
3147 (source
3148 (origin
3149 (method url-fetch)
3150 (uri (pypi-uri "pelican" version))
3151 (sha256
3152 (base32
3153 "0mp7hjyhs38ag1hyfcy882g400z0babqi72pnli46dqijfhajzmy"))))
3154 (build-system python-build-system)
3155 (propagated-inputs
3156 `(("python-blinker" ,python-blinker)
3157 ("python-dateutil" ,python-dateutil)
3158 ("python-docutils" ,python-docutils)
3159 ("python-feedgenerator" ,python-feedgenerator)
3160 ("python-jinja2" ,python-jinja2)
3161 ("python-markdown" ,python-markdown)
3162 ("python-pygments" ,python-pygments)
3163 ("python-pytz" ,python-pytz)
3164 ("python-six" ,python-six)
3165 ("python-unidecode" ,python-unidecode)))
3166 (home-page "https://getpelican.com/")
3167 (arguments
3168 `(;; XXX Requires a lot more packages to do unit tests :P
3169 #:tests? #f))
3170 (synopsis "Python-based static site publishing system")
3171 (description
3172 "Pelican is a tool to generate a static blog from reStructuredText,
3173 Markdown input files, and more. Pelican uses Jinja2 for templating
3174 and is very extensible.")
3175 (license license:agpl3+)))
3176
3177 (define-public mallard-ducktype
3178 (package
3179 (name "mallard-ducktype")
3180 (version "1.0.2")
3181 (source
3182 (origin
3183 (method git-fetch)
3184 ;; git-reference because tests are not included in pypi source tarball
3185 ;; https://issues.guix.gnu.org/issue/36755#2
3186 (uri (git-reference
3187 (url "https://github.com/projectmallard/mallard-ducktype.git")
3188 (commit version)))
3189 (file-name (git-file-name name version))
3190 (sha256
3191 (base32
3192 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
3193 (build-system python-build-system)
3194 (arguments
3195 '(#:phases
3196 (modify-phases %standard-phases
3197 (replace 'check
3198 (lambda _
3199 (with-directory-excursion "tests"
3200 (invoke "sh" "runtests")))))))
3201 (home-page "http://projectmallard.org")
3202 (synopsis "Convert Ducktype to Mallard documentation markup")
3203 (description
3204 "Ducktype is a lightweight syntax that can represent all the semantics
3205 of the Mallard XML documentation system. Ducktype files can be converted to
3206 Mallard using the @command{ducktype} tool. The yelp-tools package
3207 provides additional functionality on the produced Mallard documents.")
3208 (license license:expat)))
3209
3210 (define-public python-cython
3211 (package
3212 (name "python-cython")
3213 (version "0.29.13")
3214 (source
3215 (origin
3216 (method url-fetch)
3217 (uri (pypi-uri "Cython" version))
3218 (sha256
3219 (base32
3220 "13k37lrcgagwwnzr5bzririsscb793vndj234d475x1h9ad0d7f2"))))
3221 (build-system python-build-system)
3222 ;; we need the full python package and not just the python-wrapper
3223 ;; because we need libpython3.3m.so
3224 (inputs
3225 `(("python" ,python)))
3226 (arguments
3227 `(#:phases
3228 (modify-phases %standard-phases
3229 (add-before 'check 'set-HOME
3230 ;; some tests require access to "$HOME/.cython"
3231 (lambda _ (setenv "HOME" "/tmp") #t))
3232
3233 ;; FIXME: These tests started failing on armhf after the 0.28 update
3234 ;; (commit c69d11c5930), both with an error such as this:
3235 ;; compiling (cpp) and running dictcomp ...
3236 ;; === C/C++ compiler error output: ===
3237 ;; ‘
3238 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
3239 ;; See <https://hydra.gnu.org/build/2948724> for logs.
3240 ,@(if (target-arm32?)
3241 `((add-before 'check 'disable-failing-tests
3242 (lambda _
3243 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
3244 (for-each (lambda (test)
3245 (format disabled-tests "~a\n" test))
3246 '("memslice" "dictcomp"))
3247 (close-port disabled-tests)))))
3248 '())
3249
3250 (replace 'check
3251 (lambda _
3252 ;; Disable compiler optimizations to greatly reduce the running
3253 ;; time of the test suite.
3254 (setenv "CFLAGS" "-O0")
3255
3256 (invoke "python" "runtests.py" "-vv"
3257 "-j" (number->string (parallel-job-count))))))))
3258 (home-page "https://cython.org/")
3259 (synopsis "C extensions for Python")
3260 (description "Cython is an optimising static compiler for both the Python
3261 programming language and the extended Cython programming language. It makes
3262 writing C extensions for Python as easy as Python itself.")
3263 (license license:asl2.0)
3264 (properties `((python2-variant . ,(delay python2-cython))))))
3265
3266 (define-public python2-cython
3267 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
3268 (package
3269 (inherit base)
3270 (name "python2-cython")
3271 (inputs
3272 `(("python-2" ,python-2))) ;this is not automatically changed
3273 (arguments
3274 (substitute-keyword-arguments (package-arguments base)
3275 ((#:phases phases)
3276 `(modify-phases ,phases
3277 (add-before 'check 'adjust-test_embed
3278 (lambda _
3279 (substitute* "runtests.py"
3280 ;; test_embed goes great lengths to find the static libpythonX.Y.a
3281 ;; so it can give the right -L flag to GCC when embedding static
3282 ;; builds of Python. It is unaware that the Python "config"
3283 ;; directory (where the static library lives) was renamed in
3284 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
3285 ;; which works fine, because that is where the shared library is.
3286 ;;
3287 ;; It also appears to be unaware that the Makefile in Demos/embed
3288 ;; already unconditionally pass the static library location to GCC,
3289 ;; after checking sysconfig.get_config_var('LIBPL).
3290 ;;
3291 ;; The effect is that the linker is unable to resolve libexpat
3292 ;; symbols when building for Python 2, because neither the Python 2
3293 ;; shared library nor Expat is available. To fix it, we can either
3294 ;; add Expat as an input and make it visible to the linker, or just
3295 ;; prevent it from overriding the Python shared library location.
3296 ;; The end result is identical, so we take the easy route.
3297 ((" or libname not in os\\.listdir\\(libdir\\)")
3298 ""))
3299 #t)))))))))
3300
3301 ;; The RPython toolchain currently does not support Python 3.
3302 (define-public python2-rpython
3303 (package
3304 (name "python2-rpython")
3305 (version "0.2.1")
3306 (source
3307 (origin
3308 (method url-fetch)
3309 (uri (pypi-uri "rpython" version))
3310 (sha256
3311 (base32
3312 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3313 (build-system python-build-system)
3314 (arguments `(#:python ,python-2))
3315 (native-inputs
3316 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3317 (home-page "https://rpython.readthedocs.org")
3318 (synopsis "Framework for implementing interpreters and virtual machines")
3319 (description "RPython is a translation and support framework for
3320 producing implementations of dynamic languages, emphasizing a clean separation
3321 between language specification and implementation aspects.")
3322 (license license:expat)))
3323
3324 ;; NOTE: when upgrading numpy please make sure that python-pandas and
3325 ;; python-scipy still build, as these three packages are often used together.
3326 (define-public python-numpy
3327 (package
3328 (name "python-numpy")
3329 (version "1.17.3")
3330 (source
3331 (origin
3332 (method url-fetch)
3333 (uri (string-append
3334 "https://github.com/numpy/numpy/releases/download/v"
3335 version "/numpy-" version ".tar.gz"))
3336 (sha256
3337 (base32
3338 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
3339 (build-system python-build-system)
3340 (inputs
3341 `(("openblas" ,openblas)
3342 ("lapack" ,lapack)))
3343 (native-inputs
3344 `(("python-cython" ,python-cython)
3345 ("python-pytest" ,python-pytest)
3346 ("gfortran" ,gfortran)))
3347 (arguments
3348 `(#:phases
3349 (modify-phases %standard-phases
3350 (add-before 'build 'configure-blas-lapack
3351 (lambda* (#:key inputs #:allow-other-keys)
3352 (call-with-output-file "site.cfg"
3353 (lambda (port)
3354 (format port
3355 "[openblas]
3356 libraries = openblas
3357 library_dirs = ~a/lib
3358 include_dirs = ~a/include
3359
3360 # backslash-n to make emacs happy
3361 \n[lapack]
3362 lapack_libs = lapack
3363 library_dirs = ~a/lib
3364 include_dirs = ~a/include
3365 "
3366 (assoc-ref inputs "openblas")
3367 (assoc-ref inputs "openblas")
3368 (assoc-ref inputs "lapack")
3369 (assoc-ref inputs "lapack"))))
3370 #t))
3371 (add-before 'build 'fix-executable-paths
3372 (lambda* (#:key inputs #:allow-other-keys)
3373 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3374 ;; instead of /bin/sh.
3375 (substitute* "numpy/distutils/exec_command.py"
3376 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3377 (string-append match-start (assoc-ref inputs "bash") match-end)))
3378 ;; Use "gcc" executable, not "cc".
3379 (substitute* "numpy/distutils/system_info.py"
3380 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3381 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3382 #t))
3383 ;; Tests can only be run after the library has been installed and not
3384 ;; within the source directory.
3385 (delete 'check)
3386 (add-after 'install 'check
3387 (lambda* (#:key outputs inputs #:allow-other-keys)
3388 ;; Make installed package available for running the tests
3389 (add-installed-pythonpath inputs outputs)
3390 ;; Make sure "f2py" etc is found.
3391 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3392 ":" (getenv "PATH")))
3393 (with-directory-excursion "/tmp"
3394 (invoke "python" "-c"
3395 "import numpy; numpy.test(verbose=2)")))))))
3396 (home-page "http://www.numpy.org/")
3397 (synopsis "Fundamental package for scientific computing with Python")
3398 (description "NumPy is the fundamental package for scientific computing
3399 with Python. It contains among other things: a powerful N-dimensional array
3400 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3401 and Fortran code, useful linear algebra, Fourier transform, and random number
3402 capabilities.")
3403 (properties `((python2-variant . ,(delay python2-numpy))))
3404 (license license:bsd-3)))
3405
3406 ;; Numpy 1.16.x are the last versions that support Python 2.
3407 (define-public python2-numpy
3408 (let ((numpy (package-with-python2
3409 (strip-python2-variant python-numpy))))
3410 (package/inherit
3411 numpy
3412 (version "1.16.5")
3413 (source (origin
3414 (method url-fetch)
3415 (uri (string-append
3416 "https://github.com/numpy/numpy/releases/download/v"
3417 version "/numpy-" version ".tar.gz"))
3418 (sha256
3419 (base32
3420 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
3421
3422 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3423 ;; interest only for legacy code going back to NumPy's predecessor
3424 ;; Numeric.
3425 (define-public python2-numpy-1.8
3426 (package (inherit python2-numpy)
3427 (version "1.8.2")
3428 (source
3429 (origin
3430 (method git-fetch)
3431 (uri (git-reference
3432 (url "https://github.com/numpy/numpy")
3433 (commit (string-append "v" version))))
3434 (file-name (git-file-name "numpy" version))
3435 (sha256
3436 (base32
3437 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
3438 (arguments
3439 (substitute-keyword-arguments (package-arguments python2-numpy)
3440 ((#:phases phases)
3441 `(modify-phases ,phases
3442 (replace 'configure-blas-lapack
3443 (lambda* (#:key inputs #:allow-other-keys)
3444 (call-with-output-file "site.cfg"
3445 (lambda (port)
3446 (format port
3447 "[openblas]
3448 libraries = openblas,lapack
3449 library_dirs = ~a/lib:~a/lib
3450 include_dirs = ~a/include:~a/include
3451 "
3452 (assoc-ref inputs "openblas")
3453 (assoc-ref inputs "lapack")
3454 (assoc-ref inputs "openblas")
3455 (assoc-ref inputs "lapack"))))
3456 #t))))))
3457 (native-inputs
3458 `(("python2-nose" ,python2-nose)))
3459 (description "NumPy is the fundamental package for scientific computing
3460 with Python. It contains among other things: a powerful N-dimensional array
3461 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3462 and Fortran code, useful linear algebra, Fourier transform, and random number
3463 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3464 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3465 Numeric.")
3466 (license license:bsd-3)))
3467
3468 (define-public python-munch
3469 (package
3470 (name "python-munch")
3471 (version "2.0.4")
3472 (source
3473 (origin
3474 (method url-fetch)
3475 (uri (pypi-uri "munch" version))
3476 (sha256
3477 (base32
3478 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3479 (build-system python-build-system)
3480 (home-page "https://github.com/Infinidat/munch")
3481 (synopsis "Dot-accessible dictionary")
3482 (description "Munch is a dot-accessible dictionary similar to JavaScript
3483 objects.")
3484 (license license:expat)))
3485
3486 (define-public python2-munch
3487 (package-with-python2 python-munch))
3488
3489 (define-public python-colormath
3490 (package
3491 (name "python-colormath")
3492 (version "3.0.0")
3493 (source
3494 (origin
3495 (method url-fetch)
3496 (uri (pypi-uri "colormath" version))
3497 (sha256
3498 (base32
3499 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3500 (build-system python-build-system)
3501 (propagated-inputs
3502 `(("python-networkx" ,python-networkx)
3503 ("python-numpy" ,python-numpy)))
3504 (home-page "https://github.com/gtaylor/python-colormath")
3505 (synopsis "Color math and conversion library")
3506 (description
3507 "This is a Python library for color math and conversions.")
3508 (license license:bsd-3)))
3509
3510 (define-public python2-colormath
3511 (package-with-python2 python-colormath))
3512
3513 (define-public python-spectra
3514 (package
3515 (name "python-spectra")
3516 (version "0.0.11")
3517 (source
3518 (origin
3519 (method url-fetch)
3520 (uri (pypi-uri "spectra" version))
3521 (sha256
3522 (base32
3523 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3524 (build-system python-build-system)
3525 (arguments
3526 `(#:phases
3527 (modify-phases %standard-phases
3528 (replace 'check
3529 (lambda _ (invoke "nosetests" "-v"))))))
3530 (propagated-inputs
3531 `(("python-colormath" ,python-colormath)))
3532 (native-inputs
3533 `(("python-nose" ,python-nose)))
3534 (home-page "https://github.com/jsvine/spectra")
3535 (synopsis "Color scales and color conversion")
3536 (description
3537 "This package provides a Python library intended to make color math,
3538 color scales, and color space conversion easy. It has support for:
3539
3540 @enumerate
3541 @item Color scales
3542 @item Color ranges
3543 @item Color blending
3544 @item Brightening/darkening colors
3545 @item Saturating/desaturating colors
3546 @item Conversion to/from multiple color spaces.
3547 @end enumerate\n")
3548 (license license:expat)))
3549
3550 (define-public python2-spectra
3551 (package-with-python2 python-spectra))
3552
3553 (define-public python-numpy-documentation
3554 (package
3555 (name "python-numpy-documentation")
3556 (version (package-version python-numpy))
3557 (source (package-source python-numpy))
3558 (build-system python-build-system)
3559 (native-inputs
3560 `(("python-matplotlib" ,python-matplotlib)
3561 ("python-numpy" ,python-numpy)
3562 ("pkg-config" ,pkg-config)
3563 ("python-sphinx" ,python-sphinx)
3564 ("python-numpydoc" ,python-numpydoc)
3565 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
3566 texlive-fonts-ec
3567 texlive-generic-ifxetex
3568 texlive-generic-pdftex
3569 texlive-amsfonts
3570 texlive-latex-capt-of
3571 texlive-latex-cmap
3572 texlive-latex-environ
3573 texlive-latex-eqparbox
3574 texlive-latex-etoolbox
3575 texlive-latex-expdlist
3576 texlive-latex-fancyhdr
3577 texlive-latex-fancyvrb
3578 texlive-latex-fncychap
3579 texlive-latex-float
3580 texlive-latex-framed
3581 texlive-latex-geometry
3582 texlive-latex-graphics
3583 texlive-latex-hyperref
3584 texlive-latex-mdwtools
3585 texlive-latex-multirow
3586 texlive-latex-needspace
3587 texlive-latex-oberdiek
3588 texlive-latex-parskip
3589 texlive-latex-preview
3590 texlive-latex-tabulary
3591 texlive-latex-threeparttable
3592 texlive-latex-titlesec
3593 texlive-latex-trimspaces
3594 texlive-latex-ucs
3595 texlive-latex-upquote
3596 texlive-latex-url
3597 texlive-latex-varwidth
3598 texlive-latex-wrapfig)))
3599 ("texinfo" ,texinfo)
3600 ("perl" ,perl)
3601 ("scipy-sphinx-theme"
3602 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3603 (method git-fetch)
3604 (uri (git-reference
3605 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3606 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3607 (sha256
3608 (base32
3609 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3610 ,@(package-native-inputs python-numpy)))
3611 (arguments
3612 `(#:tests? #f ; we're only generating the documentation
3613 #:phases
3614 (modify-phases %standard-phases
3615 (delete 'build)
3616 (replace 'install
3617 (lambda* (#:key inputs outputs #:allow-other-keys)
3618 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3619 (doc (string-append
3620 data "/doc/" ,name "-"
3621 ,(package-version python-numpy)))
3622 (info-reader (string-append data "/info"))
3623 (html (string-append doc "/html"))
3624 (scipy-sphinx-theme "scipy-sphinx-theme")
3625 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3626 (pyver ,(string-append "PYVER=")))
3627
3628 ;; FIXME: this is needed to for texlive-union to generate
3629 ;; fonts, which are not found.
3630 (setenv "HOME" "/tmp")
3631
3632 (with-directory-excursion "doc"
3633 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3634 (mkdir-p html)
3635 (invoke "make" "html" pyver)
3636 (invoke "make" "latex" "PAPER=a4" pyver)
3637 (invoke "make" "-C" "build/latex"
3638 "all-pdf" "PAPER=a4" pyver)
3639 ;; FIXME: Generation of the info file fails.
3640 ;; (invoke "make" "info" pyver)
3641 ;; (mkdir-p info)
3642 ;; (copy-file "build/texinfo/numpy.info"
3643 ;; (string-append info "/numpy.info"))
3644 (for-each (lambda (file)
3645 (copy-file (string-append "build/latex" file)
3646 (string-append doc file)))
3647 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3648 (with-directory-excursion "build/html"
3649 (for-each (lambda (file)
3650 (let* ((dir (dirname file))
3651 (tgt-dir (string-append html "/" dir)))
3652 (unless (equal? "." dir)
3653 (mkdir-p tgt-dir))
3654 (install-file file html)))
3655 (find-files "." ".*")))))
3656 #t)))))
3657 (home-page (package-home-page python-numpy))
3658 (synopsis "Documentation for the python-numpy package")
3659 (description (package-description python-numpy))
3660 (license (package-license python-numpy))))
3661
3662 (define-public python2-numpy-documentation
3663 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3664 (package
3665 (inherit numpy-documentation)
3666 (native-inputs `(("python2-functools32" ,python2-functools32)
3667 ,@(package-native-inputs numpy-documentation))))))
3668
3669 (define-public python-pygit2
3670 (package
3671 (name "python-pygit2")
3672 (version "0.28.2")
3673 (source
3674 (origin
3675 (method url-fetch)
3676 (uri (pypi-uri "pygit2" version))
3677 (sha256
3678 (base32 "11kzj5mjkspvplnpdb6bj8dcj6rgmkk986k8hjcklyg5yaxkz32d"))))
3679 (build-system python-build-system)
3680 (arguments
3681 '(#:tests? #f)) ; tests don't run correctly in our environment
3682 (propagated-inputs
3683 `(("python-six" ,python-six)
3684 ("python-cffi" ,python-cffi)
3685 ("libgit2" ,libgit2)
3686 ("python-tox" ,python-tox)))
3687 (native-inputs
3688 `(("python-pytest" ,python-pytest)))
3689 (home-page "https://github.com/libgit2/pygit2")
3690 (synopsis "Python bindings for libgit2")
3691 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3692 library, libgit2 implements Git plumbing.")
3693 ;; GPL2.0 only, with linking exception.
3694 (license license:gpl2)))
3695
3696 (define-public python2-pygit2
3697 (package-with-python2 python-pygit2))
3698
3699 (define-public python-pyparsing
3700 (package
3701 (name "python-pyparsing")
3702 (version "2.3.1")
3703 (source
3704 (origin
3705 (method url-fetch)
3706 (uri (pypi-uri "pyparsing" version))
3707 (sha256
3708 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
3709 (build-system python-build-system)
3710 (outputs '("out" "doc"))
3711 (arguments
3712 `(#:tests? #f ; no test target
3713 #:phases
3714 (modify-phases %standard-phases
3715 (add-after 'install 'install-doc
3716 (lambda* (#:key outputs #:allow-other-keys)
3717 (let* ((doc (string-append (assoc-ref outputs "doc")
3718 "/share/doc/" ,name "-" ,version))
3719 (html-doc (string-append doc "/html"))
3720 (examples (string-append doc "/examples")))
3721 (mkdir-p html-doc)
3722 (mkdir-p examples)
3723 (for-each
3724 (lambda (dir tgt)
3725 (map (lambda (file)
3726 (install-file file tgt))
3727 (find-files dir ".*")))
3728 (list "docs" "htmldoc" "examples")
3729 (list doc html-doc examples))
3730 #t))))))
3731 (home-page "https://github.com/pyparsing/pyparsing")
3732 (synopsis "Python parsing class library")
3733 (description
3734 "The pyparsing module is an alternative approach to creating and
3735 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3736 of regular expressions. The pyparsing module provides a library of classes
3737 that client code uses to construct the grammar directly in Python code.")
3738 (license license:expat)))
3739
3740 (define-public python2-pyparsing
3741 (package-with-python2 python-pyparsing))
3742
3743 (define-public python-numpydoc
3744 (package
3745 (name "python-numpydoc")
3746 (version "0.8.0")
3747 (source
3748 (origin
3749 (method url-fetch)
3750 (uri (pypi-uri "numpydoc" version))
3751 (sha256
3752 (base32
3753 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3754 (build-system python-build-system)
3755 (propagated-inputs
3756 `(("python-sphinx" ,python-sphinx)))
3757 (native-inputs
3758 `(("python-nose" ,python-nose)))
3759 (home-page "https://pypi.python.org/pypi/numpydoc")
3760 (synopsis
3761 "Numpy's Sphinx extensions")
3762 (description
3763 "Sphinx extension to support docstrings in Numpy format.")
3764 (license license:bsd-2)))
3765
3766 (define-public python2-numpydoc
3767 (package-with-python2 python-numpydoc))
3768
3769 (define-public python-numexpr
3770 (package
3771 (name "python-numexpr")
3772 (version "2.6.5")
3773 (source
3774 (origin
3775 (method url-fetch)
3776 (uri (pypi-uri "numexpr" version))
3777 (sha256
3778 (base32
3779 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3780 (build-system python-build-system)
3781 (arguments `(#:tests? #f)) ; no tests included
3782 (propagated-inputs
3783 `(("python-numpy" ,python-numpy)))
3784 (home-page "https://github.com/pydata/numexpr")
3785 (synopsis "Fast numerical expression evaluator for NumPy")
3786 (description
3787 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3788 expressions that operate on arrays are accelerated and use less memory than
3789 doing the same calculation in Python. In addition, its multi-threaded
3790 capabilities can make use of all your cores, which may accelerate
3791 computations, most specially if they are not memory-bounded (e.g. those using
3792 transcendental functions).")
3793 (license license:expat)))
3794
3795 (define-public python2-numexpr
3796 (package-with-python2 python-numexpr))
3797
3798 (define-public python-cycler
3799 (package
3800 (name "python-cycler")
3801 (version "0.10.0")
3802 (source (origin
3803 (method url-fetch)
3804 (uri (pypi-uri "cycler" version))
3805 (sha256
3806 (base32
3807 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3808 (build-system python-build-system)
3809 (arguments
3810 ;; XXX: The current version requires 'coveralls' which we don't have.
3811 ;; Enable this for the next release which uses 'python-pytest'.
3812 '(#:tests? #f))
3813 (propagated-inputs
3814 `(("python-six" ,python-six)))
3815 (home-page "http://matplotlib.org/cycler/")
3816 (synopsis "Composable keyword argument iterator")
3817 (description
3818 "When using @code{matplotlib} and plotting more than one line, it is
3819 common to want to be able to want to be able to cycle over one or more artist
3820 styles; but the plotting logic can quickly become involved.
3821 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3822 @code{Cycler} class was developed.")
3823 (license license:bsd-3)))
3824
3825 (define-public python2-cycler
3826 (package-with-python2 python-cycler))
3827
3828 (define-public python-colorspacious
3829 (package
3830 (name "python-colorspacious")
3831 (version "1.1.2")
3832 (source
3833 (origin
3834 (method git-fetch)
3835 (uri (git-reference
3836 (url "https://github.com/njsmith/colorspacious.git")
3837 (commit (string-append "v" version))))
3838 (file-name (git-file-name name version))
3839 (sha256
3840 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
3841 (build-system python-build-system)
3842 (propagated-inputs
3843 `(("python-numpy" ,python-numpy)))
3844 (native-inputs
3845 `(("python-nose" ,python-nose)))
3846 (arguments
3847 `(#:phases
3848 (modify-phases %standard-phases
3849 (replace 'check
3850 (lambda _
3851 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
3852 (home-page "https://github.com/njsmith/colorspacious")
3853 (synopsis "Python library for colorspace conversions")
3854 (description "@code{colorspacious} is a Python library that lets you
3855 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3856 (license license:expat)))
3857
3858 (define-public python2-colorspacious
3859 (package-with-python2 python-colorspacious))
3860
3861 (define-public python-matplotlib
3862 (package
3863 (name "python-matplotlib")
3864 (version "3.1.2")
3865 (source
3866 (origin
3867 (method url-fetch)
3868 (uri (pypi-uri "matplotlib" version))
3869 (sha256
3870 (base32
3871 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))))
3872 (build-system python-build-system)
3873 (propagated-inputs ; the following packages are all needed at run time
3874 `(("python-cycler" ,python-cycler)
3875 ("python-kiwisolver" ,python-kiwisolver)
3876 ("python-pyparsing" ,python-pyparsing)
3877 ("python-pygobject" ,python-pygobject)
3878 ("gobject-introspection" ,gobject-introspection)
3879 ("python-tkinter" ,python "tk")
3880 ("python-dateutil" ,python-dateutil)
3881 ("python-numpy" ,python-numpy)
3882 ("python-pillow" ,python-pillow)
3883 ("python-pytz" ,python-pytz)
3884 ("python-six" ,python-six)
3885 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3886 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3887 ;; object. For this reason we need to import both libraries.
3888 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
3889 ("python-pycairo" ,python-pycairo)
3890 ("python-cairocffi" ,python-cairocffi)))
3891 (inputs
3892 `(("libpng" ,libpng)
3893 ("imagemagick" ,imagemagick)
3894 ("freetype" ,freetype)
3895 ("cairo" ,cairo)
3896 ("glib" ,glib)
3897 ;; FIXME: Add backends when available.
3898 ;("python-wxpython" ,python-wxpython)
3899 ("tcl" ,tcl)
3900 ("tk" ,tk)))
3901 (native-inputs
3902 `(("pkg-config" ,pkg-config)
3903 ("python-pytest" ,python-pytest)
3904 ("python-mock" ,python-mock)
3905 ("unzip" ,unzip)
3906 ("jquery-ui"
3907 ,(origin
3908 (method url-fetch)
3909 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
3910 (sha256
3911 (base32
3912 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
3913 (arguments
3914 `(#:phases
3915 (modify-phases %standard-phases
3916 ;; XXX We disable all image comparison tests because we're using a
3917 ;; newer version of FreeType than matplotlib expects. This leads to
3918 ;; minor differences throughout the tests.
3919 (add-after 'unpack 'fix-and-disable-failing-tests
3920 (lambda _
3921 (substitute* (append (find-files "lib/matplotlib/tests/"
3922 "test_.*\\.py$")
3923 (find-files "lib/mpl_toolkits/tests"
3924 "test_.*\\.py$"))
3925 (("^from matplotlib" match)
3926 (string-append "import pytest\n" match))
3927 (("( *)@image_comparison" match indent)
3928 (string-append indent
3929 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
3930 match)))
3931 (substitute* "lib/matplotlib/tests/test_animation.py"
3932 (("/bin/sh") (which "sh")))
3933 (for-each delete-file
3934 ;; test_normal_axes, test_get_tightbbox_polar
3935 '("lib/matplotlib/tests/test_axes.py"
3936 ;; We don't use the webagg backend and this test forces it.
3937 "lib/matplotlib/tests/test_backend_webagg.py"
3938 ;; test_outward_ticks
3939 "lib/matplotlib/tests/test_tightlayout.py"
3940 ;; test_hidden_axes fails with minor extent
3941 ;; differences, possibly due to the use of a
3942 ;; different version of FreeType.
3943 "lib/matplotlib/tests/test_constrainedlayout.py"
3944 ;; Fontconfig returns no fonts.
3945 "lib/matplotlib/tests/test_font_manager.py"))
3946 #t))
3947 (add-before 'install 'install-jquery-ui
3948 (lambda* (#:key outputs inputs #:allow-other-keys)
3949 (let ((dir (string-append (assoc-ref outputs "out")
3950 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
3951 (mkdir-p dir)
3952 (invoke "unzip"
3953 (assoc-ref inputs "jquery-ui")
3954 "-d" dir))
3955 #t))
3956 (replace 'check
3957 (lambda* (#:key outputs inputs #:allow-other-keys)
3958 (add-installed-pythonpath inputs outputs)
3959 (invoke "python" "tests.py" "-v"
3960 "-m" "not network and not webagg")))
3961 (add-before 'build 'configure-environment
3962 (lambda* (#:key outputs inputs #:allow-other-keys)
3963 (let ((cairo (assoc-ref inputs "cairo")))
3964 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
3965 ;; has not effect.
3966 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
3967 (setenv "HOME" (getcwd))
3968 (call-with-output-file "setup.cfg"
3969 (lambda (port)
3970 (format port "[directories]~%
3971 basedirlist = ~a,~a~%
3972 [packages]~%
3973 tests = True~%"
3974 (assoc-ref inputs "tcl")
3975 (assoc-ref inputs "tk")))))
3976 #t)))))
3977 (home-page "https://matplotlib.org/")
3978 (synopsis "2D plotting library for Python")
3979 (description
3980 "Matplotlib is a Python 2D plotting library which produces publication
3981 quality figures in a variety of hardcopy formats and interactive environments
3982 across platforms. Matplotlib can be used in Python scripts, the python and
3983 ipython shell, web application servers, and six graphical user interface
3984 toolkits.")
3985 (license license:psfl)
3986 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3987
3988 (define-public python2-matplotlib
3989 (let ((matplotlib (package-with-python2
3990 (strip-python2-variant python-matplotlib))))
3991 (package (inherit matplotlib)
3992 (version "2.2.4")
3993 (source
3994 (origin
3995 (method url-fetch)
3996 (uri (pypi-uri "matplotlib" version))
3997 (sha256
3998 (base32
3999 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
4000 (arguments
4001 (substitute-keyword-arguments (package-arguments matplotlib)
4002 ((#:phases phases)
4003 `(modify-phases ,phases
4004 (replace 'install-jquery-ui
4005 (lambda* (#:key outputs inputs #:allow-other-keys)
4006 (let ((dir (string-append (assoc-ref outputs "out")
4007 "/lib/python2.7/site-packages/"
4008 "matplotlib/backends/web_backend/")))
4009 (mkdir-p dir)
4010 (invoke "unzip"
4011 (assoc-ref inputs "jquery-ui")
4012 "-d" dir))
4013 #t))
4014 (delete 'fix-and-disable-failing-tests)
4015 (delete 'check))))) ; These tests weren't run the the past.
4016 ;; Make sure to use special packages for Python 2 instead
4017 ;; of those automatically rewritten by package-with-python2.
4018 (propagated-inputs
4019 `(("python2-pycairo" ,python2-pycairo)
4020 ("python2-backports-functools-lru-cache"
4021 ,python2-backports-functools-lru-cache)
4022 ("python2-functools32" ,python2-functools32)
4023 ("python2-pygobject-2" ,python2-pygobject-2)
4024 ("python2-subprocess32" ,python2-subprocess32)
4025 ("python2-tkinter" ,python-2 "tk")
4026 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4027 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4028
4029 (define-public python-matplotlib-documentation
4030 (package
4031 (name "python-matplotlib-documentation")
4032 (version (package-version python-matplotlib))
4033 (source (package-source python-matplotlib))
4034 (build-system python-build-system)
4035 (native-inputs
4036 `(("python-matplotlib" ,python-matplotlib)
4037 ("python-colorspacious" ,python-colorspacious)
4038 ("python-sphinx" ,python-sphinx)
4039 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
4040 ("python-sphinx-gallery" ,python-sphinx-gallery)
4041 ("python-numpydoc" ,python-numpydoc)
4042 ("python-ipython" ,python-ipython)
4043 ("python-ipykernel" ,python-ipykernel)
4044 ("python-mock" ,python-mock)
4045 ("graphviz" ,graphviz)
4046 ("texlive" ,(texlive-union (list texlive-amsfonts
4047 texlive-latex-amsmath
4048 texlive-latex-enumitem
4049 texlive-latex-expdlist
4050 texlive-latex-geometry
4051 texlive-latex-preview
4052 texlive-latex-type1cm
4053 texlive-latex-ucs
4054
4055 texlive-generic-pdftex
4056
4057 texlive-fonts-ec
4058 texlive-fonts-adobe-times
4059 texlive-fonts-txfonts)))
4060 ("texinfo" ,texinfo)
4061 ,@(package-native-inputs python-matplotlib)))
4062 (arguments
4063 `(#:tests? #f ; we're only generating documentation
4064 #:phases
4065 (modify-phases %standard-phases
4066 ;; The tests in python-matplotlib are run after the install phase, so
4067 ;; we need to delete the extra phase here.
4068 (delete 'check)
4069 (replace 'build
4070 (lambda _
4071 (chdir "doc")
4072 (setenv "PYTHONPATH"
4073 (string-append (getenv "PYTHONPATH")
4074 ":" (getcwd) "/../examples/units"))
4075 (substitute* "conf.py"
4076 ;; Don't use git.
4077 (("^SHA = check_output.*")
4078 (string-append "SHA = \"" ,version "\"\n"))
4079 ;; Don't fetch intersphinx files from the Internet
4080 (("^explicit_order_folders" m)
4081 (string-append "intersphinx_mapping = {}\n" m))
4082 (("'sphinx.ext.intersphinx',") "")
4083 ;; Disable URL embedding which requires internet access.
4084 (("'https://docs.scipy.org/doc/numpy'") "None")
4085 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
4086 (invoke "make"
4087 "SPHINXBUILD=sphinx-build"
4088 "SPHINXOPTS=" ; don't abort on warnings
4089 "html" "texinfo")))
4090 (replace 'install
4091 (lambda* (#:key inputs outputs #:allow-other-keys)
4092 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4093 (doc (string-append data "/doc/python-matplotlib-" ,version))
4094 (info (string-append data "/info"))
4095 (html (string-append doc "/html")))
4096 (mkdir-p html)
4097 (mkdir-p info)
4098 (copy-recursively "build/html" html)
4099 (symlink (string-append html "/_images")
4100 (string-append info "/matplotlib-figures"))
4101 (with-directory-excursion "build/texinfo"
4102 (substitute* "matplotlib.texi"
4103 (("@image\\{([^,]*)" all file)
4104 (string-append "@image{matplotlib-figures/" file)))
4105 (symlink (string-append html "/_images")
4106 "./matplotlib-figures")
4107 (invoke "makeinfo" "--no-split"
4108 "-o" "matplotlib.info" "matplotlib.texi"))
4109 (install-file "build/texinfo/matplotlib.info" info))
4110 #t)))))
4111 (home-page (package-home-page python-matplotlib))
4112 (synopsis "Documentation for the python-matplotlib package")
4113 (description (package-description python-matplotlib))
4114 (license (package-license python-matplotlib))))
4115
4116 (define-public python2-matplotlib-documentation
4117 (let ((parent (package-with-python2 python-matplotlib-documentation)))
4118 (package
4119 (inherit parent)
4120 (native-inputs
4121 (alist-delete "python-sphinx-copybutton"
4122 (package-native-inputs parent))))))
4123
4124 (define-public python-matplotlib-venn
4125 (package
4126 (name "python-matplotlib-venn")
4127 (version "0.11.5")
4128 (source
4129 (origin
4130 (method url-fetch)
4131 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4132 (sha256
4133 (base32
4134 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4135 (build-system python-build-system)
4136 (arguments '(#:tests? #f)) ; tests are not included
4137 (propagated-inputs
4138 `(("python-matplotlib" ,python-matplotlib)
4139 ("python-numpy" ,python-numpy)
4140 ("python-scipy" ,python-scipy)))
4141 (native-inputs
4142 `(("unzip" ,unzip)))
4143 (home-page "https://github.com/konstantint/matplotlib-venn")
4144 (synopsis "Plot area-proportional Venn diagrams")
4145 (description
4146 "This package provides tools for plotting area-proportional two- and
4147 three-way Venn diagrams in @code{matplotlib}.")
4148 (license license:expat)))
4149
4150 (define-public python2-pysnptools
4151 (package
4152 (name "python2-pysnptools")
4153 (version "0.3.13")
4154 (source
4155 (origin
4156 (method url-fetch)
4157 (uri (pypi-uri "pysnptools" version))
4158 (sha256
4159 (base32
4160 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
4161 (build-system python-build-system)
4162 (arguments
4163 `(#:python ,python-2 ; only Python 2.7 is supported
4164 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
4165 (propagated-inputs
4166 `(("python2-numpy" ,python2-numpy)
4167 ("python2-scipy" ,python2-scipy)
4168 ("python2-pandas" ,python2-pandas)))
4169 (native-inputs
4170 `(("python2-cython" ,python2-cython)))
4171 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
4172 (synopsis "Library for reading and manipulating genetic data")
4173 (description
4174 "PySnpTools is a library for reading and manipulating genetic data. It
4175 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4176 those files. It can also efficiently manipulate ranges of integers using set
4177 operators such as union, intersection, and difference.")
4178 (license license:asl2.0)))
4179
4180 (define-public python-socksipy-branch
4181 (package
4182 (name "python-socksipy-branch")
4183 (version "1.01")
4184 (source
4185 (origin
4186 (method url-fetch)
4187 (uri (pypi-uri "SocksiPy-branch" version))
4188 (sha256
4189 (base32
4190 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4191 (build-system python-build-system)
4192 (arguments
4193 `(#:tests? #f)) ; There are no tests
4194 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4195 (synopsis "Python SOCKS module")
4196 (description
4197 "SocksiPy - A Python SOCKS client module. It provides a
4198 socket-like interface that supports connections to any TCP
4199 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4200 The original version was developed by Dan Haim, this is a
4201 branch created by Mario Vilas to address some open issues,
4202 as the original project seems to have been abandoned circa 2007.")
4203 (license license:bsd-3)))
4204
4205 (define-public python2-socksipy-branch
4206 (package-with-python2 python-socksipy-branch))
4207
4208 (define-public python-socksipychain
4209 (package
4210 (name "python-socksipychain")
4211 (version "2.1.0")
4212 (source
4213 (origin
4214 (method git-fetch)
4215 (uri (git-reference
4216 (url "https://github.com/pagekite/PySocksipyChain.git")
4217 (commit (string-append "v" version))))
4218 (file-name (git-file-name name version))
4219 (sha256
4220 (base32
4221 "0idm9a050rd2kbgbz2sk9ib9589kj4xh1xdnggs6xbq2v2y8f6zn"))))
4222 (build-system python-build-system)
4223 (arguments
4224 `(#:tests? #f)) ; Tests try to access the network.
4225 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
4226 (synopsis "Python SOCKS module with chained proxies support")
4227 (description
4228 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
4229 adds support for arbitrary chaining of proxy servers and various modes of
4230 TLS/SSL encryption. It was developed for use in PageKite, and also includes
4231 a simple netcat replacement with chaining support.")
4232 (license license:bsd-3)))
4233
4234 (define-public python-pycodestyle
4235 (package
4236 (name "python-pycodestyle")
4237 (version "2.5.0")
4238 (source
4239 (origin
4240 (method url-fetch)
4241 (uri (pypi-uri "pycodestyle" version))
4242 (sha256
4243 (base32
4244 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
4245 (build-system python-build-system)
4246 (home-page "https://pycodestyle.readthedocs.io/")
4247 (synopsis "Python style guide checker")
4248 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4249 Python code against some of the style conventions in
4250 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4251 (license license:expat)))
4252
4253 (define-public python2-pycodestyle
4254 (package-with-python2 python-pycodestyle))
4255
4256 (define-public python-multidict
4257 (package
4258 (name "python-multidict")
4259 (version "4.2.0")
4260 (source
4261 (origin
4262 (method url-fetch)
4263 (uri (pypi-uri "multidict" version))
4264 (sha256
4265 (base32
4266 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4267 (build-system python-build-system)
4268 (native-inputs
4269 `(("python-pytest" ,python-pytest)
4270 ("python-pytest-runner" ,python-pytest-runner)))
4271 (home-page "https://github.com/aio-libs/multidict/")
4272 (synopsis "Multidict implementation")
4273 (description "Multidict is dict-like collection of key-value pairs
4274 where key might be occurred more than once in the container.")
4275 (license license:asl2.0)))
4276
4277 (define-public python-orderedmultidict
4278 (package
4279 (name "python-orderedmultidict")
4280 (version "0.7.11")
4281 (source
4282 (origin
4283 (method url-fetch)
4284 (uri (pypi-uri "orderedmultidict" version))
4285 (sha256
4286 (base32
4287 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4288 (build-system python-build-system)
4289 (arguments
4290 `(#:phases
4291 (modify-phases %standard-phases
4292 (add-after 'unpack 'fix-tests
4293 (lambda _
4294 ;; The package uses nosetest for running the tests.
4295 ;; Adding this initfile allows to run the test suite
4296 ;; without requiring nosetest.
4297 (with-output-to-file "tests/__init__.py" newline)
4298 #t)))))
4299 (propagated-inputs
4300 `(("python-six" ,python-six)))
4301 (native-inputs
4302 `(("python-pycodestyle" ,python-pycodestyle)))
4303 (home-page "https://github.com/gruns/orderedmultidict")
4304 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4305 (description "This package contains a library for ordered multivalue
4306 dictionaries. A multivalue dictionary is a dictionary that can store
4307 multiple values for the same key. An ordered multivalue dictionary is a
4308 multivalue dictionary that retains the order of insertions and deletions.")
4309 (license license:unlicense)))
4310
4311 (define-public python2-orderedmultidict
4312 (package-with-python2 python-orderedmultidict))
4313
4314 (define-public python-autopep8
4315 (package
4316 (name "python-autopep8")
4317 (version "1.3.5")
4318 (source
4319 (origin
4320 (method url-fetch)
4321 (uri (pypi-uri "autopep8" version))
4322 (sha256
4323 (base32
4324 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4325 (build-system python-build-system)
4326 (propagated-inputs
4327 `(("python-pycodestyle" ,python-pycodestyle)))
4328 (home-page "https://github.com/hhatto/autopep8")
4329 (synopsis "Format Python code according to the PEP 8 style guide")
4330 (description
4331 "@code{autopep8} automatically formats Python code to conform to
4332 the PEP 8 style guide. It uses the pycodestyle utility to determine
4333 what parts of the code needs to be formatted. @code{autopep8} is
4334 capable of fixing most of the formatting issues that can be reported
4335 by pycodestyle.")
4336 (license (license:non-copyleft
4337 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4338
4339 (define-public python2-autopep8
4340 (package-with-python2 python-autopep8))
4341
4342 (define-public python-distutils-extra
4343 (package
4344 (name "python-distutils-extra")
4345 (version "2.38")
4346 (source
4347 (origin
4348 (method url-fetch)
4349 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4350 version "/+download/python-distutils-extra-"
4351 version ".tar.gz"))
4352 (sha256
4353 (base32
4354 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4355 (build-system python-build-system)
4356 (home-page "https://launchpad.net/python-distutils-extra/")
4357 (synopsis "Enhancements to Python's distutils")
4358 (description
4359 "The python-distutils-extra module enables you to easily integrate
4360 gettext support, themed icons, and scrollkeeper-based documentation into
4361 Python's distutils.")
4362 (license license:gpl2)))
4363
4364 (define-public python2-distutils-extra
4365 (package-with-python2 python-distutils-extra))
4366
4367 (define-public python2-elib.intl
4368 (package
4369 (name "python2-elib.intl")
4370 (version "0.0.3")
4371 (source
4372 (origin
4373 ;; This project doesn't tag releases or publish tarballs, so we take
4374 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4375 (method git-fetch)
4376 (uri (git-reference
4377 (url "https://github.com/dieterv/elib.intl.git")
4378 (commit "d09997cfef")))
4379 (file-name (string-append name "-" version "-checkout"))
4380 (sha256
4381 (base32
4382 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4383 (build-system python-build-system)
4384 (arguments
4385 ;; incompatible with Python 3 (exception syntax)
4386 `(#:python ,python-2
4387 #:tests? #f))
4388 (home-page "https://github.com/dieterv/elib.intl")
4389 (synopsis "Enhanced internationalization for Python")
4390 (description
4391 "The elib.intl module provides enhanced internationalization (I18N)
4392 services for your Python modules and applications.")
4393 (license license:lgpl3+)))
4394
4395 (define-public python-olefile
4396 (package
4397 (name "python-olefile")
4398 (version "0.46")
4399 (source
4400 (origin
4401 (method url-fetch)
4402 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4403 "download/v" version "/olefile-" version ".tar.gz"))
4404 (file-name (string-append name "-" version ".tar.gz"))
4405 (sha256
4406 (base32
4407 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
4408 (build-system python-build-system)
4409 (home-page "https://www.decalage.info/python/olefileio")
4410 (synopsis "Read and write Microsoft OLE2 files.")
4411 (description
4412 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4413 Storage or Compound Document, Microsoft Office). It is an improved version of
4414 the OleFileIO module from PIL, the Python Image Library.")
4415 (license license:bsd-3)))
4416
4417 (define-public python2-olefile
4418 (package-with-python2 python-olefile))
4419
4420 (define-public python-pillow
4421 (package
4422 (name "python-pillow")
4423 (version "6.2.1")
4424 (source
4425 (origin
4426 (method url-fetch)
4427 (uri (pypi-uri "Pillow" version))
4428 (sha256
4429 (base32
4430 "1c8wkzc58f5wdh006jvmwdk3wxld1xgagcbdvj7iv17qi0m9fkmz"))))
4431 (build-system python-build-system)
4432 (native-inputs
4433 `(("python-pytest" ,python-pytest)))
4434 (inputs
4435 `(("freetype" ,freetype)
4436 ("lcms" ,lcms)
4437 ("libjpeg" ,libjpeg)
4438 ("libtiff" ,libtiff)
4439 ("libwebp" ,libwebp)
4440 ("openjpeg" ,openjpeg)
4441 ("zlib" ,zlib)))
4442 (propagated-inputs
4443 `(("python-olefile" ,python-olefile)))
4444 (arguments
4445 `(#:phases
4446 (modify-phases %standard-phases
4447 (add-after 'unpack 'patch-ldconfig
4448 (lambda _
4449 (substitute* "setup.py"
4450 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4451 (replace 'check
4452 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
4453 (if tests?
4454 (begin
4455 (setenv "HOME" (getcwd))
4456 ;; Make installed package available for running the tests.
4457 (add-installed-pythonpath inputs outputs)
4458 (invoke "python" "selftest.py" "--installed")
4459 (invoke "python" "-m" "pytest" "-vv"))
4460 #t))))))
4461 (home-page "https://python-pillow.org")
4462 (synopsis "Fork of the Python Imaging Library")
4463 (description
4464 "The Python Imaging Library adds image processing capabilities to your
4465 Python interpreter. This library provides extensive file format support, an
4466 efficient internal representation, and fairly powerful image processing
4467 capabilities. The core image library is designed for fast access to data
4468 stored in a few basic pixel formats. It should provide a solid foundation for
4469 a general image processing tool.")
4470 (license (license:x11-style
4471 "http://www.pythonware.com/products/pil/license.htm"
4472 "The PIL Software License"))))
4473
4474 (define-public python2-pillow
4475 (package-with-python2 python-pillow))
4476
4477 (define-public python-pycparser
4478 (package
4479 (name "python-pycparser")
4480 (version "2.19")
4481 (source
4482 (origin
4483 (method url-fetch)
4484 (uri (pypi-uri "pycparser" version))
4485 (sha256
4486 (base32
4487 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
4488 (outputs '("out" "doc"))
4489 (build-system python-build-system)
4490 (native-inputs
4491 `(("pkg-config" ,pkg-config)))
4492 (arguments
4493 `(#:phases
4494 (modify-phases %standard-phases
4495 (replace 'check
4496 (lambda _
4497 (with-directory-excursion "tests"
4498 (invoke "python" "all_tests.py"))
4499 #t))
4500 (add-after 'install 'install-doc
4501 (lambda* (#:key outputs #:allow-other-keys)
4502 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4503 (doc (string-append data "/doc/" ,name "-" ,version))
4504 (examples (string-append doc "/examples")))
4505 (mkdir-p examples)
4506 (for-each (lambda (file)
4507 (copy-file (string-append "." file)
4508 (string-append doc file)))
4509 '("/README.rst" "/CHANGES" "/LICENSE"))
4510 (copy-recursively "examples" examples)
4511 #t))))))
4512 (home-page "https://github.com/eliben/pycparser")
4513 (synopsis "C parser in Python")
4514 (description
4515 "Pycparser is a complete parser of the C language, written in pure Python
4516 using the PLY parsing library. It parses C code into an AST and can serve as
4517 a front-end for C compilers or analysis tools.")
4518 (license license:bsd-3)))
4519
4520 (define-public python2-pycparser
4521 (package-with-python2 python-pycparser))
4522
4523 (define-public python-pywavelets
4524 (package
4525 (name "python-pywavelets")
4526 (version "1.0.1")
4527 (home-page "https://github.com/PyWavelets/pywt")
4528 (source (origin
4529 (method url-fetch)
4530 (uri (pypi-uri "PyWavelets" version))
4531 (sha256
4532 (base32
4533 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4534 (build-system python-build-system)
4535 (arguments
4536 '(#:modules ((ice-9 ftw)
4537 (srfi srfi-1)
4538 (srfi srfi-26)
4539 (guix build utils)
4540 (guix build python-build-system))
4541 #:phases (modify-phases %standard-phases
4542 (replace 'check
4543 (lambda _
4544 (let ((cwd (getcwd))
4545 (libdir (find (cut string-prefix? "lib." <>)
4546 (scandir "build"))))
4547 (with-directory-excursion (string-append cwd "/build/" libdir)
4548 (invoke "nosetests" "-v" "."))))))))
4549 (native-inputs
4550 `(("python-matplotlib" ,python-matplotlib) ;for tests
4551 ("python-nose" ,python-nose)))
4552 (propagated-inputs
4553 `(("python-numpy" ,python-numpy)))
4554 (synopsis "Wavelet transforms in Python")
4555 (description
4556 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4557 mathematical basis functions that are localized in both time and frequency.
4558 Wavelet transforms are time-frequency transforms employing wavelets. They are
4559 similar to Fourier transforms, the difference being that Fourier transforms are
4560 localized only in frequency instead of in time and frequency.")
4561 (license license:expat)))
4562
4563 (define-public python2-pywavelets
4564 (package-with-python2 python-pywavelets))
4565
4566 (define-public python-xcffib
4567 (package
4568 (name "python-xcffib")
4569 (version "0.6.0")
4570 (source
4571 (origin
4572 (method url-fetch)
4573 (uri (pypi-uri "xcffib" version))
4574 (sha256
4575 (base32
4576 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4577 (build-system python-build-system)
4578 (inputs
4579 `(("libxcb" ,libxcb)))
4580 (propagated-inputs
4581 `(("python-cffi" ,python-cffi) ; used at run time
4582 ("python-six" ,python-six)))
4583 (arguments
4584 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4585 #:tests? #f
4586 #:phases
4587 (modify-phases %standard-phases
4588 (add-after 'unpack 'fix-libxcb-path
4589 (lambda* (#:key inputs #:allow-other-keys)
4590 (let ((libxcb (assoc-ref inputs "libxcb")))
4591 (substitute* '("xcffib/__init__.py")
4592 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4593 #t)))
4594 (add-after 'install 'install-doc
4595 (lambda* (#:key outputs #:allow-other-keys)
4596 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4597 "/doc/" ,name "-" ,version)))
4598 (mkdir-p doc)
4599 (copy-file "README.md"
4600 (string-append doc "/README.md"))
4601 #t))))))
4602 (home-page "https://github.com/tych0/xcffib")
4603 (synopsis "XCB Python bindings")
4604 (description
4605 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4606 support for Python 3 and PyPy. It is based on cffi.")
4607 (license license:expat)))
4608
4609 (define-public python2-xcffib
4610 (package-with-python2 python-xcffib))
4611
4612 (define-public python-cairocffi
4613 (package
4614 (name "python-cairocffi")
4615 (version "0.9.0")
4616 (source
4617 (origin
4618 (method url-fetch)
4619 (uri (pypi-uri "cairocffi" version))
4620 (sha256
4621 (base32
4622 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4623 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4624 (build-system python-build-system)
4625 (outputs '("out" "doc"))
4626 (inputs
4627 `(("glib" ,glib)
4628 ("gtk+" ,gtk+)
4629 ("gdk-pixbuf" ,gdk-pixbuf)
4630 ("cairo" ,cairo)
4631 ("pango" ,pango)))
4632 (native-inputs
4633 `(("pkg-config" ,pkg-config)
4634 ("python-pytest" ,python-pytest)
4635 ("python-pytest-cov" ,python-pytest-cov)
4636 ("python-pytest-runner" ,python-pytest-runner)
4637 ("python-sphinx" ,python-sphinx)
4638 ("python-docutils" ,python-docutils)))
4639 (propagated-inputs
4640 `(("python-xcffib" ,python-xcffib))) ; used at run time
4641 (arguments
4642 `(#:phases
4643 (modify-phases %standard-phases
4644 (add-after 'unpack 'patch-paths
4645 (lambda* (#:key inputs outputs #:allow-other-keys)
4646 (substitute* (find-files "." "\\.py$")
4647 (("dlopen\\(ffi, 'cairo'")
4648 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4649 "/lib/libcairo.so.2'"))
4650 (("dlopen\\(ffi, 'gdk-3'")
4651 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4652 "/lib/libgtk-3.so.0'"))
4653 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4654 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4655 "/lib/libgdk_pixbuf-2.0.so.0'"))
4656 (("dlopen\\(ffi, 'glib-2.0'")
4657 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4658 "/lib/libglib-2.0.so.0'"))
4659 (("dlopen\\(ffi, 'gobject-2.0'")
4660 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4661 "/lib/libgobject-2.0.so.0'"))
4662 (("dlopen\\(ffi, 'pangocairo-1.0'")
4663 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4664 "/lib/libpangocairo-1.0.so.0'"))
4665 (("dlopen\\(ffi, 'pango-1.0'")
4666 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4667 "/lib/libpango-1.0.so.0'")))
4668 #t))
4669 (add-after 'install 'install-doc
4670 (lambda* (#:key inputs outputs #:allow-other-keys)
4671 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4672 (doc (string-append data "/doc/" ,name "-" ,version))
4673 (html (string-append doc "/html")))
4674 (setenv "LD_LIBRARY_PATH"
4675 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4676 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4677 (setenv "LANG" "en_US.UTF-8")
4678 (mkdir-p html)
4679 (for-each (lambda (file)
4680 (copy-file (string-append "." file)
4681 (string-append doc file)))
4682 '("/README.rst" "/CHANGES" "/LICENSE"))
4683 (system* "python" "setup.py" "build_sphinx")
4684 (copy-recursively "docs/_build/html" html)
4685 #t))))))
4686 (home-page "https://github.com/Kozea/cairocffi")
4687 (synopsis "Python bindings and object-oriented API for Cairo")
4688 (description
4689 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4690 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4691 graphics library with support for multiple backends including image buffers,
4692 PNG, PostScript, PDF, and SVG file output.")
4693 (license license:bsd-3)))
4694
4695 (define-public python2-cairocffi
4696 (package-with-python2 python-cairocffi))
4697
4698 (define-public python-decorator
4699 (package
4700 (name "python-decorator")
4701 (version "4.3.0")
4702 (source
4703 (origin
4704 (method url-fetch)
4705 (uri (pypi-uri "decorator" version))
4706 (sha256
4707 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4708 (build-system python-build-system)
4709 (home-page "https://pypi.python.org/pypi/decorator/")
4710 (synopsis "Python module to simplify usage of decorators")
4711 (description
4712 "The aim of the decorator module is to simplify the usage of decorators
4713 for the average programmer, and to popularize decorators usage giving examples
4714 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4715 etc. The core of this module is a decorator factory.")
4716 (license license:expat)))
4717
4718 (define-public python2-decorator
4719 (package-with-python2 python-decorator))
4720
4721 (define-public python-drmaa
4722 (package
4723 (name "python-drmaa")
4724 (version "0.7.7")
4725 (source
4726 (origin
4727 (method url-fetch)
4728 (uri (pypi-uri "drmaa" version))
4729 (sha256
4730 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4731 (build-system python-build-system)
4732 ;; The test suite requires libdrmaa which is provided by the cluster
4733 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4734 ;; should be set to the path of the libdrmaa library.
4735 (arguments '(#:tests? #f))
4736 (native-inputs
4737 `(("python-nose" ,python-nose)))
4738 (home-page "https://pypi.python.org/pypi/drmaa")
4739 (synopsis "Python bindings for the DRMAA library")
4740 (description
4741 "A Python package for Distributed Resource Management (DRM) job
4742 submission and control. This package is an implementation of the DRMAA 1.0
4743 Python language binding specification.")
4744 (license license:bsd-3)))
4745
4746 (define-public python2-drmaa
4747 (package-with-python2 python-drmaa))
4748
4749 (define-public python-grako
4750 (package
4751 (name "python-grako")
4752 (version "3.99.9")
4753 (source
4754 (origin
4755 (method url-fetch)
4756 (uri
4757 (pypi-uri "grako" version ".zip"))
4758 (sha256
4759 (base32
4760 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4761 (build-system python-build-system)
4762 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4763 (native-inputs
4764 `(("unzip" ,unzip)
4765 ("python-pytest" ,python-pytest)
4766 ("python-pytest-runner" ,python-pytest-runner)))
4767 (home-page "https://bitbucket.org/neogeny/grako")
4768 (synopsis "EBNF parser generator")
4769 (description
4770 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4771 memoizing PEG/Packrat parser in Python.")
4772 (license license:bsd-3)))
4773
4774 (define-public python2-grako
4775 (package-with-python2 python-grako))
4776
4777 (define-public python-gridmap
4778 (package
4779 (name "python-gridmap")
4780 (version "0.13.0")
4781 (source
4782 (origin
4783 (method git-fetch)
4784 (uri (git-reference
4785 (url "https://github.com/pygridtools/gridmap.git")
4786 (commit (string-append "v" version))))
4787 (file-name (git-file-name name version))
4788 (sha256
4789 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
4790 (build-system python-build-system)
4791 (arguments
4792 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4793 (propagated-inputs
4794 `(("python-psutil" ,python-psutil)
4795 ("python-drmaa" ,python-drmaa)
4796 ("python-pyzmq" ,python-pyzmq)))
4797 (home-page "https://github.com/pygridtools/gridmap")
4798 (synopsis "Create jobs on a cluster directly from Python")
4799 (description
4800 "Gridmap is a Python package to allow you to easily create jobs on the
4801 cluster directly from Python. You can directly map Python functions onto the
4802 cluster without needing to write any wrapper code yourself.")
4803 (license license:gpl3+)))
4804
4805 (define-public python2-gridmap
4806 (package-with-python2 python-gridmap))
4807
4808 (define-public python-honcho
4809 (package
4810 (name "python-honcho")
4811 (version "1.0.1")
4812 (source
4813 (origin
4814 (method git-fetch)
4815 (uri (git-reference
4816 (url "https://github.com/nickstenning/honcho.git")
4817 (commit (string-append "v" version))))
4818 (file-name (git-file-name name version))
4819 (sha256
4820 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
4821 (build-system python-build-system)
4822 (native-inputs
4823 `(("python-pytest" ,python-pytest)
4824 ("python-mock" ,python-mock)
4825 ("python-tox" ,python-tox)
4826 ("which" ,which))) ;for tests
4827 (propagated-inputs
4828 `(("python-jinja2" ,python-jinja2)))
4829 (arguments
4830 `(#:phases
4831 (modify-phases %standard-phases
4832 (delete 'check)
4833 (add-after 'install 'check
4834 (lambda* (#:key outputs inputs #:allow-other-keys)
4835 ;; fix honcho path in testsuite
4836 (substitute* "tests/conftest.py"
4837 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4838 "/bin/honcho" "'")))
4839 ;; It's easier to run tests after install.
4840 ;; Make installed package available for running the tests
4841 (add-installed-pythonpath inputs outputs)
4842 (invoke "py.test" "-v"))))))
4843 (home-page "https://github.com/nickstenning/honcho")
4844 (synopsis "Manage Procfile-based applications")
4845 (description
4846 "A Procfile is a file which describes how to run an application
4847 consisting of several processes. honcho starts all listed processes.
4848 The output of all running processes is collected by honcho and
4849 displayed.")
4850 (license license:expat)))
4851
4852 (define-public python2-honcho
4853 (package-with-python2 python-honcho))
4854
4855 (define-public python-pexpect
4856 (package
4857 (name "python-pexpect")
4858 (version "4.6.0")
4859 (source
4860 (origin
4861 (method url-fetch)
4862 (uri (pypi-uri "pexpect" version))
4863 (sha256
4864 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4865 (build-system python-build-system)
4866 (arguments
4867 `(#:phases
4868 (modify-phases %standard-phases
4869 (add-before 'check 'prepare-tests
4870 (lambda _
4871 (substitute* (find-files "tests")
4872 (("/bin/ls") (which "ls"))
4873 (("/bin/echo") (which "echo"))
4874 (("/bin/which") (which "which"))
4875 ;; Many tests try to use the /bin directory which
4876 ;; is not present in the build environment.
4877 ;; Use one that's non-empty and unlikely to change.
4878 (("/bin'") "/dev'"))
4879 ;; XXX: Socket connection test gets "Connection reset by peer".
4880 ;; Why does it not work? Delete for now.
4881 (delete-file "tests/test_socket.py")
4882 #t))
4883 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4884 (native-inputs
4885 `(("python-nose" ,python-nose)
4886 ("python-pytest" ,python-pytest)
4887 ("man-db" ,man-db)
4888 ("which" ,which)
4889 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4890 (propagated-inputs
4891 `(("python-ptyprocess" ,python-ptyprocess)))
4892 (home-page "http://pexpect.readthedocs.org/")
4893 (synopsis "Controlling interactive console applications")
4894 (description
4895 "Pexpect is a pure Python module for spawning child applications;
4896 controlling them; and responding to expected patterns in their output.
4897 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4898 child application and control it as if a human were typing commands.")
4899 (license license:isc)))
4900
4901 (define-public python2-pexpect
4902 (package-with-python2 python-pexpect))
4903
4904 (define-public python-setuptools-scm
4905 (package
4906 (name "python-setuptools-scm")
4907 (version "3.2.0")
4908 (source (origin
4909 (method url-fetch)
4910 (uri (pypi-uri "setuptools_scm" version))
4911 (sha256
4912 (base32
4913 "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj"))))
4914 (build-system python-build-system)
4915 (home-page "https://github.com/pypa/setuptools_scm/")
4916 (synopsis "Manage Python package versions in SCM metadata")
4917 (description
4918 "Setuptools_scm handles managing your Python package versions in
4919 @dfn{software configuration management} (SCM) metadata instead of declaring
4920 them as the version argument or in a SCM managed file.")
4921 (license license:expat)))
4922
4923 ;; Needed by python-lazy-object-proxy, remove on next update cycle.
4924 (define-public python-setuptools-scm-3.3
4925 (package
4926 (inherit python-setuptools-scm)
4927 (version "3.3.3")
4928 (source (origin
4929 (method url-fetch)
4930 (uri (pypi-uri "setuptools_scm" version))
4931 (sha256
4932 (base32
4933 "19cyndx23xmpbhz4qrwmfwsmnnaczd0dw7qg977ksq2dbvxy29dx"))))))
4934
4935 (define-public python2-setuptools-scm
4936 (package-with-python2 python-setuptools-scm))
4937
4938 (define-public python-pathlib2
4939 (package
4940 (name "python-pathlib2")
4941 (version "2.3.3")
4942 (source
4943 (origin
4944 (method url-fetch)
4945 (uri (pypi-uri "pathlib2" version))
4946 (sha256
4947 (base32
4948 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
4949 (build-system python-build-system)
4950 (propagated-inputs
4951 `(("python-scandir" ,python-scandir)
4952 ("python-six" ,python-six)))
4953 (home-page "https://pypi.python.org/pypi/pathlib2/")
4954 (synopsis "Object-oriented file system paths")
4955 (description "The goal of pathlib2 is to provide a backport of the
4956 standard @code{pathlib} module which tracks the standard library module, so
4957 all the newest features of the standard @code{pathlib} can be used also on
4958 older Python versions.")
4959 (license license:expat)))
4960
4961 (define-public python-importlib-metadata
4962 (package
4963 (name "python-importlib-metadata")
4964 (version "1.4.0")
4965 (source
4966 (origin
4967 (method url-fetch)
4968 (uri (pypi-uri "importlib_metadata" version))
4969 (sha256
4970 (base32 "1n76444v7zn910xrhh8954jdn4byxbn9f1jck6b85a716mbh2z7i"))))
4971 (build-system python-build-system)
4972 (propagated-inputs
4973 `(("python-zipp" ,python-zipp)))
4974 (native-inputs
4975 `(("python-setuptools-scm" ,python-setuptools-scm)
4976 ("python-packaging" ,python-packaging)))
4977 (home-page "https://importlib-metadata.readthedocs.io/")
4978 (synopsis "Read metadata from Python packages")
4979 (description
4980 "@code{importlib_metadata} is a library which provides an API for
4981 accessing an installed Python package's metadata, such as its entry points or
4982 its top-level name. This functionality intends to replace most uses of
4983 @code{pkg_resources} entry point API and metadata API. Along with
4984 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
4985 need to use the older and less efficient @code{pkg_resources} package.")
4986 (license license:asl2.0)))
4987
4988 (define-public python-jaraco-packaging
4989 (package
4990 (name "python-jaraco-packaging")
4991 (version "6.1")
4992 (source
4993 (origin
4994 (method url-fetch)
4995 (uri (pypi-uri "jaraco.packaging" version))
4996 (sha256
4997 (base32
4998 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
4999 (build-system python-build-system)
5000 (propagated-inputs
5001 `(("python-pytest" ,python-pytest)
5002 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
5003 ("python-pytest-flake8" ,python-pytest-flake8)
5004 ("python-rst.linker" ,python-rst.linker)
5005 ("python-setuptools" ,python-setuptools)
5006 ("python-setuptools-scm" ,python-setuptools-scm)
5007 ("python-six" ,python-six)
5008 ("python-sphinx" ,python-sphinx)))
5009 (home-page "https://github.com/jaraco/jaraco.packaging")
5010 (synopsis "Tools to supplement packaging Python releases")
5011 (description
5012 "This package provides various tools to supplement packaging Python
5013 releases.")
5014 (license license:expat)))
5015
5016 (define-public python-pathpy
5017 (package
5018 (name "python-pathpy")
5019 (version "11.5.1")
5020 (source
5021 (origin
5022 (method url-fetch)
5023 (uri (pypi-uri "path.py" version))
5024 (sha256
5025 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
5026 (outputs '("out" "doc"))
5027 (build-system python-build-system)
5028 (propagated-inputs
5029 `(("python-appdirs" ,python-appdirs)
5030 ("python-importlib-metadata" ,python-importlib-metadata)))
5031 (native-inputs
5032 `(("python-setuptools-scm" ,python-setuptools-scm)
5033 ("python-sphinx" ,python-sphinx)
5034 ("python-rst.linker" ,python-rst.linker)
5035 ("python-pytest" ,python-pytest)
5036 ("python-pytest-runner" ,python-pytest-runner)
5037 ("python-jaraco-packaging" ,python-jaraco-packaging)))
5038 (arguments
5039 `(#:phases
5040 (modify-phases %standard-phases
5041 (add-after 'build 'build-doc
5042 (lambda _
5043 (setenv "LANG" "en_US.UTF-8")
5044 (invoke "python" "setup.py" "build_sphinx")))
5045 (add-after 'install 'install-doc
5046 (lambda* (#:key outputs #:allow-other-keys)
5047 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5048 (doc (string-append data "/doc/" ,name "-" ,version))
5049 (html (string-append doc "/html")))
5050 (mkdir-p html)
5051 (for-each (lambda (file)
5052 (copy-file file (string-append doc "/" file)))
5053 '("README.rst" "CHANGES.rst"))
5054 (copy-recursively "build/sphinx/html" html)
5055 #t)))
5056 (replace 'check
5057 (lambda _
5058 ;; The import time test aborts if an import takes longer than
5059 ;; 100ms. It may very well take a little longer than that.
5060 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
5061 (home-page "https://github.com/jaraco/path.py")
5062 (synopsis "Python module wrapper for built-in os.path")
5063 (description
5064 "@code{path.py} implements path objects as first-class entities, allowing
5065 common operations on files to be invoked on those path objects directly.")
5066 (license license:expat)))
5067
5068 (define-public python2-pathpy
5069 (package-with-python2 python-pathpy))
5070
5071 (define-public python-simplegeneric
5072 (package
5073 (name "python-simplegeneric")
5074 (version "0.8.1")
5075 (source
5076 (origin
5077 (method url-fetch)
5078 (uri (pypi-uri "simplegeneric" version ".zip"))
5079 (sha256
5080 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5081 (build-system python-build-system)
5082 (native-inputs
5083 `(("unzip" ,unzip)))
5084 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5085 (synopsis "Python module for simple generic functions")
5086 (description
5087 "The simplegeneric module lets you define simple single-dispatch generic
5088 functions, akin to Python’s built-in generic functions like @code{len()},
5089 @code{iter()} and so on. However, instead of using specially-named methods,
5090 these generic functions use simple lookup tables, akin to those used by
5091 e.g. @code{pickle.dump()} and other generic functions found in the Python
5092 standard library.")
5093 (license license:zpl2.1)))
5094
5095 (define-public python2-simplegeneric
5096 (package-with-python2 python-simplegeneric))
5097
5098 (define-public python-ipython-genutils
5099 ;; TODO: This package is retired, check if can be removed, see description.
5100 (package
5101 (name "python-ipython-genutils")
5102 (version "0.1.0")
5103 (source
5104 (origin
5105 (method url-fetch)
5106 (uri (pypi-uri "ipython_genutils" version))
5107 (sha256
5108 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5109 (build-system python-build-system)
5110 (arguments `(#:tests? #f)) ; no tests
5111 (home-page "https://ipython.org")
5112 (synopsis "Vestigial utilities from IPython")
5113 (description
5114 "This package provides retired utilities from IPython. No packages
5115 outside IPython/Jupyter should depend on it.
5116
5117 This package shouldn't exist. It contains some common utilities shared by
5118 Jupyter and IPython projects during The Big Split. As soon as possible, those
5119 packages will remove their dependency on this, and this package will go
5120 away.")
5121 (license license:bsd-3)))
5122
5123 (define-public python2-ipython-genutils
5124 (package-with-python2 python-ipython-genutils))
5125
5126 (define-public python-traitlets
5127 (package
5128 (name "python-traitlets")
5129 (version "4.3.3")
5130 (source
5131 (origin
5132 (method url-fetch)
5133 (uri (pypi-uri "traitlets" version))
5134 (sha256
5135 (base32
5136 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
5137 (build-system python-build-system)
5138 (arguments
5139 `(#:phases
5140 (modify-phases %standard-phases
5141 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5142 (propagated-inputs
5143 `(("python-ipython-genutils" ,python-ipython-genutils)
5144 ("python-decorator" ,python-decorator)))
5145 (native-inputs
5146 `(("python-pytest" ,python-pytest)))
5147 (properties `((python2-variant . ,(delay python2-traitlets))))
5148 (home-page "https://ipython.org")
5149 (synopsis "Configuration system for Python applications")
5150 (description
5151 "Traitlets is a framework that lets Python classes have attributes with
5152 type checking, dynamically calculated default values, and ‘on change’
5153 callbacks. The package also includes a mechanism to use traitlets for
5154 configuration, loading values from files or from command line arguments. This
5155 is a distinct layer on top of traitlets, so you can use traitlets in your code
5156 without using the configuration machinery.")
5157 (license license:bsd-3)))
5158
5159 (define-public python2-traitlets
5160 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5161 (package
5162 (inherit traitlets)
5163 (propagated-inputs
5164 `(("python2-enum34" ,python2-enum34)
5165 ,@(package-propagated-inputs traitlets))))))
5166
5167 (define-public python-jupyter-core
5168 (package
5169 (name "python-jupyter-core")
5170 (version "4.4.0")
5171 (source
5172 (origin
5173 (method url-fetch)
5174 (uri (string-append (pypi-uri "jupyter_core" version)))
5175 (sha256
5176 (base32
5177 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5178 (build-system python-build-system)
5179 ;; FIXME: not sure how to run the tests
5180 (arguments `(#:tests? #f))
5181 (propagated-inputs
5182 `(("python-traitlets" ,python-traitlets)))
5183 (home-page "http://jupyter.org/")
5184 (synopsis "Jupyter base package")
5185 (description
5186 "Jupyter core is the base package on which Jupyter projects rely.")
5187 (license license:bsd-3)))
5188
5189 (define-public python2-jupyter-core
5190 (package-with-python2 python-jupyter-core))
5191
5192 (define-public python-jupyter-client
5193 (package
5194 (name "python-jupyter-client")
5195 (version "5.2.4")
5196 (source
5197 (origin
5198 (method url-fetch)
5199 (uri (pypi-uri "jupyter_client" version))
5200 (sha256
5201 (base32
5202 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5203 (build-system python-build-system)
5204 ;; Tests fail because of missing native python kernel which I assume is
5205 ;; provided by the ipython package, which we cannot use because it would
5206 ;; cause a dependency cycle.
5207 (arguments
5208 `(#:tests? #f
5209
5210 #:phases (modify-phases %standard-phases
5211 (add-after 'unpack 'set-tool-file-names
5212 (lambda* (#:key inputs #:allow-other-keys)
5213 (let ((iproute (assoc-ref inputs "iproute")))
5214 (substitute* "jupyter_client/localinterfaces.py"
5215 (("'ip'")
5216 (string-append "'" iproute "/sbin/ip'")))
5217 #t))))))
5218 (inputs
5219 `(("iproute" ,iproute)))
5220 (propagated-inputs
5221 `(("python-pyzmq" ,python-pyzmq)
5222 ("python-traitlets" ,python-traitlets)
5223 ("python-jupyter-core" ,python-jupyter-core)))
5224 (home-page "http://jupyter.org/")
5225 (synopsis "Jupyter protocol implementation and client libraries")
5226 (description
5227 "The @code{jupyter_client} package contains the reference implementation
5228 of the Jupyter protocol. It also provides client and kernel management APIs
5229 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5230 installing @code{kernelspec}s for use with Jupyter frontends.")
5231 (license license:bsd-3)))
5232
5233 (define-public python2-jupyter-client
5234 (package-with-python2 python-jupyter-client))
5235
5236 (define-public python-ipykernel
5237 (package
5238 (name "python-ipykernel")
5239 (version "5.1.3")
5240 (source
5241 (origin
5242 (method url-fetch)
5243 (uri (pypi-uri "ipykernel" version))
5244 (sha256
5245 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
5246 (build-system python-build-system)
5247 (arguments
5248 `(#:phases
5249 (modify-phases %standard-phases
5250 (replace 'check
5251 (lambda _
5252 (setenv "HOME" "/tmp")
5253 (invoke "pytest" "-v")
5254 #t))
5255 (add-after 'install 'set-python-file-name
5256 (lambda* (#:key outputs #:allow-other-keys)
5257 ;; Record the absolute file name of the 'python' executable in
5258 ;; 'kernel.json'.
5259 (let ((out (assoc-ref outputs "out")))
5260 (substitute* (string-append out "/share/jupyter"
5261 "/kernels/python3/kernel.json")
5262 (("\"python\"")
5263 (string-append "\"" (which "python") "\"")))
5264 #t))))))
5265 (propagated-inputs
5266 `(("python-ipython" ,python-ipython)
5267 ;; imported at runtime during connect
5268 ("python-jupyter-client" ,python-jupyter-client)))
5269 (native-inputs
5270 `(("python-flaky" ,python-flaky)
5271 ("python-nose" ,python-nose)
5272 ("python-pytest" ,python-pytest)))
5273 (home-page "https://ipython.org")
5274 (synopsis "IPython Kernel for Jupyter")
5275 (description
5276 "This package provides the IPython kernel for Jupyter.")
5277 (license license:bsd-3)))
5278
5279 ;; Version 5.1.1 and above no longer support Python 2.
5280 (define-public python2-ipykernel
5281 (package
5282 (name "python2-ipykernel")
5283 (version "5.1.0")
5284 (source
5285 (origin
5286 (method url-fetch)
5287 (uri (pypi-uri "ipykernel" version))
5288 (sha256
5289 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5290 (build-system python-build-system)
5291 (arguments
5292 `(#:python ,python-2
5293 #:phases
5294 (modify-phases %standard-phases
5295 (replace 'check
5296 (lambda _
5297 (setenv "HOME" "/tmp")
5298 (invoke "pytest" "-v")
5299 #t)))))
5300 (propagated-inputs
5301 `(("python2-ipython" ,python2-ipython)
5302 ;; imported at runtime during connect
5303 ("python2-jupyter-client" ,python2-jupyter-client)))
5304 (native-inputs
5305 `(("python2-pytest" ,python2-pytest)
5306 ("python2-nose" ,python2-nose)))
5307 (home-page "https://ipython.org")
5308 (synopsis "IPython Kernel for Jupyter")
5309 (description
5310 "This package provides the IPython kernel for Jupyter.")
5311 (license license:bsd-3)))
5312
5313 (define-public python-pari-jupyter
5314 (package
5315 (name "python-pari-jupyter")
5316 (version "1.3.2")
5317 (source
5318 (origin
5319 (method url-fetch)
5320 (uri (pypi-uri "pari_jupyter" version))
5321 (sha256
5322 (base32
5323 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5324 (build-system python-build-system)
5325 (propagated-inputs
5326 `(("python-ipykernel" ,python-ipykernel)))
5327 (inputs
5328 `(("pari-gp" ,pari-gp)
5329 ("readline" ,readline)))
5330 (arguments
5331 `(#:tests? #f)) ; no test suite
5332 (home-page
5333 "https://github.com/jdemeyer/pari_jupyter")
5334 (synopsis "A Jupyter kernel for PARI/GP")
5335 (description "The package provides a PARI/GP kernel for Jupyter.")
5336 (license license:gpl3+)))
5337
5338 (define-public python-backcall
5339 (package
5340 (name "python-backcall")
5341 (version "0.1.0")
5342 (source
5343 (origin
5344 (method url-fetch)
5345 (uri (pypi-uri "backcall" version))
5346 (sha256
5347 (base32
5348 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5349 (build-system python-build-system)
5350 (home-page "https://github.com/takluyver/backcall/")
5351 (synopsis "Specifications for callback functions passed in to an API")
5352 (description
5353 "If your code lets other people supply callback functions, it's important
5354 to specify the function signature you expect, and check that functions support
5355 that. Adding extra parameters later would break other peoples code unless
5356 you're careful. The @code{backcall} package provides a way of specifying the
5357 callback signature using a prototype function.")
5358 (license license:bsd-3)))
5359
5360 ;; This is the latest release of the LTS version of ipython with support for
5361 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
5362 ;; dropped support for Python 2.7.
5363 (define-public python2-ipython
5364 (package
5365 (name "python2-ipython")
5366 (version "5.8.0")
5367 (source
5368 (origin
5369 (method url-fetch)
5370 (uri (pypi-uri "ipython" version ".tar.gz"))
5371 (sha256
5372 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5373 (build-system python-build-system)
5374 (propagated-inputs
5375 `(("python2-backports-shutil-get-terminal-size"
5376 ,python2-backports-shutil-get-terminal-size)
5377 ("python2-pathlib2" ,python2-pathlib2)
5378 ("python2-pyzmq" ,python2-pyzmq)
5379 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5380 ("python2-terminado" ,python2-terminado)
5381 ("python2-matplotlib" ,python2-matplotlib)
5382 ("python2-numpy" ,python2-numpy)
5383 ("python2-numpydoc" ,python2-numpydoc)
5384 ("python2-jinja2" ,python2-jinja2)
5385 ("python2-mistune" ,python2-mistune)
5386 ("python2-pexpect" ,python2-pexpect)
5387 ("python2-pickleshare" ,python2-pickleshare)
5388 ("python2-simplegeneric" ,python2-simplegeneric)
5389 ("python2-jsonschema" ,python2-jsonschema)
5390 ("python2-traitlets" ,python2-traitlets)
5391 ("python2-nbformat" ,python2-nbformat)
5392 ("python2-pygments" ,python2-pygments)))
5393 (inputs
5394 `(("readline" ,readline)
5395 ("which" ,which)))
5396 (native-inputs
5397 `(("graphviz" ,graphviz)
5398 ("pkg-config" ,pkg-config)
5399 ("python2-requests" ,python2-requests) ;; for tests
5400 ("python2-testpath" ,python2-testpath)
5401 ("python2-mock" ,python2-mock)
5402 ("python2-nose" ,python2-nose)))
5403 (arguments
5404 `(#:python ,python-2
5405 #:phases
5406 (modify-phases %standard-phases
5407 (add-before 'check 'delete-broken-tests
5408 (lambda* (#:key inputs #:allow-other-keys)
5409 ;; These tests throw errors for unknown reasons.
5410 (delete-file "IPython/core/tests/test_profile.py")
5411 (delete-file "IPython/core/tests/test_interactiveshell.py")
5412 (delete-file "IPython/core/tests/test_magic.py")
5413 #t)))))
5414 (home-page "https://ipython.org")
5415 (synopsis "IPython is a tool for interactive computing in Python")
5416 (description
5417 "IPython provides a rich architecture for interactive computing with:
5418 Powerful interactive shells, a browser-based notebook, support for interactive
5419 data visualization, embeddable interpreters and tools for parallel
5420 computing.")
5421 (license license:bsd-3)))
5422
5423 (define-public python-ipython
5424 (package
5425 (name "python-ipython")
5426 (version "7.9.0")
5427 (source
5428 (origin
5429 (method url-fetch)
5430 (uri (pypi-uri "ipython" version ".tar.gz"))
5431 (sha256
5432 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
5433 (build-system python-build-system)
5434 (propagated-inputs
5435 `(("python-backcall" ,python-backcall)
5436 ("python-pyzmq" ,python-pyzmq)
5437 ("python-prompt-toolkit" ,python-prompt-toolkit)
5438 ("python-terminado" ,python-terminado)
5439 ("python-matplotlib" ,python-matplotlib)
5440 ("python-numpy" ,python-numpy)
5441 ("python-numpydoc" ,python-numpydoc)
5442 ("python-jedi" ,python-jedi)
5443 ("python-jinja2" ,python-jinja2)
5444 ("python-mistune" ,python-mistune)
5445 ("python-pexpect" ,python-pexpect)
5446 ("python-pickleshare" ,python-pickleshare)
5447 ("python-simplegeneric" ,python-simplegeneric)
5448 ("python-jsonschema" ,python-jsonschema)
5449 ("python-traitlets" ,python-traitlets)
5450 ("python-nbformat" ,python-nbformat)
5451 ("python-pygments" ,python-pygments)))
5452 (inputs
5453 `(("readline" ,readline)
5454 ("which" ,which)))
5455 (native-inputs
5456 `(("graphviz" ,graphviz)
5457 ("pkg-config" ,pkg-config)
5458 ("python-requests" ,python-requests) ;; for tests
5459 ("python-testpath" ,python-testpath)
5460 ("python-nose" ,python-nose)))
5461 (arguments
5462 `(#:phases
5463 (modify-phases %standard-phases
5464 (add-after 'unpack 'make-docs-reproducible
5465 (lambda _
5466 (substitute* "IPython/sphinxext/ipython_directive.py"
5467 ((".*import datetime") "")
5468 ((".*datetime.datetime.now\\(\\)") "")
5469 (("%timeit") "# %timeit"))
5470 #t))
5471 ;; Tests can only be run after the library has been installed and not
5472 ;; within the source directory.
5473 (delete 'check)
5474 (add-after 'install 'check
5475 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5476 (if tests?
5477 (begin
5478 ;; Make installed package available for running the tests
5479 (add-installed-pythonpath inputs outputs)
5480 (setenv "HOME" "/tmp/") ;; required by a test
5481 ;; We only test the core because one of the other tests
5482 ;; tries to import ipykernel.
5483 (invoke "python" "IPython/testing/iptest.py"
5484 "-v" "IPython/core/tests"))
5485 #t)))
5486 (add-before 'check 'fix-tests
5487 (lambda* (#:key inputs #:allow-other-keys)
5488 (substitute* "./IPython/utils/_process_posix.py"
5489 (("/usr/bin/env', 'which") (which "which")))
5490 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5491 (("#!/usr/bin/env python")
5492 (string-append "#!" (which "python"))))
5493 ;; This test introduces a circular dependency on ipykernel
5494 ;; (which depends on ipython).
5495 (delete-file "IPython/core/tests/test_display.py")
5496 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
5497 (delete-file "IPython/core/tests/test_interactiveshell.py")
5498 #t)))))
5499 (home-page "https://ipython.org")
5500 (synopsis "IPython is a tool for interactive computing in Python")
5501 (description
5502 "IPython provides a rich architecture for interactive computing with:
5503 Powerful interactive shells, a browser-based notebook, support for interactive
5504 data visualization, embeddable interpreters and tools for parallel
5505 computing.")
5506 (license license:bsd-3)))
5507
5508 (define-public python-ipython-documentation
5509 (package
5510 (inherit python-ipython)
5511 (name "python-ipython-documentation")
5512 (version (package-version python-ipython))
5513 (arguments
5514 `(#:phases
5515 (modify-phases %standard-phases
5516 (delete 'build)
5517 (delete 'check)
5518 (replace 'install
5519 (lambda* (#:key outputs #:allow-other-keys)
5520 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5521 (doc (string-append data "/doc/" ,name "-" ,version))
5522 (html (string-append doc "/html"))
5523 (man1 (string-append data "/man/man1"))
5524 (info (string-append data "/info"))
5525 (examples (string-append doc "/examples"))
5526 (python-arg (string-append "PYTHON=" (which "python"))))
5527 (setenv "LANG" "en_US.utf8")
5528 (with-directory-excursion "docs"
5529 ;; FIXME: pdf fails to build
5530 ;;(system* "make" "pdf" "PAPER=a4")
5531 (system* "make" python-arg "html")
5532 ;; FIXME: the generated texi file contains ^@^@, which trips
5533 ;; up the parser.
5534 ;; (system* "make" python-arg "info")
5535 )
5536 (copy-recursively "docs/man" man1)
5537 (copy-recursively "examples" examples)
5538 (copy-recursively "docs/build/html" html)
5539 ;; (copy-file "docs/build/latex/ipython.pdf"
5540 ;; (string-append doc "/ipython.pdf"))
5541 (mkdir-p info)
5542 ;; (copy-file "docs/build/texinfo/ipython.info"
5543 ;; (string-append info "/ipython.info"))
5544 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5545 #t)))))
5546 (inputs
5547 `(("python-ipython" ,python-ipython)
5548 ("python-ipykernel" ,python-ipykernel)))
5549 (native-inputs
5550 `(("python-sphinx" ,python-sphinx)
5551 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
5552 ;; FIXME: It's possible that a smaller union would work just as well.
5553 ("texlive" ,(texlive-union (list texlive-amsfonts
5554 texlive-fonts-ec
5555 texlive-generic-ifxetex
5556 texlive-generic-pdftex
5557 texlive-latex-capt-of
5558 texlive-latex-cmap
5559 texlive-latex-environ
5560 texlive-latex-eqparbox
5561 texlive-latex-etoolbox
5562 texlive-latex-expdlist
5563 texlive-latex-fancyhdr
5564 texlive-latex-fancyvrb
5565 texlive-latex-fncychap
5566 texlive-latex-float
5567 texlive-latex-framed
5568 texlive-latex-geometry
5569 texlive-latex-graphics
5570 texlive-latex-hyperref
5571 texlive-latex-mdwtools
5572 texlive-latex-multirow
5573 texlive-latex-needspace
5574 texlive-latex-oberdiek
5575 texlive-latex-parskip
5576 texlive-latex-preview
5577 texlive-latex-tabulary
5578 texlive-latex-threeparttable
5579 texlive-latex-titlesec
5580 texlive-latex-trimspaces
5581 texlive-latex-ucs
5582 texlive-latex-upquote
5583 texlive-latex-url
5584 texlive-latex-varwidth
5585 texlive-latex-wrapfig)))
5586 ("texinfo" ,texinfo)))))
5587
5588 (define-public python-urwid
5589 (package
5590 (name "python-urwid")
5591 (version "2.0.1")
5592 (source
5593 (origin
5594 (method url-fetch)
5595 (uri (pypi-uri "urwid" version))
5596 (sha256
5597 (base32
5598 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5599 (build-system python-build-system)
5600 (home-page "http://urwid.org")
5601 (synopsis "Console user interface library for Python")
5602 (description
5603 "Urwid is a curses-based UI/widget library for Python. It includes many
5604 features useful for text console applications.")
5605 (license license:lgpl2.1+)))
5606
5607 (define-public python2-urwid
5608 (package-with-python2 python-urwid))
5609
5610 (define-public python-urwidtrees
5611 (package
5612 (name "python-urwidtrees")
5613 (version "1.0.2")
5614 (source
5615 (origin
5616 (method git-fetch)
5617 ;; package author intends on distributing via github rather than pypi:
5618 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5619 (uri (git-reference
5620 (url "https://github.com/pazz/urwidtrees")
5621 (commit version)))
5622 (file-name (git-file-name name version))
5623 (sha256
5624 (base32
5625 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
5626 (build-system python-build-system)
5627 (arguments
5628 '(#:use-setuptools? #f
5629 #:tests? #f)) ; no tests
5630 (propagated-inputs `(("python-urwid" ,python-urwid)))
5631 (home-page "https://github.com/pazz/urwidtrees")
5632 (synopsis "Tree widgets for urwid")
5633 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5634 toolkit. Use it to build trees of widgets.")
5635 (license license:gpl3+)))
5636
5637 (define-public python2-urwidtrees
5638 (package-with-python2 python-urwidtrees))
5639
5640 (define-public python-ua-parser
5641 (package
5642 (name "python-ua-parser")
5643 (version "0.8.0")
5644 (source
5645 (origin
5646 (method url-fetch)
5647 (uri (pypi-uri "ua-parser" version))
5648 (sha256
5649 (base32
5650 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5651 (build-system python-build-system)
5652 (arguments
5653 `(#:tests? #f)) ;no test suite in release
5654 (native-inputs
5655 `(("python-pyyaml" ,python-pyyaml)))
5656 (home-page "https://github.com/ua-parser/uap-python")
5657 (synopsis "User agent parser")
5658 (description
5659 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5660 (license license:asl2.0)))
5661
5662 (define-public python2-ua-parser
5663 (package-with-python2 python-ua-parser))
5664
5665 (define-public python-user-agents
5666 (package
5667 (name "python-user-agents")
5668 (version "1.1.0")
5669 (source
5670 (origin
5671 (method url-fetch)
5672 (uri (pypi-uri "user-agents" version))
5673 (sha256
5674 (base32
5675 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5676 (build-system python-build-system)
5677 (arguments
5678 `(#:tests? #f)) ;missing devices.json test file in release
5679 (propagated-inputs
5680 `(("python-ua-parser" ,python-ua-parser)))
5681 (home-page "https://github.com/selwin/python-user-agents")
5682 (synopsis "User Agent strings parsing library")
5683 (description
5684 "A library to identify devices (phones, tablets) and their capabilities by
5685 parsing (browser/HTTP) user agent strings.")
5686 (license license:expat)))
5687
5688 (define-public python2-user-agents
5689 (package-with-python2 python-user-agents))
5690
5691 (define-public python-dbus
5692 (package
5693 (name "python-dbus")
5694 (version "1.2.14")
5695 (source
5696 (origin
5697 (method url-fetch)
5698 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5699 "dbus-python-" version ".tar.gz"))
5700 (sha256
5701 (base32 "0cdchkgnivlka4lf8q4qfk0yxq483i3r3aqickjf8hfn7nx0c0mi"))))
5702 (build-system gnu-build-system)
5703 (native-inputs
5704 `(("pkg-config" ,pkg-config)))
5705 (inputs
5706 `(("python" ,python-wrapper)
5707 ("dbus-glib" ,dbus-glib)))
5708 (synopsis "Python bindings for D-bus")
5709 (description "python-dbus provides bindings for libdbus, the reference
5710 implementation of D-Bus.")
5711 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5712 (license license:expat)))
5713
5714 (define-public python2-dbus
5715 (package (inherit python-dbus)
5716 (name "python2-dbus")
5717 (inputs `(("python" ,python-2)
5718 ,@(alist-delete "python"
5719 (package-inputs python-dbus)
5720 equal?)))))
5721
5722 (define-public python-notify2
5723 (package
5724 (name "python-notify2")
5725 (version "0.3.1")
5726 (source
5727 (origin
5728 (method url-fetch)
5729 (uri (pypi-uri "notify2" version))
5730 (sha256
5731 (base32
5732 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
5733 (build-system python-build-system)
5734 (arguments `(#:tests? #f)) ; tests depend on system state
5735 (native-inputs
5736 `(("python-dbus" ,python-dbus)))
5737 (home-page "https://bitbucket.org/takluyver/pynotify2")
5738 (synopsis "Python interface to D-Bus notifications")
5739 (description
5740 "Pynotify2 provides a Python interface for sending D-Bus notifications.
5741 It is a reimplementation of pynotify in pure Python, and an alternative to
5742 the GObject Introspection bindings to libnotify for non-GTK applications.")
5743 (license (list license:bsd-2
5744 license:lgpl2.1+))))
5745
5746 (define-public python2-notify2
5747 (package-with-python2 python-notify2))
5748
5749 (define-public python-lxml
5750 (package
5751 (name "python-lxml")
5752 (version "4.4.2")
5753 (source
5754 (origin
5755 (method url-fetch)
5756 (uri (pypi-uri "lxml" version))
5757 (sha256
5758 (base32 "01nvb5j8vs9nk4z5s3250b1m22b4d08kffa36if3g1mdygdrvxpg"))))
5759 (build-system python-build-system)
5760 (arguments
5761 `(#:phases (modify-phases %standard-phases
5762 (replace 'check
5763 (lambda _
5764 (invoke "make" "test"))))))
5765 (inputs
5766 `(("libxml2" ,libxml2)
5767 ("libxslt" ,libxslt)))
5768 (home-page "https://lxml.de/")
5769 (synopsis "Python XML processing library")
5770 (description
5771 "The lxml XML toolkit is a Pythonic binding for the C libraries
5772 libxml2 and libxslt.")
5773 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5774
5775 (define-public python2-lxml
5776 (package-with-python2 python-lxml))
5777
5778 ;; beautifulsoup4 has a totally different namespace than 3.x,
5779 ;; and pypi seems to put it under its own name, so I guess we should too
5780 (define-public python-beautifulsoup4
5781 (package
5782 (name "python-beautifulsoup4")
5783 (version "4.7.1")
5784 (source
5785 (origin
5786 (method url-fetch)
5787 (uri (pypi-uri "beautifulsoup4" version))
5788 (sha256
5789 (base32
5790 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
5791 (build-system python-build-system)
5792 (arguments
5793 `(#:phases
5794 (modify-phases %standard-phases
5795 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5796 ;; must use this conversion script when building with Python 3. The
5797 ;; conversion script also runs the tests.
5798 ;; For more information, see the file 'convert-py3k' in the source
5799 ;; distribution.
5800 (replace 'check
5801 (lambda _ (invoke "./convert-py3k"))))))
5802 (propagated-inputs
5803 `(("python-soupsieve" ,python-soupsieve)))
5804 (home-page
5805 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5806 (synopsis
5807 "Python screen-scraping library")
5808 (description
5809 "Beautiful Soup is a Python library designed for rapidly setting up
5810 screen-scraping projects. It offers Pythonic idioms for navigating,
5811 searching, and modifying a parse tree, providing a toolkit for
5812 dissecting a document and extracting what you need. It automatically
5813 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5814 (license license:expat)
5815 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5816
5817 (define-public python2-beautifulsoup4
5818 (package
5819 (inherit (package-with-python2
5820 (strip-python2-variant python-beautifulsoup4)))
5821 (arguments `(#:python ,python-2))))
5822
5823 (define-public python-soupsieve
5824 (package
5825 (name "python-soupsieve")
5826 (version "1.9.5")
5827 (source
5828 (origin
5829 (method url-fetch)
5830 (uri (pypi-uri "soupsieve" version))
5831 (sha256
5832 (base32
5833 "1nhd0q0ifwva9wn645s6pn74p1rd97asn3qfg75nphx1wkgcbhg2"))))
5834 (build-system python-build-system)
5835 (arguments `(#:tests? #f))
5836 ;;XXX: 2 tests fail currently despite claming they were to be
5837 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
5838 ;;don't want to create a circular dependency.
5839 (home-page "https://github.com/facelessuser/soupsieve")
5840 (synopsis "CSS selector library")
5841 (description
5842 "Soup Sieve is a CSS selector library designed to be used with Beautiful
5843 Soup 4. It aims to provide selecting, matching, and filtering using modern
5844 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
5845 specifications up through the latest CSS level 4 drafts and beyond (though
5846 some are not yet implemented).")
5847 (properties `((python2-variant . ,(delay python2-soupsieve))))
5848 (license license:expat)))
5849
5850 (define-public python2-soupsieve
5851 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
5852 (package
5853 (inherit base)
5854 (propagated-inputs
5855 `(("python2-backports-functools-lru-cache"
5856 ,python2-backports-functools-lru-cache)
5857 ,@(package-propagated-inputs base))))))
5858
5859 (define-public python-netifaces
5860 (package
5861 (name "python-netifaces")
5862 (version "0.10.7")
5863 (source
5864 (origin
5865 (method url-fetch)
5866 (uri (pypi-uri "netifaces" version))
5867 (sha256
5868 (base32
5869 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5870 (build-system python-build-system)
5871 (home-page "https://github.com/al45tair/netifaces")
5872 (synopsis
5873 "Python module for portable network interface information")
5874 (description
5875 "Netifaces is a Python module providing information on network
5876 interfaces in an easy and portable manner.")
5877 (license license:expat)))
5878
5879 (define-public python2-netifaces
5880 (package-with-python2 python-netifaces))
5881
5882 (define-public python-networkx
5883 (package
5884 (name "python-networkx")
5885 (version "2.2")
5886 (source
5887 (origin
5888 (method url-fetch)
5889 (uri (pypi-uri "networkx" version ".zip"))
5890 (sha256
5891 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5892 (build-system python-build-system)
5893 ;; python-decorator is needed at runtime.
5894 (propagated-inputs
5895 `(("python-decorator" ,python-decorator)))
5896 (native-inputs
5897 `(("python-nose" ,python-nose)
5898 ("unzip" ,unzip)))
5899 (home-page "https://networkx.github.io/")
5900 (synopsis "Python module for creating and manipulating graphs and networks")
5901 (description
5902 "NetworkX is a Python package for the creation, manipulation, and study
5903 of the structure, dynamics, and functions of complex networks.")
5904 (license license:bsd-3)))
5905
5906 (define-public python2-networkx
5907 (package-with-python2 python-networkx))
5908
5909 (define-public python-datrie
5910 (package
5911 (name "python-datrie")
5912 (version "0.8")
5913 (source
5914 (origin
5915 (method url-fetch)
5916 (uri (pypi-uri "datrie" version))
5917 (sha256
5918 (base32
5919 "0338r8xgmpy78556jhms0h6qkvyjr10p8bpgdvcpqzm9lrmxmmdx"))))
5920 (build-system python-build-system)
5921 (native-inputs
5922 `(("python-cython" ,python-cython)
5923 ("python-hypothesis" ,python-hypothesis)
5924 ("python-pytest" ,python-pytest)
5925 ("python-pytest-runner" ,python-pytest-runner)))
5926 (home-page "https://github.com/kmike/datrie")
5927 (synopsis "Fast, efficiently stored trie for Python")
5928 (description
5929 "This package provides a fast, efficiently stored trie implementation for
5930 Python.")
5931 (license license:lgpl2.1+)))
5932
5933 (define-public snakemake
5934 (package
5935 (name "snakemake")
5936 (version "5.7.1")
5937 (source
5938 (origin
5939 (method url-fetch)
5940 (uri (pypi-uri "snakemake" version))
5941 (sha256
5942 (base32 "1pnpvvn8n2a78cg360wz3ldmpqrsm2wzi0c0dmvki9fnsw6fxdas"))))
5943 (build-system python-build-system)
5944 (arguments
5945 ;; TODO: Package missing test dependencies.
5946 '(#:tests? #f
5947 #:phases
5948 (modify-phases %standard-phases
5949 ;; For cluster execution Snakemake will call Python. Since there is
5950 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5951 ;; this by calling the snakemake wrapper instead.
5952 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5953 (lambda* (#:key outputs #:allow-other-keys)
5954 (substitute* "snakemake/executors.py"
5955 (("\\{sys.executable\\} -m snakemake")
5956 (string-append (assoc-ref outputs "out")
5957 "/bin/snakemake")))
5958 #t)))))
5959 (propagated-inputs
5960 `(("python-appdirs" ,python-appdirs)
5961 ("python-configargparse" ,python-configargparse)
5962 ("python-datrie" ,python-datrie)
5963 ("python-docutils" ,python-docutils)
5964 ("python-gitpython" ,python-gitpython)
5965 ("python-jinja2" ,python-jinja2)
5966 ("python-jsonschema" ,python-jsonschema)
5967 ("python-networkx" ,python-networkx)
5968 ("python-psutil" ,python-psutil)
5969 ("python-pyyaml" ,python-pyyaml)
5970 ("python-ratelimiter" ,python-ratelimiter)
5971 ("python-requests" ,python-requests)
5972 ("python-wrapt" ,python-wrapt)))
5973 (home-page "https://snakemake.readthedocs.io")
5974 (synopsis "Python-based execution environment for make-like workflows")
5975 (description
5976 "Snakemake aims to reduce the complexity of creating workflows by
5977 providing a clean and modern domain specific specification language (DSL) in
5978 Python style, together with a fast and comfortable execution environment.")
5979 (license license:expat)))
5980
5981 (define-public python-pyqrcode
5982 (package
5983 (name "python-pyqrcode")
5984 (version "1.2.1")
5985 (source
5986 (origin
5987 (method url-fetch)
5988 (uri (pypi-uri "PyQRCode" version))
5989 (sha256
5990 (base32
5991 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
5992 (build-system python-build-system)
5993 (home-page
5994 "https://github.com/mnooner256/pyqrcode")
5995 (synopsis "QR code generator")
5996 (description
5997 "Pyqrcode is a QR code generator written purely in Python with
5998 SVG, EPS, PNG and terminal output.")
5999 (license license:bsd-3)))
6000
6001 (define-public python-seaborn
6002 (package
6003 (name "python-seaborn")
6004 (version "0.9.0")
6005 (source
6006 (origin
6007 (method url-fetch)
6008 (uri (pypi-uri "seaborn" version))
6009 (sha256
6010 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))
6011 (patches
6012 (list (origin
6013 (method url-fetch)
6014 ;; This has already been merged, but there is no new
6015 ;; release including this patch. It fixes problems
6016 ;; with axis rotation that would lead to test
6017 ;; failures.
6018 (uri "https://patch-diff.githubusercontent.com/raw/mwaskom/seaborn/pull/1716.diff")
6019 (sha256
6020 (base32
6021 "1lm870z316n9ivsyr86hpk1gxaraw0mrjvq42lqsm0znhjdp9q9w"))
6022 (file-name "seaborn-0.9.0-axis-rotation.patch"))))))
6023 (build-system python-build-system)
6024 (arguments
6025 `(#:phases
6026 (modify-phases %standard-phases
6027 (add-before 'check 'start-xserver
6028 (lambda* (#:key inputs #:allow-other-keys)
6029 (let ((xorg-server (assoc-ref inputs "xorg-server")))
6030 ;; There must be a running X server and make check doesn't
6031 ;; start one. Therefore we must do it.
6032 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
6033 (setenv "DISPLAY" ":1")
6034 #t)))
6035 (add-after 'unpack 'fix-tests
6036 (lambda _
6037 ;; test_cbar_ticks fails probably because of matplotlib's
6038 ;; expectation of using an older version of FreeType.
6039 (delete-file "seaborn/tests/test_matrix.py")
6040 #t))
6041 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
6042 (propagated-inputs
6043 `(("python-pandas" ,python-pandas)
6044 ("python-matplotlib" ,python-matplotlib)
6045 ("python-numpy" ,python-numpy)
6046 ("python-scipy" ,python-scipy)))
6047 (native-inputs
6048 `(("python-pytest" ,python-pytest)
6049 ("xorg-server" ,xorg-server-for-tests)))
6050 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6051 (synopsis "Statistical data visualization")
6052 (description
6053 "Seaborn is a library for making attractive and informative statistical
6054 graphics in Python. It is built on top of matplotlib and tightly integrated
6055 with the PyData stack, including support for numpy and pandas data structures
6056 and statistical routines from scipy and statsmodels.")
6057 (license license:bsd-3)))
6058
6059 (define-public python2-seaborn
6060 (package-with-python2 python-seaborn))
6061
6062 (define-public python-mpmath
6063 (package
6064 (name "python-mpmath")
6065 (version "0.19")
6066 (source (origin
6067 (method url-fetch)
6068 (uri (string-append "http://mpmath.org/files/mpmath-"
6069 version ".tar.gz"))
6070 (sha256
6071 (base32
6072 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6073 (build-system python-build-system)
6074 (arguments
6075 '(#:phases
6076 (modify-phases %standard-phases
6077 (replace 'check
6078 (lambda _
6079 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
6080 (home-page "http://mpmath.org")
6081 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6082 (description
6083 "@code{mpmath} can be used as an arbitrary-precision substitute for
6084 Python's float/complex types and math/cmath modules, but also does much
6085 more advanced mathematics.")
6086 (license license:bsd-3)))
6087
6088 (define-public python2-mpmath
6089 (package-with-python2 python-mpmath))
6090
6091 (define-public python-bigfloat
6092 (package
6093 (name "python-bigfloat")
6094 (version "0.3.0")
6095 (source
6096 (origin
6097 (method url-fetch)
6098 (uri (pypi-uri "bigfloat" version))
6099 (sha256
6100 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6101 (build-system python-build-system)
6102 (inputs
6103 `(("mpfr" ,mpfr)))
6104 (home-page "https://github.com/mdickinson/bigfloat")
6105 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6106 (description
6107 "This package provides a Python interface to the MPFR library for
6108 multiprecision arithmetic.")
6109 (license license:lgpl3+)))
6110
6111 (define-public python2-bigfloat
6112 (package-with-python2 python-bigfloat))
6113
6114 (define-public python-sympy
6115 (package
6116 (name "python-sympy")
6117 (version "1.1.1")
6118 (source
6119 (origin
6120 (method url-fetch)
6121 (uri (string-append
6122 "https://github.com/sympy/sympy/releases/download/sympy-"
6123 version "/sympy-" version ".tar.gz"))
6124 (sha256
6125 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6126 (build-system python-build-system)
6127 (arguments
6128 `(#:phases
6129 (modify-phases %standard-phases
6130 ;; Run the core tests after installation. By default it would run
6131 ;; *all* tests, which take a very long time to complete and are known
6132 ;; to be flaky.
6133 (delete 'check)
6134 (add-after 'install 'check
6135 (lambda* (#:key outputs #:allow-other-keys)
6136 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6137 #t)))))
6138 (propagated-inputs
6139 `(("python-mpmath" ,python-mpmath)))
6140 (home-page "http://www.sympy.org/")
6141 (synopsis "Python library for symbolic mathematics")
6142 (description
6143 "SymPy is a Python library for symbolic mathematics. It aims to become a
6144 full-featured computer algebra system (CAS) while keeping the code as simple
6145 as possible in order to be comprehensible and easily extensible.")
6146 (license license:bsd-3)))
6147
6148 (define-public python2-sympy
6149 (package
6150 (inherit (package-with-python2 python-sympy))
6151 (arguments
6152 `(#:phases
6153 (modify-phases %standard-phases
6154 ;; Run the core tests after installation. By default it would run
6155 ;; *all* tests, which take a very long time to complete and are known
6156 ;; to be flaky.
6157 (delete 'check)
6158 (add-after 'install 'check
6159 (lambda* (#:key outputs #:allow-other-keys)
6160 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6161 #t)))))))
6162
6163 (define-public python-q
6164 (package
6165 (name "python-q")
6166 (version "2.6")
6167 (source
6168 (origin
6169 (method url-fetch)
6170 (uri (pypi-uri "q" version))
6171 (sha256
6172 (base32
6173 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6174 (build-system python-build-system)
6175 (home-page "https://github.com/zestyping/q")
6176 (synopsis "Quick-and-dirty debugging output for tired programmers")
6177 (description
6178 "q is a Python module for \"print\" style of debugging Python code. It
6179 provides convenient short API for print out of values, tracebacks, and
6180 falling into the Python interpreter.")
6181 (license license:asl2.0)))
6182
6183 (define-public python2-q
6184 (package-with-python2 python-q))
6185
6186 (define-public python2-xlib
6187 (package
6188 (name "python2-xlib")
6189 (version "0.14")
6190 (source (origin
6191 (method url-fetch)
6192 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6193 "/" version "/"
6194 "python-xlib-" version ".tar.gz"))
6195 (sha256
6196 (base32
6197 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6198 (build-system python-build-system)
6199 (arguments
6200 `(#:python ,python-2 ;Python 2 only
6201 #:tests? #f)) ;no tests
6202 (home-page "http://python-xlib.sourceforge.net/")
6203 (synopsis "Python X11 client library")
6204 (description
6205 "The Python X Library is intended to be a fully functional X client
6206 library for Python programs. It is useful to implement low-level X clients.
6207 It is written entirely in Python.")
6208 (license license:gpl2+)))
6209
6210 (define-public python-singledispatch
6211 (package
6212 (name "python-singledispatch")
6213 (version "3.4.0.3")
6214 (source
6215 (origin
6216 (method url-fetch)
6217 (uri (pypi-uri "singledispatch" version))
6218 (sha256
6219 (base32
6220 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6221 (build-system python-build-system)
6222 (native-inputs
6223 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6224 (home-page
6225 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6226 (synopsis "Backport of singledispatch feature from Python 3.4")
6227 (description
6228 "This library brings functools.singledispatch from Python 3.4 to Python
6229 2.6-3.3.")
6230 (license license:expat)))
6231
6232 (define-public python2-singledispatch
6233 (package-with-python2 python-singledispatch))
6234
6235 ;; the python- version can be removed with python-3.5
6236 (define-public python-backports-abc
6237 (package
6238 (name "python-backports-abc")
6239 (version "0.5")
6240 (source
6241 (origin
6242 (method url-fetch)
6243 (uri (pypi-uri "backports_abc" version))
6244 (sha256
6245 (base32
6246 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6247 (build-system python-build-system)
6248 (home-page "https://github.com/cython/backports_abc")
6249 (synopsis "Backport of additions to the 'collections.abc' module")
6250 (description
6251 "Python-backports-abc provides a backport of additions to the
6252 @code{collections.abc} module in Python-3.5.")
6253 (license license:psfl)))
6254
6255 (define-public python2-backports-abc
6256 (package-with-python2 python-backports-abc))
6257
6258 (define-public python-backports-csv
6259 (package
6260 (name "python-backports-csv")
6261 (version "1.0.5")
6262 (source
6263 (origin
6264 (method url-fetch)
6265 (uri (pypi-uri "backports.csv" version))
6266 (sha256
6267 (base32
6268 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6269 (build-system python-build-system)
6270 (home-page "https://github.com/ryanhiebert/backports.csv")
6271 (synopsis "Backport of Python 3's csv module for Python 2")
6272 (description
6273 "Provides a backport of Python 3's @code{csv} module for parsing
6274 comma separated values. The API of the @code{csv} module in Python 2
6275 is drastically different from the @code{csv} module in Python 3.
6276 This is due, for the most part, to the difference between str in
6277 Python 2 and Python 3.")
6278 (license license:psfl)))
6279
6280 (define-public python2-backports-csv
6281 (package-with-python2 python-backports-csv))
6282
6283 (define-public python2-backports-shutil-get-terminal-size
6284 (package
6285 (name "python2-backports-shutil-get-terminal-size")
6286 (version "1.0.0")
6287 (source
6288 (origin
6289 (method url-fetch)
6290 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6291 (sha256
6292 (base32
6293 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6294 (build-system python-build-system)
6295 (arguments
6296 `(#:python ,python-2
6297 #:phases
6298 (modify-phases %standard-phases
6299 (replace 'check
6300 (lambda _
6301 (invoke "py.test" "-v"))))))
6302 (native-inputs
6303 `(("python2-pytest" ,python2-pytest)))
6304 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6305 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6306 (description
6307 "This package provides a backport of the @code{get_terminal_size
6308 function} from Python 3.3's @code{shutil}.
6309 Unlike the original version it is written in pure Python rather than C,
6310 so it might be a tiny bit slower.")
6311 (license license:expat)))
6312
6313 (define-public python-waf
6314 (package
6315 (name "python-waf")
6316 (version "2.0.19")
6317 (source (origin
6318 (method url-fetch)
6319 (uri (string-append "https://waf.io/"
6320 "waf-" version ".tar.bz2"))
6321 (sha256
6322 (base32
6323 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
6324 (build-system python-build-system)
6325 (arguments
6326 '(#:phases
6327 (modify-phases %standard-phases
6328 (replace 'build
6329 (lambda _
6330 ;; XXX: Find a way to add all extra tools.
6331 (let ((tools '("gccdeps"
6332 "clang_compilation_database")))
6333 (invoke "python" "waf-light" "configure" "build"
6334 (string-append "--tools="
6335 (string-join tools ","))))))
6336 (replace 'check
6337 (lambda _
6338 (invoke "python" "waf" "--version")))
6339 (replace 'install
6340 (lambda* (#:key outputs #:allow-other-keys)
6341 (let ((out (assoc-ref outputs "out")))
6342 (install-file "waf" (string-append out "/bin")))
6343 #t))
6344 ;; waf breaks when it is wrapped.
6345 (delete 'wrap))))
6346 (home-page "https://waf.io/")
6347 (synopsis "Python-based build system")
6348 (description
6349 "Waf is a Python-based framework for configuring, compiling and installing
6350 applications.")
6351 (license license:bsd-3)))
6352
6353 (define-public python2-waf
6354 (package-with-python2 python-waf))
6355
6356 (define-public python-pyzmq
6357 (package
6358 (name "python-pyzmq")
6359 (version "17.1.2")
6360 (source
6361 (origin
6362 (method url-fetch)
6363 (uri (pypi-uri "pyzmq" version))
6364 (sha256
6365 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6366 (build-system python-build-system)
6367 (arguments
6368 `(#:configure-flags
6369 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6370 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6371 ;; --inplace' for 'python setup.py test' to work.
6372 #:tests? #f))
6373 (inputs
6374 `(("zeromq" ,zeromq)))
6375 (native-inputs
6376 `(("pkg-config" ,pkg-config)
6377 ("python-nose" ,python-nose)))
6378 (home-page "https://github.com/zeromq/pyzmq")
6379 (synopsis "Python bindings for 0MQ")
6380 (description
6381 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6382 (license license:bsd-4)))
6383
6384 (define-public python2-pyzmq
6385 (package-with-python2 python-pyzmq))
6386
6387 (define-public python-pep8
6388 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6389 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6390 ;; some dependents' test suites, and nothing more.
6391 (package
6392 (name "python-pep8")
6393 (version "1.7.0")
6394 (source
6395 (origin
6396 (method url-fetch)
6397 (uri (pypi-uri "pep8" version))
6398 (sha256
6399 (base32
6400 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
6401 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
6402 (build-system python-build-system)
6403 (home-page "https://pep8.readthedocs.org/")
6404 (synopsis "Python style guide checker")
6405 (description
6406 "This tools checks Python code against some of the style conventions in
6407 PEP 8.")
6408 (license license:expat)))
6409
6410 (define-public python2-pep8
6411 (package-with-python2 python-pep8))
6412
6413 (define-public python-pyflakes
6414 (package
6415 (name "python-pyflakes")
6416 (version "2.1.1")
6417 (source
6418 (origin
6419 (method url-fetch)
6420 (uri (pypi-uri "pyflakes" version))
6421 (sha256
6422 (base32
6423 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
6424 (build-system python-build-system)
6425 (home-page
6426 "https://github.com/pyflakes/pyflakes")
6427 (synopsis "Passive checker of Python programs")
6428 (description
6429 "Pyflakes statically checks Python source code for common errors.")
6430 (license license:expat)))
6431
6432 (define-public python2-pyflakes
6433 (package-with-python2 python-pyflakes))
6434
6435 (define-public python-mccabe
6436 (package
6437 (name "python-mccabe")
6438 (version "0.6.1")
6439 (source
6440 (origin
6441 (method url-fetch)
6442 (uri (pypi-uri "mccabe" version))
6443 (sha256
6444 (base32
6445 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6446 (build-system python-build-system)
6447 (native-inputs
6448 `(("python-pytest" ,python-pytest-bootstrap)
6449 ("python-pytest-runner" ,python-pytest-runner)))
6450 (home-page "https://github.com/flintwork/mccabe")
6451 (synopsis "McCabe checker, plugin for flake8")
6452 (description
6453 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6454 complexity of Python source code.")
6455 (license license:expat)))
6456
6457 (define-public python2-mccabe
6458 (package-with-python2 python-mccabe))
6459
6460 (define-public python-mccabe-0.2.1
6461 (package (inherit python-mccabe)
6462 (version "0.2.1")
6463 (source
6464 (origin
6465 (method url-fetch)
6466 (uri (pypi-uri "mccabe" version))
6467 (sha256
6468 (base32
6469 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6470
6471 (define-public python2-mccabe-0.2.1
6472 (package-with-python2 python-mccabe-0.2.1))
6473
6474 ;; Flake8 2.4.1 requires an older version of pep8.
6475 ;; This should be removed ASAP.
6476 (define-public python-pep8-1.5.7
6477 (package (inherit python-pep8)
6478 (version "1.5.7")
6479 (source
6480 (origin
6481 (method url-fetch)
6482 (uri (pypi-uri "pep8" version))
6483 (sha256
6484 (base32
6485 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6486 (arguments
6487 ;; XXX Tests not compatible with Python 3.5.
6488 '(#:tests? #f))))
6489
6490 (define-public python2-pep8-1.5.7
6491 (package-with-python2 python-pep8-1.5.7))
6492
6493 ;; Flake8 2.4.1 requires an older version of pyflakes.
6494 ;; This should be removed ASAP.
6495 (define-public python-pyflakes-0.8.1
6496 (package (inherit python-pyflakes)
6497 (version "0.8.1")
6498 (source
6499 (origin
6500 (method url-fetch)
6501 (uri (pypi-uri "pyflakes" version))
6502 (sha256
6503 (base32
6504 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6505 (arguments
6506 ;; XXX Tests not compatible with Python 3.5.
6507 '(#:tests? #f))))
6508
6509 (define-public python2-pyflakes-0.8.1
6510 (package-with-python2 python-pyflakes-0.8.1))
6511
6512 (define-public python-flake8
6513 (package
6514 (name "python-flake8")
6515 (version "3.7.7")
6516 (source (origin
6517 (method url-fetch)
6518 (uri (pypi-uri "flake8" version))
6519 (sha256
6520 (base32
6521 "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5"))))
6522 (build-system python-build-system)
6523 (arguments
6524 `(#:phases
6525 (modify-phases %standard-phases
6526 (delete 'check)
6527 (add-after 'install 'check
6528 (lambda* (#:key inputs outputs #:allow-other-keys)
6529 (add-installed-pythonpath inputs outputs)
6530 (invoke "pytest" "-v")
6531 #t)))))
6532 (propagated-inputs
6533 `(("python-pycodestyle" ,python-pycodestyle)
6534 ("python-entrypoints" ,python-entrypoints)
6535 ("python-pyflakes" ,python-pyflakes)
6536 ("python-mccabe" ,python-mccabe)))
6537 (native-inputs
6538 `(("python-mock" ,python-mock)
6539 ("python-pytest" ,python-pytest-bootstrap)
6540 ("python-pytest-runner" ,python-pytest-runner)))
6541 (home-page "https://gitlab.com/pycqa/flake8")
6542 (synopsis
6543 "The modular source code checker: pep8, pyflakes and co")
6544 (description
6545 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6546 (properties `((python2-variant . ,(delay python2-flake8))))
6547 (license license:expat)))
6548
6549 (define-public python2-flake8
6550 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
6551 (package (inherit base)
6552 (propagated-inputs
6553 `(("python2-configparser" ,python2-configparser)
6554 ("python2-enum34" ,python2-enum34)
6555 ("python2-typing" ,python2-typing)
6556 ,@(package-propagated-inputs base))))))
6557
6558 ;; python-hacking requires flake8 <2.6.0.
6559 (define-public python-flake8-2.5
6560 (package
6561 (inherit python-flake8)
6562 (version "2.5.5")
6563 (source (origin
6564 (method url-fetch)
6565 (uri (pypi-uri "flake8" version))
6566 (sha256
6567 (base32
6568 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6569 (propagated-inputs
6570 `(("python-pep8" ,python-pep8)
6571 ,@(package-propagated-inputs python-flake8)))
6572 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6573
6574 (define-public python2-flake8-2.5
6575 (package
6576 (inherit python2-flake8)
6577 (version (package-version python-flake8-2.5))
6578 (source (origin
6579 (inherit (package-source python-flake8-2.5))))
6580 (propagated-inputs
6581 `(("python2-pep8" ,python2-pep8)
6582 ,@(package-propagated-inputs python2-flake8)))))
6583
6584 (define-public python-flake8-polyfill
6585 (package
6586 (name "python-flake8-polyfill")
6587 (version "1.0.2")
6588 (source
6589 (origin
6590 (method url-fetch)
6591 (uri (pypi-uri "flake8-polyfill" version))
6592 (sha256
6593 (base32
6594 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6595 (build-system python-build-system)
6596 (arguments
6597 '(#:phases
6598 (modify-phases %standard-phases
6599 (replace 'check
6600 (lambda _
6601 ;; Be compatible with Pytest 4:
6602 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
6603 (substitute* "setup.cfg"
6604 (("\\[pytest\\]")
6605 "[tool:pytest]"))
6606
6607 (setenv "PYTHONPATH"
6608 (string-append (getcwd) "/build/lib:"
6609 (getenv "PYTHONPATH")))
6610 (invoke "py.test" "-v"))))))
6611 (native-inputs
6612 `(("python-flake8" ,python-flake8)
6613 ("python-mock" ,python-mock)
6614 ("python-pep8" ,python-pep8)
6615 ("python-pycodestyle" ,python-pycodestyle)
6616 ("python-pytest" ,python-pytest)))
6617 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6618 (synopsis "Polyfill package for Flake8 plugins")
6619 (description
6620 "This package that provides some compatibility helpers for Flake8
6621 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6622 (license license:expat)))
6623
6624 (define-public python2-flake8-polyfill
6625 (package-with-python2 python-flake8-polyfill))
6626
6627 (define-public python-mistune
6628 (package
6629 (name "python-mistune")
6630 (version "0.8.4")
6631 (source
6632 (origin
6633 (method url-fetch)
6634 (uri (pypi-uri "mistune" version))
6635 (sha256
6636 (base32
6637 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6638 (build-system python-build-system)
6639 (native-inputs
6640 `(("python-nose" ,python-nose)
6641 ("python-cython" ,python-cython)))
6642 (home-page "https://github.com/lepture/mistune")
6643 (synopsis "Markdown parser in pure Python")
6644 (description "This package provides a fast markdown parser in pure
6645 Python.")
6646 (license license:bsd-3)))
6647
6648 (define-public python2-mistune
6649 (package-with-python2 python-mistune))
6650
6651 (define-public python-markdown
6652 (package
6653 (name "python-markdown")
6654 (version "3.1.1")
6655 (source
6656 (origin
6657 (method url-fetch)
6658 (uri (pypi-uri "Markdown" version))
6659 (sha256
6660 (base32
6661 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f"))))
6662 (build-system python-build-system)
6663 (native-inputs
6664 `(("python-nose" ,python-nose)
6665 ("python-pyyaml" ,python-pyyaml)))
6666 (home-page "https://python-markdown.github.io/")
6667 (synopsis "Python implementation of Markdown")
6668 (description
6669 "This package provides a Python implementation of John Gruber's
6670 Markdown. The library features international input, various Markdown
6671 extensions, and several HTML output formats. A command line wrapper
6672 markdown_py is also provided to convert Markdown files to HTML.")
6673 (license license:bsd-3)))
6674
6675 (define-public python2-markdown
6676 (package-with-python2 python-markdown))
6677
6678 (define-public python-ptyprocess
6679 (package
6680 (name "python-ptyprocess")
6681 (version "0.5.2")
6682 (source
6683 (origin
6684 (method url-fetch)
6685 (uri (pypi-uri "ptyprocess" version))
6686 (sha256
6687 (base32
6688 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6689 (build-system python-build-system)
6690 (native-inputs
6691 `(("python-nose" ,python-nose)))
6692 (arguments
6693 `(#:phases
6694 (modify-phases %standard-phases
6695 (replace 'check
6696 (lambda _ (invoke "nosetests"))))))
6697 (home-page "https://github.com/pexpect/ptyprocess")
6698 (synopsis "Run a subprocess in a pseudo terminal")
6699 (description
6700 "This package provides a Python library used to launch a subprocess in a
6701 pseudo terminal (pty), and interact with both the process and its pty.")
6702 (license license:isc)))
6703
6704 (define-public python2-ptyprocess
6705 (package-with-python2 python-ptyprocess))
6706
6707 (define-public python-cram
6708 (package
6709 (name "python-cram")
6710 (version "0.7")
6711 (home-page "https://bitheap.org/cram/")
6712 (source (origin
6713 (method url-fetch)
6714 (uri (list (string-append home-page "cram-"
6715 version ".tar.gz")
6716 (pypi-uri "cram" version)))
6717 (sha256
6718 (base32
6719 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6720 (arguments
6721 '(#:phases
6722 (modify-phases %standard-phases
6723 (add-after 'unpack 'patch-source
6724 (lambda _
6725 (substitute* (find-files "cram" ".*\\.py$")
6726 ;; Replace default shell path.
6727 (("/bin/sh") (which "sh")))
6728 (substitute* (find-files "tests" ".*\\.t$")
6729 (("md5") "md5sum")
6730 (("/bin/bash") (which "bash"))
6731 (("/bin/sh") (which "sh")))
6732 (substitute* "cram/_test.py"
6733 ;; This hack works around a bug triggered by substituting
6734 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6735 ;; "cram -h", which breaks the output at 80 characters. This
6736 ;; causes the line showing the default shell to break into two
6737 ;; lines, but the test expects a single line...
6738 (("env\\['COLUMNS'\\] = '80'")
6739 "env['COLUMNS'] = '160'"))
6740
6741 (substitute* "Makefile"
6742 ;; Recent versions of python-coverage have caused the test
6743 ;; coverage to decrease (as of version 0.7). Allow that.
6744 (("--fail-under=100")
6745 "--fail-under=90"))
6746
6747 #t))
6748 (replace 'check
6749 ;; The test phase uses the built library and executable.
6750 (lambda* (#:key inputs outputs #:allow-other-keys)
6751 (add-installed-pythonpath inputs outputs)
6752 (setenv "PATH" (string-append (getenv "PATH") ":"
6753 (assoc-ref outputs "out") "/bin"))
6754 (invoke "make" "test"))))))
6755 (build-system python-build-system)
6756 (native-inputs
6757 `(("python-coverage" ,python-coverage)
6758 ("which" ,which)))
6759 (synopsis "Simple testing framework for command line applications")
6760 (description
6761 "Cram is a functional testing framework for command line applications.
6762 Cram tests look like snippets of interactive shell sessions. Cram runs each
6763 command and compares the command output in the test with the command’s actual
6764 output.")
6765 (license license:gpl2+)))
6766
6767 (define-public python2-cram
6768 (package-with-python2 python-cram))
6769
6770 (define-public python-straight-plugin
6771 (package
6772 (name "python-straight-plugin")
6773 (version "1.4.1")
6774 (source
6775 (origin
6776 (method url-fetch)
6777 (uri (pypi-uri "straight.plugin" version))
6778 (sha256
6779 (base32
6780 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6781 (build-system python-build-system)
6782 (home-page "https://github.com/ironfroggy/straight.plugin")
6783 (synopsis "Simple namespaced plugin facility")
6784 (description "Straight Plugin provides a type of plugin you can create from
6785 almost any existing Python modules, and an easy way for outside developers to
6786 add functionality and customization to your projects with their own plugins.")
6787 (license license:expat)))
6788
6789 (define-public python2-straight-plugin
6790 (package-with-python2 python-straight-plugin))
6791
6792 (define-public python-fonttools
6793 (package
6794 (name "python-fonttools")
6795 (version "3.38.0")
6796 (source (origin
6797 (method url-fetch)
6798 (uri (pypi-uri "fonttools" version ".zip"))
6799 (sha256
6800 (base32
6801 "12ripk3s7skgxr1bs9r8n13r94ym3s8iir7ivfixls9fa4dabmlh"))))
6802 (build-system python-build-system)
6803 (native-inputs
6804 `(("unzip" ,unzip)
6805 ("python-pytest" ,python-pytest)
6806 ("python-pytest-runner" ,python-pytest-runner)))
6807 (home-page "https://github.com/fonttools/fonttools")
6808 (synopsis "Tools to manipulate font files")
6809 (description
6810 "FontTools/TTX is a library to manipulate font files from Python. It
6811 supports reading and writing of TrueType/OpenType fonts, reading and writing
6812 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6813 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6814 from an XML-based format.")
6815 (license license:expat)))
6816
6817 (define-public python2-fonttools
6818 (package-with-python2 python-fonttools))
6819
6820 (define-public python-ly
6821 (package
6822 (name "python-ly")
6823 (version "0.9.5")
6824 (source
6825 (origin
6826 (method url-fetch)
6827 (uri (pypi-uri name version))
6828 (sha256
6829 (base32
6830 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6831 (build-system python-build-system)
6832 (arguments
6833 ;; FIXME: Some tests need network access.
6834 '(#:tests? #f))
6835 (synopsis "Tool and library for manipulating LilyPond files")
6836 (description "This package provides a Python library to parse, manipulate
6837 or create documents in LilyPond format. A command line program ly is also
6838 provided that can be used to do various manipulations with LilyPond files.")
6839 (home-page "https://pypi.python.org/pypi/python-ly")
6840 (license license:gpl2+)))
6841
6842 (define-public python-appdirs
6843 (package
6844 (name "python-appdirs")
6845 (version "1.4.3")
6846 (source
6847 (origin
6848 (method url-fetch)
6849 (uri (pypi-uri "appdirs" version))
6850 (sha256
6851 (base32
6852 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6853 (build-system python-build-system)
6854 (home-page "https://github.com/ActiveState/appdirs")
6855 (synopsis
6856 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6857 (description
6858 "This module provides a portable way of finding out where user data
6859 should be stored on various operating systems.")
6860 (license license:expat)))
6861
6862 (define-public python2-appdirs
6863 (package-with-python2 python-appdirs))
6864
6865 (define-public python-llfuse
6866 (package
6867 (name "python-llfuse")
6868 (version "1.3.5")
6869 (source (origin
6870 (method url-fetch)
6871 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6872 (sha256
6873 (base32
6874 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6875 (build-system python-build-system)
6876 (inputs
6877 `(("fuse" ,fuse)
6878 ("attr" ,attr)))
6879 (native-inputs
6880 `(("pkg-config" ,pkg-config)))
6881 (synopsis "Python bindings for FUSE")
6882 (description
6883 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6884 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6885 (license license:lgpl2.0+)
6886 (properties `((python2-variant . ,(delay python2-llfuse))))))
6887
6888 (define-public python2-llfuse
6889 (package (inherit (package-with-python2
6890 (strip-python2-variant python-llfuse)))
6891 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6892
6893 ;; For attic-0.16
6894 (define-public python-llfuse-0.41
6895 (package (inherit python-llfuse)
6896 (version "0.41.1")
6897 (source (origin
6898 (method url-fetch)
6899 (uri (string-append
6900 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6901 "llfuse-" version ".tar.bz2"))
6902 (sha256
6903 (base32
6904 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6905 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6906 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6907 (license (list license:expat license:lgpl2.0+))))
6908
6909 (define-public python-msgpack
6910 (package
6911 (name "python-msgpack")
6912 (version "0.5.6")
6913 (source (origin
6914 (method url-fetch)
6915 (uri (pypi-uri "msgpack" version))
6916 (sha256
6917 (base32
6918 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6919 (build-system python-build-system)
6920 (arguments
6921 `(#:modules ((guix build utils)
6922 (guix build python-build-system)
6923 (ice-9 ftw)
6924 (srfi srfi-1)
6925 (srfi srfi-26))
6926 #:phases
6927 (modify-phases %standard-phases
6928 (replace 'check
6929 (lambda _
6930 (let ((cwd (getcwd)))
6931 (setenv "PYTHONPATH"
6932 (string-append cwd "/build/"
6933 (find (cut string-prefix? "lib" <>)
6934 (scandir (string-append cwd "/build")))
6935 ":"
6936 (getenv "PYTHONPATH")))
6937 (invoke "pytest" "-v" "test")))))))
6938 (native-inputs
6939 `(("python-pytest" ,python-pytest)))
6940 (synopsis "MessagePack (de)serializer")
6941 (description "MessagePack is a fast, compact binary serialization format,
6942 suitable for similar data to JSON. This package provides CPython bindings for
6943 reading and writing MessagePack data.")
6944 (home-page "https://pypi.python.org/pypi/msgpack/")
6945 (license license:asl2.0)))
6946
6947 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6948 ;; release 0.5. Some packages like borg still call it by the old name for now.
6949 ;; <https://bugs.gnu.org/30662>
6950 (define-public python-msgpack-transitional
6951 (package
6952 (inherit python-msgpack)
6953 (name "python-msgpack-transitional")
6954 (arguments
6955 (substitute-keyword-arguments (package-arguments python-msgpack)
6956 ((#:phases phases)
6957 `(modify-phases ,phases
6958 (add-after 'unpack 'configure-transitional
6959 (lambda _
6960 ;; Keep using the old name.
6961 (substitute* "setup.py"
6962 (("TRANSITIONAL = False")
6963 "TRANSITIONAL = 1"))
6964 #t))))))))
6965
6966 (define-public python2-msgpack
6967 (package-with-python2 python-msgpack))
6968
6969 (define-public python-netaddr
6970 (package
6971 (name "python-netaddr")
6972 (version "0.7.19")
6973 (source
6974 (origin
6975 (method url-fetch)
6976 (uri (pypi-uri "netaddr" version))
6977 (sha256
6978 (base32
6979 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6980 (build-system python-build-system)
6981 (arguments `(#:tests? #f)) ;; No tests.
6982 (home-page "https://github.com/drkjam/netaddr/")
6983 (synopsis "Pythonic manipulation of network addresses")
6984 (description
6985 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6986 and MAC network addresses.")
6987 (license license:bsd-3)))
6988
6989 (define-public python2-netaddr
6990 (package-with-python2 python-netaddr))
6991
6992 (define-public python2-pyroute2
6993 (package
6994 (name "python2-pyroute2")
6995 (version "0.5.6")
6996 (source
6997 (origin
6998 (method url-fetch)
6999 (uri (pypi-uri "pyroute2" version))
7000 (sha256
7001 (base32
7002 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
7003 (build-system python-build-system)
7004 (arguments
7005 `(#:python ,python-2)) ;Python 3.x is not supported
7006 (home-page "https://github.com/svinota/pyroute2")
7007 (synopsis "Python netlink library")
7008 (description
7009 "Pyroute2 is a pure Python netlink library with minimal dependencies.
7010 Supported netlink families and protocols include:
7011 @itemize
7012 @item rtnl, network settings - addresses, routes, traffic controls
7013 @item nfnetlink - netfilter API: ipset, nftables, ...
7014 @item ipq - simplest userspace packet filtering, iptables QUEUE target
7015 @item devlink - manage and monitor devlink-enabled hardware
7016 @item generic - generic netlink families
7017 @itemize
7018 @item nl80211 - wireless functions API (basic support)
7019 @item taskstats - extended process statistics
7020 @item acpi_events - ACPI events monitoring
7021 @item thermal_events - thermal events monitoring
7022 @item VFS_DQUOT - disk quota events monitoring
7023 @end itemize
7024 @end itemize")
7025 (license license:gpl2+)))
7026
7027 (define-public python-wrapt
7028 (package
7029 (name "python-wrapt")
7030 (version "1.11.2")
7031 (source
7032 (origin
7033 (method url-fetch)
7034 (uri (pypi-uri "wrapt" version))
7035 (sha256
7036 (base32
7037 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
7038 (build-system python-build-system)
7039 (arguments
7040 ;; Tests are not included in the tarball, they are only available in the
7041 ;; git repository.
7042 `(#:tests? #f))
7043 (home-page "https://github.com/GrahamDumpleton/wrapt")
7044 (synopsis "Module for decorators, wrappers and monkey patching")
7045 (description
7046 "The aim of the wrapt module is to provide a transparent object proxy for
7047 Python, which can be used as the basis for the construction of function
7048 wrappers and decorator functions.")
7049 (license license:bsd-2)))
7050
7051 (define-public python2-wrapt
7052 (package-with-python2 python-wrapt))
7053
7054 (define-public python-xlrd
7055 (package
7056 (name "python-xlrd")
7057 (version "1.2.0")
7058 (source (origin
7059 (method url-fetch)
7060 (uri (pypi-uri "xlrd" version))
7061 (sha256
7062 (base32
7063 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
7064 (build-system python-build-system)
7065 (arguments
7066 `(#:phases
7067 (modify-phases %standard-phases
7068 ;; Some tests depend on writing a temporary file to the user's home
7069 ;; directory.
7070 (add-after 'unpack 'fix-tests
7071 (lambda _
7072 (delete-file "tests/test_open_workbook.py")
7073 #t)))))
7074 (home-page "http://www.python-excel.org/")
7075 (synopsis "Library for extracting data from Excel files")
7076 (description "This package provides a library to extract data from
7077 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7078 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7079 Unicode-aware. It is not intended as an end-user tool.")
7080 (license license:bsd-3)))
7081
7082 (define-public python2-xlrd
7083 (package-with-python2 python-xlrd))
7084
7085 (define-public python-prettytable
7086 (package
7087 (name "python-prettytable")
7088 (version "0.7.2")
7089 (source
7090 (origin
7091 (method url-fetch)
7092 (uri (pypi-uri "prettytable" version ".tar.bz2"))
7093 (sha256
7094 (base32
7095 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7096 (build-system python-build-system)
7097 (home-page "http://code.google.com/p/prettytable/")
7098 (synopsis "Display tabular data in an ASCII table format")
7099 (description
7100 "A library designed to represent tabular data in visually appealing ASCII
7101 tables. PrettyTable allows for selection of which columns are to be printed,
7102 independent alignment of columns (left or right justified or centred) and
7103 printing of sub-tables by specifying a row range.")
7104 (license license:bsd-3)))
7105
7106 (define-public python2-prettytable
7107 (package-with-python2 python-prettytable))
7108
7109 (define-public python-tables
7110 (package
7111 (name "python-tables")
7112 (version "3.4.4")
7113 (source
7114 (origin
7115 (method url-fetch)
7116 (uri (pypi-uri "tables" version))
7117 (sha256
7118 (base32
7119 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7120 (modules '((guix build utils)))
7121 (snippet
7122 '(begin
7123 ;; Remove pre-compiled .pyc files from source.
7124 (for-each delete-file-recursively
7125 (find-files "." "__pycache__" #:directories? #t))
7126 (for-each delete-file (find-files "." "\\.pyc$"))
7127 #t))))
7128 (build-system python-build-system)
7129 (arguments
7130 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7131 ;; or "check", so we must override the build and check phases.
7132 #:phases
7133 (modify-phases %standard-phases
7134 (add-after 'unpack 'use-gcc
7135 (lambda _
7136 (substitute* "setup.py"
7137 (("compiler = new_compiler\\(\\)" line)
7138 (string-append line
7139 "\ncompiler.set_executables(compiler='gcc',"
7140 "compiler_so='gcc',"
7141 "linker_exe='gcc',"
7142 "linker_so='gcc -shared')")))
7143 #t))
7144 (replace 'build
7145 (lambda* (#:key inputs #:allow-other-keys)
7146 (invoke "python" "setup.py" "build"
7147 (string-append "--hdf5="
7148 (assoc-ref inputs "hdf5")))))
7149 (replace 'check
7150 (lambda* (#:key inputs #:allow-other-keys)
7151 (invoke "python" "setup.py" "check"
7152 (string-append "--hdf5="
7153 (assoc-ref inputs "hdf5"))))))))
7154 (propagated-inputs
7155 `(("python-numexpr" ,python-numexpr)
7156 ("python-numpy" ,python-numpy)))
7157 (native-inputs
7158 `(("python-cython" ,python-cython)
7159 ("pkg-config" ,pkg-config)))
7160 (inputs
7161 `(("hdf5" ,hdf5)
7162 ("bzip2" ,bzip2)
7163 ("zlib" ,zlib)))
7164 (home-page "http://www.pytables.org/")
7165 (synopsis "Hierarchical datasets for Python")
7166 (description "PyTables is a package for managing hierarchical datasets and
7167 designed to efficiently cope with extremely large amounts of data.")
7168 (license license:bsd-3)))
7169
7170 (define-public python2-tables
7171 (package-with-python2 python-tables))
7172
7173 (define-public python-pyasn1
7174 (package
7175 (name "python-pyasn1")
7176 (version "0.4.3")
7177 (source
7178 (origin
7179 (method url-fetch)
7180 (uri (pypi-uri "pyasn1" version))
7181 (sha256
7182 (base32
7183 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7184 (build-system python-build-system)
7185 (home-page "http://pyasn1.sourceforge.net/")
7186 (synopsis "ASN.1 types and codecs")
7187 (description
7188 "This is an implementation of ASN.1 types and codecs in Python. It is
7189 suitable for a wide range of protocols based on the ASN.1 specification.")
7190 (license license:bsd-2)))
7191
7192 (define-public python2-pyasn1
7193 (package-with-python2 python-pyasn1))
7194
7195 (define-public python-pyasn1-modules
7196 (package
7197 (name "python-pyasn1-modules")
7198 (version "0.2.2")
7199 (source
7200 (origin
7201 (method url-fetch)
7202 (uri (pypi-uri "pyasn1-modules" version))
7203 (sha256
7204 (base32
7205 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7206 (build-system python-build-system)
7207 (propagated-inputs
7208 `(("python-pyasn1" ,python-pyasn1)))
7209 (home-page "https://sourceforge.net/projects/pyasn1/")
7210 (synopsis "ASN.1 codec implementations")
7211 (description
7212 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7213 implementations of ASN.1-based codecs and protocols.")
7214 (license license:bsd-3)))
7215
7216 (define-public python2-pyasn1-modules
7217 (package-with-python2 python-pyasn1-modules))
7218
7219 (define-public python-ipaddress
7220 (package
7221 (name "python-ipaddress")
7222 (version "1.0.22")
7223 (source (origin
7224 (method url-fetch)
7225 (uri (pypi-uri "ipaddress" version))
7226 (sha256
7227 (base32
7228 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7229 (build-system python-build-system)
7230 (home-page "https://github.com/phihag/ipaddress")
7231 (synopsis "IP address manipulation library")
7232 (description
7233 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7234 in Python. This library is used to create, poke at, and manipulate IPv4 and
7235 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7236 module to older versions of Python.")
7237 (license license:psfl)))
7238
7239 (define-public python2-ipaddress
7240 (package-with-python2 python-ipaddress))
7241
7242 (define-public python2-ipaddr
7243 (package
7244 (name "python2-ipaddr")
7245 (version "2.1.11")
7246 (source
7247 (origin
7248 (method url-fetch)
7249 (uri (pypi-uri "ipaddr" version))
7250 (sha256
7251 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7252 (build-system python-build-system)
7253 (arguments
7254 `(#:python ,python-2 ;version 2 only
7255 #:phases
7256 (modify-phases %standard-phases
7257 (replace 'check
7258 (lambda _ (invoke "python" "ipaddr_test.py"))))))
7259 (home-page "https://github.com/google/ipaddr-py")
7260 (synopsis "IP address manipulation library")
7261 (description
7262 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7263 IPv6 addresses and networks.
7264
7265 For new implementations you may prefer to use the standard module
7266 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
7267 versions of Python.")
7268 (license license:asl2.0)))
7269
7270 (define-public python-idna
7271 (package
7272 (name "python-idna")
7273 (version "2.8")
7274 (source
7275 (origin
7276 (method url-fetch)
7277 (uri (pypi-uri "idna" version))
7278 (sha256
7279 (base32
7280 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
7281 (build-system python-build-system)
7282 (home-page "https://github.com/kjd/idna")
7283 (synopsis "Internationalized domain names in applications")
7284 (description
7285 "This is a library to support the Internationalised Domain Names in
7286 Applications (IDNA) protocol as specified in RFC 5891. This version of the
7287 protocol is often referred to as “IDNA2008” and can produce different results
7288 from the earlier standard from 2003. The library is also intended to act as a
7289 suitable drop-in replacement for the “encodings.idna” module that comes with
7290 the Python standard library but currently only supports the older 2003
7291 specification.")
7292 (license license:bsd-4)))
7293
7294 (define-public python-idna-2.7
7295 (package (inherit python-idna)
7296 (version "2.7")
7297 (source (origin
7298 (method url-fetch)
7299 (uri (pypi-uri "idna" version))
7300 (sha256
7301 (base32
7302 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7303
7304
7305 (define-public python2-idna
7306 (package-with-python2 python-idna))
7307
7308 (define-public python-idna-ssl
7309 (package
7310 (name "python-idna-ssl")
7311 (version "1.0.1")
7312 (source
7313 (origin
7314 (method url-fetch)
7315 (uri (pypi-uri "idna-ssl" version))
7316 (sha256
7317 (base32
7318 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7319 (build-system python-build-system)
7320 (arguments
7321 `(#:tests? #f)) ;circular dependency with python-aiohttp
7322 (home-page "https://github.com/aio-libs/idna-ssl")
7323 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7324 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7325 domains support.")
7326 (license license:expat)))
7327
7328 (define-public python-pretend
7329 (package
7330 (name "python-pretend")
7331 (version "1.0.9")
7332 (source
7333 (origin
7334 (method url-fetch)
7335 (uri (pypi-uri "pretend" version))
7336 (sha256
7337 (base32
7338 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7339 (build-system python-build-system)
7340 (home-page "https://github.com/alex/pretend")
7341 (synopsis "Library for stubbing in Python")
7342 (description
7343 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7344 technique for writing tests. You may hear the term mixed up with mocks,
7345 fakes, or doubles. Basically, a stub is an object that returns pre-canned
7346 responses, rather than doing any computation.")
7347 (license license:bsd-3)))
7348
7349 (define-public python2-pretend
7350 (package-with-python2 python-pretend))
7351
7352 (define-public python-pip
7353 (package
7354 (name "python-pip")
7355 (version "19.2.1")
7356 (source
7357 (origin
7358 (method url-fetch)
7359 (uri (pypi-uri "pip" version))
7360 (sha256
7361 (base32
7362 "100sd12ss4mbdj5lf3wawad29cm573b27765mq098x6xhcj71395"))))
7363 (build-system python-build-system)
7364 (arguments
7365 '(#:tests? #f)) ; there are no tests in the pypi archive.
7366 (home-page "https://pip.pypa.io/")
7367 (synopsis "Package manager for Python software")
7368 (description
7369 "Pip is a package manager for Python software, that finds packages on the
7370 Python Package Index (PyPI).")
7371 (license license:expat)))
7372
7373 (define-public python2-pip
7374 (package-with-python2 python-pip))
7375
7376 (define-public python-tlsh
7377 (package
7378 (name "python-tlsh")
7379 (version "3.4.5")
7380 (home-page "https://github.com/trendmicro/tlsh")
7381 (source
7382 (origin
7383 (method git-fetch)
7384 (uri (git-reference
7385 (url "https://github.com/trendmicro/tlsh.git")
7386 (commit (string-append "v" version))))
7387 (file-name (git-file-name name version))
7388 (sha256
7389 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
7390 (build-system cmake-build-system)
7391 (arguments
7392 '(#:out-of-source? #f
7393 #:phases (modify-phases %standard-phases
7394 (replace
7395 'install
7396 (lambda* (#:key outputs #:allow-other-keys)
7397 ;; Build and install the Python bindings. The underlying
7398 ;; C++ library is apparently not meant to be installed.
7399 (let ((out (assoc-ref outputs "out")))
7400 (with-directory-excursion "py_ext"
7401 (and (system* "python" "setup.py" "build")
7402 (system* "python" "setup.py" "install"
7403 (string-append "--prefix=" out))))))))))
7404 (inputs `(("python" ,python-wrapper))) ;for the bindings
7405 (synopsis "Fuzzy matching library for Python")
7406 (description
7407 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7408 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7409 value which can be used for similarity comparisons. Similar objects have
7410 similar hash values, which allows for the detection of similar objects by
7411 comparing their hash values. The byte stream should have a sufficient amount
7412 of complexity; for example, a byte stream of identical bytes will not generate
7413 a hash value.")
7414 (license license:asl2.0)))
7415
7416 (define-public python2-tlsh
7417 (package
7418 (inherit python-tlsh)
7419 (name "python2-tlsh")
7420 (inputs `(("python" ,python-2)))))
7421
7422 (define-public python-termcolor
7423 (package
7424 (name "python-termcolor")
7425 (version "1.1.0")
7426 (source
7427 (origin
7428 (method url-fetch)
7429 (uri (pypi-uri "termcolor" version))
7430 (sha256
7431 (base32
7432 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7433 (build-system python-build-system)
7434 (arguments
7435 ;; There are no tests.
7436 `(#:tests? #f))
7437 (home-page "https://pypi.python.org/pypi/termcolor")
7438 (synopsis "ANSII Color formatting for terminal output")
7439 (description
7440 "This package provides ANSII Color formatting for output in terminals.")
7441 (license license:expat)))
7442
7443 (define-public python2-termcolor
7444 (package-with-python2 python-termcolor))
7445
7446 (define-public python-libarchive-c
7447 (package
7448 (name "python-libarchive-c")
7449 (version "2.8")
7450 (source (origin
7451 (method url-fetch)
7452 (uri (pypi-uri "libarchive-c" version))
7453 (sha256
7454 (base32
7455 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
7456 (build-system python-build-system)
7457 (arguments
7458 '(#:phases (modify-phases %standard-phases
7459 (add-before
7460 'build 'reference-libarchive
7461 (lambda* (#:key inputs #:allow-other-keys)
7462 ;; Retain the absolute file name of libarchive.so.
7463 (let ((libarchive (assoc-ref inputs "libarchive")))
7464 (substitute* "libarchive/ffi.py"
7465 (("find_library\\('archive'\\)")
7466 (string-append "'" libarchive
7467 "/lib/libarchive.so'"))))))
7468 (replace 'check
7469 (lambda _ (invoke "pytest" "-vv"))))))
7470 (native-inputs
7471 `(("python-mock" ,python-mock)
7472 ("python-pytest" ,python-pytest)))
7473 (inputs
7474 `(("libarchive" ,libarchive)))
7475 (home-page "https://github.com/Changaco/python-libarchive-c")
7476 (synopsis "Python interface to libarchive")
7477 (description
7478 "This package provides Python bindings to libarchive, a C library to
7479 access possibly compressed archives in many different formats. It uses
7480 Python's @code{ctypes} foreign function interface (FFI).")
7481 (license license:lgpl2.0+)))
7482
7483 (define-public python2-libarchive-c
7484 (package-with-python2 python-libarchive-c))
7485
7486 (define-public python-file
7487 (package
7488 (inherit file)
7489 (name "python-file")
7490 (build-system python-build-system)
7491 (arguments
7492 '(#:tests? #f ;no tests
7493 #:configure-flags '("--single-version-externally-managed" "--root=/")
7494 #:phases (modify-phases %standard-phases
7495 (add-before 'build 'change-directory
7496 (lambda _
7497 (chdir "python")
7498 #t))
7499 (add-before 'build 'set-library-file-name
7500 (lambda* (#:key inputs #:allow-other-keys)
7501 (let ((file (assoc-ref inputs "file")))
7502 (substitute* "magic.py"
7503 (("find_library\\('magic'\\)")
7504 (string-append "'" file "/lib/libmagic.so'")))
7505 #t))))))
7506 (inputs `(("file" ,file)))
7507 (native-inputs (if (%current-target-system)
7508 `(("self" ,this-package))
7509 '()))
7510 (synopsis "Python bindings to the libmagic file type guesser. Note that
7511 this module and the python-magic module both provide a \"magic.py\" file;
7512 these two modules, which are different and were developed separately, both
7513 serve the same purpose: provide Python bindings for libmagic.")))
7514
7515 (define-public python2-file
7516 (package-with-python2 python-file))
7517
7518 (define-public python-debian
7519 (package
7520 (name "python-debian")
7521 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
7522 (version "0.1.36")
7523 (source
7524 (origin
7525 ;; Use git-fetch, as pypi doesn't include test suite.
7526 (method git-fetch)
7527 (uri (git-reference
7528 (url home-page)
7529 (commit version)))
7530 (file-name (git-file-name name version))
7531 (sha256
7532 (base32
7533 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
7534 (build-system python-build-system)
7535 (arguments
7536 `(#:phases (modify-phases %standard-phases
7537 (add-after 'unpack 'remove-debian-specific-tests
7538 ;; python-apt, apt and dpkg are not yet available in guix,
7539 ;; and these tests heavily depend on them.
7540 (lambda _
7541 (delete-file "lib/debian/tests/test_deb822.py")
7542 (delete-file "lib/debian/tests/test_debfile.py")
7543 #t)))))
7544 (propagated-inputs
7545 `(("python-six" ,python-six)
7546 ("python-chardet" ,python-chardet)))
7547 (synopsis "Debian package related modules")
7548 (description
7549 ;; XXX: Use @enumerate instead of @itemize to work around
7550 ;; <http://bugs.gnu.org/21772>.
7551 "This package provides Python modules that abstract many formats of
7552 Debian-related files, such as:
7553
7554 @enumerate
7555 @item Debtags information;
7556 @item @file{debian/changelog} files;
7557 @item packages files, pdiffs;
7558 @item control files of single or multiple RFC822-style paragraphs---e.g.
7559 @file{debian/control}, @file{.changes}, @file{.dsc};
7560 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7561 contained files and meta-information.
7562 @end enumerate\n")
7563
7564 ;; Modules are either GPLv2+ or GPLv3+.
7565 (license license:gpl3+)))
7566
7567 (define-public python2-debian
7568 (package-with-python2 python-debian))
7569
7570 (define-public python-nbformat
7571 (package
7572 (name "python-nbformat")
7573 (version "4.4.0")
7574 (source
7575 (origin
7576 (method url-fetch)
7577 (uri (pypi-uri "nbformat" version))
7578 (sha256
7579 (base32
7580 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7581 (build-system python-build-system)
7582 (arguments `(#:tests? #f)) ; no test target
7583 (propagated-inputs
7584 `(("python-ipython-genutils" ,python-ipython-genutils)
7585 ("python-jsonschema" ,python-jsonschema)
7586 ("python-jupyter-core" ,python-jupyter-core)
7587 ("python-traitlets" ,python-traitlets)))
7588 (home-page "http://jupyter.org")
7589 (synopsis "Jupyter Notebook format")
7590 (description "This package provides the reference implementation of the
7591 Jupyter Notebook format and Python APIs for working with notebooks.")
7592 (license license:bsd-3)))
7593
7594 (define-public python2-nbformat
7595 (package-with-python2 python-nbformat))
7596
7597 (define-public python-bleach
7598 (package
7599 (name "python-bleach")
7600 (version "3.1.0")
7601 (source
7602 (origin
7603 (method url-fetch)
7604 (uri (pypi-uri "bleach" version))
7605 (sha256
7606 (base32
7607 "1yhrgrhkln8bd6gn3imj69g1h4xqah9gaz9q26crqr6gmmvpzprz"))))
7608 (build-system python-build-system)
7609 (propagated-inputs
7610 `(("python-webencodings" ,python-webencodings)
7611 ("python-six" ,python-six)))
7612 (native-inputs
7613 `(("python-pytest" ,python-pytest)
7614 ("python-pytest-runner" ,python-pytest-runner-2)))
7615 (home-page "https://github.com/jsocol/bleach")
7616 (synopsis "Whitelist-based HTML-sanitizing tool")
7617 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7618 (license license:asl2.0)))
7619
7620 (define-public python2-bleach
7621 (package-with-python2 python-bleach))
7622
7623 (define-public python-entrypoints
7624 (package
7625 (name "python-entrypoints")
7626 (version "0.3")
7627 (source
7628 (origin
7629 (method url-fetch)
7630 (uri (pypi-uri "entrypoints" version))
7631 (sha256
7632 (base32
7633 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
7634 (build-system python-build-system)
7635 ;; The package does not come with a setup.py file, so we have to generate
7636 ;; one ourselves.
7637 (arguments
7638 `(#:tests? #f
7639 #:phases
7640 (modify-phases %standard-phases
7641 (add-after 'unpack 'create-setup.py
7642 (lambda _
7643 (call-with-output-file "setup.py"
7644 (lambda (port)
7645 (format port "\
7646 from setuptools import setup
7647 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7648 " ,version))))))))
7649 (home-page "https://github.com/takluyver/entrypoints")
7650 (synopsis "Discover and load entry points from installed Python packages")
7651 (description "Entry points are a way for Python packages to advertise
7652 objects with some common interface. The most common examples are
7653 @code{console_scripts} entry points, which define shell commands by
7654 identifying a Python function to run. The @code{entrypoints} module contains
7655 functions to find and load entry points.")
7656 (license license:expat)))
7657
7658 (define-public python2-entrypoints
7659 (package-with-python2 python-entrypoints))
7660
7661 (define-public python-nbconvert
7662 (package
7663 (name "python-nbconvert")
7664 (version "5.0.0b1")
7665 (source
7666 (origin
7667 (method url-fetch)
7668 (uri (pypi-uri "nbconvert" version))
7669 (sha256
7670 (base32
7671 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7672 (build-system python-build-system)
7673 (arguments
7674 `(;; The "bdist_egg" target is disabled by default, causing the installation
7675 ;; to fail.
7676 #:configure-flags (list "bdist_egg")
7677 ;; FIXME: 5 failures, 40 errors.
7678 #:tests? #f))
7679 ;; #:phases
7680 ;; (modify-phases %standard-phases
7681 ;; (replace 'check
7682 ;; (lambda _
7683 ;; (zero? (system* "py.test" "-v")))))
7684 (native-inputs
7685 `(("python-pytest" ,python-pytest)))
7686 (propagated-inputs
7687 `(("python-bleach" ,python-bleach)
7688 ("python-entrypoints" ,python-entrypoints)
7689 ("python-jinja2" ,python-jinja2)
7690 ("python-jupyter-core" ,python-jupyter-core)
7691 ("python-mistune" ,python-mistune)
7692 ("python-nbformat" ,python-nbformat)
7693 ("python-pygments" ,python-pygments)
7694 ("python-traitlets" ,python-traitlets)))
7695 (home-page "http://jupyter.org")
7696 (synopsis "Converting Jupyter Notebooks")
7697 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7698 notebooks to various other formats via Jinja templates. It allows you to
7699 convert an @code{.ipynb} notebook file into various static formats including:
7700
7701 @enumerate
7702 @item HTML
7703 @item LaTeX
7704 @item PDF
7705 @item Reveal JS
7706 @item Markdown (md)
7707 @item ReStructured Text (rst)
7708 @item executable script
7709 @end enumerate\n")
7710 (license license:bsd-3)))
7711
7712 (define-public python2-nbconvert
7713 (package-with-python2 python-nbconvert))
7714
7715 (define-public python-notebook
7716 (package
7717 (name "python-notebook")
7718 (version "5.7.4")
7719 (source (origin
7720 (method url-fetch)
7721 (uri (pypi-uri "notebook" version))
7722 (sha256
7723 (base32
7724 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7725 (build-system python-build-system)
7726 (arguments
7727 `(#:phases
7728 (modify-phases %standard-phases
7729 (replace 'check
7730 (lambda _
7731 ;; These tests require a browser
7732 (delete-file-recursively "notebook/tests/selenium")
7733 ;; Some tests need HOME
7734 (setenv "HOME" "/tmp")
7735 ;; This file contains "warningfilters", which are not supported
7736 ;; by this version of nose.
7737 (delete-file "setup.cfg")
7738 (with-directory-excursion "/tmp"
7739 (invoke "nosetests" "-v"))
7740 #t)))))
7741 (propagated-inputs
7742 `(("python-jupyter-core" ,python-jupyter-core)
7743 ("python-nbformat" ,python-nbformat)
7744 ("python-nbconvert" ,python-nbconvert)
7745 ("python-prometheus-client" ,python-prometheus-client)
7746 ("python-send2trash" ,python-send2trash)
7747 ("python-terminado" ,python-terminado)))
7748 (native-inputs
7749 `(("python-nose" ,python-nose)
7750 ("python-sphinx" ,python-sphinx)
7751 ("python-requests" ,python-requests)))
7752 (home-page "http://jupyter.org/")
7753 (synopsis "Web-based notebook environment for interactive computing")
7754 (description
7755 "The Jupyter HTML notebook is a web-based notebook environment for
7756 interactive computing.")
7757 (properties `((python2-variant . ,(delay python2-notebook))))
7758 (license license:bsd-3)))
7759
7760 (define-public python2-notebook
7761 (let ((base (package-with-python2
7762 (strip-python2-variant python-notebook))))
7763 (package (inherit base)
7764 (native-inputs
7765 `(("python2-mock" ,python2-mock)
7766 ,@(package-native-inputs base)))
7767 (arguments
7768 (substitute-keyword-arguments (package-arguments base)
7769 ((#:phases phases)
7770 `(modify-phases ,phases
7771 (add-before 'check 'disable-test-case
7772 ;; The test requires network access to localhost. Curiously it
7773 ;; fails with Python 2 only. Simply make the test-case return
7774 ;; immediately.
7775 (lambda _
7776 (substitute*
7777 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7778 (("formats = self.nbconvert_api") "return #")))))))))))
7779
7780 (define-public python-widgetsnbextension
7781 (package
7782 (name "python-widgetsnbextension")
7783 (version "3.4.2")
7784 (source
7785 (origin
7786 (method url-fetch)
7787 (uri (pypi-uri "widgetsnbextension" version))
7788 (sha256
7789 (base32
7790 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7791 (build-system python-build-system)
7792 (propagated-inputs
7793 `(("python-ipykernel" ,python-ipykernel)
7794 ("python-notebook" ,python-notebook)))
7795 (native-inputs
7796 `(("python-certifi" ,python-certifi)
7797 ("python-nose" ,python-nose)))
7798 (home-page "https://ipython.org")
7799 (synopsis "IPython HTML widgets for Jupyter")
7800 (description "This package provides interactive HTML widgets for Jupyter
7801 notebooks.")
7802 (license license:bsd-3)))
7803
7804 (define-public python2-widgetsnbextension
7805 (package-with-python2 python-widgetsnbextension))
7806
7807 (define-public python-ipywidgets
7808 (package
7809 (name "python-ipywidgets")
7810 (version "5.2.2")
7811 (source
7812 (origin
7813 (method url-fetch)
7814 (uri (pypi-uri "ipywidgets" version))
7815 (sha256
7816 (base32
7817 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7818 (build-system python-build-system)
7819 (propagated-inputs
7820 `(("python-ipython" ,python-ipython)
7821 ("python-traitlets" ,python-traitlets)
7822 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7823 (native-inputs
7824 `(("python-nose" ,python-nose)
7825 ("python-pytest" ,python-pytest)))
7826 (home-page "https://ipython.org")
7827 (synopsis "IPython HTML widgets for Jupyter")
7828 (description "Ipywidgets are interactive HTML widgets for Jupyter
7829 notebooks and the IPython kernel. Notebooks come alive when interactive
7830 widgets are used. Users gain control of their data and can visualize changes
7831 in the data.")
7832 (license license:bsd-3)))
7833
7834 (define-public python2-ipywidgets
7835 (package-with-python2 python-ipywidgets))
7836
7837 (define-public python-jupyter-console
7838 (package
7839 (name "python-jupyter-console")
7840 (version "6.0.0")
7841 (source
7842 (origin
7843 (method url-fetch)
7844 (uri (pypi-uri "jupyter_console" version))
7845 (sha256
7846 (base32
7847 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
7848 (build-system python-build-system)
7849 (propagated-inputs
7850 `(("python-ipykernel" ,python-ipykernel)
7851 ("python-jupyter-client" ,python-jupyter-client)
7852 ("python-prompt-toolkit" ,python-prompt-toolkit)
7853 ("python-pygments" ,python-pygments)))
7854 (native-inputs
7855 `(("python-nose" ,python-nose)))
7856 (home-page "https://jupyter.org")
7857 (synopsis "Jupyter terminal console")
7858 (description "This package provides a terminal-based console frontend for
7859 Jupyter kernels. It also allows for console-based interaction with non-Python
7860 Jupyter kernels such as IJulia and IRKernel.")
7861 (license license:bsd-3)))
7862
7863 (define-public python2-jupyter-console
7864 (package
7865 (name "python2-jupyter-console")
7866 (version "5.2.0")
7867 (source
7868 (origin
7869 (method url-fetch)
7870 (uri (pypi-uri "jupyter_console" version))
7871 (sha256
7872 (base32
7873 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7874 (build-system python-build-system)
7875 ;; Tests only run in an TTY.
7876 (arguments `(#:tests? #f))
7877 (propagated-inputs
7878 `(("python2-ipykernel" ,python2-ipykernel)
7879 ("python2-jupyter-client" ,python2-jupyter-client)
7880 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7881 ("python2-pygments" ,python2-pygments)))
7882 (native-inputs
7883 `(("python2-nose" ,python2-nose)))
7884 (home-page "https://jupyter.org")
7885 (synopsis "Jupyter terminal console")
7886 (description "This package provides a terminal-based console frontend for
7887 Jupyter kernels. It also allows for console-based interaction with non-Python
7888 Jupyter kernels such as IJulia and IRKernel.")
7889 (license license:bsd-3)))
7890
7891 ;; The python-ipython and python-jupyter-console require each other. To get
7892 ;; the functionality in both packages working, strip down the
7893 ;; python-jupyter-console package when using it as an input to python-ipython.
7894 (define python-jupyter-console-minimal
7895 (package
7896 (inherit python-jupyter-console)
7897 (name "python-jupyter-console-minimal")
7898 (arguments
7899 (substitute-keyword-arguments
7900 (package-arguments python-jupyter-console)
7901 ((#:phases phases)
7902 `(modify-phases ,phases
7903 (add-after 'install 'delete-bin
7904 (lambda* (#:key outputs #:allow-other-keys)
7905 ;; Delete the bin files, to avoid conflicts in profiles
7906 ;; where python-ipython and python-jupyter-console are
7907 ;; both present.
7908 (delete-file-recursively
7909 (string-append
7910 (assoc-ref outputs "out") "/bin"))))))))
7911 ;; Remove the python-ipython propagated input, to avoid the cycle
7912 (propagated-inputs
7913 (alist-delete
7914 "python-ipython"
7915 (package-propagated-inputs python-jupyter-console)))))
7916
7917 (define-public python-qtconsole
7918 (package
7919 (name "python-qtconsole")
7920 (version "4.4.3")
7921 (source
7922 (origin
7923 (method url-fetch)
7924 (uri (pypi-uri "qtconsole" version))
7925 (sha256
7926 (base32
7927 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
7928 (build-system python-build-system)
7929 (arguments
7930 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
7931 ;; but we only have the LTS version 5.x. This means that there might be
7932 ;; runtime errors, but since this is a dependency of the Jupyter package,
7933 ;; and Jupyter can be used without the qtconsole we can overlook this for
7934 ;; now.
7935 `(#:tests? #f
7936 #:phases
7937 (modify-phases %standard-phases
7938 (add-before 'check 'pre-check
7939 (lambda _
7940 (setenv "QT_QPA_PLATFORM" "offscreen")
7941 #t)))))
7942 (propagated-inputs
7943 `(("python-ipykernel" ,python-ipykernel)
7944 ("python-ipython" ,python-ipython)))
7945 (native-inputs
7946 `(("python-pytest" ,python-pytest)))
7947 (home-page "http://jupyter.org")
7948 (synopsis "Jupyter Qt console")
7949 (description "This package provides a Qt-based console for Jupyter with
7950 support for rich media output.")
7951 (license license:bsd-3)))
7952
7953 (define-public python-jsbeautifier
7954 (package
7955 (name "python-jsbeautifier")
7956 (version "1.10.2")
7957 (home-page "https://github.com/beautify-web/js-beautify")
7958 (source (origin
7959 (method git-fetch)
7960 (uri (git-reference
7961 (url home-page)
7962 (commit (string-append "v" version))))
7963 (file-name (git-file-name name version))
7964 (sha256
7965 (base32
7966 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
7967 (build-system python-build-system)
7968 (arguments
7969 `(#:phases (modify-phases %standard-phases
7970 (add-after 'unpack 'chdir
7971 (lambda _
7972 ;; The upstream Git repository contains all the code,
7973 ;; but this package only builds the python code.
7974 (chdir "python")
7975 #t))
7976 (add-after 'unpack 'patch-python-six-requirements
7977 (lambda _
7978 (substitute* "python/setup.py"
7979 (("six>=1.12.0")
7980 "six>=1.11.0"))
7981 #t)))))
7982 (propagated-inputs
7983 `(("python-editorconfig" ,python-editorconfig)
7984 ("python-six" ,python-six)))
7985 (native-inputs
7986 `(("python-pytest" ,python-pytest)))
7987 (synopsis "JavaScript unobfuscator and beautifier")
7988 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
7989 popular online obfuscators.")
7990 (license license:expat)))
7991
7992 (define-public jupyter
7993 (package
7994 (name "jupyter")
7995 (version "1.0.0")
7996 (source
7997 (origin
7998 (method url-fetch)
7999 (uri (pypi-uri "jupyter" version))
8000 (sha256
8001 (base32
8002 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8003 (build-system python-build-system)
8004 (arguments '(#:tests? #f)) ; there are none.
8005 (propagated-inputs
8006 `(("python-ipykernel" ,python-ipykernel)
8007 ("python-ipywidgets" ,python-ipywidgets)
8008 ("python-jupyter-console" ,python-jupyter-console)
8009 ("python-nbconvert" ,python-nbconvert)
8010 ("python-notebook" ,python-notebook)
8011 ("python-qtconsole" ,python-qtconsole)))
8012 (native-search-paths
8013 (list (search-path-specification
8014 (variable "JUPYTER_PATH")
8015 (files '("share/jupyter")))))
8016 (home-page "https://jupyter.org")
8017 (synopsis "Web application for interactive documents")
8018 (description
8019 "The Jupyter Notebook is a web application that allows you to create and
8020 share documents that contain live code, equations, visualizations and
8021 explanatory text. Uses include: data cleaning and transformation, numerical
8022 simulation, statistical modeling, machine learning and much more.")
8023 (license license:bsd-3)))
8024
8025 (define-public python-chardet
8026 (package
8027 (name "python-chardet")
8028 (version "3.0.4")
8029 (source
8030 (origin
8031 (method url-fetch)
8032 (uri (pypi-uri "chardet" version))
8033 (sha256
8034 (base32
8035 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
8036 (native-inputs
8037 `(("python-hypothesis" ,python-hypothesis)
8038 ("python-pytest" ,python-pytest)
8039 ("python-pytest-runner" ,python-pytest-runner)))
8040 (build-system python-build-system)
8041 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
8042 (arguments `(#:tests? #f))
8043 (home-page "https://github.com/chardet/chardet")
8044 (synopsis "Universal encoding detector for Python 2 and 3")
8045 (description
8046 "This package provides @code{chardet}, a Python module that can
8047 automatically detect a wide range of file encodings.")
8048 (license license:lgpl2.1+)))
8049
8050 (define-public python2-chardet
8051 (package-with-python2 python-chardet))
8052
8053 (define-public python-docopt
8054 (package
8055 (name "python-docopt")
8056 (version "0.6.2")
8057 (source
8058 (origin
8059 (method git-fetch)
8060 ;; The release on PyPI does not include tests.
8061 (uri (git-reference
8062 (url "https://github.com/docopt/docopt")
8063 (commit version)))
8064 (file-name (git-file-name name version))
8065 (sha256
8066 (base32
8067 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
8068 (build-system python-build-system)
8069 (native-inputs
8070 `(("python-pytest" ,python-pytest)))
8071 (arguments
8072 `(#:phases
8073 (modify-phases %standard-phases
8074 (replace 'check
8075 (lambda _ (invoke "py.test"))))))
8076 (home-page "http://docopt.org")
8077 (synopsis "Command-line interface description language for Python")
8078 (description "This library allows the user to define a command-line
8079 interface from a program's help message rather than specifying it
8080 programmatically with command-line parsers like @code{getopt} and
8081 @code{argparse}.")
8082 (license license:expat)))
8083
8084 (define-public python2-docopt
8085 (package-with-python2 python-docopt))
8086
8087 (define-public python-pythondialog
8088 (package
8089 (name "python-pythondialog")
8090 (version "3.4.0")
8091 (source
8092 (origin
8093 (method url-fetch)
8094 (uri (pypi-uri "pythondialog" version))
8095 (sha256
8096 (base32
8097 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8098 (build-system python-build-system)
8099 (arguments
8100 `(#:phases
8101 (modify-phases %standard-phases
8102 (add-after 'unpack 'patch-path
8103 (lambda* (#:key inputs #:allow-other-keys)
8104 (let* ((dialog (assoc-ref inputs "dialog")))
8105 ;; Since this library really wants to grovel the search path, we
8106 ;; must hardcode dialog's store path into it.
8107 (substitute* "dialog.py"
8108 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8109 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8110 #t))))
8111 #:tests? #f)) ; no test suite
8112 (propagated-inputs
8113 `(("dialog" ,dialog)))
8114 (home-page "http://pythondialog.sourceforge.net/")
8115 (synopsis "Python interface to the UNIX dialog utility")
8116 (description "A Python wrapper for the dialog utility. Its purpose is to
8117 provide an easy to use, pythonic and comprehensive Python interface to dialog.
8118 This allows one to make simple text-mode user interfaces on Unix-like systems")
8119 (license license:lgpl2.1)
8120 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8121
8122 (define-public python2-pythondialog
8123 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8124 (package
8125 (inherit base)
8126 (version (package-version python-pythondialog))
8127 (source (origin
8128 (method url-fetch)
8129 (uri (pypi-uri "python2-pythondialog" version))
8130 (sha256
8131 (base32
8132 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8133
8134 (define-public python-configobj
8135 (package
8136 (name "python-configobj")
8137 (version "5.0.6")
8138 (source (origin
8139 (method url-fetch)
8140 (uri (pypi-uri "configobj" version))
8141 (sha256
8142 (base32
8143 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8144 ;; Patch setup.py so it looks for python-setuptools, which is
8145 ;; required to parse the keyword 'install_requires' in setup.py.
8146 (patches (search-patches "python-configobj-setuptools.patch"))))
8147 (build-system python-build-system)
8148 (propagated-inputs
8149 `(("python-six" ,python-six)))
8150 (synopsis "Config file reading, writing and validation")
8151 (description "ConfigObj is a simple but powerful config file reader and
8152 writer: an ini file round tripper. Its main feature is that it is very easy to
8153 use, with a straightforward programmer’s interface and a simple syntax for
8154 config files.")
8155 (home-page "https://github.com/DiffSK/configobj")
8156 (license license:bsd-3)))
8157
8158 (define-public python2-configobj
8159 (package-with-python2 python-configobj))
8160
8161 (define-public python-configargparse
8162 (package
8163 (name "python-configargparse")
8164 (version "0.14.0")
8165 (source (origin
8166 (method url-fetch)
8167 (uri (pypi-uri "ConfigArgParse" version))
8168 (sha256
8169 (base32
8170 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
8171 (build-system python-build-system)
8172 (native-inputs
8173 `(("python-pyyaml" ,python-pyyaml)))
8174 (arguments
8175 `(#:phases
8176 (modify-phases %standard-phases
8177 (replace 'check
8178 (lambda _
8179 ;; Bypass setuptools-shim because one test relies on "setup.py"
8180 ;; being the first argument passed to the python call.
8181 ;;
8182 ;; NOTE: Many tests do not run because they rely on Python's
8183 ;; built-in test.test_argparse, but we remove the unit tests from
8184 ;; our Python installation.
8185 (invoke "python" "setup.py" "test"))))))
8186 (synopsis "Replacement for argparse")
8187 (description "A drop-in replacement for argparse that allows options to also
8188 be set via config files and/or environment variables.")
8189 (home-page "https://github.com/bw2/ConfigArgParse")
8190 (license license:expat)))
8191
8192 (define-public python2-configargparse
8193 (package-with-python2 python-configargparse))
8194
8195 (define-public python-argparse-manpage
8196 (package
8197 (name "python-argparse-manpage")
8198 (version "1.1")
8199 (source
8200 (origin
8201 (method url-fetch)
8202 (uri (pypi-uri "argparse-manpage" version))
8203 (sha256
8204 (base32
8205 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8206 (build-system python-build-system)
8207 (home-page "https://github.com/praiskup/argparse-manpage")
8208 (synopsis "Build manual page from Python's ArgumentParser object")
8209 (description
8210 "This package provides tools to build manual pages from Python's
8211 @code{ArgumentParser} object.")
8212 (license license:asl2.0)))
8213
8214 (define-public python-contextlib2
8215 (package
8216 (name "python-contextlib2")
8217 (version "0.5.5")
8218 (source
8219 (origin
8220 (method url-fetch)
8221 (uri (pypi-uri "contextlib2" version))
8222 (sha256
8223 (base32
8224 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8225 (build-system python-build-system)
8226 (home-page "http://contextlib2.readthedocs.org/")
8227 (synopsis "Tools for decorators and context managers")
8228 (description "This module is primarily a backport of the Python
8229 3.2 contextlib to earlier Python versions. Like contextlib, it
8230 provides utilities for common tasks involving decorators and context
8231 managers. It also contains additional features that are not part of
8232 the standard library.")
8233 (properties `((python2-variant . ,(delay python2-contextlib2))))
8234 (license license:psfl)))
8235
8236 (define-public python2-contextlib2
8237 (let ((base (package-with-python2
8238 (strip-python2-variant python-contextlib2))))
8239 (package
8240 (inherit base)
8241 (arguments
8242 (substitute-keyword-arguments (package-arguments base)
8243 ((#:phases phases)
8244 `(modify-phases ,phases
8245 (replace 'check
8246 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
8247 (native-inputs
8248 `(("python2-unittest2" ,python2-unittest2))))))
8249
8250 (define-public python-texttable
8251 (package
8252 (name "python-texttable")
8253 (version "0.9.1")
8254 (source
8255 (origin
8256 (method url-fetch)
8257 (uri (pypi-uri "texttable" version))
8258 (sha256
8259 (base32
8260 "0yawv64c0zbawwv6zz84whb32fnb2n9jylwjcfsrcdgh7xvl340i"))))
8261 (build-system python-build-system)
8262 (arguments '(#:tests? #f)) ; no tests
8263 (home-page "https://github.com/foutaise/texttable/")
8264 (synopsis "Python module for creating simple ASCII tables")
8265 (description "Texttable is a Python module for creating simple ASCII
8266 tables.")
8267 (license license:lgpl2.1+)))
8268
8269 (define-public python2-texttable
8270 (package-with-python2 python-texttable))
8271
8272 (define-public python-atomicwrites
8273 (package
8274 (name "python-atomicwrites")
8275 (version "1.3.0")
8276 (source (origin
8277 (method url-fetch)
8278 (uri (pypi-uri "atomicwrites" version))
8279 (sha256
8280 (base32
8281 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
8282 (build-system python-build-system)
8283 (synopsis "Atomic file writes in Python")
8284 (description "Library for atomic file writes using platform dependent tools
8285 for atomic file system operations.")
8286 (home-page "https://github.com/untitaker/python-atomicwrites")
8287 (license license:expat)))
8288
8289 (define-public python2-atomicwrites
8290 (package-with-python2 python-atomicwrites))
8291
8292 (define-public python-click-threading
8293 (package
8294 (name "python-click-threading")
8295 (version "0.4.4")
8296 (source (origin
8297 (method url-fetch)
8298 (uri (pypi-uri "click-threading" version))
8299 (sha256
8300 (base32
8301 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8302 (build-system python-build-system)
8303 (propagated-inputs
8304 `(("python-click" ,python-click)))
8305 (synopsis "Utilities for multithreading in Click")
8306 (description "This package provides utilities for multithreading in Click
8307 applications.")
8308 (home-page "https://github.com/click-contrib/click-threading")
8309 (license license:expat)))
8310
8311 (define-public python-click-log
8312 (package
8313 (name "python-click-log")
8314 (version "0.3.2")
8315 (source (origin
8316 (method url-fetch)
8317 (uri (pypi-uri "click-log" version))
8318 (sha256
8319 (base32
8320 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8321 (build-system python-build-system)
8322 (propagated-inputs
8323 `(("python-click" ,python-click)))
8324 (synopsis "Logging for click applications")
8325 (description "This package provides a Python library for logging Click
8326 applications.")
8327 (home-page "https://github.com/click-contrib/click-log")
8328 (license license:expat)))
8329
8330 (define-public python-apipkg
8331 (package
8332 (name "python-apipkg")
8333 (version "1.4")
8334 (source (origin
8335 (method url-fetch)
8336 (uri (pypi-uri "apipkg" version))
8337 (sha256
8338 (base32
8339 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8340 (build-system python-build-system)
8341 (native-inputs
8342 `(("python-pytest" ,python-pytest)))
8343 (synopsis "Namespace control and lazy-import mechanism")
8344 (description "With apipkg you can control the exported namespace of a Python
8345 package and greatly reduce the number of imports for your users. It is a small
8346 pure Python module that works on virtually all Python versions.")
8347 (home-page "https://github.com/pytest-dev/apipkg")
8348 (license license:expat)))
8349
8350 (define-public python2-apipkg
8351 (package-with-python2 python-apipkg))
8352
8353 (define-public python-execnet
8354 (package
8355 (name "python-execnet")
8356 (version "1.4.1")
8357 (source (origin
8358 (method url-fetch)
8359 (uri (pypi-uri "execnet" version))
8360 (sha256
8361 (base32
8362 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8363 (build-system python-build-system)
8364 (arguments
8365 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8366 ;; The two test failures are caused by the lack of an `ssh` executable.
8367 ;; The test suite can be run with pytest after the 'install' phase.
8368 #:tests? #f))
8369 (native-inputs
8370 `(("python-pytest" ,python-pytest)
8371 ("python-setuptools-scm" ,python-setuptools-scm)))
8372 (propagated-inputs
8373 `(("python-apipkg" ,python-apipkg)))
8374 (synopsis "Rapid multi-Python deployment")
8375 (description "Execnet provides a share-nothing model with
8376 channel-send/receive communication for distributing execution across many
8377 Python interpreters across version, platform and network barriers. It has a
8378 minimal and fast API targeting the following uses:
8379 @enumerate
8380 @item distribute tasks to (many) local or remote CPUs
8381 @item write and deploy hybrid multi-process applications
8382 @item write scripts to administer multiple environments
8383 @end enumerate")
8384 (home-page "http://codespeak.net/execnet/")
8385 (license license:expat)))
8386
8387 (define-public python2-execnet
8388 (package-with-python2 python-execnet))
8389
8390 (define-public python-icalendar
8391 (package
8392 (name "python-icalendar")
8393 (version "4.0.4")
8394 (source (origin
8395 (method url-fetch)
8396 (uri (pypi-uri "icalendar" version))
8397 (sha256
8398 (base32
8399 "16gjvqv0n05jrb9g228pdjgzd3amz2pdhvcgsn1jypszjg5m2w9l"))))
8400 (build-system python-build-system)
8401 (propagated-inputs
8402 `(("python-dateutil" ,python-dateutil)
8403 ("python-pytz" ,python-pytz)))
8404 (synopsis "Python library for parsing iCalendar files")
8405 (description "The icalendar package is a parser/generator of iCalendar
8406 files for use with Python.")
8407 (home-page "https://github.com/collective/icalendar")
8408 (license license:bsd-2)))
8409
8410 (define-public python-args
8411 (package
8412 (name "python-args")
8413 (version "0.1.0")
8414 (source (origin
8415 (method url-fetch)
8416 (uri (pypi-uri "args" version))
8417 (sha256
8418 (base32
8419 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8420 (build-system python-build-system)
8421 (home-page "https://github.com/kennethreitz/args")
8422 (synopsis "Command-line argument parser")
8423 (description
8424 "This library provides a Python module to parse command-line arguments.")
8425 (license license:bsd-3)))
8426
8427 (define-public python2-args
8428 (package-with-python2 python-args))
8429
8430 (define-public python-clint
8431 (package
8432 (name "python-clint")
8433 (version "0.5.1")
8434 (source (origin
8435 (method url-fetch)
8436 (uri (pypi-uri "clint" version))
8437 (sha256
8438 (base32
8439 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8440 (build-system python-build-system)
8441 (arguments
8442 '(#:phases
8443 (modify-phases %standard-phases
8444 (replace 'check
8445 (lambda _ (invoke "py.test" "-v"))))))
8446 (native-inputs
8447 `(("python-pytest" ,python-pytest)))
8448 (propagated-inputs
8449 `(("python-args" ,python-args)))
8450 (home-page "https://github.com/kennethreitz/clint")
8451 (synopsis "Command-line interface tools")
8452 (description
8453 "Clint is a Python module filled with a set of tools for developing
8454 command-line applications, including tools for colored and indented
8455 output, progress bar display, and pipes.")
8456 (license license:isc)))
8457
8458 (define-public python2-clint
8459 (package-with-python2 python-clint))
8460
8461 (define-public python-rply
8462 (package
8463 (name "python-rply")
8464 (version "0.7.5")
8465 (source (origin
8466 (method url-fetch)
8467 (uri (pypi-uri "rply" version))
8468 (sha256
8469 (base32
8470 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8471 (build-system python-build-system)
8472 (propagated-inputs
8473 `(("python-appdirs" ,python-appdirs)))
8474 (home-page "https://github.com/alex/rply")
8475 (synopsis "Parser generator for Python")
8476 (description
8477 "This package provides a pure Python based parser generator, that also
8478 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8479 with a new public API, and RPython support.")
8480 (license license:bsd-3)))
8481
8482 (define-public python2-rply
8483 (package-with-python2 python-rply))
8484
8485 (define-public python-hy
8486 (package
8487 (name "python-hy")
8488 (version "0.17.0")
8489 (source (origin
8490 (method url-fetch)
8491 (uri (pypi-uri "hy" version))
8492 (sha256
8493 (base32
8494 "1gdbqsirsdxj320wnp7my5awzs1kfs6m4fqmkzbd1zd47qzj0zfi"))))
8495 (build-system python-build-system)
8496 (arguments
8497 '(#:phases
8498 (modify-phases %standard-phases
8499 (add-before 'install 'set-HOME
8500 (lambda _
8501 (setenv "HOME" "/tmp")))
8502 (replace 'check
8503 (lambda _
8504 ;; Tests require write access to HOME.
8505 (setenv "HOME" "/tmp")
8506 (invoke "nosetests"))))))
8507 (native-inputs
8508 `(("python-coverage" ,python-coverage)
8509 ("python-nose" ,python-nose)))
8510 (propagated-inputs
8511 `(("python-astor" ,python-astor)
8512 ("python-clint" ,python-clint)
8513 ("python-rply" ,python-rply)
8514 ("python-fastentrypoints"
8515 ,python-fastentrypoints)
8516 ("python-funcparserlib"
8517 ,python-funcparserlib)))
8518 (home-page "http://hylang.org/")
8519 (synopsis "Lisp frontend to Python")
8520 (description
8521 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8522 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8523 Python at your fingertips, in Lisp form.")
8524 (license license:expat)))
8525
8526 (define-public python2-hy
8527 (package-with-python2 python-hy))
8528
8529 (define-public python2-functools32
8530 (package
8531 (name "python2-functools32")
8532 (version "3.2.3-2")
8533 (source
8534 (origin
8535 (method url-fetch)
8536 (uri (pypi-uri "functools32" version))
8537 (sha256
8538 (base32
8539 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8540 (build-system python-build-system)
8541 (arguments
8542 `(#:python ,python-2
8543 #:tests? #f)) ; no test target
8544 (home-page "https://github.com/MiCHiLU/python-functools32")
8545 (synopsis
8546 "Backport of the functools module from Python 3.2.3")
8547 (description
8548 "This package is a backport of the @code{functools} module from Python
8549 3.2.3 for use with older versions of Python and PyPy.")
8550 (license license:expat)))
8551
8552 (define-public python2-subprocess32
8553 (package
8554 (name "python2-subprocess32")
8555 (version "3.2.7")
8556 (source (origin
8557 (method url-fetch)
8558 (uri (pypi-uri "subprocess32" version))
8559 (sha256
8560 (base32
8561 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8562 (patches
8563 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8564 (build-system python-build-system)
8565 (arguments
8566 `(#:python ,python-2
8567 ;; The test suite fails with Python > 2.7.13:
8568 ;; import test.support
8569 ;; ImportError: No module named support
8570 #:tests? #f
8571 #:phases
8572 (modify-phases %standard-phases
8573 (add-after 'unpack 'patch-/bin/sh
8574 (lambda _
8575 (substitute* '("subprocess32.py"
8576 "test_subprocess32.py")
8577 (("/bin/sh") (which "sh")))
8578 #t)))))
8579 (home-page "https://github.com/google/python-subprocess32")
8580 (synopsis "Backport of the subprocess module from Python 3.2")
8581 (description
8582 "This is a backport of the @code{subprocess} standard library module
8583 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8584 new features. On POSIX systems it is guaranteed to be reliable when used
8585 in threaded applications. It includes timeout support from Python 3.3 but
8586 otherwise matches 3.2’s API.")
8587 (license license:psfl)))
8588
8589 (define-public python2-futures
8590 (package
8591 (name "python2-futures")
8592 (version "3.2.0")
8593 (source
8594 (origin
8595 (method url-fetch)
8596 (uri (pypi-uri "futures" version))
8597 (sha256
8598 (base32
8599 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8600 (build-system python-build-system)
8601 (arguments
8602 `(#:python ,python-2
8603 #:phases
8604 (modify-phases %standard-phases
8605 (replace 'check
8606 (lambda _
8607 (invoke "python" "test_futures.py")
8608 #t)))))
8609 (home-page "https://github.com/agronholm/pythonfutures")
8610 (synopsis
8611 "Backport of the concurrent.futures package from Python 3.2")
8612 (description
8613 "The concurrent.futures module provides a high-level interface for
8614 asynchronously executing callables. This package backports the
8615 concurrent.futures package from Python 3.2")
8616 (license license:bsd-3)))
8617
8618 (define-public python-promise
8619 (package
8620 (name "python-promise")
8621 (version "0.4.2")
8622 (source
8623 (origin
8624 (method url-fetch)
8625 (uri (pypi-uri "promise" version))
8626 (sha256
8627 (base32
8628 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8629 (build-system python-build-system)
8630 ;; Tests wants python-futures, which is a python2 only program, and
8631 ;; can't be found by python-promise at test time.
8632 (arguments `(#:tests? #f))
8633 (home-page "https://github.com/syrusakbary/promise")
8634 (synopsis "Promises/A+ implementation for Python")
8635 (description
8636 "Promises/A+ implementation for Python")
8637 (properties `((python2-variant . ,(delay python2-promise))))
8638 (license license:expat)))
8639
8640 (define-public python2-promise
8641 (let ((promise (package-with-python2
8642 (strip-python2-variant python-promise))))
8643 (package (inherit promise)
8644 (arguments (substitute-keyword-arguments (package-arguments promise)
8645 ((#:tests? _) #t)))
8646 (native-inputs
8647 `(("python2-futures" ,python2-futures)
8648 ("python2-pytest" ,python2-pytest)
8649 ,@(package-native-inputs promise))))))
8650
8651 (define-public python-progressbar33
8652 (package
8653 (name "python-progressbar33")
8654 (version "2.4")
8655 (source
8656 (origin
8657 (method url-fetch)
8658 (uri (pypi-uri "progressbar33" version))
8659 (sha256
8660 (base32
8661 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
8662 (build-system python-build-system)
8663 (home-page "http://github.com/germangh/python-progressbar")
8664 (synopsis "Text progress bar library for Python")
8665 (description
8666 "This package provides a text progress bar library for Python. This
8667 version only differs from the original @code{progressbar} package in that it
8668 uses relative package imports instead of absolute imports, which is necessary
8669 for the module to work under Python 3.3.")
8670 ;; Either or both of these licenses may be selected.
8671 (license (list license:lgpl2.1+ license:bsd-3))))
8672
8673 (define-public python-colorama
8674 (package
8675 (name "python-colorama")
8676 (version "0.3.9")
8677 (source
8678 (origin
8679 (method url-fetch)
8680 (uri (pypi-uri "colorama" version))
8681 (sha256
8682 (base32
8683 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
8684 (build-system python-build-system)
8685 (synopsis "Colored terminal text rendering for Python")
8686 (description "Colorama is a Python library for rendering colored terminal
8687 text.")
8688 (home-page "https://pypi.python.org/pypi/colorama")
8689 (license license:bsd-3)))
8690
8691 (define-public python2-colorama
8692 (package-with-python2 python-colorama))
8693
8694 (define-public python-rsa
8695 (package
8696 (name "python-rsa")
8697 (version "3.4.2")
8698 (source
8699 (origin
8700 (method url-fetch)
8701 (uri (pypi-uri "rsa" version))
8702 (sha256
8703 (base32
8704 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8705 (build-system python-build-system)
8706 (propagated-inputs
8707 `(("python-pyasn1" ,python-pyasn1)))
8708 (synopsis "Pure-Python RSA implementation")
8709 (description "Python-RSA is a pure-Python RSA implementation. It supports
8710 encryption and decryption, signing and verifying signatures, and key
8711 generation according to PKCS#1 version 1.5. It can be used as a Python
8712 library as well as on the command line.")
8713 (home-page "https://stuvel.eu/rsa")
8714 (license license:asl2.0)))
8715
8716 (define-public python2-rsa
8717 (package-with-python2 python-rsa))
8718
8719 (define-public python-pluggy
8720 (package
8721 (name "python-pluggy")
8722 (version "0.11.0")
8723 (source
8724 (origin
8725 (method url-fetch)
8726 (uri (pypi-uri "pluggy" version))
8727 (sha256
8728 (base32
8729 "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895"))))
8730 (build-system python-build-system)
8731 (native-inputs
8732 `(("python-setuptools-scm" ,python-setuptools-scm)))
8733 (synopsis "Plugin and hook calling mechanism for Python")
8734 (description "Pluggy is an extraction of the plugin manager as used by
8735 Pytest but stripped of Pytest specific details.")
8736 (home-page "https://pypi.python.org/pypi/pluggy")
8737 (license license:expat)))
8738
8739 (define-public python2-pluggy
8740 (package-with-python2 python-pluggy))
8741
8742 (define-public python-tox
8743 (package
8744 (name "python-tox")
8745 (version "2.8.1")
8746 (source
8747 (origin
8748 (method url-fetch)
8749 (uri (pypi-uri "tox" version))
8750 (sha256
8751 (base32
8752 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8753 (build-system python-build-system)
8754 (arguments
8755 ;; FIXME: Tests require pytest-timeout, which itself requires
8756 ;; pytest>=2.8.0 for installation.
8757 '(#:tests? #f))
8758 (propagated-inputs
8759 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8760 ("python-py" ,python-py)
8761 ("python-virtualenv" ,python-virtualenv)))
8762 (native-inputs
8763 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8764 ("python-pytest" ,python-pytest) ; >= 2.3.5
8765 ("python-setuptools-scm" ,python-setuptools-scm)))
8766 (home-page "http://tox.testrun.org/")
8767 (synopsis "Virtualenv-based automation of test activities")
8768 (description "Tox is a generic virtualenv management and test command line
8769 tool. It can be used to check that a package installs correctly with
8770 different Python versions and interpreters, or run tests in each type of
8771 supported environment, or act as a frontend to continuous integration
8772 servers.")
8773 (license license:expat)))
8774
8775 (define-public python2-tox
8776 (package-with-python2 python-tox))
8777
8778 (define-public python-jmespath
8779 (package
8780 (name "python-jmespath")
8781 (version "0.9.4")
8782 (source
8783 (origin
8784 (method url-fetch)
8785 (uri (pypi-uri "jmespath" version))
8786 (sha256
8787 (base32
8788 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
8789 (build-system python-build-system)
8790 (native-inputs
8791 `(("python-nose" ,python-nose)))
8792 (synopsis "JSON Matching Expressions")
8793 (description "JMESPath (pronounced “james path”) is a Python library that
8794 allows one to declaratively specify how to extract elements from a JSON
8795 document.")
8796 (home-page "https://github.com/jmespath/jmespath.py")
8797 (license license:expat)))
8798
8799 (define-public python2-jmespath
8800 (package-with-python2 python-jmespath))
8801
8802 (define-public python-botocore
8803 (package
8804 (name "python-botocore")
8805 (version "1.12.149")
8806 (source
8807 (origin
8808 (method url-fetch)
8809 (uri (pypi-uri "botocore" version))
8810 (sha256
8811 (base32
8812 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
8813 (build-system python-build-system)
8814 (arguments
8815 ;; FIXME: Many tests are failing.
8816 '(#:tests? #f))
8817 (propagated-inputs
8818 `(("python-dateutil" ,python-dateutil)
8819 ("python-docutils" ,python-docutils)
8820 ("python-jmespath" ,python-jmespath)))
8821 (native-inputs
8822 `(("python-mock" ,python-mock)
8823 ("python-nose" ,python-nose)
8824 ("behave" ,behave)
8825 ("python-tox" ,python-tox)
8826 ("python-urllib3" ,python-urllib3)
8827 ("python-wheel" ,python-wheel)))
8828 (home-page "https://github.com/boto/botocore")
8829 (synopsis "Low-level interface to AWS")
8830 (description "Botocore is a Python library that provides a low-level
8831 interface to the Amazon Web Services (AWS) API.")
8832 (license license:asl2.0)))
8833
8834 (define-public python2-botocore
8835 (package-with-python2 python-botocore))
8836
8837 (define-public python-xdo
8838 (package
8839 (name "python-xdo")
8840 (version "0.3")
8841 (source (origin
8842 (method url-fetch)
8843 (uri (string-append
8844 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8845 "python-xdo_" version ".orig.tar.gz"))
8846 (sha256
8847 (base32
8848 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8849 (build-system python-build-system)
8850 (arguments
8851 '(#:phases
8852 (modify-phases %standard-phases
8853 (add-before 'install 'patch-libxdo-path
8854 ;; Hardcode the path of dynamically loaded libxdo library.
8855 (lambda* (#:key inputs #:allow-other-keys)
8856 (let ((libxdo (string-append
8857 (assoc-ref inputs "xdotool")
8858 "/lib/libxdo.so")))
8859 (substitute* "xdo/_xdo.py"
8860 (("find_library\\(\"xdo\"\\)")
8861 (simple-format #f "\"~a\"" libxdo)))
8862 #t))))
8863 #:tests? #f)) ; no tests provided
8864 (propagated-inputs
8865 `(("python-six" ,python-six)))
8866 (inputs
8867 `(("xdotool" ,xdotool)
8868 ("libX11" ,libx11)))
8869 (home-page "https://tracker.debian.org/pkg/python-xdo")
8870 (synopsis "Python library for simulating X11 keyboard/mouse input")
8871 (description "Provides bindings to libxdo for manipulating X11 via simulated
8872 input. (Note that this is mostly a legacy library; you may wish to look at
8873 python-xdo for newer bindings.)")
8874 (license license:bsd-3)))
8875
8876 (define-public python2-xdo
8877 (package-with-python2 python-xdo))
8878
8879 (define-public python-mako
8880 (package
8881 (name "python-mako")
8882 (version "1.1.0")
8883 (source
8884 (origin
8885 (method url-fetch)
8886 (uri (pypi-uri "Mako" version))
8887 (sha256
8888 (base32
8889 "0jqa3qfpykyn4fmkn0kh6043sfls7br8i2bsdbccazcvk9cijsd3"))))
8890 (build-system python-build-system)
8891 (arguments
8892 `(#:phases (modify-phases %standard-phases
8893 (replace 'check
8894 (lambda _
8895 (invoke "pytest" "-vv"))))))
8896 (propagated-inputs
8897 `(("python-markupsafe" ,python-markupsafe)))
8898 (native-inputs
8899 `(("python-mock" ,python-mock)
8900 ("python-pytest" ,python-pytest)))
8901 (home-page "https://www.makotemplates.org/")
8902 (synopsis "Templating language for Python")
8903 (description "Mako is a templating language for Python that compiles
8904 templates into Python modules.")
8905 (license license:expat)))
8906
8907 (define-public python2-mako
8908 (package-with-python2 python-mako))
8909
8910 (define-public python-waitress
8911 (package
8912 (name "python-waitress")
8913 (version "1.1.0")
8914 (source
8915 (origin
8916 (method url-fetch)
8917 (uri (pypi-uri "waitress" version))
8918 (patches (search-patches "python-waitress-fix-tests.patch"))
8919 (sha256
8920 (base32
8921 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
8922 (build-system python-build-system)
8923 (home-page "https://github.com/Pylons/waitress")
8924 (synopsis "Waitress WSGI server")
8925 (description "Waitress is meant to be a production-quality pure-Python WSGI
8926 server with very acceptable performance.")
8927 (license license:zpl2.1)))
8928
8929 (define-public python2-waitress
8930 (package-with-python2 python-waitress))
8931
8932 (define-public python-whichcraft
8933 (package
8934 (name "python-whichcraft")
8935 (version "0.6.1")
8936 (source
8937 (origin
8938 (method url-fetch)
8939 (uri (pypi-uri "whichcraft" version))
8940 (sha256
8941 (base32
8942 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
8943 (build-system python-build-system)
8944 (native-inputs
8945 `(("python-pytest" ,python-pytest)))
8946 (home-page "https://github.com/pydanny/whichcraft")
8947 (synopsis "Cross-platform cross-python shutil.which functionality")
8948 (description
8949 "This package provides a shim of the shutil.which function that's
8950 designed to work across multiple versions of Python.")
8951 (license license:bsd-3)))
8952
8953 (define-public python-cookiecutter
8954 (package
8955 (name "python-cookiecutter")
8956 (version "1.6.0")
8957 (source
8958 (origin
8959 (method url-fetch)
8960 (uri (pypi-uri "cookiecutter" version))
8961 (sha256
8962 (base32
8963 "0glsvaz8igi2wy1hsnhm9fkn6560vdvdixzvkq6dn20z3hpaa5hk"))))
8964 (build-system python-build-system)
8965 (native-inputs
8966 `(("python-freezegun" ,python-freezegun)
8967 ("python-pytest" ,python-pytest)
8968 ("python-pytest-catchlog" ,python-pytest-catchlog)
8969 ("python-pytest-cov" ,python-pytest-cov)
8970 ("python-pytest-mock" ,python-pytest-mock)))
8971 (propagated-inputs
8972 `(("python-binaryornot" ,python-binaryornot)
8973 ("python-click" ,python-click)
8974 ("python-future" ,python-future)
8975 ("python-jinja2" ,python-jinja2)
8976 ("python-jinja2-time" ,python-jinja2-time)
8977 ("python-poyo" ,python-poyo)
8978 ("python-requests" ,python-requests)
8979 ("python-whichcraft" ,python-whichcraft)))
8980 (home-page "https://github.com/audreyr/cookiecutter")
8981 (synopsis
8982 "Command-line utility that creates projects from project templates")
8983 (description
8984 "This package provides a command-line utility that creates projects from
8985 project templates, e.g. creating a Python package project from a Python package
8986 project template.")
8987 (license license:bsd-3)))
8988
8989 (define-public python-pyquery
8990 (package
8991 (name "python-pyquery")
8992 (version "1.2.17")
8993 (source
8994 (origin
8995 (method url-fetch)
8996 (uri (pypi-uri "pyquery" version))
8997 (sha256
8998 (base32
8999 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9000 (build-system python-build-system)
9001 (native-inputs
9002 `(("python-webob" ,python-webob)
9003 ("python-webtest" ,python-webtest)))
9004 (propagated-inputs
9005 `(("python-lxml" ,python-lxml)
9006 ("python-cssselect" ,python-cssselect)))
9007 (home-page "https://github.com/gawel/pyquery")
9008 (synopsis "Make jQuery-like queries on xml documents")
9009 (description "pyquery allows you to make jQuery queries on xml documents.
9010 The API is as much as possible the similar to jQuery. pyquery uses lxml for
9011 fast xml and html manipulation.")
9012 (license license:bsd-3)))
9013
9014 (define-public python-anyjson
9015 (package
9016 (name "python-anyjson")
9017 (version "0.3.3")
9018 (source
9019 (origin
9020 (method url-fetch)
9021 (uri (pypi-uri "anyjson" version))
9022 (sha256
9023 (base32
9024 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9025 (build-system python-build-system)
9026 (arguments
9027 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9028 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9029 ;; whatever) so this transformation needs to be done before the tests
9030 ;; can be run. Maybe we could add a build step to transform beforehand
9031 ;; but it could be annoying/difficult.
9032 ;; We can enable tests for the Python 2 version, though, and do below.
9033 #:tests? #f))
9034 (home-page "https://bitbucket.org/runeh/anyjson/")
9035 (synopsis
9036 "Wraps best available JSON implementation in a common interface")
9037 (description
9038 "Anyjson loads whichever is the fastest JSON module installed
9039 and provides a uniform API regardless of which JSON implementation is used.")
9040 (license license:bsd-3)
9041 (properties `((python2-variant . ,(delay python2-anyjson))))))
9042
9043 (define-public python2-anyjson
9044 (let ((anyjson (package-with-python2
9045 (strip-python2-variant python-anyjson))))
9046 (package
9047 (inherit anyjson)
9048 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9049 #:tests? #t
9050 ,@(package-arguments anyjson)))
9051 (native-inputs `(("python2-nose" ,python2-nose))))))
9052
9053 (define-public python-amqp
9054 (package
9055 (name "python-amqp")
9056 (version "2.3.2")
9057 (source
9058 (origin
9059 (method url-fetch)
9060 (uri (pypi-uri "amqp" version))
9061 (sha256
9062 (base32
9063 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
9064 (build-system python-build-system)
9065 (native-inputs
9066 `(("python-case" ,python-case)
9067 ("python-pytest-sugar" ,python-pytest-sugar)
9068 ("python-mock" ,python-mock)))
9069 (propagated-inputs
9070 `(("python-vine" ,python-vine)))
9071 (home-page "https://github.com/celery/py-amqp")
9072 (synopsis
9073 "Low-level AMQP client for Python (fork of amqplib)")
9074 (description
9075 "This is a fork of amqplib which was originally written by Barry Pederson.
9076 It is maintained by the Celery project, and used by kombu as a pure python
9077 alternative when librabbitmq is not available.")
9078 (license license:lgpl2.1+)
9079 (properties `((python2-variant . ,(delay python2-amqp))))))
9080
9081 (define-public python2-amqp
9082 (let ((amqp (package-with-python2
9083 (strip-python2-variant python-amqp))))
9084 (package
9085 (inherit amqp)
9086 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9087 ;; unmaintained. Weirdly, does not do this on the python 3
9088 ;; version?
9089 #:tests? #f
9090 ,@(package-arguments amqp))))))
9091
9092 (define-public python-txamqp
9093 (package
9094 (name "python-txamqp")
9095 (version "0.8.2")
9096 (source
9097 (origin
9098 (method url-fetch)
9099 (uri (pypi-uri "txAMQP" version))
9100 (sha256
9101 (base32
9102 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
9103 (build-system python-build-system)
9104 (propagated-inputs
9105 `(("python-six" ,python-six)
9106 ("python-twisted" ,python-twisted)))
9107 (home-page "https://github.com/txamqp/txamqp")
9108 (synopsis "Communicate with AMQP peers and brokers using Twisted")
9109 (description
9110 "This package provides a Python library for communicating with AMQP peers
9111 and brokers using the asynchronous networking framework Twisted. It contains
9112 all the necessary code to connect, send and receive messages to/from an
9113 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
9114 also includes support for using Thrift RPC over AMQP in Twisted
9115 applications.")
9116 (license license:asl2.0)))
9117
9118 (define-public python2-txamqp
9119 (package-with-python2 python-txamqp))
9120
9121 (define-public python-kombu
9122 (package
9123 (name "python-kombu")
9124 (version "4.2.2")
9125 (source
9126 (origin
9127 (method url-fetch)
9128 (uri (pypi-uri "kombu" version))
9129 (sha256
9130 (base32
9131 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
9132 (build-system python-build-system)
9133 (native-inputs
9134 `(("python-mock" ,python-mock)
9135 ("python-case" ,python-case)
9136 ("python-pyro4" ,python-pyro4)
9137 ("python-pytest-sugar" ,python-pytest-sugar)
9138 ("python-pytz" ,python-pytz)))
9139 (propagated-inputs
9140 `(("python-anyjson" ,python-anyjson)
9141 ("python-amqp" ,python-amqp)
9142 ("python-redis" ,python-redis)))
9143 (home-page "https://kombu.readthedocs.io")
9144 (synopsis "Message passing library for Python")
9145 (description "The aim of Kombu is to make messaging in Python as easy as
9146 possible by providing an idiomatic high-level interface for the AMQ protocol,
9147 and also provide proven and tested solutions to common messaging problems.
9148 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9149 message orientation, queuing, routing, reliability and security, for which the
9150 RabbitMQ messaging server is the most popular implementation.")
9151 (license license:bsd-3)
9152 (properties `((python2-variant . ,(delay python2-kombu))))))
9153
9154 (define-public python2-kombu
9155 (let ((kombu (package-with-python2
9156 (strip-python2-variant python-kombu))))
9157 (package
9158 (inherit kombu)
9159 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9160 ;; It works fine on the python3 variant.
9161 #:tests? #f
9162 ,@(package-arguments kombu)))
9163 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9164 ,@(package-native-inputs kombu))))))
9165
9166 (define-public python-billiard
9167 (package
9168 (name "python-billiard")
9169 (version "3.5.0.5")
9170 (source
9171 (origin
9172 (method url-fetch)
9173 (uri (pypi-uri "billiard" version))
9174 (sha256
9175 (base32
9176 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9177 (build-system python-build-system)
9178 (native-inputs
9179 `(("python-case" ,python-case)
9180 ("python-pytest" ,python-pytest)))
9181 (home-page "https://github.com/celery/billiard")
9182 (synopsis
9183 "Python multiprocessing fork with improvements and bugfixes")
9184 (description
9185 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9186 multiprocessing package itself is a renamed and updated version of R Oudkerk's
9187 pyprocessing package. This standalone variant is intended to be compatible with
9188 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9189 (license license:bsd-3)
9190 (properties `((python2-variant . ,(delay python2-billiard))))))
9191
9192 (define-public python2-billiard
9193 (let ((billiard (package-with-python2
9194 (strip-python2-variant python-billiard))))
9195 (package
9196 (inherit billiard)
9197 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9198 ("python2-mock" ,python2-mock)
9199 ,@(package-native-inputs billiard))))))
9200
9201 (define-public python-celery
9202 (package
9203 (name "python-celery")
9204 (version "4.2.1")
9205 (source
9206 (origin
9207 (method url-fetch)
9208 (uri (pypi-uri "celery" version))
9209 (sha256
9210 (base32
9211 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9212 (build-system python-build-system)
9213 (arguments
9214 '(;; TODO The tests fail with Python 3.7
9215 ;; https://github.com/celery/celery/issues/4849
9216 #:tests? #f
9217 #:phases
9218 (modify-phases %standard-phases
9219 (add-after 'unpack 'patch-requirements
9220 (lambda _
9221 (substitute* "requirements/test.txt"
9222 (("pytest>=3\\.0,<3\\.3")
9223 "pytest>=3.0"))
9224 #t)))))
9225 (native-inputs
9226 `(("python-case" ,python-case)
9227 ("python-pytest" ,python-pytest)))
9228 (propagated-inputs
9229 `(("python-pytz" ,python-pytz)
9230 ("python-billiard" ,python-billiard)
9231 ("python-kombu" ,python-kombu)))
9232 (home-page "https://celeryproject.org")
9233 (synopsis "Distributed Task Queue")
9234 (description "Celery is an asynchronous task queue/job queue based on
9235 distributed message passing. It is focused on real-time operation, but
9236 supports scheduling as well. The execution units, called tasks, are executed
9237 concurrently on a single or more worker servers using multiprocessing,
9238 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9239 synchronously (wait until ready).")
9240 (license license:bsd-3)
9241 (properties `((python2-variant . ,(delay python2-celery))))))
9242
9243 (define-public python2-celery
9244 (let ((celery (package-with-python2
9245 (strip-python2-variant python-celery))))
9246 (package
9247 (inherit celery)
9248 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9249 ("python2-mock" ,python2-mock)
9250 ,@(package-native-inputs celery))))))
9251
9252 (define-public python-translitcodec
9253 (package
9254 (name "python-translitcodec")
9255 (version "0.4.0")
9256 (source
9257 (origin
9258 (method url-fetch)
9259 (uri (pypi-uri "translitcodec" version))
9260 (sha256
9261 (base32
9262 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9263 (build-system python-build-system)
9264 (arguments
9265 `(#:tests? #f)) ; no tests provided
9266 (home-page
9267 "https://github.com/claudep/translitcodec")
9268 (synopsis
9269 "Unicode to 8-bit charset transliteration codec")
9270 (description
9271 "This package contains codecs for transliterating ISO 10646 texts into
9272 best-effort representations using smaller coded character sets (ASCII,
9273 ISO 8859, etc.).")
9274 (license license:expat)))
9275
9276 (define-public python2-translitcodec
9277 (package-with-python2 python-translitcodec))
9278
9279 (define-public python-editor
9280 (package
9281 (name "python-editor")
9282 (version "0.5")
9283 (source
9284 (origin
9285 (method url-fetch)
9286 (uri (pypi-uri "python-editor" version))
9287 (sha256
9288 (base32
9289 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9290 (build-system python-build-system)
9291 (home-page
9292 "https://github.com/fmoo/python-editor")
9293 (synopsis
9294 "Programmatically open an editor, capture the result")
9295 (description
9296 "python-editor is a library that provides the editor module for
9297 programmatically interfacing with your system's $EDITOR.")
9298 (license license:asl2.0)))
9299
9300 (define-public python2-editor
9301 (package-with-python2 python-editor))
9302
9303 (define-public python-vobject
9304 (package
9305 (name "python-vobject")
9306 (version "0.9.5")
9307 (source (origin
9308 (method url-fetch)
9309 (uri (pypi-uri "vobject" version))
9310 (sha256
9311 (base32
9312 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9313 (build-system python-build-system)
9314 (arguments
9315 '(;; The test suite relies on some non-portable Windows interfaces.
9316 #:tests? #f))
9317 (propagated-inputs
9318 `(("python-dateutil" ,python-dateutil)
9319 ("python-pyicu" ,python-pyicu)))
9320 (synopsis "Parse and generate vCard and vCalendar files")
9321 (description "Vobject is intended to be a full featured Python package for
9322 parsing and generating vCard and vCalendar files. Currently, iCalendar files
9323 are supported and well tested. vCard 3.0 files are supported, and all data
9324 should be imported, but only a few components are understood in a sophisticated
9325 way.")
9326 (home-page "http://eventable.github.io/vobject/")
9327 (license license:asl2.0)))
9328
9329 (define-public python2-vobject
9330 (package-with-python2 python-vobject))
9331
9332 (define-public python-munkres
9333 (package
9334 (name "python-munkres")
9335 (version "1.0.8")
9336 (source (origin
9337 (method url-fetch)
9338 (uri (pypi-uri "munkres" version))
9339 (sha256
9340 (base32
9341 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9342 (build-system python-build-system)
9343 (arguments
9344 '(#:tests? #f)) ; no test suite
9345 (home-page "http://software.clapper.org/munkres/")
9346 (synopsis "Implementation of the Munkres algorithm")
9347 (description "The Munkres module provides an implementation of the Munkres
9348 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9349 useful for solving the Assignment Problem.")
9350 (license license:bsd-3)))
9351
9352 (define-public python2-munkres
9353 (package-with-python2 python-munkres))
9354
9355 (define-public python-whoosh
9356 (package
9357 (name "python-whoosh")
9358 (version "2.7.4")
9359 (source
9360 (origin
9361 (method url-fetch)
9362 (uri (pypi-uri "Whoosh" version))
9363 (sha256
9364 (base32
9365 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9366 (build-system python-build-system)
9367 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
9368 (native-inputs
9369 `(("python-pytest" ,python-pytest)))
9370 (home-page "https://bitbucket.org/mchaput/whoosh")
9371 (synopsis "Full text indexing, search, and spell checking library")
9372 (description
9373 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9374 checking library.")
9375 (license license:bsd-2)))
9376
9377 (define-public python2-whoosh
9378 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9379 (package (inherit whoosh)
9380 (propagated-inputs
9381 `(("python2-backport-ssl-match-hostname"
9382 ,python2-backport-ssl-match-hostname)
9383 ,@(package-propagated-inputs whoosh))))))
9384
9385 (define-public python-pathlib
9386 (package
9387 (name "python-pathlib")
9388 (version "1.0.1")
9389 (source (origin
9390 (method url-fetch)
9391 (uri (pypi-uri "pathlib" version))
9392 (sha256
9393 (base32
9394 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9395 (build-system python-build-system)
9396 ;; The tests depend on the internal "test" module, which does not provide
9397 ;; a stable interface.
9398 (arguments `(#:tests? #f))
9399 (home-page "https://pathlib.readthedocs.org/")
9400 (synopsis "Object-oriented file system paths")
9401 (description "Pathlib offers a set of classes to handle file system paths.
9402 It offers the following advantages over using string objects:
9403
9404 @enumerate
9405 @item No more cumbersome use of os and os.path functions. Everything can
9406 be done easily through operators, attribute accesses, and method calls.
9407 @item Embodies the semantics of different path types. For example,
9408 comparing Windows paths ignores casing.
9409 @item Well-defined semantics, eliminating any inconsistencies or
9410 ambiguities (forward vs. backward slashes, etc.).
9411 @end enumerate
9412
9413 Note: In Python 3.4, pathlib is now part of the standard library. For other
9414 Python versions please consider python-pathlib2 instead, which tracks the
9415 standard library module. This module (python-pathlib) isn't maintained
9416 anymore.")
9417 (license license:expat)))
9418
9419 (define-public python2-pathlib
9420 (package-with-python2 python-pathlib))
9421
9422 (define-public python2-pathlib2
9423 (package
9424 (name "python2-pathlib2")
9425 (version "2.3.3")
9426 (source (origin
9427 (method url-fetch)
9428 (uri (pypi-uri "pathlib2" version))
9429 (sha256
9430 (base32
9431 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
9432 (build-system python-build-system)
9433 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9434 ;; version is 3.4 which already includes this package as part of the
9435 ;; standard library.
9436 (arguments
9437 `(#:python ,python-2))
9438 (propagated-inputs
9439 `(("python2-scandir" ,python2-scandir)
9440 ("python2-six" ,python2-six)))
9441 (home-page "https://pypi.python.org/pypi/pathlib2/")
9442 (synopsis "Object-oriented file system paths - backport of standard
9443 pathlib module")
9444 (description "The goal of pathlib2 is to provide a backport of standard
9445 pathlib module which tracks the standard library module, so all the newest
9446 features of the standard pathlib can be used also on older Python versions.
9447
9448 Pathlib offers a set of classes to handle file system paths. It offers the
9449 following advantages over using string objects:
9450
9451 @enumerate
9452 @item No more cumbersome use of os and os.path functions. Everything can
9453 be done easily through operators, attribute accesses, and method calls.
9454 @item Embodies the semantics of different path types. For example,
9455 comparing Windows paths ignores casing.
9456 @item Well-defined semantics, eliminating any inconsistencies or
9457 ambiguities (forward vs. backward slashes, etc.).
9458 @end enumerate")
9459 (license license:expat)))
9460
9461 (define-public python2-pathlib2-bootstrap
9462 (hidden-package
9463 (package
9464 (inherit python2-pathlib2)
9465 (name "python2-pathlib2-bootstrap")
9466 (propagated-inputs
9467 `(("python2-scandir" ,python2-scandir)
9468 ("python2-six" ,python2-six-bootstrap))))))
9469
9470 (define-public python-jellyfish
9471 (package
9472 (name "python-jellyfish")
9473 (version "0.5.6")
9474 (source (origin
9475 (method url-fetch)
9476 (uri (pypi-uri "jellyfish" version))
9477 (sha256
9478 (base32
9479 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9480 (build-system python-build-system)
9481 (native-inputs
9482 `(("python-pytest" ,python-pytest)))
9483 (home-page "https://github.com/jamesturk/jellyfish")
9484 (synopsis "Approximate and phonetic matching of strings")
9485 (description "Jellyfish uses a variety of string comparison and phonetic
9486 encoding algorithms to do fuzzy string matching.")
9487 (license license:bsd-2)
9488 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9489
9490 (define-public python2-jellyfish
9491 (let ((jellyfish (package-with-python2
9492 (strip-python2-variant python-jellyfish))))
9493 (package (inherit jellyfish)
9494 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9495 ,@(package-native-inputs jellyfish))))))
9496
9497 (define-public python2-unicodecsv
9498 (package
9499 (name "python2-unicodecsv")
9500 (version "0.14.1")
9501 (source (origin
9502 (method git-fetch)
9503 ;; The test suite is not included in the PyPi release.
9504 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9505 (uri (git-reference
9506 (url "https://github.com/jdunck/python-unicodecsv")
9507 (commit version)))
9508 (file-name (git-file-name name version))
9509 (sha256
9510 (base32
9511 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
9512 (build-system python-build-system)
9513 (arguments
9514 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9515 #:python ,python-2))
9516 (native-inputs
9517 `(("python2-unittest2" ,python2-unittest2)))
9518 (home-page "https://github.com/jdunck/python-unicodecsv")
9519 (synopsis "Unicode CSV module for Python 2")
9520 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9521 module, adding support for Unicode strings.")
9522 (license license:bsd-2)))
9523
9524 (define-public python-rarfile
9525 (package
9526 (name "python-rarfile")
9527 (version "2.8")
9528 (source (origin
9529 (method url-fetch)
9530 (uri (pypi-uri "rarfile" version))
9531 (sha256
9532 (base32
9533 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9534 (build-system python-build-system)
9535 (arguments
9536 '(#:phases
9537 (modify-phases %standard-phases
9538 (replace 'check
9539 ;; Many tests fail, but the installation proceeds.
9540 (lambda _ (invoke "make" "-C" "test" "test"))))))
9541 (native-inputs
9542 `(("which" ,which))) ; required for tests
9543 (propagated-inputs
9544 `(("libarchive" ,libarchive)))
9545 (home-page "https://github.com/markokr/rarfile")
9546 (synopsis "RAR archive reader for Python")
9547 (description "This is Python module for RAR archive reading. The interface
9548 is made as zipfile like as possible.")
9549 (license license:isc)))
9550
9551 (define-public python2-rarfile
9552 (package-with-python2 python-rarfile))
9553
9554 (define-public python-magic
9555 (package
9556 (name "python-magic")
9557 (version "0.4.15")
9558 (source
9559 (origin
9560 (method url-fetch)
9561 (uri (pypi-uri "python-magic" version))
9562 (sha256
9563 (base32
9564 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9565 (file-name (string-append name "-" version "-checkout"))))
9566 (build-system python-build-system)
9567 (arguments
9568 ;; The tests are unreliable, so don't run them. The tests fail
9569 ;; under Python3 because they were written for Python2 and
9570 ;; contain import statements that do not work in Python3. One of
9571 ;; the tests fails under Python2 because its assertions are
9572 ;; overly stringent; it relies on comparing output strings which
9573 ;; are brittle and can change depending on the version of
9574 ;; libmagic being used and the system on which the test is
9575 ;; running. In my case, under GuixSD 0.10.0, only one test
9576 ;; failed, and it seems to have failed only because the version
9577 ;; of libmagic that is packaged in Guix outputs a slightly
9578 ;; different (but not wrong) string than the one that the test
9579 ;; expected.
9580 '(#:tests? #f
9581 #:phases (modify-phases %standard-phases
9582 ;; Replace a specific method call with a hard-coded
9583 ;; path to the necessary libmagic.so file in the
9584 ;; store. If we don't do this, then the method call
9585 ;; will fail to find the libmagic.so file, which in
9586 ;; turn will cause any application using
9587 ;; python-magic to fail.
9588 (add-before 'build 'hard-code-path-to-libmagic
9589 (lambda* (#:key inputs #:allow-other-keys)
9590 (let ((file (assoc-ref inputs "file")))
9591 (substitute* "magic.py"
9592 (("ctypes.util.find_library\\('magic'\\)")
9593 (string-append "'" file "/lib/libmagic.so'")))
9594 #t)))
9595 (add-before 'install 'disable-egg-compression
9596 (lambda _
9597 (let ((port (open-file "setup.cfg" "a")))
9598 (display "\n[easy_install]\nzip_ok = 0\n"
9599 port)
9600 (close-port port)
9601 #t))))))
9602 (inputs
9603 ;; python-magic needs to be able to find libmagic.so.
9604 `(("file" ,file)))
9605 (home-page
9606 "https://github.com/ahupp/python-magic")
9607 (synopsis
9608 "File type identification using libmagic")
9609 (description
9610 "This module uses ctypes to access the libmagic file type
9611 identification library. It makes use of the local magic database and
9612 supports both textual and MIME-type output. Note that this module and
9613 the python-file module both provide a \"magic.py\" file; these two
9614 modules, which are different and were developed separately, both serve
9615 the same purpose: to provide Python bindings for libmagic.")
9616 (license license:expat)))
9617
9618 (define-public python2-magic
9619 (package-with-python2 python-magic))
9620
9621 (define-public python2-s3cmd
9622 (package
9623 (name "python2-s3cmd")
9624 (version "1.6.1")
9625 (source
9626 (origin
9627 (method url-fetch)
9628 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9629 "s3cmd-" version ".tar.gz"))
9630 (sha256
9631 (base32
9632 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9633 (build-system python-build-system)
9634 (arguments
9635 ;; s3cmd is written for python2 only and contains no tests.
9636 `(#:python ,python-2
9637 #:tests? #f))
9638 (propagated-inputs
9639 `(("python2-dateutil" ,python2-dateutil)
9640 ;; The python-file package also provides a magic.py module.
9641 ;; This is an unfortunate state of affairs; however, s3cmd
9642 ;; fails to install if it cannot find specifically the
9643 ;; python-magic package. Thus we include it, instead of using
9644 ;; python-file. Ironically, s3cmd sometimes works better
9645 ;; without libmagic bindings at all:
9646 ;; https://github.com/s3tools/s3cmd/issues/198
9647 ("python2-magic" ,python2-magic)))
9648 (home-page "http://s3tools.org/s3cmd")
9649 (synopsis "Command line tool for S3-compatible storage services")
9650 (description
9651 "S3cmd is a command line tool for uploading, retrieving and managing data
9652 in storage services that are compatible with the Amazon Simple Storage
9653 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9654 GnuPG encryption, and more. It also supports management of Amazon's
9655 CloudFront content delivery network.")
9656 (license license:gpl2+)))
9657
9658 (define-public python-pkgconfig
9659 (package
9660 (name "python-pkgconfig")
9661 (version "1.3.1")
9662 (source
9663 (origin
9664 (method url-fetch)
9665 (uri (pypi-uri "pkgconfig" version))
9666 (sha256
9667 (base32
9668 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9669 (build-system python-build-system)
9670 (native-inputs
9671 `(("python-nose" ,python-nose)))
9672 (inputs
9673 `(("pkg-config" ,pkg-config)))
9674 (arguments
9675 `(#:phases
9676 (modify-phases %standard-phases
9677 (add-before 'build 'patch
9678 ;; Hard-code the path to pkg-config.
9679 (lambda _
9680 (substitute* "pkgconfig/pkgconfig.py"
9681 (("cmd = 'pkg-config")
9682 (string-append "cmd = '" (which "pkg-config"))))
9683 #t))
9684 (replace 'check
9685 (lambda _
9686 (invoke "nosetests" "test.py"))))))
9687 (home-page "https://github.com/matze/pkgconfig")
9688 (synopsis "Python interface for pkg-config")
9689 (description "This module provides a Python interface to pkg-config. It
9690 can be used to find all pkg-config packages, check if a package exists,
9691 check if a package meets certain version requirements, query CFLAGS and
9692 LDFLAGS and parse the output to build extensions with setup.py.")
9693 (license license:expat)))
9694
9695 (define-public python2-pkgconfig
9696 (package-with-python2 python-pkgconfig))
9697
9698 (define-public python-bz2file
9699 (package
9700 (name "python-bz2file")
9701 (version "0.98")
9702 (source
9703 (origin
9704 (method url-fetch)
9705 (uri (pypi-uri "bz2file" version))
9706 (sha256
9707 (base32
9708 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9709 (build-system python-build-system)
9710 (arguments
9711 `(#:tests? #f)) ; Tests use deprecated python modules.
9712 (home-page "https://github.com/nvawda/bz2file")
9713 (synopsis "Read and write bzip2-compressed files")
9714 (description
9715 "Bz2file is a Python library for reading and writing bzip2-compressed
9716 files. It contains a drop-in replacement for the I/O interface in the
9717 standard library's @code{bz2} module, including features from the latest
9718 development version of CPython that are not available in older releases.")
9719 (license license:asl2.0)))
9720
9721 (define-public python2-bz2file
9722 (package-with-python2 python-bz2file))
9723
9724 (define-public python-future
9725 (package
9726 (name "python-future")
9727 (version "0.17.1")
9728 (source
9729 (origin
9730 (method url-fetch)
9731 (uri (pypi-uri "future" version))
9732 (sha256
9733 (base32
9734 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
9735 (build-system python-build-system)
9736 ;; Many tests connect to the network or are otherwise flawed.
9737 ;; https://github.com/PythonCharmers/python-future/issues/210
9738 (arguments
9739 `(#:tests? #f))
9740 (home-page "http://python-future.org")
9741 (synopsis "Single-source support for Python 3 and 2")
9742 (description
9743 "@code{python-future} is the missing compatibility layer between Python 2 and
9744 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9745 to support both Python 2 and Python 3 with minimal overhead.")
9746 (license license:expat)))
9747
9748 (define-public python2-future
9749 (package-with-python2 python-future))
9750
9751 (define-public python-cysignals
9752 (package
9753 (name "python-cysignals")
9754 (version "1.9.0")
9755 (source
9756 (origin
9757 (method url-fetch)
9758 (uri (pypi-uri "cysignals" version))
9759 (sha256
9760 (base32
9761 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
9762 (build-system python-build-system)
9763 (native-inputs
9764 `(("python-cython" ,python-cython)
9765 ("python-sphinx" ,python-sphinx)))
9766 (inputs
9767 `(("pari-gp" ,pari-gp)))
9768 (arguments
9769 `(#:modules ((guix build python-build-system)
9770 ((guix build gnu-build-system) #:prefix gnu:)
9771 (guix build utils))
9772 ;; FIXME: Tests are executed after installation and currently fail
9773 ;; when not installing into standard locations; the author is working
9774 ;; on a fix.
9775 #:tests? #f
9776 #:phases
9777 (modify-phases %standard-phases
9778 (add-before
9779 'build 'configure
9780 (assoc-ref gnu:%standard-phases 'configure)))))
9781 (home-page
9782 "https://github.com/sagemath/cysignals")
9783 (synopsis
9784 "Handling of interrupts and signals for Cython")
9785 (description
9786 "The cysignals package provides mechanisms to handle interrupts (and
9787 other signals and errors) in Cython code, using two related approaches,
9788 for mixed Cython/Python code or external C libraries and pure Cython code,
9789 respectively.")
9790 (license license:lgpl3+)))
9791
9792 (define-public python2-cysignals
9793 (package-with-python2 python-cysignals))
9794
9795 (define-public python2-shedskin
9796 (package
9797 (name "python2-shedskin")
9798 (version "0.9.4")
9799 (source
9800 (origin
9801 (method url-fetch)
9802 (uri (string-append "https://github.com/shedskin/shedskin/"
9803 "releases/download/v" version
9804 "/shedskin-" version ".tgz"))
9805 (sha256
9806 (base32
9807 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9808 (build-system python-build-system)
9809 (arguments
9810 `(#:python ,python-2
9811 #:phases (modify-phases %standard-phases
9812 (add-after 'unpack 'fix-resulting-include-libs
9813 (lambda* (#:key inputs #:allow-other-keys)
9814 (let ((libgc (assoc-ref inputs "libgc"))
9815 (pcre (assoc-ref inputs "pcre")))
9816 (substitute* "shedskin/makefile.py"
9817 (("variable == 'CCFLAGS':[ ]*")
9818 (string-append "variable == 'CCFLAGS':\n"
9819 " line += ' -I " pcre "/include"
9820 " -I " libgc "/include'"))
9821 (("variable == 'LFLAGS':[ ]*")
9822 (string-append "variable == 'LFLAGS':\n"
9823 " line += ' -L" pcre "/lib"
9824 " -L " libgc "/lib'")))
9825 #t))))))
9826 (inputs `(("pcre" ,pcre)
9827 ("libgc" ,libgc)))
9828 (home-page "https://shedskin.github.io/")
9829 (synopsis "Experimental Python-2 to C++ Compiler")
9830 (description (string-append "This is an experimental compiler for a subset of
9831 Python. It generates C++ code and a Makefile."))
9832 (license (list license:gpl3 license:bsd-3 license:expat))))
9833
9834 (define-public python2-rope
9835 (package
9836 (name "python2-rope")
9837 (version "0.11.0")
9838 (source
9839 (origin
9840 (method url-fetch)
9841 (uri (pypi-uri "rope" version))
9842 (sha256
9843 (base32
9844 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
9845 (arguments
9846 ;; Rope has only partial python3 support, see `python-rope'
9847 `(#:python ,python-2))
9848 (build-system python-build-system)
9849 (native-inputs
9850 `(("python2-unittest2" ,python2-unittest2)))
9851 (home-page "https://github.com/python-rope/rope")
9852 (synopsis "Refactoring library for Python")
9853 (description "Rope is a refactoring library for Python. It facilitates
9854 the renaming, moving and extracting of attributes, functions, modules, fields
9855 and parameters in Python 2 source code. These refactorings can also be applied
9856 to occurrences in strings and comments.")
9857 (license license:gpl2)))
9858
9859 (define-public python-rope
9860 (package
9861 (inherit python2-rope)
9862 (name "python-rope")
9863 (arguments `(#:python ,python-wrapper
9864 ;; XXX: Only partial python3 support, results in some failing
9865 ;; tests: <https://github.com/python-rope/rope/issues/247>.
9866 #:tests? #f))
9867 (properties `((python2-variant . ,(delay python2-rope))))))
9868
9869 (define-public python-py3status
9870 (package
9871 (name "python-py3status")
9872 (version "3.21")
9873 (source
9874 (origin
9875 (method url-fetch)
9876 (uri (pypi-uri "py3status" version))
9877 (sha256
9878 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
9879 (build-system python-build-system)
9880 (inputs
9881 `(("file" ,file)))
9882 (arguments
9883 '(#:phases
9884 (modify-phases %standard-phases
9885 ;; 'file' is used for detection of configuration file encoding
9886 ;; let's make link the dependency to particular input
9887 (add-before 'build 'patch-file-path
9888 (lambda* (#:key inputs #:allow-other-keys)
9889 (let ((file-path (assoc-ref inputs "file")))
9890 (substitute* "py3status/parse_config.py"
9891 (("\\[\"file\", \"-b\"")
9892 (string-append "['" file-path "/bin/file', '-b'")))
9893 #t))))
9894 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9895 (home-page "https://github.com/ultrabug/py3status")
9896 (synopsis "Extensible i3status wrapper written in Python")
9897 (description "py3status is an i3status wrapper which extends i3status
9898 functionality in a modular way, allowing you to extend your panel with your
9899 own code, responding to click events and updating clock every second.")
9900 (license license:bsd-3)))
9901
9902 (define-public python-tblib
9903 (package
9904 (name "python-tblib")
9905 (version "1.3.2")
9906 (source (origin
9907 (method url-fetch)
9908 (uri (pypi-uri "tblib" version))
9909 (sha256 (base32
9910 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9911 (build-system python-build-system)
9912 (arguments
9913 `(#:phases
9914 (modify-phases %standard-phases
9915 (add-before 'check 'adjust-tests
9916 (lambda _
9917 (when (which "python3")
9918 ;; Adjust the example output to match that of Python 3.7:
9919 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
9920 (substitute* "README.rst"
9921 (("Exception\\('fail',") "Exception('fail'"))
9922 #t)))
9923 (replace 'check
9924 (lambda _
9925 ;; Upstream runs tests after installation and the package itself
9926 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9927 ;; found.
9928 (setenv "PYTHONPATH"
9929 (string-append (getcwd) "/build/lib:"
9930 (getenv "PYTHONPATH")))
9931 (invoke "py.test" "-vv" "tests" "README.rst"))))))
9932 (native-inputs
9933 `(("python-pytest" ,python-pytest)
9934 ("python-six" ,python-six)))
9935 (home-page "https://github.com/ionelmc/python-tblib")
9936 (synopsis "Traceback serialization library")
9937 (description
9938 "Traceback serialization allows you to:
9939
9940 @enumerate
9941 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
9942 different processes. This allows better error handling when running code over
9943 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9944
9945 @item Parse traceback strings and raise with the parsed tracebacks.
9946 @end enumerate\n")
9947 (license license:bsd-3)))
9948
9949 (define-public python2-tblib
9950 (package-with-python2 python-tblib))
9951
9952 (define-public python-greenlet
9953 (package
9954 (name "python-greenlet")
9955 (version "0.4.15")
9956 (source (origin
9957 (method url-fetch)
9958 (uri (pypi-uri "greenlet" version))
9959 (sha256
9960 (base32
9961 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
9962 (build-system python-build-system)
9963 (home-page "https://greenlet.readthedocs.io/")
9964 (synopsis "Lightweight in-process concurrent programming")
9965 (description
9966 "Greenlet package is a spin-off of Stackless, a version of CPython
9967 that supports micro-threads called \"tasklets\". Tasklets run
9968 pseudo-concurrently (typically in a single or a few OS-level threads) and
9969 are synchronized with data exchanges on \"channels\".")
9970 (license (list license:psfl license:expat))))
9971
9972 (define-public python2-greenlet
9973 (package-with-python2 python-greenlet))
9974
9975 (define-public python-objgraph
9976 (package
9977 (name "python-objgraph")
9978 (version "3.4.0")
9979 (source
9980 (origin
9981 (method url-fetch)
9982 (uri (pypi-uri "objgraph" version))
9983 (sha256
9984 (base32
9985 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
9986 (build-system python-build-system)
9987 (propagated-inputs
9988 `(("python-graphviz" ,python-graphviz)))
9989 (native-inputs
9990 `(("python-mock" ,python-mock)
9991 ("graphviz" ,graphviz)))
9992 (home-page "https://mg.pov.lt/objgraph/")
9993 (synopsis "Draw Python object reference graphs with graphviz")
9994 (description
9995 "This package provides tools to draw Python object reference graphs with
9996 graphviz.")
9997 (license license:expat)))
9998
9999 (define-public python-gevent
10000 (package
10001 (name "python-gevent")
10002 (version "1.3.7")
10003 (source (origin
10004 (method url-fetch)
10005 (uri (pypi-uri "gevent" version))
10006 (sha256
10007 (base32
10008 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
10009 (modules '((guix build utils)))
10010 (snippet
10011 '(begin
10012 ;; unbunding libev and c-ares
10013 (delete-file-recursively "deps")
10014 #t))))
10015 (build-system python-build-system)
10016 (arguments
10017 `(#:modules ((ice-9 ftw)
10018 (ice-9 match)
10019 (srfi srfi-26)
10020 (guix build utils)
10021 (guix build python-build-system))
10022 #:phases (modify-phases %standard-phases
10023 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
10024 (lambda _
10025 (substitute* "src/gevent/subprocess.py"
10026 (("/bin/sh") (which "sh")))
10027 (for-each (lambda (file)
10028 (substitute* file
10029 (("/bin/sh") (which "sh"))
10030 (("/bin/true") (which "true"))))
10031 (find-files "src/greentest" "\\.py$"))
10032 #t))
10033 (add-before 'build 'do-not-use-bundled-sources
10034 (lambda* (#:key inputs #:allow-other-keys)
10035 (setenv "CONFIG_SHELL" (which "bash"))
10036 (setenv "LIBEV_EMBED" "false")
10037 (setenv "CARES_EMBED" "false")
10038 (setenv "EMBED" "false")
10039
10040 ;; Prevent building bundled libev.
10041 (substitute* "setup.py"
10042 (("run_make=_BUILDING")
10043 "run_make=False"))
10044
10045 (let ((greenlet (string-append
10046 (assoc-ref inputs "python-greenlet")
10047 "/include")))
10048 (match (scandir greenlet
10049 (lambda (item)
10050 (string-prefix? "python" item)))
10051 ((python)
10052 (setenv "C_INCLUDE_PATH"
10053 (string-append greenlet "/" python)))))
10054 #t))
10055 (add-before 'check 'skip-timer-test
10056 (lambda _
10057 ;; XXX: Skip 'TestTimerResolution', which appears to be
10058 ;; unreliable.
10059 (substitute* "src/greentest/test__core_timer.py"
10060 (("not greentest.RUNNING_ON_CI") "False"))
10061 #t))
10062 (replace 'check
10063 (lambda _
10064 ;; Make sure the build directory is on PYTHONPATH.
10065 (setenv "PYTHONPATH"
10066 (string-append
10067 (getenv "PYTHONPATH") ":"
10068 (getcwd) "/build/"
10069 (car (scandir "build" (cut string-prefix? "lib." <>)))))
10070 (with-directory-excursion "src/greentest"
10071 ;; XXX: Many tests require network access. Instead we only
10072 ;; run known-good tests. Unfortunately we cannot use
10073 ;; recursion here since this directory also contains
10074 ;; Python-version-specific subfolders.
10075 (apply invoke "python" "testrunner.py" "--config"
10076 "known_failures.py"
10077 (scandir "." (cut regexp-exec
10078 (make-regexp "test_+(subprocess|core)")
10079 <>)))))))))
10080 (propagated-inputs
10081 `(("python-greenlet" ,python-greenlet)
10082 ("python-objgraph" ,python-objgraph)))
10083 (native-inputs
10084 `(("python-six" ,python-six)))
10085 (inputs
10086 `(("c-ares" ,c-ares)
10087 ("libev" ,libev)))
10088 (home-page "http://www.gevent.org/")
10089 (synopsis "Coroutine-based network library")
10090 (description
10091 "gevent is a coroutine-based Python networking library that uses greenlet
10092 to provide a high-level synchronous API on top of the libev event loop.")
10093 (license license:expat)
10094 (properties `((python2-variant . ,(delay python2-gevent))))))
10095
10096 (define-public python2-gevent
10097 (let ((base (package-with-python2
10098 (strip-python2-variant python-gevent))))
10099 (package
10100 (inherit base)
10101 (native-inputs `(,@(package-native-inputs python-gevent)
10102 ("python-mock" ,python2-mock))))))
10103
10104 (define-public python-fastimport
10105 (package
10106 (name "python-fastimport")
10107 (version "0.9.6")
10108 (source
10109 (origin
10110 (method url-fetch)
10111 (uri (pypi-uri "fastimport" version))
10112 (sha256
10113 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10114 (build-system python-build-system)
10115 (home-page "https://github.com/jelmer/python-fastimport")
10116 (synopsis "VCS fastimport parser and generator in Python")
10117 (description "This package provides a parser for and generator of the Git
10118 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
10119 format.")
10120 (license license:gpl2+)))
10121
10122 (define-public python2-fastimport
10123 (package-with-python2 python-fastimport))
10124
10125 (define-public python-twisted
10126 (package
10127 (name "python-twisted")
10128 (version "19.7.0")
10129 (source (origin
10130 (method url-fetch)
10131 (uri (pypi-uri "Twisted" version ".tar.bz2"))
10132 (sha256
10133 (base32
10134 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
10135 (build-system python-build-system)
10136 (arguments
10137 '(#:tests? #f)) ; FIXME: some tests fail
10138 (propagated-inputs
10139 `(("python-zope-interface" ,python-zope-interface)
10140 ("python-pyhamcrest" ,python-pyhamcrest)
10141 ("python-incremental" ,python-incremental)
10142 ("python-hyperlink" ,python-hyperlink)
10143 ("python-constantly" ,python-constantly)
10144 ("python-automat" ,python-automat)))
10145 (home-page "https://twistedmatrix.com/")
10146 (synopsis "Asynchronous networking framework written in Python")
10147 (description
10148 "Twisted is an extensible framework for Python programming, with special
10149 focus on event-based network programming and multiprotocol integration.")
10150 (license license:expat)))
10151
10152 (define-public python2-twisted
10153 (package-with-python2 python-twisted))
10154
10155 (define-public python-pika
10156 (package
10157 (name "python-pika")
10158 (version "0.12.0")
10159 (source
10160 (origin
10161 (method url-fetch)
10162 (uri (pypi-uri "pika" version))
10163 (sha256
10164 (base32
10165 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10166 (build-system python-build-system)
10167 (native-inputs
10168 `(("python-pyev" ,python-pyev)
10169 ("python-tornado" ,python-tornado)
10170 ("python-twisted" ,python-twisted)))
10171 (home-page "https://pika.readthedocs.org")
10172 (synopsis "Pure Python AMQP Client Library")
10173 (description
10174 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10175 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10176 network support library.")
10177 (license license:bsd-3)))
10178
10179 (define-public python2-pika
10180 (package-with-python2 python-pika))
10181
10182 (define-public python-ply
10183 (package
10184 (name "python-ply")
10185 (version "3.10")
10186 (source
10187 (origin
10188 (method url-fetch)
10189 (uri (pypi-uri "ply" version))
10190 (sha256
10191 (base32
10192 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10193 (build-system python-build-system)
10194 (home-page "http://www.dabeaz.com/ply/")
10195 (synopsis "Python Lex & Yacc")
10196 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10197 It uses LR parsing and does extensive error checking.")
10198 (license license:bsd-3)))
10199
10200 (define-public python2-ply
10201 (package-with-python2 python-ply))
10202
10203 (define-public python-tabulate
10204 (package
10205 (name "python-tabulate")
10206 (version "0.7.7")
10207 (source (origin
10208 (method url-fetch)
10209 (uri (pypi-uri "tabulate" version))
10210 (sha256
10211 (base32
10212 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10213 (build-system python-build-system)
10214 (arguments
10215 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10216 ;; and the latest release is not tagged in the upstream repository.
10217 '(#:tests? #f))
10218 (home-page "https://bitbucket.org/astanin/python-tabulate")
10219 (synopsis "Pretty-print tabular data")
10220 (description
10221 "Tabulate is a library and command-line utility to pretty-print tabular
10222 data in Python.")
10223 (license license:expat)))
10224
10225 (define-public python2-tabulate
10226 (package-with-python2 python-tabulate))
10227
10228 (define-public python-kazoo
10229 (package
10230 (name "python-kazoo")
10231 (version "2.4.0")
10232 (source
10233 (origin
10234 (method url-fetch)
10235 (uri (pypi-uri "kazoo" version))
10236 (sha256
10237 (base32
10238 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10239 (build-system python-build-system)
10240 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10241 (propagated-inputs
10242 `(("python-six" ,python-six)))
10243 (home-page "https://kazoo.readthedocs.org")
10244 (synopsis "High-level Zookeeper client library")
10245 (description
10246 "Kazoo is a Python client library for the Apache Zookeeper distributed
10247 application service. It is designed to be easy to use and to avoid common
10248 programming errors.")
10249 (license license:asl2.0)))
10250
10251 (define-public python2-kazoo
10252 (package-with-python2 python-kazoo))
10253
10254 (define-public python-pykafka
10255 (package
10256 (name "python-pykafka")
10257 (version "2.4.0")
10258 (source (origin
10259 (method url-fetch)
10260 (uri (pypi-uri "pykafka" version))
10261 (sha256
10262 (base32
10263 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10264 (build-system python-build-system)
10265 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10266 (propagated-inputs
10267 `(("python-gevent" ,python-gevent)
10268 ("python-kazoo" ,python-kazoo)
10269 ("python-tabulate" ,python-tabulate)))
10270 (inputs
10271 `(("librdkafka" ,librdkafka)))
10272 (home-page "https://pykafka.readthedocs.io/")
10273 (synopsis "Apache Kafka client for Python")
10274 (description
10275 "PyKafka is a client for the Apache Kafka distributed messaging system.
10276 It includes Python implementations of Kafka producers and consumers, which
10277 are optionally backed by a C extension built on librdkafka.")
10278 (license license:asl2.0)))
10279
10280 (define-public python2-pykafka
10281 (package-with-python2 python-pykafka))
10282
10283 (define-public python-wcwidth
10284 (package
10285 (name "python-wcwidth")
10286 (version "0.1.8")
10287 (source (origin
10288 (method url-fetch)
10289 (uri (pypi-uri "wcwidth" version))
10290 (sha256
10291 (base32
10292 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
10293 (build-system python-build-system)
10294 (home-page "https://github.com/jquast/wcwidth")
10295 (synopsis "Measure number of terminal column cells of wide-character codes")
10296 (description "Wcwidth measures the number of terminal column cells of
10297 wide-character codes. It is useful for those implementing a terminal emulator,
10298 or programs that carefully produce output to be interpreted by one. It is a
10299 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10300 specified in POSIX.1-2001 and POSIX.1-2008.")
10301 (license license:expat)))
10302
10303 (define-public python2-wcwidth
10304 (package-with-python2 python-wcwidth))
10305
10306 (define-public python2-jsonrpclib
10307 (package
10308 (name "python2-jsonrpclib")
10309 (version "0.1.7")
10310 (source (origin
10311 (method url-fetch)
10312 (uri (pypi-uri "jsonrpclib" version))
10313 (sha256
10314 (base32
10315 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10316 (build-system python-build-system)
10317 (arguments
10318 `(#:tests? #f
10319 #:python ,python-2))
10320 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10321 (synopsis "Implementation of JSON-RPC specification for Python")
10322 (description
10323 "This library is an implementation of the JSON-RPC specification.
10324 It supports both the original 1.0 specification, as well as the
10325 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10326 etc.")
10327 (license license:asl2.0)))
10328
10329 (define-public python-chai
10330 (package
10331 (name "python-chai")
10332 (version "1.1.2")
10333 (source (origin
10334 (method url-fetch)
10335 (uri (pypi-uri "chai" version))
10336 (sha256
10337 (base32
10338 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10339 (build-system python-build-system)
10340 (home-page "https://github.com/agoragames/chai")
10341 (synopsis "Mocking framework for Python")
10342 (description
10343 "Chai provides an api for mocking, stubbing and spying your python
10344 objects, patterned after the Mocha library for Ruby.")
10345 (license license:bsd-3)))
10346
10347 (define-public python2-chai
10348 (package-with-python2 python-chai))
10349
10350 (define-public python-inflection
10351 (package
10352 (name "python-inflection")
10353 (version "0.3.1")
10354 (source
10355 (origin (method url-fetch)
10356 (uri (pypi-uri "inflection" version))
10357 (sha256
10358 (base32
10359 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10360 (build-system python-build-system)
10361 (native-inputs
10362 `(("python-pytest" ,python-pytest)))
10363 (home-page "https://github.com/jpvanhal/inflection")
10364 (synopsis "Python string transformation library")
10365 (description
10366 "Inflection is a string transformation library. It singularizes
10367 and pluralizes English words, and transforms strings from CamelCase to
10368 underscored string.")
10369 (license license:expat)))
10370
10371 (define-public python2-inflection
10372 (package-with-python2 python-inflection))
10373
10374 (define-public python-pylev
10375 (package
10376 (name "python-pylev")
10377 (version "1.3.0")
10378 (source (origin
10379 (method url-fetch)
10380 (uri (pypi-uri "pylev" version))
10381 (sha256
10382 (base32
10383 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10384 (build-system python-build-system)
10385 (home-page "https://github.com/toastdriven/pylev")
10386 (synopsis "Levenshtein distance implementation in Python")
10387 (description "Pure Python Levenshtein implementation, based off the
10388 Wikipedia code samples at
10389 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10390 (license license:bsd-3)))
10391
10392 (define-public python2-pylev
10393 (package-with-python2 python-pylev))
10394
10395 (define-public python-cleo
10396 (package
10397 (name "python-cleo")
10398 (version "0.6.8")
10399 (source (origin
10400 (method url-fetch)
10401 (uri (pypi-uri "cleo" version))
10402 (sha256
10403 (base32
10404 "06zp695hq835rkaq6irr1ds1dp2qfzyf32v60vxpd8rcnxv319l5"))))
10405 (build-system python-build-system)
10406 (native-inputs
10407 `( ;; For testing
10408 ("python-mock" ,python-mock)
10409 ("python-pytest-mock" ,python-pytest-mock)
10410 ("python-pytest" ,python-pytest)))
10411 (propagated-inputs
10412 `(("python-backpack" ,python-backpack)
10413 ("python-pastel" ,python-pastel)
10414 ("python-pylev" ,python-pylev)))
10415 (home-page "https://github.com/sdispater/cleo")
10416 (synopsis "Command-line arguments library for Python")
10417 (description
10418 "Cleo allows you to create command-line commands with signature in
10419 docstring and colored output.")
10420 (license license:expat)))
10421
10422 (define-public python2-cleo
10423 (package-with-python2 python-cleo))
10424
10425 (define-public python-tomlkit
10426 (package
10427 (name "python-tomlkit")
10428 (version "0.5.7")
10429 (source
10430 (origin
10431 (method url-fetch)
10432 (uri (pypi-uri "tomlkit" version))
10433 (sha256
10434 (base32
10435 "18820ga5z3if1w8dvykxrfm000akracq01ic402xrbljgbn5grn4"))))
10436 (build-system python-build-system)
10437 (native-inputs
10438 `(("python-pytest" ,python-pytest)))
10439 (home-page
10440 "https://github.com/sdispater/tomlkit")
10441 (synopsis "Style preserving TOML library")
10442 (description
10443 "TOML Kit is a 0.5.0-compliant TOML library. It includes a parser that
10444 preserves all comments, indentations, whitespace and internal element ordering,
10445 and makes them accessible and editable via an intuitive API. It can also
10446 create new TOML documents from scratch using the provided helpers. Part of the
10447 implementation as been adapted, improved and fixed from Molten.")
10448 (license license:expat)))
10449
10450 (define-public python-shellingham
10451 (package
10452 (name "python-shellingham")
10453 (version "1.3.1")
10454 (source
10455 (origin
10456 (method url-fetch)
10457 (uri (pypi-uri "shellingham" version))
10458 (sha256
10459 (base32
10460 "1q7kws7w4x2hji3g7y0ni9ddk4sd676ylrb3db54gbpys6xj6nwq"))))
10461 (build-system python-build-system)
10462 (home-page
10463 "https://github.com/sarugaku/shellingham")
10464 (synopsis "Tool to detect surrounding shell")
10465 (description
10466 "Shellingham detects what shell the current Python executable is
10467 running in.")
10468 (license license:isc)))
10469
10470 (define-public python-memcached
10471 (package
10472 (name "python-memcached")
10473 (version "1.59")
10474 (source
10475 (origin
10476 (method url-fetch)
10477 (uri (pypi-uri "python-memcached" version))
10478 (sha256
10479 (base32
10480 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))))
10481 (build-system python-build-system)
10482 (propagated-inputs `(("python-six" ,python-six)))
10483 (home-page
10484 "https://github.com/linsomniac/python-memcached")
10485 (synopsis "Pure python memcached client")
10486 (description
10487 "This software is a pure Python interface to the memcached memory cache
10488 daemon. It is the client side software which allows storing values in one or
10489 more, possibly remote, memcached servers.")
10490 (license license:psfl)))
10491
10492 (define-public python-clikit
10493 (package
10494 (name "python-clikit")
10495 (version "0.2.4")
10496 (source
10497 (origin
10498 (method url-fetch)
10499 (uri (pypi-uri "clikit" version))
10500 (sha256
10501 (base32
10502 "0dc8czib5f4j9px1ivcpqnmivnx2zjpc0xb00ldrhsqylks7r06n"))))
10503 (build-system python-build-system)
10504 (propagated-inputs
10505 `(("python-pastel" ,python-pastel)
10506 ("python-pylev" ,python-pylev)))
10507 (home-page "https://github.com/sdispater/clikit")
10508 (synopsis "Group of utilities to build command line interfaces")
10509 (description
10510 "CliKit is a group of utilities to build testable command line
10511 interfaces.")
10512 (license license:expat)))
10513
10514 (define-public python-msgpack-python
10515 (package
10516 (name "python-msgpack-python")
10517 (version "0.5.6")
10518 (source
10519 (origin
10520 (method url-fetch)
10521 (uri (pypi-uri "msgpack-python" version))
10522 (sha256
10523 (base32
10524 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
10525 (build-system python-build-system)
10526 (home-page "http://msgpack.org/")
10527 (synopsis "Package to deserialize messages in MessagePack binary format")
10528 (description
10529 "MessagePack is an efficient binary serialization format. It lets you
10530 exchange data among multiple languages like JSON. But it's faster and
10531 smaller. Small integers are encoded into a single byte, and typical short
10532 strings require only one extra byte in addition to the strings themselves.")
10533 (license license:asl2.0)))
10534
10535 (define-public python-cachy
10536 (package
10537 (name "python-cachy")
10538 (version "0.2.0")
10539 (source
10540 (origin
10541 (method url-fetch)
10542 (uri (pypi-uri "cachy" version))
10543 (sha256
10544 (base32
10545 "0v6mjyhgx6j7ya20bk69cr3gdzdkdf6psay0h090rscclgji65dp"))))
10546 (build-system python-build-system)
10547 (native-inputs
10548 `(("python-fakeredis" ,python-fakeredis)
10549 ("python-flexmock" ,python-flexmock)
10550 ("python-pytest" ,python-pytest)))
10551 (propagated-inputs
10552 `(("python-memcached" ,python-memcached)
10553 ("python-msgpack-python" ,python-msgpack-python)
10554 ("python-redis" ,python-redis)))
10555 (home-page "https://github.com/sdispater/cachy")
10556 (synopsis "Simple yet effective caching library")
10557 (description
10558 "Cachy provides a simple yet effective caching library. A simple but
10559 powerful API: thread-safety; decorator syntax; support for memcached, redis,
10560 database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
10561 (license license:expat)))
10562
10563 (define-public poetry
10564 (package
10565 (name "poetry")
10566 (version "0.12.17")
10567 ;; Poetry can only be built from source with poetry.
10568 (source
10569 (origin
10570 (method url-fetch)
10571 (uri (pypi-uri "poetry" version))
10572 (sha256
10573 (base32
10574 "0gxwcd65qjmzqzppf53x51sic1rbcd9py6cdzx3aprppipimslvf"))))
10575 (build-system python-build-system)
10576 (arguments
10577 `(#:tests? #f ;; Pypi does not have tests.
10578 #:phases
10579 (modify-phases %standard-phases
10580 (replace 'build
10581 (lambda _
10582 ;; Bug in poetry https://github.com/sdispater/poetry/issues/866.
10583 (invoke "sed" "-i" "-e" "s/from distutils.core/from setuptools/"
10584 "setup.py")
10585 #t)))))
10586 (propagated-inputs
10587 `(("python-cachecontrol" ,python-cachecontrol)
10588 ("python-cachy" ,python-cachy)
10589 ("python-cleo" ,python-cleo)
10590 ("python-glob2" ,python-glob2)
10591 ("python-html5lib" ,python-html5lib)
10592 ("python-jsonschema" ,python-jsonschema)
10593 ("python-msgpack" ,python-msgpack)
10594 ("python-pathlib2" ,python-pathlib2)
10595 ("python-pkginfo" ,python-pkginfo)
10596 ("python-pyparsing" ,python-pyparsing)
10597 ("python-pyrsistent" ,python-pyrsistent)
10598 ("python-requests" ,python-requests)
10599 ("python-requests-toolbelt" ,python-requests-toolbelt)
10600 ("python-shellingham" ,python-shellingham)
10601 ("python-tomlkit" ,python-tomlkit)
10602 ("python-virtualenv" ,python-virtualenv)))
10603 (home-page "https://poetry.eustace.io/")
10604 (synopsis "Python dependency management and packaging made easy")
10605 (description "Poetry is a tool for dependency management and packaging
10606 in Python. It allows you to declare the libraries your project depends on and
10607 it will manage (install/update) them for you.")
10608 (license license:expat)))
10609
10610 (define-public python-lazy-object-proxy
10611 (package
10612 (name "python-lazy-object-proxy")
10613 (version "1.4.3")
10614 (source (origin
10615 (method url-fetch)
10616 (uri (pypi-uri "lazy-object-proxy" version))
10617 (sha256
10618 (base32
10619 "1w1aaay424ciz8fz3fkzxb0pxzfxn184f2whpyn4fx72bn50x47k"))))
10620 (native-inputs
10621 `(("python-setuptools-scm" ,python-setuptools-scm-3.3)))
10622 (build-system python-build-system)
10623 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10624 (synopsis "Lazy object proxy for python")
10625 (description
10626 "Lazy object proxy is an object that wraps a callable but defers the call
10627 until the object is actually required, and caches the result of said call.")
10628 (license license:bsd-2)))
10629
10630 (define-public python2-lazy-object-proxy
10631 (package-with-python2 python-lazy-object-proxy))
10632
10633 (define-public python-dnspython
10634 (package
10635 (name "python-dnspython")
10636 (version "1.15.0")
10637 (source (origin
10638 (method url-fetch)
10639 (uri (string-append "http://www.dnspython.org/kits/"
10640 version "/dnspython-" version ".tar.gz"))
10641 (sha256
10642 (base32
10643 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10644 (build-system python-build-system)
10645 (arguments '(#:tests? #f)) ; XXX: requires internet access
10646 (home-page "http://www.dnspython.org")
10647 (synopsis "DNS toolkit for Python")
10648 (description
10649 "dnspython is a DNS toolkit for Python. It supports almost all record
10650 types. It can be used for queries, zone transfers, and dynamic updates.
10651 It supports TSIG authenticated messages and EDNS0.")
10652 (license license:expat)))
10653
10654 (define-public python2-dnspython
10655 (package-with-python2 python-dnspython))
10656
10657 (define-public python-email-validator
10658 (package
10659 (name "python-email-validator")
10660 (version "1.0.2")
10661 (source
10662 (origin (method url-fetch)
10663 (uri (pypi-uri "email_validator" version))
10664 (sha256
10665 (base32
10666 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10667 (build-system python-build-system)
10668 (arguments
10669 '(#:phases
10670 (modify-phases %standard-phases
10671 (add-before 'build 'use-dnspython
10672 (lambda _
10673 (substitute* "setup.py"
10674 (("dnspython3") "dnspython"))
10675 #t)))))
10676 (propagated-inputs
10677 `(("python-dnspython" ,python-dnspython)
10678 ("python-idna" ,python-idna)))
10679 (home-page "https://github.com/JoshData/python-email-validator")
10680 (synopsis "Email address validation library for Python")
10681 (description
10682 "This library validates email address syntax and deliverability.")
10683 (license license:cc0)))
10684
10685 (define-public python2-email-validator
10686 (package-with-python2 python-email-validator))
10687
10688 (define-public python-ukpostcodeparser
10689 (package
10690 (name "python-ukpostcodeparser")
10691 (version "1.0.3")
10692 (source (origin
10693 (method url-fetch)
10694 (uri (pypi-uri "UkPostcodeParser" version))
10695 (sha256
10696 (base32
10697 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10698 (build-system python-build-system)
10699 (home-page "https://github.com/hamstah/ukpostcodeparser")
10700 (synopsis "UK Postcode parser for Python")
10701 (description
10702 "This library provides the @code{parse_uk_postcode} function for
10703 parsing UK postcodes.")
10704 (license license:expat)))
10705
10706 (define-public python2-ukpostcodeparser
10707 (package-with-python2 python-ukpostcodeparser))
10708
10709 (define-public python-faker
10710 (package
10711 (name "python-faker")
10712 (version "0.7.9")
10713 (source (origin
10714 (method url-fetch)
10715 (uri (pypi-uri "Faker" version))
10716 (sha256
10717 (base32
10718 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10719 (patches
10720 (search-patches "python-faker-fix-build-32bit.patch"))
10721 (modules '((guix build utils)))
10722 (snippet
10723 '(begin
10724 (for-each delete-file (find-files "." "\\.pyc$"))
10725 #t))))
10726 (build-system python-build-system)
10727 (arguments
10728 '(#:phases
10729 (modify-phases %standard-phases
10730 (replace 'check
10731 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
10732 (native-inputs
10733 `(;; For testing
10734 ("python-email-validator" ,python-email-validator)
10735 ("python-mock" ,python-mock)
10736 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10737 (propagated-inputs
10738 `(("python-dateutil" ,python-dateutil)
10739 ("python-six" ,python-six)))
10740 (home-page "https://github.com/joke2k/faker")
10741 (synopsis "Python package that generates fake data")
10742 (description
10743 "Faker is a Python package that generates fake data such as names,
10744 addresses, and phone numbers.")
10745 (license license:expat)
10746 (properties `((python2-variant . ,(delay python2-faker))))))
10747
10748 (define-public python2-faker
10749 (let ((base (package-with-python2 (strip-python2-variant
10750 python-faker))))
10751 (package
10752 (inherit base)
10753 (propagated-inputs
10754 `(("python2-ipaddress" ,python2-ipaddress)
10755 ,@(package-propagated-inputs base))))))
10756
10757 (define-public python-pyaml
10758 (package
10759 (name "python-pyaml")
10760 (version "18.11.0")
10761 (source (origin
10762 (method url-fetch)
10763 (uri (pypi-uri "pyaml" version))
10764 (sha256
10765 (base32
10766 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
10767 (build-system python-build-system)
10768 (native-inputs
10769 `(("python-unidecode" ,python-unidecode)))
10770 (propagated-inputs
10771 `(("python-pyyaml" ,python-pyyaml)))
10772 (home-page "https://github.com/mk-fg/pretty-yaml")
10773 (synopsis "YAML pretty-print library for Python")
10774 (description
10775 "pyaml is a PyYAML based python module to produce pretty and readable
10776 YAML-serialized data.")
10777 (license license:wtfpl2)))
10778
10779 (define-public python2-pyaml
10780 (package-with-python2 python-pyaml))
10781
10782 (define-public python-backpack
10783 (package
10784 (name "python-backpack")
10785 (version "0.1")
10786 (source
10787 (origin
10788 (method url-fetch)
10789 (uri (pypi-uri "backpack" version))
10790 (sha256
10791 (base32
10792 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10793 (build-system python-build-system)
10794 (native-inputs
10795 `(("python-pytest" ,python-pytest)
10796 ("python-nose" ,python-nose)))
10797 (propagated-inputs
10798 `(("python-simplejson" ,python-simplejson)))
10799 (home-page "https://github.com/sdispater/backpack")
10800 (synopsis "Utilities for working with Python collections")
10801 (description "Backpack provides some useful utilities for working with
10802 collections of data.")
10803 (license license:expat)))
10804
10805 (define-public python2-backpack
10806 (package-with-python2 python-backpack))
10807
10808 (define-public python-prompt-toolkit
10809 (package
10810 (name "python-prompt-toolkit")
10811 (version "2.0.7")
10812 (source
10813 (origin
10814 (method url-fetch)
10815 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10816 (sha256
10817 (base32
10818 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10819 (build-system python-build-system)
10820 (arguments
10821 `(#:phases
10822 (modify-phases %standard-phases
10823 (delete 'check)
10824 (add-after 'install 'post-install-check
10825 (lambda* (#:key inputs outputs #:allow-other-keys)
10826 ;; HOME is needed for the test
10827 ;; "test_pathcompleter_can_expanduser".
10828 (setenv "HOME" "/tmp")
10829 (add-installed-pythonpath inputs outputs)
10830 (invoke "py.test"))))))
10831 (propagated-inputs
10832 `(("python-wcwidth" ,python-wcwidth)
10833 ("python-six" ,python-six)
10834 ("python-pygments" ,python-pygments)))
10835 (native-inputs
10836 `(("python-pytest" ,python-pytest)))
10837 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10838 (synopsis "Library for building command line interfaces in Python")
10839 (description
10840 "Prompt-Toolkit is a library for building interactive command line
10841 interfaces in Python. It's like GNU Readline but it also features syntax
10842 highlighting while typing, out-of-the-box multi-line input editing, advanced
10843 code completion, incremental search, support for Chinese double-width
10844 characters, mouse support, and auto suggestions.")
10845 (license license:bsd-3)))
10846
10847 (define-public python2-prompt-toolkit
10848 (package-with-python2 python-prompt-toolkit))
10849
10850 (define-public python-prompt-toolkit-1
10851 (package (inherit python-prompt-toolkit)
10852 (version "1.0.15")
10853 (source
10854 (origin
10855 (method url-fetch)
10856 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10857 (sha256
10858 (base32
10859 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
10860
10861 (define-public python2-prompt-toolkit-1
10862 (package-with-python2 python-prompt-toolkit-1))
10863
10864 (define-public python-jedi
10865 (package
10866 (name "python-jedi")
10867 (version "0.15.1")
10868 (source
10869 (origin
10870 (method url-fetch)
10871 (uri (pypi-uri "jedi" version))
10872 (sha256
10873 (base32
10874 "0bp4pxhsynaarbvzblsn5x32lzp29svy3sxfy8i6m5iwz9s9r1ds"))))
10875 (build-system python-build-system)
10876 (arguments
10877 `(#:phases
10878 (modify-phases %standard-phases
10879 (add-after 'unpack 'disable-file-completion-test
10880 ;; A single parameterized test currently fail (see:
10881 ;; https://github.com/davidhalter/jedi/issues/1395). Remove it.
10882 (lambda _
10883 (substitute* "test/test_api/test_completion.py"
10884 ((".*'example.py', 'rb\"' \\+ join\\('\\.\\.'.*") ""))
10885 #t))
10886 (replace 'check
10887 (lambda _
10888 (setenv "HOME" "/tmp")
10889 (invoke "python" "-m" "pytest"))))))
10890 (native-inputs
10891 `(("python-pytest" ,python-pytest)
10892 ("python-docopt" ,python-docopt)))
10893 (propagated-inputs
10894 `(("python-parso" ,python-parso)))
10895 (home-page "https://github.com/davidhalter/jedi")
10896 (synopsis "Autocompletion and static analysis library for Python")
10897 (description
10898 "Jedi is a static analysis tool for Python that can be used in Integrated
10899 Development Environments (@dfn{IDE}s) and text editors. It understands Python
10900 on a deeper level than many other static analysis frameworks for Python.
10901
10902 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
10903 well.")
10904 (license license:expat)))
10905
10906 (define-public python2-jedi
10907 (package-with-python2 python-jedi))
10908
10909 (define-public ptpython
10910 (package
10911 (name "ptpython")
10912 (version "0.34")
10913 (source (origin
10914 (method url-fetch)
10915 (uri (pypi-uri "ptpython" version))
10916 (sha256
10917 (base32
10918 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10919 (build-system python-build-system)
10920 (arguments
10921 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
10922 (propagated-inputs
10923 `(("python-docopt" ,python-docopt)
10924 ("python-jedi" ,python-jedi)
10925 ("python-prompt-toolkit" ,python-prompt-toolkit)
10926 ("python-pygments" ,python-pygments)))
10927 (home-page "https://github.com/jonathanslenders/ptpython")
10928 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10929 (description
10930 "ptpython is a Python read-eval-print loop with IDE-like features.
10931 It supports syntax highlighting, multiline editing, autocompletion, mouse,
10932 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10933 etc.")
10934 (license license:bsd-3)
10935 (properties `((python2-variant . ,(delay ptpython-2))))))
10936
10937 (define-public ptpython-2
10938 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10939 (package
10940 (inherit base)
10941 (name "ptpython2"))))
10942
10943 (define-public python-stem
10944 (package
10945 (name "python-stem")
10946 (version "1.7.1")
10947 (source
10948 (origin
10949 (method url-fetch)
10950 (uri (pypi-uri "stem" version))
10951 (sha256
10952 (base32
10953 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
10954 (build-system python-build-system)
10955 (arguments
10956 `(#:phases
10957 (modify-phases %standard-phases
10958 (replace 'check
10959 (lambda _
10960 (invoke "./run_tests.py" "--unit")
10961 #t)))))
10962 (native-inputs
10963 `(("python-mock" ,python-mock)
10964 ("python-pycodestyle" ,python-pycodestyle)
10965 ("python-pyflakes" ,python-pyflakes)))
10966 (home-page "https://stem.torproject.org/")
10967 (synopsis
10968 "Python controller library that allows applications to interact with Tor")
10969 (description
10970 "Stem is a Python controller library for Tor. With it you can use Tor's
10971 control protocol to script against the Tor process and read descriptor data
10972 relays publish about themselves.")
10973 (license license:lgpl3)))
10974
10975 (define-public python2-stem
10976 (package-with-python2 python-stem))
10977
10978 (define-public python-pyserial
10979 (package
10980 (name "python-pyserial")
10981 (version "3.4")
10982 (source
10983 (origin
10984 (method url-fetch)
10985 (uri (pypi-uri "pyserial" version))
10986 (sha256
10987 (base32
10988 "09y68bczw324a4jb9a1cfwrbjhq179vnfkkkrybbksp0vqgl0bbf"))))
10989 (build-system python-build-system)
10990 (arguments
10991 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
10992 ;; #:phases
10993 ;; (modify-phases %standard-phases
10994 ;; (replace 'check
10995 ;; (lambda _
10996 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
10997 (home-page
10998 "https://github.com/pyserial/pyserial")
10999 (synopsis "Python Serial Port Bindings")
11000 (description "@code{pyserial} provide serial port bindings for Python. It
11001 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11002 and/or Xon/Xoff. The port is accessed in RAW mode.")
11003 (license license:bsd-3)))
11004
11005 (define-public python2-pyserial
11006 (package-with-python2 python-pyserial))
11007
11008 (define-public python-kivy
11009 (package
11010 (name "python-kivy")
11011 (version "1.10.1")
11012 (source
11013 (origin
11014 (method url-fetch)
11015 (uri (pypi-uri "Kivy" version))
11016 (file-name (string-append name "-" version ".tar.gz"))
11017 (sha256
11018 (base32
11019 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
11020 (build-system python-build-system)
11021 (arguments
11022 `(#:tests? #f ; Tests require many optional packages
11023 #:phases
11024 (modify-phases %standard-phases
11025 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11026 (lambda* (#:key inputs #:allow-other-keys)
11027 (setenv "KIVY_SDL2_PATH"
11028 (string-append (assoc-ref inputs "sdl-union")
11029 "/include/SDL2"))
11030 #t)))))
11031 (native-inputs
11032 `(("git" ,git)
11033 ("pkg-config" ,pkg-config)
11034 ("python-cython" ,python-cython)))
11035 (inputs
11036 `(("gstreamer" ,gstreamer)
11037 ("mesa" ,mesa)
11038 ("sdl-union"
11039 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11040 (home-page "http://kivy.org")
11041 (synopsis
11042 "Multitouch application framework")
11043 (description
11044 "A software library for rapid development of
11045 hardware-accelerated multitouch applications.")
11046 (license license:expat)))
11047
11048 (define-public python2-kivy
11049 (package-with-python2 python-kivy))
11050
11051 (define-public python-kivy-next
11052 (deprecated-package "python-kivy-next" python-kivy))
11053
11054 (define-public python2-kivy-next
11055 (deprecated-package "python2-kivy-next" python2-kivy))
11056
11057 (define-public python-binaryornot
11058 (package
11059 (name "python-binaryornot")
11060 (version "0.4.4")
11061 (source (origin
11062 (method url-fetch)
11063 (uri (pypi-uri "binaryornot" version))
11064 (sha256
11065 (base32
11066 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
11067 (build-system python-build-system)
11068 (arguments
11069 `(#:phases
11070 (modify-phases %standard-phases
11071 (add-after 'unpack 'patch-tests
11072 (lambda _
11073 ;; TypeError: binary() got an unexpected keyword argument
11074 ;; 'average_size'.
11075 (substitute* "tests/test_check.py"
11076 (("average_size=512") ""))
11077 #t)))))
11078 (propagated-inputs
11079 `(("python-chardet" ,python-chardet)
11080 ("python-hypothesis" ,python-hypothesis)))
11081 (home-page "https://github.com/audreyr/binaryornot")
11082 (synopsis "Package to check if a file is binary or text")
11083 (description "Ultra-lightweight pure Python package to check if a file is
11084 binary or text.")
11085 (license license:bsd-3)
11086 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11087
11088 (define-public python2-binaryornot
11089 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11090 (package (inherit base)
11091 (propagated-inputs
11092 `(("python2-enum34" ,python2-enum34)
11093 ,@(package-propagated-inputs base))))))
11094
11095 (define-public python-binwalk
11096 (let ((commit "64201acfb5b0a9cdd9faa58c40a36dcff8612e29")
11097 (revision "0"))
11098 (package
11099 (name "python-binwalk")
11100 (version (git-version "2.1.1" revision commit))
11101 (source
11102 (origin
11103 (method git-fetch)
11104 (uri (git-reference
11105 (url "https://github.com/ReFirmLabs/binwalk")
11106 (commit commit)))
11107 (file-name (git-file-name name version))
11108 (sha256
11109 (base32
11110 "1z7ca6rfp887hw5jc3sb45mm4fa0xid4lsp2z8g4r590dr7k7w15"))))
11111 (build-system python-build-system)
11112 (arguments
11113 `(#:phases
11114 (modify-phases %standard-phases
11115 (add-before 'check 'set-pythonpath
11116 (lambda _
11117 (setenv "PYTHONPATH"
11118 (string-append
11119 (getcwd) "/src/"
11120 ":" (getenv "PYTHONPATH")))
11121 (setenv "HOME" "")
11122 #t)))))
11123 (native-inputs
11124 `(("python-coverage" ,python-coverage)
11125 ("python-nose" ,python-nose)))
11126 (home-page "https://github.com/ReFirmLabs/binwalk")
11127 (synopsis "Firmware analysis tool")
11128 (description "Binwalk is a tool for analyzing, reverse engineering, and extracting firmware images")
11129 (license license:expat))))
11130
11131 (define-public python-nltk
11132 (package
11133 (name "python-nltk")
11134 (version "3.2.1")
11135 (source (origin
11136 (method url-fetch)
11137 (uri (pypi-uri "nltk" version))
11138 (sha256
11139 (base32
11140 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11141 (build-system python-build-system)
11142 (arguments
11143 '(;; The tests require some extra resources to be downloaded.
11144 ;; TODO Try packaging these resources.
11145 #:tests? #f))
11146 (home-page "http://nltk.org/")
11147 (synopsis "Natural Language Toolkit")
11148 (description "It provides interfaces to over 50 corpora and lexical
11149 resources such as WordNet, along with a suite of text processing libraries
11150 for classification, tokenization, stemming, tagging, parsing, and semantic
11151 reasoning, wrappers for natural language processing libraries.")
11152 (license license:asl2.0)))
11153
11154 (define-public python2-nltk
11155 (package-with-python2 python-nltk))
11156
11157 (define-public python-pymongo
11158 (package
11159 (name "python-pymongo")
11160 (version "3.7.2")
11161 (source (origin
11162 (method url-fetch)
11163 (uri (pypi-uri "pymongo" version))
11164 (sha256
11165 (base32
11166 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
11167 (build-system python-build-system)
11168 (propagated-inputs
11169 `(("python-certifi" ,python-certifi)))
11170 (home-page "https://github.com/mongodb/mongo-python-driver")
11171 (synopsis "Python driver for MongoDB")
11172 (description "Python driver for MongoDB.")
11173 (license license:asl2.0)))
11174
11175 (define-public python2-pymongo
11176 (package-with-python2 python-pymongo))
11177
11178 (define-public python-consul
11179 (package
11180 (name "python-consul")
11181 (version "0.6.1")
11182 (source
11183 (origin
11184 (method url-fetch)
11185 (uri (pypi-uri "python-consul" version))
11186 (sha256
11187 (base32
11188 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11189 (build-system python-build-system)
11190 (arguments
11191 '(#:tests? #f)) ; The tests are not distributed
11192 (propagated-inputs
11193 `(("python-requests" ,python-requests)
11194 ("python-six" ,python-six)))
11195 (home-page "https://github.com/cablehead/python-consul")
11196 (synopsis "Python client for Consul")
11197 (description
11198 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11199 discovery, monitoring and configuration.")
11200 (license license:expat)))
11201
11202 (define-public python2-consul
11203 (package-with-python2 python-consul))
11204
11205 (define-public python-schematics
11206 (package
11207 (name "python-schematics")
11208 (version "1.1.1")
11209 (source
11210 (origin
11211 (method git-fetch)
11212 (uri (git-reference
11213 (url "https://github.com/schematics/schematics.git")
11214 (commit (string-append "v" version))))
11215 (file-name (git-file-name name version))
11216 (sha256
11217 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
11218 (build-system python-build-system)
11219 (propagated-inputs
11220 `(("python-six" ,python-six)))
11221 (arguments
11222 ;; The tests require a bunch of not very nice packages with fixed
11223 ;; version requirements (e.g. python-coveralls).
11224 `(#:tests? #f))
11225 (home-page "https://github.com/schematics/schematics")
11226 (synopsis "Python Data Structures for Humans")
11227 (description "Python Data Structures for Humans.")
11228 (license license:bsd-3)))
11229
11230 (define-public python2-schematics
11231 (package-with-python2 python-schematics))
11232
11233 (define-public python-odfpy
11234 (package
11235 (name "python-odfpy")
11236 (version "1.3.3")
11237 (source (origin
11238 (method url-fetch)
11239 (uri (pypi-uri "odfpy" version))
11240 (sha256
11241 (base32
11242 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11243 (arguments
11244 `(#:modules ((srfi srfi-1)
11245 (guix build python-build-system)
11246 (guix build utils))
11247 #:phases
11248 (modify-phases %standard-phases
11249 (replace 'check
11250 ;; The test runner invokes python2 and python3 for test*.py.
11251 ;; To avoid having both in inputs, we replicate it here.
11252 (lambda _
11253 (for-each (lambda (test-file) (invoke "python" test-file))
11254 (find-files "tests" "^test.*\\.py$"))
11255 #t)))))
11256 (build-system python-build-system)
11257 (home-page "https://github.com/eea/odfpy")
11258 (synopsis "Python API and tools to manipulate OpenDocument files")
11259 (description "Collection of libraries and utility programs written in
11260 Python to manipulate OpenDocument 1.2 files.")
11261 (license
11262 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11263 ;; number of files with other licenses.
11264 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11265
11266 (define-public python2-odfpy
11267 (package-with-python2 python-odfpy))
11268
11269 (define-public python-natsort
11270 (package
11271 (name "python-natsort")
11272 (version "5.4.1")
11273 (source (origin
11274 (method url-fetch)
11275 (uri (pypi-uri "natsort" version))
11276 (sha256
11277 (base32
11278 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
11279 (build-system python-build-system)
11280 (arguments
11281 `(#:modules ((guix build utils)
11282 (guix build python-build-system)
11283 (srfi srfi-1)
11284 (srfi srfi-26)
11285 (ice-9 ftw))
11286 #:phases
11287 (modify-phases %standard-phases
11288 (add-before 'check 'set-cachedir
11289 ;; Tests require write access to $HOME by default
11290 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
11291 (replace 'check
11292 (lambda _
11293 (let ((cwd (getcwd)))
11294 (setenv "PYTHONPATH"
11295 (string-append
11296 cwd "/build/"
11297 (find (cut string-prefix? "lib" <>)
11298 (scandir (string-append cwd "/build")))
11299 ":"
11300 (getenv "PYTHONPATH")))
11301 (invoke "pytest" "-v")))))))
11302 (native-inputs
11303 `(("python-hypothesis" ,python-hypothesis)
11304 ("python-pytest-cov" ,python-pytest-cov)
11305 ("python-pytest-mock" ,python-pytest-mock)
11306 ("python-pytest" ,python-pytest)))
11307 (propagated-inputs ; TODO: Add python-fastnumbers.
11308 `(("python-pyicu" ,python-pyicu)))
11309 (home-page "https://github.com/SethMMorton/natsort")
11310 (synopsis "Natural sorting for python and shell")
11311 (description
11312 "Natsort lets you apply natural sorting on lists instead of
11313 lexicographical. If you use the built-in @code{sorted} method in python
11314 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
11315 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
11316 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
11317 identifies numbers and sorts them separately from strings. It can also sort
11318 version numbers, real numbers, mixed types and more, and comes with a shell
11319 command @command{natsort} that exposes this functionality in the command line.")
11320 (license license:expat)
11321 (properties `((python2-variant . ,(delay python2-natsort))))))
11322
11323 (define-public python2-natsort
11324 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11325 (package (inherit base)
11326 (native-inputs
11327 `(("python2-pathlib" ,python2-pathlib)
11328 ,@(package-native-inputs base))))))
11329
11330 (define-public python-glances
11331 (package
11332 (name "python-glances")
11333 (version "3.1.2")
11334 (source
11335 (origin
11336 (method url-fetch)
11337 (uri (pypi-uri "Glances" version))
11338 (sha256
11339 (base32 "15384pbvw9wj4sb8zgvd9v1812vrypbyjg0acicjf1hdb3p30fkk"))
11340 (modules '((guix build utils)))
11341 (snippet
11342 '(begin
11343 ;; Glances phones PyPI for weekly update checks by default.
11344 ;; Disable these. The user can re-enable them if desired.
11345 (substitute* "glances/outdated.py"
11346 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
11347 (string-append indentation
11348 "self.args.disable_check_update = True\n"
11349 line)))
11350 #t))))
11351 (build-system python-build-system)
11352 (propagated-inputs
11353 `(("python-future" ,python-future)
11354 ("python-psutil" ,python-psutil)))
11355 (home-page "https://github.com/nicolargo/glances")
11356 (synopsis "Cross-platform curses-based monitoring tool")
11357 (description
11358 "Glances is a curses-based monitoring tool for a wide variety of platforms.
11359 Glances uses the PsUtil library to get information from your system. It
11360 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
11361 (license license:lgpl3+)))
11362
11363 (define-public python2-glances
11364 (package-with-python2 python-glances))
11365
11366 (define-public python-graphql-core
11367 (package
11368 (name "python-graphql-core")
11369 (version "0.5.3")
11370 (source
11371 (origin
11372 (method url-fetch)
11373 (uri (pypi-uri "graphql-core" version))
11374 (sha256
11375 (base32
11376 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11377 (build-system python-build-system)
11378 (arguments
11379 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11380 #:phases
11381 (modify-phases %standard-phases
11382 (add-after 'unpack 'patch-hardcoded-version
11383 (lambda _ (substitute*
11384 "setup.py"
11385 (("'gevent==1.1rc1'") "'gevent'"))
11386 #t)))))
11387 (native-inputs
11388 `(("python-gevent" ,python-gevent)
11389 ("python-mock" ,python-mock)
11390 ("python-pytest-mock" ,python-pytest-mock)))
11391 (propagated-inputs
11392 `(("python-promise" ,python-promise)
11393 ("python-six" ,python-six)))
11394 (home-page "https://github.com/graphql-python/graphql-core")
11395 (synopsis "GraphQL implementation for Python")
11396 (description
11397 "GraphQL implementation for Python. GraphQL is a data query language and
11398 runtime designed and used to request and deliver data to mobile and web apps.
11399 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11400 to Python.")
11401 (license license:expat)))
11402
11403 (define-public python2-graphql-core
11404 (package-with-python2 python-graphql-core))
11405
11406 (define-public python-graphql-relay
11407 (package
11408 (name "python-graphql-relay")
11409 (version "0.4.5")
11410 (source
11411 (origin
11412 (method url-fetch)
11413 (uri (pypi-uri "graphql-relay" version))
11414 (sha256
11415 (base32
11416 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
11417 (build-system python-build-system)
11418 (arguments
11419 '(#:tests? #f)) ; The tests are not distributed
11420 (propagated-inputs
11421 `(("python-graphql-core" ,python-graphql-core)
11422 ("python-promise" ,python-promise)
11423 ("python-six" ,python-six)))
11424 (home-page "https://github.com/graphql-python/graphql-relay-py")
11425 (synopsis "Relay implementation for Python")
11426 (description
11427 "This is a library to allow the easy creation of Relay-compliant servers
11428 using the GraphQL Python reference implementation of a GraphQL server. It
11429 should be noted that the code is a exact port of the original
11430 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11431 from Facebook.")
11432 (license license:expat)))
11433
11434 (define-public python2-graphql-relay
11435 (package-with-python2 python-graphql-relay))
11436
11437 (define-public python-graphene
11438 (package
11439 (name "python-graphene")
11440 (version "0.10.2")
11441 (source
11442 (origin
11443 (method url-fetch)
11444 (uri (pypi-uri "graphene" version))
11445 (sha256
11446 (base32
11447 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11448 (build-system python-build-system)
11449 (propagated-inputs
11450 `(("python-graphql-core" ,python-graphql-core)
11451 ("python-graphql-relay" ,python-graphql-relay)
11452 ("python-iso8601" ,python-iso8601)
11453 ("python-promise" ,python-promise)
11454 ("python-six" ,python-six)))
11455 (arguments
11456 `(#:tests? #f)) ; no tests/ in the PyPI tarball
11457 (home-page "http://graphene-python.org/")
11458 (synopsis "GraphQL Framework for Python")
11459 (description
11460 "Graphene is a Python library for building GraphQL schemas/types.
11461 A GraphQL schema describes your data model, and provides a GraphQL server
11462 with an associated set of resolve methods that know how to fetch data.")
11463 (properties `((python2-variant . ,(delay python2-graphene))))
11464 (license license:expat)))
11465
11466 (define-public python2-graphene
11467 (let ((base (package-with-python2
11468 (strip-python2-variant python-graphene))))
11469 (package (inherit base)
11470 (native-inputs
11471 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11472 ,@(package-native-inputs base))))))
11473
11474 (define-public python-nautilus
11475 (package
11476 (name "python-nautilus")
11477 (version "0.4.9")
11478 (source
11479 (origin
11480 (method url-fetch)
11481 (uri (pypi-uri "nautilus" version))
11482 (sha256
11483 (base32
11484 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11485 (build-system python-build-system)
11486 (arguments `(#:tests? #f)) ; fails to import test modules
11487 (propagated-inputs
11488 `(("python-bcrypt" ,python-bcrypt)
11489 ("python-click" ,python-click)
11490 ("python-consul" ,python-consul)
11491 ("python-graphene" ,python-graphene)
11492 ("python-jinja2" ,python-jinja2)
11493 ("python-peewee" ,python-peewee)
11494 ("python-pika" ,python-pika)
11495 ("python-tornado" ,python-tornado)
11496 ("python-wtforms" ,python-wtforms)))
11497 (native-inputs
11498 `(("python-nose2" ,python-nose2)))
11499 (home-page "https://github.com/AlecAivazis/nautilus")
11500 (synopsis "Library for creating microservice applications")
11501 (description
11502 "Nautilus is a framework for flux based microservices that looks to
11503 provide extendible implementations of common aspects of a cloud so that you can
11504 focus on building massively scalable web applications.")
11505 (license license:expat)))
11506
11507 (define-public python-snowballstemmer
11508 (package
11509 (name "python-snowballstemmer")
11510 (version "1.2.1")
11511 (source (origin
11512 (method url-fetch)
11513 (uri (pypi-uri "snowballstemmer" version))
11514 (sha256
11515 (base32
11516 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11517 (build-system python-build-system)
11518 (arguments
11519 `(;; No tests exist
11520 #:tests? #f))
11521 (home-page "https://github.com/shibukawa/snowball_py")
11522 (synopsis "Snowball stemming library collection for Python")
11523 (description "This package provides 16 word stemmer algorithms generated
11524 from Snowball algorithms. It includes the 15 original ones plus the Poerter
11525 English stemmer.")
11526 (license license:bsd-3)))
11527
11528 (define-public python2-snowballstemmer
11529 (package-with-python2 python-snowballstemmer))
11530
11531 (define-public python-setproctitle
11532 (package
11533 (name "python-setproctitle")
11534 (version "1.1.10")
11535 (source
11536 (origin
11537 (method url-fetch)
11538 (uri (pypi-uri "setproctitle" version))
11539 (sha256
11540 (base32
11541 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11542 (build-system python-build-system)
11543 (arguments
11544 '(#:phases
11545 (modify-phases %standard-phases
11546 (add-before 'check 'patch-Makefile
11547 ;; Stricly this is only required for the python2 variant.
11548 ;; But adding a phase in an inherited package seems to be
11549 ;; cumbersum. So we patch even for python3.
11550 (lambda _
11551 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11552 (when nose
11553 (substitute* "Makefile"
11554 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11555 (string-append nose "/bin/nosetests "))))
11556 #t)))
11557 (replace 'check
11558 (lambda _
11559 (setenv "PYTHON" (or (which "python3") (which "python")))
11560 (setenv "PYCONFIG" (or (which "python3-config")
11561 (which "python-config")))
11562 (setenv "CC" "gcc")
11563 ;; No need to extend PYTHONPATH to find the built package, since
11564 ;; the Makefile will build anyway
11565 (invoke "make" "check"))))))
11566 (native-inputs
11567 `(("procps" ,procps))) ; required for tests
11568 (home-page
11569 "https://github.com/dvarrazzo/py-setproctitle")
11570 (synopsis
11571 "Setproctitle implementation for Python to customize the process title")
11572 (description "The library allows a process to change its title (as displayed
11573 by system tools such as ps and top).
11574
11575 Changing the title is mostly useful in multi-process systems, for
11576 example when a master process is forked: changing the children's title
11577 allows to identify the task each process is busy with. The technique
11578 is used by PostgreSQL and the OpenSSH Server for example.")
11579 (license license:bsd-3)
11580 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11581
11582 (define-public python2-setproctitle
11583 (let ((base (package-with-python2
11584 (strip-python2-variant python-setproctitle))))
11585 (package
11586 (inherit base)
11587 (native-inputs `(("python2-nose" ,python2-nose)
11588 ,@(package-native-inputs base))))))
11589
11590 (define-public python-validictory
11591 (package
11592 (name "python-validictory")
11593 (version "1.0.1")
11594 (source
11595 (origin
11596 (method url-fetch)
11597 (uri (pypi-uri "validictory" version))
11598 (sha256
11599 (base32
11600 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11601 (build-system python-build-system)
11602 (arguments
11603 '(#:phases
11604 (modify-phases %standard-phases
11605 (add-after 'unpack 'bootstrap
11606 ;; Move the tests out of the package directory to avoid
11607 ;; packaging them.
11608 (lambda* _
11609 (rename-file "validictory/tests" "tests")
11610 (delete-file "tests/__init__.py")))
11611 (replace 'check
11612 (lambda _
11613 ;; Extend PYTHONPATH so the built package will be found.
11614 (setenv "PYTHONPATH"
11615 (string-append (getcwd) "/build/lib:"
11616 (getenv "PYTHONPATH")))
11617 (invoke "py.test" "-vv" ))))))
11618 (native-inputs
11619 `(("python-pytest" ,python-pytest)))
11620 (home-page
11621 "https://github.com/jamesturk/validictory")
11622 (synopsis "General purpose Python data validator")
11623 (description "It allows validation of arbitrary Python data structures.
11624
11625 The schema format is based on the JSON Schema
11626 proposal (http://json-schema.org), so combined with json the library is also
11627 useful as a validator for JSON data.")
11628 (license license:expat)))
11629
11630 (define-public python2-validictory
11631 (package-with-python2 python-validictory))
11632
11633 (define-public python-pyelftools
11634 (package
11635 (name "python-pyelftools")
11636 (version "0.25")
11637 (source
11638 (origin
11639 (method url-fetch)
11640 (uri (pypi-uri "pyelftools" version))
11641 (sha256
11642 (base32
11643 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11644 (build-system python-build-system)
11645 (arguments
11646 `(#:phases
11647 (modify-phases %standard-phases
11648 (add-before 'check 'set-pythonpath
11649 (lambda _
11650 (setenv "PYTHONPATH"
11651 (string-append
11652 (getcwd) "/test/"
11653 ":" (getenv "PYTHONPATH")))
11654 #t)))))
11655 (home-page
11656 "https://github.com/eliben/pyelftools")
11657 (synopsis
11658 "Analyze binary and library file information")
11659 (description "This Python library provides interfaces for parsing and
11660 analyzing two binary and library file formats; the Executable and Linking
11661 Format (ELF), and debugging information in the Debugging With Attributed
11662 Record Format (DWARF).")
11663 (license license:public-domain)))
11664
11665 (define-public python-pyev
11666 (package
11667 (name "python-pyev")
11668 (version "0.9.0")
11669 (source
11670 (origin
11671 (method url-fetch)
11672 (uri (pypi-uri "pyev" version))
11673 (sha256
11674 (base32
11675 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11676 (build-system python-build-system)
11677 (arguments
11678 `(#:tests? #f ; no test suite
11679 #:phases
11680 (modify-phases %standard-phases
11681 (add-after 'unpack 'patch
11682 (lambda* (#:key inputs #:allow-other-keys)
11683 (let ((libev (string-append (assoc-ref inputs "libev")
11684 "/lib/libev.so.4")))
11685 (substitute* "setup.py"
11686 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11687 (string-append "libev_dll_name = \"" libev "\"")))))))))
11688 (inputs
11689 `(("libev" ,libev)))
11690 (home-page "http://pythonhosted.org/pyev/")
11691 (synopsis "Python libev interface")
11692 (description "Pyev provides a Python interface to libev.")
11693 (license license:gpl3)))
11694
11695 (define-public python2-pyev
11696 (package-with-python2 python-pyev))
11697
11698 (define-public python-imagesize
11699 (package
11700 (name "python-imagesize")
11701 (version "1.1.0")
11702 (source
11703 (origin
11704 (method url-fetch)
11705 (uri (pypi-uri "imagesize" version))
11706 (sha256
11707 (base32
11708 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11709 (build-system python-build-system)
11710 (home-page "https://github.com/shibukawa/imagesize_py")
11711 (synopsis "Gets image size of files in various formats in Python")
11712 (description
11713 "This package allows determination of image size from
11714 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11715 (license license:expat)))
11716
11717 (define-public python2-imagesize
11718 (package-with-python2 python-imagesize))
11719
11720 (define-public python-termstyle
11721 (package
11722 (name "python-termstyle")
11723 (version "0.1.11")
11724 (source
11725 (origin
11726 (method url-fetch)
11727 (uri (pypi-uri "termstyle" version))
11728 (sha256
11729 (base32
11730 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11731 (build-system python-build-system)
11732 (arguments
11733 '(#:phases
11734 (modify-phases %standard-phases
11735 (replace 'check
11736 (lambda _
11737 (invoke "python" "test3.py"))))))
11738 (home-page "https://github.com/gfxmonk/termstyle")
11739 (synopsis "Console text coloring for Python")
11740 (description "This package provides console text coloring for Python.")
11741 (license license:bsd-3)))
11742
11743 (define-public python-argcomplete
11744 (package
11745 (name "python-argcomplete")
11746 (version "1.10.3")
11747 (source
11748 (origin
11749 (method url-fetch)
11750 (uri (pypi-uri "argcomplete" version))
11751 (sha256
11752 (base32
11753 "02jkc44drb0yjz6x28lvg6rj607n8r2irdpdvyylm8xnycn54zx3"))))
11754 (build-system python-build-system)
11755 (arguments
11756 `(#:phases
11757 (modify-phases %standard-phases
11758 (add-after 'unpack 'embed-tool-references
11759 (lambda _
11760 (substitute* "argcomplete/bash_completion.d/python-argcomplete.sh"
11761 ((" grep")
11762 (string-append " " (which "grep")))
11763 ((" egrep")
11764 (string-append " " (which "egrep")))
11765 (("elif which")
11766 (string-append "elif " (which "which")))
11767 (("\\$\\(which")
11768 (string-append "$(" (which "which"))))
11769 #t)))))
11770 (inputs
11771 `(("grep" ,grep)
11772 ("which" ,which)))
11773 (native-inputs
11774 `(("python-coverage" ,python-coverage)
11775 ("python-flake8" ,python-flake8)
11776 ("python-pexpect" ,python-pexpect)
11777 ("python-wheel" ,python-wheel)
11778 ("tcsh" ,tcsh)
11779 ("fish" ,fish)
11780 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
11781 (home-page "https://github.com/kislyuk/argcomplete")
11782 (synopsis "Shell tab completion for Python argparse")
11783 (description "argcomplete provides extensible command line tab completion
11784 of arguments and options for Python scripts using @code{argparse}. It's
11785 particularly useful for programs with many options or sub-parsers that can
11786 dynamically suggest completions; for example, when browsing resources over the
11787 network.")
11788 (license license:asl2.0)))
11789
11790 (define-public python2-argcomplete
11791 (package-with-python2 python-argcomplete))
11792
11793 (define-public python-xopen
11794 (package
11795 (name "python-xopen")
11796 (version "0.5.0")
11797 (source
11798 (origin
11799 (method url-fetch)
11800 (uri (pypi-uri "xopen" version))
11801 (sha256
11802 (base32
11803 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
11804 (build-system python-build-system)
11805 (propagated-inputs
11806 `(("python-setuptools-scm" ,python-setuptools-scm)))
11807 (home-page "https://github.com/marcelm/xopen/")
11808 (synopsis "Open compressed files transparently")
11809 (description "This module provides an @code{xopen} function that works like
11810 Python's built-in @code{open} function, but can also deal with compressed files.
11811 Supported compression formats are gzip, bzip2 and, xz, and are automatically
11812 recognized by their file extensions. The focus is on being as efficient as
11813 possible on all supported Python versions.")
11814 (license license:expat)))
11815
11816 (define-public python2-xopen
11817 (let ((base (package-with-python2
11818 (strip-python2-variant python-xopen))))
11819 (package
11820 (inherit base)
11821 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
11822 ,@(package-propagated-inputs base))))))
11823
11824 (define-public python-cheetah
11825 (package
11826 (name "python-cheetah")
11827 (version "3.1.0")
11828 (source
11829 (origin
11830 (method url-fetch)
11831 (uri (pypi-uri "Cheetah3" version))
11832 (sha256
11833 (base32
11834 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
11835 (build-system python-build-system)
11836 (arguments
11837 `(#:modules ((guix build utils)
11838 (guix build python-build-system)
11839 (ice-9 ftw)
11840 (srfi srfi-1)
11841 (srfi srfi-26))
11842 #:phases (modify-phases %standard-phases
11843 (add-after 'unpack 'use-absolute-python
11844 (lambda _
11845 (substitute* "Cheetah/CheetahWrapper.py"
11846 (("#!/usr/bin/env python")
11847 (string-append "#!" (which "python"))))
11848 #t))
11849 (replace 'check
11850 (lambda _
11851 (let ((cwd (getcwd)))
11852 (setenv "PYTHONPATH"
11853 (string-append
11854 cwd "/build/"
11855 (find (cut string-prefix? "lib" <>)
11856 (scandir (string-append cwd "/build")))
11857 ":" (getenv "PYTHONPATH")))
11858 (setenv "PATH"
11859 (string-append (getenv "PATH")
11860 ":" cwd "/bin"))
11861 (setenv "TMPDIR" "/tmp")
11862
11863 (substitute* "Cheetah/Tests/Test.py"
11864 (("unittest.TextTestRunner\\(\\)")
11865 "unittest.TextTestRunner(verbosity=2)"))
11866
11867 (invoke "python" "Cheetah/Tests/Test.py")))))))
11868 (propagated-inputs
11869 `(("python-markdown" ,python-markdown))) ;optional
11870 (home-page "http://cheetahtemplate.org/")
11871 (synopsis "Template engine")
11872 (description "Cheetah is a text-based template engine and Python code
11873 generator.
11874
11875 Cheetah can be used as a standalone templating utility or referenced as
11876 a library from other Python applications. It has many potential uses,
11877 but web developers looking for a viable alternative to ASP, JSP, PHP and
11878 PSP are expected to be its principle user group.
11879
11880 Features:
11881 @enumerate
11882 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
11883 text-based format.
11884 @item Cleanly separates content, graphic design, and program code.
11885 @item Blends the power and flexibility of Python with a simple template language
11886 that non-programmers can understand.
11887 @item Gives template writers full access to any Python data structure, module,
11888 function, object, or method in their templates.
11889 @item Makes code reuse easy by providing an object-orientated interface to
11890 templates that is accessible from Python code or other Cheetah templates.
11891 One template can subclass another and selectively reimplement sections of it.
11892 @item Provides a simple, yet powerful, caching mechanism that can dramatically
11893 improve the performance of a dynamic website.
11894 @item Compiles templates into optimized, yet readable, Python code.
11895 @end enumerate")
11896 (license (license:x11-style "file://LICENSE"))))
11897
11898 (define-public python2-cheetah
11899 (package-with-python2 python-cheetah))
11900
11901 (define-public python-dulwich
11902 (package
11903 (name "python-dulwich")
11904 (version "0.18.6")
11905 (source
11906 (origin
11907 (method url-fetch)
11908 (uri (list (string-append "https://www.dulwich.io/releases/"
11909 "dulwich-" version ".tar.gz")
11910 (pypi-uri "dulwich" version)))
11911 (sha256
11912 (base32
11913 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
11914 (build-system python-build-system)
11915 (arguments
11916 `(#:phases
11917 (modify-phases %standard-phases
11918 (add-before 'check 'fix-tests
11919 (lambda* (#:key inputs #:allow-other-keys)
11920 ;; The tests use Popen with a custom environment which doesn't
11921 ;; include PATH.
11922 (substitute* "dulwich/tests/compat/utils.py"
11923 (("'git'") (string-append "'"
11924 (which "git")
11925 "'")))
11926 (substitute* '("dulwich/tests/test_repository.py"
11927 "dulwich/tests/test_hooks.py")
11928 (("#!/bin/sh") (string-append "#!" (which "sh"))))
11929 (setenv "TEST_RUNNER" "unittest")
11930 (setenv "PYTHONHASHSEED" "random")
11931 #t)))))
11932 (propagated-inputs
11933 `(("python-fastimport" ,python-fastimport)))
11934 (native-inputs
11935 `(("python-mock" ,python-mock)
11936 ("python-geventhttpclient" ,python-geventhttpclient)
11937 ("git" ,git)))
11938 (home-page "https://www.dulwich.io/")
11939 (synopsis "Git implementation in Python")
11940 (description "Dulwich is an implementation of the Git file formats and
11941 protocols written in pure Python.")
11942 ;; Can be used with either license.
11943 (license (list license:asl2.0 license:gpl2+))))
11944
11945 (define-public python2-dulwich
11946 (package-with-python2 python-dulwich))
11947
11948 (define-public python-pbkdf2
11949 (package
11950 (name "python-pbkdf2")
11951 (version "1.3")
11952 (source
11953 (origin
11954 (method url-fetch)
11955 (uri (pypi-uri "pbkdf2" version))
11956 (sha256
11957 (base32
11958 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
11959 (build-system python-build-system)
11960 (arguments
11961 '(#:phases
11962 (modify-phases %standard-phases
11963 (replace 'check
11964 (lambda _
11965 (setenv "PYTHONPATH"
11966 (string-append (getcwd) "/build/lib:"
11967 (getenv "PYTHONPATH")))
11968 (invoke "python" "test/test_pbkdf2.py"))))))
11969 (propagated-inputs
11970 `(("python-pycrypto" ,python-pycrypto))) ; optional
11971 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
11972 (synopsis "Password-based key derivation")
11973 (description "This module implements the password-based key derivation
11974 function, PBKDF2, specified in RSA PKCS#5 v2.0.
11975
11976 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
11977 is part of the RSA Public Key Cryptography Standards series. The provided
11978 implementation takes a password or a passphrase and a salt value (and
11979 optionally a iteration count, a digest module, and a MAC module) and provides
11980 a file-like object from which an arbitrarly-sized key can be read.")
11981 (license license:expat)))
11982
11983 (define-public python2-pbkdf2
11984 (package-with-python2 python-pbkdf2))
11985
11986 (define-public python-qrcode
11987 (package
11988 (name "python-qrcode")
11989 (version "6.1")
11990 (source
11991 (origin
11992 (method url-fetch)
11993 (uri (pypi-uri "qrcode" version))
11994 (sha256
11995 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
11996 (build-system python-build-system)
11997 (arguments
11998 ;; FIXME: Tests require packaging 'pymaging'.
11999 '(#:tests? #f))
12000 (propagated-inputs
12001 `(("python-lxml" ,python-lxml) ; for SVG output
12002 ("python-pillow" ,python-pillow) ; for PNG output
12003 ("python-six" ,python-six)))
12004 (home-page "https://github.com/lincolnloop/python-qrcode")
12005 (synopsis "QR Code image generator")
12006 (description "This package provides a pure Python QR Code generator
12007 module. It uses the Python Imaging Library (PIL) to allow for the generation
12008 of QR Codes.
12009
12010 In addition this package provides a command line tool to generate QR codes and
12011 either write these QR codes to a file or do the output as ascii art at the
12012 console.")
12013 (license license:bsd-3)))
12014
12015 (define-public python2-qrcode
12016 (package-with-python2 python-qrcode))
12017
12018 (define-public python-rst2ansi
12019 (package
12020 (name "python-rst2ansi")
12021 (version "0.1.5")
12022 (source
12023 (origin
12024 (method url-fetch)
12025 (uri (pypi-uri "rst2ansi" version))
12026 (sha256
12027 (base32
12028 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
12029 (build-system python-build-system)
12030 (propagated-inputs
12031 `(("python-docutils" ,python-docutils)))
12032 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
12033 (synopsis "Convert RST to ANSI-decorated console output")
12034 (description
12035 "Python module dedicated to rendering RST (reStructuredText) documents
12036 to ansi-escaped strings suitable for display in a terminal.")
12037 (license license:expat)))
12038
12039 (define-public python-ansi2html
12040 (package
12041 (name "python-ansi2html")
12042 (version "1.2.0")
12043 (source
12044 (origin
12045 (method url-fetch)
12046 (uri (pypi-uri "ansi2html" version))
12047 (sha256
12048 (base32
12049 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
12050 (build-system python-build-system)
12051 (native-inputs
12052 `(("python-mock" ,python-mock)
12053 ("python-nose" ,python-nose)))
12054 (propagated-inputs
12055 `(("python-six" ,python-six)))
12056 (home-page "https://github.com/ralphbean/ansi2html")
12057 (synopsis "Convert ANSI-decorated console output to HTML")
12058 (description
12059 "@command{ansi2html} is a Python library and command line utility for
12060 convering text with ANSI color codes to HTML or LaTeX.")
12061 (license license:gpl3+)))
12062
12063 (define-public python2-ansi2html
12064 (package-with-python2 python-ansi2html))
12065
12066 (define-public python-ddt
12067 (package
12068 (name "python-ddt")
12069 (version "1.1.3")
12070 (source
12071 (origin
12072 (method url-fetch)
12073 (uri (pypi-uri "ddt" version))
12074 (sha256
12075 (base32
12076 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
12077 (build-system python-build-system)
12078 (native-inputs
12079 `(("python-mock" ,python-mock)
12080 ("python-nose" ,python-nose)))
12081 (propagated-inputs
12082 `(("python-six" ,python-six)
12083 ("python-pyyaml" ,python-pyyaml)))
12084 (home-page "https://github.com/txels/ddt")
12085 (synopsis "Data-Driven Tests")
12086 (description
12087 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
12088 running it with different test data, and make it appear as multiple test
12089 cases.")
12090 (license license:expat)))
12091
12092 (define-public python2-ddt
12093 (package-with-python2 python-ddt))
12094
12095 (define-public python-pycountry
12096 (package
12097 (name "python-pycountry")
12098 (version "18.5.26")
12099 (source
12100 (origin
12101 (method url-fetch)
12102 (uri (pypi-uri "pycountry" version))
12103 (sha256
12104 (base32
12105 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
12106 (build-system python-build-system)
12107 (home-page "https://bitbucket.org/flyingcircus/pycountry")
12108 (synopsis "ISO databases for languages, countries, currencies, etc.")
12109 (description
12110 "@code{pycountry} provides the ISO databases for the standards:
12111 @enumerate
12112 @item 639-3 (Languages)
12113 @item 3166 (Countries)
12114 @item 3166-3 (Deleted Countries)
12115 @item 3166-2 (Subdivisions of countries)
12116 @item 4217 (Currencies)
12117 @item 15924 (Scripts)
12118 @end enumerate
12119 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
12120 through a Python API.")
12121 (license license:lgpl2.1+)))
12122
12123 (define-public python2-pycountry
12124 (package-with-python2 python-pycountry))
12125
12126 (define-public python-pycosat
12127 (package
12128 (name "python-pycosat")
12129 (version "0.6.1")
12130 (source
12131 (origin
12132 (method url-fetch)
12133 (uri (pypi-uri "pycosat" version))
12134 (sha256
12135 (base32
12136 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
12137 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
12138 (build-system python-build-system)
12139 (home-page "https://github.com/ContinuumIO/pycosat")
12140 (synopsis "Bindings to picosat (a SAT solver)")
12141 (description
12142 "This package provides efficient Python bindings to @code{picosat} on
12143 the C level. When importing pycosat, the @code{picosat} solver becomes part
12144 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
12145 Problem} (SAT) solver.")
12146 (license license:expat)))
12147
12148 (define-public python2-pycosat
12149 (package-with-python2 python-pycosat))
12150
12151 (define-public python2-ruamel.ordereddict
12152 (package
12153 (name "python2-ruamel.ordereddict")
12154 (version "0.4.9")
12155 (source
12156 (origin
12157 (method url-fetch)
12158 (uri (pypi-uri "ruamel.ordereddict" version))
12159 (sha256
12160 (base32
12161 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
12162 (build-system python-build-system)
12163 (arguments
12164 `(#:python ,python-2
12165 #:phases
12166 (modify-phases %standard-phases
12167 (delete 'check)
12168 (add-after 'install 'check
12169 (lambda* (#:key inputs outputs #:allow-other-keys)
12170 (add-installed-pythonpath inputs outputs)
12171 (invoke "python" "test/testordereddict.py"))))))
12172 (home-page "https://bitbucket.org/ruamel/ordereddict")
12173 (synopsis "Version of dict that keeps keys in insertion order")
12174 (description
12175 "This is an implementation of an ordered dictionary with @dfn{Key
12176 Insertion Order} (KIO: updates of values do not affect the position of the
12177 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
12178 removed and put at the back). The standard library module @code{OrderedDict},
12179 implemented later, implements a subset of @code{ordereddict} functionality.
12180 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
12181 Order} (KSO, no sorting function can be specified, but a transform can be
12182 specified to apply on the key before comparison (e.g. @code{string.lower})).")
12183 (license license:expat)))
12184
12185 (define-public python-pypeg2
12186 (package
12187 (name "python-pypeg2")
12188 (version "2.15.2")
12189 (source
12190 (origin
12191 (method url-fetch)
12192 (uri (pypi-uri "pyPEG2" version))
12193 (sha256
12194 (base32
12195 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
12196 (build-system python-build-system)
12197 (propagated-inputs `(("python-lxml" ,python-lxml)))
12198 (arguments
12199 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
12200 '(#:tests? #f))
12201 (home-page "https://fdik.org/pyPEG/")
12202 (synopsis "Parsering Expression Grammars in Python")
12203 (description "PyPEG is an intrinsic parser interpreter framework for
12204 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
12205 parse many formal languages.")
12206 (license license:gpl2)))
12207
12208 (define-public python-incremental
12209 (package
12210 (name "python-incremental")
12211 (version "17.5.0")
12212 (source
12213 (origin
12214 (method url-fetch)
12215 (uri (pypi-uri "incremental" version))
12216 (sha256
12217 (base32
12218 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
12219 (build-system python-build-system)
12220 (home-page "https://github.com/hawkowl/incremental")
12221 (synopsis "Library for versioning Python projects")
12222 (description "Incremental is a small library that versions your Python
12223 projects.")
12224 (license license:expat)))
12225
12226 (define-public python2-incremental
12227 (package-with-python2 python-incremental))
12228
12229 (define-public python-invoke
12230 (package
12231 (name "python-invoke")
12232 (home-page "http://www.pyinvoke.org/")
12233 (version "1.3.0")
12234 (source (origin
12235 (method url-fetch)
12236 (uri (pypi-uri "invoke" version))
12237 (sha256
12238 (base32
12239 "1nn7gad0rvy492acpyhkrp01zsk86acf34qhsvq4xmm6x39788n5"))))
12240 (build-system python-build-system)
12241 (arguments
12242 ;; XXX: Requires many dependencies that are not yet in Guix.
12243 `(#:tests? #f))
12244 (synopsis "Pythonic task execution")
12245 (description
12246 "Invoke is a Python task execution tool and library, drawing inspiration
12247 from various sources to arrive at a powerful and clean feature set. It is
12248 evolved from the Fabric project, but focuses on local and abstract concerns
12249 instead of servers and network commands.")
12250 (license license:bsd-3)))
12251
12252 (define-public python2-invoke
12253 (package-with-python2 python-invoke))
12254
12255 (define-public python-automat
12256 (package
12257 (name "python-automat")
12258 (version "0.7.0")
12259 (source (origin
12260 (method url-fetch)
12261 (uri (pypi-uri "Automat" version))
12262 (sha256
12263 (base32
12264 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
12265 (build-system python-build-system)
12266 ;; We disable the tests because they require python-twisted, while
12267 ;; python-twisted depends on python-automat. Twisted is optional, but the
12268 ;; tests fail if it is not available. Also see
12269 ;; <https://github.com/glyph/automat/issues/71>.
12270 (arguments '(#:tests? #f))
12271 (native-inputs
12272 `(("python-m2r" ,python-m2r)
12273 ("python-setuptools-scm" ,python-setuptools-scm)
12274 ("python-graphviz" ,python-graphviz)))
12275 (propagated-inputs
12276 `(("python-six" ,python-six)
12277 ("python-attrs" ,python-attrs)))
12278 (home-page "https://github.com/glyph/Automat")
12279 (synopsis "Self-service finite-state machines")
12280 (description "Automat is a library for concise, idiomatic Python
12281 expression of finite-state automata (particularly deterministic finite-state
12282 transducers).")
12283 (license license:expat)))
12284
12285 (define-public python2-automat
12286 (package-with-python2 python-automat))
12287
12288 (define-public python-m2r
12289 (package
12290 (name "python-m2r")
12291 (version "0.2.1")
12292 (source (origin
12293 (method url-fetch)
12294 (uri (pypi-uri "m2r" version))
12295 (sha256
12296 (base32
12297 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
12298 (build-system python-build-system)
12299 (propagated-inputs
12300 `(("python-docutils" ,python-docutils)
12301 ("python-mistune" ,python-mistune)))
12302 (native-inputs
12303 `(("python-pygments" ,python-pygments)
12304 ("python-mock" ,python-mock)))
12305 (home-page "https://github.com/miyakogi/m2r")
12306 (synopsis "Markdown to reStructuredText converter")
12307 (description "M2R converts a markdown file including reST markups to valid
12308 reST format.")
12309 (license license:expat)))
12310
12311 (define-public python2-m2r
12312 (package-with-python2 python-m2r))
12313
12314 (define-public python-constantly
12315 (package
12316 (name "python-constantly")
12317 (version "15.1.0")
12318 (source (origin
12319 (method url-fetch)
12320 (uri (pypi-uri "constantly" version))
12321 (sha256
12322 (base32
12323 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
12324 (build-system python-build-system)
12325 (home-page "https://github.com/twisted/constantly")
12326 (synopsis "Symbolic constants in Python")
12327 (description "Constantly is a Python library that provides symbolic
12328 constant support. It includes collections and constants with text, numeric,
12329 and bit flag values.")
12330 (license license:expat)))
12331
12332 (define-public python2-constantly
12333 (package-with-python2 python-constantly))
12334
12335 (define-public python-attrs
12336 (package
12337 (name "python-attrs")
12338 (version "19.1.0")
12339 (source (origin
12340 (method url-fetch)
12341 (uri (pypi-uri "attrs" version))
12342 (sha256
12343 (base32
12344 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
12345 (build-system python-build-system)
12346 (arguments
12347 `(#:modules ((guix build utils)
12348 (guix build python-build-system)
12349 (ice-9 ftw)
12350 (srfi srfi-1)
12351 (srfi srfi-26))
12352 #:phases (modify-phases %standard-phases
12353 (replace 'check
12354 (lambda _
12355 (let ((cwd (getcwd)))
12356 (setenv "PYTHONPATH"
12357 (string-append
12358 cwd "/build/"
12359 (find (cut string-prefix? "lib" <>)
12360 (scandir (string-append cwd "/build")))
12361 ":"
12362 (getenv "PYTHONPATH")))
12363 (invoke "python" "-m" "pytest")))))))
12364 (native-inputs
12365 `(("python-coverage" ,python-coverage)
12366 ("python-hypothesis" ,python-hypothesis)
12367 ("python-pympler" ,python-pympler)
12368 ("python-pytest" ,python-pytest)
12369 ("python-six" ,python-six)
12370 ("python-sphinx" ,python-sphinx)
12371 ("python-zope-interface" ,python-zope-interface)))
12372 (home-page "https://github.com/python-attrs/attrs/")
12373 (synopsis "Attributes without boilerplate")
12374 (description "@code{attrs} is a Python package with class decorators that
12375 ease the chores of implementing the most common attribute-related object
12376 protocols.")
12377 (license license:expat)))
12378
12379 (define-public python2-attrs
12380 (package-with-python2 python-attrs))
12381
12382 (define-public python-attrs-bootstrap
12383 (package
12384 (inherit python-attrs)
12385 (name "python-attrs-bootstrap")
12386 (native-inputs `())
12387 (arguments `(#:tests? #f))))
12388
12389 (define-public python2-attrs-bootstrap
12390 (package-with-python2 python-attrs-bootstrap))
12391
12392 (define-public python2-cliapp
12393 (package
12394 (name "python2-cliapp")
12395 (version "1.20180812.1")
12396 (source
12397 (origin
12398 (method url-fetch)
12399 (uri (string-append
12400 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
12401 version ".tar.gz"))
12402 (sha256
12403 (base32
12404 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
12405 (build-system python-build-system)
12406 (arguments
12407 `(#:python ,python-2
12408 #:phases
12409 (modify-phases %standard-phases
12410 ;; check phase needs to be run before the build phase. If not,
12411 ;; coverage-test-runner looks for tests for the built source files,
12412 ;; and fails.
12413 (delete 'check)
12414 (add-before 'build 'check
12415 (lambda _
12416 ;; Disable python3 tests
12417 (substitute* "check"
12418 (("python3") "# python3"))
12419 (invoke "./check"))))))
12420 (native-inputs
12421 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12422 ("python2-pep8" ,python2-pep8)))
12423 (propagated-inputs
12424 `(("python2-pyaml" ,python2-pyaml)))
12425 (home-page "https://liw.fi/cliapp/")
12426 (synopsis "Python framework for command line programs")
12427 (description "@code{python2-cliapp} is a python framework for
12428 command line programs. It contains the typical stuff such programs
12429 need to do, such as parsing the command line for options, and
12430 iterating over input files.")
12431 (license license:gpl2+)))
12432
12433 (define-public python2-ttystatus
12434 (package
12435 (name "python2-ttystatus")
12436 (version "0.36")
12437 (source
12438 (origin
12439 (method url-fetch)
12440 (uri (string-append
12441 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
12442 version ".tar.gz"))
12443 (sha256
12444 (base32
12445 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
12446 (build-system python-build-system)
12447 (native-inputs
12448 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12449 ("python2-pep8" ,python2-pep8)))
12450 (arguments
12451 `(#:python ,python-2
12452 #:phases
12453 (modify-phases %standard-phases
12454 ;; check phase needs to be run before the build phase. If not,
12455 ;; coverage-test-runner looks for tests for the built source files,
12456 ;; and fails.
12457 (delete 'check)
12458 (add-before 'build 'check
12459 (lambda _ (invoke "make" "check"))))))
12460 (home-page "https://liw.fi/ttystatus/")
12461 (synopsis "Python library for showing progress reporting and
12462 status updates on terminals")
12463 (description "@code{python2-ttystatus} is a python library for
12464 showing progress reporting and status updates on terminals, for
12465 command line programs. Output is automatically adapted to the width
12466 of the terminal: truncated if it does not fit, and resized if the
12467 terminal size changes.")
12468 (license license:gpl3+)))
12469
12470 (define-public python2-tracing
12471 (package
12472 (name "python2-tracing")
12473 (version "0.10")
12474 (source
12475 (origin
12476 (method url-fetch)
12477 (uri (string-append
12478 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
12479 version ".tar.gz"))
12480 (sha256
12481 (base32
12482 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
12483 (build-system python-build-system)
12484 (arguments
12485 `(#:python ,python-2))
12486 (home-page "https://liw.fi/tracing/")
12487 (synopsis "Python debug logging helper")
12488 (description "@code{python2-tracing} is a python library for
12489 logging debug messages. It provides a way to turn debugging messages
12490 on and off, based on the filename they occur in. It is much faster
12491 than using @code{logging.Filter} to accomplish the same thing, which
12492 matters when code is run in production mode. The actual logging still
12493 happens using the @code{logging} library.")
12494 (license license:gpl3+)))
12495
12496 (define-public python2-larch
12497 (package
12498 (name "python2-larch")
12499 (version "1.20151025")
12500 (source
12501 (origin
12502 (method url-fetch)
12503 (uri (string-append
12504 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12505 version ".tar.gz"))
12506 (patches (search-patches
12507 "python2-larch-coverage-4.0a6-compatibility.patch"))
12508 (sha256
12509 (base32
12510 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12511 (build-system python-build-system)
12512 (arguments
12513 `(#:python ,python-2
12514 #:phases
12515 (modify-phases %standard-phases
12516 ;; check phase needs to be run before the build phase. If not,
12517 ;; coverage-test-runner looks for tests for the built source files,
12518 ;; and fails.
12519 (delete 'check)
12520 (add-before 'build 'check
12521 (lambda _ (invoke "make" "check"))))))
12522 (native-inputs
12523 `(("cmdtest" ,cmdtest)
12524 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12525 (propagated-inputs
12526 `(("python2-tracing" ,python2-tracing)))
12527 (home-page "https://liw.fi/larch/")
12528 (synopsis "Python copy-on-write B-tree library")
12529 (description "@code{python2-larch} is an implementation of
12530 particular kind of B-tree, based on research by Ohad Rodeh. See
12531 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12532 on the data structure.
12533
12534 The distinctive feature of this B-tree is that a node is never
12535 (conceptually) modified. Instead, all updates are done by
12536 copy-on-write. This makes it easy to clone a tree, and modify only the
12537 clone, while other processes access the original tree.")
12538 (license license:gpl3+)))
12539
12540 (define-public python-astroid
12541 (package
12542 (name "python-astroid")
12543 (version "2.3.3")
12544 (source
12545 (origin
12546 (method url-fetch)
12547 (uri (pypi-uri "astroid" version))
12548 (sha256
12549 (base32 "0fnibsl2cb5mvzbfm7sycj85smx48f8w8m7ks1sqlmpr9ps0gski"))))
12550 (build-system python-build-system)
12551 (propagated-inputs
12552 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12553 ("python-six" ,python-six)
12554 ("python-typed-ast" ,python-typed-ast)
12555 ("python-wrapt" ,python-wrapt)))
12556 (native-inputs
12557 `(("python-dateutil" ,python-dateutil)
12558 ("python-nose" ,python-nose)
12559 ("python-pytest" ,python-pytest)
12560 ("python-pytest-runner" ,python-pytest-runner)))
12561 (arguments
12562 `(#:phases
12563 (modify-phases %standard-phases
12564 (add-after 'unpack 'remove-spurious-test
12565 (lambda _
12566 ;; This can be removed after upgrading from python-3.7
12567 ;; https://github.com/PyCQA/astroid/issues/593
12568 ;; https://bugs.python.org/issue34056
12569 (delete-file "astroid/tests/unittest_modutils.py")
12570 #t))
12571 (replace 'check
12572 (lambda _
12573 (invoke "pytest" "astroid"))))))
12574 (home-page "https://github.com/PyCQA/astroid")
12575 (synopsis "Common base representation of python source code for pylint and
12576 other projects")
12577 (description "@code{python-astroid} provides a common base representation
12578 of python source code for projects such as pychecker, pyreverse, pylint, etc.
12579
12580 It provides a compatible representation which comes from the _ast module. It
12581 rebuilds the tree generated by the builtin _ast module by recursively walking
12582 down the AST and building an extended ast. The new node classes have
12583 additional methods and attributes for different usages. They include some
12584 support for static inference and local name scopes. Furthermore, astroid
12585 builds partial trees by inspecting living objects.")
12586 (license license:lgpl2.1+)
12587 (properties `((python2-variant . ,(delay python2-astroid))))))
12588
12589 (define-public python2-astroid
12590 (let ((base (package-with-python2
12591 (strip-python2-variant python-astroid))))
12592 (package (inherit base)
12593 ;; Version 2.x removes python2 support.
12594 (version "1.6.5")
12595 (source
12596 (origin
12597 (method url-fetch)
12598 (uri (pypi-uri "astroid" version))
12599 (sha256
12600 (base32
12601 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12602 (arguments
12603 (substitute-keyword-arguments (package-arguments base)
12604 ((#:phases phases)
12605 `(modify-phases ,phases
12606 (add-after 'unpack 'remove-spurious-test
12607 (lambda _
12608 ;; https://github.com/PyCQA/astroid/issues/276
12609 (delete-file "astroid/tests/unittest_brain.py")
12610 #t))
12611 (replace 'check
12612 (lambda _
12613 (invoke"python" "-m" "unittest" "discover"
12614 "-p" "unittest*.py")))))))
12615 (native-inputs `())
12616 (propagated-inputs
12617 `(("python2-backports-functools-lru-cache"
12618 ,python2-backports-functools-lru-cache)
12619 ("python2-enum34" ,python2-enum34)
12620 ("python2-singledispatch" ,python2-singledispatch)
12621 ,@(alist-delete "python-typed-ast"
12622 (package-propagated-inputs base)))))))
12623
12624 (define-public python-isort
12625 (package
12626 (name "python-isort")
12627 (version "4.3.4")
12628 (source
12629 (origin
12630 (method git-fetch)
12631 (uri (git-reference
12632 ;; Tests pass only from the Github sources
12633 (url "https://github.com/timothycrosley/isort")
12634 (commit version)))
12635 (file-name (git-file-name name version))
12636 (sha256
12637 (base32
12638 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
12639 (build-system python-build-system)
12640 (native-inputs
12641 `(("python-mock" ,python-mock)
12642 ("python-pytest" ,python-pytest)))
12643 (home-page "https://github.com/timothycrosley/isort")
12644 (synopsis "Python utility/library to sort python imports")
12645 (description "@code{python-isort} is a python utility/library to sort
12646 imports alphabetically, and automatically separated into sections. It
12647 provides a command line utility, a python library and plugins for various
12648 editors.")
12649 (license license:expat)
12650 (properties `((python2-variant . ,(delay python2-isort))))))
12651
12652 (define-public python2-isort
12653 (let ((base (package-with-python2
12654 (strip-python2-variant python-isort))))
12655 (package (inherit base)
12656 (native-inputs
12657 `(("python2-futures" ,python2-futures)
12658 ,@(package-native-inputs base))))))
12659
12660 (define-public python2-backports-functools-lru-cache
12661 (package
12662 (name "python2-backports-functools-lru-cache")
12663 (version "1.5")
12664 (source
12665 (origin
12666 (method url-fetch)
12667 ;; only the pypi tarballs contain the necessary metadata
12668 (uri (pypi-uri "backports.functools_lru_cache" version))
12669 (sha256
12670 (base32
12671 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12672 (build-system python-build-system)
12673 (native-inputs
12674 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12675 (arguments
12676 `(#:python ,python-2))
12677 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12678 (synopsis "Backport of functools.lru_cache from Python 3.3")
12679 (description "@code{python2-backports-functools-lru-cache} is a backport
12680 of @code{functools.lru_cache} from python 3.3.")
12681 (license license:expat)))
12682
12683 (define-public python-configparser
12684 (package
12685 (name "python-configparser")
12686 (version "3.7.1")
12687 (source
12688 (origin
12689 (method url-fetch)
12690 (uri (pypi-uri "configparser" version))
12691 (sha256
12692 (base32
12693 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
12694 (build-system python-build-system)
12695 (home-page "https://github.com/jaraco/configparser/")
12696 (synopsis "Backport of configparser from python 3.5")
12697 (description "@code{python-configparser} is a backport of
12698 @code{configparser} from Python 3.5 so that it can be used directly
12699 in other versions.")
12700 (license license:expat)))
12701
12702 (define-public python2-configparser
12703 (package-with-python2 python-configparser))
12704
12705 (define-public python-mando
12706 (package
12707 (name "python-mando")
12708 (version "0.6.4")
12709 (source (origin
12710 (method url-fetch)
12711 (uri (pypi-uri "mando" version))
12712 (sha256
12713 (base32
12714 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12715 (build-system python-build-system)
12716 (propagated-inputs
12717 `(("python-rst2ansi" ,python-rst2ansi)
12718 ("python-six" ,python-six)))
12719 (native-inputs
12720 `(("python-pytest" ,python-pytest)))
12721 (home-page "https://mando.readthedocs.org/")
12722 (synopsis
12723 "Wrapper around argparse, allowing creation of complete CLI applications")
12724 (description
12725 "This package is a wrapper around argparse, allowing you to write complete CLI
12726 applications in seconds while maintaining all the flexibility.")
12727 (license license:expat)))
12728
12729 (define-public python2-mando
12730 (package-with-python2 python-mando))
12731
12732 (define-public python2-argparse
12733 (package
12734 (name "python2-argparse")
12735 (version "1.4.0")
12736 (source
12737 (origin
12738 (method url-fetch)
12739 (uri (pypi-uri "argparse" version))
12740 (sha256
12741 (base32
12742 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12743 (build-system python-build-system)
12744 (arguments
12745 `(#:python ,python-2))
12746 (home-page "https://github.com/ThomasWaldmann/argparse/")
12747 (synopsis "Python command-line parsing library")
12748 (description
12749 "This package is mostly for people who want to have @code{argparse} on
12750 older Pythons because it was not part of the standard library back then.")
12751 (license license:psfl)))
12752
12753 (define-public python-fudge
12754 (package
12755 (name "python-fudge")
12756 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
12757 ;; package, which is currently the only use of this package.
12758 (version "0.9.6")
12759 (source
12760 (origin
12761 (method url-fetch)
12762 (uri (pypi-uri "fudge" version))
12763 (sha256
12764 (base32
12765 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
12766 (build-system python-build-system)
12767 (arguments
12768 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
12769 (home-page "https://github.com/fudge-py/fudge")
12770 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
12771 (description
12772 "Fudge is a Python module for using fake objects (mocks and stubs) to
12773 test real ones.
12774
12775 In readable Python code, you declare the methods available on your fake object
12776 and how they should be called. Then you inject that into your application and
12777 start testing. This declarative approach means you don’t have to record and
12778 playback actions and you don’t have to inspect your fakes after running code.
12779 If the fake object was used incorrectly then you’ll see an informative
12780 exception message with a traceback that points to the culprit.")
12781 (license license:expat)))
12782
12783 (define-public python2-fudge
12784 (package-with-python2 python-fudge))
12785
12786 (define-public python-mwclient
12787 (package
12788 (name "python-mwclient")
12789 (version "0.10.0")
12790 (source
12791 (origin
12792 (method git-fetch)
12793 ;; The PyPI version wouldn't contain tests.
12794 (uri (git-reference
12795 (url "https://github.com/mwclient/mwclient")
12796 (commit (string-append "v" version))))
12797 (file-name (git-file-name name version))
12798 (sha256
12799 (base32
12800 "1c3q6lwmb05yqywc4ya98ca7hsl15niili8rccl4n1yqp77c103v"))))
12801 (build-system python-build-system)
12802 (propagated-inputs
12803 `(("python-requests-oauthlib" ,python-requests-oauthlib)
12804 ("python-six" ,python-six)))
12805 (native-inputs
12806 `(("python-mock" ,python-mock)
12807 ("python-pytest" ,python-pytest)
12808 ("python-pytest-cov" ,python-pytest-cov)
12809 ("python-pytest-runner" ,python-pytest-runner)
12810 ("python-responses" ,python-responses)))
12811 (home-page "https://github.com/btongminh/mwclient")
12812 (synopsis "MediaWiki API client")
12813 (description "This package provides a MediaWiki API client.")
12814 (license license:expat)))
12815
12816 (define-public python2-mwclient
12817 (package-with-python2 python-mwclient))
12818
12819 (define-public python-utils
12820 (package
12821 (name "python-utils")
12822 (version "2.1.0")
12823 (source (origin
12824 (method url-fetch)
12825 (uri (pypi-uri "python-utils" version))
12826 (sha256
12827 (base32
12828 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
12829 (build-system python-build-system)
12830 (native-inputs
12831 `(("pytest-runner" ,python-pytest-runner)
12832 ("pytest" ,python-pytest)
12833 ("six" ,python-six)))
12834 (home-page "https://github.com/WoLpH/python-utils")
12835 (synopsis "Convenient utilities not included with the standard Python install")
12836 (description
12837 "Python Utils is a collection of small Python functions and classes which
12838 make common patterns shorter and easier.")
12839 (license license:bsd-2)))
12840
12841 (define-public python2-utils
12842 (package-with-python2 python-utils))
12843
12844 (define-public python-diff-match-patch
12845 (package
12846 (name "python-diff-match-patch")
12847 (version "20121119")
12848 (source
12849 (origin
12850 (method url-fetch)
12851 (uri (pypi-uri "diff-match-patch" version))
12852 (sha256
12853 (base32
12854 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
12855 (build-system python-build-system)
12856 (home-page "https://code.google.com/p/google-diff-match-patch")
12857 (synopsis "Synchronize plain text")
12858 (description "Diff Match and Patch libraries offer robust algorithms to
12859 perform the operations required for synchronizing plain text.")
12860 (license license:asl2.0)))
12861
12862 (define-public python2-diff-match-patch
12863 (package-with-python2 python-diff-match-patch))
12864
12865 (define-public python-dirsync
12866 (package
12867 (name "python-dirsync")
12868 (version "2.2.3")
12869 (source
12870 (origin
12871 (method url-fetch)
12872 (uri (pypi-uri "dirsync" version))
12873 (sha256
12874 (base32
12875 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
12876 (build-system python-build-system)
12877 (propagated-inputs
12878 `(("six" ,python-six)))
12879 (home-page "https://bitbucket.org/tkhyn/dirsync")
12880 (synopsis "Advanced directory tree synchronisation tool")
12881 (description "Advanced directory tree synchronisation tool.")
12882 (license license:expat)))
12883
12884 (define-public python2-dirsync
12885 (package-with-python2 python-dirsync))
12886
12887 (define-public python-levenshtein
12888 (package
12889 (name "python-levenshtein")
12890 (version "0.12.0")
12891 (source
12892 (origin
12893 (method url-fetch)
12894 (uri (pypi-uri "python-Levenshtein" version))
12895 (sha256
12896 (base32
12897 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
12898 (build-system python-build-system)
12899 (home-page "https://github.com/ztane/python-Levenshtein")
12900 (synopsis "Fast computation of Levenshtein distance and string similarity")
12901 (description
12902 "The Levenshtein Python C extension module contains functions for fast computation of
12903 @enumerate
12904 @item Levenshtein (edit) distance, and edit operations
12905 @item string similarity
12906 @item approximate median strings, and generally string averaging
12907 @item string sequence and set similarity
12908 @end enumerate
12909 It supports both normal and Unicode strings.")
12910 (license license:gpl2+)))
12911
12912 (define-public python2-levenshtein
12913 (package-with-python2 python-levenshtein))
12914
12915 (define-public python-scandir
12916 (package
12917 (name "python-scandir")
12918 (version "1.9.0")
12919 (source
12920 (origin
12921 (method url-fetch)
12922 (uri (pypi-uri "scandir" version))
12923 (sha256
12924 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
12925 (build-system python-build-system)
12926 (arguments
12927 `(#:phases (modify-phases %standard-phases
12928 (replace 'check
12929 (lambda _
12930 (invoke "python" "test/run_tests.py"))))))
12931 (home-page "https://github.com/benhoyt/scandir")
12932 (synopsis "Directory iteration function")
12933 (description
12934 "Directory iteration function like os.listdir(), except that instead of
12935 returning a list of bare filenames, it yields DirEntry objects that include
12936 file type and stat information along with the name. Using scandir() increases
12937 the speed of os.walk() by 2-20 times (depending on the platform and file
12938 system) by avoiding unnecessary calls to os.stat() in most cases.
12939
12940 This package is part of the Python standard library since version 3.5.")
12941 (license license:bsd-3)))
12942
12943 (define-public python2-scandir
12944 (package-with-python2 python-scandir))
12945
12946 (define-public python2-stemming
12947 (package
12948 (name "python2-stemming")
12949 (version "1.0.1")
12950 (source
12951 (origin
12952 (method url-fetch)
12953 (uri (pypi-uri "stemming" version))
12954 (sha256
12955 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
12956 (build-system python-build-system)
12957 (arguments
12958 `(#:python ,python-2))
12959 (home-page "https://bitbucket.org/mchaput/stemming/overview")
12960 (synopsis "Python implementations of various stemming algorithms")
12961 (description
12962 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
12963 stemming algorithms for English. These implementations are straightforward and
12964 efficient, unlike some Python versions of the same algorithms available on the
12965 Web. This package is an extraction of the stemming code included in the Whoosh
12966 search engine.")
12967 (license license:public-domain)))
12968
12969 (define-public python-factory-boy
12970 (package
12971 (name "python-factory-boy")
12972 (version "2.8.1")
12973 (source
12974 (origin
12975 (method url-fetch)
12976 (uri (pypi-uri "factory_boy" version))
12977 (sha256
12978 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
12979 (build-system python-build-system)
12980 (arguments
12981 ;; Tests are not included in the tarball.
12982 `(#:tests? #f))
12983 (propagated-inputs
12984 `(("faker" ,python-faker)))
12985 (home-page "https://github.com/benhoyt/scandir")
12986 (synopsis "Versatile test fixtures replacement")
12987 (description
12988 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
12989
12990 As a fixtures replacement tool, it aims to replace static, hard to maintain
12991 fixtures with easy-to-use factories for complex object.
12992
12993 Instead of building an exhaustive test setup with every possible combination
12994 of corner cases, factory_boy allows you to use objects customized for the
12995 current test, while only declaring the test-specific fields")
12996 (license license:expat)))
12997
12998 (define-public python2-factory-boy
12999 (package-with-python2 python-factory-boy))
13000
13001 (define-public python-translate-toolkit
13002 (package
13003 (name "python-translate-toolkit")
13004 (version "2.1.0")
13005 (source
13006 (origin
13007 (method url-fetch)
13008 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
13009 (sha256
13010 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
13011 (build-system python-build-system)
13012 (native-inputs
13013 `(("python-pytest" ,python-pytest)
13014 ("python-sphinx" ,python-sphinx)))
13015 (propagated-inputs
13016 `(("python-babel" ,python-babel)
13017 ("python-beautifulsoup4" ,python-beautifulsoup4)
13018 ("python-chardet" ,python-chardet)
13019 ("python-diff-match-patch" ,python-diff-match-patch)
13020 ("python-levenshtein" ,python-levenshtein)
13021 ("python-lxml" ,python-lxml)
13022 ("python-six" ,python-six)
13023 ("python-vobject" ,python-vobject)
13024 ("python-pyyaml" ,python-pyyaml)))
13025 (arguments
13026 ;; TODO: tests are not run, because they end with
13027 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
13028 ;; 'parse_funcs'
13029 ;; during test setup.
13030 `(#:tests? #f))
13031 (home-page "https://toolkit.translatehouse.org")
13032 (synopsis "Tools and API for translation and localization engineering")
13033 (description
13034 "Tools and API for translation and localization engineering. It contains
13035 several utilities, as well as an API for building localization tools.")
13036 (license license:gpl2+)))
13037
13038 (define-public python2-translate-toolkit
13039 (package-with-python2 python-translate-toolkit))
13040
13041 (define-public python-packaging
13042 (package
13043 (name "python-packaging")
13044 (version "20.0")
13045 (source
13046 (origin
13047 (method url-fetch)
13048 (uri (pypi-uri "packaging" version))
13049 (sha256
13050 (base32
13051 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
13052 (build-system python-build-system)
13053 (arguments
13054 `(#:phases (modify-phases %standard-phases
13055 (replace 'check
13056 (lambda _ (invoke "py.test" "-vv"))))))
13057 (native-inputs
13058 `(("python-pretend" ,python-pretend)
13059 ("python-pytest" ,python-pytest)))
13060 (propagated-inputs
13061 `(("python-pyparsing" ,python-pyparsing)
13062 ("python-six" ,python-six)))
13063 (home-page "https://github.com/pypa/packaging")
13064 (synopsis "Core utilities for Python packages")
13065 (description "Packaging is a Python module for dealing with Python packages.
13066 It offers an interface for working with package versions, names, and dependency
13067 information.")
13068 ;; From 'LICENSE': This software is made available under the terms of
13069 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
13070 ;; Contributions to this software is made under the terms of *both* these
13071 ;; licenses.
13072 (license (list license:asl2.0 license:bsd-2))))
13073
13074 (define-public python2-packaging
13075 (package-with-python2 python-packaging))
13076
13077 (define-public python-relatorio
13078 (package
13079 (name "python-relatorio")
13080 (version "0.8.0")
13081 (source
13082 (origin
13083 (method url-fetch)
13084 (uri (pypi-uri "relatorio" version))
13085 (sha256
13086 (base32
13087 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
13088 (build-system python-build-system)
13089 (propagated-inputs
13090 `(("python-lxml" ,python-lxml)
13091 ("python-genshi" ,python-genshi)))
13092 (native-inputs
13093 `(("python-magic" ,python-magic)))
13094 (home-page "https://relatorio.tryton.org/")
13095 (synopsis "Templating library able to output ODT and PDF files")
13096 (description "Relatorio is a templating library which provides a way to
13097 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
13098 for more filetypes can be easily added by creating plugins for them.")
13099 (license license:gpl3+)))
13100
13101 (define-public python2-relatorio
13102 (package-with-python2 python-relatorio))
13103
13104 (define-public python-radon
13105 (package
13106 (name "python-radon")
13107 (version "2.2.0")
13108 (source
13109 (origin
13110 (method url-fetch)
13111 (uri (pypi-uri "radon" version))
13112 (sha256
13113 (base32
13114 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
13115 (build-system python-build-system)
13116 (arguments
13117 `(#:phases (modify-phases %standard-phases
13118 (replace 'check
13119 (lambda _
13120 (invoke "python" "radon/tests/run.py"))))))
13121 (propagated-inputs
13122 `(("python-colorama" ,python-colorama)
13123 ("python-flake8-polyfill" ,python-flake8-polyfill)
13124 ("python-mando" ,python-mando)))
13125 (native-inputs
13126 `(("python-pytest" ,python-pytest)
13127 ("python-pytest-mock" ,python-pytest-mock)))
13128 (home-page "https://radon.readthedocs.org/")
13129 (synopsis "Code Metrics in Python")
13130 (description "Radon is a Python tool which computes various code metrics.
13131 Supported metrics are:
13132 @itemize @bullet
13133 @item raw metrics: SLOC, comment lines, blank lines, &c.
13134 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
13135 @item Halstead metrics (all of them)
13136 @item the Maintainability Index (a Visual Studio metric)
13137 @end itemize")
13138 (license license:expat)))
13139
13140 (define-public python2-radon
13141 (package-with-python2 python-radon))
13142
13143 (define-public python-sure
13144 (package
13145 (name "python-sure")
13146 (version "1.4.11")
13147 (source
13148 (origin
13149 (method url-fetch)
13150 (uri (pypi-uri "sure" version))
13151 (sha256
13152 (base32
13153 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
13154 (build-system python-build-system)
13155 (propagated-inputs
13156 `(("python-mock" ,python-mock)
13157 ("python-six" ,python-six)))
13158 (native-inputs
13159 `(("python-nose" ,python-nose)))
13160 (home-page "https://github.com/gabrielfalcao/sure")
13161 (synopsis "Automated testing library in python for python")
13162 (description
13163 "Sure is a python library that leverages a DSL for writing assertions.
13164 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
13165 (license license:gpl3+)))
13166
13167 (define-public python2-sure
13168 (package-with-python2 python-sure))
13169
13170 (define-public python2-couleur
13171 ;; This package does not seem to support python3 at all, hence,
13172 ;; only the python2 variant definition is provided.
13173 (package
13174 (name "python2-couleur")
13175 (version "0.6.2")
13176 (source
13177 (origin
13178 (method url-fetch)
13179 (uri (pypi-uri "couleur" version))
13180 (sha256
13181 (base32
13182 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
13183 (build-system python-build-system)
13184 (arguments
13185 `(#:python ,python-2))
13186 (home-page "https://github.com/gabrielfalcao/couleur")
13187 (synopsis
13188 "ANSI terminal tool for python, colored shell and other handy fancy features")
13189 (description
13190 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
13191 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
13192 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
13193 ;; https://github.com/gabrielfalcao/couleur/issues/11
13194 (license license:lgpl3+)))
13195
13196 (define-public python-misaka
13197 (package
13198 (name "python-misaka")
13199 (version "2.1.1")
13200 (source
13201 (origin
13202 (method url-fetch)
13203 (uri (pypi-uri "misaka" version))
13204 (sha256
13205 (base32
13206 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
13207 (build-system python-build-system)
13208 (arguments
13209 `(;; Line 37 of setup.py calls self.run_command('develop')
13210 ;; in the 'check' phase. This command seems to be trying
13211 ;; to write to
13212 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
13213 ;; for which it does not have the permission to write.
13214 #:tests? #f))
13215 (propagated-inputs
13216 `(("python-cffi" ,python-cffi)))
13217 (home-page "https://github.com/FSX/misaka")
13218 (synopsis "Python binding for Hoedown")
13219 (description
13220 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
13221 library written in C. It features a fast HTML renderer and functionality to make custom
13222 renderers (e.g. man pages or LaTeX).")
13223 (license license:expat)))
13224
13225 (define-public python2-misaka
13226 (package-with-python2 python-misaka))
13227
13228 (define-public python2-steadymark
13229 ;; This is forced into being a python2 only variant
13230 ;; due to its dependence on couleur that has no support
13231 ;; for python3
13232 (package
13233 (name "python2-steadymark")
13234 (version "0.7.3")
13235 (source
13236 (origin
13237 (method url-fetch)
13238 (uri (pypi-uri "steadymark" version))
13239 (sha256
13240 (base32
13241 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
13242 (build-system python-build-system)
13243 (native-inputs
13244 `(("python-couleur" ,python2-couleur)
13245 ("python-sure" ,python2-sure)
13246 ("python-misaka" ,python2-misaka)))
13247 (arguments
13248 `(#:python ,python-2
13249 #:phases
13250 (modify-phases %standard-phases
13251 (add-before 'build 'patch-setup-py
13252 (lambda _
13253 ;; Update requirements from dependency==version
13254 ;; to dependency>=version
13255 (substitute* "setup.py"
13256 (("==") ">="))
13257 #t)))))
13258 (home-page "https://github.com/gabrielfalcao/steadymark")
13259 (synopsis "Markdown-based test runner for python")
13260 (description
13261 "@code{Steadymark} allows documentation to be written in github-flavoured
13262 markdown. The documentation may contain snippets of code surrounded by python
13263 code blocks and @code{Steadymark} will find these snippets and run them, making
13264 sure that there are no old malfunctional examples in the documentation examples.")
13265 (license license:expat)))
13266
13267 (define-public python-jsonpointer
13268 (package
13269 (name "python-jsonpointer")
13270 (version "1.10")
13271 (source
13272 (origin
13273 (method url-fetch)
13274 (uri (pypi-uri "jsonpointer" version))
13275 (sha256
13276 (base32
13277 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
13278 (build-system python-build-system)
13279 (home-page "https://github.com/stefankoegl/python-json-pointer")
13280 (synopsis "Identify specific nodes in a JSON document")
13281 (description "@code{jsonpointer} allows you to access specific nodes
13282 by path in a JSON document (see RFC 6901).")
13283 (license license:bsd-3)))
13284
13285 (define-public python2-jsonpointer
13286 (package-with-python2 python-jsonpointer))
13287
13288 (define-public python-jsonpatch
13289 (package
13290 (name "python-jsonpatch")
13291 (version "1.16")
13292 (source
13293 (origin
13294 (method git-fetch)
13295 ;; pypi version lacks tests.js
13296 (uri (git-reference
13297 (url "https://github.com/stefankoegl/python-json-patch")
13298 (commit (string-append "v" version))))
13299 (file-name (git-file-name name version))
13300 (sha256
13301 (base32
13302 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
13303 (build-system python-build-system)
13304 (native-inputs
13305 `(("python-jsonpointer" ,python-jsonpointer)))
13306 (home-page "https://github.com/stefankoegl/python-json-patch")
13307 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
13308 (description "@code{jsonpatch} is a library and program that allows
13309 applying JSON Patches according to RFC 6902.")
13310 (license license:bsd-3)))
13311
13312 (define-public python2-jsonpatch
13313 (package-with-python2 python-jsonpatch))
13314
13315 (define-public python-jsonpatch-0.4
13316 (package (inherit python-jsonpatch)
13317 (name "python-jsonpatch")
13318 (version "0.4")
13319 (source
13320 (origin
13321 (method git-fetch)
13322 (uri (git-reference
13323 (url "https://github.com/stefankoegl/python-json-patch")
13324 (commit (string-append "v" version))))
13325 (file-name (git-file-name name version))
13326 (sha256
13327 (base32
13328 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
13329
13330 (define-public python2-jsonpatch-0.4
13331 (package-with-python2 python-jsonpatch-0.4))
13332
13333 (define-public python-rfc3986
13334 (package
13335 (name "python-rfc3986")
13336 (version "1.1.0")
13337 (source (origin
13338 (method url-fetch)
13339 (uri (pypi-uri "rfc3986" version))
13340 (sha256
13341 (base32
13342 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
13343 (build-system python-build-system)
13344 (arguments
13345 `(#:modules ((guix build utils)
13346 (guix build python-build-system)
13347 (ice-9 ftw)
13348 (srfi srfi-1)
13349 (srfi srfi-26))
13350 #:phases
13351 (modify-phases %standard-phases
13352 (replace 'check
13353 (lambda _
13354 (let ((cwd (getcwd)))
13355 (setenv "PYTHONPATH"
13356 (string-append cwd "/build/"
13357 (find (cut string-prefix? "lib" <>)
13358 (scandir (string-append cwd "/build")))
13359 ":"
13360 (getenv "PYTHONPATH")))
13361 (invoke "pytest" "-v")))))))
13362 (native-inputs
13363 `(("python-pytest" ,python-pytest)))
13364 (home-page "https://rfc3986.readthedocs.io/")
13365 (synopsis "Parse and validate URI references")
13366 (description
13367 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
13368 validation and authority parsing. This module also supports RFC@tie{}6874
13369 which adds support for zone identifiers to IPv6 addresses.")
13370 (license license:asl2.0)))
13371
13372 (define-public python2-rfc3986
13373 (package-with-python2 python-rfc3986))
13374
13375 (define-public python-rfc3987
13376 (package
13377 (name "python-rfc3987")
13378 (version "1.3.7")
13379 (source
13380 (origin
13381 (method url-fetch)
13382 (uri (pypi-uri "rfc3987" version))
13383 (sha256
13384 (base32
13385 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
13386 (build-system python-build-system)
13387 (home-page "https://pypi.python.org/pypi/rfc3987")
13388 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
13389 (description "@code{rfc3987} provides routines for parsing and
13390 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
13391 (license license:gpl3+)))
13392
13393 (define-public python2-rfc3987
13394 (package-with-python2 python-rfc3987))
13395
13396 (define-public python-validate-email
13397 (package
13398 (name "python-validate-email")
13399 (version "1.3")
13400 (source
13401 (origin
13402 (method url-fetch)
13403 (uri (pypi-uri "validate_email" version))
13404 (sha256
13405 (base32
13406 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
13407 (build-system python-build-system)
13408 (home-page "https://github.com/syrusakbary/validate_email")
13409 (synopsis "Verifies if an email address is valid and really exists")
13410 (description "@code{validate_email} can be used to verify if an email
13411 address is valid and really exists.")
13412 (license license:lgpl3+)))
13413
13414 (define-public python2-validate-email
13415 (package-with-python2 python-validate-email))
13416
13417 (define-public python-flex
13418 (package
13419 (name "python-flex")
13420 (version "6.10.0")
13421 (source
13422 (origin
13423 (method url-fetch)
13424 (uri (pypi-uri "flex" version))
13425 (sha256
13426 (base32
13427 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
13428 (build-system python-build-system)
13429 (propagated-inputs
13430 `(("python-click" ,python-click)
13431 ("python-iso8601" ,python-iso8601)
13432 ("python-jsonpointer" ,python-jsonpointer)
13433 ("python-pyyaml" ,python-pyyaml)
13434 ("python-requests" ,python-requests)
13435 ("python-rfc3987" ,python-rfc3987)
13436 ("python-six" ,python-six)
13437 ("python-validate-email" ,python-validate-email)))
13438 (home-page "https://github.com/pipermerriam/flex")
13439 (synopsis "Validates Swagger schemata")
13440 (description "@code{flex} can be used to validate Swagger schemata.")
13441 (license license:bsd-3)))
13442
13443 (define-public python2-flex
13444 (package-with-python2 python-flex))
13445
13446 (define-public python-marshmallow
13447 (package
13448 (name "python-marshmallow")
13449 (version "3.0.0b14")
13450 (source
13451 (origin
13452 (method url-fetch)
13453 (uri (pypi-uri "marshmallow" version))
13454 (sha256
13455 (base32
13456 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
13457 (build-system python-build-system)
13458 (propagated-inputs
13459 `(("python-dateutil" ,python-dateutil)
13460 ("python-simplejson" ,python-simplejson)))
13461 (native-inputs
13462 `(("python-pytest" ,python-pytest)
13463 ("python-pytz" ,python-pytz)))
13464 (home-page "https://github.com/marshmallow-code/marshmallow")
13465 (synopsis "Convert complex datatypes to and from native
13466 Python datatypes.")
13467 (description "@code{marshmallow} provides a library for converting
13468 complex datatypes to and from native Python datatypes.")
13469 (license license:expat)))
13470
13471 (define-public python2-marshmallow
13472 (package-with-python2 python-marshmallow))
13473
13474 (define-public python-apispec
13475 (package
13476 (name "python-apispec")
13477 (version "0.25.3")
13478 (source
13479 (origin
13480 (method url-fetch)
13481 (uri (pypi-uri "apispec" version))
13482 (sha256
13483 (base32
13484 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
13485 (build-system python-build-system)
13486 (propagated-inputs
13487 `(("python-pyyaml" ,python-pyyaml)))
13488 (native-inputs
13489 `(("python-pytest" ,python-pytest)
13490 ("python-flask" ,python-flask)
13491 ("python-marshmallow" ,python-marshmallow)
13492 ("python-tornado" ,python-tornado)
13493 ("python-bottle" ,python-bottle)
13494 ("python-mock" ,python-mock)))
13495 (home-page "https://github.com/marshmallow-code/apispec")
13496 (synopsis "Swagger 2.0 API specification generator")
13497 (description "@code{python-apispec} is a pluggable API specification
13498 generator. Currently supports the OpenAPI specification (f.k.a.
13499 Swagger 2.0).")
13500 (license license:expat)))
13501
13502 (define-public python2-apispec
13503 (package-with-python2 python-apispec))
13504
13505 (define-public python-flasgger
13506 (package
13507 (name "python-flasgger")
13508 (version "0.6.3")
13509 (source
13510 (origin
13511 (method git-fetch)
13512 (uri (git-reference
13513 (url "https://github.com/rochacbruno/flasgger.git")
13514 (commit version)))
13515 (file-name (git-file-name name version))
13516 (sha256
13517 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
13518 (build-system python-build-system)
13519 (arguments
13520 `(#:phases
13521 (modify-phases %standard-phases
13522 (replace 'check
13523 (lambda* (#:key inputs outputs #:allow-other-keys)
13524 (substitute* "Makefile"
13525 (("flake8 flasgger --ignore=F403")
13526 "flake8 flasgger --ignore=E731,F403"))
13527 (setenv "PYTHONPATH" (string-append (getcwd)
13528 ":"
13529 (getenv "PYTHONPATH")))
13530 (invoke "py.test"))))))
13531 (propagated-inputs
13532 `(("python-flask" ,python-flask)
13533 ("python-pyyaml" ,python-pyyaml)
13534 ("python-jsonschema" ,python-jsonschema)
13535 ("python-mistune" ,python-mistune)
13536 ("python-six" ,python-six)))
13537 (native-inputs
13538 `(("python-decorator" ,python-decorator)
13539 ("python-flake8" ,python-flake8)
13540 ("python-flask-restful" ,python-flask-restful)
13541 ("python-flex" ,python-flex)
13542 ("python-pytest" ,python-pytest)
13543 ("python-pytest-cov" ,python-pytest-cov)
13544 ("python-marshmallow" ,python-marshmallow)
13545 ("python-apispec" ,python-apispec)))
13546 (home-page "https://github.com/rochacbruno/flasgger/")
13547 (synopsis "Extract Swagger specs from your Flask project")
13548 (description "@code{python-flasgger} allows extracting Swagger specs
13549 from your Flask project. It is a fork of Flask-Swagger.")
13550 (license license:expat)))
13551
13552 (define-public python2-flasgger
13553 (package-with-python2 python-flasgger))
13554
13555 (define-public python-swagger-spec-validator
13556 (package
13557 (name "python-swagger-spec-validator")
13558 (version "2.4.3")
13559 (source
13560 (origin
13561 (method url-fetch)
13562 (uri (pypi-uri "swagger-spec-validator" version))
13563 (sha256
13564 (base32
13565 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
13566 (build-system python-build-system)
13567 (propagated-inputs
13568 `(("python-jsonschema" ,python-jsonschema)
13569 ("python-pyyaml" ,python-pyyaml)
13570 ("python-six" ,python-six)))
13571 (home-page
13572 "https://github.com/Yelp/swagger_spec_validator")
13573 (synopsis "Validation of Swagger specifications")
13574 (description "@code{swagger_spec_validator} provides a library for
13575 validating Swagger API specifications.")
13576 (license license:asl2.0)))
13577
13578 (define-public python2-swagger-spec-validator
13579 (package-with-python2 python-swagger-spec-validator))
13580
13581 (define-public python-apache-libcloud
13582 (package
13583 (name "python-apache-libcloud")
13584 (version "2.4.0")
13585 (source
13586 (origin
13587 (method url-fetch)
13588 (uri (pypi-uri "apache-libcloud" version))
13589 (sha256
13590 (base32
13591 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13592 (build-system python-build-system)
13593 (arguments
13594 `(#:phases
13595 (modify-phases %standard-phases
13596 (add-after 'unpack 'patch-ssh
13597 (lambda* (#:key inputs #:allow-other-keys)
13598 (substitute* "libcloud/compute/ssh.py"
13599 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13600 "/bin/ssh" "'")))
13601 #t))
13602 (add-after 'unpack 'patch-tests
13603 (lambda _
13604 (substitute* "./libcloud/test/test_file_fixtures.py"
13605 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13606 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13607 return (httplib.OK,
13608 \"1234abcd\",
13609 {\"test\": \"value\"},
13610 httplib.responses[httplib.OK])
13611 def _ascii"))
13612 (substitute* "libcloud/test/compute/test_ssh_client.py"
13613 (("class ShellOutSSHClientTests")
13614 "@unittest.skip(\"Guix container doesn't have ssh service\")
13615 class ShellOutSSHClientTests")
13616 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13617 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13618 (("'.xF0', '.x90', '.x8D', '.x88'")
13619 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13620 #t))
13621 (add-before 'check 'copy-secret
13622 (lambda _
13623 (copy-file "libcloud/test/secrets.py-dist"
13624 "libcloud/test/secrets.py")
13625 #t)))))
13626 (inputs
13627 `(("openssh" ,openssh)))
13628 (propagated-inputs
13629 `(("python-paramiko" ,python-paramiko)
13630 ("python-requests" ,python-requests)))
13631 (native-inputs
13632 `(("python-lockfile" ,python-lockfile)
13633 ("python-mock" ,python-mock)
13634 ("python-pytest" ,python-pytest)
13635 ("python-pytest-runner" ,python-pytest-runner)
13636 ("python-requests-mock" ,python-requests-mock)))
13637 (home-page "https://libcloud.apache.org/")
13638 (synopsis "Unified Cloud API")
13639 (description "@code{libcloud} is a Python library for interacting with
13640 many of the popular cloud service providers using a unified API.")
13641 (license license:asl2.0)))
13642
13643 (define-public python2-apache-libcloud
13644 (package-with-python2 python-apache-libcloud))
13645
13646 (define-public python-smmap2
13647 (package
13648 (name "python-smmap2")
13649 (version "2.0.5")
13650 (source
13651 (origin
13652 (method url-fetch)
13653 (uri (pypi-uri "smmap2" version))
13654 (sha256
13655 (base32 "16k03pcnxd3lgzwgbd7nl4jwzm1wmahirvd09kljnzvy96hgza99"))))
13656 (build-system python-build-system)
13657 (native-inputs
13658 `(("python-nosexcover" ,python-nosexcover)))
13659 (home-page "https://github.com/Byron/smmap")
13660 (synopsis "Python sliding window memory map manager")
13661 (description "@code{smmap2} is a pure Python implementation of a sliding
13662 window memory map manager.")
13663 (license license:bsd-3)))
13664
13665 (define-public python2-smmap2
13666 (package-with-python2 python-smmap2))
13667
13668 (define-public python-regex
13669 (package
13670 (name "python-regex")
13671 (version "2019.04.14")
13672 (source (origin
13673 (method url-fetch)
13674 (uri (pypi-uri "regex" version))
13675 (sha256
13676 (base32
13677 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
13678 ;; TODO: Fix and enable regex_test.py tests that complain about the
13679 ;; test.support module not existing.
13680 (build-system python-build-system)
13681 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13682 (synopsis "Alternative regular expression module")
13683 (description "This regular expression implementation is backwards-
13684 compatible with the standard @code{re} module, but offers additional
13685 functionality like full case-folding for case-insensitive matches in Unicode.")
13686 (license license:psfl)))
13687
13688 (define-public python2-regex
13689 (package-with-python2 python-regex))
13690
13691 (define-public python2-pyopengl
13692 (package
13693 (name "python2-pyopengl")
13694 (version "3.1.0")
13695 (source
13696 (origin
13697 (method url-fetch)
13698 (uri (pypi-uri "PyOpenGL" version))
13699 (sha256
13700 (base32
13701 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13702 (arguments
13703 `(#:python ,python-2))
13704 (build-system python-build-system)
13705 (home-page "http://pyopengl.sourceforge.net")
13706 (synopsis "Standard OpenGL bindings for Python")
13707 (description
13708 "PyOpenGL is the most common cross platform Python binding to OpenGL and
13709 related APIs. The binding is created using the standard @code{ctypes}
13710 library.")
13711 (license license:bsd-3)))
13712
13713 (define-public python2-pyopengl-accelerate
13714 (package
13715 (inherit python2-pyopengl)
13716 (name "python2-pyopengl-accelerate")
13717 (version "3.1.0")
13718 (source
13719 (origin
13720 (method url-fetch)
13721 (uri (pypi-uri "PyOpenGL-accelerate" version))
13722 (sha256
13723 (base32
13724 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
13725 (synopsis "Acceleration code for PyOpenGL")
13726 (description
13727 "This is the Cython-coded accelerator module for PyOpenGL.")))
13728
13729 (define-public python-rencode
13730 (package
13731 (name "python-rencode")
13732 (version "1.0.5")
13733 (source
13734 (origin
13735 (method url-fetch)
13736 (uri (pypi-uri "rencode" version))
13737 (sha256
13738 (base32
13739 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
13740 (build-system python-build-system)
13741 (arguments
13742 `(#:phases
13743 (modify-phases %standard-phases
13744 (add-before 'check 'delete-bogus-test
13745 ;; This test requires /home/aresch/Downloads, which is not provided by
13746 ;; the build environment.
13747 (lambda _
13748 (delete-file "rencode/t.py")
13749 #t)))))
13750 (native-inputs `(("pkg-config" ,pkg-config)
13751 ("python-cython" ,python-cython)))
13752 (home-page "https://github.com/aresch/rencode")
13753 (synopsis "Serialization of heterogeneous data structures")
13754 (description
13755 "The @code{rencode} module is a data structure serialization library,
13756 similar to @code{bencode} from the BitTorrent project. For complex,
13757 heterogeneous data structures with many small elements, r-encoding stake up
13758 significantly less space than b-encodings. This version of rencode is a
13759 complete rewrite in Cython to attempt to increase the performance over the
13760 pure Python module.")
13761 (license license:bsd-3)))
13762
13763 (define-public python2-rencode
13764 (package-with-python2 python-rencode))
13765
13766 (define-public python-xenon
13767 (package
13768 (name "python-xenon")
13769 (version "0.5.4")
13770 (source
13771 (origin
13772 (method url-fetch)
13773 (uri (pypi-uri "xenon" version))
13774 (sha256
13775 (base32
13776 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
13777 (build-system python-build-system)
13778 (native-inputs
13779 `(("python-pyyaml" ,python-pyyaml)
13780 ("python-radon" ,python-radon)
13781 ("python-requests" ,python-requests)
13782 ("python-flake8" ,python-flake8)
13783 ("python-tox" ,python-tox)))
13784 (arguments
13785 `(#:phases
13786 (modify-phases %standard-phases
13787 (add-before 'build 'patch-test-requirements
13788 (lambda _
13789 ;; Remove httpretty dependency for tests.
13790 (substitute* "setup.py"
13791 (("httpretty") ""))
13792 #t)))))
13793 (home-page "https://xenon.readthedocs.org/")
13794 (synopsis "Monitor code metrics for Python on your CI server")
13795 (description
13796 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
13797 Ideally, @code{xenon} is run every time code is committed. Through command
13798 line options, various thresholds can be set for the complexity of code. It
13799 will fail (i.e. it will exit with a non-zero exit code) when any of these
13800 requirements is not met.")
13801 (license license:expat)))
13802
13803 (define-public python2-xenon
13804 (package-with-python2 python-xenon))
13805
13806 (define-public python-pysocks
13807 (package
13808 (name "python-pysocks")
13809 (version "1.7.0")
13810 (source
13811 (origin
13812 (method url-fetch)
13813 (uri (pypi-uri "PySocks" version))
13814 (sha256
13815 (base32
13816 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
13817 (build-system python-build-system)
13818 (arguments `(#:tests? #f))
13819 (home-page "https://github.com/Anorov/PySocks")
13820 (synopsis "SOCKS client module")
13821 (description "@code{pysocks} is an updated and semi-actively maintained
13822 version of @code{SocksiPy} with bug fixes and extra features.")
13823 (license license:bsd-3)))
13824
13825 (define-public python2-pysocks
13826 (package-with-python2 python-pysocks))
13827
13828 (define-public python-pydiff
13829 (package
13830 (name "python-pydiff")
13831 (version "0.2")
13832 (source
13833 (origin
13834 (method url-fetch)
13835 (uri (pypi-uri "pydiff" version))
13836 (sha256
13837 (base32
13838 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
13839 (build-system python-build-system)
13840 (home-page "https://github.com/myint/pydiff")
13841 (synopsis "Library to diff two Python files at the bytecode level")
13842 (description
13843 "@code{pydiff} makes it easy to look for actual code changes while
13844 ignoring formatting changes.")
13845 (license license:expat)))
13846
13847 (define-public python2-pydiff
13848 (package-with-python2 python-pydiff))
13849
13850 (define-public python-tqdm
13851 (package
13852 (name "python-tqdm")
13853 (version "4.19.6")
13854 (source
13855 (origin
13856 (method url-fetch)
13857 (uri (pypi-uri "tqdm" version))
13858 (sha256
13859 (base32
13860 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
13861 (build-system python-build-system)
13862 (native-inputs
13863 `(("python-flake8" ,python-flake8)
13864 ("python-nose" ,python-nose)
13865 ("python-coverage" ,python-coverage)))
13866 (home-page "https://github.com/tqdm/tqdm")
13867 (synopsis "Fast, extensible progress meter")
13868 (description
13869 "Make loops show a progress bar on the console by just wrapping any
13870 iterable with @code{|tqdm(iterable)|}. Offers many options to define
13871 design and layout.")
13872 (license (list license:mpl2.0 license:expat))
13873 (properties `((python2-variant . ,(delay python2-tqdm))))))
13874
13875 (define-public python2-tqdm
13876 (let ((tqdm (package-with-python2
13877 (strip-python2-variant python-tqdm))))
13878 (package (inherit tqdm)
13879 (native-inputs `(("python2-functools32" ,python2-functools32)
13880 ,@(package-native-inputs tqdm))))))
13881
13882 (define-public python-pkginfo
13883 (package
13884 (name "python-pkginfo")
13885 (version "1.4.2")
13886 (source
13887 (origin
13888 (method url-fetch)
13889 (uri (pypi-uri "pkginfo" version))
13890 (sha256
13891 (base32
13892 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
13893 (build-system python-build-system)
13894 (arguments
13895 ;; The tests are broken upstream.
13896 '(#:tests? #f))
13897 (home-page
13898 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
13899 (synopsis
13900 "Query metadatdata from sdists, bdists, and installed packages")
13901 (description
13902 "API to query the distutils metadata written in @file{PKG-INFO} inside a
13903 source distriubtion (an sdist) or a binary distribution (e.g., created by
13904 running bdist_egg). It can also query the EGG-INFO directory of an installed
13905 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
13906 created by running @code{python setup.py develop}).")
13907 (license license:expat)))
13908
13909 (define-public python2-pkginfo
13910 (package-with-python2 python-pkginfo))
13911
13912 (define-public python-twine
13913 (package
13914 (name "python-twine")
13915 (version "1.9.1")
13916 (source
13917 (origin
13918 (method url-fetch)
13919 (uri (pypi-uri "twine" version))
13920 (sha256
13921 (base32
13922 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
13923 (build-system python-build-system)
13924 (propagated-inputs
13925 `(("python-tqdm" ,python-tqdm)
13926 ("python-pkginfo" ,python-pkginfo)
13927 ("python-requests" ,python-requests)
13928 ("python-requests-toolbelt" ,python-requests-toolbelt)))
13929 (home-page "https://github.com/pypa/twine")
13930 (synopsis "Collection of utilities for interacting with PyPI")
13931 (description
13932 "@code{twine} currently supports registering projects and uploading
13933 distributions. It authenticates the user over HTTPS, allows them to pre-sign
13934 their files and supports any packaging format (including wheels).")
13935 (license license:asl2.0)))
13936
13937 (define-public python2-twine
13938 (package-with-python2 python-twine))
13939
13940 (define-public python-linecache2
13941 (package
13942 (name "python-linecache2")
13943 (version "1.0.0")
13944 (source
13945 (origin
13946 (method url-fetch)
13947 (uri (pypi-uri "linecache2" version))
13948 (sha256
13949 (base32
13950 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
13951 (build-system python-build-system)
13952 (arguments
13953 `(;; The tests depend on unittest2, and our version is a bit too old.
13954 #:tests? #f))
13955 (native-inputs
13956 `(("python-pbr" ,python-pbr-minimal)))
13957 (home-page
13958 "https://github.com/testing-cabal/linecache2")
13959 (synopsis "Backports of the linecache module")
13960 (description
13961 "The linecache module allows one to get any line from any file, while
13962 attempting to optimize internally, using a cache, the common case where many
13963 lines are read from a single file.")
13964 (license license:psfl)))
13965
13966 (define-public python2-linecache2
13967 (package-with-python2 python-linecache2))
13968
13969 (define-public python-traceback2
13970 (package
13971 (name "python-traceback2")
13972 (version "1.4.0")
13973 (source
13974 (origin
13975 (method url-fetch)
13976 (uri (pypi-uri "traceback2" version))
13977 (sha256
13978 (base32
13979 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
13980 (build-system python-build-system)
13981 (arguments
13982 `(;; python-traceback2 and python-unittest2 depend on one another.
13983 #:tests? #f))
13984 (native-inputs
13985 `(("python-pbr" ,python-pbr-minimal)))
13986 (propagated-inputs
13987 `(("python-linecache2" ,python-linecache2)))
13988 (home-page
13989 "https://github.com/testing-cabal/traceback2")
13990 (synopsis "Backports of the traceback module")
13991 (description
13992 "This module provides a standard interface to extract, format and print
13993 stack traces of Python programs. It exactly mimics the behavior of the Python
13994 interpreter when it prints a stack trace.")
13995 (license license:psfl)))
13996
13997 (define-public python2-traceback2
13998 (package-with-python2 python-traceback2))
13999
14000 (define-public python-ratelimiter
14001 (package
14002 (name "python-ratelimiter")
14003 (version "1.2.0")
14004 (source
14005 (origin
14006 (method url-fetch)
14007 (uri (pypi-uri "ratelimiter" version))
14008 (sha256
14009 (base32
14010 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
14011 (build-system python-build-system)
14012 (arguments
14013 '(#:tests? #f)) ; There are no tests in the pypi archive.
14014 (home-page "https://github.com/RazerM/ratelimiter")
14015 (synopsis "Simple rate limiting object")
14016 (description
14017 "The @code{ratelimiter} module ensures that an operation will not be
14018 executed more than a given number of times during a given period.")
14019 (license license:asl2.0)))
14020
14021 (define-public python2-ratelimiter
14022 (package-with-python2 python-ratelimiter))
14023
14024 (define-public python-dukpy
14025 (package
14026 (name "python-dukpy")
14027 (version "0.3")
14028 (source
14029 (origin
14030 (method git-fetch)
14031 (uri (git-reference
14032 (url "https://github.com/kovidgoyal/dukpy.git")
14033 (commit (string-append "v" version))))
14034 (file-name (git-file-name name version))
14035 (sha256
14036 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
14037 (build-system python-build-system)
14038 (home-page "https://github.com/kovidgoyal/dukpy")
14039 (synopsis "Run JavaScript in python")
14040 (description
14041 "dukpy is a JavaScript runtime environment for Python using the duktape
14042 embeddable JavaScript engine.")
14043 ;; Dukpy is licensed under MIT like the embedded duktape library,
14044 ;; with 'errors.c' as GPL3.
14045 (license (list license:expat license:gpl3))))
14046
14047 (define-public python2-dukpy
14048 (package-with-python2 python-dukpy))
14049
14050 (define-public python-jsonrpclib-pelix
14051 (package
14052 (name "python-jsonrpclib-pelix")
14053 (version "0.3.2")
14054 (source
14055 (origin
14056 (method url-fetch)
14057 (uri (pypi-uri "jsonrpclib-pelix" version))
14058 (sha256
14059 (base32
14060 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
14061 (build-system python-build-system)
14062 (arguments
14063 `(#:tests? #f)) ; no tests in PyPI tarball
14064 (home-page "https://github.com/tcalmant/jsonrpclib/")
14065 (synopsis "JSON-RPC 2.0 client library for Python")
14066 (description
14067 "This library implements the JSON-RPC v2.0
14068 specification (backwards-compatible) as a client library for Python. This
14069 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
14070 services.")
14071 (license license:asl2.0)))
14072
14073 (define-public python2-jsonrpclib-pelix
14074 (package-with-python2 python-jsonrpclib-pelix))
14075
14076 (define-public python-setuptools-scm-git-archive
14077 (package
14078 (name "python-setuptools-scm-git-archive")
14079 (version "1.0")
14080 (source
14081 (origin
14082 (method url-fetch)
14083 (uri (pypi-uri "setuptools_scm_git_archive" version))
14084 (sha256
14085 (base32
14086 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
14087 (build-system python-build-system)
14088 (native-inputs
14089 `(("python-pytest" ,python-pytest)))
14090 (propagated-inputs
14091 `(("python-setuptools-scm" ,python-setuptools-scm)))
14092 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
14093 (synopsis "Setuptools_scm plugin for git archives")
14094 (description
14095 "The setuptools_scm_git_archive package is a plugin to
14096 setuptools_scm, which supports obtaining versions from git archives that
14097 belong to tagged versions.")
14098 (license license:expat)))
14099
14100 (define-public python2-setuptools-scm-git-archive
14101 (package-with-python2 python-setuptools-scm-git-archive))
14102
14103 (define-public python-setuptools-git
14104 (package
14105 (name "python-setuptools-git")
14106 (version "1.2")
14107 (source
14108 (origin
14109 (method url-fetch)
14110 (uri (pypi-uri "setuptools-git" version))
14111 (sha256
14112 (base32
14113 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
14114 (build-system python-build-system)
14115 (arguments
14116 `(#:phases
14117 (modify-phases %standard-phases
14118 ;; This is needed for tests.
14119 (add-after 'unpack 'configure-git
14120 (lambda _
14121 (setenv "HOME" "/tmp")
14122 (invoke "git" "config" "--global" "user.email" "guix")
14123 (invoke "git" "config" "--global" "user.name" "guix")
14124 #t)))))
14125 (native-inputs
14126 `(("git" ,git-minimal)))
14127 (home-page "https://github.com/msabramo/setuptools-git")
14128 (synopsis "Setuptools revision control system plugin for Git")
14129 (description
14130 "This package provides a plugin for Setuptools for revision control with
14131 Git.")
14132 (license license:bsd-3)))
14133
14134 (define-public python-pyclipper
14135 (package
14136 (name "python-pyclipper")
14137 (version "1.1.0.post3")
14138 (source
14139 (origin
14140 (method url-fetch)
14141 (uri (pypi-uri "pyclipper" version ".zip"))
14142 (sha256
14143 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
14144 (modules '((guix build utils)))
14145 (snippet
14146 '(begin
14147 ;; This file is generated by Cython.
14148 (delete-file "pyclipper/pyclipper.cpp") #t))))
14149 (build-system python-build-system)
14150 (arguments
14151 `(#:phases
14152 (modify-phases %standard-phases
14153 (add-before 'build 'cythonize-sources
14154 (lambda _
14155 (with-directory-excursion "pyclipper"
14156 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
14157 (propagated-inputs
14158 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
14159 (native-inputs
14160 `(("python-cython" ,python-cython)
14161 ("python-pytest" ,python-pytest)
14162 ("python-pytest-runner" ,python-pytest-runner)
14163 ("python-unittest2" ,python-unittest2)
14164 ("unzip" ,unzip)))
14165 (home-page "https://github.com/greginvm/pyclipper")
14166 (synopsis "Wrapper for Angus Johnson's Clipper library")
14167 (description
14168 "Pyclipper is a Cython wrapper for the C++ translation of the
14169 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
14170 (license license:expat)))
14171
14172 (define-public python2-pyclipper
14173 (package-with-python2 python-pyclipper))
14174
14175 (define-public python2-booleanoperations
14176 (package
14177 (name "python2-booleanoperations")
14178 (version "0.7.1")
14179 (source
14180 (origin
14181 (method url-fetch)
14182 (uri (pypi-uri "booleanOperations" version ".zip"))
14183 (sha256
14184 (base32
14185 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
14186 (build-system python-build-system)
14187 (arguments
14188 `(#:python ,python-2))
14189 (native-inputs
14190 `(("unzip" ,unzip)
14191 ("python2-pytest" ,python2-pytest)
14192 ("python2-pytest-runner" ,python2-pytest-runner)))
14193 (propagated-inputs
14194 `(("python-fonttools" ,python2-fonttools)
14195 ("python-pyclipper" ,python2-pyclipper)
14196 ("python-ufolib" ,python2-ufolib)))
14197 (home-page "https://github.com/typemytype/booleanOperations")
14198 (synopsis "Boolean operations on paths")
14199 (description
14200 "BooleanOperations provides a Python library that enables
14201 boolean operations on paths.")
14202 (license license:expat)))
14203
14204 (define-public python-tempdir
14205 (package
14206 (name "python-tempdir")
14207 (version "0.7.1")
14208 (source
14209 (origin
14210 (method url-fetch)
14211 (uri (pypi-uri "tempdir" version))
14212 (sha256
14213 (base32
14214 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
14215 (build-system python-build-system)
14216 (home-page "https://pypi.org/project/tempdir/")
14217 (arguments
14218 ;; the package has no tests
14219 '(#:tests? #f))
14220 (synopsis "Python library for managing temporary directories")
14221 (description
14222 "This library manages temporary directories that are automatically
14223 deleted with all their contents when they are no longer needed. It is
14224 particularly convenient for use in tests.")
14225 (license license:expat)))
14226
14227 (define-public python2-tempdir
14228 (package-with-python2 python-tempdir))
14229
14230 (define-public python-activepapers
14231 (package
14232 (name "python-activepapers")
14233 (version "0.2.2")
14234 (source
14235 (origin
14236 (method url-fetch)
14237 (uri (pypi-uri "ActivePapers.Py" version))
14238 (sha256
14239 (base32
14240 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
14241 (build-system python-build-system)
14242 (arguments
14243 `(#:modules ((ice-9 ftw)
14244 (srfi srfi-1)
14245 (guix build utils)
14246 (guix build python-build-system))
14247
14248 #:phases
14249 (modify-phases %standard-phases
14250 (add-after 'unpack 'delete-python2-code
14251 (lambda _
14252 (for-each delete-file
14253 '("lib/activepapers/builtins2.py"
14254 "lib/activepapers/standardlib2.py"
14255 "lib/activepapers/utility2.py"))))
14256 (replace 'check
14257 (lambda _
14258 ;; Deactivate the test cases that download files
14259 (setenv "NO_NETWORK_ACCESS" "1")
14260 ;; For some strange reason, some tests fail if nosetests runs all
14261 ;; test modules in a single execution. They pass if each test
14262 ;; module is run individually.
14263 (for-each (lambda (filename)
14264 (invoke "nosetests"
14265 (string-append "tests/" filename)))
14266 (scandir "tests"
14267 (lambda (filename)
14268 (string-suffix? ".py" filename)))))))))
14269 (native-inputs
14270 `(("python-tempdir" ,python-tempdir)
14271 ("python-nose" ,python-nose)))
14272 (propagated-inputs
14273 `(("python-h5py" ,python-h5py)))
14274 (home-page "http://www.activepapers.org/")
14275 (synopsis "Executable papers for scientific computing")
14276 (description
14277 "ActivePapers is a tool for working with executable papers, which
14278 combine data, code, and documentation in single-file packages,
14279 suitable for publication as supplementary material or on repositories
14280 such as figshare or Zenodo.")
14281 (properties `((python2-variant . ,(delay python2-activepapers))))
14282 (license license:bsd-3)))
14283
14284 (define-public python2-activepapers
14285 (let ((base (package-with-python2
14286 (strip-python2-variant python-activepapers))))
14287 (package
14288 (inherit base)
14289 (arguments
14290 (substitute-keyword-arguments (package-arguments base)
14291 ((#:phases phases)
14292 `(modify-phases ,phases
14293 (delete 'delete-python2-code)
14294 (add-after 'unpack 'delete-python3-code
14295 (lambda _
14296 (for-each delete-file
14297 '("lib/activepapers/builtins3.py"
14298 "lib/activepapers/standardlib3.py"
14299 "lib/activepapers/utility3.py")))))))))))
14300
14301 (define-public python-semver
14302 (package
14303 (name "python-semver")
14304 (version "2.9.0")
14305 (source
14306 (origin
14307 (method url-fetch)
14308 (uri (pypi-uri "semver" version))
14309 (sha256
14310 (base32
14311 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
14312 (build-system python-build-system)
14313 (native-inputs
14314 `(("python-tox" ,python-tox)
14315 ("python-virtualenv" ,python-virtualenv)))
14316 (home-page "https://github.com/k-bx/python-semver")
14317 (synopsis "Python helper for Semantic Versioning")
14318 (description "This package provides a Python library for
14319 @url{Semantic Versioning, http://semver.org/}.")
14320 (license license:bsd-3)))
14321
14322 (define-public python2-semver
14323 (package-with-python2 python-semver))
14324
14325 (define-public python-pyro4
14326 (package
14327 (name "python-pyro4")
14328 (version "4.77")
14329 (source
14330 (origin
14331 (method url-fetch)
14332 (uri (pypi-uri "Pyro4" version))
14333 (sha256
14334 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
14335 (build-system python-build-system)
14336 (arguments
14337 '(#:tests? #f)) ;FIXME: Some tests require network access.
14338 (native-inputs
14339 `(("python-cloudpickle" ,python-cloudpickle)
14340 ("python-dill" ,python-dill)
14341 ("python-msgpack" ,python-msgpack)))
14342 (propagated-inputs
14343 `(("python-serpent" ,python-serpent)))
14344 (home-page "https://pyro4.readthedocs.io")
14345 (synopsis "Distributed object middleware for Python")
14346 (description
14347 "Pyro enables you to build applications in which objects can talk to each
14348 other over the network. You can just use normal Python method calls to call
14349 objects on other machines, also known as remote procedure calls (RPC).")
14350 (license license:expat)))
14351
14352 (define-public python2-pyro
14353 (package
14354 (name "python2-pyro")
14355 (version "3.16")
14356 (source
14357 (origin
14358 (method url-fetch)
14359 (uri (pypi-uri "Pyro" version))
14360 (file-name (string-append "Pyro-" version ".tar.gz"))
14361 (sha256
14362 (base32
14363 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
14364 (build-system python-build-system)
14365 (arguments
14366 ;; Pyro is not compatible with Python 3
14367 `(#:python ,python-2
14368 ;; Pyro has no test cases for automatic execution
14369 #:tests? #f))
14370 (home-page "http://pythonhosted.org/Pyro/")
14371 (synopsis "Distributed object manager for Python")
14372 (description "Pyro is a Distributed Object Technology system
14373 written in Python that is designed to be easy to use. It resembles
14374 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
14375 which is a system and language independent Distributed Object Technology
14376 and has much more to offer than Pyro or RMI. Pyro 3.x is no
14377 longer maintained. New projects should use Pyro4 instead, which
14378 is the new Pyro version that is actively developed.")
14379 (license license:expat)))
14380
14381 (define-public python2-scientific
14382 (package
14383 (name "python2-scientific")
14384 (version "2.9.4")
14385 (source
14386 (origin
14387 (method git-fetch)
14388 (uri (git-reference
14389 (url "https://github.com/khinsen/ScientificPython")
14390 (commit (string-append "rel" version))))
14391 (file-name (git-file-name name version))
14392 (sha256
14393 (base32
14394 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
14395 (build-system python-build-system)
14396 (inputs
14397 `(("netcdf" ,netcdf)))
14398 (propagated-inputs
14399 `(("python-numpy" ,python2-numpy-1.8)
14400 ("python-pyro" ,python2-pyro)))
14401 (arguments
14402 ;; ScientificPython is not compatible with Python 3
14403 `(#:python ,python-2
14404 #:tests? #f ; No test suite
14405 #:phases
14406 (modify-phases %standard-phases
14407 (replace 'build
14408 (lambda* (#:key inputs #:allow-other-keys)
14409 (invoke "python" "setup.py" "build"
14410 (string-append "--netcdf_prefix="
14411 (assoc-ref inputs "netcdf"))))))))
14412 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
14413 (synopsis "Python modules for scientific computing")
14414 (description "ScientificPython is a collection of Python modules that are
14415 useful for scientific computing. Most modules are rather general (Geometry,
14416 physical units, automatic derivatives, ...) whereas others are more
14417 domain-specific (e.g. netCDF and PDB support). The library is currently
14418 not actively maintained and works only with Python 2 and NumPy < 1.9.")
14419 (license license:cecill-c)))
14420
14421 (define-public python2-mmtk
14422 (package
14423 (name "python2-mmtk")
14424 (version "2.7.12")
14425 (source
14426 (origin
14427 (method git-fetch)
14428 (uri (git-reference
14429 (url "https://github.com/khinsen/MMTK")
14430 (commit (string-append "rel" version))))
14431 (file-name (git-file-name name version))
14432 (sha256
14433 (base32
14434 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
14435 (build-system python-build-system)
14436 (native-inputs
14437 `(("netcdf" ,netcdf)))
14438 (propagated-inputs
14439 `(("python-scientific" ,python2-scientific)
14440 ("python-tkinter" ,python-2 "tk")))
14441 (arguments
14442 `(#:python ,python-2
14443 #:tests? #f
14444 #:phases
14445 (modify-phases %standard-phases
14446 (add-before 'build 'includes-from-scientific
14447 (lambda* (#:key inputs #:allow-other-keys)
14448 (mkdir-p "Include/Scientific")
14449 (copy-recursively
14450 (string-append
14451 (assoc-ref inputs "python-scientific")
14452 "/include/python2.7/Scientific")
14453 "Include/Scientific"))))))
14454 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
14455 (synopsis "Python library for molecular simulation")
14456 (description "MMTK is a library for molecular simulations with an emphasis
14457 on biomolecules. It provides widely used methods such as Molecular Dynamics
14458 and normal mode analysis, but also basic routines for implementing new methods
14459 for simulation and analysis. The library is currently not actively maintained
14460 and works only with Python 2 and NumPy < 1.9.")
14461 (license license:cecill-c)))
14462
14463 (define-public python-phonenumbers
14464 (package
14465 (name "python-phonenumbers")
14466 (version "8.9.1")
14467 (source
14468 (origin
14469 (method url-fetch)
14470 (uri (pypi-uri "phonenumbers" version))
14471 (sha256
14472 (base32
14473 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
14474 (build-system python-build-system)
14475 (home-page
14476 "https://github.com/daviddrysdale/python-phonenumbers")
14477 (synopsis
14478 "Python library for dealing with international phone numbers")
14479 (description
14480 "This package provides a Python port of Google's libphonenumber library.")
14481 (license license:asl2.0)))
14482
14483 (define-public python2-phonenumbers
14484 (package-with-python2 python-phonenumbers))
14485
14486 (define-public python-send2trash
14487 (package
14488 (name "python-send2trash")
14489 (version "1.5.0")
14490 (source
14491 (origin (method git-fetch)
14492 ;; Source tarball on PyPI doesn't include tests.
14493 (uri (git-reference
14494 (url "https://github.com/hsoft/send2trash.git")
14495 (commit version)))
14496 (file-name (git-file-name name version))
14497 (sha256
14498 (base32
14499 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
14500 (build-system python-build-system)
14501 (arguments
14502 '(#:phases
14503 (modify-phases %standard-phases
14504 (add-before 'check 'pre-check
14505 (lambda _
14506 (mkdir-p "/tmp/foo")
14507 (setenv "HOME" "/tmp/foo")
14508 #t)))))
14509 (home-page "https://github.com/hsoft/send2trash")
14510 (synopsis "Send files to the user's @file{~/Trash} directory")
14511 (description "This package provides a Python library to send files to the
14512 user's @file{~/Trash} directory.")
14513 (properties `((python2-variant . ,(delay python2-send2trash))))
14514 (license license:bsd-3)))
14515
14516 (define-public python2-send2trash
14517 (package
14518 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
14519 (arguments
14520 (substitute-keyword-arguments (package-arguments python-send2trash)
14521 ((#:phases phases)
14522 `(modify-phases ,phases
14523 (add-before 'check 'setenv
14524 (lambda _
14525 (setenv "PYTHONPATH"
14526 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
14527 #t))))))))
14528
14529 (define-public python-yapf
14530 (package
14531 (name "python-yapf")
14532 (version "0.29.0")
14533 (source
14534 (origin
14535 (method url-fetch)
14536 (uri (pypi-uri "yapf" version))
14537 (sha256
14538 (base32
14539 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
14540 (build-system python-build-system)
14541 (home-page "https://github.com/google/yapf")
14542 (synopsis "Formatter for Python code")
14543 (description "YAPF is a formatter for Python code. It's based off of
14544 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
14545 takes the code and reformats it to the best formatting that conforms to the
14546 style guide, even if the original code didn't violate the style guide.")
14547 (license license:asl2.0)))
14548
14549 (define-public python2-yapf
14550 (package-with-python2 python-yapf))
14551
14552 (define-public python-gyp
14553 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
14554 (revision "0"))
14555 (package
14556 (name "python-gyp")
14557 ;; Google does not release versions,
14558 ;; based on second most recent commit date.
14559 (version (git-version "0.0.0" revision commit))
14560 (source
14561 (origin
14562 ;; Google does not release tarballs,
14563 ;; git checkout is needed.
14564 (method git-fetch)
14565 (uri (git-reference
14566 (url "https://chromium.googlesource.com/external/gyp")
14567 (commit commit)))
14568 (file-name (git-file-name name version))
14569 (sha256
14570 (base32
14571 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14572 (build-system python-build-system)
14573 (home-page "https://gyp.gsrc.io/")
14574 (synopsis "GYP is a Meta-Build system")
14575 (description
14576 "GYP builds build systems for large, cross platform applications.
14577 It can be used to generate XCode projects, Visual Studio projects, Ninja build
14578 files, and Makefiles.")
14579 (license license:bsd-3))))
14580
14581 (define-public python2-gyp
14582 (package-with-python2 python-gyp))
14583
14584 (define-public python-whatever
14585 (package
14586 (name "python-whatever")
14587 (version "0.6")
14588 (source
14589 (origin
14590 (method git-fetch)
14591 (uri (git-reference
14592 (url "https://github.com/Suor/whatever")
14593 (commit version)))
14594 (file-name (git-file-name name version))
14595 (sha256
14596 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
14597 (build-system python-build-system)
14598 (arguments
14599 `(#:phases
14600 (modify-phases %standard-phases
14601 (replace 'check
14602 (lambda _
14603 (invoke "py.test"))))))
14604 (native-inputs
14605 `(("python-pytest" ,python-pytest)))
14606 (home-page "http://github.com/Suor/whatever")
14607 (synopsis "Make anonymous functions by partial application of operators")
14608 (description "@code{whatever} provides an easy way to make anonymous
14609 functions by partial application of operators.")
14610 (license license:bsd-3)))
14611
14612 (define-public python2-whatever
14613 (package-with-python2 python-whatever))
14614
14615 (define-public python-funcy
14616 (package
14617 (name "python-funcy")
14618 (version "1.11")
14619 (source
14620 (origin
14621 (method git-fetch)
14622 (uri (git-reference
14623 (url "https://github.com/Suor/funcy.git")
14624 (commit version)))
14625 (sha256
14626 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14627 (file-name (git-file-name name version))))
14628 (build-system python-build-system)
14629 (arguments
14630 `(#:phases
14631 (modify-phases %standard-phases
14632 (replace 'check
14633 (lambda _
14634 (invoke "py.test"))))))
14635 (native-inputs
14636 `(("python-pytest" ,python-pytest)
14637 ("python-whatever" ,python-whatever)))
14638 (home-page "http://github.com/Suor/funcy")
14639 (synopsis "Functional tools")
14640 (description "@code{funcy} is a library that provides functional tools.
14641 Examples are:
14642 @enumerate
14643 @item merge - Merges collections of the same type
14644 @item walk - Type-preserving map
14645 @item select - Selects a part of a collection
14646 @item take - Takes the first n items of a collection
14647 @item first - Takes the first item of a collection
14648 @item remove - Predicated-removes items of a collection
14649 @item concat - Concatenates two collections
14650 @item flatten - Flattens a collection with subcollections
14651 @item distinct - Returns only distinct items
14652 @item split - Predicated-splits a collection
14653 @item split_at - Splits a collection at a given item
14654 @item group_by - Groups items by group
14655 @item pairwise - Pairs off adjacent items
14656 @item partial - Partially-applies a function
14657 @item curry - Curries a function
14658 @item compose - Composes functions
14659 @item complement - Complements a predicate
14660 @item all_fn - \"all\" with predicate
14661 @end enumerate")
14662 (license license:bsd-3)))
14663
14664 (define-public python2-funcy
14665 (package-with-python2 python-funcy))
14666
14667 (define-public python-isoweek
14668 (package
14669 (name "python-isoweek")
14670 (version "1.3.3")
14671 (source
14672 (origin
14673 (method url-fetch)
14674 (uri (pypi-uri "isoweek" version))
14675 (sha256
14676 (base32
14677 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14678 (build-system python-build-system)
14679 (home-page "https://github.com/gisle/isoweek")
14680 (synopsis "Objects representing a week")
14681 (description "The @code{isoweek} module provide the class Week that
14682 implements the week definition of ISO 8601. This standard also defines
14683 a notation for identifying weeks; yyyyWww (where the W is a literal).
14684 Week instances stringify to this form.")
14685 (license license:bsd-3)))
14686
14687 (define-public python2-isoweek
14688 (package-with-python2 python-isoweek))
14689
14690 (define-public python-tokenize-rt
14691 (package
14692 (name "python-tokenize-rt")
14693 (version "2.0.1")
14694 (source
14695 (origin
14696 (method url-fetch)
14697 (uri (pypi-uri "tokenize-rt" version))
14698 (sha256
14699 (base32
14700 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14701 (build-system python-build-system)
14702 (home-page "https://github.com/asottile/tokenize-rt")
14703 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14704 (description
14705 "This Python library is a wrapper around @code{tokenize} from the Python
14706 standard library. It provides two additional tokens @code{ESCAPED_NL} and
14707 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14708 and @code{tokens_to_src} to roundtrip.")
14709 (license license:expat)))
14710
14711 (define-public python-future-fstrings
14712 (package
14713 (name "python-future-fstrings")
14714 (version "0.4.1")
14715 (source
14716 (origin
14717 (method url-fetch)
14718 (uri (pypi-uri "future_fstrings" version))
14719 (sha256
14720 (base32
14721 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14722 (build-system python-build-system)
14723 (propagated-inputs
14724 `(("python-tokenize-rt" ,python-tokenize-rt)))
14725 (home-page "https://github.com/asottile/future-fstrings")
14726 (synopsis "Backport of fstrings to Python < 3.6")
14727 (description
14728 "This package provides a UTF-8 compatible encoding
14729 @code{future_fstrings}, which performs source manipulation. It decodes the
14730 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
14731 @code{f} strings.")
14732 (license license:expat)))
14733
14734 (define-public python-typed-ast
14735 (package
14736 (name "python-typed-ast")
14737 (version "1.4.0")
14738 (source
14739 (origin
14740 (method git-fetch)
14741 (uri (git-reference
14742 (url "https://github.com/python/typed_ast.git")
14743 (commit version)))
14744 (sha256
14745 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
14746 (file-name (git-file-name name version))))
14747 (build-system python-build-system)
14748 (arguments
14749 `(#:modules ((guix build utils)
14750 (guix build python-build-system)
14751 (ice-9 ftw)
14752 (srfi srfi-1)
14753 (srfi srfi-26))
14754 #:phases
14755 (modify-phases %standard-phases
14756 (replace 'check
14757 (lambda _
14758 (let ((cwd (getcwd)))
14759 (setenv "PYTHONPATH"
14760 (string-append cwd "/build/"
14761 (find (cut string-prefix? "lib" <>)
14762 (scandir (string-append cwd "/build")))
14763 ":"
14764 (getenv "PYTHONPATH"))))
14765 (invoke "pytest")
14766 #t)))))
14767 (native-inputs `(("python-pytest" ,python-pytest)))
14768 (home-page "https://github.com/python/typed_ast")
14769 (synopsis "Fork of Python @code{ast} modules with type comment support")
14770 (description "This package provides a parser similar to the standard
14771 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
14772 include PEP 484 type comments and are independent of the version of Python
14773 under which they are run. The @code{typed_ast} parsers produce the standard
14774 Python AST (plus type comments), and are both fast and correct, as they are
14775 based on the CPython 2.7 and 3.7 parsers.")
14776 ;; See the file "LICENSE" for the details.
14777 (license (list license:psfl
14778 license:asl2.0
14779 license:expat)))) ;ast27/Parser/spark.py
14780
14781 (define-public python-typing
14782 (package
14783 (name "python-typing")
14784 (version "3.6.6")
14785 (source
14786 (origin
14787 (method url-fetch)
14788 (uri (pypi-uri "typing" version))
14789 (sha256
14790 (base32
14791 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
14792 (build-system python-build-system)
14793 (home-page "https://docs.python.org/3/library/typing.html")
14794 (synopsis "Type hints for Python")
14795 (description "This is a backport of the standard library @code{typing}
14796 module to Python versions older than 3.5. Typing defines a standard notation
14797 for Python function and variable type annotations. The notation can be used
14798 for documenting code in a concise, standard format, and it has been designed
14799 to also be used by static and runtime type checkers, static analyzers, IDEs
14800 and other tools.")
14801 (license license:psfl)))
14802
14803 (define-public python2-typing
14804 (package-with-python2 python-typing))
14805
14806 (define-public python-typing-extensions
14807 (package
14808 (name "python-typing-extensions")
14809 (version "3.7.2")
14810 (source
14811 (origin
14812 (method url-fetch)
14813 (uri (pypi-uri "typing_extensions" version))
14814 (sha256
14815 (base32
14816 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
14817 (build-system python-build-system)
14818 (home-page
14819 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
14820 (synopsis "Experimental type hints for Python")
14821 (description
14822 "The typing_extensions module contains additional @code{typing} hints not
14823 yet present in the of the @code{typing} standard library.
14824 Included are implementations of:
14825 @enumerate
14826 @item ClassVar
14827 @item ContextManager
14828 @item Counter
14829 @item DefaultDict
14830 @item Deque
14831 @item NewType
14832 @item NoReturn
14833 @item overload
14834 @item Protocol
14835 @item runtime
14836 @item Text
14837 @item Type
14838 @item TYPE_CHECKING
14839 @item AsyncGenerator
14840 @end enumerate\n")
14841 (license license:psfl)))
14842
14843 (define-public bpython
14844 (package
14845 (name "bpython")
14846 (version "0.18")
14847 (source
14848 (origin
14849 (method url-fetch)
14850 (uri (pypi-uri "bpython" version))
14851 (sha256
14852 (base32 "1hl6frgvr2lqaxqczl8amg9xih32b3gzv429vs0qrjb8wpdj1k2n"))))
14853 (build-system python-build-system)
14854 (arguments
14855 `(#:phases
14856 (modify-phases %standard-phases
14857 (add-after 'unpack 'remove-failing-test
14858 (lambda _
14859 ;; Remove failing test. FIXME: make it pass
14860 (delete-file "bpython/test/test_args.py")
14861 #t))
14862 (add-after 'wrap 'add-aliases
14863 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
14864 (lambda* (#:key outputs #:allow-other-keys)
14865 (let ((out (assoc-ref outputs "out")))
14866 (for-each
14867 (lambda (old new)
14868 (symlink old (string-append out "/bin/" new)))
14869 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
14870 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
14871 #t)))))
14872 (propagated-inputs
14873 `(("python-pygments" ,python-pygments)
14874 ("python-requests" ,python-requests)
14875 ("python-babel" ,python-babel) ; optional, for internationalization
14876 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
14877 ("python-greenlet" ,python-greenlet)
14878 ("python-urwid" ,python-urwid) ; for bpython-urwid only
14879 ("python-six" ,python-six)))
14880 (native-inputs
14881 `(("python-sphinx" ,python-sphinx)
14882 ("python-mock" ,python-mock)))
14883 (home-page "https://bpython-interpreter.org/")
14884 (synopsis "Fancy interface to the Python interpreter")
14885 (description "Bpython is a fancy interface to the Python
14886 interpreter. bpython's main features are
14887
14888 @enumerate
14889 @item in-line syntax highlighting,
14890 @item readline-like autocomplete with suggestions displayed as you type,
14891 @item expected parameter list for any Python function,
14892 @item \"rewind\" function to pop the last line of code from memory and
14893 re-evaluate,
14894 @item send the code you've entered off to a pastebin,
14895 @item save the code you've entered to a file, and
14896 @item auto-indentation.
14897 @end enumerate")
14898 (license license:expat)))
14899
14900 (define-public bpython2
14901 (let ((base (package-with-python2
14902 (strip-python2-variant bpython))))
14903 (package (inherit base)
14904 (name "bpython2")
14905 (arguments
14906 `(#:python ,python-2
14907 #:phases
14908 (modify-phases %standard-phases
14909 (add-after 'unpack 'remove-failing-test
14910 (lambda _
14911 ;; Remove failing test. FIXME: make it pass
14912 (delete-file "bpython/test/test_args.py")
14913 ;; Disable failing test-cases (renaming inhibits they are
14914 ;; discovered)
14915 (substitute* "bpython/test/test_curtsies_repl.py"
14916 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
14917 (string-append a "xxx_off_" b))
14918 (("^(\\s*def )(test_complex\\W)" _ a b)
14919 (string-append a "xxx_off_" b)))
14920 #t))
14921 (add-before 'build 'rename-scripts
14922 ;; rename the scripts to bypthon2, bpdb2, etc.
14923 (lambda _
14924 (substitute* "setup.py"
14925 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
14926 (string-append name "2" rest "\n"))
14927 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
14928 (string-append name "2" (or sub "") rest "\n")))
14929 #t))))))))
14930
14931 (define-public python-pyinotify
14932 (package
14933 (name "python-pyinotify")
14934 (version "0.9.6")
14935 (source (origin
14936 (method url-fetch)
14937 (uri (pypi-uri "pyinotify" version))
14938 (sha256
14939 (base32
14940 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
14941 (build-system python-build-system)
14942 (arguments `(#:tests? #f)) ;no tests
14943 (home-page "https://github.com/seb-m/pyinotify")
14944 (synopsis "Python library for monitoring inotify events")
14945 (description
14946 "@code{pyinotify} provides a Python interface for monitoring
14947 file system events on Linux.")
14948 (license license:expat)))
14949
14950 (define-public python2-pyinotify
14951 (package-with-python2 python-pyinotify))
14952
14953 ;; Ada parser uses this version.
14954 (define-public python2-quex-0.67.3
14955 (package
14956 (name "python2-quex")
14957 (version "0.67.3")
14958 (source
14959 (origin
14960 (method url-fetch)
14961 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
14962 (version-major+minor version)
14963 "/quex-" version ".zip"))
14964 (sha256
14965 (base32
14966 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
14967 (build-system python-build-system)
14968 (native-inputs
14969 `(("unzip" ,unzip)))
14970 (arguments
14971 `(#:python ,python-2
14972 #:tests? #f
14973 #:phases
14974 (modify-phases %standard-phases
14975 (delete 'configure)
14976 (delete 'build)
14977 (replace 'install
14978 (lambda* (#:key outputs #:allow-other-keys)
14979 (let* ((out (assoc-ref outputs "out"))
14980 (share/quex (string-append out "/share/quex"))
14981 (bin (string-append out "/bin")))
14982 (copy-recursively "." share/quex)
14983 (mkdir-p bin)
14984 (symlink (string-append share/quex "/quex-exe.py")
14985 (string-append bin "/quex"))
14986 #t))))))
14987 (native-search-paths
14988 (list (search-path-specification
14989 (variable "QUEX_PATH")
14990 (files '("share/quex")))))
14991 (home-page "http://quex.sourceforge.net/")
14992 (synopsis "Lexical analyzer generator in Python")
14993 (description "@code{quex} is a lexical analyzer generator in Python.")
14994 (license license:lgpl2.1+))) ; Non-military
14995
14996 (define-public python2-quex
14997 (package (inherit python2-quex-0.67.3)
14998 (name "python2-quex")
14999 (version "0.68.1")
15000 (source
15001 (origin
15002 (method url-fetch)
15003 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
15004 (sha256
15005 (base32
15006 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
15007 (file-name (string-append name "-" version ".tar.gz"))))))
15008
15009 (define-public python-more-itertools
15010 (package
15011 (name "python-more-itertools")
15012 (version "7.1.0")
15013 (source
15014 (origin
15015 (method url-fetch)
15016 (uri (pypi-uri "more-itertools" version))
15017 (sha256
15018 (base32
15019 "16phg2f2dvm6ci5wr49ncha5lmc0m2in3bsl33c61vzca4gkvd4b"))))
15020 (build-system python-build-system)
15021 (home-page "https://github.com/erikrose/more-itertools")
15022 (synopsis "More routines for operating on iterables, beyond itertools")
15023 (description "Python's built-in @code{itertools} module implements a
15024 number of iterator building blocks inspired by constructs from APL, Haskell,
15025 and SML. @code{more-itertools} includes additional building blocks for
15026 working with iterables.")
15027 (properties `((python2-variant . ,(delay python2-more-itertools))))
15028 (license license:expat)))
15029
15030 ;; The 5.x series are the last versions supporting Python 2.7.
15031 (define-public python2-more-itertools
15032 (package
15033 (inherit python-more-itertools)
15034 (name "python2-more-itertools")
15035 (version "5.0.0")
15036 (source (origin
15037 (method url-fetch)
15038 (uri (pypi-uri "more-itertools" version))
15039 (sha256
15040 (base32
15041 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
15042 (arguments
15043 `(#:python ,python2-minimal))
15044 (propagated-inputs
15045 `(("python2-six" ,python2-six-bootstrap)))))
15046
15047 (define-public python-latexcodec
15048 (package
15049 (name "python-latexcodec")
15050 (version "1.0.7")
15051 (source
15052 (origin
15053 (method url-fetch)
15054 (uri (pypi-uri "latexcodec" version))
15055 (sha256
15056 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
15057 (build-system python-build-system)
15058 (inputs
15059 `(("python-six" ,python-six)))
15060 (home-page "https://readthedocs.org/projects/latexcodec/")
15061 (synopsis "Work with LaTeX code in Python")
15062 (description "Lexer and codec to work with LaTeX code in Python.")
15063 (license license:expat)))
15064
15065 (define-public python-pybtex
15066 (package
15067 (name "python-pybtex")
15068 (version "0.22.2")
15069 (source
15070 (origin
15071 (method url-fetch)
15072 (uri (pypi-uri "pybtex" version))
15073 (sha256
15074 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
15075 (build-system python-build-system)
15076 (native-inputs
15077 `(("python-nose" ,python-nose)))
15078 (inputs
15079 `(("python-latexcodec" ,python-latexcodec)
15080 ("python-pyyaml" ,python-pyyaml)
15081 ("python-six" ,python-six)))
15082 (arguments
15083 `(#:test-target "nosetests"))
15084 (home-page "https://pybtex.org/")
15085 (synopsis "BibTeX-compatible bibliography processor")
15086 (description "Pybtex is a BibTeX-compatible bibliography processor written
15087 in Python. You can simply type pybtex instead of bibtex.")
15088 (license license:expat)))
15089
15090 (define-public python-onetimepass
15091 (package
15092 (name "python-onetimepass")
15093 (version "1.0.1")
15094 (source
15095 (origin
15096 (method url-fetch)
15097 (uri (pypi-uri "onetimepass" version))
15098 (sha256
15099 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
15100 (build-system python-build-system)
15101 (propagated-inputs `(("python-six" ,python-six)))
15102 (home-page "https://github.com/tadeck/onetimepass/")
15103 (synopsis "One-time password library")
15104 (description "Python one-time password library for HMAC-based (HOTP) and
15105 time-based (TOTP) passwords.")
15106 (license license:expat)))
15107
15108 (define-public python-parso
15109 (package
15110 (name "python-parso")
15111 (version "0.5.1")
15112 (source
15113 (origin
15114 (method url-fetch)
15115 (uri (pypi-uri "parso" version))
15116 (sha256
15117 (base32
15118 "171a9ivhxwsd52h1cgsz40zgzpgzscn7yqb7sdjhy8m1lzj0wsv6"))))
15119 (native-inputs
15120 `(("python-pytest" ,python-pytest)))
15121 (build-system python-build-system)
15122 (arguments
15123 `(#:phases (modify-phases %standard-phases
15124 (replace 'check
15125 (lambda _ (invoke "pytest" "-vv"))))))
15126 (home-page "https://github.com/davidhalter/parso")
15127 (synopsis "Python Parser")
15128 (description "Parso is a Python parser that supports error recovery and
15129 round-trip parsing for different Python versions (in multiple Python versions).
15130 Parso is also able to list multiple syntax errors in your Python file.")
15131 (license license:expat)))
15132
15133 (define-public python2-parso
15134 (package-with-python2 python-parso))
15135
15136 (define-public python-async-generator
15137 (package
15138 (name "python-async-generator")
15139 (version "1.10")
15140 (source
15141 (origin
15142 (method url-fetch)
15143 (uri (pypi-uri "async_generator" version))
15144 (sha256
15145 (base32
15146 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
15147 (build-system python-build-system)
15148 (native-inputs
15149 `(("python-pytest" ,python-pytest)))
15150 (home-page "https://github.com/python-trio/async_generator")
15151 (synopsis "Async generators and context managers for Python 3.5+")
15152 (description "@code{async_generator} back-ports Python 3.6's native async
15153 generators and Python 3.7's context managers into Python 3.5.")
15154 ;; Dual licensed.
15155 (license (list license:expat license:asl2.0))))
15156
15157 (define-public python-async-timeout
15158 (package
15159 (name "python-async-timeout")
15160 (version "3.0.1")
15161 (source
15162 (origin
15163 (method url-fetch)
15164 (uri (pypi-uri "async-timeout" version))
15165 (sha256
15166 (base32
15167 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
15168 (build-system python-build-system)
15169 (home-page "https://github.com/aio-libs/async_timeout/")
15170 (synopsis "Timeout context manager for asyncio programs")
15171 (description "@code{async-timeout} provides a timeout timeout context
15172 manager compatible with @code{asyncio}.")
15173 (license license:asl2.0)))
15174
15175 (define-public python-glob2
15176 (package
15177 (name "python-glob2")
15178 (version "0.7")
15179 (source
15180 (origin
15181 (method git-fetch)
15182 (uri (git-reference
15183 (url "https://github.com/miracle2k/python-glob2.git")
15184 (commit (string-append "v" version))))
15185 (file-name (git-file-name name version))
15186 (sha256
15187 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
15188 (build-system python-build-system)
15189 (home-page "https://github.com/miracle2k/python-glob2/")
15190 (synopsis "Extended Version of the python buildin glob module")
15191 (description "This is an extended version of the Python
15192 @url{http://docs.python.org/library/glob.html, built-in glob module} which
15193 adds:
15194
15195 @itemize
15196 @item The ability to capture the text matched by glob patterns, and return
15197 those matches alongside the file names.
15198 @item A recursive @code{**} globbing syntax, akin for example to the
15199 @code{globstar} option of Bash.
15200 @item The ability to replace the file system functions used, in order to glob
15201 on virtual file systems.
15202 @item Compatible with Python 2 and Python 3 (tested with 3.3).
15203 @end itemize
15204
15205 Glob2 currently based on the glob code from Python 3.3.1.")
15206 (license license:bsd-2)))
15207
15208 (define-public python2-glob2
15209 (package-with-python2 python-glob2))
15210
15211 (define-public python-gipc
15212 (package
15213 (name "python-gipc")
15214 (version "0.6.0")
15215 (source
15216 (origin
15217 (method url-fetch)
15218 (uri (pypi-uri "gipc" version ".zip"))
15219 (sha256
15220 (base32
15221 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
15222 (build-system python-build-system)
15223 (native-inputs
15224 `(("unzip" ,unzip)))
15225 (propagated-inputs
15226 `(("python-gevent" ,python-gevent)))
15227 (home-page "http://gehrcke.de/gipc")
15228 (synopsis "Child process management in the context of gevent")
15229 (description "Usage of Python's multiprocessing package in a
15230 gevent-powered application may raise problems. With @code{gipc},
15231 process-based child processes can safely be created anywhere within a
15232 gevent-powered application.")
15233 (license license:expat)))
15234
15235 (define-public python2-gipc
15236 (package-with-python2 python-gipc))
15237
15238 (define-public python-fusepy
15239 (package
15240 (name "python-fusepy")
15241 (version "2.0.4")
15242 (source
15243 (origin
15244 (method url-fetch)
15245 (uri (pypi-uri "fusepy" version))
15246 (sha256
15247 (base32
15248 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
15249 (build-system python-build-system)
15250 (arguments
15251 `(#:phases
15252 (modify-phases %standard-phases
15253 (add-before 'build 'set-library-file-name
15254 (lambda* (#:key inputs #:allow-other-keys)
15255 (let ((fuse (assoc-ref inputs "fuse")))
15256 (substitute* "fuse.py"
15257 (("find_library\\('fuse'\\)")
15258 (string-append "'" fuse "/lib/libfuse.so'")))
15259 #t))))))
15260 (propagated-inputs
15261 `(("fuse" ,fuse)))
15262 (home-page "https://github.com/fusepy/fusepy")
15263 (synopsis "Simple ctypes bindings for FUSE")
15264 (description "Python module that provides a simple interface to FUSE and
15265 MacFUSE. The binding is created using the standard @code{ctypes} library.")
15266 (license license:isc)))
15267
15268 (define-public python2-fusepy
15269 (package-with-python2 python-fusepy))
15270
15271 (define-public python2-gdrivefs
15272 (package
15273 (name "python2-gdrivefs")
15274 (version "0.14.9")
15275 (source
15276 (origin
15277 (method url-fetch)
15278 (uri (pypi-uri "gdrivefs" version))
15279 (sha256
15280 (base32
15281 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
15282 (build-system python-build-system)
15283 (arguments
15284 `(#:python ,python-2
15285 #:phases
15286 (modify-phases %standard-phases
15287 (add-before 'build 'patch-setup-py
15288 (lambda _
15289 ;; Update requirements from dependency==version
15290 ;; to dependency>=version
15291 (substitute* "gdrivefs/resources/requirements.txt"
15292 (("==") ">="))
15293 #t)))))
15294 (native-inputs
15295 `(("python2-gipc" ,python2-gipc)
15296 ("python2-gevent" ,python2-gevent)
15297 ("python2-greenlet" ,python2-greenlet)
15298 ("python2-httplib2" ,python2-httplib2)
15299 ("python2-uritemplate" ,python2-uritemplate)
15300 ("python2-oauth2client" ,python2-oauth2client)
15301 ("python2-six" ,python2-six)))
15302 (propagated-inputs
15303 `(("python2-dateutil" ,python2-dateutil)
15304 ("python2-fusepy" ,python2-fusepy)
15305 ("python2-google-api-client" ,python2-google-api-client)))
15306 (home-page "https://github.com/dsoprea/GDriveFS")
15307 (synopsis "Mount Google Drive as a local file system")
15308 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
15309 under Python 2.7.")
15310 (license license:gpl2)))
15311
15312 (define-public pybind11
15313 (package
15314 (name "pybind11")
15315 (version "2.3.0")
15316 (source (origin
15317 (method git-fetch)
15318 (uri (git-reference
15319 (url "https://github.com/pybind/pybind11.git")
15320 (commit (string-append "v" version))))
15321 (sha256
15322 (base32
15323 "11b6dniri8m05spfd2a19irz82shf4sdca73566bniggrf3zclnf"))
15324 (file-name (git-file-name name version))))
15325 (build-system cmake-build-system)
15326 (native-inputs
15327 `(("python" ,python)
15328 ("python-pytest" ,python-pytest)))
15329 (arguments
15330 `(#:test-target "check"))
15331 (home-page "https://github.com/pybind/pybind11/")
15332 (synopsis "Seamless operability between C++11 and Python")
15333 (description "pybind11 is a lightweight header-only library that exposes
15334 C++ types in Python and vice versa, mainly to create Python bindings of
15335 existing C++ code. Its goals and syntax are similar to the excellent
15336 Boost.Python library by David Abrahams: to minimize boilerplate code in
15337 traditional extension modules by inferring type information using compile-time
15338 introspection.")
15339 (license license:expat)))
15340
15341 (define-public python-fasteners
15342 (package
15343 (name "python-fasteners")
15344 (version "0.14.1")
15345 (source
15346 (origin
15347 (method url-fetch)
15348 (uri (pypi-uri "fasteners" version))
15349 (sha256
15350 (base32
15351 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
15352 (build-system python-build-system)
15353 (propagated-inputs
15354 `(("python-monotonic" ,python-monotonic)
15355 ("python-six" ,python-six)
15356 ("python-testtools" ,python-testtools)))
15357 (home-page "https://github.com/harlowja/fasteners")
15358 (synopsis "Python package that provides useful locks")
15359 (description
15360 "This package provides a Python program that provides following locks:
15361
15362 @itemize
15363 @item Locking decorator
15364 @item Reader-writer locks
15365 @item Inter-process locks
15366 @item Generic helpers
15367 @end itemize\n")
15368 (properties `((python2-variant . ,(delay python2-fasteners))))
15369 (license license:asl2.0)))
15370
15371 (define-public python2-fasteners
15372 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
15373 (package
15374 (inherit base)
15375 (propagated-inputs
15376 `(("python2-futures" ,python2-futures)
15377 ,@(package-propagated-inputs base))))))
15378
15379 (define-public python-requests-file
15380 (package
15381 (name "python-requests-file")
15382 (version "1.4.3")
15383 (source
15384 (origin
15385 (method url-fetch)
15386 (uri (pypi-uri "requests-file" version))
15387 (sha256
15388 (base32
15389 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
15390 (build-system python-build-system)
15391 (propagated-inputs
15392 `(("python-requests" ,python-requests)
15393 ("python-six" ,python-six)))
15394 (home-page
15395 "https://github.com/dashea/requests-file")
15396 (synopsis "File transport adapter for Requests")
15397 (description
15398 "Requests-File is a transport adapter for use with the Requests Python
15399 library to allow local file system access via @code{file://} URLs.")
15400 (license license:asl2.0)))
15401
15402 (define-public python2-requests-file
15403 (package-with-python2 python-requests-file))
15404
15405 (define-public python-tldextract
15406 (package
15407 (name "python-tldextract")
15408 (version "2.2.0")
15409 (source
15410 (origin
15411 (method url-fetch)
15412 (uri (pypi-uri "tldextract" version))
15413 (sha256
15414 (base32
15415 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
15416 (build-system python-build-system)
15417 (native-inputs
15418 `(("python-pytest" ,python-pytest)
15419 ("python-responses" ,python-responses)))
15420 (propagated-inputs
15421 `(("python-idna" ,python-idna)
15422 ("python-requests" ,python-requests)
15423 ("python-requests-file" ,python-requests-file)))
15424 (home-page
15425 "https://github.com/john-kurkowski/tldextract")
15426 (synopsis
15427 "Separate the TLD from the registered domain and subdomains of a URL")
15428 (description
15429 "TLDExtract accurately separates the TLD from the registered domain and
15430 subdomains of a URL, using the Public Suffix List. By default, this includes
15431 the public ICANN TLDs and their exceptions. It can optionally support the
15432 Public Suffix List's private domains as well.")
15433 (license license:bsd-3)))
15434
15435 (define-public python2-tldextract
15436 (package-with-python2 python-tldextract))
15437
15438 (define-public python-pynamecheap
15439 (package
15440 (name "python-pynamecheap")
15441 (version "0.0.3")
15442 (source
15443 (origin
15444 (method url-fetch)
15445 (uri (pypi-uri "PyNamecheap" version))
15446 (sha256
15447 (base32
15448 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
15449 (build-system python-build-system)
15450 (propagated-inputs
15451 `(("python-requests" ,python-requests)))
15452 (home-page
15453 "https://github.com/Bemmu/PyNamecheap")
15454 (synopsis
15455 "Namecheap API client in Python")
15456 (description
15457 "PyNamecheap is a Namecheap API client in Python.")
15458 (license license:expat)))
15459
15460 (define-public python2-pynamecheap
15461 (package-with-python2 python-pynamecheap))
15462
15463 (define-public python-dns-lexicon
15464 (package
15465 (name "python-dns-lexicon")
15466 (version "2.4.0")
15467 (source
15468 (origin
15469 (method url-fetch)
15470 (uri (pypi-uri "dns-lexicon" version))
15471 (sha256
15472 (base32
15473 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
15474 (build-system python-build-system)
15475 (arguments
15476 `(#:tests? #f)) ;requires internet access
15477 (propagated-inputs
15478 `(("python-future" ,python-future)
15479 ("python-pynamecheap" ,python-pynamecheap)
15480 ("python-requests" ,python-requests)
15481 ("python-tldextract" ,python-tldextract)
15482 ("python-urllib3" ,python-urllib3)))
15483 (home-page "https://github.com/AnalogJ/lexicon")
15484 (synopsis
15485 "Manipulate DNS records on various DNS providers")
15486 (description
15487 "Lexicon provides a way to manipulate DNS records on multiple DNS
15488 providers in a standardized way. It has a CLI but it can also be used as a
15489 Python library. It was designed to be used in automation, specifically with
15490 Let's Encrypt.")
15491 (license license:expat)))
15492
15493 (define-public python2-dns-lexicon
15494 (package-with-python2 python-dns-lexicon))
15495
15496 (define-public python-commandlines
15497 (package
15498 (name "python-commandlines")
15499 (version "0.4.1")
15500 (source
15501 (origin
15502 (method url-fetch)
15503 (uri (pypi-uri "commandlines" version))
15504 (sha256
15505 (base32
15506 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15507 (build-system python-build-system)
15508 (home-page "https://github.com/chrissimpkins/commandlines")
15509 (synopsis "Command line argument to object parsing library")
15510 (description
15511 "@code{Commandlines} is a Python library for command line application
15512 development that supports command line argument parsing, command string
15513 validation testing and application logic.")
15514 (license license:expat)))
15515
15516 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15517 ;; python-numba. They have a very unflexible relationship.
15518 (define-public python-numba
15519 (package
15520 (name "python-numba")
15521 (version "0.46.0")
15522 (source
15523 (origin
15524 (method url-fetch)
15525 (uri (pypi-uri "numba" version))
15526 (sha256
15527 (base32
15528 "1vnfzcq6fcnkmdms6114d49awvvj5181fl7z1wlha27qc2paxjy2"))))
15529 (build-system python-build-system)
15530 (arguments
15531 `(#:modules ((guix build utils)
15532 (guix build python-build-system)
15533 (ice-9 ftw)
15534 (srfi srfi-1)
15535 (srfi srfi-26))
15536 #:phases
15537 (modify-phases %standard-phases
15538 (add-after 'unpack 'disable-proprietary-features
15539 (lambda _
15540 (setenv "NUMBA_DISABLE_HSA" "1")
15541 (setenv "NUMBA_DISABLE_CUDA" "1")
15542 #t))
15543 (add-after 'unpack 'remove-failing-tests
15544 (lambda _
15545 ;; FIXME: These tests fail for unknown reasons:
15546 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15547 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15548 (substitute* "numba/tests/test_dispatcher.py"
15549 (("def test(_non_writable_pycache)" _ m)
15550 (string-append "def guix_skip" m))
15551 (("def test(_non_creatable_pycache)" _ m)
15552 (string-append "def guix_skip" m))
15553 (("def test(_frozen)" _ m)
15554 (string-append "def guix_skip" m)))
15555
15556 ;; These tests fail because we don't run the tests from the build
15557 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
15558 ;; They are in numba.tests.test_pycc.TestDistutilsSupport.
15559 (substitute* "numba/tests/test_pycc.py"
15560 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15561 (string-append "def guix_skip" m)))
15562
15563 ;; These tests fail because our version of Python does not have
15564 ;; a recognizable front-end for the Numba distribution to use
15565 ;; to check against.
15566 (substitute* "numba/tests/test_entrypoints.py"
15567 (("def test(_init_entrypoint)" _ m)
15568 (string-append "def guix_skip" m)))
15569 (substitute* "numba/tests/test_jitclasses.py"
15570 (("def test(_jitclass_longlabel_not_truncated)" _ m)
15571 (string-append "def guix_skip" m)))
15572 #t))
15573 (replace 'check
15574 (lambda _
15575 (let ((cwd (getcwd)))
15576 (setenv "PYTHONPATH"
15577 (string-append cwd "/build/"
15578 (find (cut string-prefix? "lib" <>)
15579 (scandir (string-append cwd "/build")))
15580 ":"
15581 (getenv "PYTHONPATH")))
15582 ;; Something is wrong with the PYTHONPATH when running the
15583 ;; tests from the build directory, as it complains about not being
15584 ;; able to import certain modules.
15585 (with-directory-excursion "/tmp"
15586 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15587 #t)))))
15588 (propagated-inputs
15589 `(("python-llvmlite" ,python-llvmlite)
15590 ("python-numpy" ,python-numpy)
15591 ("python-singledispatch" ,python-singledispatch)))
15592 ;; Needed for tests.
15593 (inputs
15594 `(("python-jinja2" ,python-jinja2)
15595 ("python-pygments" ,python-pygments)))
15596 (home-page "https://numba.pydata.org")
15597 (synopsis "Compile Python code using LLVM")
15598 (description "Numba gives you the power to speed up your applications with
15599 high performance functions written directly in Python. With a few
15600 annotations, array-oriented and math-heavy Python code can be just-in-time
15601 compiled to native machine instructions, similar in performance to C, C++ and
15602 Fortran, without having to switch languages or Python interpreters.
15603
15604 Numba works by generating optimized machine code using the LLVM compiler
15605 infrastructure at import time, runtime, or statically (using the included pycc
15606 tool).")
15607 (license license:bsd-3)))
15608
15609 (define-public python-anndata
15610 (package
15611 (name "python-anndata")
15612 (version "0.6.18")
15613 (source
15614 (origin
15615 (method url-fetch)
15616 (uri (pypi-uri "anndata" version))
15617 (sha256
15618 (base32
15619 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
15620 (build-system python-build-system)
15621 (propagated-inputs
15622 `(("python-h5py" ,python-h5py)
15623 ("python-natsort" ,python-natsort)
15624 ("python-pandas" ,python-pandas)
15625 ("python-scipy" ,python-scipy)))
15626 (home-page "https://github.com/theislab/anndata")
15627 (synopsis "Annotated data for data analysis pipelines")
15628 (description "Anndata is a package for simple (functional) high-level APIs
15629 for data analysis pipelines. In this context, it provides an efficient,
15630 scalable way of keeping track of data together with learned annotations and
15631 reduces the code overhead typically encountered when using a mostly
15632 object-oriented library such as @code{scikit-learn}.")
15633 (license license:bsd-3)))
15634
15635 (define-public python-dill
15636 (package
15637 (name "python-dill")
15638 (version "0.3.1.1")
15639 (source
15640 (origin
15641 (method url-fetch)
15642 (uri (pypi-uri "dill" version))
15643 (sha256
15644 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
15645 (build-system python-build-system)
15646 (arguments
15647 `(#:phases
15648 (modify-phases %standard-phases
15649 (replace 'check
15650 (lambda _
15651 (with-directory-excursion "/tmp"
15652 (invoke "nosetests" "-v"))
15653 #t)))))
15654 (native-inputs
15655 `(("python-nose" ,python-nose)))
15656 (home-page "https://pypi.org/project/dill/")
15657 (synopsis "Serialize all of Python")
15658 (description "Dill extends Python's @code{pickle} module for serializing
15659 and de-serializing Python objects to the majority of the built-in Python
15660 types. Dill provides the user the same interface as the @code{pickle} module,
15661 and also includes some additional features. In addition to pickling Python
15662 objects, @code{dill} provides the ability to save the state of an interpreter
15663 session in a single command. Hence, it would be feasible to save a
15664 interpreter session, close the interpreter, ship the pickled file to another
15665 computer, open a new interpreter, unpickle the session and thus continue from
15666 the saved state of the original interpreter session.")
15667 (license license:bsd-3)))
15668
15669 (define-public python-multiprocess
15670 (package
15671 (name "python-multiprocess")
15672 (version "0.70.9")
15673 (source
15674 (origin
15675 (method url-fetch)
15676 (uri (pypi-uri "multiprocess" version))
15677 (sha256
15678 (base32
15679 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
15680 (build-system python-build-system)
15681 (arguments
15682 `(#:phases
15683 (modify-phases %standard-phases
15684 (add-after 'unpack 'disable-broken-tests
15685 (lambda _
15686 ;; This test is broken as there is no keyboard interrupt.
15687 (substitute* "py3.7/multiprocess/tests/__init__.py"
15688 (("^(.*)def test_wait_result"
15689 line indent)
15690 (string-append indent
15691 "@unittest.skip(\"Disabled by Guix\")\n"
15692 line)))
15693 #t))
15694 ;; Tests must be run after installation.
15695 (delete 'check)
15696 (add-after 'install 'check
15697 (lambda* (#:key inputs outputs #:allow-other-keys)
15698 (add-installed-pythonpath inputs outputs)
15699 (invoke "python" "-m" "multiprocess.tests")
15700 #t)))))
15701 (propagated-inputs
15702 `(("python-dill" ,python-dill)))
15703 (home-page "https://pypi.org/project/multiprocess/")
15704 (synopsis "Multiprocessing and multithreading in Python")
15705 (description
15706 "This package is a fork of the multiprocessing Python package, a package
15707 which supports the spawning of processes using the API of the standard
15708 library's @code{threading} module.")
15709 (license license:bsd-3)))
15710
15711 (define-public python-toolz
15712 (package
15713 (name "python-toolz")
15714 (version "0.9.0")
15715 (source
15716 (origin
15717 (method url-fetch)
15718 (uri (pypi-uri "toolz" version))
15719 (sha256
15720 (base32
15721 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
15722 (build-system python-build-system)
15723 ;; FIXME: tests cannot be computed: "Can't perform this operation for
15724 ;; unregistered loader type"
15725 (arguments '(#:tests? #f))
15726 (home-page "https://github.com/pytoolz/toolz/")
15727 (synopsis "List processing tools and functional utilities")
15728 (description
15729 "This package provides a set of utility functions for iterators,
15730 functions, and dictionaries.")
15731 (license license:bsd-3)))
15732
15733 (define-public python2-toolz
15734 (package-with-python2 python-toolz))
15735
15736 (define-public python-cytoolz
15737 (package
15738 (name "python-cytoolz")
15739 (version "0.9.0.1")
15740 (source
15741 (origin
15742 (method url-fetch)
15743 (uri (pypi-uri "cytoolz" version))
15744 (sha256
15745 (base32
15746 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
15747 (build-system python-build-system)
15748 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
15749 ;; 'exceptions'"
15750 (arguments '(#:tests? #f))
15751 (propagated-inputs
15752 `(("python-toolz" ,python-toolz)))
15753 (native-inputs
15754 `(("python-cython" ,python-cython)))
15755 (home-page "https://github.com/pytoolz/cytoolz")
15756 (synopsis "High performance functional utilities")
15757 (description
15758 "The cytoolz package implements the same API as provided by toolz. The
15759 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
15760 that is accessible to other projects developed in Cython.")
15761 (license license:bsd-3)))
15762
15763 (define-public python-sortedcontainers
15764 (package
15765 (name "python-sortedcontainers")
15766 (version "2.1.0")
15767 (source
15768 (origin
15769 (method url-fetch)
15770 (uri (pypi-uri "sortedcontainers" version))
15771 (sha256
15772 (base32
15773 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
15774 (build-system python-build-system)
15775 (native-inputs
15776 `(("python-tox" ,python-tox)))
15777 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
15778 (synopsis "Sorted List, Sorted Dict, Sorted Set")
15779 (description
15780 "This package provides a sorted collections library, written in
15781 pure-Python.")
15782 (license license:asl2.0)))
15783
15784 (define-public python-cloudpickle
15785 (package
15786 (name "python-cloudpickle")
15787 (version "0.6.1")
15788 (source
15789 (origin
15790 (method url-fetch)
15791 (uri (pypi-uri "cloudpickle" version))
15792 (sha256
15793 (base32
15794 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
15795 (build-system python-build-system)
15796 ;; FIXME: there are 5 errors in 122 tests:
15797 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
15798 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
15799 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15800 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15801 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
15802 ;; TypeError: cannot serialize '_io.BufferedRandom' object
15803 (arguments '(#:tests? #f))
15804 (native-inputs
15805 `(("python-pytest" ,python-pytest)
15806 ("python-mock" ,python-mock)
15807 ("python-tornado" ,python-tornado)))
15808 (home-page "https://github.com/cloudpipe/cloudpickle")
15809 (synopsis "Extended pickling support for Python objects")
15810 (description
15811 "Cloudpickle makes it possible to serialize Python constructs not
15812 supported by the default pickle module from the Python standard library. It
15813 is especially useful for cluster computing where Python expressions are
15814 shipped over the network to execute on remote hosts, possibly close to the
15815 data.")
15816 (license license:bsd-3)))
15817
15818 (define-public python2-cloudpickle
15819 (package-with-python2 python-cloudpickle))
15820
15821 (define-public python-locket
15822 (package
15823 (name "python-locket")
15824 (version "0.2.0")
15825 (source
15826 (origin
15827 (method url-fetch)
15828 (uri (pypi-uri "locket" version))
15829 (sha256
15830 (base32
15831 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
15832 (build-system python-build-system)
15833 (home-page "https://github.com/mwilliamson/locket.py")
15834 (synopsis "File-based locks for Python")
15835 (description
15836 "Locket implements a lock that can be used by multiple processes provided
15837 they use the same path.")
15838 (license license:bsd-2)))
15839
15840 (define-public python2-locket
15841 (package-with-python2 python-locket))
15842
15843 (define-public python-blosc
15844 (package
15845 (name "python-blosc")
15846 (version "1.5.1")
15847 (source
15848 (origin
15849 (method url-fetch)
15850 (uri (pypi-uri "blosc" version))
15851 (sha256
15852 (base32
15853 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
15854 (build-system python-build-system)
15855 ;; FIXME: all tests pass, but then this error is printed:
15856 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
15857 (arguments '(#:tests? #f))
15858 (propagated-inputs
15859 `(("python-numpy" ,python-numpy)))
15860 (home-page "https://github.com/blosc/python-blosc")
15861 (synopsis "Python wrapper for the Blosc data compressor library")
15862 (description "Blosc is a high performance compressor optimized for binary
15863 data. It has been designed to transmit data to the processor cache faster
15864 than the traditional, non-compressed, direct memory fetch approach via a
15865 @code{memcpy()} system call.
15866
15867 Blosc works well for compressing numerical arrays that contains data with
15868 relatively low entropy, like sparse data, time series, grids with
15869 regular-spaced values, etc.
15870
15871 This Python package wraps the Blosc library.")
15872 (license license:bsd-3)))
15873
15874 (define-public python2-blosc
15875 (package-with-python2 python-blosc))
15876
15877 (define-public python-partd
15878 (package
15879 (name "python-partd")
15880 (version "0.3.9")
15881 (source
15882 (origin
15883 (method url-fetch)
15884 (uri (pypi-uri "partd" version))
15885 (sha256
15886 (base32
15887 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
15888 (build-system python-build-system)
15889 (propagated-inputs
15890 `(("python-blosc" ,python-blosc)
15891 ("python-locket" ,python-locket)
15892 ("python-numpy" ,python-numpy)
15893 ("python-pandas" ,python-pandas)
15894 ("python-pyzmq" ,python-pyzmq)
15895 ("python-toolz" ,python-toolz)))
15896 (home-page "https://github.com/dask/partd/")
15897 (synopsis "Appendable key-value storage")
15898 (description "Partd stores key-value pairs. Values are raw bytes. We
15899 append on old values. Partd excels at shuffling operations.")
15900 (license license:bsd-3)))
15901
15902 (define-public python2-partd
15903 (package-with-python2 python-partd))
15904
15905 (define-public python-fsspec
15906 (package
15907 (name "python-fsspec")
15908 (version "0.6.1")
15909 (source
15910 (origin
15911 (method url-fetch)
15912 (uri (pypi-uri "fsspec" version))
15913 (sha256
15914 (base32
15915 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
15916 (build-system python-build-system)
15917 (arguments '(#:tests? #f)) ; there are none
15918 (home-page "https://github.com/intake/filesystem_spec")
15919 (synopsis "File-system specification")
15920 (description "The purpose of this package is to produce a template or
15921 specification for a file-system interface, that specific implementations
15922 should follow, so that applications making use of them can rely on a common
15923 behavior and not have to worry about the specific internal implementation
15924 decisions with any given backend.")
15925 (license license:bsd-3)))
15926
15927 (define-public python-dask
15928 (package
15929 (name "python-dask")
15930 (version "2.9.0")
15931 (source
15932 (origin
15933 (method url-fetch)
15934 (uri (pypi-uri "dask" version))
15935 (sha256
15936 (base32 "1w1hqr8vyx6ygwflj2737dcy0mmgvrc0s602gnny8pzlcbs9m76b"))))
15937 (build-system python-build-system)
15938 (arguments
15939 `(#:phases
15940 (modify-phases %standard-phases
15941 (add-after 'unpack 'disable-broken-tests
15942 (lambda _
15943 ;; This test is marked as xfail when pytest-xdist is used.
15944 (substitute* "dask/tests/test_threaded.py"
15945 (("def test_interrupt\\(\\)" m)
15946 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15947 m)))
15948 ;; This one fails with a type error:
15949 ;; TypeError: Already tz-aware, use tz_convert to convert.
15950 (substitute* "dask/dataframe/tests/test_shuffle.py"
15951 (("def test_set_index_timestamp\\(\\)" m)
15952 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15953 m)))
15954 #t))
15955 (replace 'check
15956 (lambda _ (invoke "pytest" "-vv"))))))
15957 (propagated-inputs
15958 `(("python-cloudpickle" ,python-cloudpickle)
15959 ("python-fsspec" ,python-fsspec)
15960 ("python-numpy" ,python-numpy)
15961 ("python-packaging" ,python-packaging)
15962 ("python-pandas" ,python-pandas)
15963 ("python-partd" ,python-partd)
15964 ("python-toolz" ,python-toolz)
15965 ("python-pyyaml" ,python-pyyaml)))
15966 (native-inputs
15967 `(("python-pytest" ,python-pytest)
15968 ("python-pytest-runner" ,python-pytest-runner)))
15969 (home-page "https://github.com/dask/dask/")
15970 (synopsis "Parallel computing with task scheduling")
15971 (description
15972 "Dask is a flexible parallel computing library for analytics. It
15973 consists of two components: dynamic task scheduling optimized for computation,
15974 and large data collections like parallel arrays, dataframes, and lists that
15975 extend common interfaces like NumPy, Pandas, or Python iterators to
15976 larger-than-memory or distributed environments. These parallel collections
15977 run on top of the dynamic task schedulers. ")
15978 (license license:bsd-3)))
15979
15980 (define-public python-ilinkedlist
15981 (package
15982 (name "python-ilinkedlist")
15983 (version "0.4.0")
15984 (source
15985 (origin
15986 (method url-fetch)
15987 (uri (pypi-uri "ilinkedlist" version))
15988 (sha256
15989 (base32
15990 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
15991 (build-system python-build-system)
15992 (native-inputs `(("python-pytest" ,python-pytest)))
15993 (inputs `(("python" ,python)))
15994 (home-page "https://github.com/luther9/ilinkedlist-py")
15995 (synopsis "Immutable linked list library")
15996 (description
15997 "This is a implementation of immutable linked lists for Python. It
15998 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
15999 Since a linked list is treated as immutable, it is hashable, and its length
16000 can be retrieved in constant time. Some of the terminology is inspired by
16001 LISP. It is possible to create an improper list by creating a @code{Pair}
16002 with a non-list @code{cdr}.")
16003 (license license:gpl3+)))
16004
16005 (define-public python-readlike
16006 (package
16007 (name "python-readlike")
16008 (version "0.1.3")
16009 (source
16010 (origin
16011 (method url-fetch)
16012 (uri (pypi-uri "readlike" version))
16013 (sha256
16014 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
16015 (build-system python-build-system)
16016 (home-page "https://github.com/jangler/readlike")
16017 (synopsis "GNU Readline-like line editing module")
16018 (description
16019 "This Python module provides line editing functions similar to the default
16020 Emacs-style ones of GNU Readline. Unlike the Python standard library's
16021 @code{readline} package, this one allows access to those capabilties in settings
16022 outside of a standard command-line interface. It is especially well-suited to
16023 interfacing with Urwid, due to a shared syntax for describing key inputs.
16024
16025 Currently, all stateless Readline commands are implemented. Yanking and history
16026 are not supported.")
16027 (license license:expat)))
16028
16029 (define-public python2-readlike
16030 (package-with-python2 python-readlike))
16031
16032 (define-public python-reparser
16033 (package
16034 (name "python-reparser")
16035 (version "1.4.3")
16036 (source
16037 (origin
16038 (method url-fetch)
16039 (uri (pypi-uri "ReParser" version))
16040 (sha256
16041 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
16042 (build-system python-build-system)
16043 (home-page "https://github.com/xmikos/reparser")
16044 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
16045 (description
16046 "This Python library provides a simple lexer/parser for inline markup based
16047 on regular expressions.")
16048 (license license:expat)))
16049
16050 (define-public python2-reparser
16051 (let ((reparser (package-with-python2
16052 (strip-python2-variant python-reparser))))
16053 (package (inherit reparser)
16054 (propagated-inputs
16055 `(("python2-enum34" ,python2-enum34)
16056 ,@(package-propagated-inputs reparser))))))
16057
16058 (define-public python-precis-i18n
16059 (package
16060 (name "python-precis-i18n")
16061 (version "1.0.0")
16062 (source
16063 (origin
16064 (method url-fetch)
16065 (uri (pypi-uri "precis_i18n" version))
16066 (sha256
16067 (base32
16068 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
16069 (build-system python-build-system)
16070 (home-page "https://github.com/byllyfish/precis_i18n")
16071 (synopsis "Implementation of the PRECIS framework")
16072 (description
16073 "This module implements the PRECIS Framework as described in RFC 8264,
16074 RFC 8265 and RFC 8266.")
16075 (license license:expat)))
16076
16077 (define-public python-absl-py
16078 (package
16079 (name "python-absl-py")
16080 (version "0.6.1")
16081 (source
16082 (origin
16083 (method url-fetch)
16084 (uri (pypi-uri "absl-py" version))
16085 (sha256
16086 (base32
16087 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
16088 (build-system python-build-system)
16089 (propagated-inputs
16090 `(("python-six" ,python-six)))
16091 (home-page "https://github.com/abseil/abseil-py")
16092 (synopsis "Abseil Python common libraries")
16093 (description
16094 "This package provides the Abseil Python Common Libraries, a collection
16095 of Python libraries for building Python applications.")
16096 (license license:asl2.0)))
16097
16098 (define-public python-astor
16099 (package
16100 (name "python-astor")
16101 (version "0.7.1")
16102 (source
16103 (origin
16104 (method url-fetch)
16105 (uri (pypi-uri "astor" version))
16106 (sha256
16107 (base32
16108 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
16109 (build-system python-build-system)
16110 ;; FIXME: There are two errors and two test failures.
16111 (arguments `(#:tests? #f))
16112 (home-page "https://github.com/berkerpeksag/astor")
16113 (synopsis "Read and write Python ASTs")
16114 (description "Astor is designed to allow easy manipulation of Python
16115 source via the Abstract Syntax Tree.")
16116 (license license:bsd-3)))
16117
16118 (define-public python2-astor
16119 (package-with-python2 python-astor))
16120
16121 (define-public python-grpcio
16122 (package
16123 (name "python-grpcio")
16124 (version "1.17.1")
16125 (source
16126 (origin
16127 (method url-fetch)
16128 (uri (pypi-uri "grpcio" version))
16129 (sha256
16130 (base32
16131 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
16132 (build-system python-build-system)
16133 (propagated-inputs
16134 `(("python-six" ,python-six)))
16135 (home-page "https://grpc.io")
16136 (synopsis "HTTP/2-based RPC framework")
16137 (description "This package provides a Python library for communicating
16138 with the HTTP/2-based RPC framework gRPC.")
16139 (license license:asl2.0)))
16140
16141 (define-public python-astunparse
16142 (package
16143 (name "python-astunparse")
16144 (version "1.6.2")
16145 (source
16146 (origin
16147 (method url-fetch)
16148 (uri (pypi-uri "astunparse" version))
16149 (sha256
16150 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
16151 (build-system python-build-system)
16152 (arguments '(#:tests? #f)) ; there are none
16153 (propagated-inputs
16154 `(("python-six" ,python-six)
16155 ("python-wheel" ,python-wheel)))
16156 (home-page "https://github.com/simonpercivall/astunparse")
16157 (synopsis "AST unparser for Python")
16158 (description "This package provides an AST unparser for Python. It is a
16159 factored out version of @code{unparse} found in the Python source
16160 distribution.")
16161 (license license:bsd-3)))
16162
16163 (define-public python-gast
16164 (package
16165 (name "python-gast")
16166 (version "0.2.2")
16167 (source
16168 (origin
16169 (method url-fetch)
16170 (uri (pypi-uri "gast" version))
16171 (sha256
16172 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
16173 (build-system python-build-system)
16174 (propagated-inputs
16175 `(("python-astunparse" ,python-astunparse)))
16176 (home-page "https://pypi.org/project/gast/")
16177 (synopsis "Generic Python AST that abstracts the underlying Python version")
16178 (description
16179 "GAST provides a compatibility layer between the AST of various Python
16180 versions, as produced by @code{ast.parse} from the standard @code{ast}
16181 module.")
16182 (license license:bsd-3)))
16183
16184 (define-public python-wikidata
16185 (package
16186 (name "python-wikidata")
16187 (version "0.6.1")
16188 (source
16189 (origin
16190 (method url-fetch)
16191 (uri (pypi-uri "Wikidata" version))
16192 (sha256
16193 (base32
16194 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
16195 (build-system python-build-system)
16196 (propagated-inputs
16197 `(("python-babel" ,python-babel)))
16198 (home-page "https://github.com/dahlia/wikidata")
16199 (synopsis "Wikidata client library")
16200 (description
16201 "This package provides a Python interface to
16202 @url{https://www.wikidata.org/, Wikidata}.")
16203 (properties '((upstream-name . "Wikidata")))
16204 (license license:gpl3+)))
16205
16206 (define-public python-doctest-ignore-unicode
16207 (package
16208 (name "python-doctest-ignore-unicode")
16209 (version "0.1.2")
16210 (source
16211 (origin
16212 (method url-fetch)
16213 (uri (pypi-uri "doctest-ignore-unicode" version))
16214 (sha256
16215 (base32
16216 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
16217 (build-system python-build-system)
16218 (native-inputs
16219 `(("python-nose" ,python-nose)))
16220 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
16221 (synopsis "Ignore Unicode literal prefixes in doctests")
16222 (description
16223 "This package adds support for a flag to ignore Unicode literal prefixes
16224 in doctests.")
16225 (license license:asl2.0)))
16226
16227 (define-public python-attr
16228 (package
16229 (name "python-attr")
16230 (version "0.3.1")
16231 (source
16232 (origin
16233 (method url-fetch)
16234 (uri (pypi-uri "attr" version))
16235 (sha256
16236 (base32
16237 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
16238 (build-system python-build-system)
16239 (home-page "https://github.com/denis-ryzhkov/attr")
16240 (synopsis "Decorator for attributes of target function or class")
16241 (description "Simple decorator to set attributes of target function or
16242 class in a @acronym{DRY, Don't Repeat Yourself} way.")
16243 (license license:expat)))
16244
16245 (define-public python-construct
16246 (package
16247 (name "python-construct")
16248 (version "2.9.45")
16249 (source
16250 (origin
16251 (method url-fetch)
16252 (uri (pypi-uri "construct" version))
16253 (sha256
16254 (base32
16255 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
16256 (build-system python-build-system)
16257 (arguments
16258 `(#:tests? #f)) ; No tests exist.
16259 (propagated-inputs
16260 `(("python-extras" ,python-extras)
16261 ("python-arrow" ,python-arrow)
16262 ("python-numpy" ,python-numpy)
16263 ("python-ruamel.yaml" ,python-ruamel.yaml)))
16264 (home-page "http://construct.readthedocs.io")
16265 (synopsis "Declarative and symmetrical parser and builder for binary data")
16266 (description
16267 "This package provides both simple, atomic constructs (such as
16268 integers of various sizes), as well as composite ones which allow you
16269 form hierarchical and sequential structures of increasing complexity.
16270 It features bit and byte granularity, easy debugging and testing, an
16271 easy-to-extend subclass system, and lots of primitive constructs to
16272 make your work easier.")
16273 (license license:expat)))
16274
16275 (define-public python-humanize
16276 (package
16277 (name "python-humanize")
16278 (version "0.5.1")
16279 (source
16280 (origin
16281 (method url-fetch)
16282 (uri (pypi-uri "humanize" version))
16283 (sha256
16284 (base32
16285 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
16286 (arguments
16287 '(#:tests? #f)) ; tests not in pypi archive
16288 (build-system python-build-system)
16289 (home-page "https://github.com/jmoiron/humanize")
16290 (synopsis "Print numerical information in a human-readable form")
16291 (description "This package provides a Python module that displays numbers
16292 and dates in \"human readable\" forms. For example, it would display
16293 \"12345591313\" as \"12.3 billion\".")
16294 (license license:expat)))
16295
16296 (define-public python-txaio
16297 (package
16298 (name "python-txaio")
16299 (version "18.8.1")
16300 (source
16301 (origin
16302 (method url-fetch)
16303 (uri (pypi-uri "txaio" version))
16304 (sha256
16305 (base32
16306 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
16307 (build-system python-build-system)
16308 (propagated-inputs
16309 `(("python-twisted" ,python-twisted)
16310 ("python-six" ,python-six)))
16311 (home-page "https://github.com/crossbario/txaio")
16312 (synopsis "Compatibility layer between Python asyncio and Twisted")
16313 (description "Txaio provides a compatibility layer between the Python
16314 @code{asyncio} module and @code{Twisted}.")
16315 (license license:expat)))
16316
16317 (define-public python-toolshed
16318 (package
16319 (name "python-toolshed")
16320 (version "0.4.6")
16321 (source
16322 (origin
16323 (method url-fetch)
16324 (uri (pypi-uri "toolshed" version))
16325 (sha256
16326 (base32
16327 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
16328 (build-system python-build-system)
16329 (native-inputs
16330 `(("python-nose" ,python-nose)))
16331 (home-page "https://github.com/brentp/toolshed/")
16332 (synopsis "Collection of modules and functions for working with data")
16333 (description "This is a collection of well-tested, simple modules and
16334 functions that aim to reduce boilerplate when working with data.")
16335 (license license:bsd-2)))
16336
16337 (define-public python-annoy
16338 (package
16339 (name "python-annoy")
16340 (version "1.15.1")
16341 (source
16342 (origin
16343 (method url-fetch)
16344 (uri (pypi-uri "annoy" version))
16345 (sha256
16346 (base32
16347 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
16348 (build-system python-build-system)
16349 (native-inputs
16350 `(("python-nose" ,python-nose)))
16351 (home-page "https://github.com/spotify/annoy/")
16352 (synopsis "Approximate nearest neighbors library")
16353 (description
16354 "Annoy is a C++ library with Python bindings to search for points in
16355 space that are close to a given query point. It also creates large read-only
16356 file-based data structures that are @code{mmap}ped into memory so that many
16357 processes may share the same data.")
16358 (license license:asl2.0)))
16359
16360 (define-public python-pylzma
16361 (package
16362 (name "python-pylzma")
16363 (version "0.5.0")
16364 (source
16365 (origin
16366 (method url-fetch)
16367 (uri (pypi-uri "pylzma" version))
16368 (sha256
16369 (base32
16370 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
16371 (build-system python-build-system)
16372 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
16373 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
16374 (description "This package provides Python bindings for the LZMA library
16375 by Igor Pavlov.")
16376 (license license:lgpl2.1+)))
16377
16378 (define-public python2-pylzma
16379 (package-with-python2 python-pylzma))
16380
16381 (define-public python2-zeroconf
16382 (package
16383 (name "python2-zeroconf")
16384
16385 ;; This is the last version that supports Python 2.x.
16386 (version "0.19.1")
16387 (source
16388 (origin
16389 (method url-fetch)
16390 (uri (pypi-uri "zeroconf" version))
16391 (sha256
16392 (base32
16393 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
16394 (build-system python-build-system)
16395 (arguments
16396 `(#:python ,python-2
16397 #:phases
16398 (modify-phases %standard-phases
16399 (add-after 'unpack 'patch-requires
16400 (lambda* (#:key inputs #:allow-other-keys)
16401 (substitute* "setup.py"
16402 (("enum-compat")
16403 "enum34"))
16404 #t)))))
16405 (native-inputs
16406 `(("python2-six" ,python2-six)
16407 ("python2-enum32" ,python2-enum34)
16408 ("python2-netifaces" ,python2-netifaces)
16409 ("python2-typing" ,python2-typing)))
16410 (home-page "https://github.com/jstasiak/python-zeroconf")
16411 (synopsis "Pure Python mDNS service discovery")
16412 (description
16413 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
16414 compatible).")
16415 (license license:lgpl2.1+)))
16416
16417 (define-public python-bsddb3
16418 (package
16419 (name "python-bsddb3")
16420 (version "6.2.6")
16421 (source
16422 (origin
16423 (method url-fetch)
16424 (uri (pypi-uri "bsddb3" version))
16425 (sha256
16426 (base32
16427 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
16428 (build-system python-build-system)
16429 (inputs
16430 `(("bdb" ,bdb)))
16431 (arguments
16432 '(#:phases
16433 (modify-phases %standard-phases
16434 (add-after 'unpack 'configure-locations
16435 (lambda* (#:key inputs #:allow-other-keys)
16436 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
16437 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
16438 #t))
16439 (replace 'check
16440 (lambda _
16441 (invoke "python3" "test3.py" "-v"))))))
16442 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
16443 (synopsis "Python bindings for Oracle Berkeley DB")
16444 (description
16445 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
16446 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
16447 Transaction objects, and each of these is exposed as a Python type in the
16448 bsddb3.db module. The database objects can use various access methods: btree,
16449 hash, recno, and queue. Complete support of Berkeley DB distributed
16450 transactions. Complete support for Berkeley DB Replication Manager.
16451 Complete support for Berkeley DB Base Replication. Support for RPC.")
16452 (license license:bsd-3)))
16453
16454 (define-public python-dbfread
16455 (package
16456 (name "python-dbfread")
16457 (version "2.0.7")
16458 (source (origin
16459 (method url-fetch)
16460 (uri (pypi-uri "dbfread" version))
16461 (sha256
16462 (base32
16463 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
16464 (build-system python-build-system)
16465 (native-inputs
16466 `(("python-pytest" ,python-pytest)))
16467 (home-page "https://dbfread.readthedocs.io")
16468 (synopsis "Read DBF Files with Python")
16469 (description
16470 "This library reads DBF files and returns the data as native Python data
16471 types for further processing. It is primarily intended for batch jobs and
16472 one-off scripts.")
16473 (license license:expat)))
16474
16475 (define-public python-cached-property
16476 (package
16477 (name "python-cached-property")
16478 (version "1.5.1")
16479 (source
16480 (origin
16481 (method url-fetch)
16482 (uri (pypi-uri "cached-property" version))
16483 (sha256
16484 (base32
16485 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
16486 (build-system python-build-system)
16487 (arguments
16488 `(#:phases
16489 (modify-phases %standard-phases
16490 ;; https://github.com/pydanny/cached-property/issues/131
16491 ;; recent versions of freezegun break one test
16492 (add-after 'unpack 'disable-broken-test
16493 (lambda _
16494 (substitute* "tests/test_cached_property.py"
16495 (("def test_threads_ttl_expiry\\(self\\)" m)
16496 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
16497 " " m)))
16498 #t)))))
16499 (native-inputs
16500 `(("python-freezegun" ,python-freezegun)))
16501 (home-page
16502 "https://github.com/pydanny/cached-property")
16503 (synopsis
16504 "Decorator for caching properties in classes")
16505 (description
16506 "This package provides a decorator which makes caching
16507 time-or-computationally-expensive properties quick and easy and works in Python
16508 2 or 3.")
16509 (license license:bsd-3)))
16510
16511 (define-public python-folium
16512 (package
16513 (name "python-folium")
16514 (version "0.10.1")
16515 (source
16516 (origin
16517 (method url-fetch)
16518 (uri (pypi-uri "folium" version))
16519 (sha256
16520 (base32
16521 "0gcc267wxwxr57ry86pqpbiyfvl0g48hfvgy0f2mz9s58g87kgzd"))))
16522 (build-system python-build-system)
16523 (propagated-inputs
16524 `(("python-branca" ,python-branca)
16525 ("python-jinja2" ,python-jinja2)
16526 ("python-numpy" ,python-numpy)
16527 ("python-requests" ,python-requests)))
16528 (native-inputs
16529 `(("python-pytest" ,python-pytest)))
16530 (home-page "https://github.com/python-visualization/folium")
16531 (synopsis "Make beautiful maps with Leaflet.js & Python")
16532 (description "@code{folium} makes it easy to visualize data that’s been
16533 manipulated in Python on an interactive leaflet map. It enables both the
16534 binding of data to a map for @code{choropleth} visualizations as well as
16535 passing rich vector/raster/HTML visualizations as markers on the map.
16536
16537 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
16538 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
16539 supports Image, Video, GeoJSON and TopoJSON overlays.")
16540 (license license:expat)))
16541
16542 (define-public jube
16543 (package
16544 ;; This is a command-line tool, so no "python-" prefix.
16545 (name "jube")
16546 (version "2.2.2")
16547 (source (origin
16548 (method url-fetch)
16549 (uri (string-append
16550 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
16551 version))
16552 (sha256
16553 (base32
16554 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
16555 (file-name (string-append "jube-" version ".tar.gz"))))
16556 (build-system python-build-system)
16557 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
16558 (synopsis "Benchmarking environment")
16559 (description
16560 "JUBE helps perform and analyze benchmarks in a systematic way. For each
16561 benchmarked application, benchmark data is stored in a format that allows JUBE
16562 to deduct the desired information. This data can be parsed by automatic pre-
16563 and post-processing scripts that draw information and store it more densely
16564 for manual interpretation.")
16565 (license license:gpl3+)))
16566
16567 (define-public python-pyroutelib3
16568 (package
16569 (name "python-pyroutelib3")
16570 (version "1.3.post1")
16571 (source
16572 (origin
16573 (method url-fetch)
16574 (uri (pypi-uri "pyroutelib3" version))
16575 (sha256
16576 (base32
16577 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
16578 (build-system python-build-system)
16579 (propagated-inputs
16580 `(("python-dateutil" ,python-dateutil)))
16581 (home-page "https://github.com/MKuranowski/pyroutelib3")
16582 (synopsis "Library for simple routing on OSM data")
16583 (description "Library for simple routing on OSM data")
16584 (license license:gpl3+)))
16585
16586 (define-public python-elementpath
16587 (package
16588 (name "python-elementpath")
16589 (version "1.2.0")
16590 (source
16591 (origin
16592 (method url-fetch)
16593 (uri (pypi-uri "elementpath" version))
16594 (sha256
16595 (base32
16596 "1syn2z543brab23dskh3fjd9pqvz6npqbcicrs2d88dbg26xl08p"))))
16597 (build-system python-build-system)
16598 (home-page
16599 "https://github.com/sissaschool/elementpath")
16600 (synopsis
16601 "XPath 1.0/2.0 parsers and selectors for ElementTree and lxml")
16602 (description
16603 "The proposal of this package is to provide XPath 1.0 and 2.0 selectors
16604 for Python's ElementTree XML data structures, both for the standard
16605 ElementTree library and for the @uref{http://lxml.de, lxml.etree} library.
16606
16607 For lxml.etree this package can be useful for providing XPath 2.0 selectors,
16608 because lxml.etree already has it's own implementation of XPath 1.0.")
16609 (license license:expat)))
16610
16611 (define-public python-bibtexparser
16612 (package
16613 (name "python-bibtexparser")
16614 (version "1.1.0")
16615 (source
16616 (origin
16617 (method url-fetch)
16618 (uri (pypi-uri "bibtexparser" version))
16619 (sha256
16620 (base32
16621 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
16622 (build-system python-build-system)
16623 (propagated-inputs
16624 `(("python-pyparsing" ,python-pyparsing)))
16625 (native-inputs
16626 `(("python-future" ,python-future)))
16627 (home-page "https://github.com/sciunto-org/python-bibtexparser")
16628 (synopsis "Python library to parse BibTeX files")
16629 (description "BibtexParser is a Python library to parse BibTeX files.")
16630 (license (list license:bsd-3 license:lgpl3))))
16631
16632 (define-public python-distro
16633 (package
16634 (name "python-distro")
16635 (version "1.4.0")
16636 (source
16637 (origin
16638 (method url-fetch)
16639 (uri (pypi-uri "distro" version))
16640 (sha256
16641 (base32
16642 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
16643 (build-system python-build-system)
16644 (native-inputs
16645 `(("python-pytest" ,python-pytest)))
16646 (home-page "https://github.com/nir0s/distro")
16647 (synopsis
16648 "OS platform information API")
16649 (description
16650 "@code{distro} provides information about the OS distribution it runs on,
16651 such as a reliable machine-readable ID, or version information.
16652
16653 It is the recommended replacement for Python's original
16654 `platform.linux_distribution` function (which will be removed in Python 3.8).
16655 @code{distro} also provides a command-line interface to output the platform
16656 information in various formats.")
16657 (license license:asl2.0)))
16658
16659 (define-public python-cairosvg
16660 (package
16661 (name "python-cairosvg")
16662 (version "2.4.2")
16663 (source
16664 (origin
16665 (method url-fetch)
16666 (uri (pypi-uri "CairoSVG" version))
16667 (sha256
16668 (base32 "1bb7irxbaxxb9ahm3z5wsx1q96mm5gzskc7b6q07h9ikcnb8yrjf"))))
16669 (build-system python-build-system)
16670 (arguments
16671 `(#:phases
16672 (modify-phases %standard-phases
16673 (replace 'check
16674 (lambda _ (invoke "pytest"))))))
16675 (propagated-inputs
16676 `(("python-cairocffi" ,python-cairocffi)
16677 ("python-cssselect2" ,python-cssselect2)
16678 ("python-defusedxml" ,python-defusedxml)
16679 ("python-pillow" ,python-pillow)
16680 ("python-tinycss2" ,python-tinycss2)))
16681 (native-inputs
16682 `(("python-pytest-flake8" ,python-pytest-flake8)
16683 ("python-pytest-isort" ,python-pytest-isort)
16684 ("python-pytest-runner" ,python-pytest-runner)))
16685 (home-page "https://cairosvg.org/")
16686 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
16687 (description "CairoSVG is a SVG converter based on Cairo. It can export
16688 SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
16689 SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
16690 parsed, the result is drawn to a Cairo surface that can be exported to
16691 qvarious formats: PDF, PostScript, PNG and even SVG.")
16692 (license license:lgpl3+)))
16693
16694 (define-public python-pyphen
16695 (package
16696 (name "python-pyphen")
16697 (version "0.9.5")
16698 (source
16699 (origin
16700 (method url-fetch)
16701 (uri (pypi-uri "Pyphen" version))
16702 (sha256
16703 (base32 "08c9y69ry9d6m4zalhnalg86lsp9v2j5n1ziw5vxfmiihx83lqrv"))))
16704 (build-system python-build-system)
16705 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
16706 ;; embedded set provided by upstream - like Debian does.
16707 (home-page "https://github.com/Kozea/Pyphen")
16708 (synopsis "Pure Python module to hyphenate text")
16709 (description "Pyphen is a pure Python module to hyphenate text using
16710 existing Hunspell hyphenation dictionaries.")
16711 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
16712
16713 (define-public python-intelhex
16714 (package
16715 (name "python-intelhex")
16716 (version "2.2.1")
16717 (source
16718 (origin
16719 (method url-fetch)
16720 (uri (pypi-uri "intelhex" version))
16721 (sha256
16722 (base32
16723 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
16724 (build-system python-build-system)
16725 (arguments '(#:tests? #f)) ;issue with version
16726 (home-page "https://pypi.org/project/IntelHex/")
16727 (synopsis "Python library for Intel HEX files manipulations")
16728 (description "The Intel HEX file format is widely used in microprocessors
16729 and microcontrollers area (embedded systems etc.) as the de facto standard for
16730 representation of code to be programmed into microelectronic devices. This
16731 package provides an intelhex Python library to read, write, create from
16732 scratch and manipulate data from Intel HEX file format. It also includes
16733 several convenience Python scripts, including \"classic\" hex2bin and bin2hex
16734 converters and more, those based on the library itself.")
16735 (license license:bsd-3)))
16736
16737 (define-public python-pykwalify
16738 (package
16739 (name "python-pykwalify")
16740 (version "1.7.0")
16741 (source
16742 (origin
16743 (method url-fetch)
16744 (uri (pypi-uri "pykwalify" version))
16745 (sha256
16746 (base32
16747 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
16748 (build-system python-build-system)
16749 (arguments '(#:tests? #f)) ;missing dependencies
16750 (propagated-inputs
16751 `(("python-dateutil" ,python-dateutil)
16752 ("python-docopt" ,python-docopt)
16753 ("python-pyyaml" ,python-pyyaml)))
16754 (home-page "https://github.com/grokzen/pykwalify")
16755 (synopsis
16756 "Python lib/cli for JSON/YAML schema validation")
16757 (description
16758 "This package provides a parser, schema validator, and data binding tool
16759 for YAML and JSON.")
16760 (license license:expat)))
16761
16762 (define-public python-dbusmock
16763 (package
16764 (name "python-dbusmock")
16765 (version "0.18.3")
16766 (source
16767 (origin
16768 (method url-fetch)
16769 (uri (pypi-uri "python-dbusmock" version))
16770 (sha256
16771 (base32
16772 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
16773 (build-system python-build-system)
16774 (arguments
16775 '(#:phases
16776 (modify-phases %standard-phases
16777 (add-after 'unpack 'patch-shell-path
16778 (lambda _
16779 (substitute* "tests/test_code.py"
16780 (("/bin/bash") (which "bash")))
16781 #t)))))
16782 (native-inputs
16783 `(;; For tests.
16784 ("dbus" ,dbus) ; for dbus-daemon
16785 ("python-nose" ,python-nose)
16786 ("which" ,which)))
16787 (propagated-inputs
16788 `(("python-dbus" ,python-dbus)
16789 ("python-pygobject" ,python-pygobject)))
16790 (home-page "https://github.com/martinpitt/python-dbusmock")
16791 (synopsis "Python library for mock D-Bus objects")
16792 (description "python-dbusmock allows for the easy creation of mock objects on
16793 D-Bus. This is useful for writing tests for software which talks to D-Bus
16794 services such as upower, systemd, logind, gnome-session or others, and it is
16795 hard (or impossible without root privileges) to set the state of the real
16796 services to what you expect in your tests.")
16797 (license license:lgpl3+)))
16798
16799 (define-public python-ujson
16800 (package
16801 (name "python-ujson")
16802 (version "1.35")
16803 (source
16804 (origin
16805 (method url-fetch)
16806 (uri (pypi-uri "ujson" version))
16807 (sha256
16808 (base32
16809 "11jz5wi7mbgqcsz52iqhpyykiaasila4lq8cmc2d54bfa3jp6q7n"))))
16810 (build-system python-build-system)
16811 (home-page "http://www.esn.me")
16812 (synopsis
16813 "Ultra fast JSON encoder and decoder for Python")
16814 (description
16815 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
16816 bindings for Python 2.5+ and 3.")
16817 (license license:bsd-3)))
16818
16819 (define-public python2-ujson
16820 (package-with-python2 python-ujson))
16821
16822 (define-public python-iocapture
16823 ;; The latest release is more than a year older than this commit.
16824 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
16825 (revision "1"))
16826 (package
16827 (name "python-iocapture")
16828 (version "0.1.2")
16829 (source
16830 (origin
16831 (method git-fetch)
16832 (uri (git-reference
16833 (url "https://github.com/oinume/iocapture.git")
16834 (commit commit)))
16835 (file-name (git-file-name name version))
16836 (sha256
16837 (base32
16838 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
16839 (build-system python-build-system)
16840 (arguments
16841 `(#:phases
16842 (modify-phases %standard-phases
16843 (delete 'check)
16844 (add-after 'install 'check
16845 (lambda* (#:key inputs outputs #:allow-other-keys)
16846 (add-installed-pythonpath inputs outputs)
16847 (invoke "py.test" "-v" "tests")
16848 #t)))))
16849 (propagated-inputs
16850 `(("python-flexmock" ,python-flexmock)
16851 ("python-pytest" ,python-pytest)
16852 ("python-pytest-cov" ,python-pytest-cov)
16853 ("python-six" ,python-six)))
16854 (home-page "https://github.com/oinume/iocapture")
16855 (synopsis "Python capturing tool for stdout and stderr")
16856 (description
16857 "This package helps you to capture the standard out (stdout) and the
16858 standard error channel (stderr) in your program.")
16859 (license license:expat))))
16860
16861 (define-public python-argh
16862 ;; There are 21 commits since the latest release containing important
16863 ;; improvements.
16864 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
16865 (revision "1"))
16866 (package
16867 (name "python-argh")
16868 (version (git-version "0.26.2" revision commit))
16869 (source
16870 (origin
16871 (method git-fetch)
16872 (uri (git-reference
16873 (url "https://github.com/neithere/argh.git")
16874 (commit commit)))
16875 (file-name (git-file-name name version))
16876 (sha256
16877 (base32
16878 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
16879 (build-system python-build-system)
16880 (propagated-inputs
16881 `(("python-iocapture" ,python-iocapture)
16882 ("python-mock" ,python-mock)
16883 ("python-pytest" ,python-pytest)
16884 ("python-pytest-cov" ,python-pytest-cov)
16885 ("python-pytest-xdist" ,python-pytest-xdist)
16886 ("python-tox" ,python-tox)))
16887 (home-page "https://github.com/neithere/argh/")
16888 (synopsis "Argparse wrapper with natural syntax")
16889 (description
16890 "python-argh is a small library that provides several layers of
16891 abstraction on top of @code{python-argparse}. The layers can be mixed. It is
16892 always possible to declare a command with the highest possible (and least
16893 flexible) layer and then tune the behaviour with any of the lower layers
16894 including the native API of @code{python-argparse}.")
16895 (license license:lgpl3+))))
16896
16897 (define-public python-ppft
16898 (package
16899 (name "python-ppft")
16900 (version "1.6.6.1")
16901 (source
16902 (origin
16903 (method url-fetch)
16904 (uri (pypi-uri "ppft" version))
16905 (sha256
16906 (base32
16907 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
16908 (build-system python-build-system)
16909 (arguments '(#:tests? #f)) ; there are none
16910 (propagated-inputs
16911 `(("python-six" ,python-six)))
16912 (home-page "https://pypi.org/project/ppft/")
16913 (synopsis "Fork of Parallel Python")
16914 (description
16915 "This package is a fork of Parallel Python. The Parallel Python
16916 module (@code{pp}) provides an easy and efficient way to create
16917 parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
16918 computers and clusters. It features cross-platform portability and dynamic
16919 load balancing.")
16920 (license license:bsd-3)))
16921
16922 (define-public python-pox
16923 (package
16924 (name "python-pox")
16925 (version "0.2.7")
16926 (source
16927 (origin
16928 (method url-fetch)
16929 (uri (pypi-uri "pox" version))
16930 (sha256
16931 (base32
16932 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
16933 (build-system python-build-system)
16934 (arguments
16935 `(#:phases
16936 (modify-phases %standard-phases
16937 (replace 'check
16938 (lambda _
16939 (mkdir-p "/tmp/guix")
16940 (setenv "SHELL" "bash")
16941 (setenv "USERNAME" "guix")
16942 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
16943 (invoke "py.test" "-vv")
16944 #t)))))
16945 (native-inputs
16946 `(("python-pytest" ,python-pytest)
16947 ("which" ,which)))
16948 (home-page "https://pypi.org/project/pox/")
16949 (synopsis "Python utilities for filesystem exploration and automated builds")
16950 (description
16951 "Pox provides a collection of utilities for navigating and manipulating
16952 filesystems. This module is designed to facilitate some of the low level
16953 operating system interactions that are useful when exploring a filesystem on a
16954 remote host. Pox provides Python equivalents of several shell commands such
16955 as @command{which} and @command{find}. These commands allow automated
16956 discovery of what has been installed on an operating system, and where the
16957 essential tools are located.")
16958 (license license:bsd-3)))
16959
16960 (define-public python-pathos
16961 (package
16962 (name "python-pathos")
16963 (version "0.2.5")
16964 (source
16965 (origin
16966 (method url-fetch)
16967 (uri (pypi-uri "pathos" version))
16968 (sha256
16969 (base32
16970 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
16971 (build-system python-build-system)
16972 (arguments
16973 '(#:phases
16974 (modify-phases %standard-phases
16975 (replace 'check
16976 (lambda _
16977 (setenv "PYTHONPATH"
16978 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
16979 (invoke "python" "./tests/__main__.py"))))))
16980 (propagated-inputs
16981 `(("python-dill" ,python-dill)
16982 ("python-multiprocess" ,python-multiprocess)
16983 ("python-pox" ,python-pox)
16984 ("python-ppft" ,python-ppft)))
16985 (native-inputs
16986 `(("python-pytest" ,python-pytest)))
16987 (home-page "https://pypi.org/project/pathos/")
16988 (synopsis
16989 "Parallel graph management and execution in heterogeneous computing")
16990 (description
16991 "Python-pathos is a framework for heterogenous computing. It provides a
16992 consistent high-level interface for configuring and launching parallel
16993 computations across heterogenous resources. Python-pathos provides configurable
16994 launchers for parallel and distributed computing, where each launcher contains
16995 the syntactic logic to configure and launch jobs in an execution environment.")
16996 (license license:bsd-3)))
16997
16998 (define-public python-flit
16999 (package
17000 (name "python-flit")
17001 (version "2.1.0")
17002 (source
17003 (origin
17004 (method url-fetch)
17005 (uri (pypi-uri "flit" version))
17006 (sha256
17007 (base32
17008 "0h5vvmqinqzn97mr3ix7zx53af9ad4fimjjwqpx88yp8qhz4r5bc"))))
17009 (build-system python-build-system)
17010 (arguments
17011 `(#:tests? #f)) ; XXX: Check requires network access.
17012 (home-page "https://flit.readthedocs.io/")
17013 (synopsis
17014 "Simple packaging tool for simple packages")
17015 (description
17016 "Flit is a simple way to put Python packages and modules on PyPI. Flit
17017 packages a single importable module or package at a time, using the import
17018 name as the name on PyPI. All subpackages and data files within a package
17019 are included automatically.")
17020 (license license:bsd-3)))
17021
17022 (define-public python-pathtools
17023 (package
17024 (name "python-pathtools")
17025 (version "0.1.2")
17026 (source
17027 (origin
17028 (method url-fetch)
17029 (uri (pypi-uri "pathtools" version))
17030 (sha256
17031 (base32
17032 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
17033 (build-system python-build-system)
17034 (home-page
17035 "https://github.com/gorakhargosh/pathtools")
17036 (synopsis "Path utilities for Python")
17037 (description "Pattern matching and various utilities for file systems
17038 paths.")
17039 (license license:expat)))
17040
17041 (define-public python-fastentrypoints
17042 (package
17043 (name "python-fastentrypoints")
17044 (version "0.12")
17045 (source
17046 (origin
17047 (method url-fetch)
17048 (uri (pypi-uri "fastentrypoints" version))
17049 (sha256
17050 (base32
17051 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
17052 (build-system python-build-system)
17053 (home-page
17054 "https://github.com/ninjaaron/fast-entry_points")
17055 (synopsis
17056 "Makes entry_points specified in setup.py load more quickly")
17057 (description
17058 "Using entry_points in your setup.py makes scripts that start really
17059 slowly because it imports pkg_resources. This package allows such setup
17060 scripts to load entry points more quickly.")
17061 (license license:bsd-3)))
17062
17063 (define-public python-funcparserlib
17064 (package
17065 (name "python-funcparserlib")
17066 (version "0.3.6")
17067 (source
17068 (origin
17069 (method url-fetch)
17070 (uri (pypi-uri "funcparserlib" version))
17071 (sha256
17072 (base32
17073 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
17074 (native-inputs
17075 `(("python-tox" ,python-tox)))
17076 (arguments
17077 `(#:phases
17078 (modify-phases %standard-phases
17079 (replace 'check
17080 (lambda _
17081 (invoke "tox"))))))
17082 (build-system python-build-system)
17083 (home-page
17084 "https://github.com/vlasovskikh/funcparserlib")
17085 (synopsis
17086 "Recursive descent parsing library based on functional combinators")
17087 (description
17088 "This package is a recursive descent parsing library for Python based on
17089 functional combinators. Parser combinators are just higher-order functions
17090 that take parsers as their arguments and return them as result values.")
17091 (license license:expat)))