gnu: python-fonttools: Update to 4.2.2.
[jackhill/guix/guix.git] / gnu / packages / python-xyz.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2013, 2014, 2015, 2016, 2019 Andreas Enge <andreas@enge.fr>
5 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2014, 2017 Eric Bavier <bavier@member.fsf.org>
7 ;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
8 ;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
9 ;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
10 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
11 ;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
12 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
13 ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
14 ;;; Copyright © 2015, 2016, 2017, 2019 Leo Famulari <leo@famulari.name>
15 ;;; Copyright © 2015, 2017 Ben Woodcroft <donttrustben@gmail.com>
16 ;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
17 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
18 ;;; Copyright © 2015, 2017 Kyle Meyer <kyle@kyleam.com>
19 ;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
20 ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
21 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
22 ;;; Copyright © 2016, 2018-2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
23 ;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
24 ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
25 ;;; Copyright © 2016, 2017 Troy Sankey <sankeytms@gmail.com>
26 ;;; Copyright © 2016, 2017 ng0 <ng0@n0.is>
27 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28 ;;; Copyright © 2016 David Craven <david@craven.ch>
29 ;;; Copyright © 2016, 2017, 2018, 2019 Marius Bakke <mbakke@fastmail.com>
30 ;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
31 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
32 ;;; Copyright © 2016, 2017, 2019 Alex Vong <alexvong1995@gmail.com>
33 ;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
34 ;;; Copyright © 2016, 2017, 2018 Julien Lepiller <julien@lepiller.eu>
35 ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
36 ;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
37 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
38 ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
39 ;;; Copyright © 2017, 2018 Adriano Peluso <catonano@gmail.com>
40 ;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
41 ;;; Copyright © 2017, 2018, 2019 Mathieu Othacehe <m.othacehe@gmail.com>
42 ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
43 ;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
44 ;;; Copyright © 2017, 2018, 2019 Kei Kebreau <kkebreau@posteo.net>
45 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
46 ;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
47 ;;; Copyright © 2017, 2019 Brendan Tildesley <mail@brendan.scot>
48 ;;; Copyright © 2018 Ethan R. Jones <ethanrjones97@gmail.com
49 ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
50 ;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
51 ;;; Copyright © 2018 Mathieu Lirzin <mthl@gnu.org>
52 ;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
53 ;;; Copyright © 2016, 2018 Tomáš Čech <sleep_walker@gnu.org>
54 ;;; Copyright © 2018, 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
55 ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
56 ;;; Copyright © 2018, 2019 Clément Lassieur <clement@lassieur.org>
57 ;;; Copyright © 2018, 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
58 ;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
59 ;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
60 ;;; Copyright © 2019, 2020 Brett Gilio <brettg@gnu.org>
61 ;;; Copyright © 2019 Sam <smbaines8@gmail.com>
62 ;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us>
63 ;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
64 ;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
65 ;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
66 ;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
67 ;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
68 ;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
69 ;;; Copyright © 2019 Tanguy Le Carrour <tanguy@bioneland.org>
70 ;;; Copyright © 2019 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de>
71 ;;; Copyright © 2020 Riku Viitanen <riku.viitanen@protonmail.com>
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 file)
102 #:use-module (gnu packages fontutils)
103 #:use-module (gnu packages gcc)
104 #:use-module (gnu packages geo)
105 #:use-module (gnu packages ghostscript)
106 #:use-module (gnu packages gl)
107 #:use-module (gnu packages glib)
108 #:use-module (gnu packages gnome)
109 #:use-module (gnu packages graphviz)
110 #:use-module (gnu packages graphics)
111 #:use-module (gnu packages gstreamer)
112 #:use-module (gnu packages gtk)
113 #:use-module (gnu packages icu4c)
114 #:use-module (gnu packages image)
115 #:use-module (gnu packages imagemagick)
116 #:use-module (gnu packages libevent)
117 #:use-module (gnu packages libffi)
118 #:use-module (gnu packages linux)
119 #:use-module (gnu packages llvm)
120 #:use-module (gnu packages man)
121 #:use-module (gnu packages maths)
122 #:use-module (gnu packages monitoring)
123 #:use-module (gnu packages multiprecision)
124 #:use-module (gnu packages networking)
125 #:use-module (gnu packages ncurses)
126 #:use-module (gnu packages openstack)
127 #:use-module (gnu packages pcre)
128 #:use-module (gnu packages perl)
129 #:use-module (gnu packages pkg-config)
130 #:use-module (gnu packages python)
131 #:use-module (gnu packages python-check)
132 #:use-module (gnu packages python-compression)
133 #:use-module (gnu packages python-crypto)
134 #:use-module (gnu packages python-science)
135 #:use-module (gnu packages python-web)
136 #:use-module (gnu packages qt)
137 #:use-module (gnu packages readline)
138 #:use-module (gnu packages sdl)
139 #:use-module (gnu packages search)
140 #:use-module (gnu packages shells)
141 #:use-module (gnu packages sphinx)
142 #:use-module (gnu packages ssh)
143 #:use-module (gnu packages terminals)
144 #:use-module (gnu packages tex)
145 #:use-module (gnu packages texinfo)
146 #:use-module (gnu packages time)
147 #:use-module (gnu packages tls)
148 #:use-module (gnu packages version-control)
149 #:use-module (gnu packages video)
150 #:use-module (gnu packages web)
151 #:use-module (gnu packages base)
152 #:use-module (gnu packages xml)
153 #:use-module (gnu packages xorg)
154 #:use-module (gnu packages xdisorg)
155 #:use-module (gnu packages tcl)
156 #:use-module (gnu packages bdw-gc)
157 #:use-module (gnu packages serialization)
158 #:use-module (guix packages)
159 #:use-module (guix download)
160 #:use-module (guix git-download)
161 #:use-module (guix hg-download)
162 #:use-module (guix utils)
163 #:use-module (guix build-system gnu)
164 #:use-module (guix build-system cmake)
165 #:use-module (guix build-system python)
166 #:use-module (guix build-system trivial)
167 #:use-module (srfi srfi-1)
168 #:use-module (srfi srfi-26))
169
170 (define-public python-psutil
171 (package
172 (name "python-psutil")
173 (version "5.6.5")
174 (source
175 (origin
176 (method url-fetch)
177 (uri (pypi-uri "psutil" version))
178 (sha256
179 (base32 "0isil5jxwwd8awz54qk28rpgjg43i5l6yl70g40vxwa4r4m56lfh"))))
180 (build-system python-build-system)
181 (arguments
182 ;; FIXME: some tests does not return and times out.
183 '(#:tests? #f))
184 (home-page "https://www.github.com/giampaolo/psutil")
185 (synopsis "Library for retrieving information on running processes")
186 (description
187 "psutil (Python system and process utilities) is a library for retrieving
188 information on running processes and system utilization (CPU, memory, disks,
189 network) in Python. It is useful mainly for system monitoring, profiling and
190 limiting process resources and management of running processes. It implements
191 many functionalities offered by command line tools such as: ps, top, lsof,
192 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
193 pidof, tty, taskset, pmap.")
194 (properties `((python2-variant . ,(delay python2-psutil))))
195 (license license:bsd-3)))
196
197 (define-public python2-psutil
198 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
199 (package
200 (inherit base)
201 (propagated-inputs
202 `(("python2-enum34" ,python2-enum34) ;optional
203 ,@(package-propagated-inputs base))))))
204
205 (define-public python-shapely
206 (package
207 (name "python-shapely")
208 (version "1.6.4.post2")
209 (source
210 (origin
211 (method url-fetch)
212 (uri (pypi-uri "Shapely" version))
213 (sha256
214 (base32
215 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
216 (build-system python-build-system)
217 (native-inputs
218 `(("python-cython" ,python-cython)
219 ("python-matplotlib" ,python-matplotlib)
220 ("python-pytest" ,python-pytest)
221 ("python-pytest-cov" ,python-pytest-cov)))
222 (inputs
223 `(("geos" ,geos)))
224 (propagated-inputs
225 `(("python-numpy" ,python-numpy)))
226 (arguments
227 `(#:phases
228 (modify-phases %standard-phases
229 (add-after 'unpack 'patch-geos-path
230 (lambda* (#:key inputs #:allow-other-keys)
231 (let ((geos (assoc-ref inputs "geos"))
232 (glibc (assoc-ref inputs ,(if (%current-target-system)
233 "cross-libc" "libc"))))
234 (substitute* "shapely/geos.py"
235 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
236 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
237 geos "/lib/libgeos_c.so'])"))
238 (("free = load_dll\\('c'\\)\\.free")
239 (string-append "free = load_dll('c', fallbacks=['"
240 glibc "/lib/libc.so.6']).free"))))
241 #t)))))
242 (home-page "https://github.com/Toblerity/Shapely")
243 (synopsis "Library for the manipulation and analysis of geometric objects")
244 (description "Shapely is a Python package for manipulation and analysis of
245 planar geometric objects. It is based on the @code{GEOS} library.")
246 (license license:bsd-3)))
247
248 (define-public python-shortuuid
249 (package
250 (name "python-shortuuid")
251 (version "0.5.0")
252 (source
253 (origin
254 (method url-fetch)
255 (uri (pypi-uri "shortuuid" version))
256 (sha256
257 (base32
258 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
259 (build-system python-build-system)
260 (native-inputs
261 `(("python-pep8" ,python-pep8)))
262 (home-page "https://github.com/skorokithakis/shortuuid")
263 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
264 (description
265 "@code{shortuuid} is a Python library for generating concise, unambiguous
266 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
267 module and then similar looking characters are removed.")
268 (license license:bsd-3)))
269
270 (define-public python-logwrap
271 (package
272 (name "python-logwrap")
273 (version "3.2.1")
274 (source
275 (origin
276 (method url-fetch)
277 (uri (pypi-uri "logwrap" version ".zip"))
278 (sha256
279 (base32
280 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
281 (build-system python-build-system)
282 (propagated-inputs
283 `(("python-six" ,python-six)
284 ("python-typing" ,python-typing)))
285 (native-inputs
286 `(("unzip" ,unzip)
287 ("python-cython" ,python-cython)
288 ("python-pytest" ,python-pytest)
289 ("python-pytest-cov" ,python-pytest-cov)
290 ("python-pytest-runner" ,python-pytest-runner)))
291 (home-page "https://github.com/penguinolog/logwrap")
292 (synopsis "Decorator for logging function arguments")
293 (description "This package provides a decorator to log function arguments
294 and function call return values in a human-readable way.")
295 (license license:asl2.0)))
296
297 (define-public python2-shapely
298 (package-with-python2 python-shapely))
299
300 (define-public python-clyent
301 (package
302 (name "python-clyent")
303 (version "1.2.1")
304 (source
305 (origin
306 (method url-fetch)
307 (uri (pypi-uri "clyent" version))
308 (sha256
309 (base32
310 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
311 (build-system python-build-system)
312 (native-inputs
313 `(("python-mock" ,python-mock)))
314 (home-page "https://github.com/binstar/clyent")
315 (synopsis "Command line client library")
316 (description "Clyent is a Python command line utiliy library. It is used
317 by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
318 (license license:bsd-3)))
319
320 (define-public python2-clyent
321 (package-with-python2 python-clyent))
322
323 (define-public python-babel
324 (package
325 (name "python-babel")
326 (version "2.7.0")
327 (source
328 (origin
329 (method url-fetch)
330 (uri (pypi-uri "Babel" version))
331 (sha256
332 (base32
333 "0a7wawx8vsg7igvz6p3x909fskhg4b2y1910xk4f4c8y22p3aqg8"))))
334 (build-system python-build-system)
335 (native-inputs
336 `(("python-freezegun" ,python-freezegun)
337 ("python-pytest" ,python-pytest)))
338 (propagated-inputs
339 `(("python-pytz" ,python-pytz)))
340 (arguments
341 `(#:phases (modify-phases %standard-phases
342 (replace 'check
343 (lambda _
344 (invoke "pytest" "-vv" "-k"
345 (string-append
346 ;; XXX: These tests fail when using Pytest 4.x and
347 ;; Babel 2.6.0. Try removing this for later versions.
348 "not test_no_inherit_metazone_marker_never_in_output"
349 " and not test_smoke_dates"
350 " and not test_smoke_numbers")))))))
351 (home-page "http://babel.pocoo.org/")
352 (synopsis
353 "Tools for internationalizing Python applications")
354 (description
355 "Babel is composed of two major parts:
356 - tools to build and work with gettext message catalogs
357 - a Python interface to the CLDR (Common Locale Data Repository), providing
358 access to various locale display names, localized number and date formatting,
359 etc. ")
360 (license license:bsd-3)))
361
362 (define-public python2-babel
363 (package-with-python2 python-babel))
364
365 ;; Sphinx < 2.0 requires this version. Remove once no longer needed.
366 (define-public python2-babel-2.6
367 (package
368 (inherit python2-babel)
369 (version "2.6.0")
370 (source (origin
371 (method url-fetch)
372 (uri (pypi-uri "Babel" version))
373 (sha256
374 (base32
375 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
376
377 (define-public python2-backport-ssl-match-hostname
378 (package
379 (name "python2-backport-ssl-match-hostname")
380 (version "3.5.0.1")
381 (source
382 (origin
383 (method url-fetch)
384 (uri (pypi-uri "backports.ssl_match_hostname" version))
385 (sha256
386 (base32
387 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
388 (build-system python-build-system)
389 (arguments
390 `(#:python ,python-2
391 #:tests? #f)) ; no test target
392 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
393 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
394 (description
395 "This backport brings the ssl.match_hostname() function to users of
396 earlier versions of Python. The function checks the hostname in the
397 certificate returned by the server to which a connection has been established,
398 and verifies that it matches the intended target hostname.")
399 (license license:psfl)))
400
401 (define-public python-boolean.py
402 (package
403 (name "python-boolean.py")
404 (version "3.6")
405 (source
406 (origin
407 ;; There's no source tarball on PyPI.
408 (method git-fetch)
409 (uri (git-reference
410 (url "https://github.com/bastikr/boolean.py")
411 (commit (string-append "v" version))))
412 (file-name (git-file-name name version))
413 (sha256
414 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
415 (build-system python-build-system)
416 (home-page "https://github.com/bastikr/boolean.py")
417 (synopsis "Boolean algebra in one Python module")
418 (description
419 "This is a small Python library that implements boolean algebra.
420 It defines two base elements, @code{TRUE} and @code{FALSE}, and a
421 @code{Symbol} class that can take on one of these two values. Calculations
422 are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
423 compositions like @code{XOR} and @code{NAND} are emulated on top of them.
424 Expressions are constructed from parsed strings or directly in Python.")
425 (license license:bsd-2)))
426
427 (define-public python-hdf4
428 (package
429 (name "python-hdf4")
430 (version "0.9")
431 (source
432 (origin
433 (method url-fetch)
434 (uri (pypi-uri name version))
435 (sha256
436 (base32
437 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
438 (build-system python-build-system)
439 (native-inputs `(("nose" ,python-nose)))
440 (propagated-inputs `(("numpy" ,python-numpy)))
441 (inputs
442 `(("hdf4" ,hdf4)
443 ("libjpeg" ,libjpeg)
444 ("zlib" ,zlib)))
445 (arguments
446 `(#:phases
447 (modify-phases %standard-phases
448 (replace 'check
449 (lambda _
450 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
451 ;; on to import numpy. Somehow this works on their CI system.
452 ;; Let's just manage PYTHONPATH here instead.
453 (substitute* "runexamples.sh"
454 (("export PYTHONPATH=.*") ""))
455 (setenv "PYTHONPATH"
456 (string-append (getcwd) ":"
457 (getenv "PYTHONPATH")))
458 (invoke "./runexamples.sh")
459 (invoke "nosetests" "-v"))))))
460 (home-page "https://github.com/fhs/python-hdf4")
461 (synopsis "Python interface to the NCSA HDF4 library")
462 (description
463 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
464 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
465 NetCDF files can also be read and modified. Python-HDF4 is a fork of
466 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
467 (license license:expat)))
468
469 (define-public python2-hdf4
470 (package-with-python2 python-hdf4))
471
472 (define-public python-h5py
473 (package
474 (name "python-h5py")
475 (version "2.8.0")
476 (source
477 (origin
478 (method url-fetch)
479 (uri (pypi-uri "h5py" version))
480 (sha256
481 (base32
482 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
483 (build-system python-build-system)
484 (arguments
485 `(#:tests? #f ; no test target
486 #:phases
487 (modify-phases %standard-phases
488 (add-after 'unpack 'fix-hdf5-paths
489 (lambda* (#:key inputs #:allow-other-keys)
490 (let ((prefix (assoc-ref inputs "hdf5")))
491 (substitute* "setup_build.py"
492 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
493 (string-append "['" prefix "/lib" "']"))
494 (("'/opt/local/include', '/usr/local/include'")
495 (string-append "'" prefix "/include" "'")))
496 (substitute* "setup_configure.py"
497 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
498 (string-append "['" prefix "/lib" "']")))
499 #t))))))
500 (propagated-inputs
501 `(("python-six" ,python-six)
502 ("python-numpy" ,python-numpy)))
503 (inputs
504 `(("hdf5" ,hdf5)))
505 (native-inputs
506 `(("python-cython" ,python-cython)
507 ("python-pkgconfig" ,python-pkgconfig)))
508 (home-page "http://www.h5py.org/")
509 (synopsis "Read and write HDF5 files from Python")
510 (description
511 "The h5py package provides both a high- and low-level interface to the
512 HDF5 library from Python. The low-level interface is intended to be a
513 complete wrapping of the HDF5 API, while the high-level component supports
514 access to HDF5 files, datasets and groups using established Python and NumPy
515 concepts.")
516 (license license:bsd-3)))
517
518 (define-public python2-h5py
519 (package-with-python2 python-h5py))
520
521 (define-public python-sh
522 (package
523 (name "python-sh")
524 (version "1.12.14")
525 (source
526 (origin
527 (method url-fetch)
528 (uri (pypi-uri "sh" version))
529 (sha256
530 (base32
531 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
532 (build-system python-build-system)
533 (arguments
534 '(#:phases
535 (modify-phases %standard-phases
536 (replace 'check
537 (lambda _
538 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
539 (setenv "HOME" "/tmp")
540 (invoke "python" "sh.py" "test"))))))
541 (native-inputs
542 `(("python-coverage" ,python-coverage)))
543 (home-page "https://github.com/amoffat/sh")
544 (synopsis "Python subprocess replacement")
545 (description "This package provides a replacement for Python's
546 @code{subprocess} feature.")
547 (license license:expat)))
548
549 (define-public python2-sh
550 (package-with-python2 python-sh))
551
552 (define-public python-cftime
553 (package
554 (name "python-cftime")
555 (version "1.0.4.2")
556 (source
557 (origin
558 (method url-fetch)
559 (uri (pypi-uri "cftime" version))
560 (sha256
561 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
562 (build-system python-build-system)
563 (propagated-inputs
564 `(("python-numpy" ,python-numpy)))
565 (native-inputs
566 `(("python-coveralls" ,python-coveralls)
567 ("python-cython" ,python-cython)
568 ("python-pytest-cov" ,python-pytest-cov)))
569 (home-page "https://github.com/Unidata/cftime")
570 (synopsis "Library for time handling")
571 (description
572 "This package provides time-handling functionality that used to be part
573 of the netcdf4 package before.")
574 ;; This package claims to include code under the GPLv3 but is released
575 ;; under ISC.
576 (license (list license:isc license:gpl3+))))
577
578 (define-public python-netcdf4
579 (package
580 (name "python-netcdf4")
581 (version "1.4.2")
582 (source
583 (origin
584 (method url-fetch)
585 (uri (pypi-uri "netCDF4" version))
586 (sha256
587 (base32
588 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
589 (build-system python-build-system)
590 (arguments
591 '(#:phases
592 (modify-phases %standard-phases
593 (add-after 'unpack 'configure-locations
594 (lambda* (#:key inputs #:allow-other-keys)
595 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
596 #t)))))
597 (native-inputs
598 `(("python-cython" ,python-cython)))
599 (propagated-inputs
600 `(("python-numpy" ,python-numpy)
601 ("python-cftime" ,python-cftime)))
602 (inputs
603 `(("netcdf" ,netcdf)
604 ("hdf4" ,hdf4)
605 ("hdf5" ,hdf5)))
606 (home-page "https://github.com/Unidata/netcdf4-python")
607 (synopsis "Python/numpy interface to the netCDF library")
608 (description "Netcdf4-python is a Python interface to the netCDF C
609 library. netCDF version 4 has many features not found in earlier
610 versions of the library and is implemented on top of HDF5. This module
611 can read and write files in both the new netCDF 4 and the old netCDF 3
612 format, and can create files that are readable by HDF5 clients. The
613 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
614 to users of that module.")
615 ;; The software is mainly ISC, but includes some files covered
616 ;; by the Expat license.
617 (license (list license:isc license:expat))))
618
619 (define-public python2-netcdf4
620 (package-with-python2 python-netcdf4))
621
622 (define-public python-license-expression
623 (package
624 (name "python-license-expression")
625 (version "0.999")
626 (source
627 (origin
628 (method url-fetch)
629 (uri (pypi-uri "license-expression" version))
630 (sha256
631 (base32 "08ppb0bxbrsxazy88sgpl9yffvdsabw6dkk1nc332wcz2mphwwyf"))))
632 (build-system python-build-system)
633 (propagated-inputs
634 `(("python-boolean.py" ,python-boolean.py)))
635 (home-page "https://github.com/nexB/license-expression")
636 (synopsis "Apply boolean logic to license expressions")
637 (description
638 "This Python module defines a tiny language to evaluate and compare
639 license expressions using boolean logic. Logical combinations of licenses can
640 be tested for equality, containment, and equivalence. They can be normalised
641 and simplified. It supports SPDX license expressions as well as other naming
642 conventions and aliases in the same expression.")
643 (license license:gpl2+)))
644
645 (define-public python-lockfile
646 (package
647 (name "python-lockfile")
648 (version "0.12.2")
649 (source
650 (origin
651 (method url-fetch)
652 (uri (pypi-uri "lockfile" version))
653 (sha256
654 (base32
655 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
656 (build-system python-build-system)
657 (arguments '(#:test-target "check"))
658 (native-inputs
659 `(("python-pbr" ,python-pbr)))
660 (home-page "https://launchpad.net/pylockfile")
661 (synopsis "Platform-independent file locking module")
662 (description
663 "The lockfile package exports a LockFile class which provides a simple
664 API for locking files.")
665 (license license:expat)))
666
667 (define-public python2-lockfile
668 (package-with-python2 python-lockfile))
669
670 (define-public python-semantic-version
671 (package
672 (name "python-semantic-version")
673 (version "2.6.0")
674 (source
675 (origin
676 (method url-fetch)
677 (uri (pypi-uri "semantic_version" version))
678 (sha256
679 (base32
680 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
681 (build-system python-build-system)
682 (arguments
683 `(#:tests? #f)) ; PyPI tarball lacks tests
684 (home-page "https://github.com/rbarrois/python-semanticversion")
685 (synopsis "Semantic versioning module for Python")
686 (description
687 "The @code{semantic_version} class is a small library for handling
688 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
689
690 It can compare versions, generate a new version that represents a bump in one of
691 the version levels, and check whether any given string is a proper semantic
692 version identifier.")
693 (license license:bsd-3)))
694
695 (define-public python2-semantic-version
696 (package-with-python2 python-semantic-version))
697
698 (define-public python-serpent
699 (package
700 (name "python-serpent")
701 (version "1.28")
702 (source
703 (origin
704 (method url-fetch)
705 (uri (pypi-uri "serpent" version))
706 (sha256
707 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
708 (build-system python-build-system)
709 (native-inputs
710 `(("python-attrs" ,python-attrs)
711 ("python-pytz" ,python-pytz)))
712 (home-page "https://github.com/irmen/Serpent")
713 (synopsis "Serializer for literal Python expressions")
714 (description
715 "Serpent provides @code{ast.literal_eval()}-compatible object tree
716 serialization. It serializes an object tree into bytes (an utf-8 encoded
717 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
718 to rebuild the original object tree.
719
720 Because only safe literals are encoded, it is safe to send serpent data to
721 other machines, such as over the network.")
722 (license license:expat)))
723
724 (define-public python-setuptools
725 (package
726 (name "python-setuptools")
727 (version "41.0.1")
728 (source
729 (origin
730 (method url-fetch)
731 (uri (pypi-uri "setuptools" version ".zip"))
732 (sha256
733 (base32
734 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
735 (modules '((guix build utils)))
736 (snippet
737 '(begin
738 ;; Remove included binaries which are used to build self-extracting
739 ;; installers for Windows.
740 ;; TODO: Find some way to build them ourself so we can include them.
741 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
742 #t))))
743 (build-system python-build-system)
744 ;; FIXME: Tests require pytest, which itself relies on setuptools.
745 ;; One could bootstrap with an internal untested setuptools.
746 (arguments
747 `(#:tests? #f))
748 (home-page "https://pypi.python.org/pypi/setuptools")
749 (synopsis
750 "Library designed to facilitate packaging Python projects")
751 (description
752 "Setuptools is a fully-featured, stable library designed to facilitate
753 packaging Python projects, where packaging includes:
754 Python package and module definitions,
755 distribution package metadata,
756 test hooks,
757 project installation,
758 platform-specific details,
759 Python 3 support.")
760 ;; TODO: setuptools now bundles the following libraries:
761 ;; packaging, pyparsing, six and appdirs. How to unbundle?
762 (license (list license:psfl ; setuptools itself
763 license:expat ; six, appdirs, pyparsing
764 license:asl2.0 ; packaging is dual ASL2/BSD-2
765 license:bsd-2))))
766
767 (define-public python2-setuptools
768 (package-with-python2 python-setuptools))
769
770 ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
771 (define-public python-setuptools-for-tensorflow
772 (hidden-package
773 (package
774 (inherit python-setuptools)
775 (version "39.1.0")
776 (source (origin
777 (inherit (package-source python-setuptools))
778 (uri (pypi-uri "setuptools" version ".zip"))
779 (sha256
780 (base32
781 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
782
783 (define-public python-uniseg
784 (package
785 (name "python-uniseg")
786 (version "0.7.1")
787 (source
788 (origin
789 (method url-fetch)
790 (uri (pypi-uri "uniseg" version ".zip"))
791 (sha256
792 (base32
793 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
794 (build-system python-build-system)
795 (arguments
796 '(#:tests? #f)) ; The test suite requires network access.
797 (native-inputs
798 `(("unzip" ,unzip)))
799 (home-page
800 "https://bitbucket.org/emptypage/uniseg-python")
801 (synopsis
802 "Python library to determine Unicode text segmentations")
803 (description
804 "Uniseg is a Python package used to determine Unicode text segmentations.
805 Supported segmentations include:
806 @enumerate
807 @item @dfn{Code point} (any value in the Unicode codespace)
808 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
809 multiple Unicode code points, e.g. \"G\" + acute-accent)
810 @item Word break
811 @item Sentence break
812 @item Line break
813 @end enumerate")
814 (license license:expat)))
815
816 (define-public python2-uniseg
817 (package-with-python2 python-uniseg))
818
819 (define-public python-humanfriendly
820 (package
821 (name "python-humanfriendly")
822 (version "4.4.1")
823 (source
824 (origin
825 (method url-fetch)
826 (uri (pypi-uri "humanfriendly" version))
827 (sha256
828 (base32
829 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
830 (build-system python-build-system)
831 (arguments
832 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
833 #:tests? #f))
834 (propagated-inputs
835 `(("python-monotonic" ,python-monotonic)))
836 (home-page "https://humanfriendly.readthedocs.io")
837 (synopsis "Human-friendly input and output in Python")
838 (description
839 "The functions and classes in @code{humanfriendly} can be used to make
840 text interfaces more user-friendly. It includes tools to parse and format
841 numbers, file sizes, and timespans, timers for long-running operations, menus
842 to allow the user to choose from a list of options, and terminal interaction
843 helpers.")
844 (license license:expat)))
845
846 (define-public python2-humanfriendly
847 (package-with-python2 python-humanfriendly))
848
849 (define-public python-capturer
850 (package
851 (name "python-capturer")
852 (version "2.4")
853 (source
854 (origin
855 (method url-fetch)
856 (uri (pypi-uri "capturer" version))
857 (sha256
858 (base32
859 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
860 (build-system python-build-system)
861 (arguments
862 `(#:tests? #f))
863 (propagated-inputs
864 `(("python-humanfriendly" ,python-humanfriendly)))
865 (home-page "https://capturer.readthedocs.io")
866 (synopsis "Capture stdout and stderr streams of the current process")
867 (description
868 "The capturer package makes it easy to capture the stdout and stderr
869 streams of the current process and subprocesses. Output can be relayed
870 to the terminal in real time but is also available to the Python program
871 for additional processing.")
872 (license license:expat)))
873
874 (define-public python2-capturer
875 (package-with-python2 python-capturer))
876
877 (define-public python-case
878 (package
879 (name "python-case")
880 (version "1.5.3")
881 (source
882 (origin
883 (method url-fetch)
884 (uri (pypi-uri "case" version))
885 (sha256
886 (base32
887 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
888 (build-system python-build-system)
889 (propagated-inputs
890 `(("python-mock" ,python-mock)
891 ("python-nose" ,python-nose)
892 ("python-six" ,python-six)
893 ("python-unittest2" ,python-unittest2)))
894 (native-inputs
895 `(("python-coverage" ,python-coverage)))
896 (home-page "https://github.com/celery/case")
897 (synopsis "Unittest utilities and convenience methods")
898 (description
899 "The @code{case} package provides utilities on top of unittest, including
900 some helpful Python 2 compatibility convenience methods.")
901 (license license:bsd-3)))
902
903 (define-public python-verboselogs
904 (package
905 (name "python-verboselogs")
906 (version "1.7")
907 (source
908 (origin
909 (method url-fetch)
910 (uri (pypi-uri "verboselogs" version))
911 (sha256
912 (base32
913 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
914 (build-system python-build-system)
915 (arguments
916 `(#:phases
917 (modify-phases %standard-phases
918 (replace 'check
919 (lambda _
920 ;; Do not run pylint plugin test, as astroid is an old
921 ;; unsupported version.
922 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
923 "verboselogs/tests.py"))))))
924 (native-inputs
925 `(("python-mock" ,python-mock)
926 ("python-pytest" ,python-pytest)))
927 (home-page "https://verboselogs.readthedocs.io")
928 (synopsis "Verbose logging level for Python's logging module")
929 (description
930 "The @code{verboselogs} package extends Python's @code{logging} module to
931 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
932 (license license:expat)))
933
934 (define-public python2-verboselogs
935 (package-with-python2 python-verboselogs))
936
937 (define-public python-coloredlogs
938 (package
939 (name "python-coloredlogs")
940 (version "10.0")
941 (source
942 (origin
943 (method url-fetch)
944 (uri (pypi-uri "coloredlogs" version))
945 (sha256
946 (base32
947 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
948 (build-system python-build-system)
949 (arguments
950 `(;Tests require some updated modules
951 #:tests? #f))
952 (propagated-inputs
953 `(("python-capturer" ,python-capturer)))
954 (home-page "https://coloredlogs.readthedocs.io")
955 (synopsis "Colored stream handler for Python's logging module")
956 (description
957 "The @code{coloredlogs} package enables colored terminal output for
958 Python's logging module. The @code{ColoredFormatter} class inherits from
959 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
960 messages in color.")
961 (license license:expat)))
962
963 (define-public python2-coloredlogs
964 (package-with-python2 python-coloredlogs))
965
966 (define-public python-editorconfig
967 (package
968 (name "python-editorconfig")
969 (version "0.12.2")
970 (source
971 (origin
972 (method url-fetch)
973 (uri (pypi-uri "EditorConfig" version))
974 (sha256
975 (base32
976 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
977 (build-system python-build-system)
978 (home-page "https://editorconfig.org/")
979 (synopsis "EditorConfig bindings for python")
980 (description "The EditorConfig project consists of a file format for
981 defining coding styles and a collection of text editor plugins that enable
982 editors to read the file format and adhere to defined styles. EditorConfig
983 files are easily readable and they work nicely with version control systems.")
984 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
985 (license (list license:bsd-2 license:psfl))))
986
987 (define-public python-et-xmlfile
988 (package
989 (name "python-et-xmlfile")
990 (version "1.0.1")
991 (source
992 (origin
993 (method url-fetch)
994 (uri (pypi-uri "et_xmlfile" version))
995 (sha256
996 (base32
997 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
998 (build-system python-build-system)
999 (arguments
1000 `(#:phases (modify-phases %standard-phases
1001 (replace 'check
1002 (lambda _
1003 (invoke "pytest"))))))
1004 (native-inputs
1005 `(("python-pytest" ,python-pytest)
1006 ("python-lxml" ,python-lxml))) ;used for the tests
1007 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
1008 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
1009 (description "This Python library is based upon the @code{xmlfile} module
1010 from @code{lxml}. It aims to provide a low memory, compatible implementation
1011 of @code{xmlfile}.")
1012 (license license:expat)))
1013
1014 (define-public python2-et-xmlfile
1015 (package-with-python2 python-et-xmlfile))
1016
1017 (define-public python-openpyxl
1018 (package
1019 (name "python-openpyxl")
1020 (version "2.6.2")
1021 (source
1022 (origin
1023 ;; We use the upstream repository, as the tests are not included in the
1024 ;; PyPI releases.
1025 (method hg-fetch)
1026 (uri (hg-reference
1027 (url "https://bitbucket.org/openpyxl/openpyxl")
1028 (changeset version)))
1029 (file-name (string-append name "-" version "-checkout"))
1030 (sha256
1031 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
1032 (build-system python-build-system)
1033 (arguments
1034 `(#:phases (modify-phases %standard-phases
1035 (replace 'check
1036 (lambda _
1037 (invoke "pytest"))))))
1038 (native-inputs
1039 ;; For the test suite.
1040 `(("python-lxml" ,python-lxml)
1041 ("python-pillow" ,python-pillow)
1042 ("python-pytest" ,python-pytest)))
1043 (propagated-inputs
1044 `(("python-et-xmlfile" ,python-et-xmlfile)
1045 ("python-jdcal" ,python-jdcal)))
1046 (home-page "https://openpyxl.readthedocs.io")
1047 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1048 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1049 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1050 standard.")
1051 (license license:expat)))
1052
1053 (define-public python-eventlet
1054 (package
1055 (name "python-eventlet")
1056 (version "0.25.1")
1057 (source
1058 (origin
1059 (method url-fetch)
1060 (uri (pypi-uri "eventlet" version))
1061 (sha256
1062 (base32
1063 "1hgz8jq19wlz8vwqj900ry8cjv578nz4scc91mlc8944yid6573c"))))
1064 (build-system python-build-system)
1065 (propagated-inputs
1066 `(("python-greenlet" ,python-greenlet)))
1067 (arguments
1068 ;; TODO: Requires unpackaged 'enum-compat'.
1069 '(#:tests? #f))
1070 (home-page "https://eventlet.net")
1071 (synopsis "Concurrent networking library for Python")
1072 (description
1073 "Eventlet is a concurrent networking library for Python that
1074 allows you to change how you run your code, not how you write it.
1075 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1076 Coroutines ensure that the developer uses a blocking style of programming
1077 that is similar to threading, but provide the benefits of non-blocking I/O.
1078 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1079 from the Python interpreter, or as a small part of a larger application.")
1080 (license license:expat)))
1081
1082 (define-public python2-eventlet
1083 (let ((base (package-with-python2
1084 (strip-python2-variant python-eventlet))))
1085 (package (inherit base)
1086 (propagated-inputs
1087 `(("python2-enum34" ,python2-enum34)
1088 ,@(package-propagated-inputs base))))))
1089
1090 (define-public python-six
1091 (package
1092 (name "python-six")
1093 (version "1.12.0")
1094 (source
1095 (origin
1096 (method url-fetch)
1097 (uri (pypi-uri "six" version))
1098 (sha256
1099 (base32
1100 "0wxs1q74v07ssjywbbm7x6h5v9qx209ld2yfsif4060sxi0h2sni"))))
1101 (build-system python-build-system)
1102 (arguments
1103 `(#:phases
1104 (modify-phases %standard-phases
1105 (replace 'check
1106 (lambda _
1107 (invoke "py.test" "-v"))))))
1108 (native-inputs
1109 `(("python-py" ,python-py)
1110 ("python-pytest" ,python-pytest-bootstrap)))
1111 (home-page "https://pypi.python.org/pypi/six/")
1112 (synopsis "Python 2 and 3 compatibility utilities")
1113 (description
1114 "Six is a Python 2 and 3 compatibility library. It provides utility
1115 functions for smoothing over the differences between the Python versions with
1116 the goal of writing Python code that is compatible on both Python versions.
1117 Six supports every Python version since 2.5. It is contained in only one
1118 Python file, so it can be easily copied into your project.")
1119 (license license:x11)))
1120
1121 (define-public python2-six
1122 (package-with-python2 python-six))
1123
1124 (define-public python-six-bootstrap
1125 (package
1126 (inherit python-six)
1127 (name "python-six-bootstrap")
1128 (native-inputs `())
1129 (arguments `(#:tests? #f))))
1130
1131 (define-public python2-six-bootstrap
1132 (package-with-python2 python-six-bootstrap))
1133
1134 (define-public python-schedule
1135 (package
1136 (name "python-schedule")
1137 (version "0.4.3")
1138 (source
1139 (origin
1140 (method url-fetch)
1141 (uri (pypi-uri "schedule" version))
1142 (sha256
1143 (base32
1144 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1145 (build-system python-build-system)
1146 (native-inputs
1147 `(("python-pytest" ,python-pytest)
1148 ("python-mock" ,python-mock)))
1149 (home-page "https://github.com/dbader/schedule")
1150 (synopsis "Schedule periodic function calls in Python")
1151 (description
1152 "Schedule is an in-process scheduler for periodic jobs that uses the
1153 builder pattern for configuration. Schedule lets you run Python functions (or
1154 any other callable) periodically at pre-determined intervals using a simple,
1155 human-friendly syntax.")
1156 (license license:expat)))
1157
1158 (define-public python2-schedule
1159 (package-with-python2 python-schedule))
1160
1161 (define-public python2-mechanize
1162 (package
1163 (name "python2-mechanize")
1164 (version "0.2.5")
1165 (source
1166 (origin
1167 (method url-fetch)
1168 (uri (pypi-uri "mechanize" version))
1169 (sha256
1170 (base32
1171 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1172 (build-system python-build-system)
1173 (arguments
1174 `(#:python ,python-2 ; apparently incompatible with Python 3
1175 #:tests? #f))
1176 ;; test fails with message
1177 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1178 ;; (python-3.3.2) or
1179 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1180 ;; (python-2.7.5).
1181 ;; The source code is from March 2011 and probably not up-to-date
1182 ;; with respect to python unit tests.
1183 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1184 (synopsis
1185 "Stateful programmatic web browsing in Python")
1186 (description
1187 "Mechanize implements stateful programmatic web browsing in Python,
1188 after Andy Lester’s Perl module WWW::Mechanize.")
1189 (license (license:non-copyleft
1190 "file://COPYING"
1191 "See COPYING in the distribution."))))
1192
1193
1194 (define-public python-simplejson
1195 (package
1196 (name "python-simplejson")
1197 (version "3.14.0")
1198 (source
1199 (origin
1200 (method url-fetch)
1201 (uri (pypi-uri "simplejson" version))
1202 (sha256
1203 (base32
1204 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1205 (build-system python-build-system)
1206 (home-page "http://simplejson.readthedocs.org/en/latest/")
1207 (synopsis
1208 "Json library for Python")
1209 (description
1210 "JSON (JavaScript Object Notation) is a subset of JavaScript
1211 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1212 format.
1213
1214 Simplejson exposes an API familiar to users of the standard library marshal
1215 and pickle modules. It is the externally maintained version of the json
1216 library contained in Python 2.6, but maintains compatibility with Python 2.5
1217 and (currently) has significant performance advantages, even without using
1218 the optional C extension for speedups. Simplejson is also supported on
1219 Python 3.3+.")
1220 (license license:x11)))
1221
1222 (define-public python2-simplejson
1223 (package-with-python2 python-simplejson))
1224
1225
1226 (define-public python-pyicu
1227 (package
1228 (name "python-pyicu")
1229 (version "2.3.1")
1230 (source
1231 (origin
1232 (method url-fetch)
1233 (uri (pypi-uri "PyICU" version))
1234 (sha256
1235 (base32
1236 "1x4w8m7ifki9z2a187pgjr33z6z0rp2fii9b73djak1vhm9v9cnx"))))
1237 (build-system python-build-system)
1238 (inputs
1239 `(("icu4c" ,icu4c)))
1240 (native-inputs
1241 `(("python-pytest" ,python-pytest)
1242 ("python-six" ,python-six)))
1243 (home-page "https://github.com/ovalhub/pyicu")
1244 (synopsis "Python extension wrapping the ICU C++ API")
1245 (description
1246 "PyICU is a python extension wrapping the ICU C++ API.")
1247 (properties `((python2-variant . ,(delay python2-pyicu))))
1248 (license license:x11)))
1249
1250 (define-public python2-pyicu
1251 (let ((base (package-with-python2
1252 (strip-python2-variant python-pyicu))))
1253 (package
1254 (inherit base)
1255 (arguments
1256 `(,@(package-arguments base)
1257 #:phases
1258 (modify-phases %standard-phases
1259 (add-before 'check 'delete-failing-test
1260 (λ _
1261 ;; XXX: This fails due to Unicode issues unique to Python 2,
1262 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1263 (delete-file "test/test_Script.py")
1264 #t))))))))
1265
1266 (define-public python2-dogtail
1267 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1268 ;; spaces in indentation" with Python 3.
1269 (package
1270 (name "python2-dogtail")
1271 (version "0.9.9")
1272 (source (origin
1273 (method url-fetch)
1274 (uri (pypi-uri "dogtail" version))
1275 (sha256
1276 (base32
1277 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1278 (build-system python-build-system)
1279 (arguments `(#:python ,python-2
1280 #:tests? #f)) ; invalid command "test"
1281 ;; Currently no offical homepage.
1282 (home-page "https://pypi.python.org/pypi/dogtail/")
1283 (synopsis "GUI test tool and automation framework written in Python")
1284 (description
1285 "Dogtail is a GUI test tool and automation framework written in Python.
1286 It uses Accessibility (a11y) technologies to communicate with desktop
1287 applications. dogtail scripts are written in Python and executed like any
1288 other Python program.")
1289 (license license:gpl2+)))
1290
1291 (define-public python-empy
1292 (package
1293 (name "python-empy")
1294 (version "3.3.3")
1295 (source (origin
1296 (method url-fetch)
1297 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1298 version ".tar.gz"))
1299 (sha256
1300 (base32
1301 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
1302 (build-system python-build-system)
1303 (arguments
1304 `(#:tests? #f)) ; python2 only
1305 (home-page "http://www.alcyone.com/software/empy/")
1306 (synopsis "Templating system for Python")
1307 (description
1308 "EmPy is a system for embedding Python expressions and statements in
1309 template text; it takes an EmPy source file, processes it, and produces
1310 output. This is accomplished via expansions, which are special signals to the
1311 EmPy system and are set off by a special prefix (by default the at sign, @@).
1312 EmPy can expand arbitrary Python expressions and statements in this way, as
1313 well as a variety of special forms. Textual data not explicitly delimited in
1314 this way is sent unaffected to the output, allowing Python to be used in
1315 effect as a markup language. Also supported are callbacks via hooks,
1316 recording and playback via diversions, and dynamic, chainable filters. The
1317 system is highly configurable via command line options and embedded
1318 commands.")
1319 (license license:lgpl2.1+)))
1320
1321 (define-public python2-empy
1322 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1323 (package
1324 (inherit base)
1325 (arguments `(,@(package-arguments base)
1326 #:tests? #t)))))
1327
1328 (define-public python2-element-tree
1329 (package
1330 (name "python2-element-tree")
1331 (version "1.2.6")
1332 (source (origin
1333 (method url-fetch)
1334 (uri (string-append
1335 "http://effbot.org/media/downloads/elementtree-"
1336 version "-20050316.tar.gz"))
1337 (sha256
1338 (base32
1339 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1340 (build-system python-build-system)
1341 (arguments
1342 `(#:python ,python-2 ; seems to be part of Python 3
1343 #:tests? #f)) ; no 'test' sub-command
1344 (synopsis "Toolkit for XML processing in Python")
1345 (description
1346 "ElementTree is a Python library supporting lightweight XML processing.")
1347 (home-page "http://effbot.org/zone/element-index.htm")
1348 (license (license:x11-style
1349 "http://docs.python.org/2/license.html"
1350 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1351
1352 (define-public python2-pybugz
1353 (package
1354 (name "python2-pybugz")
1355 (version "0.6.11")
1356 (source (origin
1357 (method url-fetch)
1358 (uri (string-append
1359 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1360 version ".tar.gz"))
1361 (sha256
1362 (base32
1363 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1364 (patches (search-patches "pybugz-stty.patch"
1365 "pybugz-encode-error.patch"))))
1366 (build-system python-build-system)
1367 (arguments
1368 `(#:python ,python-2 ; SyntaxError with Python 3
1369 #:tests? #f)) ; no 'test' sub-command
1370 (propagated-inputs
1371 `(("element-tree" ,python2-element-tree)))
1372 (synopsis "Python and command-line interface to Bugzilla")
1373 (description
1374 "PyBugz is a Python library and command-line tool to query the Bugzilla
1375 bug tracking system. It is meant as an aid to speed up interaction with the
1376 bug tracker.")
1377 (home-page "http://www.liquidx.net/pybugz/")
1378 (license license:gpl2)))
1379
1380 (define-public python2-enum
1381 (package
1382 (name "python2-enum")
1383 (version "0.4.6")
1384 (source (origin
1385 (method url-fetch)
1386 (uri (pypi-uri "enum" version))
1387 (sha256
1388 (base32
1389 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1390 (build-system python-build-system)
1391 (arguments
1392 `(#:python ,python-2))
1393 (home-page "http://pypi.python.org/pypi/enum/")
1394 (synopsis "Robust enumerated type support in Python")
1395 (description
1396 "This provides a module for robust enumerations in Python. It has
1397 been superseded by the Python standard library and is provided only for
1398 compatibility.")
1399 ;; Choice of either license.
1400 (license (list license:gpl3+ license:psfl))))
1401
1402 (define-public python-enum34
1403 (package
1404 (name "python-enum34")
1405 (version "1.1.6")
1406 (source
1407 (origin
1408 (method url-fetch)
1409 (uri (pypi-uri "enum34" version))
1410 (sha256
1411 (base32
1412 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1413 (build-system python-build-system)
1414 (home-page "https://pypi.python.org/pypi/enum34")
1415 (synopsis "Backported Python 3.4 Enum")
1416 (description
1417 "Enum34 is the new Python stdlib enum module available in Python 3.4
1418 backported for previous versions of Python from 2.4 to 3.3.")
1419 (license license:bsd-3)))
1420
1421 (define-public python2-enum34
1422 (package-with-python2 python-enum34))
1423
1424 (define-public python-parse-type
1425 (package
1426 (name "python-parse-type")
1427 (version "0.4.2")
1428 (source
1429 (origin
1430 (method url-fetch)
1431 (uri (pypi-uri "parse_type" version))
1432 (sha256
1433 (base32
1434 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1435 (build-system python-build-system)
1436 (propagated-inputs
1437 `(("python-six" ,python-six)
1438 ("python-parse" ,python-parse)))
1439 (native-inputs
1440 `(("python-pytest" ,python-pytest)
1441 ("python-pytest-runner" ,python-pytest-runner)))
1442 (home-page "https://github.com/jenisys/parse_type")
1443 (synopsis "Extended parse module")
1444 (description
1445 "Parse_type extends the python parse module.")
1446 (properties
1447 `((python2-variant . ,(delay python2-parse-type))))
1448 (license license:bsd-3)))
1449
1450 (define-public python2-parse-type
1451 (let ((base (package-with-python2
1452 (strip-python2-variant python-parse-type))))
1453 (package (inherit base)
1454 (propagated-inputs
1455 `(("python2-enum34" ,python2-enum34)
1456 ,@(package-propagated-inputs base))))))
1457
1458 (define-public python-parse
1459 (package
1460 (name "python-parse")
1461 (version "1.8.4")
1462 (source
1463 (origin
1464 (method url-fetch)
1465 (uri (pypi-uri "parse" version))
1466 (sha256
1467 (base32
1468 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1469 (build-system python-build-system)
1470 (arguments
1471 `(#:phases
1472 (modify-phases %standard-phases
1473 (replace 'check
1474 (lambda _ (invoke "python" "test_parse.py"))))))
1475 (home-page "https://github.com/r1chardj0n3s/parse")
1476 (synopsis "Parse strings")
1477 (description
1478 "Parse strings using a specification based on the Python @code{format()}
1479 syntax.")
1480 (license license:x11)))
1481
1482 (define-public python-polib
1483 (package
1484 (name "python-polib")
1485 (version "1.0.8")
1486 (source (origin
1487 (method url-fetch)
1488 (uri (pypi-uri "polib" version))
1489 (sha256
1490 (base32
1491 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1492 (build-system python-build-system)
1493 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1494 (synopsis "Manipulate, create and modify gettext files")
1495 (description "Polib can manipulate any gettext format (po, pot and mo)
1496 files. It can be used to create po files from scratch or to modify
1497 existing ones.")
1498 (license license:expat)))
1499
1500 (define-public python2-polib
1501 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1502 (package
1503 (inherit base)
1504 (arguments `(,@(package-arguments base)
1505 ;; Tests don't work with python2.
1506 #:tests? #f)))))
1507
1508 (define-public python-poyo
1509 (package
1510 (name "python-poyo")
1511 (version "0.5.0")
1512 (source
1513 (origin
1514 (method url-fetch)
1515 (uri (pypi-uri "poyo" version))
1516 (sha256
1517 (base32
1518 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
1519 (build-system python-build-system)
1520 (home-page "https://github.com/hackebrot/poyo")
1521 (synopsis "Lightweight YAML Parser for Python")
1522 (description
1523 "This package provides a lightweight YAML Parser for Python. It supports
1524 only a chosen subset of the YAML format that is required to parse cookiecutter
1525 user configuration files. It does not have support for serializing into YAML
1526 and is not compatible with JSON.")
1527 (license license:expat)))
1528
1529 (define-public scons
1530 (package
1531 (name "scons")
1532 (version "3.0.4")
1533 (source (origin
1534 (method git-fetch)
1535 (uri (git-reference
1536 (url "https://github.com/SCons/scons.git")
1537 (commit version)))
1538 (file-name (git-file-name name version))
1539 (sha256
1540 (base32
1541 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
1542 (build-system python-build-system)
1543 (arguments
1544 `(#:use-setuptools? #f ; still relies on distutils
1545 #:tests? #f ; no 'python setup.py test' command
1546 #:phases
1547 (modify-phases %standard-phases
1548 (add-before 'build 'bootstrap
1549 (lambda _
1550 (substitute* "src/engine/SCons/compat/__init__.py"
1551 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1552 "sys.modules[new] = __import__(old)"))
1553 (substitute* "src/engine/SCons/Platform/__init__.py"
1554 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1555 "mod = __import__(full_name)"))
1556 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1557 (chdir "build/scons")
1558 #t)))))
1559 (home-page "http://scons.org/")
1560 (synopsis "Software construction tool written in Python")
1561 (description
1562 "SCons is a software construction tool. Think of SCons as an improved,
1563 cross-platform substitute for the classic Make utility with integrated
1564 functionality similar to autoconf/automake and compiler caches such as ccache.
1565 In short, SCons is an easier, more reliable and faster way to build
1566 software.")
1567 (license license:x11)))
1568
1569 (define-public scons-python2
1570 (package
1571 (inherit (package-with-python2 scons))
1572 (name "scons-python2")))
1573
1574 (define-public python-extras
1575 (package
1576 (name "python-extras")
1577 (version "1.0.0")
1578 (source
1579 (origin
1580 (method url-fetch)
1581 (uri (pypi-uri "extras" version))
1582 (sha256
1583 (base32
1584 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1585 (build-system python-build-system)
1586 (arguments
1587 ;; FIXME: Circular dependency on testtools.
1588 '(#:tests? #f))
1589 (home-page "https://github.com/testing-cabal/extras")
1590 (synopsis "Useful extensions to the Python standard library")
1591 (description
1592 "Extras is a set of extensions to the Python standard library.")
1593 (license license:expat)))
1594
1595 (define-public python2-extras
1596 (package-with-python2 python-extras))
1597
1598 (define-public python-mimeparse
1599 (package
1600 (name "python-mimeparse")
1601 (version "1.6.0")
1602 (source
1603 (origin
1604 (method url-fetch)
1605 (uri (pypi-uri "python-mimeparse" version))
1606 (sha256
1607 (base32
1608 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1609 (build-system python-build-system)
1610 (arguments
1611 '(#:phases
1612 (modify-phases %standard-phases
1613 (replace 'check
1614 (lambda _
1615 (invoke "./mimeparse_test.py"))))))
1616 (home-page
1617 "https://github.com/dbtsai/python-mimeparse")
1618 (synopsis "Python library for parsing MIME types")
1619 (description
1620 "Mimeparse provides basic functions for parsing MIME type names and
1621 matching them against a list of media-ranges.")
1622 (license license:expat)))
1623
1624 (define-public python2-mimeparse
1625 (package-with-python2 python-mimeparse))
1626
1627 (define-public python-miniboa
1628 (package
1629 (name "python-miniboa")
1630 (version "1.0.7")
1631 (source
1632 (origin
1633 (method url-fetch)
1634 (uri (pypi-uri "miniboa" version))
1635 (sha256
1636 (base32
1637 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1638 (build-system python-build-system)
1639 (home-page "https://github.com/shmup/miniboa")
1640 (synopsis "Simple, single-threaded Telnet server")
1641 (description
1642 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1643 server.")
1644 (license license:asl2.0)))
1645
1646 (define-public python2-miniboa
1647 (package-with-python2 python-miniboa))
1648
1649 (define-public python-pafy
1650 (package
1651 (name "python-pafy")
1652 (version "0.5.3.1")
1653 (source
1654 (origin
1655 (method url-fetch)
1656 (uri (pypi-uri "pafy" version))
1657 (sha256
1658 (base32
1659 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1660 (build-system python-build-system)
1661 (arguments
1662 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1663 (propagated-inputs
1664 ;; Youtube-dl is a python package which is imported in the file
1665 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1666 `(("youtube-dl" ,youtube-dl)))
1667 (home-page "https://np1.github.io/pafy/")
1668 (synopsis "Retrieve YouTube content and metadata")
1669 (description
1670 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1671 (license license:lgpl3+)))
1672
1673 (define-public python2-funcsigs
1674 (package
1675 (name "python2-funcsigs")
1676 (version "1.0.2")
1677 (source (origin
1678 (method url-fetch)
1679 (uri (pypi-uri "funcsigs" version))
1680 (sha256
1681 (base32
1682 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1683 (build-system python-build-system)
1684 (arguments
1685 `(#:python ,python-2))
1686 (native-inputs
1687 `(("python2-unittest2" ,python2-unittest2)))
1688 (home-page "http://funcsigs.readthedocs.org")
1689 (synopsis "Python function signatures from PEP362")
1690 (description
1691 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1692 (license license:asl2.0)))
1693
1694 (define-public python2-funcsigs-bootstrap
1695 (package
1696 (inherit python2-funcsigs)
1697 (name "python2-funcsigs-bootstrap")
1698 (native-inputs `())
1699 (arguments
1700 `(#:tests? #f
1701 ,@(package-arguments python2-funcsigs)))))
1702
1703 (define-public python-py
1704 (package
1705 (name "python-py")
1706 (version "1.8.0")
1707 (source
1708 (origin
1709 (method url-fetch)
1710 (uri (pypi-uri "py" version))
1711 (sha256
1712 (base32
1713 "0lsy1gajva083pzc7csj1cvbmminb7b4l6a0prdzyb3fd829nqyw"))))
1714 (build-system python-build-system)
1715 (arguments
1716 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1717 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1718 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1719 ;; Is this module globally installed?"
1720 '(#:tests? #f))
1721 (native-inputs
1722 `(("python-setuptools-scm" ,python-setuptools-scm)))
1723 (home-page "https://github.com/pytest-dev/py")
1724 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1725 (description
1726 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1727 code introspection, and logging.")
1728 (license license:expat)))
1729
1730 (define-public python2-py
1731 (package-with-python2 python-py))
1732
1733 ;; Recent versions of python-fixtures and python-testrepository need
1734 ;; python-pbr for packaging, which itself needs these two packages for
1735 ;; testing.
1736 ;; To fix this circular dependency, we use a build of python-pbr, based on the
1737 ;; same source, just without any test dependencies and with tests disabled.
1738 ;; python-pbr-minmal is then used to package python-fixtures and
1739 ;; python-testrepository.
1740 ;; Strictly speaking we currently could remove the test-requirements from the
1741 ;; normal python-pbr package (and save this package) since test are disabled
1742 ;; there anyway. But this may change in future.
1743 (define-public python-pbr-minimal
1744 (package
1745 (name "python-pbr-minimal")
1746 (version "3.0.1")
1747 (source
1748 (origin
1749 (method url-fetch)
1750 (uri (pypi-uri "pbr" version))
1751 (sha256
1752 (base32
1753 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1754 (build-system python-build-system)
1755 (arguments
1756 `(#:tests? #f))
1757 (home-page "http://docs.openstack.org/developer/pbr/")
1758 (synopsis "Minimal build of python-pbr used for bootstrapping")
1759 (description
1760 "Used only for bootstrapping python2-pbr, you should not need this.")
1761 (license license:asl2.0)))
1762
1763 (define-public python2-pbr-minimal
1764 (package-with-python2 python-pbr-minimal))
1765
1766 (define-public python-pbr
1767 (package
1768 (inherit python-pbr-minimal)
1769 (name "python-pbr")
1770 (arguments
1771 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1772 (propagated-inputs
1773 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1774 (native-inputs
1775 `(("python-fixtures" ,python-fixtures-bootstrap)
1776 ;; discover, coverage, hacking, subunit
1777 ("python-mock" ,python-mock)
1778 ("python-six" ,python-six)
1779 ("python-sphinx" ,python-sphinx)
1780 ("python-testrepository" ,python-testrepository-bootstrap)
1781 ("python-testresources" ,python-testresources-bootstrap)
1782 ("python-testscenarios" ,python-testscenarios-bootstrap)
1783 ("python-testtools" ,python-testtools-bootstrap)
1784 ("python-virtualenv" ,python-virtualenv)))
1785 (synopsis "Enhance the default behavior of Python’s setuptools")
1786 (description
1787 "Python Build Reasonableness (PBR) is a library that injects some useful
1788 and sensible default behaviors into your setuptools run. It will set
1789 versions, process requirements files and generate AUTHORS and ChangeLog file
1790 from git information.
1791 ")))
1792
1793 (define-public python2-pbr
1794 (package-with-python2 python-pbr))
1795
1796 (define-public python-pyrsistent
1797 (package
1798 (name "python-pyrsistent")
1799 (version "0.14.11")
1800 (home-page "https://github.com/tobgu/pyrsistent")
1801 (source (origin
1802 (method url-fetch)
1803 (uri (pypi-uri "pyrsistent" version))
1804 (sha256
1805 (base32
1806 "1qkh74bm296mp5g3r11lgsksr6bh4w1bf8pji4nmxdlfj542ga1w"))))
1807 (build-system python-build-system)
1808 (native-inputs
1809 `(("python-hypothesis" ,python-hypothesis)
1810 ("python-pytest" ,python-pytest)
1811 ("python-pytest-runner" ,python-pytest-runner)))
1812 (propagated-inputs
1813 `(("python-six" ,python-six)))
1814 (synopsis "Persistent data structures for Python")
1815 (description
1816 "Pyrsistent is a number of persistent collections (by some referred to as
1817 functional data structures). Persistent in the sense that they are immutable.
1818
1819 All methods on a data structure that would normally mutate it instead return a
1820 new copy of the structure containing the requested updates. The original
1821 structure is left untouched.")
1822 (license license:expat)))
1823
1824 (define-public python2-pyrsistent
1825 (package-with-python2 python-pyrsistent))
1826
1827 (define-public python-exif-read
1828 (package
1829 (name "python-exif-read")
1830 (version "2.1.2")
1831 (source (origin
1832 (method url-fetch)
1833 (uri (pypi-uri "ExifRead" version))
1834 (sha256
1835 (base32
1836 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1837 (build-system python-build-system)
1838 (arguments `(#:tests? #f)) ; no tests
1839 (home-page "https://github.com/ianare/exif-py")
1840 (synopsis "Python library to extract EXIF data from image files")
1841 (description
1842 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1843 files.")
1844 (license license:bsd-3)))
1845
1846 (define-public python2-exif-read
1847 (package-with-python2 python-exif-read))
1848
1849 (define-public python-pyld
1850 (package
1851 (name "python-pyld")
1852 (version "1.0.5")
1853 (source (origin
1854 (method url-fetch)
1855 (uri (pypi-uri "PyLD" version))
1856 (sha256
1857 (base32
1858 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
1859 (build-system python-build-system)
1860 (home-page "https://github.com/digitalbazaar/pyld")
1861 (synopsis "Python implementation of the JSON-LD specification")
1862 (description
1863 "PyLD is an implementation of the JSON-LD specification.")
1864 (license license:bsd-3)))
1865
1866 (define-public python2-pyld
1867 (package-with-python2 python-pyld))
1868
1869 (define-public python-click
1870 (package
1871 (name "python-click")
1872 (version "7.0")
1873 (source
1874 (origin
1875 (method url-fetch)
1876 (uri (pypi-uri "click" version))
1877 (sha256
1878 (base32
1879 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
1880 (build-system python-build-system)
1881 (arguments
1882 `(#:phases
1883 (modify-phases %standard-phases
1884 (add-after 'unpack 'fix-paths
1885 (lambda* (#:key inputs #:allow-other-keys)
1886 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1887 "cross-libc" "libc"))))
1888 (substitute* "click/_unicodefun.py"
1889 (("'locale'")
1890 (string-append "'" glibc "/bin/locale'"))))
1891 #t))
1892 (replace 'check
1893 (lambda _
1894 (invoke "python" "-m" "pytest"))))))
1895 (native-inputs
1896 `(("python-pytest" ,python-pytest)))
1897 (home-page "https://palletsprojects.com/p/click/")
1898 (synopsis "Command line library for Python")
1899 (description
1900 "Click is a Python package for creating command line interfaces in a
1901 composable way with as little code as necessary. Its name stands for
1902 \"Command Line Interface Creation Kit\". It's highly configurable but comes
1903 with sensible defaults out of the box.")
1904 (license license:bsd-3)))
1905
1906 (define-public python2-click
1907 (package-with-python2 python-click))
1908
1909 (define-public python-wheel
1910 (package
1911 (name "python-wheel")
1912 (version "0.32.3")
1913 (source
1914 (origin
1915 (method url-fetch)
1916 (uri (pypi-uri "wheel" version))
1917 (sha256
1918 (base32
1919 "1dhxl1bf18bx9szmqcnxbg6204hp3im8089q3hkwh5jfa6zh75q2"))))
1920 (build-system python-build-system)
1921 (native-inputs
1922 `(("python-jsonschema" ,python-jsonschema)
1923 ("python-pytest-cov" ,python-pytest-cov)))
1924 (home-page "https://bitbucket.org/pypa/wheel/")
1925 (synopsis "Format for built Python packages")
1926 (description
1927 "A wheel is a ZIP-format archive with a specially formatted filename and
1928 the @code{.whl} extension. It is designed to contain all the files for a PEP
1929 376 compatible install in a way that is very close to the on-disk format. Many
1930 packages will be properly installed with only the @code{Unpack} step and the
1931 unpacked archive preserves enough information to @code{Spread} (copy data and
1932 scripts to their final locations) at any later time. Wheel files can be
1933 installed with a newer @code{pip} or with wheel's own command line utility.")
1934 (license license:expat)
1935 (properties `((python2-variant . ,(delay python2-wheel))))))
1936
1937 (define-public python2-wheel
1938 (let ((wheel (package-with-python2
1939 (strip-python2-variant python-wheel))))
1940 (package (inherit wheel)
1941 (native-inputs `(("python2-functools32" ,python2-functools32)
1942 ,@(package-native-inputs wheel))))))
1943
1944 (define-public python-vcversioner
1945 (package
1946 (name "python-vcversioner")
1947 (version "2.16.0.0")
1948 (source
1949 (origin
1950 (method url-fetch)
1951 (uri (pypi-uri "vcversioner" version))
1952 (sha256
1953 (base32
1954 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1955 (build-system python-build-system)
1956 (synopsis "Python library for version number discovery")
1957 (description "Vcversioner is a Python library that inspects tagging
1958 information in a variety of version control systems in order to discover
1959 version numbers.")
1960 (home-page "https://github.com/habnabit/vcversioner")
1961 (license license:isc)))
1962
1963 (define-public python2-vcversioner
1964 (package-with-python2 python-vcversioner))
1965
1966 (define-public python-jdcal
1967 (package
1968 (name "python-jdcal")
1969 (version "1.4")
1970 (source
1971 (origin
1972 (method url-fetch)
1973 (uri (pypi-uri "jdcal" version))
1974 (sha256
1975 (base32
1976 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
1977 (build-system python-build-system)
1978 (arguments
1979 `(#:phases (modify-phases %standard-phases
1980 (replace 'check
1981 (lambda _
1982 (invoke "pytest"))))))
1983 (native-inputs
1984 `(("python-pytest" ,python-pytest)))
1985 (home-page "https://github.com/phn/jdcal")
1986 (synopsis "Functions to convert between Julian dates Gregorian dates")
1987 (description "This Python library provides functions for converting
1988 between Julian dates and Gregorian dates.")
1989 (license license:bsd-2)))
1990
1991 (define-public python2-jdcal
1992 (package-with-python2 python-jdcal))
1993
1994 (define-public python-jsonschema
1995 (package
1996 (name "python-jsonschema")
1997 (version "3.0.1")
1998 (source (origin
1999 (method url-fetch)
2000 (uri (pypi-uri "jsonschema" version))
2001 (sha256
2002 (base32
2003 "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc"))))
2004 (build-system python-build-system)
2005 (arguments
2006 '(#:phases
2007 (modify-phases %standard-phases
2008 (replace 'check
2009 (lambda _
2010 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2011 (invoke "trial" "jsonschema"))))))
2012 (native-inputs
2013 `(("python-setuptools_scm" ,python-setuptools-scm)
2014 ("python-twisted" ,python-twisted)))
2015 (propagated-inputs
2016 `(("python-attrs" ,python-attrs)
2017 ("python-pyrsistent" ,python-pyrsistent)
2018 ("python-six" ,python-six)))
2019 (home-page "https://github.com/Julian/jsonschema")
2020 (synopsis "Implementation of JSON Schema for Python")
2021 (description
2022 "Jsonschema is an implementation of JSON Schema for Python.")
2023 (license license:expat)
2024 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2025
2026 (define-public python2-jsonschema
2027 (let ((jsonschema (package-with-python2
2028 (strip-python2-variant python-jsonschema))))
2029 (package (inherit jsonschema)
2030 (propagated-inputs
2031 `(("python2-functools32" ,python2-functools32)
2032 ,@(package-propagated-inputs jsonschema))))))
2033
2034 ;; This old version is still required by docker-compose as of 1.24.0.
2035 (define-public python-jsonschema-2.6
2036 (package
2037 (name "python-jsonschema")
2038 (version "2.6.0")
2039 (source (origin
2040 (method url-fetch)
2041 (uri (pypi-uri "jsonschema" version))
2042 (sha256
2043 (base32
2044 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
2045 (build-system python-build-system)
2046 (arguments
2047 '(#:phases
2048 (modify-phases %standard-phases
2049 (replace 'check (lambda _ (invoke "nosetests"))))))
2050 (native-inputs
2051 `(("python-nose" ,python-nose)
2052 ("python-vcversioner" ,python-vcversioner)))
2053 (home-page "https://github.com/Julian/jsonschema")
2054 (synopsis "Implementation of JSON Schema for Python")
2055 (description
2056 "Jsonschema is an implementation of JSON Schema for Python.")
2057 (license license:expat)
2058 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2059
2060 (define-public python-schema
2061 (package
2062 (name "python-schema")
2063 (version "0.6.6")
2064 (source
2065 (origin
2066 (method url-fetch)
2067 (uri (pypi-uri "schema" version))
2068 (sha256
2069 (base32
2070 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2071 (build-system python-build-system)
2072 (native-inputs
2073 `(("python-pytest" ,python-pytest)))
2074 (home-page "https://github.com/keleshev/schema")
2075 (synopsis "Simple data validation library")
2076 (description
2077 "@code{python-schema} is a library for validating Python data
2078 structures, such as those obtained from config-files, forms, external
2079 services or command-line parsing, converted from JSON/YAML (or
2080 something else) to Python data-types.")
2081 (license license:psfl)))
2082
2083 (define-public python2-schema
2084 (package-with-python2 python-schema))
2085
2086 (define-public python-schema-0.5
2087 (package (inherit python-schema)
2088 (version "0.5.0")
2089 (source
2090 (origin
2091 (method url-fetch)
2092 (uri (pypi-uri "schema" version))
2093 (sha256
2094 (base32
2095 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2096
2097 (define-public python2-schema-0.5
2098 (package-with-python2 python-schema-0.5))
2099
2100 (define-public python-kitchen
2101 (package
2102 (name "python-kitchen")
2103 (version "1.2.5")
2104 (source
2105 (origin
2106 (method url-fetch)
2107 (uri (pypi-uri "kitchen" version))
2108 (sha256
2109 (base32
2110 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2111 (build-system python-build-system)
2112 (propagated-inputs
2113 `(("python-chardet" ,python-chardet)))
2114 (home-page "https://github.com/fedora-infra/kitchen")
2115 (synopsis "Python API for snippets")
2116 (description "@code{kitchen} module provides a python API for all sorts of
2117 little useful snippets of code that everybody ends up writing for their projects
2118 but never seem big enough to build an independent release. Use kitchen and stop
2119 cutting and pasting that code over and over.")
2120 (license (list license:lgpl2.1+
2121 ;; subprocess.py, test_subprocess.py,
2122 ;; kitchen/pycompat25/defaultdict.py:
2123 license:psfl))))
2124
2125 (define-public python2-kitchen
2126 (package-with-python2 python-kitchen))
2127
2128 (define-public python-unidecode
2129 (package
2130 (name "python-unidecode")
2131 (version "1.1.1")
2132 (source (origin
2133 (method url-fetch)
2134 (uri (pypi-uri "Unidecode" version))
2135 (sha256
2136 (base32
2137 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
2138 (build-system python-build-system)
2139 (home-page "https://pypi.python.org/pypi/Unidecode")
2140 (synopsis "ASCII transliterations of Unicode text")
2141 (description
2142 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2143 useful when integrating with legacy code that doesn't support Unicode, or for
2144 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2145 machine identifiers from human-readable Unicode strings that should still be
2146 somewhat intelligible.")
2147 (license license:gpl2+)))
2148
2149 (define-public python2-unidecode
2150 (package-with-python2 python-unidecode))
2151
2152 (define-public python-pyjwt
2153 (package
2154 (name "python-pyjwt")
2155 (version "1.7.1")
2156 (source
2157 (origin
2158 (method url-fetch)
2159 (uri (pypi-uri "PyJWT" version))
2160 (sha256
2161 (base32
2162 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
2163 (modules '((guix build utils)))
2164 (snippet
2165 '(begin
2166 (for-each delete-file-recursively
2167 (find-files "." "\\.pyc$"))
2168 #t))))
2169 (build-system python-build-system)
2170 (native-inputs
2171 `(("python-pytest" ,python-pytest)
2172 ("python-pytest-cov" ,python-pytest-cov)
2173 ("python-pytest-runner" ,python-pytest-runner)))
2174 (home-page "https://github.com/progrium/pyjwt")
2175 (synopsis "JSON Web Token implementation in Python")
2176 (description
2177 "PyJWT is a JSON Web Token implementation written in Python.")
2178 (license license:expat)))
2179
2180 (define-public python2-pyjwt
2181 (package-with-python2 python-pyjwt))
2182
2183 (define-public python-pykka
2184 (package
2185 (name "python-pykka")
2186 (version "1.2.1")
2187 (source
2188 (origin
2189 (method url-fetch)
2190 (uri (pypi-uri "Pykka" version))
2191 (sha256
2192 (base32
2193 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2194 (build-system python-build-system)
2195 (native-inputs
2196 `(("python-mock" ,python-mock)
2197 ("python-nose" ,python-nose)
2198 ("python-gevent" ,python-gevent)
2199 ("python-eventlet" ,python-eventlet)))
2200 (home-page "https://www.pykka.org/")
2201 (synopsis "Pykka is a Python implementation of the actor model")
2202 (description
2203 "Pykka is a Python implementation of the actor model.
2204 The actor model introduces some simple rules to control the sharing
2205 of state and cooperation between execution units, which makes it
2206 easier to build concurrent applications.")
2207 (license license:asl2.0)))
2208
2209 (define-public python2-pykka
2210 (package-with-python2 python-pykka))
2211
2212 (define-public python-pymsgbox
2213 (package
2214 (name "python-pymsgbox")
2215 (version "1.0.6")
2216 (source
2217 (origin
2218 (method git-fetch)
2219 (uri (git-reference
2220 ;; LICENSE.txt is not present on pypi
2221 (url "https://github.com/asweigart/PyMsgBox")
2222 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2223 (file-name (git-file-name name version))
2224 (sha256
2225 (base32
2226 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2227 (arguments
2228 ;; Circular dependency to run tests:
2229 ;; Tests need pyautogui, which depends on pymsgbox.
2230 '(#:tests? #f))
2231 (build-system python-build-system)
2232 (home-page "https://github.com/asweigart/PyMsgBox")
2233 (synopsis "Python module for JavaScript-like message boxes")
2234 (description
2235 "PyMsgBox is a simple, cross-platform, pure Python module for
2236 JavaScript-like message boxes. Types of dialog boxes include:
2237 @enumerate
2238 @item alert
2239 @item confirm
2240 @item prompt
2241 @item password
2242 @end enumerate
2243 ")
2244 (license license:bsd-3)))
2245
2246 (define-public python-pympler
2247 (package
2248 (name "python-pympler")
2249 (home-page "https://pythonhosted.org/Pympler/")
2250 (version "0.7")
2251 (source (origin
2252 (method url-fetch)
2253 (uri (pypi-uri "Pympler" version))
2254 (sha256
2255 (base32
2256 "0ki7bqp1h9l1xc2k1h4vjyzsgs20i8ingvcdhszyi72s28wyf4bs"))))
2257 (build-system python-build-system)
2258 (arguments
2259 `(#:phases (modify-phases %standard-phases
2260 (delete 'check)
2261 (add-after 'install 'check
2262 (lambda* (#:key inputs outputs #:allow-other-keys)
2263 (add-installed-pythonpath inputs outputs)
2264 (invoke "python" "setup.py" "test"))))))
2265 (synopsis "Measure, monitor and analyze memory behavior")
2266 (description
2267 "Pympler is a development tool to measure, monitor and analyze
2268 the memory behavior of Python objects in a running Python application.
2269
2270 By pympling a Python application, detailed insight in the size and the
2271 lifetime of Python objects can be obtained. Undesirable or unexpected
2272 runtime behavior like memory bloat and other @samp{pymples} can easily
2273 be identified.
2274
2275 A web profiling frontend exposes process statistics, garbage
2276 visualisation and class tracker statistics.")
2277 (license license:asl2.0)))
2278
2279 (define-public python2-pympler
2280 (package-with-python2 python-pympler))
2281
2282 (define-public python-itsdangerous
2283 (package
2284 (name "python-itsdangerous")
2285 (version "1.1.0")
2286 (source
2287 (origin
2288 (method url-fetch)
2289 (uri (pypi-uri "itsdangerous" version))
2290 (sha256
2291 (base32
2292 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
2293 (build-system python-build-system)
2294 (home-page "https://palletsprojects.com/p/itsdangerous/")
2295 (synopsis "Python library for passing data to/from untrusted environments")
2296 (description
2297 "Itsdangerous provides various helpers to pass trusted data to untrusted
2298 environments and back.")
2299 (license license:bsd-3)))
2300
2301 (define-public python2-itsdangerous
2302 (package-with-python2 python-itsdangerous))
2303
2304 (define-public python-pyyaml
2305 (package
2306 (name "python-pyyaml")
2307 (version "3.13")
2308 (source
2309 (origin
2310 (method url-fetch)
2311 (uri (pypi-uri "PyYAML" version))
2312 (sha256
2313 (base32
2314 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2315 (build-system python-build-system)
2316 (inputs
2317 `(("libyaml" ,libyaml)))
2318 (home-page "http://pyyaml.org/wiki/PyYAML")
2319 (synopsis "YAML parser and emitter for Python")
2320 (description
2321 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2322 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2323 API, and sensible error messages. PyYAML supports standard YAML tags and
2324 provides Python-specific tags that allow to represent an arbitrary Python
2325 object.")
2326 (license license:expat)))
2327
2328 (define-public python2-pyyaml
2329 (package-with-python2 python-pyyaml))
2330
2331 (define-public python-vine
2332 (package
2333 (name "python-vine")
2334 (version "1.1.4")
2335 (source
2336 (origin
2337 (method url-fetch)
2338 (uri (pypi-uri "vine" version))
2339 (sha256
2340 (base32
2341 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2342 (build-system python-build-system)
2343 (native-inputs
2344 `(("python-pytest" ,python-pytest)
2345 ("python-case" ,python-case)))
2346 (home-page "https://github.com/celery/vine")
2347 (synopsis "Promises for Python")
2348 (description
2349 "@code{vine} provides a special implementation of promises in that it can
2350 be used both for \"promise of a value\" and lazy evaluation. The biggest
2351 upside for this is that everything in a promise can also be a promise,
2352 e.g. filters, callbacks and errbacks can all be promises.")
2353 (license license:bsd-3)))
2354
2355 (define-public python-virtualenv
2356 (package
2357 (name "python-virtualenv")
2358 (version "16.1.0")
2359 (source
2360 (origin
2361 (method url-fetch)
2362 (uri (pypi-uri "virtualenv" version))
2363 (sha256
2364 (base32
2365 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
2366 (build-system python-build-system)
2367 (arguments
2368 `(#:phases
2369 (modify-phases %standard-phases
2370 (add-before 'check 'disable-failing-test
2371 (lambda _
2372 ;; Disable failing test. See upstream bug report
2373 ;; https://github.com/pypa/virtualenv/issues/957
2374 (substitute* "tests/test_virtualenv.py"
2375 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2376 #t)))))
2377 (native-inputs
2378 `(("python-mock" ,python-mock)
2379 ("python-pytest" ,python-pytest)))
2380 (home-page "https://virtualenv.pypa.io/")
2381 (synopsis "Virtual Python environment builder")
2382 (description
2383 "Virtualenv is a tool to create isolated Python environments.")
2384 (license license:expat)))
2385
2386 (define-public python2-virtualenv
2387 (package-with-python2 python-virtualenv))
2388
2389 (define-public python-markupsafe
2390 (package
2391 (name "python-markupsafe")
2392 (version "1.1.1")
2393 (source
2394 (origin
2395 (method url-fetch)
2396 (uri (pypi-uri "MarkupSafe" version))
2397 (sha256
2398 (base32
2399 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
2400 (build-system python-build-system)
2401 (arguments
2402 `(#:modules ((ice-9 ftw)
2403 (srfi srfi-1)
2404 (srfi srfi-26)
2405 (guix build utils)
2406 (guix build python-build-system))
2407 #:phases (modify-phases %standard-phases
2408 (replace 'check
2409 (lambda _
2410 (let ((cwd (getcwd))
2411 (libdir (find (cut string-prefix? "lib." <>)
2412 (scandir "build"))))
2413 (setenv "PYTHONPATH"
2414 (string-append cwd "/build/" libdir ":"
2415 (getenv "PYTHONPATH")))
2416 (invoke "pytest" "-vv")))))))
2417 (native-inputs
2418 `(("python-pytest" ,python-pytest)))
2419 (home-page "https://github.com/mitsuhiko/markupsafe")
2420 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2421 (description
2422 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2423 for Python.")
2424 (license license:bsd-3)))
2425
2426 (define-public python2-markupsafe
2427 (package-with-python2 python-markupsafe))
2428
2429 (define-public python-jinja2
2430 (package
2431 (name "python-jinja2")
2432 (version "2.10.1")
2433 (source
2434 (origin
2435 (method url-fetch)
2436 (uri (pypi-uri "Jinja2" version))
2437 (sha256
2438 (base32
2439 "04shqrs56aj04ipyqykj512rw2l0zfammvj9krawzxz7xc14yp06"))))
2440 (build-system python-build-system)
2441 (propagated-inputs
2442 `(("python-markupsafe" ,python-markupsafe)))
2443 (home-page "http://jinja.pocoo.org/")
2444 (synopsis "Python template engine")
2445 (description
2446 "Jinja2 is a small but fast and easy to use stand-alone template engine
2447 written in pure Python.")
2448 (license license:bsd-3)))
2449
2450 (define-public python2-jinja2
2451 (package-with-python2 python-jinja2))
2452
2453 (define-public python-jinja2-time
2454 (package
2455 (name "python-jinja2-time")
2456 (version "0.2.0")
2457 (source
2458 (origin
2459 (method url-fetch)
2460 (uri (pypi-uri "jinja2-time" version))
2461 (sha256
2462 (base32
2463 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
2464 (build-system python-build-system)
2465 (propagated-inputs
2466 `(("python-arrow" ,python-arrow)
2467 ("python-jinja2" ,python-jinja2)))
2468 (home-page
2469 "https://github.com/hackebrot/jinja2-time")
2470 (synopsis "Jinja2 Extension for Dates and Times")
2471 (description
2472 "This package provides an extension for the template engine Jinja2. It
2473 adds a 'now' tag providing a convenient access to the arrow.now() API from
2474 templates. A format string can be provided to control the output.")
2475 (license license:expat)))
2476
2477 (define-public python-pystache
2478 (package
2479 (name "python-pystache")
2480 (version "0.5.4")
2481 (source (origin
2482 (method url-fetch)
2483 (uri (pypi-uri "pystache" version))
2484 (sha256
2485 (base32
2486 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2487 (build-system python-build-system)
2488 (arguments
2489 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2490 (home-page "http://defunkt.io/pystache/")
2491 (synopsis "Python logic-less template engine")
2492 (description
2493 "Pystache is a Python implementation of the framework agnostic,
2494 logic-free templating system Mustache.")
2495 (license license:expat)
2496 (properties `((python2-variant . ,(delay python2-pystache))))))
2497
2498 (define-public python2-pystache
2499 (package (inherit (package-with-python2
2500 (strip-python2-variant python-pystache)))
2501 (arguments
2502 `(#:python ,python-2
2503 #:phases
2504 (modify-phases %standard-phases
2505 (replace 'check
2506 (lambda _
2507 (invoke "python" "test_pystache.py"))))))))
2508
2509 (define-public python-joblib
2510 (package
2511 (name "python-joblib")
2512 (version "0.13.0")
2513 (source (origin
2514 (method url-fetch)
2515 (uri (pypi-uri "joblib" version))
2516 (sha256
2517 (base32
2518 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2519 (build-system python-build-system)
2520 (arguments
2521 `(#:phases
2522 (modify-phases %standard-phases
2523 (replace 'check
2524 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2525 (native-inputs
2526 `(("python-pytest" ,python-pytest)))
2527 (home-page "https://joblib.readthedocs.io/")
2528 (synopsis "Using Python functions as pipeline jobs")
2529 (description
2530 "Joblib is a set of tools to provide lightweight pipelining in Python.
2531 In particular, joblib offers: transparent disk-caching of the output values
2532 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2533 logging and tracing of the execution.")
2534 (license license:bsd-3)))
2535
2536 (define-public python2-joblib
2537 (package-with-python2 python-joblib))
2538
2539 (define-public python-daemon
2540 (package
2541 (name "python-daemon")
2542 (version "2.2.3")
2543 (source
2544 (origin
2545 (method url-fetch)
2546 (uri (pypi-uri "python-daemon" version))
2547 (sha256
2548 (base32
2549 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2550 (build-system python-build-system)
2551 (arguments
2552 `(#:phases
2553 (modify-phases %standard-phases
2554 (add-before 'check 'disable-tests
2555 (lambda _
2556 ;; FIXME: Determine why test fails
2557 (substitute* "test/test_daemon.py"
2558 (("test_detaches_process_context")
2559 "skip_test_detaches_process_context"))
2560 #t)))))
2561 (propagated-inputs
2562 `(("python-lockfile" ,python-lockfile)))
2563 (native-inputs
2564 `(("python-unittest2" ,python-unittest2)
2565 ("python-testtools" ,python-testtools)
2566 ("python-testscenarios" ,python-testscenarios)
2567 ("python-mock" ,python-mock)
2568 ("python-docutils" ,python-docutils)))
2569 (home-page "https://pagure.io/python-daemon/")
2570 (synopsis "Python library for making a Unix daemon process")
2571 (description "Python-daemon is a library that assists a Python program to
2572 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2573
2574 This library provides a @code{DaemonContext} class that manages the following
2575 important tasks for becoming a daemon process:
2576 @enumerate
2577 @item Detach the process into its own process group.
2578 @item Set process environment appropriate for running inside a chroot.
2579 @item Renounce suid and sgid privileges.
2580 @item Close all open file descriptors.
2581 @item Change the working directory, uid, gid, and umask.
2582 @item Set appropriate signal handlers.
2583 @item Open new file descriptors for stdin, stdout, and stderr.
2584 @item Manage a specified PID lock file.
2585 @item Register cleanup functions for at-exit processing.
2586 @end enumerate")
2587 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2588 (license (list license:asl2.0 license:gpl3+))))
2589
2590 (define-public python-docutils
2591 (package
2592 (name "python-docutils")
2593 (version "0.14")
2594 (source
2595 (origin
2596 (method url-fetch)
2597 (uri (pypi-uri "docutils" version))
2598 (sha256
2599 (base32
2600 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2601 (build-system python-build-system)
2602 (arguments
2603 '(#:tests? #f)) ; no setup.py test command
2604 (home-page "http://docutils.sourceforge.net/")
2605 (synopsis "Python Documentation Utilities")
2606 (description
2607 "Docutils is a modular system for processing documentation into useful
2608 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2609 reStructuredText.")
2610 ;; Most of the source code is public domain, but some source files are
2611 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2612 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2613
2614 (define-public python2-docutils
2615 (package-with-python2 python-docutils))
2616
2617 (define-public python-pygments
2618 (package
2619 (name "python-pygments")
2620 (version "2.4.2")
2621 (source
2622 (origin
2623 (method url-fetch)
2624 (uri (pypi-uri "Pygments" version))
2625 (sha256
2626 (base32
2627 "15v2sqm5g12bqa0c7wikfh9ck2nl97ayizy1hpqhmws5gqalq748"))))
2628 (build-system python-build-system)
2629 (arguments
2630 ;; FIXME: Tests require sphinx, which depends on this.
2631 '(#:tests? #f))
2632 (home-page "http://pygments.org/")
2633 (synopsis "Syntax highlighting")
2634 (description
2635 "Pygments is a syntax highlighting package written in Python.")
2636 (license license:bsd-2)))
2637
2638 (define-public python2-pygments
2639 (package-with-python2 python-pygments))
2640
2641 (define-public python-bumpversion
2642 (package
2643 (name "python-bumpversion")
2644 (version "0.5.3")
2645 (source
2646 (origin
2647 (method url-fetch)
2648 (uri (pypi-uri "bumpversion" version))
2649 (sha256
2650 (base32
2651 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
2652 (build-system python-build-system)
2653 (home-page "https://github.com/peritus/bumpversion")
2654 (synopsis "Tool to bump software version")
2655 (description "This tool provides a command-line interface (CLI) to bump a
2656 software version simply.")
2657 (license license:expat)))
2658
2659 (define-public python-deprecated
2660 (package
2661 (name "python-deprecated")
2662 (version "1.2.5")
2663 (source
2664 (origin
2665 (method git-fetch)
2666 (uri (git-reference
2667 (url "https://github.com/tantale/deprecated.git")
2668 (commit (string-append "v" version))))
2669 (file-name (git-file-name name version))
2670 (sha256
2671 (base32
2672 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
2673 (build-system python-build-system)
2674 (arguments
2675 `(#:phases (modify-phases %standard-phases
2676 (replace 'check
2677 (lambda _
2678 (invoke "pytest"))))))
2679 (propagated-inputs
2680 `(("python-wrapt" ,python-wrapt)))
2681 (native-inputs
2682 `(("python-bumpversion" ,python-bumpversion)
2683 ("python-pytest" ,python-pytest)
2684 ("python-pytest-cov" ,python-pytest-cov)
2685 ("python-sphinx" ,python-sphinx)
2686 ("python-tox" ,python-tox)))
2687 (home-page "https://github.com/tantale/deprecated")
2688 (synopsis "Python decorator to deprecate classes, functions or methods")
2689 (description "The @code{deprecated} decorator provides a convenient way to deprecate
2690 to deprecate classes, functions or methods.")
2691 (license license:expat)))
2692
2693 (define-public python-pygithub
2694 (package
2695 (name "python-pygithub")
2696 (version "1.43.8")
2697 (source
2698 ;; We fetch from the Git repo because there are no tests in the PyPI
2699 ;; archive.
2700 (origin
2701 (method git-fetch)
2702 (uri (git-reference
2703 (url "https://github.com/PyGithub/PyGithub.git")
2704 (commit (string-append "v" version))))
2705 (file-name (git-file-name name version))
2706 (sha256
2707 (base32 "1625v558xga5mwhl9jqmibywy5qafmg1vqrirqz6zfq1la1d22mw"))))
2708 (build-system python-build-system)
2709 (arguments
2710 `(#:phases (modify-phases %standard-phases
2711 ;; Some tests rely on the network.
2712 (add-after 'unpack 'disable-failing-tests
2713 (lambda _
2714 (substitute* "tests/Issue142.py"
2715 (("testDecodeJson") "disabled_testDecodeJson"))
2716 #t))
2717 (add-before 'check 'prepare-for-tests
2718 (lambda _
2719 (for-each (lambda (f)
2720 (chmod f #o666))
2721 (find-files "./tests"))
2722 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
2723 (setenv "PYTHONPATH"
2724 (string-append "./tests:" (getenv "PYTHONPATH")))
2725 #t)))))
2726 (propagated-inputs
2727 `(("python-deprecated" ,python-deprecated)
2728 ("python-pyjwt" ,python-pyjwt)
2729 ("python-requests" ,python-requests)))
2730 (native-inputs `(("python-httpretty" ,python-httpretty)))
2731 (home-page "https://pygithub.readthedocs.io/en/latest/")
2732 (synopsis "Python library for the GitHub API")
2733 (description "This library allows managing GitHub resources such as
2734 repositories, user profiles, and organizations in your Python applications,
2735 using version 3 of the GitHub application programming interface (API).")
2736 (license license:lgpl3+)))
2737
2738 (define-public python-rellu
2739 (package
2740 (name "python-rellu")
2741 (version "0.7")
2742 (source
2743 (origin
2744 (method url-fetch)
2745 (uri (pypi-uri "rellu" version))
2746 (sha256
2747 (base32
2748 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
2749 (build-system python-build-system)
2750 (propagated-inputs
2751 `(("python-invoke" ,python-invoke)
2752 ("python-pygithub" ,python-pygithub)))
2753 (home-page "https://github.com/robotframework/rellu")
2754 (synopsis "Utilities to create PyPI releases")
2755 (description "This collection of utilities contains tooling and templates
2756 to assist in creating releases on GitHub and publishing them on PyPI. It is
2757 designed to be used by Robot Framework and tools and libraries in its
2758 ecosystem, but can naturally be used also by other projects.")
2759 (license license:asl2.0)))
2760
2761 (define-public python-robotframework
2762 (package
2763 (name "python-robotframework")
2764 (version "3.1.2")
2765 ;; There are no tests in the PyPI archive.
2766 (source
2767 (origin
2768 (method git-fetch)
2769 (uri (git-reference
2770 (url "https://github.com/robotframework/robotframework.git")
2771 (commit (string-append "v" version))))
2772 (file-name (git-file-name name version))
2773 (sha256
2774 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
2775 (patches (search-patches
2776 "python-robotframework-honor-source-date-epoch.patch"))))
2777 (build-system python-build-system)
2778 (arguments
2779 `(#:phases (modify-phases %standard-phases
2780 (add-before 'build 'build-and-install-doc
2781 (lambda* (#:key outputs #:allow-other-keys)
2782 (let* ((doc-output (assoc-ref outputs "doc"))
2783 (doc (string-append doc-output "/share/"
2784 ,name "-" ,version "/")))
2785 (invoke "invoke" "library-docs" "all")
2786 (mkdir-p doc)
2787 (copy-recursively "doc/libraries"
2788 (string-append doc "/libraries"))
2789 #t)))
2790 (replace 'check
2791 (lambda _
2792 (invoke "python" "utest/run.py"))))))
2793 (native-inputs
2794 `(("python-invoke" ,python-invoke)
2795 ("python-rellu" ,python-rellu)
2796 ("python:tk" ,python "tk"))) ;used when building the HTML doc
2797 (outputs '("out" "doc"))
2798 (home-page "https://robotframework.org")
2799 (synopsis "Generic automation framework")
2800 (description "Robot Framework is a generic automation framework for
2801 acceptance testing, acceptance test driven development (ATDD), and robotic
2802 process automation (RPA).")
2803 (license license:asl2.0)))
2804
2805 (define-public python-robotframework-lint
2806 ;; There is no properly tagged release; the commit below seems to correspond
2807 ;; to the 0.9 stable release available from PyPI. The tests are not
2808 ;; included in the PyPI archive, so we fetch the sources from the upstream
2809 ;; Git repo.
2810 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
2811 (revision "1"))
2812 (package
2813 (name "python-robotframework-lint")
2814 (version (git-version "0.9.0" revision commit))
2815 (source
2816 (origin
2817 (method git-fetch)
2818 (uri (git-reference
2819 (url "https://github.com/boakley/robotframework-lint.git")
2820 (commit commit)))
2821 (file-name (git-file-name name version))
2822 (sha256
2823 (base32
2824 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
2825 (build-system python-build-system)
2826 (arguments
2827 `(#:phases
2828 (modify-phases %standard-phases
2829 (replace 'check
2830 (lambda _
2831 (invoke "python" "-m" "robot" "-A"
2832 "tests/conf/default.args" "tests"))))))
2833 (propagated-inputs
2834 `(("python-robotframework" ,python-robotframework)))
2835 (home-page "https://github.com/boakley/robotframework-lint/")
2836 (synopsis "Static analysis tool (linter) for Robot Framework")
2837 (description "This package provides the @code{rflint} command-line
2838 utility, a static analysis tool (linter) for Robot Framework source files.")
2839 (license license:asl2.0))))
2840
2841 (define-public python-robotframework-sshlibrary
2842 (package
2843 (name "python-robotframework-sshlibrary")
2844 (version "3.3.0")
2845 ;; There are no tests in the PyPI archive.
2846 (source
2847 (origin
2848 (method git-fetch)
2849 (uri (git-reference
2850 (url "https://github.com/robotframework/SSHLibrary.git")
2851 (commit (string-append "v" version))))
2852 (file-name (git-file-name name version))
2853 (sha256
2854 (base32
2855 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
2856 (build-system python-build-system)
2857 (arguments
2858 `(#:phases
2859 (modify-phases %standard-phases
2860 (add-before 'build 'build-and-install-doc
2861 (lambda* (#:key outputs #:allow-other-keys)
2862 (let* ((doc-output (assoc-ref outputs "doc"))
2863 (doc (string-append doc-output "/share/"
2864 ,name "-" ,version "/")))
2865 (invoke "chmod" "-R" "+w" "docs")
2866 (invoke "invoke" "kw-docs" "project-docs")
2867 (mkdir-p doc)
2868 (for-each delete-file (find-files "docs" "\\.rst"))
2869 (copy-recursively "docs" doc)
2870 #t)))
2871 (replace 'check
2872 (lambda _
2873 ;; Some tests require an SSH server; we remove them.
2874 (delete-file "utest/test_client_api.py")
2875 (delete-file "utest/test_scp.py")
2876 (invoke "python" "utest/run.py"))))))
2877 (propagated-inputs
2878 `(("python-robotframework" ,python-robotframework)
2879 ("python-paramiko" ,python-paramiko)
2880 ("python-scp" ,python-scp)))
2881 (native-inputs
2882 `(("openssh" ,openssh)
2883 ("which" ,which)
2884 ;; To generate the documentation
2885 ("python-docutils" ,python-docutils)
2886 ("python-invoke" ,python-invoke)
2887 ("python-pygments" ,python-pygments)
2888 ("python-rellu" ,python-rellu)))
2889 (outputs '("out" "doc"))
2890 (home-page "https://github.com/robotframework/SSHLibrary")
2891 (synopsis "Robot Framework library for SSH and SFTP")
2892 (description "SSHLibrary is a Robot Framework library providing support
2893 for SSH and SFTP. It has the following main usages:
2894 @itemize @bullet
2895 @item Executing commands on the remote machine, either blocking or non-blocking.
2896 @item Writing and reading in an interactive shell.
2897 @item Transferring files and directories over SFTP.
2898 @item Ensuring that files and directories exist on the remote machine.
2899 @end itemize")
2900 (license license:asl2.0)))
2901
2902 (define-public python-scp
2903 (package
2904 (name "python-scp")
2905 (version "0.13.2")
2906 (source
2907 (origin
2908 (method url-fetch)
2909 (uri (pypi-uri "scp" version))
2910 (sha256
2911 (base32
2912 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
2913 (build-system python-build-system)
2914 (arguments
2915 '(#:tests? #f)) ;tests require an SSH server
2916 (propagated-inputs
2917 `(("python-paramiko" ,python-paramiko)))
2918 (home-page "https://github.com/jbardin/scp.py")
2919 (synopsis "SCP protocol module for Python and Paramiko")
2920 (description "The scp module extends the Paramiko library to send and
2921 receive files via the SCP1 protocol, as implemented by the OpenSSH
2922 @command{scp} program.")
2923 (license license:gpl2+)))
2924
2925 (define-public python-rst.linker
2926 (package
2927 (name "python-rst.linker")
2928 (version "1.11")
2929 (source
2930 (origin
2931 (method url-fetch)
2932 (uri (pypi-uri "rst.linker" version))
2933 (sha256
2934 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
2935 (build-system python-build-system)
2936 (propagated-inputs
2937 `(("python-dateutil" ,python-dateutil)
2938 ("python-six" ,python-six)))
2939 (native-inputs
2940 `(("python-setuptools-scm" ,python-setuptools-scm)))
2941 ;; Test would require path.py, which would introduce a cyclic dependence.
2942 (arguments `(#:tests? #f))
2943 ;; Note: As of version 1.7 the documentation is not worth building.
2944 (home-page "https://github.com/jaraco/rst.linker")
2945 (synopsis "Sphinx plugin to add links and timestamps")
2946 (description "rst.linker allows to automatically replace text by a
2947 reStructuredText external reference or timestamps. It's primary purpose is to
2948 augment the changelog, but it can be used for other documents, too.")
2949 (license license:expat)))
2950
2951 (define-public python2-rst.linker
2952 (package-with-python2 python-rst.linker))
2953
2954 (define-public python-feedgenerator
2955 (package
2956 (name "python-feedgenerator")
2957 (version "1.9")
2958 (source
2959 (origin
2960 (method url-fetch)
2961 (uri (pypi-uri "feedgenerator" version))
2962 (sha256
2963 (base32
2964 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2965 (modules '((guix build utils)))
2966 (snippet
2967 '(begin
2968 ;; Remove pre-compiled .pyc files from source.
2969 (for-each delete-file-recursively
2970 (find-files "." "__pycache__" #:directories? #t))
2971 (for-each delete-file (find-files "." "\\.pyc$"))
2972 #t))))
2973 (build-system python-build-system)
2974 (propagated-inputs
2975 `(("python-pytz" ,python-pytz)
2976 ("python-six" ,python-six)))
2977 (home-page "https://github.com/getpelican/feedgenerator")
2978 (synopsis
2979 "Standalone version of Django's Atom/RSS feed generator")
2980 (description
2981 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2982 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2983 (license license:bsd-3)))
2984
2985 (define-public python2-feedgenerator
2986 (package-with-python2 python-feedgenerator))
2987
2988 (define-public python-toml
2989 (package
2990 (name "python-toml")
2991 (version "0.9.4")
2992 (source
2993 (origin
2994 (method url-fetch)
2995 (uri (pypi-uri "toml" version))
2996 (sha256
2997 (base32
2998 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
2999 (build-system python-build-system)
3000 (arguments
3001 `(#:tests? #f)) ;no tests suite in release
3002 (home-page "https://github.com/uiri/toml")
3003 (synopsis "Library for TOML")
3004 (description
3005 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
3006 Language (TOML) configuration files.")
3007 (license license:expat)))
3008
3009 (define-public python-jsonrpc-server
3010 (package
3011 (name "python-jsonrpc-server")
3012 (version "0.3.2")
3013 (source
3014 (origin
3015 (method url-fetch)
3016 (uri (pypi-uri "python-jsonrpc-server" version))
3017 (sha256
3018 (base32
3019 "0ddgdp26dfxaz6isjbb12974b3rxavgsqrn2zrmck62cmipg5g05"))))
3020 (build-system python-build-system)
3021 (propagated-inputs
3022 `(("python-future" ,python-future)
3023 ("python-mock" ,python-mock)
3024 ("python-pytest" ,python-pytest)
3025 ("python-ujson" ,python-ujson)))
3026 (home-page
3027 "https://github.com/palantir/python-jsonrpc-server")
3028 (synopsis "JSON RPC 2.0 server library")
3029 (description
3030 "This package provides a JSON RPC 2.0 server library for Python.")
3031 (license license:expat)))
3032
3033 (define-public python-pydocstyle
3034 (package
3035 (name "python-pydocstyle")
3036 (version "3.0.0")
3037 (source
3038 (origin
3039 (method url-fetch)
3040 (uri (pypi-uri "pydocstyle" version))
3041 (sha256
3042 (base32
3043 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
3044 (build-system python-build-system)
3045 (propagated-inputs
3046 `(("python-six" ,python-six)
3047 ("python-snowballstemmer" ,python-snowballstemmer)))
3048 (home-page
3049 "https://github.com/PyCQA/pydocstyle/")
3050 (synopsis "Python docstring style checker")
3051 (description
3052 "This package provides a style checker for the Python Language
3053 Server (PLS).")
3054 (license license:expat)))
3055
3056 (define-public python-language-server
3057 (package
3058 (name "python-language-server")
3059 (version "0.31.4")
3060 (source
3061 (origin
3062 (method url-fetch)
3063 (uri (pypi-uri "python-language-server" version))
3064 (sha256
3065 (base32
3066 "1nrs56jpx7dvghaas0kc5k9lxas5vr3awj3k87p4akki43nsblb8"))))
3067 (build-system python-build-system)
3068 (propagated-inputs
3069 `(("python-pluggy" ,python-pluggy)
3070 ("python-jsonrpc-server" ,python-jsonrpc-server)
3071 ("python-jedi" ,python-jedi)
3072 ("python-yapf" ,python-yapf)
3073 ("python-pyflakes" ,python-pyflakes)
3074 ("python-pydocstyle" ,python-pydocstyle)
3075 ("python-pycodestyle" ,python-pycodestyle)
3076 ("python-mccabe" ,python-mccabe)
3077 ("python-rope" ,python-rope)
3078 ("python-autopep8" ,python-autopep8)
3079 ("python-flake8" ,python-flake8)
3080 ("python-pylint" ,python-pylint)))
3081 (home-page "https://github.com/palantir/python-language-server")
3082 (synopsis "Python implementation of the Language Server Protocol")
3083 (description
3084 "The Python Language Server (pyls) is an implementation of the Python 3
3085 language specification for the Language Server Protocol (LSP). This tool is
3086 used in text editing environments to provide a complete and integrated
3087 feature-set for programming Python effectively.")
3088 (license license:expat)))
3089
3090 (define-public python-black
3091 (package
3092 (name "python-black")
3093 (version "18.6b4")
3094 (source
3095 (origin
3096 (method url-fetch)
3097 (uri (pypi-uri "black" version))
3098 (sha256
3099 (base32
3100 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
3101 (build-system python-build-system)
3102 (arguments
3103 `(#:phases
3104 (modify-phases %standard-phases
3105 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3106 (lambda _
3107 (let ((python3 (which "python3")))
3108 (substitute* '("tests/data/fmtonoff.py"
3109 "tests/data/string_prefixes.py"
3110 "tests/data/function.py")
3111 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3112 (string-append "#!" python3 (if (string? minor-version)
3113 minor-version
3114 ""))))))))))
3115 (propagated-inputs
3116 `(("python-click" ,python-click)
3117 ("python-attrs" ,python-attrs)
3118 ("python-appdirs" ,python-appdirs)
3119 ("python-toml" ,python-toml)))
3120 (home-page "https://github.com/ambv/black")
3121 (synopsis "The uncompromising code formatter")
3122 (description "Black is the uncompromising Python code formatter.")
3123 (license license:expat)))
3124
3125 (define-public python-blinker
3126 (package
3127 (name "python-blinker")
3128 (version "1.4")
3129 (source
3130 (origin
3131 (method url-fetch)
3132 (uri (pypi-uri "blinker" version))
3133 (sha256
3134 (base32
3135 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3136 (build-system python-build-system)
3137 (home-page "http://pythonhosted.org/blinker/")
3138 (synopsis "Fast, simple object-to-object and broadcast signaling")
3139 (description
3140 "Blinker provides a fast dispatching system that allows any number of
3141 interested parties to subscribe to events, or \"signals\".")
3142 (license license:expat)))
3143
3144 (define-public python2-blinker
3145 (package-with-python2 python-blinker))
3146
3147 (define-public pelican
3148 (package
3149 (name "pelican")
3150 (version "4.2.0")
3151 (source
3152 (origin
3153 (method url-fetch)
3154 (uri (pypi-uri "pelican" version))
3155 (sha256
3156 (base32
3157 "0mp7hjyhs38ag1hyfcy882g400z0babqi72pnli46dqijfhajzmy"))))
3158 (build-system python-build-system)
3159 (propagated-inputs
3160 `(("python-blinker" ,python-blinker)
3161 ("python-dateutil" ,python-dateutil)
3162 ("python-docutils" ,python-docutils)
3163 ("python-feedgenerator" ,python-feedgenerator)
3164 ("python-jinja2" ,python-jinja2)
3165 ("python-markdown" ,python-markdown)
3166 ("python-pygments" ,python-pygments)
3167 ("python-pytz" ,python-pytz)
3168 ("python-six" ,python-six)
3169 ("python-unidecode" ,python-unidecode)))
3170 (home-page "https://getpelican.com/")
3171 (arguments
3172 `(;; XXX Requires a lot more packages to do unit tests :P
3173 #:tests? #f))
3174 (synopsis "Python-based static site publishing system")
3175 (description
3176 "Pelican is a tool to generate a static blog from reStructuredText,
3177 Markdown input files, and more. Pelican uses Jinja2 for templating
3178 and is very extensible.")
3179 (license license:agpl3+)))
3180
3181 (define-public mallard-ducktype
3182 (package
3183 (name "mallard-ducktype")
3184 (version "1.0.2")
3185 (source
3186 (origin
3187 (method git-fetch)
3188 ;; git-reference because tests are not included in pypi source tarball
3189 ;; https://issues.guix.gnu.org/issue/36755#2
3190 (uri (git-reference
3191 (url "https://github.com/projectmallard/mallard-ducktype.git")
3192 (commit version)))
3193 (file-name (git-file-name name version))
3194 (sha256
3195 (base32
3196 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
3197 (build-system python-build-system)
3198 (arguments
3199 '(#:phases
3200 (modify-phases %standard-phases
3201 (replace 'check
3202 (lambda _
3203 (with-directory-excursion "tests"
3204 (invoke "sh" "runtests")))))))
3205 (home-page "http://projectmallard.org")
3206 (synopsis "Convert Ducktype to Mallard documentation markup")
3207 (description
3208 "Ducktype is a lightweight syntax that can represent all the semantics
3209 of the Mallard XML documentation system. Ducktype files can be converted to
3210 Mallard using the @command{ducktype} tool. The yelp-tools package
3211 provides additional functionality on the produced Mallard documents.")
3212 (license license:expat)))
3213
3214 (define-public python-cython
3215 (package
3216 (name "python-cython")
3217 (version "0.29.13")
3218 (source
3219 (origin
3220 (method url-fetch)
3221 (uri (pypi-uri "Cython" version))
3222 (sha256
3223 (base32
3224 "13k37lrcgagwwnzr5bzririsscb793vndj234d475x1h9ad0d7f2"))))
3225 (build-system python-build-system)
3226 ;; we need the full python package and not just the python-wrapper
3227 ;; because we need libpython3.3m.so
3228 (inputs
3229 `(("python" ,python)))
3230 (arguments
3231 `(#:phases
3232 (modify-phases %standard-phases
3233 (add-before 'check 'set-HOME
3234 ;; some tests require access to "$HOME/.cython"
3235 (lambda _ (setenv "HOME" "/tmp") #t))
3236
3237 ;; FIXME: These tests started failing on armhf after the 0.28 update
3238 ;; (commit c69d11c5930), both with an error such as this:
3239 ;; compiling (cpp) and running dictcomp ...
3240 ;; === C/C++ compiler error output: ===
3241 ;; ‘
3242 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
3243 ;; See <https://hydra.gnu.org/build/2948724> for logs.
3244 ,@(if (target-arm32?)
3245 `((add-before 'check 'disable-failing-tests
3246 (lambda _
3247 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
3248 (for-each (lambda (test)
3249 (format disabled-tests "~a\n" test))
3250 '("memslice" "dictcomp"))
3251 (close-port disabled-tests)))))
3252 '())
3253
3254 (replace 'check
3255 (lambda _
3256 ;; Disable compiler optimizations to greatly reduce the running
3257 ;; time of the test suite.
3258 (setenv "CFLAGS" "-O0")
3259
3260 (invoke "python" "runtests.py" "-vv"
3261 "-j" (number->string (parallel-job-count))))))))
3262 (home-page "https://cython.org/")
3263 (synopsis "C extensions for Python")
3264 (description "Cython is an optimising static compiler for both the Python
3265 programming language and the extended Cython programming language. It makes
3266 writing C extensions for Python as easy as Python itself.")
3267 (license license:asl2.0)
3268 (properties `((python2-variant . ,(delay python2-cython))))))
3269
3270 (define-public python2-cython
3271 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
3272 (package
3273 (inherit base)
3274 (name "python2-cython")
3275 (inputs
3276 `(("python-2" ,python-2))) ;this is not automatically changed
3277 (arguments
3278 (substitute-keyword-arguments (package-arguments base)
3279 ((#:phases phases)
3280 `(modify-phases ,phases
3281 (add-before 'check 'adjust-test_embed
3282 (lambda _
3283 (substitute* "runtests.py"
3284 ;; test_embed goes great lengths to find the static libpythonX.Y.a
3285 ;; so it can give the right -L flag to GCC when embedding static
3286 ;; builds of Python. It is unaware that the Python "config"
3287 ;; directory (where the static library lives) was renamed in
3288 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
3289 ;; which works fine, because that is where the shared library is.
3290 ;;
3291 ;; It also appears to be unaware that the Makefile in Demos/embed
3292 ;; already unconditionally pass the static library location to GCC,
3293 ;; after checking sysconfig.get_config_var('LIBPL).
3294 ;;
3295 ;; The effect is that the linker is unable to resolve libexpat
3296 ;; symbols when building for Python 2, because neither the Python 2
3297 ;; shared library nor Expat is available. To fix it, we can either
3298 ;; add Expat as an input and make it visible to the linker, or just
3299 ;; prevent it from overriding the Python shared library location.
3300 ;; The end result is identical, so we take the easy route.
3301 ((" or libname not in os\\.listdir\\(libdir\\)")
3302 ""))
3303 #t)))))))))
3304
3305 ;; The RPython toolchain currently does not support Python 3.
3306 (define-public python2-rpython
3307 (package
3308 (name "python2-rpython")
3309 (version "0.2.1")
3310 (source
3311 (origin
3312 (method url-fetch)
3313 (uri (pypi-uri "rpython" version))
3314 (sha256
3315 (base32
3316 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3317 (build-system python-build-system)
3318 (arguments `(#:python ,python-2))
3319 (native-inputs
3320 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3321 (home-page "https://rpython.readthedocs.org")
3322 (synopsis "Framework for implementing interpreters and virtual machines")
3323 (description "RPython is a translation and support framework for
3324 producing implementations of dynamic languages, emphasizing a clean separation
3325 between language specification and implementation aspects.")
3326 (license license:expat)))
3327
3328 ;; NOTE: when upgrading numpy please make sure that python-pandas and
3329 ;; python-scipy still build, as these three packages are often used together.
3330 (define-public python-numpy
3331 (package
3332 (name "python-numpy")
3333 (version "1.17.3")
3334 (source
3335 (origin
3336 (method url-fetch)
3337 (uri (string-append
3338 "https://github.com/numpy/numpy/releases/download/v"
3339 version "/numpy-" version ".tar.gz"))
3340 (sha256
3341 (base32
3342 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
3343 (build-system python-build-system)
3344 (inputs
3345 `(("openblas" ,openblas)
3346 ("lapack" ,lapack)))
3347 (native-inputs
3348 `(("python-cython" ,python-cython)
3349 ("python-pytest" ,python-pytest)
3350 ("gfortran" ,gfortran)))
3351 (arguments
3352 `(#:phases
3353 (modify-phases %standard-phases
3354 (add-before 'build 'configure-blas-lapack
3355 (lambda* (#:key inputs #:allow-other-keys)
3356 (call-with-output-file "site.cfg"
3357 (lambda (port)
3358 (format port
3359 "[openblas]
3360 libraries = openblas
3361 library_dirs = ~a/lib
3362 include_dirs = ~a/include
3363
3364 # backslash-n to make emacs happy
3365 \n[lapack]
3366 lapack_libs = lapack
3367 library_dirs = ~a/lib
3368 include_dirs = ~a/include
3369 "
3370 (assoc-ref inputs "openblas")
3371 (assoc-ref inputs "openblas")
3372 (assoc-ref inputs "lapack")
3373 (assoc-ref inputs "lapack"))))
3374 #t))
3375 (add-before 'build 'fix-executable-paths
3376 (lambda* (#:key inputs #:allow-other-keys)
3377 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3378 ;; instead of /bin/sh.
3379 (substitute* "numpy/distutils/exec_command.py"
3380 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3381 (string-append match-start (assoc-ref inputs "bash") match-end)))
3382 ;; Use "gcc" executable, not "cc".
3383 (substitute* "numpy/distutils/system_info.py"
3384 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3385 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3386 #t))
3387 ;; Tests can only be run after the library has been installed and not
3388 ;; within the source directory.
3389 (delete 'check)
3390 (add-after 'install 'check
3391 (lambda* (#:key outputs inputs #:allow-other-keys)
3392 ;; Make installed package available for running the tests
3393 (add-installed-pythonpath inputs outputs)
3394 ;; Make sure "f2py" etc is found.
3395 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3396 ":" (getenv "PATH")))
3397 (with-directory-excursion "/tmp"
3398 (invoke "python" "-c"
3399 "import numpy; numpy.test(verbose=2)")))))))
3400 (home-page "http://www.numpy.org/")
3401 (synopsis "Fundamental package for scientific computing with Python")
3402 (description "NumPy is the fundamental package for scientific computing
3403 with Python. It contains among other things: a powerful N-dimensional array
3404 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3405 and Fortran code, useful linear algebra, Fourier transform, and random number
3406 capabilities.")
3407 (properties `((python2-variant . ,(delay python2-numpy))))
3408 (license license:bsd-3)))
3409
3410 ;; Numpy 1.16.x are the last versions that support Python 2.
3411 (define-public python2-numpy
3412 (let ((numpy (package-with-python2
3413 (strip-python2-variant python-numpy))))
3414 (package/inherit
3415 numpy
3416 (version "1.16.5")
3417 (source (origin
3418 (method url-fetch)
3419 (uri (string-append
3420 "https://github.com/numpy/numpy/releases/download/v"
3421 version "/numpy-" version ".tar.gz"))
3422 (sha256
3423 (base32
3424 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
3425
3426 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3427 ;; interest only for legacy code going back to NumPy's predecessor
3428 ;; Numeric.
3429 (define-public python2-numpy-1.8
3430 (package (inherit python2-numpy)
3431 (version "1.8.2")
3432 (source
3433 (origin
3434 (method git-fetch)
3435 (uri (git-reference
3436 (url "https://github.com/numpy/numpy")
3437 (commit (string-append "v" version))))
3438 (file-name (git-file-name "numpy" version))
3439 (sha256
3440 (base32
3441 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
3442 (arguments
3443 (substitute-keyword-arguments (package-arguments python2-numpy)
3444 ((#:phases phases)
3445 `(modify-phases ,phases
3446 (replace 'configure-blas-lapack
3447 (lambda* (#:key inputs #:allow-other-keys)
3448 (call-with-output-file "site.cfg"
3449 (lambda (port)
3450 (format port
3451 "[openblas]
3452 libraries = openblas,lapack
3453 library_dirs = ~a/lib:~a/lib
3454 include_dirs = ~a/include:~a/include
3455 "
3456 (assoc-ref inputs "openblas")
3457 (assoc-ref inputs "lapack")
3458 (assoc-ref inputs "openblas")
3459 (assoc-ref inputs "lapack"))))
3460 #t))))))
3461 (native-inputs
3462 `(("python2-nose" ,python2-nose)))
3463 (description "NumPy is the fundamental package for scientific computing
3464 with Python. It contains among other things: a powerful N-dimensional array
3465 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3466 and Fortran code, useful linear algebra, Fourier transform, and random number
3467 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3468 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3469 Numeric.")
3470 (license license:bsd-3)))
3471
3472 (define-public python-munch
3473 (package
3474 (name "python-munch")
3475 (version "2.0.4")
3476 (source
3477 (origin
3478 (method url-fetch)
3479 (uri (pypi-uri "munch" version))
3480 (sha256
3481 (base32
3482 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3483 (build-system python-build-system)
3484 (home-page "https://github.com/Infinidat/munch")
3485 (synopsis "Dot-accessible dictionary")
3486 (description "Munch is a dot-accessible dictionary similar to JavaScript
3487 objects.")
3488 (license license:expat)))
3489
3490 (define-public python2-munch
3491 (package-with-python2 python-munch))
3492
3493 (define-public python-colormath
3494 (package
3495 (name "python-colormath")
3496 (version "3.0.0")
3497 (source
3498 (origin
3499 (method url-fetch)
3500 (uri (pypi-uri "colormath" version))
3501 (sha256
3502 (base32
3503 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3504 (build-system python-build-system)
3505 (propagated-inputs
3506 `(("python-networkx" ,python-networkx)
3507 ("python-numpy" ,python-numpy)))
3508 (home-page "https://github.com/gtaylor/python-colormath")
3509 (synopsis "Color math and conversion library")
3510 (description
3511 "This is a Python library for color math and conversions.")
3512 (license license:bsd-3)))
3513
3514 (define-public python2-colormath
3515 (package-with-python2 python-colormath))
3516
3517 (define-public python-spectra
3518 (package
3519 (name "python-spectra")
3520 (version "0.0.11")
3521 (source
3522 (origin
3523 (method url-fetch)
3524 (uri (pypi-uri "spectra" version))
3525 (sha256
3526 (base32
3527 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3528 (build-system python-build-system)
3529 (arguments
3530 `(#:phases
3531 (modify-phases %standard-phases
3532 (replace 'check
3533 (lambda _ (invoke "nosetests" "-v"))))))
3534 (propagated-inputs
3535 `(("python-colormath" ,python-colormath)))
3536 (native-inputs
3537 `(("python-nose" ,python-nose)))
3538 (home-page "https://github.com/jsvine/spectra")
3539 (synopsis "Color scales and color conversion")
3540 (description
3541 "This package provides a Python library intended to make color math,
3542 color scales, and color space conversion easy. It has support for:
3543
3544 @enumerate
3545 @item Color scales
3546 @item Color ranges
3547 @item Color blending
3548 @item Brightening/darkening colors
3549 @item Saturating/desaturating colors
3550 @item Conversion to/from multiple color spaces.
3551 @end enumerate\n")
3552 (license license:expat)))
3553
3554 (define-public python2-spectra
3555 (package-with-python2 python-spectra))
3556
3557 (define-public python-numpy-documentation
3558 (package
3559 (name "python-numpy-documentation")
3560 (version (package-version python-numpy))
3561 (source (package-source python-numpy))
3562 (build-system python-build-system)
3563 (native-inputs
3564 `(("python-matplotlib" ,python-matplotlib)
3565 ("python-numpy" ,python-numpy)
3566 ("pkg-config" ,pkg-config)
3567 ("python-sphinx" ,python-sphinx)
3568 ("python-numpydoc" ,python-numpydoc)
3569 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
3570 texlive-fonts-ec
3571 texlive-generic-ifxetex
3572 texlive-generic-pdftex
3573 texlive-amsfonts
3574 texlive-latex-capt-of
3575 texlive-latex-cmap
3576 texlive-latex-environ
3577 texlive-latex-eqparbox
3578 texlive-latex-etoolbox
3579 texlive-latex-expdlist
3580 texlive-latex-fancyhdr
3581 texlive-latex-fancyvrb
3582 texlive-latex-fncychap
3583 texlive-latex-float
3584 texlive-latex-framed
3585 texlive-latex-geometry
3586 texlive-latex-graphics
3587 texlive-latex-hyperref
3588 texlive-latex-mdwtools
3589 texlive-latex-multirow
3590 texlive-latex-needspace
3591 texlive-latex-oberdiek
3592 texlive-latex-parskip
3593 texlive-latex-preview
3594 texlive-latex-tabulary
3595 texlive-latex-threeparttable
3596 texlive-latex-titlesec
3597 texlive-latex-trimspaces
3598 texlive-latex-ucs
3599 texlive-latex-upquote
3600 texlive-latex-url
3601 texlive-latex-varwidth
3602 texlive-latex-wrapfig)))
3603 ("texinfo" ,texinfo)
3604 ("perl" ,perl)
3605 ("scipy-sphinx-theme"
3606 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3607 (method git-fetch)
3608 (uri (git-reference
3609 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3610 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3611 (sha256
3612 (base32
3613 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3614 ,@(package-native-inputs python-numpy)))
3615 (arguments
3616 `(#:tests? #f ; we're only generating the documentation
3617 #:phases
3618 (modify-phases %standard-phases
3619 (delete 'build)
3620 (replace 'install
3621 (lambda* (#:key inputs outputs #:allow-other-keys)
3622 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3623 (doc (string-append
3624 data "/doc/" ,name "-"
3625 ,(package-version python-numpy)))
3626 (info-reader (string-append data "/info"))
3627 (html (string-append doc "/html"))
3628 (scipy-sphinx-theme "scipy-sphinx-theme")
3629 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3630 (pyver ,(string-append "PYVER=")))
3631
3632 ;; FIXME: this is needed to for texlive-union to generate
3633 ;; fonts, which are not found.
3634 (setenv "HOME" "/tmp")
3635
3636 (with-directory-excursion "doc"
3637 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3638 (mkdir-p html)
3639 (invoke "make" "html" pyver)
3640 (invoke "make" "latex" "PAPER=a4" pyver)
3641 (invoke "make" "-C" "build/latex"
3642 "all-pdf" "PAPER=a4" pyver)
3643 ;; FIXME: Generation of the info file fails.
3644 ;; (invoke "make" "info" pyver)
3645 ;; (mkdir-p info)
3646 ;; (copy-file "build/texinfo/numpy.info"
3647 ;; (string-append info "/numpy.info"))
3648 (for-each (lambda (file)
3649 (copy-file (string-append "build/latex" file)
3650 (string-append doc file)))
3651 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3652 (with-directory-excursion "build/html"
3653 (for-each (lambda (file)
3654 (let* ((dir (dirname file))
3655 (tgt-dir (string-append html "/" dir)))
3656 (unless (equal? "." dir)
3657 (mkdir-p tgt-dir))
3658 (install-file file html)))
3659 (find-files "." ".*")))))
3660 #t)))))
3661 (home-page (package-home-page python-numpy))
3662 (synopsis "Documentation for the python-numpy package")
3663 (description (package-description python-numpy))
3664 (license (package-license python-numpy))))
3665
3666 (define-public python2-numpy-documentation
3667 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3668 (package
3669 (inherit numpy-documentation)
3670 (native-inputs `(("python2-functools32" ,python2-functools32)
3671 ,@(package-native-inputs numpy-documentation))))))
3672
3673 (define-public python-pygit2
3674 (package
3675 (name "python-pygit2")
3676 (version "0.28.2")
3677 (source
3678 (origin
3679 (method url-fetch)
3680 (uri (pypi-uri "pygit2" version))
3681 (sha256
3682 (base32 "11kzj5mjkspvplnpdb6bj8dcj6rgmkk986k8hjcklyg5yaxkz32d"))))
3683 (build-system python-build-system)
3684 (arguments
3685 '(#:tests? #f)) ; tests don't run correctly in our environment
3686 (propagated-inputs
3687 `(("python-six" ,python-six)
3688 ("python-cffi" ,python-cffi)
3689 ("libgit2" ,libgit2)
3690 ("python-tox" ,python-tox)))
3691 (native-inputs
3692 `(("python-pytest" ,python-pytest)))
3693 (home-page "https://github.com/libgit2/pygit2")
3694 (synopsis "Python bindings for libgit2")
3695 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3696 library, libgit2 implements Git plumbing.")
3697 ;; GPL2.0 only, with linking exception.
3698 (license license:gpl2)))
3699
3700 (define-public python2-pygit2
3701 (package-with-python2 python-pygit2))
3702
3703 (define-public python-pyparsing
3704 (package
3705 (name "python-pyparsing")
3706 (version "2.3.1")
3707 (source
3708 (origin
3709 (method url-fetch)
3710 (uri (pypi-uri "pyparsing" version))
3711 (sha256
3712 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
3713 (build-system python-build-system)
3714 (outputs '("out" "doc"))
3715 (arguments
3716 `(#:tests? #f ; no test target
3717 #:phases
3718 (modify-phases %standard-phases
3719 (add-after 'install 'install-doc
3720 (lambda* (#:key outputs #:allow-other-keys)
3721 (let* ((doc (string-append (assoc-ref outputs "doc")
3722 "/share/doc/" ,name "-" ,version))
3723 (html-doc (string-append doc "/html"))
3724 (examples (string-append doc "/examples")))
3725 (mkdir-p html-doc)
3726 (mkdir-p examples)
3727 (for-each
3728 (lambda (dir tgt)
3729 (map (lambda (file)
3730 (install-file file tgt))
3731 (find-files dir ".*")))
3732 (list "docs" "htmldoc" "examples")
3733 (list doc html-doc examples))
3734 #t))))))
3735 (home-page "https://github.com/pyparsing/pyparsing")
3736 (synopsis "Python parsing class library")
3737 (description
3738 "The pyparsing module is an alternative approach to creating and
3739 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3740 of regular expressions. The pyparsing module provides a library of classes
3741 that client code uses to construct the grammar directly in Python code.")
3742 (license license:expat)))
3743
3744 (define-public python2-pyparsing
3745 (package-with-python2 python-pyparsing))
3746
3747 (define-public python-numpydoc
3748 (package
3749 (name "python-numpydoc")
3750 (version "0.8.0")
3751 (source
3752 (origin
3753 (method url-fetch)
3754 (uri (pypi-uri "numpydoc" version))
3755 (sha256
3756 (base32
3757 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3758 (build-system python-build-system)
3759 (propagated-inputs
3760 `(("python-sphinx" ,python-sphinx)))
3761 (native-inputs
3762 `(("python-nose" ,python-nose)))
3763 (home-page "https://pypi.python.org/pypi/numpydoc")
3764 (synopsis
3765 "Numpy's Sphinx extensions")
3766 (description
3767 "Sphinx extension to support docstrings in Numpy format.")
3768 (license license:bsd-2)))
3769
3770 (define-public python2-numpydoc
3771 (package-with-python2 python-numpydoc))
3772
3773 (define-public python-numexpr
3774 (package
3775 (name "python-numexpr")
3776 (version "2.6.5")
3777 (source
3778 (origin
3779 (method url-fetch)
3780 (uri (pypi-uri "numexpr" version))
3781 (sha256
3782 (base32
3783 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3784 (build-system python-build-system)
3785 (arguments `(#:tests? #f)) ; no tests included
3786 (propagated-inputs
3787 `(("python-numpy" ,python-numpy)))
3788 (home-page "https://github.com/pydata/numexpr")
3789 (synopsis "Fast numerical expression evaluator for NumPy")
3790 (description
3791 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3792 expressions that operate on arrays are accelerated and use less memory than
3793 doing the same calculation in Python. In addition, its multi-threaded
3794 capabilities can make use of all your cores, which may accelerate
3795 computations, most specially if they are not memory-bounded (e.g. those using
3796 transcendental functions).")
3797 (license license:expat)))
3798
3799 (define-public python2-numexpr
3800 (package-with-python2 python-numexpr))
3801
3802 (define-public python-cycler
3803 (package
3804 (name "python-cycler")
3805 (version "0.10.0")
3806 (source (origin
3807 (method url-fetch)
3808 (uri (pypi-uri "cycler" version))
3809 (sha256
3810 (base32
3811 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3812 (build-system python-build-system)
3813 (arguments
3814 ;; XXX: The current version requires 'coveralls' which we don't have.
3815 ;; Enable this for the next release which uses 'python-pytest'.
3816 '(#:tests? #f))
3817 (propagated-inputs
3818 `(("python-six" ,python-six)))
3819 (home-page "http://matplotlib.org/cycler/")
3820 (synopsis "Composable keyword argument iterator")
3821 (description
3822 "When using @code{matplotlib} and plotting more than one line, it is
3823 common to want to be able to want to be able to cycle over one or more artist
3824 styles; but the plotting logic can quickly become involved.
3825 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3826 @code{Cycler} class was developed.")
3827 (license license:bsd-3)))
3828
3829 (define-public python2-cycler
3830 (package-with-python2 python-cycler))
3831
3832 (define-public python-colorspacious
3833 (package
3834 (name "python-colorspacious")
3835 (version "1.1.2")
3836 (source
3837 (origin
3838 (method git-fetch)
3839 (uri (git-reference
3840 (url "https://github.com/njsmith/colorspacious.git")
3841 (commit (string-append "v" version))))
3842 (file-name (git-file-name name version))
3843 (sha256
3844 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
3845 (build-system python-build-system)
3846 (propagated-inputs
3847 `(("python-numpy" ,python-numpy)))
3848 (native-inputs
3849 `(("python-nose" ,python-nose)))
3850 (arguments
3851 `(#:phases
3852 (modify-phases %standard-phases
3853 (replace 'check
3854 (lambda _
3855 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
3856 (home-page "https://github.com/njsmith/colorspacious")
3857 (synopsis "Python library for colorspace conversions")
3858 (description "@code{colorspacious} is a Python library that lets you
3859 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3860 (license license:expat)))
3861
3862 (define-public python2-colorspacious
3863 (package-with-python2 python-colorspacious))
3864
3865 (define-public python-matplotlib
3866 (package
3867 (name "python-matplotlib")
3868 (version "3.1.2")
3869 (source
3870 (origin
3871 (method url-fetch)
3872 (uri (pypi-uri "matplotlib" version))
3873 (sha256
3874 (base32
3875 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))))
3876 (build-system python-build-system)
3877 (propagated-inputs ; the following packages are all needed at run time
3878 `(("python-cycler" ,python-cycler)
3879 ("python-kiwisolver" ,python-kiwisolver)
3880 ("python-pyparsing" ,python-pyparsing)
3881 ("python-pygobject" ,python-pygobject)
3882 ("gobject-introspection" ,gobject-introspection)
3883 ("python-tkinter" ,python "tk")
3884 ("python-dateutil" ,python-dateutil)
3885 ("python-numpy" ,python-numpy)
3886 ("python-pillow" ,python-pillow)
3887 ("python-pytz" ,python-pytz)
3888 ("python-six" ,python-six)
3889 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3890 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3891 ;; object. For this reason we need to import both libraries.
3892 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
3893 ("python-pycairo" ,python-pycairo)
3894 ("python-cairocffi" ,python-cairocffi)))
3895 (inputs
3896 `(("libpng" ,libpng)
3897 ("imagemagick" ,imagemagick)
3898 ("freetype" ,freetype)
3899 ("cairo" ,cairo)
3900 ("glib" ,glib)
3901 ;; FIXME: Add backends when available.
3902 ;("python-wxpython" ,python-wxpython)
3903 ("tcl" ,tcl)
3904 ("tk" ,tk)))
3905 (native-inputs
3906 `(("pkg-config" ,pkg-config)
3907 ("python-pytest" ,python-pytest)
3908 ("python-mock" ,python-mock)
3909 ("unzip" ,unzip)
3910 ("jquery-ui"
3911 ,(origin
3912 (method url-fetch)
3913 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
3914 (sha256
3915 (base32
3916 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
3917 (arguments
3918 `(#:phases
3919 (modify-phases %standard-phases
3920 ;; XXX We disable all image comparison tests because we're using a
3921 ;; newer version of FreeType than matplotlib expects. This leads to
3922 ;; minor differences throughout the tests.
3923 (add-after 'unpack 'fix-and-disable-failing-tests
3924 (lambda _
3925 (substitute* (append (find-files "lib/matplotlib/tests/"
3926 "test_.*\\.py$")
3927 (find-files "lib/mpl_toolkits/tests"
3928 "test_.*\\.py$"))
3929 (("^from matplotlib" match)
3930 (string-append "import pytest\n" match))
3931 (("( *)@image_comparison" match indent)
3932 (string-append indent
3933 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
3934 match)))
3935 (substitute* "lib/matplotlib/tests/test_animation.py"
3936 (("/bin/sh") (which "sh")))
3937 (for-each delete-file
3938 ;; test_normal_axes, test_get_tightbbox_polar
3939 '("lib/matplotlib/tests/test_axes.py"
3940 ;; We don't use the webagg backend and this test forces it.
3941 "lib/matplotlib/tests/test_backend_webagg.py"
3942 ;; test_outward_ticks
3943 "lib/matplotlib/tests/test_tightlayout.py"
3944 ;; test_hidden_axes fails with minor extent
3945 ;; differences, possibly due to the use of a
3946 ;; different version of FreeType.
3947 "lib/matplotlib/tests/test_constrainedlayout.py"
3948 ;; Fontconfig returns no fonts.
3949 "lib/matplotlib/tests/test_font_manager.py"))
3950 #t))
3951 (add-before 'install 'install-jquery-ui
3952 (lambda* (#:key outputs inputs #:allow-other-keys)
3953 (let ((dir (string-append (assoc-ref outputs "out")
3954 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
3955 (mkdir-p dir)
3956 (invoke "unzip"
3957 (assoc-ref inputs "jquery-ui")
3958 "-d" dir))
3959 #t))
3960 (replace 'check
3961 (lambda* (#:key outputs inputs #:allow-other-keys)
3962 (add-installed-pythonpath inputs outputs)
3963 (invoke "python" "tests.py" "-v"
3964 "-m" "not network and not webagg")))
3965 (add-before 'build 'configure-environment
3966 (lambda* (#:key outputs inputs #:allow-other-keys)
3967 (let ((cairo (assoc-ref inputs "cairo")))
3968 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
3969 ;; has not effect.
3970 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
3971 (setenv "HOME" (getcwd))
3972 (call-with-output-file "setup.cfg"
3973 (lambda (port)
3974 (format port "[directories]~%
3975 basedirlist = ~a,~a~%
3976 [packages]~%
3977 tests = True~%"
3978 (assoc-ref inputs "tcl")
3979 (assoc-ref inputs "tk")))))
3980 #t)))))
3981 (home-page "https://matplotlib.org/")
3982 (synopsis "2D plotting library for Python")
3983 (description
3984 "Matplotlib is a Python 2D plotting library which produces publication
3985 quality figures in a variety of hardcopy formats and interactive environments
3986 across platforms. Matplotlib can be used in Python scripts, the python and
3987 ipython shell, web application servers, and six graphical user interface
3988 toolkits.")
3989 (license license:psfl)
3990 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3991
3992 (define-public python2-matplotlib
3993 (let ((matplotlib (package-with-python2
3994 (strip-python2-variant python-matplotlib))))
3995 (package (inherit matplotlib)
3996 (version "2.2.4")
3997 (source
3998 (origin
3999 (method url-fetch)
4000 (uri (pypi-uri "matplotlib" version))
4001 (sha256
4002 (base32
4003 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
4004 (arguments
4005 (substitute-keyword-arguments (package-arguments matplotlib)
4006 ((#:phases phases)
4007 `(modify-phases ,phases
4008 (replace 'install-jquery-ui
4009 (lambda* (#:key outputs inputs #:allow-other-keys)
4010 (let ((dir (string-append (assoc-ref outputs "out")
4011 "/lib/python2.7/site-packages/"
4012 "matplotlib/backends/web_backend/")))
4013 (mkdir-p dir)
4014 (invoke "unzip"
4015 (assoc-ref inputs "jquery-ui")
4016 "-d" dir))
4017 #t))
4018 (delete 'fix-and-disable-failing-tests)
4019 (delete 'check))))) ; These tests weren't run the the past.
4020 ;; Make sure to use special packages for Python 2 instead
4021 ;; of those automatically rewritten by package-with-python2.
4022 (propagated-inputs
4023 `(("python2-pycairo" ,python2-pycairo)
4024 ("python2-backports-functools-lru-cache"
4025 ,python2-backports-functools-lru-cache)
4026 ("python2-functools32" ,python2-functools32)
4027 ("python2-pygobject-2" ,python2-pygobject-2)
4028 ("python2-subprocess32" ,python2-subprocess32)
4029 ("python2-tkinter" ,python-2 "tk")
4030 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4031 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4032
4033 (define-public python-matplotlib-documentation
4034 (package
4035 (name "python-matplotlib-documentation")
4036 (version (package-version python-matplotlib))
4037 (source (package-source python-matplotlib))
4038 (build-system python-build-system)
4039 (native-inputs
4040 `(("python-matplotlib" ,python-matplotlib)
4041 ("python-colorspacious" ,python-colorspacious)
4042 ("python-sphinx" ,python-sphinx)
4043 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
4044 ("python-sphinx-gallery" ,python-sphinx-gallery)
4045 ("python-numpydoc" ,python-numpydoc)
4046 ("python-ipython" ,python-ipython)
4047 ("python-ipykernel" ,python-ipykernel)
4048 ("python-mock" ,python-mock)
4049 ("graphviz" ,graphviz)
4050 ("texlive" ,(texlive-union (list texlive-amsfonts
4051 texlive-latex-amsmath
4052 texlive-latex-enumitem
4053 texlive-latex-expdlist
4054 texlive-latex-geometry
4055 texlive-latex-preview
4056 texlive-latex-type1cm
4057 texlive-latex-ucs
4058
4059 texlive-generic-pdftex
4060
4061 texlive-fonts-ec
4062 texlive-fonts-adobe-times
4063 texlive-fonts-txfonts)))
4064 ("texinfo" ,texinfo)
4065 ,@(package-native-inputs python-matplotlib)))
4066 (arguments
4067 `(#:tests? #f ; we're only generating documentation
4068 #:phases
4069 (modify-phases %standard-phases
4070 ;; The tests in python-matplotlib are run after the install phase, so
4071 ;; we need to delete the extra phase here.
4072 (delete 'check)
4073 (replace 'build
4074 (lambda _
4075 (chdir "doc")
4076 (setenv "PYTHONPATH"
4077 (string-append (getenv "PYTHONPATH")
4078 ":" (getcwd) "/../examples/units"))
4079 (substitute* "conf.py"
4080 ;; Don't use git.
4081 (("^SHA = check_output.*")
4082 (string-append "SHA = \"" ,version "\"\n"))
4083 ;; Don't fetch intersphinx files from the Internet
4084 (("^explicit_order_folders" m)
4085 (string-append "intersphinx_mapping = {}\n" m))
4086 (("'sphinx.ext.intersphinx',") "")
4087 ;; Disable URL embedding which requires internet access.
4088 (("'https://docs.scipy.org/doc/numpy'") "None")
4089 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
4090 (invoke "make"
4091 "SPHINXBUILD=sphinx-build"
4092 "SPHINXOPTS=" ; don't abort on warnings
4093 "html" "texinfo")))
4094 (replace 'install
4095 (lambda* (#:key inputs outputs #:allow-other-keys)
4096 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4097 (doc (string-append data "/doc/python-matplotlib-" ,version))
4098 (info (string-append data "/info"))
4099 (html (string-append doc "/html")))
4100 (mkdir-p html)
4101 (mkdir-p info)
4102 (copy-recursively "build/html" html)
4103 (symlink (string-append html "/_images")
4104 (string-append info "/matplotlib-figures"))
4105 (with-directory-excursion "build/texinfo"
4106 (substitute* "matplotlib.texi"
4107 (("@image\\{([^,]*)" all file)
4108 (string-append "@image{matplotlib-figures/" file)))
4109 (symlink (string-append html "/_images")
4110 "./matplotlib-figures")
4111 (invoke "makeinfo" "--no-split"
4112 "-o" "matplotlib.info" "matplotlib.texi"))
4113 (install-file "build/texinfo/matplotlib.info" info))
4114 #t)))))
4115 (home-page (package-home-page python-matplotlib))
4116 (synopsis "Documentation for the python-matplotlib package")
4117 (description (package-description python-matplotlib))
4118 (license (package-license python-matplotlib))))
4119
4120 (define-public python2-matplotlib-documentation
4121 (let ((parent (package-with-python2 python-matplotlib-documentation)))
4122 (package
4123 (inherit parent)
4124 (native-inputs
4125 (alist-delete "python-sphinx-copybutton"
4126 (package-native-inputs parent))))))
4127
4128 (define-public python-matplotlib-venn
4129 (package
4130 (name "python-matplotlib-venn")
4131 (version "0.11.5")
4132 (source
4133 (origin
4134 (method url-fetch)
4135 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4136 (sha256
4137 (base32
4138 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4139 (build-system python-build-system)
4140 (arguments '(#:tests? #f)) ; tests are not included
4141 (propagated-inputs
4142 `(("python-matplotlib" ,python-matplotlib)
4143 ("python-numpy" ,python-numpy)
4144 ("python-scipy" ,python-scipy)))
4145 (native-inputs
4146 `(("unzip" ,unzip)))
4147 (home-page "https://github.com/konstantint/matplotlib-venn")
4148 (synopsis "Plot area-proportional Venn diagrams")
4149 (description
4150 "This package provides tools for plotting area-proportional two- and
4151 three-way Venn diagrams in @code{matplotlib}.")
4152 (license license:expat)))
4153
4154 (define-public python2-pysnptools
4155 (package
4156 (name "python2-pysnptools")
4157 (version "0.3.13")
4158 (source
4159 (origin
4160 (method url-fetch)
4161 (uri (pypi-uri "pysnptools" version))
4162 (sha256
4163 (base32
4164 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
4165 (build-system python-build-system)
4166 (arguments
4167 `(#:python ,python-2 ; only Python 2.7 is supported
4168 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
4169 (propagated-inputs
4170 `(("python2-numpy" ,python2-numpy)
4171 ("python2-scipy" ,python2-scipy)
4172 ("python2-pandas" ,python2-pandas)))
4173 (native-inputs
4174 `(("python2-cython" ,python2-cython)))
4175 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
4176 (synopsis "Library for reading and manipulating genetic data")
4177 (description
4178 "PySnpTools is a library for reading and manipulating genetic data. It
4179 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4180 those files. It can also efficiently manipulate ranges of integers using set
4181 operators such as union, intersection, and difference.")
4182 (license license:asl2.0)))
4183
4184 (define-public python-socksipy-branch
4185 (package
4186 (name "python-socksipy-branch")
4187 (version "1.01")
4188 (source
4189 (origin
4190 (method url-fetch)
4191 (uri (pypi-uri "SocksiPy-branch" version))
4192 (sha256
4193 (base32
4194 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4195 (build-system python-build-system)
4196 (arguments
4197 `(#:tests? #f)) ; There are no tests
4198 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4199 (synopsis "Python SOCKS module")
4200 (description
4201 "SocksiPy - A Python SOCKS client module. It provides a
4202 socket-like interface that supports connections to any TCP
4203 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4204 The original version was developed by Dan Haim, this is a
4205 branch created by Mario Vilas to address some open issues,
4206 as the original project seems to have been abandoned circa 2007.")
4207 (license license:bsd-3)))
4208
4209 (define-public python2-socksipy-branch
4210 (package-with-python2 python-socksipy-branch))
4211
4212 (define-public python-socksipychain
4213 (package
4214 (name "python-socksipychain")
4215 (version "2.1.0")
4216 (source
4217 (origin
4218 (method git-fetch)
4219 (uri (git-reference
4220 (url "https://github.com/pagekite/PySocksipyChain.git")
4221 (commit (string-append "v" version))))
4222 (file-name (git-file-name name version))
4223 (sha256
4224 (base32
4225 "0idm9a050rd2kbgbz2sk9ib9589kj4xh1xdnggs6xbq2v2y8f6zn"))))
4226 (build-system python-build-system)
4227 (arguments
4228 `(#:tests? #f)) ; Tests try to access the network.
4229 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
4230 (synopsis "Python SOCKS module with chained proxies support")
4231 (description
4232 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
4233 adds support for arbitrary chaining of proxy servers and various modes of
4234 TLS/SSL encryption. It was developed for use in PageKite, and also includes
4235 a simple netcat replacement with chaining support.")
4236 (license license:bsd-3)))
4237
4238 (define-public python-pycodestyle
4239 (package
4240 (name "python-pycodestyle")
4241 (version "2.5.0")
4242 (source
4243 (origin
4244 (method url-fetch)
4245 (uri (pypi-uri "pycodestyle" version))
4246 (sha256
4247 (base32
4248 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
4249 (build-system python-build-system)
4250 (home-page "https://pycodestyle.readthedocs.io/")
4251 (synopsis "Python style guide checker")
4252 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4253 Python code against some of the style conventions in
4254 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4255 (license license:expat)))
4256
4257 (define-public python2-pycodestyle
4258 (package-with-python2 python-pycodestyle))
4259
4260 (define-public python-multidict
4261 (package
4262 (name "python-multidict")
4263 (version "4.2.0")
4264 (source
4265 (origin
4266 (method url-fetch)
4267 (uri (pypi-uri "multidict" version))
4268 (sha256
4269 (base32
4270 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4271 (build-system python-build-system)
4272 (native-inputs
4273 `(("python-pytest" ,python-pytest)
4274 ("python-pytest-runner" ,python-pytest-runner)))
4275 (home-page "https://github.com/aio-libs/multidict/")
4276 (synopsis "Multidict implementation")
4277 (description "Multidict is dict-like collection of key-value pairs
4278 where key might be occurred more than once in the container.")
4279 (license license:asl2.0)))
4280
4281 (define-public python-orderedmultidict
4282 (package
4283 (name "python-orderedmultidict")
4284 (version "0.7.11")
4285 (source
4286 (origin
4287 (method url-fetch)
4288 (uri (pypi-uri "orderedmultidict" version))
4289 (sha256
4290 (base32
4291 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4292 (build-system python-build-system)
4293 (arguments
4294 `(#:phases
4295 (modify-phases %standard-phases
4296 (add-after 'unpack 'fix-tests
4297 (lambda _
4298 ;; The package uses nosetest for running the tests.
4299 ;; Adding this initfile allows to run the test suite
4300 ;; without requiring nosetest.
4301 (with-output-to-file "tests/__init__.py" newline)
4302 #t)))))
4303 (propagated-inputs
4304 `(("python-six" ,python-six)))
4305 (native-inputs
4306 `(("python-pycodestyle" ,python-pycodestyle)))
4307 (home-page "https://github.com/gruns/orderedmultidict")
4308 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4309 (description "This package contains a library for ordered multivalue
4310 dictionaries. A multivalue dictionary is a dictionary that can store
4311 multiple values for the same key. An ordered multivalue dictionary is a
4312 multivalue dictionary that retains the order of insertions and deletions.")
4313 (license license:unlicense)))
4314
4315 (define-public python2-orderedmultidict
4316 (package-with-python2 python-orderedmultidict))
4317
4318 (define-public python-autopep8
4319 (package
4320 (name "python-autopep8")
4321 (version "1.3.5")
4322 (source
4323 (origin
4324 (method url-fetch)
4325 (uri (pypi-uri "autopep8" version))
4326 (sha256
4327 (base32
4328 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4329 (build-system python-build-system)
4330 (propagated-inputs
4331 `(("python-pycodestyle" ,python-pycodestyle)))
4332 (home-page "https://github.com/hhatto/autopep8")
4333 (synopsis "Format Python code according to the PEP 8 style guide")
4334 (description
4335 "@code{autopep8} automatically formats Python code to conform to
4336 the PEP 8 style guide. It uses the pycodestyle utility to determine
4337 what parts of the code needs to be formatted. @code{autopep8} is
4338 capable of fixing most of the formatting issues that can be reported
4339 by pycodestyle.")
4340 (license (license:non-copyleft
4341 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4342
4343 (define-public python2-autopep8
4344 (package-with-python2 python-autopep8))
4345
4346 (define-public python-distutils-extra
4347 (package
4348 (name "python-distutils-extra")
4349 (version "2.38")
4350 (source
4351 (origin
4352 (method url-fetch)
4353 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4354 version "/+download/python-distutils-extra-"
4355 version ".tar.gz"))
4356 (sha256
4357 (base32
4358 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4359 (build-system python-build-system)
4360 (home-page "https://launchpad.net/python-distutils-extra/")
4361 (synopsis "Enhancements to Python's distutils")
4362 (description
4363 "The python-distutils-extra module enables you to easily integrate
4364 gettext support, themed icons, and scrollkeeper-based documentation into
4365 Python's distutils.")
4366 (license license:gpl2)))
4367
4368 (define-public python2-distutils-extra
4369 (package-with-python2 python-distutils-extra))
4370
4371 (define-public python2-elib.intl
4372 (package
4373 (name "python2-elib.intl")
4374 (version "0.0.3")
4375 (source
4376 (origin
4377 ;; This project doesn't tag releases or publish tarballs, so we take
4378 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4379 (method git-fetch)
4380 (uri (git-reference
4381 (url "https://github.com/dieterv/elib.intl.git")
4382 (commit "d09997cfef")))
4383 (file-name (string-append name "-" version "-checkout"))
4384 (sha256
4385 (base32
4386 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4387 (build-system python-build-system)
4388 (arguments
4389 ;; incompatible with Python 3 (exception syntax)
4390 `(#:python ,python-2
4391 #:tests? #f))
4392 (home-page "https://github.com/dieterv/elib.intl")
4393 (synopsis "Enhanced internationalization for Python")
4394 (description
4395 "The elib.intl module provides enhanced internationalization (I18N)
4396 services for your Python modules and applications.")
4397 (license license:lgpl3+)))
4398
4399 (define-public python-olefile
4400 (package
4401 (name "python-olefile")
4402 (version "0.46")
4403 (source
4404 (origin
4405 (method url-fetch)
4406 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4407 "download/v" version "/olefile-" version ".tar.gz"))
4408 (file-name (string-append name "-" version ".tar.gz"))
4409 (sha256
4410 (base32
4411 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
4412 (build-system python-build-system)
4413 (home-page "https://www.decalage.info/python/olefileio")
4414 (synopsis "Read and write Microsoft OLE2 files.")
4415 (description
4416 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4417 Storage or Compound Document, Microsoft Office). It is an improved version of
4418 the OleFileIO module from PIL, the Python Image Library.")
4419 (license license:bsd-3)))
4420
4421 (define-public python2-olefile
4422 (package-with-python2 python-olefile))
4423
4424 (define-public python-pillow
4425 (package
4426 (name "python-pillow")
4427 (version "6.2.1")
4428 (source
4429 (origin
4430 (method url-fetch)
4431 (uri (pypi-uri "Pillow" version))
4432 (sha256
4433 (base32
4434 "1c8wkzc58f5wdh006jvmwdk3wxld1xgagcbdvj7iv17qi0m9fkmz"))))
4435 (build-system python-build-system)
4436 (native-inputs
4437 `(("python-pytest" ,python-pytest)))
4438 (inputs
4439 `(("freetype" ,freetype)
4440 ("lcms" ,lcms)
4441 ("libjpeg" ,libjpeg)
4442 ("libtiff" ,libtiff)
4443 ("libwebp" ,libwebp)
4444 ("openjpeg" ,openjpeg)
4445 ("zlib" ,zlib)))
4446 (propagated-inputs
4447 `(("python-olefile" ,python-olefile)))
4448 (arguments
4449 `(#:phases
4450 (modify-phases %standard-phases
4451 (add-after 'unpack 'patch-ldconfig
4452 (lambda _
4453 (substitute* "setup.py"
4454 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4455 (replace 'check
4456 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
4457 (if tests?
4458 (begin
4459 (setenv "HOME" (getcwd))
4460 ;; Make installed package available for running the tests.
4461 (add-installed-pythonpath inputs outputs)
4462 (invoke "python" "selftest.py" "--installed")
4463 (invoke "python" "-m" "pytest" "-vv"))
4464 #t))))))
4465 (home-page "https://python-pillow.org")
4466 (synopsis "Fork of the Python Imaging Library")
4467 (description
4468 "The Python Imaging Library adds image processing capabilities to your
4469 Python interpreter. This library provides extensive file format support, an
4470 efficient internal representation, and fairly powerful image processing
4471 capabilities. The core image library is designed for fast access to data
4472 stored in a few basic pixel formats. It should provide a solid foundation for
4473 a general image processing tool.")
4474 (license (license:x11-style
4475 "http://www.pythonware.com/products/pil/license.htm"
4476 "The PIL Software License"))))
4477
4478 (define-public python2-pillow
4479 (package-with-python2 python-pillow))
4480
4481 (define-public python-pycparser
4482 (package
4483 (name "python-pycparser")
4484 (version "2.19")
4485 (source
4486 (origin
4487 (method url-fetch)
4488 (uri (pypi-uri "pycparser" version))
4489 (sha256
4490 (base32
4491 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
4492 (outputs '("out" "doc"))
4493 (build-system python-build-system)
4494 (native-inputs
4495 `(("pkg-config" ,pkg-config)))
4496 (arguments
4497 `(#:phases
4498 (modify-phases %standard-phases
4499 (replace 'check
4500 (lambda _
4501 (with-directory-excursion "tests"
4502 (invoke "python" "all_tests.py"))
4503 #t))
4504 (add-after 'install 'install-doc
4505 (lambda* (#:key outputs #:allow-other-keys)
4506 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4507 (doc (string-append data "/doc/" ,name "-" ,version))
4508 (examples (string-append doc "/examples")))
4509 (mkdir-p examples)
4510 (for-each (lambda (file)
4511 (copy-file (string-append "." file)
4512 (string-append doc file)))
4513 '("/README.rst" "/CHANGES" "/LICENSE"))
4514 (copy-recursively "examples" examples)
4515 #t))))))
4516 (home-page "https://github.com/eliben/pycparser")
4517 (synopsis "C parser in Python")
4518 (description
4519 "Pycparser is a complete parser of the C language, written in pure Python
4520 using the PLY parsing library. It parses C code into an AST and can serve as
4521 a front-end for C compilers or analysis tools.")
4522 (license license:bsd-3)))
4523
4524 (define-public python2-pycparser
4525 (package-with-python2 python-pycparser))
4526
4527 (define-public python-pywavelets
4528 (package
4529 (name "python-pywavelets")
4530 (version "1.0.1")
4531 (home-page "https://github.com/PyWavelets/pywt")
4532 (source (origin
4533 (method url-fetch)
4534 (uri (pypi-uri "PyWavelets" version))
4535 (sha256
4536 (base32
4537 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4538 (build-system python-build-system)
4539 (arguments
4540 '(#:modules ((ice-9 ftw)
4541 (srfi srfi-1)
4542 (srfi srfi-26)
4543 (guix build utils)
4544 (guix build python-build-system))
4545 #:phases (modify-phases %standard-phases
4546 (replace 'check
4547 (lambda _
4548 (let ((cwd (getcwd))
4549 (libdir (find (cut string-prefix? "lib." <>)
4550 (scandir "build"))))
4551 (with-directory-excursion (string-append cwd "/build/" libdir)
4552 (invoke "nosetests" "-v" "."))))))))
4553 (native-inputs
4554 `(("python-matplotlib" ,python-matplotlib) ;for tests
4555 ("python-nose" ,python-nose)))
4556 (propagated-inputs
4557 `(("python-numpy" ,python-numpy)))
4558 (synopsis "Wavelet transforms in Python")
4559 (description
4560 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4561 mathematical basis functions that are localized in both time and frequency.
4562 Wavelet transforms are time-frequency transforms employing wavelets. They are
4563 similar to Fourier transforms, the difference being that Fourier transforms are
4564 localized only in frequency instead of in time and frequency.")
4565 (license license:expat)))
4566
4567 (define-public python2-pywavelets
4568 (package-with-python2 python-pywavelets))
4569
4570 (define-public python-xcffib
4571 (package
4572 (name "python-xcffib")
4573 (version "0.6.0")
4574 (source
4575 (origin
4576 (method url-fetch)
4577 (uri (pypi-uri "xcffib" version))
4578 (sha256
4579 (base32
4580 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4581 (build-system python-build-system)
4582 (inputs
4583 `(("libxcb" ,libxcb)))
4584 (propagated-inputs
4585 `(("python-cffi" ,python-cffi) ; used at run time
4586 ("python-six" ,python-six)))
4587 (arguments
4588 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4589 #:tests? #f
4590 #:phases
4591 (modify-phases %standard-phases
4592 (add-after 'unpack 'fix-libxcb-path
4593 (lambda* (#:key inputs #:allow-other-keys)
4594 (let ((libxcb (assoc-ref inputs "libxcb")))
4595 (substitute* '("xcffib/__init__.py")
4596 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4597 #t)))
4598 (add-after 'install 'install-doc
4599 (lambda* (#:key outputs #:allow-other-keys)
4600 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4601 "/doc/" ,name "-" ,version)))
4602 (mkdir-p doc)
4603 (copy-file "README.md"
4604 (string-append doc "/README.md"))
4605 #t))))))
4606 (home-page "https://github.com/tych0/xcffib")
4607 (synopsis "XCB Python bindings")
4608 (description
4609 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4610 support for Python 3 and PyPy. It is based on cffi.")
4611 (license license:expat)))
4612
4613 (define-public python2-xcffib
4614 (package-with-python2 python-xcffib))
4615
4616 (define-public python-cairocffi
4617 (package
4618 (name "python-cairocffi")
4619 (version "0.9.0")
4620 (source
4621 (origin
4622 (method url-fetch)
4623 (uri (pypi-uri "cairocffi" version))
4624 (sha256
4625 (base32
4626 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4627 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4628 (build-system python-build-system)
4629 (outputs '("out" "doc"))
4630 (inputs
4631 `(("glib" ,glib)
4632 ("gtk+" ,gtk+)
4633 ("gdk-pixbuf" ,gdk-pixbuf)
4634 ("cairo" ,cairo)
4635 ("pango" ,pango)))
4636 (native-inputs
4637 `(("pkg-config" ,pkg-config)
4638 ("python-pytest" ,python-pytest)
4639 ("python-pytest-cov" ,python-pytest-cov)
4640 ("python-pytest-runner" ,python-pytest-runner)
4641 ("python-sphinx" ,python-sphinx)
4642 ("python-docutils" ,python-docutils)))
4643 (propagated-inputs
4644 `(("python-xcffib" ,python-xcffib))) ; used at run time
4645 (arguments
4646 `(#:phases
4647 (modify-phases %standard-phases
4648 (add-after 'unpack 'patch-paths
4649 (lambda* (#:key inputs outputs #:allow-other-keys)
4650 (substitute* (find-files "." "\\.py$")
4651 (("dlopen\\(ffi, 'cairo'")
4652 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4653 "/lib/libcairo.so.2'"))
4654 (("dlopen\\(ffi, 'gdk-3'")
4655 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4656 "/lib/libgtk-3.so.0'"))
4657 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4658 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4659 "/lib/libgdk_pixbuf-2.0.so.0'"))
4660 (("dlopen\\(ffi, 'glib-2.0'")
4661 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4662 "/lib/libglib-2.0.so.0'"))
4663 (("dlopen\\(ffi, 'gobject-2.0'")
4664 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4665 "/lib/libgobject-2.0.so.0'"))
4666 (("dlopen\\(ffi, 'pangocairo-1.0'")
4667 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4668 "/lib/libpangocairo-1.0.so.0'"))
4669 (("dlopen\\(ffi, 'pango-1.0'")
4670 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4671 "/lib/libpango-1.0.so.0'")))
4672 #t))
4673 (add-after 'install 'install-doc
4674 (lambda* (#:key inputs outputs #:allow-other-keys)
4675 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4676 (doc (string-append data "/doc/" ,name "-" ,version))
4677 (html (string-append doc "/html")))
4678 (setenv "LD_LIBRARY_PATH"
4679 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4680 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4681 (setenv "LANG" "en_US.UTF-8")
4682 (mkdir-p html)
4683 (for-each (lambda (file)
4684 (copy-file (string-append "." file)
4685 (string-append doc file)))
4686 '("/README.rst" "/CHANGES" "/LICENSE"))
4687 (system* "python" "setup.py" "build_sphinx")
4688 (copy-recursively "docs/_build/html" html)
4689 #t))))))
4690 (home-page "https://github.com/Kozea/cairocffi")
4691 (synopsis "Python bindings and object-oriented API for Cairo")
4692 (description
4693 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4694 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4695 graphics library with support for multiple backends including image buffers,
4696 PNG, PostScript, PDF, and SVG file output.")
4697 (license license:bsd-3)))
4698
4699 (define-public python2-cairocffi
4700 (package-with-python2 python-cairocffi))
4701
4702 (define-public python-decorator
4703 (package
4704 (name "python-decorator")
4705 (version "4.3.0")
4706 (source
4707 (origin
4708 (method url-fetch)
4709 (uri (pypi-uri "decorator" version))
4710 (sha256
4711 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4712 (build-system python-build-system)
4713 (home-page "https://pypi.python.org/pypi/decorator/")
4714 (synopsis "Python module to simplify usage of decorators")
4715 (description
4716 "The aim of the decorator module is to simplify the usage of decorators
4717 for the average programmer, and to popularize decorators usage giving examples
4718 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4719 etc. The core of this module is a decorator factory.")
4720 (license license:expat)))
4721
4722 (define-public python2-decorator
4723 (package-with-python2 python-decorator))
4724
4725 (define-public python-drmaa
4726 (package
4727 (name "python-drmaa")
4728 (version "0.7.7")
4729 (source
4730 (origin
4731 (method url-fetch)
4732 (uri (pypi-uri "drmaa" version))
4733 (sha256
4734 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4735 (build-system python-build-system)
4736 ;; The test suite requires libdrmaa which is provided by the cluster
4737 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4738 ;; should be set to the path of the libdrmaa library.
4739 (arguments '(#:tests? #f))
4740 (native-inputs
4741 `(("python-nose" ,python-nose)))
4742 (home-page "https://pypi.python.org/pypi/drmaa")
4743 (synopsis "Python bindings for the DRMAA library")
4744 (description
4745 "A Python package for Distributed Resource Management (DRM) job
4746 submission and control. This package is an implementation of the DRMAA 1.0
4747 Python language binding specification.")
4748 (license license:bsd-3)))
4749
4750 (define-public python2-drmaa
4751 (package-with-python2 python-drmaa))
4752
4753 (define-public python-grako
4754 (package
4755 (name "python-grako")
4756 (version "3.99.9")
4757 (source
4758 (origin
4759 (method url-fetch)
4760 (uri
4761 (pypi-uri "grako" version ".zip"))
4762 (sha256
4763 (base32
4764 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4765 (build-system python-build-system)
4766 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4767 (native-inputs
4768 `(("unzip" ,unzip)
4769 ("python-pytest" ,python-pytest)
4770 ("python-pytest-runner" ,python-pytest-runner)))
4771 (home-page "https://bitbucket.org/neogeny/grako")
4772 (synopsis "EBNF parser generator")
4773 (description
4774 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4775 memoizing PEG/Packrat parser in Python.")
4776 (license license:bsd-3)))
4777
4778 (define-public python2-grako
4779 (package-with-python2 python-grako))
4780
4781 (define-public python-gridmap
4782 (package
4783 (name "python-gridmap")
4784 (version "0.13.0")
4785 (source
4786 (origin
4787 (method git-fetch)
4788 (uri (git-reference
4789 (url "https://github.com/pygridtools/gridmap.git")
4790 (commit (string-append "v" version))))
4791 (file-name (git-file-name name version))
4792 (sha256
4793 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
4794 (build-system python-build-system)
4795 (arguments
4796 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4797 (propagated-inputs
4798 `(("python-psutil" ,python-psutil)
4799 ("python-drmaa" ,python-drmaa)
4800 ("python-pyzmq" ,python-pyzmq)))
4801 (home-page "https://github.com/pygridtools/gridmap")
4802 (synopsis "Create jobs on a cluster directly from Python")
4803 (description
4804 "Gridmap is a Python package to allow you to easily create jobs on the
4805 cluster directly from Python. You can directly map Python functions onto the
4806 cluster without needing to write any wrapper code yourself.")
4807 (license license:gpl3+)))
4808
4809 (define-public python2-gridmap
4810 (package-with-python2 python-gridmap))
4811
4812 (define-public python-honcho
4813 (package
4814 (name "python-honcho")
4815 (version "1.0.1")
4816 (source
4817 (origin
4818 (method git-fetch)
4819 (uri (git-reference
4820 (url "https://github.com/nickstenning/honcho.git")
4821 (commit (string-append "v" version))))
4822 (file-name (git-file-name name version))
4823 (sha256
4824 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
4825 (build-system python-build-system)
4826 (native-inputs
4827 `(("python-pytest" ,python-pytest)
4828 ("python-mock" ,python-mock)
4829 ("python-tox" ,python-tox)
4830 ("which" ,which))) ;for tests
4831 (propagated-inputs
4832 `(("python-jinja2" ,python-jinja2)))
4833 (arguments
4834 `(#:phases
4835 (modify-phases %standard-phases
4836 (delete 'check)
4837 (add-after 'install 'check
4838 (lambda* (#:key outputs inputs #:allow-other-keys)
4839 ;; fix honcho path in testsuite
4840 (substitute* "tests/conftest.py"
4841 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4842 "/bin/honcho" "'")))
4843 ;; It's easier to run tests after install.
4844 ;; Make installed package available for running the tests
4845 (add-installed-pythonpath inputs outputs)
4846 (invoke "py.test" "-v"))))))
4847 (home-page "https://github.com/nickstenning/honcho")
4848 (synopsis "Manage Procfile-based applications")
4849 (description
4850 "A Procfile is a file which describes how to run an application
4851 consisting of several processes. honcho starts all listed processes.
4852 The output of all running processes is collected by honcho and
4853 displayed.")
4854 (license license:expat)))
4855
4856 (define-public python2-honcho
4857 (package-with-python2 python-honcho))
4858
4859 (define-public python-pexpect
4860 (package
4861 (name "python-pexpect")
4862 (version "4.6.0")
4863 (source
4864 (origin
4865 (method url-fetch)
4866 (uri (pypi-uri "pexpect" version))
4867 (sha256
4868 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4869 (build-system python-build-system)
4870 (arguments
4871 `(#:phases
4872 (modify-phases %standard-phases
4873 (add-before 'check 'prepare-tests
4874 (lambda _
4875 (substitute* (find-files "tests")
4876 (("/bin/ls") (which "ls"))
4877 (("/bin/echo") (which "echo"))
4878 (("/bin/which") (which "which"))
4879 ;; Many tests try to use the /bin directory which
4880 ;; is not present in the build environment.
4881 ;; Use one that's non-empty and unlikely to change.
4882 (("/bin'") "/dev'"))
4883 ;; XXX: Socket connection test gets "Connection reset by peer".
4884 ;; Why does it not work? Delete for now.
4885 (delete-file "tests/test_socket.py")
4886 #t))
4887 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4888 (native-inputs
4889 `(("python-nose" ,python-nose)
4890 ("python-pytest" ,python-pytest)
4891 ("man-db" ,man-db)
4892 ("which" ,which)
4893 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4894 (propagated-inputs
4895 `(("python-ptyprocess" ,python-ptyprocess)))
4896 (home-page "http://pexpect.readthedocs.org/")
4897 (synopsis "Controlling interactive console applications")
4898 (description
4899 "Pexpect is a pure Python module for spawning child applications;
4900 controlling them; and responding to expected patterns in their output.
4901 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4902 child application and control it as if a human were typing commands.")
4903 (license license:isc)))
4904
4905 (define-public python2-pexpect
4906 (package-with-python2 python-pexpect))
4907
4908 (define-public python-setuptools-scm
4909 (package
4910 (name "python-setuptools-scm")
4911 (version "3.2.0")
4912 (source (origin
4913 (method url-fetch)
4914 (uri (pypi-uri "setuptools_scm" version))
4915 (sha256
4916 (base32
4917 "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj"))))
4918 (build-system python-build-system)
4919 (home-page "https://github.com/pypa/setuptools_scm/")
4920 (synopsis "Manage Python package versions in SCM metadata")
4921 (description
4922 "Setuptools_scm handles managing your Python package versions in
4923 @dfn{software configuration management} (SCM) metadata instead of declaring
4924 them as the version argument or in a SCM managed file.")
4925 (license license:expat)))
4926
4927 ;; Needed by python-lazy-object-proxy, remove on next update cycle.
4928 (define-public python-setuptools-scm-3.3
4929 (package
4930 (inherit python-setuptools-scm)
4931 (version "3.3.3")
4932 (source (origin
4933 (method url-fetch)
4934 (uri (pypi-uri "setuptools_scm" version))
4935 (sha256
4936 (base32
4937 "19cyndx23xmpbhz4qrwmfwsmnnaczd0dw7qg977ksq2dbvxy29dx"))))))
4938
4939 (define-public python2-setuptools-scm
4940 (package-with-python2 python-setuptools-scm))
4941
4942 (define-public python-pathlib2
4943 (package
4944 (name "python-pathlib2")
4945 (version "2.3.3")
4946 (source
4947 (origin
4948 (method url-fetch)
4949 (uri (pypi-uri "pathlib2" version))
4950 (sha256
4951 (base32
4952 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
4953 (build-system python-build-system)
4954 (propagated-inputs
4955 `(("python-scandir" ,python-scandir)
4956 ("python-six" ,python-six)))
4957 (home-page "https://pypi.python.org/pypi/pathlib2/")
4958 (synopsis "Object-oriented file system paths")
4959 (description "The goal of pathlib2 is to provide a backport of the
4960 standard @code{pathlib} module which tracks the standard library module, so
4961 all the newest features of the standard @code{pathlib} can be used also on
4962 older Python versions.")
4963 (license license:expat)))
4964
4965 (define-public python-importlib-metadata
4966 (package
4967 (name "python-importlib-metadata")
4968 (version "0.23")
4969 (source
4970 (origin
4971 (method url-fetch)
4972 (uri (pypi-uri "importlib_metadata" version))
4973 (sha256
4974 (base32 "09mdqdfv5rdrwz80jh9m379gxmvk2vhjfz0fg53hid00icvxf65a"))))
4975 (build-system python-build-system)
4976 (propagated-inputs
4977 `(("python-configparser" ,python-configparser)
4978 ("python-contextlib2" ,python-contextlib2)
4979 ("python-docutils" ,python-docutils)
4980 ("python-pathlib2" ,python-pathlib2)
4981 ("python-rst.linker" ,python-rst.linker)
4982 ("python-zipp" ,python-zipp)))
4983 (native-inputs
4984 `(("python-setuptools-scm" ,python-setuptools-scm)
4985 ("python-sphinx" ,python-sphinx)))
4986 (home-page "https://importlib-metadata.readthedocs.io/")
4987 (synopsis "Read metadata from Python packages")
4988 (description
4989 "@code{importlib_metadata} is a library which provides an API for
4990 accessing an installed Python package's metadata, such as its entry points or
4991 its top-level name. This functionality intends to replace most uses of
4992 @code{pkg_resources} entry point API and metadata API. Along with
4993 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
4994 need to use the older and less efficient @code{pkg_resources} package.")
4995 (license license:asl2.0)))
4996
4997 (define-public python-jaraco-packaging
4998 (package
4999 (name "python-jaraco-packaging")
5000 (version "6.1")
5001 (source
5002 (origin
5003 (method url-fetch)
5004 (uri (pypi-uri "jaraco.packaging" version))
5005 (sha256
5006 (base32
5007 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
5008 (build-system python-build-system)
5009 (propagated-inputs
5010 `(("python-pytest" ,python-pytest)
5011 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
5012 ("python-pytest-flake8" ,python-pytest-flake8)
5013 ("python-rst.linker" ,python-rst.linker)
5014 ("python-setuptools" ,python-setuptools)
5015 ("python-setuptools-scm" ,python-setuptools-scm)
5016 ("python-six" ,python-six)
5017 ("python-sphinx" ,python-sphinx)))
5018 (home-page "https://github.com/jaraco/jaraco.packaging")
5019 (synopsis "Tools to supplement packaging Python releases")
5020 (description
5021 "This package provides various tools to supplement packaging Python
5022 releases.")
5023 (license license:expat)))
5024
5025 (define-public python-pathpy
5026 (package
5027 (name "python-pathpy")
5028 (version "11.5.1")
5029 (source
5030 (origin
5031 (method url-fetch)
5032 (uri (pypi-uri "path.py" version))
5033 (sha256
5034 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
5035 (outputs '("out" "doc"))
5036 (build-system python-build-system)
5037 (propagated-inputs
5038 `(("python-appdirs" ,python-appdirs)
5039 ("python-importlib-metadata" ,python-importlib-metadata)))
5040 (native-inputs
5041 `(("python-setuptools-scm" ,python-setuptools-scm)
5042 ("python-sphinx" ,python-sphinx)
5043 ("python-rst.linker" ,python-rst.linker)
5044 ("python-pytest" ,python-pytest)
5045 ("python-pytest-runner" ,python-pytest-runner)
5046 ("python-jaraco-packaging" ,python-jaraco-packaging)))
5047 (arguments
5048 `(#:phases
5049 (modify-phases %standard-phases
5050 (add-after 'build 'build-doc
5051 (lambda _
5052 (setenv "LANG" "en_US.UTF-8")
5053 (invoke "python" "setup.py" "build_sphinx")))
5054 (add-after 'install 'install-doc
5055 (lambda* (#:key outputs #:allow-other-keys)
5056 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5057 (doc (string-append data "/doc/" ,name "-" ,version))
5058 (html (string-append doc "/html")))
5059 (mkdir-p html)
5060 (for-each (lambda (file)
5061 (copy-file file (string-append doc "/" file)))
5062 '("README.rst" "CHANGES.rst"))
5063 (copy-recursively "build/sphinx/html" html)
5064 #t)))
5065 (replace 'check
5066 (lambda _
5067 ;; The import time test aborts if an import takes longer than
5068 ;; 100ms. It may very well take a little longer than that.
5069 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
5070 (home-page "https://github.com/jaraco/path.py")
5071 (synopsis "Python module wrapper for built-in os.path")
5072 (description
5073 "@code{path.py} implements path objects as first-class entities, allowing
5074 common operations on files to be invoked on those path objects directly.")
5075 (license license:expat)))
5076
5077 (define-public python2-pathpy
5078 (package-with-python2 python-pathpy))
5079
5080 (define-public python-simplegeneric
5081 (package
5082 (name "python-simplegeneric")
5083 (version "0.8.1")
5084 (source
5085 (origin
5086 (method url-fetch)
5087 (uri (pypi-uri "simplegeneric" version ".zip"))
5088 (sha256
5089 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5090 (build-system python-build-system)
5091 (native-inputs
5092 `(("unzip" ,unzip)))
5093 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5094 (synopsis "Python module for simple generic functions")
5095 (description
5096 "The simplegeneric module lets you define simple single-dispatch generic
5097 functions, akin to Python’s built-in generic functions like @code{len()},
5098 @code{iter()} and so on. However, instead of using specially-named methods,
5099 these generic functions use simple lookup tables, akin to those used by
5100 e.g. @code{pickle.dump()} and other generic functions found in the Python
5101 standard library.")
5102 (license license:zpl2.1)))
5103
5104 (define-public python2-simplegeneric
5105 (package-with-python2 python-simplegeneric))
5106
5107 (define-public python-ipython-genutils
5108 ;; TODO: This package is retired, check if can be removed, see description.
5109 (package
5110 (name "python-ipython-genutils")
5111 (version "0.1.0")
5112 (source
5113 (origin
5114 (method url-fetch)
5115 (uri (pypi-uri "ipython_genutils" version))
5116 (sha256
5117 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5118 (build-system python-build-system)
5119 (arguments `(#:tests? #f)) ; no tests
5120 (home-page "https://ipython.org")
5121 (synopsis "Vestigial utilities from IPython")
5122 (description
5123 "This package provides retired utilities from IPython. No packages
5124 outside IPython/Jupyter should depend on it.
5125
5126 This package shouldn't exist. It contains some common utilities shared by
5127 Jupyter and IPython projects during The Big Split. As soon as possible, those
5128 packages will remove their dependency on this, and this package will go
5129 away.")
5130 (license license:bsd-3)))
5131
5132 (define-public python2-ipython-genutils
5133 (package-with-python2 python-ipython-genutils))
5134
5135 (define-public python-traitlets
5136 (package
5137 (name "python-traitlets")
5138 (version "4.3.3")
5139 (source
5140 (origin
5141 (method url-fetch)
5142 (uri (pypi-uri "traitlets" version))
5143 (sha256
5144 (base32
5145 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
5146 (build-system python-build-system)
5147 (arguments
5148 `(#:phases
5149 (modify-phases %standard-phases
5150 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5151 (propagated-inputs
5152 `(("python-ipython-genutils" ,python-ipython-genutils)
5153 ("python-decorator" ,python-decorator)))
5154 (native-inputs
5155 `(("python-pytest" ,python-pytest)))
5156 (properties `((python2-variant . ,(delay python2-traitlets))))
5157 (home-page "https://ipython.org")
5158 (synopsis "Configuration system for Python applications")
5159 (description
5160 "Traitlets is a framework that lets Python classes have attributes with
5161 type checking, dynamically calculated default values, and ‘on change’
5162 callbacks. The package also includes a mechanism to use traitlets for
5163 configuration, loading values from files or from command line arguments. This
5164 is a distinct layer on top of traitlets, so you can use traitlets in your code
5165 without using the configuration machinery.")
5166 (license license:bsd-3)))
5167
5168 (define-public python2-traitlets
5169 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5170 (package
5171 (inherit traitlets)
5172 (propagated-inputs
5173 `(("python2-enum34" ,python2-enum34)
5174 ,@(package-propagated-inputs traitlets))))))
5175
5176 (define-public python-jupyter-core
5177 (package
5178 (name "python-jupyter-core")
5179 (version "4.4.0")
5180 (source
5181 (origin
5182 (method url-fetch)
5183 (uri (string-append (pypi-uri "jupyter_core" version)))
5184 (sha256
5185 (base32
5186 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5187 (build-system python-build-system)
5188 ;; FIXME: not sure how to run the tests
5189 (arguments `(#:tests? #f))
5190 (propagated-inputs
5191 `(("python-traitlets" ,python-traitlets)))
5192 (home-page "http://jupyter.org/")
5193 (synopsis "Jupyter base package")
5194 (description
5195 "Jupyter core is the base package on which Jupyter projects rely.")
5196 (license license:bsd-3)))
5197
5198 (define-public python2-jupyter-core
5199 (package-with-python2 python-jupyter-core))
5200
5201 (define-public python-jupyter-client
5202 (package
5203 (name "python-jupyter-client")
5204 (version "5.2.4")
5205 (source
5206 (origin
5207 (method url-fetch)
5208 (uri (pypi-uri "jupyter_client" version))
5209 (sha256
5210 (base32
5211 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5212 (build-system python-build-system)
5213 ;; Tests fail because of missing native python kernel which I assume is
5214 ;; provided by the ipython package, which we cannot use because it would
5215 ;; cause a dependency cycle.
5216 (arguments
5217 `(#:tests? #f
5218
5219 #:phases (modify-phases %standard-phases
5220 (add-after 'unpack 'set-tool-file-names
5221 (lambda* (#:key inputs #:allow-other-keys)
5222 (let ((iproute (assoc-ref inputs "iproute")))
5223 (substitute* "jupyter_client/localinterfaces.py"
5224 (("'ip'")
5225 (string-append "'" iproute "/sbin/ip'")))
5226 #t))))))
5227 (inputs
5228 `(("iproute" ,iproute)))
5229 (propagated-inputs
5230 `(("python-pyzmq" ,python-pyzmq)
5231 ("python-traitlets" ,python-traitlets)
5232 ("python-jupyter-core" ,python-jupyter-core)))
5233 (home-page "http://jupyter.org/")
5234 (synopsis "Jupyter protocol implementation and client libraries")
5235 (description
5236 "The @code{jupyter_client} package contains the reference implementation
5237 of the Jupyter protocol. It also provides client and kernel management APIs
5238 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5239 installing @code{kernelspec}s for use with Jupyter frontends.")
5240 (license license:bsd-3)))
5241
5242 (define-public python2-jupyter-client
5243 (package-with-python2 python-jupyter-client))
5244
5245 (define-public python-ipykernel
5246 (package
5247 (name "python-ipykernel")
5248 (version "5.1.3")
5249 (source
5250 (origin
5251 (method url-fetch)
5252 (uri (pypi-uri "ipykernel" version))
5253 (sha256
5254 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
5255 (build-system python-build-system)
5256 (arguments
5257 `(#:phases
5258 (modify-phases %standard-phases
5259 (replace 'check
5260 (lambda _
5261 (setenv "HOME" "/tmp")
5262 (invoke "pytest" "-v")
5263 #t))
5264 (add-after 'install 'set-python-file-name
5265 (lambda* (#:key outputs #:allow-other-keys)
5266 ;; Record the absolute file name of the 'python' executable in
5267 ;; 'kernel.json'.
5268 (let ((out (assoc-ref outputs "out")))
5269 (substitute* (string-append out "/share/jupyter"
5270 "/kernels/python3/kernel.json")
5271 (("\"python\"")
5272 (string-append "\"" (which "python") "\"")))
5273 #t))))))
5274 (propagated-inputs
5275 `(("python-ipython" ,python-ipython)
5276 ;; imported at runtime during connect
5277 ("python-jupyter-client" ,python-jupyter-client)))
5278 (native-inputs
5279 `(("python-flaky" ,python-flaky)
5280 ("python-nose" ,python-nose)
5281 ("python-pytest" ,python-pytest)))
5282 (home-page "https://ipython.org")
5283 (synopsis "IPython Kernel for Jupyter")
5284 (description
5285 "This package provides the IPython kernel for Jupyter.")
5286 (license license:bsd-3)))
5287
5288 ;; Version 5.1.1 and above no longer support Python 2.
5289 (define-public python2-ipykernel
5290 (package
5291 (name "python2-ipykernel")
5292 (version "5.1.0")
5293 (source
5294 (origin
5295 (method url-fetch)
5296 (uri (pypi-uri "ipykernel" version))
5297 (sha256
5298 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5299 (build-system python-build-system)
5300 (arguments
5301 `(#:python ,python-2
5302 #:phases
5303 (modify-phases %standard-phases
5304 (replace 'check
5305 (lambda _
5306 (setenv "HOME" "/tmp")
5307 (invoke "pytest" "-v")
5308 #t)))))
5309 (propagated-inputs
5310 `(("python2-ipython" ,python2-ipython)
5311 ;; imported at runtime during connect
5312 ("python2-jupyter-client" ,python2-jupyter-client)))
5313 (native-inputs
5314 `(("python2-pytest" ,python2-pytest)
5315 ("python2-nose" ,python2-nose)))
5316 (home-page "https://ipython.org")
5317 (synopsis "IPython Kernel for Jupyter")
5318 (description
5319 "This package provides the IPython kernel for Jupyter.")
5320 (license license:bsd-3)))
5321
5322 (define-public python-pari-jupyter
5323 (package
5324 (name "python-pari-jupyter")
5325 (version "1.3.2")
5326 (source
5327 (origin
5328 (method url-fetch)
5329 (uri (pypi-uri "pari_jupyter" version))
5330 (sha256
5331 (base32
5332 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5333 (build-system python-build-system)
5334 (propagated-inputs
5335 `(("python-ipykernel" ,python-ipykernel)))
5336 (inputs
5337 `(("pari-gp" ,pari-gp)
5338 ("readline" ,readline)))
5339 (arguments
5340 `(#:tests? #f)) ; no test suite
5341 (home-page
5342 "https://github.com/jdemeyer/pari_jupyter")
5343 (synopsis "A Jupyter kernel for PARI/GP")
5344 (description "The package provides a PARI/GP kernel for Jupyter.")
5345 (license license:gpl3+)))
5346
5347 (define-public python-backcall
5348 (package
5349 (name "python-backcall")
5350 (version "0.1.0")
5351 (source
5352 (origin
5353 (method url-fetch)
5354 (uri (pypi-uri "backcall" version))
5355 (sha256
5356 (base32
5357 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5358 (build-system python-build-system)
5359 (home-page "https://github.com/takluyver/backcall/")
5360 (synopsis "Specifications for callback functions passed in to an API")
5361 (description
5362 "If your code lets other people supply callback functions, it's important
5363 to specify the function signature you expect, and check that functions support
5364 that. Adding extra parameters later would break other peoples code unless
5365 you're careful. The @code{backcall} package provides a way of specifying the
5366 callback signature using a prototype function.")
5367 (license license:bsd-3)))
5368
5369 ;; This is the latest release of the LTS version of ipython with support for
5370 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
5371 ;; dropped support for Python 2.7.
5372 (define-public python2-ipython
5373 (package
5374 (name "python2-ipython")
5375 (version "5.8.0")
5376 (source
5377 (origin
5378 (method url-fetch)
5379 (uri (pypi-uri "ipython" version ".tar.gz"))
5380 (sha256
5381 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5382 (build-system python-build-system)
5383 (propagated-inputs
5384 `(("python2-backports-shutil-get-terminal-size"
5385 ,python2-backports-shutil-get-terminal-size)
5386 ("python2-pathlib2" ,python2-pathlib2)
5387 ("python2-pyzmq" ,python2-pyzmq)
5388 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5389 ("python2-terminado" ,python2-terminado)
5390 ("python2-matplotlib" ,python2-matplotlib)
5391 ("python2-numpy" ,python2-numpy)
5392 ("python2-numpydoc" ,python2-numpydoc)
5393 ("python2-jinja2" ,python2-jinja2)
5394 ("python2-mistune" ,python2-mistune)
5395 ("python2-pexpect" ,python2-pexpect)
5396 ("python2-pickleshare" ,python2-pickleshare)
5397 ("python2-simplegeneric" ,python2-simplegeneric)
5398 ("python2-jsonschema" ,python2-jsonschema)
5399 ("python2-traitlets" ,python2-traitlets)
5400 ("python2-nbformat" ,python2-nbformat)
5401 ("python2-pygments" ,python2-pygments)))
5402 (inputs
5403 `(("readline" ,readline)
5404 ("which" ,which)))
5405 (native-inputs
5406 `(("graphviz" ,graphviz)
5407 ("pkg-config" ,pkg-config)
5408 ("python2-requests" ,python2-requests) ;; for tests
5409 ("python2-testpath" ,python2-testpath)
5410 ("python2-mock" ,python2-mock)
5411 ("python2-nose" ,python2-nose)))
5412 (arguments
5413 `(#:python ,python-2
5414 #:phases
5415 (modify-phases %standard-phases
5416 (add-before 'check 'delete-broken-tests
5417 (lambda* (#:key inputs #:allow-other-keys)
5418 ;; These tests throw errors for unknown reasons.
5419 (delete-file "IPython/core/tests/test_profile.py")
5420 (delete-file "IPython/core/tests/test_interactiveshell.py")
5421 (delete-file "IPython/core/tests/test_magic.py")
5422 #t)))))
5423 (home-page "https://ipython.org")
5424 (synopsis "IPython is a tool for interactive computing in Python")
5425 (description
5426 "IPython provides a rich architecture for interactive computing with:
5427 Powerful interactive shells, a browser-based notebook, support for interactive
5428 data visualization, embeddable interpreters and tools for parallel
5429 computing.")
5430 (license license:bsd-3)))
5431
5432 (define-public python-ipython
5433 (package
5434 (name "python-ipython")
5435 (version "7.9.0")
5436 (source
5437 (origin
5438 (method url-fetch)
5439 (uri (pypi-uri "ipython" version ".tar.gz"))
5440 (sha256
5441 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
5442 (build-system python-build-system)
5443 (propagated-inputs
5444 `(("python-backcall" ,python-backcall)
5445 ("python-pyzmq" ,python-pyzmq)
5446 ("python-prompt-toolkit" ,python-prompt-toolkit)
5447 ("python-terminado" ,python-terminado)
5448 ("python-matplotlib" ,python-matplotlib)
5449 ("python-numpy" ,python-numpy)
5450 ("python-numpydoc" ,python-numpydoc)
5451 ("python-jedi" ,python-jedi)
5452 ("python-jinja2" ,python-jinja2)
5453 ("python-mistune" ,python-mistune)
5454 ("python-pexpect" ,python-pexpect)
5455 ("python-pickleshare" ,python-pickleshare)
5456 ("python-simplegeneric" ,python-simplegeneric)
5457 ("python-jsonschema" ,python-jsonschema)
5458 ("python-traitlets" ,python-traitlets)
5459 ("python-nbformat" ,python-nbformat)
5460 ("python-pygments" ,python-pygments)))
5461 (inputs
5462 `(("readline" ,readline)
5463 ("which" ,which)))
5464 (native-inputs
5465 `(("graphviz" ,graphviz)
5466 ("pkg-config" ,pkg-config)
5467 ("python-requests" ,python-requests) ;; for tests
5468 ("python-testpath" ,python-testpath)
5469 ("python-nose" ,python-nose)))
5470 (arguments
5471 `(#:phases
5472 (modify-phases %standard-phases
5473 (add-after 'unpack 'make-docs-reproducible
5474 (lambda _
5475 (substitute* "IPython/sphinxext/ipython_directive.py"
5476 ((".*import datetime") "")
5477 ((".*datetime.datetime.now\\(\\)") "")
5478 (("%timeit") "# %timeit"))
5479 #t))
5480 ;; Tests can only be run after the library has been installed and not
5481 ;; within the source directory.
5482 (delete 'check)
5483 (add-after 'install 'check
5484 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5485 (if tests?
5486 (begin
5487 ;; Make installed package available for running the tests
5488 (add-installed-pythonpath inputs outputs)
5489 (setenv "HOME" "/tmp/") ;; required by a test
5490 ;; We only test the core because one of the other tests
5491 ;; tries to import ipykernel.
5492 (invoke "python" "IPython/testing/iptest.py"
5493 "-v" "IPython/core/tests"))
5494 #t)))
5495 (add-before 'check 'fix-tests
5496 (lambda* (#:key inputs #:allow-other-keys)
5497 (substitute* "./IPython/utils/_process_posix.py"
5498 (("/usr/bin/env', 'which") (which "which")))
5499 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5500 (("#!/usr/bin/env python")
5501 (string-append "#!" (which "python"))))
5502 ;; This test introduces a circular dependency on ipykernel
5503 ;; (which depends on ipython).
5504 (delete-file "IPython/core/tests/test_display.py")
5505 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
5506 (delete-file "IPython/core/tests/test_interactiveshell.py")
5507 #t)))))
5508 (home-page "https://ipython.org")
5509 (synopsis "IPython is a tool for interactive computing in Python")
5510 (description
5511 "IPython provides a rich architecture for interactive computing with:
5512 Powerful interactive shells, a browser-based notebook, support for interactive
5513 data visualization, embeddable interpreters and tools for parallel
5514 computing.")
5515 (license license:bsd-3)))
5516
5517 (define-public python-ipython-documentation
5518 (package
5519 (inherit python-ipython)
5520 (name "python-ipython-documentation")
5521 (version (package-version python-ipython))
5522 (arguments
5523 `(#:phases
5524 (modify-phases %standard-phases
5525 (delete 'build)
5526 (delete 'check)
5527 (replace 'install
5528 (lambda* (#:key outputs #:allow-other-keys)
5529 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5530 (doc (string-append data "/doc/" ,name "-" ,version))
5531 (html (string-append doc "/html"))
5532 (man1 (string-append data "/man/man1"))
5533 (info (string-append data "/info"))
5534 (examples (string-append doc "/examples"))
5535 (python-arg (string-append "PYTHON=" (which "python"))))
5536 (setenv "LANG" "en_US.utf8")
5537 (with-directory-excursion "docs"
5538 ;; FIXME: pdf fails to build
5539 ;;(system* "make" "pdf" "PAPER=a4")
5540 (system* "make" python-arg "html")
5541 ;; FIXME: the generated texi file contains ^@^@, which trips
5542 ;; up the parser.
5543 ;; (system* "make" python-arg "info")
5544 )
5545 (copy-recursively "docs/man" man1)
5546 (copy-recursively "examples" examples)
5547 (copy-recursively "docs/build/html" html)
5548 ;; (copy-file "docs/build/latex/ipython.pdf"
5549 ;; (string-append doc "/ipython.pdf"))
5550 (mkdir-p info)
5551 ;; (copy-file "docs/build/texinfo/ipython.info"
5552 ;; (string-append info "/ipython.info"))
5553 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5554 #t)))))
5555 (inputs
5556 `(("python-ipython" ,python-ipython)
5557 ("python-ipykernel" ,python-ipykernel)))
5558 (native-inputs
5559 `(("python-sphinx" ,python-sphinx)
5560 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
5561 ;; FIXME: It's possible that a smaller union would work just as well.
5562 ("texlive" ,(texlive-union (list texlive-amsfonts
5563 texlive-fonts-ec
5564 texlive-generic-ifxetex
5565 texlive-generic-pdftex
5566 texlive-latex-capt-of
5567 texlive-latex-cmap
5568 texlive-latex-environ
5569 texlive-latex-eqparbox
5570 texlive-latex-etoolbox
5571 texlive-latex-expdlist
5572 texlive-latex-fancyhdr
5573 texlive-latex-fancyvrb
5574 texlive-latex-fncychap
5575 texlive-latex-float
5576 texlive-latex-framed
5577 texlive-latex-geometry
5578 texlive-latex-graphics
5579 texlive-latex-hyperref
5580 texlive-latex-mdwtools
5581 texlive-latex-multirow
5582 texlive-latex-needspace
5583 texlive-latex-oberdiek
5584 texlive-latex-parskip
5585 texlive-latex-preview
5586 texlive-latex-tabulary
5587 texlive-latex-threeparttable
5588 texlive-latex-titlesec
5589 texlive-latex-trimspaces
5590 texlive-latex-ucs
5591 texlive-latex-upquote
5592 texlive-latex-url
5593 texlive-latex-varwidth
5594 texlive-latex-wrapfig)))
5595 ("texinfo" ,texinfo)))))
5596
5597 (define-public python-urwid
5598 (package
5599 (name "python-urwid")
5600 (version "2.0.1")
5601 (source
5602 (origin
5603 (method url-fetch)
5604 (uri (pypi-uri "urwid" version))
5605 (sha256
5606 (base32
5607 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5608 (build-system python-build-system)
5609 (home-page "http://urwid.org")
5610 (synopsis "Console user interface library for Python")
5611 (description
5612 "Urwid is a curses-based UI/widget library for Python. It includes many
5613 features useful for text console applications.")
5614 (license license:lgpl2.1+)))
5615
5616 (define-public python2-urwid
5617 (package-with-python2 python-urwid))
5618
5619 (define-public python-urwidtrees
5620 (package
5621 (name "python-urwidtrees")
5622 (version "1.0.2")
5623 (source
5624 (origin
5625 (method git-fetch)
5626 ;; package author intends on distributing via github rather than pypi:
5627 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5628 (uri (git-reference
5629 (url "https://github.com/pazz/urwidtrees")
5630 (commit version)))
5631 (file-name (git-file-name name version))
5632 (sha256
5633 (base32
5634 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
5635 (build-system python-build-system)
5636 (arguments
5637 '(#:use-setuptools? #f
5638 #:tests? #f)) ; no tests
5639 (propagated-inputs `(("python-urwid" ,python-urwid)))
5640 (home-page "https://github.com/pazz/urwidtrees")
5641 (synopsis "Tree widgets for urwid")
5642 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5643 toolkit. Use it to build trees of widgets.")
5644 (license license:gpl3+)))
5645
5646 (define-public python2-urwidtrees
5647 (package-with-python2 python-urwidtrees))
5648
5649 (define-public python-ua-parser
5650 (package
5651 (name "python-ua-parser")
5652 (version "0.8.0")
5653 (source
5654 (origin
5655 (method url-fetch)
5656 (uri (pypi-uri "ua-parser" version))
5657 (sha256
5658 (base32
5659 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5660 (build-system python-build-system)
5661 (arguments
5662 `(#:tests? #f)) ;no test suite in release
5663 (native-inputs
5664 `(("python-pyyaml" ,python-pyyaml)))
5665 (home-page "https://github.com/ua-parser/uap-python")
5666 (synopsis "User agent parser")
5667 (description
5668 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5669 (license license:asl2.0)))
5670
5671 (define-public python2-ua-parser
5672 (package-with-python2 python-ua-parser))
5673
5674 (define-public python-user-agents
5675 (package
5676 (name "python-user-agents")
5677 (version "1.1.0")
5678 (source
5679 (origin
5680 (method url-fetch)
5681 (uri (pypi-uri "user-agents" version))
5682 (sha256
5683 (base32
5684 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5685 (build-system python-build-system)
5686 (arguments
5687 `(#:tests? #f)) ;missing devices.json test file in release
5688 (propagated-inputs
5689 `(("python-ua-parser" ,python-ua-parser)))
5690 (home-page "https://github.com/selwin/python-user-agents")
5691 (synopsis "User Agent strings parsing library")
5692 (description
5693 "A library to identify devices (phones, tablets) and their capabilities by
5694 parsing (browser/HTTP) user agent strings.")
5695 (license license:expat)))
5696
5697 (define-public python2-user-agents
5698 (package-with-python2 python-user-agents))
5699
5700 (define-public python-dbus
5701 (package
5702 (name "python-dbus")
5703 (version "1.2.14")
5704 (source
5705 (origin
5706 (method url-fetch)
5707 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5708 "dbus-python-" version ".tar.gz"))
5709 (sha256
5710 (base32 "0cdchkgnivlka4lf8q4qfk0yxq483i3r3aqickjf8hfn7nx0c0mi"))))
5711 (build-system gnu-build-system)
5712 (native-inputs
5713 `(("pkg-config" ,pkg-config)))
5714 (inputs
5715 `(("python" ,python-wrapper)
5716 ("dbus-glib" ,dbus-glib)))
5717 (synopsis "Python bindings for D-bus")
5718 (description "python-dbus provides bindings for libdbus, the reference
5719 implementation of D-Bus.")
5720 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5721 (license license:expat)))
5722
5723 (define-public python2-dbus
5724 (package (inherit python-dbus)
5725 (name "python2-dbus")
5726 (inputs `(("python" ,python-2)
5727 ,@(alist-delete "python"
5728 (package-inputs python-dbus)
5729 equal?)))))
5730
5731 (define-public python-notify2
5732 (package
5733 (name "python-notify2")
5734 (version "0.3.1")
5735 (source
5736 (origin
5737 (method url-fetch)
5738 (uri (pypi-uri "notify2" version))
5739 (sha256
5740 (base32
5741 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
5742 (build-system python-build-system)
5743 (arguments `(#:tests? #f)) ; tests depend on system state
5744 (native-inputs
5745 `(("python-dbus" ,python-dbus)))
5746 (home-page "https://bitbucket.org/takluyver/pynotify2")
5747 (synopsis "Python interface to D-Bus notifications")
5748 (description
5749 "Pynotify2 provides a Python interface for sending D-Bus notifications.
5750 It is a reimplementation of pynotify in pure Python, and an alternative to
5751 the GObject Introspection bindings to libnotify for non-GTK applications.")
5752 (license (list license:bsd-2
5753 license:lgpl2.1+))))
5754
5755 (define-public python2-notify2
5756 (package-with-python2 python-notify2))
5757
5758 (define-public python-lxml
5759 (package
5760 (name "python-lxml")
5761 (version "4.4.2")
5762 (source
5763 (origin
5764 (method url-fetch)
5765 (uri (pypi-uri "lxml" version))
5766 (sha256
5767 (base32 "01nvb5j8vs9nk4z5s3250b1m22b4d08kffa36if3g1mdygdrvxpg"))))
5768 (build-system python-build-system)
5769 (arguments
5770 `(#:phases (modify-phases %standard-phases
5771 (replace 'check
5772 (lambda _
5773 (invoke "make" "test"))))))
5774 (inputs
5775 `(("libxml2" ,libxml2)
5776 ("libxslt" ,libxslt)))
5777 (home-page "https://lxml.de/")
5778 (synopsis "Python XML processing library")
5779 (description
5780 "The lxml XML toolkit is a Pythonic binding for the C libraries
5781 libxml2 and libxslt.")
5782 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5783
5784 (define-public python2-lxml
5785 (package-with-python2 python-lxml))
5786
5787 ;; beautifulsoup4 has a totally different namespace than 3.x,
5788 ;; and pypi seems to put it under its own name, so I guess we should too
5789 (define-public python-beautifulsoup4
5790 (package
5791 (name "python-beautifulsoup4")
5792 (version "4.7.1")
5793 (source
5794 (origin
5795 (method url-fetch)
5796 (uri (pypi-uri "beautifulsoup4" version))
5797 (sha256
5798 (base32
5799 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
5800 (build-system python-build-system)
5801 (arguments
5802 `(#:phases
5803 (modify-phases %standard-phases
5804 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5805 ;; must use this conversion script when building with Python 3. The
5806 ;; conversion script also runs the tests.
5807 ;; For more information, see the file 'convert-py3k' in the source
5808 ;; distribution.
5809 (replace 'check
5810 (lambda _ (invoke "./convert-py3k"))))))
5811 (propagated-inputs
5812 `(("python-soupsieve" ,python-soupsieve)))
5813 (home-page
5814 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5815 (synopsis
5816 "Python screen-scraping library")
5817 (description
5818 "Beautiful Soup is a Python library designed for rapidly setting up
5819 screen-scraping projects. It offers Pythonic idioms for navigating,
5820 searching, and modifying a parse tree, providing a toolkit for
5821 dissecting a document and extracting what you need. It automatically
5822 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5823 (license license:expat)
5824 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5825
5826 (define-public python2-beautifulsoup4
5827 (package
5828 (inherit (package-with-python2
5829 (strip-python2-variant python-beautifulsoup4)))
5830 (arguments `(#:python ,python-2))))
5831
5832 (define-public python-soupsieve
5833 (package
5834 (name "python-soupsieve")
5835 (version "1.9.5")
5836 (source
5837 (origin
5838 (method url-fetch)
5839 (uri (pypi-uri "soupsieve" version))
5840 (sha256
5841 (base32
5842 "1nhd0q0ifwva9wn645s6pn74p1rd97asn3qfg75nphx1wkgcbhg2"))))
5843 (build-system python-build-system)
5844 (arguments `(#:tests? #f))
5845 ;;XXX: 2 tests fail currently despite claming they were to be
5846 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
5847 ;;don't want to create a circular dependency.
5848 (home-page "https://github.com/facelessuser/soupsieve")
5849 (synopsis "CSS selector library")
5850 (description
5851 "Soup Sieve is a CSS selector library designed to be used with Beautiful
5852 Soup 4. It aims to provide selecting, matching, and filtering using modern
5853 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
5854 specifications up through the latest CSS level 4 drafts and beyond (though
5855 some are not yet implemented).")
5856 (properties `((python2-variant . ,(delay python2-soupsieve))))
5857 (license license:expat)))
5858
5859 (define-public python2-soupsieve
5860 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
5861 (package
5862 (inherit base)
5863 (propagated-inputs
5864 `(("python2-backports-functools-lru-cache"
5865 ,python2-backports-functools-lru-cache)
5866 ,@(package-propagated-inputs base))))))
5867
5868 (define-public python-netifaces
5869 (package
5870 (name "python-netifaces")
5871 (version "0.10.7")
5872 (source
5873 (origin
5874 (method url-fetch)
5875 (uri (pypi-uri "netifaces" version))
5876 (sha256
5877 (base32
5878 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5879 (build-system python-build-system)
5880 (home-page "https://github.com/al45tair/netifaces")
5881 (synopsis
5882 "Python module for portable network interface information")
5883 (description
5884 "Netifaces is a Python module providing information on network
5885 interfaces in an easy and portable manner.")
5886 (license license:expat)))
5887
5888 (define-public python2-netifaces
5889 (package-with-python2 python-netifaces))
5890
5891 (define-public python-networkx
5892 (package
5893 (name "python-networkx")
5894 (version "2.2")
5895 (source
5896 (origin
5897 (method url-fetch)
5898 (uri (pypi-uri "networkx" version ".zip"))
5899 (sha256
5900 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5901 (build-system python-build-system)
5902 ;; python-decorator is needed at runtime.
5903 (propagated-inputs
5904 `(("python-decorator" ,python-decorator)))
5905 (native-inputs
5906 `(("python-nose" ,python-nose)
5907 ("unzip" ,unzip)))
5908 (home-page "https://networkx.github.io/")
5909 (synopsis "Python module for creating and manipulating graphs and networks")
5910 (description
5911 "NetworkX is a Python package for the creation, manipulation, and study
5912 of the structure, dynamics, and functions of complex networks.")
5913 (license license:bsd-3)))
5914
5915 (define-public python2-networkx
5916 (package-with-python2 python-networkx))
5917
5918 (define-public python-datrie
5919 (package
5920 (name "python-datrie")
5921 (version "0.8")
5922 (source
5923 (origin
5924 (method url-fetch)
5925 (uri (pypi-uri "datrie" version))
5926 (sha256
5927 (base32
5928 "0338r8xgmpy78556jhms0h6qkvyjr10p8bpgdvcpqzm9lrmxmmdx"))))
5929 (build-system python-build-system)
5930 (native-inputs
5931 `(("python-cython" ,python-cython)
5932 ("python-hypothesis" ,python-hypothesis)
5933 ("python-pytest" ,python-pytest)
5934 ("python-pytest-runner" ,python-pytest-runner)))
5935 (home-page "https://github.com/kmike/datrie")
5936 (synopsis "Fast, efficiently stored trie for Python")
5937 (description
5938 "This package provides a fast, efficiently stored trie implementation for
5939 Python.")
5940 (license license:lgpl2.1+)))
5941
5942 (define-public snakemake
5943 (package
5944 (name "snakemake")
5945 (version "5.7.1")
5946 (source
5947 (origin
5948 (method url-fetch)
5949 (uri (pypi-uri "snakemake" version))
5950 (sha256
5951 (base32 "1pnpvvn8n2a78cg360wz3ldmpqrsm2wzi0c0dmvki9fnsw6fxdas"))))
5952 (build-system python-build-system)
5953 (arguments
5954 ;; TODO: Package missing test dependencies.
5955 '(#:tests? #f
5956 #:phases
5957 (modify-phases %standard-phases
5958 ;; For cluster execution Snakemake will call Python. Since there is
5959 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5960 ;; this by calling the snakemake wrapper instead.
5961 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5962 (lambda* (#:key outputs #:allow-other-keys)
5963 (substitute* "snakemake/executors.py"
5964 (("\\{sys.executable\\} -m snakemake")
5965 (string-append (assoc-ref outputs "out")
5966 "/bin/snakemake")))
5967 #t)))))
5968 (propagated-inputs
5969 `(("python-appdirs" ,python-appdirs)
5970 ("python-configargparse" ,python-configargparse)
5971 ("python-datrie" ,python-datrie)
5972 ("python-docutils" ,python-docutils)
5973 ("python-gitpython" ,python-gitpython)
5974 ("python-jinja2" ,python-jinja2)
5975 ("python-jsonschema" ,python-jsonschema)
5976 ("python-networkx" ,python-networkx)
5977 ("python-psutil" ,python-psutil)
5978 ("python-pyyaml" ,python-pyyaml)
5979 ("python-ratelimiter" ,python-ratelimiter)
5980 ("python-requests" ,python-requests)
5981 ("python-wrapt" ,python-wrapt)))
5982 (home-page "https://snakemake.readthedocs.io")
5983 (synopsis "Python-based execution environment for make-like workflows")
5984 (description
5985 "Snakemake aims to reduce the complexity of creating workflows by
5986 providing a clean and modern domain specific specification language (DSL) in
5987 Python style, together with a fast and comfortable execution environment.")
5988 (license license:expat)))
5989
5990 (define-public python-pyqrcode
5991 (package
5992 (name "python-pyqrcode")
5993 (version "1.2.1")
5994 (source
5995 (origin
5996 (method url-fetch)
5997 (uri (pypi-uri "PyQRCode" version))
5998 (sha256
5999 (base32
6000 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
6001 (build-system python-build-system)
6002 (home-page
6003 "https://github.com/mnooner256/pyqrcode")
6004 (synopsis "QR code generator")
6005 (description
6006 "Pyqrcode is a QR code generator written purely in Python with
6007 SVG, EPS, PNG and terminal output.")
6008 (license license:bsd-3)))
6009
6010 (define-public python-seaborn
6011 (package
6012 (name "python-seaborn")
6013 (version "0.9.0")
6014 (source
6015 (origin
6016 (method url-fetch)
6017 (uri (pypi-uri "seaborn" version))
6018 (sha256
6019 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))
6020 (patches
6021 (list (origin
6022 (method url-fetch)
6023 ;; This has already been merged, but there is no new
6024 ;; release including this patch. It fixes problems
6025 ;; with axis rotation that would lead to test
6026 ;; failures.
6027 (uri "https://patch-diff.githubusercontent.com/raw/mwaskom/seaborn/pull/1716.diff")
6028 (sha256
6029 (base32
6030 "1lm870z316n9ivsyr86hpk1gxaraw0mrjvq42lqsm0znhjdp9q9w"))
6031 (file-name "seaborn-0.9.0-axis-rotation.patch"))))))
6032 (build-system python-build-system)
6033 (arguments
6034 `(#:phases
6035 (modify-phases %standard-phases
6036 (add-before 'check 'start-xserver
6037 (lambda* (#:key inputs #:allow-other-keys)
6038 (let ((xorg-server (assoc-ref inputs "xorg-server")))
6039 ;; There must be a running X server and make check doesn't
6040 ;; start one. Therefore we must do it.
6041 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
6042 (setenv "DISPLAY" ":1")
6043 #t)))
6044 (add-after 'unpack 'fix-tests
6045 (lambda _
6046 ;; test_cbar_ticks fails probably because of matplotlib's
6047 ;; expectation of using an older version of FreeType.
6048 (delete-file "seaborn/tests/test_matrix.py")
6049 #t))
6050 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
6051 (propagated-inputs
6052 `(("python-pandas" ,python-pandas)
6053 ("python-matplotlib" ,python-matplotlib)
6054 ("python-numpy" ,python-numpy)
6055 ("python-scipy" ,python-scipy)))
6056 (native-inputs
6057 `(("python-pytest" ,python-pytest)
6058 ("xorg-server" ,xorg-server-for-tests)))
6059 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6060 (synopsis "Statistical data visualization")
6061 (description
6062 "Seaborn is a library for making attractive and informative statistical
6063 graphics in Python. It is built on top of matplotlib and tightly integrated
6064 with the PyData stack, including support for numpy and pandas data structures
6065 and statistical routines from scipy and statsmodels.")
6066 (license license:bsd-3)))
6067
6068 (define-public python2-seaborn
6069 (package-with-python2 python-seaborn))
6070
6071 (define-public python-mpmath
6072 (package
6073 (name "python-mpmath")
6074 (version "0.19")
6075 (source (origin
6076 (method url-fetch)
6077 (uri (string-append "http://mpmath.org/files/mpmath-"
6078 version ".tar.gz"))
6079 (sha256
6080 (base32
6081 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6082 (build-system python-build-system)
6083 (arguments
6084 '(#:phases
6085 (modify-phases %standard-phases
6086 (replace 'check
6087 (lambda _
6088 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
6089 (home-page "http://mpmath.org")
6090 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6091 (description
6092 "@code{mpmath} can be used as an arbitrary-precision substitute for
6093 Python's float/complex types and math/cmath modules, but also does much
6094 more advanced mathematics.")
6095 (license license:bsd-3)))
6096
6097 (define-public python2-mpmath
6098 (package-with-python2 python-mpmath))
6099
6100 (define-public python-bigfloat
6101 (package
6102 (name "python-bigfloat")
6103 (version "0.3.0")
6104 (source
6105 (origin
6106 (method url-fetch)
6107 (uri (pypi-uri "bigfloat" version))
6108 (sha256
6109 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6110 (build-system python-build-system)
6111 (inputs
6112 `(("mpfr" ,mpfr)))
6113 (home-page "https://github.com/mdickinson/bigfloat")
6114 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6115 (description
6116 "This package provides a Python interface to the MPFR library for
6117 multiprecision arithmetic.")
6118 (license license:lgpl3+)))
6119
6120 (define-public python2-bigfloat
6121 (package-with-python2 python-bigfloat))
6122
6123 (define-public python-sympy
6124 (package
6125 (name "python-sympy")
6126 (version "1.1.1")
6127 (source
6128 (origin
6129 (method url-fetch)
6130 (uri (string-append
6131 "https://github.com/sympy/sympy/releases/download/sympy-"
6132 version "/sympy-" version ".tar.gz"))
6133 (sha256
6134 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6135 (build-system python-build-system)
6136 (arguments
6137 `(#:phases
6138 (modify-phases %standard-phases
6139 ;; Run the core tests after installation. By default it would run
6140 ;; *all* tests, which take a very long time to complete and are known
6141 ;; to be flaky.
6142 (delete 'check)
6143 (add-after 'install 'check
6144 (lambda* (#:key outputs #:allow-other-keys)
6145 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6146 #t)))))
6147 (propagated-inputs
6148 `(("python-mpmath" ,python-mpmath)))
6149 (home-page "http://www.sympy.org/")
6150 (synopsis "Python library for symbolic mathematics")
6151 (description
6152 "SymPy is a Python library for symbolic mathematics. It aims to become a
6153 full-featured computer algebra system (CAS) while keeping the code as simple
6154 as possible in order to be comprehensible and easily extensible.")
6155 (license license:bsd-3)))
6156
6157 (define-public python2-sympy
6158 (package
6159 (inherit (package-with-python2 python-sympy))
6160 (arguments
6161 `(#:phases
6162 (modify-phases %standard-phases
6163 ;; Run the core tests after installation. By default it would run
6164 ;; *all* tests, which take a very long time to complete and are known
6165 ;; to be flaky.
6166 (delete 'check)
6167 (add-after 'install 'check
6168 (lambda* (#:key outputs #:allow-other-keys)
6169 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6170 #t)))))))
6171
6172 (define-public python-q
6173 (package
6174 (name "python-q")
6175 (version "2.6")
6176 (source
6177 (origin
6178 (method url-fetch)
6179 (uri (pypi-uri "q" version))
6180 (sha256
6181 (base32
6182 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6183 (build-system python-build-system)
6184 (home-page "https://github.com/zestyping/q")
6185 (synopsis "Quick-and-dirty debugging output for tired programmers")
6186 (description
6187 "q is a Python module for \"print\" style of debugging Python code. It
6188 provides convenient short API for print out of values, tracebacks, and
6189 falling into the Python interpreter.")
6190 (license license:asl2.0)))
6191
6192 (define-public python2-q
6193 (package-with-python2 python-q))
6194
6195 (define-public python2-xlib
6196 (package
6197 (name "python2-xlib")
6198 (version "0.14")
6199 (source (origin
6200 (method url-fetch)
6201 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6202 "/" version "/"
6203 "python-xlib-" version ".tar.gz"))
6204 (sha256
6205 (base32
6206 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6207 (build-system python-build-system)
6208 (arguments
6209 `(#:python ,python-2 ;Python 2 only
6210 #:tests? #f)) ;no tests
6211 (home-page "http://python-xlib.sourceforge.net/")
6212 (synopsis "Python X11 client library")
6213 (description
6214 "The Python X Library is intended to be a fully functional X client
6215 library for Python programs. It is useful to implement low-level X clients.
6216 It is written entirely in Python.")
6217 (license license:gpl2+)))
6218
6219 (define-public python-singledispatch
6220 (package
6221 (name "python-singledispatch")
6222 (version "3.4.0.3")
6223 (source
6224 (origin
6225 (method url-fetch)
6226 (uri (pypi-uri "singledispatch" version))
6227 (sha256
6228 (base32
6229 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6230 (build-system python-build-system)
6231 (native-inputs
6232 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6233 (home-page
6234 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6235 (synopsis "Backport of singledispatch feature from Python 3.4")
6236 (description
6237 "This library brings functools.singledispatch from Python 3.4 to Python
6238 2.6-3.3.")
6239 (license license:expat)))
6240
6241 (define-public python2-singledispatch
6242 (package-with-python2 python-singledispatch))
6243
6244 ;; the python- version can be removed with python-3.5
6245 (define-public python-backports-abc
6246 (package
6247 (name "python-backports-abc")
6248 (version "0.5")
6249 (source
6250 (origin
6251 (method url-fetch)
6252 (uri (pypi-uri "backports_abc" version))
6253 (sha256
6254 (base32
6255 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6256 (build-system python-build-system)
6257 (home-page "https://github.com/cython/backports_abc")
6258 (synopsis "Backport of additions to the 'collections.abc' module")
6259 (description
6260 "Python-backports-abc provides a backport of additions to the
6261 @code{collections.abc} module in Python-3.5.")
6262 (license license:psfl)))
6263
6264 (define-public python2-backports-abc
6265 (package-with-python2 python-backports-abc))
6266
6267 (define-public python-backports-csv
6268 (package
6269 (name "python-backports-csv")
6270 (version "1.0.5")
6271 (source
6272 (origin
6273 (method url-fetch)
6274 (uri (pypi-uri "backports.csv" version))
6275 (sha256
6276 (base32
6277 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6278 (build-system python-build-system)
6279 (home-page "https://github.com/ryanhiebert/backports.csv")
6280 (synopsis "Backport of Python 3's csv module for Python 2")
6281 (description
6282 "Provides a backport of Python 3's @code{csv} module for parsing
6283 comma separated values. The API of the @code{csv} module in Python 2
6284 is drastically different from the @code{csv} module in Python 3.
6285 This is due, for the most part, to the difference between str in
6286 Python 2 and Python 3.")
6287 (license license:psfl)))
6288
6289 (define-public python2-backports-csv
6290 (package-with-python2 python-backports-csv))
6291
6292 (define-public python2-backports-shutil-get-terminal-size
6293 (package
6294 (name "python2-backports-shutil-get-terminal-size")
6295 (version "1.0.0")
6296 (source
6297 (origin
6298 (method url-fetch)
6299 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6300 (sha256
6301 (base32
6302 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6303 (build-system python-build-system)
6304 (arguments
6305 `(#:python ,python-2
6306 #:phases
6307 (modify-phases %standard-phases
6308 (replace 'check
6309 (lambda _
6310 (invoke "py.test" "-v"))))))
6311 (native-inputs
6312 `(("python2-pytest" ,python2-pytest)))
6313 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6314 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6315 (description
6316 "This package provides a backport of the @code{get_terminal_size
6317 function} from Python 3.3's @code{shutil}.
6318 Unlike the original version it is written in pure Python rather than C,
6319 so it might be a tiny bit slower.")
6320 (license license:expat)))
6321
6322 (define-public python-waf
6323 (package
6324 (name "python-waf")
6325 (version "2.0.19")
6326 (source (origin
6327 (method url-fetch)
6328 (uri (string-append "https://waf.io/"
6329 "waf-" version ".tar.bz2"))
6330 (sha256
6331 (base32
6332 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
6333 (build-system python-build-system)
6334 (arguments
6335 '(#:phases
6336 (modify-phases %standard-phases
6337 (replace 'build
6338 (lambda _
6339 ;; XXX: Find a way to add all extra tools.
6340 (let ((tools '("gccdeps"
6341 "clang_compilation_database")))
6342 (invoke "python" "waf-light" "configure" "build"
6343 (string-append "--tools="
6344 (string-join tools ","))))))
6345 (replace 'check
6346 (lambda _
6347 (invoke "python" "waf" "--version")))
6348 (replace 'install
6349 (lambda* (#:key outputs #:allow-other-keys)
6350 (let ((out (assoc-ref outputs "out")))
6351 (install-file "waf" (string-append out "/bin")))
6352 #t))
6353 ;; waf breaks when it is wrapped.
6354 (delete 'wrap))))
6355 (home-page "https://waf.io/")
6356 (synopsis "Python-based build system")
6357 (description
6358 "Waf is a Python-based framework for configuring, compiling and installing
6359 applications.")
6360 (license license:bsd-3)))
6361
6362 (define-public python2-waf
6363 (package-with-python2 python-waf))
6364
6365 (define-public python-pyzmq
6366 (package
6367 (name "python-pyzmq")
6368 (version "17.1.2")
6369 (source
6370 (origin
6371 (method url-fetch)
6372 (uri (pypi-uri "pyzmq" version))
6373 (sha256
6374 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6375 (build-system python-build-system)
6376 (arguments
6377 `(#:configure-flags
6378 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6379 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6380 ;; --inplace' for 'python setup.py test' to work.
6381 #:tests? #f))
6382 (inputs
6383 `(("zeromq" ,zeromq)))
6384 (native-inputs
6385 `(("pkg-config" ,pkg-config)
6386 ("python-nose" ,python-nose)))
6387 (home-page "https://github.com/zeromq/pyzmq")
6388 (synopsis "Python bindings for 0MQ")
6389 (description
6390 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6391 (license license:bsd-4)))
6392
6393 (define-public python2-pyzmq
6394 (package-with-python2 python-pyzmq))
6395
6396 (define-public python-pep8
6397 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6398 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6399 ;; some dependents' test suites, and nothing more.
6400 (package
6401 (name "python-pep8")
6402 (version "1.7.0")
6403 (source
6404 (origin
6405 (method url-fetch)
6406 (uri (pypi-uri "pep8" version))
6407 (sha256
6408 (base32
6409 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
6410 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
6411 (build-system python-build-system)
6412 (home-page "https://pep8.readthedocs.org/")
6413 (synopsis "Python style guide checker")
6414 (description
6415 "This tools checks Python code against some of the style conventions in
6416 PEP 8.")
6417 (license license:expat)))
6418
6419 (define-public python2-pep8
6420 (package-with-python2 python-pep8))
6421
6422 (define-public python-pyflakes
6423 (package
6424 (name "python-pyflakes")
6425 (version "2.1.1")
6426 (source
6427 (origin
6428 (method url-fetch)
6429 (uri (pypi-uri "pyflakes" version))
6430 (sha256
6431 (base32
6432 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
6433 (build-system python-build-system)
6434 (home-page
6435 "https://github.com/pyflakes/pyflakes")
6436 (synopsis "Passive checker of Python programs")
6437 (description
6438 "Pyflakes statically checks Python source code for common errors.")
6439 (license license:expat)))
6440
6441 (define-public python2-pyflakes
6442 (package-with-python2 python-pyflakes))
6443
6444 (define-public python-mccabe
6445 (package
6446 (name "python-mccabe")
6447 (version "0.6.1")
6448 (source
6449 (origin
6450 (method url-fetch)
6451 (uri (pypi-uri "mccabe" version))
6452 (sha256
6453 (base32
6454 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6455 (build-system python-build-system)
6456 (native-inputs
6457 `(("python-pytest" ,python-pytest-bootstrap)
6458 ("python-pytest-runner" ,python-pytest-runner)))
6459 (home-page "https://github.com/flintwork/mccabe")
6460 (synopsis "McCabe checker, plugin for flake8")
6461 (description
6462 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6463 complexity of Python source code.")
6464 (license license:expat)))
6465
6466 (define-public python2-mccabe
6467 (package-with-python2 python-mccabe))
6468
6469 (define-public python-mccabe-0.2.1
6470 (package (inherit python-mccabe)
6471 (version "0.2.1")
6472 (source
6473 (origin
6474 (method url-fetch)
6475 (uri (pypi-uri "mccabe" version))
6476 (sha256
6477 (base32
6478 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6479
6480 (define-public python2-mccabe-0.2.1
6481 (package-with-python2 python-mccabe-0.2.1))
6482
6483 ;; Flake8 2.4.1 requires an older version of pep8.
6484 ;; This should be removed ASAP.
6485 (define-public python-pep8-1.5.7
6486 (package (inherit python-pep8)
6487 (version "1.5.7")
6488 (source
6489 (origin
6490 (method url-fetch)
6491 (uri (pypi-uri "pep8" version))
6492 (sha256
6493 (base32
6494 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6495 (arguments
6496 ;; XXX Tests not compatible with Python 3.5.
6497 '(#:tests? #f))))
6498
6499 (define-public python2-pep8-1.5.7
6500 (package-with-python2 python-pep8-1.5.7))
6501
6502 ;; Flake8 2.4.1 requires an older version of pyflakes.
6503 ;; This should be removed ASAP.
6504 (define-public python-pyflakes-0.8.1
6505 (package (inherit python-pyflakes)
6506 (version "0.8.1")
6507 (source
6508 (origin
6509 (method url-fetch)
6510 (uri (pypi-uri "pyflakes" version))
6511 (sha256
6512 (base32
6513 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6514 (arguments
6515 ;; XXX Tests not compatible with Python 3.5.
6516 '(#:tests? #f))))
6517
6518 (define-public python2-pyflakes-0.8.1
6519 (package-with-python2 python-pyflakes-0.8.1))
6520
6521 (define-public python-flake8
6522 (package
6523 (name "python-flake8")
6524 (version "3.7.7")
6525 (source (origin
6526 (method url-fetch)
6527 (uri (pypi-uri "flake8" version))
6528 (sha256
6529 (base32
6530 "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5"))))
6531 (build-system python-build-system)
6532 (arguments
6533 `(#:phases
6534 (modify-phases %standard-phases
6535 (delete 'check)
6536 (add-after 'install 'check
6537 (lambda* (#:key inputs outputs #:allow-other-keys)
6538 (add-installed-pythonpath inputs outputs)
6539 (invoke "pytest" "-v")
6540 #t)))))
6541 (propagated-inputs
6542 `(("python-pycodestyle" ,python-pycodestyle)
6543 ("python-entrypoints" ,python-entrypoints)
6544 ("python-pyflakes" ,python-pyflakes)
6545 ("python-mccabe" ,python-mccabe)))
6546 (native-inputs
6547 `(("python-mock" ,python-mock)
6548 ("python-pytest" ,python-pytest-bootstrap)
6549 ("python-pytest-runner" ,python-pytest-runner)))
6550 (home-page "https://gitlab.com/pycqa/flake8")
6551 (synopsis
6552 "The modular source code checker: pep8, pyflakes and co")
6553 (description
6554 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6555 (properties `((python2-variant . ,(delay python2-flake8))))
6556 (license license:expat)))
6557
6558 (define-public python2-flake8
6559 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
6560 (package (inherit base)
6561 (propagated-inputs
6562 `(("python2-configparser" ,python2-configparser)
6563 ("python2-enum34" ,python2-enum34)
6564 ("python2-typing" ,python2-typing)
6565 ,@(package-propagated-inputs base))))))
6566
6567 ;; python-hacking requires flake8 <2.6.0.
6568 (define-public python-flake8-2.5
6569 (package
6570 (inherit python-flake8)
6571 (version "2.5.5")
6572 (source (origin
6573 (method url-fetch)
6574 (uri (pypi-uri "flake8" version))
6575 (sha256
6576 (base32
6577 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6578 (propagated-inputs
6579 `(("python-pep8" ,python-pep8)
6580 ,@(package-propagated-inputs python-flake8)))
6581 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6582
6583 (define-public python2-flake8-2.5
6584 (package
6585 (inherit python2-flake8)
6586 (version (package-version python-flake8-2.5))
6587 (source (origin
6588 (inherit (package-source python-flake8-2.5))))
6589 (propagated-inputs
6590 `(("python2-pep8" ,python2-pep8)
6591 ,@(package-propagated-inputs python2-flake8)))))
6592
6593 (define-public python-flake8-polyfill
6594 (package
6595 (name "python-flake8-polyfill")
6596 (version "1.0.2")
6597 (source
6598 (origin
6599 (method url-fetch)
6600 (uri (pypi-uri "flake8-polyfill" version))
6601 (sha256
6602 (base32
6603 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6604 (build-system python-build-system)
6605 (arguments
6606 '(#:phases
6607 (modify-phases %standard-phases
6608 (replace 'check
6609 (lambda _
6610 ;; Be compatible with Pytest 4:
6611 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
6612 (substitute* "setup.cfg"
6613 (("\\[pytest\\]")
6614 "[tool:pytest]"))
6615
6616 (setenv "PYTHONPATH"
6617 (string-append (getcwd) "/build/lib:"
6618 (getenv "PYTHONPATH")))
6619 (invoke "py.test" "-v"))))))
6620 (native-inputs
6621 `(("python-flake8" ,python-flake8)
6622 ("python-mock" ,python-mock)
6623 ("python-pep8" ,python-pep8)
6624 ("python-pycodestyle" ,python-pycodestyle)
6625 ("python-pytest" ,python-pytest)))
6626 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6627 (synopsis "Polyfill package for Flake8 plugins")
6628 (description
6629 "This package that provides some compatibility helpers for Flake8
6630 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6631 (license license:expat)))
6632
6633 (define-public python2-flake8-polyfill
6634 (package-with-python2 python-flake8-polyfill))
6635
6636 (define-public python-mistune
6637 (package
6638 (name "python-mistune")
6639 (version "0.8.4")
6640 (source
6641 (origin
6642 (method url-fetch)
6643 (uri (pypi-uri "mistune" version))
6644 (sha256
6645 (base32
6646 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6647 (build-system python-build-system)
6648 (native-inputs
6649 `(("python-nose" ,python-nose)
6650 ("python-cython" ,python-cython)))
6651 (home-page "https://github.com/lepture/mistune")
6652 (synopsis "Markdown parser in pure Python")
6653 (description "This package provides a fast markdown parser in pure
6654 Python.")
6655 (license license:bsd-3)))
6656
6657 (define-public python2-mistune
6658 (package-with-python2 python-mistune))
6659
6660 (define-public python-markdown
6661 (package
6662 (name "python-markdown")
6663 (version "3.1.1")
6664 (source
6665 (origin
6666 (method url-fetch)
6667 (uri (pypi-uri "Markdown" version))
6668 (sha256
6669 (base32
6670 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f"))))
6671 (build-system python-build-system)
6672 (native-inputs
6673 `(("python-nose" ,python-nose)
6674 ("python-pyyaml" ,python-pyyaml)))
6675 (home-page "https://python-markdown.github.io/")
6676 (synopsis "Python implementation of Markdown")
6677 (description
6678 "This package provides a Python implementation of John Gruber's
6679 Markdown. The library features international input, various Markdown
6680 extensions, and several HTML output formats. A command line wrapper
6681 markdown_py is also provided to convert Markdown files to HTML.")
6682 (license license:bsd-3)))
6683
6684 (define-public python2-markdown
6685 (package-with-python2 python-markdown))
6686
6687 (define-public python-ptyprocess
6688 (package
6689 (name "python-ptyprocess")
6690 (version "0.5.2")
6691 (source
6692 (origin
6693 (method url-fetch)
6694 (uri (pypi-uri "ptyprocess" version))
6695 (sha256
6696 (base32
6697 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6698 (build-system python-build-system)
6699 (native-inputs
6700 `(("python-nose" ,python-nose)))
6701 (arguments
6702 `(#:phases
6703 (modify-phases %standard-phases
6704 (replace 'check
6705 (lambda _ (invoke "nosetests"))))))
6706 (home-page "https://github.com/pexpect/ptyprocess")
6707 (synopsis "Run a subprocess in a pseudo terminal")
6708 (description
6709 "This package provides a Python library used to launch a subprocess in a
6710 pseudo terminal (pty), and interact with both the process and its pty.")
6711 (license license:isc)))
6712
6713 (define-public python2-ptyprocess
6714 (package-with-python2 python-ptyprocess))
6715
6716 (define-public python-cram
6717 (package
6718 (name "python-cram")
6719 (version "0.7")
6720 (home-page "https://bitheap.org/cram/")
6721 (source (origin
6722 (method url-fetch)
6723 (uri (list (string-append home-page "cram-"
6724 version ".tar.gz")
6725 (pypi-uri "cram" version)))
6726 (sha256
6727 (base32
6728 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6729 (arguments
6730 '(#:phases
6731 (modify-phases %standard-phases
6732 (add-after 'unpack 'patch-source
6733 (lambda _
6734 (substitute* (find-files "cram" ".*\\.py$")
6735 ;; Replace default shell path.
6736 (("/bin/sh") (which "sh")))
6737 (substitute* (find-files "tests" ".*\\.t$")
6738 (("md5") "md5sum")
6739 (("/bin/bash") (which "bash"))
6740 (("/bin/sh") (which "sh")))
6741 (substitute* "cram/_test.py"
6742 ;; This hack works around a bug triggered by substituting
6743 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6744 ;; "cram -h", which breaks the output at 80 characters. This
6745 ;; causes the line showing the default shell to break into two
6746 ;; lines, but the test expects a single line...
6747 (("env\\['COLUMNS'\\] = '80'")
6748 "env['COLUMNS'] = '160'"))
6749
6750 (substitute* "Makefile"
6751 ;; Recent versions of python-coverage have caused the test
6752 ;; coverage to decrease (as of version 0.7). Allow that.
6753 (("--fail-under=100")
6754 "--fail-under=90"))
6755
6756 #t))
6757 (replace 'check
6758 ;; The test phase uses the built library and executable.
6759 (lambda* (#:key inputs outputs #:allow-other-keys)
6760 (add-installed-pythonpath inputs outputs)
6761 (setenv "PATH" (string-append (getenv "PATH") ":"
6762 (assoc-ref outputs "out") "/bin"))
6763 (invoke "make" "test"))))))
6764 (build-system python-build-system)
6765 (native-inputs
6766 `(("python-coverage" ,python-coverage)
6767 ("which" ,which)))
6768 (synopsis "Simple testing framework for command line applications")
6769 (description
6770 "Cram is a functional testing framework for command line applications.
6771 Cram tests look like snippets of interactive shell sessions. Cram runs each
6772 command and compares the command output in the test with the command’s actual
6773 output.")
6774 (license license:gpl2+)))
6775
6776 (define-public python2-cram
6777 (package-with-python2 python-cram))
6778
6779 (define-public python-straight-plugin
6780 (package
6781 (name "python-straight-plugin")
6782 (version "1.4.1")
6783 (source
6784 (origin
6785 (method url-fetch)
6786 (uri (pypi-uri "straight.plugin" version))
6787 (sha256
6788 (base32
6789 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6790 (build-system python-build-system)
6791 (home-page "https://github.com/ironfroggy/straight.plugin")
6792 (synopsis "Simple namespaced plugin facility")
6793 (description "Straight Plugin provides a type of plugin you can create from
6794 almost any existing Python modules, and an easy way for outside developers to
6795 add functionality and customization to your projects with their own plugins.")
6796 (license license:expat)))
6797
6798 (define-public python2-straight-plugin
6799 (package-with-python2 python-straight-plugin))
6800
6801 (define-public python-fonttools
6802 (package
6803 (name "python-fonttools")
6804 (version "4.2.2")
6805 (source (origin
6806 (method url-fetch)
6807 (uri (pypi-uri "fonttools" version ".zip"))
6808 (sha256
6809 (base32
6810 "012qqspnwdl4vy8qgzzpfglkk5dgzxiw0fak2jq74ngygvz3vfv6"))))
6811 (build-system python-build-system)
6812 (native-inputs
6813 `(("unzip" ,unzip)
6814 ("python-pytest" ,python-pytest)
6815 ("python-pytest-runner" ,python-pytest-runner)))
6816 (home-page "https://github.com/fonttools/fonttools")
6817 (synopsis "Tools to manipulate font files")
6818 (description
6819 "FontTools/TTX is a library to manipulate font files from Python. It
6820 supports reading and writing of TrueType/OpenType fonts, reading and writing
6821 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6822 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6823 from an XML-based format.")
6824 (license license:expat)))
6825
6826 ;; Fonttools 4.x dropped support for Python 2, so stick with 3.x here.
6827 (define-public python2-fonttools
6828 (let ((base (package-with-python2 (strip-python2-variant python-fonttools))))
6829 (package/inherit
6830 base
6831 (version "3.44.0")
6832 (source (origin
6833 (method url-fetch)
6834 (uri (pypi-uri "fonttools" version ".zip"))
6835 (sha256
6836 (base32
6837 "0v6399g755f2hn1ry62i5b6gdinf2fpx2966v3bxh6bjw1accb5p")))))))
6838
6839 (define-public python-ly
6840 (package
6841 (name "python-ly")
6842 (version "0.9.5")
6843 (source
6844 (origin
6845 (method url-fetch)
6846 (uri (pypi-uri name version))
6847 (sha256
6848 (base32
6849 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6850 (build-system python-build-system)
6851 (arguments
6852 ;; FIXME: Some tests need network access.
6853 '(#:tests? #f))
6854 (synopsis "Tool and library for manipulating LilyPond files")
6855 (description "This package provides a Python library to parse, manipulate
6856 or create documents in LilyPond format. A command line program ly is also
6857 provided that can be used to do various manipulations with LilyPond files.")
6858 (home-page "https://pypi.python.org/pypi/python-ly")
6859 (license license:gpl2+)))
6860
6861 (define-public python-appdirs
6862 (package
6863 (name "python-appdirs")
6864 (version "1.4.3")
6865 (source
6866 (origin
6867 (method url-fetch)
6868 (uri (pypi-uri "appdirs" version))
6869 (sha256
6870 (base32
6871 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6872 (build-system python-build-system)
6873 (home-page "https://github.com/ActiveState/appdirs")
6874 (synopsis
6875 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6876 (description
6877 "This module provides a portable way of finding out where user data
6878 should be stored on various operating systems.")
6879 (license license:expat)))
6880
6881 (define-public python2-appdirs
6882 (package-with-python2 python-appdirs))
6883
6884 (define-public python-llfuse
6885 (package
6886 (name "python-llfuse")
6887 (version "1.3.5")
6888 (source (origin
6889 (method url-fetch)
6890 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6891 (sha256
6892 (base32
6893 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6894 (build-system python-build-system)
6895 (inputs
6896 `(("fuse" ,fuse)
6897 ("attr" ,attr)))
6898 (native-inputs
6899 `(("pkg-config" ,pkg-config)))
6900 (synopsis "Python bindings for FUSE")
6901 (description
6902 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6903 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6904 (license license:lgpl2.0+)
6905 (properties `((python2-variant . ,(delay python2-llfuse))))))
6906
6907 (define-public python2-llfuse
6908 (package (inherit (package-with-python2
6909 (strip-python2-variant python-llfuse)))
6910 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6911
6912 ;; For attic-0.16
6913 (define-public python-llfuse-0.41
6914 (package (inherit python-llfuse)
6915 (version "0.41.1")
6916 (source (origin
6917 (method url-fetch)
6918 (uri (string-append
6919 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6920 "llfuse-" version ".tar.bz2"))
6921 (sha256
6922 (base32
6923 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6924 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6925 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6926 (license (list license:expat license:lgpl2.0+))))
6927
6928 (define-public python-msgpack
6929 (package
6930 (name "python-msgpack")
6931 (version "0.5.6")
6932 (source (origin
6933 (method url-fetch)
6934 (uri (pypi-uri "msgpack" version))
6935 (sha256
6936 (base32
6937 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6938 (build-system python-build-system)
6939 (arguments
6940 `(#:modules ((guix build utils)
6941 (guix build python-build-system)
6942 (ice-9 ftw)
6943 (srfi srfi-1)
6944 (srfi srfi-26))
6945 #:phases
6946 (modify-phases %standard-phases
6947 (replace 'check
6948 (lambda _
6949 (let ((cwd (getcwd)))
6950 (setenv "PYTHONPATH"
6951 (string-append cwd "/build/"
6952 (find (cut string-prefix? "lib" <>)
6953 (scandir (string-append cwd "/build")))
6954 ":"
6955 (getenv "PYTHONPATH")))
6956 (invoke "pytest" "-v" "test")))))))
6957 (native-inputs
6958 `(("python-pytest" ,python-pytest)))
6959 (synopsis "MessagePack (de)serializer")
6960 (description "MessagePack is a fast, compact binary serialization format,
6961 suitable for similar data to JSON. This package provides CPython bindings for
6962 reading and writing MessagePack data.")
6963 (home-page "https://pypi.python.org/pypi/msgpack/")
6964 (license license:asl2.0)))
6965
6966 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6967 ;; release 0.5. Some packages like borg still call it by the old name for now.
6968 ;; <https://bugs.gnu.org/30662>
6969 (define-public python-msgpack-transitional
6970 (package
6971 (inherit python-msgpack)
6972 (name "python-msgpack-transitional")
6973 (arguments
6974 (substitute-keyword-arguments (package-arguments python-msgpack)
6975 ((#:phases phases)
6976 `(modify-phases ,phases
6977 (add-after 'unpack 'configure-transitional
6978 (lambda _
6979 ;; Keep using the old name.
6980 (substitute* "setup.py"
6981 (("TRANSITIONAL = False")
6982 "TRANSITIONAL = 1"))
6983 #t))))))))
6984
6985 (define-public python2-msgpack
6986 (package-with-python2 python-msgpack))
6987
6988 (define-public python-netaddr
6989 (package
6990 (name "python-netaddr")
6991 (version "0.7.19")
6992 (source
6993 (origin
6994 (method url-fetch)
6995 (uri (pypi-uri "netaddr" version))
6996 (sha256
6997 (base32
6998 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6999 (build-system python-build-system)
7000 (arguments `(#:tests? #f)) ;; No tests.
7001 (home-page "https://github.com/drkjam/netaddr/")
7002 (synopsis "Pythonic manipulation of network addresses")
7003 (description
7004 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
7005 and MAC network addresses.")
7006 (license license:bsd-3)))
7007
7008 (define-public python2-netaddr
7009 (package-with-python2 python-netaddr))
7010
7011 (define-public python2-pyroute2
7012 (package
7013 (name "python2-pyroute2")
7014 (version "0.5.6")
7015 (source
7016 (origin
7017 (method url-fetch)
7018 (uri (pypi-uri "pyroute2" version))
7019 (sha256
7020 (base32
7021 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
7022 (build-system python-build-system)
7023 (arguments
7024 `(#:python ,python-2)) ;Python 3.x is not supported
7025 (home-page "https://github.com/svinota/pyroute2")
7026 (synopsis "Python netlink library")
7027 (description
7028 "Pyroute2 is a pure Python netlink library with minimal dependencies.
7029 Supported netlink families and protocols include:
7030 @itemize
7031 @item rtnl, network settings - addresses, routes, traffic controls
7032 @item nfnetlink - netfilter API: ipset, nftables, ...
7033 @item ipq - simplest userspace packet filtering, iptables QUEUE target
7034 @item devlink - manage and monitor devlink-enabled hardware
7035 @item generic - generic netlink families
7036 @itemize
7037 @item nl80211 - wireless functions API (basic support)
7038 @item taskstats - extended process statistics
7039 @item acpi_events - ACPI events monitoring
7040 @item thermal_events - thermal events monitoring
7041 @item VFS_DQUOT - disk quota events monitoring
7042 @end itemize
7043 @end itemize")
7044 (license license:gpl2+)))
7045
7046 (define-public python-wrapt
7047 (package
7048 (name "python-wrapt")
7049 (version "1.11.2")
7050 (source
7051 (origin
7052 (method url-fetch)
7053 (uri (pypi-uri "wrapt" version))
7054 (sha256
7055 (base32
7056 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
7057 (build-system python-build-system)
7058 (arguments
7059 ;; Tests are not included in the tarball, they are only available in the
7060 ;; git repository.
7061 `(#:tests? #f))
7062 (home-page "https://github.com/GrahamDumpleton/wrapt")
7063 (synopsis "Module for decorators, wrappers and monkey patching")
7064 (description
7065 "The aim of the wrapt module is to provide a transparent object proxy for
7066 Python, which can be used as the basis for the construction of function
7067 wrappers and decorator functions.")
7068 (license license:bsd-2)))
7069
7070 (define-public python2-wrapt
7071 (package-with-python2 python-wrapt))
7072
7073 (define-public python-xlrd
7074 (package
7075 (name "python-xlrd")
7076 (version "1.2.0")
7077 (source (origin
7078 (method url-fetch)
7079 (uri (pypi-uri "xlrd" version))
7080 (sha256
7081 (base32
7082 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
7083 (build-system python-build-system)
7084 (arguments
7085 `(#:phases
7086 (modify-phases %standard-phases
7087 ;; Some tests depend on writing a temporary file to the user's home
7088 ;; directory.
7089 (add-after 'unpack 'fix-tests
7090 (lambda _
7091 (delete-file "tests/test_open_workbook.py")
7092 #t)))))
7093 (home-page "http://www.python-excel.org/")
7094 (synopsis "Library for extracting data from Excel files")
7095 (description "This package provides a library to extract data from
7096 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7097 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7098 Unicode-aware. It is not intended as an end-user tool.")
7099 (license license:bsd-3)))
7100
7101 (define-public python2-xlrd
7102 (package-with-python2 python-xlrd))
7103
7104 (define-public python-prettytable
7105 (package
7106 (name "python-prettytable")
7107 (version "0.7.2")
7108 (source
7109 (origin
7110 (method url-fetch)
7111 (uri (pypi-uri "prettytable" version ".tar.bz2"))
7112 (sha256
7113 (base32
7114 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7115 (build-system python-build-system)
7116 (home-page "http://code.google.com/p/prettytable/")
7117 (synopsis "Display tabular data in an ASCII table format")
7118 (description
7119 "A library designed to represent tabular data in visually appealing ASCII
7120 tables. PrettyTable allows for selection of which columns are to be printed,
7121 independent alignment of columns (left or right justified or centred) and
7122 printing of sub-tables by specifying a row range.")
7123 (license license:bsd-3)))
7124
7125 (define-public python2-prettytable
7126 (package-with-python2 python-prettytable))
7127
7128 (define-public python-tables
7129 (package
7130 (name "python-tables")
7131 (version "3.4.4")
7132 (source
7133 (origin
7134 (method url-fetch)
7135 (uri (pypi-uri "tables" version))
7136 (sha256
7137 (base32
7138 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7139 (modules '((guix build utils)))
7140 (snippet
7141 '(begin
7142 ;; Remove pre-compiled .pyc files from source.
7143 (for-each delete-file-recursively
7144 (find-files "." "__pycache__" #:directories? #t))
7145 (for-each delete-file (find-files "." "\\.pyc$"))
7146 #t))))
7147 (build-system python-build-system)
7148 (arguments
7149 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7150 ;; or "check", so we must override the build and check phases.
7151 #:phases
7152 (modify-phases %standard-phases
7153 (add-after 'unpack 'use-gcc
7154 (lambda _
7155 (substitute* "setup.py"
7156 (("compiler = new_compiler\\(\\)" line)
7157 (string-append line
7158 "\ncompiler.set_executables(compiler='gcc',"
7159 "compiler_so='gcc',"
7160 "linker_exe='gcc',"
7161 "linker_so='gcc -shared')")))
7162 #t))
7163 (replace 'build
7164 (lambda* (#:key inputs #:allow-other-keys)
7165 (invoke "python" "setup.py" "build"
7166 (string-append "--hdf5="
7167 (assoc-ref inputs "hdf5")))))
7168 (replace 'check
7169 (lambda* (#:key inputs #:allow-other-keys)
7170 (invoke "python" "setup.py" "check"
7171 (string-append "--hdf5="
7172 (assoc-ref inputs "hdf5"))))))))
7173 (propagated-inputs
7174 `(("python-numexpr" ,python-numexpr)
7175 ("python-numpy" ,python-numpy)))
7176 (native-inputs
7177 `(("python-cython" ,python-cython)
7178 ("pkg-config" ,pkg-config)))
7179 (inputs
7180 `(("hdf5" ,hdf5)
7181 ("bzip2" ,bzip2)
7182 ("zlib" ,zlib)))
7183 (home-page "http://www.pytables.org/")
7184 (synopsis "Hierarchical datasets for Python")
7185 (description "PyTables is a package for managing hierarchical datasets and
7186 designed to efficiently cope with extremely large amounts of data.")
7187 (license license:bsd-3)))
7188
7189 (define-public python2-tables
7190 (package-with-python2 python-tables))
7191
7192 (define-public python-pyasn1
7193 (package
7194 (name "python-pyasn1")
7195 (version "0.4.3")
7196 (source
7197 (origin
7198 (method url-fetch)
7199 (uri (pypi-uri "pyasn1" version))
7200 (sha256
7201 (base32
7202 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7203 (build-system python-build-system)
7204 (home-page "http://pyasn1.sourceforge.net/")
7205 (synopsis "ASN.1 types and codecs")
7206 (description
7207 "This is an implementation of ASN.1 types and codecs in Python. It is
7208 suitable for a wide range of protocols based on the ASN.1 specification.")
7209 (license license:bsd-2)))
7210
7211 (define-public python2-pyasn1
7212 (package-with-python2 python-pyasn1))
7213
7214 (define-public python-pyasn1-modules
7215 (package
7216 (name "python-pyasn1-modules")
7217 (version "0.2.2")
7218 (source
7219 (origin
7220 (method url-fetch)
7221 (uri (pypi-uri "pyasn1-modules" version))
7222 (sha256
7223 (base32
7224 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7225 (build-system python-build-system)
7226 (propagated-inputs
7227 `(("python-pyasn1" ,python-pyasn1)))
7228 (home-page "https://sourceforge.net/projects/pyasn1/")
7229 (synopsis "ASN.1 codec implementations")
7230 (description
7231 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7232 implementations of ASN.1-based codecs and protocols.")
7233 (license license:bsd-3)))
7234
7235 (define-public python2-pyasn1-modules
7236 (package-with-python2 python-pyasn1-modules))
7237
7238 (define-public python-ipaddress
7239 (package
7240 (name "python-ipaddress")
7241 (version "1.0.22")
7242 (source (origin
7243 (method url-fetch)
7244 (uri (pypi-uri "ipaddress" version))
7245 (sha256
7246 (base32
7247 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7248 (build-system python-build-system)
7249 (home-page "https://github.com/phihag/ipaddress")
7250 (synopsis "IP address manipulation library")
7251 (description
7252 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7253 in Python. This library is used to create, poke at, and manipulate IPv4 and
7254 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7255 module to older versions of Python.")
7256 (license license:psfl)))
7257
7258 (define-public python2-ipaddress
7259 (package-with-python2 python-ipaddress))
7260
7261 (define-public python2-ipaddr
7262 (package
7263 (name "python2-ipaddr")
7264 (version "2.1.11")
7265 (source
7266 (origin
7267 (method url-fetch)
7268 (uri (pypi-uri "ipaddr" version))
7269 (sha256
7270 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7271 (build-system python-build-system)
7272 (arguments
7273 `(#:python ,python-2 ;version 2 only
7274 #:phases
7275 (modify-phases %standard-phases
7276 (replace 'check
7277 (lambda _ (invoke "python" "ipaddr_test.py"))))))
7278 (home-page "https://github.com/google/ipaddr-py")
7279 (synopsis "IP address manipulation library")
7280 (description
7281 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7282 IPv6 addresses and networks.
7283
7284 For new implementations you may prefer to use the standard module
7285 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
7286 versions of Python.")
7287 (license license:asl2.0)))
7288
7289 (define-public python-idna
7290 (package
7291 (name "python-idna")
7292 (version "2.8")
7293 (source
7294 (origin
7295 (method url-fetch)
7296 (uri (pypi-uri "idna" version))
7297 (sha256
7298 (base32
7299 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
7300 (build-system python-build-system)
7301 (home-page "https://github.com/kjd/idna")
7302 (synopsis "Internationalized domain names in applications")
7303 (description
7304 "This is a library to support the Internationalised Domain Names in
7305 Applications (IDNA) protocol as specified in RFC 5891. This version of the
7306 protocol is often referred to as “IDNA2008” and can produce different results
7307 from the earlier standard from 2003. The library is also intended to act as a
7308 suitable drop-in replacement for the “encodings.idna” module that comes with
7309 the Python standard library but currently only supports the older 2003
7310 specification.")
7311 (license license:bsd-4)))
7312
7313 (define-public python-idna-2.7
7314 (package (inherit python-idna)
7315 (version "2.7")
7316 (source (origin
7317 (method url-fetch)
7318 (uri (pypi-uri "idna" version))
7319 (sha256
7320 (base32
7321 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7322
7323
7324 (define-public python2-idna
7325 (package-with-python2 python-idna))
7326
7327 (define-public python-idna-ssl
7328 (package
7329 (name "python-idna-ssl")
7330 (version "1.0.1")
7331 (source
7332 (origin
7333 (method url-fetch)
7334 (uri (pypi-uri "idna-ssl" version))
7335 (sha256
7336 (base32
7337 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7338 (build-system python-build-system)
7339 (arguments
7340 `(#:tests? #f)) ;circular dependency with python-aiohttp
7341 (home-page "https://github.com/aio-libs/idna-ssl")
7342 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7343 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7344 domains support.")
7345 (license license:expat)))
7346
7347 (define-public python-pretend
7348 (package
7349 (name "python-pretend")
7350 (version "1.0.9")
7351 (source
7352 (origin
7353 (method url-fetch)
7354 (uri (pypi-uri "pretend" version))
7355 (sha256
7356 (base32
7357 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7358 (build-system python-build-system)
7359 (home-page "https://github.com/alex/pretend")
7360 (synopsis "Library for stubbing in Python")
7361 (description
7362 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7363 technique for writing tests. You may hear the term mixed up with mocks,
7364 fakes, or doubles. Basically, a stub is an object that returns pre-canned
7365 responses, rather than doing any computation.")
7366 (license license:bsd-3)))
7367
7368 (define-public python2-pretend
7369 (package-with-python2 python-pretend))
7370
7371 (define-public python-pip
7372 (package
7373 (name "python-pip")
7374 (version "19.2.1")
7375 (source
7376 (origin
7377 (method url-fetch)
7378 (uri (pypi-uri "pip" version))
7379 (sha256
7380 (base32
7381 "100sd12ss4mbdj5lf3wawad29cm573b27765mq098x6xhcj71395"))))
7382 (build-system python-build-system)
7383 (arguments
7384 '(#:tests? #f)) ; there are no tests in the pypi archive.
7385 (home-page "https://pip.pypa.io/")
7386 (synopsis "Package manager for Python software")
7387 (description
7388 "Pip is a package manager for Python software, that finds packages on the
7389 Python Package Index (PyPI).")
7390 (license license:expat)))
7391
7392 (define-public python2-pip
7393 (package-with-python2 python-pip))
7394
7395 (define-public python-tlsh
7396 (package
7397 (name "python-tlsh")
7398 (version "3.4.5")
7399 (home-page "https://github.com/trendmicro/tlsh")
7400 (source
7401 (origin
7402 (method git-fetch)
7403 (uri (git-reference
7404 (url "https://github.com/trendmicro/tlsh.git")
7405 (commit (string-append "v" version))))
7406 (file-name (git-file-name name version))
7407 (sha256
7408 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
7409 (build-system cmake-build-system)
7410 (arguments
7411 '(#:out-of-source? #f
7412 #:phases (modify-phases %standard-phases
7413 (replace
7414 'install
7415 (lambda* (#:key outputs #:allow-other-keys)
7416 ;; Build and install the Python bindings. The underlying
7417 ;; C++ library is apparently not meant to be installed.
7418 (let ((out (assoc-ref outputs "out")))
7419 (with-directory-excursion "py_ext"
7420 (and (system* "python" "setup.py" "build")
7421 (system* "python" "setup.py" "install"
7422 (string-append "--prefix=" out))))))))))
7423 (inputs `(("python" ,python-wrapper))) ;for the bindings
7424 (synopsis "Fuzzy matching library for Python")
7425 (description
7426 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7427 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7428 value which can be used for similarity comparisons. Similar objects have
7429 similar hash values, which allows for the detection of similar objects by
7430 comparing their hash values. The byte stream should have a sufficient amount
7431 of complexity; for example, a byte stream of identical bytes will not generate
7432 a hash value.")
7433 (license license:asl2.0)))
7434
7435 (define-public python2-tlsh
7436 (package
7437 (inherit python-tlsh)
7438 (name "python2-tlsh")
7439 (inputs `(("python" ,python-2)))))
7440
7441 (define-public python-termcolor
7442 (package
7443 (name "python-termcolor")
7444 (version "1.1.0")
7445 (source
7446 (origin
7447 (method url-fetch)
7448 (uri (pypi-uri "termcolor" version))
7449 (sha256
7450 (base32
7451 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7452 (build-system python-build-system)
7453 (arguments
7454 ;; There are no tests.
7455 `(#:tests? #f))
7456 (home-page "https://pypi.python.org/pypi/termcolor")
7457 (synopsis "ANSII Color formatting for terminal output")
7458 (description
7459 "This package provides ANSII Color formatting for output in terminals.")
7460 (license license:expat)))
7461
7462 (define-public python2-termcolor
7463 (package-with-python2 python-termcolor))
7464
7465 (define-public python-libarchive-c
7466 (package
7467 (name "python-libarchive-c")
7468 (version "2.8")
7469 (source (origin
7470 (method url-fetch)
7471 (uri (pypi-uri "libarchive-c" version))
7472 (sha256
7473 (base32
7474 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
7475 (build-system python-build-system)
7476 (arguments
7477 '(#:phases (modify-phases %standard-phases
7478 (add-before
7479 'build 'reference-libarchive
7480 (lambda* (#:key inputs #:allow-other-keys)
7481 ;; Retain the absolute file name of libarchive.so.
7482 (let ((libarchive (assoc-ref inputs "libarchive")))
7483 (substitute* "libarchive/ffi.py"
7484 (("find_library\\('archive'\\)")
7485 (string-append "'" libarchive
7486 "/lib/libarchive.so'"))))))
7487 (replace 'check
7488 (lambda _ (invoke "pytest" "-vv"))))))
7489 (native-inputs
7490 `(("python-mock" ,python-mock)
7491 ("python-pytest" ,python-pytest)))
7492 (inputs
7493 `(("libarchive" ,libarchive)))
7494 (home-page "https://github.com/Changaco/python-libarchive-c")
7495 (synopsis "Python interface to libarchive")
7496 (description
7497 "This package provides Python bindings to libarchive, a C library to
7498 access possibly compressed archives in many different formats. It uses
7499 Python's @code{ctypes} foreign function interface (FFI).")
7500 (license license:lgpl2.0+)))
7501
7502 (define-public python2-libarchive-c
7503 (package-with-python2 python-libarchive-c))
7504
7505 (define-public python-file
7506 (package
7507 (inherit file)
7508 (name "python-file")
7509 (build-system python-build-system)
7510 (arguments
7511 '(#:tests? #f ;no tests
7512 #:configure-flags '("--single-version-externally-managed" "--root=/")
7513 #:phases (modify-phases %standard-phases
7514 (add-before 'build 'change-directory
7515 (lambda _
7516 (chdir "python")
7517 #t))
7518 (add-before 'build 'set-library-file-name
7519 (lambda* (#:key inputs #:allow-other-keys)
7520 (let ((file (assoc-ref inputs "file")))
7521 (substitute* "magic.py"
7522 (("find_library\\('magic'\\)")
7523 (string-append "'" file "/lib/libmagic.so'")))
7524 #t))))))
7525 (inputs `(("file" ,file)))
7526 (native-inputs (if (%current-target-system)
7527 `(("self" ,this-package))
7528 '()))
7529 (synopsis "Python bindings to the libmagic file type guesser. Note that
7530 this module and the python-magic module both provide a \"magic.py\" file;
7531 these two modules, which are different and were developed separately, both
7532 serve the same purpose: provide Python bindings for libmagic.")))
7533
7534 (define-public python2-file
7535 (package-with-python2 python-file))
7536
7537 (define-public python-debian
7538 (package
7539 (name "python-debian")
7540 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
7541 (version "0.1.36")
7542 (source
7543 (origin
7544 ;; Use git-fetch, as pypi doesn't include test suite.
7545 (method git-fetch)
7546 (uri (git-reference
7547 (url home-page)
7548 (commit version)))
7549 (file-name (git-file-name name version))
7550 (sha256
7551 (base32
7552 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
7553 (build-system python-build-system)
7554 (arguments
7555 `(#:phases (modify-phases %standard-phases
7556 (add-after 'unpack 'remove-debian-specific-tests
7557 ;; python-apt, apt and dpkg are not yet available in guix,
7558 ;; and these tests heavily depend on them.
7559 (lambda _
7560 (delete-file "lib/debian/tests/test_deb822.py")
7561 (delete-file "lib/debian/tests/test_debfile.py")
7562 #t)))))
7563 (propagated-inputs
7564 `(("python-six" ,python-six)
7565 ("python-chardet" ,python-chardet)))
7566 (synopsis "Debian package related modules")
7567 (description
7568 ;; XXX: Use @enumerate instead of @itemize to work around
7569 ;; <http://bugs.gnu.org/21772>.
7570 "This package provides Python modules that abstract many formats of
7571 Debian-related files, such as:
7572
7573 @enumerate
7574 @item Debtags information;
7575 @item @file{debian/changelog} files;
7576 @item packages files, pdiffs;
7577 @item control files of single or multiple RFC822-style paragraphs---e.g.
7578 @file{debian/control}, @file{.changes}, @file{.dsc};
7579 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7580 contained files and meta-information.
7581 @end enumerate\n")
7582
7583 ;; Modules are either GPLv2+ or GPLv3+.
7584 (license license:gpl3+)))
7585
7586 (define-public python2-debian
7587 (package-with-python2 python-debian))
7588
7589 (define-public python-nbformat
7590 (package
7591 (name "python-nbformat")
7592 (version "4.4.0")
7593 (source
7594 (origin
7595 (method url-fetch)
7596 (uri (pypi-uri "nbformat" version))
7597 (sha256
7598 (base32
7599 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7600 (build-system python-build-system)
7601 (arguments `(#:tests? #f)) ; no test target
7602 (propagated-inputs
7603 `(("python-ipython-genutils" ,python-ipython-genutils)
7604 ("python-jsonschema" ,python-jsonschema)
7605 ("python-jupyter-core" ,python-jupyter-core)
7606 ("python-traitlets" ,python-traitlets)))
7607 (home-page "http://jupyter.org")
7608 (synopsis "Jupyter Notebook format")
7609 (description "This package provides the reference implementation of the
7610 Jupyter Notebook format and Python APIs for working with notebooks.")
7611 (license license:bsd-3)))
7612
7613 (define-public python2-nbformat
7614 (package-with-python2 python-nbformat))
7615
7616 (define-public python-bleach
7617 (package
7618 (name "python-bleach")
7619 (version "3.1.0")
7620 (source
7621 (origin
7622 (method url-fetch)
7623 (uri (pypi-uri "bleach" version))
7624 (sha256
7625 (base32
7626 "1yhrgrhkln8bd6gn3imj69g1h4xqah9gaz9q26crqr6gmmvpzprz"))))
7627 (build-system python-build-system)
7628 (propagated-inputs
7629 `(("python-webencodings" ,python-webencodings)
7630 ("python-six" ,python-six)))
7631 (native-inputs
7632 `(("python-pytest" ,python-pytest)
7633 ("python-pytest-runner" ,python-pytest-runner-2)))
7634 (home-page "https://github.com/jsocol/bleach")
7635 (synopsis "Whitelist-based HTML-sanitizing tool")
7636 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7637 (license license:asl2.0)))
7638
7639 (define-public python2-bleach
7640 (package-with-python2 python-bleach))
7641
7642 (define-public python-entrypoints
7643 (package
7644 (name "python-entrypoints")
7645 (version "0.3")
7646 (source
7647 (origin
7648 (method url-fetch)
7649 (uri (pypi-uri "entrypoints" version))
7650 (sha256
7651 (base32
7652 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
7653 (build-system python-build-system)
7654 ;; The package does not come with a setup.py file, so we have to generate
7655 ;; one ourselves.
7656 (arguments
7657 `(#:tests? #f
7658 #:phases
7659 (modify-phases %standard-phases
7660 (add-after 'unpack 'create-setup.py
7661 (lambda _
7662 (call-with-output-file "setup.py"
7663 (lambda (port)
7664 (format port "\
7665 from setuptools import setup
7666 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7667 " ,version))))))))
7668 (home-page "https://github.com/takluyver/entrypoints")
7669 (synopsis "Discover and load entry points from installed Python packages")
7670 (description "Entry points are a way for Python packages to advertise
7671 objects with some common interface. The most common examples are
7672 @code{console_scripts} entry points, which define shell commands by
7673 identifying a Python function to run. The @code{entrypoints} module contains
7674 functions to find and load entry points.")
7675 (license license:expat)))
7676
7677 (define-public python2-entrypoints
7678 (package-with-python2 python-entrypoints))
7679
7680 (define-public python-nbconvert
7681 (package
7682 (name "python-nbconvert")
7683 (version "5.0.0b1")
7684 (source
7685 (origin
7686 (method url-fetch)
7687 (uri (pypi-uri "nbconvert" version))
7688 (sha256
7689 (base32
7690 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7691 (build-system python-build-system)
7692 (arguments
7693 `(;; The "bdist_egg" target is disabled by default, causing the installation
7694 ;; to fail.
7695 #:configure-flags (list "bdist_egg")
7696 ;; FIXME: 5 failures, 40 errors.
7697 #:tests? #f))
7698 ;; #:phases
7699 ;; (modify-phases %standard-phases
7700 ;; (replace 'check
7701 ;; (lambda _
7702 ;; (zero? (system* "py.test" "-v")))))
7703 (native-inputs
7704 `(("python-pytest" ,python-pytest)))
7705 (propagated-inputs
7706 `(("python-bleach" ,python-bleach)
7707 ("python-entrypoints" ,python-entrypoints)
7708 ("python-jinja2" ,python-jinja2)
7709 ("python-jupyter-core" ,python-jupyter-core)
7710 ("python-mistune" ,python-mistune)
7711 ("python-nbformat" ,python-nbformat)
7712 ("python-pygments" ,python-pygments)
7713 ("python-traitlets" ,python-traitlets)))
7714 (home-page "http://jupyter.org")
7715 (synopsis "Converting Jupyter Notebooks")
7716 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7717 notebooks to various other formats via Jinja templates. It allows you to
7718 convert an @code{.ipynb} notebook file into various static formats including:
7719
7720 @enumerate
7721 @item HTML
7722 @item LaTeX
7723 @item PDF
7724 @item Reveal JS
7725 @item Markdown (md)
7726 @item ReStructured Text (rst)
7727 @item executable script
7728 @end enumerate\n")
7729 (license license:bsd-3)))
7730
7731 (define-public python2-nbconvert
7732 (package-with-python2 python-nbconvert))
7733
7734 (define-public python-notebook
7735 (package
7736 (name "python-notebook")
7737 (version "5.7.4")
7738 (source (origin
7739 (method url-fetch)
7740 (uri (pypi-uri "notebook" version))
7741 (sha256
7742 (base32
7743 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7744 (build-system python-build-system)
7745 (arguments
7746 `(#:phases
7747 (modify-phases %standard-phases
7748 (replace 'check
7749 (lambda _
7750 ;; These tests require a browser
7751 (delete-file-recursively "notebook/tests/selenium")
7752 ;; Some tests need HOME
7753 (setenv "HOME" "/tmp")
7754 ;; This file contains "warningfilters", which are not supported
7755 ;; by this version of nose.
7756 (delete-file "setup.cfg")
7757 (with-directory-excursion "/tmp"
7758 (invoke "nosetests" "-v"))
7759 #t)))))
7760 (propagated-inputs
7761 `(("python-jupyter-core" ,python-jupyter-core)
7762 ("python-nbformat" ,python-nbformat)
7763 ("python-nbconvert" ,python-nbconvert)
7764 ("python-prometheus-client" ,python-prometheus-client)
7765 ("python-send2trash" ,python-send2trash)
7766 ("python-terminado" ,python-terminado)))
7767 (native-inputs
7768 `(("python-nose" ,python-nose)
7769 ("python-sphinx" ,python-sphinx)
7770 ("python-requests" ,python-requests)))
7771 (home-page "http://jupyter.org/")
7772 (synopsis "Web-based notebook environment for interactive computing")
7773 (description
7774 "The Jupyter HTML notebook is a web-based notebook environment for
7775 interactive computing.")
7776 (properties `((python2-variant . ,(delay python2-notebook))))
7777 (license license:bsd-3)))
7778
7779 (define-public python2-notebook
7780 (let ((base (package-with-python2
7781 (strip-python2-variant python-notebook))))
7782 (package (inherit base)
7783 (native-inputs
7784 `(("python2-mock" ,python2-mock)
7785 ,@(package-native-inputs base)))
7786 (arguments
7787 (substitute-keyword-arguments (package-arguments base)
7788 ((#:phases phases)
7789 `(modify-phases ,phases
7790 (add-before 'check 'disable-test-case
7791 ;; The test requires network access to localhost. Curiously it
7792 ;; fails with Python 2 only. Simply make the test-case return
7793 ;; immediately.
7794 (lambda _
7795 (substitute*
7796 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7797 (("formats = self.nbconvert_api") "return #")))))))))))
7798
7799 (define-public python-widgetsnbextension
7800 (package
7801 (name "python-widgetsnbextension")
7802 (version "3.4.2")
7803 (source
7804 (origin
7805 (method url-fetch)
7806 (uri (pypi-uri "widgetsnbextension" version))
7807 (sha256
7808 (base32
7809 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7810 (build-system python-build-system)
7811 (propagated-inputs
7812 `(("python-ipykernel" ,python-ipykernel)
7813 ("python-notebook" ,python-notebook)))
7814 (native-inputs
7815 `(("python-certifi" ,python-certifi)
7816 ("python-nose" ,python-nose)))
7817 (home-page "https://ipython.org")
7818 (synopsis "IPython HTML widgets for Jupyter")
7819 (description "This package provides interactive HTML widgets for Jupyter
7820 notebooks.")
7821 (license license:bsd-3)))
7822
7823 (define-public python2-widgetsnbextension
7824 (package-with-python2 python-widgetsnbextension))
7825
7826 (define-public python-ipywidgets
7827 (package
7828 (name "python-ipywidgets")
7829 (version "5.2.2")
7830 (source
7831 (origin
7832 (method url-fetch)
7833 (uri (pypi-uri "ipywidgets" version))
7834 (sha256
7835 (base32
7836 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7837 (build-system python-build-system)
7838 (propagated-inputs
7839 `(("python-ipython" ,python-ipython)
7840 ("python-traitlets" ,python-traitlets)
7841 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7842 (native-inputs
7843 `(("python-nose" ,python-nose)
7844 ("python-pytest" ,python-pytest)))
7845 (home-page "https://ipython.org")
7846 (synopsis "IPython HTML widgets for Jupyter")
7847 (description "Ipywidgets are interactive HTML widgets for Jupyter
7848 notebooks and the IPython kernel. Notebooks come alive when interactive
7849 widgets are used. Users gain control of their data and can visualize changes
7850 in the data.")
7851 (license license:bsd-3)))
7852
7853 (define-public python2-ipywidgets
7854 (package-with-python2 python-ipywidgets))
7855
7856 (define-public python-jupyter-console
7857 (package
7858 (name "python-jupyter-console")
7859 (version "6.0.0")
7860 (source
7861 (origin
7862 (method url-fetch)
7863 (uri (pypi-uri "jupyter_console" version))
7864 (sha256
7865 (base32
7866 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
7867 (build-system python-build-system)
7868 (propagated-inputs
7869 `(("python-ipykernel" ,python-ipykernel)
7870 ("python-jupyter-client" ,python-jupyter-client)
7871 ("python-prompt-toolkit" ,python-prompt-toolkit)
7872 ("python-pygments" ,python-pygments)))
7873 (native-inputs
7874 `(("python-nose" ,python-nose)))
7875 (home-page "https://jupyter.org")
7876 (synopsis "Jupyter terminal console")
7877 (description "This package provides a terminal-based console frontend for
7878 Jupyter kernels. It also allows for console-based interaction with non-Python
7879 Jupyter kernels such as IJulia and IRKernel.")
7880 (license license:bsd-3)))
7881
7882 (define-public python2-jupyter-console
7883 (package
7884 (name "python2-jupyter-console")
7885 (version "5.2.0")
7886 (source
7887 (origin
7888 (method url-fetch)
7889 (uri (pypi-uri "jupyter_console" version))
7890 (sha256
7891 (base32
7892 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7893 (build-system python-build-system)
7894 ;; Tests only run in an TTY.
7895 (arguments `(#:tests? #f))
7896 (propagated-inputs
7897 `(("python2-ipykernel" ,python2-ipykernel)
7898 ("python2-jupyter-client" ,python2-jupyter-client)
7899 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7900 ("python2-pygments" ,python2-pygments)))
7901 (native-inputs
7902 `(("python2-nose" ,python2-nose)))
7903 (home-page "https://jupyter.org")
7904 (synopsis "Jupyter terminal console")
7905 (description "This package provides a terminal-based console frontend for
7906 Jupyter kernels. It also allows for console-based interaction with non-Python
7907 Jupyter kernels such as IJulia and IRKernel.")
7908 (license license:bsd-3)))
7909
7910 ;; The python-ipython and python-jupyter-console require each other. To get
7911 ;; the functionality in both packages working, strip down the
7912 ;; python-jupyter-console package when using it as an input to python-ipython.
7913 (define python-jupyter-console-minimal
7914 (package
7915 (inherit python-jupyter-console)
7916 (name "python-jupyter-console-minimal")
7917 (arguments
7918 (substitute-keyword-arguments
7919 (package-arguments python-jupyter-console)
7920 ((#:phases phases)
7921 `(modify-phases ,phases
7922 (add-after 'install 'delete-bin
7923 (lambda* (#:key outputs #:allow-other-keys)
7924 ;; Delete the bin files, to avoid conflicts in profiles
7925 ;; where python-ipython and python-jupyter-console are
7926 ;; both present.
7927 (delete-file-recursively
7928 (string-append
7929 (assoc-ref outputs "out") "/bin"))))))))
7930 ;; Remove the python-ipython propagated input, to avoid the cycle
7931 (propagated-inputs
7932 (alist-delete
7933 "python-ipython"
7934 (package-propagated-inputs python-jupyter-console)))))
7935
7936 (define-public python-qtconsole
7937 (package
7938 (name "python-qtconsole")
7939 (version "4.4.3")
7940 (source
7941 (origin
7942 (method url-fetch)
7943 (uri (pypi-uri "qtconsole" version))
7944 (sha256
7945 (base32
7946 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
7947 (build-system python-build-system)
7948 (arguments
7949 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
7950 ;; but we only have the LTS version 5.x. This means that there might be
7951 ;; runtime errors, but since this is a dependency of the Jupyter package,
7952 ;; and Jupyter can be used without the qtconsole we can overlook this for
7953 ;; now.
7954 `(#:tests? #f
7955 #:phases
7956 (modify-phases %standard-phases
7957 (add-before 'check 'pre-check
7958 (lambda _
7959 (setenv "QT_QPA_PLATFORM" "offscreen")
7960 #t)))))
7961 (propagated-inputs
7962 `(("python-ipykernel" ,python-ipykernel)
7963 ("python-ipython" ,python-ipython)))
7964 (native-inputs
7965 `(("python-pytest" ,python-pytest)))
7966 (home-page "http://jupyter.org")
7967 (synopsis "Jupyter Qt console")
7968 (description "This package provides a Qt-based console for Jupyter with
7969 support for rich media output.")
7970 (license license:bsd-3)))
7971
7972 (define-public python-jsbeautifier
7973 (package
7974 (name "python-jsbeautifier")
7975 (version "1.10.2")
7976 (home-page "https://github.com/beautify-web/js-beautify")
7977 (source (origin
7978 (method git-fetch)
7979 (uri (git-reference
7980 (url home-page)
7981 (commit (string-append "v" version))))
7982 (file-name (git-file-name name version))
7983 (sha256
7984 (base32
7985 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
7986 (build-system python-build-system)
7987 (arguments
7988 `(#:phases (modify-phases %standard-phases
7989 (add-after 'unpack 'chdir
7990 (lambda _
7991 ;; The upstream Git repository contains all the code,
7992 ;; but this package only builds the python code.
7993 (chdir "python")
7994 #t))
7995 (add-after 'unpack 'patch-python-six-requirements
7996 (lambda _
7997 (substitute* "python/setup.py"
7998 (("six>=1.12.0")
7999 "six>=1.11.0"))
8000 #t)))))
8001 (propagated-inputs
8002 `(("python-editorconfig" ,python-editorconfig)
8003 ("python-six" ,python-six)))
8004 (native-inputs
8005 `(("python-pytest" ,python-pytest)))
8006 (synopsis "JavaScript unobfuscator and beautifier")
8007 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
8008 popular online obfuscators.")
8009 (license license:expat)))
8010
8011 (define-public jupyter
8012 (package
8013 (name "jupyter")
8014 (version "1.0.0")
8015 (source
8016 (origin
8017 (method url-fetch)
8018 (uri (pypi-uri "jupyter" version))
8019 (sha256
8020 (base32
8021 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8022 (build-system python-build-system)
8023 (arguments '(#:tests? #f)) ; there are none.
8024 (propagated-inputs
8025 `(("python-ipykernel" ,python-ipykernel)
8026 ("python-ipywidgets" ,python-ipywidgets)
8027 ("python-jupyter-console" ,python-jupyter-console)
8028 ("python-nbconvert" ,python-nbconvert)
8029 ("python-notebook" ,python-notebook)
8030 ("python-qtconsole" ,python-qtconsole)))
8031 (native-search-paths
8032 (list (search-path-specification
8033 (variable "JUPYTER_PATH")
8034 (files '("share/jupyter")))))
8035 (home-page "https://jupyter.org")
8036 (synopsis "Web application for interactive documents")
8037 (description
8038 "The Jupyter Notebook is a web application that allows you to create and
8039 share documents that contain live code, equations, visualizations and
8040 explanatory text. Uses include: data cleaning and transformation, numerical
8041 simulation, statistical modeling, machine learning and much more.")
8042 (license license:bsd-3)))
8043
8044 (define-public python-chardet
8045 (package
8046 (name "python-chardet")
8047 (version "3.0.4")
8048 (source
8049 (origin
8050 (method url-fetch)
8051 (uri (pypi-uri "chardet" version))
8052 (sha256
8053 (base32
8054 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
8055 (native-inputs
8056 `(("python-hypothesis" ,python-hypothesis)
8057 ("python-pytest" ,python-pytest)
8058 ("python-pytest-runner" ,python-pytest-runner)))
8059 (build-system python-build-system)
8060 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
8061 (arguments `(#:tests? #f))
8062 (home-page "https://github.com/chardet/chardet")
8063 (synopsis "Universal encoding detector for Python 2 and 3")
8064 (description
8065 "This package provides @code{chardet}, a Python module that can
8066 automatically detect a wide range of file encodings.")
8067 (license license:lgpl2.1+)))
8068
8069 (define-public python2-chardet
8070 (package-with-python2 python-chardet))
8071
8072 (define-public python-docopt
8073 (package
8074 (name "python-docopt")
8075 (version "0.6.2")
8076 (source
8077 (origin
8078 (method git-fetch)
8079 ;; The release on PyPI does not include tests.
8080 (uri (git-reference
8081 (url "https://github.com/docopt/docopt")
8082 (commit version)))
8083 (file-name (git-file-name name version))
8084 (sha256
8085 (base32
8086 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
8087 (build-system python-build-system)
8088 (native-inputs
8089 `(("python-pytest" ,python-pytest)))
8090 (arguments
8091 `(#:phases
8092 (modify-phases %standard-phases
8093 (replace 'check
8094 (lambda _ (invoke "py.test"))))))
8095 (home-page "http://docopt.org")
8096 (synopsis "Command-line interface description language for Python")
8097 (description "This library allows the user to define a command-line
8098 interface from a program's help message rather than specifying it
8099 programmatically with command-line parsers like @code{getopt} and
8100 @code{argparse}.")
8101 (license license:expat)))
8102
8103 (define-public python2-docopt
8104 (package-with-python2 python-docopt))
8105
8106 (define-public python-pythondialog
8107 (package
8108 (name "python-pythondialog")
8109 (version "3.4.0")
8110 (source
8111 (origin
8112 (method url-fetch)
8113 (uri (pypi-uri "pythondialog" version))
8114 (sha256
8115 (base32
8116 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8117 (build-system python-build-system)
8118 (arguments
8119 `(#:phases
8120 (modify-phases %standard-phases
8121 (add-after 'unpack 'patch-path
8122 (lambda* (#:key inputs #:allow-other-keys)
8123 (let* ((dialog (assoc-ref inputs "dialog")))
8124 ;; Since this library really wants to grovel the search path, we
8125 ;; must hardcode dialog's store path into it.
8126 (substitute* "dialog.py"
8127 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8128 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8129 #t))))
8130 #:tests? #f)) ; no test suite
8131 (propagated-inputs
8132 `(("dialog" ,dialog)))
8133 (home-page "http://pythondialog.sourceforge.net/")
8134 (synopsis "Python interface to the UNIX dialog utility")
8135 (description "A Python wrapper for the dialog utility. Its purpose is to
8136 provide an easy to use, pythonic and comprehensive Python interface to dialog.
8137 This allows one to make simple text-mode user interfaces on Unix-like systems")
8138 (license license:lgpl2.1)
8139 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8140
8141 (define-public python2-pythondialog
8142 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8143 (package
8144 (inherit base)
8145 (version (package-version python-pythondialog))
8146 (source (origin
8147 (method url-fetch)
8148 (uri (pypi-uri "python2-pythondialog" version))
8149 (sha256
8150 (base32
8151 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8152
8153 (define-public python-configobj
8154 (package
8155 (name "python-configobj")
8156 (version "5.0.6")
8157 (source (origin
8158 (method url-fetch)
8159 (uri (pypi-uri "configobj" version))
8160 (sha256
8161 (base32
8162 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8163 ;; Patch setup.py so it looks for python-setuptools, which is
8164 ;; required to parse the keyword 'install_requires' in setup.py.
8165 (patches (search-patches "python-configobj-setuptools.patch"))))
8166 (build-system python-build-system)
8167 (propagated-inputs
8168 `(("python-six" ,python-six)))
8169 (synopsis "Config file reading, writing and validation")
8170 (description "ConfigObj is a simple but powerful config file reader and
8171 writer: an ini file round tripper. Its main feature is that it is very easy to
8172 use, with a straightforward programmer’s interface and a simple syntax for
8173 config files.")
8174 (home-page "https://github.com/DiffSK/configobj")
8175 (license license:bsd-3)))
8176
8177 (define-public python2-configobj
8178 (package-with-python2 python-configobj))
8179
8180 (define-public python-configargparse
8181 (package
8182 (name "python-configargparse")
8183 (version "0.14.0")
8184 (source (origin
8185 (method url-fetch)
8186 (uri (pypi-uri "ConfigArgParse" version))
8187 (sha256
8188 (base32
8189 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
8190 (build-system python-build-system)
8191 (native-inputs
8192 `(("python-pyyaml" ,python-pyyaml)))
8193 (arguments
8194 `(#:phases
8195 (modify-phases %standard-phases
8196 (replace 'check
8197 (lambda _
8198 ;; Bypass setuptools-shim because one test relies on "setup.py"
8199 ;; being the first argument passed to the python call.
8200 ;;
8201 ;; NOTE: Many tests do not run because they rely on Python's
8202 ;; built-in test.test_argparse, but we remove the unit tests from
8203 ;; our Python installation.
8204 (invoke "python" "setup.py" "test"))))))
8205 (synopsis "Replacement for argparse")
8206 (description "A drop-in replacement for argparse that allows options to also
8207 be set via config files and/or environment variables.")
8208 (home-page "https://github.com/bw2/ConfigArgParse")
8209 (license license:expat)))
8210
8211 (define-public python2-configargparse
8212 (package-with-python2 python-configargparse))
8213
8214 (define-public python-argparse-manpage
8215 (package
8216 (name "python-argparse-manpage")
8217 (version "1.1")
8218 (source
8219 (origin
8220 (method url-fetch)
8221 (uri (pypi-uri "argparse-manpage" version))
8222 (sha256
8223 (base32
8224 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8225 (build-system python-build-system)
8226 (home-page "https://github.com/praiskup/argparse-manpage")
8227 (synopsis "Build manual page from Python's ArgumentParser object")
8228 (description
8229 "This package provides tools to build manual pages from Python's
8230 @code{ArgumentParser} object.")
8231 (license license:asl2.0)))
8232
8233 (define-public python-contextlib2
8234 (package
8235 (name "python-contextlib2")
8236 (version "0.5.5")
8237 (source
8238 (origin
8239 (method url-fetch)
8240 (uri (pypi-uri "contextlib2" version))
8241 (sha256
8242 (base32
8243 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8244 (build-system python-build-system)
8245 (home-page "http://contextlib2.readthedocs.org/")
8246 (synopsis "Tools for decorators and context managers")
8247 (description "This module is primarily a backport of the Python
8248 3.2 contextlib to earlier Python versions. Like contextlib, it
8249 provides utilities for common tasks involving decorators and context
8250 managers. It also contains additional features that are not part of
8251 the standard library.")
8252 (license license:psfl)))
8253
8254 (define-public python2-contextlib2
8255 (package
8256 (name "python2-contextlib2")
8257 (version "0.5.5")
8258 (source
8259 (origin
8260 (method url-fetch)
8261 (uri (pypi-uri "contextlib2" version))
8262 (sha256
8263 (base32
8264 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8265 (build-system python-build-system)
8266 (arguments
8267 `(#:python ,python-2
8268 #:phases
8269 (modify-phases %standard-phases
8270 (replace 'check
8271 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
8272 (native-inputs
8273 `(("python2-unittest2" ,python2-unittest2)))
8274 (home-page "http://contextlib2.readthedocs.org/")
8275 (synopsis "Tools for decorators and context managers")
8276 (description "This module is primarily a backport of the Python
8277 3.2 contextlib to earlier Python versions. Like contextlib, it
8278 provides utilities for common tasks involving decorators and context
8279 managers. It also contains additional features that are not part of
8280 the standard library.")
8281 (license license:psfl)))
8282
8283 (define-public python-texttable
8284 (package
8285 (name "python-texttable")
8286 (version "0.9.1")
8287 (source
8288 (origin
8289 (method url-fetch)
8290 (uri (pypi-uri "texttable" version))
8291 (sha256
8292 (base32
8293 "0yawv64c0zbawwv6zz84whb32fnb2n9jylwjcfsrcdgh7xvl340i"))))
8294 (build-system python-build-system)
8295 (arguments '(#:tests? #f)) ; no tests
8296 (home-page "https://github.com/foutaise/texttable/")
8297 (synopsis "Python module for creating simple ASCII tables")
8298 (description "Texttable is a Python module for creating simple ASCII
8299 tables.")
8300 (license license:lgpl2.1+)))
8301
8302 (define-public python2-texttable
8303 (package-with-python2 python-texttable))
8304
8305 (define-public python-atomicwrites
8306 (package
8307 (name "python-atomicwrites")
8308 (version "1.3.0")
8309 (source (origin
8310 (method url-fetch)
8311 (uri (pypi-uri "atomicwrites" version))
8312 (sha256
8313 (base32
8314 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
8315 (build-system python-build-system)
8316 (synopsis "Atomic file writes in Python")
8317 (description "Library for atomic file writes using platform dependent tools
8318 for atomic file system operations.")
8319 (home-page "https://github.com/untitaker/python-atomicwrites")
8320 (license license:expat)))
8321
8322 (define-public python2-atomicwrites
8323 (package-with-python2 python-atomicwrites))
8324
8325 (define-public python-click-threading
8326 (package
8327 (name "python-click-threading")
8328 (version "0.4.4")
8329 (source (origin
8330 (method url-fetch)
8331 (uri (pypi-uri "click-threading" version))
8332 (sha256
8333 (base32
8334 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8335 (build-system python-build-system)
8336 (propagated-inputs
8337 `(("python-click" ,python-click)))
8338 (synopsis "Utilities for multithreading in Click")
8339 (description "This package provides utilities for multithreading in Click
8340 applications.")
8341 (home-page "https://github.com/click-contrib/click-threading")
8342 (license license:expat)))
8343
8344 (define-public python-click-log
8345 (package
8346 (name "python-click-log")
8347 (version "0.3.2")
8348 (source (origin
8349 (method url-fetch)
8350 (uri (pypi-uri "click-log" version))
8351 (sha256
8352 (base32
8353 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8354 (build-system python-build-system)
8355 (propagated-inputs
8356 `(("python-click" ,python-click)))
8357 (synopsis "Logging for click applications")
8358 (description "This package provides a Python library for logging Click
8359 applications.")
8360 (home-page "https://github.com/click-contrib/click-log")
8361 (license license:expat)))
8362
8363 (define-public python-apipkg
8364 (package
8365 (name "python-apipkg")
8366 (version "1.4")
8367 (source (origin
8368 (method url-fetch)
8369 (uri (pypi-uri "apipkg" version))
8370 (sha256
8371 (base32
8372 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8373 (build-system python-build-system)
8374 (native-inputs
8375 `(("python-pytest" ,python-pytest)))
8376 (synopsis "Namespace control and lazy-import mechanism")
8377 (description "With apipkg you can control the exported namespace of a Python
8378 package and greatly reduce the number of imports for your users. It is a small
8379 pure Python module that works on virtually all Python versions.")
8380 (home-page "https://github.com/pytest-dev/apipkg")
8381 (license license:expat)))
8382
8383 (define-public python2-apipkg
8384 (package-with-python2 python-apipkg))
8385
8386 (define-public python-execnet
8387 (package
8388 (name "python-execnet")
8389 (version "1.4.1")
8390 (source (origin
8391 (method url-fetch)
8392 (uri (pypi-uri "execnet" version))
8393 (sha256
8394 (base32
8395 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8396 (build-system python-build-system)
8397 (arguments
8398 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8399 ;; The two test failures are caused by the lack of an `ssh` executable.
8400 ;; The test suite can be run with pytest after the 'install' phase.
8401 #:tests? #f))
8402 (native-inputs
8403 `(("python-pytest" ,python-pytest)
8404 ("python-setuptools-scm" ,python-setuptools-scm)))
8405 (propagated-inputs
8406 `(("python-apipkg" ,python-apipkg)))
8407 (synopsis "Rapid multi-Python deployment")
8408 (description "Execnet provides a share-nothing model with
8409 channel-send/receive communication for distributing execution across many
8410 Python interpreters across version, platform and network barriers. It has a
8411 minimal and fast API targeting the following uses:
8412 @enumerate
8413 @item distribute tasks to (many) local or remote CPUs
8414 @item write and deploy hybrid multi-process applications
8415 @item write scripts to administer multiple environments
8416 @end enumerate")
8417 (home-page "http://codespeak.net/execnet/")
8418 (license license:expat)))
8419
8420 (define-public python2-execnet
8421 (package-with-python2 python-execnet))
8422
8423 (define-public python-icalendar
8424 (package
8425 (name "python-icalendar")
8426 (version "4.0.4")
8427 (source (origin
8428 (method url-fetch)
8429 (uri (pypi-uri "icalendar" version))
8430 (sha256
8431 (base32
8432 "16gjvqv0n05jrb9g228pdjgzd3amz2pdhvcgsn1jypszjg5m2w9l"))))
8433 (build-system python-build-system)
8434 (propagated-inputs
8435 `(("python-dateutil" ,python-dateutil)
8436 ("python-pytz" ,python-pytz)))
8437 (synopsis "Python library for parsing iCalendar files")
8438 (description "The icalendar package is a parser/generator of iCalendar
8439 files for use with Python.")
8440 (home-page "https://github.com/collective/icalendar")
8441 (license license:bsd-2)))
8442
8443 (define-public python-args
8444 (package
8445 (name "python-args")
8446 (version "0.1.0")
8447 (source (origin
8448 (method url-fetch)
8449 (uri (pypi-uri "args" version))
8450 (sha256
8451 (base32
8452 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8453 (build-system python-build-system)
8454 (home-page "https://github.com/kennethreitz/args")
8455 (synopsis "Command-line argument parser")
8456 (description
8457 "This library provides a Python module to parse command-line arguments.")
8458 (license license:bsd-3)))
8459
8460 (define-public python2-args
8461 (package-with-python2 python-args))
8462
8463 (define-public python-clint
8464 (package
8465 (name "python-clint")
8466 (version "0.5.1")
8467 (source (origin
8468 (method url-fetch)
8469 (uri (pypi-uri "clint" version))
8470 (sha256
8471 (base32
8472 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8473 (build-system python-build-system)
8474 (arguments
8475 '(#:phases
8476 (modify-phases %standard-phases
8477 (replace 'check
8478 (lambda _ (invoke "py.test" "-v"))))))
8479 (native-inputs
8480 `(("python-pytest" ,python-pytest)))
8481 (propagated-inputs
8482 `(("python-args" ,python-args)))
8483 (home-page "https://github.com/kennethreitz/clint")
8484 (synopsis "Command-line interface tools")
8485 (description
8486 "Clint is a Python module filled with a set of tools for developing
8487 command-line applications, including tools for colored and indented
8488 output, progress bar display, and pipes.")
8489 (license license:isc)))
8490
8491 (define-public python2-clint
8492 (package-with-python2 python-clint))
8493
8494 (define-public python-rply
8495 (package
8496 (name "python-rply")
8497 (version "0.7.5")
8498 (source (origin
8499 (method url-fetch)
8500 (uri (pypi-uri "rply" version))
8501 (sha256
8502 (base32
8503 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8504 (build-system python-build-system)
8505 (propagated-inputs
8506 `(("python-appdirs" ,python-appdirs)))
8507 (home-page "https://github.com/alex/rply")
8508 (synopsis "Parser generator for Python")
8509 (description
8510 "This package provides a pure Python based parser generator, that also
8511 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8512 with a new public API, and RPython support.")
8513 (license license:bsd-3)))
8514
8515 (define-public python2-rply
8516 (package-with-python2 python-rply))
8517
8518 (define-public python-hy
8519 (package
8520 (name "python-hy")
8521 (version "0.17.0")
8522 (source (origin
8523 (method url-fetch)
8524 (uri (pypi-uri "hy" version))
8525 (sha256
8526 (base32
8527 "1gdbqsirsdxj320wnp7my5awzs1kfs6m4fqmkzbd1zd47qzj0zfi"))))
8528 (build-system python-build-system)
8529 (arguments
8530 '(#:phases
8531 (modify-phases %standard-phases
8532 (add-before 'install 'set-HOME
8533 (lambda _
8534 (setenv "HOME" "/tmp")))
8535 (replace 'check
8536 (lambda _
8537 ;; Tests require write access to HOME.
8538 (setenv "HOME" "/tmp")
8539 (invoke "nosetests"))))))
8540 (native-inputs
8541 `(("python-coverage" ,python-coverage)
8542 ("python-nose" ,python-nose)))
8543 (propagated-inputs
8544 `(("python-astor" ,python-astor)
8545 ("python-clint" ,python-clint)
8546 ("python-rply" ,python-rply)
8547 ("python-fastentrypoints"
8548 ,python-fastentrypoints)
8549 ("python-funcparserlib"
8550 ,python-funcparserlib)))
8551 (home-page "http://hylang.org/")
8552 (synopsis "Lisp frontend to Python")
8553 (description
8554 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8555 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8556 Python at your fingertips, in Lisp form.")
8557 (license license:expat)))
8558
8559 (define-public python2-hy
8560 (package-with-python2 python-hy))
8561
8562 (define-public python2-functools32
8563 (package
8564 (name "python2-functools32")
8565 (version "3.2.3-2")
8566 (source
8567 (origin
8568 (method url-fetch)
8569 (uri (pypi-uri "functools32" version))
8570 (sha256
8571 (base32
8572 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8573 (build-system python-build-system)
8574 (arguments
8575 `(#:python ,python-2
8576 #:tests? #f)) ; no test target
8577 (home-page "https://github.com/MiCHiLU/python-functools32")
8578 (synopsis
8579 "Backport of the functools module from Python 3.2.3")
8580 (description
8581 "This package is a backport of the @code{functools} module from Python
8582 3.2.3 for use with older versions of Python and PyPy.")
8583 (license license:expat)))
8584
8585 (define-public python2-subprocess32
8586 (package
8587 (name "python2-subprocess32")
8588 (version "3.2.7")
8589 (source (origin
8590 (method url-fetch)
8591 (uri (pypi-uri "subprocess32" version))
8592 (sha256
8593 (base32
8594 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8595 (patches
8596 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8597 (build-system python-build-system)
8598 (arguments
8599 `(#:python ,python-2
8600 ;; The test suite fails with Python > 2.7.13:
8601 ;; import test.support
8602 ;; ImportError: No module named support
8603 #:tests? #f
8604 #:phases
8605 (modify-phases %standard-phases
8606 (add-after 'unpack 'patch-/bin/sh
8607 (lambda _
8608 (substitute* '("subprocess32.py"
8609 "test_subprocess32.py")
8610 (("/bin/sh") (which "sh")))
8611 #t)))))
8612 (home-page "https://github.com/google/python-subprocess32")
8613 (synopsis "Backport of the subprocess module from Python 3.2")
8614 (description
8615 "This is a backport of the @code{subprocess} standard library module
8616 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8617 new features. On POSIX systems it is guaranteed to be reliable when used
8618 in threaded applications. It includes timeout support from Python 3.3 but
8619 otherwise matches 3.2’s API.")
8620 (license license:psfl)))
8621
8622 (define-public python2-futures
8623 (package
8624 (name "python2-futures")
8625 (version "3.2.0")
8626 (source
8627 (origin
8628 (method url-fetch)
8629 (uri (pypi-uri "futures" version))
8630 (sha256
8631 (base32
8632 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8633 (build-system python-build-system)
8634 (arguments
8635 `(#:python ,python-2
8636 #:phases
8637 (modify-phases %standard-phases
8638 (replace 'check
8639 (lambda _
8640 (invoke "python" "test_futures.py")
8641 #t)))))
8642 (home-page "https://github.com/agronholm/pythonfutures")
8643 (synopsis
8644 "Backport of the concurrent.futures package from Python 3.2")
8645 (description
8646 "The concurrent.futures module provides a high-level interface for
8647 asynchronously executing callables. This package backports the
8648 concurrent.futures package from Python 3.2")
8649 (license license:bsd-3)))
8650
8651 (define-public python-promise
8652 (package
8653 (name "python-promise")
8654 (version "0.4.2")
8655 (source
8656 (origin
8657 (method url-fetch)
8658 (uri (pypi-uri "promise" version))
8659 (sha256
8660 (base32
8661 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8662 (build-system python-build-system)
8663 ;; Tests wants python-futures, which is a python2 only program, and
8664 ;; can't be found by python-promise at test time.
8665 (arguments `(#:tests? #f))
8666 (home-page "https://github.com/syrusakbary/promise")
8667 (synopsis "Promises/A+ implementation for Python")
8668 (description
8669 "Promises/A+ implementation for Python")
8670 (properties `((python2-variant . ,(delay python2-promise))))
8671 (license license:expat)))
8672
8673 (define-public python2-promise
8674 (let ((promise (package-with-python2
8675 (strip-python2-variant python-promise))))
8676 (package (inherit promise)
8677 (arguments (substitute-keyword-arguments (package-arguments promise)
8678 ((#:tests? _) #t)))
8679 (native-inputs
8680 `(("python2-futures" ,python2-futures)
8681 ("python2-pytest" ,python2-pytest)
8682 ,@(package-native-inputs promise))))))
8683
8684 (define-public python-progressbar33
8685 (package
8686 (name "python-progressbar33")
8687 (version "2.4")
8688 (source
8689 (origin
8690 (method url-fetch)
8691 (uri (pypi-uri "progressbar33" version))
8692 (sha256
8693 (base32
8694 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
8695 (build-system python-build-system)
8696 (home-page "http://github.com/germangh/python-progressbar")
8697 (synopsis "Text progress bar library for Python")
8698 (description
8699 "This package provides a text progress bar library for Python. This
8700 version only differs from the original @code{progressbar} package in that it
8701 uses relative package imports instead of absolute imports, which is necessary
8702 for the module to work under Python 3.3.")
8703 ;; Either or both of these licenses may be selected.
8704 (license (list license:lgpl2.1+ license:bsd-3))))
8705
8706 (define-public python-colorama
8707 (package
8708 (name "python-colorama")
8709 (version "0.3.9")
8710 (source
8711 (origin
8712 (method url-fetch)
8713 (uri (pypi-uri "colorama" version))
8714 (sha256
8715 (base32
8716 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
8717 (build-system python-build-system)
8718 (synopsis "Colored terminal text rendering for Python")
8719 (description "Colorama is a Python library for rendering colored terminal
8720 text.")
8721 (home-page "https://pypi.python.org/pypi/colorama")
8722 (license license:bsd-3)))
8723
8724 (define-public python2-colorama
8725 (package-with-python2 python-colorama))
8726
8727 (define-public python-rsa
8728 (package
8729 (name "python-rsa")
8730 (version "3.4.2")
8731 (source
8732 (origin
8733 (method url-fetch)
8734 (uri (pypi-uri "rsa" version))
8735 (sha256
8736 (base32
8737 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8738 (build-system python-build-system)
8739 (propagated-inputs
8740 `(("python-pyasn1" ,python-pyasn1)))
8741 (synopsis "Pure-Python RSA implementation")
8742 (description "Python-RSA is a pure-Python RSA implementation. It supports
8743 encryption and decryption, signing and verifying signatures, and key
8744 generation according to PKCS#1 version 1.5. It can be used as a Python
8745 library as well as on the command line.")
8746 (home-page "https://stuvel.eu/rsa")
8747 (license license:asl2.0)))
8748
8749 (define-public python2-rsa
8750 (package-with-python2 python-rsa))
8751
8752 (define-public python-pluggy
8753 (package
8754 (name "python-pluggy")
8755 (version "0.11.0")
8756 (source
8757 (origin
8758 (method url-fetch)
8759 (uri (pypi-uri "pluggy" version))
8760 (sha256
8761 (base32
8762 "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895"))))
8763 (build-system python-build-system)
8764 (native-inputs
8765 `(("python-setuptools-scm" ,python-setuptools-scm)))
8766 (synopsis "Plugin and hook calling mechanism for Python")
8767 (description "Pluggy is an extraction of the plugin manager as used by
8768 Pytest but stripped of Pytest specific details.")
8769 (home-page "https://pypi.python.org/pypi/pluggy")
8770 (license license:expat)))
8771
8772 (define-public python2-pluggy
8773 (package-with-python2 python-pluggy))
8774
8775 (define-public python-tox
8776 (package
8777 (name "python-tox")
8778 (version "2.8.1")
8779 (source
8780 (origin
8781 (method url-fetch)
8782 (uri (pypi-uri "tox" version))
8783 (sha256
8784 (base32
8785 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8786 (build-system python-build-system)
8787 (arguments
8788 ;; FIXME: Tests require pytest-timeout, which itself requires
8789 ;; pytest>=2.8.0 for installation.
8790 '(#:tests? #f))
8791 (propagated-inputs
8792 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8793 ("python-py" ,python-py)
8794 ("python-virtualenv" ,python-virtualenv)))
8795 (native-inputs
8796 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8797 ("python-pytest" ,python-pytest) ; >= 2.3.5
8798 ("python-setuptools-scm" ,python-setuptools-scm)))
8799 (home-page "http://tox.testrun.org/")
8800 (synopsis "Virtualenv-based automation of test activities")
8801 (description "Tox is a generic virtualenv management and test command line
8802 tool. It can be used to check that a package installs correctly with
8803 different Python versions and interpreters, or run tests in each type of
8804 supported environment, or act as a frontend to continuous integration
8805 servers.")
8806 (license license:expat)))
8807
8808 (define-public python2-tox
8809 (package-with-python2 python-tox))
8810
8811 (define-public python-jmespath
8812 (package
8813 (name "python-jmespath")
8814 (version "0.9.4")
8815 (source
8816 (origin
8817 (method url-fetch)
8818 (uri (pypi-uri "jmespath" version))
8819 (sha256
8820 (base32
8821 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
8822 (build-system python-build-system)
8823 (native-inputs
8824 `(("python-nose" ,python-nose)))
8825 (synopsis "JSON Matching Expressions")
8826 (description "JMESPath (pronounced “james path”) is a Python library that
8827 allows one to declaratively specify how to extract elements from a JSON
8828 document.")
8829 (home-page "https://github.com/jmespath/jmespath.py")
8830 (license license:expat)))
8831
8832 (define-public python2-jmespath
8833 (package-with-python2 python-jmespath))
8834
8835 (define-public python-botocore
8836 (package
8837 (name "python-botocore")
8838 (version "1.12.149")
8839 (source
8840 (origin
8841 (method url-fetch)
8842 (uri (pypi-uri "botocore" version))
8843 (sha256
8844 (base32
8845 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
8846 (build-system python-build-system)
8847 (arguments
8848 ;; FIXME: Many tests are failing.
8849 '(#:tests? #f))
8850 (propagated-inputs
8851 `(("python-dateutil" ,python-dateutil)
8852 ("python-docutils" ,python-docutils)
8853 ("python-jmespath" ,python-jmespath)))
8854 (native-inputs
8855 `(("python-mock" ,python-mock)
8856 ("python-nose" ,python-nose)
8857 ("behave" ,behave)
8858 ("python-tox" ,python-tox)
8859 ("python-urllib3" ,python-urllib3)
8860 ("python-wheel" ,python-wheel)))
8861 (home-page "https://github.com/boto/botocore")
8862 (synopsis "Low-level interface to AWS")
8863 (description "Botocore is a Python library that provides a low-level
8864 interface to the Amazon Web Services (AWS) API.")
8865 (license license:asl2.0)))
8866
8867 (define-public python2-botocore
8868 (package-with-python2 python-botocore))
8869
8870 (define-public python-xdo
8871 (package
8872 (name "python-xdo")
8873 (version "0.3")
8874 (source (origin
8875 (method url-fetch)
8876 (uri (string-append
8877 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8878 "python-xdo_" version ".orig.tar.gz"))
8879 (sha256
8880 (base32
8881 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8882 (build-system python-build-system)
8883 (arguments
8884 '(#:phases
8885 (modify-phases %standard-phases
8886 (add-before 'install 'patch-libxdo-path
8887 ;; Hardcode the path of dynamically loaded libxdo library.
8888 (lambda* (#:key inputs #:allow-other-keys)
8889 (let ((libxdo (string-append
8890 (assoc-ref inputs "xdotool")
8891 "/lib/libxdo.so")))
8892 (substitute* "xdo/_xdo.py"
8893 (("find_library\\(\"xdo\"\\)")
8894 (simple-format #f "\"~a\"" libxdo)))
8895 #t))))
8896 #:tests? #f)) ; no tests provided
8897 (propagated-inputs
8898 `(("python-six" ,python-six)))
8899 (inputs
8900 `(("xdotool" ,xdotool)
8901 ("libX11" ,libx11)))
8902 (home-page "https://tracker.debian.org/pkg/python-xdo")
8903 (synopsis "Python library for simulating X11 keyboard/mouse input")
8904 (description "Provides bindings to libxdo for manipulating X11 via simulated
8905 input. (Note that this is mostly a legacy library; you may wish to look at
8906 python-xdo for newer bindings.)")
8907 (license license:bsd-3)))
8908
8909 (define-public python2-xdo
8910 (package-with-python2 python-xdo))
8911
8912 (define-public python-mako
8913 (package
8914 (name "python-mako")
8915 (version "1.1.0")
8916 (source
8917 (origin
8918 (method url-fetch)
8919 (uri (pypi-uri "Mako" version))
8920 (sha256
8921 (base32
8922 "0jqa3qfpykyn4fmkn0kh6043sfls7br8i2bsdbccazcvk9cijsd3"))))
8923 (build-system python-build-system)
8924 (arguments
8925 `(#:phases (modify-phases %standard-phases
8926 (replace 'check
8927 (lambda _
8928 (invoke "pytest" "-vv"))))))
8929 (propagated-inputs
8930 `(("python-markupsafe" ,python-markupsafe)))
8931 (native-inputs
8932 `(("python-mock" ,python-mock)
8933 ("python-pytest" ,python-pytest)))
8934 (home-page "https://www.makotemplates.org/")
8935 (synopsis "Templating language for Python")
8936 (description "Mako is a templating language for Python that compiles
8937 templates into Python modules.")
8938 (license license:expat)))
8939
8940 (define-public python2-mako
8941 (package-with-python2 python-mako))
8942
8943 (define-public python-waitress
8944 (package
8945 (name "python-waitress")
8946 (version "1.1.0")
8947 (source
8948 (origin
8949 (method url-fetch)
8950 (uri (pypi-uri "waitress" version))
8951 (patches (search-patches "python-waitress-fix-tests.patch"))
8952 (sha256
8953 (base32
8954 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
8955 (build-system python-build-system)
8956 (home-page "https://github.com/Pylons/waitress")
8957 (synopsis "Waitress WSGI server")
8958 (description "Waitress is meant to be a production-quality pure-Python WSGI
8959 server with very acceptable performance.")
8960 (license license:zpl2.1)))
8961
8962 (define-public python2-waitress
8963 (package-with-python2 python-waitress))
8964
8965 (define-public python-whichcraft
8966 (package
8967 (name "python-whichcraft")
8968 (version "0.6.1")
8969 (source
8970 (origin
8971 (method url-fetch)
8972 (uri (pypi-uri "whichcraft" version))
8973 (sha256
8974 (base32
8975 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
8976 (build-system python-build-system)
8977 (native-inputs
8978 `(("python-pytest" ,python-pytest)))
8979 (home-page "https://github.com/pydanny/whichcraft")
8980 (synopsis "Cross-platform cross-python shutil.which functionality")
8981 (description
8982 "This package provides a shim of the shutil.which function that's
8983 designed to work across multiple versions of Python.")
8984 (license license:bsd-3)))
8985
8986 (define-public python-cookiecutter
8987 (package
8988 (name "python-cookiecutter")
8989 (version "1.6.0")
8990 (source
8991 (origin
8992 (method url-fetch)
8993 (uri (pypi-uri "cookiecutter" version))
8994 (sha256
8995 (base32
8996 "0glsvaz8igi2wy1hsnhm9fkn6560vdvdixzvkq6dn20z3hpaa5hk"))))
8997 (build-system python-build-system)
8998 (native-inputs
8999 `(("python-freezegun" ,python-freezegun)
9000 ("python-pytest" ,python-pytest)
9001 ("python-pytest-catchlog" ,python-pytest-catchlog)
9002 ("python-pytest-cov" ,python-pytest-cov)
9003 ("python-pytest-mock" ,python-pytest-mock)))
9004 (propagated-inputs
9005 `(("python-binaryornot" ,python-binaryornot)
9006 ("python-click" ,python-click)
9007 ("python-future" ,python-future)
9008 ("python-jinja2" ,python-jinja2)
9009 ("python-jinja2-time" ,python-jinja2-time)
9010 ("python-poyo" ,python-poyo)
9011 ("python-requests" ,python-requests)
9012 ("python-whichcraft" ,python-whichcraft)))
9013 (home-page "https://github.com/audreyr/cookiecutter")
9014 (synopsis
9015 "Command-line utility that creates projects from project templates")
9016 (description
9017 "This package provides a command-line utility that creates projects from
9018 project templates, e.g. creating a Python package project from a Python package
9019 project template.")
9020 (license license:bsd-3)))
9021
9022 (define-public python-pyquery
9023 (package
9024 (name "python-pyquery")
9025 (version "1.2.17")
9026 (source
9027 (origin
9028 (method url-fetch)
9029 (uri (pypi-uri "pyquery" version))
9030 (sha256
9031 (base32
9032 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9033 (build-system python-build-system)
9034 (native-inputs
9035 `(("python-webob" ,python-webob)
9036 ("python-webtest" ,python-webtest)))
9037 (propagated-inputs
9038 `(("python-lxml" ,python-lxml)
9039 ("python-cssselect" ,python-cssselect)))
9040 (home-page "https://github.com/gawel/pyquery")
9041 (synopsis "Make jQuery-like queries on xml documents")
9042 (description "pyquery allows you to make jQuery queries on xml documents.
9043 The API is as much as possible the similar to jQuery. pyquery uses lxml for
9044 fast xml and html manipulation.")
9045 (license license:bsd-3)))
9046
9047 (define-public python-anyjson
9048 (package
9049 (name "python-anyjson")
9050 (version "0.3.3")
9051 (source
9052 (origin
9053 (method url-fetch)
9054 (uri (pypi-uri "anyjson" version))
9055 (sha256
9056 (base32
9057 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9058 (build-system python-build-system)
9059 (arguments
9060 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9061 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9062 ;; whatever) so this transformation needs to be done before the tests
9063 ;; can be run. Maybe we could add a build step to transform beforehand
9064 ;; but it could be annoying/difficult.
9065 ;; We can enable tests for the Python 2 version, though, and do below.
9066 #:tests? #f))
9067 (home-page "https://bitbucket.org/runeh/anyjson/")
9068 (synopsis
9069 "Wraps best available JSON implementation in a common interface")
9070 (description
9071 "Anyjson loads whichever is the fastest JSON module installed
9072 and provides a uniform API regardless of which JSON implementation is used.")
9073 (license license:bsd-3)
9074 (properties `((python2-variant . ,(delay python2-anyjson))))))
9075
9076 (define-public python2-anyjson
9077 (let ((anyjson (package-with-python2
9078 (strip-python2-variant python-anyjson))))
9079 (package
9080 (inherit anyjson)
9081 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9082 #:tests? #t
9083 ,@(package-arguments anyjson)))
9084 (native-inputs `(("python2-nose" ,python2-nose))))))
9085
9086 (define-public python-amqp
9087 (package
9088 (name "python-amqp")
9089 (version "2.3.2")
9090 (source
9091 (origin
9092 (method url-fetch)
9093 (uri (pypi-uri "amqp" version))
9094 (sha256
9095 (base32
9096 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
9097 (build-system python-build-system)
9098 (native-inputs
9099 `(("python-case" ,python-case)
9100 ("python-pytest-sugar" ,python-pytest-sugar)
9101 ("python-mock" ,python-mock)))
9102 (propagated-inputs
9103 `(("python-vine" ,python-vine)))
9104 (home-page "https://github.com/celery/py-amqp")
9105 (synopsis
9106 "Low-level AMQP client for Python (fork of amqplib)")
9107 (description
9108 "This is a fork of amqplib which was originally written by Barry Pederson.
9109 It is maintained by the Celery project, and used by kombu as a pure python
9110 alternative when librabbitmq is not available.")
9111 (license license:lgpl2.1+)
9112 (properties `((python2-variant . ,(delay python2-amqp))))))
9113
9114 (define-public python2-amqp
9115 (let ((amqp (package-with-python2
9116 (strip-python2-variant python-amqp))))
9117 (package
9118 (inherit amqp)
9119 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9120 ;; unmaintained. Weirdly, does not do this on the python 3
9121 ;; version?
9122 #:tests? #f
9123 ,@(package-arguments amqp))))))
9124
9125 (define-public python-txamqp
9126 (package
9127 (name "python-txamqp")
9128 (version "0.8.2")
9129 (source
9130 (origin
9131 (method url-fetch)
9132 (uri (pypi-uri "txAMQP" version))
9133 (sha256
9134 (base32
9135 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
9136 (build-system python-build-system)
9137 (propagated-inputs
9138 `(("python-six" ,python-six)
9139 ("python-twisted" ,python-twisted)))
9140 (home-page "https://github.com/txamqp/txamqp")
9141 (synopsis "Communicate with AMQP peers and brokers using Twisted")
9142 (description
9143 "This package provides a Python library for communicating with AMQP peers
9144 and brokers using the asynchronous networking framework Twisted. It contains
9145 all the necessary code to connect, send and receive messages to/from an
9146 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
9147 also includes support for using Thrift RPC over AMQP in Twisted
9148 applications.")
9149 (license license:asl2.0)))
9150
9151 (define-public python2-txamqp
9152 (package-with-python2 python-txamqp))
9153
9154 (define-public python-kombu
9155 (package
9156 (name "python-kombu")
9157 (version "4.2.2")
9158 (source
9159 (origin
9160 (method url-fetch)
9161 (uri (pypi-uri "kombu" version))
9162 (sha256
9163 (base32
9164 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
9165 (build-system python-build-system)
9166 (native-inputs
9167 `(("python-mock" ,python-mock)
9168 ("python-case" ,python-case)
9169 ("python-pyro4" ,python-pyro4)
9170 ("python-pytest-sugar" ,python-pytest-sugar)
9171 ("python-pytz" ,python-pytz)))
9172 (propagated-inputs
9173 `(("python-anyjson" ,python-anyjson)
9174 ("python-amqp" ,python-amqp)
9175 ("python-redis" ,python-redis)))
9176 (home-page "https://kombu.readthedocs.io")
9177 (synopsis "Message passing library for Python")
9178 (description "The aim of Kombu is to make messaging in Python as easy as
9179 possible by providing an idiomatic high-level interface for the AMQ protocol,
9180 and also provide proven and tested solutions to common messaging problems.
9181 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9182 message orientation, queuing, routing, reliability and security, for which the
9183 RabbitMQ messaging server is the most popular implementation.")
9184 (license license:bsd-3)
9185 (properties `((python2-variant . ,(delay python2-kombu))))))
9186
9187 (define-public python2-kombu
9188 (let ((kombu (package-with-python2
9189 (strip-python2-variant python-kombu))))
9190 (package
9191 (inherit kombu)
9192 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9193 ;; It works fine on the python3 variant.
9194 #:tests? #f
9195 ,@(package-arguments kombu)))
9196 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9197 ,@(package-native-inputs kombu))))))
9198
9199 (define-public python-billiard
9200 (package
9201 (name "python-billiard")
9202 (version "3.5.0.5")
9203 (source
9204 (origin
9205 (method url-fetch)
9206 (uri (pypi-uri "billiard" version))
9207 (sha256
9208 (base32
9209 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9210 (build-system python-build-system)
9211 (native-inputs
9212 `(("python-case" ,python-case)
9213 ("python-pytest" ,python-pytest)))
9214 (home-page "https://github.com/celery/billiard")
9215 (synopsis
9216 "Python multiprocessing fork with improvements and bugfixes")
9217 (description
9218 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9219 multiprocessing package itself is a renamed and updated version of R Oudkerk's
9220 pyprocessing package. This standalone variant is intended to be compatible with
9221 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9222 (license license:bsd-3)
9223 (properties `((python2-variant . ,(delay python2-billiard))))))
9224
9225 (define-public python2-billiard
9226 (let ((billiard (package-with-python2
9227 (strip-python2-variant python-billiard))))
9228 (package
9229 (inherit billiard)
9230 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9231 ("python2-mock" ,python2-mock)
9232 ,@(package-native-inputs billiard))))))
9233
9234 (define-public python-celery
9235 (package
9236 (name "python-celery")
9237 (version "4.2.1")
9238 (source
9239 (origin
9240 (method url-fetch)
9241 (uri (pypi-uri "celery" version))
9242 (sha256
9243 (base32
9244 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9245 (build-system python-build-system)
9246 (arguments
9247 '(;; TODO The tests fail with Python 3.7
9248 ;; https://github.com/celery/celery/issues/4849
9249 #:tests? #f
9250 #:phases
9251 (modify-phases %standard-phases
9252 (add-after 'unpack 'patch-requirements
9253 (lambda _
9254 (substitute* "requirements/test.txt"
9255 (("pytest>=3\\.0,<3\\.3")
9256 "pytest>=3.0"))
9257 #t)))))
9258 (native-inputs
9259 `(("python-case" ,python-case)
9260 ("python-pytest" ,python-pytest)))
9261 (propagated-inputs
9262 `(("python-pytz" ,python-pytz)
9263 ("python-billiard" ,python-billiard)
9264 ("python-kombu" ,python-kombu)))
9265 (home-page "https://celeryproject.org")
9266 (synopsis "Distributed Task Queue")
9267 (description "Celery is an asynchronous task queue/job queue based on
9268 distributed message passing. It is focused on real-time operation, but
9269 supports scheduling as well. The execution units, called tasks, are executed
9270 concurrently on a single or more worker servers using multiprocessing,
9271 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9272 synchronously (wait until ready).")
9273 (license license:bsd-3)
9274 (properties `((python2-variant . ,(delay python2-celery))))))
9275
9276 (define-public python2-celery
9277 (let ((celery (package-with-python2
9278 (strip-python2-variant python-celery))))
9279 (package
9280 (inherit celery)
9281 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9282 ("python2-mock" ,python2-mock)
9283 ,@(package-native-inputs celery))))))
9284
9285 (define-public python-translitcodec
9286 (package
9287 (name "python-translitcodec")
9288 (version "0.4.0")
9289 (source
9290 (origin
9291 (method url-fetch)
9292 (uri (pypi-uri "translitcodec" version))
9293 (sha256
9294 (base32
9295 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9296 (build-system python-build-system)
9297 (arguments
9298 `(#:tests? #f)) ; no tests provided
9299 (home-page
9300 "https://github.com/claudep/translitcodec")
9301 (synopsis
9302 "Unicode to 8-bit charset transliteration codec")
9303 (description
9304 "This package contains codecs for transliterating ISO 10646 texts into
9305 best-effort representations using smaller coded character sets (ASCII,
9306 ISO 8859, etc.).")
9307 (license license:expat)))
9308
9309 (define-public python2-translitcodec
9310 (package-with-python2 python-translitcodec))
9311
9312 (define-public python-editor
9313 (package
9314 (name "python-editor")
9315 (version "0.5")
9316 (source
9317 (origin
9318 (method url-fetch)
9319 (uri (pypi-uri "python-editor" version))
9320 (sha256
9321 (base32
9322 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9323 (build-system python-build-system)
9324 (home-page
9325 "https://github.com/fmoo/python-editor")
9326 (synopsis
9327 "Programmatically open an editor, capture the result")
9328 (description
9329 "python-editor is a library that provides the editor module for
9330 programmatically interfacing with your system's $EDITOR.")
9331 (license license:asl2.0)))
9332
9333 (define-public python2-editor
9334 (package-with-python2 python-editor))
9335
9336 (define-public python-vobject
9337 (package
9338 (name "python-vobject")
9339 (version "0.9.5")
9340 (source (origin
9341 (method url-fetch)
9342 (uri (pypi-uri "vobject" version))
9343 (sha256
9344 (base32
9345 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9346 (build-system python-build-system)
9347 (arguments
9348 '(;; The test suite relies on some non-portable Windows interfaces.
9349 #:tests? #f))
9350 (propagated-inputs
9351 `(("python-dateutil" ,python-dateutil)
9352 ("python-pyicu" ,python-pyicu)))
9353 (synopsis "Parse and generate vCard and vCalendar files")
9354 (description "Vobject is intended to be a full featured Python package for
9355 parsing and generating vCard and vCalendar files. Currently, iCalendar files
9356 are supported and well tested. vCard 3.0 files are supported, and all data
9357 should be imported, but only a few components are understood in a sophisticated
9358 way.")
9359 (home-page "http://eventable.github.io/vobject/")
9360 (license license:asl2.0)))
9361
9362 (define-public python2-vobject
9363 (package-with-python2 python-vobject))
9364
9365 (define-public python-munkres
9366 (package
9367 (name "python-munkres")
9368 (version "1.0.8")
9369 (source (origin
9370 (method url-fetch)
9371 (uri (pypi-uri "munkres" version))
9372 (sha256
9373 (base32
9374 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9375 (build-system python-build-system)
9376 (arguments
9377 '(#:tests? #f)) ; no test suite
9378 (home-page "http://software.clapper.org/munkres/")
9379 (synopsis "Implementation of the Munkres algorithm")
9380 (description "The Munkres module provides an implementation of the Munkres
9381 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9382 useful for solving the Assignment Problem.")
9383 (license license:bsd-3)))
9384
9385 (define-public python2-munkres
9386 (package-with-python2 python-munkres))
9387
9388 (define-public python-whoosh
9389 (package
9390 (name "python-whoosh")
9391 (version "2.7.4")
9392 (source
9393 (origin
9394 (method url-fetch)
9395 (uri (pypi-uri "Whoosh" version))
9396 (sha256
9397 (base32
9398 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9399 (build-system python-build-system)
9400 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
9401 (native-inputs
9402 `(("python-pytest" ,python-pytest)))
9403 (home-page "https://bitbucket.org/mchaput/whoosh")
9404 (synopsis "Full text indexing, search, and spell checking library")
9405 (description
9406 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9407 checking library.")
9408 (license license:bsd-2)))
9409
9410 (define-public python2-whoosh
9411 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9412 (package (inherit whoosh)
9413 (propagated-inputs
9414 `(("python2-backport-ssl-match-hostname"
9415 ,python2-backport-ssl-match-hostname)
9416 ,@(package-propagated-inputs whoosh))))))
9417
9418 (define-public python-pathlib
9419 (package
9420 (name "python-pathlib")
9421 (version "1.0.1")
9422 (source (origin
9423 (method url-fetch)
9424 (uri (pypi-uri "pathlib" version))
9425 (sha256
9426 (base32
9427 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9428 (build-system python-build-system)
9429 ;; The tests depend on the internal "test" module, which does not provide
9430 ;; a stable interface.
9431 (arguments `(#:tests? #f))
9432 (home-page "https://pathlib.readthedocs.org/")
9433 (synopsis "Object-oriented file system paths")
9434 (description "Pathlib offers a set of classes to handle file system paths.
9435 It offers the following advantages over using string objects:
9436
9437 @enumerate
9438 @item No more cumbersome use of os and os.path functions. Everything can
9439 be done easily through operators, attribute accesses, and method calls.
9440 @item Embodies the semantics of different path types. For example,
9441 comparing Windows paths ignores casing.
9442 @item Well-defined semantics, eliminating any inconsistencies or
9443 ambiguities (forward vs. backward slashes, etc.).
9444 @end enumerate
9445
9446 Note: In Python 3.4, pathlib is now part of the standard library. For other
9447 Python versions please consider python-pathlib2 instead, which tracks the
9448 standard library module. This module (python-pathlib) isn't maintained
9449 anymore.")
9450 (license license:expat)))
9451
9452 (define-public python2-pathlib
9453 (package-with-python2 python-pathlib))
9454
9455 (define-public python2-pathlib2
9456 (package
9457 (name "python2-pathlib2")
9458 (version "2.3.3")
9459 (source (origin
9460 (method url-fetch)
9461 (uri (pypi-uri "pathlib2" version))
9462 (sha256
9463 (base32
9464 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
9465 (build-system python-build-system)
9466 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9467 ;; version is 3.4 which already includes this package as part of the
9468 ;; standard library.
9469 (arguments
9470 `(#:python ,python-2))
9471 (propagated-inputs
9472 `(("python2-scandir" ,python2-scandir)
9473 ("python2-six" ,python2-six)))
9474 (home-page "https://pypi.python.org/pypi/pathlib2/")
9475 (synopsis "Object-oriented file system paths - backport of standard
9476 pathlib module")
9477 (description "The goal of pathlib2 is to provide a backport of standard
9478 pathlib module which tracks the standard library module, so all the newest
9479 features of the standard pathlib can be used also on older Python versions.
9480
9481 Pathlib offers a set of classes to handle file system paths. It offers the
9482 following advantages over using string objects:
9483
9484 @enumerate
9485 @item No more cumbersome use of os and os.path functions. Everything can
9486 be done easily through operators, attribute accesses, and method calls.
9487 @item Embodies the semantics of different path types. For example,
9488 comparing Windows paths ignores casing.
9489 @item Well-defined semantics, eliminating any inconsistencies or
9490 ambiguities (forward vs. backward slashes, etc.).
9491 @end enumerate")
9492 (license license:expat)))
9493
9494 (define-public python2-pathlib2-bootstrap
9495 (hidden-package
9496 (package
9497 (inherit python2-pathlib2)
9498 (name "python2-pathlib2-bootstrap")
9499 (propagated-inputs
9500 `(("python2-scandir" ,python2-scandir)
9501 ("python2-six" ,python2-six-bootstrap))))))
9502
9503 (define-public python-jellyfish
9504 (package
9505 (name "python-jellyfish")
9506 (version "0.5.6")
9507 (source (origin
9508 (method url-fetch)
9509 (uri (pypi-uri "jellyfish" version))
9510 (sha256
9511 (base32
9512 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9513 (build-system python-build-system)
9514 (native-inputs
9515 `(("python-pytest" ,python-pytest)))
9516 (home-page "https://github.com/jamesturk/jellyfish")
9517 (synopsis "Approximate and phonetic matching of strings")
9518 (description "Jellyfish uses a variety of string comparison and phonetic
9519 encoding algorithms to do fuzzy string matching.")
9520 (license license:bsd-2)
9521 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9522
9523 (define-public python2-jellyfish
9524 (let ((jellyfish (package-with-python2
9525 (strip-python2-variant python-jellyfish))))
9526 (package (inherit jellyfish)
9527 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9528 ,@(package-native-inputs jellyfish))))))
9529
9530 (define-public python2-unicodecsv
9531 (package
9532 (name "python2-unicodecsv")
9533 (version "0.14.1")
9534 (source (origin
9535 (method git-fetch)
9536 ;; The test suite is not included in the PyPi release.
9537 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9538 (uri (git-reference
9539 (url "https://github.com/jdunck/python-unicodecsv")
9540 (commit version)))
9541 (file-name (git-file-name name version))
9542 (sha256
9543 (base32
9544 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
9545 (build-system python-build-system)
9546 (arguments
9547 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9548 #:python ,python-2))
9549 (native-inputs
9550 `(("python2-unittest2" ,python2-unittest2)))
9551 (home-page "https://github.com/jdunck/python-unicodecsv")
9552 (synopsis "Unicode CSV module for Python 2")
9553 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9554 module, adding support for Unicode strings.")
9555 (license license:bsd-2)))
9556
9557 (define-public python-rarfile
9558 (package
9559 (name "python-rarfile")
9560 (version "2.8")
9561 (source (origin
9562 (method url-fetch)
9563 (uri (pypi-uri "rarfile" version))
9564 (sha256
9565 (base32
9566 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9567 (build-system python-build-system)
9568 (arguments
9569 '(#:phases
9570 (modify-phases %standard-phases
9571 (replace 'check
9572 ;; Many tests fail, but the installation proceeds.
9573 (lambda _ (invoke "make" "-C" "test" "test"))))))
9574 (native-inputs
9575 `(("which" ,which))) ; required for tests
9576 (propagated-inputs
9577 `(("libarchive" ,libarchive)))
9578 (home-page "https://github.com/markokr/rarfile")
9579 (synopsis "RAR archive reader for Python")
9580 (description "This is Python module for RAR archive reading. The interface
9581 is made as zipfile like as possible.")
9582 (license license:isc)))
9583
9584 (define-public python2-rarfile
9585 (package-with-python2 python-rarfile))
9586
9587 (define-public python-magic
9588 (package
9589 (name "python-magic")
9590 (version "0.4.15")
9591 (source
9592 (origin
9593 (method url-fetch)
9594 (uri (pypi-uri "python-magic" version))
9595 (sha256
9596 (base32
9597 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9598 (file-name (string-append name "-" version "-checkout"))))
9599 (build-system python-build-system)
9600 (arguments
9601 ;; The tests are unreliable, so don't run them. The tests fail
9602 ;; under Python3 because they were written for Python2 and
9603 ;; contain import statements that do not work in Python3. One of
9604 ;; the tests fails under Python2 because its assertions are
9605 ;; overly stringent; it relies on comparing output strings which
9606 ;; are brittle and can change depending on the version of
9607 ;; libmagic being used and the system on which the test is
9608 ;; running. In my case, under GuixSD 0.10.0, only one test
9609 ;; failed, and it seems to have failed only because the version
9610 ;; of libmagic that is packaged in Guix outputs a slightly
9611 ;; different (but not wrong) string than the one that the test
9612 ;; expected.
9613 '(#:tests? #f
9614 #:phases (modify-phases %standard-phases
9615 ;; Replace a specific method call with a hard-coded
9616 ;; path to the necessary libmagic.so file in the
9617 ;; store. If we don't do this, then the method call
9618 ;; will fail to find the libmagic.so file, which in
9619 ;; turn will cause any application using
9620 ;; python-magic to fail.
9621 (add-before 'build 'hard-code-path-to-libmagic
9622 (lambda* (#:key inputs #:allow-other-keys)
9623 (let ((file (assoc-ref inputs "file")))
9624 (substitute* "magic.py"
9625 (("ctypes.util.find_library\\('magic'\\)")
9626 (string-append "'" file "/lib/libmagic.so'")))
9627 #t)))
9628 (add-before 'install 'disable-egg-compression
9629 (lambda _
9630 (let ((port (open-file "setup.cfg" "a")))
9631 (display "\n[easy_install]\nzip_ok = 0\n"
9632 port)
9633 (close-port port)
9634 #t))))))
9635 (inputs
9636 ;; python-magic needs to be able to find libmagic.so.
9637 `(("file" ,file)))
9638 (home-page
9639 "https://github.com/ahupp/python-magic")
9640 (synopsis
9641 "File type identification using libmagic")
9642 (description
9643 "This module uses ctypes to access the libmagic file type
9644 identification library. It makes use of the local magic database and
9645 supports both textual and MIME-type output. Note that this module and
9646 the python-file module both provide a \"magic.py\" file; these two
9647 modules, which are different and were developed separately, both serve
9648 the same purpose: to provide Python bindings for libmagic.")
9649 (license license:expat)))
9650
9651 (define-public python2-magic
9652 (package-with-python2 python-magic))
9653
9654 (define-public python2-s3cmd
9655 (package
9656 (name "python2-s3cmd")
9657 (version "1.6.1")
9658 (source
9659 (origin
9660 (method url-fetch)
9661 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9662 "s3cmd-" version ".tar.gz"))
9663 (sha256
9664 (base32
9665 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9666 (build-system python-build-system)
9667 (arguments
9668 ;; s3cmd is written for python2 only and contains no tests.
9669 `(#:python ,python-2
9670 #:tests? #f))
9671 (propagated-inputs
9672 `(("python2-dateutil" ,python2-dateutil)
9673 ;; The python-file package also provides a magic.py module.
9674 ;; This is an unfortunate state of affairs; however, s3cmd
9675 ;; fails to install if it cannot find specifically the
9676 ;; python-magic package. Thus we include it, instead of using
9677 ;; python-file. Ironically, s3cmd sometimes works better
9678 ;; without libmagic bindings at all:
9679 ;; https://github.com/s3tools/s3cmd/issues/198
9680 ("python2-magic" ,python2-magic)))
9681 (home-page "http://s3tools.org/s3cmd")
9682 (synopsis "Command line tool for S3-compatible storage services")
9683 (description
9684 "S3cmd is a command line tool for uploading, retrieving and managing data
9685 in storage services that are compatible with the Amazon Simple Storage
9686 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9687 GnuPG encryption, and more. It also supports management of Amazon's
9688 CloudFront content delivery network.")
9689 (license license:gpl2+)))
9690
9691 (define-public python-pkgconfig
9692 (package
9693 (name "python-pkgconfig")
9694 (version "1.3.1")
9695 (source
9696 (origin
9697 (method url-fetch)
9698 (uri (pypi-uri "pkgconfig" version))
9699 (sha256
9700 (base32
9701 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9702 (build-system python-build-system)
9703 (native-inputs
9704 `(("python-nose" ,python-nose)))
9705 (inputs
9706 `(("pkg-config" ,pkg-config)))
9707 (arguments
9708 `(#:phases
9709 (modify-phases %standard-phases
9710 (add-before 'build 'patch
9711 ;; Hard-code the path to pkg-config.
9712 (lambda _
9713 (substitute* "pkgconfig/pkgconfig.py"
9714 (("cmd = 'pkg-config")
9715 (string-append "cmd = '" (which "pkg-config"))))
9716 #t))
9717 (replace 'check
9718 (lambda _
9719 (invoke "nosetests" "test.py"))))))
9720 (home-page "https://github.com/matze/pkgconfig")
9721 (synopsis "Python interface for pkg-config")
9722 (description "This module provides a Python interface to pkg-config. It
9723 can be used to find all pkg-config packages, check if a package exists,
9724 check if a package meets certain version requirements, query CFLAGS and
9725 LDFLAGS and parse the output to build extensions with setup.py.")
9726 (license license:expat)))
9727
9728 (define-public python2-pkgconfig
9729 (package-with-python2 python-pkgconfig))
9730
9731 (define-public python-bz2file
9732 (package
9733 (name "python-bz2file")
9734 (version "0.98")
9735 (source
9736 (origin
9737 (method url-fetch)
9738 (uri (pypi-uri "bz2file" version))
9739 (sha256
9740 (base32
9741 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9742 (build-system python-build-system)
9743 (arguments
9744 `(#:tests? #f)) ; Tests use deprecated python modules.
9745 (home-page "https://github.com/nvawda/bz2file")
9746 (synopsis "Read and write bzip2-compressed files")
9747 (description
9748 "Bz2file is a Python library for reading and writing bzip2-compressed
9749 files. It contains a drop-in replacement for the I/O interface in the
9750 standard library's @code{bz2} module, including features from the latest
9751 development version of CPython that are not available in older releases.")
9752 (license license:asl2.0)))
9753
9754 (define-public python2-bz2file
9755 (package-with-python2 python-bz2file))
9756
9757 (define-public python-future
9758 (package
9759 (name "python-future")
9760 (version "0.17.1")
9761 (source
9762 (origin
9763 (method url-fetch)
9764 (uri (pypi-uri "future" version))
9765 (sha256
9766 (base32
9767 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
9768 (build-system python-build-system)
9769 ;; Many tests connect to the network or are otherwise flawed.
9770 ;; https://github.com/PythonCharmers/python-future/issues/210
9771 (arguments
9772 `(#:tests? #f))
9773 (home-page "http://python-future.org")
9774 (synopsis "Single-source support for Python 3 and 2")
9775 (description
9776 "@code{python-future} is the missing compatibility layer between Python 2 and
9777 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9778 to support both Python 2 and Python 3 with minimal overhead.")
9779 (license license:expat)))
9780
9781 (define-public python2-future
9782 (package-with-python2 python-future))
9783
9784 (define-public python-cysignals
9785 (package
9786 (name "python-cysignals")
9787 (version "1.9.0")
9788 (source
9789 (origin
9790 (method url-fetch)
9791 (uri (pypi-uri "cysignals" version))
9792 (sha256
9793 (base32
9794 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
9795 (build-system python-build-system)
9796 (native-inputs
9797 `(("python-cython" ,python-cython)
9798 ("python-sphinx" ,python-sphinx)))
9799 (inputs
9800 `(("pari-gp" ,pari-gp)))
9801 (arguments
9802 `(#:modules ((guix build python-build-system)
9803 ((guix build gnu-build-system) #:prefix gnu:)
9804 (guix build utils))
9805 ;; FIXME: Tests are executed after installation and currently fail
9806 ;; when not installing into standard locations; the author is working
9807 ;; on a fix.
9808 #:tests? #f
9809 #:phases
9810 (modify-phases %standard-phases
9811 (add-before
9812 'build 'configure
9813 (assoc-ref gnu:%standard-phases 'configure)))))
9814 (home-page
9815 "https://github.com/sagemath/cysignals")
9816 (synopsis
9817 "Handling of interrupts and signals for Cython")
9818 (description
9819 "The cysignals package provides mechanisms to handle interrupts (and
9820 other signals and errors) in Cython code, using two related approaches,
9821 for mixed Cython/Python code or external C libraries and pure Cython code,
9822 respectively.")
9823 (license license:lgpl3+)))
9824
9825 (define-public python2-cysignals
9826 (package-with-python2 python-cysignals))
9827
9828 (define-public python2-shedskin
9829 (package
9830 (name "python2-shedskin")
9831 (version "0.9.4")
9832 (source
9833 (origin
9834 (method url-fetch)
9835 (uri (string-append "https://github.com/shedskin/shedskin/"
9836 "releases/download/v" version
9837 "/shedskin-" version ".tgz"))
9838 (sha256
9839 (base32
9840 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9841 (build-system python-build-system)
9842 (arguments
9843 `(#:python ,python-2
9844 #:phases (modify-phases %standard-phases
9845 (add-after 'unpack 'fix-resulting-include-libs
9846 (lambda* (#:key inputs #:allow-other-keys)
9847 (let ((libgc (assoc-ref inputs "libgc"))
9848 (pcre (assoc-ref inputs "pcre")))
9849 (substitute* "shedskin/makefile.py"
9850 (("variable == 'CCFLAGS':[ ]*")
9851 (string-append "variable == 'CCFLAGS':\n"
9852 " line += ' -I " pcre "/include"
9853 " -I " libgc "/include'"))
9854 (("variable == 'LFLAGS':[ ]*")
9855 (string-append "variable == 'LFLAGS':\n"
9856 " line += ' -L" pcre "/lib"
9857 " -L " libgc "/lib'")))
9858 #t))))))
9859 (inputs `(("pcre" ,pcre)
9860 ("libgc" ,libgc)))
9861 (home-page "https://shedskin.github.io/")
9862 (synopsis "Experimental Python-2 to C++ Compiler")
9863 (description (string-append "This is an experimental compiler for a subset of
9864 Python. It generates C++ code and a Makefile."))
9865 (license (list license:gpl3 license:bsd-3 license:expat))))
9866
9867 (define-public python2-rope
9868 (package
9869 (name "python2-rope")
9870 (version "0.11.0")
9871 (source
9872 (origin
9873 (method url-fetch)
9874 (uri (pypi-uri "rope" version))
9875 (sha256
9876 (base32
9877 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
9878 (arguments
9879 ;; Rope has only partial python3 support, see `python-rope'
9880 `(#:python ,python-2))
9881 (build-system python-build-system)
9882 (native-inputs
9883 `(("python2-unittest2" ,python2-unittest2)))
9884 (home-page "https://github.com/python-rope/rope")
9885 (synopsis "Refactoring library for Python")
9886 (description "Rope is a refactoring library for Python. It facilitates
9887 the renaming, moving and extracting of attributes, functions, modules, fields
9888 and parameters in Python 2 source code. These refactorings can also be applied
9889 to occurrences in strings and comments.")
9890 (license license:gpl2)))
9891
9892 (define-public python-rope
9893 (package
9894 (inherit python2-rope)
9895 (name "python-rope")
9896 (arguments `(#:python ,python-wrapper
9897 ;; XXX: Only partial python3 support, results in some failing
9898 ;; tests: <https://github.com/python-rope/rope/issues/247>.
9899 #:tests? #f))
9900 (properties `((python2-variant . ,(delay python2-rope))))))
9901
9902 (define-public python-py3status
9903 (package
9904 (name "python-py3status")
9905 (version "3.21")
9906 (source
9907 (origin
9908 (method url-fetch)
9909 (uri (pypi-uri "py3status" version))
9910 (sha256
9911 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
9912 (build-system python-build-system)
9913 (inputs
9914 `(("file" ,file)))
9915 (arguments
9916 '(#:phases
9917 (modify-phases %standard-phases
9918 ;; 'file' is used for detection of configuration file encoding
9919 ;; let's make link the dependency to particular input
9920 (add-before 'build 'patch-file-path
9921 (lambda* (#:key inputs #:allow-other-keys)
9922 (let ((file-path (assoc-ref inputs "file")))
9923 (substitute* "py3status/parse_config.py"
9924 (("\\[\"file\", \"-b\"")
9925 (string-append "['" file-path "/bin/file', '-b'")))
9926 #t))))
9927 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9928 (home-page "https://github.com/ultrabug/py3status")
9929 (synopsis "Extensible i3status wrapper written in Python")
9930 (description "py3status is an i3status wrapper which extends i3status
9931 functionality in a modular way, allowing you to extend your panel with your
9932 own code, responding to click events and updating clock every second.")
9933 (license license:bsd-3)))
9934
9935 (define-public python-tblib
9936 (package
9937 (name "python-tblib")
9938 (version "1.3.2")
9939 (source (origin
9940 (method url-fetch)
9941 (uri (pypi-uri "tblib" version))
9942 (sha256 (base32
9943 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9944 (build-system python-build-system)
9945 (arguments
9946 `(#:phases
9947 (modify-phases %standard-phases
9948 (add-before 'check 'adjust-tests
9949 (lambda _
9950 (when (which "python3")
9951 ;; Adjust the example output to match that of Python 3.7:
9952 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
9953 (substitute* "README.rst"
9954 (("Exception\\('fail',") "Exception('fail'"))
9955 #t)))
9956 (replace 'check
9957 (lambda _
9958 ;; Upstream runs tests after installation and the package itself
9959 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9960 ;; found.
9961 (setenv "PYTHONPATH"
9962 (string-append (getcwd) "/build/lib:"
9963 (getenv "PYTHONPATH")))
9964 (invoke "py.test" "-vv" "tests" "README.rst"))))))
9965 (native-inputs
9966 `(("python-pytest" ,python-pytest)
9967 ("python-six" ,python-six)))
9968 (home-page "https://github.com/ionelmc/python-tblib")
9969 (synopsis "Traceback serialization library")
9970 (description
9971 "Traceback serialization allows you to:
9972
9973 @enumerate
9974 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
9975 different processes. This allows better error handling when running code over
9976 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9977
9978 @item Parse traceback strings and raise with the parsed tracebacks.
9979 @end enumerate\n")
9980 (license license:bsd-3)))
9981
9982 (define-public python2-tblib
9983 (package-with-python2 python-tblib))
9984
9985 (define-public python-greenlet
9986 (package
9987 (name "python-greenlet")
9988 (version "0.4.15")
9989 (source (origin
9990 (method url-fetch)
9991 (uri (pypi-uri "greenlet" version))
9992 (sha256
9993 (base32
9994 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
9995 (build-system python-build-system)
9996 (home-page "https://greenlet.readthedocs.io/")
9997 (synopsis "Lightweight in-process concurrent programming")
9998 (description
9999 "Greenlet package is a spin-off of Stackless, a version of CPython
10000 that supports micro-threads called \"tasklets\". Tasklets run
10001 pseudo-concurrently (typically in a single or a few OS-level threads) and
10002 are synchronized with data exchanges on \"channels\".")
10003 (license (list license:psfl license:expat))))
10004
10005 (define-public python2-greenlet
10006 (package-with-python2 python-greenlet))
10007
10008 (define-public python-objgraph
10009 (package
10010 (name "python-objgraph")
10011 (version "3.4.0")
10012 (source
10013 (origin
10014 (method url-fetch)
10015 (uri (pypi-uri "objgraph" version))
10016 (sha256
10017 (base32
10018 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
10019 (build-system python-build-system)
10020 (propagated-inputs
10021 `(("python-graphviz" ,python-graphviz)))
10022 (native-inputs
10023 `(("python-mock" ,python-mock)
10024 ("graphviz" ,graphviz)))
10025 (home-page "https://mg.pov.lt/objgraph/")
10026 (synopsis "Draw Python object reference graphs with graphviz")
10027 (description
10028 "This package provides tools to draw Python object reference graphs with
10029 graphviz.")
10030 (license license:expat)))
10031
10032 (define-public python-gevent
10033 (package
10034 (name "python-gevent")
10035 (version "1.3.7")
10036 (source (origin
10037 (method url-fetch)
10038 (uri (pypi-uri "gevent" version))
10039 (sha256
10040 (base32
10041 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
10042 (modules '((guix build utils)))
10043 (snippet
10044 '(begin
10045 ;; unbunding libev and c-ares
10046 (delete-file-recursively "deps")
10047 #t))))
10048 (build-system python-build-system)
10049 (arguments
10050 `(#:modules ((ice-9 ftw)
10051 (ice-9 match)
10052 (srfi srfi-26)
10053 (guix build utils)
10054 (guix build python-build-system))
10055 #:phases (modify-phases %standard-phases
10056 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
10057 (lambda _
10058 (substitute* "src/gevent/subprocess.py"
10059 (("/bin/sh") (which "sh")))
10060 (for-each (lambda (file)
10061 (substitute* file
10062 (("/bin/sh") (which "sh"))
10063 (("/bin/true") (which "true"))))
10064 (find-files "src/greentest" "\\.py$"))
10065 #t))
10066 (add-before 'build 'do-not-use-bundled-sources
10067 (lambda* (#:key inputs #:allow-other-keys)
10068 (setenv "CONFIG_SHELL" (which "bash"))
10069 (setenv "LIBEV_EMBED" "false")
10070 (setenv "CARES_EMBED" "false")
10071 (setenv "EMBED" "false")
10072
10073 ;; Prevent building bundled libev.
10074 (substitute* "setup.py"
10075 (("run_make=_BUILDING")
10076 "run_make=False"))
10077
10078 (let ((greenlet (string-append
10079 (assoc-ref inputs "python-greenlet")
10080 "/include")))
10081 (match (scandir greenlet
10082 (lambda (item)
10083 (string-prefix? "python" item)))
10084 ((python)
10085 (setenv "C_INCLUDE_PATH"
10086 (string-append greenlet "/" python)))))
10087 #t))
10088 (add-before 'check 'skip-timer-test
10089 (lambda _
10090 ;; XXX: Skip 'TestTimerResolution', which appears to be
10091 ;; unreliable.
10092 (substitute* "src/greentest/test__core_timer.py"
10093 (("not greentest.RUNNING_ON_CI") "False"))
10094 #t))
10095 (replace 'check
10096 (lambda _
10097 ;; Make sure the build directory is on PYTHONPATH.
10098 (setenv "PYTHONPATH"
10099 (string-append
10100 (getenv "PYTHONPATH") ":"
10101 (getcwd) "/build/"
10102 (car (scandir "build" (cut string-prefix? "lib." <>)))))
10103 (with-directory-excursion "src/greentest"
10104 ;; XXX: Many tests require network access. Instead we only
10105 ;; run known-good tests. Unfortunately we cannot use
10106 ;; recursion here since this directory also contains
10107 ;; Python-version-specific subfolders.
10108 (apply invoke "python" "testrunner.py" "--config"
10109 "known_failures.py"
10110 (scandir "." (cut regexp-exec
10111 (make-regexp "test_+(subprocess|core)")
10112 <>)))))))))
10113 (propagated-inputs
10114 `(("python-greenlet" ,python-greenlet)
10115 ("python-objgraph" ,python-objgraph)))
10116 (native-inputs
10117 `(("python-six" ,python-six)))
10118 (inputs
10119 `(("c-ares" ,c-ares)
10120 ("libev" ,libev)))
10121 (home-page "http://www.gevent.org/")
10122 (synopsis "Coroutine-based network library")
10123 (description
10124 "gevent is a coroutine-based Python networking library that uses greenlet
10125 to provide a high-level synchronous API on top of the libev event loop.")
10126 (license license:expat)
10127 (properties `((python2-variant . ,(delay python2-gevent))))))
10128
10129 (define-public python2-gevent
10130 (let ((base (package-with-python2
10131 (strip-python2-variant python-gevent))))
10132 (package
10133 (inherit base)
10134 (native-inputs `(,@(package-native-inputs python-gevent)
10135 ("python-mock" ,python2-mock))))))
10136
10137 (define-public python-fastimport
10138 (package
10139 (name "python-fastimport")
10140 (version "0.9.6")
10141 (source
10142 (origin
10143 (method url-fetch)
10144 (uri (pypi-uri "fastimport" version))
10145 (sha256
10146 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10147 (build-system python-build-system)
10148 (home-page "https://github.com/jelmer/python-fastimport")
10149 (synopsis "VCS fastimport parser and generator in Python")
10150 (description "This package provides a parser for and generator of the Git
10151 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
10152 format.")
10153 (license license:gpl2+)))
10154
10155 (define-public python2-fastimport
10156 (package-with-python2 python-fastimport))
10157
10158 (define-public python-twisted
10159 (package
10160 (name "python-twisted")
10161 (version "19.7.0")
10162 (source (origin
10163 (method url-fetch)
10164 (uri (pypi-uri "Twisted" version ".tar.bz2"))
10165 (sha256
10166 (base32
10167 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
10168 (build-system python-build-system)
10169 (arguments
10170 '(#:tests? #f)) ; FIXME: some tests fail
10171 (propagated-inputs
10172 `(("python-zope-interface" ,python-zope-interface)
10173 ("python-pyhamcrest" ,python-pyhamcrest)
10174 ("python-incremental" ,python-incremental)
10175 ("python-hyperlink" ,python-hyperlink)
10176 ("python-constantly" ,python-constantly)
10177 ("python-automat" ,python-automat)))
10178 (home-page "https://twistedmatrix.com/")
10179 (synopsis "Asynchronous networking framework written in Python")
10180 (description
10181 "Twisted is an extensible framework for Python programming, with special
10182 focus on event-based network programming and multiprotocol integration.")
10183 (license license:expat)))
10184
10185 (define-public python2-twisted
10186 (package-with-python2 python-twisted))
10187
10188 (define-public python-pika
10189 (package
10190 (name "python-pika")
10191 (version "0.12.0")
10192 (source
10193 (origin
10194 (method url-fetch)
10195 (uri (pypi-uri "pika" version))
10196 (sha256
10197 (base32
10198 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10199 (build-system python-build-system)
10200 (native-inputs
10201 `(("python-pyev" ,python-pyev)
10202 ("python-tornado" ,python-tornado)
10203 ("python-twisted" ,python-twisted)))
10204 (home-page "https://pika.readthedocs.org")
10205 (synopsis "Pure Python AMQP Client Library")
10206 (description
10207 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10208 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10209 network support library.")
10210 (license license:bsd-3)))
10211
10212 (define-public python2-pika
10213 (package-with-python2 python-pika))
10214
10215 (define-public python-ply
10216 (package
10217 (name "python-ply")
10218 (version "3.10")
10219 (source
10220 (origin
10221 (method url-fetch)
10222 (uri (pypi-uri "ply" version))
10223 (sha256
10224 (base32
10225 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10226 (build-system python-build-system)
10227 (home-page "http://www.dabeaz.com/ply/")
10228 (synopsis "Python Lex & Yacc")
10229 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10230 It uses LR parsing and does extensive error checking.")
10231 (license license:bsd-3)))
10232
10233 (define-public python2-ply
10234 (package-with-python2 python-ply))
10235
10236 (define-public python-tabulate
10237 (package
10238 (name "python-tabulate")
10239 (version "0.7.7")
10240 (source (origin
10241 (method url-fetch)
10242 (uri (pypi-uri "tabulate" version))
10243 (sha256
10244 (base32
10245 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10246 (build-system python-build-system)
10247 (arguments
10248 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10249 ;; and the latest release is not tagged in the upstream repository.
10250 '(#:tests? #f))
10251 (home-page "https://bitbucket.org/astanin/python-tabulate")
10252 (synopsis "Pretty-print tabular data")
10253 (description
10254 "Tabulate is a library and command-line utility to pretty-print tabular
10255 data in Python.")
10256 (license license:expat)))
10257
10258 (define-public python2-tabulate
10259 (package-with-python2 python-tabulate))
10260
10261 (define-public python-kazoo
10262 (package
10263 (name "python-kazoo")
10264 (version "2.4.0")
10265 (source
10266 (origin
10267 (method url-fetch)
10268 (uri (pypi-uri "kazoo" version))
10269 (sha256
10270 (base32
10271 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10272 (build-system python-build-system)
10273 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10274 (propagated-inputs
10275 `(("python-six" ,python-six)))
10276 (home-page "https://kazoo.readthedocs.org")
10277 (synopsis "High-level Zookeeper client library")
10278 (description
10279 "Kazoo is a Python client library for the Apache Zookeeper distributed
10280 application service. It is designed to be easy to use and to avoid common
10281 programming errors.")
10282 (license license:asl2.0)))
10283
10284 (define-public python2-kazoo
10285 (package-with-python2 python-kazoo))
10286
10287 (define-public python-pykafka
10288 (package
10289 (name "python-pykafka")
10290 (version "2.4.0")
10291 (source (origin
10292 (method url-fetch)
10293 (uri (pypi-uri "pykafka" version))
10294 (sha256
10295 (base32
10296 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10297 (build-system python-build-system)
10298 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10299 (propagated-inputs
10300 `(("python-gevent" ,python-gevent)
10301 ("python-kazoo" ,python-kazoo)
10302 ("python-tabulate" ,python-tabulate)))
10303 (inputs
10304 `(("librdkafka" ,librdkafka)))
10305 (home-page "https://pykafka.readthedocs.io/")
10306 (synopsis "Apache Kafka client for Python")
10307 (description
10308 "PyKafka is a client for the Apache Kafka distributed messaging system.
10309 It includes Python implementations of Kafka producers and consumers, which
10310 are optionally backed by a C extension built on librdkafka.")
10311 (license license:asl2.0)))
10312
10313 (define-public python2-pykafka
10314 (package-with-python2 python-pykafka))
10315
10316 (define-public python-wcwidth
10317 (package
10318 (name "python-wcwidth")
10319 (version "0.1.7")
10320 (source
10321 (origin
10322 (method url-fetch)
10323 (uri (pypi-uri "wcwidth" version))
10324 (sha256
10325 (base32
10326 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
10327 (build-system python-build-system)
10328 (home-page "https://github.com/jquast/wcwidth")
10329 (synopsis "Measure number of terminal column cells of wide-character codes")
10330 (description "Wcwidth measures the number of terminal column cells of
10331 wide-character codes. It is useful for those implementing a terminal emulator,
10332 or programs that carefully produce output to be interpreted by one. It is a
10333 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10334 specified in POSIX.1-2001 and POSIX.1-2008.")
10335 (license license:expat)))
10336
10337 (define-public python2-wcwidth
10338 (package-with-python2 python-wcwidth))
10339
10340 (define-public python2-jsonrpclib
10341 (package
10342 (name "python2-jsonrpclib")
10343 (version "0.1.7")
10344 (source (origin
10345 (method url-fetch)
10346 (uri (pypi-uri "jsonrpclib" version))
10347 (sha256
10348 (base32
10349 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10350 (build-system python-build-system)
10351 (arguments
10352 `(#:tests? #f
10353 #:python ,python-2))
10354 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10355 (synopsis "Implementation of JSON-RPC specification for Python")
10356 (description
10357 "This library is an implementation of the JSON-RPC specification.
10358 It supports both the original 1.0 specification, as well as the
10359 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10360 etc.")
10361 (license license:asl2.0)))
10362
10363 (define-public python-chai
10364 (package
10365 (name "python-chai")
10366 (version "1.1.2")
10367 (source (origin
10368 (method url-fetch)
10369 (uri (pypi-uri "chai" version))
10370 (sha256
10371 (base32
10372 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10373 (build-system python-build-system)
10374 (home-page "https://github.com/agoragames/chai")
10375 (synopsis "Mocking framework for Python")
10376 (description
10377 "Chai provides an api for mocking, stubbing and spying your python
10378 objects, patterned after the Mocha library for Ruby.")
10379 (license license:bsd-3)))
10380
10381 (define-public python2-chai
10382 (package-with-python2 python-chai))
10383
10384 (define-public python-inflection
10385 (package
10386 (name "python-inflection")
10387 (version "0.3.1")
10388 (source
10389 (origin (method url-fetch)
10390 (uri (pypi-uri "inflection" version))
10391 (sha256
10392 (base32
10393 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10394 (build-system python-build-system)
10395 (native-inputs
10396 `(("python-pytest" ,python-pytest)))
10397 (home-page "https://github.com/jpvanhal/inflection")
10398 (synopsis "Python string transformation library")
10399 (description
10400 "Inflection is a string transformation library. It singularizes
10401 and pluralizes English words, and transforms strings from CamelCase to
10402 underscored string.")
10403 (license license:expat)))
10404
10405 (define-public python2-inflection
10406 (package-with-python2 python-inflection))
10407
10408 (define-public python-pylev
10409 (package
10410 (name "python-pylev")
10411 (version "1.3.0")
10412 (source (origin
10413 (method url-fetch)
10414 (uri (pypi-uri "pylev" version))
10415 (sha256
10416 (base32
10417 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10418 (build-system python-build-system)
10419 (home-page "https://github.com/toastdriven/pylev")
10420 (synopsis "Levenshtein distance implementation in Python")
10421 (description "Pure Python Levenshtein implementation, based off the
10422 Wikipedia code samples at
10423 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10424 (license license:bsd-3)))
10425
10426 (define-public python2-pylev
10427 (package-with-python2 python-pylev))
10428
10429 (define-public python-cleo
10430 (package
10431 (name "python-cleo")
10432 (version "0.6.8")
10433 (source (origin
10434 (method url-fetch)
10435 (uri (pypi-uri "cleo" version))
10436 (sha256
10437 (base32
10438 "06zp695hq835rkaq6irr1ds1dp2qfzyf32v60vxpd8rcnxv319l5"))))
10439 (build-system python-build-system)
10440 (native-inputs
10441 `( ;; For testing
10442 ("python-mock" ,python-mock)
10443 ("python-pytest-mock" ,python-pytest-mock)
10444 ("python-pytest" ,python-pytest)))
10445 (propagated-inputs
10446 `(("python-backpack" ,python-backpack)
10447 ("python-pastel" ,python-pastel)
10448 ("python-pylev" ,python-pylev)))
10449 (home-page "https://github.com/sdispater/cleo")
10450 (synopsis "Command-line arguments library for Python")
10451 (description
10452 "Cleo allows you to create command-line commands with signature in
10453 docstring and colored output.")
10454 (license license:expat)))
10455
10456 (define-public python2-cleo
10457 (package-with-python2 python-cleo))
10458
10459 (define-public python-tomlkit
10460 (package
10461 (name "python-tomlkit")
10462 (version "0.5.7")
10463 (source
10464 (origin
10465 (method url-fetch)
10466 (uri (pypi-uri "tomlkit" version))
10467 (sha256
10468 (base32
10469 "18820ga5z3if1w8dvykxrfm000akracq01ic402xrbljgbn5grn4"))))
10470 (build-system python-build-system)
10471 (native-inputs
10472 `(("python-pytest" ,python-pytest)))
10473 (home-page
10474 "https://github.com/sdispater/tomlkit")
10475 (synopsis "Style preserving TOML library")
10476 (description
10477 "TOML Kit is a 0.5.0-compliant TOML library. It includes a parser that
10478 preserves all comments, indentations, whitespace and internal element ordering,
10479 and makes them accessible and editable via an intuitive API. It can also
10480 create new TOML documents from scratch using the provided helpers. Part of the
10481 implementation as been adapted, improved and fixed from Molten.")
10482 (license license:expat)))
10483
10484 (define-public python-shellingham
10485 (package
10486 (name "python-shellingham")
10487 (version "1.3.1")
10488 (source
10489 (origin
10490 (method url-fetch)
10491 (uri (pypi-uri "shellingham" version))
10492 (sha256
10493 (base32
10494 "1q7kws7w4x2hji3g7y0ni9ddk4sd676ylrb3db54gbpys6xj6nwq"))))
10495 (build-system python-build-system)
10496 (home-page
10497 "https://github.com/sarugaku/shellingham")
10498 (synopsis "Tool to detect surrounding shell")
10499 (description
10500 "Shellingham detects what shell the current Python executable is
10501 running in.")
10502 (license license:isc)))
10503
10504 (define-public python-memcached
10505 (package
10506 (name "python-memcached")
10507 (version "1.59")
10508 (source
10509 (origin
10510 (method url-fetch)
10511 (uri (pypi-uri "python-memcached" version))
10512 (sha256
10513 (base32
10514 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))))
10515 (build-system python-build-system)
10516 (propagated-inputs `(("python-six" ,python-six)))
10517 (home-page
10518 "https://github.com/linsomniac/python-memcached")
10519 (synopsis "Pure python memcached client")
10520 (description
10521 "This software is a pure Python interface to the memcached memory cache
10522 daemon. It is the client side software which allows storing values in one or
10523 more, possibly remote, memcached servers.")
10524 (license license:psfl)))
10525
10526 (define-public python-clikit
10527 (package
10528 (name "python-clikit")
10529 (version "0.2.4")
10530 (source
10531 (origin
10532 (method url-fetch)
10533 (uri (pypi-uri "clikit" version))
10534 (sha256
10535 (base32
10536 "0dc8czib5f4j9px1ivcpqnmivnx2zjpc0xb00ldrhsqylks7r06n"))))
10537 (build-system python-build-system)
10538 (propagated-inputs
10539 `(("python-pastel" ,python-pastel)
10540 ("python-pylev" ,python-pylev)))
10541 (home-page "https://github.com/sdispater/clikit")
10542 (synopsis "Group of utilities to build command line interfaces")
10543 (description
10544 "CliKit is a group of utilities to build testable command line
10545 interfaces.")
10546 (license license:expat)))
10547
10548 (define-public python-msgpack-python
10549 (package
10550 (name "python-msgpack-python")
10551 (version "0.5.6")
10552 (source
10553 (origin
10554 (method url-fetch)
10555 (uri (pypi-uri "msgpack-python" version))
10556 (sha256
10557 (base32
10558 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
10559 (build-system python-build-system)
10560 (home-page "http://msgpack.org/")
10561 (synopsis "Package to deserialize messages in MessagePack binary format")
10562 (description
10563 "MessagePack is an efficient binary serialization format. It lets you
10564 exchange data among multiple languages like JSON. But it's faster and
10565 smaller. Small integers are encoded into a single byte, and typical short
10566 strings require only one extra byte in addition to the strings themselves.")
10567 (license license:asl2.0)))
10568
10569 (define-public python-cachy
10570 (package
10571 (name "python-cachy")
10572 (version "0.2.0")
10573 (source
10574 (origin
10575 (method url-fetch)
10576 (uri (pypi-uri "cachy" version))
10577 (sha256
10578 (base32
10579 "0v6mjyhgx6j7ya20bk69cr3gdzdkdf6psay0h090rscclgji65dp"))))
10580 (build-system python-build-system)
10581 (native-inputs
10582 `(("python-fakeredis" ,python-fakeredis)
10583 ("python-flexmock" ,python-flexmock)
10584 ("python-pytest" ,python-pytest)))
10585 (propagated-inputs
10586 `(("python-memcached" ,python-memcached)
10587 ("python-msgpack-python" ,python-msgpack-python)
10588 ("python-redis" ,python-redis)))
10589 (home-page "https://github.com/sdispater/cachy")
10590 (synopsis "Simple yet effective caching library")
10591 (description
10592 "Cachy provides a simple yet effective caching library. A simple but
10593 powerful API: thread-safety; decorator syntax; support for memcached, redis,
10594 database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
10595 (license license:expat)))
10596
10597 (define-public poetry
10598 (package
10599 (name "poetry")
10600 (version "0.12.17")
10601 ;; Poetry can only be built from source with poetry.
10602 (source
10603 (origin
10604 (method url-fetch)
10605 (uri (pypi-uri "poetry" version))
10606 (sha256
10607 (base32
10608 "0gxwcd65qjmzqzppf53x51sic1rbcd9py6cdzx3aprppipimslvf"))))
10609 (build-system python-build-system)
10610 (arguments
10611 `(#:tests? #f ;; Pypi does not have tests.
10612 #:phases
10613 (modify-phases %standard-phases
10614 (replace 'build
10615 (lambda _
10616 ;; Bug in poetry https://github.com/sdispater/poetry/issues/866.
10617 (invoke "sed" "-i" "-e" "s/from distutils.core/from setuptools/"
10618 "setup.py")
10619 #t)))))
10620 (propagated-inputs
10621 `(("python-cachecontrol" ,python-cachecontrol)
10622 ("python-cachy" ,python-cachy)
10623 ("python-cleo" ,python-cleo)
10624 ("python-glob2" ,python-glob2)
10625 ("python-html5lib" ,python-html5lib)
10626 ("python-jsonschema" ,python-jsonschema)
10627 ("python-msgpack" ,python-msgpack)
10628 ("python-pathlib2" ,python-pathlib2)
10629 ("python-pkginfo" ,python-pkginfo)
10630 ("python-pyparsing" ,python-pyparsing)
10631 ("python-pyrsistent" ,python-pyrsistent)
10632 ("python-requests" ,python-requests)
10633 ("python-requests-toolbelt" ,python-requests-toolbelt)
10634 ("python-shellingham" ,python-shellingham)
10635 ("python-tomlkit" ,python-tomlkit)
10636 ("python-virtualenv" ,python-virtualenv)))
10637 (home-page "https://poetry.eustace.io/")
10638 (synopsis "Python dependency management and packaging made easy")
10639 (description "Poetry is a tool for dependency management and packaging
10640 in Python. It allows you to declare the libraries your project depends on and
10641 it will manage (install/update) them for you.")
10642 (license license:expat)))
10643
10644 (define-public python-lazy-object-proxy
10645 (package
10646 (name "python-lazy-object-proxy")
10647 (version "1.4.3")
10648 (source (origin
10649 (method url-fetch)
10650 (uri (pypi-uri "lazy-object-proxy" version))
10651 (sha256
10652 (base32
10653 "1w1aaay424ciz8fz3fkzxb0pxzfxn184f2whpyn4fx72bn50x47k"))))
10654 (native-inputs
10655 `(("python-setuptools-scm" ,python-setuptools-scm-3.3)))
10656 (build-system python-build-system)
10657 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10658 (synopsis "Lazy object proxy for python")
10659 (description
10660 "Lazy object proxy is an object that wraps a callable but defers the call
10661 until the object is actually required, and caches the result of said call.")
10662 (license license:bsd-2)))
10663
10664 (define-public python2-lazy-object-proxy
10665 (package-with-python2 python-lazy-object-proxy))
10666
10667 (define-public python-dnspython
10668 (package
10669 (name "python-dnspython")
10670 (version "1.15.0")
10671 (source (origin
10672 (method url-fetch)
10673 (uri (string-append "http://www.dnspython.org/kits/"
10674 version "/dnspython-" version ".tar.gz"))
10675 (sha256
10676 (base32
10677 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10678 (build-system python-build-system)
10679 (arguments '(#:tests? #f)) ; XXX: requires internet access
10680 (home-page "http://www.dnspython.org")
10681 (synopsis "DNS toolkit for Python")
10682 (description
10683 "dnspython is a DNS toolkit for Python. It supports almost all record
10684 types. It can be used for queries, zone transfers, and dynamic updates.
10685 It supports TSIG authenticated messages and EDNS0.")
10686 (license license:expat)))
10687
10688 (define-public python2-dnspython
10689 (package-with-python2 python-dnspython))
10690
10691 (define-public python-email-validator
10692 (package
10693 (name "python-email-validator")
10694 (version "1.0.2")
10695 (source
10696 (origin (method url-fetch)
10697 (uri (pypi-uri "email_validator" version))
10698 (sha256
10699 (base32
10700 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10701 (build-system python-build-system)
10702 (arguments
10703 '(#:phases
10704 (modify-phases %standard-phases
10705 (add-before 'build 'use-dnspython
10706 (lambda _
10707 (substitute* "setup.py"
10708 (("dnspython3") "dnspython"))
10709 #t)))))
10710 (propagated-inputs
10711 `(("python-dnspython" ,python-dnspython)
10712 ("python-idna" ,python-idna)))
10713 (home-page "https://github.com/JoshData/python-email-validator")
10714 (synopsis "Email address validation library for Python")
10715 (description
10716 "This library validates email address syntax and deliverability.")
10717 (license license:cc0)))
10718
10719 (define-public python2-email-validator
10720 (package-with-python2 python-email-validator))
10721
10722 (define-public python-ukpostcodeparser
10723 (package
10724 (name "python-ukpostcodeparser")
10725 (version "1.0.3")
10726 (source (origin
10727 (method url-fetch)
10728 (uri (pypi-uri "UkPostcodeParser" version))
10729 (sha256
10730 (base32
10731 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10732 (build-system python-build-system)
10733 (home-page "https://github.com/hamstah/ukpostcodeparser")
10734 (synopsis "UK Postcode parser for Python")
10735 (description
10736 "This library provides the @code{parse_uk_postcode} function for
10737 parsing UK postcodes.")
10738 (license license:expat)))
10739
10740 (define-public python2-ukpostcodeparser
10741 (package-with-python2 python-ukpostcodeparser))
10742
10743 (define-public python-faker
10744 (package
10745 (name "python-faker")
10746 (version "0.7.9")
10747 (source (origin
10748 (method url-fetch)
10749 (uri (pypi-uri "Faker" version))
10750 (sha256
10751 (base32
10752 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10753 (patches
10754 (search-patches "python-faker-fix-build-32bit.patch"))
10755 (modules '((guix build utils)))
10756 (snippet
10757 '(begin
10758 (for-each delete-file (find-files "." "\\.pyc$"))
10759 #t))))
10760 (build-system python-build-system)
10761 (arguments
10762 '(#:phases
10763 (modify-phases %standard-phases
10764 (replace 'check
10765 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
10766 (native-inputs
10767 `(;; For testing
10768 ("python-email-validator" ,python-email-validator)
10769 ("python-mock" ,python-mock)
10770 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10771 (propagated-inputs
10772 `(("python-dateutil" ,python-dateutil)
10773 ("python-six" ,python-six)))
10774 (home-page "https://github.com/joke2k/faker")
10775 (synopsis "Python package that generates fake data")
10776 (description
10777 "Faker is a Python package that generates fake data such as names,
10778 addresses, and phone numbers.")
10779 (license license:expat)
10780 (properties `((python2-variant . ,(delay python2-faker))))))
10781
10782 (define-public python2-faker
10783 (let ((base (package-with-python2 (strip-python2-variant
10784 python-faker))))
10785 (package
10786 (inherit base)
10787 (propagated-inputs
10788 `(("python2-ipaddress" ,python2-ipaddress)
10789 ,@(package-propagated-inputs base))))))
10790
10791 (define-public python-pyaml
10792 (package
10793 (name "python-pyaml")
10794 (version "18.11.0")
10795 (source (origin
10796 (method url-fetch)
10797 (uri (pypi-uri "pyaml" version))
10798 (sha256
10799 (base32
10800 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
10801 (build-system python-build-system)
10802 (native-inputs
10803 `(("python-unidecode" ,python-unidecode)))
10804 (propagated-inputs
10805 `(("python-pyyaml" ,python-pyyaml)))
10806 (home-page "https://github.com/mk-fg/pretty-yaml")
10807 (synopsis "YAML pretty-print library for Python")
10808 (description
10809 "pyaml is a PyYAML based python module to produce pretty and readable
10810 YAML-serialized data.")
10811 (license license:wtfpl2)))
10812
10813 (define-public python2-pyaml
10814 (package-with-python2 python-pyaml))
10815
10816 (define-public python-backpack
10817 (package
10818 (name "python-backpack")
10819 (version "0.1")
10820 (source
10821 (origin
10822 (method url-fetch)
10823 (uri (pypi-uri "backpack" version))
10824 (sha256
10825 (base32
10826 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10827 (build-system python-build-system)
10828 (native-inputs
10829 `(("python-pytest" ,python-pytest)
10830 ("python-nose" ,python-nose)))
10831 (propagated-inputs
10832 `(("python-simplejson" ,python-simplejson)))
10833 (home-page "https://github.com/sdispater/backpack")
10834 (synopsis "Utilities for working with Python collections")
10835 (description "Backpack provides some useful utilities for working with
10836 collections of data.")
10837 (license license:expat)))
10838
10839 (define-public python2-backpack
10840 (package-with-python2 python-backpack))
10841
10842 (define-public python-prompt-toolkit
10843 (package
10844 (name "python-prompt-toolkit")
10845 (version "2.0.7")
10846 (source
10847 (origin
10848 (method url-fetch)
10849 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10850 (sha256
10851 (base32
10852 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10853 (build-system python-build-system)
10854 (arguments
10855 `(#:phases
10856 (modify-phases %standard-phases
10857 (delete 'check)
10858 (add-after 'install 'post-install-check
10859 (lambda* (#:key inputs outputs #:allow-other-keys)
10860 ;; HOME is needed for the test
10861 ;; "test_pathcompleter_can_expanduser".
10862 (setenv "HOME" "/tmp")
10863 (add-installed-pythonpath inputs outputs)
10864 (invoke "py.test"))))))
10865 (propagated-inputs
10866 `(("python-wcwidth" ,python-wcwidth)
10867 ("python-six" ,python-six)
10868 ("python-pygments" ,python-pygments)))
10869 (native-inputs
10870 `(("python-pytest" ,python-pytest)))
10871 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10872 (synopsis "Library for building command line interfaces in Python")
10873 (description
10874 "Prompt-Toolkit is a library for building interactive command line
10875 interfaces in Python. It's like GNU Readline but it also features syntax
10876 highlighting while typing, out-of-the-box multi-line input editing, advanced
10877 code completion, incremental search, support for Chinese double-width
10878 characters, mouse support, and auto suggestions.")
10879 (license license:bsd-3)))
10880
10881 (define-public python2-prompt-toolkit
10882 (package-with-python2 python-prompt-toolkit))
10883
10884 (define-public python-prompt-toolkit-1
10885 (package (inherit python-prompt-toolkit)
10886 (version "1.0.15")
10887 (source
10888 (origin
10889 (method url-fetch)
10890 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10891 (sha256
10892 (base32
10893 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
10894
10895 (define-public python2-prompt-toolkit-1
10896 (package-with-python2 python-prompt-toolkit-1))
10897
10898 (define-public python-jedi
10899 (package
10900 (name "python-jedi")
10901 (version "0.15.1")
10902 (source
10903 (origin
10904 (method url-fetch)
10905 (uri (pypi-uri "jedi" version))
10906 (sha256
10907 (base32
10908 "0bp4pxhsynaarbvzblsn5x32lzp29svy3sxfy8i6m5iwz9s9r1ds"))))
10909 (build-system python-build-system)
10910 (arguments
10911 `(#:phases
10912 (modify-phases %standard-phases
10913 (add-after 'unpack 'disable-file-completion-test
10914 ;; A single parameterized test currently fail (see:
10915 ;; https://github.com/davidhalter/jedi/issues/1395). Remove it.
10916 (lambda _
10917 (substitute* "test/test_api/test_completion.py"
10918 ((".*'example.py', 'rb\"' \\+ join\\('\\.\\.'.*") ""))
10919 #t))
10920 (replace 'check
10921 (lambda _
10922 (setenv "HOME" "/tmp")
10923 (invoke "python" "-m" "pytest"))))))
10924 (native-inputs
10925 `(("python-pytest" ,python-pytest)
10926 ("python-docopt" ,python-docopt)))
10927 (propagated-inputs
10928 `(("python-parso" ,python-parso)))
10929 (home-page "https://github.com/davidhalter/jedi")
10930 (synopsis "Autocompletion and static analysis library for Python")
10931 (description
10932 "Jedi is a static analysis tool for Python that can be used in Integrated
10933 Development Environments (@dfn{IDE}s) and text editors. It understands Python
10934 on a deeper level than many other static analysis frameworks for Python.
10935
10936 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
10937 well.")
10938 (license license:expat)))
10939
10940 (define-public python2-jedi
10941 (package-with-python2 python-jedi))
10942
10943 (define-public ptpython
10944 (package
10945 (name "ptpython")
10946 (version "0.34")
10947 (source (origin
10948 (method url-fetch)
10949 (uri (pypi-uri "ptpython" version))
10950 (sha256
10951 (base32
10952 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10953 (build-system python-build-system)
10954 (arguments
10955 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
10956 (propagated-inputs
10957 `(("python-docopt" ,python-docopt)
10958 ("python-jedi" ,python-jedi)
10959 ("python-prompt-toolkit" ,python-prompt-toolkit)
10960 ("python-pygments" ,python-pygments)))
10961 (home-page "https://github.com/jonathanslenders/ptpython")
10962 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10963 (description
10964 "ptpython is a Python read-eval-print loop with IDE-like features.
10965 It supports syntax highlighting, multiline editing, autocompletion, mouse,
10966 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10967 etc.")
10968 (license license:bsd-3)
10969 (properties `((python2-variant . ,(delay ptpython-2))))))
10970
10971 (define-public ptpython-2
10972 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10973 (package
10974 (inherit base)
10975 (name "ptpython2"))))
10976
10977 (define-public python-stem
10978 (package
10979 (name "python-stem")
10980 (version "1.7.1")
10981 (source
10982 (origin
10983 (method url-fetch)
10984 (uri (pypi-uri "stem" version))
10985 (sha256
10986 (base32
10987 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
10988 (build-system python-build-system)
10989 (arguments
10990 `(#:phases
10991 (modify-phases %standard-phases
10992 (replace 'check
10993 (lambda _
10994 (invoke "./run_tests.py" "--unit")
10995 #t)))))
10996 (native-inputs
10997 `(("python-mock" ,python-mock)
10998 ("python-pycodestyle" ,python-pycodestyle)
10999 ("python-pyflakes" ,python-pyflakes)))
11000 (home-page "https://stem.torproject.org/")
11001 (synopsis
11002 "Python controller library that allows applications to interact with Tor")
11003 (description
11004 "Stem is a Python controller library for Tor. With it you can use Tor's
11005 control protocol to script against the Tor process and read descriptor data
11006 relays publish about themselves.")
11007 (license license:lgpl3)))
11008
11009 (define-public python2-stem
11010 (package-with-python2 python-stem))
11011
11012 (define-public python-pyserial
11013 (package
11014 (name "python-pyserial")
11015 (version "3.4")
11016 (source
11017 (origin
11018 (method url-fetch)
11019 (uri (pypi-uri "pyserial" version))
11020 (sha256
11021 (base32
11022 "09y68bczw324a4jb9a1cfwrbjhq179vnfkkkrybbksp0vqgl0bbf"))))
11023 (build-system python-build-system)
11024 (arguments
11025 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
11026 ;; #:phases
11027 ;; (modify-phases %standard-phases
11028 ;; (replace 'check
11029 ;; (lambda _
11030 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
11031 (home-page
11032 "https://github.com/pyserial/pyserial")
11033 (synopsis "Python Serial Port Bindings")
11034 (description "@code{pyserial} provide serial port bindings for Python. It
11035 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11036 and/or Xon/Xoff. The port is accessed in RAW mode.")
11037 (license license:bsd-3)))
11038
11039 (define-public python2-pyserial
11040 (package-with-python2 python-pyserial))
11041
11042 (define-public python-kivy
11043 (package
11044 (name "python-kivy")
11045 (version "1.10.1")
11046 (source
11047 (origin
11048 (method url-fetch)
11049 (uri (pypi-uri "Kivy" version))
11050 (file-name (string-append name "-" version ".tar.gz"))
11051 (sha256
11052 (base32
11053 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
11054 (build-system python-build-system)
11055 (arguments
11056 `(#:tests? #f ; Tests require many optional packages
11057 #:phases
11058 (modify-phases %standard-phases
11059 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11060 (lambda* (#:key inputs #:allow-other-keys)
11061 (setenv "KIVY_SDL2_PATH"
11062 (string-append (assoc-ref inputs "sdl-union")
11063 "/include/SDL2"))
11064 #t)))))
11065 (native-inputs
11066 `(("git" ,git)
11067 ("pkg-config" ,pkg-config)
11068 ("python-cython" ,python-cython)))
11069 (inputs
11070 `(("gstreamer" ,gstreamer)
11071 ("mesa" ,mesa)
11072 ("sdl-union"
11073 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11074 (home-page "http://kivy.org")
11075 (synopsis
11076 "Multitouch application framework")
11077 (description
11078 "A software library for rapid development of
11079 hardware-accelerated multitouch applications.")
11080 (license license:expat)))
11081
11082 (define-public python2-kivy
11083 (package-with-python2 python-kivy))
11084
11085 (define-public python-kivy-next
11086 (deprecated-package "python-kivy-next" python-kivy))
11087
11088 (define-public python2-kivy-next
11089 (deprecated-package "python2-kivy-next" python2-kivy))
11090
11091 (define-public python-binaryornot
11092 (package
11093 (name "python-binaryornot")
11094 (version "0.4.4")
11095 (source (origin
11096 (method url-fetch)
11097 (uri (pypi-uri "binaryornot" version))
11098 (sha256
11099 (base32
11100 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
11101 (build-system python-build-system)
11102 (arguments
11103 `(#:phases
11104 (modify-phases %standard-phases
11105 (add-after 'unpack 'patch-tests
11106 (lambda _
11107 ;; TypeError: binary() got an unexpected keyword argument
11108 ;; 'average_size'.
11109 (substitute* "tests/test_check.py"
11110 (("average_size=512") ""))
11111 #t)))))
11112 (propagated-inputs
11113 `(("python-chardet" ,python-chardet)
11114 ("python-hypothesis" ,python-hypothesis)))
11115 (home-page "https://github.com/audreyr/binaryornot")
11116 (synopsis "Package to check if a file is binary or text")
11117 (description "Ultra-lightweight pure Python package to check if a file is
11118 binary or text.")
11119 (license license:bsd-3)
11120 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11121
11122 (define-public python2-binaryornot
11123 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11124 (package (inherit base)
11125 (propagated-inputs
11126 `(("python2-enum34" ,python2-enum34)
11127 ,@(package-propagated-inputs base))))))
11128
11129 (define-public python-binwalk
11130 (let ((commit "64201acfb5b0a9cdd9faa58c40a36dcff8612e29")
11131 (revision "0"))
11132 (package
11133 (name "python-binwalk")
11134 (version (git-version "2.1.1" revision commit))
11135 (source
11136 (origin
11137 (method git-fetch)
11138 (uri (git-reference
11139 (url "https://github.com/ReFirmLabs/binwalk")
11140 (commit commit)))
11141 (file-name (git-file-name name version))
11142 (sha256
11143 (base32
11144 "1z7ca6rfp887hw5jc3sb45mm4fa0xid4lsp2z8g4r590dr7k7w15"))))
11145 (build-system python-build-system)
11146 (arguments
11147 `(#:phases
11148 (modify-phases %standard-phases
11149 (add-before 'check 'set-pythonpath
11150 (lambda _
11151 (setenv "PYTHONPATH"
11152 (string-append
11153 (getcwd) "/src/"
11154 ":" (getenv "PYTHONPATH")))
11155 (setenv "HOME" "")
11156 #t)))))
11157 (native-inputs
11158 `(("python-coverage" ,python-coverage)
11159 ("python-nose" ,python-nose)))
11160 (home-page "https://github.com/ReFirmLabs/binwalk")
11161 (synopsis "Firmware analysis tool")
11162 (description "Binwalk is a tool for analyzing, reverse engineering, and extracting firmware images")
11163 (license license:expat))))
11164
11165 (define-public python-nltk
11166 (package
11167 (name "python-nltk")
11168 (version "3.2.1")
11169 (source (origin
11170 (method url-fetch)
11171 (uri (pypi-uri "nltk" version))
11172 (sha256
11173 (base32
11174 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11175 (build-system python-build-system)
11176 (arguments
11177 '(;; The tests require some extra resources to be downloaded.
11178 ;; TODO Try packaging these resources.
11179 #:tests? #f))
11180 (home-page "http://nltk.org/")
11181 (synopsis "Natural Language Toolkit")
11182 (description "It provides interfaces to over 50 corpora and lexical
11183 resources such as WordNet, along with a suite of text processing libraries
11184 for classification, tokenization, stemming, tagging, parsing, and semantic
11185 reasoning, wrappers for natural language processing libraries.")
11186 (license license:asl2.0)))
11187
11188 (define-public python2-nltk
11189 (package-with-python2 python-nltk))
11190
11191 (define-public python-pymongo
11192 (package
11193 (name "python-pymongo")
11194 (version "3.7.2")
11195 (source (origin
11196 (method url-fetch)
11197 (uri (pypi-uri "pymongo" version))
11198 (sha256
11199 (base32
11200 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
11201 (build-system python-build-system)
11202 (propagated-inputs
11203 `(("python-certifi" ,python-certifi)))
11204 (home-page "https://github.com/mongodb/mongo-python-driver")
11205 (synopsis "Python driver for MongoDB")
11206 (description "Python driver for MongoDB.")
11207 (license license:asl2.0)))
11208
11209 (define-public python2-pymongo
11210 (package-with-python2 python-pymongo))
11211
11212 (define-public python-consul
11213 (package
11214 (name "python-consul")
11215 (version "0.6.1")
11216 (source
11217 (origin
11218 (method url-fetch)
11219 (uri (pypi-uri "python-consul" version))
11220 (sha256
11221 (base32
11222 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11223 (build-system python-build-system)
11224 (arguments
11225 '(#:tests? #f)) ; The tests are not distributed
11226 (propagated-inputs
11227 `(("python-requests" ,python-requests)
11228 ("python-six" ,python-six)))
11229 (home-page "https://github.com/cablehead/python-consul")
11230 (synopsis "Python client for Consul")
11231 (description
11232 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11233 discovery, monitoring and configuration.")
11234 (license license:expat)))
11235
11236 (define-public python2-consul
11237 (package-with-python2 python-consul))
11238
11239 (define-public python-schematics
11240 (package
11241 (name "python-schematics")
11242 (version "1.1.1")
11243 (source
11244 (origin
11245 (method git-fetch)
11246 (uri (git-reference
11247 (url "https://github.com/schematics/schematics.git")
11248 (commit (string-append "v" version))))
11249 (file-name (git-file-name name version))
11250 (sha256
11251 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
11252 (build-system python-build-system)
11253 (propagated-inputs
11254 `(("python-six" ,python-six)))
11255 (arguments
11256 ;; The tests require a bunch of not very nice packages with fixed
11257 ;; version requirements (e.g. python-coveralls).
11258 `(#:tests? #f))
11259 (home-page "https://github.com/schematics/schematics")
11260 (synopsis "Python Data Structures for Humans")
11261 (description "Python Data Structures for Humans.")
11262 (license license:bsd-3)))
11263
11264 (define-public python2-schematics
11265 (package-with-python2 python-schematics))
11266
11267 (define-public python-odfpy
11268 (package
11269 (name "python-odfpy")
11270 (version "1.3.3")
11271 (source (origin
11272 (method url-fetch)
11273 (uri (pypi-uri "odfpy" version))
11274 (sha256
11275 (base32
11276 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11277 (arguments
11278 `(#:modules ((srfi srfi-1)
11279 (guix build python-build-system)
11280 (guix build utils))
11281 #:phases
11282 (modify-phases %standard-phases
11283 (replace 'check
11284 ;; The test runner invokes python2 and python3 for test*.py.
11285 ;; To avoid having both in inputs, we replicate it here.
11286 (lambda _
11287 (for-each (lambda (test-file) (invoke "python" test-file))
11288 (find-files "tests" "^test.*\\.py$"))
11289 #t)))))
11290 (build-system python-build-system)
11291 (home-page "https://github.com/eea/odfpy")
11292 (synopsis "Python API and tools to manipulate OpenDocument files")
11293 (description "Collection of libraries and utility programs written in
11294 Python to manipulate OpenDocument 1.2 files.")
11295 (license
11296 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11297 ;; number of files with other licenses.
11298 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11299
11300 (define-public python2-odfpy
11301 (package-with-python2 python-odfpy))
11302
11303 (define-public python-natsort
11304 (package
11305 (name "python-natsort")
11306 (version "5.4.1")
11307 (source (origin
11308 (method url-fetch)
11309 (uri (pypi-uri "natsort" version))
11310 (sha256
11311 (base32
11312 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
11313 (build-system python-build-system)
11314 (arguments
11315 `(#:modules ((guix build utils)
11316 (guix build python-build-system)
11317 (srfi srfi-1)
11318 (srfi srfi-26)
11319 (ice-9 ftw))
11320 #:phases
11321 (modify-phases %standard-phases
11322 (add-before 'check 'set-cachedir
11323 ;; Tests require write access to $HOME by default
11324 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
11325 (replace 'check
11326 (lambda _
11327 (let ((cwd (getcwd)))
11328 (setenv "PYTHONPATH"
11329 (string-append
11330 cwd "/build/"
11331 (find (cut string-prefix? "lib" <>)
11332 (scandir (string-append cwd "/build")))
11333 ":"
11334 (getenv "PYTHONPATH")))
11335 (invoke "pytest" "-v")))))))
11336 (native-inputs
11337 `(("python-hypothesis" ,python-hypothesis)
11338 ("python-pytest-cov" ,python-pytest-cov)
11339 ("python-pytest-mock" ,python-pytest-mock)
11340 ("python-pytest" ,python-pytest)))
11341 (propagated-inputs ; TODO: Add python-fastnumbers.
11342 `(("python-pyicu" ,python-pyicu)))
11343 (home-page "https://github.com/SethMMorton/natsort")
11344 (synopsis "Natural sorting for python and shell")
11345 (description
11346 "Natsort lets you apply natural sorting on lists instead of
11347 lexicographical. If you use the built-in @code{sorted} method in python
11348 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
11349 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
11350 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
11351 identifies numbers and sorts them separately from strings. It can also sort
11352 version numbers, real numbers, mixed types and more, and comes with a shell
11353 command @command{natsort} that exposes this functionality in the command line.")
11354 (license license:expat)
11355 (properties `((python2-variant . ,(delay python2-natsort))))))
11356
11357 (define-public python2-natsort
11358 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11359 (package (inherit base)
11360 (native-inputs
11361 `(("python2-pathlib" ,python2-pathlib)
11362 ,@(package-native-inputs base))))))
11363
11364 (define-public python-glances
11365 (package
11366 (name "python-glances")
11367 (version "3.1.2")
11368 (source
11369 (origin
11370 (method url-fetch)
11371 (uri (pypi-uri "Glances" version))
11372 (sha256
11373 (base32 "15384pbvw9wj4sb8zgvd9v1812vrypbyjg0acicjf1hdb3p30fkk"))
11374 (modules '((guix build utils)))
11375 (snippet
11376 '(begin
11377 ;; Glances phones PyPI for weekly update checks by default.
11378 ;; Disable these. The user can re-enable them if desired.
11379 (substitute* "glances/outdated.py"
11380 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
11381 (string-append indentation
11382 "self.args.disable_check_update = True\n"
11383 line)))
11384 #t))))
11385 (build-system python-build-system)
11386 (propagated-inputs
11387 `(("python-future" ,python-future)
11388 ("python-psutil" ,python-psutil)))
11389 (home-page "https://github.com/nicolargo/glances")
11390 (synopsis "Cross-platform curses-based monitoring tool")
11391 (description
11392 "Glances is a curses-based monitoring tool for a wide variety of platforms.
11393 Glances uses the PsUtil library to get information from your system. It
11394 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
11395 (license license:lgpl3+)))
11396
11397 (define-public python2-glances
11398 (package-with-python2 python-glances))
11399
11400 (define-public python-graphql-core
11401 (package
11402 (name "python-graphql-core")
11403 (version "0.5.3")
11404 (source
11405 (origin
11406 (method url-fetch)
11407 (uri (pypi-uri "graphql-core" version))
11408 (sha256
11409 (base32
11410 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11411 (build-system python-build-system)
11412 (arguments
11413 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11414 #:phases
11415 (modify-phases %standard-phases
11416 (add-after 'unpack 'patch-hardcoded-version
11417 (lambda _ (substitute*
11418 "setup.py"
11419 (("'gevent==1.1rc1'") "'gevent'"))
11420 #t)))))
11421 (native-inputs
11422 `(("python-gevent" ,python-gevent)
11423 ("python-mock" ,python-mock)
11424 ("python-pytest-mock" ,python-pytest-mock)))
11425 (propagated-inputs
11426 `(("python-promise" ,python-promise)
11427 ("python-six" ,python-six)))
11428 (home-page "https://github.com/graphql-python/graphql-core")
11429 (synopsis "GraphQL implementation for Python")
11430 (description
11431 "GraphQL implementation for Python. GraphQL is a data query language and
11432 runtime designed and used to request and deliver data to mobile and web apps.
11433 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11434 to Python.")
11435 (license license:expat)))
11436
11437 (define-public python2-graphql-core
11438 (package-with-python2 python-graphql-core))
11439
11440 (define-public python-graphql-relay
11441 (package
11442 (name "python-graphql-relay")
11443 (version "0.4.5")
11444 (source
11445 (origin
11446 (method url-fetch)
11447 (uri (pypi-uri "graphql-relay" version))
11448 (sha256
11449 (base32
11450 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
11451 (build-system python-build-system)
11452 (arguments
11453 '(#:tests? #f)) ; The tests are not distributed
11454 (propagated-inputs
11455 `(("python-graphql-core" ,python-graphql-core)
11456 ("python-promise" ,python-promise)
11457 ("python-six" ,python-six)))
11458 (home-page "https://github.com/graphql-python/graphql-relay-py")
11459 (synopsis "Relay implementation for Python")
11460 (description
11461 "This is a library to allow the easy creation of Relay-compliant servers
11462 using the GraphQL Python reference implementation of a GraphQL server. It
11463 should be noted that the code is a exact port of the original
11464 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11465 from Facebook.")
11466 (license license:expat)))
11467
11468 (define-public python2-graphql-relay
11469 (package-with-python2 python-graphql-relay))
11470
11471 (define-public python-graphene
11472 (package
11473 (name "python-graphene")
11474 (version "0.10.2")
11475 (source
11476 (origin
11477 (method url-fetch)
11478 (uri (pypi-uri "graphene" version))
11479 (sha256
11480 (base32
11481 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11482 (build-system python-build-system)
11483 (propagated-inputs
11484 `(("python-graphql-core" ,python-graphql-core)
11485 ("python-graphql-relay" ,python-graphql-relay)
11486 ("python-iso8601" ,python-iso8601)
11487 ("python-promise" ,python-promise)
11488 ("python-six" ,python-six)))
11489 (arguments
11490 `(#:tests? #f)) ; no tests/ in the PyPI tarball
11491 (home-page "http://graphene-python.org/")
11492 (synopsis "GraphQL Framework for Python")
11493 (description
11494 "Graphene is a Python library for building GraphQL schemas/types.
11495 A GraphQL schema describes your data model, and provides a GraphQL server
11496 with an associated set of resolve methods that know how to fetch data.")
11497 (properties `((python2-variant . ,(delay python2-graphene))))
11498 (license license:expat)))
11499
11500 (define-public python2-graphene
11501 (let ((base (package-with-python2
11502 (strip-python2-variant python-graphene))))
11503 (package (inherit base)
11504 (native-inputs
11505 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11506 ,@(package-native-inputs base))))))
11507
11508 (define-public python-nautilus
11509 (package
11510 (name "python-nautilus")
11511 (version "0.4.9")
11512 (source
11513 (origin
11514 (method url-fetch)
11515 (uri (pypi-uri "nautilus" version))
11516 (sha256
11517 (base32
11518 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11519 (build-system python-build-system)
11520 (arguments `(#:tests? #f)) ; fails to import test modules
11521 (propagated-inputs
11522 `(("python-bcrypt" ,python-bcrypt)
11523 ("python-click" ,python-click)
11524 ("python-consul" ,python-consul)
11525 ("python-graphene" ,python-graphene)
11526 ("python-jinja2" ,python-jinja2)
11527 ("python-peewee" ,python-peewee)
11528 ("python-pika" ,python-pika)
11529 ("python-tornado" ,python-tornado)
11530 ("python-wtforms" ,python-wtforms)))
11531 (native-inputs
11532 `(("python-nose2" ,python-nose2)))
11533 (home-page "https://github.com/AlecAivazis/nautilus")
11534 (synopsis "Library for creating microservice applications")
11535 (description
11536 "Nautilus is a framework for flux based microservices that looks to
11537 provide extendible implementations of common aspects of a cloud so that you can
11538 focus on building massively scalable web applications.")
11539 (license license:expat)))
11540
11541 (define-public python-snowballstemmer
11542 (package
11543 (name "python-snowballstemmer")
11544 (version "1.2.1")
11545 (source (origin
11546 (method url-fetch)
11547 (uri (pypi-uri "snowballstemmer" version))
11548 (sha256
11549 (base32
11550 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11551 (build-system python-build-system)
11552 (arguments
11553 `(;; No tests exist
11554 #:tests? #f))
11555 (home-page "https://github.com/shibukawa/snowball_py")
11556 (synopsis "Snowball stemming library collection for Python")
11557 (description "This package provides 16 word stemmer algorithms generated
11558 from Snowball algorithms. It includes the 15 original ones plus the Poerter
11559 English stemmer.")
11560 (license license:bsd-3)))
11561
11562 (define-public python2-snowballstemmer
11563 (package-with-python2 python-snowballstemmer))
11564
11565 (define-public python-setproctitle
11566 (package
11567 (name "python-setproctitle")
11568 (version "1.1.10")
11569 (source
11570 (origin
11571 (method url-fetch)
11572 (uri (pypi-uri "setproctitle" version))
11573 (sha256
11574 (base32
11575 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11576 (build-system python-build-system)
11577 (arguments
11578 '(#:phases
11579 (modify-phases %standard-phases
11580 (add-before 'check 'patch-Makefile
11581 ;; Stricly this is only required for the python2 variant.
11582 ;; But adding a phase in an inherited package seems to be
11583 ;; cumbersum. So we patch even for python3.
11584 (lambda _
11585 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11586 (when nose
11587 (substitute* "Makefile"
11588 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11589 (string-append nose "/bin/nosetests "))))
11590 #t)))
11591 (replace 'check
11592 (lambda _
11593 (setenv "PYTHON" (or (which "python3") (which "python")))
11594 (setenv "PYCONFIG" (or (which "python3-config")
11595 (which "python-config")))
11596 (setenv "CC" "gcc")
11597 ;; No need to extend PYTHONPATH to find the built package, since
11598 ;; the Makefile will build anyway
11599 (invoke "make" "check"))))))
11600 (native-inputs
11601 `(("procps" ,procps))) ; required for tests
11602 (home-page
11603 "https://github.com/dvarrazzo/py-setproctitle")
11604 (synopsis
11605 "Setproctitle implementation for Python to customize the process title")
11606 (description "The library allows a process to change its title (as displayed
11607 by system tools such as ps and top).
11608
11609 Changing the title is mostly useful in multi-process systems, for
11610 example when a master process is forked: changing the children's title
11611 allows to identify the task each process is busy with. The technique
11612 is used by PostgreSQL and the OpenSSH Server for example.")
11613 (license license:bsd-3)
11614 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11615
11616 (define-public python2-setproctitle
11617 (let ((base (package-with-python2
11618 (strip-python2-variant python-setproctitle))))
11619 (package
11620 (inherit base)
11621 (native-inputs `(("python2-nose" ,python2-nose)
11622 ,@(package-native-inputs base))))))
11623
11624 (define-public python-validictory
11625 (package
11626 (name "python-validictory")
11627 (version "1.0.1")
11628 (source
11629 (origin
11630 (method url-fetch)
11631 (uri (pypi-uri "validictory" version))
11632 (sha256
11633 (base32
11634 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11635 (build-system python-build-system)
11636 (arguments
11637 '(#:phases
11638 (modify-phases %standard-phases
11639 (add-after 'unpack 'bootstrap
11640 ;; Move the tests out of the package directory to avoid
11641 ;; packaging them.
11642 (lambda* _
11643 (rename-file "validictory/tests" "tests")
11644 (delete-file "tests/__init__.py")))
11645 (replace 'check
11646 (lambda _
11647 ;; Extend PYTHONPATH so the built package will be found.
11648 (setenv "PYTHONPATH"
11649 (string-append (getcwd) "/build/lib:"
11650 (getenv "PYTHONPATH")))
11651 (invoke "py.test" "-vv" ))))))
11652 (native-inputs
11653 `(("python-pytest" ,python-pytest)))
11654 (home-page
11655 "https://github.com/jamesturk/validictory")
11656 (synopsis "General purpose Python data validator")
11657 (description "It allows validation of arbitrary Python data structures.
11658
11659 The schema format is based on the JSON Schema
11660 proposal (http://json-schema.org), so combined with json the library is also
11661 useful as a validator for JSON data.")
11662 (license license:expat)))
11663
11664 (define-public python2-validictory
11665 (package-with-python2 python-validictory))
11666
11667 (define-public python-pyelftools
11668 (package
11669 (name "python-pyelftools")
11670 (version "0.25")
11671 (source
11672 (origin
11673 (method url-fetch)
11674 (uri (pypi-uri "pyelftools" version))
11675 (sha256
11676 (base32
11677 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11678 (build-system python-build-system)
11679 (arguments
11680 `(#:phases
11681 (modify-phases %standard-phases
11682 (add-before 'check 'set-pythonpath
11683 (lambda _
11684 (setenv "PYTHONPATH"
11685 (string-append
11686 (getcwd) "/test/"
11687 ":" (getenv "PYTHONPATH")))
11688 #t)))))
11689 (home-page
11690 "https://github.com/eliben/pyelftools")
11691 (synopsis
11692 "Analyze binary and library file information")
11693 (description "This Python library provides interfaces for parsing and
11694 analyzing two binary and library file formats; the Executable and Linking
11695 Format (ELF), and debugging information in the Debugging With Attributed
11696 Record Format (DWARF).")
11697 (license license:public-domain)))
11698
11699 (define-public python-pyev
11700 (package
11701 (name "python-pyev")
11702 (version "0.9.0")
11703 (source
11704 (origin
11705 (method url-fetch)
11706 (uri (pypi-uri "pyev" version))
11707 (sha256
11708 (base32
11709 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11710 (build-system python-build-system)
11711 (arguments
11712 `(#:tests? #f ; no test suite
11713 #:phases
11714 (modify-phases %standard-phases
11715 (add-after 'unpack 'patch
11716 (lambda* (#:key inputs #:allow-other-keys)
11717 (let ((libev (string-append (assoc-ref inputs "libev")
11718 "/lib/libev.so.4")))
11719 (substitute* "setup.py"
11720 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11721 (string-append "libev_dll_name = \"" libev "\"")))))))))
11722 (inputs
11723 `(("libev" ,libev)))
11724 (home-page "http://pythonhosted.org/pyev/")
11725 (synopsis "Python libev interface")
11726 (description "Pyev provides a Python interface to libev.")
11727 (license license:gpl3)))
11728
11729 (define-public python2-pyev
11730 (package-with-python2 python-pyev))
11731
11732 (define-public python-imagesize
11733 (package
11734 (name "python-imagesize")
11735 (version "1.1.0")
11736 (source
11737 (origin
11738 (method url-fetch)
11739 (uri (pypi-uri "imagesize" version))
11740 (sha256
11741 (base32
11742 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11743 (build-system python-build-system)
11744 (home-page "https://github.com/shibukawa/imagesize_py")
11745 (synopsis "Gets image size of files in various formats in Python")
11746 (description
11747 "This package allows determination of image size from
11748 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11749 (license license:expat)))
11750
11751 (define-public python2-imagesize
11752 (package-with-python2 python-imagesize))
11753
11754 (define-public python-termstyle
11755 (package
11756 (name "python-termstyle")
11757 (version "0.1.11")
11758 (source
11759 (origin
11760 (method url-fetch)
11761 (uri (pypi-uri "termstyle" version))
11762 (sha256
11763 (base32
11764 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11765 (build-system python-build-system)
11766 (arguments
11767 '(#:phases
11768 (modify-phases %standard-phases
11769 (replace 'check
11770 (lambda _
11771 (invoke "python" "test3.py"))))))
11772 (home-page "https://github.com/gfxmonk/termstyle")
11773 (synopsis "Console text coloring for Python")
11774 (description "This package provides console text coloring for Python.")
11775 (license license:bsd-3)))
11776
11777 (define-public python-argcomplete
11778 (package
11779 (name "python-argcomplete")
11780 (version "1.10.3")
11781 (source
11782 (origin
11783 (method url-fetch)
11784 (uri (pypi-uri "argcomplete" version))
11785 (sha256
11786 (base32
11787 "02jkc44drb0yjz6x28lvg6rj607n8r2irdpdvyylm8xnycn54zx3"))))
11788 (build-system python-build-system)
11789 (arguments
11790 `(#:phases
11791 (modify-phases %standard-phases
11792 (add-after 'unpack 'embed-tool-references
11793 (lambda _
11794 (substitute* "argcomplete/bash_completion.d/python-argcomplete.sh"
11795 ((" grep")
11796 (string-append " " (which "grep")))
11797 ((" egrep")
11798 (string-append " " (which "egrep")))
11799 (("elif which")
11800 (string-append "elif " (which "which")))
11801 (("\\$\\(which")
11802 (string-append "$(" (which "which"))))
11803 #t)))))
11804 (inputs
11805 `(("grep" ,grep)
11806 ("which" ,which)))
11807 (native-inputs
11808 `(("python-coverage" ,python-coverage)
11809 ("python-flake8" ,python-flake8)
11810 ("python-pexpect" ,python-pexpect)
11811 ("python-wheel" ,python-wheel)
11812 ("tcsh" ,tcsh)
11813 ("fish" ,fish)
11814 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
11815 (home-page "https://github.com/kislyuk/argcomplete")
11816 (synopsis "Shell tab completion for Python argparse")
11817 (description "argcomplete provides extensible command line tab completion
11818 of arguments and options for Python scripts using @code{argparse}. It's
11819 particularly useful for programs with many options or sub-parsers that can
11820 dynamically suggest completions; for example, when browsing resources over the
11821 network.")
11822 (license license:asl2.0)))
11823
11824 (define-public python2-argcomplete
11825 (package-with-python2 python-argcomplete))
11826
11827 (define-public python-xopen
11828 (package
11829 (name "python-xopen")
11830 (version "0.5.0")
11831 (source
11832 (origin
11833 (method url-fetch)
11834 (uri (pypi-uri "xopen" version))
11835 (sha256
11836 (base32
11837 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
11838 (build-system python-build-system)
11839 (propagated-inputs
11840 `(("python-setuptools-scm" ,python-setuptools-scm)))
11841 (home-page "https://github.com/marcelm/xopen/")
11842 (synopsis "Open compressed files transparently")
11843 (description "This module provides an @code{xopen} function that works like
11844 Python's built-in @code{open} function, but can also deal with compressed files.
11845 Supported compression formats are gzip, bzip2 and, xz, and are automatically
11846 recognized by their file extensions. The focus is on being as efficient as
11847 possible on all supported Python versions.")
11848 (license license:expat)))
11849
11850 (define-public python2-xopen
11851 (let ((base (package-with-python2
11852 (strip-python2-variant python-xopen))))
11853 (package
11854 (inherit base)
11855 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
11856 ,@(package-propagated-inputs base))))))
11857
11858 (define-public python-cheetah
11859 (package
11860 (name "python-cheetah")
11861 (version "3.1.0")
11862 (source
11863 (origin
11864 (method url-fetch)
11865 (uri (pypi-uri "Cheetah3" version))
11866 (sha256
11867 (base32
11868 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
11869 (build-system python-build-system)
11870 (arguments
11871 `(#:modules ((guix build utils)
11872 (guix build python-build-system)
11873 (ice-9 ftw)
11874 (srfi srfi-1)
11875 (srfi srfi-26))
11876 #:phases (modify-phases %standard-phases
11877 (add-after 'unpack 'use-absolute-python
11878 (lambda _
11879 (substitute* "Cheetah/CheetahWrapper.py"
11880 (("#!/usr/bin/env python")
11881 (string-append "#!" (which "python"))))
11882 #t))
11883 (replace 'check
11884 (lambda _
11885 (let ((cwd (getcwd)))
11886 (setenv "PYTHONPATH"
11887 (string-append
11888 cwd "/build/"
11889 (find (cut string-prefix? "lib" <>)
11890 (scandir (string-append cwd "/build")))
11891 ":" (getenv "PYTHONPATH")))
11892 (setenv "PATH"
11893 (string-append (getenv "PATH")
11894 ":" cwd "/bin"))
11895 (setenv "TMPDIR" "/tmp")
11896
11897 (substitute* "Cheetah/Tests/Test.py"
11898 (("unittest.TextTestRunner\\(\\)")
11899 "unittest.TextTestRunner(verbosity=2)"))
11900
11901 (invoke "python" "Cheetah/Tests/Test.py")))))))
11902 (propagated-inputs
11903 `(("python-markdown" ,python-markdown))) ;optional
11904 (home-page "http://cheetahtemplate.org/")
11905 (synopsis "Template engine")
11906 (description "Cheetah is a text-based template engine and Python code
11907 generator.
11908
11909 Cheetah can be used as a standalone templating utility or referenced as
11910 a library from other Python applications. It has many potential uses,
11911 but web developers looking for a viable alternative to ASP, JSP, PHP and
11912 PSP are expected to be its principle user group.
11913
11914 Features:
11915 @enumerate
11916 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
11917 text-based format.
11918 @item Cleanly separates content, graphic design, and program code.
11919 @item Blends the power and flexibility of Python with a simple template language
11920 that non-programmers can understand.
11921 @item Gives template writers full access to any Python data structure, module,
11922 function, object, or method in their templates.
11923 @item Makes code reuse easy by providing an object-orientated interface to
11924 templates that is accessible from Python code or other Cheetah templates.
11925 One template can subclass another and selectively reimplement sections of it.
11926 @item Provides a simple, yet powerful, caching mechanism that can dramatically
11927 improve the performance of a dynamic website.
11928 @item Compiles templates into optimized, yet readable, Python code.
11929 @end enumerate")
11930 (license (license:x11-style "file://LICENSE"))))
11931
11932 (define-public python2-cheetah
11933 (package-with-python2 python-cheetah))
11934
11935 (define-public python-dulwich
11936 (package
11937 (name "python-dulwich")
11938 (version "0.18.6")
11939 (source
11940 (origin
11941 (method url-fetch)
11942 (uri (list (string-append "https://www.dulwich.io/releases/"
11943 "dulwich-" version ".tar.gz")
11944 (pypi-uri "dulwich" version)))
11945 (sha256
11946 (base32
11947 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
11948 (build-system python-build-system)
11949 (arguments
11950 `(#:phases
11951 (modify-phases %standard-phases
11952 (add-before 'check 'fix-tests
11953 (lambda* (#:key inputs #:allow-other-keys)
11954 ;; The tests use Popen with a custom environment which doesn't
11955 ;; include PATH.
11956 (substitute* "dulwich/tests/compat/utils.py"
11957 (("'git'") (string-append "'"
11958 (which "git")
11959 "'")))
11960 (substitute* '("dulwich/tests/test_repository.py"
11961 "dulwich/tests/test_hooks.py")
11962 (("#!/bin/sh") (string-append "#!" (which "sh"))))
11963 (setenv "TEST_RUNNER" "unittest")
11964 (setenv "PYTHONHASHSEED" "random")
11965 #t)))))
11966 (propagated-inputs
11967 `(("python-fastimport" ,python-fastimport)))
11968 (native-inputs
11969 `(("python-mock" ,python-mock)
11970 ("python-geventhttpclient" ,python-geventhttpclient)
11971 ("git" ,git)))
11972 (home-page "https://www.dulwich.io/")
11973 (synopsis "Git implementation in Python")
11974 (description "Dulwich is an implementation of the Git file formats and
11975 protocols written in pure Python.")
11976 ;; Can be used with either license.
11977 (license (list license:asl2.0 license:gpl2+))))
11978
11979 (define-public python2-dulwich
11980 (package-with-python2 python-dulwich))
11981
11982 (define-public python-pbkdf2
11983 (package
11984 (name "python-pbkdf2")
11985 (version "1.3")
11986 (source
11987 (origin
11988 (method url-fetch)
11989 (uri (pypi-uri "pbkdf2" version))
11990 (sha256
11991 (base32
11992 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
11993 (build-system python-build-system)
11994 (arguments
11995 '(#:phases
11996 (modify-phases %standard-phases
11997 (replace 'check
11998 (lambda _
11999 (setenv "PYTHONPATH"
12000 (string-append (getcwd) "/build/lib:"
12001 (getenv "PYTHONPATH")))
12002 (invoke "python" "test/test_pbkdf2.py"))))))
12003 (propagated-inputs
12004 `(("python-pycrypto" ,python-pycrypto))) ; optional
12005 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
12006 (synopsis "Password-based key derivation")
12007 (description "This module implements the password-based key derivation
12008 function, PBKDF2, specified in RSA PKCS#5 v2.0.
12009
12010 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
12011 is part of the RSA Public Key Cryptography Standards series. The provided
12012 implementation takes a password or a passphrase and a salt value (and
12013 optionally a iteration count, a digest module, and a MAC module) and provides
12014 a file-like object from which an arbitrarly-sized key can be read.")
12015 (license license:expat)))
12016
12017 (define-public python2-pbkdf2
12018 (package-with-python2 python-pbkdf2))
12019
12020 (define-public python-qrcode
12021 (package
12022 (name "python-qrcode")
12023 (version "6.1")
12024 (source
12025 (origin
12026 (method url-fetch)
12027 (uri (pypi-uri "qrcode" version))
12028 (sha256
12029 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
12030 (build-system python-build-system)
12031 (arguments
12032 ;; FIXME: Tests require packaging 'pymaging'.
12033 '(#:tests? #f))
12034 (propagated-inputs
12035 `(("python-lxml" ,python-lxml) ; for SVG output
12036 ("python-pillow" ,python-pillow) ; for PNG output
12037 ("python-six" ,python-six)))
12038 (home-page "https://github.com/lincolnloop/python-qrcode")
12039 (synopsis "QR Code image generator")
12040 (description "This package provides a pure Python QR Code generator
12041 module. It uses the Python Imaging Library (PIL) to allow for the generation
12042 of QR Codes.
12043
12044 In addition this package provides a command line tool to generate QR codes and
12045 either write these QR codes to a file or do the output as ascii art at the
12046 console.")
12047 (license license:bsd-3)))
12048
12049 (define-public python2-qrcode
12050 (package-with-python2 python-qrcode))
12051
12052 (define-public python-rst2ansi
12053 (package
12054 (name "python-rst2ansi")
12055 (version "0.1.5")
12056 (source
12057 (origin
12058 (method url-fetch)
12059 (uri (pypi-uri "rst2ansi" version))
12060 (sha256
12061 (base32
12062 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
12063 (build-system python-build-system)
12064 (propagated-inputs
12065 `(("python-docutils" ,python-docutils)))
12066 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
12067 (synopsis "Convert RST to ANSI-decorated console output")
12068 (description
12069 "Python module dedicated to rendering RST (reStructuredText) documents
12070 to ansi-escaped strings suitable for display in a terminal.")
12071 (license license:expat)))
12072
12073 (define-public python-ansi2html
12074 (package
12075 (name "python-ansi2html")
12076 (version "1.2.0")
12077 (source
12078 (origin
12079 (method url-fetch)
12080 (uri (pypi-uri "ansi2html" version))
12081 (sha256
12082 (base32
12083 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
12084 (build-system python-build-system)
12085 (native-inputs
12086 `(("python-mock" ,python-mock)
12087 ("python-nose" ,python-nose)))
12088 (propagated-inputs
12089 `(("python-six" ,python-six)))
12090 (home-page "https://github.com/ralphbean/ansi2html")
12091 (synopsis "Convert ANSI-decorated console output to HTML")
12092 (description
12093 "@command{ansi2html} is a Python library and command line utility for
12094 convering text with ANSI color codes to HTML or LaTeX.")
12095 (license license:gpl3+)))
12096
12097 (define-public python2-ansi2html
12098 (package-with-python2 python-ansi2html))
12099
12100 (define-public python-ddt
12101 (package
12102 (name "python-ddt")
12103 (version "1.1.3")
12104 (source
12105 (origin
12106 (method url-fetch)
12107 (uri (pypi-uri "ddt" version))
12108 (sha256
12109 (base32
12110 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
12111 (build-system python-build-system)
12112 (native-inputs
12113 `(("python-mock" ,python-mock)
12114 ("python-nose" ,python-nose)))
12115 (propagated-inputs
12116 `(("python-six" ,python-six)
12117 ("python-pyyaml" ,python-pyyaml)))
12118 (home-page "https://github.com/txels/ddt")
12119 (synopsis "Data-Driven Tests")
12120 (description
12121 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
12122 running it with different test data, and make it appear as multiple test
12123 cases.")
12124 (license license:expat)))
12125
12126 (define-public python2-ddt
12127 (package-with-python2 python-ddt))
12128
12129 (define-public python-pycountry
12130 (package
12131 (name "python-pycountry")
12132 (version "18.5.26")
12133 (source
12134 (origin
12135 (method url-fetch)
12136 (uri (pypi-uri "pycountry" version))
12137 (sha256
12138 (base32
12139 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
12140 (build-system python-build-system)
12141 (home-page "https://bitbucket.org/flyingcircus/pycountry")
12142 (synopsis "ISO databases for languages, countries, currencies, etc.")
12143 (description
12144 "@code{pycountry} provides the ISO databases for the standards:
12145 @enumerate
12146 @item 639-3 (Languages)
12147 @item 3166 (Countries)
12148 @item 3166-3 (Deleted Countries)
12149 @item 3166-2 (Subdivisions of countries)
12150 @item 4217 (Currencies)
12151 @item 15924 (Scripts)
12152 @end enumerate
12153 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
12154 through a Python API.")
12155 (license license:lgpl2.1+)))
12156
12157 (define-public python2-pycountry
12158 (package-with-python2 python-pycountry))
12159
12160 (define-public python-pycosat
12161 (package
12162 (name "python-pycosat")
12163 (version "0.6.1")
12164 (source
12165 (origin
12166 (method url-fetch)
12167 (uri (pypi-uri "pycosat" version))
12168 (sha256
12169 (base32
12170 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
12171 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
12172 (build-system python-build-system)
12173 (home-page "https://github.com/ContinuumIO/pycosat")
12174 (synopsis "Bindings to picosat (a SAT solver)")
12175 (description
12176 "This package provides efficient Python bindings to @code{picosat} on
12177 the C level. When importing pycosat, the @code{picosat} solver becomes part
12178 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
12179 Problem} (SAT) solver.")
12180 (license license:expat)))
12181
12182 (define-public python2-pycosat
12183 (package-with-python2 python-pycosat))
12184
12185 (define-public python2-ruamel.ordereddict
12186 (package
12187 (name "python2-ruamel.ordereddict")
12188 (version "0.4.9")
12189 (source
12190 (origin
12191 (method url-fetch)
12192 (uri (pypi-uri "ruamel.ordereddict" version))
12193 (sha256
12194 (base32
12195 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
12196 (build-system python-build-system)
12197 (arguments
12198 `(#:python ,python-2
12199 #:phases
12200 (modify-phases %standard-phases
12201 (delete 'check)
12202 (add-after 'install 'check
12203 (lambda* (#:key inputs outputs #:allow-other-keys)
12204 (add-installed-pythonpath inputs outputs)
12205 (invoke "python" "test/testordereddict.py"))))))
12206 (home-page "https://bitbucket.org/ruamel/ordereddict")
12207 (synopsis "Version of dict that keeps keys in insertion order")
12208 (description
12209 "This is an implementation of an ordered dictionary with @dfn{Key
12210 Insertion Order} (KIO: updates of values do not affect the position of the
12211 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
12212 removed and put at the back). The standard library module @code{OrderedDict},
12213 implemented later, implements a subset of @code{ordereddict} functionality.
12214 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
12215 Order} (KSO, no sorting function can be specified, but a transform can be
12216 specified to apply on the key before comparison (e.g. @code{string.lower})).")
12217 (license license:expat)))
12218
12219 (define-public python-pypeg2
12220 (package
12221 (name "python-pypeg2")
12222 (version "2.15.2")
12223 (source
12224 (origin
12225 (method url-fetch)
12226 (uri (pypi-uri "pyPEG2" version))
12227 (sha256
12228 (base32
12229 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
12230 (build-system python-build-system)
12231 (propagated-inputs `(("python-lxml" ,python-lxml)))
12232 (arguments
12233 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
12234 '(#:tests? #f))
12235 (home-page "https://fdik.org/pyPEG/")
12236 (synopsis "Parsering Expression Grammars in Python")
12237 (description "PyPEG is an intrinsic parser interpreter framework for
12238 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
12239 parse many formal languages.")
12240 (license license:gpl2)))
12241
12242 (define-public python-incremental
12243 (package
12244 (name "python-incremental")
12245 (version "17.5.0")
12246 (source
12247 (origin
12248 (method url-fetch)
12249 (uri (pypi-uri "incremental" version))
12250 (sha256
12251 (base32
12252 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
12253 (build-system python-build-system)
12254 (home-page "https://github.com/hawkowl/incremental")
12255 (synopsis "Library for versioning Python projects")
12256 (description "Incremental is a small library that versions your Python
12257 projects.")
12258 (license license:expat)))
12259
12260 (define-public python2-incremental
12261 (package-with-python2 python-incremental))
12262
12263 (define-public python-invoke
12264 (package
12265 (name "python-invoke")
12266 (home-page "http://www.pyinvoke.org/")
12267 (version "1.3.0")
12268 (source (origin
12269 (method url-fetch)
12270 (uri (pypi-uri "invoke" version))
12271 (sha256
12272 (base32
12273 "1nn7gad0rvy492acpyhkrp01zsk86acf34qhsvq4xmm6x39788n5"))))
12274 (build-system python-build-system)
12275 (arguments
12276 ;; XXX: Requires many dependencies that are not yet in Guix.
12277 `(#:tests? #f))
12278 (synopsis "Pythonic task execution")
12279 (description
12280 "Invoke is a Python task execution tool and library, drawing inspiration
12281 from various sources to arrive at a powerful and clean feature set. It is
12282 evolved from the Fabric project, but focuses on local and abstract concerns
12283 instead of servers and network commands.")
12284 (license license:bsd-3)))
12285
12286 (define-public python2-invoke
12287 (package-with-python2 python-invoke))
12288
12289 (define-public python-automat
12290 (package
12291 (name "python-automat")
12292 (version "0.7.0")
12293 (source (origin
12294 (method url-fetch)
12295 (uri (pypi-uri "Automat" version))
12296 (sha256
12297 (base32
12298 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
12299 (build-system python-build-system)
12300 ;; We disable the tests because they require python-twisted, while
12301 ;; python-twisted depends on python-automat. Twisted is optional, but the
12302 ;; tests fail if it is not available. Also see
12303 ;; <https://github.com/glyph/automat/issues/71>.
12304 (arguments '(#:tests? #f))
12305 (native-inputs
12306 `(("python-m2r" ,python-m2r)
12307 ("python-setuptools-scm" ,python-setuptools-scm)
12308 ("python-graphviz" ,python-graphviz)))
12309 (propagated-inputs
12310 `(("python-six" ,python-six)
12311 ("python-attrs" ,python-attrs)))
12312 (home-page "https://github.com/glyph/Automat")
12313 (synopsis "Self-service finite-state machines")
12314 (description "Automat is a library for concise, idiomatic Python
12315 expression of finite-state automata (particularly deterministic finite-state
12316 transducers).")
12317 (license license:expat)))
12318
12319 (define-public python2-automat
12320 (package-with-python2 python-automat))
12321
12322 (define-public python-m2r
12323 (package
12324 (name "python-m2r")
12325 (version "0.2.1")
12326 (source (origin
12327 (method url-fetch)
12328 (uri (pypi-uri "m2r" version))
12329 (sha256
12330 (base32
12331 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
12332 (build-system python-build-system)
12333 (propagated-inputs
12334 `(("python-docutils" ,python-docutils)
12335 ("python-mistune" ,python-mistune)))
12336 (native-inputs
12337 `(("python-pygments" ,python-pygments)
12338 ("python-mock" ,python-mock)))
12339 (home-page "https://github.com/miyakogi/m2r")
12340 (synopsis "Markdown to reStructuredText converter")
12341 (description "M2R converts a markdown file including reST markups to valid
12342 reST format.")
12343 (license license:expat)))
12344
12345 (define-public python2-m2r
12346 (package-with-python2 python-m2r))
12347
12348 (define-public python-constantly
12349 (package
12350 (name "python-constantly")
12351 (version "15.1.0")
12352 (source (origin
12353 (method url-fetch)
12354 (uri (pypi-uri "constantly" version))
12355 (sha256
12356 (base32
12357 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
12358 (build-system python-build-system)
12359 (home-page "https://github.com/twisted/constantly")
12360 (synopsis "Symbolic constants in Python")
12361 (description "Constantly is a Python library that provides symbolic
12362 constant support. It includes collections and constants with text, numeric,
12363 and bit flag values.")
12364 (license license:expat)))
12365
12366 (define-public python2-constantly
12367 (package-with-python2 python-constantly))
12368
12369 (define-public python-attrs
12370 (package
12371 (name "python-attrs")
12372 (version "19.1.0")
12373 (source (origin
12374 (method url-fetch)
12375 (uri (pypi-uri "attrs" version))
12376 (sha256
12377 (base32
12378 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
12379 (build-system python-build-system)
12380 (arguments
12381 `(#:modules ((guix build utils)
12382 (guix build python-build-system)
12383 (ice-9 ftw)
12384 (srfi srfi-1)
12385 (srfi srfi-26))
12386 #:phases (modify-phases %standard-phases
12387 (replace 'check
12388 (lambda _
12389 (let ((cwd (getcwd)))
12390 (setenv "PYTHONPATH"
12391 (string-append
12392 cwd "/build/"
12393 (find (cut string-prefix? "lib" <>)
12394 (scandir (string-append cwd "/build")))
12395 ":"
12396 (getenv "PYTHONPATH")))
12397 (invoke "python" "-m" "pytest")))))))
12398 (native-inputs
12399 `(("python-coverage" ,python-coverage)
12400 ("python-hypothesis" ,python-hypothesis)
12401 ("python-pympler" ,python-pympler)
12402 ("python-pytest" ,python-pytest)
12403 ("python-six" ,python-six)
12404 ("python-sphinx" ,python-sphinx)
12405 ("python-zope-interface" ,python-zope-interface)))
12406 (home-page "https://github.com/python-attrs/attrs/")
12407 (synopsis "Attributes without boilerplate")
12408 (description "@code{attrs} is a Python package with class decorators that
12409 ease the chores of implementing the most common attribute-related object
12410 protocols.")
12411 (license license:expat)))
12412
12413 (define-public python2-attrs
12414 (package-with-python2 python-attrs))
12415
12416 (define-public python-attrs-bootstrap
12417 (package
12418 (inherit python-attrs)
12419 (name "python-attrs-bootstrap")
12420 (native-inputs `())
12421 (arguments `(#:tests? #f))))
12422
12423 (define-public python2-attrs-bootstrap
12424 (package-with-python2 python-attrs-bootstrap))
12425
12426 (define-public python2-cliapp
12427 (package
12428 (name "python2-cliapp")
12429 (version "1.20180812.1")
12430 (source
12431 (origin
12432 (method url-fetch)
12433 (uri (string-append
12434 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
12435 version ".tar.gz"))
12436 (sha256
12437 (base32
12438 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
12439 (build-system python-build-system)
12440 (arguments
12441 `(#:python ,python-2
12442 #:phases
12443 (modify-phases %standard-phases
12444 ;; check phase needs to be run before the build phase. If not,
12445 ;; coverage-test-runner looks for tests for the built source files,
12446 ;; and fails.
12447 (delete 'check)
12448 (add-before 'build 'check
12449 (lambda _
12450 ;; Disable python3 tests
12451 (substitute* "check"
12452 (("python3") "# python3"))
12453 (invoke "./check"))))))
12454 (native-inputs
12455 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12456 ("python2-pep8" ,python2-pep8)))
12457 (propagated-inputs
12458 `(("python2-pyaml" ,python2-pyaml)))
12459 (home-page "https://liw.fi/cliapp/")
12460 (synopsis "Python framework for command line programs")
12461 (description "@code{python2-cliapp} is a python framework for
12462 command line programs. It contains the typical stuff such programs
12463 need to do, such as parsing the command line for options, and
12464 iterating over input files.")
12465 (license license:gpl2+)))
12466
12467 (define-public python2-ttystatus
12468 (package
12469 (name "python2-ttystatus")
12470 (version "0.36")
12471 (source
12472 (origin
12473 (method url-fetch)
12474 (uri (string-append
12475 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
12476 version ".tar.gz"))
12477 (sha256
12478 (base32
12479 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
12480 (build-system python-build-system)
12481 (native-inputs
12482 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12483 ("python2-pep8" ,python2-pep8)))
12484 (arguments
12485 `(#:python ,python-2
12486 #:phases
12487 (modify-phases %standard-phases
12488 ;; check phase needs to be run before the build phase. If not,
12489 ;; coverage-test-runner looks for tests for the built source files,
12490 ;; and fails.
12491 (delete 'check)
12492 (add-before 'build 'check
12493 (lambda _ (invoke "make" "check"))))))
12494 (home-page "https://liw.fi/ttystatus/")
12495 (synopsis "Python library for showing progress reporting and
12496 status updates on terminals")
12497 (description "@code{python2-ttystatus} is a python library for
12498 showing progress reporting and status updates on terminals, for
12499 command line programs. Output is automatically adapted to the width
12500 of the terminal: truncated if it does not fit, and resized if the
12501 terminal size changes.")
12502 (license license:gpl3+)))
12503
12504 (define-public python2-tracing
12505 (package
12506 (name "python2-tracing")
12507 (version "0.10")
12508 (source
12509 (origin
12510 (method url-fetch)
12511 (uri (string-append
12512 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
12513 version ".tar.gz"))
12514 (sha256
12515 (base32
12516 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
12517 (build-system python-build-system)
12518 (arguments
12519 `(#:python ,python-2))
12520 (home-page "https://liw.fi/tracing/")
12521 (synopsis "Python debug logging helper")
12522 (description "@code{python2-tracing} is a python library for
12523 logging debug messages. It provides a way to turn debugging messages
12524 on and off, based on the filename they occur in. It is much faster
12525 than using @code{logging.Filter} to accomplish the same thing, which
12526 matters when code is run in production mode. The actual logging still
12527 happens using the @code{logging} library.")
12528 (license license:gpl3+)))
12529
12530 (define-public python2-larch
12531 (package
12532 (name "python2-larch")
12533 (version "1.20151025")
12534 (source
12535 (origin
12536 (method url-fetch)
12537 (uri (string-append
12538 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12539 version ".tar.gz"))
12540 (patches (search-patches
12541 "python2-larch-coverage-4.0a6-compatibility.patch"))
12542 (sha256
12543 (base32
12544 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12545 (build-system python-build-system)
12546 (arguments
12547 `(#:python ,python-2
12548 #:phases
12549 (modify-phases %standard-phases
12550 ;; check phase needs to be run before the build phase. If not,
12551 ;; coverage-test-runner looks for tests for the built source files,
12552 ;; and fails.
12553 (delete 'check)
12554 (add-before 'build 'check
12555 (lambda _ (invoke "make" "check"))))))
12556 (native-inputs
12557 `(("cmdtest" ,cmdtest)
12558 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12559 (propagated-inputs
12560 `(("python2-tracing" ,python2-tracing)))
12561 (home-page "https://liw.fi/larch/")
12562 (synopsis "Python copy-on-write B-tree library")
12563 (description "@code{python2-larch} is an implementation of
12564 particular kind of B-tree, based on research by Ohad Rodeh. See
12565 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12566 on the data structure.
12567
12568 The distinctive feature of this B-tree is that a node is never
12569 (conceptually) modified. Instead, all updates are done by
12570 copy-on-write. This makes it easy to clone a tree, and modify only the
12571 clone, while other processes access the original tree.")
12572 (license license:gpl3+)))
12573
12574 (define-public python-astroid
12575 (package
12576 (name "python-astroid")
12577 (version "2.3.3")
12578 (source
12579 (origin
12580 (method url-fetch)
12581 (uri (pypi-uri "astroid" version))
12582 (sha256
12583 (base32 "0fnibsl2cb5mvzbfm7sycj85smx48f8w8m7ks1sqlmpr9ps0gski"))))
12584 (build-system python-build-system)
12585 (propagated-inputs
12586 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12587 ("python-six" ,python-six)
12588 ("python-typed-ast" ,python-typed-ast)
12589 ("python-wrapt" ,python-wrapt)))
12590 (native-inputs
12591 `(("python-dateutil" ,python-dateutil)
12592 ("python-nose" ,python-nose)
12593 ("python-pytest" ,python-pytest)
12594 ("python-pytest-runner" ,python-pytest-runner)))
12595 (arguments
12596 `(#:phases
12597 (modify-phases %standard-phases
12598 (add-after 'unpack 'remove-spurious-test
12599 (lambda _
12600 ;; This can be removed after upgrading from python-3.7
12601 ;; https://github.com/PyCQA/astroid/issues/593
12602 ;; https://bugs.python.org/issue34056
12603 (delete-file "astroid/tests/unittest_modutils.py")
12604 #t))
12605 (replace 'check
12606 (lambda _
12607 (invoke "pytest" "astroid"))))))
12608 (home-page "https://github.com/PyCQA/astroid")
12609 (synopsis "Common base representation of python source code for pylint and
12610 other projects")
12611 (description "@code{python-astroid} provides a common base representation
12612 of python source code for projects such as pychecker, pyreverse, pylint, etc.
12613
12614 It provides a compatible representation which comes from the _ast module. It
12615 rebuilds the tree generated by the builtin _ast module by recursively walking
12616 down the AST and building an extended ast. The new node classes have
12617 additional methods and attributes for different usages. They include some
12618 support for static inference and local name scopes. Furthermore, astroid
12619 builds partial trees by inspecting living objects.")
12620 (license license:lgpl2.1+)
12621 (properties `((python2-variant . ,(delay python2-astroid))))))
12622
12623 (define-public python2-astroid
12624 (let ((base (package-with-python2
12625 (strip-python2-variant python-astroid))))
12626 (package (inherit base)
12627 ;; Version 2.x removes python2 support.
12628 (version "1.6.5")
12629 (source
12630 (origin
12631 (method url-fetch)
12632 (uri (pypi-uri "astroid" version))
12633 (sha256
12634 (base32
12635 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12636 (arguments
12637 (substitute-keyword-arguments (package-arguments base)
12638 ((#:phases phases)
12639 `(modify-phases ,phases
12640 (add-after 'unpack 'remove-spurious-test
12641 (lambda _
12642 ;; https://github.com/PyCQA/astroid/issues/276
12643 (delete-file "astroid/tests/unittest_brain.py")
12644 #t))
12645 (replace 'check
12646 (lambda _
12647 (invoke"python" "-m" "unittest" "discover"
12648 "-p" "unittest*.py")))))))
12649 (native-inputs `())
12650 (propagated-inputs
12651 `(("python2-backports-functools-lru-cache"
12652 ,python2-backports-functools-lru-cache)
12653 ("python2-enum34" ,python2-enum34)
12654 ("python2-singledispatch" ,python2-singledispatch)
12655 ,@(alist-delete "python-typed-ast"
12656 (package-propagated-inputs base)))))))
12657
12658 (define-public python-isort
12659 (package
12660 (name "python-isort")
12661 (version "4.3.4")
12662 (source
12663 (origin
12664 (method git-fetch)
12665 (uri (git-reference
12666 ;; Tests pass only from the Github sources
12667 (url "https://github.com/timothycrosley/isort")
12668 (commit version)))
12669 (file-name (git-file-name name version))
12670 (sha256
12671 (base32
12672 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
12673 (build-system python-build-system)
12674 (native-inputs
12675 `(("python-mock" ,python-mock)
12676 ("python-pytest" ,python-pytest)))
12677 (home-page "https://github.com/timothycrosley/isort")
12678 (synopsis "Python utility/library to sort python imports")
12679 (description "@code{python-isort} is a python utility/library to sort
12680 imports alphabetically, and automatically separated into sections. It
12681 provides a command line utility, a python library and plugins for various
12682 editors.")
12683 (license license:expat)
12684 (properties `((python2-variant . ,(delay python2-isort))))))
12685
12686 (define-public python2-isort
12687 (let ((base (package-with-python2
12688 (strip-python2-variant python-isort))))
12689 (package (inherit base)
12690 (native-inputs
12691 `(("python2-futures" ,python2-futures)
12692 ,@(package-native-inputs base))))))
12693
12694 (define-public python2-backports-functools-lru-cache
12695 (package
12696 (name "python2-backports-functools-lru-cache")
12697 (version "1.5")
12698 (source
12699 (origin
12700 (method url-fetch)
12701 ;; only the pypi tarballs contain the necessary metadata
12702 (uri (pypi-uri "backports.functools_lru_cache" version))
12703 (sha256
12704 (base32
12705 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12706 (build-system python-build-system)
12707 (native-inputs
12708 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12709 (arguments
12710 `(#:python ,python-2))
12711 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12712 (synopsis "Backport of functools.lru_cache from Python 3.3")
12713 (description "@code{python2-backports-functools-lru-cache} is a backport
12714 of @code{functools.lru_cache} from python 3.3.")
12715 (license license:expat)))
12716
12717 (define-public python-configparser
12718 (package
12719 (name "python-configparser")
12720 (version "3.7.1")
12721 (source
12722 (origin
12723 (method url-fetch)
12724 (uri (pypi-uri "configparser" version))
12725 (sha256
12726 (base32
12727 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
12728 (build-system python-build-system)
12729 (home-page "https://github.com/jaraco/configparser/")
12730 (synopsis "Backport of configparser from python 3.5")
12731 (description "@code{python-configparser} is a backport of
12732 @code{configparser} from Python 3.5 so that it can be used directly
12733 in other versions.")
12734 (license license:expat)))
12735
12736 (define-public python2-configparser
12737 (package-with-python2 python-configparser))
12738
12739 (define-public python-mando
12740 (package
12741 (name "python-mando")
12742 (version "0.6.4")
12743 (source (origin
12744 (method url-fetch)
12745 (uri (pypi-uri "mando" version))
12746 (sha256
12747 (base32
12748 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12749 (build-system python-build-system)
12750 (propagated-inputs
12751 `(("python-rst2ansi" ,python-rst2ansi)
12752 ("python-six" ,python-six)))
12753 (native-inputs
12754 `(("python-pytest" ,python-pytest)))
12755 (home-page "https://mando.readthedocs.org/")
12756 (synopsis
12757 "Wrapper around argparse, allowing creation of complete CLI applications")
12758 (description
12759 "This package is a wrapper around argparse, allowing you to write complete CLI
12760 applications in seconds while maintaining all the flexibility.")
12761 (license license:expat)))
12762
12763 (define-public python2-mando
12764 (package-with-python2 python-mando))
12765
12766 (define-public python2-argparse
12767 (package
12768 (name "python2-argparse")
12769 (version "1.4.0")
12770 (source
12771 (origin
12772 (method url-fetch)
12773 (uri (pypi-uri "argparse" version))
12774 (sha256
12775 (base32
12776 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12777 (build-system python-build-system)
12778 (arguments
12779 `(#:python ,python-2))
12780 (home-page "https://github.com/ThomasWaldmann/argparse/")
12781 (synopsis "Python command-line parsing library")
12782 (description
12783 "This package is mostly for people who want to have @code{argparse} on
12784 older Pythons because it was not part of the standard library back then.")
12785 (license license:psfl)))
12786
12787 (define-public python-fudge
12788 (package
12789 (name "python-fudge")
12790 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
12791 ;; package, which is currently the only use of this package.
12792 (version "0.9.6")
12793 (source
12794 (origin
12795 (method url-fetch)
12796 (uri (pypi-uri "fudge" version))
12797 (sha256
12798 (base32
12799 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
12800 (build-system python-build-system)
12801 (arguments
12802 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
12803 (home-page "https://github.com/fudge-py/fudge")
12804 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
12805 (description
12806 "Fudge is a Python module for using fake objects (mocks and stubs) to
12807 test real ones.
12808
12809 In readable Python code, you declare the methods available on your fake object
12810 and how they should be called. Then you inject that into your application and
12811 start testing. This declarative approach means you don’t have to record and
12812 playback actions and you don’t have to inspect your fakes after running code.
12813 If the fake object was used incorrectly then you’ll see an informative
12814 exception message with a traceback that points to the culprit.")
12815 (license license:expat)))
12816
12817 (define-public python2-fudge
12818 (package-with-python2 python-fudge))
12819
12820 (define-public python-mwclient
12821 (package
12822 (name "python-mwclient")
12823 (version "0.10.0")
12824 (source
12825 (origin
12826 (method git-fetch)
12827 ;; The PyPI version wouldn't contain tests.
12828 (uri (git-reference
12829 (url "https://github.com/mwclient/mwclient")
12830 (commit (string-append "v" version))))
12831 (file-name (git-file-name name version))
12832 (sha256
12833 (base32
12834 "1c3q6lwmb05yqywc4ya98ca7hsl15niili8rccl4n1yqp77c103v"))))
12835 (build-system python-build-system)
12836 (propagated-inputs
12837 `(("python-requests-oauthlib" ,python-requests-oauthlib)
12838 ("python-six" ,python-six)))
12839 (native-inputs
12840 `(("python-mock" ,python-mock)
12841 ("python-pytest" ,python-pytest)
12842 ("python-pytest-cov" ,python-pytest-cov)
12843 ("python-pytest-runner" ,python-pytest-runner)
12844 ("python-responses" ,python-responses)))
12845 (home-page "https://github.com/btongminh/mwclient")
12846 (synopsis "MediaWiki API client")
12847 (description "This package provides a MediaWiki API client.")
12848 (license license:expat)))
12849
12850 (define-public python2-mwclient
12851 (package-with-python2 python-mwclient))
12852
12853 (define-public python-utils
12854 (package
12855 (name "python-utils")
12856 (version "2.1.0")
12857 (source (origin
12858 (method url-fetch)
12859 (uri (pypi-uri "python-utils" version))
12860 (sha256
12861 (base32
12862 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
12863 (build-system python-build-system)
12864 (native-inputs
12865 `(("pytest-runner" ,python-pytest-runner)
12866 ("pytest" ,python-pytest)
12867 ("six" ,python-six)))
12868 (home-page "https://github.com/WoLpH/python-utils")
12869 (synopsis "Convenient utilities not included with the standard Python install")
12870 (description
12871 "Python Utils is a collection of small Python functions and classes which
12872 make common patterns shorter and easier.")
12873 (license license:bsd-2)))
12874
12875 (define-public python2-utils
12876 (package-with-python2 python-utils))
12877
12878 (define-public python-diff-match-patch
12879 (package
12880 (name "python-diff-match-patch")
12881 (version "20121119")
12882 (source
12883 (origin
12884 (method url-fetch)
12885 (uri (pypi-uri "diff-match-patch" version))
12886 (sha256
12887 (base32
12888 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
12889 (build-system python-build-system)
12890 (home-page "https://code.google.com/p/google-diff-match-patch")
12891 (synopsis "Synchronize plain text")
12892 (description "Diff Match and Patch libraries offer robust algorithms to
12893 perform the operations required for synchronizing plain text.")
12894 (license license:asl2.0)))
12895
12896 (define-public python2-diff-match-patch
12897 (package-with-python2 python-diff-match-patch))
12898
12899 (define-public python-dirsync
12900 (package
12901 (name "python-dirsync")
12902 (version "2.2.3")
12903 (source
12904 (origin
12905 (method url-fetch)
12906 (uri (pypi-uri "dirsync" version))
12907 (sha256
12908 (base32
12909 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
12910 (build-system python-build-system)
12911 (propagated-inputs
12912 `(("six" ,python-six)))
12913 (home-page "https://bitbucket.org/tkhyn/dirsync")
12914 (synopsis "Advanced directory tree synchronisation tool")
12915 (description "Advanced directory tree synchronisation tool.")
12916 (license license:expat)))
12917
12918 (define-public python2-dirsync
12919 (package-with-python2 python-dirsync))
12920
12921 (define-public python-levenshtein
12922 (package
12923 (name "python-levenshtein")
12924 (version "0.12.0")
12925 (source
12926 (origin
12927 (method url-fetch)
12928 (uri (pypi-uri "python-Levenshtein" version))
12929 (sha256
12930 (base32
12931 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
12932 (build-system python-build-system)
12933 (home-page "https://github.com/ztane/python-Levenshtein")
12934 (synopsis "Fast computation of Levenshtein distance and string similarity")
12935 (description
12936 "The Levenshtein Python C extension module contains functions for fast computation of
12937 @enumerate
12938 @item Levenshtein (edit) distance, and edit operations
12939 @item string similarity
12940 @item approximate median strings, and generally string averaging
12941 @item string sequence and set similarity
12942 @end enumerate
12943 It supports both normal and Unicode strings.")
12944 (license license:gpl2+)))
12945
12946 (define-public python2-levenshtein
12947 (package-with-python2 python-levenshtein))
12948
12949 (define-public python-scandir
12950 (package
12951 (name "python-scandir")
12952 (version "1.9.0")
12953 (source
12954 (origin
12955 (method url-fetch)
12956 (uri (pypi-uri "scandir" version))
12957 (sha256
12958 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
12959 (build-system python-build-system)
12960 (arguments
12961 `(#:phases (modify-phases %standard-phases
12962 (replace 'check
12963 (lambda _
12964 (invoke "python" "test/run_tests.py"))))))
12965 (home-page "https://github.com/benhoyt/scandir")
12966 (synopsis "Directory iteration function")
12967 (description
12968 "Directory iteration function like os.listdir(), except that instead of
12969 returning a list of bare filenames, it yields DirEntry objects that include
12970 file type and stat information along with the name. Using scandir() increases
12971 the speed of os.walk() by 2-20 times (depending on the platform and file
12972 system) by avoiding unnecessary calls to os.stat() in most cases.
12973
12974 This package is part of the Python standard library since version 3.5.")
12975 (license license:bsd-3)))
12976
12977 (define-public python2-scandir
12978 (package-with-python2 python-scandir))
12979
12980 (define-public python2-stemming
12981 (package
12982 (name "python2-stemming")
12983 (version "1.0.1")
12984 (source
12985 (origin
12986 (method url-fetch)
12987 (uri (pypi-uri "stemming" version))
12988 (sha256
12989 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
12990 (build-system python-build-system)
12991 (arguments
12992 `(#:python ,python-2))
12993 (home-page "https://bitbucket.org/mchaput/stemming/overview")
12994 (synopsis "Python implementations of various stemming algorithms")
12995 (description
12996 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
12997 stemming algorithms for English. These implementations are straightforward and
12998 efficient, unlike some Python versions of the same algorithms available on the
12999 Web. This package is an extraction of the stemming code included in the Whoosh
13000 search engine.")
13001 (license license:public-domain)))
13002
13003 (define-public python-factory-boy
13004 (package
13005 (name "python-factory-boy")
13006 (version "2.8.1")
13007 (source
13008 (origin
13009 (method url-fetch)
13010 (uri (pypi-uri "factory_boy" version))
13011 (sha256
13012 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
13013 (build-system python-build-system)
13014 (arguments
13015 ;; Tests are not included in the tarball.
13016 `(#:tests? #f))
13017 (propagated-inputs
13018 `(("faker" ,python-faker)))
13019 (home-page "https://github.com/benhoyt/scandir")
13020 (synopsis "Versatile test fixtures replacement")
13021 (description
13022 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
13023
13024 As a fixtures replacement tool, it aims to replace static, hard to maintain
13025 fixtures with easy-to-use factories for complex object.
13026
13027 Instead of building an exhaustive test setup with every possible combination
13028 of corner cases, factory_boy allows you to use objects customized for the
13029 current test, while only declaring the test-specific fields")
13030 (license license:expat)))
13031
13032 (define-public python2-factory-boy
13033 (package-with-python2 python-factory-boy))
13034
13035 (define-public python-translate-toolkit
13036 (package
13037 (name "python-translate-toolkit")
13038 (version "2.1.0")
13039 (source
13040 (origin
13041 (method url-fetch)
13042 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
13043 (sha256
13044 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
13045 (build-system python-build-system)
13046 (native-inputs
13047 `(("python-pytest" ,python-pytest)
13048 ("python-sphinx" ,python-sphinx)))
13049 (propagated-inputs
13050 `(("python-babel" ,python-babel)
13051 ("python-beautifulsoup4" ,python-beautifulsoup4)
13052 ("python-chardet" ,python-chardet)
13053 ("python-diff-match-patch" ,python-diff-match-patch)
13054 ("python-levenshtein" ,python-levenshtein)
13055 ("python-lxml" ,python-lxml)
13056 ("python-six" ,python-six)
13057 ("python-vobject" ,python-vobject)
13058 ("python-pyyaml" ,python-pyyaml)))
13059 (arguments
13060 ;; TODO: tests are not run, because they end with
13061 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
13062 ;; 'parse_funcs'
13063 ;; during test setup.
13064 `(#:tests? #f))
13065 (home-page "https://toolkit.translatehouse.org")
13066 (synopsis "Tools and API for translation and localization engineering")
13067 (description
13068 "Tools and API for translation and localization engineering. It contains
13069 several utilities, as well as an API for building localization tools.")
13070 (license license:gpl2+)))
13071
13072 (define-public python2-translate-toolkit
13073 (package-with-python2 python-translate-toolkit))
13074
13075 (define-public python-packaging
13076 (package
13077 (name "python-packaging")
13078 (version "19.2")
13079 (source
13080 (origin
13081 (method url-fetch)
13082 (uri (pypi-uri "packaging" version))
13083 (sha256
13084 (base32
13085 "0izwlz9h0bw171a1chr311g2y7n657zjaf4mq4rgm8pp9lbj9f98"))))
13086 (build-system python-build-system)
13087 (arguments
13088 `(#:phases (modify-phases %standard-phases
13089 (replace 'check
13090 (lambda _ (invoke "py.test" "-vv"))))))
13091 (native-inputs
13092 `(("python-pretend" ,python-pretend)
13093 ("python-pytest" ,python-pytest)))
13094 (propagated-inputs
13095 `(("python-pyparsing" ,python-pyparsing)
13096 ("python-six" ,python-six)))
13097 (home-page "https://github.com/pypa/packaging")
13098 (synopsis "Core utilities for Python packages")
13099 (description "Packaging is a Python module for dealing with Python packages.
13100 It offers an interface for working with package versions, names, and dependency
13101 information.")
13102 ;; From 'LICENSE': This software is made available under the terms of
13103 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
13104 ;; Contributions to this software is made under the terms of *both* these
13105 ;; licenses.
13106 (license (list license:asl2.0 license:bsd-2))))
13107
13108 (define-public python2-packaging
13109 (package-with-python2 python-packaging))
13110
13111 (define-public python-relatorio
13112 (package
13113 (name "python-relatorio")
13114 (version "0.8.0")
13115 (source
13116 (origin
13117 (method url-fetch)
13118 (uri (pypi-uri "relatorio" version))
13119 (sha256
13120 (base32
13121 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
13122 (build-system python-build-system)
13123 (propagated-inputs
13124 `(("python-lxml" ,python-lxml)
13125 ("python-genshi" ,python-genshi)))
13126 (native-inputs
13127 `(("python-magic" ,python-magic)))
13128 (home-page "https://relatorio.tryton.org/")
13129 (synopsis "Templating library able to output ODT and PDF files")
13130 (description "Relatorio is a templating library which provides a way to
13131 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
13132 for more filetypes can be easily added by creating plugins for them.")
13133 (license license:gpl3+)))
13134
13135 (define-public python2-relatorio
13136 (package-with-python2 python-relatorio))
13137
13138 (define-public python-radon
13139 (package
13140 (name "python-radon")
13141 (version "2.2.0")
13142 (source
13143 (origin
13144 (method url-fetch)
13145 (uri (pypi-uri "radon" version))
13146 (sha256
13147 (base32
13148 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
13149 (build-system python-build-system)
13150 (arguments
13151 `(#:phases (modify-phases %standard-phases
13152 (replace 'check
13153 (lambda _
13154 (invoke "python" "radon/tests/run.py"))))))
13155 (propagated-inputs
13156 `(("python-colorama" ,python-colorama)
13157 ("python-flake8-polyfill" ,python-flake8-polyfill)
13158 ("python-mando" ,python-mando)))
13159 (native-inputs
13160 `(("python-pytest" ,python-pytest)
13161 ("python-pytest-mock" ,python-pytest-mock)))
13162 (home-page "https://radon.readthedocs.org/")
13163 (synopsis "Code Metrics in Python")
13164 (description "Radon is a Python tool which computes various code metrics.
13165 Supported metrics are:
13166 @itemize @bullet
13167 @item raw metrics: SLOC, comment lines, blank lines, &c.
13168 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
13169 @item Halstead metrics (all of them)
13170 @item the Maintainability Index (a Visual Studio metric)
13171 @end itemize")
13172 (license license:expat)))
13173
13174 (define-public python2-radon
13175 (package-with-python2 python-radon))
13176
13177 (define-public python-sure
13178 (package
13179 (name "python-sure")
13180 (version "1.4.11")
13181 (source
13182 (origin
13183 (method url-fetch)
13184 (uri (pypi-uri "sure" version))
13185 (sha256
13186 (base32
13187 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
13188 (build-system python-build-system)
13189 (propagated-inputs
13190 `(("python-mock" ,python-mock)
13191 ("python-six" ,python-six)))
13192 (native-inputs
13193 `(("python-nose" ,python-nose)))
13194 (home-page "https://github.com/gabrielfalcao/sure")
13195 (synopsis "Automated testing library in python for python")
13196 (description
13197 "Sure is a python library that leverages a DSL for writing assertions.
13198 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
13199 (license license:gpl3+)))
13200
13201 (define-public python2-sure
13202 (package-with-python2 python-sure))
13203
13204 (define-public python2-couleur
13205 ;; This package does not seem to support python3 at all, hence,
13206 ;; only the python2 variant definition is provided.
13207 (package
13208 (name "python2-couleur")
13209 (version "0.6.2")
13210 (source
13211 (origin
13212 (method url-fetch)
13213 (uri (pypi-uri "couleur" version))
13214 (sha256
13215 (base32
13216 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
13217 (build-system python-build-system)
13218 (arguments
13219 `(#:python ,python-2))
13220 (home-page "https://github.com/gabrielfalcao/couleur")
13221 (synopsis
13222 "ANSI terminal tool for python, colored shell and other handy fancy features")
13223 (description
13224 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
13225 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
13226 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
13227 ;; https://github.com/gabrielfalcao/couleur/issues/11
13228 (license license:lgpl3+)))
13229
13230 (define-public python-misaka
13231 (package
13232 (name "python-misaka")
13233 (version "2.1.1")
13234 (source
13235 (origin
13236 (method url-fetch)
13237 (uri (pypi-uri "misaka" version))
13238 (sha256
13239 (base32
13240 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
13241 (build-system python-build-system)
13242 (arguments
13243 `(;; Line 37 of setup.py calls self.run_command('develop')
13244 ;; in the 'check' phase. This command seems to be trying
13245 ;; to write to
13246 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
13247 ;; for which it does not have the permission to write.
13248 #:tests? #f))
13249 (propagated-inputs
13250 `(("python-cffi" ,python-cffi)))
13251 (home-page "https://github.com/FSX/misaka")
13252 (synopsis "Python binding for Hoedown")
13253 (description
13254 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
13255 library written in C. It features a fast HTML renderer and functionality to make custom
13256 renderers (e.g. man pages or LaTeX).")
13257 (license license:expat)))
13258
13259 (define-public python2-misaka
13260 (package-with-python2 python-misaka))
13261
13262 (define-public python2-steadymark
13263 ;; This is forced into being a python2 only variant
13264 ;; due to its dependence on couleur that has no support
13265 ;; for python3
13266 (package
13267 (name "python2-steadymark")
13268 (version "0.7.3")
13269 (source
13270 (origin
13271 (method url-fetch)
13272 (uri (pypi-uri "steadymark" version))
13273 (sha256
13274 (base32
13275 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
13276 (build-system python-build-system)
13277 (native-inputs
13278 `(("python-couleur" ,python2-couleur)
13279 ("python-sure" ,python2-sure)
13280 ("python-misaka" ,python2-misaka)))
13281 (arguments
13282 `(#:python ,python-2
13283 #:phases
13284 (modify-phases %standard-phases
13285 (add-before 'build 'patch-setup-py
13286 (lambda _
13287 ;; Update requirements from dependency==version
13288 ;; to dependency>=version
13289 (substitute* "setup.py"
13290 (("==") ">="))
13291 #t)))))
13292 (home-page "https://github.com/gabrielfalcao/steadymark")
13293 (synopsis "Markdown-based test runner for python")
13294 (description
13295 "@code{Steadymark} allows documentation to be written in github-flavoured
13296 markdown. The documentation may contain snippets of code surrounded by python
13297 code blocks and @code{Steadymark} will find these snippets and run them, making
13298 sure that there are no old malfunctional examples in the documentation examples.")
13299 (license license:expat)))
13300
13301 (define-public python-jsonpointer
13302 (package
13303 (name "python-jsonpointer")
13304 (version "1.10")
13305 (source
13306 (origin
13307 (method url-fetch)
13308 (uri (pypi-uri "jsonpointer" version))
13309 (sha256
13310 (base32
13311 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
13312 (build-system python-build-system)
13313 (home-page "https://github.com/stefankoegl/python-json-pointer")
13314 (synopsis "Identify specific nodes in a JSON document")
13315 (description "@code{jsonpointer} allows you to access specific nodes
13316 by path in a JSON document (see RFC 6901).")
13317 (license license:bsd-3)))
13318
13319 (define-public python2-jsonpointer
13320 (package-with-python2 python-jsonpointer))
13321
13322 (define-public python-jsonpatch
13323 (package
13324 (name "python-jsonpatch")
13325 (version "1.16")
13326 (source
13327 (origin
13328 (method git-fetch)
13329 ;; pypi version lacks tests.js
13330 (uri (git-reference
13331 (url "https://github.com/stefankoegl/python-json-patch")
13332 (commit (string-append "v" version))))
13333 (file-name (git-file-name name version))
13334 (sha256
13335 (base32
13336 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
13337 (build-system python-build-system)
13338 (native-inputs
13339 `(("python-jsonpointer" ,python-jsonpointer)))
13340 (home-page "https://github.com/stefankoegl/python-json-patch")
13341 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
13342 (description "@code{jsonpatch} is a library and program that allows
13343 applying JSON Patches according to RFC 6902.")
13344 (license license:bsd-3)))
13345
13346 (define-public python2-jsonpatch
13347 (package-with-python2 python-jsonpatch))
13348
13349 (define-public python-jsonpatch-0.4
13350 (package (inherit python-jsonpatch)
13351 (name "python-jsonpatch")
13352 (version "0.4")
13353 (source
13354 (origin
13355 (method git-fetch)
13356 (uri (git-reference
13357 (url "https://github.com/stefankoegl/python-json-patch")
13358 (commit (string-append "v" version))))
13359 (file-name (git-file-name name version))
13360 (sha256
13361 (base32
13362 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
13363
13364 (define-public python2-jsonpatch-0.4
13365 (package-with-python2 python-jsonpatch-0.4))
13366
13367 (define-public python-rfc3986
13368 (package
13369 (name "python-rfc3986")
13370 (version "1.1.0")
13371 (source (origin
13372 (method url-fetch)
13373 (uri (pypi-uri "rfc3986" version))
13374 (sha256
13375 (base32
13376 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
13377 (build-system python-build-system)
13378 (arguments
13379 `(#:modules ((guix build utils)
13380 (guix build python-build-system)
13381 (ice-9 ftw)
13382 (srfi srfi-1)
13383 (srfi srfi-26))
13384 #:phases
13385 (modify-phases %standard-phases
13386 (replace 'check
13387 (lambda _
13388 (let ((cwd (getcwd)))
13389 (setenv "PYTHONPATH"
13390 (string-append cwd "/build/"
13391 (find (cut string-prefix? "lib" <>)
13392 (scandir (string-append cwd "/build")))
13393 ":"
13394 (getenv "PYTHONPATH")))
13395 (invoke "pytest" "-v")))))))
13396 (native-inputs
13397 `(("python-pytest" ,python-pytest)))
13398 (home-page "https://rfc3986.readthedocs.io/")
13399 (synopsis "Parse and validate URI references")
13400 (description
13401 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
13402 validation and authority parsing. This module also supports RFC@tie{}6874
13403 which adds support for zone identifiers to IPv6 addresses.")
13404 (license license:asl2.0)))
13405
13406 (define-public python2-rfc3986
13407 (package-with-python2 python-rfc3986))
13408
13409 (define-public python-rfc3987
13410 (package
13411 (name "python-rfc3987")
13412 (version "1.3.7")
13413 (source
13414 (origin
13415 (method url-fetch)
13416 (uri (pypi-uri "rfc3987" version))
13417 (sha256
13418 (base32
13419 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
13420 (build-system python-build-system)
13421 (home-page "https://pypi.python.org/pypi/rfc3987")
13422 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
13423 (description "@code{rfc3987} provides routines for parsing and
13424 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
13425 (license license:gpl3+)))
13426
13427 (define-public python2-rfc3987
13428 (package-with-python2 python-rfc3987))
13429
13430 (define-public python-validate-email
13431 (package
13432 (name "python-validate-email")
13433 (version "1.3")
13434 (source
13435 (origin
13436 (method url-fetch)
13437 (uri (pypi-uri "validate_email" version))
13438 (sha256
13439 (base32
13440 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
13441 (build-system python-build-system)
13442 (home-page "https://github.com/syrusakbary/validate_email")
13443 (synopsis "Verifies if an email address is valid and really exists")
13444 (description "@code{validate_email} can be used to verify if an email
13445 address is valid and really exists.")
13446 (license license:lgpl3+)))
13447
13448 (define-public python2-validate-email
13449 (package-with-python2 python-validate-email))
13450
13451 (define-public python-flex
13452 (package
13453 (name "python-flex")
13454 (version "6.10.0")
13455 (source
13456 (origin
13457 (method url-fetch)
13458 (uri (pypi-uri "flex" version))
13459 (sha256
13460 (base32
13461 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
13462 (build-system python-build-system)
13463 (propagated-inputs
13464 `(("python-click" ,python-click)
13465 ("python-iso8601" ,python-iso8601)
13466 ("python-jsonpointer" ,python-jsonpointer)
13467 ("python-pyyaml" ,python-pyyaml)
13468 ("python-requests" ,python-requests)
13469 ("python-rfc3987" ,python-rfc3987)
13470 ("python-six" ,python-six)
13471 ("python-validate-email" ,python-validate-email)))
13472 (home-page "https://github.com/pipermerriam/flex")
13473 (synopsis "Validates Swagger schemata")
13474 (description "@code{flex} can be used to validate Swagger schemata.")
13475 (license license:bsd-3)))
13476
13477 (define-public python2-flex
13478 (package-with-python2 python-flex))
13479
13480 (define-public python-marshmallow
13481 (package
13482 (name "python-marshmallow")
13483 (version "3.0.0b14")
13484 (source
13485 (origin
13486 (method url-fetch)
13487 (uri (pypi-uri "marshmallow" version))
13488 (sha256
13489 (base32
13490 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
13491 (build-system python-build-system)
13492 (propagated-inputs
13493 `(("python-dateutil" ,python-dateutil)
13494 ("python-simplejson" ,python-simplejson)))
13495 (native-inputs
13496 `(("python-pytest" ,python-pytest)
13497 ("python-pytz" ,python-pytz)))
13498 (home-page "https://github.com/marshmallow-code/marshmallow")
13499 (synopsis "Convert complex datatypes to and from native
13500 Python datatypes.")
13501 (description "@code{marshmallow} provides a library for converting
13502 complex datatypes to and from native Python datatypes.")
13503 (license license:expat)))
13504
13505 (define-public python2-marshmallow
13506 (package-with-python2 python-marshmallow))
13507
13508 (define-public python-apispec
13509 (package
13510 (name "python-apispec")
13511 (version "0.25.3")
13512 (source
13513 (origin
13514 (method url-fetch)
13515 (uri (pypi-uri "apispec" version))
13516 (sha256
13517 (base32
13518 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
13519 (build-system python-build-system)
13520 (propagated-inputs
13521 `(("python-pyyaml" ,python-pyyaml)))
13522 (native-inputs
13523 `(("python-pytest" ,python-pytest)
13524 ("python-flask" ,python-flask)
13525 ("python-marshmallow" ,python-marshmallow)
13526 ("python-tornado" ,python-tornado)
13527 ("python-bottle" ,python-bottle)
13528 ("python-mock" ,python-mock)))
13529 (home-page "https://github.com/marshmallow-code/apispec")
13530 (synopsis "Swagger 2.0 API specification generator")
13531 (description "@code{python-apispec} is a pluggable API specification
13532 generator. Currently supports the OpenAPI specification (f.k.a.
13533 Swagger 2.0).")
13534 (license license:expat)))
13535
13536 (define-public python2-apispec
13537 (package-with-python2 python-apispec))
13538
13539 (define-public python-flasgger
13540 (package
13541 (name "python-flasgger")
13542 (version "0.6.3")
13543 (source
13544 (origin
13545 (method git-fetch)
13546 (uri (git-reference
13547 (url "https://github.com/rochacbruno/flasgger.git")
13548 (commit version)))
13549 (file-name (git-file-name name version))
13550 (sha256
13551 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
13552 (build-system python-build-system)
13553 (arguments
13554 `(#:phases
13555 (modify-phases %standard-phases
13556 (replace 'check
13557 (lambda* (#:key inputs outputs #:allow-other-keys)
13558 (substitute* "Makefile"
13559 (("flake8 flasgger --ignore=F403")
13560 "flake8 flasgger --ignore=E731,F403"))
13561 (setenv "PYTHONPATH" (string-append (getcwd)
13562 ":"
13563 (getenv "PYTHONPATH")))
13564 (invoke "py.test"))))))
13565 (propagated-inputs
13566 `(("python-flask" ,python-flask)
13567 ("python-pyyaml" ,python-pyyaml)
13568 ("python-jsonschema" ,python-jsonschema)
13569 ("python-mistune" ,python-mistune)
13570 ("python-six" ,python-six)))
13571 (native-inputs
13572 `(("python-decorator" ,python-decorator)
13573 ("python-flake8" ,python-flake8)
13574 ("python-flask-restful" ,python-flask-restful)
13575 ("python-flex" ,python-flex)
13576 ("python-pytest" ,python-pytest)
13577 ("python-pytest-cov" ,python-pytest-cov)
13578 ("python-marshmallow" ,python-marshmallow)
13579 ("python-apispec" ,python-apispec)))
13580 (home-page "https://github.com/rochacbruno/flasgger/")
13581 (synopsis "Extract Swagger specs from your Flask project")
13582 (description "@code{python-flasgger} allows extracting Swagger specs
13583 from your Flask project. It is a fork of Flask-Swagger.")
13584 (license license:expat)))
13585
13586 (define-public python2-flasgger
13587 (package-with-python2 python-flasgger))
13588
13589 (define-public python-swagger-spec-validator
13590 (package
13591 (name "python-swagger-spec-validator")
13592 (version "2.4.3")
13593 (source
13594 (origin
13595 (method url-fetch)
13596 (uri (pypi-uri "swagger-spec-validator" version))
13597 (sha256
13598 (base32
13599 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
13600 (build-system python-build-system)
13601 (propagated-inputs
13602 `(("python-jsonschema" ,python-jsonschema)
13603 ("python-pyyaml" ,python-pyyaml)
13604 ("python-six" ,python-six)))
13605 (home-page
13606 "https://github.com/Yelp/swagger_spec_validator")
13607 (synopsis "Validation of Swagger specifications")
13608 (description "@code{swagger_spec_validator} provides a library for
13609 validating Swagger API specifications.")
13610 (license license:asl2.0)))
13611
13612 (define-public python2-swagger-spec-validator
13613 (package-with-python2 python-swagger-spec-validator))
13614
13615 (define-public python-apache-libcloud
13616 (package
13617 (name "python-apache-libcloud")
13618 (version "2.4.0")
13619 (source
13620 (origin
13621 (method url-fetch)
13622 (uri (pypi-uri "apache-libcloud" version))
13623 (sha256
13624 (base32
13625 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13626 (build-system python-build-system)
13627 (arguments
13628 `(#:phases
13629 (modify-phases %standard-phases
13630 (add-after 'unpack 'patch-ssh
13631 (lambda* (#:key inputs #:allow-other-keys)
13632 (substitute* "libcloud/compute/ssh.py"
13633 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13634 "/bin/ssh" "'")))
13635 #t))
13636 (add-after 'unpack 'patch-tests
13637 (lambda _
13638 (substitute* "./libcloud/test/test_file_fixtures.py"
13639 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13640 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13641 return (httplib.OK,
13642 \"1234abcd\",
13643 {\"test\": \"value\"},
13644 httplib.responses[httplib.OK])
13645 def _ascii"))
13646 (substitute* "libcloud/test/compute/test_ssh_client.py"
13647 (("class ShellOutSSHClientTests")
13648 "@unittest.skip(\"Guix container doesn't have ssh service\")
13649 class ShellOutSSHClientTests")
13650 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13651 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13652 (("'.xF0', '.x90', '.x8D', '.x88'")
13653 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13654 #t))
13655 (add-before 'check 'copy-secret
13656 (lambda _
13657 (copy-file "libcloud/test/secrets.py-dist"
13658 "libcloud/test/secrets.py")
13659 #t)))))
13660 (inputs
13661 `(("openssh" ,openssh)))
13662 (propagated-inputs
13663 `(("python-paramiko" ,python-paramiko)
13664 ("python-requests" ,python-requests)))
13665 (native-inputs
13666 `(("python-lockfile" ,python-lockfile)
13667 ("python-mock" ,python-mock)
13668 ("python-pytest" ,python-pytest)
13669 ("python-pytest-runner" ,python-pytest-runner)
13670 ("python-requests-mock" ,python-requests-mock)))
13671 (home-page "https://libcloud.apache.org/")
13672 (synopsis "Unified Cloud API")
13673 (description "@code{libcloud} is a Python library for interacting with
13674 many of the popular cloud service providers using a unified API.")
13675 (license license:asl2.0)))
13676
13677 (define-public python2-apache-libcloud
13678 (package-with-python2 python-apache-libcloud))
13679
13680 (define-public python-smmap2
13681 (package
13682 (name "python-smmap2")
13683 (version "2.0.5")
13684 (source
13685 (origin
13686 (method url-fetch)
13687 (uri (pypi-uri "smmap2" version))
13688 (sha256
13689 (base32 "16k03pcnxd3lgzwgbd7nl4jwzm1wmahirvd09kljnzvy96hgza99"))))
13690 (build-system python-build-system)
13691 (native-inputs
13692 `(("python-nosexcover" ,python-nosexcover)))
13693 (home-page "https://github.com/Byron/smmap")
13694 (synopsis "Python sliding window memory map manager")
13695 (description "@code{smmap2} is a pure Python implementation of a sliding
13696 window memory map manager.")
13697 (license license:bsd-3)))
13698
13699 (define-public python2-smmap2
13700 (package-with-python2 python-smmap2))
13701
13702 (define-public python-regex
13703 (package
13704 (name "python-regex")
13705 (version "2019.04.14")
13706 (source (origin
13707 (method url-fetch)
13708 (uri (pypi-uri "regex" version))
13709 (sha256
13710 (base32
13711 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
13712 ;; TODO: Fix and enable regex_test.py tests that complain about the
13713 ;; test.support module not existing.
13714 (build-system python-build-system)
13715 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13716 (synopsis "Alternative regular expression module")
13717 (description "This regular expression implementation is backwards-
13718 compatible with the standard @code{re} module, but offers additional
13719 functionality like full case-folding for case-insensitive matches in Unicode.")
13720 (license license:psfl)))
13721
13722 (define-public python2-regex
13723 (package-with-python2 python-regex))
13724
13725 (define-public python2-pyopengl
13726 (package
13727 (name "python2-pyopengl")
13728 (version "3.1.0")
13729 (source
13730 (origin
13731 (method url-fetch)
13732 (uri (pypi-uri "PyOpenGL" version))
13733 (sha256
13734 (base32
13735 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13736 (arguments
13737 `(#:python ,python-2))
13738 (build-system python-build-system)
13739 (home-page "http://pyopengl.sourceforge.net")
13740 (synopsis "Standard OpenGL bindings for Python")
13741 (description
13742 "PyOpenGL is the most common cross platform Python binding to OpenGL and
13743 related APIs. The binding is created using the standard @code{ctypes}
13744 library.")
13745 (license license:bsd-3)))
13746
13747 (define-public python2-pyopengl-accelerate
13748 (package
13749 (inherit python2-pyopengl)
13750 (name "python2-pyopengl-accelerate")
13751 (version "3.1.0")
13752 (source
13753 (origin
13754 (method url-fetch)
13755 (uri (pypi-uri "PyOpenGL-accelerate" version))
13756 (sha256
13757 (base32
13758 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
13759 (synopsis "Acceleration code for PyOpenGL")
13760 (description
13761 "This is the Cython-coded accelerator module for PyOpenGL.")))
13762
13763 (define-public python-rencode
13764 (package
13765 (name "python-rencode")
13766 (version "1.0.5")
13767 (source
13768 (origin
13769 (method url-fetch)
13770 (uri (pypi-uri "rencode" version))
13771 (sha256
13772 (base32
13773 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
13774 (build-system python-build-system)
13775 (arguments
13776 `(#:phases
13777 (modify-phases %standard-phases
13778 (add-before 'check 'delete-bogus-test
13779 ;; This test requires /home/aresch/Downloads, which is not provided by
13780 ;; the build environment.
13781 (lambda _
13782 (delete-file "rencode/t.py")
13783 #t)))))
13784 (native-inputs `(("pkg-config" ,pkg-config)
13785 ("python-cython" ,python-cython)))
13786 (home-page "https://github.com/aresch/rencode")
13787 (synopsis "Serialization of heterogeneous data structures")
13788 (description
13789 "The @code{rencode} module is a data structure serialization library,
13790 similar to @code{bencode} from the BitTorrent project. For complex,
13791 heterogeneous data structures with many small elements, r-encoding stake up
13792 significantly less space than b-encodings. This version of rencode is a
13793 complete rewrite in Cython to attempt to increase the performance over the
13794 pure Python module.")
13795 (license license:bsd-3)))
13796
13797 (define-public python2-rencode
13798 (package-with-python2 python-rencode))
13799
13800 (define-public python-xenon
13801 (package
13802 (name "python-xenon")
13803 (version "0.5.4")
13804 (source
13805 (origin
13806 (method url-fetch)
13807 (uri (pypi-uri "xenon" version))
13808 (sha256
13809 (base32
13810 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
13811 (build-system python-build-system)
13812 (native-inputs
13813 `(("python-pyyaml" ,python-pyyaml)
13814 ("python-radon" ,python-radon)
13815 ("python-requests" ,python-requests)
13816 ("python-flake8" ,python-flake8)
13817 ("python-tox" ,python-tox)))
13818 (arguments
13819 `(#:phases
13820 (modify-phases %standard-phases
13821 (add-before 'build 'patch-test-requirements
13822 (lambda _
13823 ;; Remove httpretty dependency for tests.
13824 (substitute* "setup.py"
13825 (("httpretty") ""))
13826 #t)))))
13827 (home-page "https://xenon.readthedocs.org/")
13828 (synopsis "Monitor code metrics for Python on your CI server")
13829 (description
13830 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
13831 Ideally, @code{xenon} is run every time code is committed. Through command
13832 line options, various thresholds can be set for the complexity of code. It
13833 will fail (i.e. it will exit with a non-zero exit code) when any of these
13834 requirements is not met.")
13835 (license license:expat)))
13836
13837 (define-public python2-xenon
13838 (package-with-python2 python-xenon))
13839
13840 (define-public python-pysocks
13841 (package
13842 (name "python-pysocks")
13843 (version "1.7.0")
13844 (source
13845 (origin
13846 (method url-fetch)
13847 (uri (pypi-uri "PySocks" version))
13848 (sha256
13849 (base32
13850 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
13851 (build-system python-build-system)
13852 (arguments `(#:tests? #f))
13853 (home-page "https://github.com/Anorov/PySocks")
13854 (synopsis "SOCKS client module")
13855 (description "@code{pysocks} is an updated and semi-actively maintained
13856 version of @code{SocksiPy} with bug fixes and extra features.")
13857 (license license:bsd-3)))
13858
13859 (define-public python2-pysocks
13860 (package-with-python2 python-pysocks))
13861
13862 (define-public python-pydiff
13863 (package
13864 (name "python-pydiff")
13865 (version "0.2")
13866 (source
13867 (origin
13868 (method url-fetch)
13869 (uri (pypi-uri "pydiff" version))
13870 (sha256
13871 (base32
13872 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
13873 (build-system python-build-system)
13874 (home-page "https://github.com/myint/pydiff")
13875 (synopsis "Library to diff two Python files at the bytecode level")
13876 (description
13877 "@code{pydiff} makes it easy to look for actual code changes while
13878 ignoring formatting changes.")
13879 (license license:expat)))
13880
13881 (define-public python2-pydiff
13882 (package-with-python2 python-pydiff))
13883
13884 (define-public python-tqdm
13885 (package
13886 (name "python-tqdm")
13887 (version "4.19.6")
13888 (source
13889 (origin
13890 (method url-fetch)
13891 (uri (pypi-uri "tqdm" version))
13892 (sha256
13893 (base32
13894 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
13895 (build-system python-build-system)
13896 (native-inputs
13897 `(("python-flake8" ,python-flake8)
13898 ("python-nose" ,python-nose)
13899 ("python-coverage" ,python-coverage)))
13900 (home-page "https://github.com/tqdm/tqdm")
13901 (synopsis "Fast, extensible progress meter")
13902 (description
13903 "Make loops show a progress bar on the console by just wrapping any
13904 iterable with @code{|tqdm(iterable)|}. Offers many options to define
13905 design and layout.")
13906 (license (list license:mpl2.0 license:expat))
13907 (properties `((python2-variant . ,(delay python2-tqdm))))))
13908
13909 (define-public python2-tqdm
13910 (let ((tqdm (package-with-python2
13911 (strip-python2-variant python-tqdm))))
13912 (package (inherit tqdm)
13913 (native-inputs `(("python2-functools32" ,python2-functools32)
13914 ,@(package-native-inputs tqdm))))))
13915
13916 (define-public python-pkginfo
13917 (package
13918 (name "python-pkginfo")
13919 (version "1.4.2")
13920 (source
13921 (origin
13922 (method url-fetch)
13923 (uri (pypi-uri "pkginfo" version))
13924 (sha256
13925 (base32
13926 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
13927 (build-system python-build-system)
13928 (arguments
13929 ;; The tests are broken upstream.
13930 '(#:tests? #f))
13931 (home-page
13932 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
13933 (synopsis
13934 "Query metadatdata from sdists, bdists, and installed packages")
13935 (description
13936 "API to query the distutils metadata written in @file{PKG-INFO} inside a
13937 source distriubtion (an sdist) or a binary distribution (e.g., created by
13938 running bdist_egg). It can also query the EGG-INFO directory of an installed
13939 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
13940 created by running @code{python setup.py develop}).")
13941 (license license:expat)))
13942
13943 (define-public python2-pkginfo
13944 (package-with-python2 python-pkginfo))
13945
13946 (define-public python-twine
13947 (package
13948 (name "python-twine")
13949 (version "1.9.1")
13950 (source
13951 (origin
13952 (method url-fetch)
13953 (uri (pypi-uri "twine" version))
13954 (sha256
13955 (base32
13956 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
13957 (build-system python-build-system)
13958 (propagated-inputs
13959 `(("python-tqdm" ,python-tqdm)
13960 ("python-pkginfo" ,python-pkginfo)
13961 ("python-requests" ,python-requests)
13962 ("python-requests-toolbelt" ,python-requests-toolbelt)))
13963 (home-page "https://github.com/pypa/twine")
13964 (synopsis "Collection of utilities for interacting with PyPI")
13965 (description
13966 "@code{twine} currently supports registering projects and uploading
13967 distributions. It authenticates the user over HTTPS, allows them to pre-sign
13968 their files and supports any packaging format (including wheels).")
13969 (license license:asl2.0)))
13970
13971 (define-public python2-twine
13972 (package-with-python2 python-twine))
13973
13974 (define-public python-linecache2
13975 (package
13976 (name "python-linecache2")
13977 (version "1.0.0")
13978 (source
13979 (origin
13980 (method url-fetch)
13981 (uri (pypi-uri "linecache2" version))
13982 (sha256
13983 (base32
13984 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
13985 (build-system python-build-system)
13986 (arguments
13987 `(;; The tests depend on unittest2, and our version is a bit too old.
13988 #:tests? #f))
13989 (native-inputs
13990 `(("python-pbr" ,python-pbr-minimal)))
13991 (home-page
13992 "https://github.com/testing-cabal/linecache2")
13993 (synopsis "Backports of the linecache module")
13994 (description
13995 "The linecache module allows one to get any line from any file, while
13996 attempting to optimize internally, using a cache, the common case where many
13997 lines are read from a single file.")
13998 (license license:psfl)))
13999
14000 (define-public python2-linecache2
14001 (package-with-python2 python-linecache2))
14002
14003 (define-public python-traceback2
14004 (package
14005 (name "python-traceback2")
14006 (version "1.4.0")
14007 (source
14008 (origin
14009 (method url-fetch)
14010 (uri (pypi-uri "traceback2" version))
14011 (sha256
14012 (base32
14013 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
14014 (build-system python-build-system)
14015 (arguments
14016 `(;; python-traceback2 and python-unittest2 depend on one another.
14017 #:tests? #f))
14018 (native-inputs
14019 `(("python-pbr" ,python-pbr-minimal)))
14020 (propagated-inputs
14021 `(("python-linecache2" ,python-linecache2)))
14022 (home-page
14023 "https://github.com/testing-cabal/traceback2")
14024 (synopsis "Backports of the traceback module")
14025 (description
14026 "This module provides a standard interface to extract, format and print
14027 stack traces of Python programs. It exactly mimics the behavior of the Python
14028 interpreter when it prints a stack trace.")
14029 (license license:psfl)))
14030
14031 (define-public python2-traceback2
14032 (package-with-python2 python-traceback2))
14033
14034 (define-public python-ratelimiter
14035 (package
14036 (name "python-ratelimiter")
14037 (version "1.2.0")
14038 (source
14039 (origin
14040 (method url-fetch)
14041 (uri (pypi-uri "ratelimiter" version))
14042 (sha256
14043 (base32
14044 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
14045 (build-system python-build-system)
14046 (arguments
14047 '(#:tests? #f)) ; There are no tests in the pypi archive.
14048 (home-page "https://github.com/RazerM/ratelimiter")
14049 (synopsis "Simple rate limiting object")
14050 (description
14051 "The @code{ratelimiter} module ensures that an operation will not be
14052 executed more than a given number of times during a given period.")
14053 (license license:asl2.0)))
14054
14055 (define-public python2-ratelimiter
14056 (package-with-python2 python-ratelimiter))
14057
14058 (define-public python-dukpy
14059 (package
14060 (name "python-dukpy")
14061 (version "0.3")
14062 (source
14063 (origin
14064 (method git-fetch)
14065 (uri (git-reference
14066 (url "https://github.com/kovidgoyal/dukpy.git")
14067 (commit (string-append "v" version))))
14068 (file-name (git-file-name name version))
14069 (sha256
14070 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
14071 (build-system python-build-system)
14072 (home-page "https://github.com/kovidgoyal/dukpy")
14073 (synopsis "Run JavaScript in python")
14074 (description
14075 "dukpy is a JavaScript runtime environment for Python using the duktape
14076 embeddable JavaScript engine.")
14077 ;; Dukpy is licensed under MIT like the embedded duktape library,
14078 ;; with 'errors.c' as GPL3.
14079 (license (list license:expat license:gpl3))))
14080
14081 (define-public python2-dukpy
14082 (package-with-python2 python-dukpy))
14083
14084 (define-public python-jsonrpclib-pelix
14085 (package
14086 (name "python-jsonrpclib-pelix")
14087 (version "0.3.2")
14088 (source
14089 (origin
14090 (method url-fetch)
14091 (uri (pypi-uri "jsonrpclib-pelix" version))
14092 (sha256
14093 (base32
14094 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
14095 (build-system python-build-system)
14096 (arguments
14097 `(#:tests? #f)) ; no tests in PyPI tarball
14098 (home-page "https://github.com/tcalmant/jsonrpclib/")
14099 (synopsis "JSON-RPC 2.0 client library for Python")
14100 (description
14101 "This library implements the JSON-RPC v2.0
14102 specification (backwards-compatible) as a client library for Python. This
14103 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
14104 services.")
14105 (license license:asl2.0)))
14106
14107 (define-public python2-jsonrpclib-pelix
14108 (package-with-python2 python-jsonrpclib-pelix))
14109
14110 (define-public python-setuptools-scm-git-archive
14111 (package
14112 (name "python-setuptools-scm-git-archive")
14113 (version "1.0")
14114 (source
14115 (origin
14116 (method url-fetch)
14117 (uri (pypi-uri "setuptools_scm_git_archive" version))
14118 (sha256
14119 (base32
14120 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
14121 (build-system python-build-system)
14122 (native-inputs
14123 `(("python-pytest" ,python-pytest)))
14124 (propagated-inputs
14125 `(("python-setuptools-scm" ,python-setuptools-scm)))
14126 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
14127 (synopsis "Setuptools_scm plugin for git archives")
14128 (description
14129 "The setuptools_scm_git_archive package is a plugin to
14130 setuptools_scm, which supports obtaining versions from git archives that
14131 belong to tagged versions.")
14132 (license license:expat)))
14133
14134 (define-public python2-setuptools-scm-git-archive
14135 (package-with-python2 python-setuptools-scm-git-archive))
14136
14137 (define-public python-setuptools-git
14138 (package
14139 (name "python-setuptools-git")
14140 (version "1.2")
14141 (source
14142 (origin
14143 (method url-fetch)
14144 (uri (pypi-uri "setuptools-git" version))
14145 (sha256
14146 (base32
14147 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
14148 (build-system python-build-system)
14149 (arguments
14150 `(#:phases
14151 (modify-phases %standard-phases
14152 ;; This is needed for tests.
14153 (add-after 'unpack 'configure-git
14154 (lambda _
14155 (setenv "HOME" "/tmp")
14156 (invoke "git" "config" "--global" "user.email" "guix")
14157 (invoke "git" "config" "--global" "user.name" "guix")
14158 #t)))))
14159 (native-inputs
14160 `(("git" ,git-minimal)))
14161 (home-page "https://github.com/msabramo/setuptools-git")
14162 (synopsis "Setuptools revision control system plugin for Git")
14163 (description
14164 "This package provides a plugin for Setuptools for revision control with
14165 Git.")
14166 (license license:bsd-3)))
14167
14168 (define-public python-pyclipper
14169 (package
14170 (name "python-pyclipper")
14171 (version "1.1.0.post3")
14172 (source
14173 (origin
14174 (method url-fetch)
14175 (uri (pypi-uri "pyclipper" version ".zip"))
14176 (sha256
14177 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
14178 (modules '((guix build utils)))
14179 (snippet
14180 '(begin
14181 ;; This file is generated by Cython.
14182 (delete-file "pyclipper/pyclipper.cpp") #t))))
14183 (build-system python-build-system)
14184 (arguments
14185 `(#:phases
14186 (modify-phases %standard-phases
14187 (add-before 'build 'cythonize-sources
14188 (lambda _
14189 (with-directory-excursion "pyclipper"
14190 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
14191 (propagated-inputs
14192 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
14193 (native-inputs
14194 `(("python-cython" ,python-cython)
14195 ("python-pytest" ,python-pytest)
14196 ("python-pytest-runner" ,python-pytest-runner)
14197 ("python-unittest2" ,python-unittest2)
14198 ("unzip" ,unzip)))
14199 (home-page "https://github.com/greginvm/pyclipper")
14200 (synopsis "Wrapper for Angus Johnson's Clipper library")
14201 (description
14202 "Pyclipper is a Cython wrapper for the C++ translation of the
14203 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
14204 (license license:expat)))
14205
14206 (define-public python2-pyclipper
14207 (package-with-python2 python-pyclipper))
14208
14209 (define-public python2-booleanoperations
14210 (package
14211 (name "python2-booleanoperations")
14212 (version "0.7.1")
14213 (source
14214 (origin
14215 (method url-fetch)
14216 (uri (pypi-uri "booleanOperations" version ".zip"))
14217 (sha256
14218 (base32
14219 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
14220 (build-system python-build-system)
14221 (arguments
14222 `(#:python ,python-2))
14223 (native-inputs
14224 `(("unzip" ,unzip)
14225 ("python2-pytest" ,python2-pytest)
14226 ("python2-pytest-runner" ,python2-pytest-runner)))
14227 (propagated-inputs
14228 `(("python-fonttools" ,python2-fonttools)
14229 ("python-pyclipper" ,python2-pyclipper)
14230 ("python-ufolib" ,python2-ufolib)))
14231 (home-page "https://github.com/typemytype/booleanOperations")
14232 (synopsis "Boolean operations on paths")
14233 (description
14234 "BooleanOperations provides a Python library that enables
14235 boolean operations on paths.")
14236 (license license:expat)))
14237
14238 (define-public python-tempdir
14239 (package
14240 (name "python-tempdir")
14241 (version "0.7.1")
14242 (source
14243 (origin
14244 (method url-fetch)
14245 (uri (pypi-uri "tempdir" version))
14246 (sha256
14247 (base32
14248 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
14249 (build-system python-build-system)
14250 (home-page "https://pypi.org/project/tempdir/")
14251 (arguments
14252 ;; the package has no tests
14253 '(#:tests? #f))
14254 (synopsis "Python library for managing temporary directories")
14255 (description
14256 "This library manages temporary directories that are automatically
14257 deleted with all their contents when they are no longer needed. It is
14258 particularly convenient for use in tests.")
14259 (license license:expat)))
14260
14261 (define-public python2-tempdir
14262 (package-with-python2 python-tempdir))
14263
14264 (define-public python-activepapers
14265 (package
14266 (name "python-activepapers")
14267 (version "0.2.2")
14268 (source
14269 (origin
14270 (method url-fetch)
14271 (uri (pypi-uri "ActivePapers.Py" version))
14272 (sha256
14273 (base32
14274 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
14275 (build-system python-build-system)
14276 (arguments
14277 `(#:modules ((ice-9 ftw)
14278 (srfi srfi-1)
14279 (guix build utils)
14280 (guix build python-build-system))
14281
14282 #:phases
14283 (modify-phases %standard-phases
14284 (add-after 'unpack 'delete-python2-code
14285 (lambda _
14286 (for-each delete-file
14287 '("lib/activepapers/builtins2.py"
14288 "lib/activepapers/standardlib2.py"
14289 "lib/activepapers/utility2.py"))))
14290 (replace 'check
14291 (lambda _
14292 ;; Deactivate the test cases that download files
14293 (setenv "NO_NETWORK_ACCESS" "1")
14294 ;; For some strange reason, some tests fail if nosetests runs all
14295 ;; test modules in a single execution. They pass if each test
14296 ;; module is run individually.
14297 (for-each (lambda (filename)
14298 (invoke "nosetests"
14299 (string-append "tests/" filename)))
14300 (scandir "tests"
14301 (lambda (filename)
14302 (string-suffix? ".py" filename)))))))))
14303 (native-inputs
14304 `(("python-tempdir" ,python-tempdir)
14305 ("python-nose" ,python-nose)))
14306 (propagated-inputs
14307 `(("python-h5py" ,python-h5py)))
14308 (home-page "http://www.activepapers.org/")
14309 (synopsis "Executable papers for scientific computing")
14310 (description
14311 "ActivePapers is a tool for working with executable papers, which
14312 combine data, code, and documentation in single-file packages,
14313 suitable for publication as supplementary material or on repositories
14314 such as figshare or Zenodo.")
14315 (properties `((python2-variant . ,(delay python2-activepapers))))
14316 (license license:bsd-3)))
14317
14318 (define-public python2-activepapers
14319 (let ((base (package-with-python2
14320 (strip-python2-variant python-activepapers))))
14321 (package
14322 (inherit base)
14323 (arguments
14324 (substitute-keyword-arguments (package-arguments base)
14325 ((#:phases phases)
14326 `(modify-phases ,phases
14327 (delete 'delete-python2-code)
14328 (add-after 'unpack 'delete-python3-code
14329 (lambda _
14330 (for-each delete-file
14331 '("lib/activepapers/builtins3.py"
14332 "lib/activepapers/standardlib3.py"
14333 "lib/activepapers/utility3.py")))))))))))
14334
14335 (define-public python-semver
14336 (package
14337 (name "python-semver")
14338 (version "2.9.0")
14339 (source
14340 (origin
14341 (method url-fetch)
14342 (uri (pypi-uri "semver" version))
14343 (sha256
14344 (base32
14345 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
14346 (build-system python-build-system)
14347 (native-inputs
14348 `(("python-tox" ,python-tox)
14349 ("python-virtualenv" ,python-virtualenv)))
14350 (home-page "https://github.com/k-bx/python-semver")
14351 (synopsis "Python helper for Semantic Versioning")
14352 (description "This package provides a Python library for
14353 @url{Semantic Versioning, http://semver.org/}.")
14354 (license license:bsd-3)))
14355
14356 (define-public python2-semver
14357 (package-with-python2 python-semver))
14358
14359 (define-public python-pyro4
14360 (package
14361 (name "python-pyro4")
14362 (version "4.77")
14363 (source
14364 (origin
14365 (method url-fetch)
14366 (uri (pypi-uri "Pyro4" version))
14367 (sha256
14368 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
14369 (build-system python-build-system)
14370 (arguments
14371 '(#:tests? #f)) ;FIXME: Some tests require network access.
14372 (native-inputs
14373 `(("python-cloudpickle" ,python-cloudpickle)
14374 ("python-dill" ,python-dill)
14375 ("python-msgpack" ,python-msgpack)))
14376 (propagated-inputs
14377 `(("python-serpent" ,python-serpent)))
14378 (home-page "https://pyro4.readthedocs.io")
14379 (synopsis "Distributed object middleware for Python")
14380 (description
14381 "Pyro enables you to build applications in which objects can talk to each
14382 other over the network. You can just use normal Python method calls to call
14383 objects on other machines, also known as remote procedure calls (RPC).")
14384 (license license:expat)))
14385
14386 (define-public python2-pyro
14387 (package
14388 (name "python2-pyro")
14389 (version "3.16")
14390 (source
14391 (origin
14392 (method url-fetch)
14393 (uri (pypi-uri "Pyro" version))
14394 (file-name (string-append "Pyro-" version ".tar.gz"))
14395 (sha256
14396 (base32
14397 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
14398 (build-system python-build-system)
14399 (arguments
14400 ;; Pyro is not compatible with Python 3
14401 `(#:python ,python-2
14402 ;; Pyro has no test cases for automatic execution
14403 #:tests? #f))
14404 (home-page "http://pythonhosted.org/Pyro/")
14405 (synopsis "Distributed object manager for Python")
14406 (description "Pyro is a Distributed Object Technology system
14407 written in Python that is designed to be easy to use. It resembles
14408 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
14409 which is a system and language independent Distributed Object Technology
14410 and has much more to offer than Pyro or RMI. Pyro 3.x is no
14411 longer maintained. New projects should use Pyro4 instead, which
14412 is the new Pyro version that is actively developed.")
14413 (license license:expat)))
14414
14415 (define-public python2-scientific
14416 (package
14417 (name "python2-scientific")
14418 (version "2.9.4")
14419 (source
14420 (origin
14421 (method git-fetch)
14422 (uri (git-reference
14423 (url "https://github.com/khinsen/ScientificPython")
14424 (commit (string-append "rel" version))))
14425 (file-name (git-file-name name version))
14426 (sha256
14427 (base32
14428 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
14429 (build-system python-build-system)
14430 (inputs
14431 `(("netcdf" ,netcdf)))
14432 (propagated-inputs
14433 `(("python-numpy" ,python2-numpy-1.8)
14434 ("python-pyro" ,python2-pyro)))
14435 (arguments
14436 ;; ScientificPython is not compatible with Python 3
14437 `(#:python ,python-2
14438 #:tests? #f ; No test suite
14439 #:phases
14440 (modify-phases %standard-phases
14441 (replace 'build
14442 (lambda* (#:key inputs #:allow-other-keys)
14443 (invoke "python" "setup.py" "build"
14444 (string-append "--netcdf_prefix="
14445 (assoc-ref inputs "netcdf"))))))))
14446 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
14447 (synopsis "Python modules for scientific computing")
14448 (description "ScientificPython is a collection of Python modules that are
14449 useful for scientific computing. Most modules are rather general (Geometry,
14450 physical units, automatic derivatives, ...) whereas others are more
14451 domain-specific (e.g. netCDF and PDB support). The library is currently
14452 not actively maintained and works only with Python 2 and NumPy < 1.9.")
14453 (license license:cecill-c)))
14454
14455 (define-public python2-mmtk
14456 (package
14457 (name "python2-mmtk")
14458 (version "2.7.12")
14459 (source
14460 (origin
14461 (method git-fetch)
14462 (uri (git-reference
14463 (url "https://github.com/khinsen/MMTK")
14464 (commit (string-append "rel" version))))
14465 (file-name (git-file-name name version))
14466 (sha256
14467 (base32
14468 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
14469 (build-system python-build-system)
14470 (native-inputs
14471 `(("netcdf" ,netcdf)))
14472 (propagated-inputs
14473 `(("python-scientific" ,python2-scientific)
14474 ("python-tkinter" ,python-2 "tk")))
14475 (arguments
14476 `(#:python ,python-2
14477 #:tests? #f
14478 #:phases
14479 (modify-phases %standard-phases
14480 (add-before 'build 'includes-from-scientific
14481 (lambda* (#:key inputs #:allow-other-keys)
14482 (mkdir-p "Include/Scientific")
14483 (copy-recursively
14484 (string-append
14485 (assoc-ref inputs "python-scientific")
14486 "/include/python2.7/Scientific")
14487 "Include/Scientific"))))))
14488 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
14489 (synopsis "Python library for molecular simulation")
14490 (description "MMTK is a library for molecular simulations with an emphasis
14491 on biomolecules. It provides widely used methods such as Molecular Dynamics
14492 and normal mode analysis, but also basic routines for implementing new methods
14493 for simulation and analysis. The library is currently not actively maintained
14494 and works only with Python 2 and NumPy < 1.9.")
14495 (license license:cecill-c)))
14496
14497 (define-public python-phonenumbers
14498 (package
14499 (name "python-phonenumbers")
14500 (version "8.9.1")
14501 (source
14502 (origin
14503 (method url-fetch)
14504 (uri (pypi-uri "phonenumbers" version))
14505 (sha256
14506 (base32
14507 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
14508 (build-system python-build-system)
14509 (home-page
14510 "https://github.com/daviddrysdale/python-phonenumbers")
14511 (synopsis
14512 "Python library for dealing with international phone numbers")
14513 (description
14514 "This package provides a Python port of Google's libphonenumber library.")
14515 (license license:asl2.0)))
14516
14517 (define-public python2-phonenumbers
14518 (package-with-python2 python-phonenumbers))
14519
14520 (define-public python-send2trash
14521 (package
14522 (name "python-send2trash")
14523 (version "1.5.0")
14524 (source
14525 (origin (method git-fetch)
14526 ;; Source tarball on PyPI doesn't include tests.
14527 (uri (git-reference
14528 (url "https://github.com/hsoft/send2trash.git")
14529 (commit version)))
14530 (file-name (git-file-name name version))
14531 (sha256
14532 (base32
14533 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
14534 (build-system python-build-system)
14535 (arguments
14536 '(#:phases
14537 (modify-phases %standard-phases
14538 (add-before 'check 'pre-check
14539 (lambda _
14540 (mkdir-p "/tmp/foo")
14541 (setenv "HOME" "/tmp/foo")
14542 #t)))))
14543 (home-page "https://github.com/hsoft/send2trash")
14544 (synopsis "Send files to the user's @file{~/Trash} directory")
14545 (description "This package provides a Python library to send files to the
14546 user's @file{~/Trash} directory.")
14547 (properties `((python2-variant . ,(delay python2-send2trash))))
14548 (license license:bsd-3)))
14549
14550 (define-public python2-send2trash
14551 (package
14552 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
14553 (arguments
14554 (substitute-keyword-arguments (package-arguments python-send2trash)
14555 ((#:phases phases)
14556 `(modify-phases ,phases
14557 (add-before 'check 'setenv
14558 (lambda _
14559 (setenv "PYTHONPATH"
14560 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
14561 #t))))))))
14562
14563 (define-public python-yapf
14564 (package
14565 (name "python-yapf")
14566 (version "0.29.0")
14567 (source
14568 (origin
14569 (method url-fetch)
14570 (uri (pypi-uri "yapf" version))
14571 (sha256
14572 (base32
14573 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
14574 (build-system python-build-system)
14575 (home-page "https://github.com/google/yapf")
14576 (synopsis "Formatter for Python code")
14577 (description "YAPF is a formatter for Python code. It's based off of
14578 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
14579 takes the code and reformats it to the best formatting that conforms to the
14580 style guide, even if the original code didn't violate the style guide.")
14581 (license license:asl2.0)))
14582
14583 (define-public python2-yapf
14584 (package-with-python2 python-yapf))
14585
14586 (define-public python-gyp
14587 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
14588 (revision "0"))
14589 (package
14590 (name "python-gyp")
14591 ;; Google does not release versions,
14592 ;; based on second most recent commit date.
14593 (version (git-version "0.0.0" revision commit))
14594 (source
14595 (origin
14596 ;; Google does not release tarballs,
14597 ;; git checkout is needed.
14598 (method git-fetch)
14599 (uri (git-reference
14600 (url "https://chromium.googlesource.com/external/gyp")
14601 (commit commit)))
14602 (file-name (git-file-name name version))
14603 (sha256
14604 (base32
14605 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14606 (build-system python-build-system)
14607 (home-page "https://gyp.gsrc.io/")
14608 (synopsis "GYP is a Meta-Build system")
14609 (description
14610 "GYP builds build systems for large, cross platform applications.
14611 It can be used to generate XCode projects, Visual Studio projects, Ninja build
14612 files, and Makefiles.")
14613 (license license:bsd-3))))
14614
14615 (define-public python2-gyp
14616 (package-with-python2 python-gyp))
14617
14618 (define-public python-whatever
14619 (package
14620 (name "python-whatever")
14621 (version "0.6")
14622 (source
14623 (origin
14624 (method git-fetch)
14625 (uri (git-reference
14626 (url "https://github.com/Suor/whatever")
14627 (commit version)))
14628 (file-name (git-file-name name version))
14629 (sha256
14630 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
14631 (build-system python-build-system)
14632 (arguments
14633 `(#:phases
14634 (modify-phases %standard-phases
14635 (replace 'check
14636 (lambda _
14637 (invoke "py.test"))))))
14638 (native-inputs
14639 `(("python-pytest" ,python-pytest)))
14640 (home-page "http://github.com/Suor/whatever")
14641 (synopsis "Make anonymous functions by partial application of operators")
14642 (description "@code{whatever} provides an easy way to make anonymous
14643 functions by partial application of operators.")
14644 (license license:bsd-3)))
14645
14646 (define-public python2-whatever
14647 (package-with-python2 python-whatever))
14648
14649 (define-public python-funcy
14650 (package
14651 (name "python-funcy")
14652 (version "1.11")
14653 (source
14654 (origin
14655 (method git-fetch)
14656 (uri (git-reference
14657 (url "https://github.com/Suor/funcy.git")
14658 (commit version)))
14659 (sha256
14660 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14661 (file-name (git-file-name name version))))
14662 (build-system python-build-system)
14663 (arguments
14664 `(#:phases
14665 (modify-phases %standard-phases
14666 (replace 'check
14667 (lambda _
14668 (invoke "py.test"))))))
14669 (native-inputs
14670 `(("python-pytest" ,python-pytest)
14671 ("python-whatever" ,python-whatever)))
14672 (home-page "http://github.com/Suor/funcy")
14673 (synopsis "Functional tools")
14674 (description "@code{funcy} is a library that provides functional tools.
14675 Examples are:
14676 @enumerate
14677 @item merge - Merges collections of the same type
14678 @item walk - Type-preserving map
14679 @item select - Selects a part of a collection
14680 @item take - Takes the first n items of a collection
14681 @item first - Takes the first item of a collection
14682 @item remove - Predicated-removes items of a collection
14683 @item concat - Concatenates two collections
14684 @item flatten - Flattens a collection with subcollections
14685 @item distinct - Returns only distinct items
14686 @item split - Predicated-splits a collection
14687 @item split_at - Splits a collection at a given item
14688 @item group_by - Groups items by group
14689 @item pairwise - Pairs off adjacent items
14690 @item partial - Partially-applies a function
14691 @item curry - Curries a function
14692 @item compose - Composes functions
14693 @item complement - Complements a predicate
14694 @item all_fn - \"all\" with predicate
14695 @end enumerate")
14696 (license license:bsd-3)))
14697
14698 (define-public python2-funcy
14699 (package-with-python2 python-funcy))
14700
14701 (define-public python-isoweek
14702 (package
14703 (name "python-isoweek")
14704 (version "1.3.3")
14705 (source
14706 (origin
14707 (method url-fetch)
14708 (uri (pypi-uri "isoweek" version))
14709 (sha256
14710 (base32
14711 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14712 (build-system python-build-system)
14713 (home-page "https://github.com/gisle/isoweek")
14714 (synopsis "Objects representing a week")
14715 (description "The @code{isoweek} module provide the class Week that
14716 implements the week definition of ISO 8601. This standard also defines
14717 a notation for identifying weeks; yyyyWww (where the W is a literal).
14718 Week instances stringify to this form.")
14719 (license license:bsd-3)))
14720
14721 (define-public python2-isoweek
14722 (package-with-python2 python-isoweek))
14723
14724 (define-public python-tokenize-rt
14725 (package
14726 (name "python-tokenize-rt")
14727 (version "2.0.1")
14728 (source
14729 (origin
14730 (method url-fetch)
14731 (uri (pypi-uri "tokenize-rt" version))
14732 (sha256
14733 (base32
14734 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14735 (build-system python-build-system)
14736 (home-page "https://github.com/asottile/tokenize-rt")
14737 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14738 (description
14739 "This Python library is a wrapper around @code{tokenize} from the Python
14740 standard library. It provides two additional tokens @code{ESCAPED_NL} and
14741 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14742 and @code{tokens_to_src} to roundtrip.")
14743 (license license:expat)))
14744
14745 (define-public python-future-fstrings
14746 (package
14747 (name "python-future-fstrings")
14748 (version "0.4.1")
14749 (source
14750 (origin
14751 (method url-fetch)
14752 (uri (pypi-uri "future_fstrings" version))
14753 (sha256
14754 (base32
14755 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14756 (build-system python-build-system)
14757 (propagated-inputs
14758 `(("python-tokenize-rt" ,python-tokenize-rt)))
14759 (home-page "https://github.com/asottile/future-fstrings")
14760 (synopsis "Backport of fstrings to Python < 3.6")
14761 (description
14762 "This package provides a UTF-8 compatible encoding
14763 @code{future_fstrings}, which performs source manipulation. It decodes the
14764 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
14765 @code{f} strings.")
14766 (license license:expat)))
14767
14768 (define-public python-typed-ast
14769 (package
14770 (name "python-typed-ast")
14771 (version "1.4.0")
14772 (source
14773 (origin
14774 (method git-fetch)
14775 (uri (git-reference
14776 (url "https://github.com/python/typed_ast.git")
14777 (commit version)))
14778 (sha256
14779 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
14780 (file-name (git-file-name name version))))
14781 (build-system python-build-system)
14782 (arguments
14783 `(#:modules ((guix build utils)
14784 (guix build python-build-system)
14785 (ice-9 ftw)
14786 (srfi srfi-1)
14787 (srfi srfi-26))
14788 #:phases
14789 (modify-phases %standard-phases
14790 (replace 'check
14791 (lambda _
14792 (let ((cwd (getcwd)))
14793 (setenv "PYTHONPATH"
14794 (string-append cwd "/build/"
14795 (find (cut string-prefix? "lib" <>)
14796 (scandir (string-append cwd "/build")))
14797 ":"
14798 (getenv "PYTHONPATH"))))
14799 (invoke "pytest")
14800 #t)))))
14801 (native-inputs `(("python-pytest" ,python-pytest)))
14802 (home-page "https://github.com/python/typed_ast")
14803 (synopsis "Fork of Python @code{ast} modules with type comment support")
14804 (description "This package provides a parser similar to the standard
14805 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
14806 include PEP 484 type comments and are independent of the version of Python
14807 under which they are run. The @code{typed_ast} parsers produce the standard
14808 Python AST (plus type comments), and are both fast and correct, as they are
14809 based on the CPython 2.7 and 3.7 parsers.")
14810 ;; See the file "LICENSE" for the details.
14811 (license (list license:psfl
14812 license:asl2.0
14813 license:expat)))) ;ast27/Parser/spark.py
14814
14815 (define-public python-typing
14816 (package
14817 (name "python-typing")
14818 (version "3.6.6")
14819 (source
14820 (origin
14821 (method url-fetch)
14822 (uri (pypi-uri "typing" version))
14823 (sha256
14824 (base32
14825 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
14826 (build-system python-build-system)
14827 (home-page "https://docs.python.org/3/library/typing.html")
14828 (synopsis "Type hints for Python")
14829 (description "This is a backport of the standard library @code{typing}
14830 module to Python versions older than 3.5. Typing defines a standard notation
14831 for Python function and variable type annotations. The notation can be used
14832 for documenting code in a concise, standard format, and it has been designed
14833 to also be used by static and runtime type checkers, static analyzers, IDEs
14834 and other tools.")
14835 (license license:psfl)))
14836
14837 (define-public python2-typing
14838 (package-with-python2 python-typing))
14839
14840 (define-public python-typing-extensions
14841 (package
14842 (name "python-typing-extensions")
14843 (version "3.7.2")
14844 (source
14845 (origin
14846 (method url-fetch)
14847 (uri (pypi-uri "typing_extensions" version))
14848 (sha256
14849 (base32
14850 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
14851 (build-system python-build-system)
14852 (home-page
14853 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
14854 (synopsis "Experimental type hints for Python")
14855 (description
14856 "The typing_extensions module contains additional @code{typing} hints not
14857 yet present in the of the @code{typing} standard library.
14858 Included are implementations of:
14859 @enumerate
14860 @item ClassVar
14861 @item ContextManager
14862 @item Counter
14863 @item DefaultDict
14864 @item Deque
14865 @item NewType
14866 @item NoReturn
14867 @item overload
14868 @item Protocol
14869 @item runtime
14870 @item Text
14871 @item Type
14872 @item TYPE_CHECKING
14873 @item AsyncGenerator
14874 @end enumerate\n")
14875 (license license:psfl)))
14876
14877 (define-public bpython
14878 (package
14879 (name "bpython")
14880 (version "0.18")
14881 (source
14882 (origin
14883 (method url-fetch)
14884 (uri (pypi-uri "bpython" version))
14885 (sha256
14886 (base32 "1hl6frgvr2lqaxqczl8amg9xih32b3gzv429vs0qrjb8wpdj1k2n"))))
14887 (build-system python-build-system)
14888 (arguments
14889 `(#:phases
14890 (modify-phases %standard-phases
14891 (add-after 'unpack 'remove-failing-test
14892 (lambda _
14893 ;; Remove failing test. FIXME: make it pass
14894 (delete-file "bpython/test/test_args.py")
14895 #t))
14896 (add-after 'wrap 'add-aliases
14897 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
14898 (lambda* (#:key outputs #:allow-other-keys)
14899 (let ((out (assoc-ref outputs "out")))
14900 (for-each
14901 (lambda (old new)
14902 (symlink old (string-append out "/bin/" new)))
14903 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
14904 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
14905 #t)))))
14906 (propagated-inputs
14907 `(("python-pygments" ,python-pygments)
14908 ("python-requests" ,python-requests)
14909 ("python-babel" ,python-babel) ; optional, for internationalization
14910 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
14911 ("python-greenlet" ,python-greenlet)
14912 ("python-urwid" ,python-urwid) ; for bpython-urwid only
14913 ("python-six" ,python-six)))
14914 (native-inputs
14915 `(("python-sphinx" ,python-sphinx)
14916 ("python-mock" ,python-mock)))
14917 (home-page "https://bpython-interpreter.org/")
14918 (synopsis "Fancy interface to the Python interpreter")
14919 (description "Bpython is a fancy interface to the Python
14920 interpreter. bpython's main features are
14921
14922 @enumerate
14923 @item in-line syntax highlighting,
14924 @item readline-like autocomplete with suggestions displayed as you type,
14925 @item expected parameter list for any Python function,
14926 @item \"rewind\" function to pop the last line of code from memory and
14927 re-evaluate,
14928 @item send the code you've entered off to a pastebin,
14929 @item save the code you've entered to a file, and
14930 @item auto-indentation.
14931 @end enumerate")
14932 (license license:expat)))
14933
14934 (define-public bpython2
14935 (let ((base (package-with-python2
14936 (strip-python2-variant bpython))))
14937 (package (inherit base)
14938 (name "bpython2")
14939 (arguments
14940 `(#:python ,python-2
14941 #:phases
14942 (modify-phases %standard-phases
14943 (add-after 'unpack 'remove-failing-test
14944 (lambda _
14945 ;; Remove failing test. FIXME: make it pass
14946 (delete-file "bpython/test/test_args.py")
14947 ;; Disable failing test-cases (renaming inhibits they are
14948 ;; discovered)
14949 (substitute* "bpython/test/test_curtsies_repl.py"
14950 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
14951 (string-append a "xxx_off_" b))
14952 (("^(\\s*def )(test_complex\\W)" _ a b)
14953 (string-append a "xxx_off_" b)))
14954 #t))
14955 (add-before 'build 'rename-scripts
14956 ;; rename the scripts to bypthon2, bpdb2, etc.
14957 (lambda _
14958 (substitute* "setup.py"
14959 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
14960 (string-append name "2" rest "\n"))
14961 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
14962 (string-append name "2" (or sub "") rest "\n")))
14963 #t))))))))
14964
14965 (define-public python-pyinotify
14966 (package
14967 (name "python-pyinotify")
14968 (version "0.9.6")
14969 (source (origin
14970 (method url-fetch)
14971 (uri (pypi-uri "pyinotify" version))
14972 (sha256
14973 (base32
14974 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
14975 (build-system python-build-system)
14976 (arguments `(#:tests? #f)) ;no tests
14977 (home-page "https://github.com/seb-m/pyinotify")
14978 (synopsis "Python library for monitoring inotify events")
14979 (description
14980 "@code{pyinotify} provides a Python interface for monitoring
14981 file system events on Linux.")
14982 (license license:expat)))
14983
14984 (define-public python2-pyinotify
14985 (package-with-python2 python-pyinotify))
14986
14987 ;; Ada parser uses this version.
14988 (define-public python2-quex-0.67.3
14989 (package
14990 (name "python2-quex")
14991 (version "0.67.3")
14992 (source
14993 (origin
14994 (method url-fetch)
14995 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
14996 (version-major+minor version)
14997 "/quex-" version ".zip"))
14998 (sha256
14999 (base32
15000 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
15001 (build-system python-build-system)
15002 (native-inputs
15003 `(("unzip" ,unzip)))
15004 (arguments
15005 `(#:python ,python-2
15006 #:tests? #f
15007 #:phases
15008 (modify-phases %standard-phases
15009 (delete 'configure)
15010 (delete 'build)
15011 (replace 'install
15012 (lambda* (#:key outputs #:allow-other-keys)
15013 (let* ((out (assoc-ref outputs "out"))
15014 (share/quex (string-append out "/share/quex"))
15015 (bin (string-append out "/bin")))
15016 (copy-recursively "." share/quex)
15017 (mkdir-p bin)
15018 (symlink (string-append share/quex "/quex-exe.py")
15019 (string-append bin "/quex"))
15020 #t))))))
15021 (native-search-paths
15022 (list (search-path-specification
15023 (variable "QUEX_PATH")
15024 (files '("share/quex")))))
15025 (home-page "http://quex.sourceforge.net/")
15026 (synopsis "Lexical analyzer generator in Python")
15027 (description "@code{quex} is a lexical analyzer generator in Python.")
15028 (license license:lgpl2.1+))) ; Non-military
15029
15030 (define-public python2-quex
15031 (package (inherit python2-quex-0.67.3)
15032 (name "python2-quex")
15033 (version "0.68.1")
15034 (source
15035 (origin
15036 (method url-fetch)
15037 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
15038 (sha256
15039 (base32
15040 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
15041 (file-name (string-append name "-" version ".tar.gz"))))))
15042
15043 (define-public python-more-itertools
15044 (package
15045 (name "python-more-itertools")
15046 (version "7.1.0")
15047 (source
15048 (origin
15049 (method url-fetch)
15050 (uri (pypi-uri "more-itertools" version))
15051 (sha256
15052 (base32
15053 "16phg2f2dvm6ci5wr49ncha5lmc0m2in3bsl33c61vzca4gkvd4b"))))
15054 (build-system python-build-system)
15055 (home-page "https://github.com/erikrose/more-itertools")
15056 (synopsis "More routines for operating on iterables, beyond itertools")
15057 (description "Python's built-in @code{itertools} module implements a
15058 number of iterator building blocks inspired by constructs from APL, Haskell,
15059 and SML. @code{more-itertools} includes additional building blocks for
15060 working with iterables.")
15061 (properties `((python2-variant . ,(delay python2-more-itertools))))
15062 (license license:expat)))
15063
15064 ;; The 5.x series are the last versions supporting Python 2.7.
15065 (define-public python2-more-itertools
15066 (package
15067 (inherit python-more-itertools)
15068 (name "python2-more-itertools")
15069 (version "5.0.0")
15070 (source (origin
15071 (method url-fetch)
15072 (uri (pypi-uri "more-itertools" version))
15073 (sha256
15074 (base32
15075 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
15076 (arguments
15077 `(#:python ,python2-minimal))
15078 (propagated-inputs
15079 `(("python2-six" ,python2-six-bootstrap)))))
15080
15081 (define-public python-latexcodec
15082 (package
15083 (name "python-latexcodec")
15084 (version "1.0.7")
15085 (source
15086 (origin
15087 (method url-fetch)
15088 (uri (pypi-uri "latexcodec" version))
15089 (sha256
15090 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
15091 (build-system python-build-system)
15092 (inputs
15093 `(("python-six" ,python-six)))
15094 (home-page "https://readthedocs.org/projects/latexcodec/")
15095 (synopsis "Work with LaTeX code in Python")
15096 (description "Lexer and codec to work with LaTeX code in Python.")
15097 (license license:expat)))
15098
15099 (define-public python-pybtex
15100 (package
15101 (name "python-pybtex")
15102 (version "0.22.2")
15103 (source
15104 (origin
15105 (method url-fetch)
15106 (uri (pypi-uri "pybtex" version))
15107 (sha256
15108 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
15109 (build-system python-build-system)
15110 (native-inputs
15111 `(("python-nose" ,python-nose)))
15112 (inputs
15113 `(("python-latexcodec" ,python-latexcodec)
15114 ("python-pyyaml" ,python-pyyaml)
15115 ("python-six" ,python-six)))
15116 (arguments
15117 `(#:test-target "nosetests"))
15118 (home-page "https://pybtex.org/")
15119 (synopsis "BibTeX-compatible bibliography processor")
15120 (description "Pybtex is a BibTeX-compatible bibliography processor written
15121 in Python. You can simply type pybtex instead of bibtex.")
15122 (license license:expat)))
15123
15124 (define-public python-onetimepass
15125 (package
15126 (name "python-onetimepass")
15127 (version "1.0.1")
15128 (source
15129 (origin
15130 (method url-fetch)
15131 (uri (pypi-uri "onetimepass" version))
15132 (sha256
15133 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
15134 (build-system python-build-system)
15135 (propagated-inputs `(("python-six" ,python-six)))
15136 (home-page "https://github.com/tadeck/onetimepass/")
15137 (synopsis "One-time password library")
15138 (description "Python one-time password library for HMAC-based (HOTP) and
15139 time-based (TOTP) passwords.")
15140 (license license:expat)))
15141
15142 (define-public python-parso
15143 (package
15144 (name "python-parso")
15145 (version "0.5.1")
15146 (source
15147 (origin
15148 (method url-fetch)
15149 (uri (pypi-uri "parso" version))
15150 (sha256
15151 (base32
15152 "171a9ivhxwsd52h1cgsz40zgzpgzscn7yqb7sdjhy8m1lzj0wsv6"))))
15153 (native-inputs
15154 `(("python-pytest" ,python-pytest)))
15155 (build-system python-build-system)
15156 (arguments
15157 `(#:phases (modify-phases %standard-phases
15158 (replace 'check
15159 (lambda _ (invoke "pytest" "-vv"))))))
15160 (home-page "https://github.com/davidhalter/parso")
15161 (synopsis "Python Parser")
15162 (description "Parso is a Python parser that supports error recovery and
15163 round-trip parsing for different Python versions (in multiple Python versions).
15164 Parso is also able to list multiple syntax errors in your Python file.")
15165 (license license:expat)))
15166
15167 (define-public python2-parso
15168 (package-with-python2 python-parso))
15169
15170 (define-public python-async-generator
15171 (package
15172 (name "python-async-generator")
15173 (version "1.10")
15174 (source
15175 (origin
15176 (method url-fetch)
15177 (uri (pypi-uri "async_generator" version))
15178 (sha256
15179 (base32
15180 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
15181 (build-system python-build-system)
15182 (native-inputs
15183 `(("python-pytest" ,python-pytest)))
15184 (home-page "https://github.com/python-trio/async_generator")
15185 (synopsis "Async generators and context managers for Python 3.5+")
15186 (description "@code{async_generator} back-ports Python 3.6's native async
15187 generators and Python 3.7's context managers into Python 3.5.")
15188 ;; Dual licensed.
15189 (license (list license:expat license:asl2.0))))
15190
15191 (define-public python-async-timeout
15192 (package
15193 (name "python-async-timeout")
15194 (version "3.0.1")
15195 (source
15196 (origin
15197 (method url-fetch)
15198 (uri (pypi-uri "async-timeout" version))
15199 (sha256
15200 (base32
15201 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
15202 (build-system python-build-system)
15203 (home-page "https://github.com/aio-libs/async_timeout/")
15204 (synopsis "Timeout context manager for asyncio programs")
15205 (description "@code{async-timeout} provides a timeout timeout context
15206 manager compatible with @code{asyncio}.")
15207 (license license:asl2.0)))
15208
15209 (define-public python-glob2
15210 (package
15211 (name "python-glob2")
15212 (version "0.7")
15213 (source
15214 (origin
15215 (method git-fetch)
15216 (uri (git-reference
15217 (url "https://github.com/miracle2k/python-glob2.git")
15218 (commit (string-append "v" version))))
15219 (file-name (git-file-name name version))
15220 (sha256
15221 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
15222 (build-system python-build-system)
15223 (home-page "https://github.com/miracle2k/python-glob2/")
15224 (synopsis "Extended Version of the python buildin glob module")
15225 (description "This is an extended version of the Python
15226 @url{http://docs.python.org/library/glob.html, built-in glob module} which
15227 adds:
15228
15229 @itemize
15230 @item The ability to capture the text matched by glob patterns, and return
15231 those matches alongside the file names.
15232 @item A recursive @code{**} globbing syntax, akin for example to the
15233 @code{globstar} option of Bash.
15234 @item The ability to replace the file system functions used, in order to glob
15235 on virtual file systems.
15236 @item Compatible with Python 2 and Python 3 (tested with 3.3).
15237 @end itemize
15238
15239 Glob2 currently based on the glob code from Python 3.3.1.")
15240 (license license:bsd-2)))
15241
15242 (define-public python2-glob2
15243 (package-with-python2 python-glob2))
15244
15245 (define-public python-gipc
15246 (package
15247 (name "python-gipc")
15248 (version "0.6.0")
15249 (source
15250 (origin
15251 (method url-fetch)
15252 (uri (pypi-uri "gipc" version ".zip"))
15253 (sha256
15254 (base32
15255 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
15256 (build-system python-build-system)
15257 (native-inputs
15258 `(("unzip" ,unzip)))
15259 (propagated-inputs
15260 `(("python-gevent" ,python-gevent)))
15261 (home-page "http://gehrcke.de/gipc")
15262 (synopsis "Child process management in the context of gevent")
15263 (description "Usage of Python's multiprocessing package in a
15264 gevent-powered application may raise problems. With @code{gipc},
15265 process-based child processes can safely be created anywhere within a
15266 gevent-powered application.")
15267 (license license:expat)))
15268
15269 (define-public python2-gipc
15270 (package-with-python2 python-gipc))
15271
15272 (define-public python-fusepy
15273 (package
15274 (name "python-fusepy")
15275 (version "2.0.4")
15276 (source
15277 (origin
15278 (method url-fetch)
15279 (uri (pypi-uri "fusepy" version))
15280 (sha256
15281 (base32
15282 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
15283 (build-system python-build-system)
15284 (arguments
15285 `(#:phases
15286 (modify-phases %standard-phases
15287 (add-before 'build 'set-library-file-name
15288 (lambda* (#:key inputs #:allow-other-keys)
15289 (let ((fuse (assoc-ref inputs "fuse")))
15290 (substitute* "fuse.py"
15291 (("find_library\\('fuse'\\)")
15292 (string-append "'" fuse "/lib/libfuse.so'")))
15293 #t))))))
15294 (propagated-inputs
15295 `(("fuse" ,fuse)))
15296 (home-page "https://github.com/fusepy/fusepy")
15297 (synopsis "Simple ctypes bindings for FUSE")
15298 (description "Python module that provides a simple interface to FUSE and
15299 MacFUSE. The binding is created using the standard @code{ctypes} library.")
15300 (license license:isc)))
15301
15302 (define-public python2-fusepy
15303 (package-with-python2 python-fusepy))
15304
15305 (define-public python2-gdrivefs
15306 (package
15307 (name "python2-gdrivefs")
15308 (version "0.14.9")
15309 (source
15310 (origin
15311 (method url-fetch)
15312 (uri (pypi-uri "gdrivefs" version))
15313 (sha256
15314 (base32
15315 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
15316 (build-system python-build-system)
15317 (arguments
15318 `(#:python ,python-2
15319 #:phases
15320 (modify-phases %standard-phases
15321 (add-before 'build 'patch-setup-py
15322 (lambda _
15323 ;; Update requirements from dependency==version
15324 ;; to dependency>=version
15325 (substitute* "gdrivefs/resources/requirements.txt"
15326 (("==") ">="))
15327 #t)))))
15328 (native-inputs
15329 `(("python2-gipc" ,python2-gipc)
15330 ("python2-gevent" ,python2-gevent)
15331 ("python2-greenlet" ,python2-greenlet)
15332 ("python2-httplib2" ,python2-httplib2)
15333 ("python2-uritemplate" ,python2-uritemplate)
15334 ("python2-oauth2client" ,python2-oauth2client)
15335 ("python2-six" ,python2-six)))
15336 (propagated-inputs
15337 `(("python2-dateutil" ,python2-dateutil)
15338 ("python2-fusepy" ,python2-fusepy)
15339 ("python2-google-api-client" ,python2-google-api-client)))
15340 (home-page "https://github.com/dsoprea/GDriveFS")
15341 (synopsis "Mount Google Drive as a local file system")
15342 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
15343 under Python 2.7.")
15344 (license license:gpl2)))
15345
15346 (define-public pybind11
15347 (package
15348 (name "pybind11")
15349 (version "2.3.0")
15350 (source (origin
15351 (method git-fetch)
15352 (uri (git-reference
15353 (url "https://github.com/pybind/pybind11.git")
15354 (commit (string-append "v" version))))
15355 (sha256
15356 (base32
15357 "11b6dniri8m05spfd2a19irz82shf4sdca73566bniggrf3zclnf"))
15358 (file-name (git-file-name name version))))
15359 (build-system cmake-build-system)
15360 (native-inputs
15361 `(("python" ,python)
15362 ("python-pytest" ,python-pytest)))
15363 (arguments
15364 `(#:test-target "check"))
15365 (home-page "https://github.com/pybind/pybind11/")
15366 (synopsis "Seamless operability between C++11 and Python")
15367 (description "pybind11 is a lightweight header-only library that exposes
15368 C++ types in Python and vice versa, mainly to create Python bindings of
15369 existing C++ code. Its goals and syntax are similar to the excellent
15370 Boost.Python library by David Abrahams: to minimize boilerplate code in
15371 traditional extension modules by inferring type information using compile-time
15372 introspection.")
15373 (license license:expat)))
15374
15375 (define-public python-fasteners
15376 (package
15377 (name "python-fasteners")
15378 (version "0.14.1")
15379 (source
15380 (origin
15381 (method url-fetch)
15382 (uri (pypi-uri "fasteners" version))
15383 (sha256
15384 (base32
15385 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
15386 (build-system python-build-system)
15387 (propagated-inputs
15388 `(("python-monotonic" ,python-monotonic)
15389 ("python-six" ,python-six)
15390 ("python-testtools" ,python-testtools)))
15391 (home-page "https://github.com/harlowja/fasteners")
15392 (synopsis "Python package that provides useful locks")
15393 (description
15394 "This package provides a Python program that provides following locks:
15395
15396 @itemize
15397 @item Locking decorator
15398 @item Reader-writer locks
15399 @item Inter-process locks
15400 @item Generic helpers
15401 @end itemize\n")
15402 (properties `((python2-variant . ,(delay python2-fasteners))))
15403 (license license:asl2.0)))
15404
15405 (define-public python2-fasteners
15406 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
15407 (package
15408 (inherit base)
15409 (propagated-inputs
15410 `(("python2-futures" ,python2-futures)
15411 ,@(package-propagated-inputs base))))))
15412
15413 (define-public python-requests-file
15414 (package
15415 (name "python-requests-file")
15416 (version "1.4.3")
15417 (source
15418 (origin
15419 (method url-fetch)
15420 (uri (pypi-uri "requests-file" version))
15421 (sha256
15422 (base32
15423 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
15424 (build-system python-build-system)
15425 (propagated-inputs
15426 `(("python-requests" ,python-requests)
15427 ("python-six" ,python-six)))
15428 (home-page
15429 "https://github.com/dashea/requests-file")
15430 (synopsis "File transport adapter for Requests")
15431 (description
15432 "Requests-File is a transport adapter for use with the Requests Python
15433 library to allow local file system access via @code{file://} URLs.")
15434 (license license:asl2.0)))
15435
15436 (define-public python2-requests-file
15437 (package-with-python2 python-requests-file))
15438
15439 (define-public python-tldextract
15440 (package
15441 (name "python-tldextract")
15442 (version "2.2.0")
15443 (source
15444 (origin
15445 (method url-fetch)
15446 (uri (pypi-uri "tldextract" version))
15447 (sha256
15448 (base32
15449 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
15450 (build-system python-build-system)
15451 (native-inputs
15452 `(("python-pytest" ,python-pytest)
15453 ("python-responses" ,python-responses)))
15454 (propagated-inputs
15455 `(("python-idna" ,python-idna)
15456 ("python-requests" ,python-requests)
15457 ("python-requests-file" ,python-requests-file)))
15458 (home-page
15459 "https://github.com/john-kurkowski/tldextract")
15460 (synopsis
15461 "Separate the TLD from the registered domain and subdomains of a URL")
15462 (description
15463 "TLDExtract accurately separates the TLD from the registered domain and
15464 subdomains of a URL, using the Public Suffix List. By default, this includes
15465 the public ICANN TLDs and their exceptions. It can optionally support the
15466 Public Suffix List's private domains as well.")
15467 (license license:bsd-3)))
15468
15469 (define-public python2-tldextract
15470 (package-with-python2 python-tldextract))
15471
15472 (define-public python-pynamecheap
15473 (package
15474 (name "python-pynamecheap")
15475 (version "0.0.3")
15476 (source
15477 (origin
15478 (method url-fetch)
15479 (uri (pypi-uri "PyNamecheap" version))
15480 (sha256
15481 (base32
15482 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
15483 (build-system python-build-system)
15484 (propagated-inputs
15485 `(("python-requests" ,python-requests)))
15486 (home-page
15487 "https://github.com/Bemmu/PyNamecheap")
15488 (synopsis
15489 "Namecheap API client in Python")
15490 (description
15491 "PyNamecheap is a Namecheap API client in Python.")
15492 (license license:expat)))
15493
15494 (define-public python2-pynamecheap
15495 (package-with-python2 python-pynamecheap))
15496
15497 (define-public python-dns-lexicon
15498 (package
15499 (name "python-dns-lexicon")
15500 (version "2.4.0")
15501 (source
15502 (origin
15503 (method url-fetch)
15504 (uri (pypi-uri "dns-lexicon" version))
15505 (sha256
15506 (base32
15507 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
15508 (build-system python-build-system)
15509 (arguments
15510 `(#:tests? #f)) ;requires internet access
15511 (propagated-inputs
15512 `(("python-future" ,python-future)
15513 ("python-pynamecheap" ,python-pynamecheap)
15514 ("python-requests" ,python-requests)
15515 ("python-tldextract" ,python-tldextract)
15516 ("python-urllib3" ,python-urllib3)))
15517 (home-page "https://github.com/AnalogJ/lexicon")
15518 (synopsis
15519 "Manipulate DNS records on various DNS providers")
15520 (description
15521 "Lexicon provides a way to manipulate DNS records on multiple DNS
15522 providers in a standardized way. It has a CLI but it can also be used as a
15523 Python library. It was designed to be used in automation, specifically with
15524 Let's Encrypt.")
15525 (license license:expat)))
15526
15527 (define-public python2-dns-lexicon
15528 (package-with-python2 python-dns-lexicon))
15529
15530 (define-public python-commandlines
15531 (package
15532 (name "python-commandlines")
15533 (version "0.4.1")
15534 (source
15535 (origin
15536 (method url-fetch)
15537 (uri (pypi-uri "commandlines" version))
15538 (sha256
15539 (base32
15540 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15541 (build-system python-build-system)
15542 (home-page "https://github.com/chrissimpkins/commandlines")
15543 (synopsis "Command line argument to object parsing library")
15544 (description
15545 "@code{Commandlines} is a Python library for command line application
15546 development that supports command line argument parsing, command string
15547 validation testing and application logic.")
15548 (license license:expat)))
15549
15550 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15551 ;; python-numba. They have a very unflexible relationship.
15552 (define-public python-numba
15553 (package
15554 (name "python-numba")
15555 (version "0.46.0")
15556 (source
15557 (origin
15558 (method url-fetch)
15559 (uri (pypi-uri "numba" version))
15560 (sha256
15561 (base32
15562 "1vnfzcq6fcnkmdms6114d49awvvj5181fl7z1wlha27qc2paxjy2"))))
15563 (build-system python-build-system)
15564 (arguments
15565 `(#:modules ((guix build utils)
15566 (guix build python-build-system)
15567 (ice-9 ftw)
15568 (srfi srfi-1)
15569 (srfi srfi-26))
15570 #:phases
15571 (modify-phases %standard-phases
15572 (add-after 'unpack 'disable-proprietary-features
15573 (lambda _
15574 (setenv "NUMBA_DISABLE_HSA" "1")
15575 (setenv "NUMBA_DISABLE_CUDA" "1")
15576 #t))
15577 (add-after 'unpack 'remove-failing-tests
15578 (lambda _
15579 ;; FIXME: These tests fail for unknown reasons:
15580 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15581 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15582 (substitute* "numba/tests/test_dispatcher.py"
15583 (("def test(_non_writable_pycache)" _ m)
15584 (string-append "def guix_skip" m))
15585 (("def test(_non_creatable_pycache)" _ m)
15586 (string-append "def guix_skip" m))
15587 (("def test(_frozen)" _ m)
15588 (string-append "def guix_skip" m)))
15589
15590 ;; These tests fail because we don't run the tests from the build
15591 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
15592 ;; They are in numba.tests.test_pycc.TestDistutilsSupport.
15593 (substitute* "numba/tests/test_pycc.py"
15594 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15595 (string-append "def guix_skip" m)))
15596
15597 ;; These tests fail because our version of Python does not have
15598 ;; a recognizable front-end for the Numba distribution to use
15599 ;; to check against.
15600 (substitute* "numba/tests/test_entrypoints.py"
15601 (("def test(_init_entrypoint)" _ m)
15602 (string-append "def guix_skip" m)))
15603 (substitute* "numba/tests/test_jitclasses.py"
15604 (("def test(_jitclass_longlabel_not_truncated)" _ m)
15605 (string-append "def guix_skip" m)))
15606 #t))
15607 (replace 'check
15608 (lambda _
15609 (let ((cwd (getcwd)))
15610 (setenv "PYTHONPATH"
15611 (string-append cwd "/build/"
15612 (find (cut string-prefix? "lib" <>)
15613 (scandir (string-append cwd "/build")))
15614 ":"
15615 (getenv "PYTHONPATH")))
15616 ;; Something is wrong with the PYTHONPATH when running the
15617 ;; tests from the build directory, as it complains about not being
15618 ;; able to import certain modules.
15619 (with-directory-excursion "/tmp"
15620 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15621 #t)))))
15622 (propagated-inputs
15623 `(("python-llvmlite" ,python-llvmlite)
15624 ("python-numpy" ,python-numpy)
15625 ("python-singledispatch" ,python-singledispatch)))
15626 ;; Needed for tests.
15627 (inputs
15628 `(("python-jinja2" ,python-jinja2)
15629 ("python-pygments" ,python-pygments)))
15630 (home-page "https://numba.pydata.org")
15631 (synopsis "Compile Python code using LLVM")
15632 (description "Numba gives you the power to speed up your applications with
15633 high performance functions written directly in Python. With a few
15634 annotations, array-oriented and math-heavy Python code can be just-in-time
15635 compiled to native machine instructions, similar in performance to C, C++ and
15636 Fortran, without having to switch languages or Python interpreters.
15637
15638 Numba works by generating optimized machine code using the LLVM compiler
15639 infrastructure at import time, runtime, or statically (using the included pycc
15640 tool).")
15641 (license license:bsd-3)))
15642
15643 (define-public python-anndata
15644 (package
15645 (name "python-anndata")
15646 (version "0.6.18")
15647 (source
15648 (origin
15649 (method url-fetch)
15650 (uri (pypi-uri "anndata" version))
15651 (sha256
15652 (base32
15653 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
15654 (build-system python-build-system)
15655 (propagated-inputs
15656 `(("python-h5py" ,python-h5py)
15657 ("python-natsort" ,python-natsort)
15658 ("python-pandas" ,python-pandas)
15659 ("python-scipy" ,python-scipy)))
15660 (home-page "https://github.com/theislab/anndata")
15661 (synopsis "Annotated data for data analysis pipelines")
15662 (description "Anndata is a package for simple (functional) high-level APIs
15663 for data analysis pipelines. In this context, it provides an efficient,
15664 scalable way of keeping track of data together with learned annotations and
15665 reduces the code overhead typically encountered when using a mostly
15666 object-oriented library such as @code{scikit-learn}.")
15667 (license license:bsd-3)))
15668
15669 (define-public python-dill
15670 (package
15671 (name "python-dill")
15672 (version "0.3.1.1")
15673 (source
15674 (origin
15675 (method url-fetch)
15676 (uri (pypi-uri "dill" version))
15677 (sha256
15678 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
15679 (build-system python-build-system)
15680 (arguments
15681 `(#:phases
15682 (modify-phases %standard-phases
15683 (replace 'check
15684 (lambda _
15685 (with-directory-excursion "/tmp"
15686 (invoke "nosetests" "-v"))
15687 #t)))))
15688 (native-inputs
15689 `(("python-nose" ,python-nose)))
15690 (home-page "https://pypi.org/project/dill/")
15691 (synopsis "Serialize all of Python")
15692 (description "Dill extends Python's @code{pickle} module for serializing
15693 and de-serializing Python objects to the majority of the built-in Python
15694 types. Dill provides the user the same interface as the @code{pickle} module,
15695 and also includes some additional features. In addition to pickling Python
15696 objects, @code{dill} provides the ability to save the state of an interpreter
15697 session in a single command. Hence, it would be feasible to save a
15698 interpreter session, close the interpreter, ship the pickled file to another
15699 computer, open a new interpreter, unpickle the session and thus continue from
15700 the saved state of the original interpreter session.")
15701 (license license:bsd-3)))
15702
15703 (define-public python-multiprocess
15704 (package
15705 (name "python-multiprocess")
15706 (version "0.70.9")
15707 (source
15708 (origin
15709 (method url-fetch)
15710 (uri (pypi-uri "multiprocess" version))
15711 (sha256
15712 (base32
15713 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
15714 (build-system python-build-system)
15715 (arguments
15716 `(#:phases
15717 (modify-phases %standard-phases
15718 (add-after 'unpack 'disable-broken-tests
15719 (lambda _
15720 ;; This test is broken as there is no keyboard interrupt.
15721 (substitute* "py3.7/multiprocess/tests/__init__.py"
15722 (("^(.*)def test_wait_result"
15723 line indent)
15724 (string-append indent
15725 "@unittest.skip(\"Disabled by Guix\")\n"
15726 line)))
15727 #t))
15728 ;; Tests must be run after installation.
15729 (delete 'check)
15730 (add-after 'install 'check
15731 (lambda* (#:key inputs outputs #:allow-other-keys)
15732 (add-installed-pythonpath inputs outputs)
15733 (invoke "python" "-m" "multiprocess.tests")
15734 #t)))))
15735 (propagated-inputs
15736 `(("python-dill" ,python-dill)))
15737 (home-page "https://pypi.org/project/multiprocess/")
15738 (synopsis "Multiprocessing and multithreading in Python")
15739 (description
15740 "This package is a fork of the multiprocessing Python package, a package
15741 which supports the spawning of processes using the API of the standard
15742 library's @code{threading} module.")
15743 (license license:bsd-3)))
15744
15745 (define-public python-toolz
15746 (package
15747 (name "python-toolz")
15748 (version "0.9.0")
15749 (source
15750 (origin
15751 (method url-fetch)
15752 (uri (pypi-uri "toolz" version))
15753 (sha256
15754 (base32
15755 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
15756 (build-system python-build-system)
15757 ;; FIXME: tests cannot be computed: "Can't perform this operation for
15758 ;; unregistered loader type"
15759 (arguments '(#:tests? #f))
15760 (home-page "https://github.com/pytoolz/toolz/")
15761 (synopsis "List processing tools and functional utilities")
15762 (description
15763 "This package provides a set of utility functions for iterators,
15764 functions, and dictionaries.")
15765 (license license:bsd-3)))
15766
15767 (define-public python2-toolz
15768 (package-with-python2 python-toolz))
15769
15770 (define-public python-cytoolz
15771 (package
15772 (name "python-cytoolz")
15773 (version "0.9.0.1")
15774 (source
15775 (origin
15776 (method url-fetch)
15777 (uri (pypi-uri "cytoolz" version))
15778 (sha256
15779 (base32
15780 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
15781 (build-system python-build-system)
15782 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
15783 ;; 'exceptions'"
15784 (arguments '(#:tests? #f))
15785 (propagated-inputs
15786 `(("python-toolz" ,python-toolz)))
15787 (native-inputs
15788 `(("python-cython" ,python-cython)))
15789 (home-page "https://github.com/pytoolz/cytoolz")
15790 (synopsis "High performance functional utilities")
15791 (description
15792 "The cytoolz package implements the same API as provided by toolz. The
15793 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
15794 that is accessible to other projects developed in Cython.")
15795 (license license:bsd-3)))
15796
15797 (define-public python-sortedcontainers
15798 (package
15799 (name "python-sortedcontainers")
15800 (version "2.0.4")
15801 (source
15802 (origin
15803 (method url-fetch)
15804 (uri (pypi-uri "sortedcontainers" version))
15805 (sha256
15806 (base32
15807 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
15808 (build-system python-build-system)
15809 (native-inputs
15810 `(("python-tox" ,python-tox)))
15811 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
15812 (synopsis "Sorted List, Sorted Dict, Sorted Set")
15813 (description
15814 "This package provides a sorted collections library, written in
15815 pure-Python.")
15816 (license license:asl2.0)))
15817
15818 (define-public python-cloudpickle
15819 (package
15820 (name "python-cloudpickle")
15821 (version "0.6.1")
15822 (source
15823 (origin
15824 (method url-fetch)
15825 (uri (pypi-uri "cloudpickle" version))
15826 (sha256
15827 (base32
15828 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
15829 (build-system python-build-system)
15830 ;; FIXME: there are 5 errors in 122 tests:
15831 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
15832 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
15833 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15834 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15835 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
15836 ;; TypeError: cannot serialize '_io.BufferedRandom' object
15837 (arguments '(#:tests? #f))
15838 (native-inputs
15839 `(("python-pytest" ,python-pytest)
15840 ("python-mock" ,python-mock)
15841 ("python-tornado" ,python-tornado)))
15842 (home-page "https://github.com/cloudpipe/cloudpickle")
15843 (synopsis "Extended pickling support for Python objects")
15844 (description
15845 "Cloudpickle makes it possible to serialize Python constructs not
15846 supported by the default pickle module from the Python standard library. It
15847 is especially useful for cluster computing where Python expressions are
15848 shipped over the network to execute on remote hosts, possibly close to the
15849 data.")
15850 (license license:bsd-3)))
15851
15852 (define-public python2-cloudpickle
15853 (package-with-python2 python-cloudpickle))
15854
15855 (define-public python-locket
15856 (package
15857 (name "python-locket")
15858 (version "0.2.0")
15859 (source
15860 (origin
15861 (method url-fetch)
15862 (uri (pypi-uri "locket" version))
15863 (sha256
15864 (base32
15865 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
15866 (build-system python-build-system)
15867 (home-page "https://github.com/mwilliamson/locket.py")
15868 (synopsis "File-based locks for Python")
15869 (description
15870 "Locket implements a lock that can be used by multiple processes provided
15871 they use the same path.")
15872 (license license:bsd-2)))
15873
15874 (define-public python2-locket
15875 (package-with-python2 python-locket))
15876
15877 (define-public python-blosc
15878 (package
15879 (name "python-blosc")
15880 (version "1.5.1")
15881 (source
15882 (origin
15883 (method url-fetch)
15884 (uri (pypi-uri "blosc" version))
15885 (sha256
15886 (base32
15887 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
15888 (build-system python-build-system)
15889 ;; FIXME: all tests pass, but then this error is printed:
15890 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
15891 (arguments '(#:tests? #f))
15892 (propagated-inputs
15893 `(("python-numpy" ,python-numpy)))
15894 (home-page "https://github.com/blosc/python-blosc")
15895 (synopsis "Python wrapper for the Blosc data compressor library")
15896 (description "Blosc is a high performance compressor optimized for binary
15897 data. It has been designed to transmit data to the processor cache faster
15898 than the traditional, non-compressed, direct memory fetch approach via a
15899 @code{memcpy()} system call.
15900
15901 Blosc works well for compressing numerical arrays that contains data with
15902 relatively low entropy, like sparse data, time series, grids with
15903 regular-spaced values, etc.
15904
15905 This Python package wraps the Blosc library.")
15906 (license license:bsd-3)))
15907
15908 (define-public python2-blosc
15909 (package-with-python2 python-blosc))
15910
15911 (define-public python-partd
15912 (package
15913 (name "python-partd")
15914 (version "0.3.9")
15915 (source
15916 (origin
15917 (method url-fetch)
15918 (uri (pypi-uri "partd" version))
15919 (sha256
15920 (base32
15921 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
15922 (build-system python-build-system)
15923 (propagated-inputs
15924 `(("python-blosc" ,python-blosc)
15925 ("python-locket" ,python-locket)
15926 ("python-numpy" ,python-numpy)
15927 ("python-pandas" ,python-pandas)
15928 ("python-pyzmq" ,python-pyzmq)
15929 ("python-toolz" ,python-toolz)))
15930 (home-page "https://github.com/dask/partd/")
15931 (synopsis "Appendable key-value storage")
15932 (description "Partd stores key-value pairs. Values are raw bytes. We
15933 append on old values. Partd excels at shuffling operations.")
15934 (license license:bsd-3)))
15935
15936 (define-public python2-partd
15937 (package-with-python2 python-partd))
15938
15939 (define-public python-fsspec
15940 (package
15941 (name "python-fsspec")
15942 (version "0.6.1")
15943 (source
15944 (origin
15945 (method url-fetch)
15946 (uri (pypi-uri "fsspec" version))
15947 (sha256
15948 (base32
15949 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
15950 (build-system python-build-system)
15951 (arguments '(#:tests? #f)) ; there are none
15952 (home-page "https://github.com/intake/filesystem_spec")
15953 (synopsis "File-system specification")
15954 (description "The purpose of this package is to produce a template or
15955 specification for a file-system interface, that specific implementations
15956 should follow, so that applications making use of them can rely on a common
15957 behavior and not have to worry about the specific internal implementation
15958 decisions with any given backend.")
15959 (license license:bsd-3)))
15960
15961 (define-public python-dask
15962 (package
15963 (name "python-dask")
15964 (version "2.9.0")
15965 (source
15966 (origin
15967 (method url-fetch)
15968 (uri (pypi-uri "dask" version))
15969 (sha256
15970 (base32 "1w1hqr8vyx6ygwflj2737dcy0mmgvrc0s602gnny8pzlcbs9m76b"))))
15971 (build-system python-build-system)
15972 (arguments
15973 `(#:phases
15974 (modify-phases %standard-phases
15975 (add-after 'unpack 'disable-broken-tests
15976 (lambda _
15977 ;; This test is marked as xfail when pytest-xdist is used.
15978 (substitute* "dask/tests/test_threaded.py"
15979 (("def test_interrupt\\(\\)" m)
15980 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15981 m)))
15982 ;; This one fails with a type error:
15983 ;; TypeError: Already tz-aware, use tz_convert to convert.
15984 (substitute* "dask/dataframe/tests/test_shuffle.py"
15985 (("def test_set_index_timestamp\\(\\)" m)
15986 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15987 m)))
15988 #t))
15989 (replace 'check
15990 (lambda _ (invoke "pytest" "-vv"))))))
15991 (propagated-inputs
15992 `(("python-cloudpickle" ,python-cloudpickle)
15993 ("python-fsspec" ,python-fsspec)
15994 ("python-numpy" ,python-numpy)
15995 ("python-packaging" ,python-packaging)
15996 ("python-pandas" ,python-pandas)
15997 ("python-partd" ,python-partd)
15998 ("python-toolz" ,python-toolz)
15999 ("python-pyyaml" ,python-pyyaml)))
16000 (native-inputs
16001 `(("python-pytest" ,python-pytest)
16002 ("python-pytest-runner" ,python-pytest-runner)))
16003 (home-page "https://github.com/dask/dask/")
16004 (synopsis "Parallel computing with task scheduling")
16005 (description
16006 "Dask is a flexible parallel computing library for analytics. It
16007 consists of two components: dynamic task scheduling optimized for computation,
16008 and large data collections like parallel arrays, dataframes, and lists that
16009 extend common interfaces like NumPy, Pandas, or Python iterators to
16010 larger-than-memory or distributed environments. These parallel collections
16011 run on top of the dynamic task schedulers. ")
16012 (license license:bsd-3)))
16013
16014 (define-public python-ilinkedlist
16015 (package
16016 (name "python-ilinkedlist")
16017 (version "0.4.0")
16018 (source
16019 (origin
16020 (method url-fetch)
16021 (uri (pypi-uri "ilinkedlist" version))
16022 (sha256
16023 (base32
16024 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
16025 (build-system python-build-system)
16026 (native-inputs `(("python-pytest" ,python-pytest)))
16027 (inputs `(("python" ,python)))
16028 (home-page "https://github.com/luther9/ilinkedlist-py")
16029 (synopsis "Immutable linked list library")
16030 (description
16031 "This is a implementation of immutable linked lists for Python. It
16032 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
16033 Since a linked list is treated as immutable, it is hashable, and its length
16034 can be retrieved in constant time. Some of the terminology is inspired by
16035 LISP. It is possible to create an improper list by creating a @code{Pair}
16036 with a non-list @code{cdr}.")
16037 (license license:gpl3+)))
16038
16039 (define-public python-readlike
16040 (package
16041 (name "python-readlike")
16042 (version "0.1.3")
16043 (source
16044 (origin
16045 (method url-fetch)
16046 (uri (pypi-uri "readlike" version))
16047 (sha256
16048 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
16049 (build-system python-build-system)
16050 (home-page "https://github.com/jangler/readlike")
16051 (synopsis "GNU Readline-like line editing module")
16052 (description
16053 "This Python module provides line editing functions similar to the default
16054 Emacs-style ones of GNU Readline. Unlike the Python standard library's
16055 @code{readline} package, this one allows access to those capabilties in settings
16056 outside of a standard command-line interface. It is especially well-suited to
16057 interfacing with Urwid, due to a shared syntax for describing key inputs.
16058
16059 Currently, all stateless Readline commands are implemented. Yanking and history
16060 are not supported.")
16061 (license license:expat)))
16062
16063 (define-public python2-readlike
16064 (package-with-python2 python-readlike))
16065
16066 (define-public python-reparser
16067 (package
16068 (name "python-reparser")
16069 (version "1.4.3")
16070 (source
16071 (origin
16072 (method url-fetch)
16073 (uri (pypi-uri "ReParser" version))
16074 (sha256
16075 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
16076 (build-system python-build-system)
16077 (home-page "https://github.com/xmikos/reparser")
16078 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
16079 (description
16080 "This Python library provides a simple lexer/parser for inline markup based
16081 on regular expressions.")
16082 (license license:expat)))
16083
16084 (define-public python2-reparser
16085 (let ((reparser (package-with-python2
16086 (strip-python2-variant python-reparser))))
16087 (package (inherit reparser)
16088 (propagated-inputs
16089 `(("python2-enum34" ,python2-enum34)
16090 ,@(package-propagated-inputs reparser))))))
16091
16092 (define-public python-precis-i18n
16093 (package
16094 (name "python-precis-i18n")
16095 (version "1.0.0")
16096 (source
16097 (origin
16098 (method url-fetch)
16099 (uri (pypi-uri "precis_i18n" version))
16100 (sha256
16101 (base32
16102 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
16103 (build-system python-build-system)
16104 (home-page "https://github.com/byllyfish/precis_i18n")
16105 (synopsis "Implementation of the PRECIS framework")
16106 (description
16107 "This module implements the PRECIS Framework as described in RFC 8264,
16108 RFC 8265 and RFC 8266.")
16109 (license license:expat)))
16110
16111 (define-public python-absl-py
16112 (package
16113 (name "python-absl-py")
16114 (version "0.6.1")
16115 (source
16116 (origin
16117 (method url-fetch)
16118 (uri (pypi-uri "absl-py" version))
16119 (sha256
16120 (base32
16121 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
16122 (build-system python-build-system)
16123 (propagated-inputs
16124 `(("python-six" ,python-six)))
16125 (home-page "https://github.com/abseil/abseil-py")
16126 (synopsis "Abseil Python common libraries")
16127 (description
16128 "This package provides the Abseil Python Common Libraries, a collection
16129 of Python libraries for building Python applications.")
16130 (license license:asl2.0)))
16131
16132 (define-public python-astor
16133 (package
16134 (name "python-astor")
16135 (version "0.7.1")
16136 (source
16137 (origin
16138 (method url-fetch)
16139 (uri (pypi-uri "astor" version))
16140 (sha256
16141 (base32
16142 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
16143 (build-system python-build-system)
16144 ;; FIXME: There are two errors and two test failures.
16145 (arguments `(#:tests? #f))
16146 (home-page "https://github.com/berkerpeksag/astor")
16147 (synopsis "Read and write Python ASTs")
16148 (description "Astor is designed to allow easy manipulation of Python
16149 source via the Abstract Syntax Tree.")
16150 (license license:bsd-3)))
16151
16152 (define-public python2-astor
16153 (package-with-python2 python-astor))
16154
16155 (define-public python-grpcio
16156 (package
16157 (name "python-grpcio")
16158 (version "1.17.1")
16159 (source
16160 (origin
16161 (method url-fetch)
16162 (uri (pypi-uri "grpcio" version))
16163 (sha256
16164 (base32
16165 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
16166 (build-system python-build-system)
16167 (propagated-inputs
16168 `(("python-six" ,python-six)))
16169 (home-page "https://grpc.io")
16170 (synopsis "HTTP/2-based RPC framework")
16171 (description "This package provides a Python library for communicating
16172 with the HTTP/2-based RPC framework gRPC.")
16173 (license license:asl2.0)))
16174
16175 (define-public python-astunparse
16176 (package
16177 (name "python-astunparse")
16178 (version "1.6.2")
16179 (source
16180 (origin
16181 (method url-fetch)
16182 (uri (pypi-uri "astunparse" version))
16183 (sha256
16184 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
16185 (build-system python-build-system)
16186 (arguments '(#:tests? #f)) ; there are none
16187 (propagated-inputs
16188 `(("python-six" ,python-six)
16189 ("python-wheel" ,python-wheel)))
16190 (home-page "https://github.com/simonpercivall/astunparse")
16191 (synopsis "AST unparser for Python")
16192 (description "This package provides an AST unparser for Python. It is a
16193 factored out version of @code{unparse} found in the Python source
16194 distribution.")
16195 (license license:bsd-3)))
16196
16197 (define-public python-gast
16198 (package
16199 (name "python-gast")
16200 (version "0.2.2")
16201 (source
16202 (origin
16203 (method url-fetch)
16204 (uri (pypi-uri "gast" version))
16205 (sha256
16206 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
16207 (build-system python-build-system)
16208 (propagated-inputs
16209 `(("python-astunparse" ,python-astunparse)))
16210 (home-page "https://pypi.org/project/gast/")
16211 (synopsis "Generic Python AST that abstracts the underlying Python version")
16212 (description
16213 "GAST provides a compatibility layer between the AST of various Python
16214 versions, as produced by @code{ast.parse} from the standard @code{ast}
16215 module.")
16216 (license license:bsd-3)))
16217
16218 (define-public python-wikidata
16219 (package
16220 (name "python-wikidata")
16221 (version "0.6.1")
16222 (source
16223 (origin
16224 (method url-fetch)
16225 (uri (pypi-uri "Wikidata" version))
16226 (sha256
16227 (base32
16228 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
16229 (build-system python-build-system)
16230 (propagated-inputs
16231 `(("python-babel" ,python-babel)))
16232 (home-page "https://github.com/dahlia/wikidata")
16233 (synopsis "Wikidata client library")
16234 (description
16235 "This package provides a Python interface to
16236 @url{https://www.wikidata.org/, Wikidata}.")
16237 (properties '((upstream-name . "Wikidata")))
16238 (license license:gpl3+)))
16239
16240 (define-public python-doctest-ignore-unicode
16241 (package
16242 (name "python-doctest-ignore-unicode")
16243 (version "0.1.2")
16244 (source
16245 (origin
16246 (method url-fetch)
16247 (uri (pypi-uri "doctest-ignore-unicode" version))
16248 (sha256
16249 (base32
16250 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
16251 (build-system python-build-system)
16252 (native-inputs
16253 `(("python-nose" ,python-nose)))
16254 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
16255 (synopsis "Ignore Unicode literal prefixes in doctests")
16256 (description
16257 "This package adds support for a flag to ignore Unicode literal prefixes
16258 in doctests.")
16259 (license license:asl2.0)))
16260
16261 (define-public python-attr
16262 (package
16263 (name "python-attr")
16264 (version "0.3.1")
16265 (source
16266 (origin
16267 (method url-fetch)
16268 (uri (pypi-uri "attr" version))
16269 (sha256
16270 (base32
16271 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
16272 (build-system python-build-system)
16273 (home-page "https://github.com/denis-ryzhkov/attr")
16274 (synopsis "Decorator for attributes of target function or class")
16275 (description "Simple decorator to set attributes of target function or
16276 class in a @acronym{DRY, Don't Repeat Yourself} way.")
16277 (license license:expat)))
16278
16279 (define-public python-construct
16280 (package
16281 (name "python-construct")
16282 (version "2.9.45")
16283 (source
16284 (origin
16285 (method url-fetch)
16286 (uri (pypi-uri "construct" version))
16287 (sha256
16288 (base32
16289 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
16290 (build-system python-build-system)
16291 (arguments
16292 `(#:tests? #f)) ; No tests exist.
16293 (propagated-inputs
16294 `(("python-extras" ,python-extras)
16295 ("python-arrow" ,python-arrow)
16296 ("python-numpy" ,python-numpy)
16297 ("python-ruamel.yaml" ,python-ruamel.yaml)))
16298 (home-page "http://construct.readthedocs.io")
16299 (synopsis "Declarative and symmetrical parser and builder for binary data")
16300 (description
16301 "This package provides both simple, atomic constructs (such as
16302 integers of various sizes), as well as composite ones which allow you
16303 form hierarchical and sequential structures of increasing complexity.
16304 It features bit and byte granularity, easy debugging and testing, an
16305 easy-to-extend subclass system, and lots of primitive constructs to
16306 make your work easier.")
16307 (license license:expat)))
16308
16309 (define-public python-humanize
16310 (package
16311 (name "python-humanize")
16312 (version "0.5.1")
16313 (source
16314 (origin
16315 (method url-fetch)
16316 (uri (pypi-uri "humanize" version))
16317 (sha256
16318 (base32
16319 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
16320 (arguments
16321 '(#:tests? #f)) ; tests not in pypi archive
16322 (build-system python-build-system)
16323 (home-page "https://github.com/jmoiron/humanize")
16324 (synopsis "Print numerical information in a human-readable form")
16325 (description "This package provides a Python module that displays numbers
16326 and dates in \"human readable\" forms. For example, it would display
16327 \"12345591313\" as \"12.3 billion\".")
16328 (license license:expat)))
16329
16330 (define-public python-txaio
16331 (package
16332 (name "python-txaio")
16333 (version "18.8.1")
16334 (source
16335 (origin
16336 (method url-fetch)
16337 (uri (pypi-uri "txaio" version))
16338 (sha256
16339 (base32
16340 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
16341 (build-system python-build-system)
16342 (propagated-inputs
16343 `(("python-twisted" ,python-twisted)
16344 ("python-six" ,python-six)))
16345 (home-page "https://github.com/crossbario/txaio")
16346 (synopsis "Compatibility layer between Python asyncio and Twisted")
16347 (description "Txaio provides a compatibility layer between the Python
16348 @code{asyncio} module and @code{Twisted}.")
16349 (license license:expat)))
16350
16351 (define-public python-toolshed
16352 (package
16353 (name "python-toolshed")
16354 (version "0.4.6")
16355 (source
16356 (origin
16357 (method url-fetch)
16358 (uri (pypi-uri "toolshed" version))
16359 (sha256
16360 (base32
16361 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
16362 (build-system python-build-system)
16363 (native-inputs
16364 `(("python-nose" ,python-nose)))
16365 (home-page "https://github.com/brentp/toolshed/")
16366 (synopsis "Collection of modules and functions for working with data")
16367 (description "This is a collection of well-tested, simple modules and
16368 functions that aim to reduce boilerplate when working with data.")
16369 (license license:bsd-2)))
16370
16371 (define-public python-annoy
16372 (package
16373 (name "python-annoy")
16374 (version "1.15.1")
16375 (source
16376 (origin
16377 (method url-fetch)
16378 (uri (pypi-uri "annoy" version))
16379 (sha256
16380 (base32
16381 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
16382 (build-system python-build-system)
16383 (native-inputs
16384 `(("python-nose" ,python-nose)))
16385 (home-page "https://github.com/spotify/annoy/")
16386 (synopsis "Approximate nearest neighbors library")
16387 (description
16388 "Annoy is a C++ library with Python bindings to search for points in
16389 space that are close to a given query point. It also creates large read-only
16390 file-based data structures that are @code{mmap}ped into memory so that many
16391 processes may share the same data.")
16392 (license license:asl2.0)))
16393
16394 (define-public python-pylzma
16395 (package
16396 (name "python-pylzma")
16397 (version "0.5.0")
16398 (source
16399 (origin
16400 (method url-fetch)
16401 (uri (pypi-uri "pylzma" version))
16402 (sha256
16403 (base32
16404 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
16405 (build-system python-build-system)
16406 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
16407 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
16408 (description "This package provides Python bindings for the LZMA library
16409 by Igor Pavlov.")
16410 (license license:lgpl2.1+)))
16411
16412 (define-public python2-pylzma
16413 (package-with-python2 python-pylzma))
16414
16415 (define-public python2-zeroconf
16416 (package
16417 (name "python2-zeroconf")
16418
16419 ;; This is the last version that supports Python 2.x.
16420 (version "0.19.1")
16421 (source
16422 (origin
16423 (method url-fetch)
16424 (uri (pypi-uri "zeroconf" version))
16425 (sha256
16426 (base32
16427 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
16428 (build-system python-build-system)
16429 (arguments
16430 `(#:python ,python-2
16431 #:phases
16432 (modify-phases %standard-phases
16433 (add-after 'unpack 'patch-requires
16434 (lambda* (#:key inputs #:allow-other-keys)
16435 (substitute* "setup.py"
16436 (("enum-compat")
16437 "enum34"))
16438 #t)))))
16439 (native-inputs
16440 `(("python2-six" ,python2-six)
16441 ("python2-enum32" ,python2-enum34)
16442 ("python2-netifaces" ,python2-netifaces)
16443 ("python2-typing" ,python2-typing)))
16444 (home-page "https://github.com/jstasiak/python-zeroconf")
16445 (synopsis "Pure Python mDNS service discovery")
16446 (description
16447 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
16448 compatible).")
16449 (license license:lgpl2.1+)))
16450
16451 (define-public python-bsddb3
16452 (package
16453 (name "python-bsddb3")
16454 (version "6.2.6")
16455 (source
16456 (origin
16457 (method url-fetch)
16458 (uri (pypi-uri "bsddb3" version))
16459 (sha256
16460 (base32
16461 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
16462 (build-system python-build-system)
16463 (inputs
16464 `(("bdb" ,bdb)))
16465 (arguments
16466 '(#:phases
16467 (modify-phases %standard-phases
16468 (add-after 'unpack 'configure-locations
16469 (lambda* (#:key inputs #:allow-other-keys)
16470 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
16471 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
16472 #t))
16473 (replace 'check
16474 (lambda _
16475 (invoke "python3" "test3.py" "-v"))))))
16476 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
16477 (synopsis "Python bindings for Oracle Berkeley DB")
16478 (description
16479 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
16480 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
16481 Transaction objects, and each of these is exposed as a Python type in the
16482 bsddb3.db module. The database objects can use various access methods: btree,
16483 hash, recno, and queue. Complete support of Berkeley DB distributed
16484 transactions. Complete support for Berkeley DB Replication Manager.
16485 Complete support for Berkeley DB Base Replication. Support for RPC.")
16486 (license license:bsd-3)))
16487
16488 (define-public python-dbfread
16489 (package
16490 (name "python-dbfread")
16491 (version "2.0.7")
16492 (source (origin
16493 (method url-fetch)
16494 (uri (pypi-uri "dbfread" version))
16495 (sha256
16496 (base32
16497 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
16498 (build-system python-build-system)
16499 (native-inputs
16500 `(("python-pytest" ,python-pytest)))
16501 (home-page "https://dbfread.readthedocs.io")
16502 (synopsis "Read DBF Files with Python")
16503 (description
16504 "This library reads DBF files and returns the data as native Python data
16505 types for further processing. It is primarily intended for batch jobs and
16506 one-off scripts.")
16507 (license license:expat)))
16508
16509 (define-public python-cached-property
16510 (package
16511 (name "python-cached-property")
16512 (version "1.5.1")
16513 (source
16514 (origin
16515 (method url-fetch)
16516 (uri (pypi-uri "cached-property" version))
16517 (sha256
16518 (base32
16519 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
16520 (build-system python-build-system)
16521 (arguments
16522 `(#:phases
16523 (modify-phases %standard-phases
16524 ;; https://github.com/pydanny/cached-property/issues/131
16525 ;; recent versions of freezegun break one test
16526 (add-after 'unpack 'disable-broken-test
16527 (lambda _
16528 (substitute* "tests/test_cached_property.py"
16529 (("def test_threads_ttl_expiry\\(self\\)" m)
16530 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
16531 " " m)))
16532 #t)))))
16533 (native-inputs
16534 `(("python-freezegun" ,python-freezegun)))
16535 (home-page
16536 "https://github.com/pydanny/cached-property")
16537 (synopsis
16538 "Decorator for caching properties in classes")
16539 (description
16540 "This package provides a decorator which makes caching
16541 time-or-computationally-expensive properties quick and easy and works in Python
16542 2 or 3.")
16543 (license license:bsd-3)))
16544
16545 (define-public python-folium
16546 (package
16547 (name "python-folium")
16548 (version "0.10.1")
16549 (source
16550 (origin
16551 (method url-fetch)
16552 (uri (pypi-uri "folium" version))
16553 (sha256
16554 (base32
16555 "0gcc267wxwxr57ry86pqpbiyfvl0g48hfvgy0f2mz9s58g87kgzd"))))
16556 (build-system python-build-system)
16557 (propagated-inputs
16558 `(("python-branca" ,python-branca)
16559 ("python-jinja2" ,python-jinja2)
16560 ("python-numpy" ,python-numpy)
16561 ("python-requests" ,python-requests)))
16562 (native-inputs
16563 `(("python-pytest" ,python-pytest)))
16564 (home-page "https://github.com/python-visualization/folium")
16565 (synopsis "Make beautiful maps with Leaflet.js & Python")
16566 (description "@code{folium} makes it easy to visualize data that’s been
16567 manipulated in Python on an interactive leaflet map. It enables both the
16568 binding of data to a map for @code{choropleth} visualizations as well as
16569 passing rich vector/raster/HTML visualizations as markers on the map.
16570
16571 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
16572 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
16573 supports Image, Video, GeoJSON and TopoJSON overlays.")
16574 (license license:expat)))
16575
16576 (define-public jube
16577 (package
16578 ;; This is a command-line tool, so no "python-" prefix.
16579 (name "jube")
16580 (version "2.2.2")
16581 (source (origin
16582 (method url-fetch)
16583 (uri (string-append
16584 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
16585 version))
16586 (sha256
16587 (base32
16588 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
16589 (file-name (string-append "jube-" version ".tar.gz"))))
16590 (build-system python-build-system)
16591 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
16592 (synopsis "Benchmarking environment")
16593 (description
16594 "JUBE helps perform and analyze benchmarks in a systematic way. For each
16595 benchmarked application, benchmark data is stored in a format that allows JUBE
16596 to deduct the desired information. This data can be parsed by automatic pre-
16597 and post-processing scripts that draw information and store it more densely
16598 for manual interpretation.")
16599 (license license:gpl3+)))
16600
16601 (define-public python-pyroutelib3
16602 (package
16603 (name "python-pyroutelib3")
16604 (version "1.3.post1")
16605 (source
16606 (origin
16607 (method url-fetch)
16608 (uri (pypi-uri "pyroutelib3" version))
16609 (sha256
16610 (base32
16611 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
16612 (build-system python-build-system)
16613 (propagated-inputs
16614 `(("python-dateutil" ,python-dateutil)))
16615 (home-page "https://github.com/MKuranowski/pyroutelib3")
16616 (synopsis "Library for simple routing on OSM data")
16617 (description "Library for simple routing on OSM data")
16618 (license license:gpl3+)))
16619
16620 (define-public python-elementpath
16621 (package
16622 (name "python-elementpath")
16623 (version "1.2.0")
16624 (source
16625 (origin
16626 (method url-fetch)
16627 (uri (pypi-uri "elementpath" version))
16628 (sha256
16629 (base32
16630 "1syn2z543brab23dskh3fjd9pqvz6npqbcicrs2d88dbg26xl08p"))))
16631 (build-system python-build-system)
16632 (home-page
16633 "https://github.com/sissaschool/elementpath")
16634 (synopsis
16635 "XPath 1.0/2.0 parsers and selectors for ElementTree and lxml")
16636 (description
16637 "The proposal of this package is to provide XPath 1.0 and 2.0 selectors
16638 for Python's ElementTree XML data structures, both for the standard
16639 ElementTree library and for the @uref{http://lxml.de, lxml.etree} library.
16640
16641 For lxml.etree this package can be useful for providing XPath 2.0 selectors,
16642 because lxml.etree already has it's own implementation of XPath 1.0.")
16643 (license license:expat)))
16644
16645 (define-public python-bibtexparser
16646 (package
16647 (name "python-bibtexparser")
16648 (version "1.1.0")
16649 (source
16650 (origin
16651 (method url-fetch)
16652 (uri (pypi-uri "bibtexparser" version))
16653 (sha256
16654 (base32
16655 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
16656 (build-system python-build-system)
16657 (propagated-inputs
16658 `(("python-pyparsing" ,python-pyparsing)))
16659 (native-inputs
16660 `(("python-future" ,python-future)))
16661 (home-page "https://github.com/sciunto-org/python-bibtexparser")
16662 (synopsis "Python library to parse BibTeX files")
16663 (description "BibtexParser is a Python library to parse BibTeX files.")
16664 (license (list license:bsd-3 license:lgpl3))))
16665
16666 (define-public python-distro
16667 (package
16668 (name "python-distro")
16669 (version "1.4.0")
16670 (source
16671 (origin
16672 (method url-fetch)
16673 (uri (pypi-uri "distro" version))
16674 (sha256
16675 (base32
16676 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
16677 (build-system python-build-system)
16678 (native-inputs
16679 `(("python-pytest" ,python-pytest)))
16680 (home-page "https://github.com/nir0s/distro")
16681 (synopsis
16682 "OS platform information API")
16683 (description
16684 "@code{distro} provides information about the OS distribution it runs on,
16685 such as a reliable machine-readable ID, or version information.
16686
16687 It is the recommended replacement for Python's original
16688 `platform.linux_distribution` function (which will be removed in Python 3.8).
16689 @code{distro} also provides a command-line interface to output the platform
16690 information in various formats.")
16691 (license license:asl2.0)))
16692
16693 (define-public python-cairosvg
16694 (package
16695 (name "python-cairosvg")
16696 (version "2.4.2")
16697 (source
16698 (origin
16699 (method url-fetch)
16700 (uri (pypi-uri "CairoSVG" version))
16701 (sha256
16702 (base32 "1bb7irxbaxxb9ahm3z5wsx1q96mm5gzskc7b6q07h9ikcnb8yrjf"))))
16703 (build-system python-build-system)
16704 (arguments
16705 `(#:phases
16706 (modify-phases %standard-phases
16707 (replace 'check
16708 (lambda _ (invoke "pytest"))))))
16709 (propagated-inputs
16710 `(("python-cairocffi" ,python-cairocffi)
16711 ("python-cssselect2" ,python-cssselect2)
16712 ("python-defusedxml" ,python-defusedxml)
16713 ("python-pillow" ,python-pillow)
16714 ("python-tinycss2" ,python-tinycss2)))
16715 (native-inputs
16716 `(("python-pytest-flake8" ,python-pytest-flake8)
16717 ("python-pytest-isort" ,python-pytest-isort)
16718 ("python-pytest-runner" ,python-pytest-runner)))
16719 (home-page "https://cairosvg.org/")
16720 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
16721 (description "CairoSVG is a SVG converter based on Cairo. It can export
16722 SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
16723 SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
16724 parsed, the result is drawn to a Cairo surface that can be exported to
16725 qvarious formats: PDF, PostScript, PNG and even SVG.")
16726 (license license:lgpl3+)))
16727
16728 (define-public python-pyphen
16729 (package
16730 (name "python-pyphen")
16731 (version "0.9.5")
16732 (source
16733 (origin
16734 (method url-fetch)
16735 (uri (pypi-uri "Pyphen" version))
16736 (sha256
16737 (base32 "08c9y69ry9d6m4zalhnalg86lsp9v2j5n1ziw5vxfmiihx83lqrv"))))
16738 (build-system python-build-system)
16739 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
16740 ;; embedded set provided by upstream - like Debian does.
16741 (home-page "https://github.com/Kozea/Pyphen")
16742 (synopsis "Pure Python module to hyphenate text")
16743 (description "Pyphen is a pure Python module to hyphenate text using
16744 existing Hunspell hyphenation dictionaries.")
16745 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
16746
16747 (define-public python-intelhex
16748 (package
16749 (name "python-intelhex")
16750 (version "2.2.1")
16751 (source
16752 (origin
16753 (method url-fetch)
16754 (uri (pypi-uri "intelhex" version))
16755 (sha256
16756 (base32
16757 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
16758 (build-system python-build-system)
16759 (arguments '(#:tests? #f)) ;issue with version
16760 (home-page "https://pypi.org/project/IntelHex/")
16761 (synopsis "Python library for Intel HEX files manipulations")
16762 (description "The Intel HEX file format is widely used in microprocessors
16763 and microcontrollers area (embedded systems etc.) as the de facto standard for
16764 representation of code to be programmed into microelectronic devices. This
16765 package provides an intelhex Python library to read, write, create from
16766 scratch and manipulate data from Intel HEX file format. It also includes
16767 several convenience Python scripts, including \"classic\" hex2bin and bin2hex
16768 converters and more, those based on the library itself.")
16769 (license license:bsd-3)))
16770
16771 (define-public python-pykwalify
16772 (package
16773 (name "python-pykwalify")
16774 (version "1.7.0")
16775 (source
16776 (origin
16777 (method url-fetch)
16778 (uri (pypi-uri "pykwalify" version))
16779 (sha256
16780 (base32
16781 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
16782 (build-system python-build-system)
16783 (arguments '(#:tests? #f)) ;missing dependencies
16784 (propagated-inputs
16785 `(("python-dateutil" ,python-dateutil)
16786 ("python-docopt" ,python-docopt)
16787 ("python-pyyaml" ,python-pyyaml)))
16788 (home-page "https://github.com/grokzen/pykwalify")
16789 (synopsis
16790 "Python lib/cli for JSON/YAML schema validation")
16791 (description
16792 "This package provides a parser, schema validator, and data binding tool
16793 for YAML and JSON.")
16794 (license license:expat)))
16795
16796 (define-public python-dbusmock
16797 (package
16798 (name "python-dbusmock")
16799 (version "0.18.3")
16800 (source
16801 (origin
16802 (method url-fetch)
16803 (uri (pypi-uri "python-dbusmock" version))
16804 (sha256
16805 (base32
16806 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
16807 (build-system python-build-system)
16808 (arguments
16809 '(#:phases
16810 (modify-phases %standard-phases
16811 (add-after 'unpack 'patch-shell-path
16812 (lambda _
16813 (substitute* "tests/test_code.py"
16814 (("/bin/bash") (which "bash")))
16815 #t)))))
16816 (native-inputs
16817 `(;; For tests.
16818 ("dbus" ,dbus) ; for dbus-daemon
16819 ("python-nose" ,python-nose)
16820 ("which" ,which)))
16821 (propagated-inputs
16822 `(("python-dbus" ,python-dbus)
16823 ("python-pygobject" ,python-pygobject)))
16824 (home-page "https://github.com/martinpitt/python-dbusmock")
16825 (synopsis "Python library for mock D-Bus objects")
16826 (description "python-dbusmock allows for the easy creation of mock objects on
16827 D-Bus. This is useful for writing tests for software which talks to D-Bus
16828 services such as upower, systemd, logind, gnome-session or others, and it is
16829 hard (or impossible without root privileges) to set the state of the real
16830 services to what you expect in your tests.")
16831 (license license:lgpl3+)))
16832
16833 (define-public python-ujson
16834 (package
16835 (name "python-ujson")
16836 (version "1.35")
16837 (source
16838 (origin
16839 (method url-fetch)
16840 (uri (pypi-uri "ujson" version))
16841 (sha256
16842 (base32
16843 "11jz5wi7mbgqcsz52iqhpyykiaasila4lq8cmc2d54bfa3jp6q7n"))))
16844 (build-system python-build-system)
16845 (home-page "http://www.esn.me")
16846 (synopsis
16847 "Ultra fast JSON encoder and decoder for Python")
16848 (description
16849 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
16850 bindings for Python 2.5+ and 3.")
16851 (license license:bsd-3)))
16852
16853 (define-public python2-ujson
16854 (package-with-python2 python-ujson))
16855
16856 (define-public python-iocapture
16857 ;; The latest release is more than a year older than this commit.
16858 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
16859 (revision "1"))
16860 (package
16861 (name "python-iocapture")
16862 (version "0.1.2")
16863 (source
16864 (origin
16865 (method git-fetch)
16866 (uri (git-reference
16867 (url "https://github.com/oinume/iocapture.git")
16868 (commit commit)))
16869 (file-name (git-file-name name version))
16870 (sha256
16871 (base32
16872 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
16873 (build-system python-build-system)
16874 (arguments
16875 `(#:phases
16876 (modify-phases %standard-phases
16877 (delete 'check)
16878 (add-after 'install 'check
16879 (lambda* (#:key inputs outputs #:allow-other-keys)
16880 (add-installed-pythonpath inputs outputs)
16881 (invoke "py.test" "-v" "tests")
16882 #t)))))
16883 (propagated-inputs
16884 `(("python-flexmock" ,python-flexmock)
16885 ("python-pytest" ,python-pytest)
16886 ("python-pytest-cov" ,python-pytest-cov)
16887 ("python-six" ,python-six)))
16888 (home-page "https://github.com/oinume/iocapture")
16889 (synopsis "Python capturing tool for stdout and stderr")
16890 (description
16891 "This package helps you to capture the standard out (stdout) and the
16892 standard error channel (stderr) in your program.")
16893 (license license:expat))))
16894
16895 (define-public python-argh
16896 ;; There are 21 commits since the latest release containing important
16897 ;; improvements.
16898 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
16899 (revision "1"))
16900 (package
16901 (name "python-argh")
16902 (version (git-version "0.26.2" revision commit))
16903 (source
16904 (origin
16905 (method git-fetch)
16906 (uri (git-reference
16907 (url "https://github.com/neithere/argh.git")
16908 (commit commit)))
16909 (file-name (git-file-name name version))
16910 (sha256
16911 (base32
16912 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
16913 (build-system python-build-system)
16914 (propagated-inputs
16915 `(("python-iocapture" ,python-iocapture)
16916 ("python-mock" ,python-mock)
16917 ("python-pytest" ,python-pytest)
16918 ("python-pytest-cov" ,python-pytest-cov)
16919 ("python-pytest-xdist" ,python-pytest-xdist)
16920 ("python-tox" ,python-tox)))
16921 (home-page "https://github.com/neithere/argh/")
16922 (synopsis "Argparse wrapper with natural syntax")
16923 (description
16924 "python-argh is a small library that provides several layers of
16925 abstraction on top of @code{python-argparse}. The layers can be mixed. It is
16926 always possible to declare a command with the highest possible (and least
16927 flexible) layer and then tune the behaviour with any of the lower layers
16928 including the native API of @code{python-argparse}.")
16929 (license license:lgpl3+))))
16930
16931 (define-public python-ppft
16932 (package
16933 (name "python-ppft")
16934 (version "1.6.6.1")
16935 (source
16936 (origin
16937 (method url-fetch)
16938 (uri (pypi-uri "ppft" version))
16939 (sha256
16940 (base32
16941 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
16942 (build-system python-build-system)
16943 (arguments '(#:tests? #f)) ; there are none
16944 (propagated-inputs
16945 `(("python-six" ,python-six)))
16946 (home-page "https://pypi.org/project/ppft/")
16947 (synopsis "Fork of Parallel Python")
16948 (description
16949 "This package is a fork of Parallel Python. The Parallel Python
16950 module (@code{pp}) provides an easy and efficient way to create
16951 parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
16952 computers and clusters. It features cross-platform portability and dynamic
16953 load balancing.")
16954 (license license:bsd-3)))
16955
16956 (define-public python-pox
16957 (package
16958 (name "python-pox")
16959 (version "0.2.7")
16960 (source
16961 (origin
16962 (method url-fetch)
16963 (uri (pypi-uri "pox" version))
16964 (sha256
16965 (base32
16966 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
16967 (build-system python-build-system)
16968 (arguments
16969 `(#:phases
16970 (modify-phases %standard-phases
16971 (replace 'check
16972 (lambda _
16973 (mkdir-p "/tmp/guix")
16974 (setenv "SHELL" "bash")
16975 (setenv "USERNAME" "guix")
16976 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
16977 (invoke "py.test" "-vv")
16978 #t)))))
16979 (native-inputs
16980 `(("python-pytest" ,python-pytest)
16981 ("which" ,which)))
16982 (home-page "https://pypi.org/project/pox/")
16983 (synopsis "Python utilities for filesystem exploration and automated builds")
16984 (description
16985 "Pox provides a collection of utilities for navigating and manipulating
16986 filesystems. This module is designed to facilitate some of the low level
16987 operating system interactions that are useful when exploring a filesystem on a
16988 remote host. Pox provides Python equivalents of several shell commands such
16989 as @command{which} and @command{find}. These commands allow automated
16990 discovery of what has been installed on an operating system, and where the
16991 essential tools are located.")
16992 (license license:bsd-3)))
16993
16994 (define-public python-pathos
16995 (package
16996 (name "python-pathos")
16997 (version "0.2.5")
16998 (source
16999 (origin
17000 (method url-fetch)
17001 (uri (pypi-uri "pathos" version))
17002 (sha256
17003 (base32
17004 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
17005 (build-system python-build-system)
17006 (arguments
17007 '(#:phases
17008 (modify-phases %standard-phases
17009 (replace 'check
17010 (lambda _
17011 (setenv "PYTHONPATH"
17012 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
17013 (invoke "python" "./tests/__main__.py"))))))
17014 (propagated-inputs
17015 `(("python-dill" ,python-dill)
17016 ("python-multiprocess" ,python-multiprocess)
17017 ("python-pox" ,python-pox)
17018 ("python-ppft" ,python-ppft)))
17019 (native-inputs
17020 `(("python-pytest" ,python-pytest)))
17021 (home-page "https://pypi.org/project/pathos/")
17022 (synopsis
17023 "Parallel graph management and execution in heterogeneous computing")
17024 (description
17025 "Python-pathos is a framework for heterogenous computing. It provides a
17026 consistent high-level interface for configuring and launching parallel
17027 computations across heterogenous resources. Python-pathos provides configurable
17028 launchers for parallel and distributed computing, where each launcher contains
17029 the syntactic logic to configure and launch jobs in an execution environment.")
17030 (license license:bsd-3)))
17031
17032 (define-public python-flit
17033 (package
17034 (name "python-flit")
17035 (version "2.1.0")
17036 (source
17037 (origin
17038 (method url-fetch)
17039 (uri (pypi-uri "flit" version))
17040 (sha256
17041 (base32
17042 "0h5vvmqinqzn97mr3ix7zx53af9ad4fimjjwqpx88yp8qhz4r5bc"))))
17043 (build-system python-build-system)
17044 (arguments
17045 `(#:tests? #f)) ; XXX: Check requires network access.
17046 (home-page "https://flit.readthedocs.io/")
17047 (synopsis
17048 "Simple packaging tool for simple packages")
17049 (description
17050 "Flit is a simple way to put Python packages and modules on PyPI. Flit
17051 packages a single importable module or package at a time, using the import
17052 name as the name on PyPI. All subpackages and data files within a package
17053 are included automatically.")
17054 (license license:bsd-3)))
17055
17056 (define-public python-pathtools
17057 (package
17058 (name "python-pathtools")
17059 (version "0.1.2")
17060 (source
17061 (origin
17062 (method url-fetch)
17063 (uri (pypi-uri "pathtools" version))
17064 (sha256
17065 (base32
17066 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
17067 (build-system python-build-system)
17068 (home-page
17069 "https://github.com/gorakhargosh/pathtools")
17070 (synopsis "Path utilities for Python")
17071 (description "Pattern matching and various utilities for file systems
17072 paths.")
17073 (license license:expat)))
17074
17075 (define-public python-fastentrypoints
17076 (package
17077 (name "python-fastentrypoints")
17078 (version "0.12")
17079 (source
17080 (origin
17081 (method url-fetch)
17082 (uri (pypi-uri "fastentrypoints" version))
17083 (sha256
17084 (base32
17085 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
17086 (build-system python-build-system)
17087 (home-page
17088 "https://github.com/ninjaaron/fast-entry_points")
17089 (synopsis
17090 "Makes entry_points specified in setup.py load more quickly")
17091 (description
17092 "Using entry_points in your setup.py makes scripts that start really
17093 slowly because it imports pkg_resources. This package allows such setup
17094 scripts to load entry points more quickly.")
17095 (license license:bsd-3)))
17096
17097 (define-public python-funcparserlib
17098 (package
17099 (name "python-funcparserlib")
17100 (version "0.3.6")
17101 (source
17102 (origin
17103 (method url-fetch)
17104 (uri (pypi-uri "funcparserlib" version))
17105 (sha256
17106 (base32
17107 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
17108 (native-inputs
17109 `(("python-tox" ,python-tox)))
17110 (arguments
17111 `(#:phases
17112 (modify-phases %standard-phases
17113 (replace 'check
17114 (lambda _
17115 (invoke "tox"))))))
17116 (build-system python-build-system)
17117 (home-page
17118 "https://github.com/vlasovskikh/funcparserlib")
17119 (synopsis
17120 "Recursive descent parsing library based on functional combinators")
17121 (description
17122 "This package is a recursive descent parsing library for Python based on
17123 functional combinators. Parser combinators are just higher-order functions
17124 that take parsers as their arguments and return them as result values.")
17125 (license license:expat)))