ca559ca00a0f7c0daedc52721bdc9a2e48a46393
[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, 2020 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, 2020 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, 2020 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, 2020 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 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
72 ;;;
73 ;;; This file is part of GNU Guix.
74 ;;;
75 ;;; GNU Guix is free software; you can redistribute it and/or modify it
76 ;;; under the terms of the GNU General Public License as published by
77 ;;; the Free Software Foundation; either version 3 of the License, or (at
78 ;;; your option) any later version.
79 ;;;
80 ;;; GNU Guix is distributed in the hope that it will be useful, but
81 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
82 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
83 ;;; GNU General Public License for more details.
84 ;;;
85 ;;; You should have received a copy of the GNU General Public License
86 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
87
88 (define-module (gnu packages python-xyz)
89 #:use-module ((guix licenses) #:prefix license:)
90 #:use-module (gnu packages)
91 #:use-module (gnu packages algebra)
92 #:use-module (gnu packages adns)
93 #:use-module (gnu packages attr)
94 #:use-module (gnu packages backup)
95 #:use-module (gnu packages bash)
96 #:use-module (gnu packages check)
97 #:use-module (gnu packages compression)
98 #:use-module (gnu packages crypto)
99 #:use-module (gnu packages databases)
100 #:use-module (gnu packages dbm)
101 #:use-module (gnu packages enchant)
102 #:use-module (gnu packages file)
103 #:use-module (gnu packages fontutils)
104 #:use-module (gnu packages gcc)
105 #:use-module (gnu packages geo)
106 #:use-module (gnu packages ghostscript)
107 #:use-module (gnu packages gl)
108 #:use-module (gnu packages glib)
109 #:use-module (gnu packages gnome)
110 #:use-module (gnu packages graphviz)
111 #:use-module (gnu packages graphics)
112 #:use-module (gnu packages gstreamer)
113 #:use-module (gnu packages gtk)
114 #:use-module (gnu packages icu4c)
115 #:use-module (gnu packages image)
116 #:use-module (gnu packages imagemagick)
117 #:use-module (gnu packages kerberos)
118 #:use-module (gnu packages libevent)
119 #:use-module (gnu packages libffi)
120 #:use-module (gnu packages linux)
121 #:use-module (gnu packages llvm)
122 #:use-module (gnu packages man)
123 #:use-module (gnu packages maths)
124 #:use-module (gnu packages monitoring)
125 #:use-module (gnu packages multiprecision)
126 #:use-module (gnu packages networking)
127 #:use-module (gnu packages ncurses)
128 #:use-module (gnu packages openstack)
129 #:use-module (gnu packages pcre)
130 #:use-module (gnu packages perl)
131 #:use-module (gnu packages pkg-config)
132 #:use-module (gnu packages python)
133 #:use-module (gnu packages python-check)
134 #:use-module (gnu packages python-compression)
135 #:use-module (gnu packages python-crypto)
136 #:use-module (gnu packages python-science)
137 #:use-module (gnu packages python-web)
138 #:use-module (gnu packages qt)
139 #:use-module (gnu packages readline)
140 #:use-module (gnu packages sdl)
141 #:use-module (gnu packages search)
142 #:use-module (gnu packages shells)
143 #:use-module (gnu packages sphinx)
144 #:use-module (gnu packages ssh)
145 #:use-module (gnu packages terminals)
146 #:use-module (gnu packages tex)
147 #:use-module (gnu packages texinfo)
148 #:use-module (gnu packages time)
149 #:use-module (gnu packages tls)
150 #:use-module (gnu packages version-control)
151 #:use-module (gnu packages video)
152 #:use-module (gnu packages web)
153 #:use-module (gnu packages base)
154 #:use-module (gnu packages xml)
155 #:use-module (gnu packages xorg)
156 #:use-module (gnu packages xdisorg)
157 #:use-module (gnu packages tcl)
158 #:use-module (gnu packages bdw-gc)
159 #:use-module (gnu packages serialization)
160 #:use-module (guix packages)
161 #:use-module (guix download)
162 #:use-module (guix git-download)
163 #:use-module (guix hg-download)
164 #:use-module (guix utils)
165 #:use-module (guix build-system gnu)
166 #:use-module (guix build-system cmake)
167 #:use-module (guix build-system python)
168 #:use-module (guix build-system trivial)
169 #:use-module (srfi srfi-1)
170 #:use-module (srfi srfi-26))
171
172 (define-public python-psutil
173 (package
174 (name "python-psutil")
175 (version "5.6.5")
176 (source
177 (origin
178 (method url-fetch)
179 (uri (pypi-uri "psutil" version))
180 (sha256
181 (base32 "0isil5jxwwd8awz54qk28rpgjg43i5l6yl70g40vxwa4r4m56lfh"))))
182 (build-system python-build-system)
183 (arguments
184 ;; FIXME: some tests does not return and times out.
185 '(#:tests? #f))
186 (home-page "https://www.github.com/giampaolo/psutil")
187 (synopsis "Library for retrieving information on running processes")
188 (description
189 "psutil (Python system and process utilities) is a library for retrieving
190 information on running processes and system utilization (CPU, memory, disks,
191 network) in Python. It is useful mainly for system monitoring, profiling and
192 limiting process resources and management of running processes. It implements
193 many functionalities offered by command line tools such as: ps, top, lsof,
194 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
195 pidof, tty, taskset, pmap.")
196 (properties `((python2-variant . ,(delay python2-psutil))))
197 (license license:bsd-3)))
198
199 (define-public python2-psutil
200 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
201 (package
202 (inherit base)
203 (propagated-inputs
204 `(("python2-enum34" ,python2-enum34) ;optional
205 ,@(package-propagated-inputs base))))))
206
207 (define-public python-shapely
208 (package
209 (name "python-shapely")
210 (version "1.6.4.post2")
211 (source
212 (origin
213 (method url-fetch)
214 (uri (pypi-uri "Shapely" version))
215 (sha256
216 (base32
217 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
218 (build-system python-build-system)
219 (native-inputs
220 `(("python-cython" ,python-cython)
221 ("python-matplotlib" ,python-matplotlib)
222 ("python-pytest" ,python-pytest)
223 ("python-pytest-cov" ,python-pytest-cov)))
224 (inputs
225 `(("geos" ,geos)))
226 (propagated-inputs
227 `(("python-numpy" ,python-numpy)))
228 (arguments
229 `(#:phases
230 (modify-phases %standard-phases
231 (add-after 'unpack 'patch-geos-path
232 (lambda* (#:key inputs #:allow-other-keys)
233 (let ((geos (assoc-ref inputs "geos"))
234 (glibc (assoc-ref inputs ,(if (%current-target-system)
235 "cross-libc" "libc"))))
236 (substitute* "shapely/geos.py"
237 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
238 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
239 geos "/lib/libgeos_c.so'])"))
240 (("free = load_dll\\('c'\\)\\.free")
241 (string-append "free = load_dll('c', fallbacks=['"
242 glibc "/lib/libc.so.6']).free"))))
243 #t)))))
244 (home-page "https://github.com/Toblerity/Shapely")
245 (synopsis "Library for the manipulation and analysis of geometric objects")
246 (description "Shapely is a Python package for manipulation and analysis of
247 planar geometric objects. It is based on the @code{GEOS} library.")
248 (license license:bsd-3)))
249
250 (define-public python-shortuuid
251 (package
252 (name "python-shortuuid")
253 (version "0.5.0")
254 (source
255 (origin
256 (method url-fetch)
257 (uri (pypi-uri "shortuuid" version))
258 (sha256
259 (base32
260 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
261 (build-system python-build-system)
262 (native-inputs
263 `(("python-pep8" ,python-pep8)))
264 (home-page "https://github.com/skorokithakis/shortuuid")
265 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
266 (description
267 "@code{shortuuid} is a Python library for generating concise, unambiguous
268 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
269 module and then similar looking characters are removed.")
270 (license license:bsd-3)))
271
272 (define-public python-logwrap
273 (package
274 (name "python-logwrap")
275 (version "3.2.1")
276 (source
277 (origin
278 (method url-fetch)
279 (uri (pypi-uri "logwrap" version ".zip"))
280 (sha256
281 (base32
282 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
283 (build-system python-build-system)
284 (propagated-inputs
285 `(("python-six" ,python-six)
286 ("python-typing" ,python-typing)))
287 (native-inputs
288 `(("unzip" ,unzip)
289 ("python-cython" ,python-cython)
290 ("python-pytest" ,python-pytest)
291 ("python-pytest-cov" ,python-pytest-cov)
292 ("python-pytest-runner" ,python-pytest-runner)))
293 (home-page "https://github.com/penguinolog/logwrap")
294 (synopsis "Decorator for logging function arguments")
295 (description "This package provides a decorator to log function arguments
296 and function call return values in a human-readable way.")
297 (license license:asl2.0)))
298
299 (define-public python2-shapely
300 (package-with-python2 python-shapely))
301
302 (define-public python-clyent
303 (package
304 (name "python-clyent")
305 (version "1.2.1")
306 (source
307 (origin
308 (method url-fetch)
309 (uri (pypi-uri "clyent" version))
310 (sha256
311 (base32
312 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
313 (build-system python-build-system)
314 (native-inputs
315 `(("python-mock" ,python-mock)))
316 (home-page "https://github.com/binstar/clyent")
317 (synopsis "Command line client library")
318 (description "Clyent is a Python command line utiliy library. It is used
319 by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
320 (license license:bsd-3)))
321
322 (define-public python2-clyent
323 (package-with-python2 python-clyent))
324
325 (define-public python-babel
326 (package
327 (name "python-babel")
328 (version "2.7.0")
329 (source
330 (origin
331 (method url-fetch)
332 (uri (pypi-uri "Babel" version))
333 (sha256
334 (base32
335 "0a7wawx8vsg7igvz6p3x909fskhg4b2y1910xk4f4c8y22p3aqg8"))))
336 (build-system python-build-system)
337 (native-inputs
338 `(("python-freezegun" ,python-freezegun)
339 ("python-pytest" ,python-pytest)))
340 (propagated-inputs
341 `(("python-pytz" ,python-pytz)))
342 (arguments
343 `(#:phases (modify-phases %standard-phases
344 (replace 'check
345 (lambda _
346 (invoke "pytest" "-vv" "-k"
347 (string-append
348 ;; XXX: These tests fail when using Pytest 4.x and
349 ;; Babel 2.6.0. Try removing this for later versions.
350 "not test_no_inherit_metazone_marker_never_in_output"
351 " and not test_smoke_dates"
352 " and not test_smoke_numbers")))))))
353 (home-page "http://babel.pocoo.org/")
354 (synopsis
355 "Tools for internationalizing Python applications")
356 (description
357 "Babel is composed of two major parts:
358 - tools to build and work with gettext message catalogs
359 - a Python interface to the CLDR (Common Locale Data Repository), providing
360 access to various locale display names, localized number and date formatting,
361 etc. ")
362 (license license:bsd-3)))
363
364 (define-public python2-babel
365 (package-with-python2 python-babel))
366
367 ;; Sphinx < 2.0 requires this version. Remove once no longer needed.
368 (define-public python2-babel-2.6
369 (package
370 (inherit python2-babel)
371 (version "2.6.0")
372 (source (origin
373 (method url-fetch)
374 (uri (pypi-uri "Babel" version))
375 (sha256
376 (base32
377 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
378
379 (define-public python2-backport-ssl-match-hostname
380 (package
381 (name "python2-backport-ssl-match-hostname")
382 (version "3.5.0.1")
383 (source
384 (origin
385 (method url-fetch)
386 (uri (pypi-uri "backports.ssl_match_hostname" version))
387 (sha256
388 (base32
389 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
390 (build-system python-build-system)
391 (arguments
392 `(#:python ,python-2
393 #:tests? #f)) ; no test target
394 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
395 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
396 (description
397 "This backport brings the ssl.match_hostname() function to users of
398 earlier versions of Python. The function checks the hostname in the
399 certificate returned by the server to which a connection has been established,
400 and verifies that it matches the intended target hostname.")
401 (license license:psfl)))
402
403 (define-public python-boolean.py
404 (package
405 (name "python-boolean.py")
406 (version "3.6")
407 (source
408 (origin
409 ;; There's no source tarball on PyPI.
410 (method git-fetch)
411 (uri (git-reference
412 (url "https://github.com/bastikr/boolean.py")
413 (commit (string-append "v" version))))
414 (file-name (git-file-name name version))
415 (sha256
416 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
417 (build-system python-build-system)
418 (home-page "https://github.com/bastikr/boolean.py")
419 (synopsis "Boolean algebra in one Python module")
420 (description
421 "This is a small Python library that implements boolean algebra.
422 It defines two base elements, @code{TRUE} and @code{FALSE}, and a
423 @code{Symbol} class that can take on one of these two values. Calculations
424 are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
425 compositions like @code{XOR} and @code{NAND} are emulated on top of them.
426 Expressions are constructed from parsed strings or directly in Python.")
427 (license license:bsd-2)))
428
429 (define-public python-hdf4
430 (package
431 (name "python-hdf4")
432 (version "0.9")
433 (source
434 (origin
435 (method url-fetch)
436 (uri (pypi-uri name version))
437 (sha256
438 (base32
439 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
440 (build-system python-build-system)
441 (native-inputs `(("nose" ,python-nose)))
442 (propagated-inputs `(("numpy" ,python-numpy)))
443 (inputs
444 `(("hdf4" ,hdf4)
445 ("libjpeg" ,libjpeg)
446 ("zlib" ,zlib)))
447 (arguments
448 `(#:phases
449 (modify-phases %standard-phases
450 (replace 'check
451 (lambda _
452 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
453 ;; on to import numpy. Somehow this works on their CI system.
454 ;; Let's just manage PYTHONPATH here instead.
455 (substitute* "runexamples.sh"
456 (("export PYTHONPATH=.*") ""))
457 (setenv "PYTHONPATH"
458 (string-append (getcwd) ":"
459 (getenv "PYTHONPATH")))
460 (invoke "./runexamples.sh")
461 (invoke "nosetests" "-v"))))))
462 (home-page "https://github.com/fhs/python-hdf4")
463 (synopsis "Python interface to the NCSA HDF4 library")
464 (description
465 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
466 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
467 NetCDF files can also be read and modified. Python-HDF4 is a fork of
468 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
469 (license license:expat)))
470
471 (define-public python2-hdf4
472 (package-with-python2 python-hdf4))
473
474 (define-public python-h5py
475 (package
476 (name "python-h5py")
477 (version "2.8.0")
478 (source
479 (origin
480 (method url-fetch)
481 (uri (pypi-uri "h5py" version))
482 (sha256
483 (base32
484 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
485 (build-system python-build-system)
486 (arguments
487 `(#:tests? #f ; no test target
488 #:phases
489 (modify-phases %standard-phases
490 (add-after 'unpack 'fix-hdf5-paths
491 (lambda* (#:key inputs #:allow-other-keys)
492 (let ((prefix (assoc-ref inputs "hdf5")))
493 (substitute* "setup_build.py"
494 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
495 (string-append "['" prefix "/lib" "']"))
496 (("'/opt/local/include', '/usr/local/include'")
497 (string-append "'" prefix "/include" "'")))
498 (substitute* "setup_configure.py"
499 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
500 (string-append "['" prefix "/lib" "']")))
501 #t))))))
502 (propagated-inputs
503 `(("python-six" ,python-six)
504 ("python-numpy" ,python-numpy)))
505 (inputs
506 `(("hdf5" ,hdf5)))
507 (native-inputs
508 `(("python-cython" ,python-cython)
509 ("python-pkgconfig" ,python-pkgconfig)))
510 (home-page "http://www.h5py.org/")
511 (synopsis "Read and write HDF5 files from Python")
512 (description
513 "The h5py package provides both a high- and low-level interface to the
514 HDF5 library from Python. The low-level interface is intended to be a
515 complete wrapping of the HDF5 API, while the high-level component supports
516 access to HDF5 files, datasets and groups using established Python and NumPy
517 concepts.")
518 (license license:bsd-3)))
519
520 (define-public python2-h5py
521 (package-with-python2 python-h5py))
522
523 (define-public python-sh
524 (package
525 (name "python-sh")
526 (version "1.12.14")
527 (source
528 (origin
529 (method url-fetch)
530 (uri (pypi-uri "sh" version))
531 (sha256
532 (base32
533 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
534 (build-system python-build-system)
535 (arguments
536 '(#:phases
537 (modify-phases %standard-phases
538 (replace 'check
539 (lambda _
540 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
541 (setenv "HOME" "/tmp")
542 (invoke "python" "sh.py" "test"))))))
543 (native-inputs
544 `(("python-coverage" ,python-coverage)))
545 (home-page "https://github.com/amoffat/sh")
546 (synopsis "Python subprocess replacement")
547 (description "This package provides a replacement for Python's
548 @code{subprocess} feature.")
549 (license license:expat)))
550
551 (define-public python2-sh
552 (package-with-python2 python-sh))
553
554 (define-public python-cftime
555 (package
556 (name "python-cftime")
557 (version "1.0.4.2")
558 (source
559 (origin
560 (method url-fetch)
561 (uri (pypi-uri "cftime" version))
562 (sha256
563 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
564 (build-system python-build-system)
565 (propagated-inputs
566 `(("python-numpy" ,python-numpy)))
567 (native-inputs
568 `(("python-coveralls" ,python-coveralls)
569 ("python-cython" ,python-cython)
570 ("python-pytest-cov" ,python-pytest-cov)))
571 (home-page "https://github.com/Unidata/cftime")
572 (synopsis "Library for time handling")
573 (description
574 "This package provides time-handling functionality that used to be part
575 of the netcdf4 package before.")
576 ;; This package claims to include code under the GPLv3 but is released
577 ;; under ISC.
578 (license (list license:isc license:gpl3+))))
579
580 (define-public python-netcdf4
581 (package
582 (name "python-netcdf4")
583 (version "1.4.2")
584 (source
585 (origin
586 (method url-fetch)
587 (uri (pypi-uri "netCDF4" version))
588 (sha256
589 (base32
590 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
591 (build-system python-build-system)
592 (arguments
593 '(#:phases
594 (modify-phases %standard-phases
595 (add-after 'unpack 'configure-locations
596 (lambda* (#:key inputs #:allow-other-keys)
597 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
598 #t)))))
599 (native-inputs
600 `(("python-cython" ,python-cython)))
601 (propagated-inputs
602 `(("python-numpy" ,python-numpy)
603 ("python-cftime" ,python-cftime)))
604 (inputs
605 `(("netcdf" ,netcdf)
606 ("hdf4" ,hdf4)
607 ("hdf5" ,hdf5)))
608 (home-page "https://github.com/Unidata/netcdf4-python")
609 (synopsis "Python/numpy interface to the netCDF library")
610 (description "Netcdf4-python is a Python interface to the netCDF C
611 library. netCDF version 4 has many features not found in earlier
612 versions of the library and is implemented on top of HDF5. This module
613 can read and write files in both the new netCDF 4 and the old netCDF 3
614 format, and can create files that are readable by HDF5 clients. The
615 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
616 to users of that module.")
617 ;; The software is mainly ISC, but includes some files covered
618 ;; by the Expat license.
619 (license (list license:isc license:expat))))
620
621 (define-public python2-netcdf4
622 (package-with-python2 python-netcdf4))
623
624 (define-public python-license-expression
625 (package
626 (name "python-license-expression")
627 (version "0.999")
628 (source
629 (origin
630 (method url-fetch)
631 (uri (pypi-uri "license-expression" version))
632 (sha256
633 (base32 "08ppb0bxbrsxazy88sgpl9yffvdsabw6dkk1nc332wcz2mphwwyf"))))
634 (build-system python-build-system)
635 (propagated-inputs
636 `(("python-boolean.py" ,python-boolean.py)))
637 (home-page "https://github.com/nexB/license-expression")
638 (synopsis "Apply boolean logic to license expressions")
639 (description
640 "This Python module defines a tiny language to evaluate and compare
641 license expressions using boolean logic. Logical combinations of licenses can
642 be tested for equality, containment, and equivalence. They can be normalised
643 and simplified. It supports SPDX license expressions as well as other naming
644 conventions and aliases in the same expression.")
645 (license license:gpl2+)))
646
647 (define-public python-lockfile
648 (package
649 (name "python-lockfile")
650 (version "0.12.2")
651 (source
652 (origin
653 (method url-fetch)
654 (uri (pypi-uri "lockfile" version))
655 (sha256
656 (base32
657 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
658 (build-system python-build-system)
659 (arguments '(#:test-target "check"))
660 (native-inputs
661 `(("python-pbr" ,python-pbr)))
662 (home-page "https://launchpad.net/pylockfile")
663 (synopsis "Platform-independent file locking module")
664 (description
665 "The lockfile package exports a LockFile class which provides a simple
666 API for locking files.")
667 (license license:expat)))
668
669 (define-public python2-lockfile
670 (package-with-python2 python-lockfile))
671
672 (define-public python-semantic-version
673 (package
674 (name "python-semantic-version")
675 (version "2.6.0")
676 (source
677 (origin
678 (method url-fetch)
679 (uri (pypi-uri "semantic_version" version))
680 (sha256
681 (base32
682 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
683 (build-system python-build-system)
684 (arguments
685 `(#:tests? #f)) ; PyPI tarball lacks tests
686 (home-page "https://github.com/rbarrois/python-semanticversion")
687 (synopsis "Semantic versioning module for Python")
688 (description
689 "The @code{semantic_version} class is a small library for handling
690 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
691
692 It can compare versions, generate a new version that represents a bump in one of
693 the version levels, and check whether any given string is a proper semantic
694 version identifier.")
695 (license license:bsd-3)))
696
697 (define-public python2-semantic-version
698 (package-with-python2 python-semantic-version))
699
700 (define-public python-serpent
701 (package
702 (name "python-serpent")
703 (version "1.28")
704 (source
705 (origin
706 (method url-fetch)
707 (uri (pypi-uri "serpent" version))
708 (sha256
709 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
710 (build-system python-build-system)
711 (native-inputs
712 `(("python-attrs" ,python-attrs)
713 ("python-pytz" ,python-pytz)))
714 (home-page "https://github.com/irmen/Serpent")
715 (synopsis "Serializer for literal Python expressions")
716 (description
717 "Serpent provides @code{ast.literal_eval()}-compatible object tree
718 serialization. It serializes an object tree into bytes (an utf-8 encoded
719 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
720 to rebuild the original object tree.
721
722 Because only safe literals are encoded, it is safe to send serpent data to
723 other machines, such as over the network.")
724 (license license:expat)))
725
726 (define-public python-setuptools
727 (package
728 (name "python-setuptools")
729 (version "41.0.1")
730 (source
731 (origin
732 (method url-fetch)
733 (uri (pypi-uri "setuptools" version ".zip"))
734 (sha256
735 (base32
736 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
737 (modules '((guix build utils)))
738 (snippet
739 '(begin
740 ;; Remove included binaries which are used to build self-extracting
741 ;; installers for Windows.
742 ;; TODO: Find some way to build them ourself so we can include them.
743 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
744 #t))))
745 (build-system python-build-system)
746 ;; FIXME: Tests require pytest, which itself relies on setuptools.
747 ;; One could bootstrap with an internal untested setuptools.
748 (arguments
749 `(#:tests? #f))
750 (home-page "https://pypi.python.org/pypi/setuptools")
751 (synopsis
752 "Library designed to facilitate packaging Python projects")
753 (description
754 "Setuptools is a fully-featured, stable library designed to facilitate
755 packaging Python projects, where packaging includes:
756 Python package and module definitions,
757 distribution package metadata,
758 test hooks,
759 project installation,
760 platform-specific details,
761 Python 3 support.")
762 ;; TODO: setuptools now bundles the following libraries:
763 ;; packaging, pyparsing, six and appdirs. How to unbundle?
764 (license (list license:psfl ; setuptools itself
765 license:expat ; six, appdirs, pyparsing
766 license:asl2.0 ; packaging is dual ASL2/BSD-2
767 license:bsd-2))))
768
769 (define-public python2-setuptools
770 (package-with-python2 python-setuptools))
771
772 ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
773 (define-public python-setuptools-for-tensorflow
774 (hidden-package
775 (package
776 (inherit python-setuptools)
777 (version "39.1.0")
778 (source (origin
779 (inherit (package-source python-setuptools))
780 (uri (pypi-uri "setuptools" version ".zip"))
781 (sha256
782 (base32
783 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
784
785 (define-public python-uniseg
786 (package
787 (name "python-uniseg")
788 (version "0.7.1")
789 (source
790 (origin
791 (method url-fetch)
792 (uri (pypi-uri "uniseg" version ".zip"))
793 (sha256
794 (base32
795 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
796 (build-system python-build-system)
797 (arguments
798 '(#:tests? #f)) ; The test suite requires network access.
799 (native-inputs
800 `(("unzip" ,unzip)))
801 (home-page
802 "https://bitbucket.org/emptypage/uniseg-python")
803 (synopsis
804 "Python library to determine Unicode text segmentations")
805 (description
806 "Uniseg is a Python package used to determine Unicode text segmentations.
807 Supported segmentations include:
808 @enumerate
809 @item @dfn{Code point} (any value in the Unicode codespace)
810 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
811 multiple Unicode code points, e.g. \"G\" + acute-accent)
812 @item Word break
813 @item Sentence break
814 @item Line break
815 @end enumerate")
816 (license license:expat)))
817
818 (define-public python2-uniseg
819 (package-with-python2 python-uniseg))
820
821 (define-public python-humanfriendly
822 (package
823 (name "python-humanfriendly")
824 (version "4.4.1")
825 (source
826 (origin
827 (method url-fetch)
828 (uri (pypi-uri "humanfriendly" version))
829 (sha256
830 (base32
831 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
832 (build-system python-build-system)
833 (arguments
834 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
835 #:tests? #f))
836 (propagated-inputs
837 `(("python-monotonic" ,python-monotonic)))
838 (home-page "https://humanfriendly.readthedocs.io")
839 (synopsis "Human-friendly input and output in Python")
840 (description
841 "The functions and classes in @code{humanfriendly} can be used to make
842 text interfaces more user-friendly. It includes tools to parse and format
843 numbers, file sizes, and timespans, timers for long-running operations, menus
844 to allow the user to choose from a list of options, and terminal interaction
845 helpers.")
846 (license license:expat)))
847
848 (define-public python2-humanfriendly
849 (package-with-python2 python-humanfriendly))
850
851 (define-public python-capturer
852 (package
853 (name "python-capturer")
854 (version "2.4")
855 (source
856 (origin
857 (method url-fetch)
858 (uri (pypi-uri "capturer" version))
859 (sha256
860 (base32
861 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
862 (build-system python-build-system)
863 (arguments
864 `(#:tests? #f))
865 (propagated-inputs
866 `(("python-humanfriendly" ,python-humanfriendly)))
867 (home-page "https://capturer.readthedocs.io")
868 (synopsis "Capture stdout and stderr streams of the current process")
869 (description
870 "The capturer package makes it easy to capture the stdout and stderr
871 streams of the current process and subprocesses. Output can be relayed
872 to the terminal in real time but is also available to the Python program
873 for additional processing.")
874 (license license:expat)))
875
876 (define-public python2-capturer
877 (package-with-python2 python-capturer))
878
879 (define-public python-case
880 (package
881 (name "python-case")
882 (version "1.5.3")
883 (source
884 (origin
885 (method url-fetch)
886 (uri (pypi-uri "case" version))
887 (sha256
888 (base32
889 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
890 (build-system python-build-system)
891 (propagated-inputs
892 `(("python-mock" ,python-mock)
893 ("python-nose" ,python-nose)
894 ("python-six" ,python-six)
895 ("python-unittest2" ,python-unittest2)))
896 (native-inputs
897 `(("python-coverage" ,python-coverage)))
898 (home-page "https://github.com/celery/case")
899 (synopsis "Unittest utilities and convenience methods")
900 (description
901 "The @code{case} package provides utilities on top of unittest, including
902 some helpful Python 2 compatibility convenience methods.")
903 (license license:bsd-3)))
904
905 (define-public python-verboselogs
906 (package
907 (name "python-verboselogs")
908 (version "1.7")
909 (source
910 (origin
911 (method url-fetch)
912 (uri (pypi-uri "verboselogs" version))
913 (sha256
914 (base32
915 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
916 (build-system python-build-system)
917 (arguments
918 `(#:phases
919 (modify-phases %standard-phases
920 (replace 'check
921 (lambda _
922 ;; Do not run pylint plugin test, as astroid is an old
923 ;; unsupported version.
924 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
925 "verboselogs/tests.py"))))))
926 (native-inputs
927 `(("python-mock" ,python-mock)
928 ("python-pytest" ,python-pytest)))
929 (home-page "https://verboselogs.readthedocs.io")
930 (synopsis "Verbose logging level for Python's logging module")
931 (description
932 "The @code{verboselogs} package extends Python's @code{logging} module to
933 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
934 (license license:expat)))
935
936 (define-public python2-verboselogs
937 (package-with-python2 python-verboselogs))
938
939 (define-public python-coloredlogs
940 (package
941 (name "python-coloredlogs")
942 (version "10.0")
943 (source
944 (origin
945 (method url-fetch)
946 (uri (pypi-uri "coloredlogs" version))
947 (sha256
948 (base32
949 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
950 (build-system python-build-system)
951 (arguments
952 `(;Tests require some updated modules
953 #:tests? #f))
954 (propagated-inputs
955 `(("python-capturer" ,python-capturer)))
956 (home-page "https://coloredlogs.readthedocs.io")
957 (synopsis "Colored stream handler for Python's logging module")
958 (description
959 "The @code{coloredlogs} package enables colored terminal output for
960 Python's logging module. The @code{ColoredFormatter} class inherits from
961 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
962 messages in color.")
963 (license license:expat)))
964
965 (define-public python2-coloredlogs
966 (package-with-python2 python-coloredlogs))
967
968 (define-public python-editorconfig
969 (package
970 (name "python-editorconfig")
971 (version "0.12.2")
972 (source
973 (origin
974 (method url-fetch)
975 (uri (pypi-uri "EditorConfig" version))
976 (sha256
977 (base32
978 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
979 (build-system python-build-system)
980 (home-page "https://editorconfig.org/")
981 (synopsis "EditorConfig bindings for python")
982 (description "The EditorConfig project consists of a file format for
983 defining coding styles and a collection of text editor plugins that enable
984 editors to read the file format and adhere to defined styles. EditorConfig
985 files are easily readable and they work nicely with version control systems.")
986 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
987 (license (list license:bsd-2 license:psfl))))
988
989 (define-public python-et-xmlfile
990 (package
991 (name "python-et-xmlfile")
992 (version "1.0.1")
993 (source
994 (origin
995 (method url-fetch)
996 (uri (pypi-uri "et_xmlfile" version))
997 (sha256
998 (base32
999 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
1000 (build-system python-build-system)
1001 (arguments
1002 `(#:phases (modify-phases %standard-phases
1003 (replace 'check
1004 (lambda _
1005 (invoke "pytest"))))))
1006 (native-inputs
1007 `(("python-pytest" ,python-pytest)
1008 ("python-lxml" ,python-lxml))) ;used for the tests
1009 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
1010 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
1011 (description "This Python library is based upon the @code{xmlfile} module
1012 from @code{lxml}. It aims to provide a low memory, compatible implementation
1013 of @code{xmlfile}.")
1014 (license license:expat)))
1015
1016 (define-public python2-et-xmlfile
1017 (package-with-python2 python-et-xmlfile))
1018
1019 (define-public python-openpyxl
1020 (package
1021 (name "python-openpyxl")
1022 (version "2.6.2")
1023 (source
1024 (origin
1025 ;; We use the upstream repository, as the tests are not included in the
1026 ;; PyPI releases.
1027 (method hg-fetch)
1028 (uri (hg-reference
1029 (url "https://bitbucket.org/openpyxl/openpyxl")
1030 (changeset version)))
1031 (file-name (string-append name "-" version "-checkout"))
1032 (sha256
1033 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
1034 (build-system python-build-system)
1035 (arguments
1036 `(#:phases (modify-phases %standard-phases
1037 (replace 'check
1038 (lambda _
1039 (invoke "pytest"))))))
1040 (native-inputs
1041 ;; For the test suite.
1042 `(("python-lxml" ,python-lxml)
1043 ("python-pillow" ,python-pillow)
1044 ("python-pytest" ,python-pytest)))
1045 (propagated-inputs
1046 `(("python-et-xmlfile" ,python-et-xmlfile)
1047 ("python-jdcal" ,python-jdcal)))
1048 (home-page "https://openpyxl.readthedocs.io")
1049 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1050 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1051 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1052 standard.")
1053 (license license:expat)))
1054
1055 (define-public python-eventlet
1056 (package
1057 (name "python-eventlet")
1058 (version "0.25.1")
1059 (source
1060 (origin
1061 (method url-fetch)
1062 (uri (pypi-uri "eventlet" version))
1063 (sha256
1064 (base32
1065 "1hgz8jq19wlz8vwqj900ry8cjv578nz4scc91mlc8944yid6573c"))))
1066 (build-system python-build-system)
1067 (propagated-inputs
1068 `(("python-greenlet" ,python-greenlet)))
1069 (arguments
1070 ;; TODO: Requires unpackaged 'enum-compat'.
1071 '(#:tests? #f))
1072 (home-page "https://eventlet.net")
1073 (synopsis "Concurrent networking library for Python")
1074 (description
1075 "Eventlet is a concurrent networking library for Python that
1076 allows you to change how you run your code, not how you write it.
1077 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1078 Coroutines ensure that the developer uses a blocking style of programming
1079 that is similar to threading, but provide the benefits of non-blocking I/O.
1080 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1081 from the Python interpreter, or as a small part of a larger application.")
1082 (license license:expat)))
1083
1084 (define-public python2-eventlet
1085 (let ((base (package-with-python2
1086 (strip-python2-variant python-eventlet))))
1087 (package (inherit base)
1088 (propagated-inputs
1089 `(("python2-enum34" ,python2-enum34)
1090 ,@(package-propagated-inputs base))))))
1091
1092 (define-public python-six
1093 (package
1094 (name "python-six")
1095 (version "1.12.0")
1096 (source
1097 (origin
1098 (method url-fetch)
1099 (uri (pypi-uri "six" version))
1100 (sha256
1101 (base32
1102 "0wxs1q74v07ssjywbbm7x6h5v9qx209ld2yfsif4060sxi0h2sni"))))
1103 (build-system python-build-system)
1104 (arguments
1105 `(#:phases
1106 (modify-phases %standard-phases
1107 (replace 'check
1108 (lambda _
1109 (invoke "py.test" "-v"))))))
1110 (native-inputs
1111 `(("python-py" ,python-py)
1112 ("python-pytest" ,python-pytest-bootstrap)))
1113 (home-page "https://pypi.python.org/pypi/six/")
1114 (synopsis "Python 2 and 3 compatibility utilities")
1115 (description
1116 "Six is a Python 2 and 3 compatibility library. It provides utility
1117 functions for smoothing over the differences between the Python versions with
1118 the goal of writing Python code that is compatible on both Python versions.
1119 Six supports every Python version since 2.5. It is contained in only one
1120 Python file, so it can be easily copied into your project.")
1121 (license license:x11)))
1122
1123 (define-public python2-six
1124 (package-with-python2 python-six))
1125
1126 (define-public python-six-bootstrap
1127 (package
1128 (inherit python-six)
1129 (name "python-six-bootstrap")
1130 (native-inputs `())
1131 (arguments `(#:tests? #f))))
1132
1133 (define-public python2-six-bootstrap
1134 (package-with-python2 python-six-bootstrap))
1135
1136 (define-public python-schedule
1137 (package
1138 (name "python-schedule")
1139 (version "0.4.3")
1140 (source
1141 (origin
1142 (method url-fetch)
1143 (uri (pypi-uri "schedule" version))
1144 (sha256
1145 (base32
1146 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1147 (build-system python-build-system)
1148 (native-inputs
1149 `(("python-pytest" ,python-pytest)
1150 ("python-mock" ,python-mock)))
1151 (home-page "https://github.com/dbader/schedule")
1152 (synopsis "Schedule periodic function calls in Python")
1153 (description
1154 "Schedule is an in-process scheduler for periodic jobs that uses the
1155 builder pattern for configuration. Schedule lets you run Python functions (or
1156 any other callable) periodically at pre-determined intervals using a simple,
1157 human-friendly syntax.")
1158 (license license:expat)))
1159
1160 (define-public python2-schedule
1161 (package-with-python2 python-schedule))
1162
1163 (define-public python2-mechanize
1164 (package
1165 (name "python2-mechanize")
1166 (version "0.2.5")
1167 (source
1168 (origin
1169 (method url-fetch)
1170 (uri (pypi-uri "mechanize" version))
1171 (sha256
1172 (base32
1173 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1174 (build-system python-build-system)
1175 (arguments
1176 `(#:python ,python-2 ; apparently incompatible with Python 3
1177 #:tests? #f))
1178 ;; test fails with message
1179 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1180 ;; (python-3.3.2) or
1181 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1182 ;; (python-2.7.5).
1183 ;; The source code is from March 2011 and probably not up-to-date
1184 ;; with respect to python unit tests.
1185 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1186 (synopsis
1187 "Stateful programmatic web browsing in Python")
1188 (description
1189 "Mechanize implements stateful programmatic web browsing in Python,
1190 after Andy Lester’s Perl module WWW::Mechanize.")
1191 (license (license:non-copyleft
1192 "file://COPYING"
1193 "See COPYING in the distribution."))))
1194
1195
1196 (define-public python-simplejson
1197 (package
1198 (name "python-simplejson")
1199 (version "3.14.0")
1200 (source
1201 (origin
1202 (method url-fetch)
1203 (uri (pypi-uri "simplejson" version))
1204 (sha256
1205 (base32
1206 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1207 (build-system python-build-system)
1208 (home-page "http://simplejson.readthedocs.org/en/latest/")
1209 (synopsis
1210 "Json library for Python")
1211 (description
1212 "JSON (JavaScript Object Notation) is a subset of JavaScript
1213 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1214 format.
1215
1216 Simplejson exposes an API familiar to users of the standard library marshal
1217 and pickle modules. It is the externally maintained version of the json
1218 library contained in Python 2.6, but maintains compatibility with Python 2.5
1219 and (currently) has significant performance advantages, even without using
1220 the optional C extension for speedups. Simplejson is also supported on
1221 Python 3.3+.")
1222 (license license:x11)))
1223
1224 (define-public python2-simplejson
1225 (package-with-python2 python-simplejson))
1226
1227
1228 (define-public python-pyicu
1229 (package
1230 (name "python-pyicu")
1231 (version "2.3.1")
1232 (source
1233 (origin
1234 (method url-fetch)
1235 (uri (pypi-uri "PyICU" version))
1236 (sha256
1237 (base32
1238 "1x4w8m7ifki9z2a187pgjr33z6z0rp2fii9b73djak1vhm9v9cnx"))))
1239 (build-system python-build-system)
1240 (inputs
1241 `(("icu4c" ,icu4c)))
1242 (native-inputs
1243 `(("python-pytest" ,python-pytest)
1244 ("python-six" ,python-six)))
1245 (home-page "https://github.com/ovalhub/pyicu")
1246 (synopsis "Python extension wrapping the ICU C++ API")
1247 (description
1248 "PyICU is a python extension wrapping the ICU C++ API.")
1249 (properties `((python2-variant . ,(delay python2-pyicu))))
1250 (license license:x11)))
1251
1252 (define-public python2-pyicu
1253 (let ((base (package-with-python2
1254 (strip-python2-variant python-pyicu))))
1255 (package
1256 (inherit base)
1257 (arguments
1258 `(,@(package-arguments base)
1259 #:phases
1260 (modify-phases %standard-phases
1261 (add-before 'check 'delete-failing-test
1262 (λ _
1263 ;; XXX: This fails due to Unicode issues unique to Python 2,
1264 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1265 (delete-file "test/test_Script.py")
1266 #t))))))))
1267
1268 (define-public python2-dogtail
1269 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1270 ;; spaces in indentation" with Python 3.
1271 (package
1272 (name "python2-dogtail")
1273 (version "0.9.9")
1274 (source (origin
1275 (method url-fetch)
1276 (uri (pypi-uri "dogtail" version))
1277 (sha256
1278 (base32
1279 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1280 (build-system python-build-system)
1281 (arguments `(#:python ,python-2
1282 #:tests? #f)) ; invalid command "test"
1283 ;; Currently no offical homepage.
1284 (home-page "https://pypi.python.org/pypi/dogtail/")
1285 (synopsis "GUI test tool and automation framework written in Python")
1286 (description
1287 "Dogtail is a GUI test tool and automation framework written in Python.
1288 It uses Accessibility (a11y) technologies to communicate with desktop
1289 applications. dogtail scripts are written in Python and executed like any
1290 other Python program.")
1291 (license license:gpl2+)))
1292
1293 (define-public python-empy
1294 (package
1295 (name "python-empy")
1296 (version "3.3.3")
1297 (source (origin
1298 (method url-fetch)
1299 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1300 version ".tar.gz"))
1301 (sha256
1302 (base32
1303 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
1304 (build-system python-build-system)
1305 (arguments
1306 `(#:tests? #f)) ; python2 only
1307 (home-page "http://www.alcyone.com/software/empy/")
1308 (synopsis "Templating system for Python")
1309 (description
1310 "EmPy is a system for embedding Python expressions and statements in
1311 template text; it takes an EmPy source file, processes it, and produces
1312 output. This is accomplished via expansions, which are special signals to the
1313 EmPy system and are set off by a special prefix (by default the at sign, @@).
1314 EmPy can expand arbitrary Python expressions and statements in this way, as
1315 well as a variety of special forms. Textual data not explicitly delimited in
1316 this way is sent unaffected to the output, allowing Python to be used in
1317 effect as a markup language. Also supported are callbacks via hooks,
1318 recording and playback via diversions, and dynamic, chainable filters. The
1319 system is highly configurable via command line options and embedded
1320 commands.")
1321 (license license:lgpl2.1+)))
1322
1323 (define-public python2-empy
1324 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1325 (package
1326 (inherit base)
1327 (arguments `(,@(package-arguments base)
1328 #:tests? #t)))))
1329
1330 (define-public python2-element-tree
1331 (package
1332 (name "python2-element-tree")
1333 (version "1.2.6")
1334 (source (origin
1335 (method url-fetch)
1336 (uri (string-append
1337 "http://effbot.org/media/downloads/elementtree-"
1338 version "-20050316.tar.gz"))
1339 (sha256
1340 (base32
1341 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1342 (build-system python-build-system)
1343 (arguments
1344 `(#:python ,python-2 ; seems to be part of Python 3
1345 #:tests? #f)) ; no 'test' sub-command
1346 (synopsis "Toolkit for XML processing in Python")
1347 (description
1348 "ElementTree is a Python library supporting lightweight XML processing.")
1349 (home-page "http://effbot.org/zone/element-index.htm")
1350 (license (license:x11-style
1351 "http://docs.python.org/2/license.html"
1352 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1353
1354 (define-public python2-pybugz
1355 (package
1356 (name "python2-pybugz")
1357 (version "0.6.11")
1358 (source (origin
1359 (method url-fetch)
1360 (uri (string-append
1361 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1362 version ".tar.gz"))
1363 (sha256
1364 (base32
1365 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1366 (patches (search-patches "pybugz-stty.patch"
1367 "pybugz-encode-error.patch"))))
1368 (build-system python-build-system)
1369 (arguments
1370 `(#:python ,python-2 ; SyntaxError with Python 3
1371 #:tests? #f)) ; no 'test' sub-command
1372 (propagated-inputs
1373 `(("element-tree" ,python2-element-tree)))
1374 (synopsis "Python and command-line interface to Bugzilla")
1375 (description
1376 "PyBugz is a Python library and command-line tool to query the Bugzilla
1377 bug tracking system. It is meant as an aid to speed up interaction with the
1378 bug tracker.")
1379 (home-page "http://www.liquidx.net/pybugz/")
1380 (license license:gpl2)))
1381
1382 (define-public python2-enum
1383 (package
1384 (name "python2-enum")
1385 (version "0.4.6")
1386 (source (origin
1387 (method url-fetch)
1388 (uri (pypi-uri "enum" version))
1389 (sha256
1390 (base32
1391 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1392 (build-system python-build-system)
1393 (arguments
1394 `(#:python ,python-2))
1395 (home-page "http://pypi.python.org/pypi/enum/")
1396 (synopsis "Robust enumerated type support in Python")
1397 (description
1398 "This provides a module for robust enumerations in Python. It has
1399 been superseded by the Python standard library and is provided only for
1400 compatibility.")
1401 ;; Choice of either license.
1402 (license (list license:gpl3+ license:psfl))))
1403
1404 (define-public python-enum34
1405 (package
1406 (name "python-enum34")
1407 (version "1.1.6")
1408 (source
1409 (origin
1410 (method url-fetch)
1411 (uri (pypi-uri "enum34" version))
1412 (sha256
1413 (base32
1414 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1415 (build-system python-build-system)
1416 (home-page "https://pypi.python.org/pypi/enum34")
1417 (synopsis "Backported Python 3.4 Enum")
1418 (description
1419 "Enum34 is the new Python stdlib enum module available in Python 3.4
1420 backported for previous versions of Python from 2.4 to 3.3.")
1421 (license license:bsd-3)))
1422
1423 (define-public python2-enum34
1424 (package-with-python2 python-enum34))
1425
1426 (define-public python-parse-type
1427 (package
1428 (name "python-parse-type")
1429 (version "0.4.2")
1430 (source
1431 (origin
1432 (method url-fetch)
1433 (uri (pypi-uri "parse_type" version))
1434 (sha256
1435 (base32
1436 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1437 (build-system python-build-system)
1438 (propagated-inputs
1439 `(("python-six" ,python-six)
1440 ("python-parse" ,python-parse)))
1441 (native-inputs
1442 `(("python-pytest" ,python-pytest)
1443 ("python-pytest-runner" ,python-pytest-runner)))
1444 (home-page "https://github.com/jenisys/parse_type")
1445 (synopsis "Extended parse module")
1446 (description
1447 "Parse_type extends the python parse module.")
1448 (properties
1449 `((python2-variant . ,(delay python2-parse-type))))
1450 (license license:bsd-3)))
1451
1452 (define-public python2-parse-type
1453 (let ((base (package-with-python2
1454 (strip-python2-variant python-parse-type))))
1455 (package (inherit base)
1456 (propagated-inputs
1457 `(("python2-enum34" ,python2-enum34)
1458 ,@(package-propagated-inputs base))))))
1459
1460 (define-public python-parse
1461 (package
1462 (name "python-parse")
1463 (version "1.8.4")
1464 (source
1465 (origin
1466 (method url-fetch)
1467 (uri (pypi-uri "parse" version))
1468 (sha256
1469 (base32
1470 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1471 (build-system python-build-system)
1472 (arguments
1473 `(#:phases
1474 (modify-phases %standard-phases
1475 (replace 'check
1476 (lambda _ (invoke "python" "test_parse.py"))))))
1477 (home-page "https://github.com/r1chardj0n3s/parse")
1478 (synopsis "Parse strings")
1479 (description
1480 "Parse strings using a specification based on the Python @code{format()}
1481 syntax.")
1482 (license license:x11)))
1483
1484 (define-public python-polib
1485 (package
1486 (name "python-polib")
1487 (version "1.0.8")
1488 (source (origin
1489 (method url-fetch)
1490 (uri (pypi-uri "polib" version))
1491 (sha256
1492 (base32
1493 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1494 (build-system python-build-system)
1495 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1496 (synopsis "Manipulate, create and modify gettext files")
1497 (description "Polib can manipulate any gettext format (po, pot and mo)
1498 files. It can be used to create po files from scratch or to modify
1499 existing ones.")
1500 (license license:expat)))
1501
1502 (define-public python2-polib
1503 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1504 (package
1505 (inherit base)
1506 (arguments `(,@(package-arguments base)
1507 ;; Tests don't work with python2.
1508 #:tests? #f)))))
1509
1510 (define-public python-poyo
1511 (package
1512 (name "python-poyo")
1513 (version "0.5.0")
1514 (source
1515 (origin
1516 (method url-fetch)
1517 (uri (pypi-uri "poyo" version))
1518 (sha256
1519 (base32
1520 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
1521 (build-system python-build-system)
1522 (home-page "https://github.com/hackebrot/poyo")
1523 (synopsis "Lightweight YAML Parser for Python")
1524 (description
1525 "This package provides a lightweight YAML Parser for Python. It supports
1526 only a chosen subset of the YAML format that is required to parse cookiecutter
1527 user configuration files. It does not have support for serializing into YAML
1528 and is not compatible with JSON.")
1529 (license license:expat)))
1530
1531 (define-public scons
1532 (package
1533 (name "scons")
1534 (version "3.0.4")
1535 (source (origin
1536 (method git-fetch)
1537 (uri (git-reference
1538 (url "https://github.com/SCons/scons.git")
1539 (commit version)))
1540 (file-name (git-file-name name version))
1541 (sha256
1542 (base32
1543 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
1544 (build-system python-build-system)
1545 (arguments
1546 `(#:use-setuptools? #f ; still relies on distutils
1547 #:tests? #f ; no 'python setup.py test' command
1548 #:phases
1549 (modify-phases %standard-phases
1550 (add-before 'build 'bootstrap
1551 (lambda _
1552 (substitute* "src/engine/SCons/compat/__init__.py"
1553 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1554 "sys.modules[new] = __import__(old)"))
1555 (substitute* "src/engine/SCons/Platform/__init__.py"
1556 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1557 "mod = __import__(full_name)"))
1558 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1559 (chdir "build/scons")
1560 #t)))))
1561 (home-page "http://scons.org/")
1562 (synopsis "Software construction tool written in Python")
1563 (description
1564 "SCons is a software construction tool. Think of SCons as an improved,
1565 cross-platform substitute for the classic Make utility with integrated
1566 functionality similar to autoconf/automake and compiler caches such as ccache.
1567 In short, SCons is an easier, more reliable and faster way to build
1568 software.")
1569 (license license:x11)))
1570
1571 (define-public scons-python2
1572 (package
1573 (inherit (package-with-python2 scons))
1574 (name "scons-python2")))
1575
1576 (define-public python-extras
1577 (package
1578 (name "python-extras")
1579 (version "1.0.0")
1580 (source
1581 (origin
1582 (method url-fetch)
1583 (uri (pypi-uri "extras" version))
1584 (sha256
1585 (base32
1586 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1587 (build-system python-build-system)
1588 (arguments
1589 ;; FIXME: Circular dependency on testtools.
1590 '(#:tests? #f))
1591 (home-page "https://github.com/testing-cabal/extras")
1592 (synopsis "Useful extensions to the Python standard library")
1593 (description
1594 "Extras is a set of extensions to the Python standard library.")
1595 (license license:expat)))
1596
1597 (define-public python2-extras
1598 (package-with-python2 python-extras))
1599
1600 (define-public python-mimeparse
1601 (package
1602 (name "python-mimeparse")
1603 (version "1.6.0")
1604 (source
1605 (origin
1606 (method url-fetch)
1607 (uri (pypi-uri "python-mimeparse" version))
1608 (sha256
1609 (base32
1610 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1611 (build-system python-build-system)
1612 (arguments
1613 '(#:phases
1614 (modify-phases %standard-phases
1615 (replace 'check
1616 (lambda _
1617 (invoke "./mimeparse_test.py"))))))
1618 (home-page
1619 "https://github.com/dbtsai/python-mimeparse")
1620 (synopsis "Python library for parsing MIME types")
1621 (description
1622 "Mimeparse provides basic functions for parsing MIME type names and
1623 matching them against a list of media-ranges.")
1624 (license license:expat)))
1625
1626 (define-public python2-mimeparse
1627 (package-with-python2 python-mimeparse))
1628
1629 (define-public python-miniboa
1630 (package
1631 (name "python-miniboa")
1632 (version "1.0.7")
1633 (source
1634 (origin
1635 (method url-fetch)
1636 (uri (pypi-uri "miniboa" version))
1637 (sha256
1638 (base32
1639 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1640 (build-system python-build-system)
1641 (home-page "https://github.com/shmup/miniboa")
1642 (synopsis "Simple, single-threaded Telnet server")
1643 (description
1644 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1645 server.")
1646 (license license:asl2.0)))
1647
1648 (define-public python2-miniboa
1649 (package-with-python2 python-miniboa))
1650
1651 (define-public python-pafy
1652 (package
1653 (name "python-pafy")
1654 (version "0.5.3.1")
1655 (source
1656 (origin
1657 (method url-fetch)
1658 (uri (pypi-uri "pafy" version))
1659 (sha256
1660 (base32
1661 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1662 (build-system python-build-system)
1663 (arguments
1664 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1665 (propagated-inputs
1666 ;; Youtube-dl is a python package which is imported in the file
1667 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1668 `(("youtube-dl" ,youtube-dl)))
1669 (home-page "https://np1.github.io/pafy/")
1670 (synopsis "Retrieve YouTube content and metadata")
1671 (description
1672 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1673 (license license:lgpl3+)))
1674
1675 (define-public python2-funcsigs
1676 (package
1677 (name "python2-funcsigs")
1678 (version "1.0.2")
1679 (source (origin
1680 (method url-fetch)
1681 (uri (pypi-uri "funcsigs" version))
1682 (sha256
1683 (base32
1684 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1685 (build-system python-build-system)
1686 (arguments
1687 `(#:python ,python-2))
1688 (native-inputs
1689 `(("python2-unittest2" ,python2-unittest2)))
1690 (home-page "http://funcsigs.readthedocs.org")
1691 (synopsis "Python function signatures from PEP362")
1692 (description
1693 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1694 (license license:asl2.0)))
1695
1696 (define-public python2-funcsigs-bootstrap
1697 (package
1698 (inherit python2-funcsigs)
1699 (name "python2-funcsigs-bootstrap")
1700 (native-inputs `())
1701 (arguments
1702 `(#:tests? #f
1703 ,@(package-arguments python2-funcsigs)))))
1704
1705 (define-public python-py
1706 (package
1707 (name "python-py")
1708 (version "1.8.0")
1709 (source
1710 (origin
1711 (method url-fetch)
1712 (uri (pypi-uri "py" version))
1713 (sha256
1714 (base32
1715 "0lsy1gajva083pzc7csj1cvbmminb7b4l6a0prdzyb3fd829nqyw"))))
1716 (build-system python-build-system)
1717 (arguments
1718 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1719 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1720 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1721 ;; Is this module globally installed?"
1722 '(#:tests? #f))
1723 (native-inputs
1724 `(("python-setuptools-scm" ,python-setuptools-scm)))
1725 (home-page "https://github.com/pytest-dev/py")
1726 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1727 (description
1728 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1729 code introspection, and logging.")
1730 (license license:expat)))
1731
1732 (define-public python2-py
1733 (package-with-python2 python-py))
1734
1735 ;; Recent versions of python-fixtures and python-testrepository need
1736 ;; python-pbr for packaging, which itself needs these two packages for
1737 ;; testing.
1738 ;; To fix this circular dependency, we use a build of python-pbr, based on the
1739 ;; same source, just without any test dependencies and with tests disabled.
1740 ;; python-pbr-minmal is then used to package python-fixtures and
1741 ;; python-testrepository.
1742 ;; Strictly speaking we currently could remove the test-requirements from the
1743 ;; normal python-pbr package (and save this package) since test are disabled
1744 ;; there anyway. But this may change in future.
1745 (define-public python-pbr-minimal
1746 (package
1747 (name "python-pbr-minimal")
1748 (version "3.0.1")
1749 (source
1750 (origin
1751 (method url-fetch)
1752 (uri (pypi-uri "pbr" version))
1753 (sha256
1754 (base32
1755 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1756 (build-system python-build-system)
1757 (arguments
1758 `(#:tests? #f))
1759 (home-page "http://docs.openstack.org/developer/pbr/")
1760 (synopsis "Minimal build of python-pbr used for bootstrapping")
1761 (description
1762 "Used only for bootstrapping python2-pbr, you should not need this.")
1763 (license license:asl2.0)))
1764
1765 (define-public python2-pbr-minimal
1766 (package-with-python2 python-pbr-minimal))
1767
1768 (define-public python-pbr
1769 (package
1770 (inherit python-pbr-minimal)
1771 (name "python-pbr")
1772 (arguments
1773 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1774 (propagated-inputs
1775 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1776 (native-inputs
1777 `(("python-fixtures" ,python-fixtures-bootstrap)
1778 ;; discover, coverage, hacking, subunit
1779 ("python-mock" ,python-mock)
1780 ("python-six" ,python-six)
1781 ("python-sphinx" ,python-sphinx)
1782 ("python-testrepository" ,python-testrepository-bootstrap)
1783 ("python-testresources" ,python-testresources-bootstrap)
1784 ("python-testscenarios" ,python-testscenarios-bootstrap)
1785 ("python-testtools" ,python-testtools-bootstrap)
1786 ("python-virtualenv" ,python-virtualenv)))
1787 (synopsis "Enhance the default behavior of Python’s setuptools")
1788 (description
1789 "Python Build Reasonableness (PBR) is a library that injects some useful
1790 and sensible default behaviors into your setuptools run. It will set
1791 versions, process requirements files and generate AUTHORS and ChangeLog file
1792 from git information.
1793 ")))
1794
1795 (define-public python2-pbr
1796 (package-with-python2 python-pbr))
1797
1798 (define-public python-pyrsistent
1799 (package
1800 (name "python-pyrsistent")
1801 (version "0.14.11")
1802 (home-page "https://github.com/tobgu/pyrsistent")
1803 (source (origin
1804 (method url-fetch)
1805 (uri (pypi-uri "pyrsistent" version))
1806 (sha256
1807 (base32
1808 "1qkh74bm296mp5g3r11lgsksr6bh4w1bf8pji4nmxdlfj542ga1w"))))
1809 (build-system python-build-system)
1810 (native-inputs
1811 `(("python-hypothesis" ,python-hypothesis)
1812 ("python-pytest" ,python-pytest)
1813 ("python-pytest-runner" ,python-pytest-runner)))
1814 (propagated-inputs
1815 `(("python-six" ,python-six)))
1816 (synopsis "Persistent data structures for Python")
1817 (description
1818 "Pyrsistent is a number of persistent collections (by some referred to as
1819 functional data structures). Persistent in the sense that they are immutable.
1820
1821 All methods on a data structure that would normally mutate it instead return a
1822 new copy of the structure containing the requested updates. The original
1823 structure is left untouched.")
1824 (license license:expat)))
1825
1826 (define-public python2-pyrsistent
1827 (package-with-python2 python-pyrsistent))
1828
1829 (define-public python-exif-read
1830 (package
1831 (name "python-exif-read")
1832 (version "2.1.2")
1833 (source (origin
1834 (method url-fetch)
1835 (uri (pypi-uri "ExifRead" version))
1836 (sha256
1837 (base32
1838 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1839 (build-system python-build-system)
1840 (arguments `(#:tests? #f)) ; no tests
1841 (home-page "https://github.com/ianare/exif-py")
1842 (synopsis "Python library to extract EXIF data from image files")
1843 (description
1844 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1845 files.")
1846 (license license:bsd-3)))
1847
1848 (define-public python2-exif-read
1849 (package-with-python2 python-exif-read))
1850
1851 (define-public python-pyld
1852 (package
1853 (name "python-pyld")
1854 (version "1.0.5")
1855 (source (origin
1856 (method url-fetch)
1857 (uri (pypi-uri "PyLD" version))
1858 (sha256
1859 (base32
1860 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
1861 (build-system python-build-system)
1862 (home-page "https://github.com/digitalbazaar/pyld")
1863 (synopsis "Python implementation of the JSON-LD specification")
1864 (description
1865 "PyLD is an implementation of the JSON-LD specification.")
1866 (license license:bsd-3)))
1867
1868 (define-public python2-pyld
1869 (package-with-python2 python-pyld))
1870
1871 (define-public python-click
1872 (package
1873 (name "python-click")
1874 (version "7.0")
1875 (source
1876 (origin
1877 (method url-fetch)
1878 (uri (pypi-uri "click" version))
1879 (sha256
1880 (base32
1881 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
1882 (build-system python-build-system)
1883 (arguments
1884 `(#:phases
1885 (modify-phases %standard-phases
1886 (add-after 'unpack 'fix-paths
1887 (lambda* (#:key inputs #:allow-other-keys)
1888 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1889 "cross-libc" "libc"))))
1890 (substitute* "click/_unicodefun.py"
1891 (("'locale'")
1892 (string-append "'" glibc "/bin/locale'"))))
1893 #t))
1894 (replace 'check
1895 (lambda _
1896 (invoke "python" "-m" "pytest"))))))
1897 (native-inputs
1898 `(("python-pytest" ,python-pytest)))
1899 (home-page "https://palletsprojects.com/p/click/")
1900 (synopsis "Command line library for Python")
1901 (description
1902 "Click is a Python package for creating command line interfaces in a
1903 composable way with as little code as necessary. Its name stands for
1904 \"Command Line Interface Creation Kit\". It's highly configurable but comes
1905 with sensible defaults out of the box.")
1906 (license license:bsd-3)))
1907
1908 (define-public python2-click
1909 (package-with-python2 python-click))
1910
1911 (define-public python-wheel
1912 (package
1913 (name "python-wheel")
1914 (version "0.33.6")
1915 (source
1916 (origin
1917 (method url-fetch)
1918 (uri (pypi-uri "wheel" version))
1919 (sha256
1920 (base32
1921 "0ii6f34rvpjg3nmw4bc2h7fhdsy38y1h93hghncfs5akfrldmj8h"))))
1922 (build-system python-build-system)
1923 (arguments
1924 ;; FIXME: The test suite runs "python setup.py bdist_wheel", which in turn
1925 ;; fails to find the newly-built bdist_wheel library, even though it is
1926 ;; available on PYTHONPATH. What search path is consulted by setup.py?
1927 '(#:tests? #f))
1928 (home-page "https://bitbucket.org/pypa/wheel/")
1929 (synopsis "Format for built Python packages")
1930 (description
1931 "A wheel is a ZIP-format archive with a specially formatted filename and
1932 the @code{.whl} extension. It is designed to contain all the files for a PEP
1933 376 compatible install in a way that is very close to the on-disk format. Many
1934 packages will be properly installed with only the @code{Unpack} step and the
1935 unpacked archive preserves enough information to @code{Spread} (copy data and
1936 scripts to their final locations) at any later time. Wheel files can be
1937 installed with a newer @code{pip} or with wheel's own command line utility.")
1938 (license license:expat)))
1939
1940 (define-public python2-wheel
1941 (package-with-python2 python-wheel))
1942
1943 (define-public python-vcversioner
1944 (package
1945 (name "python-vcversioner")
1946 (version "2.16.0.0")
1947 (source
1948 (origin
1949 (method url-fetch)
1950 (uri (pypi-uri "vcversioner" version))
1951 (sha256
1952 (base32
1953 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1954 (build-system python-build-system)
1955 (synopsis "Python library for version number discovery")
1956 (description "Vcversioner is a Python library that inspects tagging
1957 information in a variety of version control systems in order to discover
1958 version numbers.")
1959 (home-page "https://github.com/habnabit/vcversioner")
1960 (license license:isc)))
1961
1962 (define-public python2-vcversioner
1963 (package-with-python2 python-vcversioner))
1964
1965 (define-public python-jdcal
1966 (package
1967 (name "python-jdcal")
1968 (version "1.4")
1969 (source
1970 (origin
1971 (method url-fetch)
1972 (uri (pypi-uri "jdcal" version))
1973 (sha256
1974 (base32
1975 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
1976 (build-system python-build-system)
1977 (arguments
1978 `(#:phases (modify-phases %standard-phases
1979 (replace 'check
1980 (lambda _
1981 (invoke "pytest"))))))
1982 (native-inputs
1983 `(("python-pytest" ,python-pytest)))
1984 (home-page "https://github.com/phn/jdcal")
1985 (synopsis "Functions to convert between Julian dates Gregorian dates")
1986 (description "This Python library provides functions for converting
1987 between Julian dates and Gregorian dates.")
1988 (license license:bsd-2)))
1989
1990 (define-public python2-jdcal
1991 (package-with-python2 python-jdcal))
1992
1993 (define-public python-jsondiff
1994 (package
1995 (name "python-jsondiff")
1996 (version "1.2.0")
1997 (source
1998 (origin
1999 (method url-fetch)
2000 (uri (pypi-uri "jsondiff" version))
2001 (sha256
2002 (base32
2003 "00v3689175aqzdscrxpffm712ylp8jvcpqdg51ca22ni6721p51l"))))
2004 (build-system python-build-system)
2005 (native-inputs
2006 `(("python-nose" ,python-nose)
2007 ("python-nose-random" ,python-nose-random)))
2008 (home-page
2009 "https://github.com/fzumstein/jsondiff")
2010 (synopsis "Compare JSON and JSON-like structures in Python")
2011 (description "@code{jsondiff} is a Python library which lets you
2012 compare, diff, and patch JSON and JSON-like structures in Python.")
2013 (license license:expat)))
2014
2015 (define-public python-jsonschema
2016 (package
2017 (name "python-jsonschema")
2018 (version "3.0.1")
2019 (source (origin
2020 (method url-fetch)
2021 (uri (pypi-uri "jsonschema" version))
2022 (sha256
2023 (base32
2024 "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc"))))
2025 (build-system python-build-system)
2026 (arguments
2027 '(#:phases
2028 (modify-phases %standard-phases
2029 (replace 'check
2030 (lambda _
2031 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2032 (invoke "trial" "jsonschema"))))))
2033 (native-inputs
2034 `(("python-setuptools_scm" ,python-setuptools-scm)
2035 ("python-twisted" ,python-twisted)))
2036 (propagated-inputs
2037 `(("python-attrs" ,python-attrs)
2038 ("python-pyrsistent" ,python-pyrsistent)
2039 ("python-six" ,python-six)))
2040 (home-page "https://github.com/Julian/jsonschema")
2041 (synopsis "Implementation of JSON Schema for Python")
2042 (description
2043 "Jsonschema is an implementation of JSON Schema for Python.")
2044 (license license:expat)
2045 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2046
2047 (define-public python2-jsonschema
2048 (let ((jsonschema (package-with-python2
2049 (strip-python2-variant python-jsonschema))))
2050 (package (inherit jsonschema)
2051 (propagated-inputs
2052 `(("python2-functools32" ,python2-functools32)
2053 ,@(package-propagated-inputs jsonschema))))))
2054
2055 ;; This old version is still required by docker-compose as of 1.24.0.
2056 (define-public python-jsonschema-2.6
2057 (package
2058 (name "python-jsonschema")
2059 (version "2.6.0")
2060 (source (origin
2061 (method url-fetch)
2062 (uri (pypi-uri "jsonschema" version))
2063 (sha256
2064 (base32
2065 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
2066 (build-system python-build-system)
2067 (arguments
2068 '(#:phases
2069 (modify-phases %standard-phases
2070 (replace 'check (lambda _ (invoke "nosetests"))))))
2071 (native-inputs
2072 `(("python-nose" ,python-nose)
2073 ("python-vcversioner" ,python-vcversioner)))
2074 (home-page "https://github.com/Julian/jsonschema")
2075 (synopsis "Implementation of JSON Schema for Python")
2076 (description
2077 "Jsonschema is an implementation of JSON Schema for Python.")
2078 (license license:expat)
2079 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2080
2081 (define-public python-schema
2082 (package
2083 (name "python-schema")
2084 (version "0.6.6")
2085 (source
2086 (origin
2087 (method url-fetch)
2088 (uri (pypi-uri "schema" version))
2089 (sha256
2090 (base32
2091 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2092 (build-system python-build-system)
2093 (native-inputs
2094 `(("python-pytest" ,python-pytest)))
2095 (home-page "https://github.com/keleshev/schema")
2096 (synopsis "Simple data validation library")
2097 (description
2098 "@code{python-schema} is a library for validating Python data
2099 structures, such as those obtained from config-files, forms, external
2100 services or command-line parsing, converted from JSON/YAML (or
2101 something else) to Python data-types.")
2102 (license license:psfl)))
2103
2104 (define-public python2-schema
2105 (package-with-python2 python-schema))
2106
2107 (define-public python-schema-0.5
2108 (package (inherit python-schema)
2109 (version "0.5.0")
2110 (source
2111 (origin
2112 (method url-fetch)
2113 (uri (pypi-uri "schema" version))
2114 (sha256
2115 (base32
2116 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2117
2118 (define-public python2-schema-0.5
2119 (package-with-python2 python-schema-0.5))
2120
2121 (define-public python-kitchen
2122 (package
2123 (name "python-kitchen")
2124 (version "1.2.5")
2125 (source
2126 (origin
2127 (method url-fetch)
2128 (uri (pypi-uri "kitchen" version))
2129 (sha256
2130 (base32
2131 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2132 (build-system python-build-system)
2133 (propagated-inputs
2134 `(("python-chardet" ,python-chardet)))
2135 (home-page "https://github.com/fedora-infra/kitchen")
2136 (synopsis "Python API for snippets")
2137 (description "@code{kitchen} module provides a python API for all sorts of
2138 little useful snippets of code that everybody ends up writing for their projects
2139 but never seem big enough to build an independent release. Use kitchen and stop
2140 cutting and pasting that code over and over.")
2141 (license (list license:lgpl2.1+
2142 ;; subprocess.py, test_subprocess.py,
2143 ;; kitchen/pycompat25/defaultdict.py:
2144 license:psfl))))
2145
2146 (define-public python2-kitchen
2147 (package-with-python2 python-kitchen))
2148
2149 (define-public python-unidecode
2150 (package
2151 (name "python-unidecode")
2152 (version "1.1.1")
2153 (source (origin
2154 (method url-fetch)
2155 (uri (pypi-uri "Unidecode" version))
2156 (sha256
2157 (base32
2158 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
2159 (build-system python-build-system)
2160 (home-page "https://pypi.python.org/pypi/Unidecode")
2161 (synopsis "ASCII transliterations of Unicode text")
2162 (description
2163 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2164 useful when integrating with legacy code that doesn't support Unicode, or for
2165 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2166 machine identifiers from human-readable Unicode strings that should still be
2167 somewhat intelligible.")
2168 (license license:gpl2+)))
2169
2170 (define-public python2-unidecode
2171 (package-with-python2 python-unidecode))
2172
2173 (define-public python-pyjwt
2174 (package
2175 (name "python-pyjwt")
2176 (version "1.7.1")
2177 (source
2178 (origin
2179 (method url-fetch)
2180 (uri (pypi-uri "PyJWT" version))
2181 (sha256
2182 (base32
2183 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
2184 (modules '((guix build utils)))
2185 (snippet
2186 '(begin
2187 (for-each delete-file-recursively
2188 (find-files "." "\\.pyc$"))
2189 #t))))
2190 (build-system python-build-system)
2191 (native-inputs
2192 `(("python-pytest" ,python-pytest)
2193 ("python-pytest-cov" ,python-pytest-cov)
2194 ("python-pytest-runner" ,python-pytest-runner)))
2195 (home-page "https://github.com/progrium/pyjwt")
2196 (synopsis "JSON Web Token implementation in Python")
2197 (description
2198 "PyJWT is a JSON Web Token implementation written in Python.")
2199 (license license:expat)))
2200
2201 (define-public python2-pyjwt
2202 (package-with-python2 python-pyjwt))
2203
2204 (define-public python-pykka
2205 (package
2206 (name "python-pykka")
2207 (version "1.2.1")
2208 (source
2209 (origin
2210 (method url-fetch)
2211 (uri (pypi-uri "Pykka" version))
2212 (sha256
2213 (base32
2214 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2215 (build-system python-build-system)
2216 (native-inputs
2217 `(("python-mock" ,python-mock)
2218 ("python-nose" ,python-nose)
2219 ("python-gevent" ,python-gevent)
2220 ("python-eventlet" ,python-eventlet)))
2221 (home-page "https://www.pykka.org/")
2222 (synopsis "Pykka is a Python implementation of the actor model")
2223 (description
2224 "Pykka is a Python implementation of the actor model.
2225 The actor model introduces some simple rules to control the sharing
2226 of state and cooperation between execution units, which makes it
2227 easier to build concurrent applications.")
2228 (license license:asl2.0)))
2229
2230 (define-public python2-pykka
2231 (package-with-python2 python-pykka))
2232
2233 (define-public python-pymsgbox
2234 (package
2235 (name "python-pymsgbox")
2236 (version "1.0.6")
2237 (source
2238 (origin
2239 (method git-fetch)
2240 (uri (git-reference
2241 ;; LICENSE.txt is not present on pypi
2242 (url "https://github.com/asweigart/PyMsgBox")
2243 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2244 (file-name (git-file-name name version))
2245 (sha256
2246 (base32
2247 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2248 (arguments
2249 ;; Circular dependency to run tests:
2250 ;; Tests need pyautogui, which depends on pymsgbox.
2251 '(#:tests? #f))
2252 (build-system python-build-system)
2253 (home-page "https://github.com/asweigart/PyMsgBox")
2254 (synopsis "Python module for JavaScript-like message boxes")
2255 (description
2256 "PyMsgBox is a simple, cross-platform, pure Python module for
2257 JavaScript-like message boxes. Types of dialog boxes include:
2258 @enumerate
2259 @item alert
2260 @item confirm
2261 @item prompt
2262 @item password
2263 @end enumerate
2264 ")
2265 (license license:bsd-3)))
2266
2267 (define-public python-pympler
2268 (package
2269 (name "python-pympler")
2270 (home-page "https://pythonhosted.org/Pympler/")
2271 (version "0.8")
2272 (source (origin
2273 (method url-fetch)
2274 (uri (pypi-uri "Pympler" version))
2275 (sha256
2276 (base32
2277 "08mrpnb6cv2nvfncvr8a9a8bpwhnasa924anapnjvnaw5jcd4k7p"))))
2278 (build-system python-build-system)
2279 (arguments
2280 `(#:phases (modify-phases %standard-phases
2281 (delete 'check)
2282 (add-after 'install 'check
2283 (lambda* (#:key inputs outputs #:allow-other-keys)
2284 (add-installed-pythonpath inputs outputs)
2285 (invoke "python" "setup.py" "test"))))))
2286 (synopsis "Measure, monitor and analyze memory behavior")
2287 (description
2288 "Pympler is a development tool to measure, monitor and analyze
2289 the memory behavior of Python objects in a running Python application.
2290
2291 By pympling a Python application, detailed insight in the size and the
2292 lifetime of Python objects can be obtained. Undesirable or unexpected
2293 runtime behavior like memory bloat and other @samp{pymples} can easily
2294 be identified.
2295
2296 A web profiling frontend exposes process statistics, garbage
2297 visualisation and class tracker statistics.")
2298 (license license:asl2.0)))
2299
2300 (define-public python2-pympler
2301 (package-with-python2 python-pympler))
2302
2303 (define-public python-itsdangerous
2304 (package
2305 (name "python-itsdangerous")
2306 (version "1.1.0")
2307 (source
2308 (origin
2309 (method url-fetch)
2310 (uri (pypi-uri "itsdangerous" version))
2311 (sha256
2312 (base32
2313 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
2314 (build-system python-build-system)
2315 (home-page "https://palletsprojects.com/p/itsdangerous/")
2316 (synopsis "Python library for passing data to/from untrusted environments")
2317 (description
2318 "Itsdangerous provides various helpers to pass trusted data to untrusted
2319 environments and back.")
2320 (license license:bsd-3)))
2321
2322 (define-public python2-itsdangerous
2323 (package-with-python2 python-itsdangerous))
2324
2325 (define-public python-pyyaml
2326 (package
2327 (name "python-pyyaml")
2328 (version "3.13")
2329 (source
2330 (origin
2331 (method url-fetch)
2332 (uri (pypi-uri "PyYAML" version))
2333 (sha256
2334 (base32
2335 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2336 (build-system python-build-system)
2337 (inputs
2338 `(("libyaml" ,libyaml)))
2339 (home-page "http://pyyaml.org/wiki/PyYAML")
2340 (synopsis "YAML parser and emitter for Python")
2341 (description
2342 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2343 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2344 API, and sensible error messages. PyYAML supports standard YAML tags and
2345 provides Python-specific tags that allow to represent an arbitrary Python
2346 object.")
2347 (license license:expat)))
2348
2349 (define-public python2-pyyaml
2350 (package-with-python2 python-pyyaml))
2351
2352 (define-public python-vine
2353 (package
2354 (name "python-vine")
2355 (version "1.1.4")
2356 (source
2357 (origin
2358 (method url-fetch)
2359 (uri (pypi-uri "vine" version))
2360 (sha256
2361 (base32
2362 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2363 (build-system python-build-system)
2364 (native-inputs
2365 `(("python-pytest" ,python-pytest)
2366 ("python-case" ,python-case)))
2367 (home-page "https://github.com/celery/vine")
2368 (synopsis "Promises for Python")
2369 (description
2370 "@code{vine} provides a special implementation of promises in that it can
2371 be used both for \"promise of a value\" and lazy evaluation. The biggest
2372 upside for this is that everything in a promise can also be a promise,
2373 e.g. filters, callbacks and errbacks can all be promises.")
2374 (license license:bsd-3)))
2375
2376 (define-public python-virtualenv
2377 (package
2378 (name "python-virtualenv")
2379 (version "16.1.0")
2380 (source
2381 (origin
2382 (method url-fetch)
2383 (uri (pypi-uri "virtualenv" version))
2384 (sha256
2385 (base32
2386 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
2387 (build-system python-build-system)
2388 (arguments
2389 `(#:phases
2390 (modify-phases %standard-phases
2391 (add-before 'check 'disable-failing-test
2392 (lambda _
2393 ;; Disable failing test. See upstream bug report
2394 ;; https://github.com/pypa/virtualenv/issues/957
2395 (substitute* "tests/test_virtualenv.py"
2396 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2397 #t)))))
2398 (native-inputs
2399 `(("python-mock" ,python-mock)
2400 ("python-pytest" ,python-pytest)))
2401 (home-page "https://virtualenv.pypa.io/")
2402 (synopsis "Virtual Python environment builder")
2403 (description
2404 "Virtualenv is a tool to create isolated Python environments.")
2405 (license license:expat)))
2406
2407 (define-public python2-virtualenv
2408 (package-with-python2 python-virtualenv))
2409
2410 (define-public python-markupsafe
2411 (package
2412 (name "python-markupsafe")
2413 (version "1.1.1")
2414 (source
2415 (origin
2416 (method url-fetch)
2417 (uri (pypi-uri "MarkupSafe" version))
2418 (sha256
2419 (base32
2420 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
2421 (build-system python-build-system)
2422 (arguments
2423 `(#:modules ((ice-9 ftw)
2424 (srfi srfi-1)
2425 (srfi srfi-26)
2426 (guix build utils)
2427 (guix build python-build-system))
2428 #:phases (modify-phases %standard-phases
2429 (replace 'check
2430 (lambda _
2431 (let ((cwd (getcwd))
2432 (libdir (find (cut string-prefix? "lib." <>)
2433 (scandir "build"))))
2434 (setenv "PYTHONPATH"
2435 (string-append cwd "/build/" libdir ":"
2436 (getenv "PYTHONPATH")))
2437 (invoke "pytest" "-vv")))))))
2438 (native-inputs
2439 `(("python-pytest" ,python-pytest)))
2440 (home-page "https://github.com/mitsuhiko/markupsafe")
2441 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2442 (description
2443 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2444 for Python.")
2445 (license license:bsd-3)))
2446
2447 (define-public python2-markupsafe
2448 (package-with-python2 python-markupsafe))
2449
2450 (define-public python-jinja2
2451 (package
2452 (name "python-jinja2")
2453 (version "2.10.1")
2454 (source
2455 (origin
2456 (method url-fetch)
2457 (uri (pypi-uri "Jinja2" version))
2458 (sha256
2459 (base32
2460 "04shqrs56aj04ipyqykj512rw2l0zfammvj9krawzxz7xc14yp06"))))
2461 (build-system python-build-system)
2462 (propagated-inputs
2463 `(("python-markupsafe" ,python-markupsafe)))
2464 (home-page "http://jinja.pocoo.org/")
2465 (synopsis "Python template engine")
2466 (description
2467 "Jinja2 is a small but fast and easy to use stand-alone template engine
2468 written in pure Python.")
2469 (license license:bsd-3)))
2470
2471 (define-public python2-jinja2
2472 (package-with-python2 python-jinja2))
2473
2474 (define-public python-jinja2-time
2475 (package
2476 (name "python-jinja2-time")
2477 (version "0.2.0")
2478 (source
2479 (origin
2480 (method url-fetch)
2481 (uri (pypi-uri "jinja2-time" version))
2482 (sha256
2483 (base32
2484 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
2485 (build-system python-build-system)
2486 (propagated-inputs
2487 `(("python-arrow" ,python-arrow)
2488 ("python-jinja2" ,python-jinja2)))
2489 (home-page
2490 "https://github.com/hackebrot/jinja2-time")
2491 (synopsis "Jinja2 Extension for Dates and Times")
2492 (description
2493 "This package provides an extension for the template engine Jinja2. It
2494 adds a 'now' tag providing a convenient access to the arrow.now() API from
2495 templates. A format string can be provided to control the output.")
2496 (license license:expat)))
2497
2498 (define-public python-pystache
2499 (package
2500 (name "python-pystache")
2501 (version "0.5.4")
2502 (source (origin
2503 (method url-fetch)
2504 (uri (pypi-uri "pystache" version))
2505 (sha256
2506 (base32
2507 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2508 (build-system python-build-system)
2509 (arguments
2510 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2511 (home-page "http://defunkt.io/pystache/")
2512 (synopsis "Python logic-less template engine")
2513 (description
2514 "Pystache is a Python implementation of the framework agnostic,
2515 logic-free templating system Mustache.")
2516 (license license:expat)
2517 (properties `((python2-variant . ,(delay python2-pystache))))))
2518
2519 (define-public python2-pystache
2520 (package (inherit (package-with-python2
2521 (strip-python2-variant python-pystache)))
2522 (arguments
2523 `(#:python ,python-2
2524 #:phases
2525 (modify-phases %standard-phases
2526 (replace 'check
2527 (lambda _
2528 (invoke "python" "test_pystache.py"))))))))
2529
2530 (define-public python-joblib
2531 (package
2532 (name "python-joblib")
2533 (version "0.13.0")
2534 (source (origin
2535 (method url-fetch)
2536 (uri (pypi-uri "joblib" version))
2537 (sha256
2538 (base32
2539 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2540 (build-system python-build-system)
2541 (arguments
2542 `(#:phases
2543 (modify-phases %standard-phases
2544 (replace 'check
2545 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2546 (native-inputs
2547 `(("python-pytest" ,python-pytest)))
2548 (home-page "https://joblib.readthedocs.io/")
2549 (synopsis "Using Python functions as pipeline jobs")
2550 (description
2551 "Joblib is a set of tools to provide lightweight pipelining in Python.
2552 In particular, joblib offers: transparent disk-caching of the output values
2553 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2554 logging and tracing of the execution.")
2555 (license license:bsd-3)))
2556
2557 (define-public python2-joblib
2558 (package-with-python2 python-joblib))
2559
2560 (define-public python-daemon
2561 (package
2562 (name "python-daemon")
2563 (version "2.2.3")
2564 (source
2565 (origin
2566 (method url-fetch)
2567 (uri (pypi-uri "python-daemon" version))
2568 (sha256
2569 (base32
2570 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2571 (build-system python-build-system)
2572 (arguments
2573 `(#:phases
2574 (modify-phases %standard-phases
2575 (add-before 'check 'disable-tests
2576 (lambda _
2577 ;; FIXME: Determine why test fails
2578 (substitute* "test/test_daemon.py"
2579 (("test_detaches_process_context")
2580 "skip_test_detaches_process_context"))
2581 #t)))))
2582 (propagated-inputs
2583 `(("python-lockfile" ,python-lockfile)))
2584 (native-inputs
2585 `(("python-unittest2" ,python-unittest2)
2586 ("python-testtools" ,python-testtools)
2587 ("python-testscenarios" ,python-testscenarios)
2588 ("python-mock" ,python-mock)
2589 ("python-docutils" ,python-docutils)))
2590 (home-page "https://pagure.io/python-daemon/")
2591 (synopsis "Python library for making a Unix daemon process")
2592 (description "Python-daemon is a library that assists a Python program to
2593 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2594
2595 This library provides a @code{DaemonContext} class that manages the following
2596 important tasks for becoming a daemon process:
2597 @enumerate
2598 @item Detach the process into its own process group.
2599 @item Set process environment appropriate for running inside a chroot.
2600 @item Renounce suid and sgid privileges.
2601 @item Close all open file descriptors.
2602 @item Change the working directory, uid, gid, and umask.
2603 @item Set appropriate signal handlers.
2604 @item Open new file descriptors for stdin, stdout, and stderr.
2605 @item Manage a specified PID lock file.
2606 @item Register cleanup functions for at-exit processing.
2607 @end enumerate")
2608 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2609 (license (list license:asl2.0 license:gpl3+))))
2610
2611 (define-public python-anytree
2612 (package
2613 (name "python-anytree")
2614 (version "2.8.0")
2615 (source (origin
2616 (method url-fetch)
2617 (uri (pypi-uri "anytree" version))
2618 (sha256
2619 (base32
2620 "1aycpc387wqz7h9w2p53qxn43qsh3m6by6ak4kkc66x9aprr63rz"))))
2621 (build-system python-build-system)
2622 (propagated-inputs
2623 `(("python-six" ,python-six)))
2624 (native-inputs
2625 `(;; For tests.
2626 ("graphviz" ,graphviz) ;for 'dot'
2627 ("python-nose" ,python-nose)))
2628 (home-page "https://github.com/c0fec0de/anytree")
2629 (synopsis "Lightweight tree data library")
2630 (description
2631 "@code{anytree} is a simple, lightweight, and extensible tree data
2632 structure for Python.")
2633 (license license:asl2.0)))
2634
2635 (define-public python-docutils
2636 (package
2637 (name "python-docutils")
2638 (version "0.14")
2639 (source
2640 (origin
2641 (method url-fetch)
2642 (uri (pypi-uri "docutils" version))
2643 (sha256
2644 (base32
2645 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2646 (build-system python-build-system)
2647 (arguments
2648 '(#:tests? #f)) ; no setup.py test command
2649 (home-page "http://docutils.sourceforge.net/")
2650 (synopsis "Python Documentation Utilities")
2651 (description
2652 "Docutils is a modular system for processing documentation into useful
2653 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2654 reStructuredText.")
2655 ;; Most of the source code is public domain, but some source files are
2656 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2657 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2658
2659 (define-public python2-docutils
2660 (package-with-python2 python-docutils))
2661
2662 (define-public python-pygments
2663 (package
2664 (name "python-pygments")
2665 (version "2.5.2")
2666 (source
2667 (origin
2668 (method url-fetch)
2669 (uri (pypi-uri "Pygments" version))
2670 (sha256
2671 (base32
2672 "1zmhnswy0wxfn0xprs9aqsvx2c3kmzfn2wx14q8cv3vpkxdamj4q"))))
2673 (build-system python-build-system)
2674 (arguments
2675 ;; FIXME: Tests require sphinx, which depends on this.
2676 '(#:tests? #f))
2677 (home-page "https://pygments.org/")
2678 (synopsis "Syntax highlighting")
2679 (description
2680 "Pygments is a syntax highlighting package written in Python.")
2681 (license license:bsd-2)))
2682
2683 (define-public python2-pygments
2684 (package-with-python2 python-pygments))
2685
2686 (define-public python-bumpversion
2687 (package
2688 (name "python-bumpversion")
2689 (version "0.5.3")
2690 (source
2691 (origin
2692 (method url-fetch)
2693 (uri (pypi-uri "bumpversion" version))
2694 (sha256
2695 (base32
2696 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
2697 (build-system python-build-system)
2698 (home-page "https://github.com/peritus/bumpversion")
2699 (synopsis "Tool to bump software version")
2700 (description "This tool provides a command-line interface (CLI) to bump a
2701 software version simply.")
2702 (license license:expat)))
2703
2704 (define-public python-deprecated
2705 (package
2706 (name "python-deprecated")
2707 (version "1.2.5")
2708 (source
2709 (origin
2710 (method git-fetch)
2711 (uri (git-reference
2712 (url "https://github.com/tantale/deprecated.git")
2713 (commit (string-append "v" version))))
2714 (file-name (git-file-name name version))
2715 (sha256
2716 (base32
2717 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
2718 (build-system python-build-system)
2719 (arguments
2720 `(#:phases (modify-phases %standard-phases
2721 (replace 'check
2722 (lambda _
2723 (invoke "pytest"))))))
2724 (propagated-inputs
2725 `(("python-wrapt" ,python-wrapt)))
2726 (native-inputs
2727 `(("python-bumpversion" ,python-bumpversion)
2728 ("python-pytest" ,python-pytest)
2729 ("python-pytest-cov" ,python-pytest-cov)
2730 ("python-sphinx" ,python-sphinx)
2731 ("python-tox" ,python-tox)))
2732 (home-page "https://github.com/tantale/deprecated")
2733 (synopsis "Python decorator to deprecate classes, functions or methods")
2734 (description "The @code{deprecated} decorator provides a convenient way to deprecate
2735 to deprecate classes, functions or methods.")
2736 (license license:expat)))
2737
2738 (define-public python-pygithub
2739 (package
2740 (name "python-pygithub")
2741 (version "1.43.8")
2742 (source
2743 ;; We fetch from the Git repo because there are no tests in the PyPI
2744 ;; archive.
2745 (origin
2746 (method git-fetch)
2747 (uri (git-reference
2748 (url "https://github.com/PyGithub/PyGithub.git")
2749 (commit (string-append "v" version))))
2750 (file-name (git-file-name name version))
2751 (sha256
2752 (base32 "1625v558xga5mwhl9jqmibywy5qafmg1vqrirqz6zfq1la1d22mw"))))
2753 (build-system python-build-system)
2754 (arguments
2755 `(#:phases (modify-phases %standard-phases
2756 ;; Some tests rely on the network.
2757 (add-after 'unpack 'disable-failing-tests
2758 (lambda _
2759 (substitute* "tests/Issue142.py"
2760 (("testDecodeJson") "disabled_testDecodeJson"))
2761 #t))
2762 (add-before 'check 'prepare-for-tests
2763 (lambda _
2764 (for-each (lambda (f)
2765 (chmod f #o666))
2766 (find-files "./tests"))
2767 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
2768 (setenv "PYTHONPATH"
2769 (string-append "./tests:" (getenv "PYTHONPATH")))
2770 #t)))))
2771 (propagated-inputs
2772 `(("python-deprecated" ,python-deprecated)
2773 ("python-pyjwt" ,python-pyjwt)
2774 ("python-requests" ,python-requests)))
2775 (native-inputs `(("python-httpretty" ,python-httpretty)))
2776 (home-page "https://pygithub.readthedocs.io/en/latest/")
2777 (synopsis "Python library for the GitHub API")
2778 (description "This library allows managing GitHub resources such as
2779 repositories, user profiles, and organizations in your Python applications,
2780 using version 3 of the GitHub application programming interface (API).")
2781 (license license:lgpl3+)))
2782
2783 (define-public python-rellu
2784 (package
2785 (name "python-rellu")
2786 (version "0.7")
2787 (source
2788 (origin
2789 (method url-fetch)
2790 (uri (pypi-uri "rellu" version))
2791 (sha256
2792 (base32
2793 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
2794 (build-system python-build-system)
2795 (propagated-inputs
2796 `(("python-invoke" ,python-invoke)
2797 ("python-pygithub" ,python-pygithub)))
2798 (home-page "https://github.com/robotframework/rellu")
2799 (synopsis "Utilities to create PyPI releases")
2800 (description "This collection of utilities contains tooling and templates
2801 to assist in creating releases on GitHub and publishing them on PyPI. It is
2802 designed to be used by Robot Framework and tools and libraries in its
2803 ecosystem, but can naturally be used also by other projects.")
2804 (license license:asl2.0)))
2805
2806 (define-public python-robotframework
2807 (package
2808 (name "python-robotframework")
2809 (version "3.1.2")
2810 ;; There are no tests in the PyPI archive.
2811 (source
2812 (origin
2813 (method git-fetch)
2814 (uri (git-reference
2815 (url "https://github.com/robotframework/robotframework.git")
2816 (commit (string-append "v" version))))
2817 (file-name (git-file-name name version))
2818 (sha256
2819 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
2820 (patches (search-patches
2821 "python-robotframework-honor-source-date-epoch.patch"))))
2822 (build-system python-build-system)
2823 (arguments
2824 `(#:phases (modify-phases %standard-phases
2825 (add-before 'build 'build-and-install-doc
2826 (lambda* (#:key outputs #:allow-other-keys)
2827 (let* ((doc-output (assoc-ref outputs "doc"))
2828 (doc (string-append doc-output "/share/"
2829 ,name "-" ,version "/")))
2830 (invoke "invoke" "library-docs" "all")
2831 (mkdir-p doc)
2832 (copy-recursively "doc/libraries"
2833 (string-append doc "/libraries"))
2834 #t)))
2835 (replace 'check
2836 (lambda _
2837 (invoke "python" "utest/run.py"))))))
2838 (native-inputs
2839 `(("python-invoke" ,python-invoke)
2840 ("python-rellu" ,python-rellu)
2841 ("python:tk" ,python "tk"))) ;used when building the HTML doc
2842 (outputs '("out" "doc"))
2843 (home-page "https://robotframework.org")
2844 (synopsis "Generic automation framework")
2845 (description "Robot Framework is a generic automation framework for
2846 acceptance testing, acceptance test driven development (ATDD), and robotic
2847 process automation (RPA).")
2848 (license license:asl2.0)))
2849
2850 (define-public python-robotframework-lint
2851 ;; There is no properly tagged release; the commit below seems to correspond
2852 ;; to the 0.9 stable release available from PyPI. The tests are not
2853 ;; included in the PyPI archive, so we fetch the sources from the upstream
2854 ;; Git repo.
2855 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
2856 (revision "1"))
2857 (package
2858 (name "python-robotframework-lint")
2859 (version (git-version "0.9.0" revision commit))
2860 (source
2861 (origin
2862 (method git-fetch)
2863 (uri (git-reference
2864 (url "https://github.com/boakley/robotframework-lint.git")
2865 (commit commit)))
2866 (file-name (git-file-name name version))
2867 (sha256
2868 (base32
2869 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
2870 (build-system python-build-system)
2871 (arguments
2872 `(#:phases
2873 (modify-phases %standard-phases
2874 (replace 'check
2875 (lambda _
2876 (invoke "python" "-m" "robot" "-A"
2877 "tests/conf/default.args" "tests"))))))
2878 (propagated-inputs
2879 `(("python-robotframework" ,python-robotframework)))
2880 (home-page "https://github.com/boakley/robotframework-lint/")
2881 (synopsis "Static analysis tool (linter) for Robot Framework")
2882 (description "This package provides the @code{rflint} command-line
2883 utility, a static analysis tool (linter) for Robot Framework source files.")
2884 (license license:asl2.0))))
2885
2886 (define-public python-robotframework-sshlibrary
2887 (package
2888 (name "python-robotframework-sshlibrary")
2889 (version "3.3.0")
2890 ;; There are no tests in the PyPI archive.
2891 (source
2892 (origin
2893 (method git-fetch)
2894 (uri (git-reference
2895 (url "https://github.com/robotframework/SSHLibrary.git")
2896 (commit (string-append "v" version))))
2897 (file-name (git-file-name name version))
2898 (sha256
2899 (base32
2900 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
2901 (build-system python-build-system)
2902 (arguments
2903 `(#:phases
2904 (modify-phases %standard-phases
2905 (add-before 'build 'build-and-install-doc
2906 (lambda* (#:key outputs #:allow-other-keys)
2907 (let* ((doc-output (assoc-ref outputs "doc"))
2908 (doc (string-append doc-output "/share/"
2909 ,name "-" ,version "/")))
2910 (invoke "chmod" "-R" "+w" "docs")
2911 (invoke "invoke" "kw-docs" "project-docs")
2912 (mkdir-p doc)
2913 (for-each delete-file (find-files "docs" "\\.rst"))
2914 (copy-recursively "docs" doc)
2915 #t)))
2916 (replace 'check
2917 (lambda _
2918 ;; Some tests require an SSH server; we remove them.
2919 (delete-file "utest/test_client_api.py")
2920 (delete-file "utest/test_scp.py")
2921 (invoke "python" "utest/run.py"))))))
2922 (propagated-inputs
2923 `(("python-robotframework" ,python-robotframework)
2924 ("python-paramiko" ,python-paramiko)
2925 ("python-scp" ,python-scp)))
2926 (native-inputs
2927 `(("openssh" ,openssh)
2928 ("which" ,which)
2929 ;; To generate the documentation
2930 ("python-docutils" ,python-docutils)
2931 ("python-invoke" ,python-invoke)
2932 ("python-pygments" ,python-pygments)
2933 ("python-rellu" ,python-rellu)))
2934 (outputs '("out" "doc"))
2935 (home-page "https://github.com/robotframework/SSHLibrary")
2936 (synopsis "Robot Framework library for SSH and SFTP")
2937 (description "SSHLibrary is a Robot Framework library providing support
2938 for SSH and SFTP. It has the following main usages:
2939 @itemize @bullet
2940 @item Executing commands on the remote machine, either blocking or non-blocking.
2941 @item Writing and reading in an interactive shell.
2942 @item Transferring files and directories over SFTP.
2943 @item Ensuring that files and directories exist on the remote machine.
2944 @end itemize")
2945 (license license:asl2.0)))
2946
2947 (define-public python-rstr
2948 (package
2949 (name "python-rstr")
2950 (version "2.2.6")
2951 (source
2952 (origin
2953 (method url-fetch)
2954 (uri (pypi-uri "rstr" version))
2955 (sha256
2956 (base32
2957 "197dw8mbq0pjjz1l6h1ksi62vgn7x55d373ch74y06744qiq5sjx"))))
2958 (build-system python-build-system)
2959 (home-page
2960 "http://bitbucket.org/leapfrogdevelopment/rstr/overview")
2961 (synopsis "Generate random strings in Python")
2962 (description "This package provides a python module for generating
2963 random strings of various types. It could be useful for fuzz testing,
2964 generating dummy data, or other applications. It has no dependencies
2965 outside the standard library.")
2966 (license license:bsd-3)))
2967
2968 (define-public python-scp
2969 (package
2970 (name "python-scp")
2971 (version "0.13.2")
2972 (source
2973 (origin
2974 (method url-fetch)
2975 (uri (pypi-uri "scp" version))
2976 (sha256
2977 (base32
2978 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
2979 (build-system python-build-system)
2980 (arguments
2981 '(#:tests? #f)) ;tests require an SSH server
2982 (propagated-inputs
2983 `(("python-paramiko" ,python-paramiko)))
2984 (home-page "https://github.com/jbardin/scp.py")
2985 (synopsis "SCP protocol module for Python and Paramiko")
2986 (description "The scp module extends the Paramiko library to send and
2987 receive files via the SCP1 protocol, as implemented by the OpenSSH
2988 @command{scp} program.")
2989 (license license:gpl2+)))
2990
2991 (define-public python-rst.linker
2992 (package
2993 (name "python-rst.linker")
2994 (version "1.11")
2995 (source
2996 (origin
2997 (method url-fetch)
2998 (uri (pypi-uri "rst.linker" version))
2999 (sha256
3000 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
3001 (build-system python-build-system)
3002 (propagated-inputs
3003 `(("python-dateutil" ,python-dateutil)
3004 ("python-six" ,python-six)))
3005 (native-inputs
3006 `(("python-setuptools-scm" ,python-setuptools-scm)))
3007 ;; Test would require path.py, which would introduce a cyclic dependence.
3008 (arguments `(#:tests? #f))
3009 ;; Note: As of version 1.7 the documentation is not worth building.
3010 (home-page "https://github.com/jaraco/rst.linker")
3011 (synopsis "Sphinx plugin to add links and timestamps")
3012 (description "rst.linker allows to automatically replace text by a
3013 reStructuredText external reference or timestamps. It's primary purpose is to
3014 augment the changelog, but it can be used for other documents, too.")
3015 (license license:expat)))
3016
3017 (define-public python2-rst.linker
3018 (package-with-python2 python-rst.linker))
3019
3020 (define-public python-feedgenerator
3021 (package
3022 (name "python-feedgenerator")
3023 (version "1.9")
3024 (source
3025 (origin
3026 (method url-fetch)
3027 (uri (pypi-uri "feedgenerator" version))
3028 (sha256
3029 (base32
3030 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
3031 (modules '((guix build utils)))
3032 (snippet
3033 '(begin
3034 ;; Remove pre-compiled .pyc files from source.
3035 (for-each delete-file-recursively
3036 (find-files "." "__pycache__" #:directories? #t))
3037 (for-each delete-file (find-files "." "\\.pyc$"))
3038 #t))))
3039 (build-system python-build-system)
3040 (propagated-inputs
3041 `(("python-pytz" ,python-pytz)
3042 ("python-six" ,python-six)))
3043 (home-page "https://github.com/getpelican/feedgenerator")
3044 (synopsis
3045 "Standalone version of Django's Atom/RSS feed generator")
3046 (description
3047 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
3048 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
3049 (license license:bsd-3)))
3050
3051 (define-public python2-feedgenerator
3052 (package-with-python2 python-feedgenerator))
3053
3054 (define-public python-toml
3055 (package
3056 (name "python-toml")
3057 (version "0.9.4")
3058 (source
3059 (origin
3060 (method url-fetch)
3061 (uri (pypi-uri "toml" version))
3062 (sha256
3063 (base32
3064 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
3065 (build-system python-build-system)
3066 (arguments
3067 `(#:tests? #f)) ;no tests suite in release
3068 (home-page "https://github.com/uiri/toml")
3069 (synopsis "Library for TOML")
3070 (description
3071 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
3072 Language (TOML) configuration files.")
3073 (license license:expat)))
3074
3075 (define-public python-jsonrpc-server
3076 (package
3077 (name "python-jsonrpc-server")
3078 (version "0.3.2")
3079 (source
3080 (origin
3081 (method url-fetch)
3082 (uri (pypi-uri "python-jsonrpc-server" version))
3083 (sha256
3084 (base32
3085 "0ddgdp26dfxaz6isjbb12974b3rxavgsqrn2zrmck62cmipg5g05"))))
3086 (build-system python-build-system)
3087 (propagated-inputs
3088 `(("python-future" ,python-future)
3089 ("python-mock" ,python-mock)
3090 ("python-pytest" ,python-pytest)
3091 ("python-ujson" ,python-ujson)))
3092 (home-page
3093 "https://github.com/palantir/python-jsonrpc-server")
3094 (synopsis "JSON RPC 2.0 server library")
3095 (description
3096 "This package provides a JSON RPC 2.0 server library for Python.")
3097 (license license:expat)))
3098
3099 (define-public python-pydocstyle
3100 (package
3101 (name "python-pydocstyle")
3102 (version "3.0.0")
3103 (source
3104 (origin
3105 (method url-fetch)
3106 (uri (pypi-uri "pydocstyle" version))
3107 (sha256
3108 (base32
3109 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
3110 (build-system python-build-system)
3111 (propagated-inputs
3112 `(("python-six" ,python-six)
3113 ("python-snowballstemmer" ,python-snowballstemmer)))
3114 (home-page
3115 "https://github.com/PyCQA/pydocstyle/")
3116 (synopsis "Python docstring style checker")
3117 (description
3118 "This package provides a style checker for the Python Language
3119 Server (PLS).")
3120 (license license:expat)))
3121
3122 (define-public python-language-server
3123 (package
3124 (name "python-language-server")
3125 (version "0.31.7")
3126 (source
3127 (origin
3128 (method url-fetch)
3129 (uri (pypi-uri "python-language-server" version))
3130 (sha256
3131 (base32
3132 "0f8rljff4h2ay9m2n9ang7axai37nzd39zd7m6c90rci5wh8cmxh"))))
3133 (build-system python-build-system)
3134 (propagated-inputs
3135 `(("python-pluggy" ,python-pluggy)
3136 ("python-jsonrpc-server" ,python-jsonrpc-server)
3137 ("python-jedi" ,python-jedi)
3138 ("python-yapf" ,python-yapf)
3139 ("python-pyflakes" ,python-pyflakes)
3140 ("python-pydocstyle" ,python-pydocstyle)
3141 ("python-pycodestyle" ,python-pycodestyle)
3142 ("python-mccabe" ,python-mccabe)
3143 ("python-rope" ,python-rope)
3144 ("python-autopep8" ,python-autopep8)
3145 ("python-flake8" ,python-flake8)
3146 ("python-pylint" ,python-pylint)))
3147 (home-page "https://github.com/palantir/python-language-server")
3148 (synopsis "Python implementation of the Language Server Protocol")
3149 (description
3150 "The Python Language Server (pyls) is an implementation of the Python 3
3151 language specification for the Language Server Protocol (LSP). This tool is
3152 used in text editing environments to provide a complete and integrated
3153 feature-set for programming Python effectively.")
3154 (license license:expat)))
3155
3156 (define-public python-black
3157 (package
3158 (name "python-black")
3159 (version "18.6b4")
3160 (source
3161 (origin
3162 (method url-fetch)
3163 (uri (pypi-uri "black" version))
3164 (sha256
3165 (base32
3166 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
3167 (build-system python-build-system)
3168 (arguments
3169 `(#:phases
3170 (modify-phases %standard-phases
3171 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3172 (lambda _
3173 (let ((python3 (which "python3")))
3174 (substitute* '("tests/data/fmtonoff.py"
3175 "tests/data/string_prefixes.py"
3176 "tests/data/function.py")
3177 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3178 (string-append "#!" python3 (if (string? minor-version)
3179 minor-version
3180 ""))))))))))
3181 (propagated-inputs
3182 `(("python-click" ,python-click)
3183 ("python-attrs" ,python-attrs)
3184 ("python-appdirs" ,python-appdirs)
3185 ("python-toml" ,python-toml)))
3186 (home-page "https://github.com/ambv/black")
3187 (synopsis "The uncompromising code formatter")
3188 (description "Black is the uncompromising Python code formatter.")
3189 (license license:expat)))
3190
3191 (define-public python-blinker
3192 (package
3193 (name "python-blinker")
3194 (version "1.4")
3195 (source
3196 (origin
3197 (method url-fetch)
3198 (uri (pypi-uri "blinker" version))
3199 (sha256
3200 (base32
3201 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3202 (build-system python-build-system)
3203 (home-page "http://pythonhosted.org/blinker/")
3204 (synopsis "Fast, simple object-to-object and broadcast signaling")
3205 (description
3206 "Blinker provides a fast dispatching system that allows any number of
3207 interested parties to subscribe to events, or \"signals\".")
3208 (license license:expat)))
3209
3210 (define-public python2-blinker
3211 (package-with-python2 python-blinker))
3212
3213 (define-public pelican
3214 (package
3215 (name "pelican")
3216 (version "4.2.0")
3217 (source
3218 (origin
3219 (method url-fetch)
3220 (uri (pypi-uri "pelican" version))
3221 (sha256
3222 (base32
3223 "0mp7hjyhs38ag1hyfcy882g400z0babqi72pnli46dqijfhajzmy"))))
3224 (build-system python-build-system)
3225 (propagated-inputs
3226 `(("python-blinker" ,python-blinker)
3227 ("python-dateutil" ,python-dateutil)
3228 ("python-docutils" ,python-docutils)
3229 ("python-feedgenerator" ,python-feedgenerator)
3230 ("python-jinja2" ,python-jinja2)
3231 ("python-markdown" ,python-markdown)
3232 ("python-pygments" ,python-pygments)
3233 ("python-pytz" ,python-pytz)
3234 ("python-six" ,python-six)
3235 ("python-unidecode" ,python-unidecode)))
3236 (home-page "https://getpelican.com/")
3237 (arguments
3238 `(;; XXX Requires a lot more packages to do unit tests :P
3239 #:tests? #f))
3240 (synopsis "Python-based static site publishing system")
3241 (description
3242 "Pelican is a tool to generate a static blog from reStructuredText,
3243 Markdown input files, and more. Pelican uses Jinja2 for templating
3244 and is very extensible.")
3245 (license license:agpl3+)))
3246
3247 (define-public mallard-ducktype
3248 (package
3249 (name "mallard-ducktype")
3250 (version "1.0.2")
3251 (source
3252 (origin
3253 (method git-fetch)
3254 ;; git-reference because tests are not included in pypi source tarball
3255 ;; https://issues.guix.gnu.org/issue/36755#2
3256 (uri (git-reference
3257 (url "https://github.com/projectmallard/mallard-ducktype.git")
3258 (commit version)))
3259 (file-name (git-file-name name version))
3260 (sha256
3261 (base32
3262 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
3263 (build-system python-build-system)
3264 (arguments
3265 '(#:phases
3266 (modify-phases %standard-phases
3267 (replace 'check
3268 (lambda _
3269 (with-directory-excursion "tests"
3270 (invoke "sh" "runtests")))))))
3271 (home-page "http://projectmallard.org")
3272 (synopsis "Convert Ducktype to Mallard documentation markup")
3273 (description
3274 "Ducktype is a lightweight syntax that can represent all the semantics
3275 of the Mallard XML documentation system. Ducktype files can be converted to
3276 Mallard using the @command{ducktype} tool. The yelp-tools package
3277 provides additional functionality on the produced Mallard documents.")
3278 (license license:expat)))
3279
3280 (define-public python-cython
3281 (package
3282 (name "python-cython")
3283 (version "0.29.13")
3284 (source
3285 (origin
3286 (method url-fetch)
3287 (uri (pypi-uri "Cython" version))
3288 (sha256
3289 (base32
3290 "13k37lrcgagwwnzr5bzririsscb793vndj234d475x1h9ad0d7f2"))))
3291 (build-system python-build-system)
3292 ;; we need the full python package and not just the python-wrapper
3293 ;; because we need libpython3.3m.so
3294 (inputs
3295 `(("python" ,python)))
3296 (arguments
3297 `(#:phases
3298 (modify-phases %standard-phases
3299 (add-before 'check 'set-HOME
3300 ;; some tests require access to "$HOME/.cython"
3301 (lambda _ (setenv "HOME" "/tmp") #t))
3302
3303 ;; FIXME: These tests started failing on armhf after the 0.28 update
3304 ;; (commit c69d11c5930), both with an error such as this:
3305 ;; compiling (cpp) and running dictcomp ...
3306 ;; === C/C++ compiler error output: ===
3307 ;; ‘
3308 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
3309 ;; See <https://hydra.gnu.org/build/2948724> for logs.
3310 ,@(if (target-arm32?)
3311 `((add-before 'check 'disable-failing-tests
3312 (lambda _
3313 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
3314 (for-each (lambda (test)
3315 (format disabled-tests "~a\n" test))
3316 '("memslice" "dictcomp"))
3317 (close-port disabled-tests)))))
3318 '())
3319
3320 (replace 'check
3321 (lambda _
3322 ;; Disable compiler optimizations to greatly reduce the running
3323 ;; time of the test suite.
3324 (setenv "CFLAGS" "-O0")
3325
3326 (invoke "python" "runtests.py" "-vv"
3327 "-j" (number->string (parallel-job-count))))))))
3328 (home-page "https://cython.org/")
3329 (synopsis "C extensions for Python")
3330 (description "Cython is an optimising static compiler for both the Python
3331 programming language and the extended Cython programming language. It makes
3332 writing C extensions for Python as easy as Python itself.")
3333 (license license:asl2.0)
3334 (properties `((python2-variant . ,(delay python2-cython))))))
3335
3336 (define-public python2-cython
3337 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
3338 (package
3339 (inherit base)
3340 (name "python2-cython")
3341 (inputs
3342 `(("python-2" ,python-2))) ;this is not automatically changed
3343 (arguments
3344 (substitute-keyword-arguments (package-arguments base)
3345 ((#:phases phases)
3346 `(modify-phases ,phases
3347 (add-before 'check 'adjust-test_embed
3348 (lambda _
3349 (substitute* "runtests.py"
3350 ;; test_embed goes great lengths to find the static libpythonX.Y.a
3351 ;; so it can give the right -L flag to GCC when embedding static
3352 ;; builds of Python. It is unaware that the Python "config"
3353 ;; directory (where the static library lives) was renamed in
3354 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
3355 ;; which works fine, because that is where the shared library is.
3356 ;;
3357 ;; It also appears to be unaware that the Makefile in Demos/embed
3358 ;; already unconditionally pass the static library location to GCC,
3359 ;; after checking sysconfig.get_config_var('LIBPL).
3360 ;;
3361 ;; The effect is that the linker is unable to resolve libexpat
3362 ;; symbols when building for Python 2, because neither the Python 2
3363 ;; shared library nor Expat is available. To fix it, we can either
3364 ;; add Expat as an input and make it visible to the linker, or just
3365 ;; prevent it from overriding the Python shared library location.
3366 ;; The end result is identical, so we take the easy route.
3367 ((" or libname not in os\\.listdir\\(libdir\\)")
3368 ""))
3369 #t)))))))))
3370
3371 ;; The RPython toolchain currently does not support Python 3.
3372 (define-public python2-rpython
3373 (package
3374 (name "python2-rpython")
3375 (version "0.2.1")
3376 (source
3377 (origin
3378 (method url-fetch)
3379 (uri (pypi-uri "rpython" version))
3380 (sha256
3381 (base32
3382 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3383 (build-system python-build-system)
3384 (arguments `(#:python ,python-2))
3385 (native-inputs
3386 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3387 (home-page "https://rpython.readthedocs.org")
3388 (synopsis "Framework for implementing interpreters and virtual machines")
3389 (description "RPython is a translation and support framework for
3390 producing implementations of dynamic languages, emphasizing a clean separation
3391 between language specification and implementation aspects.")
3392 (license license:expat)))
3393
3394 ;; NOTE: when upgrading numpy please make sure that python-pandas and
3395 ;; python-scipy still build, as these three packages are often used together.
3396 (define-public python-numpy
3397 (package
3398 (name "python-numpy")
3399 (version "1.17.3")
3400 (source
3401 (origin
3402 (method url-fetch)
3403 (uri (string-append
3404 "https://github.com/numpy/numpy/releases/download/v"
3405 version "/numpy-" version ".tar.gz"))
3406 (sha256
3407 (base32
3408 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
3409 (build-system python-build-system)
3410 (inputs
3411 `(("openblas" ,openblas)
3412 ("lapack" ,lapack)))
3413 (native-inputs
3414 `(("python-cython" ,python-cython)
3415 ("python-pytest" ,python-pytest)
3416 ("gfortran" ,gfortran)))
3417 (arguments
3418 `(#:phases
3419 (modify-phases %standard-phases
3420 (add-before 'build 'configure-blas-lapack
3421 (lambda* (#:key inputs #:allow-other-keys)
3422 (call-with-output-file "site.cfg"
3423 (lambda (port)
3424 (format port
3425 "[openblas]
3426 libraries = openblas
3427 library_dirs = ~a/lib
3428 include_dirs = ~a/include
3429
3430 # backslash-n to make emacs happy
3431 \n[lapack]
3432 lapack_libs = lapack
3433 library_dirs = ~a/lib
3434 include_dirs = ~a/include
3435 "
3436 (assoc-ref inputs "openblas")
3437 (assoc-ref inputs "openblas")
3438 (assoc-ref inputs "lapack")
3439 (assoc-ref inputs "lapack"))))
3440 #t))
3441 (add-before 'build 'fix-executable-paths
3442 (lambda* (#:key inputs #:allow-other-keys)
3443 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3444 ;; instead of /bin/sh.
3445 (substitute* "numpy/distutils/exec_command.py"
3446 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3447 (string-append match-start (assoc-ref inputs "bash") match-end)))
3448 ;; Use "gcc" executable, not "cc".
3449 (substitute* "numpy/distutils/system_info.py"
3450 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3451 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3452 #t))
3453 ;; Tests can only be run after the library has been installed and not
3454 ;; within the source directory.
3455 (delete 'check)
3456 (add-after 'install 'check
3457 (lambda* (#:key outputs inputs #:allow-other-keys)
3458 ;; Make installed package available for running the tests
3459 (add-installed-pythonpath inputs outputs)
3460 ;; Make sure "f2py" etc is found.
3461 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3462 ":" (getenv "PATH")))
3463 (with-directory-excursion "/tmp"
3464 (invoke "python" "-c"
3465 "import numpy; numpy.test(verbose=2)")))))))
3466 (home-page "http://www.numpy.org/")
3467 (synopsis "Fundamental package for scientific computing with Python")
3468 (description "NumPy is the fundamental package for scientific computing
3469 with Python. It contains among other things: a powerful N-dimensional array
3470 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3471 and Fortran code, useful linear algebra, Fourier transform, and random number
3472 capabilities.")
3473 (properties `((python2-variant . ,(delay python2-numpy))))
3474 (license license:bsd-3)))
3475
3476 ;; Numpy 1.16.x are the last versions that support Python 2.
3477 (define-public python2-numpy
3478 (let ((numpy (package-with-python2
3479 (strip-python2-variant python-numpy))))
3480 (package/inherit
3481 numpy
3482 (version "1.16.5")
3483 (source (origin
3484 (method url-fetch)
3485 (uri (string-append
3486 "https://github.com/numpy/numpy/releases/download/v"
3487 version "/numpy-" version ".tar.gz"))
3488 (sha256
3489 (base32
3490 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
3491
3492 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3493 ;; interest only for legacy code going back to NumPy's predecessor
3494 ;; Numeric.
3495 (define-public python2-numpy-1.8
3496 (package (inherit python2-numpy)
3497 (version "1.8.2")
3498 (source
3499 (origin
3500 (method git-fetch)
3501 (uri (git-reference
3502 (url "https://github.com/numpy/numpy")
3503 (commit (string-append "v" version))))
3504 (file-name (git-file-name "numpy" version))
3505 (sha256
3506 (base32
3507 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
3508 (arguments
3509 (substitute-keyword-arguments (package-arguments python2-numpy)
3510 ((#:phases phases)
3511 `(modify-phases ,phases
3512 (replace 'configure-blas-lapack
3513 (lambda* (#:key inputs #:allow-other-keys)
3514 (call-with-output-file "site.cfg"
3515 (lambda (port)
3516 (format port
3517 "[openblas]
3518 libraries = openblas,lapack
3519 library_dirs = ~a/lib:~a/lib
3520 include_dirs = ~a/include:~a/include
3521 "
3522 (assoc-ref inputs "openblas")
3523 (assoc-ref inputs "lapack")
3524 (assoc-ref inputs "openblas")
3525 (assoc-ref inputs "lapack"))))
3526 #t))))))
3527 (native-inputs
3528 `(("python2-nose" ,python2-nose)))
3529 (description "NumPy is the fundamental package for scientific computing
3530 with Python. It contains among other things: a powerful N-dimensional array
3531 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3532 and Fortran code, useful linear algebra, Fourier transform, and random number
3533 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3534 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3535 Numeric.")
3536 (license license:bsd-3)))
3537
3538 (define-public python-munch
3539 (package
3540 (name "python-munch")
3541 (version "2.0.4")
3542 (source
3543 (origin
3544 (method url-fetch)
3545 (uri (pypi-uri "munch" version))
3546 (sha256
3547 (base32
3548 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3549 (build-system python-build-system)
3550 (home-page "https://github.com/Infinidat/munch")
3551 (synopsis "Dot-accessible dictionary")
3552 (description "Munch is a dot-accessible dictionary similar to JavaScript
3553 objects.")
3554 (license license:expat)))
3555
3556 (define-public python2-munch
3557 (package-with-python2 python-munch))
3558
3559 (define-public python-colormath
3560 (package
3561 (name "python-colormath")
3562 (version "3.0.0")
3563 (source
3564 (origin
3565 (method url-fetch)
3566 (uri (pypi-uri "colormath" version))
3567 (sha256
3568 (base32
3569 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3570 (build-system python-build-system)
3571 (propagated-inputs
3572 `(("python-networkx" ,python-networkx)
3573 ("python-numpy" ,python-numpy)))
3574 (home-page "https://github.com/gtaylor/python-colormath")
3575 (synopsis "Color math and conversion library")
3576 (description
3577 "This is a Python library for color math and conversions.")
3578 (license license:bsd-3)))
3579
3580 (define-public python2-colormath
3581 (package-with-python2 python-colormath))
3582
3583 (define-public python-spectra
3584 (package
3585 (name "python-spectra")
3586 (version "0.0.11")
3587 (source
3588 (origin
3589 (method url-fetch)
3590 (uri (pypi-uri "spectra" version))
3591 (sha256
3592 (base32
3593 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3594 (build-system python-build-system)
3595 (arguments
3596 `(#:phases
3597 (modify-phases %standard-phases
3598 (replace 'check
3599 (lambda _ (invoke "nosetests" "-v"))))))
3600 (propagated-inputs
3601 `(("python-colormath" ,python-colormath)))
3602 (native-inputs
3603 `(("python-nose" ,python-nose)))
3604 (home-page "https://github.com/jsvine/spectra")
3605 (synopsis "Color scales and color conversion")
3606 (description
3607 "This package provides a Python library intended to make color math,
3608 color scales, and color space conversion easy. It has support for:
3609
3610 @enumerate
3611 @item Color scales
3612 @item Color ranges
3613 @item Color blending
3614 @item Brightening/darkening colors
3615 @item Saturating/desaturating colors
3616 @item Conversion to/from multiple color spaces.
3617 @end enumerate\n")
3618 (license license:expat)))
3619
3620 (define-public python2-spectra
3621 (package-with-python2 python-spectra))
3622
3623 (define-public python-numpy-documentation
3624 (package
3625 (name "python-numpy-documentation")
3626 (version (package-version python-numpy))
3627 (source (package-source python-numpy))
3628 (build-system python-build-system)
3629 (native-inputs
3630 `(("python-matplotlib" ,python-matplotlib)
3631 ("python-numpy" ,python-numpy)
3632 ("pkg-config" ,pkg-config)
3633 ("python-sphinx" ,python-sphinx)
3634 ("python-numpydoc" ,python-numpydoc)
3635 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
3636 texlive-fonts-ec
3637 texlive-generic-ifxetex
3638 texlive-generic-pdftex
3639 texlive-amsfonts
3640 texlive-latex-capt-of
3641 texlive-latex-cmap
3642 texlive-latex-environ
3643 texlive-latex-eqparbox
3644 texlive-latex-etoolbox
3645 texlive-latex-expdlist
3646 texlive-latex-fancyhdr
3647 texlive-latex-fancyvrb
3648 texlive-latex-fncychap
3649 texlive-latex-float
3650 texlive-latex-framed
3651 texlive-latex-geometry
3652 texlive-latex-graphics
3653 texlive-latex-hyperref
3654 texlive-latex-mdwtools
3655 texlive-latex-multirow
3656 texlive-latex-needspace
3657 texlive-latex-oberdiek
3658 texlive-latex-parskip
3659 texlive-latex-preview
3660 texlive-latex-tabulary
3661 texlive-latex-threeparttable
3662 texlive-latex-titlesec
3663 texlive-latex-trimspaces
3664 texlive-latex-ucs
3665 texlive-latex-upquote
3666 texlive-latex-url
3667 texlive-latex-varwidth
3668 texlive-latex-wrapfig)))
3669 ("texinfo" ,texinfo)
3670 ("perl" ,perl)
3671 ("scipy-sphinx-theme"
3672 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3673 (method git-fetch)
3674 (uri (git-reference
3675 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3676 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3677 (sha256
3678 (base32
3679 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3680 ,@(package-native-inputs python-numpy)))
3681 (arguments
3682 `(#:tests? #f ; we're only generating the documentation
3683 #:phases
3684 (modify-phases %standard-phases
3685 (delete 'build)
3686 (replace 'install
3687 (lambda* (#:key inputs outputs #:allow-other-keys)
3688 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3689 (doc (string-append
3690 data "/doc/" ,name "-"
3691 ,(package-version python-numpy)))
3692 (info-reader (string-append data "/info"))
3693 (html (string-append doc "/html"))
3694 (scipy-sphinx-theme "scipy-sphinx-theme")
3695 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3696 (pyver ,(string-append "PYVER=")))
3697
3698 ;; FIXME: this is needed to for texlive-union to generate
3699 ;; fonts, which are not found.
3700 (setenv "HOME" "/tmp")
3701
3702 (with-directory-excursion "doc"
3703 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3704 (mkdir-p html)
3705 (invoke "make" "html" pyver)
3706 (invoke "make" "latex" "PAPER=a4" pyver)
3707 (invoke "make" "-C" "build/latex"
3708 "all-pdf" "PAPER=a4" pyver)
3709 ;; FIXME: Generation of the info file fails.
3710 ;; (invoke "make" "info" pyver)
3711 ;; (mkdir-p info)
3712 ;; (copy-file "build/texinfo/numpy.info"
3713 ;; (string-append info "/numpy.info"))
3714 (for-each (lambda (file)
3715 (copy-file (string-append "build/latex" file)
3716 (string-append doc file)))
3717 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3718 (with-directory-excursion "build/html"
3719 (for-each (lambda (file)
3720 (let* ((dir (dirname file))
3721 (tgt-dir (string-append html "/" dir)))
3722 (unless (equal? "." dir)
3723 (mkdir-p tgt-dir))
3724 (install-file file html)))
3725 (find-files "." ".*")))))
3726 #t)))))
3727 (home-page (package-home-page python-numpy))
3728 (synopsis "Documentation for the python-numpy package")
3729 (description (package-description python-numpy))
3730 (license (package-license python-numpy))))
3731
3732 (define-public python2-numpy-documentation
3733 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3734 (package
3735 (inherit numpy-documentation)
3736 (native-inputs `(("python2-functools32" ,python2-functools32)
3737 ,@(package-native-inputs numpy-documentation))))))
3738
3739 (define-public python-pygit2
3740 (package
3741 (name "python-pygit2")
3742 (version "0.28.2")
3743 (source
3744 (origin
3745 (method url-fetch)
3746 (uri (pypi-uri "pygit2" version))
3747 (sha256
3748 (base32 "11kzj5mjkspvplnpdb6bj8dcj6rgmkk986k8hjcklyg5yaxkz32d"))))
3749 (build-system python-build-system)
3750 (arguments
3751 '(#:tests? #f)) ; tests don't run correctly in our environment
3752 (propagated-inputs
3753 `(("python-six" ,python-six)
3754 ("python-cffi" ,python-cffi)
3755 ("libgit2" ,libgit2)
3756 ("python-tox" ,python-tox)))
3757 (native-inputs
3758 `(("python-pytest" ,python-pytest)))
3759 (home-page "https://github.com/libgit2/pygit2")
3760 (synopsis "Python bindings for libgit2")
3761 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3762 library, libgit2 implements Git plumbing.")
3763 ;; GPL2.0 only, with linking exception.
3764 (license license:gpl2)))
3765
3766 (define-public python2-pygit2
3767 (package-with-python2 python-pygit2))
3768
3769 (define-public python-pyparsing
3770 (package
3771 (name "python-pyparsing")
3772 (version "2.3.1")
3773 (source
3774 (origin
3775 (method url-fetch)
3776 (uri (pypi-uri "pyparsing" version))
3777 (sha256
3778 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
3779 (build-system python-build-system)
3780 (outputs '("out" "doc"))
3781 (arguments
3782 `(#:tests? #f ; no test target
3783 #:phases
3784 (modify-phases %standard-phases
3785 (add-after 'install 'install-doc
3786 (lambda* (#:key outputs #:allow-other-keys)
3787 (let* ((doc (string-append (assoc-ref outputs "doc")
3788 "/share/doc/" ,name "-" ,version))
3789 (html-doc (string-append doc "/html"))
3790 (examples (string-append doc "/examples")))
3791 (mkdir-p html-doc)
3792 (mkdir-p examples)
3793 (for-each
3794 (lambda (dir tgt)
3795 (map (lambda (file)
3796 (install-file file tgt))
3797 (find-files dir ".*")))
3798 (list "docs" "htmldoc" "examples")
3799 (list doc html-doc examples))
3800 #t))))))
3801 (home-page "https://github.com/pyparsing/pyparsing")
3802 (synopsis "Python parsing class library")
3803 (description
3804 "The pyparsing module is an alternative approach to creating and
3805 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3806 of regular expressions. The pyparsing module provides a library of classes
3807 that client code uses to construct the grammar directly in Python code.")
3808 (license license:expat)))
3809
3810 (define-public python2-pyparsing
3811 (package-with-python2 python-pyparsing))
3812
3813 (define-public python-numpydoc
3814 (package
3815 (name "python-numpydoc")
3816 (version "0.8.0")
3817 (source
3818 (origin
3819 (method url-fetch)
3820 (uri (pypi-uri "numpydoc" version))
3821 (sha256
3822 (base32
3823 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3824 (build-system python-build-system)
3825 (propagated-inputs
3826 `(("python-sphinx" ,python-sphinx)))
3827 (native-inputs
3828 `(("python-nose" ,python-nose)))
3829 (home-page "https://pypi.python.org/pypi/numpydoc")
3830 (synopsis
3831 "Numpy's Sphinx extensions")
3832 (description
3833 "Sphinx extension to support docstrings in Numpy format.")
3834 (license license:bsd-2)))
3835
3836 (define-public python2-numpydoc
3837 (package-with-python2 python-numpydoc))
3838
3839 (define-public python-numexpr
3840 (package
3841 (name "python-numexpr")
3842 (version "2.6.5")
3843 (source
3844 (origin
3845 (method url-fetch)
3846 (uri (pypi-uri "numexpr" version))
3847 (sha256
3848 (base32
3849 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3850 (build-system python-build-system)
3851 (arguments `(#:tests? #f)) ; no tests included
3852 (propagated-inputs
3853 `(("python-numpy" ,python-numpy)))
3854 (home-page "https://github.com/pydata/numexpr")
3855 (synopsis "Fast numerical expression evaluator for NumPy")
3856 (description
3857 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3858 expressions that operate on arrays are accelerated and use less memory than
3859 doing the same calculation in Python. In addition, its multi-threaded
3860 capabilities can make use of all your cores, which may accelerate
3861 computations, most specially if they are not memory-bounded (e.g. those using
3862 transcendental functions).")
3863 (license license:expat)))
3864
3865 (define-public python2-numexpr
3866 (package-with-python2 python-numexpr))
3867
3868 (define-public python-cycler
3869 (package
3870 (name "python-cycler")
3871 (version "0.10.0")
3872 (source (origin
3873 (method url-fetch)
3874 (uri (pypi-uri "cycler" version))
3875 (sha256
3876 (base32
3877 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3878 (build-system python-build-system)
3879 (arguments
3880 ;; XXX: The current version requires 'coveralls' which we don't have.
3881 ;; Enable this for the next release which uses 'python-pytest'.
3882 '(#:tests? #f))
3883 (propagated-inputs
3884 `(("python-six" ,python-six)))
3885 (home-page "http://matplotlib.org/cycler/")
3886 (synopsis "Composable keyword argument iterator")
3887 (description
3888 "When using @code{matplotlib} and plotting more than one line, it is
3889 common to want to be able to want to be able to cycle over one or more artist
3890 styles; but the plotting logic can quickly become involved.
3891 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3892 @code{Cycler} class was developed.")
3893 (license license:bsd-3)))
3894
3895 (define-public python2-cycler
3896 (package-with-python2 python-cycler))
3897
3898 (define-public python-colorspacious
3899 (package
3900 (name "python-colorspacious")
3901 (version "1.1.2")
3902 (source
3903 (origin
3904 (method git-fetch)
3905 (uri (git-reference
3906 (url "https://github.com/njsmith/colorspacious.git")
3907 (commit (string-append "v" version))))
3908 (file-name (git-file-name name version))
3909 (sha256
3910 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
3911 (build-system python-build-system)
3912 (propagated-inputs
3913 `(("python-numpy" ,python-numpy)))
3914 (native-inputs
3915 `(("python-nose" ,python-nose)))
3916 (arguments
3917 `(#:phases
3918 (modify-phases %standard-phases
3919 (replace 'check
3920 (lambda _
3921 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
3922 (home-page "https://github.com/njsmith/colorspacious")
3923 (synopsis "Python library for colorspace conversions")
3924 (description "@code{colorspacious} is a Python library that lets you
3925 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3926 (license license:expat)))
3927
3928 (define-public python2-colorspacious
3929 (package-with-python2 python-colorspacious))
3930
3931 (define-public python-matplotlib
3932 (package
3933 (name "python-matplotlib")
3934 (version "3.1.2")
3935 (source
3936 (origin
3937 (method url-fetch)
3938 (uri (pypi-uri "matplotlib" version))
3939 (sha256
3940 (base32
3941 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))))
3942 (build-system python-build-system)
3943 (propagated-inputs ; the following packages are all needed at run time
3944 `(("python-cycler" ,python-cycler)
3945 ("python-kiwisolver" ,python-kiwisolver)
3946 ("python-pyparsing" ,python-pyparsing)
3947 ("python-pygobject" ,python-pygobject)
3948 ("gobject-introspection" ,gobject-introspection)
3949 ("python-tkinter" ,python "tk")
3950 ("python-dateutil" ,python-dateutil)
3951 ("python-numpy" ,python-numpy)
3952 ("python-pillow" ,python-pillow)
3953 ("python-pytz" ,python-pytz)
3954 ("python-six" ,python-six)
3955 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3956 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3957 ;; object. For this reason we need to import both libraries.
3958 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
3959 ("python-pycairo" ,python-pycairo)
3960 ("python-cairocffi" ,python-cairocffi)))
3961 (inputs
3962 `(("libpng" ,libpng)
3963 ("imagemagick" ,imagemagick)
3964 ("freetype" ,freetype)
3965 ("cairo" ,cairo)
3966 ("glib" ,glib)
3967 ;; FIXME: Add backends when available.
3968 ;("python-wxpython" ,python-wxpython)
3969 ("tcl" ,tcl)
3970 ("tk" ,tk)))
3971 (native-inputs
3972 `(("pkg-config" ,pkg-config)
3973 ("python-pytest" ,python-pytest)
3974 ("python-mock" ,python-mock)
3975 ("unzip" ,unzip)
3976 ("jquery-ui"
3977 ,(origin
3978 (method url-fetch)
3979 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
3980 (sha256
3981 (base32
3982 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
3983 (arguments
3984 `(#:phases
3985 (modify-phases %standard-phases
3986 ;; XXX We disable all image comparison tests because we're using a
3987 ;; newer version of FreeType than matplotlib expects. This leads to
3988 ;; minor differences throughout the tests.
3989 (add-after 'unpack 'fix-and-disable-failing-tests
3990 (lambda _
3991 (substitute* (append (find-files "lib/matplotlib/tests/"
3992 "test_.*\\.py$")
3993 (find-files "lib/mpl_toolkits/tests"
3994 "test_.*\\.py$"))
3995 (("^from matplotlib" match)
3996 (string-append "import pytest\n" match))
3997 (("( *)@image_comparison" match indent)
3998 (string-append indent
3999 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
4000 match)))
4001 (substitute* "lib/matplotlib/tests/test_animation.py"
4002 (("/bin/sh") (which "sh")))
4003 (for-each delete-file
4004 ;; test_normal_axes, test_get_tightbbox_polar
4005 '("lib/matplotlib/tests/test_axes.py"
4006 ;; We don't use the webagg backend and this test forces it.
4007 "lib/matplotlib/tests/test_backend_webagg.py"
4008 ;; test_outward_ticks
4009 "lib/matplotlib/tests/test_tightlayout.py"
4010 ;; test_hidden_axes fails with minor extent
4011 ;; differences, possibly due to the use of a
4012 ;; different version of FreeType.
4013 "lib/matplotlib/tests/test_constrainedlayout.py"
4014 ;; Fontconfig returns no fonts.
4015 "lib/matplotlib/tests/test_font_manager.py"))
4016 #t))
4017 (add-before 'install 'install-jquery-ui
4018 (lambda* (#:key outputs inputs #:allow-other-keys)
4019 (let ((dir (string-append (assoc-ref outputs "out")
4020 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
4021 (mkdir-p dir)
4022 (invoke "unzip"
4023 (assoc-ref inputs "jquery-ui")
4024 "-d" dir))
4025 #t))
4026 (replace 'check
4027 (lambda* (#:key outputs inputs #:allow-other-keys)
4028 (add-installed-pythonpath inputs outputs)
4029 (invoke "python" "tests.py" "-v"
4030 "-m" "not network and not webagg")))
4031 (add-before 'build 'configure-environment
4032 (lambda* (#:key outputs inputs #:allow-other-keys)
4033 (let ((cairo (assoc-ref inputs "cairo")))
4034 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
4035 ;; has not effect.
4036 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
4037 (setenv "HOME" (getcwd))
4038 (call-with-output-file "setup.cfg"
4039 (lambda (port)
4040 (format port "[directories]~%
4041 basedirlist = ~a,~a~%
4042 [packages]~%
4043 tests = True~%"
4044 (assoc-ref inputs "tcl")
4045 (assoc-ref inputs "tk")))))
4046 #t)))))
4047 (home-page "https://matplotlib.org/")
4048 (synopsis "2D plotting library for Python")
4049 (description
4050 "Matplotlib is a Python 2D plotting library which produces publication
4051 quality figures in a variety of hardcopy formats and interactive environments
4052 across platforms. Matplotlib can be used in Python scripts, the python and
4053 ipython shell, web application servers, and six graphical user interface
4054 toolkits.")
4055 (license license:psfl)
4056 (properties `((python2-variant . ,(delay python2-matplotlib))))))
4057
4058 (define-public python2-matplotlib
4059 (let ((matplotlib (package-with-python2
4060 (strip-python2-variant python-matplotlib))))
4061 (package (inherit matplotlib)
4062 (version "2.2.4")
4063 (source
4064 (origin
4065 (method url-fetch)
4066 (uri (pypi-uri "matplotlib" version))
4067 (sha256
4068 (base32
4069 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
4070 (arguments
4071 (substitute-keyword-arguments (package-arguments matplotlib)
4072 ((#:phases phases)
4073 `(modify-phases ,phases
4074 (replace 'install-jquery-ui
4075 (lambda* (#:key outputs inputs #:allow-other-keys)
4076 (let ((dir (string-append (assoc-ref outputs "out")
4077 "/lib/python2.7/site-packages/"
4078 "matplotlib/backends/web_backend/")))
4079 (mkdir-p dir)
4080 (invoke "unzip"
4081 (assoc-ref inputs "jquery-ui")
4082 "-d" dir))
4083 #t))
4084 (delete 'fix-and-disable-failing-tests)
4085 (delete 'check))))) ; These tests weren't run the the past.
4086 ;; Make sure to use special packages for Python 2 instead
4087 ;; of those automatically rewritten by package-with-python2.
4088 (propagated-inputs
4089 `(("python2-pycairo" ,python2-pycairo)
4090 ("python2-backports-functools-lru-cache"
4091 ,python2-backports-functools-lru-cache)
4092 ("python2-functools32" ,python2-functools32)
4093 ("python2-pygobject-2" ,python2-pygobject-2)
4094 ("python2-subprocess32" ,python2-subprocess32)
4095 ("python2-tkinter" ,python-2 "tk")
4096 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4097 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4098
4099 (define-public python-matplotlib-documentation
4100 (package
4101 (name "python-matplotlib-documentation")
4102 (version (package-version python-matplotlib))
4103 (source (package-source python-matplotlib))
4104 (build-system python-build-system)
4105 (native-inputs
4106 `(("python-matplotlib" ,python-matplotlib)
4107 ("python-colorspacious" ,python-colorspacious)
4108 ("python-sphinx" ,python-sphinx)
4109 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
4110 ("python-sphinx-gallery" ,python-sphinx-gallery)
4111 ("python-numpydoc" ,python-numpydoc)
4112 ("python-ipython" ,python-ipython)
4113 ("python-ipykernel" ,python-ipykernel)
4114 ("python-mock" ,python-mock)
4115 ("graphviz" ,graphviz)
4116 ("texlive" ,(texlive-union (list texlive-amsfonts
4117 texlive-latex-amsmath
4118 texlive-latex-enumitem
4119 texlive-latex-expdlist
4120 texlive-latex-geometry
4121 texlive-latex-preview
4122 texlive-latex-type1cm
4123 texlive-latex-ucs
4124
4125 texlive-generic-pdftex
4126
4127 texlive-fonts-ec
4128 texlive-fonts-adobe-times
4129 texlive-fonts-txfonts)))
4130 ("texinfo" ,texinfo)
4131 ,@(package-native-inputs python-matplotlib)))
4132 (arguments
4133 `(#:tests? #f ; we're only generating documentation
4134 #:phases
4135 (modify-phases %standard-phases
4136 ;; The tests in python-matplotlib are run after the install phase, so
4137 ;; we need to delete the extra phase here.
4138 (delete 'check)
4139 (replace 'build
4140 (lambda _
4141 (chdir "doc")
4142 (setenv "PYTHONPATH"
4143 (string-append (getenv "PYTHONPATH")
4144 ":" (getcwd) "/../examples/units"))
4145 (substitute* "conf.py"
4146 ;; Don't use git.
4147 (("^SHA = check_output.*")
4148 (string-append "SHA = \"" ,version "\"\n"))
4149 ;; Don't fetch intersphinx files from the Internet
4150 (("^explicit_order_folders" m)
4151 (string-append "intersphinx_mapping = {}\n" m))
4152 (("'sphinx.ext.intersphinx',") "")
4153 ;; Disable URL embedding which requires internet access.
4154 (("'https://docs.scipy.org/doc/numpy'") "None")
4155 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
4156 (invoke "make"
4157 "SPHINXBUILD=sphinx-build"
4158 "SPHINXOPTS=" ; don't abort on warnings
4159 "html" "texinfo")))
4160 (replace 'install
4161 (lambda* (#:key inputs outputs #:allow-other-keys)
4162 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4163 (doc (string-append data "/doc/python-matplotlib-" ,version))
4164 (info (string-append data "/info"))
4165 (html (string-append doc "/html")))
4166 (mkdir-p html)
4167 (mkdir-p info)
4168 (copy-recursively "build/html" html)
4169 (symlink (string-append html "/_images")
4170 (string-append info "/matplotlib-figures"))
4171 (with-directory-excursion "build/texinfo"
4172 (substitute* "matplotlib.texi"
4173 (("@image\\{([^,]*)" all file)
4174 (string-append "@image{matplotlib-figures/" file)))
4175 (symlink (string-append html "/_images")
4176 "./matplotlib-figures")
4177 (invoke "makeinfo" "--no-split"
4178 "-o" "matplotlib.info" "matplotlib.texi"))
4179 (install-file "build/texinfo/matplotlib.info" info))
4180 #t)))))
4181 (home-page (package-home-page python-matplotlib))
4182 (synopsis "Documentation for the python-matplotlib package")
4183 (description (package-description python-matplotlib))
4184 (license (package-license python-matplotlib))))
4185
4186 (define-public python2-matplotlib-documentation
4187 (let ((parent (package-with-python2 python-matplotlib-documentation)))
4188 (package
4189 (inherit parent)
4190 (native-inputs
4191 (alist-delete "python-sphinx-copybutton"
4192 (package-native-inputs parent))))))
4193
4194 (define-public python-matplotlib-venn
4195 (package
4196 (name "python-matplotlib-venn")
4197 (version "0.11.5")
4198 (source
4199 (origin
4200 (method url-fetch)
4201 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4202 (sha256
4203 (base32
4204 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4205 (build-system python-build-system)
4206 (arguments '(#:tests? #f)) ; tests are not included
4207 (propagated-inputs
4208 `(("python-matplotlib" ,python-matplotlib)
4209 ("python-numpy" ,python-numpy)
4210 ("python-scipy" ,python-scipy)))
4211 (native-inputs
4212 `(("unzip" ,unzip)))
4213 (home-page "https://github.com/konstantint/matplotlib-venn")
4214 (synopsis "Plot area-proportional Venn diagrams")
4215 (description
4216 "This package provides tools for plotting area-proportional two- and
4217 three-way Venn diagrams in @code{matplotlib}.")
4218 (license license:expat)))
4219
4220 (define-public python2-pysnptools
4221 (package
4222 (name "python2-pysnptools")
4223 (version "0.3.13")
4224 (source
4225 (origin
4226 (method url-fetch)
4227 (uri (pypi-uri "pysnptools" version))
4228 (sha256
4229 (base32
4230 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
4231 (build-system python-build-system)
4232 (arguments
4233 `(#:python ,python-2 ; only Python 2.7 is supported
4234 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
4235 (propagated-inputs
4236 `(("python2-numpy" ,python2-numpy)
4237 ("python2-scipy" ,python2-scipy)
4238 ("python2-pandas" ,python2-pandas)))
4239 (native-inputs
4240 `(("python2-cython" ,python2-cython)))
4241 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
4242 (synopsis "Library for reading and manipulating genetic data")
4243 (description
4244 "PySnpTools is a library for reading and manipulating genetic data. It
4245 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4246 those files. It can also efficiently manipulate ranges of integers using set
4247 operators such as union, intersection, and difference.")
4248 (license license:asl2.0)))
4249
4250 (define-public python-socksipy-branch
4251 (package
4252 (name "python-socksipy-branch")
4253 (version "1.01")
4254 (source
4255 (origin
4256 (method url-fetch)
4257 (uri (pypi-uri "SocksiPy-branch" version))
4258 (sha256
4259 (base32
4260 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4261 (build-system python-build-system)
4262 (arguments
4263 `(#:tests? #f)) ; There are no tests
4264 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4265 (synopsis "Python SOCKS module")
4266 (description
4267 "SocksiPy - A Python SOCKS client module. It provides a
4268 socket-like interface that supports connections to any TCP
4269 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4270 The original version was developed by Dan Haim, this is a
4271 branch created by Mario Vilas to address some open issues,
4272 as the original project seems to have been abandoned circa 2007.")
4273 (license license:bsd-3)))
4274
4275 (define-public python2-socksipy-branch
4276 (package-with-python2 python-socksipy-branch))
4277
4278 (define-public python-socksipychain
4279 (package
4280 (name "python-socksipychain")
4281 (version "2.1.0")
4282 (source
4283 (origin
4284 (method git-fetch)
4285 (uri (git-reference
4286 (url "https://github.com/pagekite/PySocksipyChain.git")
4287 (commit (string-append "v" version))))
4288 (file-name (git-file-name name version))
4289 (sha256
4290 (base32
4291 "0idm9a050rd2kbgbz2sk9ib9589kj4xh1xdnggs6xbq2v2y8f6zn"))))
4292 (build-system python-build-system)
4293 (arguments
4294 `(#:tests? #f)) ; Tests try to access the network.
4295 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
4296 (synopsis "Python SOCKS module with chained proxies support")
4297 (description
4298 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
4299 adds support for arbitrary chaining of proxy servers and various modes of
4300 TLS/SSL encryption. It was developed for use in PageKite, and also includes
4301 a simple netcat replacement with chaining support.")
4302 (license license:bsd-3)))
4303
4304 (define-public python-pycodestyle
4305 (package
4306 (name "python-pycodestyle")
4307 (version "2.5.0")
4308 (source
4309 (origin
4310 (method url-fetch)
4311 (uri (pypi-uri "pycodestyle" version))
4312 (sha256
4313 (base32
4314 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
4315 (build-system python-build-system)
4316 (home-page "https://pycodestyle.readthedocs.io/")
4317 (synopsis "Python style guide checker")
4318 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4319 Python code against some of the style conventions in
4320 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4321 (license license:expat)))
4322
4323 (define-public python2-pycodestyle
4324 (package-with-python2 python-pycodestyle))
4325
4326 (define-public python-multidict
4327 (package
4328 (name "python-multidict")
4329 (version "4.2.0")
4330 (source
4331 (origin
4332 (method url-fetch)
4333 (uri (pypi-uri "multidict" version))
4334 (sha256
4335 (base32
4336 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4337 (build-system python-build-system)
4338 (native-inputs
4339 `(("python-pytest" ,python-pytest)
4340 ("python-pytest-runner" ,python-pytest-runner)))
4341 (home-page "https://github.com/aio-libs/multidict/")
4342 (synopsis "Multidict implementation")
4343 (description "Multidict is dict-like collection of key-value pairs
4344 where key might be occurred more than once in the container.")
4345 (license license:asl2.0)))
4346
4347 (define-public python-orderedmultidict
4348 (package
4349 (name "python-orderedmultidict")
4350 (version "0.7.11")
4351 (source
4352 (origin
4353 (method url-fetch)
4354 (uri (pypi-uri "orderedmultidict" version))
4355 (sha256
4356 (base32
4357 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4358 (build-system python-build-system)
4359 (arguments
4360 `(#:phases
4361 (modify-phases %standard-phases
4362 (add-after 'unpack 'fix-tests
4363 (lambda _
4364 ;; The package uses nosetest for running the tests.
4365 ;; Adding this initfile allows to run the test suite
4366 ;; without requiring nosetest.
4367 (with-output-to-file "tests/__init__.py" newline)
4368 #t)))))
4369 (propagated-inputs
4370 `(("python-six" ,python-six)))
4371 (native-inputs
4372 `(("python-pycodestyle" ,python-pycodestyle)))
4373 (home-page "https://github.com/gruns/orderedmultidict")
4374 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4375 (description "This package contains a library for ordered multivalue
4376 dictionaries. A multivalue dictionary is a dictionary that can store
4377 multiple values for the same key. An ordered multivalue dictionary is a
4378 multivalue dictionary that retains the order of insertions and deletions.")
4379 (license license:unlicense)))
4380
4381 (define-public python2-orderedmultidict
4382 (package-with-python2 python-orderedmultidict))
4383
4384 (define-public python-autopep8
4385 (package
4386 (name "python-autopep8")
4387 (version "1.3.5")
4388 (source
4389 (origin
4390 (method url-fetch)
4391 (uri (pypi-uri "autopep8" version))
4392 (sha256
4393 (base32
4394 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4395 (build-system python-build-system)
4396 (propagated-inputs
4397 `(("python-pycodestyle" ,python-pycodestyle)))
4398 (home-page "https://github.com/hhatto/autopep8")
4399 (synopsis "Format Python code according to the PEP 8 style guide")
4400 (description
4401 "@code{autopep8} automatically formats Python code to conform to
4402 the PEP 8 style guide. It uses the pycodestyle utility to determine
4403 what parts of the code needs to be formatted. @code{autopep8} is
4404 capable of fixing most of the formatting issues that can be reported
4405 by pycodestyle.")
4406 (license (license:non-copyleft
4407 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4408
4409 (define-public python2-autopep8
4410 (package-with-python2 python-autopep8))
4411
4412 (define-public python-distutils-extra
4413 (package
4414 (name "python-distutils-extra")
4415 (version "2.38")
4416 (source
4417 (origin
4418 (method url-fetch)
4419 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4420 version "/+download/python-distutils-extra-"
4421 version ".tar.gz"))
4422 (sha256
4423 (base32
4424 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4425 (build-system python-build-system)
4426 (home-page "https://launchpad.net/python-distutils-extra/")
4427 (synopsis "Enhancements to Python's distutils")
4428 (description
4429 "The python-distutils-extra module enables you to easily integrate
4430 gettext support, themed icons, and scrollkeeper-based documentation into
4431 Python's distutils.")
4432 (license license:gpl2)))
4433
4434 (define-public python2-distutils-extra
4435 (package-with-python2 python-distutils-extra))
4436
4437 (define-public python2-elib.intl
4438 (package
4439 (name "python2-elib.intl")
4440 (version "0.0.3")
4441 (source
4442 (origin
4443 ;; This project doesn't tag releases or publish tarballs, so we take
4444 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4445 (method git-fetch)
4446 (uri (git-reference
4447 (url "https://github.com/dieterv/elib.intl.git")
4448 (commit "d09997cfef")))
4449 (file-name (string-append name "-" version "-checkout"))
4450 (sha256
4451 (base32
4452 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4453 (build-system python-build-system)
4454 (arguments
4455 ;; incompatible with Python 3 (exception syntax)
4456 `(#:python ,python-2
4457 #:tests? #f))
4458 (home-page "https://github.com/dieterv/elib.intl")
4459 (synopsis "Enhanced internationalization for Python")
4460 (description
4461 "The elib.intl module provides enhanced internationalization (I18N)
4462 services for your Python modules and applications.")
4463 (license license:lgpl3+)))
4464
4465 (define-public python-olefile
4466 (package
4467 (name "python-olefile")
4468 (version "0.46")
4469 (source
4470 (origin
4471 (method url-fetch)
4472 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4473 "download/v" version "/olefile-" version ".tar.gz"))
4474 (file-name (string-append name "-" version ".tar.gz"))
4475 (sha256
4476 (base32
4477 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
4478 (build-system python-build-system)
4479 (home-page "https://www.decalage.info/python/olefileio")
4480 (synopsis "Read and write Microsoft OLE2 files.")
4481 (description
4482 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4483 Storage or Compound Document, Microsoft Office). It is an improved version of
4484 the OleFileIO module from PIL, the Python Image Library.")
4485 (license license:bsd-3)))
4486
4487 (define-public python2-olefile
4488 (package-with-python2 python-olefile))
4489
4490 (define-public python-pillow
4491 (package
4492 (name "python-pillow")
4493 (version "6.2.1")
4494 (source
4495 (origin
4496 (method url-fetch)
4497 (uri (pypi-uri "Pillow" version))
4498 (sha256
4499 (base32
4500 "1c8wkzc58f5wdh006jvmwdk3wxld1xgagcbdvj7iv17qi0m9fkmz"))))
4501 (build-system python-build-system)
4502 (native-inputs
4503 `(("python-pytest" ,python-pytest)))
4504 (inputs
4505 `(("freetype" ,freetype)
4506 ("lcms" ,lcms)
4507 ("libjpeg" ,libjpeg)
4508 ("libtiff" ,libtiff)
4509 ("libwebp" ,libwebp)
4510 ("openjpeg" ,openjpeg)
4511 ("zlib" ,zlib)))
4512 (propagated-inputs
4513 `(("python-olefile" ,python-olefile)))
4514 (arguments
4515 `(#:phases
4516 (modify-phases %standard-phases
4517 (add-after 'unpack 'patch-ldconfig
4518 (lambda _
4519 (substitute* "setup.py"
4520 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4521 (replace 'check
4522 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
4523 (if tests?
4524 (begin
4525 (setenv "HOME" (getcwd))
4526 ;; Make installed package available for running the tests.
4527 (add-installed-pythonpath inputs outputs)
4528 (invoke "python" "selftest.py" "--installed")
4529 (invoke "python" "-m" "pytest" "-vv"))
4530 #t))))))
4531 (home-page "https://python-pillow.org")
4532 (synopsis "Fork of the Python Imaging Library")
4533 (description
4534 "The Python Imaging Library adds image processing capabilities to your
4535 Python interpreter. This library provides extensive file format support, an
4536 efficient internal representation, and fairly powerful image processing
4537 capabilities. The core image library is designed for fast access to data
4538 stored in a few basic pixel formats. It should provide a solid foundation for
4539 a general image processing tool.")
4540 (license (license:x11-style
4541 "http://www.pythonware.com/products/pil/license.htm"
4542 "The PIL Software License"))))
4543
4544 (define-public python2-pillow
4545 (package-with-python2 python-pillow))
4546
4547 (define-public python-pycparser
4548 (package
4549 (name "python-pycparser")
4550 (version "2.19")
4551 (source
4552 (origin
4553 (method url-fetch)
4554 (uri (pypi-uri "pycparser" version))
4555 (sha256
4556 (base32
4557 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
4558 (outputs '("out" "doc"))
4559 (build-system python-build-system)
4560 (native-inputs
4561 `(("pkg-config" ,pkg-config)))
4562 (arguments
4563 `(#:phases
4564 (modify-phases %standard-phases
4565 (replace 'check
4566 (lambda _
4567 (with-directory-excursion "tests"
4568 (invoke "python" "all_tests.py"))
4569 #t))
4570 (add-after 'install 'install-doc
4571 (lambda* (#:key outputs #:allow-other-keys)
4572 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4573 (doc (string-append data "/doc/" ,name "-" ,version))
4574 (examples (string-append doc "/examples")))
4575 (mkdir-p examples)
4576 (for-each (lambda (file)
4577 (copy-file (string-append "." file)
4578 (string-append doc file)))
4579 '("/README.rst" "/CHANGES" "/LICENSE"))
4580 (copy-recursively "examples" examples)
4581 #t))))))
4582 (home-page "https://github.com/eliben/pycparser")
4583 (synopsis "C parser in Python")
4584 (description
4585 "Pycparser is a complete parser of the C language, written in pure Python
4586 using the PLY parsing library. It parses C code into an AST and can serve as
4587 a front-end for C compilers or analysis tools.")
4588 (license license:bsd-3)))
4589
4590 (define-public python2-pycparser
4591 (package-with-python2 python-pycparser))
4592
4593 (define-public python-pywavelets
4594 (package
4595 (name "python-pywavelets")
4596 (version "1.0.1")
4597 (home-page "https://github.com/PyWavelets/pywt")
4598 (source (origin
4599 (method url-fetch)
4600 (uri (pypi-uri "PyWavelets" version))
4601 (sha256
4602 (base32
4603 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4604 (build-system python-build-system)
4605 (arguments
4606 '(#:modules ((ice-9 ftw)
4607 (srfi srfi-1)
4608 (srfi srfi-26)
4609 (guix build utils)
4610 (guix build python-build-system))
4611 #:phases (modify-phases %standard-phases
4612 (replace 'check
4613 (lambda _
4614 (let ((cwd (getcwd))
4615 (libdir (find (cut string-prefix? "lib." <>)
4616 (scandir "build"))))
4617 (with-directory-excursion (string-append cwd "/build/" libdir)
4618 (invoke "nosetests" "-v" "."))))))))
4619 (native-inputs
4620 `(("python-matplotlib" ,python-matplotlib) ;for tests
4621 ("python-nose" ,python-nose)))
4622 (propagated-inputs
4623 `(("python-numpy" ,python-numpy)))
4624 (synopsis "Wavelet transforms in Python")
4625 (description
4626 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4627 mathematical basis functions that are localized in both time and frequency.
4628 Wavelet transforms are time-frequency transforms employing wavelets. They are
4629 similar to Fourier transforms, the difference being that Fourier transforms are
4630 localized only in frequency instead of in time and frequency.")
4631 (license license:expat)))
4632
4633 (define-public python2-pywavelets
4634 (package-with-python2 python-pywavelets))
4635
4636 (define-public python-xcffib
4637 (package
4638 (name "python-xcffib")
4639 (version "0.6.0")
4640 (source
4641 (origin
4642 (method url-fetch)
4643 (uri (pypi-uri "xcffib" version))
4644 (sha256
4645 (base32
4646 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4647 (build-system python-build-system)
4648 (inputs
4649 `(("libxcb" ,libxcb)))
4650 (propagated-inputs
4651 `(("python-cffi" ,python-cffi) ; used at run time
4652 ("python-six" ,python-six)))
4653 (arguments
4654 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4655 #:tests? #f
4656 #:phases
4657 (modify-phases %standard-phases
4658 (add-after 'unpack 'fix-libxcb-path
4659 (lambda* (#:key inputs #:allow-other-keys)
4660 (let ((libxcb (assoc-ref inputs "libxcb")))
4661 (substitute* '("xcffib/__init__.py")
4662 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4663 #t)))
4664 (add-after 'install 'install-doc
4665 (lambda* (#:key outputs #:allow-other-keys)
4666 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4667 "/doc/" ,name "-" ,version)))
4668 (mkdir-p doc)
4669 (copy-file "README.md"
4670 (string-append doc "/README.md"))
4671 #t))))))
4672 (home-page "https://github.com/tych0/xcffib")
4673 (synopsis "XCB Python bindings")
4674 (description
4675 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4676 support for Python 3 and PyPy. It is based on cffi.")
4677 (license license:expat)))
4678
4679 (define-public python2-xcffib
4680 (package-with-python2 python-xcffib))
4681
4682 (define-public python-cairocffi
4683 (package
4684 (name "python-cairocffi")
4685 (version "0.9.0")
4686 (source
4687 (origin
4688 (method url-fetch)
4689 (uri (pypi-uri "cairocffi" version))
4690 (sha256
4691 (base32
4692 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4693 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4694 (build-system python-build-system)
4695 (outputs '("out" "doc"))
4696 (inputs
4697 `(("glib" ,glib)
4698 ("gtk+" ,gtk+)
4699 ("gdk-pixbuf" ,gdk-pixbuf)
4700 ("cairo" ,cairo)
4701 ("pango" ,pango)))
4702 (native-inputs
4703 `(("pkg-config" ,pkg-config)
4704 ("python-pytest" ,python-pytest)
4705 ("python-pytest-cov" ,python-pytest-cov)
4706 ("python-pytest-runner" ,python-pytest-runner)
4707 ("python-sphinx" ,python-sphinx)
4708 ("python-docutils" ,python-docutils)))
4709 (propagated-inputs
4710 `(("python-xcffib" ,python-xcffib))) ; used at run time
4711 (arguments
4712 `(#:phases
4713 (modify-phases %standard-phases
4714 (add-after 'unpack 'patch-paths
4715 (lambda* (#:key inputs outputs #:allow-other-keys)
4716 (substitute* (find-files "." "\\.py$")
4717 (("dlopen\\(ffi, 'cairo'")
4718 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4719 "/lib/libcairo.so.2'"))
4720 (("dlopen\\(ffi, 'gdk-3'")
4721 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4722 "/lib/libgtk-3.so.0'"))
4723 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4724 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4725 "/lib/libgdk_pixbuf-2.0.so.0'"))
4726 (("dlopen\\(ffi, 'glib-2.0'")
4727 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4728 "/lib/libglib-2.0.so.0'"))
4729 (("dlopen\\(ffi, 'gobject-2.0'")
4730 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4731 "/lib/libgobject-2.0.so.0'"))
4732 (("dlopen\\(ffi, 'pangocairo-1.0'")
4733 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4734 "/lib/libpangocairo-1.0.so.0'"))
4735 (("dlopen\\(ffi, 'pango-1.0'")
4736 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4737 "/lib/libpango-1.0.so.0'")))
4738 #t))
4739 (add-after 'install 'install-doc
4740 (lambda* (#:key inputs outputs #:allow-other-keys)
4741 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4742 (doc (string-append data "/doc/" ,name "-" ,version))
4743 (html (string-append doc "/html")))
4744 (setenv "LD_LIBRARY_PATH"
4745 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4746 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4747 (setenv "LANG" "en_US.UTF-8")
4748 (mkdir-p html)
4749 (for-each (lambda (file)
4750 (copy-file (string-append "." file)
4751 (string-append doc file)))
4752 '("/README.rst" "/CHANGES" "/LICENSE"))
4753 (system* "python" "setup.py" "build_sphinx")
4754 (copy-recursively "docs/_build/html" html)
4755 #t))))))
4756 (home-page "https://github.com/Kozea/cairocffi")
4757 (synopsis "Python bindings and object-oriented API for Cairo")
4758 (description
4759 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4760 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4761 graphics library with support for multiple backends including image buffers,
4762 PNG, PostScript, PDF, and SVG file output.")
4763 (license license:bsd-3)))
4764
4765 (define-public python2-cairocffi
4766 (package-with-python2 python-cairocffi))
4767
4768 (define-public python-decorator
4769 (package
4770 (name "python-decorator")
4771 (version "4.3.0")
4772 (source
4773 (origin
4774 (method url-fetch)
4775 (uri (pypi-uri "decorator" version))
4776 (sha256
4777 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4778 (build-system python-build-system)
4779 (home-page "https://pypi.python.org/pypi/decorator/")
4780 (synopsis "Python module to simplify usage of decorators")
4781 (description
4782 "The aim of the decorator module is to simplify the usage of decorators
4783 for the average programmer, and to popularize decorators usage giving examples
4784 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4785 etc. The core of this module is a decorator factory.")
4786 (license license:expat)))
4787
4788 (define-public python2-decorator
4789 (package-with-python2 python-decorator))
4790
4791 (define-public python-drmaa
4792 (package
4793 (name "python-drmaa")
4794 (version "0.7.7")
4795 (source
4796 (origin
4797 (method url-fetch)
4798 (uri (pypi-uri "drmaa" version))
4799 (sha256
4800 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4801 (build-system python-build-system)
4802 ;; The test suite requires libdrmaa which is provided by the cluster
4803 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4804 ;; should be set to the path of the libdrmaa library.
4805 (arguments '(#:tests? #f))
4806 (native-inputs
4807 `(("python-nose" ,python-nose)))
4808 (home-page "https://pypi.python.org/pypi/drmaa")
4809 (synopsis "Python bindings for the DRMAA library")
4810 (description
4811 "A Python package for Distributed Resource Management (DRM) job
4812 submission and control. This package is an implementation of the DRMAA 1.0
4813 Python language binding specification.")
4814 (license license:bsd-3)))
4815
4816 (define-public python2-drmaa
4817 (package-with-python2 python-drmaa))
4818
4819 (define-public python-grako
4820 (package
4821 (name "python-grako")
4822 (version "3.99.9")
4823 (source
4824 (origin
4825 (method url-fetch)
4826 (uri
4827 (pypi-uri "grako" version ".zip"))
4828 (sha256
4829 (base32
4830 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4831 (build-system python-build-system)
4832 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4833 (native-inputs
4834 `(("unzip" ,unzip)
4835 ("python-pytest" ,python-pytest)
4836 ("python-pytest-runner" ,python-pytest-runner)))
4837 (home-page "https://bitbucket.org/neogeny/grako")
4838 (synopsis "EBNF parser generator")
4839 (description
4840 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4841 memoizing PEG/Packrat parser in Python.")
4842 (license license:bsd-3)))
4843
4844 (define-public python2-grako
4845 (package-with-python2 python-grako))
4846
4847 (define-public python-gridmap
4848 (package
4849 (name "python-gridmap")
4850 (version "0.13.0")
4851 (source
4852 (origin
4853 (method git-fetch)
4854 (uri (git-reference
4855 (url "https://github.com/pygridtools/gridmap.git")
4856 (commit (string-append "v" version))))
4857 (file-name (git-file-name name version))
4858 (sha256
4859 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
4860 (build-system python-build-system)
4861 (arguments
4862 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4863 (propagated-inputs
4864 `(("python-psutil" ,python-psutil)
4865 ("python-drmaa" ,python-drmaa)
4866 ("python-pyzmq" ,python-pyzmq)))
4867 (home-page "https://github.com/pygridtools/gridmap")
4868 (synopsis "Create jobs on a cluster directly from Python")
4869 (description
4870 "Gridmap is a Python package to allow you to easily create jobs on the
4871 cluster directly from Python. You can directly map Python functions onto the
4872 cluster without needing to write any wrapper code yourself.")
4873 (license license:gpl3+)))
4874
4875 (define-public python2-gridmap
4876 (package-with-python2 python-gridmap))
4877
4878 (define-public python-honcho
4879 (package
4880 (name "python-honcho")
4881 (version "1.0.1")
4882 (source
4883 (origin
4884 (method git-fetch)
4885 (uri (git-reference
4886 (url "https://github.com/nickstenning/honcho.git")
4887 (commit (string-append "v" version))))
4888 (file-name (git-file-name name version))
4889 (sha256
4890 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
4891 (build-system python-build-system)
4892 (native-inputs
4893 `(("python-pytest" ,python-pytest)
4894 ("python-mock" ,python-mock)
4895 ("python-tox" ,python-tox)
4896 ("which" ,which))) ;for tests
4897 (propagated-inputs
4898 `(("python-jinja2" ,python-jinja2)))
4899 (arguments
4900 `(#:phases
4901 (modify-phases %standard-phases
4902 (delete 'check)
4903 (add-after 'install 'check
4904 (lambda* (#:key outputs inputs #:allow-other-keys)
4905 ;; fix honcho path in testsuite
4906 (substitute* "tests/conftest.py"
4907 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4908 "/bin/honcho" "'")))
4909 ;; It's easier to run tests after install.
4910 ;; Make installed package available for running the tests
4911 (add-installed-pythonpath inputs outputs)
4912 (invoke "py.test" "-v"))))))
4913 (home-page "https://github.com/nickstenning/honcho")
4914 (synopsis "Manage Procfile-based applications")
4915 (description
4916 "A Procfile is a file which describes how to run an application
4917 consisting of several processes. honcho starts all listed processes.
4918 The output of all running processes is collected by honcho and
4919 displayed.")
4920 (license license:expat)))
4921
4922 (define-public python2-honcho
4923 (package-with-python2 python-honcho))
4924
4925 (define-public python-pexpect
4926 (package
4927 (name "python-pexpect")
4928 (version "4.6.0")
4929 (source
4930 (origin
4931 (method url-fetch)
4932 (uri (pypi-uri "pexpect" version))
4933 (sha256
4934 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4935 (build-system python-build-system)
4936 (arguments
4937 `(#:phases
4938 (modify-phases %standard-phases
4939 (add-before 'check 'prepare-tests
4940 (lambda _
4941 (substitute* (find-files "tests")
4942 (("/bin/ls") (which "ls"))
4943 (("/bin/echo") (which "echo"))
4944 (("/bin/which") (which "which"))
4945 ;; Many tests try to use the /bin directory which
4946 ;; is not present in the build environment.
4947 ;; Use one that's non-empty and unlikely to change.
4948 (("/bin'") "/dev'"))
4949 ;; XXX: Socket connection test gets "Connection reset by peer".
4950 ;; Why does it not work? Delete for now.
4951 (delete-file "tests/test_socket.py")
4952 #t))
4953 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4954 (native-inputs
4955 `(("python-nose" ,python-nose)
4956 ("python-pytest" ,python-pytest)
4957 ("man-db" ,man-db)
4958 ("which" ,which)
4959 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4960 (propagated-inputs
4961 `(("python-ptyprocess" ,python-ptyprocess)))
4962 (home-page "http://pexpect.readthedocs.org/")
4963 (synopsis "Controlling interactive console applications")
4964 (description
4965 "Pexpect is a pure Python module for spawning child applications;
4966 controlling them; and responding to expected patterns in their output.
4967 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4968 child application and control it as if a human were typing commands.")
4969 (license license:isc)))
4970
4971 (define-public python2-pexpect
4972 (package-with-python2 python-pexpect))
4973
4974 (define-public python-setuptools-scm
4975 (package
4976 (name "python-setuptools-scm")
4977 (version "3.2.0")
4978 (source (origin
4979 (method url-fetch)
4980 (uri (pypi-uri "setuptools_scm" version))
4981 (sha256
4982 (base32
4983 "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj"))))
4984 (build-system python-build-system)
4985 (home-page "https://github.com/pypa/setuptools_scm/")
4986 (synopsis "Manage Python package versions in SCM metadata")
4987 (description
4988 "Setuptools_scm handles managing your Python package versions in
4989 @dfn{software configuration management} (SCM) metadata instead of declaring
4990 them as the version argument or in a SCM managed file.")
4991 (license license:expat)))
4992
4993 ;; Needed by python-lazy-object-proxy, remove on next update cycle.
4994 (define-public python-setuptools-scm-3.3
4995 (package
4996 (inherit python-setuptools-scm)
4997 (version "3.3.3")
4998 (source (origin
4999 (method url-fetch)
5000 (uri (pypi-uri "setuptools_scm" version))
5001 (sha256
5002 (base32
5003 "19cyndx23xmpbhz4qrwmfwsmnnaczd0dw7qg977ksq2dbvxy29dx"))))))
5004
5005 (define-public python2-setuptools-scm
5006 (package-with-python2 python-setuptools-scm))
5007
5008 (define-public python-pathlib2
5009 (package
5010 (name "python-pathlib2")
5011 (version "2.3.3")
5012 (source
5013 (origin
5014 (method url-fetch)
5015 (uri (pypi-uri "pathlib2" version))
5016 (sha256
5017 (base32
5018 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
5019 (build-system python-build-system)
5020 (propagated-inputs
5021 `(("python-scandir" ,python-scandir)
5022 ("python-six" ,python-six)))
5023 (home-page "https://pypi.python.org/pypi/pathlib2/")
5024 (synopsis "Object-oriented file system paths")
5025 (description "The goal of pathlib2 is to provide a backport of the
5026 standard @code{pathlib} module which tracks the standard library module, so
5027 all the newest features of the standard @code{pathlib} can be used also on
5028 older Python versions.")
5029 (license license:expat)))
5030
5031 (define-public python2-importlib-resources
5032 (package
5033 (name "python2-importlib-resources")
5034 (version "1.0.2")
5035 (source (origin
5036 (method url-fetch)
5037 (uri (pypi-uri "importlib_resources" version))
5038 (sha256
5039 (base32
5040 "0y3hg12iby1qyaspnbisz4s4vxax7syikk3skznwqizqyv89y9yk"))))
5041 (build-system python-build-system)
5042 (arguments
5043 `(#:python ,python-2))
5044 (native-inputs
5045 `(("python-wheel" ,python2-wheel)))
5046 (propagated-inputs
5047 `(("python-pathlib2" ,python2-pathlib2)
5048 ("python-typing" ,python2-typing)))
5049 (home-page "https://gitlab.com/python-devs/importlib_resources")
5050 (synopsis "Backport of @code{importlib.resources} from Python 3.7")
5051 (description
5052 "This package provides an implementation of @code{importlib.resources}
5053 for older versions of Python.")
5054 (license license:asl2.0)))
5055
5056 (define-public python-importlib-metadata
5057 (package
5058 (name "python-importlib-metadata")
5059 (version "1.4.0")
5060 (source
5061 (origin
5062 (method url-fetch)
5063 (uri (pypi-uri "importlib_metadata" version))
5064 (sha256
5065 (base32 "1n76444v7zn910xrhh8954jdn4byxbn9f1jck6b85a716mbh2z7i"))))
5066 (build-system python-build-system)
5067 (propagated-inputs
5068 `(("python-zipp" ,python-zipp)))
5069 (native-inputs
5070 `(("python-setuptools-scm" ,python-setuptools-scm)
5071 ("python-packaging" ,python-packaging)))
5072 (home-page "https://importlib-metadata.readthedocs.io/")
5073 (synopsis "Read metadata from Python packages")
5074 (description
5075 "@code{importlib_metadata} is a library which provides an API for
5076 accessing an installed Python package's metadata, such as its entry points or
5077 its top-level name. This functionality intends to replace most uses of
5078 @code{pkg_resources} entry point API and metadata API. Along with
5079 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
5080 need to use the older and less efficient @code{pkg_resources} package.")
5081 (properties `((python2-variant . ,(delay python2-importlib-metadata))))
5082 (license license:asl2.0)))
5083
5084 (define-public python2-importlib-metadata
5085 (let ((base (package-with-python2 (strip-python2-variant
5086 python-importlib-metadata))))
5087 (package/inherit
5088 base
5089 (name "python2-importlib-metadata")
5090 (propagated-inputs
5091 `(("python-configparser" ,python2-configparser)
5092 ("python-contextlib2" ,python2-contextlib2)
5093 ("python-importlib-resources" ,python2-importlib-resources)
5094 ("python-pathlib2" ,python2-pathlib2)
5095 ,@(package-propagated-inputs base))))))
5096
5097 (define-public python-jaraco-packaging
5098 (package
5099 (name "python-jaraco-packaging")
5100 (version "6.1")
5101 (source
5102 (origin
5103 (method url-fetch)
5104 (uri (pypi-uri "jaraco.packaging" version))
5105 (sha256
5106 (base32
5107 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
5108 (build-system python-build-system)
5109 (propagated-inputs
5110 `(("python-pytest" ,python-pytest)
5111 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
5112 ("python-pytest-flake8" ,python-pytest-flake8)
5113 ("python-rst.linker" ,python-rst.linker)
5114 ("python-setuptools" ,python-setuptools)
5115 ("python-setuptools-scm" ,python-setuptools-scm)
5116 ("python-six" ,python-six)
5117 ("python-sphinx" ,python-sphinx)))
5118 (home-page "https://github.com/jaraco/jaraco.packaging")
5119 (synopsis "Tools to supplement packaging Python releases")
5120 (description
5121 "This package provides various tools to supplement packaging Python
5122 releases.")
5123 (license license:expat)))
5124
5125 (define-public python-pathpy
5126 (package
5127 (name "python-pathpy")
5128 (version "11.5.1")
5129 (source
5130 (origin
5131 (method url-fetch)
5132 (uri (pypi-uri "path.py" version))
5133 (sha256
5134 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
5135 (outputs '("out" "doc"))
5136 (build-system python-build-system)
5137 (propagated-inputs
5138 `(("python-appdirs" ,python-appdirs)
5139 ("python-importlib-metadata" ,python-importlib-metadata)))
5140 (native-inputs
5141 `(("python-setuptools-scm" ,python-setuptools-scm)
5142 ("python-sphinx" ,python-sphinx)
5143 ("python-rst.linker" ,python-rst.linker)
5144 ("python-pytest" ,python-pytest)
5145 ("python-pytest-runner" ,python-pytest-runner)
5146 ("python-jaraco-packaging" ,python-jaraco-packaging)))
5147 (arguments
5148 `(#:phases
5149 (modify-phases %standard-phases
5150 (add-after 'build 'build-doc
5151 (lambda _
5152 (setenv "LANG" "en_US.UTF-8")
5153 (invoke "python" "setup.py" "build_sphinx")))
5154 (add-after 'install 'install-doc
5155 (lambda* (#:key outputs #:allow-other-keys)
5156 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5157 (doc (string-append data "/doc/" ,name "-" ,version))
5158 (html (string-append doc "/html")))
5159 (mkdir-p html)
5160 (for-each (lambda (file)
5161 (copy-file file (string-append doc "/" file)))
5162 '("README.rst" "CHANGES.rst"))
5163 (copy-recursively "build/sphinx/html" html)
5164 #t)))
5165 (replace 'check
5166 (lambda _
5167 ;; The import time test aborts if an import takes longer than
5168 ;; 100ms. It may very well take a little longer than that.
5169 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
5170 (home-page "https://github.com/jaraco/path.py")
5171 (synopsis "Python module wrapper for built-in os.path")
5172 (description
5173 "@code{path.py} implements path objects as first-class entities, allowing
5174 common operations on files to be invoked on those path objects directly.")
5175 (license license:expat)))
5176
5177 (define-public python2-pathpy
5178 (package-with-python2 python-pathpy))
5179
5180 (define-public python-simplegeneric
5181 (package
5182 (name "python-simplegeneric")
5183 (version "0.8.1")
5184 (source
5185 (origin
5186 (method url-fetch)
5187 (uri (pypi-uri "simplegeneric" version ".zip"))
5188 (sha256
5189 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5190 (build-system python-build-system)
5191 (native-inputs
5192 `(("unzip" ,unzip)))
5193 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5194 (synopsis "Python module for simple generic functions")
5195 (description
5196 "The simplegeneric module lets you define simple single-dispatch generic
5197 functions, akin to Python’s built-in generic functions like @code{len()},
5198 @code{iter()} and so on. However, instead of using specially-named methods,
5199 these generic functions use simple lookup tables, akin to those used by
5200 e.g. @code{pickle.dump()} and other generic functions found in the Python
5201 standard library.")
5202 (license license:zpl2.1)))
5203
5204 (define-public python2-simplegeneric
5205 (package-with-python2 python-simplegeneric))
5206
5207 (define-public python-ipython-genutils
5208 ;; TODO: This package is retired, check if can be removed, see description.
5209 (package
5210 (name "python-ipython-genutils")
5211 (version "0.1.0")
5212 (source
5213 (origin
5214 (method url-fetch)
5215 (uri (pypi-uri "ipython_genutils" version))
5216 (sha256
5217 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5218 (build-system python-build-system)
5219 (arguments `(#:tests? #f)) ; no tests
5220 (home-page "https://ipython.org")
5221 (synopsis "Vestigial utilities from IPython")
5222 (description
5223 "This package provides retired utilities from IPython. No packages
5224 outside IPython/Jupyter should depend on it.
5225
5226 This package shouldn't exist. It contains some common utilities shared by
5227 Jupyter and IPython projects during The Big Split. As soon as possible, those
5228 packages will remove their dependency on this, and this package will go
5229 away.")
5230 (license license:bsd-3)))
5231
5232 (define-public python2-ipython-genutils
5233 (package-with-python2 python-ipython-genutils))
5234
5235 (define-public python-traitlets
5236 (package
5237 (name "python-traitlets")
5238 (version "4.3.3")
5239 (source
5240 (origin
5241 (method url-fetch)
5242 (uri (pypi-uri "traitlets" version))
5243 (sha256
5244 (base32
5245 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
5246 (build-system python-build-system)
5247 (arguments
5248 `(#:phases
5249 (modify-phases %standard-phases
5250 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5251 (propagated-inputs
5252 `(("python-ipython-genutils" ,python-ipython-genutils)
5253 ("python-decorator" ,python-decorator)))
5254 (native-inputs
5255 `(("python-pytest" ,python-pytest)))
5256 (properties `((python2-variant . ,(delay python2-traitlets))))
5257 (home-page "https://ipython.org")
5258 (synopsis "Configuration system for Python applications")
5259 (description
5260 "Traitlets is a framework that lets Python classes have attributes with
5261 type checking, dynamically calculated default values, and ‘on change’
5262 callbacks. The package also includes a mechanism to use traitlets for
5263 configuration, loading values from files or from command line arguments. This
5264 is a distinct layer on top of traitlets, so you can use traitlets in your code
5265 without using the configuration machinery.")
5266 (license license:bsd-3)))
5267
5268 (define-public python2-traitlets
5269 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5270 (package
5271 (inherit traitlets)
5272 (propagated-inputs
5273 `(("python2-enum34" ,python2-enum34)
5274 ,@(package-propagated-inputs traitlets))))))
5275
5276 (define-public python-jupyter-core
5277 (package
5278 (name "python-jupyter-core")
5279 (version "4.4.0")
5280 (source
5281 (origin
5282 (method url-fetch)
5283 (uri (string-append (pypi-uri "jupyter_core" version)))
5284 (sha256
5285 (base32
5286 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5287 (build-system python-build-system)
5288 ;; FIXME: not sure how to run the tests
5289 (arguments `(#:tests? #f))
5290 (propagated-inputs
5291 `(("python-traitlets" ,python-traitlets)))
5292 (home-page "http://jupyter.org/")
5293 (synopsis "Jupyter base package")
5294 (description
5295 "Jupyter core is the base package on which Jupyter projects rely.")
5296 (license license:bsd-3)))
5297
5298 (define-public python2-jupyter-core
5299 (package-with-python2 python-jupyter-core))
5300
5301 (define-public python-jupyter-client
5302 (package
5303 (name "python-jupyter-client")
5304 (version "5.2.4")
5305 (source
5306 (origin
5307 (method url-fetch)
5308 (uri (pypi-uri "jupyter_client" version))
5309 (sha256
5310 (base32
5311 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5312 (build-system python-build-system)
5313 ;; Tests fail because of missing native python kernel which I assume is
5314 ;; provided by the ipython package, which we cannot use because it would
5315 ;; cause a dependency cycle.
5316 (arguments
5317 `(#:tests? #f
5318
5319 #:phases (modify-phases %standard-phases
5320 (add-after 'unpack 'set-tool-file-names
5321 (lambda* (#:key inputs #:allow-other-keys)
5322 (let ((iproute (assoc-ref inputs "iproute")))
5323 (substitute* "jupyter_client/localinterfaces.py"
5324 (("'ip'")
5325 (string-append "'" iproute "/sbin/ip'")))
5326 #t))))))
5327 (inputs
5328 `(("iproute" ,iproute)))
5329 (propagated-inputs
5330 `(("python-pyzmq" ,python-pyzmq)
5331 ("python-traitlets" ,python-traitlets)
5332 ("python-jupyter-core" ,python-jupyter-core)))
5333 (home-page "http://jupyter.org/")
5334 (synopsis "Jupyter protocol implementation and client libraries")
5335 (description
5336 "The @code{jupyter_client} package contains the reference implementation
5337 of the Jupyter protocol. It also provides client and kernel management APIs
5338 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5339 installing @code{kernelspec}s for use with Jupyter frontends.")
5340 (license license:bsd-3)))
5341
5342 (define-public python2-jupyter-client
5343 (package-with-python2 python-jupyter-client))
5344
5345 (define-public python-ipykernel
5346 (package
5347 (name "python-ipykernel")
5348 (version "5.1.3")
5349 (source
5350 (origin
5351 (method url-fetch)
5352 (uri (pypi-uri "ipykernel" version))
5353 (sha256
5354 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
5355 (build-system python-build-system)
5356 (arguments
5357 `(#:phases
5358 (modify-phases %standard-phases
5359 (replace 'check
5360 (lambda _
5361 (setenv "HOME" "/tmp")
5362 (invoke "pytest" "-v")
5363 #t))
5364 (add-after 'install 'set-python-file-name
5365 (lambda* (#:key outputs #:allow-other-keys)
5366 ;; Record the absolute file name of the 'python' executable in
5367 ;; 'kernel.json'.
5368 (let ((out (assoc-ref outputs "out")))
5369 (substitute* (string-append out "/share/jupyter"
5370 "/kernels/python3/kernel.json")
5371 (("\"python\"")
5372 (string-append "\"" (which "python") "\"")))
5373 #t))))))
5374 (propagated-inputs
5375 `(("python-ipython" ,python-ipython)
5376 ;; imported at runtime during connect
5377 ("python-jupyter-client" ,python-jupyter-client)))
5378 (native-inputs
5379 `(("python-flaky" ,python-flaky)
5380 ("python-nose" ,python-nose)
5381 ("python-pytest" ,python-pytest)))
5382 (home-page "https://ipython.org")
5383 (synopsis "IPython Kernel for Jupyter")
5384 (description
5385 "This package provides the IPython kernel for Jupyter.")
5386 (license license:bsd-3)))
5387
5388 ;; Version 5.1.1 and above no longer support Python 2.
5389 (define-public python2-ipykernel
5390 (package
5391 (name "python2-ipykernel")
5392 (version "5.1.0")
5393 (source
5394 (origin
5395 (method url-fetch)
5396 (uri (pypi-uri "ipykernel" version))
5397 (sha256
5398 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5399 (build-system python-build-system)
5400 (arguments
5401 `(#:python ,python-2
5402 #:phases
5403 (modify-phases %standard-phases
5404 (replace 'check
5405 (lambda _
5406 (setenv "HOME" "/tmp")
5407 (invoke "pytest" "-v")
5408 #t)))))
5409 (propagated-inputs
5410 `(("python2-ipython" ,python2-ipython)
5411 ;; imported at runtime during connect
5412 ("python2-jupyter-client" ,python2-jupyter-client)))
5413 (native-inputs
5414 `(("python2-pytest" ,python2-pytest)
5415 ("python2-nose" ,python2-nose)))
5416 (home-page "https://ipython.org")
5417 (synopsis "IPython Kernel for Jupyter")
5418 (description
5419 "This package provides the IPython kernel for Jupyter.")
5420 (license license:bsd-3)))
5421
5422 (define-public python-pari-jupyter
5423 (package
5424 (name "python-pari-jupyter")
5425 (version "1.3.2")
5426 (source
5427 (origin
5428 (method url-fetch)
5429 (uri (pypi-uri "pari_jupyter" version))
5430 (sha256
5431 (base32
5432 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5433 (build-system python-build-system)
5434 (propagated-inputs
5435 `(("python-ipykernel" ,python-ipykernel)))
5436 (inputs
5437 `(("pari-gp" ,pari-gp)
5438 ("readline" ,readline)))
5439 (arguments
5440 `(#:tests? #f)) ; no test suite
5441 (home-page
5442 "https://github.com/jdemeyer/pari_jupyter")
5443 (synopsis "A Jupyter kernel for PARI/GP")
5444 (description "The package provides a PARI/GP kernel for Jupyter.")
5445 (license license:gpl3+)))
5446
5447 (define-public python-backcall
5448 (package
5449 (name "python-backcall")
5450 (version "0.1.0")
5451 (source
5452 (origin
5453 (method url-fetch)
5454 (uri (pypi-uri "backcall" version))
5455 (sha256
5456 (base32
5457 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5458 (build-system python-build-system)
5459 (home-page "https://github.com/takluyver/backcall/")
5460 (synopsis "Specifications for callback functions passed in to an API")
5461 (description
5462 "If your code lets other people supply callback functions, it's important
5463 to specify the function signature you expect, and check that functions support
5464 that. Adding extra parameters later would break other peoples code unless
5465 you're careful. The @code{backcall} package provides a way of specifying the
5466 callback signature using a prototype function.")
5467 (license license:bsd-3)))
5468
5469 ;; This is the latest release of the LTS version of ipython with support for
5470 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
5471 ;; dropped support for Python 2.7.
5472 (define-public python2-ipython
5473 (package
5474 (name "python2-ipython")
5475 (version "5.8.0")
5476 (source
5477 (origin
5478 (method url-fetch)
5479 (uri (pypi-uri "ipython" version ".tar.gz"))
5480 (sha256
5481 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5482 (build-system python-build-system)
5483 (propagated-inputs
5484 `(("python2-backports-shutil-get-terminal-size"
5485 ,python2-backports-shutil-get-terminal-size)
5486 ("python2-pathlib2" ,python2-pathlib2)
5487 ("python2-pyzmq" ,python2-pyzmq)
5488 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5489 ("python2-terminado" ,python2-terminado)
5490 ("python2-matplotlib" ,python2-matplotlib)
5491 ("python2-numpy" ,python2-numpy)
5492 ("python2-numpydoc" ,python2-numpydoc)
5493 ("python2-jinja2" ,python2-jinja2)
5494 ("python2-mistune" ,python2-mistune)
5495 ("python2-pexpect" ,python2-pexpect)
5496 ("python2-pickleshare" ,python2-pickleshare)
5497 ("python2-simplegeneric" ,python2-simplegeneric)
5498 ("python2-jsonschema" ,python2-jsonschema)
5499 ("python2-traitlets" ,python2-traitlets)
5500 ("python2-nbformat" ,python2-nbformat)
5501 ("python2-pygments" ,python2-pygments)))
5502 (inputs
5503 `(("readline" ,readline)
5504 ("which" ,which)))
5505 (native-inputs
5506 `(("graphviz" ,graphviz)
5507 ("pkg-config" ,pkg-config)
5508 ("python2-requests" ,python2-requests) ;; for tests
5509 ("python2-testpath" ,python2-testpath)
5510 ("python2-mock" ,python2-mock)
5511 ("python2-nose" ,python2-nose)))
5512 (arguments
5513 `(#:python ,python-2
5514 #:phases
5515 (modify-phases %standard-phases
5516 (add-before 'check 'delete-broken-tests
5517 (lambda* (#:key inputs #:allow-other-keys)
5518 ;; These tests throw errors for unknown reasons.
5519 (delete-file "IPython/core/tests/test_profile.py")
5520 (delete-file "IPython/core/tests/test_interactiveshell.py")
5521 (delete-file "IPython/core/tests/test_magic.py")
5522 #t)))))
5523 (home-page "https://ipython.org")
5524 (synopsis "IPython is a tool for interactive computing in Python")
5525 (description
5526 "IPython provides a rich architecture for interactive computing with:
5527 Powerful interactive shells, a browser-based notebook, support for interactive
5528 data visualization, embeddable interpreters and tools for parallel
5529 computing.")
5530 (license license:bsd-3)))
5531
5532 (define-public python-ipython
5533 (package
5534 (name "python-ipython")
5535 (version "7.9.0")
5536 (source
5537 (origin
5538 (method url-fetch)
5539 (uri (pypi-uri "ipython" version ".tar.gz"))
5540 (sha256
5541 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
5542 (build-system python-build-system)
5543 (propagated-inputs
5544 `(("python-backcall" ,python-backcall)
5545 ("python-pyzmq" ,python-pyzmq)
5546 ("python-prompt-toolkit" ,python-prompt-toolkit)
5547 ("python-terminado" ,python-terminado)
5548 ("python-matplotlib" ,python-matplotlib)
5549 ("python-numpy" ,python-numpy)
5550 ("python-numpydoc" ,python-numpydoc)
5551 ("python-jedi" ,python-jedi)
5552 ("python-jinja2" ,python-jinja2)
5553 ("python-mistune" ,python-mistune)
5554 ("python-pexpect" ,python-pexpect)
5555 ("python-pickleshare" ,python-pickleshare)
5556 ("python-simplegeneric" ,python-simplegeneric)
5557 ("python-jsonschema" ,python-jsonschema)
5558 ("python-traitlets" ,python-traitlets)
5559 ("python-nbformat" ,python-nbformat)
5560 ("python-pygments" ,python-pygments)))
5561 (inputs
5562 `(("readline" ,readline)
5563 ("which" ,which)))
5564 (native-inputs
5565 `(("graphviz" ,graphviz)
5566 ("pkg-config" ,pkg-config)
5567 ("python-requests" ,python-requests) ;; for tests
5568 ("python-testpath" ,python-testpath)
5569 ("python-nose" ,python-nose)))
5570 (arguments
5571 `(#:phases
5572 (modify-phases %standard-phases
5573 (add-after 'unpack 'make-docs-reproducible
5574 (lambda _
5575 (substitute* "IPython/sphinxext/ipython_directive.py"
5576 ((".*import datetime") "")
5577 ((".*datetime.datetime.now\\(\\)") "")
5578 (("%timeit") "# %timeit"))
5579 #t))
5580 ;; Tests can only be run after the library has been installed and not
5581 ;; within the source directory.
5582 (delete 'check)
5583 (add-after 'install 'check
5584 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5585 (if tests?
5586 (begin
5587 ;; Make installed package available for running the tests
5588 (add-installed-pythonpath inputs outputs)
5589 (setenv "HOME" "/tmp/") ;; required by a test
5590 ;; We only test the core because one of the other tests
5591 ;; tries to import ipykernel.
5592 (invoke "python" "IPython/testing/iptest.py"
5593 "-v" "IPython/core/tests"))
5594 #t)))
5595 (add-before 'check 'fix-tests
5596 (lambda* (#:key inputs #:allow-other-keys)
5597 (substitute* "./IPython/utils/_process_posix.py"
5598 (("/usr/bin/env', 'which") (which "which")))
5599 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5600 (("#!/usr/bin/env python")
5601 (string-append "#!" (which "python"))))
5602 ;; This test introduces a circular dependency on ipykernel
5603 ;; (which depends on ipython).
5604 (delete-file "IPython/core/tests/test_display.py")
5605 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
5606 (delete-file "IPython/core/tests/test_interactiveshell.py")
5607 #t)))))
5608 (home-page "https://ipython.org")
5609 (synopsis "IPython is a tool for interactive computing in Python")
5610 (description
5611 "IPython provides a rich architecture for interactive computing with:
5612 Powerful interactive shells, a browser-based notebook, support for interactive
5613 data visualization, embeddable interpreters and tools for parallel
5614 computing.")
5615 (license license:bsd-3)))
5616
5617 (define-public python-ipython-documentation
5618 (package
5619 (inherit python-ipython)
5620 (name "python-ipython-documentation")
5621 (version (package-version python-ipython))
5622 (arguments
5623 `(#:phases
5624 (modify-phases %standard-phases
5625 (delete 'build)
5626 (delete 'check)
5627 (replace 'install
5628 (lambda* (#:key outputs #:allow-other-keys)
5629 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5630 (doc (string-append data "/doc/" ,name "-" ,version))
5631 (html (string-append doc "/html"))
5632 (man1 (string-append data "/man/man1"))
5633 (info (string-append data "/info"))
5634 (examples (string-append doc "/examples"))
5635 (python-arg (string-append "PYTHON=" (which "python"))))
5636 (setenv "LANG" "en_US.utf8")
5637 (with-directory-excursion "docs"
5638 ;; FIXME: pdf fails to build
5639 ;;(system* "make" "pdf" "PAPER=a4")
5640 (system* "make" python-arg "html")
5641 ;; FIXME: the generated texi file contains ^@^@, which trips
5642 ;; up the parser.
5643 ;; (system* "make" python-arg "info")
5644 )
5645 (copy-recursively "docs/man" man1)
5646 (copy-recursively "examples" examples)
5647 (copy-recursively "docs/build/html" html)
5648 ;; (copy-file "docs/build/latex/ipython.pdf"
5649 ;; (string-append doc "/ipython.pdf"))
5650 (mkdir-p info)
5651 ;; (copy-file "docs/build/texinfo/ipython.info"
5652 ;; (string-append info "/ipython.info"))
5653 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5654 #t)))))
5655 (inputs
5656 `(("python-ipython" ,python-ipython)
5657 ("python-ipykernel" ,python-ipykernel)))
5658 (native-inputs
5659 `(("python-sphinx" ,python-sphinx)
5660 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
5661 ;; FIXME: It's possible that a smaller union would work just as well.
5662 ("texlive" ,(texlive-union (list texlive-amsfonts
5663 texlive-fonts-ec
5664 texlive-generic-ifxetex
5665 texlive-generic-pdftex
5666 texlive-latex-capt-of
5667 texlive-latex-cmap
5668 texlive-latex-environ
5669 texlive-latex-eqparbox
5670 texlive-latex-etoolbox
5671 texlive-latex-expdlist
5672 texlive-latex-fancyhdr
5673 texlive-latex-fancyvrb
5674 texlive-latex-fncychap
5675 texlive-latex-float
5676 texlive-latex-framed
5677 texlive-latex-geometry
5678 texlive-latex-graphics
5679 texlive-latex-hyperref
5680 texlive-latex-mdwtools
5681 texlive-latex-multirow
5682 texlive-latex-needspace
5683 texlive-latex-oberdiek
5684 texlive-latex-parskip
5685 texlive-latex-preview
5686 texlive-latex-tabulary
5687 texlive-latex-threeparttable
5688 texlive-latex-titlesec
5689 texlive-latex-trimspaces
5690 texlive-latex-ucs
5691 texlive-latex-upquote
5692 texlive-latex-url
5693 texlive-latex-varwidth
5694 texlive-latex-wrapfig)))
5695 ("texinfo" ,texinfo)))))
5696
5697 (define-public python-urwid
5698 (package
5699 (name "python-urwid")
5700 (version "2.0.1")
5701 (source
5702 (origin
5703 (method url-fetch)
5704 (uri (pypi-uri "urwid" version))
5705 (sha256
5706 (base32
5707 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5708 (build-system python-build-system)
5709 (home-page "http://urwid.org")
5710 (synopsis "Console user interface library for Python")
5711 (description
5712 "Urwid is a curses-based UI/widget library for Python. It includes many
5713 features useful for text console applications.")
5714 (license license:lgpl2.1+)))
5715
5716 (define-public python2-urwid
5717 (package-with-python2 python-urwid))
5718
5719 (define-public python-urwidtrees
5720 (package
5721 (name "python-urwidtrees")
5722 (version "1.0.2")
5723 (source
5724 (origin
5725 (method git-fetch)
5726 ;; package author intends on distributing via github rather than pypi:
5727 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5728 (uri (git-reference
5729 (url "https://github.com/pazz/urwidtrees")
5730 (commit version)))
5731 (file-name (git-file-name name version))
5732 (sha256
5733 (base32
5734 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
5735 (build-system python-build-system)
5736 (arguments
5737 '(#:use-setuptools? #f
5738 #:tests? #f)) ; no tests
5739 (propagated-inputs `(("python-urwid" ,python-urwid)))
5740 (home-page "https://github.com/pazz/urwidtrees")
5741 (synopsis "Tree widgets for urwid")
5742 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5743 toolkit. Use it to build trees of widgets.")
5744 (license license:gpl3+)))
5745
5746 (define-public python2-urwidtrees
5747 (package-with-python2 python-urwidtrees))
5748
5749 (define-public python-ua-parser
5750 (package
5751 (name "python-ua-parser")
5752 (version "0.8.0")
5753 (source
5754 (origin
5755 (method url-fetch)
5756 (uri (pypi-uri "ua-parser" version))
5757 (sha256
5758 (base32
5759 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5760 (build-system python-build-system)
5761 (arguments
5762 `(#:tests? #f)) ;no test suite in release
5763 (native-inputs
5764 `(("python-pyyaml" ,python-pyyaml)))
5765 (home-page "https://github.com/ua-parser/uap-python")
5766 (synopsis "User agent parser")
5767 (description
5768 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5769 (license license:asl2.0)))
5770
5771 (define-public python2-ua-parser
5772 (package-with-python2 python-ua-parser))
5773
5774 (define-public python-user-agents
5775 (package
5776 (name "python-user-agents")
5777 (version "1.1.0")
5778 (source
5779 (origin
5780 (method url-fetch)
5781 (uri (pypi-uri "user-agents" version))
5782 (sha256
5783 (base32
5784 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5785 (build-system python-build-system)
5786 (arguments
5787 `(#:tests? #f)) ;missing devices.json test file in release
5788 (propagated-inputs
5789 `(("python-ua-parser" ,python-ua-parser)))
5790 (home-page "https://github.com/selwin/python-user-agents")
5791 (synopsis "User Agent strings parsing library")
5792 (description
5793 "A library to identify devices (phones, tablets) and their capabilities by
5794 parsing (browser/HTTP) user agent strings.")
5795 (license license:expat)))
5796
5797 (define-public python2-user-agents
5798 (package-with-python2 python-user-agents))
5799
5800 (define-public python-dbus
5801 (package
5802 (name "python-dbus")
5803 (version "1.2.14")
5804 (source
5805 (origin
5806 (method url-fetch)
5807 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5808 "dbus-python-" version ".tar.gz"))
5809 (sha256
5810 (base32 "0cdchkgnivlka4lf8q4qfk0yxq483i3r3aqickjf8hfn7nx0c0mi"))))
5811 (build-system gnu-build-system)
5812 (native-inputs
5813 `(("pkg-config" ,pkg-config)))
5814 (inputs
5815 `(("python" ,python-wrapper)
5816 ("dbus-glib" ,dbus-glib)))
5817 (synopsis "Python bindings for D-bus")
5818 (description "python-dbus provides bindings for libdbus, the reference
5819 implementation of D-Bus.")
5820 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5821 (license license:expat)))
5822
5823 (define-public python2-dbus
5824 (package (inherit python-dbus)
5825 (name "python2-dbus")
5826 (inputs `(("python" ,python-2)
5827 ,@(alist-delete "python"
5828 (package-inputs python-dbus)
5829 equal?)))))
5830
5831 (define-public python-notify2
5832 (package
5833 (name "python-notify2")
5834 (version "0.3.1")
5835 (source
5836 (origin
5837 (method url-fetch)
5838 (uri (pypi-uri "notify2" version))
5839 (sha256
5840 (base32
5841 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
5842 (build-system python-build-system)
5843 (arguments `(#:tests? #f)) ; tests depend on system state
5844 (native-inputs
5845 `(("python-dbus" ,python-dbus)))
5846 (home-page "https://bitbucket.org/takluyver/pynotify2")
5847 (synopsis "Python interface to D-Bus notifications")
5848 (description
5849 "Pynotify2 provides a Python interface for sending D-Bus notifications.
5850 It is a reimplementation of pynotify in pure Python, and an alternative to
5851 the GObject Introspection bindings to libnotify for non-GTK applications.")
5852 (license (list license:bsd-2
5853 license:lgpl2.1+))))
5854
5855 (define-public python2-notify2
5856 (package-with-python2 python-notify2))
5857
5858 ;; beautifulsoup4 has a totally different namespace than 3.x,
5859 ;; and pypi seems to put it under its own name, so I guess we should too
5860 (define-public python-beautifulsoup4
5861 (package
5862 (name "python-beautifulsoup4")
5863 (version "4.7.1")
5864 (source
5865 (origin
5866 (method url-fetch)
5867 (uri (pypi-uri "beautifulsoup4" version))
5868 (sha256
5869 (base32
5870 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
5871 (build-system python-build-system)
5872 (arguments
5873 `(#:phases
5874 (modify-phases %standard-phases
5875 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5876 ;; must use this conversion script when building with Python 3. The
5877 ;; conversion script also runs the tests.
5878 ;; For more information, see the file 'convert-py3k' in the source
5879 ;; distribution.
5880 (replace 'check
5881 (lambda _ (invoke "./convert-py3k"))))))
5882 (propagated-inputs
5883 `(("python-soupsieve" ,python-soupsieve)))
5884 (home-page
5885 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5886 (synopsis
5887 "Python screen-scraping library")
5888 (description
5889 "Beautiful Soup is a Python library designed for rapidly setting up
5890 screen-scraping projects. It offers Pythonic idioms for navigating,
5891 searching, and modifying a parse tree, providing a toolkit for
5892 dissecting a document and extracting what you need. It automatically
5893 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5894 (license license:expat)
5895 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5896
5897 (define-public python2-beautifulsoup4
5898 (package
5899 (inherit (package-with-python2
5900 (strip-python2-variant python-beautifulsoup4)))
5901 (arguments `(#:python ,python-2))))
5902
5903 (define-public python-soupsieve
5904 (package
5905 (name "python-soupsieve")
5906 (version "1.9.5")
5907 (source
5908 (origin
5909 (method url-fetch)
5910 (uri (pypi-uri "soupsieve" version))
5911 (sha256
5912 (base32
5913 "1nhd0q0ifwva9wn645s6pn74p1rd97asn3qfg75nphx1wkgcbhg2"))))
5914 (build-system python-build-system)
5915 (arguments `(#:tests? #f))
5916 ;;XXX: 2 tests fail currently despite claming they were to be
5917 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
5918 ;;don't want to create a circular dependency.
5919 (home-page "https://github.com/facelessuser/soupsieve")
5920 (synopsis "CSS selector library")
5921 (description
5922 "Soup Sieve is a CSS selector library designed to be used with Beautiful
5923 Soup 4. It aims to provide selecting, matching, and filtering using modern
5924 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
5925 specifications up through the latest CSS level 4 drafts and beyond (though
5926 some are not yet implemented).")
5927 (properties `((python2-variant . ,(delay python2-soupsieve))))
5928 (license license:expat)))
5929
5930 (define-public python2-soupsieve
5931 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
5932 (package
5933 (inherit base)
5934 (propagated-inputs
5935 `(("python2-backports-functools-lru-cache"
5936 ,python2-backports-functools-lru-cache)
5937 ,@(package-propagated-inputs base))))))
5938
5939 (define-public python-netifaces
5940 (package
5941 (name "python-netifaces")
5942 (version "0.10.7")
5943 (source
5944 (origin
5945 (method url-fetch)
5946 (uri (pypi-uri "netifaces" version))
5947 (sha256
5948 (base32
5949 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5950 (build-system python-build-system)
5951 (home-page "https://github.com/al45tair/netifaces")
5952 (synopsis
5953 "Python module for portable network interface information")
5954 (description
5955 "Netifaces is a Python module providing information on network
5956 interfaces in an easy and portable manner.")
5957 (license license:expat)))
5958
5959 (define-public python2-netifaces
5960 (package-with-python2 python-netifaces))
5961
5962 (define-public python-networkx
5963 (package
5964 (name "python-networkx")
5965 (version "2.2")
5966 (source
5967 (origin
5968 (method url-fetch)
5969 (uri (pypi-uri "networkx" version ".zip"))
5970 (sha256
5971 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5972 (build-system python-build-system)
5973 ;; python-decorator is needed at runtime.
5974 (propagated-inputs
5975 `(("python-decorator" ,python-decorator)))
5976 (native-inputs
5977 `(("python-nose" ,python-nose)
5978 ("unzip" ,unzip)))
5979 (home-page "https://networkx.github.io/")
5980 (synopsis "Python module for creating and manipulating graphs and networks")
5981 (description
5982 "NetworkX is a Python package for the creation, manipulation, and study
5983 of the structure, dynamics, and functions of complex networks.")
5984 (license license:bsd-3)))
5985
5986 (define-public python2-networkx
5987 (package-with-python2 python-networkx))
5988
5989 (define-public python-datrie
5990 (package
5991 (name "python-datrie")
5992 (version "0.8")
5993 (source
5994 (origin
5995 (method url-fetch)
5996 (uri (pypi-uri "datrie" version))
5997 (sha256
5998 (base32
5999 "0338r8xgmpy78556jhms0h6qkvyjr10p8bpgdvcpqzm9lrmxmmdx"))))
6000 (build-system python-build-system)
6001 (native-inputs
6002 `(("python-cython" ,python-cython)
6003 ("python-hypothesis" ,python-hypothesis)
6004 ("python-pytest" ,python-pytest)
6005 ("python-pytest-runner" ,python-pytest-runner)))
6006 (home-page "https://github.com/kmike/datrie")
6007 (synopsis "Fast, efficiently stored trie for Python")
6008 (description
6009 "This package provides a fast, efficiently stored trie implementation for
6010 Python.")
6011 (license license:lgpl2.1+)))
6012
6013 (define-public snakemake
6014 (package
6015 (name "snakemake")
6016 (version "5.7.1")
6017 (source
6018 (origin
6019 (method url-fetch)
6020 (uri (pypi-uri "snakemake" version))
6021 (sha256
6022 (base32 "1pnpvvn8n2a78cg360wz3ldmpqrsm2wzi0c0dmvki9fnsw6fxdas"))))
6023 (build-system python-build-system)
6024 (arguments
6025 ;; TODO: Package missing test dependencies.
6026 '(#:tests? #f
6027 #:phases
6028 (modify-phases %standard-phases
6029 ;; For cluster execution Snakemake will call Python. Since there is
6030 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
6031 ;; this by calling the snakemake wrapper instead.
6032 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
6033 (lambda* (#:key outputs #:allow-other-keys)
6034 (substitute* "snakemake/executors.py"
6035 (("\\{sys.executable\\} -m snakemake")
6036 (string-append (assoc-ref outputs "out")
6037 "/bin/snakemake")))
6038 #t)))))
6039 (propagated-inputs
6040 `(("python-appdirs" ,python-appdirs)
6041 ("python-configargparse" ,python-configargparse)
6042 ("python-datrie" ,python-datrie)
6043 ("python-docutils" ,python-docutils)
6044 ("python-gitpython" ,python-gitpython)
6045 ("python-jinja2" ,python-jinja2)
6046 ("python-jsonschema" ,python-jsonschema)
6047 ("python-networkx" ,python-networkx)
6048 ("python-psutil" ,python-psutil)
6049 ("python-pyyaml" ,python-pyyaml)
6050 ("python-ratelimiter" ,python-ratelimiter)
6051 ("python-requests" ,python-requests)
6052 ("python-wrapt" ,python-wrapt)))
6053 (home-page "https://snakemake.readthedocs.io")
6054 (synopsis "Python-based execution environment for make-like workflows")
6055 (description
6056 "Snakemake aims to reduce the complexity of creating workflows by
6057 providing a clean and modern domain specific specification language (DSL) in
6058 Python style, together with a fast and comfortable execution environment.")
6059 (license license:expat)))
6060
6061 (define-public python-pyqrcode
6062 (package
6063 (name "python-pyqrcode")
6064 (version "1.2.1")
6065 (source
6066 (origin
6067 (method url-fetch)
6068 (uri (pypi-uri "PyQRCode" version))
6069 (sha256
6070 (base32
6071 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
6072 (build-system python-build-system)
6073 (home-page
6074 "https://github.com/mnooner256/pyqrcode")
6075 (synopsis "QR code generator")
6076 (description
6077 "Pyqrcode is a QR code generator written purely in Python with
6078 SVG, EPS, PNG and terminal output.")
6079 (license license:bsd-3)))
6080
6081 (define-public python-seaborn
6082 (package
6083 (name "python-seaborn")
6084 (version "0.9.0")
6085 (source
6086 (origin
6087 (method url-fetch)
6088 (uri (pypi-uri "seaborn" version))
6089 (sha256
6090 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))
6091 (patches
6092 (list (origin
6093 (method url-fetch)
6094 ;; This has already been merged, but there is no new
6095 ;; release including this patch. It fixes problems
6096 ;; with axis rotation that would lead to test
6097 ;; failures.
6098 (uri "https://patch-diff.githubusercontent.com/raw/mwaskom/seaborn/pull/1716.diff")
6099 (sha256
6100 (base32
6101 "1lm870z316n9ivsyr86hpk1gxaraw0mrjvq42lqsm0znhjdp9q9w"))
6102 (file-name "seaborn-0.9.0-axis-rotation.patch"))))))
6103 (build-system python-build-system)
6104 (arguments
6105 `(#:phases
6106 (modify-phases %standard-phases
6107 (add-before 'check 'start-xserver
6108 (lambda* (#:key inputs #:allow-other-keys)
6109 (let ((xorg-server (assoc-ref inputs "xorg-server")))
6110 ;; There must be a running X server and make check doesn't
6111 ;; start one. Therefore we must do it.
6112 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
6113 (setenv "DISPLAY" ":1")
6114 #t)))
6115 (add-after 'unpack 'fix-tests
6116 (lambda _
6117 ;; test_cbar_ticks fails probably because of matplotlib's
6118 ;; expectation of using an older version of FreeType.
6119 (delete-file "seaborn/tests/test_matrix.py")
6120 #t))
6121 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
6122 (propagated-inputs
6123 `(("python-pandas" ,python-pandas)
6124 ("python-matplotlib" ,python-matplotlib)
6125 ("python-numpy" ,python-numpy)
6126 ("python-scipy" ,python-scipy)))
6127 (native-inputs
6128 `(("python-pytest" ,python-pytest)
6129 ("xorg-server" ,xorg-server-for-tests)))
6130 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6131 (synopsis "Statistical data visualization")
6132 (description
6133 "Seaborn is a library for making attractive and informative statistical
6134 graphics in Python. It is built on top of matplotlib and tightly integrated
6135 with the PyData stack, including support for numpy and pandas data structures
6136 and statistical routines from scipy and statsmodels.")
6137 (license license:bsd-3)))
6138
6139 (define-public python2-seaborn
6140 (package-with-python2 python-seaborn))
6141
6142 (define-public python-mpmath
6143 (package
6144 (name "python-mpmath")
6145 (version "0.19")
6146 (source (origin
6147 (method url-fetch)
6148 (uri (string-append "http://mpmath.org/files/mpmath-"
6149 version ".tar.gz"))
6150 (sha256
6151 (base32
6152 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6153 (build-system python-build-system)
6154 (arguments
6155 '(#:phases
6156 (modify-phases %standard-phases
6157 (replace 'check
6158 (lambda _
6159 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
6160 (home-page "http://mpmath.org")
6161 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6162 (description
6163 "@code{mpmath} can be used as an arbitrary-precision substitute for
6164 Python's float/complex types and math/cmath modules, but also does much
6165 more advanced mathematics.")
6166 (license license:bsd-3)))
6167
6168 (define-public python2-mpmath
6169 (package-with-python2 python-mpmath))
6170
6171 (define-public python-bigfloat
6172 (package
6173 (name "python-bigfloat")
6174 (version "0.3.0")
6175 (source
6176 (origin
6177 (method url-fetch)
6178 (uri (pypi-uri "bigfloat" version))
6179 (sha256
6180 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6181 (build-system python-build-system)
6182 (inputs
6183 `(("mpfr" ,mpfr)))
6184 (home-page "https://github.com/mdickinson/bigfloat")
6185 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6186 (description
6187 "This package provides a Python interface to the MPFR library for
6188 multiprecision arithmetic.")
6189 (license license:lgpl3+)))
6190
6191 (define-public python2-bigfloat
6192 (package-with-python2 python-bigfloat))
6193
6194 (define-public python-sympy
6195 (package
6196 (name "python-sympy")
6197 (version "1.1.1")
6198 (source
6199 (origin
6200 (method url-fetch)
6201 (uri (string-append
6202 "https://github.com/sympy/sympy/releases/download/sympy-"
6203 version "/sympy-" version ".tar.gz"))
6204 (sha256
6205 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6206 (build-system python-build-system)
6207 (arguments
6208 `(#:phases
6209 (modify-phases %standard-phases
6210 ;; Run the core tests after installation. By default it would run
6211 ;; *all* tests, which take a very long time to complete and are known
6212 ;; to be flaky.
6213 (delete 'check)
6214 (add-after 'install 'check
6215 (lambda* (#:key outputs #:allow-other-keys)
6216 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6217 #t)))))
6218 (propagated-inputs
6219 `(("python-mpmath" ,python-mpmath)))
6220 (home-page "http://www.sympy.org/")
6221 (synopsis "Python library for symbolic mathematics")
6222 (description
6223 "SymPy is a Python library for symbolic mathematics. It aims to become a
6224 full-featured computer algebra system (CAS) while keeping the code as simple
6225 as possible in order to be comprehensible and easily extensible.")
6226 (license license:bsd-3)))
6227
6228 (define-public python2-sympy
6229 (package
6230 (inherit (package-with-python2 python-sympy))
6231 (arguments
6232 `(#:phases
6233 (modify-phases %standard-phases
6234 ;; Run the core tests after installation. By default it would run
6235 ;; *all* tests, which take a very long time to complete and are known
6236 ;; to be flaky.
6237 (delete 'check)
6238 (add-after 'install 'check
6239 (lambda* (#:key outputs #:allow-other-keys)
6240 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6241 #t)))))))
6242
6243 (define-public python-q
6244 (package
6245 (name "python-q")
6246 (version "2.6")
6247 (source
6248 (origin
6249 (method url-fetch)
6250 (uri (pypi-uri "q" version))
6251 (sha256
6252 (base32
6253 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6254 (build-system python-build-system)
6255 (home-page "https://github.com/zestyping/q")
6256 (synopsis "Quick-and-dirty debugging output for tired programmers")
6257 (description
6258 "q is a Python module for \"print\" style of debugging Python code. It
6259 provides convenient short API for print out of values, tracebacks, and
6260 falling into the Python interpreter.")
6261 (license license:asl2.0)))
6262
6263 (define-public python2-q
6264 (package-with-python2 python-q))
6265
6266 (define-public python2-xlib
6267 (package
6268 (name "python2-xlib")
6269 (version "0.14")
6270 (source (origin
6271 (method url-fetch)
6272 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6273 "/" version "/"
6274 "python-xlib-" version ".tar.gz"))
6275 (sha256
6276 (base32
6277 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6278 (build-system python-build-system)
6279 (arguments
6280 `(#:python ,python-2 ;Python 2 only
6281 #:tests? #f)) ;no tests
6282 (home-page "http://python-xlib.sourceforge.net/")
6283 (synopsis "Python X11 client library")
6284 (description
6285 "The Python X Library is intended to be a fully functional X client
6286 library for Python programs. It is useful to implement low-level X clients.
6287 It is written entirely in Python.")
6288 (license license:gpl2+)))
6289
6290 (define-public python-singledispatch
6291 (package
6292 (name "python-singledispatch")
6293 (version "3.4.0.3")
6294 (source
6295 (origin
6296 (method url-fetch)
6297 (uri (pypi-uri "singledispatch" version))
6298 (sha256
6299 (base32
6300 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6301 (build-system python-build-system)
6302 (native-inputs
6303 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6304 (home-page
6305 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6306 (synopsis "Backport of singledispatch feature from Python 3.4")
6307 (description
6308 "This library brings functools.singledispatch from Python 3.4 to Python
6309 2.6-3.3.")
6310 (license license:expat)))
6311
6312 (define-public python2-singledispatch
6313 (package-with-python2 python-singledispatch))
6314
6315 ;; the python- version can be removed with python-3.5
6316 (define-public python-backports-abc
6317 (package
6318 (name "python-backports-abc")
6319 (version "0.5")
6320 (source
6321 (origin
6322 (method url-fetch)
6323 (uri (pypi-uri "backports_abc" version))
6324 (sha256
6325 (base32
6326 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6327 (build-system python-build-system)
6328 (home-page "https://github.com/cython/backports_abc")
6329 (synopsis "Backport of additions to the 'collections.abc' module")
6330 (description
6331 "Python-backports-abc provides a backport of additions to the
6332 @code{collections.abc} module in Python-3.5.")
6333 (license license:psfl)))
6334
6335 (define-public python2-backports-abc
6336 (package-with-python2 python-backports-abc))
6337
6338 (define-public python-backports-csv
6339 (package
6340 (name "python-backports-csv")
6341 (version "1.0.5")
6342 (source
6343 (origin
6344 (method url-fetch)
6345 (uri (pypi-uri "backports.csv" version))
6346 (sha256
6347 (base32
6348 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6349 (build-system python-build-system)
6350 (home-page "https://github.com/ryanhiebert/backports.csv")
6351 (synopsis "Backport of Python 3's csv module for Python 2")
6352 (description
6353 "Provides a backport of Python 3's @code{csv} module for parsing
6354 comma separated values. The API of the @code{csv} module in Python 2
6355 is drastically different from the @code{csv} module in Python 3.
6356 This is due, for the most part, to the difference between str in
6357 Python 2 and Python 3.")
6358 (license license:psfl)))
6359
6360 (define-public python2-backports-csv
6361 (package-with-python2 python-backports-csv))
6362
6363 (define-public python2-backports-shutil-get-terminal-size
6364 (package
6365 (name "python2-backports-shutil-get-terminal-size")
6366 (version "1.0.0")
6367 (source
6368 (origin
6369 (method url-fetch)
6370 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6371 (sha256
6372 (base32
6373 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6374 (build-system python-build-system)
6375 (arguments
6376 `(#:python ,python-2
6377 #:phases
6378 (modify-phases %standard-phases
6379 (replace 'check
6380 (lambda _
6381 (invoke "py.test" "-v"))))))
6382 (native-inputs
6383 `(("python2-pytest" ,python2-pytest)))
6384 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6385 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6386 (description
6387 "This package provides a backport of the @code{get_terminal_size
6388 function} from Python 3.3's @code{shutil}.
6389 Unlike the original version it is written in pure Python rather than C,
6390 so it might be a tiny bit slower.")
6391 (license license:expat)))
6392
6393 (define-public python-waf
6394 (package
6395 (name "python-waf")
6396 (version "2.0.19")
6397 (source (origin
6398 (method url-fetch)
6399 (uri (string-append "https://waf.io/"
6400 "waf-" version ".tar.bz2"))
6401 (sha256
6402 (base32
6403 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
6404 (build-system python-build-system)
6405 (arguments
6406 '(#:phases
6407 (modify-phases %standard-phases
6408 (replace 'build
6409 (lambda _
6410 ;; XXX: Find a way to add all extra tools.
6411 (let ((tools '("gccdeps"
6412 "clang_compilation_database")))
6413 (invoke "python" "waf-light" "configure" "build"
6414 (string-append "--tools="
6415 (string-join tools ","))))))
6416 (replace 'check
6417 (lambda _
6418 (invoke "python" "waf" "--version")))
6419 (replace 'install
6420 (lambda* (#:key outputs #:allow-other-keys)
6421 (let ((out (assoc-ref outputs "out")))
6422 (install-file "waf" (string-append out "/bin")))
6423 #t))
6424 ;; waf breaks when it is wrapped.
6425 (delete 'wrap))))
6426 (home-page "https://waf.io/")
6427 (synopsis "Python-based build system")
6428 (description
6429 "Waf is a Python-based framework for configuring, compiling and installing
6430 applications.")
6431 (license license:bsd-3)))
6432
6433 (define-public python2-waf
6434 (package-with-python2 python-waf))
6435
6436 (define-public python-pyzmq
6437 (package
6438 (name "python-pyzmq")
6439 (version "17.1.2")
6440 (source
6441 (origin
6442 (method url-fetch)
6443 (uri (pypi-uri "pyzmq" version))
6444 (sha256
6445 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6446 (build-system python-build-system)
6447 (arguments
6448 `(#:configure-flags
6449 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6450 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6451 ;; --inplace' for 'python setup.py test' to work.
6452 #:tests? #f))
6453 (inputs
6454 `(("zeromq" ,zeromq)))
6455 (native-inputs
6456 `(("pkg-config" ,pkg-config)
6457 ("python-nose" ,python-nose)))
6458 (home-page "https://github.com/zeromq/pyzmq")
6459 (synopsis "Python bindings for 0MQ")
6460 (description
6461 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6462 (license license:bsd-4)))
6463
6464 (define-public python2-pyzmq
6465 (package-with-python2 python-pyzmq))
6466
6467 (define-public python-pep8
6468 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6469 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6470 ;; some dependents' test suites, and nothing more.
6471 (package
6472 (name "python-pep8")
6473 (version "1.7.0")
6474 (source
6475 (origin
6476 (method url-fetch)
6477 (uri (pypi-uri "pep8" version))
6478 (sha256
6479 (base32
6480 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
6481 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
6482 (build-system python-build-system)
6483 (home-page "https://pep8.readthedocs.org/")
6484 (synopsis "Python style guide checker")
6485 (description
6486 "This tools checks Python code against some of the style conventions in
6487 PEP 8.")
6488 (license license:expat)))
6489
6490 (define-public python2-pep8
6491 (package-with-python2 python-pep8))
6492
6493 (define-public python-pyflakes
6494 (package
6495 (name "python-pyflakes")
6496 (version "2.1.1")
6497 (source
6498 (origin
6499 (method url-fetch)
6500 (uri (pypi-uri "pyflakes" version))
6501 (sha256
6502 (base32
6503 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
6504 (build-system python-build-system)
6505 (home-page
6506 "https://github.com/pyflakes/pyflakes")
6507 (synopsis "Passive checker of Python programs")
6508 (description
6509 "Pyflakes statically checks Python source code for common errors.")
6510 (license license:expat)))
6511
6512 (define-public python2-pyflakes
6513 (package-with-python2 python-pyflakes))
6514
6515 (define-public python-mccabe
6516 (package
6517 (name "python-mccabe")
6518 (version "0.6.1")
6519 (source
6520 (origin
6521 (method url-fetch)
6522 (uri (pypi-uri "mccabe" version))
6523 (sha256
6524 (base32
6525 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6526 (build-system python-build-system)
6527 (native-inputs
6528 `(("python-pytest" ,python-pytest-bootstrap)
6529 ("python-pytest-runner" ,python-pytest-runner)))
6530 (home-page "https://github.com/flintwork/mccabe")
6531 (synopsis "McCabe checker, plugin for flake8")
6532 (description
6533 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6534 complexity of Python source code.")
6535 (license license:expat)))
6536
6537 (define-public python2-mccabe
6538 (package-with-python2 python-mccabe))
6539
6540 (define-public python-mccabe-0.2.1
6541 (package (inherit python-mccabe)
6542 (version "0.2.1")
6543 (source
6544 (origin
6545 (method url-fetch)
6546 (uri (pypi-uri "mccabe" version))
6547 (sha256
6548 (base32
6549 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6550
6551 (define-public python2-mccabe-0.2.1
6552 (package-with-python2 python-mccabe-0.2.1))
6553
6554 ;; Flake8 2.4.1 requires an older version of pep8.
6555 ;; This should be removed ASAP.
6556 (define-public python-pep8-1.5.7
6557 (package (inherit python-pep8)
6558 (version "1.5.7")
6559 (source
6560 (origin
6561 (method url-fetch)
6562 (uri (pypi-uri "pep8" version))
6563 (sha256
6564 (base32
6565 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6566 (arguments
6567 ;; XXX Tests not compatible with Python 3.5.
6568 '(#:tests? #f))))
6569
6570 (define-public python2-pep8-1.5.7
6571 (package-with-python2 python-pep8-1.5.7))
6572
6573 ;; Flake8 2.4.1 requires an older version of pyflakes.
6574 ;; This should be removed ASAP.
6575 (define-public python-pyflakes-0.8.1
6576 (package (inherit python-pyflakes)
6577 (version "0.8.1")
6578 (source
6579 (origin
6580 (method url-fetch)
6581 (uri (pypi-uri "pyflakes" version))
6582 (sha256
6583 (base32
6584 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6585 (arguments
6586 ;; XXX Tests not compatible with Python 3.5.
6587 '(#:tests? #f))))
6588
6589 (define-public python2-pyflakes-0.8.1
6590 (package-with-python2 python-pyflakes-0.8.1))
6591
6592 (define-public python-flake8
6593 (package
6594 (name "python-flake8")
6595 (version "3.7.7")
6596 (source (origin
6597 (method url-fetch)
6598 (uri (pypi-uri "flake8" version))
6599 (sha256
6600 (base32
6601 "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5"))))
6602 (build-system python-build-system)
6603 (arguments
6604 `(#:phases
6605 (modify-phases %standard-phases
6606 (delete 'check)
6607 (add-after 'install 'check
6608 (lambda* (#:key inputs outputs #:allow-other-keys)
6609 (add-installed-pythonpath inputs outputs)
6610 (invoke "pytest" "-v")
6611 #t)))))
6612 (propagated-inputs
6613 `(("python-pycodestyle" ,python-pycodestyle)
6614 ("python-entrypoints" ,python-entrypoints)
6615 ("python-pyflakes" ,python-pyflakes)
6616 ("python-mccabe" ,python-mccabe)))
6617 (native-inputs
6618 `(("python-mock" ,python-mock)
6619 ("python-pytest" ,python-pytest-bootstrap)
6620 ("python-pytest-runner" ,python-pytest-runner)))
6621 (home-page "https://gitlab.com/pycqa/flake8")
6622 (synopsis
6623 "The modular source code checker: pep8, pyflakes and co")
6624 (description
6625 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6626 (properties `((python2-variant . ,(delay python2-flake8))))
6627 (license license:expat)))
6628
6629 (define-public python2-flake8
6630 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
6631 (package (inherit base)
6632 (propagated-inputs
6633 `(("python2-configparser" ,python2-configparser)
6634 ("python2-enum34" ,python2-enum34)
6635 ("python2-typing" ,python2-typing)
6636 ,@(package-propagated-inputs base))))))
6637
6638 ;; python-hacking requires flake8 <2.6.0.
6639 (define-public python-flake8-2.5
6640 (package
6641 (inherit python-flake8)
6642 (version "2.5.5")
6643 (source (origin
6644 (method url-fetch)
6645 (uri (pypi-uri "flake8" version))
6646 (sha256
6647 (base32
6648 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6649 (propagated-inputs
6650 `(("python-pep8" ,python-pep8)
6651 ,@(package-propagated-inputs python-flake8)))
6652 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6653
6654 (define-public python2-flake8-2.5
6655 (package
6656 (inherit python2-flake8)
6657 (version (package-version python-flake8-2.5))
6658 (source (origin
6659 (inherit (package-source python-flake8-2.5))))
6660 (propagated-inputs
6661 `(("python2-pep8" ,python2-pep8)
6662 ,@(package-propagated-inputs python2-flake8)))))
6663
6664 (define-public python-flake8-polyfill
6665 (package
6666 (name "python-flake8-polyfill")
6667 (version "1.0.2")
6668 (source
6669 (origin
6670 (method url-fetch)
6671 (uri (pypi-uri "flake8-polyfill" version))
6672 (sha256
6673 (base32
6674 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6675 (build-system python-build-system)
6676 (arguments
6677 '(#:phases
6678 (modify-phases %standard-phases
6679 (replace 'check
6680 (lambda _
6681 ;; Be compatible with Pytest 4:
6682 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
6683 (substitute* "setup.cfg"
6684 (("\\[pytest\\]")
6685 "[tool:pytest]"))
6686
6687 (setenv "PYTHONPATH"
6688 (string-append (getcwd) "/build/lib:"
6689 (getenv "PYTHONPATH")))
6690 (invoke "py.test" "-v"))))))
6691 (native-inputs
6692 `(("python-flake8" ,python-flake8)
6693 ("python-mock" ,python-mock)
6694 ("python-pep8" ,python-pep8)
6695 ("python-pycodestyle" ,python-pycodestyle)
6696 ("python-pytest" ,python-pytest)))
6697 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6698 (synopsis "Polyfill package for Flake8 plugins")
6699 (description
6700 "This package that provides some compatibility helpers for Flake8
6701 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6702 (license license:expat)))
6703
6704 (define-public python2-flake8-polyfill
6705 (package-with-python2 python-flake8-polyfill))
6706
6707 (define-public python-mistune
6708 (package
6709 (name "python-mistune")
6710 (version "0.8.4")
6711 (source
6712 (origin
6713 (method url-fetch)
6714 (uri (pypi-uri "mistune" version))
6715 (sha256
6716 (base32
6717 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6718 (build-system python-build-system)
6719 (native-inputs
6720 `(("python-nose" ,python-nose)
6721 ("python-cython" ,python-cython)))
6722 (home-page "https://github.com/lepture/mistune")
6723 (synopsis "Markdown parser in pure Python")
6724 (description "This package provides a fast markdown parser in pure
6725 Python.")
6726 (license license:bsd-3)))
6727
6728 (define-public python2-mistune
6729 (package-with-python2 python-mistune))
6730
6731 (define-public python-markdown
6732 (package
6733 (name "python-markdown")
6734 (version "3.2")
6735 (source
6736 (origin
6737 (method url-fetch)
6738 (uri (pypi-uri "Markdown" version))
6739 (sha256
6740 (base32
6741 "1gwqrhrp0n9xllgmjc8n1p260968kr0dd2jncjkj4r617q61imss"))))
6742 (build-system python-build-system)
6743 (native-inputs
6744 `(("python-nose" ,python-nose)
6745 ("python-pyyaml" ,python-pyyaml)))
6746 (home-page "https://python-markdown.github.io/")
6747 (synopsis "Python implementation of Markdown")
6748 (description
6749 "This package provides a Python implementation of John Gruber's
6750 Markdown. The library features international input, various Markdown
6751 extensions, and several HTML output formats. A command line wrapper
6752 markdown_py is also provided to convert Markdown files to HTML.")
6753 (properties `((python2-variant . ,(delay python2-markdown))))
6754 (license license:bsd-3)))
6755
6756 ;; Markdown 3.2 dropped support for Python 2.
6757 (define-public python2-markdown
6758 (let ((base (package-with-python2 (strip-python2-variant python-markdown))))
6759 (package/inherit
6760 base
6761 (version "3.1.1")
6762 (source (origin
6763 (method url-fetch)
6764 (uri (pypi-uri "Markdown" version))
6765 (sha256
6766 (base32
6767 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f")))))))
6768
6769 (define-public python-ptyprocess
6770 (package
6771 (name "python-ptyprocess")
6772 (version "0.5.2")
6773 (source
6774 (origin
6775 (method url-fetch)
6776 (uri (pypi-uri "ptyprocess" version))
6777 (sha256
6778 (base32
6779 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6780 (build-system python-build-system)
6781 (native-inputs
6782 `(("python-nose" ,python-nose)))
6783 (arguments
6784 `(#:phases
6785 (modify-phases %standard-phases
6786 (replace 'check
6787 (lambda _ (invoke "nosetests"))))))
6788 (home-page "https://github.com/pexpect/ptyprocess")
6789 (synopsis "Run a subprocess in a pseudo terminal")
6790 (description
6791 "This package provides a Python library used to launch a subprocess in a
6792 pseudo terminal (pty), and interact with both the process and its pty.")
6793 (license license:isc)))
6794
6795 (define-public python2-ptyprocess
6796 (package-with-python2 python-ptyprocess))
6797
6798 (define-public python-cram
6799 (package
6800 (name "python-cram")
6801 (version "0.7")
6802 (home-page "https://bitheap.org/cram/")
6803 (source (origin
6804 (method url-fetch)
6805 (uri (list (string-append home-page "cram-"
6806 version ".tar.gz")
6807 (pypi-uri "cram" version)))
6808 (sha256
6809 (base32
6810 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6811 (arguments
6812 '(#:phases
6813 (modify-phases %standard-phases
6814 (add-after 'unpack 'patch-source
6815 (lambda _
6816 (substitute* (find-files "cram" ".*\\.py$")
6817 ;; Replace default shell path.
6818 (("/bin/sh") (which "sh")))
6819 (substitute* (find-files "tests" ".*\\.t$")
6820 (("md5") "md5sum")
6821 (("/bin/bash") (which "bash"))
6822 (("/bin/sh") (which "sh")))
6823 (substitute* "cram/_test.py"
6824 ;; This hack works around a bug triggered by substituting
6825 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6826 ;; "cram -h", which breaks the output at 80 characters. This
6827 ;; causes the line showing the default shell to break into two
6828 ;; lines, but the test expects a single line...
6829 (("env\\['COLUMNS'\\] = '80'")
6830 "env['COLUMNS'] = '160'"))
6831
6832 (substitute* "Makefile"
6833 ;; Recent versions of python-coverage have caused the test
6834 ;; coverage to decrease (as of version 0.7). Allow that.
6835 (("--fail-under=100")
6836 "--fail-under=90"))
6837
6838 #t))
6839 (replace 'check
6840 ;; The test phase uses the built library and executable.
6841 (lambda* (#:key inputs outputs #:allow-other-keys)
6842 (add-installed-pythonpath inputs outputs)
6843 (setenv "PATH" (string-append (getenv "PATH") ":"
6844 (assoc-ref outputs "out") "/bin"))
6845 (invoke "make" "test"))))))
6846 (build-system python-build-system)
6847 (native-inputs
6848 `(("python-coverage" ,python-coverage)
6849 ("which" ,which)))
6850 (synopsis "Simple testing framework for command line applications")
6851 (description
6852 "Cram is a functional testing framework for command line applications.
6853 Cram tests look like snippets of interactive shell sessions. Cram runs each
6854 command and compares the command output in the test with the command’s actual
6855 output.")
6856 (license license:gpl2+)))
6857
6858 (define-public python2-cram
6859 (package-with-python2 python-cram))
6860
6861 (define-public python-straight-plugin
6862 (package
6863 (name "python-straight-plugin")
6864 (version "1.4.1")
6865 (source
6866 (origin
6867 (method url-fetch)
6868 (uri (pypi-uri "straight.plugin" version))
6869 (sha256
6870 (base32
6871 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6872 (build-system python-build-system)
6873 (home-page "https://github.com/ironfroggy/straight.plugin")
6874 (synopsis "Simple namespaced plugin facility")
6875 (description "Straight Plugin provides a type of plugin you can create from
6876 almost any existing Python modules, and an easy way for outside developers to
6877 add functionality and customization to your projects with their own plugins.")
6878 (license license:expat)))
6879
6880 (define-public python2-straight-plugin
6881 (package-with-python2 python-straight-plugin))
6882
6883 (define-public python-fonttools
6884 (package
6885 (name "python-fonttools")
6886 (version "3.38.0")
6887 (source (origin
6888 (method url-fetch)
6889 (uri (pypi-uri "fonttools" version ".zip"))
6890 (sha256
6891 (base32
6892 "12ripk3s7skgxr1bs9r8n13r94ym3s8iir7ivfixls9fa4dabmlh"))))
6893 (build-system python-build-system)
6894 (native-inputs
6895 `(("unzip" ,unzip)
6896 ("python-pytest" ,python-pytest)
6897 ("python-pytest-runner" ,python-pytest-runner)))
6898 (home-page "https://github.com/fonttools/fonttools")
6899 (synopsis "Tools to manipulate font files")
6900 (description
6901 "FontTools/TTX is a library to manipulate font files from Python. It
6902 supports reading and writing of TrueType/OpenType fonts, reading and writing
6903 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6904 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6905 from an XML-based format.")
6906 (license license:expat)))
6907
6908 (define-public python2-fonttools
6909 (package-with-python2 python-fonttools))
6910
6911 (define-public python-ly
6912 (package
6913 (name "python-ly")
6914 (version "0.9.5")
6915 (source
6916 (origin
6917 (method url-fetch)
6918 (uri (pypi-uri name version))
6919 (sha256
6920 (base32
6921 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6922 (build-system python-build-system)
6923 (arguments
6924 ;; FIXME: Some tests need network access.
6925 '(#:tests? #f))
6926 (synopsis "Tool and library for manipulating LilyPond files")
6927 (description "This package provides a Python library to parse, manipulate
6928 or create documents in LilyPond format. A command line program ly is also
6929 provided that can be used to do various manipulations with LilyPond files.")
6930 (home-page "https://pypi.python.org/pypi/python-ly")
6931 (license license:gpl2+)))
6932
6933 (define-public python-appdirs
6934 (package
6935 (name "python-appdirs")
6936 (version "1.4.3")
6937 (source
6938 (origin
6939 (method url-fetch)
6940 (uri (pypi-uri "appdirs" version))
6941 (sha256
6942 (base32
6943 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6944 (build-system python-build-system)
6945 (home-page "https://github.com/ActiveState/appdirs")
6946 (synopsis
6947 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6948 (description
6949 "This module provides a portable way of finding out where user data
6950 should be stored on various operating systems.")
6951 (license license:expat)))
6952
6953 (define-public python2-appdirs
6954 (package-with-python2 python-appdirs))
6955
6956 (define-public python-llfuse
6957 (package
6958 (name "python-llfuse")
6959 (version "1.3.5")
6960 (source (origin
6961 (method url-fetch)
6962 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6963 (sha256
6964 (base32
6965 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6966 (build-system python-build-system)
6967 (inputs
6968 `(("fuse" ,fuse)
6969 ("attr" ,attr)))
6970 (native-inputs
6971 `(("pkg-config" ,pkg-config)))
6972 (synopsis "Python bindings for FUSE")
6973 (description
6974 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6975 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6976 (license license:lgpl2.0+)
6977 (properties `((python2-variant . ,(delay python2-llfuse))))))
6978
6979 (define-public python2-llfuse
6980 (package (inherit (package-with-python2
6981 (strip-python2-variant python-llfuse)))
6982 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6983
6984 ;; For attic-0.16
6985 (define-public python-llfuse-0.41
6986 (package (inherit python-llfuse)
6987 (version "0.41.1")
6988 (source (origin
6989 (method url-fetch)
6990 (uri (string-append
6991 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6992 "llfuse-" version ".tar.bz2"))
6993 (sha256
6994 (base32
6995 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6996 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6997 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6998 (license (list license:expat license:lgpl2.0+))))
6999
7000 (define-public python-msgpack
7001 (package
7002 (name "python-msgpack")
7003 (version "0.5.6")
7004 (source (origin
7005 (method url-fetch)
7006 (uri (pypi-uri "msgpack" version))
7007 (sha256
7008 (base32
7009 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
7010 (build-system python-build-system)
7011 (arguments
7012 `(#:modules ((guix build utils)
7013 (guix build python-build-system)
7014 (ice-9 ftw)
7015 (srfi srfi-1)
7016 (srfi srfi-26))
7017 #:phases
7018 (modify-phases %standard-phases
7019 (replace 'check
7020 (lambda _
7021 (let ((cwd (getcwd)))
7022 (setenv "PYTHONPATH"
7023 (string-append cwd "/build/"
7024 (find (cut string-prefix? "lib" <>)
7025 (scandir (string-append cwd "/build")))
7026 ":"
7027 (getenv "PYTHONPATH")))
7028 (invoke "pytest" "-v" "test")))))))
7029 (native-inputs
7030 `(("python-pytest" ,python-pytest)))
7031 (synopsis "MessagePack (de)serializer")
7032 (description "MessagePack is a fast, compact binary serialization format,
7033 suitable for similar data to JSON. This package provides CPython bindings for
7034 reading and writing MessagePack data.")
7035 (home-page "https://pypi.python.org/pypi/msgpack/")
7036 (license license:asl2.0)))
7037
7038 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
7039 ;; release 0.5. Some packages like borg still call it by the old name for now.
7040 ;; <https://bugs.gnu.org/30662>
7041 (define-public python-msgpack-transitional
7042 (package
7043 (inherit python-msgpack)
7044 (name "python-msgpack-transitional")
7045 (arguments
7046 (substitute-keyword-arguments (package-arguments python-msgpack)
7047 ((#:phases phases)
7048 `(modify-phases ,phases
7049 (add-after 'unpack 'configure-transitional
7050 (lambda _
7051 ;; Keep using the old name.
7052 (substitute* "setup.py"
7053 (("TRANSITIONAL = False")
7054 "TRANSITIONAL = 1"))
7055 #t))))))))
7056
7057 (define-public python2-msgpack
7058 (package-with-python2 python-msgpack))
7059
7060 (define-public python-netaddr
7061 (package
7062 (name "python-netaddr")
7063 (version "0.7.19")
7064 (source
7065 (origin
7066 (method url-fetch)
7067 (uri (pypi-uri "netaddr" version))
7068 (sha256
7069 (base32
7070 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
7071 (build-system python-build-system)
7072 (arguments `(#:tests? #f)) ;; No tests.
7073 (home-page "https://github.com/drkjam/netaddr/")
7074 (synopsis "Pythonic manipulation of network addresses")
7075 (description
7076 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
7077 and MAC network addresses.")
7078 (license license:bsd-3)))
7079
7080 (define-public python2-netaddr
7081 (package-with-python2 python-netaddr))
7082
7083 (define-public python2-pyroute2
7084 (package
7085 (name "python2-pyroute2")
7086 (version "0.5.6")
7087 (source
7088 (origin
7089 (method url-fetch)
7090 (uri (pypi-uri "pyroute2" version))
7091 (sha256
7092 (base32
7093 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
7094 (build-system python-build-system)
7095 (arguments
7096 `(#:python ,python-2)) ;Python 3.x is not supported
7097 (home-page "https://github.com/svinota/pyroute2")
7098 (synopsis "Python netlink library")
7099 (description
7100 "Pyroute2 is a pure Python netlink library with minimal dependencies.
7101 Supported netlink families and protocols include:
7102 @itemize
7103 @item rtnl, network settings - addresses, routes, traffic controls
7104 @item nfnetlink - netfilter API: ipset, nftables, ...
7105 @item ipq - simplest userspace packet filtering, iptables QUEUE target
7106 @item devlink - manage and monitor devlink-enabled hardware
7107 @item generic - generic netlink families
7108 @itemize
7109 @item nl80211 - wireless functions API (basic support)
7110 @item taskstats - extended process statistics
7111 @item acpi_events - ACPI events monitoring
7112 @item thermal_events - thermal events monitoring
7113 @item VFS_DQUOT - disk quota events monitoring
7114 @end itemize
7115 @end itemize")
7116 (license license:gpl2+)))
7117
7118 (define-public python-wrapt
7119 (package
7120 (name "python-wrapt")
7121 (version "1.11.2")
7122 (source
7123 (origin
7124 (method url-fetch)
7125 (uri (pypi-uri "wrapt" version))
7126 (sha256
7127 (base32
7128 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
7129 (build-system python-build-system)
7130 (arguments
7131 ;; Tests are not included in the tarball, they are only available in the
7132 ;; git repository.
7133 `(#:tests? #f))
7134 (home-page "https://github.com/GrahamDumpleton/wrapt")
7135 (synopsis "Module for decorators, wrappers and monkey patching")
7136 (description
7137 "The aim of the wrapt module is to provide a transparent object proxy for
7138 Python, which can be used as the basis for the construction of function
7139 wrappers and decorator functions.")
7140 (license license:bsd-2)))
7141
7142 (define-public python2-wrapt
7143 (package-with-python2 python-wrapt))
7144
7145 (define-public python-xlrd
7146 (package
7147 (name "python-xlrd")
7148 (version "1.2.0")
7149 (source (origin
7150 (method url-fetch)
7151 (uri (pypi-uri "xlrd" version))
7152 (sha256
7153 (base32
7154 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
7155 (build-system python-build-system)
7156 (arguments
7157 `(#:phases
7158 (modify-phases %standard-phases
7159 ;; Some tests depend on writing a temporary file to the user's home
7160 ;; directory.
7161 (add-after 'unpack 'fix-tests
7162 (lambda _
7163 (delete-file "tests/test_open_workbook.py")
7164 #t)))))
7165 (home-page "http://www.python-excel.org/")
7166 (synopsis "Library for extracting data from Excel files")
7167 (description "This package provides a library to extract data from
7168 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7169 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7170 Unicode-aware. It is not intended as an end-user tool.")
7171 (license license:bsd-3)))
7172
7173 (define-public python2-xlrd
7174 (package-with-python2 python-xlrd))
7175
7176 (define-public python-prettytable
7177 (package
7178 (name "python-prettytable")
7179 (version "0.7.2")
7180 (source
7181 (origin
7182 (method url-fetch)
7183 (uri (pypi-uri "prettytable" version ".tar.bz2"))
7184 (sha256
7185 (base32
7186 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7187 (build-system python-build-system)
7188 (home-page "http://code.google.com/p/prettytable/")
7189 (synopsis "Display tabular data in an ASCII table format")
7190 (description
7191 "A library designed to represent tabular data in visually appealing ASCII
7192 tables. PrettyTable allows for selection of which columns are to be printed,
7193 independent alignment of columns (left or right justified or centred) and
7194 printing of sub-tables by specifying a row range.")
7195 (license license:bsd-3)))
7196
7197 (define-public python2-prettytable
7198 (package-with-python2 python-prettytable))
7199
7200 (define-public python-tables
7201 (package
7202 (name "python-tables")
7203 (version "3.4.4")
7204 (source
7205 (origin
7206 (method url-fetch)
7207 (uri (pypi-uri "tables" version))
7208 (sha256
7209 (base32
7210 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7211 (modules '((guix build utils)))
7212 (snippet
7213 '(begin
7214 ;; Remove pre-compiled .pyc files from source.
7215 (for-each delete-file-recursively
7216 (find-files "." "__pycache__" #:directories? #t))
7217 (for-each delete-file (find-files "." "\\.pyc$"))
7218 #t))))
7219 (build-system python-build-system)
7220 (arguments
7221 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7222 ;; or "check", so we must override the build and check phases.
7223 #:phases
7224 (modify-phases %standard-phases
7225 (add-after 'unpack 'use-gcc
7226 (lambda _
7227 (substitute* "setup.py"
7228 (("compiler = new_compiler\\(\\)" line)
7229 (string-append line
7230 "\ncompiler.set_executables(compiler='gcc',"
7231 "compiler_so='gcc',"
7232 "linker_exe='gcc',"
7233 "linker_so='gcc -shared')")))
7234 #t))
7235 (replace 'build
7236 (lambda* (#:key inputs #:allow-other-keys)
7237 (invoke "python" "setup.py" "build"
7238 (string-append "--hdf5="
7239 (assoc-ref inputs "hdf5")))))
7240 (replace 'check
7241 (lambda* (#:key inputs #:allow-other-keys)
7242 (invoke "python" "setup.py" "check"
7243 (string-append "--hdf5="
7244 (assoc-ref inputs "hdf5"))))))))
7245 (propagated-inputs
7246 `(("python-numexpr" ,python-numexpr)
7247 ("python-numpy" ,python-numpy)))
7248 (native-inputs
7249 `(("python-cython" ,python-cython)
7250 ("pkg-config" ,pkg-config)))
7251 (inputs
7252 `(("hdf5" ,hdf5)
7253 ("bzip2" ,bzip2)
7254 ("zlib" ,zlib)))
7255 (home-page "http://www.pytables.org/")
7256 (synopsis "Hierarchical datasets for Python")
7257 (description "PyTables is a package for managing hierarchical datasets and
7258 designed to efficiently cope with extremely large amounts of data.")
7259 (license license:bsd-3)))
7260
7261 (define-public python2-tables
7262 (package-with-python2 python-tables))
7263
7264 (define-public python-pyasn1
7265 (package
7266 (name "python-pyasn1")
7267 (version "0.4.3")
7268 (source
7269 (origin
7270 (method url-fetch)
7271 (uri (pypi-uri "pyasn1" version))
7272 (sha256
7273 (base32
7274 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7275 (build-system python-build-system)
7276 (home-page "http://pyasn1.sourceforge.net/")
7277 (synopsis "ASN.1 types and codecs")
7278 (description
7279 "This is an implementation of ASN.1 types and codecs in Python. It is
7280 suitable for a wide range of protocols based on the ASN.1 specification.")
7281 (license license:bsd-2)))
7282
7283 (define-public python2-pyasn1
7284 (package-with-python2 python-pyasn1))
7285
7286 (define-public python-pyasn1-modules
7287 (package
7288 (name "python-pyasn1-modules")
7289 (version "0.2.2")
7290 (source
7291 (origin
7292 (method url-fetch)
7293 (uri (pypi-uri "pyasn1-modules" version))
7294 (sha256
7295 (base32
7296 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7297 (build-system python-build-system)
7298 (propagated-inputs
7299 `(("python-pyasn1" ,python-pyasn1)))
7300 (home-page "https://sourceforge.net/projects/pyasn1/")
7301 (synopsis "ASN.1 codec implementations")
7302 (description
7303 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7304 implementations of ASN.1-based codecs and protocols.")
7305 (license license:bsd-3)))
7306
7307 (define-public python2-pyasn1-modules
7308 (package-with-python2 python-pyasn1-modules))
7309
7310 (define-public python-ipaddress
7311 (package
7312 (name "python-ipaddress")
7313 (version "1.0.22")
7314 (source (origin
7315 (method url-fetch)
7316 (uri (pypi-uri "ipaddress" version))
7317 (sha256
7318 (base32
7319 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7320 (build-system python-build-system)
7321 (home-page "https://github.com/phihag/ipaddress")
7322 (synopsis "IP address manipulation library")
7323 (description
7324 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7325 in Python. This library is used to create, poke at, and manipulate IPv4 and
7326 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7327 module to older versions of Python.")
7328 (license license:psfl)))
7329
7330 (define-public python2-ipaddress
7331 (package-with-python2 python-ipaddress))
7332
7333 (define-public python2-ipaddr
7334 (package
7335 (name "python2-ipaddr")
7336 (version "2.1.11")
7337 (source
7338 (origin
7339 (method url-fetch)
7340 (uri (pypi-uri "ipaddr" version))
7341 (sha256
7342 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7343 (build-system python-build-system)
7344 (arguments
7345 `(#:python ,python-2 ;version 2 only
7346 #:phases
7347 (modify-phases %standard-phases
7348 (replace 'check
7349 (lambda _ (invoke "python" "ipaddr_test.py"))))))
7350 (home-page "https://github.com/google/ipaddr-py")
7351 (synopsis "IP address manipulation library")
7352 (description
7353 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7354 IPv6 addresses and networks.
7355
7356 For new implementations you may prefer to use the standard module
7357 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
7358 versions of Python.")
7359 (license license:asl2.0)))
7360
7361 (define-public python-idna
7362 (package
7363 (name "python-idna")
7364 (version "2.8")
7365 (source
7366 (origin
7367 (method url-fetch)
7368 (uri (pypi-uri "idna" version))
7369 (sha256
7370 (base32
7371 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
7372 (build-system python-build-system)
7373 (home-page "https://github.com/kjd/idna")
7374 (synopsis "Internationalized domain names in applications")
7375 (description
7376 "This is a library to support the Internationalised Domain Names in
7377 Applications (IDNA) protocol as specified in RFC 5891. This version of the
7378 protocol is often referred to as “IDNA2008” and can produce different results
7379 from the earlier standard from 2003. The library is also intended to act as a
7380 suitable drop-in replacement for the “encodings.idna” module that comes with
7381 the Python standard library but currently only supports the older 2003
7382 specification.")
7383 (license license:bsd-4)))
7384
7385 (define-public python-idna-2.7
7386 (package (inherit python-idna)
7387 (version "2.7")
7388 (source (origin
7389 (method url-fetch)
7390 (uri (pypi-uri "idna" version))
7391 (sha256
7392 (base32
7393 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7394
7395
7396 (define-public python2-idna
7397 (package-with-python2 python-idna))
7398
7399 (define-public python-idna-ssl
7400 (package
7401 (name "python-idna-ssl")
7402 (version "1.0.1")
7403 (source
7404 (origin
7405 (method url-fetch)
7406 (uri (pypi-uri "idna-ssl" version))
7407 (sha256
7408 (base32
7409 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7410 (build-system python-build-system)
7411 (arguments
7412 `(#:tests? #f)) ;circular dependency with python-aiohttp
7413 (home-page "https://github.com/aio-libs/idna-ssl")
7414 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7415 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7416 domains support.")
7417 (license license:expat)))
7418
7419 (define-public python-pretend
7420 (package
7421 (name "python-pretend")
7422 (version "1.0.9")
7423 (source
7424 (origin
7425 (method url-fetch)
7426 (uri (pypi-uri "pretend" version))
7427 (sha256
7428 (base32
7429 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7430 (build-system python-build-system)
7431 (home-page "https://github.com/alex/pretend")
7432 (synopsis "Library for stubbing in Python")
7433 (description
7434 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7435 technique for writing tests. You may hear the term mixed up with mocks,
7436 fakes, or doubles. Basically, a stub is an object that returns pre-canned
7437 responses, rather than doing any computation.")
7438 (license license:bsd-3)))
7439
7440 (define-public python2-pretend
7441 (package-with-python2 python-pretend))
7442
7443 (define-public python-pip
7444 (package
7445 (name "python-pip")
7446 (version "20.0.2")
7447 (source
7448 (origin
7449 (method url-fetch)
7450 (uri (pypi-uri "pip" version))
7451 (sha256
7452 (base32
7453 "0zwnlsjn6mb742cr995zfbk9v56ygxp8w3k49601r9by9kmcic3x"))))
7454 (build-system python-build-system)
7455 (arguments
7456 '(#:tests? #f)) ; there are no tests in the pypi archive.
7457 (home-page "https://pip.pypa.io/")
7458 (synopsis "Package manager for Python software")
7459 (description
7460 "Pip is a package manager for Python software, that finds packages on the
7461 Python Package Index (PyPI).")
7462 (license license:expat)))
7463
7464 (define-public python2-pip
7465 (package-with-python2 python-pip))
7466
7467 (define-public python-tlsh
7468 (package
7469 (name "python-tlsh")
7470 (version "3.4.5")
7471 (home-page "https://github.com/trendmicro/tlsh")
7472 (source
7473 (origin
7474 (method git-fetch)
7475 (uri (git-reference
7476 (url "https://github.com/trendmicro/tlsh.git")
7477 (commit (string-append "v" version))))
7478 (file-name (git-file-name name version))
7479 (sha256
7480 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
7481 (build-system cmake-build-system)
7482 (arguments
7483 '(#:out-of-source? #f
7484 #:phases (modify-phases %standard-phases
7485 (replace
7486 'install
7487 (lambda* (#:key outputs #:allow-other-keys)
7488 ;; Build and install the Python bindings. The underlying
7489 ;; C++ library is apparently not meant to be installed.
7490 (let ((out (assoc-ref outputs "out")))
7491 (with-directory-excursion "py_ext"
7492 (and (system* "python" "setup.py" "build")
7493 (system* "python" "setup.py" "install"
7494 (string-append "--prefix=" out))))))))))
7495 (inputs `(("python" ,python-wrapper))) ;for the bindings
7496 (synopsis "Fuzzy matching library for Python")
7497 (description
7498 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7499 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7500 value which can be used for similarity comparisons. Similar objects have
7501 similar hash values, which allows for the detection of similar objects by
7502 comparing their hash values. The byte stream should have a sufficient amount
7503 of complexity; for example, a byte stream of identical bytes will not generate
7504 a hash value.")
7505 (license license:asl2.0)))
7506
7507 (define-public python2-tlsh
7508 (package
7509 (inherit python-tlsh)
7510 (name "python2-tlsh")
7511 (inputs `(("python" ,python-2)))))
7512
7513 (define-public python-termcolor
7514 (package
7515 (name "python-termcolor")
7516 (version "1.1.0")
7517 (source
7518 (origin
7519 (method url-fetch)
7520 (uri (pypi-uri "termcolor" version))
7521 (sha256
7522 (base32
7523 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7524 (build-system python-build-system)
7525 (arguments
7526 ;; There are no tests.
7527 `(#:tests? #f))
7528 (home-page "https://pypi.python.org/pypi/termcolor")
7529 (synopsis "ANSII Color formatting for terminal output")
7530 (description
7531 "This package provides ANSII Color formatting for output in terminals.")
7532 (license license:expat)))
7533
7534 (define-public python2-termcolor
7535 (package-with-python2 python-termcolor))
7536
7537 (define-public python-libarchive-c
7538 (package
7539 (name "python-libarchive-c")
7540 (version "2.8")
7541 (source (origin
7542 (method url-fetch)
7543 (uri (pypi-uri "libarchive-c" version))
7544 (sha256
7545 (base32
7546 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
7547 (build-system python-build-system)
7548 (arguments
7549 '(#:phases (modify-phases %standard-phases
7550 (add-before
7551 'build 'reference-libarchive
7552 (lambda* (#:key inputs #:allow-other-keys)
7553 ;; Retain the absolute file name of libarchive.so.
7554 (let ((libarchive (assoc-ref inputs "libarchive")))
7555 (substitute* "libarchive/ffi.py"
7556 (("find_library\\('archive'\\)")
7557 (string-append "'" libarchive
7558 "/lib/libarchive.so'"))))))
7559 (replace 'check
7560 (lambda _ (invoke "pytest" "-vv"))))))
7561 (native-inputs
7562 `(("python-mock" ,python-mock)
7563 ("python-pytest" ,python-pytest)))
7564 (inputs
7565 `(("libarchive" ,libarchive)))
7566 (home-page "https://github.com/Changaco/python-libarchive-c")
7567 (synopsis "Python interface to libarchive")
7568 (description
7569 "This package provides Python bindings to libarchive, a C library to
7570 access possibly compressed archives in many different formats. It uses
7571 Python's @code{ctypes} foreign function interface (FFI).")
7572 (license license:lgpl2.0+)))
7573
7574 (define-public python2-libarchive-c
7575 (package-with-python2 python-libarchive-c))
7576
7577 (define-public python-file
7578 (package
7579 (inherit file)
7580 (name "python-file")
7581 (build-system python-build-system)
7582 (arguments
7583 '(#:tests? #f ;no tests
7584 #:configure-flags '("--single-version-externally-managed" "--root=/")
7585 #:phases (modify-phases %standard-phases
7586 (add-before 'build 'change-directory
7587 (lambda _
7588 (chdir "python")
7589 #t))
7590 (add-before 'build 'set-library-file-name
7591 (lambda* (#:key inputs #:allow-other-keys)
7592 (let ((file (assoc-ref inputs "file")))
7593 (substitute* "magic.py"
7594 (("find_library\\('magic'\\)")
7595 (string-append "'" file "/lib/libmagic.so'")))
7596 #t))))))
7597 (inputs `(("file" ,file)))
7598 (native-inputs (if (%current-target-system)
7599 `(("self" ,this-package))
7600 '()))
7601 (synopsis "Python bindings to the libmagic file type guesser. Note that
7602 this module and the python-magic module both provide a \"magic.py\" file;
7603 these two modules, which are different and were developed separately, both
7604 serve the same purpose: provide Python bindings for libmagic.")))
7605
7606 (define-public python2-file
7607 (package-with-python2 python-file))
7608
7609 (define-public python-debian
7610 (package
7611 (name "python-debian")
7612 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
7613 (version "0.1.36")
7614 (source
7615 (origin
7616 ;; Use git-fetch, as pypi doesn't include test suite.
7617 (method git-fetch)
7618 (uri (git-reference
7619 (url home-page)
7620 (commit version)))
7621 (file-name (git-file-name name version))
7622 (sha256
7623 (base32
7624 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
7625 (build-system python-build-system)
7626 (arguments
7627 `(#:phases (modify-phases %standard-phases
7628 (add-after 'unpack 'remove-debian-specific-tests
7629 ;; python-apt, apt and dpkg are not yet available in guix,
7630 ;; and these tests heavily depend on them.
7631 (lambda _
7632 (delete-file "lib/debian/tests/test_deb822.py")
7633 (delete-file "lib/debian/tests/test_debfile.py")
7634 #t)))))
7635 (propagated-inputs
7636 `(("python-six" ,python-six)
7637 ("python-chardet" ,python-chardet)))
7638 (synopsis "Debian package related modules")
7639 (description
7640 ;; XXX: Use @enumerate instead of @itemize to work around
7641 ;; <http://bugs.gnu.org/21772>.
7642 "This package provides Python modules that abstract many formats of
7643 Debian-related files, such as:
7644
7645 @enumerate
7646 @item Debtags information;
7647 @item @file{debian/changelog} files;
7648 @item packages files, pdiffs;
7649 @item control files of single or multiple RFC822-style paragraphs---e.g.
7650 @file{debian/control}, @file{.changes}, @file{.dsc};
7651 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7652 contained files and meta-information.
7653 @end enumerate\n")
7654
7655 ;; Modules are either GPLv2+ or GPLv3+.
7656 (license license:gpl3+)))
7657
7658 (define-public python-nbformat
7659 (package
7660 (name "python-nbformat")
7661 (version "4.4.0")
7662 (source
7663 (origin
7664 (method url-fetch)
7665 (uri (pypi-uri "nbformat" version))
7666 (sha256
7667 (base32
7668 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7669 (build-system python-build-system)
7670 (arguments `(#:tests? #f)) ; no test target
7671 (propagated-inputs
7672 `(("python-ipython-genutils" ,python-ipython-genutils)
7673 ("python-jsonschema" ,python-jsonschema)
7674 ("python-jupyter-core" ,python-jupyter-core)
7675 ("python-traitlets" ,python-traitlets)))
7676 (home-page "http://jupyter.org")
7677 (synopsis "Jupyter Notebook format")
7678 (description "This package provides the reference implementation of the
7679 Jupyter Notebook format and Python APIs for working with notebooks.")
7680 (license license:bsd-3)))
7681
7682 (define-public python2-nbformat
7683 (package-with-python2 python-nbformat))
7684
7685 (define-public python-bleach
7686 (package
7687 (name "python-bleach")
7688 (version "3.1.0")
7689 (source
7690 (origin
7691 (method url-fetch)
7692 (uri (pypi-uri "bleach" version))
7693 (sha256
7694 (base32
7695 "1yhrgrhkln8bd6gn3imj69g1h4xqah9gaz9q26crqr6gmmvpzprz"))))
7696 (build-system python-build-system)
7697 (propagated-inputs
7698 `(("python-webencodings" ,python-webencodings)
7699 ("python-six" ,python-six)))
7700 (native-inputs
7701 `(("python-pytest" ,python-pytest)
7702 ("python-pytest-runner" ,python-pytest-runner-2)))
7703 (home-page "https://github.com/jsocol/bleach")
7704 (synopsis "Whitelist-based HTML-sanitizing tool")
7705 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7706 (license license:asl2.0)))
7707
7708 (define-public python2-bleach
7709 (package-with-python2 python-bleach))
7710
7711 (define-public python-entrypoints
7712 (package
7713 (name "python-entrypoints")
7714 (version "0.3")
7715 (source
7716 (origin
7717 (method url-fetch)
7718 (uri (pypi-uri "entrypoints" version))
7719 (sha256
7720 (base32
7721 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
7722 (build-system python-build-system)
7723 ;; The package does not come with a setup.py file, so we have to generate
7724 ;; one ourselves.
7725 (arguments
7726 `(#:tests? #f
7727 #:phases
7728 (modify-phases %standard-phases
7729 (add-after 'unpack 'create-setup.py
7730 (lambda _
7731 (call-with-output-file "setup.py"
7732 (lambda (port)
7733 (format port "\
7734 from setuptools import setup
7735 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7736 " ,version))))))))
7737 (home-page "https://github.com/takluyver/entrypoints")
7738 (synopsis "Discover and load entry points from installed Python packages")
7739 (description "Entry points are a way for Python packages to advertise
7740 objects with some common interface. The most common examples are
7741 @code{console_scripts} entry points, which define shell commands by
7742 identifying a Python function to run. The @code{entrypoints} module contains
7743 functions to find and load entry points.")
7744 (license license:expat)))
7745
7746 (define-public python2-entrypoints
7747 (package-with-python2 python-entrypoints))
7748
7749 (define-public python-nbconvert
7750 (package
7751 (name "python-nbconvert")
7752 (version "5.0.0b1")
7753 (source
7754 (origin
7755 (method url-fetch)
7756 (uri (pypi-uri "nbconvert" version))
7757 (sha256
7758 (base32
7759 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7760 (build-system python-build-system)
7761 (arguments
7762 `(;; The "bdist_egg" target is disabled by default, causing the installation
7763 ;; to fail.
7764 #:configure-flags (list "bdist_egg")
7765 ;; FIXME: 5 failures, 40 errors.
7766 #:tests? #f))
7767 ;; #:phases
7768 ;; (modify-phases %standard-phases
7769 ;; (replace 'check
7770 ;; (lambda _
7771 ;; (zero? (system* "py.test" "-v")))))
7772 (native-inputs
7773 `(("python-pytest" ,python-pytest)))
7774 (propagated-inputs
7775 `(("python-bleach" ,python-bleach)
7776 ("python-entrypoints" ,python-entrypoints)
7777 ("python-jinja2" ,python-jinja2)
7778 ("python-jupyter-core" ,python-jupyter-core)
7779 ("python-mistune" ,python-mistune)
7780 ("python-nbformat" ,python-nbformat)
7781 ("python-pygments" ,python-pygments)
7782 ("python-traitlets" ,python-traitlets)))
7783 (home-page "http://jupyter.org")
7784 (synopsis "Converting Jupyter Notebooks")
7785 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7786 notebooks to various other formats via Jinja templates. It allows you to
7787 convert an @code{.ipynb} notebook file into various static formats including:
7788
7789 @enumerate
7790 @item HTML
7791 @item LaTeX
7792 @item PDF
7793 @item Reveal JS
7794 @item Markdown (md)
7795 @item ReStructured Text (rst)
7796 @item executable script
7797 @end enumerate\n")
7798 (license license:bsd-3)))
7799
7800 (define-public python2-nbconvert
7801 (package-with-python2 python-nbconvert))
7802
7803 (define-public python-notebook
7804 (package
7805 (name "python-notebook")
7806 (version "5.7.4")
7807 (source (origin
7808 (method url-fetch)
7809 (uri (pypi-uri "notebook" version))
7810 (sha256
7811 (base32
7812 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7813 (build-system python-build-system)
7814 (arguments
7815 `(#:phases
7816 (modify-phases %standard-phases
7817 (replace 'check
7818 (lambda _
7819 ;; These tests require a browser
7820 (delete-file-recursively "notebook/tests/selenium")
7821 ;; Some tests need HOME
7822 (setenv "HOME" "/tmp")
7823 ;; This file contains "warningfilters", which are not supported
7824 ;; by this version of nose.
7825 (delete-file "setup.cfg")
7826 (with-directory-excursion "/tmp"
7827 (invoke "nosetests" "-v"))
7828 #t)))))
7829 (propagated-inputs
7830 `(("python-jupyter-core" ,python-jupyter-core)
7831 ("python-nbformat" ,python-nbformat)
7832 ("python-nbconvert" ,python-nbconvert)
7833 ("python-prometheus-client" ,python-prometheus-client)
7834 ("python-send2trash" ,python-send2trash)
7835 ("python-terminado" ,python-terminado)))
7836 (native-inputs
7837 `(("python-nose" ,python-nose)
7838 ("python-sphinx" ,python-sphinx)
7839 ("python-requests" ,python-requests)))
7840 (home-page "http://jupyter.org/")
7841 (synopsis "Web-based notebook environment for interactive computing")
7842 (description
7843 "The Jupyter HTML notebook is a web-based notebook environment for
7844 interactive computing.")
7845 (properties `((python2-variant . ,(delay python2-notebook))))
7846 (license license:bsd-3)))
7847
7848 (define-public python2-notebook
7849 (let ((base (package-with-python2
7850 (strip-python2-variant python-notebook))))
7851 (package (inherit base)
7852 (native-inputs
7853 `(("python2-mock" ,python2-mock)
7854 ,@(package-native-inputs base)))
7855 (arguments
7856 (substitute-keyword-arguments (package-arguments base)
7857 ((#:phases phases)
7858 `(modify-phases ,phases
7859 (add-before 'check 'disable-test-case
7860 ;; The test requires network access to localhost. Curiously it
7861 ;; fails with Python 2 only. Simply make the test-case return
7862 ;; immediately.
7863 (lambda _
7864 (substitute*
7865 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7866 (("formats = self.nbconvert_api") "return #")))))))))))
7867
7868 (define-public python-widgetsnbextension
7869 (package
7870 (name "python-widgetsnbextension")
7871 (version "3.4.2")
7872 (source
7873 (origin
7874 (method url-fetch)
7875 (uri (pypi-uri "widgetsnbextension" version))
7876 (sha256
7877 (base32
7878 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7879 (build-system python-build-system)
7880 (propagated-inputs
7881 `(("python-ipykernel" ,python-ipykernel)
7882 ("python-notebook" ,python-notebook)))
7883 (native-inputs
7884 `(("python-certifi" ,python-certifi)
7885 ("python-nose" ,python-nose)))
7886 (home-page "https://ipython.org")
7887 (synopsis "IPython HTML widgets for Jupyter")
7888 (description "This package provides interactive HTML widgets for Jupyter
7889 notebooks.")
7890 (license license:bsd-3)))
7891
7892 (define-public python2-widgetsnbextension
7893 (package-with-python2 python-widgetsnbextension))
7894
7895 (define-public python-ipywidgets
7896 (package
7897 (name "python-ipywidgets")
7898 (version "5.2.2")
7899 (source
7900 (origin
7901 (method url-fetch)
7902 (uri (pypi-uri "ipywidgets" version))
7903 (sha256
7904 (base32
7905 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7906 (build-system python-build-system)
7907 (propagated-inputs
7908 `(("python-ipython" ,python-ipython)
7909 ("python-traitlets" ,python-traitlets)
7910 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7911 (native-inputs
7912 `(("python-nose" ,python-nose)
7913 ("python-pytest" ,python-pytest)))
7914 (home-page "https://ipython.org")
7915 (synopsis "IPython HTML widgets for Jupyter")
7916 (description "Ipywidgets are interactive HTML widgets for Jupyter
7917 notebooks and the IPython kernel. Notebooks come alive when interactive
7918 widgets are used. Users gain control of their data and can visualize changes
7919 in the data.")
7920 (license license:bsd-3)))
7921
7922 (define-public python2-ipywidgets
7923 (package-with-python2 python-ipywidgets))
7924
7925 (define-public python-jupyter-console
7926 (package
7927 (name "python-jupyter-console")
7928 (version "6.0.0")
7929 (source
7930 (origin
7931 (method url-fetch)
7932 (uri (pypi-uri "jupyter_console" version))
7933 (sha256
7934 (base32
7935 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
7936 (build-system python-build-system)
7937 (propagated-inputs
7938 `(("python-ipykernel" ,python-ipykernel)
7939 ("python-jupyter-client" ,python-jupyter-client)
7940 ("python-prompt-toolkit" ,python-prompt-toolkit)
7941 ("python-pygments" ,python-pygments)))
7942 (native-inputs
7943 `(("python-nose" ,python-nose)))
7944 (home-page "https://jupyter.org")
7945 (synopsis "Jupyter terminal console")
7946 (description "This package provides a terminal-based console frontend for
7947 Jupyter kernels. It also allows for console-based interaction with non-Python
7948 Jupyter kernels such as IJulia and IRKernel.")
7949 (license license:bsd-3)))
7950
7951 (define-public python2-jupyter-console
7952 (package
7953 (name "python2-jupyter-console")
7954 (version "5.2.0")
7955 (source
7956 (origin
7957 (method url-fetch)
7958 (uri (pypi-uri "jupyter_console" version))
7959 (sha256
7960 (base32
7961 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7962 (build-system python-build-system)
7963 ;; Tests only run in an TTY.
7964 (arguments `(#:tests? #f))
7965 (propagated-inputs
7966 `(("python2-ipykernel" ,python2-ipykernel)
7967 ("python2-jupyter-client" ,python2-jupyter-client)
7968 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7969 ("python2-pygments" ,python2-pygments)))
7970 (native-inputs
7971 `(("python2-nose" ,python2-nose)))
7972 (home-page "https://jupyter.org")
7973 (synopsis "Jupyter terminal console")
7974 (description "This package provides a terminal-based console frontend for
7975 Jupyter kernels. It also allows for console-based interaction with non-Python
7976 Jupyter kernels such as IJulia and IRKernel.")
7977 (license license:bsd-3)))
7978
7979 ;; The python-ipython and python-jupyter-console require each other. To get
7980 ;; the functionality in both packages working, strip down the
7981 ;; python-jupyter-console package when using it as an input to python-ipython.
7982 (define python-jupyter-console-minimal
7983 (package
7984 (inherit python-jupyter-console)
7985 (name "python-jupyter-console-minimal")
7986 (arguments
7987 (substitute-keyword-arguments
7988 (package-arguments python-jupyter-console)
7989 ((#:phases phases)
7990 `(modify-phases ,phases
7991 (add-after 'install 'delete-bin
7992 (lambda* (#:key outputs #:allow-other-keys)
7993 ;; Delete the bin files, to avoid conflicts in profiles
7994 ;; where python-ipython and python-jupyter-console are
7995 ;; both present.
7996 (delete-file-recursively
7997 (string-append
7998 (assoc-ref outputs "out") "/bin"))))))))
7999 ;; Remove the python-ipython propagated input, to avoid the cycle
8000 (propagated-inputs
8001 (alist-delete
8002 "python-ipython"
8003 (package-propagated-inputs python-jupyter-console)))))
8004
8005 (define-public python-qtconsole
8006 (package
8007 (name "python-qtconsole")
8008 (version "4.4.3")
8009 (source
8010 (origin
8011 (method url-fetch)
8012 (uri (pypi-uri "qtconsole" version))
8013 (sha256
8014 (base32
8015 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
8016 (build-system python-build-system)
8017 (arguments
8018 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
8019 ;; but we only have the LTS version 5.x. This means that there might be
8020 ;; runtime errors, but since this is a dependency of the Jupyter package,
8021 ;; and Jupyter can be used without the qtconsole we can overlook this for
8022 ;; now.
8023 `(#:tests? #f
8024 #:phases
8025 (modify-phases %standard-phases
8026 (add-before 'check 'pre-check
8027 (lambda _
8028 (setenv "QT_QPA_PLATFORM" "offscreen")
8029 #t)))))
8030 (propagated-inputs
8031 `(("python-ipykernel" ,python-ipykernel)
8032 ("python-ipython" ,python-ipython)))
8033 (native-inputs
8034 `(("python-pytest" ,python-pytest)))
8035 (home-page "http://jupyter.org")
8036 (synopsis "Jupyter Qt console")
8037 (description "This package provides a Qt-based console for Jupyter with
8038 support for rich media output.")
8039 (license license:bsd-3)))
8040
8041 (define-public python-jsbeautifier
8042 (package
8043 (name "python-jsbeautifier")
8044 (version "1.10.2")
8045 (home-page "https://github.com/beautify-web/js-beautify")
8046 (source (origin
8047 (method git-fetch)
8048 (uri (git-reference
8049 (url home-page)
8050 (commit (string-append "v" version))))
8051 (file-name (git-file-name name version))
8052 (sha256
8053 (base32
8054 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
8055 (build-system python-build-system)
8056 (arguments
8057 `(#:phases (modify-phases %standard-phases
8058 (add-after 'unpack 'chdir
8059 (lambda _
8060 ;; The upstream Git repository contains all the code,
8061 ;; but this package only builds the python code.
8062 (chdir "python")
8063 #t))
8064 (add-after 'unpack 'patch-python-six-requirements
8065 (lambda _
8066 (substitute* "python/setup.py"
8067 (("six>=1.12.0")
8068 "six>=1.11.0"))
8069 #t)))))
8070 (propagated-inputs
8071 `(("python-editorconfig" ,python-editorconfig)
8072 ("python-six" ,python-six)))
8073 (native-inputs
8074 `(("python-pytest" ,python-pytest)))
8075 (synopsis "JavaScript unobfuscator and beautifier")
8076 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
8077 popular online obfuscators.")
8078 (license license:expat)))
8079
8080 (define-public jupyter
8081 (package
8082 (name "jupyter")
8083 (version "1.0.0")
8084 (source
8085 (origin
8086 (method url-fetch)
8087 (uri (pypi-uri "jupyter" version))
8088 (sha256
8089 (base32
8090 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8091 (build-system python-build-system)
8092 (arguments '(#:tests? #f)) ; there are none.
8093 (propagated-inputs
8094 `(("python-ipykernel" ,python-ipykernel)
8095 ("python-ipywidgets" ,python-ipywidgets)
8096 ("python-jupyter-console" ,python-jupyter-console)
8097 ("python-nbconvert" ,python-nbconvert)
8098 ("python-notebook" ,python-notebook)
8099 ("python-qtconsole" ,python-qtconsole)))
8100 (native-search-paths
8101 (list (search-path-specification
8102 (variable "JUPYTER_PATH")
8103 (files '("share/jupyter")))))
8104 (home-page "https://jupyter.org")
8105 (synopsis "Web application for interactive documents")
8106 (description
8107 "The Jupyter Notebook is a web application that allows you to create and
8108 share documents that contain live code, equations, visualizations and
8109 explanatory text. Uses include: data cleaning and transformation, numerical
8110 simulation, statistical modeling, machine learning and much more.")
8111 (license license:bsd-3)))
8112
8113 (define-public python-chardet
8114 (package
8115 (name "python-chardet")
8116 (version "3.0.4")
8117 (source
8118 (origin
8119 (method url-fetch)
8120 (uri (pypi-uri "chardet" version))
8121 (sha256
8122 (base32
8123 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
8124 (native-inputs
8125 `(("python-hypothesis" ,python-hypothesis)
8126 ("python-pytest" ,python-pytest)
8127 ("python-pytest-runner" ,python-pytest-runner)))
8128 (build-system python-build-system)
8129 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
8130 (arguments `(#:tests? #f))
8131 (home-page "https://github.com/chardet/chardet")
8132 (synopsis "Universal encoding detector for Python 2 and 3")
8133 (description
8134 "This package provides @code{chardet}, a Python module that can
8135 automatically detect a wide range of file encodings.")
8136 (license license:lgpl2.1+)))
8137
8138 (define-public python2-chardet
8139 (package-with-python2 python-chardet))
8140
8141 (define-public python-docopt
8142 (package
8143 (name "python-docopt")
8144 (version "0.6.2")
8145 (source
8146 (origin
8147 (method git-fetch)
8148 ;; The release on PyPI does not include tests.
8149 (uri (git-reference
8150 (url "https://github.com/docopt/docopt")
8151 (commit version)))
8152 (file-name (git-file-name name version))
8153 (sha256
8154 (base32
8155 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
8156 (build-system python-build-system)
8157 (native-inputs
8158 `(("python-pytest" ,python-pytest)))
8159 (arguments
8160 `(#:phases
8161 (modify-phases %standard-phases
8162 (replace 'check
8163 (lambda _ (invoke "py.test"))))))
8164 (home-page "http://docopt.org")
8165 (synopsis "Command-line interface description language for Python")
8166 (description "This library allows the user to define a command-line
8167 interface from a program's help message rather than specifying it
8168 programmatically with command-line parsers like @code{getopt} and
8169 @code{argparse}.")
8170 (license license:expat)))
8171
8172 (define-public python2-docopt
8173 (package-with-python2 python-docopt))
8174
8175 (define-public python-pythondialog
8176 (package
8177 (name "python-pythondialog")
8178 (version "3.4.0")
8179 (source
8180 (origin
8181 (method url-fetch)
8182 (uri (pypi-uri "pythondialog" version))
8183 (sha256
8184 (base32
8185 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8186 (build-system python-build-system)
8187 (arguments
8188 `(#:phases
8189 (modify-phases %standard-phases
8190 (add-after 'unpack 'patch-path
8191 (lambda* (#:key inputs #:allow-other-keys)
8192 (let* ((dialog (assoc-ref inputs "dialog")))
8193 ;; Since this library really wants to grovel the search path, we
8194 ;; must hardcode dialog's store path into it.
8195 (substitute* "dialog.py"
8196 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8197 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8198 #t))))
8199 #:tests? #f)) ; no test suite
8200 (propagated-inputs
8201 `(("dialog" ,dialog)))
8202 (home-page "http://pythondialog.sourceforge.net/")
8203 (synopsis "Python interface to the UNIX dialog utility")
8204 (description "A Python wrapper for the dialog utility. Its purpose is to
8205 provide an easy to use, pythonic and comprehensive Python interface to dialog.
8206 This allows one to make simple text-mode user interfaces on Unix-like systems")
8207 (license license:lgpl2.1)
8208 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8209
8210 (define-public python2-pythondialog
8211 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8212 (package
8213 (inherit base)
8214 (version (package-version python-pythondialog))
8215 (source (origin
8216 (method url-fetch)
8217 (uri (pypi-uri "python2-pythondialog" version))
8218 (sha256
8219 (base32
8220 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8221
8222 (define-public python-configobj
8223 (package
8224 (name "python-configobj")
8225 (version "5.0.6")
8226 (source (origin
8227 (method url-fetch)
8228 (uri (pypi-uri "configobj" version))
8229 (sha256
8230 (base32
8231 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8232 ;; Patch setup.py so it looks for python-setuptools, which is
8233 ;; required to parse the keyword 'install_requires' in setup.py.
8234 (patches (search-patches "python-configobj-setuptools.patch"))))
8235 (build-system python-build-system)
8236 (propagated-inputs
8237 `(("python-six" ,python-six)))
8238 (synopsis "Config file reading, writing and validation")
8239 (description "ConfigObj is a simple but powerful config file reader and
8240 writer: an ini file round tripper. Its main feature is that it is very easy to
8241 use, with a straightforward programmer’s interface and a simple syntax for
8242 config files.")
8243 (home-page "https://github.com/DiffSK/configobj")
8244 (license license:bsd-3)))
8245
8246 (define-public python2-configobj
8247 (package-with-python2 python-configobj))
8248
8249 (define-public python-configargparse
8250 (package
8251 (name "python-configargparse")
8252 (version "0.14.0")
8253 (source (origin
8254 (method url-fetch)
8255 (uri (pypi-uri "ConfigArgParse" version))
8256 (sha256
8257 (base32
8258 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
8259 (build-system python-build-system)
8260 (native-inputs
8261 `(("python-pyyaml" ,python-pyyaml)))
8262 (arguments
8263 `(#:phases
8264 (modify-phases %standard-phases
8265 (replace 'check
8266 (lambda _
8267 ;; Bypass setuptools-shim because one test relies on "setup.py"
8268 ;; being the first argument passed to the python call.
8269 ;;
8270 ;; NOTE: Many tests do not run because they rely on Python's
8271 ;; built-in test.test_argparse, but we remove the unit tests from
8272 ;; our Python installation.
8273 (invoke "python" "setup.py" "test"))))))
8274 (synopsis "Replacement for argparse")
8275 (description "A drop-in replacement for argparse that allows options to also
8276 be set via config files and/or environment variables.")
8277 (home-page "https://github.com/bw2/ConfigArgParse")
8278 (license license:expat)))
8279
8280 (define-public python2-configargparse
8281 (package-with-python2 python-configargparse))
8282
8283 (define-public python-argparse-manpage
8284 (package
8285 (name "python-argparse-manpage")
8286 (version "1.1")
8287 (source
8288 (origin
8289 (method url-fetch)
8290 (uri (pypi-uri "argparse-manpage" version))
8291 (sha256
8292 (base32
8293 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8294 (build-system python-build-system)
8295 (home-page "https://github.com/praiskup/argparse-manpage")
8296 (synopsis "Build manual page from Python's ArgumentParser object")
8297 (description
8298 "This package provides tools to build manual pages from Python's
8299 @code{ArgumentParser} object.")
8300 (license license:asl2.0)))
8301
8302 (define-public python-contextlib2
8303 (package
8304 (name "python-contextlib2")
8305 (version "0.5.5")
8306 (source
8307 (origin
8308 (method url-fetch)
8309 (uri (pypi-uri "contextlib2" version))
8310 (sha256
8311 (base32
8312 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8313 (build-system python-build-system)
8314 (home-page "http://contextlib2.readthedocs.org/")
8315 (synopsis "Tools for decorators and context managers")
8316 (description "This module is primarily a backport of the Python
8317 3.2 contextlib to earlier Python versions. Like contextlib, it
8318 provides utilities for common tasks involving decorators and context
8319 managers. It also contains additional features that are not part of
8320 the standard library.")
8321 (properties `((python2-variant . ,(delay python2-contextlib2))))
8322 (license license:psfl)))
8323
8324 (define-public python2-contextlib2
8325 (let ((base (package-with-python2
8326 (strip-python2-variant python-contextlib2))))
8327 (package
8328 (inherit base)
8329 (arguments
8330 (substitute-keyword-arguments (package-arguments base)
8331 ((#:phases phases)
8332 `(modify-phases ,phases
8333 (replace 'check
8334 (lambda _ (invoke "python" "test_contextlib2.py" "-v")))))))
8335 (native-inputs
8336 `(("python2-unittest2" ,python2-unittest2))))))
8337
8338 (define-public python-texttable
8339 (package
8340 (name "python-texttable")
8341 (version "0.9.1")
8342 (source
8343 (origin
8344 (method url-fetch)
8345 (uri (pypi-uri "texttable" version))
8346 (sha256
8347 (base32
8348 "0yawv64c0zbawwv6zz84whb32fnb2n9jylwjcfsrcdgh7xvl340i"))))
8349 (build-system python-build-system)
8350 (arguments '(#:tests? #f)) ; no tests
8351 (home-page "https://github.com/foutaise/texttable/")
8352 (synopsis "Python module for creating simple ASCII tables")
8353 (description "Texttable is a Python module for creating simple ASCII
8354 tables.")
8355 (license license:lgpl2.1+)))
8356
8357 (define-public python2-texttable
8358 (package-with-python2 python-texttable))
8359
8360 (define-public python-atomicwrites
8361 (package
8362 (name "python-atomicwrites")
8363 (version "1.3.0")
8364 (source (origin
8365 (method url-fetch)
8366 (uri (pypi-uri "atomicwrites" version))
8367 (sha256
8368 (base32
8369 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
8370 (build-system python-build-system)
8371 (synopsis "Atomic file writes in Python")
8372 (description "Library for atomic file writes using platform dependent tools
8373 for atomic file system operations.")
8374 (home-page "https://github.com/untitaker/python-atomicwrites")
8375 (license license:expat)))
8376
8377 (define-public python2-atomicwrites
8378 (package-with-python2 python-atomicwrites))
8379
8380 (define-public python-click-threading
8381 (package
8382 (name "python-click-threading")
8383 (version "0.4.4")
8384 (source (origin
8385 (method url-fetch)
8386 (uri (pypi-uri "click-threading" version))
8387 (sha256
8388 (base32
8389 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8390 (build-system python-build-system)
8391 (propagated-inputs
8392 `(("python-click" ,python-click)))
8393 (synopsis "Utilities for multithreading in Click")
8394 (description "This package provides utilities for multithreading in Click
8395 applications.")
8396 (home-page "https://github.com/click-contrib/click-threading")
8397 (license license:expat)))
8398
8399 (define-public python-click-log
8400 (package
8401 (name "python-click-log")
8402 (version "0.3.2")
8403 (source (origin
8404 (method url-fetch)
8405 (uri (pypi-uri "click-log" version))
8406 (sha256
8407 (base32
8408 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8409 (build-system python-build-system)
8410 (propagated-inputs
8411 `(("python-click" ,python-click)))
8412 (synopsis "Logging for click applications")
8413 (description "This package provides a Python library for logging Click
8414 applications.")
8415 (home-page "https://github.com/click-contrib/click-log")
8416 (license license:expat)))
8417
8418 (define-public python-apipkg
8419 (package
8420 (name "python-apipkg")
8421 (version "1.4")
8422 (source (origin
8423 (method url-fetch)
8424 (uri (pypi-uri "apipkg" version))
8425 (sha256
8426 (base32
8427 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8428 (build-system python-build-system)
8429 (native-inputs
8430 `(("python-pytest" ,python-pytest)))
8431 (synopsis "Namespace control and lazy-import mechanism")
8432 (description "With apipkg you can control the exported namespace of a Python
8433 package and greatly reduce the number of imports for your users. It is a small
8434 pure Python module that works on virtually all Python versions.")
8435 (home-page "https://github.com/pytest-dev/apipkg")
8436 (license license:expat)))
8437
8438 (define-public python2-apipkg
8439 (package-with-python2 python-apipkg))
8440
8441 (define-public python-execnet
8442 (package
8443 (name "python-execnet")
8444 (version "1.4.1")
8445 (source (origin
8446 (method url-fetch)
8447 (uri (pypi-uri "execnet" version))
8448 (sha256
8449 (base32
8450 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8451 (build-system python-build-system)
8452 (arguments
8453 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8454 ;; The two test failures are caused by the lack of an `ssh` executable.
8455 ;; The test suite can be run with pytest after the 'install' phase.
8456 #:tests? #f))
8457 (native-inputs
8458 `(("python-pytest" ,python-pytest)
8459 ("python-setuptools-scm" ,python-setuptools-scm)))
8460 (propagated-inputs
8461 `(("python-apipkg" ,python-apipkg)))
8462 (synopsis "Rapid multi-Python deployment")
8463 (description "Execnet provides a share-nothing model with
8464 channel-send/receive communication for distributing execution across many
8465 Python interpreters across version, platform and network barriers. It has a
8466 minimal and fast API targeting the following uses:
8467 @enumerate
8468 @item distribute tasks to (many) local or remote CPUs
8469 @item write and deploy hybrid multi-process applications
8470 @item write scripts to administer multiple environments
8471 @end enumerate")
8472 (home-page "http://codespeak.net/execnet/")
8473 (license license:expat)))
8474
8475 (define-public python2-execnet
8476 (package-with-python2 python-execnet))
8477
8478 (define-public python-icalendar
8479 (package
8480 (name "python-icalendar")
8481 (version "4.0.4")
8482 (source (origin
8483 (method url-fetch)
8484 (uri (pypi-uri "icalendar" version))
8485 (sha256
8486 (base32
8487 "16gjvqv0n05jrb9g228pdjgzd3amz2pdhvcgsn1jypszjg5m2w9l"))))
8488 (build-system python-build-system)
8489 (propagated-inputs
8490 `(("python-dateutil" ,python-dateutil)
8491 ("python-pytz" ,python-pytz)))
8492 (synopsis "Python library for parsing iCalendar files")
8493 (description "The icalendar package is a parser/generator of iCalendar
8494 files for use with Python.")
8495 (home-page "https://github.com/collective/icalendar")
8496 (license license:bsd-2)))
8497
8498 (define-public python-args
8499 (package
8500 (name "python-args")
8501 (version "0.1.0")
8502 (source (origin
8503 (method url-fetch)
8504 (uri (pypi-uri "args" version))
8505 (sha256
8506 (base32
8507 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8508 (build-system python-build-system)
8509 (home-page "https://github.com/kennethreitz/args")
8510 (synopsis "Command-line argument parser")
8511 (description
8512 "This library provides a Python module to parse command-line arguments.")
8513 (license license:bsd-3)))
8514
8515 (define-public python2-args
8516 (package-with-python2 python-args))
8517
8518 (define-public python-clint
8519 (package
8520 (name "python-clint")
8521 (version "0.5.1")
8522 (source (origin
8523 (method url-fetch)
8524 (uri (pypi-uri "clint" version))
8525 (sha256
8526 (base32
8527 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8528 (build-system python-build-system)
8529 (arguments
8530 '(#:phases
8531 (modify-phases %standard-phases
8532 (replace 'check
8533 (lambda _ (invoke "py.test" "-v"))))))
8534 (native-inputs
8535 `(("python-pytest" ,python-pytest)))
8536 (propagated-inputs
8537 `(("python-args" ,python-args)))
8538 (home-page "https://github.com/kennethreitz/clint")
8539 (synopsis "Command-line interface tools")
8540 (description
8541 "Clint is a Python module filled with a set of tools for developing
8542 command-line applications, including tools for colored and indented
8543 output, progress bar display, and pipes.")
8544 (license license:isc)))
8545
8546 (define-public python2-clint
8547 (package-with-python2 python-clint))
8548
8549 (define-public python-rply
8550 (package
8551 (name "python-rply")
8552 (version "0.7.5")
8553 (source (origin
8554 (method url-fetch)
8555 (uri (pypi-uri "rply" version))
8556 (sha256
8557 (base32
8558 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8559 (build-system python-build-system)
8560 (propagated-inputs
8561 `(("python-appdirs" ,python-appdirs)))
8562 (home-page "https://github.com/alex/rply")
8563 (synopsis "Parser generator for Python")
8564 (description
8565 "This package provides a pure Python based parser generator, that also
8566 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8567 with a new public API, and RPython support.")
8568 (license license:bsd-3)))
8569
8570 (define-public python2-rply
8571 (package-with-python2 python-rply))
8572
8573 (define-public python-hy
8574 (package
8575 (name "python-hy")
8576 (version "0.17.0")
8577 (source (origin
8578 (method url-fetch)
8579 (uri (pypi-uri "hy" version))
8580 (sha256
8581 (base32
8582 "1gdbqsirsdxj320wnp7my5awzs1kfs6m4fqmkzbd1zd47qzj0zfi"))))
8583 (build-system python-build-system)
8584 (arguments
8585 '(#:phases
8586 (modify-phases %standard-phases
8587 (add-before 'install 'set-HOME
8588 (lambda _
8589 (setenv "HOME" "/tmp")))
8590 (replace 'check
8591 (lambda _
8592 ;; Tests require write access to HOME.
8593 (setenv "HOME" "/tmp")
8594 (invoke "nosetests"))))))
8595 (native-inputs
8596 `(("python-coverage" ,python-coverage)
8597 ("python-nose" ,python-nose)))
8598 (propagated-inputs
8599 `(("python-astor" ,python-astor)
8600 ("python-clint" ,python-clint)
8601 ("python-rply" ,python-rply)
8602 ("python-fastentrypoints"
8603 ,python-fastentrypoints)
8604 ("python-funcparserlib"
8605 ,python-funcparserlib)))
8606 (home-page "http://hylang.org/")
8607 (synopsis "Lisp frontend to Python")
8608 (description
8609 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8610 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8611 Python at your fingertips, in Lisp form.")
8612 (license license:expat)))
8613
8614 (define-public python2-hy
8615 (package-with-python2 python-hy))
8616
8617 (define-public python2-functools32
8618 (package
8619 (name "python2-functools32")
8620 (version "3.2.3-2")
8621 (source
8622 (origin
8623 (method url-fetch)
8624 (uri (pypi-uri "functools32" version))
8625 (sha256
8626 (base32
8627 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8628 (build-system python-build-system)
8629 (arguments
8630 `(#:python ,python-2
8631 #:tests? #f)) ; no test target
8632 (home-page "https://github.com/MiCHiLU/python-functools32")
8633 (synopsis
8634 "Backport of the functools module from Python 3.2.3")
8635 (description
8636 "This package is a backport of the @code{functools} module from Python
8637 3.2.3 for use with older versions of Python and PyPy.")
8638 (license license:expat)))
8639
8640 (define-public python2-subprocess32
8641 (package
8642 (name "python2-subprocess32")
8643 (version "3.2.7")
8644 (source (origin
8645 (method url-fetch)
8646 (uri (pypi-uri "subprocess32" version))
8647 (sha256
8648 (base32
8649 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8650 (patches
8651 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8652 (build-system python-build-system)
8653 (arguments
8654 `(#:python ,python-2
8655 ;; The test suite fails with Python > 2.7.13:
8656 ;; import test.support
8657 ;; ImportError: No module named support
8658 #:tests? #f
8659 #:phases
8660 (modify-phases %standard-phases
8661 (add-after 'unpack 'patch-/bin/sh
8662 (lambda _
8663 (substitute* '("subprocess32.py"
8664 "test_subprocess32.py")
8665 (("/bin/sh") (which "sh")))
8666 #t)))))
8667 (home-page "https://github.com/google/python-subprocess32")
8668 (synopsis "Backport of the subprocess module from Python 3.2")
8669 (description
8670 "This is a backport of the @code{subprocess} standard library module
8671 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8672 new features. On POSIX systems it is guaranteed to be reliable when used
8673 in threaded applications. It includes timeout support from Python 3.3 but
8674 otherwise matches 3.2’s API.")
8675 (license license:psfl)))
8676
8677 (define-public python2-futures
8678 (package
8679 (name "python2-futures")
8680 (version "3.2.0")
8681 (source
8682 (origin
8683 (method url-fetch)
8684 (uri (pypi-uri "futures" version))
8685 (sha256
8686 (base32
8687 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8688 (build-system python-build-system)
8689 (arguments
8690 `(#:python ,python-2
8691 #:phases
8692 (modify-phases %standard-phases
8693 (replace 'check
8694 (lambda _
8695 (invoke "python" "test_futures.py")
8696 #t)))))
8697 (home-page "https://github.com/agronholm/pythonfutures")
8698 (synopsis
8699 "Backport of the concurrent.futures package from Python 3.2")
8700 (description
8701 "The concurrent.futures module provides a high-level interface for
8702 asynchronously executing callables. This package backports the
8703 concurrent.futures package from Python 3.2")
8704 (license license:bsd-3)))
8705
8706 (define-public python-promise
8707 (package
8708 (name "python-promise")
8709 (version "0.4.2")
8710 (source
8711 (origin
8712 (method url-fetch)
8713 (uri (pypi-uri "promise" version))
8714 (sha256
8715 (base32
8716 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8717 (build-system python-build-system)
8718 ;; Tests wants python-futures, which is a python2 only program, and
8719 ;; can't be found by python-promise at test time.
8720 (arguments `(#:tests? #f))
8721 (home-page "https://github.com/syrusakbary/promise")
8722 (synopsis "Promises/A+ implementation for Python")
8723 (description
8724 "Promises/A+ implementation for Python")
8725 (properties `((python2-variant . ,(delay python2-promise))))
8726 (license license:expat)))
8727
8728 (define-public python2-promise
8729 (let ((promise (package-with-python2
8730 (strip-python2-variant python-promise))))
8731 (package (inherit promise)
8732 (arguments (substitute-keyword-arguments (package-arguments promise)
8733 ((#:tests? _) #t)))
8734 (native-inputs
8735 `(("python2-futures" ,python2-futures)
8736 ("python2-pytest" ,python2-pytest)
8737 ,@(package-native-inputs promise))))))
8738
8739 (define-public python-progressbar33
8740 (package
8741 (name "python-progressbar33")
8742 (version "2.4")
8743 (source
8744 (origin
8745 (method url-fetch)
8746 (uri (pypi-uri "progressbar33" version))
8747 (sha256
8748 (base32
8749 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
8750 (build-system python-build-system)
8751 (home-page "http://github.com/germangh/python-progressbar")
8752 (synopsis "Text progress bar library for Python")
8753 (description
8754 "This package provides a text progress bar library for Python. This
8755 version only differs from the original @code{progressbar} package in that it
8756 uses relative package imports instead of absolute imports, which is necessary
8757 for the module to work under Python 3.3.")
8758 ;; Either or both of these licenses may be selected.
8759 (license (list license:lgpl2.1+ license:bsd-3))))
8760
8761 (define-public python-colorama
8762 (package
8763 (name "python-colorama")
8764 (version "0.3.9")
8765 (source
8766 (origin
8767 (method url-fetch)
8768 (uri (pypi-uri "colorama" version))
8769 (sha256
8770 (base32
8771 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
8772 (build-system python-build-system)
8773 (synopsis "Colored terminal text rendering for Python")
8774 (description "Colorama is a Python library for rendering colored terminal
8775 text.")
8776 (home-page "https://pypi.python.org/pypi/colorama")
8777 (license license:bsd-3)))
8778
8779 (define-public python2-colorama
8780 (package-with-python2 python-colorama))
8781
8782 (define-public python-rsa
8783 (package
8784 (name "python-rsa")
8785 (version "3.4.2")
8786 (source
8787 (origin
8788 (method url-fetch)
8789 (uri (pypi-uri "rsa" version))
8790 (sha256
8791 (base32
8792 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8793 (build-system python-build-system)
8794 (propagated-inputs
8795 `(("python-pyasn1" ,python-pyasn1)))
8796 (synopsis "Pure-Python RSA implementation")
8797 (description "Python-RSA is a pure-Python RSA implementation. It supports
8798 encryption and decryption, signing and verifying signatures, and key
8799 generation according to PKCS#1 version 1.5. It can be used as a Python
8800 library as well as on the command line.")
8801 (home-page "https://stuvel.eu/rsa")
8802 (license license:asl2.0)))
8803
8804 (define-public python2-rsa
8805 (package-with-python2 python-rsa))
8806
8807 (define-public python-pluggy
8808 (package
8809 (name "python-pluggy")
8810 (version "0.11.0")
8811 (source
8812 (origin
8813 (method url-fetch)
8814 (uri (pypi-uri "pluggy" version))
8815 (sha256
8816 (base32
8817 "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895"))))
8818 (build-system python-build-system)
8819 (native-inputs
8820 `(("python-setuptools-scm" ,python-setuptools-scm)))
8821 (synopsis "Plugin and hook calling mechanism for Python")
8822 (description "Pluggy is an extraction of the plugin manager as used by
8823 Pytest but stripped of Pytest specific details.")
8824 (home-page "https://pypi.python.org/pypi/pluggy")
8825 (license license:expat)))
8826
8827 (define-public python2-pluggy
8828 (package-with-python2 python-pluggy))
8829
8830 (define-public python-tox
8831 (package
8832 (name "python-tox")
8833 (version "2.8.1")
8834 (source
8835 (origin
8836 (method url-fetch)
8837 (uri (pypi-uri "tox" version))
8838 (sha256
8839 (base32
8840 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8841 (build-system python-build-system)
8842 (arguments
8843 ;; FIXME: Tests require pytest-timeout, which itself requires
8844 ;; pytest>=2.8.0 for installation.
8845 '(#:tests? #f))
8846 (propagated-inputs
8847 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8848 ("python-py" ,python-py)
8849 ("python-virtualenv" ,python-virtualenv)))
8850 (native-inputs
8851 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8852 ("python-pytest" ,python-pytest) ; >= 2.3.5
8853 ("python-setuptools-scm" ,python-setuptools-scm)))
8854 (home-page "https://tox.readthedocs.io")
8855 (synopsis "Virtualenv-based automation of test activities")
8856 (description "Tox is a generic virtualenv management and test command line
8857 tool. It can be used to check that a package installs correctly with
8858 different Python versions and interpreters, or run tests in each type of
8859 supported environment, or act as a frontend to continuous integration
8860 servers.")
8861 (license license:expat)))
8862
8863 (define-public python2-tox
8864 (package-with-python2 python-tox))
8865
8866 (define-public python-jmespath
8867 (package
8868 (name "python-jmespath")
8869 (version "0.9.4")
8870 (source
8871 (origin
8872 (method url-fetch)
8873 (uri (pypi-uri "jmespath" version))
8874 (sha256
8875 (base32
8876 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
8877 (build-system python-build-system)
8878 (native-inputs
8879 `(("python-nose" ,python-nose)))
8880 (synopsis "JSON Matching Expressions")
8881 (description "JMESPath (pronounced “james path”) is a Python library that
8882 allows one to declaratively specify how to extract elements from a JSON
8883 document.")
8884 (home-page "https://github.com/jmespath/jmespath.py")
8885 (license license:expat)))
8886
8887 (define-public python2-jmespath
8888 (package-with-python2 python-jmespath))
8889
8890 (define-public python-botocore
8891 (package
8892 (name "python-botocore")
8893 (version "1.12.149")
8894 (source
8895 (origin
8896 (method url-fetch)
8897 (uri (pypi-uri "botocore" version))
8898 (sha256
8899 (base32
8900 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
8901 (build-system python-build-system)
8902 (arguments
8903 ;; FIXME: Many tests are failing.
8904 '(#:tests? #f))
8905 (propagated-inputs
8906 `(("python-dateutil" ,python-dateutil)
8907 ("python-docutils" ,python-docutils)
8908 ("python-jmespath" ,python-jmespath)))
8909 (native-inputs
8910 `(("python-mock" ,python-mock)
8911 ("python-nose" ,python-nose)
8912 ("behave" ,behave)
8913 ("python-tox" ,python-tox)
8914 ("python-urllib3" ,python-urllib3)
8915 ("python-wheel" ,python-wheel)))
8916 (home-page "https://github.com/boto/botocore")
8917 (synopsis "Low-level interface to AWS")
8918 (description "Botocore is a Python library that provides a low-level
8919 interface to the Amazon Web Services (AWS) API.")
8920 (license license:asl2.0)))
8921
8922 (define-public python2-botocore
8923 (package-with-python2 python-botocore))
8924
8925 (define-public python-xdo
8926 (package
8927 (name "python-xdo")
8928 (version "0.3")
8929 (source (origin
8930 (method url-fetch)
8931 (uri (string-append
8932 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8933 "python-xdo_" version ".orig.tar.gz"))
8934 (sha256
8935 (base32
8936 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8937 (build-system python-build-system)
8938 (arguments
8939 '(#:phases
8940 (modify-phases %standard-phases
8941 (add-before 'install 'patch-libxdo-path
8942 ;; Hardcode the path of dynamically loaded libxdo library.
8943 (lambda* (#:key inputs #:allow-other-keys)
8944 (let ((libxdo (string-append
8945 (assoc-ref inputs "xdotool")
8946 "/lib/libxdo.so")))
8947 (substitute* "xdo/_xdo.py"
8948 (("find_library\\(\"xdo\"\\)")
8949 (simple-format #f "\"~a\"" libxdo)))
8950 #t))))
8951 #:tests? #f)) ; no tests provided
8952 (propagated-inputs
8953 `(("python-six" ,python-six)))
8954 (inputs
8955 `(("xdotool" ,xdotool)
8956 ("libX11" ,libx11)))
8957 (home-page "https://tracker.debian.org/pkg/python-xdo")
8958 (synopsis "Python library for simulating X11 keyboard/mouse input")
8959 (description "Provides bindings to libxdo for manipulating X11 via simulated
8960 input. (Note that this is mostly a legacy library; you may wish to look at
8961 python-xdo for newer bindings.)")
8962 (license license:bsd-3)))
8963
8964 (define-public python2-xdo
8965 (package-with-python2 python-xdo))
8966
8967 (define-public python-mako
8968 (package
8969 (name "python-mako")
8970 (version "1.1.0")
8971 (source
8972 (origin
8973 (method url-fetch)
8974 (uri (pypi-uri "Mako" version))
8975 (sha256
8976 (base32
8977 "0jqa3qfpykyn4fmkn0kh6043sfls7br8i2bsdbccazcvk9cijsd3"))))
8978 (build-system python-build-system)
8979 (arguments
8980 `(#:phases (modify-phases %standard-phases
8981 (replace 'check
8982 (lambda _
8983 (invoke "pytest" "-vv"))))))
8984 (propagated-inputs
8985 `(("python-markupsafe" ,python-markupsafe)))
8986 (native-inputs
8987 `(("python-mock" ,python-mock)
8988 ("python-pytest" ,python-pytest)))
8989 (home-page "https://www.makotemplates.org/")
8990 (synopsis "Templating language for Python")
8991 (description "Mako is a templating language for Python that compiles
8992 templates into Python modules.")
8993 (license license:expat)))
8994
8995 (define-public python2-mako
8996 (package-with-python2 python-mako))
8997
8998 (define-public python-waitress
8999 (package
9000 (name "python-waitress")
9001 (version "1.1.0")
9002 (source
9003 (origin
9004 (method url-fetch)
9005 (uri (pypi-uri "waitress" version))
9006 (patches (search-patches "python-waitress-fix-tests.patch"))
9007 (sha256
9008 (base32
9009 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
9010 (build-system python-build-system)
9011 (home-page "https://github.com/Pylons/waitress")
9012 (synopsis "Waitress WSGI server")
9013 (description "Waitress is meant to be a production-quality pure-Python WSGI
9014 server with very acceptable performance.")
9015 (license license:zpl2.1)))
9016
9017 (define-public python2-waitress
9018 (package-with-python2 python-waitress))
9019
9020 (define-public python-whichcraft
9021 (package
9022 (name "python-whichcraft")
9023 (version "0.6.1")
9024 (source
9025 (origin
9026 (method url-fetch)
9027 (uri (pypi-uri "whichcraft" version))
9028 (sha256
9029 (base32
9030 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
9031 (build-system python-build-system)
9032 (native-inputs
9033 `(("python-pytest" ,python-pytest)))
9034 (home-page "https://github.com/pydanny/whichcraft")
9035 (synopsis "Cross-platform cross-python shutil.which functionality")
9036 (description
9037 "This package provides a shim of the shutil.which function that's
9038 designed to work across multiple versions of Python.")
9039 (license license:bsd-3)))
9040
9041 (define-public python-cookiecutter
9042 (package
9043 (name "python-cookiecutter")
9044 (version "1.6.0")
9045 (source
9046 (origin
9047 (method url-fetch)
9048 (uri (pypi-uri "cookiecutter" version))
9049 (sha256
9050 (base32
9051 "0glsvaz8igi2wy1hsnhm9fkn6560vdvdixzvkq6dn20z3hpaa5hk"))))
9052 (build-system python-build-system)
9053 (native-inputs
9054 `(("python-freezegun" ,python-freezegun)
9055 ("python-pytest" ,python-pytest)
9056 ("python-pytest-catchlog" ,python-pytest-catchlog)
9057 ("python-pytest-cov" ,python-pytest-cov)
9058 ("python-pytest-mock" ,python-pytest-mock)))
9059 (propagated-inputs
9060 `(("python-binaryornot" ,python-binaryornot)
9061 ("python-click" ,python-click)
9062 ("python-future" ,python-future)
9063 ("python-jinja2" ,python-jinja2)
9064 ("python-jinja2-time" ,python-jinja2-time)
9065 ("python-poyo" ,python-poyo)
9066 ("python-requests" ,python-requests)
9067 ("python-whichcraft" ,python-whichcraft)))
9068 (home-page "https://github.com/audreyr/cookiecutter")
9069 (synopsis
9070 "Command-line utility that creates projects from project templates")
9071 (description
9072 "This package provides a command-line utility that creates projects from
9073 project templates, e.g. creating a Python package project from a Python package
9074 project template.")
9075 (license license:bsd-3)))
9076
9077 (define-public python-pyquery
9078 (package
9079 (name "python-pyquery")
9080 (version "1.2.17")
9081 (source
9082 (origin
9083 (method url-fetch)
9084 (uri (pypi-uri "pyquery" version))
9085 (sha256
9086 (base32
9087 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9088 (build-system python-build-system)
9089 (native-inputs
9090 `(("python-webob" ,python-webob)
9091 ("python-webtest" ,python-webtest)))
9092 (propagated-inputs
9093 `(("python-lxml" ,python-lxml)
9094 ("python-cssselect" ,python-cssselect)))
9095 (home-page "https://github.com/gawel/pyquery")
9096 (synopsis "Make jQuery-like queries on xml documents")
9097 (description "pyquery allows you to make jQuery queries on xml documents.
9098 The API is as much as possible the similar to jQuery. pyquery uses lxml for
9099 fast xml and html manipulation.")
9100 (license license:bsd-3)))
9101
9102 (define-public python-anyjson
9103 (package
9104 (name "python-anyjson")
9105 (version "0.3.3")
9106 (source
9107 (origin
9108 (method url-fetch)
9109 (uri (pypi-uri "anyjson" version))
9110 (sha256
9111 (base32
9112 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9113 (build-system python-build-system)
9114 (arguments
9115 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9116 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9117 ;; whatever) so this transformation needs to be done before the tests
9118 ;; can be run. Maybe we could add a build step to transform beforehand
9119 ;; but it could be annoying/difficult.
9120 ;; We can enable tests for the Python 2 version, though, and do below.
9121 #:tests? #f))
9122 (home-page "https://bitbucket.org/runeh/anyjson/")
9123 (synopsis
9124 "Wraps best available JSON implementation in a common interface")
9125 (description
9126 "Anyjson loads whichever is the fastest JSON module installed
9127 and provides a uniform API regardless of which JSON implementation is used.")
9128 (license license:bsd-3)
9129 (properties `((python2-variant . ,(delay python2-anyjson))))))
9130
9131 (define-public python2-anyjson
9132 (let ((anyjson (package-with-python2
9133 (strip-python2-variant python-anyjson))))
9134 (package
9135 (inherit anyjson)
9136 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9137 #:tests? #t
9138 ,@(package-arguments anyjson)))
9139 (native-inputs `(("python2-nose" ,python2-nose))))))
9140
9141 (define-public python-amqp
9142 (package
9143 (name "python-amqp")
9144 (version "2.3.2")
9145 (source
9146 (origin
9147 (method url-fetch)
9148 (uri (pypi-uri "amqp" version))
9149 (sha256
9150 (base32
9151 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
9152 (build-system python-build-system)
9153 (native-inputs
9154 `(("python-case" ,python-case)
9155 ("python-pytest-sugar" ,python-pytest-sugar)
9156 ("python-mock" ,python-mock)))
9157 (propagated-inputs
9158 `(("python-vine" ,python-vine)))
9159 (home-page "https://github.com/celery/py-amqp")
9160 (synopsis
9161 "Low-level AMQP client for Python (fork of amqplib)")
9162 (description
9163 "This is a fork of amqplib which was originally written by Barry Pederson.
9164 It is maintained by the Celery project, and used by kombu as a pure python
9165 alternative when librabbitmq is not available.")
9166 (license license:lgpl2.1+)
9167 (properties `((python2-variant . ,(delay python2-amqp))))))
9168
9169 (define-public python2-amqp
9170 (let ((amqp (package-with-python2
9171 (strip-python2-variant python-amqp))))
9172 (package
9173 (inherit amqp)
9174 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9175 ;; unmaintained. Weirdly, does not do this on the python 3
9176 ;; version?
9177 #:tests? #f
9178 ,@(package-arguments amqp))))))
9179
9180 (define-public python-txamqp
9181 (package
9182 (name "python-txamqp")
9183 (version "0.8.2")
9184 (source
9185 (origin
9186 (method url-fetch)
9187 (uri (pypi-uri "txAMQP" version))
9188 (sha256
9189 (base32
9190 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
9191 (build-system python-build-system)
9192 (propagated-inputs
9193 `(("python-six" ,python-six)
9194 ("python-twisted" ,python-twisted)))
9195 (home-page "https://github.com/txamqp/txamqp")
9196 (synopsis "Communicate with AMQP peers and brokers using Twisted")
9197 (description
9198 "This package provides a Python library for communicating with AMQP peers
9199 and brokers using the asynchronous networking framework Twisted. It contains
9200 all the necessary code to connect, send and receive messages to/from an
9201 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
9202 also includes support for using Thrift RPC over AMQP in Twisted
9203 applications.")
9204 (license license:asl2.0)))
9205
9206 (define-public python2-txamqp
9207 (package-with-python2 python-txamqp))
9208
9209 (define-public python-kombu
9210 (package
9211 (name "python-kombu")
9212 (version "4.2.2")
9213 (source
9214 (origin
9215 (method url-fetch)
9216 (uri (pypi-uri "kombu" version))
9217 (sha256
9218 (base32
9219 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
9220 (build-system python-build-system)
9221 (native-inputs
9222 `(("python-mock" ,python-mock)
9223 ("python-case" ,python-case)
9224 ("python-pyro4" ,python-pyro4)
9225 ("python-pytest-sugar" ,python-pytest-sugar)
9226 ("python-pytz" ,python-pytz)))
9227 (propagated-inputs
9228 `(("python-anyjson" ,python-anyjson)
9229 ("python-amqp" ,python-amqp)
9230 ("python-redis" ,python-redis)))
9231 (home-page "https://kombu.readthedocs.io")
9232 (synopsis "Message passing library for Python")
9233 (description "The aim of Kombu is to make messaging in Python as easy as
9234 possible by providing an idiomatic high-level interface for the AMQ protocol,
9235 and also provide proven and tested solutions to common messaging problems.
9236 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9237 message orientation, queuing, routing, reliability and security, for which the
9238 RabbitMQ messaging server is the most popular implementation.")
9239 (license license:bsd-3)
9240 (properties `((python2-variant . ,(delay python2-kombu))))))
9241
9242 (define-public python2-kombu
9243 (let ((kombu (package-with-python2
9244 (strip-python2-variant python-kombu))))
9245 (package
9246 (inherit kombu)
9247 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9248 ;; It works fine on the python3 variant.
9249 #:tests? #f
9250 ,@(package-arguments kombu)))
9251 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9252 ,@(package-native-inputs kombu))))))
9253
9254 (define-public python-billiard
9255 (package
9256 (name "python-billiard")
9257 (version "3.5.0.5")
9258 (source
9259 (origin
9260 (method url-fetch)
9261 (uri (pypi-uri "billiard" version))
9262 (sha256
9263 (base32
9264 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9265 (build-system python-build-system)
9266 (native-inputs
9267 `(("python-case" ,python-case)
9268 ("python-pytest" ,python-pytest)))
9269 (home-page "https://github.com/celery/billiard")
9270 (synopsis
9271 "Python multiprocessing fork with improvements and bugfixes")
9272 (description
9273 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9274 multiprocessing package itself is a renamed and updated version of R Oudkerk's
9275 pyprocessing package. This standalone variant is intended to be compatible with
9276 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9277 (license license:bsd-3)
9278 (properties `((python2-variant . ,(delay python2-billiard))))))
9279
9280 (define-public python2-billiard
9281 (let ((billiard (package-with-python2
9282 (strip-python2-variant python-billiard))))
9283 (package
9284 (inherit billiard)
9285 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9286 ("python2-mock" ,python2-mock)
9287 ,@(package-native-inputs billiard))))))
9288
9289 (define-public python-celery
9290 (package
9291 (name "python-celery")
9292 (version "4.2.1")
9293 (source
9294 (origin
9295 (method url-fetch)
9296 (uri (pypi-uri "celery" version))
9297 (sha256
9298 (base32
9299 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9300 (build-system python-build-system)
9301 (arguments
9302 '(;; TODO The tests fail with Python 3.7
9303 ;; https://github.com/celery/celery/issues/4849
9304 #:tests? #f
9305 #:phases
9306 (modify-phases %standard-phases
9307 (add-after 'unpack 'patch-requirements
9308 (lambda _
9309 (substitute* "requirements/test.txt"
9310 (("pytest>=3\\.0,<3\\.3")
9311 "pytest>=3.0"))
9312 #t)))))
9313 (native-inputs
9314 `(("python-case" ,python-case)
9315 ("python-pytest" ,python-pytest)))
9316 (propagated-inputs
9317 `(("python-pytz" ,python-pytz)
9318 ("python-billiard" ,python-billiard)
9319 ("python-kombu" ,python-kombu)))
9320 (home-page "https://celeryproject.org")
9321 (synopsis "Distributed Task Queue")
9322 (description "Celery is an asynchronous task queue/job queue based on
9323 distributed message passing. It is focused on real-time operation, but
9324 supports scheduling as well. The execution units, called tasks, are executed
9325 concurrently on a single or more worker servers using multiprocessing,
9326 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9327 synchronously (wait until ready).")
9328 (license license:bsd-3)
9329 (properties `((python2-variant . ,(delay python2-celery))))))
9330
9331 (define-public python2-celery
9332 (let ((celery (package-with-python2
9333 (strip-python2-variant python-celery))))
9334 (package
9335 (inherit celery)
9336 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9337 ("python2-mock" ,python2-mock)
9338 ,@(package-native-inputs celery))))))
9339
9340 (define-public python-translitcodec
9341 (package
9342 (name "python-translitcodec")
9343 (version "0.4.0")
9344 (source
9345 (origin
9346 (method url-fetch)
9347 (uri (pypi-uri "translitcodec" version))
9348 (sha256
9349 (base32
9350 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9351 (build-system python-build-system)
9352 (arguments
9353 `(#:tests? #f)) ; no tests provided
9354 (home-page
9355 "https://github.com/claudep/translitcodec")
9356 (synopsis
9357 "Unicode to 8-bit charset transliteration codec")
9358 (description
9359 "This package contains codecs for transliterating ISO 10646 texts into
9360 best-effort representations using smaller coded character sets (ASCII,
9361 ISO 8859, etc.).")
9362 (license license:expat)))
9363
9364 (define-public python2-translitcodec
9365 (package-with-python2 python-translitcodec))
9366
9367 (define-public python-editor
9368 (package
9369 (name "python-editor")
9370 (version "0.5")
9371 (source
9372 (origin
9373 (method url-fetch)
9374 (uri (pypi-uri "python-editor" version))
9375 (sha256
9376 (base32
9377 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9378 (build-system python-build-system)
9379 (home-page
9380 "https://github.com/fmoo/python-editor")
9381 (synopsis
9382 "Programmatically open an editor, capture the result")
9383 (description
9384 "python-editor is a library that provides the editor module for
9385 programmatically interfacing with your system's $EDITOR.")
9386 (license license:asl2.0)))
9387
9388 (define-public python2-editor
9389 (package-with-python2 python-editor))
9390
9391 (define-public python-vobject
9392 (package
9393 (name "python-vobject")
9394 (version "0.9.5")
9395 (source (origin
9396 (method url-fetch)
9397 (uri (pypi-uri "vobject" version))
9398 (sha256
9399 (base32
9400 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9401 (build-system python-build-system)
9402 (arguments
9403 '(;; The test suite relies on some non-portable Windows interfaces.
9404 #:tests? #f))
9405 (propagated-inputs
9406 `(("python-dateutil" ,python-dateutil)
9407 ("python-pyicu" ,python-pyicu)))
9408 (synopsis "Parse and generate vCard and vCalendar files")
9409 (description "Vobject is intended to be a full featured Python package for
9410 parsing and generating vCard and vCalendar files. Currently, iCalendar files
9411 are supported and well tested. vCard 3.0 files are supported, and all data
9412 should be imported, but only a few components are understood in a sophisticated
9413 way.")
9414 (home-page "http://eventable.github.io/vobject/")
9415 (license license:asl2.0)))
9416
9417 (define-public python2-vobject
9418 (package-with-python2 python-vobject))
9419
9420 (define-public python-munkres
9421 (package
9422 (name "python-munkres")
9423 (version "1.0.8")
9424 (source (origin
9425 (method url-fetch)
9426 (uri (pypi-uri "munkres" version))
9427 (sha256
9428 (base32
9429 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9430 (build-system python-build-system)
9431 (arguments
9432 '(#:tests? #f)) ; no test suite
9433 (home-page "http://software.clapper.org/munkres/")
9434 (synopsis "Implementation of the Munkres algorithm")
9435 (description "The Munkres module provides an implementation of the Munkres
9436 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9437 useful for solving the Assignment Problem.")
9438 (license license:bsd-3)))
9439
9440 (define-public python2-munkres
9441 (package-with-python2 python-munkres))
9442
9443 (define-public python-whoosh
9444 (package
9445 (name "python-whoosh")
9446 (version "2.7.4")
9447 (source
9448 (origin
9449 (method url-fetch)
9450 (uri (pypi-uri "Whoosh" version))
9451 (sha256
9452 (base32
9453 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9454 (build-system python-build-system)
9455 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
9456 (native-inputs
9457 `(("python-pytest" ,python-pytest)))
9458 (home-page "https://bitbucket.org/mchaput/whoosh")
9459 (synopsis "Full text indexing, search, and spell checking library")
9460 (description
9461 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9462 checking library.")
9463 (license license:bsd-2)))
9464
9465 (define-public python2-whoosh
9466 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9467 (package (inherit whoosh)
9468 (propagated-inputs
9469 `(("python2-backport-ssl-match-hostname"
9470 ,python2-backport-ssl-match-hostname)
9471 ,@(package-propagated-inputs whoosh))))))
9472
9473 (define-public python-pathlib
9474 (package
9475 (name "python-pathlib")
9476 (version "1.0.1")
9477 (source (origin
9478 (method url-fetch)
9479 (uri (pypi-uri "pathlib" version))
9480 (sha256
9481 (base32
9482 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9483 (build-system python-build-system)
9484 ;; The tests depend on the internal "test" module, which does not provide
9485 ;; a stable interface.
9486 (arguments `(#:tests? #f))
9487 (home-page "https://pathlib.readthedocs.org/")
9488 (synopsis "Object-oriented file system paths")
9489 (description "Pathlib offers a set of classes to handle file system paths.
9490 It offers the following advantages over using string objects:
9491
9492 @enumerate
9493 @item No more cumbersome use of os and os.path functions. Everything can
9494 be done easily through operators, attribute accesses, and method calls.
9495 @item Embodies the semantics of different path types. For example,
9496 comparing Windows paths ignores casing.
9497 @item Well-defined semantics, eliminating any inconsistencies or
9498 ambiguities (forward vs. backward slashes, etc.).
9499 @end enumerate
9500
9501 Note: In Python 3.4, pathlib is now part of the standard library. For other
9502 Python versions please consider python-pathlib2 instead, which tracks the
9503 standard library module. This module (python-pathlib) isn't maintained
9504 anymore.")
9505 (license license:expat)))
9506
9507 (define-public python2-pathlib
9508 (package-with-python2 python-pathlib))
9509
9510 (define-public python2-pathlib2
9511 (package
9512 (name "python2-pathlib2")
9513 (version "2.3.3")
9514 (source (origin
9515 (method url-fetch)
9516 (uri (pypi-uri "pathlib2" version))
9517 (sha256
9518 (base32
9519 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
9520 (build-system python-build-system)
9521 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9522 ;; version is 3.4 which already includes this package as part of the
9523 ;; standard library.
9524 (arguments
9525 `(#:python ,python-2))
9526 (propagated-inputs
9527 `(("python2-scandir" ,python2-scandir)
9528 ("python2-six" ,python2-six)))
9529 (home-page "https://pypi.python.org/pypi/pathlib2/")
9530 (synopsis "Object-oriented file system paths - backport of standard
9531 pathlib module")
9532 (description "The goal of pathlib2 is to provide a backport of standard
9533 pathlib module which tracks the standard library module, so all the newest
9534 features of the standard pathlib can be used also on older Python versions.
9535
9536 Pathlib offers a set of classes to handle file system paths. It offers the
9537 following advantages over using string objects:
9538
9539 @enumerate
9540 @item No more cumbersome use of os and os.path functions. Everything can
9541 be done easily through operators, attribute accesses, and method calls.
9542 @item Embodies the semantics of different path types. For example,
9543 comparing Windows paths ignores casing.
9544 @item Well-defined semantics, eliminating any inconsistencies or
9545 ambiguities (forward vs. backward slashes, etc.).
9546 @end enumerate")
9547 (license license:expat)))
9548
9549 (define-public python2-pathlib2-bootstrap
9550 (hidden-package
9551 (package
9552 (inherit python2-pathlib2)
9553 (name "python2-pathlib2-bootstrap")
9554 (propagated-inputs
9555 `(("python2-scandir" ,python2-scandir)
9556 ("python2-six" ,python2-six-bootstrap))))))
9557
9558 (define-public python-jellyfish
9559 (package
9560 (name "python-jellyfish")
9561 (version "0.5.6")
9562 (source (origin
9563 (method url-fetch)
9564 (uri (pypi-uri "jellyfish" version))
9565 (sha256
9566 (base32
9567 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9568 (build-system python-build-system)
9569 (native-inputs
9570 `(("python-pytest" ,python-pytest)))
9571 (home-page "https://github.com/jamesturk/jellyfish")
9572 (synopsis "Approximate and phonetic matching of strings")
9573 (description "Jellyfish uses a variety of string comparison and phonetic
9574 encoding algorithms to do fuzzy string matching.")
9575 (license license:bsd-2)
9576 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9577
9578 (define-public python2-jellyfish
9579 (let ((jellyfish (package-with-python2
9580 (strip-python2-variant python-jellyfish))))
9581 (package (inherit jellyfish)
9582 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9583 ,@(package-native-inputs jellyfish))))))
9584
9585 (define-public python2-unicodecsv
9586 (package
9587 (name "python2-unicodecsv")
9588 (version "0.14.1")
9589 (source (origin
9590 (method git-fetch)
9591 ;; The test suite is not included in the PyPi release.
9592 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9593 (uri (git-reference
9594 (url "https://github.com/jdunck/python-unicodecsv")
9595 (commit version)))
9596 (file-name (git-file-name name version))
9597 (sha256
9598 (base32
9599 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
9600 (build-system python-build-system)
9601 (arguments
9602 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9603 #:python ,python-2))
9604 (native-inputs
9605 `(("python2-unittest2" ,python2-unittest2)))
9606 (home-page "https://github.com/jdunck/python-unicodecsv")
9607 (synopsis "Unicode CSV module for Python 2")
9608 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9609 module, adding support for Unicode strings.")
9610 (license license:bsd-2)))
9611
9612 (define-public python-rarfile
9613 (package
9614 (name "python-rarfile")
9615 (version "2.8")
9616 (source (origin
9617 (method url-fetch)
9618 (uri (pypi-uri "rarfile" version))
9619 (sha256
9620 (base32
9621 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9622 (build-system python-build-system)
9623 (arguments
9624 '(#:phases
9625 (modify-phases %standard-phases
9626 (replace 'check
9627 ;; Many tests fail, but the installation proceeds.
9628 (lambda _ (invoke "make" "-C" "test" "test"))))))
9629 (native-inputs
9630 `(("which" ,which))) ; required for tests
9631 (propagated-inputs
9632 `(("libarchive" ,libarchive)))
9633 (home-page "https://github.com/markokr/rarfile")
9634 (synopsis "RAR archive reader for Python")
9635 (description "This is Python module for RAR archive reading. The interface
9636 is made as zipfile like as possible.")
9637 (license license:isc)))
9638
9639 (define-public python2-rarfile
9640 (package-with-python2 python-rarfile))
9641
9642 (define-public python-magic
9643 (package
9644 (name "python-magic")
9645 (version "0.4.15")
9646 (source
9647 (origin
9648 (method url-fetch)
9649 (uri (pypi-uri "python-magic" version))
9650 (sha256
9651 (base32
9652 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9653 (file-name (string-append name "-" version "-checkout"))))
9654 (build-system python-build-system)
9655 (arguments
9656 ;; The tests are unreliable, so don't run them. The tests fail
9657 ;; under Python3 because they were written for Python2 and
9658 ;; contain import statements that do not work in Python3. One of
9659 ;; the tests fails under Python2 because its assertions are
9660 ;; overly stringent; it relies on comparing output strings which
9661 ;; are brittle and can change depending on the version of
9662 ;; libmagic being used and the system on which the test is
9663 ;; running. In my case, under GuixSD 0.10.0, only one test
9664 ;; failed, and it seems to have failed only because the version
9665 ;; of libmagic that is packaged in Guix outputs a slightly
9666 ;; different (but not wrong) string than the one that the test
9667 ;; expected.
9668 '(#:tests? #f
9669 #:phases (modify-phases %standard-phases
9670 ;; Replace a specific method call with a hard-coded
9671 ;; path to the necessary libmagic.so file in the
9672 ;; store. If we don't do this, then the method call
9673 ;; will fail to find the libmagic.so file, which in
9674 ;; turn will cause any application using
9675 ;; python-magic to fail.
9676 (add-before 'build 'hard-code-path-to-libmagic
9677 (lambda* (#:key inputs #:allow-other-keys)
9678 (let ((file (assoc-ref inputs "file")))
9679 (substitute* "magic.py"
9680 (("ctypes.util.find_library\\('magic'\\)")
9681 (string-append "'" file "/lib/libmagic.so'")))
9682 #t)))
9683 (add-before 'install 'disable-egg-compression
9684 (lambda _
9685 (let ((port (open-file "setup.cfg" "a")))
9686 (display "\n[easy_install]\nzip_ok = 0\n"
9687 port)
9688 (close-port port)
9689 #t))))))
9690 (inputs
9691 ;; python-magic needs to be able to find libmagic.so.
9692 `(("file" ,file)))
9693 (home-page
9694 "https://github.com/ahupp/python-magic")
9695 (synopsis
9696 "File type identification using libmagic")
9697 (description
9698 "This module uses ctypes to access the libmagic file type
9699 identification library. It makes use of the local magic database and
9700 supports both textual and MIME-type output. Note that this module and
9701 the python-file module both provide a \"magic.py\" file; these two
9702 modules, which are different and were developed separately, both serve
9703 the same purpose: to provide Python bindings for libmagic.")
9704 (license license:expat)))
9705
9706 (define-public python2-magic
9707 (package-with-python2 python-magic))
9708
9709 (define-public python2-s3cmd
9710 (package
9711 (name "python2-s3cmd")
9712 (version "1.6.1")
9713 (source
9714 (origin
9715 (method url-fetch)
9716 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9717 "s3cmd-" version ".tar.gz"))
9718 (sha256
9719 (base32
9720 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9721 (build-system python-build-system)
9722 (arguments
9723 ;; s3cmd is written for python2 only and contains no tests.
9724 `(#:python ,python-2
9725 #:tests? #f))
9726 (propagated-inputs
9727 `(("python2-dateutil" ,python2-dateutil)
9728 ;; The python-file package also provides a magic.py module.
9729 ;; This is an unfortunate state of affairs; however, s3cmd
9730 ;; fails to install if it cannot find specifically the
9731 ;; python-magic package. Thus we include it, instead of using
9732 ;; python-file. Ironically, s3cmd sometimes works better
9733 ;; without libmagic bindings at all:
9734 ;; https://github.com/s3tools/s3cmd/issues/198
9735 ("python2-magic" ,python2-magic)))
9736 (home-page "http://s3tools.org/s3cmd")
9737 (synopsis "Command line tool for S3-compatible storage services")
9738 (description
9739 "S3cmd is a command line tool for uploading, retrieving and managing data
9740 in storage services that are compatible with the Amazon Simple Storage
9741 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9742 GnuPG encryption, and more. It also supports management of Amazon's
9743 CloudFront content delivery network.")
9744 (license license:gpl2+)))
9745
9746 (define-public python-pkgconfig
9747 (package
9748 (name "python-pkgconfig")
9749 (version "1.3.1")
9750 (source
9751 (origin
9752 (method url-fetch)
9753 (uri (pypi-uri "pkgconfig" version))
9754 (sha256
9755 (base32
9756 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9757 (build-system python-build-system)
9758 (native-inputs
9759 `(("python-nose" ,python-nose)))
9760 (inputs
9761 `(("pkg-config" ,pkg-config)))
9762 (arguments
9763 `(#:phases
9764 (modify-phases %standard-phases
9765 (add-before 'build 'patch
9766 ;; Hard-code the path to pkg-config.
9767 (lambda _
9768 (substitute* "pkgconfig/pkgconfig.py"
9769 (("cmd = 'pkg-config")
9770 (string-append "cmd = '" (which "pkg-config"))))
9771 #t))
9772 (replace 'check
9773 (lambda _
9774 (invoke "nosetests" "test.py"))))))
9775 (home-page "https://github.com/matze/pkgconfig")
9776 (synopsis "Python interface for pkg-config")
9777 (description "This module provides a Python interface to pkg-config. It
9778 can be used to find all pkg-config packages, check if a package exists,
9779 check if a package meets certain version requirements, query CFLAGS and
9780 LDFLAGS and parse the output to build extensions with setup.py.")
9781 (license license:expat)))
9782
9783 (define-public python2-pkgconfig
9784 (package-with-python2 python-pkgconfig))
9785
9786 (define-public python-bz2file
9787 (package
9788 (name "python-bz2file")
9789 (version "0.98")
9790 (source
9791 (origin
9792 (method url-fetch)
9793 (uri (pypi-uri "bz2file" version))
9794 (sha256
9795 (base32
9796 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9797 (build-system python-build-system)
9798 (arguments
9799 `(#:tests? #f)) ; Tests use deprecated python modules.
9800 (home-page "https://github.com/nvawda/bz2file")
9801 (synopsis "Read and write bzip2-compressed files")
9802 (description
9803 "Bz2file is a Python library for reading and writing bzip2-compressed
9804 files. It contains a drop-in replacement for the I/O interface in the
9805 standard library's @code{bz2} module, including features from the latest
9806 development version of CPython that are not available in older releases.")
9807 (license license:asl2.0)))
9808
9809 (define-public python2-bz2file
9810 (package-with-python2 python-bz2file))
9811
9812 (define-public python-future
9813 (package
9814 (name "python-future")
9815 (version "0.17.1")
9816 (source
9817 (origin
9818 (method url-fetch)
9819 (uri (pypi-uri "future" version))
9820 (sha256
9821 (base32
9822 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
9823 (build-system python-build-system)
9824 ;; Many tests connect to the network or are otherwise flawed.
9825 ;; https://github.com/PythonCharmers/python-future/issues/210
9826 (arguments
9827 `(#:tests? #f))
9828 (home-page "http://python-future.org")
9829 (synopsis "Single-source support for Python 3 and 2")
9830 (description
9831 "@code{python-future} is the missing compatibility layer between Python 2 and
9832 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9833 to support both Python 2 and Python 3 with minimal overhead.")
9834 (license license:expat)))
9835
9836 (define-public python2-future
9837 (package-with-python2 python-future))
9838
9839 (define-public python-cysignals
9840 (package
9841 (name "python-cysignals")
9842 (version "1.9.0")
9843 (source
9844 (origin
9845 (method url-fetch)
9846 (uri (pypi-uri "cysignals" version))
9847 (sha256
9848 (base32
9849 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
9850 (build-system python-build-system)
9851 (native-inputs
9852 `(("python-cython" ,python-cython)
9853 ("python-sphinx" ,python-sphinx)))
9854 (inputs
9855 `(("pari-gp" ,pari-gp)))
9856 (arguments
9857 `(#:modules ((guix build python-build-system)
9858 ((guix build gnu-build-system) #:prefix gnu:)
9859 (guix build utils))
9860 ;; FIXME: Tests are executed after installation and currently fail
9861 ;; when not installing into standard locations; the author is working
9862 ;; on a fix.
9863 #:tests? #f
9864 #:phases
9865 (modify-phases %standard-phases
9866 (add-before
9867 'build 'configure
9868 (assoc-ref gnu:%standard-phases 'configure)))))
9869 (home-page
9870 "https://github.com/sagemath/cysignals")
9871 (synopsis
9872 "Handling of interrupts and signals for Cython")
9873 (description
9874 "The cysignals package provides mechanisms to handle interrupts (and
9875 other signals and errors) in Cython code, using two related approaches,
9876 for mixed Cython/Python code or external C libraries and pure Cython code,
9877 respectively.")
9878 (license license:lgpl3+)))
9879
9880 (define-public python2-cysignals
9881 (package-with-python2 python-cysignals))
9882
9883 (define-public python2-shedskin
9884 (package
9885 (name "python2-shedskin")
9886 (version "0.9.4")
9887 (source
9888 (origin
9889 (method url-fetch)
9890 (uri (string-append "https://github.com/shedskin/shedskin/"
9891 "releases/download/v" version
9892 "/shedskin-" version ".tgz"))
9893 (sha256
9894 (base32
9895 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9896 (build-system python-build-system)
9897 (arguments
9898 `(#:python ,python-2
9899 #:phases (modify-phases %standard-phases
9900 (add-after 'unpack 'fix-resulting-include-libs
9901 (lambda* (#:key inputs #:allow-other-keys)
9902 (let ((libgc (assoc-ref inputs "libgc"))
9903 (pcre (assoc-ref inputs "pcre")))
9904 (substitute* "shedskin/makefile.py"
9905 (("variable == 'CCFLAGS':[ ]*")
9906 (string-append "variable == 'CCFLAGS':\n"
9907 " line += ' -I " pcre "/include"
9908 " -I " libgc "/include'"))
9909 (("variable == 'LFLAGS':[ ]*")
9910 (string-append "variable == 'LFLAGS':\n"
9911 " line += ' -L" pcre "/lib"
9912 " -L " libgc "/lib'")))
9913 #t))))))
9914 (inputs `(("pcre" ,pcre)
9915 ("libgc" ,libgc)))
9916 (home-page "https://shedskin.github.io/")
9917 (synopsis "Experimental Python-2 to C++ Compiler")
9918 (description (string-append "This is an experimental compiler for a subset of
9919 Python. It generates C++ code and a Makefile."))
9920 (license (list license:gpl3 license:bsd-3 license:expat))))
9921
9922 (define-public python2-rope
9923 (package
9924 (name "python2-rope")
9925 (version "0.11.0")
9926 (source
9927 (origin
9928 (method url-fetch)
9929 (uri (pypi-uri "rope" version))
9930 (sha256
9931 (base32
9932 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
9933 (arguments
9934 ;; Rope has only partial python3 support, see `python-rope'
9935 `(#:python ,python-2))
9936 (build-system python-build-system)
9937 (native-inputs
9938 `(("python2-unittest2" ,python2-unittest2)))
9939 (home-page "https://github.com/python-rope/rope")
9940 (synopsis "Refactoring library for Python")
9941 (description "Rope is a refactoring library for Python. It facilitates
9942 the renaming, moving and extracting of attributes, functions, modules, fields
9943 and parameters in Python 2 source code. These refactorings can also be applied
9944 to occurrences in strings and comments.")
9945 (license license:gpl2)))
9946
9947 (define-public python-rope
9948 (package
9949 (inherit python2-rope)
9950 (name "python-rope")
9951 (arguments `(#:python ,python-wrapper
9952 ;; XXX: Only partial python3 support, results in some failing
9953 ;; tests: <https://github.com/python-rope/rope/issues/247>.
9954 #:tests? #f))
9955 (properties `((python2-variant . ,(delay python2-rope))))))
9956
9957 (define-public python-py3status
9958 (package
9959 (name "python-py3status")
9960 (version "3.21")
9961 (source
9962 (origin
9963 (method url-fetch)
9964 (uri (pypi-uri "py3status" version))
9965 (sha256
9966 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
9967 (build-system python-build-system)
9968 (inputs
9969 `(("file" ,file)))
9970 (arguments
9971 '(#:phases
9972 (modify-phases %standard-phases
9973 ;; 'file' is used for detection of configuration file encoding
9974 ;; let's make link the dependency to particular input
9975 (add-before 'build 'patch-file-path
9976 (lambda* (#:key inputs #:allow-other-keys)
9977 (let ((file-path (assoc-ref inputs "file")))
9978 (substitute* "py3status/parse_config.py"
9979 (("\\[\"file\", \"-b\"")
9980 (string-append "['" file-path "/bin/file', '-b'")))
9981 #t))))
9982 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9983 (home-page "https://github.com/ultrabug/py3status")
9984 (synopsis "Extensible i3status wrapper written in Python")
9985 (description "py3status is an i3status wrapper which extends i3status
9986 functionality in a modular way, allowing you to extend your panel with your
9987 own code, responding to click events and updating clock every second.")
9988 (license license:bsd-3)))
9989
9990 (define-public python-tblib
9991 (package
9992 (name "python-tblib")
9993 (version "1.3.2")
9994 (source (origin
9995 (method url-fetch)
9996 (uri (pypi-uri "tblib" version))
9997 (sha256 (base32
9998 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9999 (build-system python-build-system)
10000 (arguments
10001 `(#:phases
10002 (modify-phases %standard-phases
10003 (add-before 'check 'adjust-tests
10004 (lambda _
10005 (when (which "python3")
10006 ;; Adjust the example output to match that of Python 3.7:
10007 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
10008 (substitute* "README.rst"
10009 (("Exception\\('fail',") "Exception('fail'"))
10010 #t)))
10011 (replace 'check
10012 (lambda _
10013 ;; Upstream runs tests after installation and the package itself
10014 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
10015 ;; found.
10016 (setenv "PYTHONPATH"
10017 (string-append (getcwd) "/build/lib:"
10018 (getenv "PYTHONPATH")))
10019 (invoke "py.test" "-vv" "tests" "README.rst"))))))
10020 (native-inputs
10021 `(("python-pytest" ,python-pytest)
10022 ("python-six" ,python-six)))
10023 (home-page "https://github.com/ionelmc/python-tblib")
10024 (synopsis "Traceback serialization library")
10025 (description
10026 "Traceback serialization allows you to:
10027
10028 @enumerate
10029 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
10030 different processes. This allows better error handling when running code over
10031 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
10032
10033 @item Parse traceback strings and raise with the parsed tracebacks.
10034 @end enumerate\n")
10035 (license license:bsd-3)))
10036
10037 (define-public python2-tblib
10038 (package-with-python2 python-tblib))
10039
10040 (define-public python-greenlet
10041 (package
10042 (name "python-greenlet")
10043 (version "0.4.15")
10044 (source (origin
10045 (method url-fetch)
10046 (uri (pypi-uri "greenlet" version))
10047 (sha256
10048 (base32
10049 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
10050 (build-system python-build-system)
10051 (home-page "https://greenlet.readthedocs.io/")
10052 (synopsis "Lightweight in-process concurrent programming")
10053 (description
10054 "Greenlet package is a spin-off of Stackless, a version of CPython
10055 that supports micro-threads called \"tasklets\". Tasklets run
10056 pseudo-concurrently (typically in a single or a few OS-level threads) and
10057 are synchronized with data exchanges on \"channels\".")
10058 (license (list license:psfl license:expat))))
10059
10060 (define-public python2-greenlet
10061 (package-with-python2 python-greenlet))
10062
10063 (define-public python-objgraph
10064 (package
10065 (name "python-objgraph")
10066 (version "3.4.1")
10067 (source
10068 (origin
10069 (method url-fetch)
10070 (uri (pypi-uri "objgraph" version))
10071 (sha256
10072 (base32
10073 "19qmqsh984zq1rzzjy4vqnmviaqnymcyl8h7z99pnicbgwnm2adz"))))
10074 (build-system python-build-system)
10075 (propagated-inputs
10076 `(("python-graphviz" ,python-graphviz)))
10077 (native-inputs
10078 `(("python-mock" ,python-mock)
10079 ("graphviz" ,graphviz)))
10080 (home-page "https://mg.pov.lt/objgraph/")
10081 (synopsis "Draw Python object reference graphs with graphviz")
10082 (description
10083 "This package provides tools to draw Python object reference graphs with
10084 graphviz.")
10085 (license license:expat)))
10086
10087 (define-public python2-objgraph
10088 (package-with-python2 python-objgraph))
10089
10090 (define-public python-gevent
10091 (package
10092 (name "python-gevent")
10093 (version "1.3.7")
10094 (source (origin
10095 (method url-fetch)
10096 (uri (pypi-uri "gevent" version))
10097 (sha256
10098 (base32
10099 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
10100 (modules '((guix build utils)))
10101 (snippet
10102 '(begin
10103 ;; unbunding libev and c-ares
10104 (delete-file-recursively "deps")
10105 #t))))
10106 (build-system python-build-system)
10107 (arguments
10108 `(#:modules ((ice-9 ftw)
10109 (ice-9 match)
10110 (srfi srfi-26)
10111 (guix build utils)
10112 (guix build python-build-system))
10113 #:phases (modify-phases %standard-phases
10114 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
10115 (lambda _
10116 (substitute* "src/gevent/subprocess.py"
10117 (("/bin/sh") (which "sh")))
10118 (for-each (lambda (file)
10119 (substitute* file
10120 (("/bin/sh") (which "sh"))
10121 (("/bin/true") (which "true"))))
10122 (find-files "src/greentest" "\\.py$"))
10123 #t))
10124 (add-before 'build 'do-not-use-bundled-sources
10125 (lambda* (#:key inputs #:allow-other-keys)
10126 (setenv "CONFIG_SHELL" (which "bash"))
10127 (setenv "LIBEV_EMBED" "false")
10128 (setenv "CARES_EMBED" "false")
10129 (setenv "EMBED" "false")
10130
10131 ;; Prevent building bundled libev.
10132 (substitute* "setup.py"
10133 (("run_make=_BUILDING")
10134 "run_make=False"))
10135
10136 (let ((greenlet (string-append
10137 (assoc-ref inputs "python-greenlet")
10138 "/include")))
10139 (match (scandir greenlet
10140 (lambda (item)
10141 (string-prefix? "python" item)))
10142 ((python)
10143 (setenv "C_INCLUDE_PATH"
10144 (string-append greenlet "/" python)))))
10145 #t))
10146 (add-before 'check 'skip-timer-test
10147 (lambda _
10148 ;; XXX: Skip 'TestTimerResolution', which appears to be
10149 ;; unreliable.
10150 (substitute* "src/greentest/test__core_timer.py"
10151 (("not greentest.RUNNING_ON_CI") "False"))
10152 #t))
10153 (replace 'check
10154 (lambda _
10155 ;; Make sure the build directory is on PYTHONPATH.
10156 (setenv "PYTHONPATH"
10157 (string-append
10158 (getenv "PYTHONPATH") ":"
10159 (getcwd) "/build/"
10160 (car (scandir "build" (cut string-prefix? "lib." <>)))))
10161 (with-directory-excursion "src/greentest"
10162 ;; XXX: Many tests require network access. Instead we only
10163 ;; run known-good tests. Unfortunately we cannot use
10164 ;; recursion here since this directory also contains
10165 ;; Python-version-specific subfolders.
10166 (apply invoke "python" "testrunner.py" "--config"
10167 "known_failures.py"
10168 (scandir "." (cut regexp-exec
10169 (make-regexp "test_+(subprocess|core)")
10170 <>)))))))))
10171 (propagated-inputs
10172 `(("python-greenlet" ,python-greenlet)
10173 ("python-objgraph" ,python-objgraph)))
10174 (native-inputs
10175 `(("python-six" ,python-six)))
10176 (inputs
10177 `(("c-ares" ,c-ares)
10178 ("libev" ,libev)))
10179 (home-page "http://www.gevent.org/")
10180 (synopsis "Coroutine-based network library")
10181 (description
10182 "gevent is a coroutine-based Python networking library that uses greenlet
10183 to provide a high-level synchronous API on top of the libev event loop.")
10184 (license license:expat)
10185 (properties `((python2-variant . ,(delay python2-gevent))))))
10186
10187 (define-public python2-gevent
10188 (let ((base (package-with-python2
10189 (strip-python2-variant python-gevent))))
10190 (package
10191 (inherit base)
10192 (native-inputs `(,@(package-native-inputs python-gevent)
10193 ("python-mock" ,python2-mock))))))
10194
10195 (define-public python-fastimport
10196 (package
10197 (name "python-fastimport")
10198 (version "0.9.6")
10199 (source
10200 (origin
10201 (method url-fetch)
10202 (uri (pypi-uri "fastimport" version))
10203 (sha256
10204 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10205 (build-system python-build-system)
10206 (home-page "https://github.com/jelmer/python-fastimport")
10207 (synopsis "VCS fastimport parser and generator in Python")
10208 (description "This package provides a parser for and generator of the Git
10209 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
10210 format.")
10211 (license license:gpl2+)))
10212
10213 (define-public python2-fastimport
10214 (package-with-python2 python-fastimport))
10215
10216 (define-public python-twisted
10217 (package
10218 (name "python-twisted")
10219 (version "19.7.0")
10220 (source (origin
10221 (method url-fetch)
10222 (uri (pypi-uri "Twisted" version ".tar.bz2"))
10223 (sha256
10224 (base32
10225 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
10226 (build-system python-build-system)
10227 (arguments
10228 '(#:tests? #f)) ; FIXME: some tests fail
10229 (propagated-inputs
10230 `(("python-zope-interface" ,python-zope-interface)
10231 ("python-pyhamcrest" ,python-pyhamcrest)
10232 ("python-incremental" ,python-incremental)
10233 ("python-hyperlink" ,python-hyperlink)
10234 ("python-constantly" ,python-constantly)
10235 ("python-automat" ,python-automat)))
10236 (home-page "https://twistedmatrix.com/")
10237 (synopsis "Asynchronous networking framework written in Python")
10238 (description
10239 "Twisted is an extensible framework for Python programming, with special
10240 focus on event-based network programming and multiprotocol integration.")
10241 (license license:expat)))
10242
10243 (define-public python2-twisted
10244 (package-with-python2 python-twisted))
10245
10246 (define-public python-pika
10247 (package
10248 (name "python-pika")
10249 (version "0.12.0")
10250 (source
10251 (origin
10252 (method url-fetch)
10253 (uri (pypi-uri "pika" version))
10254 (sha256
10255 (base32
10256 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10257 (build-system python-build-system)
10258 (native-inputs
10259 `(("python-pyev" ,python-pyev)
10260 ("python-tornado" ,python-tornado)
10261 ("python-twisted" ,python-twisted)))
10262 (home-page "https://pika.readthedocs.org")
10263 (synopsis "Pure Python AMQP Client Library")
10264 (description
10265 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10266 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10267 network support library.")
10268 (license license:bsd-3)))
10269
10270 (define-public python2-pika
10271 (package-with-python2 python-pika))
10272
10273 (define-public python-ply
10274 (package
10275 (name "python-ply")
10276 (version "3.10")
10277 (source
10278 (origin
10279 (method url-fetch)
10280 (uri (pypi-uri "ply" version))
10281 (sha256
10282 (base32
10283 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10284 (build-system python-build-system)
10285 (home-page "http://www.dabeaz.com/ply/")
10286 (synopsis "Python Lex & Yacc")
10287 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10288 It uses LR parsing and does extensive error checking.")
10289 (license license:bsd-3)))
10290
10291 (define-public python2-ply
10292 (package-with-python2 python-ply))
10293
10294 (define-public python-tabulate
10295 (package
10296 (name "python-tabulate")
10297 (version "0.7.7")
10298 (source (origin
10299 (method url-fetch)
10300 (uri (pypi-uri "tabulate" version))
10301 (sha256
10302 (base32
10303 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10304 (build-system python-build-system)
10305 (arguments
10306 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10307 ;; and the latest release is not tagged in the upstream repository.
10308 '(#:tests? #f))
10309 (home-page "https://bitbucket.org/astanin/python-tabulate")
10310 (synopsis "Pretty-print tabular data")
10311 (description
10312 "Tabulate is a library and command-line utility to pretty-print tabular
10313 data in Python.")
10314 (license license:expat)))
10315
10316 (define-public python2-tabulate
10317 (package-with-python2 python-tabulate))
10318
10319 (define-public python-kazoo
10320 (package
10321 (name "python-kazoo")
10322 (version "2.4.0")
10323 (source
10324 (origin
10325 (method url-fetch)
10326 (uri (pypi-uri "kazoo" version))
10327 (sha256
10328 (base32
10329 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10330 (build-system python-build-system)
10331 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10332 (propagated-inputs
10333 `(("python-six" ,python-six)))
10334 (home-page "https://kazoo.readthedocs.org")
10335 (synopsis "High-level Zookeeper client library")
10336 (description
10337 "Kazoo is a Python client library for the Apache Zookeeper distributed
10338 application service. It is designed to be easy to use and to avoid common
10339 programming errors.")
10340 (license license:asl2.0)))
10341
10342 (define-public python2-kazoo
10343 (package-with-python2 python-kazoo))
10344
10345 (define-public python-pykafka
10346 (package
10347 (name "python-pykafka")
10348 (version "2.4.0")
10349 (source (origin
10350 (method url-fetch)
10351 (uri (pypi-uri "pykafka" version))
10352 (sha256
10353 (base32
10354 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10355 (build-system python-build-system)
10356 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10357 (propagated-inputs
10358 `(("python-gevent" ,python-gevent)
10359 ("python-kazoo" ,python-kazoo)
10360 ("python-tabulate" ,python-tabulate)))
10361 (inputs
10362 `(("librdkafka" ,librdkafka)))
10363 (home-page "https://pykafka.readthedocs.io/")
10364 (synopsis "Apache Kafka client for Python")
10365 (description
10366 "PyKafka is a client for the Apache Kafka distributed messaging system.
10367 It includes Python implementations of Kafka producers and consumers, which
10368 are optionally backed by a C extension built on librdkafka.")
10369 (license license:asl2.0)))
10370
10371 (define-public python2-pykafka
10372 (package-with-python2 python-pykafka))
10373
10374 (define-public python-wcwidth
10375 (package
10376 (name "python-wcwidth")
10377 (version "0.1.8")
10378 (source (origin
10379 (method url-fetch)
10380 (uri (pypi-uri "wcwidth" version))
10381 (sha256
10382 (base32
10383 "1a1pzds3xzfylm5mnc5f6c1p8kiig0daqjc9gygd9rc3cj53x2zj"))))
10384 (build-system python-build-system)
10385 (home-page "https://github.com/jquast/wcwidth")
10386 (synopsis "Measure number of terminal column cells of wide-character codes")
10387 (description "Wcwidth measures the number of terminal column cells of
10388 wide-character codes. It is useful for those implementing a terminal emulator,
10389 or programs that carefully produce output to be interpreted by one. It is a
10390 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10391 specified in POSIX.1-2001 and POSIX.1-2008.")
10392 (license license:expat)))
10393
10394 (define-public python2-wcwidth
10395 (package-with-python2 python-wcwidth))
10396
10397 (define-public python2-jsonrpclib
10398 (package
10399 (name "python2-jsonrpclib")
10400 (version "0.1.7")
10401 (source (origin
10402 (method url-fetch)
10403 (uri (pypi-uri "jsonrpclib" version))
10404 (sha256
10405 (base32
10406 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10407 (build-system python-build-system)
10408 (arguments
10409 `(#:tests? #f
10410 #:python ,python-2))
10411 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10412 (synopsis "Implementation of JSON-RPC specification for Python")
10413 (description
10414 "This library is an implementation of the JSON-RPC specification.
10415 It supports both the original 1.0 specification, as well as the
10416 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10417 etc.")
10418 (license license:asl2.0)))
10419
10420 (define-public python-chai
10421 (package
10422 (name "python-chai")
10423 (version "1.1.2")
10424 (source (origin
10425 (method url-fetch)
10426 (uri (pypi-uri "chai" version))
10427 (sha256
10428 (base32
10429 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10430 (build-system python-build-system)
10431 (home-page "https://github.com/agoragames/chai")
10432 (synopsis "Mocking framework for Python")
10433 (description
10434 "Chai provides an api for mocking, stubbing and spying your python
10435 objects, patterned after the Mocha library for Ruby.")
10436 (license license:bsd-3)))
10437
10438 (define-public python2-chai
10439 (package-with-python2 python-chai))
10440
10441 (define-public python-inflection
10442 (package
10443 (name "python-inflection")
10444 (version "0.3.1")
10445 (source
10446 (origin (method url-fetch)
10447 (uri (pypi-uri "inflection" version))
10448 (sha256
10449 (base32
10450 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10451 (build-system python-build-system)
10452 (native-inputs
10453 `(("python-pytest" ,python-pytest)))
10454 (home-page "https://github.com/jpvanhal/inflection")
10455 (synopsis "Python string transformation library")
10456 (description
10457 "Inflection is a string transformation library. It singularizes
10458 and pluralizes English words, and transforms strings from CamelCase to
10459 underscored string.")
10460 (license license:expat)))
10461
10462 (define-public python2-inflection
10463 (package-with-python2 python-inflection))
10464
10465 (define-public python-pylev
10466 (package
10467 (name "python-pylev")
10468 (version "1.3.0")
10469 (source (origin
10470 (method url-fetch)
10471 (uri (pypi-uri "pylev" version))
10472 (sha256
10473 (base32
10474 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10475 (build-system python-build-system)
10476 (home-page "https://github.com/toastdriven/pylev")
10477 (synopsis "Levenshtein distance implementation in Python")
10478 (description "Pure Python Levenshtein implementation, based off the
10479 Wikipedia code samples at
10480 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10481 (license license:bsd-3)))
10482
10483 (define-public python2-pylev
10484 (package-with-python2 python-pylev))
10485
10486 (define-public python-cleo
10487 (package
10488 (name "python-cleo")
10489 (version "0.7.6")
10490 (source (origin
10491 (method url-fetch)
10492 (uri (pypi-uri "cleo" version))
10493 (sha256
10494 (base32
10495 "02dlc0rn43zgvw0s5v4j80bca9n1jfpwy3r78gn9qjgk0qj39kwr"))))
10496 (build-system python-build-system)
10497 (native-inputs
10498 `( ;; For testing
10499 ("python-mock" ,python-mock)
10500 ("python-pytest-mock" ,python-pytest-mock)
10501 ("python-pytest" ,python-pytest)))
10502 (propagated-inputs
10503 `(("python-backpack" ,python-backpack)
10504 ("python-clikit" ,python-clikit)
10505 ("python-pastel" ,python-pastel)
10506 ("python-pylev" ,python-pylev)))
10507 (home-page "https://github.com/sdispater/cleo")
10508 (synopsis "Command-line arguments library for Python")
10509 (description
10510 "Cleo allows you to create command-line commands with signature in
10511 docstring and colored output.")
10512 (license license:expat)))
10513
10514 (define-public python2-cleo
10515 (package-with-python2 python-cleo))
10516
10517 (define-public python-tomlkit
10518 (package
10519 (name "python-tomlkit")
10520 (version "0.5.8")
10521 (source
10522 (origin
10523 (method url-fetch)
10524 (uri (pypi-uri "tomlkit" version))
10525 (sha256
10526 (base32
10527 "0sf2a4q61kf344hjbw8kb6za1hlccl89j9lzqw0l2zpddp0hrh9j"))))
10528 (build-system python-build-system)
10529 (native-inputs
10530 `(("python-pytest" ,python-pytest)))
10531 (home-page
10532 "https://github.com/sdispater/tomlkit")
10533 (synopsis "Style preserving TOML library")
10534 (description
10535 "TOML Kit is a 0.5.0-compliant TOML library. It includes a parser that
10536 preserves all comments, indentations, whitespace and internal element ordering,
10537 and makes them accessible and editable via an intuitive API. It can also
10538 create new TOML documents from scratch using the provided helpers. Part of the
10539 implementation as been adapted, improved and fixed from Molten.")
10540 (license license:expat)))
10541
10542 (define-public python-shellingham
10543 (package
10544 (name "python-shellingham")
10545 (version "1.3.1")
10546 (source
10547 (origin
10548 (method url-fetch)
10549 (uri (pypi-uri "shellingham" version))
10550 (sha256
10551 (base32
10552 "1q7kws7w4x2hji3g7y0ni9ddk4sd676ylrb3db54gbpys6xj6nwq"))))
10553 (build-system python-build-system)
10554 (home-page
10555 "https://github.com/sarugaku/shellingham")
10556 (synopsis "Tool to detect surrounding shell")
10557 (description
10558 "Shellingham detects what shell the current Python executable is
10559 running in.")
10560 (license license:isc)))
10561
10562 (define-public python-memcached
10563 (package
10564 (name "python-memcached")
10565 (version "1.59")
10566 (source
10567 (origin
10568 (method url-fetch)
10569 (uri (pypi-uri "python-memcached" version))
10570 (sha256
10571 (base32
10572 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))))
10573 (build-system python-build-system)
10574 (propagated-inputs `(("python-six" ,python-six)))
10575 (home-page
10576 "https://github.com/linsomniac/python-memcached")
10577 (synopsis "Pure python memcached client")
10578 (description
10579 "This software is a pure Python interface to the memcached memory cache
10580 daemon. It is the client side software which allows storing values in one or
10581 more, possibly remote, memcached servers.")
10582 (license license:psfl)))
10583
10584 (define-public python-clikit
10585 (package
10586 (name "python-clikit")
10587 (version "0.4.1")
10588 (source
10589 (origin
10590 (method url-fetch)
10591 (uri (pypi-uri "clikit" version))
10592 (sha256
10593 (base32
10594 "10gab65pq0jdf589n33sj2513pxal2lisl4xwf1ijysdjxmpdr4a"))))
10595 (build-system python-build-system)
10596 (propagated-inputs
10597 `(("python-pastel" ,python-pastel)
10598 ("python-pylev" ,python-pylev)))
10599 (home-page "https://github.com/sdispater/clikit")
10600 (synopsis "Group of utilities to build command line interfaces")
10601 (description
10602 "CliKit is a group of utilities to build testable command line
10603 interfaces.")
10604 (license license:expat)))
10605
10606 (define-public python-msgpack-python
10607 (package
10608 (name "python-msgpack-python")
10609 (version "0.5.6")
10610 (source
10611 (origin
10612 (method url-fetch)
10613 (uri (pypi-uri "msgpack-python" version))
10614 (sha256
10615 (base32
10616 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
10617 (build-system python-build-system)
10618 (home-page "http://msgpack.org/")
10619 (synopsis "Package to deserialize messages in MessagePack binary format")
10620 (description
10621 "MessagePack is an efficient binary serialization format. It lets you
10622 exchange data among multiple languages like JSON. But it's faster and
10623 smaller. Small integers are encoded into a single byte, and typical short
10624 strings require only one extra byte in addition to the strings themselves.")
10625 (license license:asl2.0)))
10626
10627 (define-public python-cachy
10628 (package
10629 (name "python-cachy")
10630 (version "0.2.0")
10631 (source
10632 (origin
10633 (method url-fetch)
10634 (uri (pypi-uri "cachy" version))
10635 (sha256
10636 (base32
10637 "0v6mjyhgx6j7ya20bk69cr3gdzdkdf6psay0h090rscclgji65dp"))))
10638 (build-system python-build-system)
10639 (native-inputs
10640 `(("python-fakeredis" ,python-fakeredis)
10641 ("python-flexmock" ,python-flexmock)
10642 ("python-pytest" ,python-pytest)))
10643 (propagated-inputs
10644 `(("python-memcached" ,python-memcached)
10645 ("python-msgpack-python" ,python-msgpack-python)
10646 ("python-redis" ,python-redis)))
10647 (home-page "https://github.com/sdispater/cachy")
10648 (synopsis "Simple yet effective caching library")
10649 (description
10650 "Cachy provides a simple yet effective caching library. A simple but
10651 powerful API: thread-safety; decorator syntax; support for memcached, redis,
10652 database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
10653 (license license:expat)))
10654
10655 (define-public poetry
10656 (package
10657 (name "poetry")
10658 (version "0.12.17")
10659 ;; Poetry can only be built from source with poetry.
10660 (source
10661 (origin
10662 (method url-fetch)
10663 (uri (pypi-uri "poetry" version))
10664 (sha256
10665 (base32
10666 "0gxwcd65qjmzqzppf53x51sic1rbcd9py6cdzx3aprppipimslvf"))))
10667 (build-system python-build-system)
10668 (arguments
10669 `(#:tests? #f ;; Pypi does not have tests.
10670 #:phases
10671 (modify-phases %standard-phases
10672 (replace 'build
10673 (lambda _
10674 ;; Bug in poetry https://github.com/sdispater/poetry/issues/866.
10675 (invoke "sed" "-i" "-e" "s/from distutils.core/from setuptools/"
10676 "setup.py")
10677 #t)))))
10678 (propagated-inputs
10679 `(("python-cachecontrol" ,python-cachecontrol)
10680 ("python-cachy" ,python-cachy)
10681 ("python-cleo" ,python-cleo)
10682 ("python-glob2" ,python-glob2)
10683 ("python-html5lib" ,python-html5lib)
10684 ("python-jsonschema" ,python-jsonschema)
10685 ("python-msgpack" ,python-msgpack)
10686 ("python-pkginfo" ,python-pkginfo)
10687 ("python-pyparsing" ,python-pyparsing)
10688 ("python-pyrsistent" ,python-pyrsistent)
10689 ("python-requests" ,python-requests)
10690 ("python-requests-toolbelt" ,python-requests-toolbelt)
10691 ("python-shellingham" ,python-shellingham)
10692 ("python-tomlkit" ,python-tomlkit)
10693 ("python-virtualenv" ,python-virtualenv)))
10694 (home-page "https://poetry.eustace.io/")
10695 (synopsis "Python dependency management and packaging made easy")
10696 (description "Poetry is a tool for dependency management and packaging
10697 in Python. It allows you to declare the libraries your project depends on and
10698 it will manage (install/update) them for you.")
10699 (license license:expat)))
10700
10701 (define-public python-lazy-object-proxy
10702 (package
10703 (name "python-lazy-object-proxy")
10704 (version "1.4.3")
10705 (source (origin
10706 (method url-fetch)
10707 (uri (pypi-uri "lazy-object-proxy" version))
10708 (sha256
10709 (base32
10710 "1w1aaay424ciz8fz3fkzxb0pxzfxn184f2whpyn4fx72bn50x47k"))))
10711 (native-inputs
10712 `(("python-setuptools-scm" ,python-setuptools-scm-3.3)))
10713 (build-system python-build-system)
10714 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10715 (synopsis "Lazy object proxy for python")
10716 (description
10717 "Lazy object proxy is an object that wraps a callable but defers the call
10718 until the object is actually required, and caches the result of said call.")
10719 (license license:bsd-2)))
10720
10721 (define-public python2-lazy-object-proxy
10722 (package-with-python2 python-lazy-object-proxy))
10723
10724 (define-public python-dnspython
10725 (package
10726 (name "python-dnspython")
10727 (version "1.15.0")
10728 (source (origin
10729 (method url-fetch)
10730 (uri (string-append "http://www.dnspython.org/kits/"
10731 version "/dnspython-" version ".tar.gz"))
10732 (sha256
10733 (base32
10734 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10735 (build-system python-build-system)
10736 (arguments '(#:tests? #f)) ; XXX: requires internet access
10737 (home-page "http://www.dnspython.org")
10738 (synopsis "DNS toolkit for Python")
10739 (description
10740 "dnspython is a DNS toolkit for Python. It supports almost all record
10741 types. It can be used for queries, zone transfers, and dynamic updates.
10742 It supports TSIG authenticated messages and EDNS0.")
10743 (license license:expat)))
10744
10745 (define-public python2-dnspython
10746 (package-with-python2 python-dnspython))
10747
10748 (define-public python-email-validator
10749 (package
10750 (name "python-email-validator")
10751 (version "1.0.2")
10752 (source
10753 (origin (method url-fetch)
10754 (uri (pypi-uri "email_validator" version))
10755 (sha256
10756 (base32
10757 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10758 (build-system python-build-system)
10759 (arguments
10760 '(#:phases
10761 (modify-phases %standard-phases
10762 (add-before 'build 'use-dnspython
10763 (lambda _
10764 (substitute* "setup.py"
10765 (("dnspython3") "dnspython"))
10766 #t)))))
10767 (propagated-inputs
10768 `(("python-dnspython" ,python-dnspython)
10769 ("python-idna" ,python-idna)))
10770 (home-page "https://github.com/JoshData/python-email-validator")
10771 (synopsis "Email address validation library for Python")
10772 (description
10773 "This library validates email address syntax and deliverability.")
10774 (license license:cc0)))
10775
10776 (define-public python2-email-validator
10777 (package-with-python2 python-email-validator))
10778
10779 (define-public python-ukpostcodeparser
10780 (package
10781 (name "python-ukpostcodeparser")
10782 (version "1.0.3")
10783 (source (origin
10784 (method url-fetch)
10785 (uri (pypi-uri "UkPostcodeParser" version))
10786 (sha256
10787 (base32
10788 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10789 (build-system python-build-system)
10790 (home-page "https://github.com/hamstah/ukpostcodeparser")
10791 (synopsis "UK Postcode parser for Python")
10792 (description
10793 "This library provides the @code{parse_uk_postcode} function for
10794 parsing UK postcodes.")
10795 (license license:expat)))
10796
10797 (define-public python2-ukpostcodeparser
10798 (package-with-python2 python-ukpostcodeparser))
10799
10800 (define-public python-faker
10801 (package
10802 (name "python-faker")
10803 (version "0.7.9")
10804 (source (origin
10805 (method url-fetch)
10806 (uri (pypi-uri "Faker" version))
10807 (sha256
10808 (base32
10809 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10810 (patches
10811 (search-patches "python-faker-fix-build-32bit.patch"))
10812 (modules '((guix build utils)))
10813 (snippet
10814 '(begin
10815 (for-each delete-file (find-files "." "\\.pyc$"))
10816 #t))))
10817 (build-system python-build-system)
10818 (arguments
10819 '(#:phases
10820 (modify-phases %standard-phases
10821 (replace 'check
10822 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
10823 (native-inputs
10824 `(;; For testing
10825 ("python-email-validator" ,python-email-validator)
10826 ("python-mock" ,python-mock)
10827 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10828 (propagated-inputs
10829 `(("python-dateutil" ,python-dateutil)
10830 ("python-six" ,python-six)))
10831 (home-page "https://github.com/joke2k/faker")
10832 (synopsis "Python package that generates fake data")
10833 (description
10834 "Faker is a Python package that generates fake data such as names,
10835 addresses, and phone numbers.")
10836 (license license:expat)
10837 (properties `((python2-variant . ,(delay python2-faker))))))
10838
10839 (define-public python2-faker
10840 (let ((base (package-with-python2 (strip-python2-variant
10841 python-faker))))
10842 (package
10843 (inherit base)
10844 (propagated-inputs
10845 `(("python2-ipaddress" ,python2-ipaddress)
10846 ,@(package-propagated-inputs base))))))
10847
10848 (define-public python-pyaml
10849 (package
10850 (name "python-pyaml")
10851 (version "18.11.0")
10852 (source (origin
10853 (method url-fetch)
10854 (uri (pypi-uri "pyaml" version))
10855 (sha256
10856 (base32
10857 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
10858 (build-system python-build-system)
10859 (native-inputs
10860 `(("python-unidecode" ,python-unidecode)))
10861 (propagated-inputs
10862 `(("python-pyyaml" ,python-pyyaml)))
10863 (home-page "https://github.com/mk-fg/pretty-yaml")
10864 (synopsis "YAML pretty-print library for Python")
10865 (description
10866 "pyaml is a PyYAML based python module to produce pretty and readable
10867 YAML-serialized data.")
10868 (license license:wtfpl2)))
10869
10870 (define-public python2-pyaml
10871 (package-with-python2 python-pyaml))
10872
10873 (define-public python-backpack
10874 (package
10875 (name "python-backpack")
10876 (version "0.1")
10877 (source
10878 (origin
10879 (method url-fetch)
10880 (uri (pypi-uri "backpack" version))
10881 (sha256
10882 (base32
10883 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10884 (build-system python-build-system)
10885 (native-inputs
10886 `(("python-pytest" ,python-pytest)
10887 ("python-nose" ,python-nose)))
10888 (propagated-inputs
10889 `(("python-simplejson" ,python-simplejson)))
10890 (home-page "https://github.com/sdispater/backpack")
10891 (synopsis "Utilities for working with Python collections")
10892 (description "Backpack provides some useful utilities for working with
10893 collections of data.")
10894 (license license:expat)))
10895
10896 (define-public python2-backpack
10897 (package-with-python2 python-backpack))
10898
10899 (define-public python-prompt-toolkit
10900 (package
10901 (name "python-prompt-toolkit")
10902 (version "2.0.7")
10903 (source
10904 (origin
10905 (method url-fetch)
10906 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10907 (sha256
10908 (base32
10909 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10910 (build-system python-build-system)
10911 (arguments
10912 `(#:phases
10913 (modify-phases %standard-phases
10914 (delete 'check)
10915 (add-after 'install 'post-install-check
10916 (lambda* (#:key inputs outputs #:allow-other-keys)
10917 ;; HOME is needed for the test
10918 ;; "test_pathcompleter_can_expanduser".
10919 (setenv "HOME" "/tmp")
10920 (add-installed-pythonpath inputs outputs)
10921 (invoke "py.test"))))))
10922 (propagated-inputs
10923 `(("python-wcwidth" ,python-wcwidth)
10924 ("python-six" ,python-six)
10925 ("python-pygments" ,python-pygments)))
10926 (native-inputs
10927 `(("python-pytest" ,python-pytest)))
10928 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10929 (synopsis "Library for building command line interfaces in Python")
10930 (description
10931 "Prompt-Toolkit is a library for building interactive command line
10932 interfaces in Python. It's like GNU Readline but it also features syntax
10933 highlighting while typing, out-of-the-box multi-line input editing, advanced
10934 code completion, incremental search, support for Chinese double-width
10935 characters, mouse support, and auto suggestions.")
10936 (license license:bsd-3)))
10937
10938 (define-public python2-prompt-toolkit
10939 (package-with-python2 python-prompt-toolkit))
10940
10941 (define-public python-prompt-toolkit-1
10942 (package (inherit python-prompt-toolkit)
10943 (version "1.0.15")
10944 (source
10945 (origin
10946 (method url-fetch)
10947 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10948 (sha256
10949 (base32
10950 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
10951
10952 (define-public python2-prompt-toolkit-1
10953 (package-with-python2 python-prompt-toolkit-1))
10954
10955 (define-public python-jedi
10956 (package
10957 (name "python-jedi")
10958 (version "0.15.1")
10959 (source
10960 (origin
10961 (method url-fetch)
10962 (uri (pypi-uri "jedi" version))
10963 (sha256
10964 (base32
10965 "0bp4pxhsynaarbvzblsn5x32lzp29svy3sxfy8i6m5iwz9s9r1ds"))))
10966 (build-system python-build-system)
10967 (arguments
10968 `(#:phases
10969 (modify-phases %standard-phases
10970 (add-after 'unpack 'disable-file-completion-test
10971 ;; A single parameterized test currently fail (see:
10972 ;; https://github.com/davidhalter/jedi/issues/1395). Remove it.
10973 (lambda _
10974 (substitute* "test/test_api/test_completion.py"
10975 ((".*'example.py', 'rb\"' \\+ join\\('\\.\\.'.*") ""))
10976 #t))
10977 (replace 'check
10978 (lambda _
10979 (setenv "HOME" "/tmp")
10980 (invoke "python" "-m" "pytest"))))))
10981 (native-inputs
10982 `(("python-pytest" ,python-pytest)
10983 ("python-docopt" ,python-docopt)))
10984 (propagated-inputs
10985 `(("python-parso" ,python-parso)))
10986 (home-page "https://github.com/davidhalter/jedi")
10987 (synopsis "Autocompletion and static analysis library for Python")
10988 (description
10989 "Jedi is a static analysis tool for Python that can be used in Integrated
10990 Development Environments (@dfn{IDE}s) and text editors. It understands Python
10991 on a deeper level than many other static analysis frameworks for Python.
10992
10993 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
10994 well.")
10995 (license license:expat)))
10996
10997 (define-public python2-jedi
10998 (package-with-python2 python-jedi))
10999
11000 (define-public ptpython
11001 (package
11002 (name "ptpython")
11003 (version "0.34")
11004 (source (origin
11005 (method url-fetch)
11006 (uri (pypi-uri "ptpython" version))
11007 (sha256
11008 (base32
11009 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
11010 (build-system python-build-system)
11011 (arguments
11012 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
11013 (propagated-inputs
11014 `(("python-docopt" ,python-docopt)
11015 ("python-jedi" ,python-jedi)
11016 ("python-prompt-toolkit" ,python-prompt-toolkit)
11017 ("python-pygments" ,python-pygments)))
11018 (home-page "https://github.com/jonathanslenders/ptpython")
11019 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
11020 (description
11021 "ptpython is a Python read-eval-print loop with IDE-like features.
11022 It supports syntax highlighting, multiline editing, autocompletion, mouse,
11023 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
11024 etc.")
11025 (license license:bsd-3)
11026 (properties `((python2-variant . ,(delay ptpython-2))))))
11027
11028 (define-public ptpython-2
11029 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
11030 (package
11031 (inherit base)
11032 (name "ptpython2"))))
11033
11034 (define-public python-stem
11035 (package
11036 (name "python-stem")
11037 (version "1.7.1")
11038 (source
11039 (origin
11040 (method url-fetch)
11041 (uri (pypi-uri "stem" version))
11042 (sha256
11043 (base32
11044 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
11045 (build-system python-build-system)
11046 (arguments
11047 `(#:phases
11048 (modify-phases %standard-phases
11049 (replace 'check
11050 (lambda _
11051 (invoke "./run_tests.py" "--unit")
11052 #t)))))
11053 (native-inputs
11054 `(("python-mock" ,python-mock)
11055 ("python-pycodestyle" ,python-pycodestyle)
11056 ("python-pyflakes" ,python-pyflakes)))
11057 (home-page "https://stem.torproject.org/")
11058 (synopsis
11059 "Python controller library that allows applications to interact with Tor")
11060 (description
11061 "Stem is a Python controller library for Tor. With it you can use Tor's
11062 control protocol to script against the Tor process and read descriptor data
11063 relays publish about themselves.")
11064 (license license:lgpl3)))
11065
11066 (define-public python2-stem
11067 (package-with-python2 python-stem))
11068
11069 (define-public python-pyserial
11070 (package
11071 (name "python-pyserial")
11072 (version "3.4")
11073 (source
11074 (origin
11075 (method url-fetch)
11076 (uri (pypi-uri "pyserial" version))
11077 (sha256
11078 (base32
11079 "09y68bczw324a4jb9a1cfwrbjhq179vnfkkkrybbksp0vqgl0bbf"))))
11080 (build-system python-build-system)
11081 (arguments
11082 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
11083 ;; #:phases
11084 ;; (modify-phases %standard-phases
11085 ;; (replace 'check
11086 ;; (lambda _
11087 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
11088 (home-page
11089 "https://github.com/pyserial/pyserial")
11090 (synopsis "Python Serial Port Bindings")
11091 (description "@code{pyserial} provide serial port bindings for Python. It
11092 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11093 and/or Xon/Xoff. The port is accessed in RAW mode.")
11094 (license license:bsd-3)))
11095
11096 (define-public python2-pyserial
11097 (package-with-python2 python-pyserial))
11098
11099 (define-public python-kivy
11100 (package
11101 (name "python-kivy")
11102 (version "1.10.1")
11103 (source
11104 (origin
11105 (method url-fetch)
11106 (uri (pypi-uri "Kivy" version))
11107 (file-name (string-append name "-" version ".tar.gz"))
11108 (sha256
11109 (base32
11110 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
11111 (build-system python-build-system)
11112 (arguments
11113 `(#:tests? #f ; Tests require many optional packages
11114 #:phases
11115 (modify-phases %standard-phases
11116 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11117 (lambda* (#:key inputs #:allow-other-keys)
11118 (setenv "KIVY_SDL2_PATH"
11119 (string-append (assoc-ref inputs "sdl-union")
11120 "/include/SDL2"))
11121 #t)))))
11122 (native-inputs
11123 `(("git" ,git)
11124 ("pkg-config" ,pkg-config)
11125 ("python-cython" ,python-cython)))
11126 (inputs
11127 `(("gstreamer" ,gstreamer)
11128 ("mesa" ,mesa)
11129 ("sdl-union"
11130 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11131 (home-page "http://kivy.org")
11132 (synopsis
11133 "Multitouch application framework")
11134 (description
11135 "A software library for rapid development of
11136 hardware-accelerated multitouch applications.")
11137 (license license:expat)))
11138
11139 (define-public python2-kivy
11140 (package-with-python2 python-kivy))
11141
11142 (define-public python-kivy-next
11143 (deprecated-package "python-kivy-next" python-kivy))
11144
11145 (define-public python2-kivy-next
11146 (deprecated-package "python2-kivy-next" python2-kivy))
11147
11148 (define-public python-binaryornot
11149 (package
11150 (name "python-binaryornot")
11151 (version "0.4.4")
11152 (source (origin
11153 (method url-fetch)
11154 (uri (pypi-uri "binaryornot" version))
11155 (sha256
11156 (base32
11157 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
11158 (build-system python-build-system)
11159 (arguments
11160 `(#:phases
11161 (modify-phases %standard-phases
11162 (add-after 'unpack 'patch-tests
11163 (lambda _
11164 ;; TypeError: binary() got an unexpected keyword argument
11165 ;; 'average_size'.
11166 (substitute* "tests/test_check.py"
11167 (("average_size=512") ""))
11168 #t)))))
11169 (propagated-inputs
11170 `(("python-chardet" ,python-chardet)
11171 ("python-hypothesis" ,python-hypothesis)))
11172 (home-page "https://github.com/audreyr/binaryornot")
11173 (synopsis "Package to check if a file is binary or text")
11174 (description "Ultra-lightweight pure Python package to check if a file is
11175 binary or text.")
11176 (license license:bsd-3)
11177 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11178
11179 (define-public python2-binaryornot
11180 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11181 (package (inherit base)
11182 (propagated-inputs
11183 `(("python2-enum34" ,python2-enum34)
11184 ,@(package-propagated-inputs base))))))
11185
11186 (define-public python-binwalk
11187 (let ((commit "64201acfb5b0a9cdd9faa58c40a36dcff8612e29")
11188 (revision "0"))
11189 (package
11190 (name "python-binwalk")
11191 (version (git-version "2.1.1" revision commit))
11192 (source
11193 (origin
11194 (method git-fetch)
11195 (uri (git-reference
11196 (url "https://github.com/ReFirmLabs/binwalk")
11197 (commit commit)))
11198 (file-name (git-file-name name version))
11199 (sha256
11200 (base32
11201 "1z7ca6rfp887hw5jc3sb45mm4fa0xid4lsp2z8g4r590dr7k7w15"))))
11202 (build-system python-build-system)
11203 (arguments
11204 `(#:phases
11205 (modify-phases %standard-phases
11206 (add-before 'check 'set-pythonpath
11207 (lambda _
11208 (setenv "PYTHONPATH"
11209 (string-append
11210 (getcwd) "/src/"
11211 ":" (getenv "PYTHONPATH")))
11212 (setenv "HOME" "")
11213 #t)))))
11214 (native-inputs
11215 `(("python-coverage" ,python-coverage)
11216 ("python-nose" ,python-nose)))
11217 (home-page "https://github.com/ReFirmLabs/binwalk")
11218 (synopsis "Firmware analysis tool")
11219 (description "Binwalk is a tool for analyzing, reverse engineering, and extracting firmware images")
11220 (license license:expat))))
11221
11222 (define-public python-nltk
11223 (package
11224 (name "python-nltk")
11225 (version "3.2.1")
11226 (source (origin
11227 (method url-fetch)
11228 (uri (pypi-uri "nltk" version))
11229 (sha256
11230 (base32
11231 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11232 (build-system python-build-system)
11233 (arguments
11234 '(;; The tests require some extra resources to be downloaded.
11235 ;; TODO Try packaging these resources.
11236 #:tests? #f))
11237 (home-page "http://nltk.org/")
11238 (synopsis "Natural Language Toolkit")
11239 (description "It provides interfaces to over 50 corpora and lexical
11240 resources such as WordNet, along with a suite of text processing libraries
11241 for classification, tokenization, stemming, tagging, parsing, and semantic
11242 reasoning, wrappers for natural language processing libraries.")
11243 (license license:asl2.0)))
11244
11245 (define-public python2-nltk
11246 (package-with-python2 python-nltk))
11247
11248 (define-public python-pymongo
11249 (package
11250 (name "python-pymongo")
11251 (version "3.7.2")
11252 (source (origin
11253 (method url-fetch)
11254 (uri (pypi-uri "pymongo" version))
11255 (sha256
11256 (base32
11257 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
11258 (build-system python-build-system)
11259 (propagated-inputs
11260 `(("python-certifi" ,python-certifi)))
11261 (home-page "https://github.com/mongodb/mongo-python-driver")
11262 (synopsis "Python driver for MongoDB")
11263 (description "Python driver for MongoDB.")
11264 (license license:asl2.0)))
11265
11266 (define-public python2-pymongo
11267 (package-with-python2 python-pymongo))
11268
11269 (define-public python-consul
11270 (package
11271 (name "python-consul")
11272 (version "0.6.1")
11273 (source
11274 (origin
11275 (method url-fetch)
11276 (uri (pypi-uri "python-consul" version))
11277 (sha256
11278 (base32
11279 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11280 (build-system python-build-system)
11281 (arguments
11282 '(#:tests? #f)) ; The tests are not distributed
11283 (propagated-inputs
11284 `(("python-requests" ,python-requests)
11285 ("python-six" ,python-six)))
11286 (home-page "https://github.com/cablehead/python-consul")
11287 (synopsis "Python client for Consul")
11288 (description
11289 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11290 discovery, monitoring and configuration.")
11291 (license license:expat)))
11292
11293 (define-public python2-consul
11294 (package-with-python2 python-consul))
11295
11296 (define-public python-schematics
11297 (package
11298 (name "python-schematics")
11299 (version "1.1.1")
11300 (source
11301 (origin
11302 (method git-fetch)
11303 (uri (git-reference
11304 (url "https://github.com/schematics/schematics.git")
11305 (commit (string-append "v" version))))
11306 (file-name (git-file-name name version))
11307 (sha256
11308 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
11309 (build-system python-build-system)
11310 (propagated-inputs
11311 `(("python-six" ,python-six)))
11312 (arguments
11313 ;; The tests require a bunch of not very nice packages with fixed
11314 ;; version requirements (e.g. python-coveralls).
11315 `(#:tests? #f))
11316 (home-page "https://github.com/schematics/schematics")
11317 (synopsis "Python Data Structures for Humans")
11318 (description "Python Data Structures for Humans.")
11319 (license license:bsd-3)))
11320
11321 (define-public python2-schematics
11322 (package-with-python2 python-schematics))
11323
11324 (define-public python-odfpy
11325 (package
11326 (name "python-odfpy")
11327 (version "1.3.3")
11328 (source (origin
11329 (method url-fetch)
11330 (uri (pypi-uri "odfpy" version))
11331 (sha256
11332 (base32
11333 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11334 (arguments
11335 `(#:modules ((srfi srfi-1)
11336 (guix build python-build-system)
11337 (guix build utils))
11338 #:phases
11339 (modify-phases %standard-phases
11340 (replace 'check
11341 ;; The test runner invokes python2 and python3 for test*.py.
11342 ;; To avoid having both in inputs, we replicate it here.
11343 (lambda _
11344 (for-each (lambda (test-file) (invoke "python" test-file))
11345 (find-files "tests" "^test.*\\.py$"))
11346 #t)))))
11347 (build-system python-build-system)
11348 (home-page "https://github.com/eea/odfpy")
11349 (synopsis "Python API and tools to manipulate OpenDocument files")
11350 (description "Collection of libraries and utility programs written in
11351 Python to manipulate OpenDocument 1.2 files.")
11352 (license
11353 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11354 ;; number of files with other licenses.
11355 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11356
11357 (define-public python2-odfpy
11358 (package-with-python2 python-odfpy))
11359
11360 (define-public python-natsort
11361 (package
11362 (name "python-natsort")
11363 (version "5.4.1")
11364 (source (origin
11365 (method url-fetch)
11366 (uri (pypi-uri "natsort" version))
11367 (sha256
11368 (base32
11369 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
11370 (build-system python-build-system)
11371 (arguments
11372 `(#:modules ((guix build utils)
11373 (guix build python-build-system)
11374 (srfi srfi-1)
11375 (srfi srfi-26)
11376 (ice-9 ftw))
11377 #:phases
11378 (modify-phases %standard-phases
11379 (add-before 'check 'set-cachedir
11380 ;; Tests require write access to $HOME by default
11381 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
11382 (replace 'check
11383 (lambda _
11384 (let ((cwd (getcwd)))
11385 (setenv "PYTHONPATH"
11386 (string-append
11387 cwd "/build/"
11388 (find (cut string-prefix? "lib" <>)
11389 (scandir (string-append cwd "/build")))
11390 ":"
11391 (getenv "PYTHONPATH")))
11392 (invoke "pytest" "-v")))))))
11393 (native-inputs
11394 `(("python-hypothesis" ,python-hypothesis)
11395 ("python-pytest-cov" ,python-pytest-cov)
11396 ("python-pytest-mock" ,python-pytest-mock)
11397 ("python-pytest" ,python-pytest)))
11398 (propagated-inputs ; TODO: Add python-fastnumbers.
11399 `(("python-pyicu" ,python-pyicu)))
11400 (home-page "https://github.com/SethMMorton/natsort")
11401 (synopsis "Natural sorting for python and shell")
11402 (description
11403 "Natsort lets you apply natural sorting on lists instead of
11404 lexicographical. If you use the built-in @code{sorted} method in python
11405 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
11406 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
11407 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
11408 identifies numbers and sorts them separately from strings. It can also sort
11409 version numbers, real numbers, mixed types and more, and comes with a shell
11410 command @command{natsort} that exposes this functionality in the command line.")
11411 (license license:expat)
11412 (properties `((python2-variant . ,(delay python2-natsort))))))
11413
11414 (define-public python2-natsort
11415 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11416 (package (inherit base)
11417 (native-inputs
11418 `(("python2-pathlib" ,python2-pathlib)
11419 ,@(package-native-inputs base))))))
11420
11421 (define-public python-glances
11422 (package
11423 (name "python-glances")
11424 (version "3.1.2")
11425 (source
11426 (origin
11427 (method url-fetch)
11428 (uri (pypi-uri "Glances" version))
11429 (sha256
11430 (base32 "15384pbvw9wj4sb8zgvd9v1812vrypbyjg0acicjf1hdb3p30fkk"))
11431 (modules '((guix build utils)))
11432 (snippet
11433 '(begin
11434 ;; Glances phones PyPI for weekly update checks by default.
11435 ;; Disable these. The user can re-enable them if desired.
11436 (substitute* "glances/outdated.py"
11437 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
11438 (string-append indentation
11439 "self.args.disable_check_update = True\n"
11440 line)))
11441 #t))))
11442 (build-system python-build-system)
11443 (propagated-inputs
11444 `(("python-future" ,python-future)
11445 ("python-psutil" ,python-psutil)))
11446 (home-page "https://github.com/nicolargo/glances")
11447 (synopsis "Cross-platform curses-based monitoring tool")
11448 (description
11449 "Glances is a curses-based monitoring tool for a wide variety of platforms.
11450 Glances uses the PsUtil library to get information from your system. It
11451 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
11452 (license license:lgpl3+)))
11453
11454 (define-public python2-glances
11455 (package-with-python2 python-glances))
11456
11457 (define-public python-graphql-core
11458 (package
11459 (name "python-graphql-core")
11460 (version "0.5.3")
11461 (source
11462 (origin
11463 (method url-fetch)
11464 (uri (pypi-uri "graphql-core" version))
11465 (sha256
11466 (base32
11467 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11468 (build-system python-build-system)
11469 (arguments
11470 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11471 #:phases
11472 (modify-phases %standard-phases
11473 (add-after 'unpack 'patch-hardcoded-version
11474 (lambda _ (substitute*
11475 "setup.py"
11476 (("'gevent==1.1rc1'") "'gevent'"))
11477 #t)))))
11478 (native-inputs
11479 `(("python-gevent" ,python-gevent)
11480 ("python-mock" ,python-mock)
11481 ("python-pytest-mock" ,python-pytest-mock)))
11482 (propagated-inputs
11483 `(("python-promise" ,python-promise)
11484 ("python-six" ,python-six)))
11485 (home-page "https://github.com/graphql-python/graphql-core")
11486 (synopsis "GraphQL implementation for Python")
11487 (description
11488 "GraphQL implementation for Python. GraphQL is a data query language and
11489 runtime designed and used to request and deliver data to mobile and web apps.
11490 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11491 to Python.")
11492 (license license:expat)))
11493
11494 (define-public python2-graphql-core
11495 (package-with-python2 python-graphql-core))
11496
11497 (define-public python-graphql-relay
11498 (package
11499 (name "python-graphql-relay")
11500 (version "0.4.5")
11501 (source
11502 (origin
11503 (method url-fetch)
11504 (uri (pypi-uri "graphql-relay" version))
11505 (sha256
11506 (base32
11507 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
11508 (build-system python-build-system)
11509 (arguments
11510 '(#:tests? #f)) ; The tests are not distributed
11511 (propagated-inputs
11512 `(("python-graphql-core" ,python-graphql-core)
11513 ("python-promise" ,python-promise)
11514 ("python-six" ,python-six)))
11515 (home-page "https://github.com/graphql-python/graphql-relay-py")
11516 (synopsis "Relay implementation for Python")
11517 (description
11518 "This is a library to allow the easy creation of Relay-compliant servers
11519 using the GraphQL Python reference implementation of a GraphQL server. It
11520 should be noted that the code is a exact port of the original
11521 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11522 from Facebook.")
11523 (license license:expat)))
11524
11525 (define-public python2-graphql-relay
11526 (package-with-python2 python-graphql-relay))
11527
11528 (define-public python-graphene
11529 (package
11530 (name "python-graphene")
11531 (version "0.10.2")
11532 (source
11533 (origin
11534 (method url-fetch)
11535 (uri (pypi-uri "graphene" version))
11536 (sha256
11537 (base32
11538 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11539 (build-system python-build-system)
11540 (propagated-inputs
11541 `(("python-graphql-core" ,python-graphql-core)
11542 ("python-graphql-relay" ,python-graphql-relay)
11543 ("python-iso8601" ,python-iso8601)
11544 ("python-promise" ,python-promise)
11545 ("python-six" ,python-six)))
11546 (arguments
11547 `(#:tests? #f)) ; no tests/ in the PyPI tarball
11548 (home-page "http://graphene-python.org/")
11549 (synopsis "GraphQL Framework for Python")
11550 (description
11551 "Graphene is a Python library for building GraphQL schemas/types.
11552 A GraphQL schema describes your data model, and provides a GraphQL server
11553 with an associated set of resolve methods that know how to fetch data.")
11554 (properties `((python2-variant . ,(delay python2-graphene))))
11555 (license license:expat)))
11556
11557 (define-public python2-graphene
11558 (let ((base (package-with-python2
11559 (strip-python2-variant python-graphene))))
11560 (package (inherit base)
11561 (native-inputs
11562 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11563 ,@(package-native-inputs base))))))
11564
11565 (define-public python-nautilus
11566 (package
11567 (name "python-nautilus")
11568 (version "0.4.9")
11569 (source
11570 (origin
11571 (method url-fetch)
11572 (uri (pypi-uri "nautilus" version))
11573 (sha256
11574 (base32
11575 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11576 (build-system python-build-system)
11577 (arguments `(#:tests? #f)) ; fails to import test modules
11578 (propagated-inputs
11579 `(("python-bcrypt" ,python-bcrypt)
11580 ("python-click" ,python-click)
11581 ("python-consul" ,python-consul)
11582 ("python-graphene" ,python-graphene)
11583 ("python-jinja2" ,python-jinja2)
11584 ("python-peewee" ,python-peewee)
11585 ("python-pika" ,python-pika)
11586 ("python-tornado" ,python-tornado)
11587 ("python-wtforms" ,python-wtforms)))
11588 (native-inputs
11589 `(("python-nose2" ,python-nose2)))
11590 (home-page "https://github.com/AlecAivazis/nautilus")
11591 (synopsis "Library for creating microservice applications")
11592 (description
11593 "Nautilus is a framework for flux based microservices that looks to
11594 provide extendible implementations of common aspects of a cloud so that you can
11595 focus on building massively scalable web applications.")
11596 (license license:expat)))
11597
11598 (define-public python-snowballstemmer
11599 (package
11600 (name "python-snowballstemmer")
11601 (version "1.2.1")
11602 (source (origin
11603 (method url-fetch)
11604 (uri (pypi-uri "snowballstemmer" version))
11605 (sha256
11606 (base32
11607 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11608 (build-system python-build-system)
11609 (arguments
11610 `(;; No tests exist
11611 #:tests? #f))
11612 (home-page "https://github.com/shibukawa/snowball_py")
11613 (synopsis "Snowball stemming library collection for Python")
11614 (description "This package provides 16 word stemmer algorithms generated
11615 from Snowball algorithms. It includes the 15 original ones plus the Poerter
11616 English stemmer.")
11617 (license license:bsd-3)))
11618
11619 (define-public python2-snowballstemmer
11620 (package-with-python2 python-snowballstemmer))
11621
11622 (define-public python-setproctitle
11623 (package
11624 (name "python-setproctitle")
11625 (version "1.1.10")
11626 (source
11627 (origin
11628 (method url-fetch)
11629 (uri (pypi-uri "setproctitle" version))
11630 (sha256
11631 (base32
11632 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11633 (build-system python-build-system)
11634 (arguments
11635 '(#:phases
11636 (modify-phases %standard-phases
11637 (add-before 'check 'patch-Makefile
11638 ;; Stricly this is only required for the python2 variant.
11639 ;; But adding a phase in an inherited package seems to be
11640 ;; cumbersum. So we patch even for python3.
11641 (lambda _
11642 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11643 (when nose
11644 (substitute* "Makefile"
11645 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11646 (string-append nose "/bin/nosetests "))))
11647 #t)))
11648 (replace 'check
11649 (lambda _
11650 (setenv "PYTHON" (or (which "python3") (which "python")))
11651 (setenv "PYCONFIG" (or (which "python3-config")
11652 (which "python-config")))
11653 (setenv "CC" "gcc")
11654 ;; No need to extend PYTHONPATH to find the built package, since
11655 ;; the Makefile will build anyway
11656 (invoke "make" "check"))))))
11657 (native-inputs
11658 `(("procps" ,procps))) ; required for tests
11659 (home-page
11660 "https://github.com/dvarrazzo/py-setproctitle")
11661 (synopsis
11662 "Setproctitle implementation for Python to customize the process title")
11663 (description "The library allows a process to change its title (as displayed
11664 by system tools such as ps and top).
11665
11666 Changing the title is mostly useful in multi-process systems, for
11667 example when a master process is forked: changing the children's title
11668 allows to identify the task each process is busy with. The technique
11669 is used by PostgreSQL and the OpenSSH Server for example.")
11670 (license license:bsd-3)
11671 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11672
11673 (define-public python2-setproctitle
11674 (let ((base (package-with-python2
11675 (strip-python2-variant python-setproctitle))))
11676 (package
11677 (inherit base)
11678 (native-inputs `(("python2-nose" ,python2-nose)
11679 ,@(package-native-inputs base))))))
11680
11681 (define-public python-validictory
11682 (package
11683 (name "python-validictory")
11684 (version "1.0.1")
11685 (source
11686 (origin
11687 (method url-fetch)
11688 (uri (pypi-uri "validictory" version))
11689 (sha256
11690 (base32
11691 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11692 (build-system python-build-system)
11693 (arguments
11694 '(#:phases
11695 (modify-phases %standard-phases
11696 (add-after 'unpack 'bootstrap
11697 ;; Move the tests out of the package directory to avoid
11698 ;; packaging them.
11699 (lambda* _
11700 (rename-file "validictory/tests" "tests")
11701 (delete-file "tests/__init__.py")))
11702 (replace 'check
11703 (lambda _
11704 ;; Extend PYTHONPATH so the built package will be found.
11705 (setenv "PYTHONPATH"
11706 (string-append (getcwd) "/build/lib:"
11707 (getenv "PYTHONPATH")))
11708 (invoke "py.test" "-vv" ))))))
11709 (native-inputs
11710 `(("python-pytest" ,python-pytest)))
11711 (home-page
11712 "https://github.com/jamesturk/validictory")
11713 (synopsis "General purpose Python data validator")
11714 (description "It allows validation of arbitrary Python data structures.
11715
11716 The schema format is based on the JSON Schema
11717 proposal (http://json-schema.org), so combined with json the library is also
11718 useful as a validator for JSON data.")
11719 (license license:expat)))
11720
11721 (define-public python2-validictory
11722 (package-with-python2 python-validictory))
11723
11724 (define-public python-pyelftools
11725 (package
11726 (name "python-pyelftools")
11727 (version "0.25")
11728 (source
11729 (origin
11730 (method url-fetch)
11731 (uri (pypi-uri "pyelftools" version))
11732 (sha256
11733 (base32
11734 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11735 (build-system python-build-system)
11736 (arguments
11737 `(#:phases
11738 (modify-phases %standard-phases
11739 (add-before 'check 'set-pythonpath
11740 (lambda _
11741 (setenv "PYTHONPATH"
11742 (string-append
11743 (getcwd) "/test/"
11744 ":" (getenv "PYTHONPATH")))
11745 #t)))))
11746 (home-page
11747 "https://github.com/eliben/pyelftools")
11748 (synopsis
11749 "Analyze binary and library file information")
11750 (description "This Python library provides interfaces for parsing and
11751 analyzing two binary and library file formats; the Executable and Linking
11752 Format (ELF), and debugging information in the Debugging With Attributed
11753 Record Format (DWARF).")
11754 (license license:public-domain)))
11755
11756 (define-public python-pyev
11757 (package
11758 (name "python-pyev")
11759 (version "0.9.0")
11760 (source
11761 (origin
11762 (method url-fetch)
11763 (uri (pypi-uri "pyev" version))
11764 (sha256
11765 (base32
11766 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11767 (build-system python-build-system)
11768 (arguments
11769 `(#:tests? #f ; no test suite
11770 #:phases
11771 (modify-phases %standard-phases
11772 (add-after 'unpack 'patch
11773 (lambda* (#:key inputs #:allow-other-keys)
11774 (let ((libev (string-append (assoc-ref inputs "libev")
11775 "/lib/libev.so.4")))
11776 (substitute* "setup.py"
11777 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11778 (string-append "libev_dll_name = \"" libev "\"")))))))))
11779 (inputs
11780 `(("libev" ,libev)))
11781 (home-page "http://pythonhosted.org/pyev/")
11782 (synopsis "Python libev interface")
11783 (description "Pyev provides a Python interface to libev.")
11784 (license license:gpl3)))
11785
11786 (define-public python2-pyev
11787 (package-with-python2 python-pyev))
11788
11789 (define-public python-imagesize
11790 (package
11791 (name "python-imagesize")
11792 (version "1.1.0")
11793 (source
11794 (origin
11795 (method url-fetch)
11796 (uri (pypi-uri "imagesize" version))
11797 (sha256
11798 (base32
11799 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11800 (build-system python-build-system)
11801 (home-page "https://github.com/shibukawa/imagesize_py")
11802 (synopsis "Gets image size of files in various formats in Python")
11803 (description
11804 "This package allows determination of image size from
11805 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11806 (license license:expat)))
11807
11808 (define-public python2-imagesize
11809 (package-with-python2 python-imagesize))
11810
11811 (define-public python-termstyle
11812 (package
11813 (name "python-termstyle")
11814 (version "0.1.11")
11815 (source
11816 (origin
11817 (method url-fetch)
11818 (uri (pypi-uri "termstyle" version))
11819 (sha256
11820 (base32
11821 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11822 (build-system python-build-system)
11823 (arguments
11824 '(#:phases
11825 (modify-phases %standard-phases
11826 (replace 'check
11827 (lambda _
11828 (invoke "python" "test3.py"))))))
11829 (home-page "https://github.com/gfxmonk/termstyle")
11830 (synopsis "Console text coloring for Python")
11831 (description "This package provides console text coloring for Python.")
11832 (license license:bsd-3)))
11833
11834 (define-public python-argcomplete
11835 (package
11836 (name "python-argcomplete")
11837 (version "1.10.3")
11838 (source
11839 (origin
11840 (method url-fetch)
11841 (uri (pypi-uri "argcomplete" version))
11842 (sha256
11843 (base32
11844 "02jkc44drb0yjz6x28lvg6rj607n8r2irdpdvyylm8xnycn54zx3"))))
11845 (build-system python-build-system)
11846 (arguments
11847 `(#:phases
11848 (modify-phases %standard-phases
11849 (add-after 'unpack 'embed-tool-references
11850 (lambda _
11851 (substitute* "argcomplete/bash_completion.d/python-argcomplete.sh"
11852 ((" grep")
11853 (string-append " " (which "grep")))
11854 ((" egrep")
11855 (string-append " " (which "egrep")))
11856 (("elif which")
11857 (string-append "elif " (which "which")))
11858 (("\\$\\(which")
11859 (string-append "$(" (which "which"))))
11860 #t)))))
11861 (inputs
11862 `(("grep" ,grep)
11863 ("which" ,which)))
11864 (native-inputs
11865 `(("python-coverage" ,python-coverage)
11866 ("python-flake8" ,python-flake8)
11867 ("python-pexpect" ,python-pexpect)
11868 ("python-wheel" ,python-wheel)
11869 ("tcsh" ,tcsh)
11870 ("fish" ,fish)
11871 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
11872 (home-page "https://github.com/kislyuk/argcomplete")
11873 (synopsis "Shell tab completion for Python argparse")
11874 (description "argcomplete provides extensible command line tab completion
11875 of arguments and options for Python scripts using @code{argparse}. It's
11876 particularly useful for programs with many options or sub-parsers that can
11877 dynamically suggest completions; for example, when browsing resources over the
11878 network.")
11879 (license license:asl2.0)))
11880
11881 (define-public python2-argcomplete
11882 (package-with-python2 python-argcomplete))
11883
11884 (define-public python-xopen
11885 (package
11886 (name "python-xopen")
11887 (version "0.5.0")
11888 (source
11889 (origin
11890 (method url-fetch)
11891 (uri (pypi-uri "xopen" version))
11892 (sha256
11893 (base32
11894 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
11895 (build-system python-build-system)
11896 (propagated-inputs
11897 `(("python-setuptools-scm" ,python-setuptools-scm)))
11898 (home-page "https://github.com/marcelm/xopen/")
11899 (synopsis "Open compressed files transparently")
11900 (description "This module provides an @code{xopen} function that works like
11901 Python's built-in @code{open} function, but can also deal with compressed files.
11902 Supported compression formats are gzip, bzip2 and, xz, and are automatically
11903 recognized by their file extensions. The focus is on being as efficient as
11904 possible on all supported Python versions.")
11905 (license license:expat)))
11906
11907 (define-public python2-xopen
11908 (let ((base (package-with-python2
11909 (strip-python2-variant python-xopen))))
11910 (package
11911 (inherit base)
11912 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
11913 ,@(package-propagated-inputs base))))))
11914
11915 (define-public python-cheetah
11916 (package
11917 (name "python-cheetah")
11918 (version "3.1.0")
11919 (source
11920 (origin
11921 (method url-fetch)
11922 (uri (pypi-uri "Cheetah3" version))
11923 (sha256
11924 (base32
11925 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
11926 (build-system python-build-system)
11927 (arguments
11928 `(#:modules ((guix build utils)
11929 (guix build python-build-system)
11930 (ice-9 ftw)
11931 (srfi srfi-1)
11932 (srfi srfi-26))
11933 #:phases (modify-phases %standard-phases
11934 (add-after 'unpack 'use-absolute-python
11935 (lambda _
11936 (substitute* "Cheetah/CheetahWrapper.py"
11937 (("#!/usr/bin/env python")
11938 (string-append "#!" (which "python"))))
11939 #t))
11940 (replace 'check
11941 (lambda _
11942 (let ((cwd (getcwd)))
11943 (setenv "PYTHONPATH"
11944 (string-append
11945 cwd "/build/"
11946 (find (cut string-prefix? "lib" <>)
11947 (scandir (string-append cwd "/build")))
11948 ":" (getenv "PYTHONPATH")))
11949 (setenv "PATH"
11950 (string-append (getenv "PATH")
11951 ":" cwd "/bin"))
11952 (setenv "TMPDIR" "/tmp")
11953
11954 (substitute* "Cheetah/Tests/Test.py"
11955 (("unittest.TextTestRunner\\(\\)")
11956 "unittest.TextTestRunner(verbosity=2)"))
11957
11958 (invoke "python" "Cheetah/Tests/Test.py")))))))
11959 (propagated-inputs
11960 `(("python-markdown" ,python-markdown))) ;optional
11961 (home-page "http://cheetahtemplate.org/")
11962 (synopsis "Template engine")
11963 (description "Cheetah is a text-based template engine and Python code
11964 generator.
11965
11966 Cheetah can be used as a standalone templating utility or referenced as
11967 a library from other Python applications. It has many potential uses,
11968 but web developers looking for a viable alternative to ASP, JSP, PHP and
11969 PSP are expected to be its principle user group.
11970
11971 Features:
11972 @enumerate
11973 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
11974 text-based format.
11975 @item Cleanly separates content, graphic design, and program code.
11976 @item Blends the power and flexibility of Python with a simple template language
11977 that non-programmers can understand.
11978 @item Gives template writers full access to any Python data structure, module,
11979 function, object, or method in their templates.
11980 @item Makes code reuse easy by providing an object-orientated interface to
11981 templates that is accessible from Python code or other Cheetah templates.
11982 One template can subclass another and selectively reimplement sections of it.
11983 @item Provides a simple, yet powerful, caching mechanism that can dramatically
11984 improve the performance of a dynamic website.
11985 @item Compiles templates into optimized, yet readable, Python code.
11986 @end enumerate")
11987 (license (license:x11-style "file://LICENSE"))))
11988
11989 (define-public python2-cheetah
11990 (package-with-python2 python-cheetah))
11991
11992 (define-public python-dulwich
11993 (package
11994 (name "python-dulwich")
11995 (version "0.18.6")
11996 (source
11997 (origin
11998 (method url-fetch)
11999 (uri (list (string-append "https://www.dulwich.io/releases/"
12000 "dulwich-" version ".tar.gz")
12001 (pypi-uri "dulwich" version)))
12002 (sha256
12003 (base32
12004 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
12005 (build-system python-build-system)
12006 (arguments
12007 `(#:phases
12008 (modify-phases %standard-phases
12009 (add-before 'check 'fix-tests
12010 (lambda* (#:key inputs #:allow-other-keys)
12011 ;; The tests use Popen with a custom environment which doesn't
12012 ;; include PATH.
12013 (substitute* "dulwich/tests/compat/utils.py"
12014 (("'git'") (string-append "'"
12015 (which "git")
12016 "'")))
12017 (substitute* '("dulwich/tests/test_repository.py"
12018 "dulwich/tests/test_hooks.py")
12019 (("#!/bin/sh") (string-append "#!" (which "sh"))))
12020 (setenv "TEST_RUNNER" "unittest")
12021 (setenv "PYTHONHASHSEED" "random")
12022 #t)))))
12023 (propagated-inputs
12024 `(("python-fastimport" ,python-fastimport)))
12025 (native-inputs
12026 `(("python-mock" ,python-mock)
12027 ("python-geventhttpclient" ,python-geventhttpclient)
12028 ("git" ,git)))
12029 (home-page "https://www.dulwich.io/")
12030 (synopsis "Git implementation in Python")
12031 (description "Dulwich is an implementation of the Git file formats and
12032 protocols written in pure Python.")
12033 ;; Can be used with either license.
12034 (license (list license:asl2.0 license:gpl2+))))
12035
12036 (define-public python2-dulwich
12037 (package-with-python2 python-dulwich))
12038
12039 (define-public python-pbkdf2
12040 (package
12041 (name "python-pbkdf2")
12042 (version "1.3")
12043 (source
12044 (origin
12045 (method url-fetch)
12046 (uri (pypi-uri "pbkdf2" version))
12047 (sha256
12048 (base32
12049 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
12050 (build-system python-build-system)
12051 (arguments
12052 '(#:phases
12053 (modify-phases %standard-phases
12054 (replace 'check
12055 (lambda _
12056 (setenv "PYTHONPATH"
12057 (string-append (getcwd) "/build/lib:"
12058 (getenv "PYTHONPATH")))
12059 (invoke "python" "test/test_pbkdf2.py"))))))
12060 (propagated-inputs
12061 `(("python-pycrypto" ,python-pycrypto))) ; optional
12062 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
12063 (synopsis "Password-based key derivation")
12064 (description "This module implements the password-based key derivation
12065 function, PBKDF2, specified in RSA PKCS#5 v2.0.
12066
12067 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
12068 is part of the RSA Public Key Cryptography Standards series. The provided
12069 implementation takes a password or a passphrase and a salt value (and
12070 optionally a iteration count, a digest module, and a MAC module) and provides
12071 a file-like object from which an arbitrarly-sized key can be read.")
12072 (license license:expat)))
12073
12074 (define-public python2-pbkdf2
12075 (package-with-python2 python-pbkdf2))
12076
12077 (define-public python-qrcode
12078 (package
12079 (name "python-qrcode")
12080 (version "6.1")
12081 (source
12082 (origin
12083 (method url-fetch)
12084 (uri (pypi-uri "qrcode" version))
12085 (sha256
12086 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
12087 (build-system python-build-system)
12088 (arguments
12089 ;; FIXME: Tests require packaging 'pymaging'.
12090 '(#:tests? #f))
12091 (propagated-inputs
12092 `(("python-lxml" ,python-lxml) ; for SVG output
12093 ("python-pillow" ,python-pillow) ; for PNG output
12094 ("python-six" ,python-six)))
12095 (home-page "https://github.com/lincolnloop/python-qrcode")
12096 (synopsis "QR Code image generator")
12097 (description "This package provides a pure Python QR Code generator
12098 module. It uses the Python Imaging Library (PIL) to allow for the generation
12099 of QR Codes.
12100
12101 In addition this package provides a command line tool to generate QR codes and
12102 either write these QR codes to a file or do the output as ascii art at the
12103 console.")
12104 (license license:bsd-3)))
12105
12106 (define-public python2-qrcode
12107 (package-with-python2 python-qrcode))
12108
12109 (define-public python-rst2ansi
12110 (package
12111 (name "python-rst2ansi")
12112 (version "0.1.5")
12113 (source
12114 (origin
12115 (method url-fetch)
12116 (uri (pypi-uri "rst2ansi" version))
12117 (sha256
12118 (base32
12119 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
12120 (build-system python-build-system)
12121 (propagated-inputs
12122 `(("python-docutils" ,python-docutils)))
12123 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
12124 (synopsis "Convert RST to ANSI-decorated console output")
12125 (description
12126 "Python module dedicated to rendering RST (reStructuredText) documents
12127 to ansi-escaped strings suitable for display in a terminal.")
12128 (license license:expat)))
12129
12130 (define-public python-ansi2html
12131 (package
12132 (name "python-ansi2html")
12133 (version "1.2.0")
12134 (source
12135 (origin
12136 (method url-fetch)
12137 (uri (pypi-uri "ansi2html" version))
12138 (sha256
12139 (base32
12140 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
12141 (build-system python-build-system)
12142 (native-inputs
12143 `(("python-mock" ,python-mock)
12144 ("python-nose" ,python-nose)))
12145 (propagated-inputs
12146 `(("python-six" ,python-six)))
12147 (home-page "https://github.com/ralphbean/ansi2html")
12148 (synopsis "Convert ANSI-decorated console output to HTML")
12149 (description
12150 "@command{ansi2html} is a Python library and command line utility for
12151 convering text with ANSI color codes to HTML or LaTeX.")
12152 (license license:gpl3+)))
12153
12154 (define-public python2-ansi2html
12155 (package-with-python2 python-ansi2html))
12156
12157 (define-public python-ddt
12158 (package
12159 (name "python-ddt")
12160 (version "1.1.3")
12161 (source
12162 (origin
12163 (method url-fetch)
12164 (uri (pypi-uri "ddt" version))
12165 (sha256
12166 (base32
12167 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
12168 (build-system python-build-system)
12169 (native-inputs
12170 `(("python-mock" ,python-mock)
12171 ("python-nose" ,python-nose)))
12172 (propagated-inputs
12173 `(("python-six" ,python-six)
12174 ("python-pyyaml" ,python-pyyaml)))
12175 (home-page "https://github.com/txels/ddt")
12176 (synopsis "Data-Driven Tests")
12177 (description
12178 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
12179 running it with different test data, and make it appear as multiple test
12180 cases.")
12181 (license license:expat)))
12182
12183 (define-public python2-ddt
12184 (package-with-python2 python-ddt))
12185
12186 (define-public python-pycountry
12187 (package
12188 (name "python-pycountry")
12189 (version "18.5.26")
12190 (source
12191 (origin
12192 (method url-fetch)
12193 (uri (pypi-uri "pycountry" version))
12194 (sha256
12195 (base32
12196 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
12197 (build-system python-build-system)
12198 (home-page "https://bitbucket.org/flyingcircus/pycountry")
12199 (synopsis "ISO databases for languages, countries, currencies, etc.")
12200 (description
12201 "@code{pycountry} provides the ISO databases for the standards:
12202 @enumerate
12203 @item 639-3 (Languages)
12204 @item 3166 (Countries)
12205 @item 3166-3 (Deleted Countries)
12206 @item 3166-2 (Subdivisions of countries)
12207 @item 4217 (Currencies)
12208 @item 15924 (Scripts)
12209 @end enumerate
12210 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
12211 through a Python API.")
12212 (license license:lgpl2.1+)))
12213
12214 (define-public python2-pycountry
12215 (package-with-python2 python-pycountry))
12216
12217 (define-public python-pycosat
12218 (package
12219 (name "python-pycosat")
12220 (version "0.6.1")
12221 (source
12222 (origin
12223 (method url-fetch)
12224 (uri (pypi-uri "pycosat" version))
12225 (sha256
12226 (base32
12227 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
12228 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
12229 (build-system python-build-system)
12230 (home-page "https://github.com/ContinuumIO/pycosat")
12231 (synopsis "Bindings to picosat (a SAT solver)")
12232 (description
12233 "This package provides efficient Python bindings to @code{picosat} on
12234 the C level. When importing pycosat, the @code{picosat} solver becomes part
12235 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
12236 Problem} (SAT) solver.")
12237 (license license:expat)))
12238
12239 (define-public python2-pycosat
12240 (package-with-python2 python-pycosat))
12241
12242 (define-public python2-ruamel.ordereddict
12243 (package
12244 (name "python2-ruamel.ordereddict")
12245 (version "0.4.9")
12246 (source
12247 (origin
12248 (method url-fetch)
12249 (uri (pypi-uri "ruamel.ordereddict" version))
12250 (sha256
12251 (base32
12252 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
12253 (build-system python-build-system)
12254 (arguments
12255 `(#:python ,python-2
12256 #:phases
12257 (modify-phases %standard-phases
12258 (delete 'check)
12259 (add-after 'install 'check
12260 (lambda* (#:key inputs outputs #:allow-other-keys)
12261 (add-installed-pythonpath inputs outputs)
12262 (invoke "python" "test/testordereddict.py"))))))
12263 (home-page "https://bitbucket.org/ruamel/ordereddict")
12264 (synopsis "Version of dict that keeps keys in insertion order")
12265 (description
12266 "This is an implementation of an ordered dictionary with @dfn{Key
12267 Insertion Order} (KIO: updates of values do not affect the position of the
12268 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
12269 removed and put at the back). The standard library module @code{OrderedDict},
12270 implemented later, implements a subset of @code{ordereddict} functionality.
12271 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
12272 Order} (KSO, no sorting function can be specified, but a transform can be
12273 specified to apply on the key before comparison (e.g. @code{string.lower})).")
12274 (license license:expat)))
12275
12276 (define-public python-pypeg2
12277 (package
12278 (name "python-pypeg2")
12279 (version "2.15.2")
12280 (source
12281 (origin
12282 (method url-fetch)
12283 (uri (pypi-uri "pyPEG2" version))
12284 (sha256
12285 (base32
12286 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
12287 (build-system python-build-system)
12288 (propagated-inputs `(("python-lxml" ,python-lxml)))
12289 (arguments
12290 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
12291 '(#:tests? #f))
12292 (home-page "https://fdik.org/pyPEG/")
12293 (synopsis "Parsering Expression Grammars in Python")
12294 (description "PyPEG is an intrinsic parser interpreter framework for
12295 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
12296 parse many formal languages.")
12297 (license license:gpl2)))
12298
12299 (define-public python-incremental
12300 (package
12301 (name "python-incremental")
12302 (version "17.5.0")
12303 (source
12304 (origin
12305 (method url-fetch)
12306 (uri (pypi-uri "incremental" version))
12307 (sha256
12308 (base32
12309 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
12310 (build-system python-build-system)
12311 (home-page "https://github.com/hawkowl/incremental")
12312 (synopsis "Library for versioning Python projects")
12313 (description "Incremental is a small library that versions your Python
12314 projects.")
12315 (license license:expat)))
12316
12317 (define-public python2-incremental
12318 (package-with-python2 python-incremental))
12319
12320 (define-public python-invoke
12321 (package
12322 (name "python-invoke")
12323 (home-page "http://www.pyinvoke.org/")
12324 (version "1.3.0")
12325 (source (origin
12326 (method url-fetch)
12327 (uri (pypi-uri "invoke" version))
12328 (sha256
12329 (base32
12330 "1nn7gad0rvy492acpyhkrp01zsk86acf34qhsvq4xmm6x39788n5"))))
12331 (build-system python-build-system)
12332 (arguments
12333 ;; XXX: Requires many dependencies that are not yet in Guix.
12334 `(#:tests? #f))
12335 (synopsis "Pythonic task execution")
12336 (description
12337 "Invoke is a Python task execution tool and library, drawing inspiration
12338 from various sources to arrive at a powerful and clean feature set. It is
12339 evolved from the Fabric project, but focuses on local and abstract concerns
12340 instead of servers and network commands.")
12341 (license license:bsd-3)))
12342
12343 (define-public python2-invoke
12344 (package-with-python2 python-invoke))
12345
12346 (define-public python-automat
12347 (package
12348 (name "python-automat")
12349 (version "0.7.0")
12350 (source (origin
12351 (method url-fetch)
12352 (uri (pypi-uri "Automat" version))
12353 (sha256
12354 (base32
12355 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
12356 (build-system python-build-system)
12357 ;; We disable the tests because they require python-twisted, while
12358 ;; python-twisted depends on python-automat. Twisted is optional, but the
12359 ;; tests fail if it is not available. Also see
12360 ;; <https://github.com/glyph/automat/issues/71>.
12361 (arguments '(#:tests? #f))
12362 (native-inputs
12363 `(("python-m2r" ,python-m2r)
12364 ("python-setuptools-scm" ,python-setuptools-scm)
12365 ("python-graphviz" ,python-graphviz)))
12366 (propagated-inputs
12367 `(("python-six" ,python-six)
12368 ("python-attrs" ,python-attrs)))
12369 (home-page "https://github.com/glyph/Automat")
12370 (synopsis "Self-service finite-state machines")
12371 (description "Automat is a library for concise, idiomatic Python
12372 expression of finite-state automata (particularly deterministic finite-state
12373 transducers).")
12374 (license license:expat)))
12375
12376 (define-public python2-automat
12377 (package-with-python2 python-automat))
12378
12379 (define-public python-m2r
12380 (package
12381 (name "python-m2r")
12382 (version "0.2.1")
12383 (source (origin
12384 (method url-fetch)
12385 (uri (pypi-uri "m2r" version))
12386 (sha256
12387 (base32
12388 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
12389 (build-system python-build-system)
12390 (propagated-inputs
12391 `(("python-docutils" ,python-docutils)
12392 ("python-mistune" ,python-mistune)))
12393 (native-inputs
12394 `(("python-pygments" ,python-pygments)
12395 ("python-mock" ,python-mock)))
12396 (home-page "https://github.com/miyakogi/m2r")
12397 (synopsis "Markdown to reStructuredText converter")
12398 (description "M2R converts a markdown file including reST markups to valid
12399 reST format.")
12400 (license license:expat)))
12401
12402 (define-public python2-m2r
12403 (package-with-python2 python-m2r))
12404
12405 (define-public python-constantly
12406 (package
12407 (name "python-constantly")
12408 (version "15.1.0")
12409 (source (origin
12410 (method url-fetch)
12411 (uri (pypi-uri "constantly" version))
12412 (sha256
12413 (base32
12414 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
12415 (build-system python-build-system)
12416 (home-page "https://github.com/twisted/constantly")
12417 (synopsis "Symbolic constants in Python")
12418 (description "Constantly is a Python library that provides symbolic
12419 constant support. It includes collections and constants with text, numeric,
12420 and bit flag values.")
12421 (license license:expat)))
12422
12423 (define-public python2-constantly
12424 (package-with-python2 python-constantly))
12425
12426 (define-public python-attrs
12427 (package
12428 (name "python-attrs")
12429 (version "19.1.0")
12430 (source (origin
12431 (method url-fetch)
12432 (uri (pypi-uri "attrs" version))
12433 (sha256
12434 (base32
12435 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
12436 (build-system python-build-system)
12437 (arguments
12438 `(#:modules ((guix build utils)
12439 (guix build python-build-system)
12440 (ice-9 ftw)
12441 (srfi srfi-1)
12442 (srfi srfi-26))
12443 #:phases (modify-phases %standard-phases
12444 (replace 'check
12445 (lambda _
12446 (let ((cwd (getcwd)))
12447 (setenv "PYTHONPATH"
12448 (string-append
12449 cwd "/build/"
12450 (find (cut string-prefix? "lib" <>)
12451 (scandir (string-append cwd "/build")))
12452 ":"
12453 (getenv "PYTHONPATH")))
12454 (invoke "python" "-m" "pytest")))))))
12455 (native-inputs
12456 `(("python-coverage" ,python-coverage)
12457 ("python-hypothesis" ,python-hypothesis)
12458 ("python-pympler" ,python-pympler)
12459 ("python-pytest" ,python-pytest)
12460 ("python-six" ,python-six)
12461 ("python-sphinx" ,python-sphinx)
12462 ("python-zope-interface" ,python-zope-interface)))
12463 (home-page "https://github.com/python-attrs/attrs/")
12464 (synopsis "Attributes without boilerplate")
12465 (description "@code{attrs} is a Python package with class decorators that
12466 ease the chores of implementing the most common attribute-related object
12467 protocols.")
12468 (license license:expat)))
12469
12470 (define-public python2-attrs
12471 (package-with-python2 python-attrs))
12472
12473 (define-public python-attrs-bootstrap
12474 (package
12475 (inherit python-attrs)
12476 (name "python-attrs-bootstrap")
12477 (native-inputs `())
12478 (arguments `(#:tests? #f))))
12479
12480 (define-public python2-attrs-bootstrap
12481 (package-with-python2 python-attrs-bootstrap))
12482
12483 (define-public python2-cliapp
12484 (package
12485 (name "python2-cliapp")
12486 (version "1.20180812.1")
12487 (source
12488 (origin
12489 (method url-fetch)
12490 (uri (string-append
12491 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
12492 version ".tar.gz"))
12493 (sha256
12494 (base32
12495 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
12496 (build-system python-build-system)
12497 (arguments
12498 `(#:python ,python-2
12499 #:phases
12500 (modify-phases %standard-phases
12501 ;; check phase needs to be run before the build phase. If not,
12502 ;; coverage-test-runner looks for tests for the built source files,
12503 ;; and fails.
12504 (delete 'check)
12505 (add-before 'build 'check
12506 (lambda _
12507 ;; Disable python3 tests
12508 (substitute* "check"
12509 (("python3") "# python3"))
12510 (invoke "./check"))))))
12511 (native-inputs
12512 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12513 ("python2-pep8" ,python2-pep8)))
12514 (propagated-inputs
12515 `(("python2-pyaml" ,python2-pyaml)))
12516 (home-page "https://liw.fi/cliapp/")
12517 (synopsis "Python framework for command line programs")
12518 (description "@code{python2-cliapp} is a python framework for
12519 command line programs. It contains the typical stuff such programs
12520 need to do, such as parsing the command line for options, and
12521 iterating over input files.")
12522 (license license:gpl2+)))
12523
12524 (define-public python2-ttystatus
12525 (package
12526 (name "python2-ttystatus")
12527 (version "0.36")
12528 (source
12529 (origin
12530 (method url-fetch)
12531 (uri (string-append
12532 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
12533 version ".tar.gz"))
12534 (sha256
12535 (base32
12536 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
12537 (build-system python-build-system)
12538 (native-inputs
12539 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12540 ("python2-pep8" ,python2-pep8)))
12541 (arguments
12542 `(#:python ,python-2
12543 #:phases
12544 (modify-phases %standard-phases
12545 ;; check phase needs to be run before the build phase. If not,
12546 ;; coverage-test-runner looks for tests for the built source files,
12547 ;; and fails.
12548 (delete 'check)
12549 (add-before 'build 'check
12550 (lambda _ (invoke "make" "check"))))))
12551 (home-page "https://liw.fi/ttystatus/")
12552 (synopsis "Python library for showing progress reporting and
12553 status updates on terminals")
12554 (description "@code{python2-ttystatus} is a python library for
12555 showing progress reporting and status updates on terminals, for
12556 command line programs. Output is automatically adapted to the width
12557 of the terminal: truncated if it does not fit, and resized if the
12558 terminal size changes.")
12559 (license license:gpl3+)))
12560
12561 (define-public python2-tracing
12562 (package
12563 (name "python2-tracing")
12564 (version "0.10")
12565 (source
12566 (origin
12567 (method url-fetch)
12568 (uri (string-append
12569 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
12570 version ".tar.gz"))
12571 (sha256
12572 (base32
12573 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
12574 (build-system python-build-system)
12575 (arguments
12576 `(#:python ,python-2))
12577 (home-page "https://liw.fi/tracing/")
12578 (synopsis "Python debug logging helper")
12579 (description "@code{python2-tracing} is a python library for
12580 logging debug messages. It provides a way to turn debugging messages
12581 on and off, based on the filename they occur in. It is much faster
12582 than using @code{logging.Filter} to accomplish the same thing, which
12583 matters when code is run in production mode. The actual logging still
12584 happens using the @code{logging} library.")
12585 (license license:gpl3+)))
12586
12587 (define-public python2-larch
12588 (package
12589 (name "python2-larch")
12590 (version "1.20151025")
12591 (source
12592 (origin
12593 (method url-fetch)
12594 (uri (string-append
12595 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12596 version ".tar.gz"))
12597 (patches (search-patches
12598 "python2-larch-coverage-4.0a6-compatibility.patch"))
12599 (sha256
12600 (base32
12601 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12602 (build-system python-build-system)
12603 (arguments
12604 `(#:python ,python-2
12605 #:phases
12606 (modify-phases %standard-phases
12607 ;; check phase needs to be run before the build phase. If not,
12608 ;; coverage-test-runner looks for tests for the built source files,
12609 ;; and fails.
12610 (delete 'check)
12611 (add-before 'build 'check
12612 (lambda _ (invoke "make" "check"))))))
12613 (native-inputs
12614 `(("cmdtest" ,cmdtest)
12615 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12616 (propagated-inputs
12617 `(("python2-tracing" ,python2-tracing)))
12618 (home-page "https://liw.fi/larch/")
12619 (synopsis "Python copy-on-write B-tree library")
12620 (description "@code{python2-larch} is an implementation of
12621 particular kind of B-tree, based on research by Ohad Rodeh. See
12622 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12623 on the data structure.
12624
12625 The distinctive feature of this B-tree is that a node is never
12626 (conceptually) modified. Instead, all updates are done by
12627 copy-on-write. This makes it easy to clone a tree, and modify only the
12628 clone, while other processes access the original tree.")
12629 (license license:gpl3+)))
12630
12631 (define-public python-astroid
12632 (package
12633 (name "python-astroid")
12634 (version "2.3.3")
12635 (source
12636 (origin
12637 (method url-fetch)
12638 (uri (pypi-uri "astroid" version))
12639 (sha256
12640 (base32 "0fnibsl2cb5mvzbfm7sycj85smx48f8w8m7ks1sqlmpr9ps0gski"))))
12641 (build-system python-build-system)
12642 (propagated-inputs
12643 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12644 ("python-six" ,python-six)
12645 ("python-typed-ast" ,python-typed-ast)
12646 ("python-wrapt" ,python-wrapt)))
12647 (native-inputs
12648 `(("python-dateutil" ,python-dateutil)
12649 ("python-nose" ,python-nose)
12650 ("python-pytest" ,python-pytest)
12651 ("python-pytest-runner" ,python-pytest-runner)))
12652 (arguments
12653 `(#:phases
12654 (modify-phases %standard-phases
12655 (add-after 'unpack 'remove-spurious-test
12656 (lambda _
12657 ;; This can be removed after upgrading from python-3.7
12658 ;; https://github.com/PyCQA/astroid/issues/593
12659 ;; https://bugs.python.org/issue34056
12660 (delete-file "astroid/tests/unittest_modutils.py")
12661 #t))
12662 (replace 'check
12663 (lambda _
12664 (invoke "pytest" "astroid"))))))
12665 (home-page "https://github.com/PyCQA/astroid")
12666 (synopsis "Common base representation of python source code for pylint and
12667 other projects")
12668 (description "@code{python-astroid} provides a common base representation
12669 of python source code for projects such as pychecker, pyreverse, pylint, etc.
12670
12671 It provides a compatible representation which comes from the _ast module. It
12672 rebuilds the tree generated by the builtin _ast module by recursively walking
12673 down the AST and building an extended ast. The new node classes have
12674 additional methods and attributes for different usages. They include some
12675 support for static inference and local name scopes. Furthermore, astroid
12676 builds partial trees by inspecting living objects.")
12677 (license license:lgpl2.1+)
12678 (properties `((python2-variant . ,(delay python2-astroid))))))
12679
12680 (define-public python2-astroid
12681 (let ((base (package-with-python2
12682 (strip-python2-variant python-astroid))))
12683 (package (inherit base)
12684 ;; Version 2.x removes python2 support.
12685 (version "1.6.5")
12686 (source
12687 (origin
12688 (method url-fetch)
12689 (uri (pypi-uri "astroid" version))
12690 (sha256
12691 (base32
12692 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12693 (arguments
12694 (substitute-keyword-arguments (package-arguments base)
12695 ((#:phases phases)
12696 `(modify-phases ,phases
12697 (add-after 'unpack 'remove-spurious-test
12698 (lambda _
12699 ;; https://github.com/PyCQA/astroid/issues/276
12700 (delete-file "astroid/tests/unittest_brain.py")
12701 #t))
12702 (replace 'check
12703 (lambda _
12704 (invoke"python" "-m" "unittest" "discover"
12705 "-p" "unittest*.py")))))))
12706 (native-inputs `())
12707 (propagated-inputs
12708 `(("python2-backports-functools-lru-cache"
12709 ,python2-backports-functools-lru-cache)
12710 ("python2-enum34" ,python2-enum34)
12711 ("python2-singledispatch" ,python2-singledispatch)
12712 ,@(alist-delete "python-typed-ast"
12713 (package-propagated-inputs base)))))))
12714
12715 (define-public python-isort
12716 (package
12717 (name "python-isort")
12718 (version "4.3.4")
12719 (source
12720 (origin
12721 (method git-fetch)
12722 (uri (git-reference
12723 ;; Tests pass only from the Github sources
12724 (url "https://github.com/timothycrosley/isort")
12725 (commit version)))
12726 (file-name (git-file-name name version))
12727 (sha256
12728 (base32
12729 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
12730 (build-system python-build-system)
12731 (native-inputs
12732 `(("python-mock" ,python-mock)
12733 ("python-pytest" ,python-pytest)))
12734 (home-page "https://github.com/timothycrosley/isort")
12735 (synopsis "Python utility/library to sort python imports")
12736 (description "@code{python-isort} is a python utility/library to sort
12737 imports alphabetically, and automatically separated into sections. It
12738 provides a command line utility, a python library and plugins for various
12739 editors.")
12740 (license license:expat)
12741 (properties `((python2-variant . ,(delay python2-isort))))))
12742
12743 (define-public python2-isort
12744 (let ((base (package-with-python2
12745 (strip-python2-variant python-isort))))
12746 (package (inherit base)
12747 (native-inputs
12748 `(("python2-futures" ,python2-futures)
12749 ,@(package-native-inputs base))))))
12750
12751 (define-public python2-backports-functools-lru-cache
12752 (package
12753 (name "python2-backports-functools-lru-cache")
12754 (version "1.5")
12755 (source
12756 (origin
12757 (method url-fetch)
12758 ;; only the pypi tarballs contain the necessary metadata
12759 (uri (pypi-uri "backports.functools_lru_cache" version))
12760 (sha256
12761 (base32
12762 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12763 (build-system python-build-system)
12764 (native-inputs
12765 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12766 (arguments
12767 `(#:python ,python-2))
12768 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12769 (synopsis "Backport of functools.lru_cache from Python 3.3")
12770 (description "@code{python2-backports-functools-lru-cache} is a backport
12771 of @code{functools.lru_cache} from python 3.3.")
12772 (license license:expat)))
12773
12774 (define-public python-configparser
12775 (package
12776 (name "python-configparser")
12777 (version "3.7.1")
12778 (source
12779 (origin
12780 (method url-fetch)
12781 (uri (pypi-uri "configparser" version))
12782 (sha256
12783 (base32
12784 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
12785 (build-system python-build-system)
12786 (home-page "https://github.com/jaraco/configparser/")
12787 (synopsis "Backport of configparser from python 3.5")
12788 (description "@code{python-configparser} is a backport of
12789 @code{configparser} from Python 3.5 so that it can be used directly
12790 in other versions.")
12791 (license license:expat)))
12792
12793 (define-public python2-configparser
12794 (package-with-python2 python-configparser))
12795
12796 (define-public python-mando
12797 (package
12798 (name "python-mando")
12799 (version "0.6.4")
12800 (source (origin
12801 (method url-fetch)
12802 (uri (pypi-uri "mando" version))
12803 (sha256
12804 (base32
12805 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12806 (build-system python-build-system)
12807 (propagated-inputs
12808 `(("python-rst2ansi" ,python-rst2ansi)
12809 ("python-six" ,python-six)))
12810 (native-inputs
12811 `(("python-pytest" ,python-pytest)))
12812 (home-page "https://mando.readthedocs.org/")
12813 (synopsis
12814 "Wrapper around argparse, allowing creation of complete CLI applications")
12815 (description
12816 "This package is a wrapper around argparse, allowing you to write complete CLI
12817 applications in seconds while maintaining all the flexibility.")
12818 (license license:expat)))
12819
12820 (define-public python2-mando
12821 (package-with-python2 python-mando))
12822
12823 (define-public python2-argparse
12824 (package
12825 (name "python2-argparse")
12826 (version "1.4.0")
12827 (source
12828 (origin
12829 (method url-fetch)
12830 (uri (pypi-uri "argparse" version))
12831 (sha256
12832 (base32
12833 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12834 (build-system python-build-system)
12835 (arguments
12836 `(#:python ,python-2))
12837 (home-page "https://github.com/ThomasWaldmann/argparse/")
12838 (synopsis "Python command-line parsing library")
12839 (description
12840 "This package is mostly for people who want to have @code{argparse} on
12841 older Pythons because it was not part of the standard library back then.")
12842 (license license:psfl)))
12843
12844 (define-public python-fudge
12845 (package
12846 (name "python-fudge")
12847 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
12848 ;; package, which is currently the only use of this package.
12849 (version "0.9.6")
12850 (source
12851 (origin
12852 (method url-fetch)
12853 (uri (pypi-uri "fudge" version))
12854 (sha256
12855 (base32
12856 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
12857 (build-system python-build-system)
12858 (arguments
12859 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
12860 (home-page "https://github.com/fudge-py/fudge")
12861 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
12862 (description
12863 "Fudge is a Python module for using fake objects (mocks and stubs) to
12864 test real ones.
12865
12866 In readable Python code, you declare the methods available on your fake object
12867 and how they should be called. Then you inject that into your application and
12868 start testing. This declarative approach means you don’t have to record and
12869 playback actions and you don’t have to inspect your fakes after running code.
12870 If the fake object was used incorrectly then you’ll see an informative
12871 exception message with a traceback that points to the culprit.")
12872 (license license:expat)))
12873
12874 (define-public python2-fudge
12875 (package-with-python2 python-fudge))
12876
12877 (define-public python-mwclient
12878 (package
12879 (name "python-mwclient")
12880 (version "0.10.0")
12881 (source
12882 (origin
12883 (method git-fetch)
12884 ;; The PyPI version wouldn't contain tests.
12885 (uri (git-reference
12886 (url "https://github.com/mwclient/mwclient")
12887 (commit (string-append "v" version))))
12888 (file-name (git-file-name name version))
12889 (sha256
12890 (base32
12891 "1c3q6lwmb05yqywc4ya98ca7hsl15niili8rccl4n1yqp77c103v"))))
12892 (build-system python-build-system)
12893 (propagated-inputs
12894 `(("python-requests-oauthlib" ,python-requests-oauthlib)
12895 ("python-six" ,python-six)))
12896 (native-inputs
12897 `(("python-mock" ,python-mock)
12898 ("python-pytest" ,python-pytest)
12899 ("python-pytest-cov" ,python-pytest-cov)
12900 ("python-pytest-runner" ,python-pytest-runner)
12901 ("python-responses" ,python-responses)))
12902 (home-page "https://github.com/btongminh/mwclient")
12903 (synopsis "MediaWiki API client")
12904 (description "This package provides a MediaWiki API client.")
12905 (license license:expat)))
12906
12907 (define-public python2-mwclient
12908 (package-with-python2 python-mwclient))
12909
12910 (define-public python-utils
12911 (package
12912 (name "python-utils")
12913 (version "2.1.0")
12914 (source (origin
12915 (method url-fetch)
12916 (uri (pypi-uri "python-utils" version))
12917 (sha256
12918 (base32
12919 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
12920 (build-system python-build-system)
12921 (native-inputs
12922 `(("pytest-runner" ,python-pytest-runner)
12923 ("pytest" ,python-pytest)
12924 ("six" ,python-six)))
12925 (home-page "https://github.com/WoLpH/python-utils")
12926 (synopsis "Convenient utilities not included with the standard Python install")
12927 (description
12928 "Python Utils is a collection of small Python functions and classes which
12929 make common patterns shorter and easier.")
12930 (license license:bsd-2)))
12931
12932 (define-public python2-utils
12933 (package-with-python2 python-utils))
12934
12935 (define-public python-diff-match-patch
12936 (package
12937 (name "python-diff-match-patch")
12938 (version "20121119")
12939 (source
12940 (origin
12941 (method url-fetch)
12942 (uri (pypi-uri "diff-match-patch" version))
12943 (sha256
12944 (base32
12945 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
12946 (build-system python-build-system)
12947 (home-page "https://code.google.com/p/google-diff-match-patch")
12948 (synopsis "Synchronize plain text")
12949 (description "Diff Match and Patch libraries offer robust algorithms to
12950 perform the operations required for synchronizing plain text.")
12951 (license license:asl2.0)))
12952
12953 (define-public python2-diff-match-patch
12954 (package-with-python2 python-diff-match-patch))
12955
12956 (define-public python-dirsync
12957 (package
12958 (name "python-dirsync")
12959 (version "2.2.3")
12960 (source
12961 (origin
12962 (method url-fetch)
12963 (uri (pypi-uri "dirsync" version))
12964 (sha256
12965 (base32
12966 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
12967 (build-system python-build-system)
12968 (propagated-inputs
12969 `(("six" ,python-six)))
12970 (home-page "https://bitbucket.org/tkhyn/dirsync")
12971 (synopsis "Advanced directory tree synchronisation tool")
12972 (description "Advanced directory tree synchronisation tool.")
12973 (license license:expat)))
12974
12975 (define-public python2-dirsync
12976 (package-with-python2 python-dirsync))
12977
12978 (define-public python-levenshtein
12979 (package
12980 (name "python-levenshtein")
12981 (version "0.12.0")
12982 (source
12983 (origin
12984 (method url-fetch)
12985 (uri (pypi-uri "python-Levenshtein" version))
12986 (sha256
12987 (base32
12988 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
12989 (build-system python-build-system)
12990 (home-page "https://github.com/ztane/python-Levenshtein")
12991 (synopsis "Fast computation of Levenshtein distance and string similarity")
12992 (description
12993 "The Levenshtein Python C extension module contains functions for fast computation of
12994 @enumerate
12995 @item Levenshtein (edit) distance, and edit operations
12996 @item string similarity
12997 @item approximate median strings, and generally string averaging
12998 @item string sequence and set similarity
12999 @end enumerate
13000 It supports both normal and Unicode strings.")
13001 (license license:gpl2+)))
13002
13003 (define-public python2-levenshtein
13004 (package-with-python2 python-levenshtein))
13005
13006 (define-public python-scandir
13007 (package
13008 (name "python-scandir")
13009 (version "1.9.0")
13010 (source
13011 (origin
13012 (method url-fetch)
13013 (uri (pypi-uri "scandir" version))
13014 (sha256
13015 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
13016 (build-system python-build-system)
13017 (arguments
13018 `(#:phases (modify-phases %standard-phases
13019 (replace 'check
13020 (lambda _
13021 (invoke "python" "test/run_tests.py"))))))
13022 (home-page "https://github.com/benhoyt/scandir")
13023 (synopsis "Directory iteration function")
13024 (description
13025 "Directory iteration function like os.listdir(), except that instead of
13026 returning a list of bare filenames, it yields DirEntry objects that include
13027 file type and stat information along with the name. Using scandir() increases
13028 the speed of os.walk() by 2-20 times (depending on the platform and file
13029 system) by avoiding unnecessary calls to os.stat() in most cases.
13030
13031 This package is part of the Python standard library since version 3.5.")
13032 (license license:bsd-3)))
13033
13034 (define-public python2-scandir
13035 (package-with-python2 python-scandir))
13036
13037 (define-public python2-stemming
13038 (package
13039 (name "python2-stemming")
13040 (version "1.0.1")
13041 (source
13042 (origin
13043 (method url-fetch)
13044 (uri (pypi-uri "stemming" version))
13045 (sha256
13046 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
13047 (build-system python-build-system)
13048 (arguments
13049 `(#:python ,python-2))
13050 (home-page "https://bitbucket.org/mchaput/stemming/overview")
13051 (synopsis "Python implementations of various stemming algorithms")
13052 (description
13053 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
13054 stemming algorithms for English. These implementations are straightforward and
13055 efficient, unlike some Python versions of the same algorithms available on the
13056 Web. This package is an extraction of the stemming code included in the Whoosh
13057 search engine.")
13058 (license license:public-domain)))
13059
13060 (define-public python-factory-boy
13061 (package
13062 (name "python-factory-boy")
13063 (version "2.8.1")
13064 (source
13065 (origin
13066 (method url-fetch)
13067 (uri (pypi-uri "factory_boy" version))
13068 (sha256
13069 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
13070 (build-system python-build-system)
13071 (arguments
13072 ;; Tests are not included in the tarball.
13073 `(#:tests? #f))
13074 (propagated-inputs
13075 `(("faker" ,python-faker)))
13076 (home-page "https://github.com/benhoyt/scandir")
13077 (synopsis "Versatile test fixtures replacement")
13078 (description
13079 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
13080
13081 As a fixtures replacement tool, it aims to replace static, hard to maintain
13082 fixtures with easy-to-use factories for complex object.
13083
13084 Instead of building an exhaustive test setup with every possible combination
13085 of corner cases, factory_boy allows you to use objects customized for the
13086 current test, while only declaring the test-specific fields")
13087 (license license:expat)))
13088
13089 (define-public python2-factory-boy
13090 (package-with-python2 python-factory-boy))
13091
13092 (define-public python-translate-toolkit
13093 (package
13094 (name "python-translate-toolkit")
13095 (version "2.1.0")
13096 (source
13097 (origin
13098 (method url-fetch)
13099 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
13100 (sha256
13101 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
13102 (build-system python-build-system)
13103 (native-inputs
13104 `(("python-pytest" ,python-pytest)
13105 ("python-sphinx" ,python-sphinx)))
13106 (propagated-inputs
13107 `(("python-babel" ,python-babel)
13108 ("python-beautifulsoup4" ,python-beautifulsoup4)
13109 ("python-chardet" ,python-chardet)
13110 ("python-diff-match-patch" ,python-diff-match-patch)
13111 ("python-levenshtein" ,python-levenshtein)
13112 ("python-lxml" ,python-lxml)
13113 ("python-six" ,python-six)
13114 ("python-vobject" ,python-vobject)
13115 ("python-pyyaml" ,python-pyyaml)))
13116 (arguments
13117 ;; TODO: tests are not run, because they end with
13118 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
13119 ;; 'parse_funcs'
13120 ;; during test setup.
13121 `(#:tests? #f))
13122 (home-page "https://toolkit.translatehouse.org")
13123 (synopsis "Tools and API for translation and localization engineering")
13124 (description
13125 "Tools and API for translation and localization engineering. It contains
13126 several utilities, as well as an API for building localization tools.")
13127 (license license:gpl2+)))
13128
13129 (define-public python2-translate-toolkit
13130 (package-with-python2 python-translate-toolkit))
13131
13132 (define-public python-packaging
13133 (package
13134 (name "python-packaging")
13135 (version "20.0")
13136 (source
13137 (origin
13138 (method url-fetch)
13139 (uri (pypi-uri "packaging" version))
13140 ;; XXX: The URL in the patch file is wrong, it should be
13141 ;; <https://github.com/pypa/packaging/pull/256>.
13142 (patches (search-patches "python-packaging-test-arch.patch"))
13143 (sha256
13144 (base32
13145 "1y2ip3a4ykkpgnwgn85j6hkspcl0cg3mzms97f40mk57vwqq67gy"))))
13146 (build-system python-build-system)
13147 (arguments
13148 `(#:phases (modify-phases %standard-phases
13149 (replace 'check
13150 (lambda _ (invoke "py.test" "-vv"))))))
13151 (native-inputs
13152 `(("python-pretend" ,python-pretend)
13153 ("python-pytest" ,python-pytest)))
13154 (propagated-inputs
13155 `(("python-pyparsing" ,python-pyparsing)
13156 ("python-six" ,python-six)))
13157 (home-page "https://github.com/pypa/packaging")
13158 (synopsis "Core utilities for Python packages")
13159 (description "Packaging is a Python module for dealing with Python packages.
13160 It offers an interface for working with package versions, names, and dependency
13161 information.")
13162 ;; From 'LICENSE': This software is made available under the terms of
13163 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
13164 ;; Contributions to this software is made under the terms of *both* these
13165 ;; licenses.
13166 (license (list license:asl2.0 license:bsd-2))))
13167
13168 (define-public python2-packaging
13169 (package-with-python2 python-packaging))
13170
13171 (define-public python-relatorio
13172 (package
13173 (name "python-relatorio")
13174 (version "0.8.0")
13175 (source
13176 (origin
13177 (method url-fetch)
13178 (uri (pypi-uri "relatorio" version))
13179 (sha256
13180 (base32
13181 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
13182 (build-system python-build-system)
13183 (propagated-inputs
13184 `(("python-lxml" ,python-lxml)
13185 ("python-genshi" ,python-genshi)))
13186 (native-inputs
13187 `(("python-magic" ,python-magic)))
13188 (home-page "https://relatorio.tryton.org/")
13189 (synopsis "Templating library able to output ODT and PDF files")
13190 (description "Relatorio is a templating library which provides a way to
13191 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
13192 for more filetypes can be easily added by creating plugins for them.")
13193 (license license:gpl3+)))
13194
13195 (define-public python2-relatorio
13196 (package-with-python2 python-relatorio))
13197
13198 (define-public python-radon
13199 (package
13200 (name "python-radon")
13201 (version "2.2.0")
13202 (source
13203 (origin
13204 (method url-fetch)
13205 (uri (pypi-uri "radon" version))
13206 (sha256
13207 (base32
13208 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
13209 (build-system python-build-system)
13210 (arguments
13211 `(#:phases (modify-phases %standard-phases
13212 (replace 'check
13213 (lambda _
13214 (invoke "python" "radon/tests/run.py"))))))
13215 (propagated-inputs
13216 `(("python-colorama" ,python-colorama)
13217 ("python-flake8-polyfill" ,python-flake8-polyfill)
13218 ("python-mando" ,python-mando)))
13219 (native-inputs
13220 `(("python-pytest" ,python-pytest)
13221 ("python-pytest-mock" ,python-pytest-mock)))
13222 (home-page "https://radon.readthedocs.org/")
13223 (synopsis "Code Metrics in Python")
13224 (description "Radon is a Python tool which computes various code metrics.
13225 Supported metrics are:
13226 @itemize @bullet
13227 @item raw metrics: SLOC, comment lines, blank lines, &c.
13228 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
13229 @item Halstead metrics (all of them)
13230 @item the Maintainability Index (a Visual Studio metric)
13231 @end itemize")
13232 (license license:expat)))
13233
13234 (define-public python2-radon
13235 (package-with-python2 python-radon))
13236
13237 (define-public python-sure
13238 (package
13239 (name "python-sure")
13240 (version "1.4.11")
13241 (source
13242 (origin
13243 (method url-fetch)
13244 (uri (pypi-uri "sure" version))
13245 (sha256
13246 (base32
13247 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
13248 (build-system python-build-system)
13249 (propagated-inputs
13250 `(("python-mock" ,python-mock)
13251 ("python-six" ,python-six)))
13252 (native-inputs
13253 `(("python-nose" ,python-nose)))
13254 (home-page "https://github.com/gabrielfalcao/sure")
13255 (synopsis "Automated testing library in python for python")
13256 (description
13257 "Sure is a python library that leverages a DSL for writing assertions.
13258 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
13259 (license license:gpl3+)))
13260
13261 (define-public python2-sure
13262 (package-with-python2 python-sure))
13263
13264 (define-public python2-couleur
13265 ;; This package does not seem to support python3 at all, hence,
13266 ;; only the python2 variant definition is provided.
13267 (package
13268 (name "python2-couleur")
13269 (version "0.6.2")
13270 (source
13271 (origin
13272 (method url-fetch)
13273 (uri (pypi-uri "couleur" version))
13274 (sha256
13275 (base32
13276 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
13277 (build-system python-build-system)
13278 (arguments
13279 `(#:python ,python-2))
13280 (home-page "https://github.com/gabrielfalcao/couleur")
13281 (synopsis
13282 "ANSI terminal tool for python, colored shell and other handy fancy features")
13283 (description
13284 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
13285 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
13286 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
13287 ;; https://github.com/gabrielfalcao/couleur/issues/11
13288 (license license:lgpl3+)))
13289
13290 (define-public python-misaka
13291 (package
13292 (name "python-misaka")
13293 (version "2.1.1")
13294 (source
13295 (origin
13296 (method url-fetch)
13297 (uri (pypi-uri "misaka" version))
13298 (sha256
13299 (base32
13300 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
13301 (build-system python-build-system)
13302 (arguments
13303 `(;; Line 37 of setup.py calls self.run_command('develop')
13304 ;; in the 'check' phase. This command seems to be trying
13305 ;; to write to
13306 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
13307 ;; for which it does not have the permission to write.
13308 #:tests? #f))
13309 (propagated-inputs
13310 `(("python-cffi" ,python-cffi)))
13311 (home-page "https://github.com/FSX/misaka")
13312 (synopsis "Python binding for Hoedown")
13313 (description
13314 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
13315 library written in C. It features a fast HTML renderer and functionality to make custom
13316 renderers (e.g. man pages or LaTeX).")
13317 (license license:expat)))
13318
13319 (define-public python2-misaka
13320 (package-with-python2 python-misaka))
13321
13322 (define-public python2-steadymark
13323 ;; This is forced into being a python2 only variant
13324 ;; due to its dependence on couleur that has no support
13325 ;; for python3
13326 (package
13327 (name "python2-steadymark")
13328 (version "0.7.3")
13329 (source
13330 (origin
13331 (method url-fetch)
13332 (uri (pypi-uri "steadymark" version))
13333 (sha256
13334 (base32
13335 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
13336 (build-system python-build-system)
13337 (native-inputs
13338 `(("python-couleur" ,python2-couleur)
13339 ("python-sure" ,python2-sure)
13340 ("python-misaka" ,python2-misaka)))
13341 (arguments
13342 `(#:python ,python-2
13343 #:phases
13344 (modify-phases %standard-phases
13345 (add-before 'build 'patch-setup-py
13346 (lambda _
13347 ;; Update requirements from dependency==version
13348 ;; to dependency>=version
13349 (substitute* "setup.py"
13350 (("==") ">="))
13351 #t)))))
13352 (home-page "https://github.com/gabrielfalcao/steadymark")
13353 (synopsis "Markdown-based test runner for python")
13354 (description
13355 "@code{Steadymark} allows documentation to be written in github-flavoured
13356 markdown. The documentation may contain snippets of code surrounded by python
13357 code blocks and @code{Steadymark} will find these snippets and run them, making
13358 sure that there are no old malfunctional examples in the documentation examples.")
13359 (license license:expat)))
13360
13361 (define-public python-jsonpointer
13362 (package
13363 (name "python-jsonpointer")
13364 (version "1.10")
13365 (source
13366 (origin
13367 (method url-fetch)
13368 (uri (pypi-uri "jsonpointer" version))
13369 (sha256
13370 (base32
13371 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
13372 (build-system python-build-system)
13373 (home-page "https://github.com/stefankoegl/python-json-pointer")
13374 (synopsis "Identify specific nodes in a JSON document")
13375 (description "@code{jsonpointer} allows you to access specific nodes
13376 by path in a JSON document (see RFC 6901).")
13377 (license license:bsd-3)))
13378
13379 (define-public python2-jsonpointer
13380 (package-with-python2 python-jsonpointer))
13381
13382 (define-public python-jsonpatch
13383 (package
13384 (name "python-jsonpatch")
13385 (version "1.16")
13386 (source
13387 (origin
13388 (method git-fetch)
13389 ;; pypi version lacks tests.js
13390 (uri (git-reference
13391 (url "https://github.com/stefankoegl/python-json-patch")
13392 (commit (string-append "v" version))))
13393 (file-name (git-file-name name version))
13394 (sha256
13395 (base32
13396 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
13397 (build-system python-build-system)
13398 (native-inputs
13399 `(("python-jsonpointer" ,python-jsonpointer)))
13400 (home-page "https://github.com/stefankoegl/python-json-patch")
13401 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
13402 (description "@code{jsonpatch} is a library and program that allows
13403 applying JSON Patches according to RFC 6902.")
13404 (license license:bsd-3)))
13405
13406 (define-public python2-jsonpatch
13407 (package-with-python2 python-jsonpatch))
13408
13409 (define-public python-jsonpatch-0.4
13410 (package (inherit python-jsonpatch)
13411 (name "python-jsonpatch")
13412 (version "0.4")
13413 (source
13414 (origin
13415 (method git-fetch)
13416 (uri (git-reference
13417 (url "https://github.com/stefankoegl/python-json-patch")
13418 (commit (string-append "v" version))))
13419 (file-name (git-file-name name version))
13420 (sha256
13421 (base32
13422 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
13423
13424 (define-public python2-jsonpatch-0.4
13425 (package-with-python2 python-jsonpatch-0.4))
13426
13427 (define-public python-rfc3986
13428 (package
13429 (name "python-rfc3986")
13430 (version "1.1.0")
13431 (source (origin
13432 (method url-fetch)
13433 (uri (pypi-uri "rfc3986" version))
13434 (sha256
13435 (base32
13436 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
13437 (build-system python-build-system)
13438 (arguments
13439 `(#:modules ((guix build utils)
13440 (guix build python-build-system)
13441 (ice-9 ftw)
13442 (srfi srfi-1)
13443 (srfi srfi-26))
13444 #:phases
13445 (modify-phases %standard-phases
13446 (replace 'check
13447 (lambda _
13448 (let ((cwd (getcwd)))
13449 (setenv "PYTHONPATH"
13450 (string-append cwd "/build/"
13451 (find (cut string-prefix? "lib" <>)
13452 (scandir (string-append cwd "/build")))
13453 ":"
13454 (getenv "PYTHONPATH")))
13455 (invoke "pytest" "-v")))))))
13456 (native-inputs
13457 `(("python-pytest" ,python-pytest)))
13458 (home-page "https://rfc3986.readthedocs.io/")
13459 (synopsis "Parse and validate URI references")
13460 (description
13461 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
13462 validation and authority parsing. This module also supports RFC@tie{}6874
13463 which adds support for zone identifiers to IPv6 addresses.")
13464 (license license:asl2.0)))
13465
13466 (define-public python2-rfc3986
13467 (package-with-python2 python-rfc3986))
13468
13469 (define-public python-rfc3987
13470 (package
13471 (name "python-rfc3987")
13472 (version "1.3.7")
13473 (source
13474 (origin
13475 (method url-fetch)
13476 (uri (pypi-uri "rfc3987" version))
13477 (sha256
13478 (base32
13479 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
13480 (build-system python-build-system)
13481 (home-page "https://pypi.python.org/pypi/rfc3987")
13482 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
13483 (description "@code{rfc3987} provides routines for parsing and
13484 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
13485 (license license:gpl3+)))
13486
13487 (define-public python2-rfc3987
13488 (package-with-python2 python-rfc3987))
13489
13490 (define-public python-validate-email
13491 (package
13492 (name "python-validate-email")
13493 (version "1.3")
13494 (source
13495 (origin
13496 (method url-fetch)
13497 (uri (pypi-uri "validate_email" version))
13498 (sha256
13499 (base32
13500 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
13501 (build-system python-build-system)
13502 (home-page "https://github.com/syrusakbary/validate_email")
13503 (synopsis "Verifies if an email address is valid and really exists")
13504 (description "@code{validate_email} can be used to verify if an email
13505 address is valid and really exists.")
13506 (license license:lgpl3+)))
13507
13508 (define-public python2-validate-email
13509 (package-with-python2 python-validate-email))
13510
13511 (define-public python-flex
13512 (package
13513 (name "python-flex")
13514 (version "6.10.0")
13515 (source
13516 (origin
13517 (method url-fetch)
13518 (uri (pypi-uri "flex" version))
13519 (sha256
13520 (base32
13521 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
13522 (build-system python-build-system)
13523 (propagated-inputs
13524 `(("python-click" ,python-click)
13525 ("python-iso8601" ,python-iso8601)
13526 ("python-jsonpointer" ,python-jsonpointer)
13527 ("python-pyyaml" ,python-pyyaml)
13528 ("python-requests" ,python-requests)
13529 ("python-rfc3987" ,python-rfc3987)
13530 ("python-six" ,python-six)
13531 ("python-validate-email" ,python-validate-email)))
13532 (home-page "https://github.com/pipermerriam/flex")
13533 (synopsis "Validates Swagger schemata")
13534 (description "@code{flex} can be used to validate Swagger schemata.")
13535 (license license:bsd-3)))
13536
13537 (define-public python2-flex
13538 (package-with-python2 python-flex))
13539
13540 (define-public python-marshmallow
13541 (package
13542 (name "python-marshmallow")
13543 (version "3.0.0b14")
13544 (source
13545 (origin
13546 (method url-fetch)
13547 (uri (pypi-uri "marshmallow" version))
13548 (sha256
13549 (base32
13550 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
13551 (build-system python-build-system)
13552 (propagated-inputs
13553 `(("python-dateutil" ,python-dateutil)
13554 ("python-simplejson" ,python-simplejson)))
13555 (native-inputs
13556 `(("python-pytest" ,python-pytest)
13557 ("python-pytz" ,python-pytz)))
13558 (home-page "https://github.com/marshmallow-code/marshmallow")
13559 (synopsis "Convert complex datatypes to and from native
13560 Python datatypes.")
13561 (description "@code{marshmallow} provides a library for converting
13562 complex datatypes to and from native Python datatypes.")
13563 (license license:expat)))
13564
13565 (define-public python2-marshmallow
13566 (package-with-python2 python-marshmallow))
13567
13568 (define-public python-apispec
13569 (package
13570 (name "python-apispec")
13571 (version "0.25.3")
13572 (source
13573 (origin
13574 (method url-fetch)
13575 (uri (pypi-uri "apispec" version))
13576 (sha256
13577 (base32
13578 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
13579 (build-system python-build-system)
13580 (propagated-inputs
13581 `(("python-pyyaml" ,python-pyyaml)))
13582 (native-inputs
13583 `(("python-pytest" ,python-pytest)
13584 ("python-flask" ,python-flask)
13585 ("python-marshmallow" ,python-marshmallow)
13586 ("python-tornado" ,python-tornado)
13587 ("python-bottle" ,python-bottle)
13588 ("python-mock" ,python-mock)))
13589 (home-page "https://github.com/marshmallow-code/apispec")
13590 (synopsis "Swagger 2.0 API specification generator")
13591 (description "@code{python-apispec} is a pluggable API specification
13592 generator. Currently supports the OpenAPI specification (f.k.a.
13593 Swagger 2.0).")
13594 (license license:expat)))
13595
13596 (define-public python2-apispec
13597 (package-with-python2 python-apispec))
13598
13599 (define-public python-flasgger
13600 (package
13601 (name "python-flasgger")
13602 (version "0.6.3")
13603 (source
13604 (origin
13605 (method git-fetch)
13606 (uri (git-reference
13607 (url "https://github.com/rochacbruno/flasgger.git")
13608 (commit version)))
13609 (file-name (git-file-name name version))
13610 (sha256
13611 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
13612 (build-system python-build-system)
13613 (arguments
13614 `(#:phases
13615 (modify-phases %standard-phases
13616 (replace 'check
13617 (lambda* (#:key inputs outputs #:allow-other-keys)
13618 (substitute* "Makefile"
13619 (("flake8 flasgger --ignore=F403")
13620 "flake8 flasgger --ignore=E731,F403"))
13621 (setenv "PYTHONPATH" (string-append (getcwd)
13622 ":"
13623 (getenv "PYTHONPATH")))
13624 (invoke "py.test"))))))
13625 (propagated-inputs
13626 `(("python-flask" ,python-flask)
13627 ("python-pyyaml" ,python-pyyaml)
13628 ("python-jsonschema" ,python-jsonschema)
13629 ("python-mistune" ,python-mistune)
13630 ("python-six" ,python-six)))
13631 (native-inputs
13632 `(("python-decorator" ,python-decorator)
13633 ("python-flake8" ,python-flake8)
13634 ("python-flask-restful" ,python-flask-restful)
13635 ("python-flex" ,python-flex)
13636 ("python-pytest" ,python-pytest)
13637 ("python-pytest-cov" ,python-pytest-cov)
13638 ("python-marshmallow" ,python-marshmallow)
13639 ("python-apispec" ,python-apispec)))
13640 (home-page "https://github.com/rochacbruno/flasgger/")
13641 (synopsis "Extract Swagger specs from your Flask project")
13642 (description "@code{python-flasgger} allows extracting Swagger specs
13643 from your Flask project. It is a fork of Flask-Swagger.")
13644 (license license:expat)))
13645
13646 (define-public python2-flasgger
13647 (package-with-python2 python-flasgger))
13648
13649 (define-public python-swagger-spec-validator
13650 (package
13651 (name "python-swagger-spec-validator")
13652 (version "2.4.3")
13653 (source
13654 (origin
13655 (method url-fetch)
13656 (uri (pypi-uri "swagger-spec-validator" version))
13657 (sha256
13658 (base32
13659 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
13660 (build-system python-build-system)
13661 (propagated-inputs
13662 `(("python-jsonschema" ,python-jsonschema)
13663 ("python-pyyaml" ,python-pyyaml)
13664 ("python-six" ,python-six)))
13665 (home-page
13666 "https://github.com/Yelp/swagger_spec_validator")
13667 (synopsis "Validation of Swagger specifications")
13668 (description "@code{swagger_spec_validator} provides a library for
13669 validating Swagger API specifications.")
13670 (license license:asl2.0)))
13671
13672 (define-public python2-swagger-spec-validator
13673 (package-with-python2 python-swagger-spec-validator))
13674
13675 (define-public python-apache-libcloud
13676 (package
13677 (name "python-apache-libcloud")
13678 (version "2.4.0")
13679 (source
13680 (origin
13681 (method url-fetch)
13682 (uri (pypi-uri "apache-libcloud" version))
13683 (sha256
13684 (base32
13685 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13686 (build-system python-build-system)
13687 (arguments
13688 `(#:phases
13689 (modify-phases %standard-phases
13690 (add-after 'unpack 'patch-ssh
13691 (lambda* (#:key inputs #:allow-other-keys)
13692 (substitute* "libcloud/compute/ssh.py"
13693 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13694 "/bin/ssh" "'")))
13695 #t))
13696 (add-after 'unpack 'patch-tests
13697 (lambda _
13698 (substitute* "./libcloud/test/test_file_fixtures.py"
13699 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13700 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13701 return (httplib.OK,
13702 \"1234abcd\",
13703 {\"test\": \"value\"},
13704 httplib.responses[httplib.OK])
13705 def _ascii"))
13706 (substitute* "libcloud/test/compute/test_ssh_client.py"
13707 (("class ShellOutSSHClientTests")
13708 "@unittest.skip(\"Guix container doesn't have ssh service\")
13709 class ShellOutSSHClientTests")
13710 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13711 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13712 (("'.xF0', '.x90', '.x8D', '.x88'")
13713 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13714 #t))
13715 (add-before 'check 'copy-secret
13716 (lambda _
13717 (copy-file "libcloud/test/secrets.py-dist"
13718 "libcloud/test/secrets.py")
13719 #t)))))
13720 (inputs
13721 `(("openssh" ,openssh)))
13722 (propagated-inputs
13723 `(("python-paramiko" ,python-paramiko)
13724 ("python-requests" ,python-requests)))
13725 (native-inputs
13726 `(("python-lockfile" ,python-lockfile)
13727 ("python-mock" ,python-mock)
13728 ("python-pytest" ,python-pytest)
13729 ("python-pytest-runner" ,python-pytest-runner)
13730 ("python-requests-mock" ,python-requests-mock)))
13731 (home-page "https://libcloud.apache.org/")
13732 (synopsis "Unified Cloud API")
13733 (description "@code{libcloud} is a Python library for interacting with
13734 many of the popular cloud service providers using a unified API.")
13735 (license license:asl2.0)))
13736
13737 (define-public python2-apache-libcloud
13738 (package-with-python2 python-apache-libcloud))
13739
13740 (define-public python-smmap2
13741 (package
13742 (name "python-smmap2")
13743 (version "2.0.5")
13744 (source
13745 (origin
13746 (method url-fetch)
13747 (uri (pypi-uri "smmap2" version))
13748 (sha256
13749 (base32 "16k03pcnxd3lgzwgbd7nl4jwzm1wmahirvd09kljnzvy96hgza99"))))
13750 (build-system python-build-system)
13751 (native-inputs
13752 `(("python-nosexcover" ,python-nosexcover)))
13753 (home-page "https://github.com/Byron/smmap")
13754 (synopsis "Python sliding window memory map manager")
13755 (description "@code{smmap2} is a pure Python implementation of a sliding
13756 window memory map manager.")
13757 (license license:bsd-3)))
13758
13759 (define-public python2-smmap2
13760 (package-with-python2 python-smmap2))
13761
13762 (define-public python-regex
13763 (package
13764 (name "python-regex")
13765 (version "2019.04.14")
13766 (source (origin
13767 (method url-fetch)
13768 (uri (pypi-uri "regex" version))
13769 (sha256
13770 (base32
13771 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
13772 ;; TODO: Fix and enable regex_test.py tests that complain about the
13773 ;; test.support module not existing.
13774 (build-system python-build-system)
13775 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13776 (synopsis "Alternative regular expression module")
13777 (description "This regular expression implementation is backwards-
13778 compatible with the standard @code{re} module, but offers additional
13779 functionality like full case-folding for case-insensitive matches in Unicode.")
13780 (license license:psfl)))
13781
13782 (define-public python2-regex
13783 (package-with-python2 python-regex))
13784
13785 (define-public python2-pyopengl
13786 (package
13787 (name "python2-pyopengl")
13788 (version "3.1.0")
13789 (source
13790 (origin
13791 (method url-fetch)
13792 (uri (pypi-uri "PyOpenGL" version))
13793 (sha256
13794 (base32
13795 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13796 (arguments
13797 `(#:python ,python-2))
13798 (build-system python-build-system)
13799 (home-page "http://pyopengl.sourceforge.net")
13800 (synopsis "Standard OpenGL bindings for Python")
13801 (description
13802 "PyOpenGL is the most common cross platform Python binding to OpenGL and
13803 related APIs. The binding is created using the standard @code{ctypes}
13804 library.")
13805 (license license:bsd-3)))
13806
13807 (define-public python2-pyopengl-accelerate
13808 (package
13809 (inherit python2-pyopengl)
13810 (name "python2-pyopengl-accelerate")
13811 (version "3.1.0")
13812 (source
13813 (origin
13814 (method url-fetch)
13815 (uri (pypi-uri "PyOpenGL-accelerate" version))
13816 (sha256
13817 (base32
13818 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
13819 (synopsis "Acceleration code for PyOpenGL")
13820 (description
13821 "This is the Cython-coded accelerator module for PyOpenGL.")))
13822
13823 (define-public python-rencode
13824 (package
13825 (name "python-rencode")
13826 (version "1.0.5")
13827 (source
13828 (origin
13829 (method url-fetch)
13830 (uri (pypi-uri "rencode" version))
13831 (sha256
13832 (base32
13833 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
13834 (build-system python-build-system)
13835 (arguments
13836 `(#:phases
13837 (modify-phases %standard-phases
13838 (add-before 'check 'delete-bogus-test
13839 ;; This test requires /home/aresch/Downloads, which is not provided by
13840 ;; the build environment.
13841 (lambda _
13842 (delete-file "rencode/t.py")
13843 #t)))))
13844 (native-inputs `(("pkg-config" ,pkg-config)
13845 ("python-cython" ,python-cython)))
13846 (home-page "https://github.com/aresch/rencode")
13847 (synopsis "Serialization of heterogeneous data structures")
13848 (description
13849 "The @code{rencode} module is a data structure serialization library,
13850 similar to @code{bencode} from the BitTorrent project. For complex,
13851 heterogeneous data structures with many small elements, r-encoding stake up
13852 significantly less space than b-encodings. This version of rencode is a
13853 complete rewrite in Cython to attempt to increase the performance over the
13854 pure Python module.")
13855 (license license:bsd-3)))
13856
13857 (define-public python2-rencode
13858 (package-with-python2 python-rencode))
13859
13860 (define-public python-xenon
13861 (package
13862 (name "python-xenon")
13863 (version "0.5.4")
13864 (source
13865 (origin
13866 (method url-fetch)
13867 (uri (pypi-uri "xenon" version))
13868 (sha256
13869 (base32
13870 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
13871 (build-system python-build-system)
13872 (native-inputs
13873 `(("python-pyyaml" ,python-pyyaml)
13874 ("python-radon" ,python-radon)
13875 ("python-requests" ,python-requests)
13876 ("python-flake8" ,python-flake8)
13877 ("python-tox" ,python-tox)))
13878 (arguments
13879 `(#:phases
13880 (modify-phases %standard-phases
13881 (add-before 'build 'patch-test-requirements
13882 (lambda _
13883 ;; Remove httpretty dependency for tests.
13884 (substitute* "setup.py"
13885 (("httpretty") ""))
13886 #t)))))
13887 (home-page "https://xenon.readthedocs.org/")
13888 (synopsis "Monitor code metrics for Python on your CI server")
13889 (description
13890 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
13891 Ideally, @code{xenon} is run every time code is committed. Through command
13892 line options, various thresholds can be set for the complexity of code. It
13893 will fail (i.e. it will exit with a non-zero exit code) when any of these
13894 requirements is not met.")
13895 (license license:expat)))
13896
13897 (define-public python2-xenon
13898 (package-with-python2 python-xenon))
13899
13900 (define-public python-pysocks
13901 (package
13902 (name "python-pysocks")
13903 (version "1.7.0")
13904 (source
13905 (origin
13906 (method url-fetch)
13907 (uri (pypi-uri "PySocks" version))
13908 (sha256
13909 (base32
13910 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
13911 (build-system python-build-system)
13912 (arguments `(#:tests? #f))
13913 (home-page "https://github.com/Anorov/PySocks")
13914 (synopsis "SOCKS client module")
13915 (description "@code{pysocks} is an updated and semi-actively maintained
13916 version of @code{SocksiPy} with bug fixes and extra features.")
13917 (license license:bsd-3)))
13918
13919 (define-public python2-pysocks
13920 (package-with-python2 python-pysocks))
13921
13922 (define-public python-pydiff
13923 (package
13924 (name "python-pydiff")
13925 (version "0.2")
13926 (source
13927 (origin
13928 (method url-fetch)
13929 (uri (pypi-uri "pydiff" version))
13930 (sha256
13931 (base32
13932 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
13933 (build-system python-build-system)
13934 (home-page "https://github.com/myint/pydiff")
13935 (synopsis "Library to diff two Python files at the bytecode level")
13936 (description
13937 "@code{pydiff} makes it easy to look for actual code changes while
13938 ignoring formatting changes.")
13939 (license license:expat)))
13940
13941 (define-public python2-pydiff
13942 (package-with-python2 python-pydiff))
13943
13944 (define-public python-tqdm
13945 (package
13946 (name "python-tqdm")
13947 (version "4.19.6")
13948 (source
13949 (origin
13950 (method url-fetch)
13951 (uri (pypi-uri "tqdm" version))
13952 (sha256
13953 (base32
13954 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
13955 (build-system python-build-system)
13956 (native-inputs
13957 `(("python-flake8" ,python-flake8)
13958 ("python-nose" ,python-nose)
13959 ("python-coverage" ,python-coverage)))
13960 (home-page "https://github.com/tqdm/tqdm")
13961 (synopsis "Fast, extensible progress meter")
13962 (description
13963 "Make loops show a progress bar on the console by just wrapping any
13964 iterable with @code{|tqdm(iterable)|}. Offers many options to define
13965 design and layout.")
13966 (license (list license:mpl2.0 license:expat))
13967 (properties `((python2-variant . ,(delay python2-tqdm))))))
13968
13969 (define-public python2-tqdm
13970 (let ((tqdm (package-with-python2
13971 (strip-python2-variant python-tqdm))))
13972 (package (inherit tqdm)
13973 (native-inputs `(("python2-functools32" ,python2-functools32)
13974 ,@(package-native-inputs tqdm))))))
13975
13976 (define-public python-pkginfo
13977 (package
13978 (name "python-pkginfo")
13979 (version "1.4.2")
13980 (source
13981 (origin
13982 (method url-fetch)
13983 (uri (pypi-uri "pkginfo" version))
13984 (sha256
13985 (base32
13986 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
13987 (build-system python-build-system)
13988 (arguments
13989 ;; The tests are broken upstream.
13990 '(#:tests? #f))
13991 (home-page
13992 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
13993 (synopsis
13994 "Query metadatdata from sdists, bdists, and installed packages")
13995 (description
13996 "API to query the distutils metadata written in @file{PKG-INFO} inside a
13997 source distriubtion (an sdist) or a binary distribution (e.g., created by
13998 running bdist_egg). It can also query the EGG-INFO directory of an installed
13999 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
14000 created by running @code{python setup.py develop}).")
14001 (license license:expat)))
14002
14003 (define-public python2-pkginfo
14004 (package-with-python2 python-pkginfo))
14005
14006 (define-public python-twine
14007 (package
14008 (name "python-twine")
14009 (version "1.9.1")
14010 (source
14011 (origin
14012 (method url-fetch)
14013 (uri (pypi-uri "twine" version))
14014 (sha256
14015 (base32
14016 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
14017 (build-system python-build-system)
14018 (propagated-inputs
14019 `(("python-tqdm" ,python-tqdm)
14020 ("python-pkginfo" ,python-pkginfo)
14021 ("python-requests" ,python-requests)
14022 ("python-requests-toolbelt" ,python-requests-toolbelt)))
14023 (home-page "https://github.com/pypa/twine")
14024 (synopsis "Collection of utilities for interacting with PyPI")
14025 (description
14026 "@code{twine} currently supports registering projects and uploading
14027 distributions. It authenticates the user over HTTPS, allows them to pre-sign
14028 their files and supports any packaging format (including wheels).")
14029 (license license:asl2.0)))
14030
14031 (define-public python2-twine
14032 (package-with-python2 python-twine))
14033
14034 (define-public python-linecache2
14035 (package
14036 (name "python-linecache2")
14037 (version "1.0.0")
14038 (source
14039 (origin
14040 (method url-fetch)
14041 (uri (pypi-uri "linecache2" version))
14042 (sha256
14043 (base32
14044 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
14045 (build-system python-build-system)
14046 (arguments
14047 `(;; The tests depend on unittest2, and our version is a bit too old.
14048 #:tests? #f))
14049 (native-inputs
14050 `(("python-pbr" ,python-pbr-minimal)))
14051 (home-page
14052 "https://github.com/testing-cabal/linecache2")
14053 (synopsis "Backports of the linecache module")
14054 (description
14055 "The linecache module allows one to get any line from any file, while
14056 attempting to optimize internally, using a cache, the common case where many
14057 lines are read from a single file.")
14058 (license license:psfl)))
14059
14060 (define-public python2-linecache2
14061 (package-with-python2 python-linecache2))
14062
14063 (define-public python-traceback2
14064 (package
14065 (name "python-traceback2")
14066 (version "1.4.0")
14067 (source
14068 (origin
14069 (method url-fetch)
14070 (uri (pypi-uri "traceback2" version))
14071 (sha256
14072 (base32
14073 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
14074 (build-system python-build-system)
14075 (arguments
14076 `(;; python-traceback2 and python-unittest2 depend on one another.
14077 #:tests? #f))
14078 (native-inputs
14079 `(("python-pbr" ,python-pbr-minimal)))
14080 (propagated-inputs
14081 `(("python-linecache2" ,python-linecache2)))
14082 (home-page
14083 "https://github.com/testing-cabal/traceback2")
14084 (synopsis "Backports of the traceback module")
14085 (description
14086 "This module provides a standard interface to extract, format and print
14087 stack traces of Python programs. It exactly mimics the behavior of the Python
14088 interpreter when it prints a stack trace.")
14089 (license license:psfl)))
14090
14091 (define-public python2-traceback2
14092 (package-with-python2 python-traceback2))
14093
14094 (define-public python-ratelimiter
14095 (package
14096 (name "python-ratelimiter")
14097 (version "1.2.0")
14098 (source
14099 (origin
14100 (method url-fetch)
14101 (uri (pypi-uri "ratelimiter" version))
14102 (sha256
14103 (base32
14104 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
14105 (build-system python-build-system)
14106 (arguments
14107 '(#:tests? #f)) ; There are no tests in the pypi archive.
14108 (home-page "https://github.com/RazerM/ratelimiter")
14109 (synopsis "Simple rate limiting object")
14110 (description
14111 "The @code{ratelimiter} module ensures that an operation will not be
14112 executed more than a given number of times during a given period.")
14113 (license license:asl2.0)))
14114
14115 (define-public python2-ratelimiter
14116 (package-with-python2 python-ratelimiter))
14117
14118 (define-public python-dukpy
14119 (package
14120 (name "python-dukpy")
14121 (version "0.3")
14122 (source
14123 (origin
14124 (method git-fetch)
14125 (uri (git-reference
14126 (url "https://github.com/kovidgoyal/dukpy.git")
14127 (commit (string-append "v" version))))
14128 (file-name (git-file-name name version))
14129 (sha256
14130 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
14131 (build-system python-build-system)
14132 (home-page "https://github.com/kovidgoyal/dukpy")
14133 (synopsis "Run JavaScript in python")
14134 (description
14135 "dukpy is a JavaScript runtime environment for Python using the duktape
14136 embeddable JavaScript engine.")
14137 ;; Dukpy is licensed under MIT like the embedded duktape library,
14138 ;; with 'errors.c' as GPL3.
14139 (license (list license:expat license:gpl3))))
14140
14141 (define-public python2-dukpy
14142 (package-with-python2 python-dukpy))
14143
14144 (define-public python-jsonrpclib-pelix
14145 (package
14146 (name "python-jsonrpclib-pelix")
14147 (version "0.3.2")
14148 (source
14149 (origin
14150 (method url-fetch)
14151 (uri (pypi-uri "jsonrpclib-pelix" version))
14152 (sha256
14153 (base32
14154 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
14155 (build-system python-build-system)
14156 (arguments
14157 `(#:tests? #f)) ; no tests in PyPI tarball
14158 (home-page "https://github.com/tcalmant/jsonrpclib/")
14159 (synopsis "JSON-RPC 2.0 client library for Python")
14160 (description
14161 "This library implements the JSON-RPC v2.0
14162 specification (backwards-compatible) as a client library for Python. This
14163 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
14164 services.")
14165 (license license:asl2.0)))
14166
14167 (define-public python2-jsonrpclib-pelix
14168 (package-with-python2 python-jsonrpclib-pelix))
14169
14170 (define-public python-setuptools-scm-git-archive
14171 (package
14172 (name "python-setuptools-scm-git-archive")
14173 (version "1.0")
14174 (source
14175 (origin
14176 (method url-fetch)
14177 (uri (pypi-uri "setuptools_scm_git_archive" version))
14178 (sha256
14179 (base32
14180 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
14181 (build-system python-build-system)
14182 (native-inputs
14183 `(("python-pytest" ,python-pytest)))
14184 (propagated-inputs
14185 `(("python-setuptools-scm" ,python-setuptools-scm)))
14186 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
14187 (synopsis "Setuptools_scm plugin for git archives")
14188 (description
14189 "The setuptools_scm_git_archive package is a plugin to
14190 setuptools_scm, which supports obtaining versions from git archives that
14191 belong to tagged versions.")
14192 (license license:expat)))
14193
14194 (define-public python2-setuptools-scm-git-archive
14195 (package-with-python2 python-setuptools-scm-git-archive))
14196
14197 (define-public python-setuptools-git
14198 (package
14199 (name "python-setuptools-git")
14200 (version "1.2")
14201 (source
14202 (origin
14203 (method url-fetch)
14204 (uri (pypi-uri "setuptools-git" version))
14205 (sha256
14206 (base32
14207 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
14208 (build-system python-build-system)
14209 (arguments
14210 `(#:phases
14211 (modify-phases %standard-phases
14212 ;; This is needed for tests.
14213 (add-after 'unpack 'configure-git
14214 (lambda _
14215 (setenv "HOME" "/tmp")
14216 (invoke "git" "config" "--global" "user.email" "guix")
14217 (invoke "git" "config" "--global" "user.name" "guix")
14218 #t)))))
14219 (native-inputs
14220 `(("git" ,git-minimal)))
14221 (home-page "https://github.com/msabramo/setuptools-git")
14222 (synopsis "Setuptools revision control system plugin for Git")
14223 (description
14224 "This package provides a plugin for Setuptools for revision control with
14225 Git.")
14226 (license license:bsd-3)))
14227
14228 (define-public python-pyclipper
14229 (package
14230 (name "python-pyclipper")
14231 (version "1.1.0.post3")
14232 (source
14233 (origin
14234 (method url-fetch)
14235 (uri (pypi-uri "pyclipper" version ".zip"))
14236 (sha256
14237 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
14238 (modules '((guix build utils)))
14239 (snippet
14240 '(begin
14241 ;; This file is generated by Cython.
14242 (delete-file "pyclipper/pyclipper.cpp") #t))))
14243 (build-system python-build-system)
14244 (arguments
14245 `(#:phases
14246 (modify-phases %standard-phases
14247 (add-before 'build 'cythonize-sources
14248 (lambda _
14249 (with-directory-excursion "pyclipper"
14250 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
14251 (propagated-inputs
14252 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
14253 (native-inputs
14254 `(("python-cython" ,python-cython)
14255 ("python-pytest" ,python-pytest)
14256 ("python-pytest-runner" ,python-pytest-runner)
14257 ("python-unittest2" ,python-unittest2)
14258 ("unzip" ,unzip)))
14259 (home-page "https://github.com/greginvm/pyclipper")
14260 (synopsis "Wrapper for Angus Johnson's Clipper library")
14261 (description
14262 "Pyclipper is a Cython wrapper for the C++ translation of the
14263 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
14264 (license license:expat)))
14265
14266 (define-public python2-pyclipper
14267 (package-with-python2 python-pyclipper))
14268
14269 (define-public python2-booleanoperations
14270 (package
14271 (name "python2-booleanoperations")
14272 (version "0.7.1")
14273 (source
14274 (origin
14275 (method url-fetch)
14276 (uri (pypi-uri "booleanOperations" version ".zip"))
14277 (sha256
14278 (base32
14279 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
14280 (build-system python-build-system)
14281 (arguments
14282 `(#:python ,python-2))
14283 (native-inputs
14284 `(("unzip" ,unzip)
14285 ("python2-pytest" ,python2-pytest)
14286 ("python2-pytest-runner" ,python2-pytest-runner)))
14287 (propagated-inputs
14288 `(("python-fonttools" ,python2-fonttools)
14289 ("python-pyclipper" ,python2-pyclipper)
14290 ("python-ufolib" ,python2-ufolib)))
14291 (home-page "https://github.com/typemytype/booleanOperations")
14292 (synopsis "Boolean operations on paths")
14293 (description
14294 "BooleanOperations provides a Python library that enables
14295 boolean operations on paths.")
14296 (license license:expat)))
14297
14298 (define-public python-tempdir
14299 (package
14300 (name "python-tempdir")
14301 (version "0.7.1")
14302 (source
14303 (origin
14304 (method url-fetch)
14305 (uri (pypi-uri "tempdir" version))
14306 (sha256
14307 (base32
14308 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
14309 (build-system python-build-system)
14310 (home-page "https://pypi.org/project/tempdir/")
14311 (arguments
14312 ;; the package has no tests
14313 '(#:tests? #f))
14314 (synopsis "Python library for managing temporary directories")
14315 (description
14316 "This library manages temporary directories that are automatically
14317 deleted with all their contents when they are no longer needed. It is
14318 particularly convenient for use in tests.")
14319 (license license:expat)))
14320
14321 (define-public python2-tempdir
14322 (package-with-python2 python-tempdir))
14323
14324 (define-public python-activepapers
14325 (package
14326 (name "python-activepapers")
14327 (version "0.2.2")
14328 (source
14329 (origin
14330 (method url-fetch)
14331 (uri (pypi-uri "ActivePapers.Py" version))
14332 (sha256
14333 (base32
14334 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
14335 (build-system python-build-system)
14336 (arguments
14337 `(#:modules ((ice-9 ftw)
14338 (srfi srfi-1)
14339 (guix build utils)
14340 (guix build python-build-system))
14341
14342 #:phases
14343 (modify-phases %standard-phases
14344 (add-after 'unpack 'delete-python2-code
14345 (lambda _
14346 (for-each delete-file
14347 '("lib/activepapers/builtins2.py"
14348 "lib/activepapers/standardlib2.py"
14349 "lib/activepapers/utility2.py"))))
14350 (replace 'check
14351 (lambda _
14352 ;; Deactivate the test cases that download files
14353 (setenv "NO_NETWORK_ACCESS" "1")
14354 ;; For some strange reason, some tests fail if nosetests runs all
14355 ;; test modules in a single execution. They pass if each test
14356 ;; module is run individually.
14357 (for-each (lambda (filename)
14358 (invoke "nosetests"
14359 (string-append "tests/" filename)))
14360 (scandir "tests"
14361 (lambda (filename)
14362 (string-suffix? ".py" filename)))))))))
14363 (native-inputs
14364 `(("python-tempdir" ,python-tempdir)
14365 ("python-nose" ,python-nose)))
14366 (propagated-inputs
14367 `(("python-h5py" ,python-h5py)))
14368 (home-page "http://www.activepapers.org/")
14369 (synopsis "Executable papers for scientific computing")
14370 (description
14371 "ActivePapers is a tool for working with executable papers, which
14372 combine data, code, and documentation in single-file packages,
14373 suitable for publication as supplementary material or on repositories
14374 such as figshare or Zenodo.")
14375 (properties `((python2-variant . ,(delay python2-activepapers))))
14376 (license license:bsd-3)))
14377
14378 (define-public python2-activepapers
14379 (let ((base (package-with-python2
14380 (strip-python2-variant python-activepapers))))
14381 (package
14382 (inherit base)
14383 (arguments
14384 (substitute-keyword-arguments (package-arguments base)
14385 ((#:phases phases)
14386 `(modify-phases ,phases
14387 (delete 'delete-python2-code)
14388 (add-after 'unpack 'delete-python3-code
14389 (lambda _
14390 (for-each delete-file
14391 '("lib/activepapers/builtins3.py"
14392 "lib/activepapers/standardlib3.py"
14393 "lib/activepapers/utility3.py")))))))))))
14394
14395 (define-public python-semver
14396 (package
14397 (name "python-semver")
14398 (version "2.9.0")
14399 (source
14400 (origin
14401 (method url-fetch)
14402 (uri (pypi-uri "semver" version))
14403 (sha256
14404 (base32
14405 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
14406 (build-system python-build-system)
14407 (native-inputs
14408 `(("python-tox" ,python-tox)
14409 ("python-virtualenv" ,python-virtualenv)))
14410 (home-page "https://github.com/k-bx/python-semver")
14411 (synopsis "Python helper for Semantic Versioning")
14412 (description "This package provides a Python library for
14413 @url{Semantic Versioning, http://semver.org/}.")
14414 (license license:bsd-3)))
14415
14416 (define-public python2-semver
14417 (package-with-python2 python-semver))
14418
14419 (define-public python-pyro4
14420 (package
14421 (name "python-pyro4")
14422 (version "4.77")
14423 (source
14424 (origin
14425 (method url-fetch)
14426 (uri (pypi-uri "Pyro4" version))
14427 (sha256
14428 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
14429 (build-system python-build-system)
14430 (arguments
14431 '(#:tests? #f)) ;FIXME: Some tests require network access.
14432 (native-inputs
14433 `(("python-cloudpickle" ,python-cloudpickle)
14434 ("python-dill" ,python-dill)
14435 ("python-msgpack" ,python-msgpack)))
14436 (propagated-inputs
14437 `(("python-serpent" ,python-serpent)))
14438 (home-page "https://pyro4.readthedocs.io")
14439 (synopsis "Distributed object middleware for Python")
14440 (description
14441 "Pyro enables you to build applications in which objects can talk to each
14442 other over the network. You can just use normal Python method calls to call
14443 objects on other machines, also known as remote procedure calls (RPC).")
14444 (license license:expat)))
14445
14446 (define-public python2-pyro
14447 (package
14448 (name "python2-pyro")
14449 (version "3.16")
14450 (source
14451 (origin
14452 (method url-fetch)
14453 (uri (pypi-uri "Pyro" version))
14454 (file-name (string-append "Pyro-" version ".tar.gz"))
14455 (sha256
14456 (base32
14457 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
14458 (build-system python-build-system)
14459 (arguments
14460 ;; Pyro is not compatible with Python 3
14461 `(#:python ,python-2
14462 ;; Pyro has no test cases for automatic execution
14463 #:tests? #f))
14464 (home-page "http://pythonhosted.org/Pyro/")
14465 (synopsis "Distributed object manager for Python")
14466 (description "Pyro is a Distributed Object Technology system
14467 written in Python that is designed to be easy to use. It resembles
14468 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
14469 which is a system and language independent Distributed Object Technology
14470 and has much more to offer than Pyro or RMI. Pyro 3.x is no
14471 longer maintained. New projects should use Pyro4 instead, which
14472 is the new Pyro version that is actively developed.")
14473 (license license:expat)))
14474
14475 (define-public python2-scientific
14476 (package
14477 (name "python2-scientific")
14478 (version "2.9.4")
14479 (source
14480 (origin
14481 (method git-fetch)
14482 (uri (git-reference
14483 (url "https://github.com/khinsen/ScientificPython")
14484 (commit (string-append "rel" version))))
14485 (file-name (git-file-name name version))
14486 (sha256
14487 (base32
14488 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
14489 (build-system python-build-system)
14490 (inputs
14491 `(("netcdf" ,netcdf)))
14492 (propagated-inputs
14493 `(("python-numpy" ,python2-numpy-1.8)
14494 ("python-pyro" ,python2-pyro)))
14495 (arguments
14496 ;; ScientificPython is not compatible with Python 3
14497 `(#:python ,python-2
14498 #:tests? #f ; No test suite
14499 #:phases
14500 (modify-phases %standard-phases
14501 (replace 'build
14502 (lambda* (#:key inputs #:allow-other-keys)
14503 (invoke "python" "setup.py" "build"
14504 (string-append "--netcdf_prefix="
14505 (assoc-ref inputs "netcdf"))))))))
14506 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
14507 (synopsis "Python modules for scientific computing")
14508 (description "ScientificPython is a collection of Python modules that are
14509 useful for scientific computing. Most modules are rather general (Geometry,
14510 physical units, automatic derivatives, ...) whereas others are more
14511 domain-specific (e.g. netCDF and PDB support). The library is currently
14512 not actively maintained and works only with Python 2 and NumPy < 1.9.")
14513 (license license:cecill-c)))
14514
14515 (define-public python2-mmtk
14516 (package
14517 (name "python2-mmtk")
14518 (version "2.7.12")
14519 (source
14520 (origin
14521 (method git-fetch)
14522 (uri (git-reference
14523 (url "https://github.com/khinsen/MMTK")
14524 (commit (string-append "rel" version))))
14525 (file-name (git-file-name name version))
14526 (sha256
14527 (base32
14528 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
14529 (build-system python-build-system)
14530 (native-inputs
14531 `(("netcdf" ,netcdf)))
14532 (propagated-inputs
14533 `(("python-scientific" ,python2-scientific)
14534 ("python-tkinter" ,python-2 "tk")))
14535 (arguments
14536 `(#:python ,python-2
14537 #:tests? #f
14538 #:phases
14539 (modify-phases %standard-phases
14540 (add-before 'build 'includes-from-scientific
14541 (lambda* (#:key inputs #:allow-other-keys)
14542 (mkdir-p "Include/Scientific")
14543 (copy-recursively
14544 (string-append
14545 (assoc-ref inputs "python-scientific")
14546 "/include/python2.7/Scientific")
14547 "Include/Scientific"))))))
14548 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
14549 (synopsis "Python library for molecular simulation")
14550 (description "MMTK is a library for molecular simulations with an emphasis
14551 on biomolecules. It provides widely used methods such as Molecular Dynamics
14552 and normal mode analysis, but also basic routines for implementing new methods
14553 for simulation and analysis. The library is currently not actively maintained
14554 and works only with Python 2 and NumPy < 1.9.")
14555 (license license:cecill-c)))
14556
14557 (define-public python-phonenumbers
14558 (package
14559 (name "python-phonenumbers")
14560 (version "8.9.1")
14561 (source
14562 (origin
14563 (method url-fetch)
14564 (uri (pypi-uri "phonenumbers" version))
14565 (sha256
14566 (base32
14567 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
14568 (build-system python-build-system)
14569 (home-page
14570 "https://github.com/daviddrysdale/python-phonenumbers")
14571 (synopsis
14572 "Python library for dealing with international phone numbers")
14573 (description
14574 "This package provides a Python port of Google's libphonenumber library.")
14575 (license license:asl2.0)))
14576
14577 (define-public python2-phonenumbers
14578 (package-with-python2 python-phonenumbers))
14579
14580 (define-public python-send2trash
14581 (package
14582 (name "python-send2trash")
14583 (version "1.5.0")
14584 (source
14585 (origin (method git-fetch)
14586 ;; Source tarball on PyPI doesn't include tests.
14587 (uri (git-reference
14588 (url "https://github.com/hsoft/send2trash.git")
14589 (commit version)))
14590 (file-name (git-file-name name version))
14591 (sha256
14592 (base32
14593 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
14594 (build-system python-build-system)
14595 (arguments
14596 '(#:phases
14597 (modify-phases %standard-phases
14598 (add-before 'check 'pre-check
14599 (lambda _
14600 (mkdir-p "/tmp/foo")
14601 (setenv "HOME" "/tmp/foo")
14602 #t)))))
14603 (home-page "https://github.com/hsoft/send2trash")
14604 (synopsis "Send files to the user's @file{~/Trash} directory")
14605 (description "This package provides a Python library to send files to the
14606 user's @file{~/Trash} directory.")
14607 (properties `((python2-variant . ,(delay python2-send2trash))))
14608 (license license:bsd-3)))
14609
14610 (define-public python2-send2trash
14611 (package
14612 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
14613 (arguments
14614 (substitute-keyword-arguments (package-arguments python-send2trash)
14615 ((#:phases phases)
14616 `(modify-phases ,phases
14617 (add-before 'check 'setenv
14618 (lambda _
14619 (setenv "PYTHONPATH"
14620 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
14621 #t))))))))
14622
14623 (define-public python-yapf
14624 (package
14625 (name "python-yapf")
14626 (version "0.29.0")
14627 (source
14628 (origin
14629 (method url-fetch)
14630 (uri (pypi-uri "yapf" version))
14631 (sha256
14632 (base32
14633 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
14634 (build-system python-build-system)
14635 (home-page "https://github.com/google/yapf")
14636 (synopsis "Formatter for Python code")
14637 (description "YAPF is a formatter for Python code. It's based off of
14638 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
14639 takes the code and reformats it to the best formatting that conforms to the
14640 style guide, even if the original code didn't violate the style guide.")
14641 (license license:asl2.0)))
14642
14643 (define-public python2-yapf
14644 (package-with-python2 python-yapf))
14645
14646 (define-public python-gyp
14647 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
14648 (revision "0"))
14649 (package
14650 (name "python-gyp")
14651 ;; Google does not release versions,
14652 ;; based on second most recent commit date.
14653 (version (git-version "0.0.0" revision commit))
14654 (source
14655 (origin
14656 ;; Google does not release tarballs,
14657 ;; git checkout is needed.
14658 (method git-fetch)
14659 (uri (git-reference
14660 (url "https://chromium.googlesource.com/external/gyp")
14661 (commit commit)))
14662 (file-name (git-file-name name version))
14663 (sha256
14664 (base32
14665 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14666 (build-system python-build-system)
14667 (home-page "https://gyp.gsrc.io/")
14668 (synopsis "GYP is a Meta-Build system")
14669 (description
14670 "GYP builds build systems for large, cross platform applications.
14671 It can be used to generate XCode projects, Visual Studio projects, Ninja build
14672 files, and Makefiles.")
14673 (license license:bsd-3))))
14674
14675 (define-public python2-gyp
14676 (package-with-python2 python-gyp))
14677
14678 (define-public python-whatever
14679 (package
14680 (name "python-whatever")
14681 (version "0.6")
14682 (source
14683 (origin
14684 (method git-fetch)
14685 (uri (git-reference
14686 (url "https://github.com/Suor/whatever")
14687 (commit version)))
14688 (file-name (git-file-name name version))
14689 (sha256
14690 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
14691 (build-system python-build-system)
14692 (arguments
14693 `(#:phases
14694 (modify-phases %standard-phases
14695 (replace 'check
14696 (lambda _
14697 (invoke "py.test"))))))
14698 (native-inputs
14699 `(("python-pytest" ,python-pytest)))
14700 (home-page "http://github.com/Suor/whatever")
14701 (synopsis "Make anonymous functions by partial application of operators")
14702 (description "@code{whatever} provides an easy way to make anonymous
14703 functions by partial application of operators.")
14704 (license license:bsd-3)))
14705
14706 (define-public python2-whatever
14707 (package-with-python2 python-whatever))
14708
14709 (define-public python-funcy
14710 (package
14711 (name "python-funcy")
14712 (version "1.11")
14713 (source
14714 (origin
14715 (method git-fetch)
14716 (uri (git-reference
14717 (url "https://github.com/Suor/funcy.git")
14718 (commit version)))
14719 (sha256
14720 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14721 (file-name (git-file-name name version))))
14722 (build-system python-build-system)
14723 (arguments
14724 `(#:phases
14725 (modify-phases %standard-phases
14726 (replace 'check
14727 (lambda _
14728 (invoke "py.test"))))))
14729 (native-inputs
14730 `(("python-pytest" ,python-pytest)
14731 ("python-whatever" ,python-whatever)))
14732 (home-page "http://github.com/Suor/funcy")
14733 (synopsis "Functional tools")
14734 (description "@code{funcy} is a library that provides functional tools.
14735 Examples are:
14736 @enumerate
14737 @item merge - Merges collections of the same type
14738 @item walk - Type-preserving map
14739 @item select - Selects a part of a collection
14740 @item take - Takes the first n items of a collection
14741 @item first - Takes the first item of a collection
14742 @item remove - Predicated-removes items of a collection
14743 @item concat - Concatenates two collections
14744 @item flatten - Flattens a collection with subcollections
14745 @item distinct - Returns only distinct items
14746 @item split - Predicated-splits a collection
14747 @item split_at - Splits a collection at a given item
14748 @item group_by - Groups items by group
14749 @item pairwise - Pairs off adjacent items
14750 @item partial - Partially-applies a function
14751 @item curry - Curries a function
14752 @item compose - Composes functions
14753 @item complement - Complements a predicate
14754 @item all_fn - \"all\" with predicate
14755 @end enumerate")
14756 (license license:bsd-3)))
14757
14758 (define-public python2-funcy
14759 (package-with-python2 python-funcy))
14760
14761 (define-public python-isoweek
14762 (package
14763 (name "python-isoweek")
14764 (version "1.3.3")
14765 (source
14766 (origin
14767 (method url-fetch)
14768 (uri (pypi-uri "isoweek" version))
14769 (sha256
14770 (base32
14771 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14772 (build-system python-build-system)
14773 (home-page "https://github.com/gisle/isoweek")
14774 (synopsis "Objects representing a week")
14775 (description "The @code{isoweek} module provide the class Week that
14776 implements the week definition of ISO 8601. This standard also defines
14777 a notation for identifying weeks; yyyyWww (where the W is a literal).
14778 Week instances stringify to this form.")
14779 (license license:bsd-3)))
14780
14781 (define-public python2-isoweek
14782 (package-with-python2 python-isoweek))
14783
14784 (define-public python-tokenize-rt
14785 (package
14786 (name "python-tokenize-rt")
14787 (version "2.0.1")
14788 (source
14789 (origin
14790 (method url-fetch)
14791 (uri (pypi-uri "tokenize-rt" version))
14792 (sha256
14793 (base32
14794 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14795 (build-system python-build-system)
14796 (home-page "https://github.com/asottile/tokenize-rt")
14797 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14798 (description
14799 "This Python library is a wrapper around @code{tokenize} from the Python
14800 standard library. It provides two additional tokens @code{ESCAPED_NL} and
14801 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14802 and @code{tokens_to_src} to roundtrip.")
14803 (license license:expat)))
14804
14805 (define-public python-future-fstrings
14806 (package
14807 (name "python-future-fstrings")
14808 (version "0.4.1")
14809 (source
14810 (origin
14811 (method url-fetch)
14812 (uri (pypi-uri "future_fstrings" version))
14813 (sha256
14814 (base32
14815 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14816 (build-system python-build-system)
14817 (propagated-inputs
14818 `(("python-tokenize-rt" ,python-tokenize-rt)))
14819 (home-page "https://github.com/asottile/future-fstrings")
14820 (synopsis "Backport of fstrings to Python < 3.6")
14821 (description
14822 "This package provides a UTF-8 compatible encoding
14823 @code{future_fstrings}, which performs source manipulation. It decodes the
14824 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
14825 @code{f} strings.")
14826 (license license:expat)))
14827
14828 (define-public python-typed-ast
14829 (package
14830 (name "python-typed-ast")
14831 (version "1.4.0")
14832 (source
14833 (origin
14834 (method git-fetch)
14835 (uri (git-reference
14836 (url "https://github.com/python/typed_ast.git")
14837 (commit version)))
14838 (sha256
14839 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
14840 (file-name (git-file-name name version))))
14841 (build-system python-build-system)
14842 (arguments
14843 `(#:modules ((guix build utils)
14844 (guix build python-build-system)
14845 (ice-9 ftw)
14846 (srfi srfi-1)
14847 (srfi srfi-26))
14848 #:phases
14849 (modify-phases %standard-phases
14850 (replace 'check
14851 (lambda _
14852 (let ((cwd (getcwd)))
14853 (setenv "PYTHONPATH"
14854 (string-append cwd "/build/"
14855 (find (cut string-prefix? "lib" <>)
14856 (scandir (string-append cwd "/build")))
14857 ":"
14858 (getenv "PYTHONPATH"))))
14859 (invoke "pytest")
14860 #t)))))
14861 (native-inputs `(("python-pytest" ,python-pytest)))
14862 (home-page "https://github.com/python/typed_ast")
14863 (synopsis "Fork of Python @code{ast} modules with type comment support")
14864 (description "This package provides a parser similar to the standard
14865 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
14866 include PEP 484 type comments and are independent of the version of Python
14867 under which they are run. The @code{typed_ast} parsers produce the standard
14868 Python AST (plus type comments), and are both fast and correct, as they are
14869 based on the CPython 2.7 and 3.7 parsers.")
14870 ;; See the file "LICENSE" for the details.
14871 (license (list license:psfl
14872 license:asl2.0
14873 license:expat)))) ;ast27/Parser/spark.py
14874
14875 (define-public python-typing
14876 (package
14877 (name "python-typing")
14878 (version "3.6.6")
14879 (source
14880 (origin
14881 (method url-fetch)
14882 (uri (pypi-uri "typing" version))
14883 (sha256
14884 (base32
14885 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
14886 (build-system python-build-system)
14887 (home-page "https://docs.python.org/3/library/typing.html")
14888 (synopsis "Type hints for Python")
14889 (description "This is a backport of the standard library @code{typing}
14890 module to Python versions older than 3.5. Typing defines a standard notation
14891 for Python function and variable type annotations. The notation can be used
14892 for documenting code in a concise, standard format, and it has been designed
14893 to also be used by static and runtime type checkers, static analyzers, IDEs
14894 and other tools.")
14895 (license license:psfl)))
14896
14897 (define-public python2-typing
14898 (package-with-python2 python-typing))
14899
14900 (define-public python-typing-extensions
14901 (package
14902 (name "python-typing-extensions")
14903 (version "3.7.2")
14904 (source
14905 (origin
14906 (method url-fetch)
14907 (uri (pypi-uri "typing_extensions" version))
14908 (sha256
14909 (base32
14910 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
14911 (build-system python-build-system)
14912 (home-page
14913 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
14914 (synopsis "Experimental type hints for Python")
14915 (description
14916 "The typing_extensions module contains additional @code{typing} hints not
14917 yet present in the of the @code{typing} standard library.
14918 Included are implementations of:
14919 @enumerate
14920 @item ClassVar
14921 @item ContextManager
14922 @item Counter
14923 @item DefaultDict
14924 @item Deque
14925 @item NewType
14926 @item NoReturn
14927 @item overload
14928 @item Protocol
14929 @item runtime
14930 @item Text
14931 @item Type
14932 @item TYPE_CHECKING
14933 @item AsyncGenerator
14934 @end enumerate\n")
14935 (license license:psfl)))
14936
14937 (define-public bpython
14938 (package
14939 (name "bpython")
14940 (version "0.18")
14941 (source
14942 (origin
14943 (method url-fetch)
14944 (uri (pypi-uri "bpython" version))
14945 (sha256
14946 (base32 "1hl6frgvr2lqaxqczl8amg9xih32b3gzv429vs0qrjb8wpdj1k2n"))))
14947 (build-system python-build-system)
14948 (arguments
14949 `(#:phases
14950 (modify-phases %standard-phases
14951 (add-after 'unpack 'remove-failing-test
14952 (lambda _
14953 ;; Remove failing test. FIXME: make it pass
14954 (delete-file "bpython/test/test_args.py")
14955 #t))
14956 (add-after 'wrap 'add-aliases
14957 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
14958 (lambda* (#:key outputs #:allow-other-keys)
14959 (let ((out (assoc-ref outputs "out")))
14960 (for-each
14961 (lambda (old new)
14962 (symlink old (string-append out "/bin/" new)))
14963 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
14964 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
14965 #t)))))
14966 (propagated-inputs
14967 `(("python-pygments" ,python-pygments)
14968 ("python-requests" ,python-requests)
14969 ("python-babel" ,python-babel) ; optional, for internationalization
14970 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
14971 ("python-greenlet" ,python-greenlet)
14972 ("python-urwid" ,python-urwid) ; for bpython-urwid only
14973 ("python-six" ,python-six)))
14974 (native-inputs
14975 `(("python-sphinx" ,python-sphinx)
14976 ("python-mock" ,python-mock)))
14977 (home-page "https://bpython-interpreter.org/")
14978 (synopsis "Fancy interface to the Python interpreter")
14979 (description "Bpython is a fancy interface to the Python
14980 interpreter. bpython's main features are
14981
14982 @enumerate
14983 @item in-line syntax highlighting,
14984 @item readline-like autocomplete with suggestions displayed as you type,
14985 @item expected parameter list for any Python function,
14986 @item \"rewind\" function to pop the last line of code from memory and
14987 re-evaluate,
14988 @item send the code you've entered off to a pastebin,
14989 @item save the code you've entered to a file, and
14990 @item auto-indentation.
14991 @end enumerate")
14992 (license license:expat)))
14993
14994 (define-public bpython2
14995 (let ((base (package-with-python2
14996 (strip-python2-variant bpython))))
14997 (package (inherit base)
14998 (name "bpython2")
14999 (arguments
15000 `(#:python ,python-2
15001 #:phases
15002 (modify-phases %standard-phases
15003 (add-after 'unpack 'remove-failing-test
15004 (lambda _
15005 ;; Remove failing test. FIXME: make it pass
15006 (delete-file "bpython/test/test_args.py")
15007 ;; Disable failing test-cases (renaming inhibits they are
15008 ;; discovered)
15009 (substitute* "bpython/test/test_curtsies_repl.py"
15010 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
15011 (string-append a "xxx_off_" b))
15012 (("^(\\s*def )(test_complex\\W)" _ a b)
15013 (string-append a "xxx_off_" b)))
15014 #t))
15015 (add-before 'build 'rename-scripts
15016 ;; rename the scripts to bypthon2, bpdb2, etc.
15017 (lambda _
15018 (substitute* "setup.py"
15019 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
15020 (string-append name "2" rest "\n"))
15021 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
15022 (string-append name "2" (or sub "") rest "\n")))
15023 #t))))))))
15024
15025 (define-public python-pyinotify
15026 (package
15027 (name "python-pyinotify")
15028 (version "0.9.6")
15029 (source (origin
15030 (method url-fetch)
15031 (uri (pypi-uri "pyinotify" version))
15032 (sha256
15033 (base32
15034 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
15035 (build-system python-build-system)
15036 (arguments `(#:tests? #f)) ;no tests
15037 (home-page "https://github.com/seb-m/pyinotify")
15038 (synopsis "Python library for monitoring inotify events")
15039 (description
15040 "@code{pyinotify} provides a Python interface for monitoring
15041 file system events on Linux.")
15042 (license license:expat)))
15043
15044 (define-public python2-pyinotify
15045 (package-with-python2 python-pyinotify))
15046
15047 ;; Ada parser uses this version.
15048 (define-public python2-quex-0.67.3
15049 (package
15050 (name "python2-quex")
15051 (version "0.67.3")
15052 (source
15053 (origin
15054 (method url-fetch)
15055 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
15056 (version-major+minor version)
15057 "/quex-" version ".zip"))
15058 (sha256
15059 (base32
15060 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
15061 (build-system python-build-system)
15062 (native-inputs
15063 `(("unzip" ,unzip)))
15064 (arguments
15065 `(#:python ,python-2
15066 #:tests? #f
15067 #:phases
15068 (modify-phases %standard-phases
15069 (delete 'configure)
15070 (delete 'build)
15071 (replace 'install
15072 (lambda* (#:key outputs #:allow-other-keys)
15073 (let* ((out (assoc-ref outputs "out"))
15074 (share/quex (string-append out "/share/quex"))
15075 (bin (string-append out "/bin")))
15076 (copy-recursively "." share/quex)
15077 (mkdir-p bin)
15078 (symlink (string-append share/quex "/quex-exe.py")
15079 (string-append bin "/quex"))
15080 #t))))))
15081 (native-search-paths
15082 (list (search-path-specification
15083 (variable "QUEX_PATH")
15084 (files '("share/quex")))))
15085 (home-page "http://quex.sourceforge.net/")
15086 (synopsis "Lexical analyzer generator in Python")
15087 (description "@code{quex} is a lexical analyzer generator in Python.")
15088 (license license:lgpl2.1+))) ; Non-military
15089
15090 (define-public python2-quex
15091 (package (inherit python2-quex-0.67.3)
15092 (name "python2-quex")
15093 (version "0.68.1")
15094 (source
15095 (origin
15096 (method url-fetch)
15097 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
15098 (sha256
15099 (base32
15100 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
15101 (file-name (string-append name "-" version ".tar.gz"))))))
15102
15103 (define-public python-more-itertools
15104 (package
15105 (name "python-more-itertools")
15106 (version "7.1.0")
15107 (source
15108 (origin
15109 (method url-fetch)
15110 (uri (pypi-uri "more-itertools" version))
15111 (sha256
15112 (base32
15113 "16phg2f2dvm6ci5wr49ncha5lmc0m2in3bsl33c61vzca4gkvd4b"))))
15114 (build-system python-build-system)
15115 (home-page "https://github.com/erikrose/more-itertools")
15116 (synopsis "More routines for operating on iterables, beyond itertools")
15117 (description "Python's built-in @code{itertools} module implements a
15118 number of iterator building blocks inspired by constructs from APL, Haskell,
15119 and SML. @code{more-itertools} includes additional building blocks for
15120 working with iterables.")
15121 (properties `((python2-variant . ,(delay python2-more-itertools))))
15122 (license license:expat)))
15123
15124 ;; The 5.x series are the last versions supporting Python 2.7.
15125 (define-public python2-more-itertools
15126 (package
15127 (inherit python-more-itertools)
15128 (name "python2-more-itertools")
15129 (version "5.0.0")
15130 (source (origin
15131 (method url-fetch)
15132 (uri (pypi-uri "more-itertools" version))
15133 (sha256
15134 (base32
15135 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
15136 (arguments
15137 `(#:python ,python2-minimal))
15138 (propagated-inputs
15139 `(("python2-six" ,python2-six-bootstrap)))))
15140
15141 (define-public python-latexcodec
15142 (package
15143 (name "python-latexcodec")
15144 (version "1.0.7")
15145 (source
15146 (origin
15147 (method url-fetch)
15148 (uri (pypi-uri "latexcodec" version))
15149 (sha256
15150 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
15151 (build-system python-build-system)
15152 (inputs
15153 `(("python-six" ,python-six)))
15154 (home-page "https://readthedocs.org/projects/latexcodec/")
15155 (synopsis "Work with LaTeX code in Python")
15156 (description "Lexer and codec to work with LaTeX code in Python.")
15157 (license license:expat)))
15158
15159 (define-public python-pybtex
15160 (package
15161 (name "python-pybtex")
15162 (version "0.22.2")
15163 (source
15164 (origin
15165 (method url-fetch)
15166 (uri (pypi-uri "pybtex" version))
15167 (sha256
15168 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
15169 (build-system python-build-system)
15170 (native-inputs
15171 `(("python-nose" ,python-nose)))
15172 (inputs
15173 `(("python-latexcodec" ,python-latexcodec)
15174 ("python-pyyaml" ,python-pyyaml)
15175 ("python-six" ,python-six)))
15176 (arguments
15177 `(#:test-target "nosetests"))
15178 (home-page "https://pybtex.org/")
15179 (synopsis "BibTeX-compatible bibliography processor")
15180 (description "Pybtex is a BibTeX-compatible bibliography processor written
15181 in Python. You can simply type pybtex instead of bibtex.")
15182 (license license:expat)))
15183
15184 (define-public python-onetimepass
15185 (package
15186 (name "python-onetimepass")
15187 (version "1.0.1")
15188 (source
15189 (origin
15190 (method url-fetch)
15191 (uri (pypi-uri "onetimepass" version))
15192 (sha256
15193 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
15194 (build-system python-build-system)
15195 (propagated-inputs `(("python-six" ,python-six)))
15196 (home-page "https://github.com/tadeck/onetimepass/")
15197 (synopsis "One-time password library")
15198 (description "Python one-time password library for HMAC-based (HOTP) and
15199 time-based (TOTP) passwords.")
15200 (license license:expat)))
15201
15202 (define-public python-parso
15203 (package
15204 (name "python-parso")
15205 (version "0.5.2")
15206 (source
15207 (origin
15208 (method url-fetch)
15209 (uri (pypi-uri "parso" version))
15210 (sha256
15211 (base32
15212 "1qgvrkpma7vylrk047mxxvqd66nwqk978n3ig2w8iz9m3bgjbksm"))))
15213 (native-inputs
15214 `(("python-pytest" ,python-pytest)))
15215 (build-system python-build-system)
15216 (arguments
15217 `(#:phases (modify-phases %standard-phases
15218 (replace 'check
15219 (lambda _ (invoke "pytest" "-vv"))))))
15220 (home-page "https://github.com/davidhalter/parso")
15221 (synopsis "Python Parser")
15222 (description "Parso is a Python parser that supports error recovery and
15223 round-trip parsing for different Python versions (in multiple Python versions).
15224 Parso is also able to list multiple syntax errors in your Python file.")
15225 (license license:expat)))
15226
15227 (define-public python2-parso
15228 (package-with-python2 python-parso))
15229
15230 (define-public python-async-generator
15231 (package
15232 (name "python-async-generator")
15233 (version "1.10")
15234 (source
15235 (origin
15236 (method url-fetch)
15237 (uri (pypi-uri "async_generator" version))
15238 (sha256
15239 (base32
15240 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
15241 (build-system python-build-system)
15242 (native-inputs
15243 `(("python-pytest" ,python-pytest)))
15244 (home-page "https://github.com/python-trio/async_generator")
15245 (synopsis "Async generators and context managers for Python 3.5+")
15246 (description "@code{async_generator} back-ports Python 3.6's native async
15247 generators and Python 3.7's context managers into Python 3.5.")
15248 ;; Dual licensed.
15249 (license (list license:expat license:asl2.0))))
15250
15251 (define-public python-async-timeout
15252 (package
15253 (name "python-async-timeout")
15254 (version "3.0.1")
15255 (source
15256 (origin
15257 (method url-fetch)
15258 (uri (pypi-uri "async-timeout" version))
15259 (sha256
15260 (base32
15261 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
15262 (build-system python-build-system)
15263 (home-page "https://github.com/aio-libs/async_timeout/")
15264 (synopsis "Timeout context manager for asyncio programs")
15265 (description "@code{async-timeout} provides a timeout timeout context
15266 manager compatible with @code{asyncio}.")
15267 (license license:asl2.0)))
15268
15269 (define-public python-glob2
15270 (package
15271 (name "python-glob2")
15272 (version "0.7")
15273 (source
15274 (origin
15275 (method git-fetch)
15276 (uri (git-reference
15277 (url "https://github.com/miracle2k/python-glob2.git")
15278 (commit (string-append "v" version))))
15279 (file-name (git-file-name name version))
15280 (sha256
15281 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
15282 (build-system python-build-system)
15283 (home-page "https://github.com/miracle2k/python-glob2/")
15284 (synopsis "Extended Version of the python buildin glob module")
15285 (description "This is an extended version of the Python
15286 @url{http://docs.python.org/library/glob.html, built-in glob module} which
15287 adds:
15288
15289 @itemize
15290 @item The ability to capture the text matched by glob patterns, and return
15291 those matches alongside the file names.
15292 @item A recursive @code{**} globbing syntax, akin for example to the
15293 @code{globstar} option of Bash.
15294 @item The ability to replace the file system functions used, in order to glob
15295 on virtual file systems.
15296 @item Compatible with Python 2 and Python 3 (tested with 3.3).
15297 @end itemize
15298
15299 Glob2 currently based on the glob code from Python 3.3.1.")
15300 (license license:bsd-2)))
15301
15302 (define-public python2-glob2
15303 (package-with-python2 python-glob2))
15304
15305 (define-public python-gipc
15306 (package
15307 (name "python-gipc")
15308 (version "0.6.0")
15309 (source
15310 (origin
15311 (method url-fetch)
15312 (uri (pypi-uri "gipc" version ".zip"))
15313 (sha256
15314 (base32
15315 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
15316 (build-system python-build-system)
15317 (native-inputs
15318 `(("unzip" ,unzip)))
15319 (propagated-inputs
15320 `(("python-gevent" ,python-gevent)))
15321 (home-page "http://gehrcke.de/gipc")
15322 (synopsis "Child process management in the context of gevent")
15323 (description "Usage of Python's multiprocessing package in a
15324 gevent-powered application may raise problems. With @code{gipc},
15325 process-based child processes can safely be created anywhere within a
15326 gevent-powered application.")
15327 (license license:expat)))
15328
15329 (define-public python2-gipc
15330 (package-with-python2 python-gipc))
15331
15332 (define-public python-fusepy
15333 (package
15334 (name "python-fusepy")
15335 (version "2.0.4")
15336 (source
15337 (origin
15338 (method url-fetch)
15339 (uri (pypi-uri "fusepy" version))
15340 (sha256
15341 (base32
15342 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
15343 (build-system python-build-system)
15344 (arguments
15345 `(#:phases
15346 (modify-phases %standard-phases
15347 (add-before 'build 'set-library-file-name
15348 (lambda* (#:key inputs #:allow-other-keys)
15349 (let ((fuse (assoc-ref inputs "fuse")))
15350 (substitute* "fuse.py"
15351 (("find_library\\('fuse'\\)")
15352 (string-append "'" fuse "/lib/libfuse.so'")))
15353 #t))))))
15354 (propagated-inputs
15355 `(("fuse" ,fuse)))
15356 (home-page "https://github.com/fusepy/fusepy")
15357 (synopsis "Simple ctypes bindings for FUSE")
15358 (description "Python module that provides a simple interface to FUSE and
15359 MacFUSE. The binding is created using the standard @code{ctypes} library.")
15360 (license license:isc)))
15361
15362 (define-public python2-fusepy
15363 (package-with-python2 python-fusepy))
15364
15365 (define-public python2-gdrivefs
15366 (package
15367 (name "python2-gdrivefs")
15368 (version "0.14.9")
15369 (source
15370 (origin
15371 (method url-fetch)
15372 (uri (pypi-uri "gdrivefs" version))
15373 (sha256
15374 (base32
15375 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
15376 (build-system python-build-system)
15377 (arguments
15378 `(#:python ,python-2
15379 #:phases
15380 (modify-phases %standard-phases
15381 (add-before 'build 'patch-setup-py
15382 (lambda _
15383 ;; Update requirements from dependency==version
15384 ;; to dependency>=version
15385 (substitute* "gdrivefs/resources/requirements.txt"
15386 (("==") ">="))
15387 #t)))))
15388 (native-inputs
15389 `(("python2-gipc" ,python2-gipc)
15390 ("python2-gevent" ,python2-gevent)
15391 ("python2-greenlet" ,python2-greenlet)
15392 ("python2-httplib2" ,python2-httplib2)
15393 ("python2-uritemplate" ,python2-uritemplate)
15394 ("python2-oauth2client" ,python2-oauth2client)
15395 ("python2-six" ,python2-six)))
15396 (propagated-inputs
15397 `(("python2-dateutil" ,python2-dateutil)
15398 ("python2-fusepy" ,python2-fusepy)
15399 ("python2-google-api-client" ,python2-google-api-client)))
15400 (home-page "https://github.com/dsoprea/GDriveFS")
15401 (synopsis "Mount Google Drive as a local file system")
15402 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
15403 under Python 2.7.")
15404 (license license:gpl2)))
15405
15406 (define-public pybind11
15407 (package
15408 (name "pybind11")
15409 (version "2.4.3")
15410 (source (origin
15411 (method git-fetch)
15412 (uri (git-reference
15413 (url "https://github.com/pybind/pybind11.git")
15414 (commit (string-append "v" version))))
15415 (sha256
15416 (base32
15417 "0k89w4bsfbpzw963ykg1cyszi3h3nk393qd31m6y46pcfxkqh4rd"))
15418 (file-name (git-file-name name version))))
15419 (build-system cmake-build-system)
15420 (native-inputs
15421 `(("python" ,python-wrapper)
15422
15423 ;; The following dependencies are used for tests.
15424 ("python-pytest" ,python-pytest)
15425 ("catch" ,catch-framework2-1)
15426 ("eigen" ,eigen)))
15427 (arguments
15428 `(#:configure-flags
15429 (list (string-append "-DCATCH_INCLUDE_DIR="
15430 (assoc-ref %build-inputs "catch")
15431 "/include/catch"))
15432
15433 #:phases (modify-phases %standard-phases
15434 (add-after 'install 'install-python
15435 (lambda* (#:key outputs #:allow-other-keys)
15436 (let ((out (assoc-ref outputs "out")))
15437 (with-directory-excursion "../source"
15438 (setenv "PYBIND11_USE_CMAKE" "yes")
15439 (invoke "python" "setup.py" "install"
15440 "--single-version-externally-managed"
15441 "--root=/"
15442 (string-append "--prefix=" out)))))))
15443
15444 #:test-target "check"))
15445 (home-page "https://github.com/pybind/pybind11/")
15446 (synopsis "Seamless operability between C++11 and Python")
15447 (description
15448 "@code{pybind11} is a lightweight header-only library that exposes C++
15449 types in Python and vice versa, mainly to create Python bindings of existing
15450 C++ code. Its goals and syntax are similar to the @code{Boost.Python}
15451 library: to minimize boilerplate code in traditional extension modules by
15452 inferring type information using compile-time introspection.")
15453 (license license:bsd-3)))
15454
15455 (define-public python-fasteners
15456 (package
15457 (name "python-fasteners")
15458 (version "0.14.1")
15459 (source
15460 (origin
15461 (method url-fetch)
15462 (uri (pypi-uri "fasteners" version))
15463 (sha256
15464 (base32
15465 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
15466 (build-system python-build-system)
15467 (propagated-inputs
15468 `(("python-monotonic" ,python-monotonic)
15469 ("python-six" ,python-six)
15470 ("python-testtools" ,python-testtools)))
15471 (home-page "https://github.com/harlowja/fasteners")
15472 (synopsis "Python package that provides useful locks")
15473 (description
15474 "This package provides a Python program that provides following locks:
15475
15476 @itemize
15477 @item Locking decorator
15478 @item Reader-writer locks
15479 @item Inter-process locks
15480 @item Generic helpers
15481 @end itemize\n")
15482 (properties `((python2-variant . ,(delay python2-fasteners))))
15483 (license license:asl2.0)))
15484
15485 (define-public python2-fasteners
15486 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
15487 (package
15488 (inherit base)
15489 (propagated-inputs
15490 `(("python2-futures" ,python2-futures)
15491 ,@(package-propagated-inputs base))))))
15492
15493 (define-public python-requests-file
15494 (package
15495 (name "python-requests-file")
15496 (version "1.4.3")
15497 (source
15498 (origin
15499 (method url-fetch)
15500 (uri (pypi-uri "requests-file" version))
15501 (sha256
15502 (base32
15503 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
15504 (build-system python-build-system)
15505 (propagated-inputs
15506 `(("python-requests" ,python-requests)
15507 ("python-six" ,python-six)))
15508 (home-page
15509 "https://github.com/dashea/requests-file")
15510 (synopsis "File transport adapter for Requests")
15511 (description
15512 "Requests-File is a transport adapter for use with the Requests Python
15513 library to allow local file system access via @code{file://} URLs.")
15514 (license license:asl2.0)))
15515
15516 (define-public python2-requests-file
15517 (package-with-python2 python-requests-file))
15518
15519 (define-public python-tldextract
15520 (package
15521 (name "python-tldextract")
15522 (version "2.2.0")
15523 (source
15524 (origin
15525 (method url-fetch)
15526 (uri (pypi-uri "tldextract" version))
15527 (sha256
15528 (base32
15529 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
15530 (build-system python-build-system)
15531 (native-inputs
15532 `(("python-pytest" ,python-pytest)
15533 ("python-responses" ,python-responses)))
15534 (propagated-inputs
15535 `(("python-idna" ,python-idna)
15536 ("python-requests" ,python-requests)
15537 ("python-requests-file" ,python-requests-file)))
15538 (home-page
15539 "https://github.com/john-kurkowski/tldextract")
15540 (synopsis
15541 "Separate the TLD from the registered domain and subdomains of a URL")
15542 (description
15543 "TLDExtract accurately separates the TLD from the registered domain and
15544 subdomains of a URL, using the Public Suffix List. By default, this includes
15545 the public ICANN TLDs and their exceptions. It can optionally support the
15546 Public Suffix List's private domains as well.")
15547 (license license:bsd-3)))
15548
15549 (define-public python2-tldextract
15550 (package-with-python2 python-tldextract))
15551
15552 (define-public python-pynamecheap
15553 (package
15554 (name "python-pynamecheap")
15555 (version "0.0.3")
15556 (source
15557 (origin
15558 (method url-fetch)
15559 (uri (pypi-uri "PyNamecheap" version))
15560 (sha256
15561 (base32
15562 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
15563 (build-system python-build-system)
15564 (propagated-inputs
15565 `(("python-requests" ,python-requests)))
15566 (home-page
15567 "https://github.com/Bemmu/PyNamecheap")
15568 (synopsis
15569 "Namecheap API client in Python")
15570 (description
15571 "PyNamecheap is a Namecheap API client in Python.")
15572 (license license:expat)))
15573
15574 (define-public python2-pynamecheap
15575 (package-with-python2 python-pynamecheap))
15576
15577 (define-public python-dns-lexicon
15578 (package
15579 (name "python-dns-lexicon")
15580 (version "2.4.0")
15581 (source
15582 (origin
15583 (method url-fetch)
15584 (uri (pypi-uri "dns-lexicon" version))
15585 (sha256
15586 (base32
15587 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
15588 (build-system python-build-system)
15589 (arguments
15590 `(#:tests? #f)) ;requires internet access
15591 (propagated-inputs
15592 `(("python-future" ,python-future)
15593 ("python-pynamecheap" ,python-pynamecheap)
15594 ("python-requests" ,python-requests)
15595 ("python-tldextract" ,python-tldextract)
15596 ("python-urllib3" ,python-urllib3)))
15597 (home-page "https://github.com/AnalogJ/lexicon")
15598 (synopsis
15599 "Manipulate DNS records on various DNS providers")
15600 (description
15601 "Lexicon provides a way to manipulate DNS records on multiple DNS
15602 providers in a standardized way. It has a CLI but it can also be used as a
15603 Python library. It was designed to be used in automation, specifically with
15604 Let's Encrypt.")
15605 (license license:expat)))
15606
15607 (define-public python2-dns-lexicon
15608 (package-with-python2 python-dns-lexicon))
15609
15610 (define-public python-commandlines
15611 (package
15612 (name "python-commandlines")
15613 (version "0.4.1")
15614 (source
15615 (origin
15616 (method url-fetch)
15617 (uri (pypi-uri "commandlines" version))
15618 (sha256
15619 (base32
15620 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15621 (build-system python-build-system)
15622 (home-page "https://github.com/chrissimpkins/commandlines")
15623 (synopsis "Command line argument to object parsing library")
15624 (description
15625 "@code{Commandlines} is a Python library for command line application
15626 development that supports command line argument parsing, command string
15627 validation testing and application logic.")
15628 (license license:expat)))
15629
15630 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15631 ;; python-numba. They have a very unflexible relationship.
15632 (define-public python-numba
15633 (package
15634 (name "python-numba")
15635 (version "0.46.0")
15636 (source
15637 (origin
15638 (method url-fetch)
15639 (uri (pypi-uri "numba" version))
15640 (sha256
15641 (base32
15642 "1vnfzcq6fcnkmdms6114d49awvvj5181fl7z1wlha27qc2paxjy2"))))
15643 (build-system python-build-system)
15644 (arguments
15645 `(#:modules ((guix build utils)
15646 (guix build python-build-system)
15647 (ice-9 ftw)
15648 (srfi srfi-1)
15649 (srfi srfi-26))
15650 #:phases
15651 (modify-phases %standard-phases
15652 (add-after 'unpack 'disable-proprietary-features
15653 (lambda _
15654 (setenv "NUMBA_DISABLE_HSA" "1")
15655 (setenv "NUMBA_DISABLE_CUDA" "1")
15656 #t))
15657 (add-after 'unpack 'remove-failing-tests
15658 (lambda _
15659 ;; FIXME: These tests fail for unknown reasons:
15660 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15661 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15662 (substitute* "numba/tests/test_dispatcher.py"
15663 (("def test(_non_writable_pycache)" _ m)
15664 (string-append "def guix_skip" m))
15665 (("def test(_non_creatable_pycache)" _ m)
15666 (string-append "def guix_skip" m))
15667 (("def test(_frozen)" _ m)
15668 (string-append "def guix_skip" m)))
15669
15670 ;; These tests fail because we don't run the tests from the build
15671 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
15672 ;; They are in numba.tests.test_pycc.TestDistutilsSupport.
15673 (substitute* "numba/tests/test_pycc.py"
15674 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15675 (string-append "def guix_skip" m)))
15676
15677 ;; These tests fail because our version of Python does not have
15678 ;; a recognizable front-end for the Numba distribution to use
15679 ;; to check against.
15680 (substitute* "numba/tests/test_entrypoints.py"
15681 (("def test(_init_entrypoint)" _ m)
15682 (string-append "def guix_skip" m)))
15683 (substitute* "numba/tests/test_jitclasses.py"
15684 (("def test(_jitclass_longlabel_not_truncated)" _ m)
15685 (string-append "def guix_skip" m)))
15686 #t))
15687 (replace 'check
15688 (lambda _
15689 (let ((cwd (getcwd)))
15690 (setenv "PYTHONPATH"
15691 (string-append cwd "/build/"
15692 (find (cut string-prefix? "lib" <>)
15693 (scandir (string-append cwd "/build")))
15694 ":"
15695 (getenv "PYTHONPATH")))
15696 ;; Something is wrong with the PYTHONPATH when running the
15697 ;; tests from the build directory, as it complains about not being
15698 ;; able to import certain modules.
15699 (with-directory-excursion "/tmp"
15700 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15701 #t)))))
15702 (propagated-inputs
15703 `(("python-llvmlite" ,python-llvmlite)
15704 ("python-numpy" ,python-numpy)
15705 ("python-singledispatch" ,python-singledispatch)))
15706 ;; Needed for tests.
15707 (inputs
15708 `(("python-jinja2" ,python-jinja2)
15709 ("python-pygments" ,python-pygments)))
15710 (home-page "https://numba.pydata.org")
15711 (synopsis "Compile Python code using LLVM")
15712 (description "Numba gives you the power to speed up your applications with
15713 high performance functions written directly in Python. With a few
15714 annotations, array-oriented and math-heavy Python code can be just-in-time
15715 compiled to native machine instructions, similar in performance to C, C++ and
15716 Fortran, without having to switch languages or Python interpreters.
15717
15718 Numba works by generating optimized machine code using the LLVM compiler
15719 infrastructure at import time, runtime, or statically (using the included pycc
15720 tool).")
15721 (license license:bsd-3)))
15722
15723 (define-public python-anndata
15724 (package
15725 (name "python-anndata")
15726 (version "0.6.18")
15727 (source
15728 (origin
15729 (method url-fetch)
15730 (uri (pypi-uri "anndata" version))
15731 (sha256
15732 (base32
15733 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
15734 (build-system python-build-system)
15735 (propagated-inputs
15736 `(("python-h5py" ,python-h5py)
15737 ("python-natsort" ,python-natsort)
15738 ("python-pandas" ,python-pandas)
15739 ("python-scipy" ,python-scipy)))
15740 (home-page "https://github.com/theislab/anndata")
15741 (synopsis "Annotated data for data analysis pipelines")
15742 (description "Anndata is a package for simple (functional) high-level APIs
15743 for data analysis pipelines. In this context, it provides an efficient,
15744 scalable way of keeping track of data together with learned annotations and
15745 reduces the code overhead typically encountered when using a mostly
15746 object-oriented library such as @code{scikit-learn}.")
15747 (license license:bsd-3)))
15748
15749 (define-public python-dill
15750 (package
15751 (name "python-dill")
15752 (version "0.3.1.1")
15753 (source
15754 (origin
15755 (method url-fetch)
15756 (uri (pypi-uri "dill" version))
15757 (sha256
15758 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
15759 (build-system python-build-system)
15760 (arguments
15761 `(#:phases
15762 (modify-phases %standard-phases
15763 (replace 'check
15764 (lambda _
15765 (with-directory-excursion "/tmp"
15766 (invoke "nosetests" "-v"))
15767 #t)))))
15768 (native-inputs
15769 `(("python-nose" ,python-nose)))
15770 (home-page "https://pypi.org/project/dill/")
15771 (synopsis "Serialize all of Python")
15772 (description "Dill extends Python's @code{pickle} module for serializing
15773 and de-serializing Python objects to the majority of the built-in Python
15774 types. Dill provides the user the same interface as the @code{pickle} module,
15775 and also includes some additional features. In addition to pickling Python
15776 objects, @code{dill} provides the ability to save the state of an interpreter
15777 session in a single command. Hence, it would be feasible to save a
15778 interpreter session, close the interpreter, ship the pickled file to another
15779 computer, open a new interpreter, unpickle the session and thus continue from
15780 the saved state of the original interpreter session.")
15781 (license license:bsd-3)))
15782
15783 (define-public python-multiprocess
15784 (package
15785 (name "python-multiprocess")
15786 (version "0.70.9")
15787 (source
15788 (origin
15789 (method url-fetch)
15790 (uri (pypi-uri "multiprocess" version))
15791 (sha256
15792 (base32
15793 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
15794 (build-system python-build-system)
15795 (arguments
15796 `(#:phases
15797 (modify-phases %standard-phases
15798 (add-after 'unpack 'disable-broken-tests
15799 (lambda _
15800 ;; This test is broken as there is no keyboard interrupt.
15801 (substitute* "py3.7/multiprocess/tests/__init__.py"
15802 (("^(.*)def test_wait_result"
15803 line indent)
15804 (string-append indent
15805 "@unittest.skip(\"Disabled by Guix\")\n"
15806 line)))
15807 #t))
15808 ;; Tests must be run after installation.
15809 (delete 'check)
15810 (add-after 'install 'check
15811 (lambda* (#:key inputs outputs #:allow-other-keys)
15812 (add-installed-pythonpath inputs outputs)
15813 (invoke "python" "-m" "multiprocess.tests")
15814 #t)))))
15815 (propagated-inputs
15816 `(("python-dill" ,python-dill)))
15817 (home-page "https://pypi.org/project/multiprocess/")
15818 (synopsis "Multiprocessing and multithreading in Python")
15819 (description
15820 "This package is a fork of the multiprocessing Python package, a package
15821 which supports the spawning of processes using the API of the standard
15822 library's @code{threading} module.")
15823 (license license:bsd-3)))
15824
15825 (define-public python-toolz
15826 (package
15827 (name "python-toolz")
15828 (version "0.9.0")
15829 (source
15830 (origin
15831 (method url-fetch)
15832 (uri (pypi-uri "toolz" version))
15833 (sha256
15834 (base32
15835 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
15836 (build-system python-build-system)
15837 ;; FIXME: tests cannot be computed: "Can't perform this operation for
15838 ;; unregistered loader type"
15839 (arguments '(#:tests? #f))
15840 (home-page "https://github.com/pytoolz/toolz/")
15841 (synopsis "List processing tools and functional utilities")
15842 (description
15843 "This package provides a set of utility functions for iterators,
15844 functions, and dictionaries.")
15845 (license license:bsd-3)))
15846
15847 (define-public python2-toolz
15848 (package-with-python2 python-toolz))
15849
15850 (define-public python-cytoolz
15851 (package
15852 (name "python-cytoolz")
15853 (version "0.9.0.1")
15854 (source
15855 (origin
15856 (method url-fetch)
15857 (uri (pypi-uri "cytoolz" version))
15858 (sha256
15859 (base32
15860 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
15861 (build-system python-build-system)
15862 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
15863 ;; 'exceptions'"
15864 (arguments '(#:tests? #f))
15865 (propagated-inputs
15866 `(("python-toolz" ,python-toolz)))
15867 (native-inputs
15868 `(("python-cython" ,python-cython)))
15869 (home-page "https://github.com/pytoolz/cytoolz")
15870 (synopsis "High performance functional utilities")
15871 (description
15872 "The cytoolz package implements the same API as provided by toolz. The
15873 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
15874 that is accessible to other projects developed in Cython.")
15875 (license license:bsd-3)))
15876
15877 (define-public python-sortedcontainers
15878 (package
15879 (name "python-sortedcontainers")
15880 (version "2.1.0")
15881 (source
15882 (origin
15883 (method url-fetch)
15884 (uri (pypi-uri "sortedcontainers" version))
15885 (sha256
15886 (base32
15887 "0fm0w5id2yhqld95hg2m636vjgkz377rvgdfqaxc25vbylr9lklp"))))
15888 (build-system python-build-system)
15889 (native-inputs
15890 `(("python-tox" ,python-tox)))
15891 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
15892 (synopsis "Sorted List, Sorted Dict, Sorted Set")
15893 (description
15894 "This package provides a sorted collections library, written in
15895 pure-Python.")
15896 (license license:asl2.0)))
15897
15898 (define-public python-cloudpickle
15899 (package
15900 (name "python-cloudpickle")
15901 (version "0.6.1")
15902 (source
15903 (origin
15904 (method url-fetch)
15905 (uri (pypi-uri "cloudpickle" version))
15906 (sha256
15907 (base32
15908 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
15909 (build-system python-build-system)
15910 ;; FIXME: there are 5 errors in 122 tests:
15911 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
15912 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
15913 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15914 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15915 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
15916 ;; TypeError: cannot serialize '_io.BufferedRandom' object
15917 (arguments '(#:tests? #f))
15918 (native-inputs
15919 `(("python-pytest" ,python-pytest)
15920 ("python-mock" ,python-mock)
15921 ("python-tornado" ,python-tornado)))
15922 (home-page "https://github.com/cloudpipe/cloudpickle")
15923 (synopsis "Extended pickling support for Python objects")
15924 (description
15925 "Cloudpickle makes it possible to serialize Python constructs not
15926 supported by the default pickle module from the Python standard library. It
15927 is especially useful for cluster computing where Python expressions are
15928 shipped over the network to execute on remote hosts, possibly close to the
15929 data.")
15930 (license license:bsd-3)))
15931
15932 (define-public python2-cloudpickle
15933 (package-with-python2 python-cloudpickle))
15934
15935 (define-public python-locket
15936 (package
15937 (name "python-locket")
15938 (version "0.2.0")
15939 (source
15940 (origin
15941 (method url-fetch)
15942 (uri (pypi-uri "locket" version))
15943 (sha256
15944 (base32
15945 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
15946 (build-system python-build-system)
15947 (home-page "https://github.com/mwilliamson/locket.py")
15948 (synopsis "File-based locks for Python")
15949 (description
15950 "Locket implements a lock that can be used by multiple processes provided
15951 they use the same path.")
15952 (license license:bsd-2)))
15953
15954 (define-public python2-locket
15955 (package-with-python2 python-locket))
15956
15957 (define-public python-blosc
15958 (package
15959 (name "python-blosc")
15960 (version "1.5.1")
15961 (source
15962 (origin
15963 (method url-fetch)
15964 (uri (pypi-uri "blosc" version))
15965 (sha256
15966 (base32
15967 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
15968 (build-system python-build-system)
15969 ;; FIXME: all tests pass, but then this error is printed:
15970 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
15971 (arguments '(#:tests? #f))
15972 (propagated-inputs
15973 `(("python-numpy" ,python-numpy)))
15974 (home-page "https://github.com/blosc/python-blosc")
15975 (synopsis "Python wrapper for the Blosc data compressor library")
15976 (description "Blosc is a high performance compressor optimized for binary
15977 data. It has been designed to transmit data to the processor cache faster
15978 than the traditional, non-compressed, direct memory fetch approach via a
15979 @code{memcpy()} system call.
15980
15981 Blosc works well for compressing numerical arrays that contains data with
15982 relatively low entropy, like sparse data, time series, grids with
15983 regular-spaced values, etc.
15984
15985 This Python package wraps the Blosc library.")
15986 (license license:bsd-3)))
15987
15988 (define-public python2-blosc
15989 (package-with-python2 python-blosc))
15990
15991 (define-public python-partd
15992 (package
15993 (name "python-partd")
15994 (version "0.3.9")
15995 (source
15996 (origin
15997 (method url-fetch)
15998 (uri (pypi-uri "partd" version))
15999 (sha256
16000 (base32
16001 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
16002 (build-system python-build-system)
16003 (propagated-inputs
16004 `(("python-blosc" ,python-blosc)
16005 ("python-locket" ,python-locket)
16006 ("python-numpy" ,python-numpy)
16007 ("python-pandas" ,python-pandas)
16008 ("python-pyzmq" ,python-pyzmq)
16009 ("python-toolz" ,python-toolz)))
16010 (home-page "https://github.com/dask/partd/")
16011 (synopsis "Appendable key-value storage")
16012 (description "Partd stores key-value pairs. Values are raw bytes. We
16013 append on old values. Partd excels at shuffling operations.")
16014 (license license:bsd-3)))
16015
16016 (define-public python2-partd
16017 (package-with-python2 python-partd))
16018
16019 (define-public python-fsspec
16020 (package
16021 (name "python-fsspec")
16022 (version "0.6.1")
16023 (source
16024 (origin
16025 (method url-fetch)
16026 (uri (pypi-uri "fsspec" version))
16027 (sha256
16028 (base32
16029 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
16030 (build-system python-build-system)
16031 (arguments '(#:tests? #f)) ; there are none
16032 (home-page "https://github.com/intake/filesystem_spec")
16033 (synopsis "File-system specification")
16034 (description "The purpose of this package is to produce a template or
16035 specification for a file-system interface, that specific implementations
16036 should follow, so that applications making use of them can rely on a common
16037 behavior and not have to worry about the specific internal implementation
16038 decisions with any given backend.")
16039 (license license:bsd-3)))
16040
16041 (define-public python-dask
16042 (package
16043 (name "python-dask")
16044 (version "2.9.0")
16045 (source
16046 (origin
16047 (method url-fetch)
16048 (uri (pypi-uri "dask" version))
16049 (sha256
16050 (base32 "1w1hqr8vyx6ygwflj2737dcy0mmgvrc0s602gnny8pzlcbs9m76b"))))
16051 (build-system python-build-system)
16052 (arguments
16053 `(#:phases
16054 (modify-phases %standard-phases
16055 (add-after 'unpack 'disable-broken-tests
16056 (lambda _
16057 ;; This test is marked as xfail when pytest-xdist is used.
16058 (substitute* "dask/tests/test_threaded.py"
16059 (("def test_interrupt\\(\\)" m)
16060 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
16061 m)))
16062 ;; This one fails with a type error:
16063 ;; TypeError: Already tz-aware, use tz_convert to convert.
16064 (substitute* "dask/dataframe/tests/test_shuffle.py"
16065 (("def test_set_index_timestamp\\(\\)" m)
16066 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
16067 m)))
16068 #t))
16069 (replace 'check
16070 (lambda _ (invoke "pytest" "-vv"))))))
16071 (propagated-inputs
16072 `(("python-cloudpickle" ,python-cloudpickle)
16073 ("python-fsspec" ,python-fsspec)
16074 ("python-numpy" ,python-numpy)
16075 ("python-packaging" ,python-packaging)
16076 ("python-pandas" ,python-pandas)
16077 ("python-partd" ,python-partd)
16078 ("python-toolz" ,python-toolz)
16079 ("python-pyyaml" ,python-pyyaml)))
16080 (native-inputs
16081 `(("python-pytest" ,python-pytest)
16082 ("python-pytest-runner" ,python-pytest-runner)))
16083 (home-page "https://github.com/dask/dask/")
16084 (synopsis "Parallel computing with task scheduling")
16085 (description
16086 "Dask is a flexible parallel computing library for analytics. It
16087 consists of two components: dynamic task scheduling optimized for computation,
16088 and large data collections like parallel arrays, dataframes, and lists that
16089 extend common interfaces like NumPy, Pandas, or Python iterators to
16090 larger-than-memory or distributed environments. These parallel collections
16091 run on top of the dynamic task schedulers. ")
16092 (license license:bsd-3)))
16093
16094 (define-public python-ilinkedlist
16095 (package
16096 (name "python-ilinkedlist")
16097 (version "0.4.0")
16098 (source
16099 (origin
16100 (method url-fetch)
16101 (uri (pypi-uri "ilinkedlist" version))
16102 (sha256
16103 (base32
16104 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
16105 (build-system python-build-system)
16106 (native-inputs `(("python-pytest" ,python-pytest)))
16107 (inputs `(("python" ,python)))
16108 (home-page "https://github.com/luther9/ilinkedlist-py")
16109 (synopsis "Immutable linked list library")
16110 (description
16111 "This is a implementation of immutable linked lists for Python. It
16112 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
16113 Since a linked list is treated as immutable, it is hashable, and its length
16114 can be retrieved in constant time. Some of the terminology is inspired by
16115 LISP. It is possible to create an improper list by creating a @code{Pair}
16116 with a non-list @code{cdr}.")
16117 (license license:gpl3+)))
16118
16119 (define-public python-readlike
16120 (package
16121 (name "python-readlike")
16122 (version "0.1.3")
16123 (source
16124 (origin
16125 (method url-fetch)
16126 (uri (pypi-uri "readlike" version))
16127 (sha256
16128 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
16129 (build-system python-build-system)
16130 (home-page "https://github.com/jangler/readlike")
16131 (synopsis "GNU Readline-like line editing module")
16132 (description
16133 "This Python module provides line editing functions similar to the default
16134 Emacs-style ones of GNU Readline. Unlike the Python standard library's
16135 @code{readline} package, this one allows access to those capabilties in settings
16136 outside of a standard command-line interface. It is especially well-suited to
16137 interfacing with Urwid, due to a shared syntax for describing key inputs.
16138
16139 Currently, all stateless Readline commands are implemented. Yanking and history
16140 are not supported.")
16141 (license license:expat)))
16142
16143 (define-public python2-readlike
16144 (package-with-python2 python-readlike))
16145
16146 (define-public python-reparser
16147 (package
16148 (name "python-reparser")
16149 (version "1.4.3")
16150 (source
16151 (origin
16152 (method url-fetch)
16153 (uri (pypi-uri "ReParser" version))
16154 (sha256
16155 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
16156 (build-system python-build-system)
16157 (home-page "https://github.com/xmikos/reparser")
16158 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
16159 (description
16160 "This Python library provides a simple lexer/parser for inline markup based
16161 on regular expressions.")
16162 (license license:expat)))
16163
16164 (define-public python2-reparser
16165 (let ((reparser (package-with-python2
16166 (strip-python2-variant python-reparser))))
16167 (package (inherit reparser)
16168 (propagated-inputs
16169 `(("python2-enum34" ,python2-enum34)
16170 ,@(package-propagated-inputs reparser))))))
16171
16172 (define-public python-precis-i18n
16173 (package
16174 (name "python-precis-i18n")
16175 (version "1.0.0")
16176 (source
16177 (origin
16178 (method url-fetch)
16179 (uri (pypi-uri "precis_i18n" version))
16180 (sha256
16181 (base32
16182 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
16183 (build-system python-build-system)
16184 (home-page "https://github.com/byllyfish/precis_i18n")
16185 (synopsis "Implementation of the PRECIS framework")
16186 (description
16187 "This module implements the PRECIS Framework as described in RFC 8264,
16188 RFC 8265 and RFC 8266.")
16189 (license license:expat)))
16190
16191 (define-public python-absl-py
16192 (package
16193 (name "python-absl-py")
16194 (version "0.6.1")
16195 (source
16196 (origin
16197 (method url-fetch)
16198 (uri (pypi-uri "absl-py" version))
16199 (sha256
16200 (base32
16201 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
16202 (build-system python-build-system)
16203 (propagated-inputs
16204 `(("python-six" ,python-six)))
16205 (home-page "https://github.com/abseil/abseil-py")
16206 (synopsis "Abseil Python common libraries")
16207 (description
16208 "This package provides the Abseil Python Common Libraries, a collection
16209 of Python libraries for building Python applications.")
16210 (license license:asl2.0)))
16211
16212 (define-public python-astor
16213 (package
16214 (name "python-astor")
16215 (version "0.7.1")
16216 (source
16217 (origin
16218 (method url-fetch)
16219 (uri (pypi-uri "astor" version))
16220 (sha256
16221 (base32
16222 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
16223 (build-system python-build-system)
16224 ;; FIXME: There are two errors and two test failures.
16225 (arguments `(#:tests? #f))
16226 (home-page "https://github.com/berkerpeksag/astor")
16227 (synopsis "Read and write Python ASTs")
16228 (description "Astor is designed to allow easy manipulation of Python
16229 source via the Abstract Syntax Tree.")
16230 (license license:bsd-3)))
16231
16232 (define-public python2-astor
16233 (package-with-python2 python-astor))
16234
16235 (define-public python-grpcio
16236 (package
16237 (name "python-grpcio")
16238 (version "1.17.1")
16239 (source
16240 (origin
16241 (method url-fetch)
16242 (uri (pypi-uri "grpcio" version))
16243 (sha256
16244 (base32
16245 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
16246 (build-system python-build-system)
16247 (propagated-inputs
16248 `(("python-six" ,python-six)))
16249 (home-page "https://grpc.io")
16250 (synopsis "HTTP/2-based RPC framework")
16251 (description "This package provides a Python library for communicating
16252 with the HTTP/2-based RPC framework gRPC.")
16253 (license license:asl2.0)))
16254
16255 (define-public python-astunparse
16256 (package
16257 (name "python-astunparse")
16258 (version "1.6.2")
16259 (source
16260 (origin
16261 (method url-fetch)
16262 (uri (pypi-uri "astunparse" version))
16263 (sha256
16264 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
16265 (build-system python-build-system)
16266 (arguments '(#:tests? #f)) ; there are none
16267 (propagated-inputs
16268 `(("python-six" ,python-six)
16269 ("python-wheel" ,python-wheel)))
16270 (home-page "https://github.com/simonpercivall/astunparse")
16271 (synopsis "AST unparser for Python")
16272 (description "This package provides an AST unparser for Python. It is a
16273 factored out version of @code{unparse} found in the Python source
16274 distribution.")
16275 (license license:bsd-3)))
16276
16277 (define-public python-gast
16278 (package
16279 (name "python-gast")
16280 (version "0.2.2")
16281 (source
16282 (origin
16283 (method url-fetch)
16284 (uri (pypi-uri "gast" version))
16285 (sha256
16286 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
16287 (build-system python-build-system)
16288 (propagated-inputs
16289 `(("python-astunparse" ,python-astunparse)))
16290 (home-page "https://pypi.org/project/gast/")
16291 (synopsis "Generic Python AST that abstracts the underlying Python version")
16292 (description
16293 "GAST provides a compatibility layer between the AST of various Python
16294 versions, as produced by @code{ast.parse} from the standard @code{ast}
16295 module.")
16296 (license license:bsd-3)))
16297
16298 (define-public python-wikidata
16299 (package
16300 (name "python-wikidata")
16301 (version "0.6.1")
16302 (source
16303 (origin
16304 (method url-fetch)
16305 (uri (pypi-uri "Wikidata" version))
16306 (sha256
16307 (base32
16308 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
16309 (build-system python-build-system)
16310 (propagated-inputs
16311 `(("python-babel" ,python-babel)))
16312 (home-page "https://github.com/dahlia/wikidata")
16313 (synopsis "Wikidata client library")
16314 (description
16315 "This package provides a Python interface to
16316 @url{https://www.wikidata.org/, Wikidata}.")
16317 (properties '((upstream-name . "Wikidata")))
16318 (license license:gpl3+)))
16319
16320 (define-public python-doctest-ignore-unicode
16321 (package
16322 (name "python-doctest-ignore-unicode")
16323 (version "0.1.2")
16324 (source
16325 (origin
16326 (method url-fetch)
16327 (uri (pypi-uri "doctest-ignore-unicode" version))
16328 (sha256
16329 (base32
16330 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
16331 (build-system python-build-system)
16332 (native-inputs
16333 `(("python-nose" ,python-nose)))
16334 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
16335 (synopsis "Ignore Unicode literal prefixes in doctests")
16336 (description
16337 "This package adds support for a flag to ignore Unicode literal prefixes
16338 in doctests.")
16339 (license license:asl2.0)))
16340
16341 (define-public python-attr
16342 (package
16343 (name "python-attr")
16344 (version "0.3.1")
16345 (source
16346 (origin
16347 (method url-fetch)
16348 (uri (pypi-uri "attr" version))
16349 (sha256
16350 (base32
16351 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
16352 (build-system python-build-system)
16353 (home-page "https://github.com/denis-ryzhkov/attr")
16354 (synopsis "Decorator for attributes of target function or class")
16355 (description "Simple decorator to set attributes of target function or
16356 class in a @acronym{DRY, Don't Repeat Yourself} way.")
16357 (license license:expat)))
16358
16359 (define-public python-construct
16360 (package
16361 (name "python-construct")
16362 (version "2.9.45")
16363 (source
16364 (origin
16365 (method url-fetch)
16366 (uri (pypi-uri "construct" version))
16367 (sha256
16368 (base32
16369 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
16370 (build-system python-build-system)
16371 (arguments
16372 `(#:tests? #f)) ; No tests exist.
16373 (propagated-inputs
16374 `(("python-extras" ,python-extras)
16375 ("python-arrow" ,python-arrow)
16376 ("python-numpy" ,python-numpy)
16377 ("python-ruamel.yaml" ,python-ruamel.yaml)))
16378 (home-page "http://construct.readthedocs.io")
16379 (synopsis "Declarative and symmetrical parser and builder for binary data")
16380 (description
16381 "This package provides both simple, atomic constructs (such as
16382 integers of various sizes), as well as composite ones which allow you
16383 form hierarchical and sequential structures of increasing complexity.
16384 It features bit and byte granularity, easy debugging and testing, an
16385 easy-to-extend subclass system, and lots of primitive constructs to
16386 make your work easier.")
16387 (license license:expat)))
16388
16389 (define-public python-humanize
16390 (package
16391 (name "python-humanize")
16392 (version "0.5.1")
16393 (source
16394 (origin
16395 (method url-fetch)
16396 (uri (pypi-uri "humanize" version))
16397 (sha256
16398 (base32
16399 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
16400 (arguments
16401 '(#:tests? #f)) ; tests not in pypi archive
16402 (build-system python-build-system)
16403 (home-page "https://github.com/jmoiron/humanize")
16404 (synopsis "Print numerical information in a human-readable form")
16405 (description "This package provides a Python module that displays numbers
16406 and dates in \"human readable\" forms. For example, it would display
16407 \"12345591313\" as \"12.3 billion\".")
16408 (license license:expat)))
16409
16410 (define-public python-txaio
16411 (package
16412 (name "python-txaio")
16413 (version "18.8.1")
16414 (source
16415 (origin
16416 (method url-fetch)
16417 (uri (pypi-uri "txaio" version))
16418 (sha256
16419 (base32
16420 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
16421 (build-system python-build-system)
16422 (propagated-inputs
16423 `(("python-twisted" ,python-twisted)
16424 ("python-six" ,python-six)))
16425 (home-page "https://github.com/crossbario/txaio")
16426 (synopsis "Compatibility layer between Python asyncio and Twisted")
16427 (description "Txaio provides a compatibility layer between the Python
16428 @code{asyncio} module and @code{Twisted}.")
16429 (license license:expat)))
16430
16431 (define-public python-toolshed
16432 (package
16433 (name "python-toolshed")
16434 (version "0.4.6")
16435 (source
16436 (origin
16437 (method url-fetch)
16438 (uri (pypi-uri "toolshed" version))
16439 (sha256
16440 (base32
16441 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
16442 (build-system python-build-system)
16443 (native-inputs
16444 `(("python-nose" ,python-nose)))
16445 (home-page "https://github.com/brentp/toolshed/")
16446 (synopsis "Collection of modules and functions for working with data")
16447 (description "This is a collection of well-tested, simple modules and
16448 functions that aim to reduce boilerplate when working with data.")
16449 (license license:bsd-2)))
16450
16451 (define-public python-annoy
16452 (package
16453 (name "python-annoy")
16454 (version "1.15.1")
16455 (source
16456 (origin
16457 (method url-fetch)
16458 (uri (pypi-uri "annoy" version))
16459 (sha256
16460 (base32
16461 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
16462 (build-system python-build-system)
16463 (native-inputs
16464 `(("python-nose" ,python-nose)))
16465 (home-page "https://github.com/spotify/annoy/")
16466 (synopsis "Approximate nearest neighbors library")
16467 (description
16468 "Annoy is a C++ library with Python bindings to search for points in
16469 space that are close to a given query point. It also creates large read-only
16470 file-based data structures that are @code{mmap}ped into memory so that many
16471 processes may share the same data.")
16472 (license license:asl2.0)))
16473
16474 (define-public python-pylzma
16475 (package
16476 (name "python-pylzma")
16477 (version "0.5.0")
16478 (source
16479 (origin
16480 (method url-fetch)
16481 (uri (pypi-uri "pylzma" version))
16482 (sha256
16483 (base32
16484 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
16485 (build-system python-build-system)
16486 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
16487 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
16488 (description "This package provides Python bindings for the LZMA library
16489 by Igor Pavlov.")
16490 (license license:lgpl2.1+)))
16491
16492 (define-public python2-pylzma
16493 (package-with-python2 python-pylzma))
16494
16495 (define-public python2-zeroconf
16496 (package
16497 (name "python2-zeroconf")
16498
16499 ;; This is the last version that supports Python 2.x.
16500 (version "0.19.1")
16501 (source
16502 (origin
16503 (method url-fetch)
16504 (uri (pypi-uri "zeroconf" version))
16505 (sha256
16506 (base32
16507 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
16508 (build-system python-build-system)
16509 (arguments
16510 `(#:python ,python-2
16511 #:phases
16512 (modify-phases %standard-phases
16513 (add-after 'unpack 'patch-requires
16514 (lambda* (#:key inputs #:allow-other-keys)
16515 (substitute* "setup.py"
16516 (("enum-compat")
16517 "enum34"))
16518 #t)))))
16519 (native-inputs
16520 `(("python2-six" ,python2-six)
16521 ("python2-enum32" ,python2-enum34)
16522 ("python2-netifaces" ,python2-netifaces)
16523 ("python2-typing" ,python2-typing)))
16524 (home-page "https://github.com/jstasiak/python-zeroconf")
16525 (synopsis "Pure Python mDNS service discovery")
16526 (description
16527 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
16528 compatible).")
16529 (license license:lgpl2.1+)))
16530
16531 (define-public python-bsddb3
16532 (package
16533 (name "python-bsddb3")
16534 (version "6.2.6")
16535 (source
16536 (origin
16537 (method url-fetch)
16538 (uri (pypi-uri "bsddb3" version))
16539 (sha256
16540 (base32
16541 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
16542 (build-system python-build-system)
16543 (inputs
16544 `(("bdb" ,bdb)))
16545 (arguments
16546 '(#:phases
16547 (modify-phases %standard-phases
16548 (add-after 'unpack 'configure-locations
16549 (lambda* (#:key inputs #:allow-other-keys)
16550 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
16551 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
16552 #t))
16553 (replace 'check
16554 (lambda _
16555 (invoke "python3" "test3.py" "-v"))))))
16556 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
16557 (synopsis "Python bindings for Oracle Berkeley DB")
16558 (description
16559 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
16560 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
16561 Transaction objects, and each of these is exposed as a Python type in the
16562 bsddb3.db module. The database objects can use various access methods: btree,
16563 hash, recno, and queue. Complete support of Berkeley DB distributed
16564 transactions. Complete support for Berkeley DB Replication Manager.
16565 Complete support for Berkeley DB Base Replication. Support for RPC.")
16566 (license license:bsd-3)))
16567
16568 (define-public python-dbfread
16569 (package
16570 (name "python-dbfread")
16571 (version "2.0.7")
16572 (source (origin
16573 (method url-fetch)
16574 (uri (pypi-uri "dbfread" version))
16575 (sha256
16576 (base32
16577 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
16578 (build-system python-build-system)
16579 (native-inputs
16580 `(("python-pytest" ,python-pytest)))
16581 (home-page "https://dbfread.readthedocs.io")
16582 (synopsis "Read DBF Files with Python")
16583 (description
16584 "This library reads DBF files and returns the data as native Python data
16585 types for further processing. It is primarily intended for batch jobs and
16586 one-off scripts.")
16587 (license license:expat)))
16588
16589 (define-public python-cached-property
16590 (package
16591 (name "python-cached-property")
16592 (version "1.5.1")
16593 (source
16594 (origin
16595 (method url-fetch)
16596 (uri (pypi-uri "cached-property" version))
16597 (sha256
16598 (base32
16599 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
16600 (build-system python-build-system)
16601 (arguments
16602 `(#:phases
16603 (modify-phases %standard-phases
16604 ;; https://github.com/pydanny/cached-property/issues/131
16605 ;; recent versions of freezegun break one test
16606 (add-after 'unpack 'disable-broken-test
16607 (lambda _
16608 (substitute* "tests/test_cached_property.py"
16609 (("def test_threads_ttl_expiry\\(self\\)" m)
16610 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
16611 " " m)))
16612 #t)))))
16613 (native-inputs
16614 `(("python-freezegun" ,python-freezegun)))
16615 (home-page
16616 "https://github.com/pydanny/cached-property")
16617 (synopsis
16618 "Decorator for caching properties in classes")
16619 (description
16620 "This package provides a decorator which makes caching
16621 time-or-computationally-expensive properties quick and easy and works in Python
16622 2 or 3.")
16623 (license license:bsd-3)))
16624
16625 (define-public python-folium
16626 (package
16627 (name "python-folium")
16628 (version "0.10.1")
16629 (source
16630 (origin
16631 (method url-fetch)
16632 (uri (pypi-uri "folium" version))
16633 (sha256
16634 (base32
16635 "0gcc267wxwxr57ry86pqpbiyfvl0g48hfvgy0f2mz9s58g87kgzd"))))
16636 (build-system python-build-system)
16637 (propagated-inputs
16638 `(("python-branca" ,python-branca)
16639 ("python-jinja2" ,python-jinja2)
16640 ("python-numpy" ,python-numpy)
16641 ("python-requests" ,python-requests)))
16642 (native-inputs
16643 `(("python-pytest" ,python-pytest)))
16644 (home-page "https://github.com/python-visualization/folium")
16645 (synopsis "Make beautiful maps with Leaflet.js & Python")
16646 (description "@code{folium} makes it easy to visualize data that’s been
16647 manipulated in Python on an interactive leaflet map. It enables both the
16648 binding of data to a map for @code{choropleth} visualizations as well as
16649 passing rich vector/raster/HTML visualizations as markers on the map.
16650
16651 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
16652 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
16653 supports Image, Video, GeoJSON and TopoJSON overlays.")
16654 (license license:expat)))
16655
16656 (define-public jube
16657 (package
16658 ;; This is a command-line tool, so no "python-" prefix.
16659 (name "jube")
16660 (version "2.2.2")
16661 (source (origin
16662 (method url-fetch)
16663 (uri (string-append
16664 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
16665 version))
16666 (sha256
16667 (base32
16668 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
16669 (file-name (string-append "jube-" version ".tar.gz"))))
16670 (build-system python-build-system)
16671 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
16672 (synopsis "Benchmarking environment")
16673 (description
16674 "JUBE helps perform and analyze benchmarks in a systematic way. For each
16675 benchmarked application, benchmark data is stored in a format that allows JUBE
16676 to deduct the desired information. This data can be parsed by automatic pre-
16677 and post-processing scripts that draw information and store it more densely
16678 for manual interpretation.")
16679 (license license:gpl3+)))
16680
16681 (define-public python-pyroutelib3
16682 (package
16683 (name "python-pyroutelib3")
16684 (version "1.3.post1")
16685 (source
16686 (origin
16687 (method url-fetch)
16688 (uri (pypi-uri "pyroutelib3" version))
16689 (sha256
16690 (base32
16691 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
16692 (build-system python-build-system)
16693 (propagated-inputs
16694 `(("python-dateutil" ,python-dateutil)))
16695 (home-page "https://github.com/MKuranowski/pyroutelib3")
16696 (synopsis "Library for simple routing on OSM data")
16697 (description "Library for simple routing on OSM data")
16698 (license license:gpl3+)))
16699
16700 (define-public python-bibtexparser
16701 (package
16702 (name "python-bibtexparser")
16703 (version "1.1.0")
16704 (source
16705 (origin
16706 (method url-fetch)
16707 (uri (pypi-uri "bibtexparser" version))
16708 (sha256
16709 (base32
16710 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
16711 (build-system python-build-system)
16712 (propagated-inputs
16713 `(("python-pyparsing" ,python-pyparsing)))
16714 (native-inputs
16715 `(("python-future" ,python-future)))
16716 (home-page "https://github.com/sciunto-org/python-bibtexparser")
16717 (synopsis "Python library to parse BibTeX files")
16718 (description "BibtexParser is a Python library to parse BibTeX files.")
16719 (license (list license:bsd-3 license:lgpl3))))
16720
16721 (define-public python-distro
16722 (package
16723 (name "python-distro")
16724 (version "1.4.0")
16725 (source
16726 (origin
16727 (method url-fetch)
16728 (uri (pypi-uri "distro" version))
16729 (sha256
16730 (base32
16731 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
16732 (build-system python-build-system)
16733 (native-inputs
16734 `(("python-pytest" ,python-pytest)))
16735 (home-page "https://github.com/nir0s/distro")
16736 (synopsis
16737 "OS platform information API")
16738 (description
16739 "@code{distro} provides information about the OS distribution it runs on,
16740 such as a reliable machine-readable ID, or version information.
16741
16742 It is the recommended replacement for Python's original
16743 `platform.linux_distribution` function (which will be removed in Python 3.8).
16744 @code{distro} also provides a command-line interface to output the platform
16745 information in various formats.")
16746 (license license:asl2.0)))
16747
16748 (define-public python-cairosvg
16749 (package
16750 (name "python-cairosvg")
16751 (version "2.4.2")
16752 (source
16753 (origin
16754 (method url-fetch)
16755 (uri (pypi-uri "CairoSVG" version))
16756 (sha256
16757 (base32 "1bb7irxbaxxb9ahm3z5wsx1q96mm5gzskc7b6q07h9ikcnb8yrjf"))))
16758 (build-system python-build-system)
16759 (arguments
16760 `(#:phases
16761 (modify-phases %standard-phases
16762 (replace 'check
16763 (lambda _ (invoke "pytest"))))))
16764 (propagated-inputs
16765 `(("python-cairocffi" ,python-cairocffi)
16766 ("python-cssselect2" ,python-cssselect2)
16767 ("python-defusedxml" ,python-defusedxml)
16768 ("python-pillow" ,python-pillow)
16769 ("python-tinycss2" ,python-tinycss2)))
16770 (native-inputs
16771 `(("python-pytest-flake8" ,python-pytest-flake8)
16772 ("python-pytest-isort" ,python-pytest-isort)
16773 ("python-pytest-runner" ,python-pytest-runner)))
16774 (home-page "https://cairosvg.org/")
16775 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
16776 (description "CairoSVG is a SVG converter based on Cairo. It can export
16777 SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
16778 SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
16779 parsed, the result is drawn to a Cairo surface that can be exported to
16780 qvarious formats: PDF, PostScript, PNG and even SVG.")
16781 (license license:lgpl3+)))
16782
16783 (define-public python-pyphen
16784 (package
16785 (name "python-pyphen")
16786 (version "0.9.5")
16787 (source
16788 (origin
16789 (method url-fetch)
16790 (uri (pypi-uri "Pyphen" version))
16791 (sha256
16792 (base32 "08c9y69ry9d6m4zalhnalg86lsp9v2j5n1ziw5vxfmiihx83lqrv"))))
16793 (build-system python-build-system)
16794 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
16795 ;; embedded set provided by upstream - like Debian does.
16796 (home-page "https://github.com/Kozea/Pyphen")
16797 (synopsis "Pure Python module to hyphenate text")
16798 (description "Pyphen is a pure Python module to hyphenate text using
16799 existing Hunspell hyphenation dictionaries.")
16800 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
16801
16802 (define-public python-intelhex
16803 (package
16804 (name "python-intelhex")
16805 (version "2.2.1")
16806 (source
16807 (origin
16808 (method url-fetch)
16809 (uri (pypi-uri "intelhex" version))
16810 (sha256
16811 (base32
16812 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
16813 (build-system python-build-system)
16814 (arguments '(#:tests? #f)) ;issue with version
16815 (home-page "https://pypi.org/project/IntelHex/")
16816 (synopsis "Python library for Intel HEX files manipulations")
16817 (description "The Intel HEX file format is widely used in microprocessors
16818 and microcontrollers area (embedded systems etc.) as the de facto standard for
16819 representation of code to be programmed into microelectronic devices. This
16820 package provides an intelhex Python library to read, write, create from
16821 scratch and manipulate data from Intel HEX file format. It also includes
16822 several convenience Python scripts, including \"classic\" hex2bin and bin2hex
16823 converters and more, those based on the library itself.")
16824 (license license:bsd-3)))
16825
16826 (define-public python-pykwalify
16827 (package
16828 (name "python-pykwalify")
16829 (version "1.7.0")
16830 (source
16831 (origin
16832 (method url-fetch)
16833 (uri (pypi-uri "pykwalify" version))
16834 (sha256
16835 (base32
16836 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
16837 (build-system python-build-system)
16838 (arguments '(#:tests? #f)) ;missing dependencies
16839 (propagated-inputs
16840 `(("python-dateutil" ,python-dateutil)
16841 ("python-docopt" ,python-docopt)
16842 ("python-pyyaml" ,python-pyyaml)))
16843 (home-page "https://github.com/grokzen/pykwalify")
16844 (synopsis
16845 "Python lib/cli for JSON/YAML schema validation")
16846 (description
16847 "This package provides a parser, schema validator, and data binding tool
16848 for YAML and JSON.")
16849 (license license:expat)))
16850
16851 (define-public python-dbusmock
16852 (package
16853 (name "python-dbusmock")
16854 (version "0.18.3")
16855 (source
16856 (origin
16857 (method url-fetch)
16858 (uri (pypi-uri "python-dbusmock" version))
16859 (sha256
16860 (base32
16861 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
16862 (build-system python-build-system)
16863 (arguments
16864 '(#:phases
16865 (modify-phases %standard-phases
16866 (add-after 'unpack 'patch-shell-path
16867 (lambda _
16868 (substitute* "tests/test_code.py"
16869 (("/bin/bash") (which "bash")))
16870 #t)))))
16871 (native-inputs
16872 `(;; For tests.
16873 ("dbus" ,dbus) ; for dbus-daemon
16874 ("python-nose" ,python-nose)
16875 ("which" ,which)))
16876 (propagated-inputs
16877 `(("python-dbus" ,python-dbus)
16878 ("python-pygobject" ,python-pygobject)))
16879 (home-page "https://github.com/martinpitt/python-dbusmock")
16880 (synopsis "Python library for mock D-Bus objects")
16881 (description "python-dbusmock allows for the easy creation of mock objects on
16882 D-Bus. This is useful for writing tests for software which talks to D-Bus
16883 services such as upower, systemd, logind, gnome-session or others, and it is
16884 hard (or impossible without root privileges) to set the state of the real
16885 services to what you expect in your tests.")
16886 (license license:lgpl3+)))
16887
16888 (define-public python-ujson
16889 (package
16890 (name "python-ujson")
16891 (version "1.35")
16892 (source
16893 (origin
16894 (method url-fetch)
16895 (uri (pypi-uri "ujson" version))
16896 (sha256
16897 (base32
16898 "11jz5wi7mbgqcsz52iqhpyykiaasila4lq8cmc2d54bfa3jp6q7n"))))
16899 (build-system python-build-system)
16900 (home-page "http://www.esn.me")
16901 (synopsis
16902 "Ultra fast JSON encoder and decoder for Python")
16903 (description
16904 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
16905 bindings for Python 2.5+ and 3.")
16906 (license license:bsd-3)))
16907
16908 (define-public python2-ujson
16909 (package-with-python2 python-ujson))
16910
16911 (define-public python-iocapture
16912 ;; The latest release is more than a year older than this commit.
16913 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
16914 (revision "1"))
16915 (package
16916 (name "python-iocapture")
16917 (version "0.1.2")
16918 (source
16919 (origin
16920 (method git-fetch)
16921 (uri (git-reference
16922 (url "https://github.com/oinume/iocapture.git")
16923 (commit commit)))
16924 (file-name (git-file-name name version))
16925 (sha256
16926 (base32
16927 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
16928 (build-system python-build-system)
16929 (arguments
16930 `(#:phases
16931 (modify-phases %standard-phases
16932 (delete 'check)
16933 (add-after 'install 'check
16934 (lambda* (#:key inputs outputs #:allow-other-keys)
16935 (add-installed-pythonpath inputs outputs)
16936 (invoke "py.test" "-v" "tests")
16937 #t)))))
16938 (propagated-inputs
16939 `(("python-flexmock" ,python-flexmock)
16940 ("python-pytest" ,python-pytest)
16941 ("python-pytest-cov" ,python-pytest-cov)
16942 ("python-six" ,python-six)))
16943 (home-page "https://github.com/oinume/iocapture")
16944 (synopsis "Python capturing tool for stdout and stderr")
16945 (description
16946 "This package helps you to capture the standard out (stdout) and the
16947 standard error channel (stderr) in your program.")
16948 (license license:expat))))
16949
16950 (define-public python-argh
16951 ;; There are 21 commits since the latest release containing important
16952 ;; improvements.
16953 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
16954 (revision "1"))
16955 (package
16956 (name "python-argh")
16957 (version (git-version "0.26.2" revision commit))
16958 (source
16959 (origin
16960 (method git-fetch)
16961 (uri (git-reference
16962 (url "https://github.com/neithere/argh.git")
16963 (commit commit)))
16964 (file-name (git-file-name name version))
16965 (sha256
16966 (base32
16967 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
16968 (build-system python-build-system)
16969 (propagated-inputs
16970 `(("python-iocapture" ,python-iocapture)
16971 ("python-mock" ,python-mock)
16972 ("python-pytest" ,python-pytest)
16973 ("python-pytest-cov" ,python-pytest-cov)
16974 ("python-pytest-xdist" ,python-pytest-xdist)
16975 ("python-tox" ,python-tox)))
16976 (home-page "https://github.com/neithere/argh/")
16977 (synopsis "Argparse wrapper with natural syntax")
16978 (description
16979 "python-argh is a small library that provides several layers of
16980 abstraction on top of @code{python-argparse}. The layers can be mixed. It is
16981 always possible to declare a command with the highest possible (and least
16982 flexible) layer and then tune the behaviour with any of the lower layers
16983 including the native API of @code{python-argparse}.")
16984 (license license:lgpl3+))))
16985
16986 (define-public python-ppft
16987 (package
16988 (name "python-ppft")
16989 (version "1.6.6.1")
16990 (source
16991 (origin
16992 (method url-fetch)
16993 (uri (pypi-uri "ppft" version))
16994 (sha256
16995 (base32
16996 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
16997 (build-system python-build-system)
16998 (arguments '(#:tests? #f)) ; there are none
16999 (propagated-inputs
17000 `(("python-six" ,python-six)))
17001 (home-page "https://pypi.org/project/ppft/")
17002 (synopsis "Fork of Parallel Python")
17003 (description
17004 "This package is a fork of Parallel Python. The Parallel Python
17005 module (@code{pp}) provides an easy and efficient way to create
17006 parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
17007 computers and clusters. It features cross-platform portability and dynamic
17008 load balancing.")
17009 (license license:bsd-3)))
17010
17011 (define-public python-pox
17012 (package
17013 (name "python-pox")
17014 (version "0.2.7")
17015 (source
17016 (origin
17017 (method url-fetch)
17018 (uri (pypi-uri "pox" version))
17019 (sha256
17020 (base32
17021 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
17022 (build-system python-build-system)
17023 (arguments
17024 `(#:phases
17025 (modify-phases %standard-phases
17026 (replace 'check
17027 (lambda _
17028 (mkdir-p "/tmp/guix")
17029 (setenv "SHELL" "bash")
17030 (setenv "USERNAME" "guix")
17031 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
17032 (invoke "py.test" "-vv")
17033 #t)))))
17034 (native-inputs
17035 `(("python-pytest" ,python-pytest)
17036 ("which" ,which)))
17037 (home-page "https://pypi.org/project/pox/")
17038 (synopsis "Python utilities for filesystem exploration and automated builds")
17039 (description
17040 "Pox provides a collection of utilities for navigating and manipulating
17041 filesystems. This module is designed to facilitate some of the low level
17042 operating system interactions that are useful when exploring a filesystem on a
17043 remote host. Pox provides Python equivalents of several shell commands such
17044 as @command{which} and @command{find}. These commands allow automated
17045 discovery of what has been installed on an operating system, and where the
17046 essential tools are located.")
17047 (license license:bsd-3)))
17048
17049 (define-public python-pathos
17050 (package
17051 (name "python-pathos")
17052 (version "0.2.5")
17053 (source
17054 (origin
17055 (method url-fetch)
17056 (uri (pypi-uri "pathos" version))
17057 (sha256
17058 (base32
17059 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
17060 (build-system python-build-system)
17061 (arguments
17062 '(#:phases
17063 (modify-phases %standard-phases
17064 (replace 'check
17065 (lambda _
17066 (setenv "PYTHONPATH"
17067 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
17068 (invoke "python" "./tests/__main__.py"))))))
17069 (propagated-inputs
17070 `(("python-dill" ,python-dill)
17071 ("python-multiprocess" ,python-multiprocess)
17072 ("python-pox" ,python-pox)
17073 ("python-ppft" ,python-ppft)))
17074 (native-inputs
17075 `(("python-pytest" ,python-pytest)))
17076 (home-page "https://pypi.org/project/pathos/")
17077 (synopsis
17078 "Parallel graph management and execution in heterogeneous computing")
17079 (description
17080 "Python-pathos is a framework for heterogenous computing. It provides a
17081 consistent high-level interface for configuring and launching parallel
17082 computations across heterogenous resources. Python-pathos provides configurable
17083 launchers for parallel and distributed computing, where each launcher contains
17084 the syntactic logic to configure and launch jobs in an execution environment.")
17085 (license license:bsd-3)))
17086
17087 (define-public python-flit
17088 (package
17089 (name "python-flit")
17090 (version "2.1.0")
17091 (source
17092 (origin
17093 (method url-fetch)
17094 (uri (pypi-uri "flit" version))
17095 (sha256
17096 (base32
17097 "0h5vvmqinqzn97mr3ix7zx53af9ad4fimjjwqpx88yp8qhz4r5bc"))))
17098 (build-system python-build-system)
17099 (arguments
17100 `(#:tests? #f)) ; XXX: Check requires network access.
17101 (home-page "https://flit.readthedocs.io/")
17102 (synopsis
17103 "Simple packaging tool for simple packages")
17104 (description
17105 "Flit is a simple way to put Python packages and modules on PyPI. Flit
17106 packages a single importable module or package at a time, using the import
17107 name as the name on PyPI. All subpackages and data files within a package
17108 are included automatically.")
17109 (license license:bsd-3)))
17110
17111 (define-public python-pathtools
17112 (package
17113 (name "python-pathtools")
17114 (version "0.1.2")
17115 (source
17116 (origin
17117 (method url-fetch)
17118 (uri (pypi-uri "pathtools" version))
17119 (sha256
17120 (base32
17121 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
17122 (build-system python-build-system)
17123 (home-page
17124 "https://github.com/gorakhargosh/pathtools")
17125 (synopsis "Path utilities for Python")
17126 (description "Pattern matching and various utilities for file systems
17127 paths.")
17128 (license license:expat)))
17129
17130 (define-public python-fastentrypoints
17131 (package
17132 (name "python-fastentrypoints")
17133 (version "0.12")
17134 (source
17135 (origin
17136 (method url-fetch)
17137 (uri (pypi-uri "fastentrypoints" version))
17138 (sha256
17139 (base32
17140 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
17141 (build-system python-build-system)
17142 (home-page
17143 "https://github.com/ninjaaron/fast-entry_points")
17144 (synopsis
17145 "Makes entry_points specified in setup.py load more quickly")
17146 (description
17147 "Using entry_points in your setup.py makes scripts that start really
17148 slowly because it imports pkg_resources. This package allows such setup
17149 scripts to load entry points more quickly.")
17150 (license license:bsd-3)))
17151
17152 (define-public python-funcparserlib
17153 (package
17154 (name "python-funcparserlib")
17155 (version "0.3.6")
17156 (source
17157 (origin
17158 (method url-fetch)
17159 (uri (pypi-uri "funcparserlib" version))
17160 (sha256
17161 (base32
17162 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
17163 (native-inputs
17164 `(("python-tox" ,python-tox)))
17165 (arguments
17166 `(#:phases
17167 (modify-phases %standard-phases
17168 (replace 'check
17169 (lambda _
17170 (invoke "tox"))))))
17171 (build-system python-build-system)
17172 (home-page
17173 "https://github.com/vlasovskikh/funcparserlib")
17174 (synopsis
17175 "Recursive descent parsing library based on functional combinators")
17176 (description
17177 "This package is a recursive descent parsing library for Python based on
17178 functional combinators. Parser combinators are just higher-order functions
17179 that take parsers as their arguments and return them as result values.")
17180 (license license:expat)))
17181
17182 (define-public python-speg
17183 (package
17184 (name "python-speg")
17185 (version "0.3")
17186 (source
17187 (origin
17188 (method url-fetch)
17189 (uri (pypi-uri "speg" version ".zip"))
17190 (sha256
17191 (base32 "0w9y4jf4787dzhy6rvhwi0mpl0r8qkqmqmyv2hpwdpv8w53yzjqh"))))
17192 (arguments
17193 `(#:tests? #f)) ;FIXME: tests fail, not sure why
17194 (native-inputs
17195 `(("unzip" ,unzip)))
17196 (build-system python-build-system)
17197 (home-page "https://github.com/avakar/speg")
17198 (synopsis "PEG-based parser interpreter with memoization")
17199 (description "This package is a PEG-based parser and interpreter with
17200 memoization.")
17201 (license license:expat)))
17202
17203 (define-public python-cson
17204 (package
17205 (name "python-cson")
17206 (version "0.8")
17207 (source
17208 (origin
17209 (method url-fetch)
17210 (uri (pypi-uri "cson" version))
17211 (sha256
17212 (base32 "00cyvigg4npbph39ghkg77xbxisa6plf75vii24igxfizik0337f"))))
17213 (build-system python-build-system)
17214 (propagated-inputs
17215 `(("python-speg" ,python-speg)))
17216 (home-page "https://github.com/avakar/pycson")
17217 (synopsis "Parser for Coffeescript Object Notation (CSON)")
17218 (description "This package is a parser for Coffeescript Object
17219 Notation (CSON).")
17220 (license license:expat)))
17221
17222 (define-public python-asynctest
17223 (package
17224 (name "python-asynctest")
17225 (version "0.13.0")
17226 (source
17227 (origin
17228 (method url-fetch)
17229 (uri (pypi-uri "asynctest" version))
17230 (sha256
17231 (base32
17232 "1b3zsy7p84gag6q8ai2ylyrhx213qdk2h2zb6im3xn0m5n264y62"))))
17233 (build-system python-build-system)
17234 (arguments
17235 '(#:phases
17236 (modify-phases %standard-phases
17237 (replace 'check
17238 (lambda _
17239 (invoke "python" "-X" "dev" "-m" "unittest" "-v" "test")))
17240 (add-after 'unpack 'disable-tests
17241 (lambda* _
17242 (substitute* "test/test_selector.py"
17243 ;; XXX: This test fails for unknown reason inside the build
17244 ;; environment.
17245 (("def test_events_watched_outside_test_are_ignored")
17246 "@unittest.skip('disabled by guix')
17247 def test_events_watched_outside_test_are_ignored")))))))
17248 (home-page "https://github.com/Martiusweb/asynctest")
17249 (synopsis "Extension of unittest for testing asyncio libraries")
17250 (description
17251 "The package asynctest is built on top of the standard unittest module
17252 and cuts down boilerplate code when testing libraries for asyncio.")
17253 (license license:asl2.0)))
17254
17255 (define-public python-aionotify
17256 (package
17257 (name "python-aionotify")
17258 (version "0.2.0")
17259 (source
17260 (origin
17261 ;; Source tarball on PyPi lacks tests
17262 (method git-fetch)
17263 (uri (git-reference
17264 (url "https://github.com/rbarrois/aionotify")
17265 (commit (string-append "v" version))))
17266 (file-name (git-file-name name version))
17267 (sha256
17268 (base32 "1sk9i8czxgsbrswsf1nlb4c82vgnlzi8zrvrxdip92w2z8hqh43y"))))
17269 (build-system python-build-system)
17270 (native-inputs `(("python-asynctest" ,python-asynctest)))
17271 (home-page "https://github.com/rbarrois/aionotify")
17272 (synopsis "Asyncio-powered inotify library")
17273 (description
17274 "@code{aionotify} is a simple, asyncio-based inotify library.")
17275 (license license:bsd-3)))
17276
17277 (define-public python-forbiddenfruit
17278 (package
17279 (name "python-forbiddenfruit")
17280 (version "0.1.3")
17281 (source
17282 (origin
17283 ;; Source tarball on PyPi lacks Makefile that builds and runs tests
17284 (method git-fetch)
17285 (uri (git-reference
17286 (url "https://github.com/clarete/forbiddenfruit")
17287 (commit version)))
17288 (file-name (git-file-name name version))
17289 (sha256
17290 (base32 "1fp2xvdqpi910j9r3q68x38phpxbm700gjdi2m2j5gs91xdnyyh2"))))
17291 (build-system python-build-system)
17292 (arguments
17293 '(#:phases
17294 (modify-phases %standard-phases
17295 (replace 'check
17296 (lambda _
17297 (invoke "make" "SKIP_DEPS=1"))))))
17298 (native-inputs
17299 `(("python-nose" ,python-nose)
17300 ("python-coverage" ,python-coverage)))
17301 (home-page "https://github.com/clarete/forbiddenfruit")
17302 (synopsis "Patch python built-in objects")
17303 (description "This project allows Python code to extend built-in types.")
17304 (license (list license:gpl3+ license:expat))))
17305
17306 (define-public python-shouldbe
17307 (package
17308 (name "python-shouldbe")
17309 (version "0.1.2")
17310 (source
17311 (origin
17312 (method url-fetch)
17313 (uri (pypi-uri "shouldbe" version))
17314 (sha256
17315 (base32
17316 "16zbvjxf71dl4yfbgcr6idyim3mdrfvix1dv8b95p0s9z07372pj"))))
17317 (build-system python-build-system)
17318 (propagated-inputs
17319 `(("python-forbiddenfruit" ,python-forbiddenfruit)))
17320 (native-inputs
17321 `(("python-nose" ,python-nose)))
17322 (home-page "https://github.com/directxman12/should_be")
17323 (synopsis "Python Assertion Helpers inspired by Shouldly")
17324 (description
17325 "Python Assertion Helpers inspired by Shouldly.")
17326 (license license:isc)))
17327
17328 (define-public python-k5test
17329 (package
17330 (name "python-k5test")
17331 (version "0.9.2")
17332 (source
17333 (origin
17334 (method url-fetch)
17335 (uri (pypi-uri "k5test" version))
17336 (sha256
17337 (base32
17338 "1lqp3jgfngyhaxjgj3n230hn90wsylwilh120yjf62h7b1s02mh8"))))
17339 (build-system python-build-system)
17340 (propagated-inputs
17341 `(("python-six" ,python-six)
17342 ;; `which`, `kadmin.local` binaries called inside library
17343 ("which" ,which)
17344 ("mit-krb5" ,mit-krb5)))
17345 (native-inputs `(("mit-krb5" ,mit-krb5)))
17346 (arguments
17347 '(#:phases
17348 (modify-phases %standard-phases
17349 (add-after 'unpack 'patch-paths
17350 (lambda* _
17351 (substitute* "k5test/realm.py"
17352 (("'kadmin_local'") "'kadmin.local'")))))))
17353 (home-page "https://github.com/pythongssapi/k5test")
17354 (synopsis "Library for setting up self-contained Kerberos 5 environments")
17355 (description
17356 "@code{k5test} is a library for setting up self-contained Kerberos 5
17357 environments, and running Python unit tests inside those environments. It is
17358 based on the file of the same name found alongside the MIT Kerberos 5 unit
17359 tests.")
17360 (license license:isc)))
17361
17362 (define-public python-gssapi
17363 (package
17364 (name "python-gssapi")
17365 (version "1.6.1")
17366 (source
17367 (origin
17368 (method url-fetch)
17369 (uri (pypi-uri "gssapi" version))
17370 (sha256
17371 (base32
17372 "1gymg4asvwrz7y13qpwp2s5g8qwq179d72gkj09q6bfcgs82l5wr"))))
17373 (build-system python-build-system)
17374 (propagated-inputs
17375 `(("python-decorator" ,python-decorator)
17376 ("python-six" ,python-six)))
17377 (inputs
17378 `(("mit-krb5" ,mit-krb5)))
17379 ;; for tests
17380 (native-inputs
17381 `(("python-shouldbe" ,python-shouldbe)
17382 ("python-parameterized" ,python-parameterized)
17383 ("python-k5test" ,python-k5test)
17384 ("python-nose" ,python-nose)))
17385 (home-page "https://github.com/pythongssapi/python-gssapi")
17386 (synopsis "Python GSSAPI Wrapper")
17387 (description
17388 "Python-GSSAPI provides both low-level and high level wrappers around the
17389 GSSAPI C libraries. While it focuses on the Kerberos mechanism, it should
17390 also be useable with other GSSAPI mechanisms.")
17391 (license license:isc)))
17392
17393 (define-public python-check-manifest
17394 (package
17395 (name "python-check-manifest")
17396 (version "0.37")
17397 (source
17398 (origin
17399 (method url-fetch)
17400 (uri (pypi-uri "check-manifest" version))
17401 (sha256
17402 (base32
17403 "0lk45ifdv2cpkl6ayfyix7jwmnxa1rha7xvb0ih5999k115wzqs4"))))
17404 (build-system python-build-system)
17405 (native-inputs
17406 `(("python-mock" ,python-mock)
17407 ("git" ,git)))
17408 (home-page "https://github.com/mgedmin/check-manifest")
17409 (synopsis "Check MANIFEST.in in a Python source package for completeness")
17410 (description "Python package can include a MANIFEST.in file to help with
17411 sending package files to the Python Package Index. This package checks that
17412 file to ensure it completely and accurately describes your project.")
17413 (license license:expat)))
17414
17415 (define-public python-android-stringslib
17416 (package
17417 (name "python-android-stringslib")
17418 (version "0.1.2")
17419 (source
17420 (origin
17421 (method git-fetch)
17422 (uri (git-reference
17423 (url "https://framagit.org/tyreunom/python-android-strings-lib")
17424 (commit (string-append "v" version))))
17425 (file-name (git-file-name name version))
17426 (sha256
17427 (base32
17428 "0gij55qzzq1h83kfpvhai1vf78kkhyvxa6l17m2nl24454lhfin4"))))
17429 (build-system python-build-system)
17430 (arguments
17431 `(#:tests? #f))
17432 (home-page "https://framagit.org/tyreunom/python-android-strings-lib")
17433 (synopsis "Android strings.xml support")
17434 (description "Android Strings Lib provides support for android's strings.xml
17435 files. These files are used to translate strings in android apps.")
17436 (license license:expat)))
17437
17438 (define-public python-watchdog
17439 (package
17440 (name "python-watchdog")
17441 (version "0.9.0")
17442 (source
17443 (origin
17444 (method url-fetch)
17445 (uri (pypi-uri "watchdog" version))
17446 (sha256
17447 (base32
17448 "07cnvvlpif7a6cg4rav39zq8fxa5pfqawchr46433pij0y6napwn"))))
17449 (build-system python-build-system)
17450 (arguments
17451 `(#:phases
17452 (modify-phases %standard-phases
17453 (add-before 'check 'remove-failing
17454 (lambda _
17455 (delete-file "tests/test_inotify_buffer.py")
17456 (delete-file "tests/test_snapshot_diff.py")
17457 #t)))))
17458 (propagated-inputs
17459 `(("python-argh" ,python-argh)
17460 ("python-pathtools" ,python-pathtools)
17461 ("python-pyyaml" ,python-pyyaml)))
17462 (native-inputs
17463 `(("python-pytest-cov" ,python-pytest-cov)
17464 ("python-pytest-timeout" ,python-pytest-timeout)))
17465 (home-page "https://github.com/gorakhargosh/watchdog")
17466 (synopsis "Filesystem events monitoring")
17467 (description "This package provides a way to monitor filesystem events
17468 such as a file modification and trigger an action. This is similar to inotify,
17469 but portable.")
17470 (license license:asl2.0)))
17471
17472 (define-public offlate
17473 (package
17474 (name "offlate")
17475 (version "0.5")
17476 (source
17477 (origin
17478 (method git-fetch)
17479 (uri (git-reference
17480 (url "https://framagit.org/tyreunom/offlate")
17481 (commit version)))
17482 (file-name (git-file-name name version))
17483 (sha256
17484 (base32
17485 "13pqnbl05wcyldfvl75fp89vjgwsvxyc69vhnb17kkha2rc2k1h7"))))
17486 (build-system python-build-system)
17487 (arguments
17488 ;; No tests
17489 `(#:tests? #f))
17490 (propagated-inputs
17491 `(("python-android-stringslib" ,python-android-stringslib)
17492 ("python-dateutil" ,python-dateutil)
17493 ("python-gitlab" ,python-gitlab)
17494 ("python-lxml" ,python-lxml)
17495 ("python-polib" ,python-polib)
17496 ("python-pyenchant" ,python-pyenchant)
17497 ("python-pygit2" ,python-pygit2)
17498 ("python-pygithub" ,python-pygithub)
17499 ("python-pyqt" ,python-pyqt)
17500 ("python-requests" ,python-requests)
17501 ("python-ruamel.yaml" ,python-ruamel.yaml)
17502 ("python-translation-finder" ,python-translation-finder)
17503 ("python-watchdog" ,python-watchdog)))
17504 (native-inputs
17505 `(("qttools" ,qttools)))
17506 (home-page "https://framagit.org/tyreunom/offlate")
17507 (synopsis "Offline translation interface for online translation tools")
17508 (description "Offlate offers a unified interface for different translation
17509 file formats, as well as many different online translation platforms. You can
17510 use it to get work from online platforms, specialized such as the Translation
17511 Project, or not such a gitlab instance when your upstream doesn't use any
17512 dedicated platform. The tool proposes a unified interface for any format and
17513 an upload option to send your work back to the platform.")
17514 (license license:gpl3+)))
17515
17516 (define-public python-pypng
17517 (package
17518 (name "python-pypng")
17519 (version "0.0.20")
17520 (source
17521 (origin
17522 (method url-fetch)
17523 (uri (pypi-uri "pypng" version))
17524 (sha256
17525 (base32 "02qpa22ls41vwsrzw9r9qhj1nhq05p03hb5473pay6y980s86chh"))))
17526 (build-system python-build-system)
17527 (home-page "https://github.com/drj11/pypng")
17528 (synopsis "Pure Python PNG image encoder/decoder")
17529 (description
17530 "The PyPNG module implements support for PNG images. It reads and writes
17531 PNG files with all allowable bit depths (1/2/4/8/16/24/32/48/64 bits per
17532 pixel) and colour combinations: greyscale (1/2/4/8/16 bit); RGB, RGBA,
17533 LA (greyscale with alpha) with 8/16 bits per channel; colour mapped
17534 images (1/2/4/8 bit). Adam7 interlacing is supported for reading and writing.
17535 A number of optional chunks can be specified (when writing) and
17536 understood (when reading): tRNS, bKGD, gAMA.
17537
17538 PyPNG is not a high level toolkit for image processing (like PIL) and does not
17539 aim at being a replacement or competitor. Its strength lies in fine-grained
17540 extensive support of PNG features. It can also read and write Netpbm PAM
17541 files, with a focus on its use as an intermediate format for implementing
17542 custom PNG processing.")
17543 (license license:expat)))