Merge remote-tracking branch 'master' into core-updates.
[jackhill/guix/guix.git] / gnu / packages / python-xyz.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2013, 2014, 2015, 2016, 2019 Andreas Enge <andreas@enge.fr>
5 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2014, 2017 Eric Bavier <bavier@member.fsf.org>
7 ;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
8 ;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
9 ;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
10 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
11 ;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
12 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
13 ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
14 ;;; Copyright © 2015, 2016, 2017, 2019 Leo Famulari <leo@famulari.name>
15 ;;; Copyright © 2015, 2017 Ben Woodcroft <donttrustben@gmail.com>
16 ;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
17 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
18 ;;; Copyright © 2015, 2017 Kyle Meyer <kyle@kyleam.com>
19 ;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
20 ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
21 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
22 ;;; Copyright © 2016, 2018-2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
23 ;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
24 ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
25 ;;; Copyright © 2016, 2017 Troy Sankey <sankeytms@gmail.com>
26 ;;; Copyright © 2016, 2017 ng0 <ng0@n0.is>
27 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28 ;;; Copyright © 2016 David Craven <david@craven.ch>
29 ;;; Copyright © 2016, 2017, 2018, 2019 Marius Bakke <mbakke@fastmail.com>
30 ;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
31 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
32 ;;; Copyright © 2016, 2017, 2019 Alex Vong <alexvong1995@gmail.com>
33 ;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
34 ;;; Copyright © 2016, 2017, 2018 Julien Lepiller <julien@lepiller.eu>
35 ;;; Copyright © 2016, 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
36 ;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
37 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
38 ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
39 ;;; Copyright © 2017, 2018 Adriano Peluso <catonano@gmail.com>
40 ;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
41 ;;; Copyright © 2017, 2018, 2019 Mathieu Othacehe <m.othacehe@gmail.com>
42 ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
43 ;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
44 ;;; Copyright © 2017, 2018, 2019 Kei Kebreau <kkebreau@posteo.net>
45 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
46 ;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
47 ;;; Copyright © 2017, 2019 Brendan Tildesley <mail@brendan.scot>
48 ;;; Copyright © 2018 Ethan R. Jones <ethanrjones97@gmail.com
49 ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
50 ;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
51 ;;; Copyright © 2018 Mathieu Lirzin <mthl@gnu.org>
52 ;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
53 ;;; Copyright © 2016, 2018 Tomáš Čech <sleep_walker@gnu.org>
54 ;;; Copyright © 2018, 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
55 ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
56 ;;; Copyright © 2018, 2019 Clément Lassieur <clement@lassieur.org>
57 ;;; Copyright © 2018, 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
58 ;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
59 ;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
60 ;;; Copyright © 2019 Brett Gilio <brettg@gnu.org>
61 ;;; Copyright © 2019 Sam <smbaines8@gmail.com>
62 ;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us>
63 ;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
64 ;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
65 ;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
66 ;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
67 ;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
68 ;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
69 ;;; Copyright © 2019 Tanguy Le Carrour <tanguy@bioneland.org>
70 ;;; Copyright © 2019 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de>
71 ;;;
72 ;;; This file is part of GNU Guix.
73 ;;;
74 ;;; GNU Guix is free software; you can redistribute it and/or modify it
75 ;;; under the terms of the GNU General Public License as published by
76 ;;; the Free Software Foundation; either version 3 of the License, or (at
77 ;;; your option) any later version.
78 ;;;
79 ;;; GNU Guix is distributed in the hope that it will be useful, but
80 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
81 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
82 ;;; GNU General Public License for more details.
83 ;;;
84 ;;; You should have received a copy of the GNU General Public License
85 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
86
87 (define-module (gnu packages python-xyz)
88 #:use-module ((guix licenses) #:prefix license:)
89 #:use-module (gnu packages)
90 #:use-module (gnu packages algebra)
91 #:use-module (gnu packages adns)
92 #:use-module (gnu packages attr)
93 #:use-module (gnu packages backup)
94 #:use-module (gnu packages bash)
95 #:use-module (gnu packages check)
96 #:use-module (gnu packages compression)
97 #:use-module (gnu packages crypto)
98 #:use-module (gnu packages databases)
99 #:use-module (gnu packages dbm)
100 #:use-module (gnu packages file)
101 #:use-module (gnu packages fontutils)
102 #:use-module (gnu packages gcc)
103 #:use-module (gnu packages geo)
104 #:use-module (gnu packages ghostscript)
105 #:use-module (gnu packages gl)
106 #:use-module (gnu packages glib)
107 #:use-module (gnu packages gnome)
108 #:use-module (gnu packages graphviz)
109 #:use-module (gnu packages graphics)
110 #:use-module (gnu packages gstreamer)
111 #:use-module (gnu packages gtk)
112 #:use-module (gnu packages icu4c)
113 #:use-module (gnu packages image)
114 #:use-module (gnu packages imagemagick)
115 #:use-module (gnu packages libevent)
116 #:use-module (gnu packages libffi)
117 #:use-module (gnu packages linux)
118 #:use-module (gnu packages llvm)
119 #:use-module (gnu packages man)
120 #:use-module (gnu packages maths)
121 #:use-module (gnu packages monitoring)
122 #:use-module (gnu packages multiprecision)
123 #:use-module (gnu packages networking)
124 #:use-module (gnu packages ncurses)
125 #:use-module (gnu packages openstack)
126 #:use-module (gnu packages pcre)
127 #:use-module (gnu packages perl)
128 #:use-module (gnu packages pkg-config)
129 #:use-module (gnu packages python)
130 #:use-module (gnu packages python-check)
131 #:use-module (gnu packages python-compression)
132 #:use-module (gnu packages python-crypto)
133 #:use-module (gnu packages python-science)
134 #:use-module (gnu packages python-web)
135 #:use-module (gnu packages qt)
136 #:use-module (gnu packages readline)
137 #:use-module (gnu packages sdl)
138 #:use-module (gnu packages search)
139 #:use-module (gnu packages shells)
140 #:use-module (gnu packages sphinx)
141 #:use-module (gnu packages ssh)
142 #:use-module (gnu packages terminals)
143 #:use-module (gnu packages tex)
144 #:use-module (gnu packages texinfo)
145 #:use-module (gnu packages time)
146 #:use-module (gnu packages tls)
147 #:use-module (gnu packages version-control)
148 #:use-module (gnu packages video)
149 #:use-module (gnu packages web)
150 #:use-module (gnu packages base)
151 #:use-module (gnu packages xml)
152 #:use-module (gnu packages xorg)
153 #:use-module (gnu packages xdisorg)
154 #:use-module (gnu packages tcl)
155 #:use-module (gnu packages bdw-gc)
156 #:use-module (gnu packages serialization)
157 #:use-module (guix packages)
158 #:use-module (guix download)
159 #:use-module (guix git-download)
160 #:use-module (guix hg-download)
161 #:use-module (guix utils)
162 #:use-module (guix build-system gnu)
163 #:use-module (guix build-system cmake)
164 #:use-module (guix build-system python)
165 #:use-module (guix build-system trivial)
166 #:use-module (srfi srfi-1)
167 #:use-module (srfi srfi-26))
168
169 (define-public python-psutil
170 (package
171 (name "python-psutil")
172 (version "5.6.5")
173 (source
174 (origin
175 (method url-fetch)
176 (uri (pypi-uri "psutil" version))
177 (sha256
178 (base32 "0isil5jxwwd8awz54qk28rpgjg43i5l6yl70g40vxwa4r4m56lfh"))))
179 (build-system python-build-system)
180 (arguments
181 ;; FIXME: some tests does not return and times out.
182 '(#:tests? #f))
183 (home-page "https://www.github.com/giampaolo/psutil")
184 (synopsis "Library for retrieving information on running processes")
185 (description
186 "psutil (Python system and process utilities) is a library for retrieving
187 information on running processes and system utilization (CPU, memory, disks,
188 network) in Python. It is useful mainly for system monitoring, profiling and
189 limiting process resources and management of running processes. It implements
190 many functionalities offered by command line tools such as: ps, top, lsof,
191 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
192 pidof, tty, taskset, pmap.")
193 (properties `((python2-variant . ,(delay python2-psutil))))
194 (license license:bsd-3)))
195
196 (define-public python2-psutil
197 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
198 (package
199 (inherit base)
200 (propagated-inputs
201 `(("python2-enum34" ,python2-enum34) ;optional
202 ,@(package-propagated-inputs base))))))
203
204 (define-public python-shapely
205 (package
206 (name "python-shapely")
207 (version "1.6.4.post2")
208 (source
209 (origin
210 (method url-fetch)
211 (uri (pypi-uri "Shapely" version))
212 (sha256
213 (base32
214 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
215 (build-system python-build-system)
216 (native-inputs
217 `(("python-cython" ,python-cython)
218 ("python-matplotlib" ,python-matplotlib)
219 ("python-pytest" ,python-pytest)
220 ("python-pytest-cov" ,python-pytest-cov)))
221 (inputs
222 `(("geos" ,geos)))
223 (propagated-inputs
224 `(("python-numpy" ,python-numpy)))
225 (arguments
226 `(#:phases
227 (modify-phases %standard-phases
228 (add-after 'unpack 'patch-geos-path
229 (lambda* (#:key inputs #:allow-other-keys)
230 (let ((geos (assoc-ref inputs "geos"))
231 (glibc (assoc-ref inputs ,(if (%current-target-system)
232 "cross-libc" "libc"))))
233 (substitute* "shapely/geos.py"
234 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
235 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
236 geos "/lib/libgeos_c.so'])"))
237 (("free = load_dll\\('c'\\)\\.free")
238 (string-append "free = load_dll('c', fallbacks=['"
239 glibc "/lib/libc.so.6']).free"))))
240 #t)))))
241 (home-page "https://github.com/Toblerity/Shapely")
242 (synopsis "Library for the manipulation and analysis of geometric objects")
243 (description "Shapely is a Python package for manipulation and analysis of
244 planar geometric objects. It is based on the @code{GEOS} library.")
245 (license license:bsd-3)))
246
247 (define-public python-shortuuid
248 (package
249 (name "python-shortuuid")
250 (version "0.5.0")
251 (source
252 (origin
253 (method url-fetch)
254 (uri (pypi-uri "shortuuid" version))
255 (sha256
256 (base32
257 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
258 (build-system python-build-system)
259 (native-inputs
260 `(("python-pep8" ,python-pep8)))
261 (home-page "https://github.com/skorokithakis/shortuuid")
262 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
263 (description
264 "@code{shortuuid} is a Python library for generating concise, unambiguous
265 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
266 module and then similar looking characters are removed.")
267 (license license:bsd-3)))
268
269 (define-public python-logwrap
270 (package
271 (name "python-logwrap")
272 (version "3.2.1")
273 (source
274 (origin
275 (method url-fetch)
276 (uri (pypi-uri "logwrap" version ".zip"))
277 (sha256
278 (base32
279 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
280 (build-system python-build-system)
281 (propagated-inputs
282 `(("python-six" ,python-six)
283 ("python-typing" ,python-typing)))
284 (native-inputs
285 `(("unzip" ,unzip)
286 ("python-cython" ,python-cython)
287 ("python-pytest" ,python-pytest)
288 ("python-pytest-cov" ,python-pytest-cov)
289 ("python-pytest-runner" ,python-pytest-runner)))
290 (home-page "https://github.com/penguinolog/logwrap")
291 (synopsis "Decorator for logging function arguments")
292 (description "This package provides a decorator to log function arguments
293 and function call return values in a human-readable way.")
294 (license license:asl2.0)))
295
296 (define-public python2-shapely
297 (package-with-python2 python-shapely))
298
299 (define-public python-clyent
300 (package
301 (name "python-clyent")
302 (version "1.2.1")
303 (source
304 (origin
305 (method url-fetch)
306 (uri (pypi-uri "clyent" version))
307 (sha256
308 (base32
309 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
310 (build-system python-build-system)
311 (native-inputs
312 `(("python-mock" ,python-mock)))
313 (home-page "https://github.com/binstar/clyent")
314 (synopsis "Command line client library")
315 (description "Clyent is a Python command line utiliy library. It is used
316 by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
317 (license license:bsd-3)))
318
319 (define-public python2-clyent
320 (package-with-python2 python-clyent))
321
322 (define-public python-babel
323 (package
324 (name "python-babel")
325 (version "2.7.0")
326 (source
327 (origin
328 (method url-fetch)
329 (uri (pypi-uri "Babel" version))
330 (sha256
331 (base32
332 "0a7wawx8vsg7igvz6p3x909fskhg4b2y1910xk4f4c8y22p3aqg8"))))
333 (build-system python-build-system)
334 (native-inputs
335 `(("python-freezegun" ,python-freezegun)
336 ("python-pytest" ,python-pytest)))
337 (propagated-inputs
338 `(("python-pytz" ,python-pytz)))
339 (arguments
340 `(#:phases (modify-phases %standard-phases
341 (replace 'check
342 (lambda _
343 (invoke "pytest" "-vv" "-k"
344 (string-append
345 ;; XXX: These tests fail when using Pytest 4.x and
346 ;; Babel 2.6.0. Try removing this for later versions.
347 "not test_no_inherit_metazone_marker_never_in_output"
348 " and not test_smoke_dates"
349 " and not test_smoke_numbers")))))))
350 (home-page "http://babel.pocoo.org/")
351 (synopsis
352 "Tools for internationalizing Python applications")
353 (description
354 "Babel is composed of two major parts:
355 - tools to build and work with gettext message catalogs
356 - a Python interface to the CLDR (Common Locale Data Repository), providing
357 access to various locale display names, localized number and date formatting,
358 etc. ")
359 (license license:bsd-3)))
360
361 (define-public python2-babel
362 (package-with-python2 python-babel))
363
364 ;; Sphinx < 2.0 requires this version. Remove once no longer needed.
365 (define-public python2-babel-2.6
366 (package
367 (inherit python2-babel)
368 (version "2.6.0")
369 (source (origin
370 (method url-fetch)
371 (uri (pypi-uri "Babel" version))
372 (sha256
373 (base32
374 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
375
376 (define-public python2-backport-ssl-match-hostname
377 (package
378 (name "python2-backport-ssl-match-hostname")
379 (version "3.5.0.1")
380 (source
381 (origin
382 (method url-fetch)
383 (uri (pypi-uri "backports.ssl_match_hostname" version))
384 (sha256
385 (base32
386 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
387 (build-system python-build-system)
388 (arguments
389 `(#:python ,python-2
390 #:tests? #f)) ; no test target
391 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
392 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
393 (description
394 "This backport brings the ssl.match_hostname() function to users of
395 earlier versions of Python. The function checks the hostname in the
396 certificate returned by the server to which a connection has been established,
397 and verifies that it matches the intended target hostname.")
398 (license license:psfl)))
399
400 (define-public python-boolean.py
401 (package
402 (name "python-boolean.py")
403 (version "3.6")
404 (source
405 (origin
406 ;; There's no source tarball on PyPI.
407 (method git-fetch)
408 (uri (git-reference
409 (url "https://github.com/bastikr/boolean.py")
410 (commit (string-append "v" version))))
411 (file-name (git-file-name name version))
412 (sha256
413 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
414 (build-system python-build-system)
415 (home-page "https://github.com/bastikr/boolean.py")
416 (synopsis "Boolean algebra in one Python module")
417 (description
418 "This is a small Python library that implements boolean algebra.
419 It defines two base elements, @code{TRUE} and @code{FALSE}, and a
420 @code{Symbol} class that can take on one of these two values. Calculations
421 are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
422 compositions like @code{XOR} and @code{NAND} are emulated on top of them.
423 Expressions are constructed from parsed strings or directly in Python.")
424 (license license:bsd-2)))
425
426 (define-public python-hdf4
427 (package
428 (name "python-hdf4")
429 (version "0.9")
430 (source
431 (origin
432 (method url-fetch)
433 (uri (pypi-uri name version))
434 (sha256
435 (base32
436 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
437 (build-system python-build-system)
438 (native-inputs `(("nose" ,python-nose)))
439 (propagated-inputs `(("numpy" ,python-numpy)))
440 (inputs
441 `(("hdf4" ,hdf4)
442 ("libjpeg" ,libjpeg)
443 ("zlib" ,zlib)))
444 (arguments
445 `(#:phases
446 (modify-phases %standard-phases
447 (replace 'check
448 (lambda _
449 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
450 ;; on to import numpy. Somehow this works on their CI system.
451 ;; Let's just manage PYTHONPATH here instead.
452 (substitute* "runexamples.sh"
453 (("export PYTHONPATH=.*") ""))
454 (setenv "PYTHONPATH"
455 (string-append (getcwd) ":"
456 (getenv "PYTHONPATH")))
457 (invoke "./runexamples.sh")
458 (invoke "nosetests" "-v"))))))
459 (home-page "https://github.com/fhs/python-hdf4")
460 (synopsis "Python interface to the NCSA HDF4 library")
461 (description
462 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
463 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
464 NetCDF files can also be read and modified. Python-HDF4 is a fork of
465 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
466 (license license:expat)))
467
468 (define-public python2-hdf4
469 (package-with-python2 python-hdf4))
470
471 (define-public python-h5py
472 (package
473 (name "python-h5py")
474 (version "2.8.0")
475 (source
476 (origin
477 (method url-fetch)
478 (uri (pypi-uri "h5py" version))
479 (sha256
480 (base32
481 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
482 (build-system python-build-system)
483 (arguments
484 `(#:tests? #f ; no test target
485 #:phases
486 (modify-phases %standard-phases
487 (add-after 'unpack 'fix-hdf5-paths
488 (lambda* (#:key inputs #:allow-other-keys)
489 (let ((prefix (assoc-ref inputs "hdf5")))
490 (substitute* "setup_build.py"
491 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
492 (string-append "['" prefix "/lib" "']"))
493 (("'/opt/local/include', '/usr/local/include'")
494 (string-append "'" prefix "/include" "'")))
495 (substitute* "setup_configure.py"
496 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
497 (string-append "['" prefix "/lib" "']")))
498 #t))))))
499 (propagated-inputs
500 `(("python-six" ,python-six)
501 ("python-numpy" ,python-numpy)))
502 (inputs
503 `(("hdf5" ,hdf5)))
504 (native-inputs
505 `(("python-cython" ,python-cython)
506 ("python-pkgconfig" ,python-pkgconfig)))
507 (home-page "http://www.h5py.org/")
508 (synopsis "Read and write HDF5 files from Python")
509 (description
510 "The h5py package provides both a high- and low-level interface to the
511 HDF5 library from Python. The low-level interface is intended to be a
512 complete wrapping of the HDF5 API, while the high-level component supports
513 access to HDF5 files, datasets and groups using established Python and NumPy
514 concepts.")
515 (license license:bsd-3)))
516
517 (define-public python2-h5py
518 (package-with-python2 python-h5py))
519
520 (define-public python-sh
521 (package
522 (name "python-sh")
523 (version "1.12.14")
524 (source
525 (origin
526 (method url-fetch)
527 (uri (pypi-uri "sh" version))
528 (sha256
529 (base32
530 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
531 (build-system python-build-system)
532 (arguments
533 '(#:phases
534 (modify-phases %standard-phases
535 (replace 'check
536 (lambda _
537 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
538 (setenv "HOME" "/tmp")
539 (invoke "python" "sh.py" "test"))))))
540 (native-inputs
541 `(("python-coverage" ,python-coverage)))
542 (home-page "https://github.com/amoffat/sh")
543 (synopsis "Python subprocess replacement")
544 (description "This package provides a replacement for Python's
545 @code{subprocess} feature.")
546 (license license:expat)))
547
548 (define-public python2-sh
549 (package-with-python2 python-sh))
550
551 (define-public python-cftime
552 (package
553 (name "python-cftime")
554 (version "1.0.4.2")
555 (source
556 (origin
557 (method url-fetch)
558 (uri (pypi-uri "cftime" version))
559 (sha256
560 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
561 (build-system python-build-system)
562 (propagated-inputs
563 `(("python-numpy" ,python-numpy)))
564 (native-inputs
565 `(("python-coveralls" ,python-coveralls)
566 ("python-cython" ,python-cython)
567 ("python-pytest-cov" ,python-pytest-cov)))
568 (home-page "https://github.com/Unidata/cftime")
569 (synopsis "Library for time handling")
570 (description
571 "This package provides time-handling functionality that used to be part
572 of the netcdf4 package before.")
573 ;; This package claims to include code under the GPLv3 but is released
574 ;; under ISC.
575 (license (list license:isc license:gpl3+))))
576
577 (define-public python-netcdf4
578 (package
579 (name "python-netcdf4")
580 (version "1.4.2")
581 (source
582 (origin
583 (method url-fetch)
584 (uri (pypi-uri "netCDF4" version))
585 (sha256
586 (base32
587 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
588 (build-system python-build-system)
589 (arguments
590 '(#:phases
591 (modify-phases %standard-phases
592 (add-after 'unpack 'configure-locations
593 (lambda* (#:key inputs #:allow-other-keys)
594 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
595 #t)))))
596 (native-inputs
597 `(("python-cython" ,python-cython)))
598 (propagated-inputs
599 `(("python-numpy" ,python-numpy)
600 ("python-cftime" ,python-cftime)))
601 (inputs
602 `(("netcdf" ,netcdf)
603 ("hdf4" ,hdf4)
604 ("hdf5" ,hdf5)))
605 (home-page "https://github.com/Unidata/netcdf4-python")
606 (synopsis "Python/numpy interface to the netCDF library")
607 (description "Netcdf4-python is a Python interface to the netCDF C
608 library. netCDF version 4 has many features not found in earlier
609 versions of the library and is implemented on top of HDF5. This module
610 can read and write files in both the new netCDF 4 and the old netCDF 3
611 format, and can create files that are readable by HDF5 clients. The
612 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
613 to users of that module.")
614 ;; The software is mainly ISC, but includes some files covered
615 ;; by the Expat license.
616 (license (list license:isc license:expat))))
617
618 (define-public python2-netcdf4
619 (package-with-python2 python-netcdf4))
620
621 (define-public python-license-expression
622 (package
623 (name "python-license-expression")
624 (version "0.999")
625 (source
626 (origin
627 (method url-fetch)
628 (uri (pypi-uri "license-expression" version))
629 (sha256
630 (base32 "08ppb0bxbrsxazy88sgpl9yffvdsabw6dkk1nc332wcz2mphwwyf"))))
631 (build-system python-build-system)
632 (propagated-inputs
633 `(("python-boolean.py" ,python-boolean.py)))
634 (home-page "https://github.com/nexB/license-expression")
635 (synopsis "Apply boolean logic to license expressions")
636 (description
637 "This Python module defines a tiny language to evaluate and compare
638 license expressions using boolean logic. Logical combinations of licenses can
639 be tested for equality, containment, and equivalence. They can be normalised
640 and simplified. It supports SPDX license expressions as well as other naming
641 conventions and aliases in the same expression.")
642 (license license:gpl2+)))
643
644 (define-public python-lockfile
645 (package
646 (name "python-lockfile")
647 (version "0.12.2")
648 (source
649 (origin
650 (method url-fetch)
651 (uri (pypi-uri "lockfile" version))
652 (sha256
653 (base32
654 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
655 (build-system python-build-system)
656 (arguments '(#:test-target "check"))
657 (native-inputs
658 `(("python-pbr" ,python-pbr)))
659 (home-page "https://launchpad.net/pylockfile")
660 (synopsis "Platform-independent file locking module")
661 (description
662 "The lockfile package exports a LockFile class which provides a simple
663 API for locking files.")
664 (license license:expat)))
665
666 (define-public python2-lockfile
667 (package-with-python2 python-lockfile))
668
669 (define-public python-semantic-version
670 (package
671 (name "python-semantic-version")
672 (version "2.6.0")
673 (source
674 (origin
675 (method url-fetch)
676 (uri (pypi-uri "semantic_version" version))
677 (sha256
678 (base32
679 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
680 (build-system python-build-system)
681 (arguments
682 `(#:tests? #f)) ; PyPI tarball lacks tests
683 (home-page "https://github.com/rbarrois/python-semanticversion")
684 (synopsis "Semantic versioning module for Python")
685 (description
686 "The @code{semantic_version} class is a small library for handling
687 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
688
689 It can compare versions, generate a new version that represents a bump in one of
690 the version levels, and check whether any given string is a proper semantic
691 version identifier.")
692 (license license:bsd-3)))
693
694 (define-public python2-semantic-version
695 (package-with-python2 python-semantic-version))
696
697 (define-public python-serpent
698 (package
699 (name "python-serpent")
700 (version "1.28")
701 (source
702 (origin
703 (method url-fetch)
704 (uri (pypi-uri "serpent" version))
705 (sha256
706 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
707 (build-system python-build-system)
708 (native-inputs
709 `(("python-attrs" ,python-attrs)
710 ("python-pytz" ,python-pytz)))
711 (home-page "https://github.com/irmen/Serpent")
712 (synopsis "Serializer for literal Python expressions")
713 (description
714 "Serpent provides @code{ast.literal_eval()}-compatible object tree
715 serialization. It serializes an object tree into bytes (an utf-8 encoded
716 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
717 to rebuild the original object tree.
718
719 Because only safe literals are encoded, it is safe to send serpent data to
720 other machines, such as over the network.")
721 (license license:expat)))
722
723 (define-public python-setuptools
724 (package
725 (name "python-setuptools")
726 (version "41.0.1")
727 (source
728 (origin
729 (method url-fetch)
730 (uri (pypi-uri "setuptools" version ".zip"))
731 (sha256
732 (base32
733 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
734 (modules '((guix build utils)))
735 (snippet
736 '(begin
737 ;; Remove included binaries which are used to build self-extracting
738 ;; installers for Windows.
739 ;; TODO: Find some way to build them ourself so we can include them.
740 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
741 #t))))
742 (build-system python-build-system)
743 ;; FIXME: Tests require pytest, which itself relies on setuptools.
744 ;; One could bootstrap with an internal untested setuptools.
745 (arguments
746 `(#:tests? #f))
747 (home-page "https://pypi.python.org/pypi/setuptools")
748 (synopsis
749 "Library designed to facilitate packaging Python projects")
750 (description
751 "Setuptools is a fully-featured, stable library designed to facilitate
752 packaging Python projects, where packaging includes:
753 Python package and module definitions,
754 distribution package metadata,
755 test hooks,
756 project installation,
757 platform-specific details,
758 Python 3 support.")
759 ;; TODO: setuptools now bundles the following libraries:
760 ;; packaging, pyparsing, six and appdirs. How to unbundle?
761 (license (list license:psfl ; setuptools itself
762 license:expat ; six, appdirs, pyparsing
763 license:asl2.0 ; packaging is dual ASL2/BSD-2
764 license:bsd-2))))
765
766 (define-public python2-setuptools
767 (package-with-python2 python-setuptools))
768
769 ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
770 (define-public python-setuptools-for-tensorflow
771 (hidden-package
772 (package
773 (inherit python-setuptools)
774 (version "39.1.0")
775 (source (origin
776 (inherit (package-source python-setuptools))
777 (uri (pypi-uri "setuptools" version ".zip"))
778 (sha256
779 (base32
780 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
781
782 (define-public python-uniseg
783 (package
784 (name "python-uniseg")
785 (version "0.7.1")
786 (source
787 (origin
788 (method url-fetch)
789 (uri (pypi-uri "uniseg" version ".zip"))
790 (sha256
791 (base32
792 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
793 (build-system python-build-system)
794 (arguments
795 '(#:tests? #f)) ; The test suite requires network access.
796 (native-inputs
797 `(("unzip" ,unzip)))
798 (home-page
799 "https://bitbucket.org/emptypage/uniseg-python")
800 (synopsis
801 "Python library to determine Unicode text segmentations")
802 (description
803 "Uniseg is a Python package used to determine Unicode text segmentations.
804 Supported segmentations include:
805 @enumerate
806 @item @dfn{Code point} (any value in the Unicode codespace)
807 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
808 multiple Unicode code points, e.g. \"G\" + acute-accent)
809 @item Word break
810 @item Sentence break
811 @item Line break
812 @end enumerate")
813 (license license:expat)))
814
815 (define-public python2-uniseg
816 (package-with-python2 python-uniseg))
817
818 (define-public python-humanfriendly
819 (package
820 (name "python-humanfriendly")
821 (version "4.4.1")
822 (source
823 (origin
824 (method url-fetch)
825 (uri (pypi-uri "humanfriendly" version))
826 (sha256
827 (base32
828 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
829 (build-system python-build-system)
830 (arguments
831 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
832 #:tests? #f))
833 (propagated-inputs
834 `(("python-monotonic" ,python-monotonic)))
835 (home-page "https://humanfriendly.readthedocs.io")
836 (synopsis "Human-friendly input and output in Python")
837 (description
838 "The functions and classes in @code{humanfriendly} can be used to make
839 text interfaces more user-friendly. It includes tools to parse and format
840 numbers, file sizes, and timespans, timers for long-running operations, menus
841 to allow the user to choose from a list of options, and terminal interaction
842 helpers.")
843 (license license:expat)))
844
845 (define-public python2-humanfriendly
846 (package-with-python2 python-humanfriendly))
847
848 (define-public python-capturer
849 (package
850 (name "python-capturer")
851 (version "2.4")
852 (source
853 (origin
854 (method url-fetch)
855 (uri (pypi-uri "capturer" version))
856 (sha256
857 (base32
858 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
859 (build-system python-build-system)
860 (arguments
861 `(#:tests? #f))
862 (propagated-inputs
863 `(("python-humanfriendly" ,python-humanfriendly)))
864 (home-page "https://capturer.readthedocs.io")
865 (synopsis "Capture stdout and stderr streams of the current process")
866 (description
867 "The capturer package makes it easy to capture the stdout and stderr
868 streams of the current process and subprocesses. Output can be relayed
869 to the terminal in real time but is also available to the Python program
870 for additional processing.")
871 (license license:expat)))
872
873 (define-public python2-capturer
874 (package-with-python2 python-capturer))
875
876 (define-public python-case
877 (package
878 (name "python-case")
879 (version "1.5.3")
880 (source
881 (origin
882 (method url-fetch)
883 (uri (pypi-uri "case" version))
884 (sha256
885 (base32
886 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
887 (build-system python-build-system)
888 (propagated-inputs
889 `(("python-mock" ,python-mock)
890 ("python-nose" ,python-nose)
891 ("python-six" ,python-six)
892 ("python-unittest2" ,python-unittest2)))
893 (native-inputs
894 `(("python-coverage" ,python-coverage)))
895 (home-page "https://github.com/celery/case")
896 (synopsis "Unittest utilities and convenience methods")
897 (description
898 "The @code{case} package provides utilities on top of unittest, including
899 some helpful Python 2 compatibility convenience methods.")
900 (license license:bsd-3)))
901
902 (define-public python-verboselogs
903 (package
904 (name "python-verboselogs")
905 (version "1.7")
906 (source
907 (origin
908 (method url-fetch)
909 (uri (pypi-uri "verboselogs" version))
910 (sha256
911 (base32
912 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
913 (build-system python-build-system)
914 (arguments
915 `(#:phases
916 (modify-phases %standard-phases
917 (replace 'check
918 (lambda _
919 ;; Do not run pylint plugin test, as astroid is an old
920 ;; unsupported version.
921 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
922 "verboselogs/tests.py"))))))
923 (native-inputs
924 `(("python-mock" ,python-mock)
925 ("python-pytest" ,python-pytest)))
926 (home-page "https://verboselogs.readthedocs.io")
927 (synopsis "Verbose logging level for Python's logging module")
928 (description
929 "The @code{verboselogs} package extends Python's @code{logging} module to
930 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
931 (license license:expat)))
932
933 (define-public python2-verboselogs
934 (package-with-python2 python-verboselogs))
935
936 (define-public python-coloredlogs
937 (package
938 (name "python-coloredlogs")
939 (version "10.0")
940 (source
941 (origin
942 (method url-fetch)
943 (uri (pypi-uri "coloredlogs" version))
944 (sha256
945 (base32
946 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
947 (build-system python-build-system)
948 (arguments
949 `(;Tests require some updated modules
950 #:tests? #f))
951 (propagated-inputs
952 `(("python-capturer" ,python-capturer)))
953 (home-page "https://coloredlogs.readthedocs.io")
954 (synopsis "Colored stream handler for Python's logging module")
955 (description
956 "The @code{coloredlogs} package enables colored terminal output for
957 Python's logging module. The @code{ColoredFormatter} class inherits from
958 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
959 messages in color.")
960 (license license:expat)))
961
962 (define-public python2-coloredlogs
963 (package-with-python2 python-coloredlogs))
964
965 (define-public python-editorconfig
966 (package
967 (name "python-editorconfig")
968 (version "0.12.2")
969 (source
970 (origin
971 (method url-fetch)
972 (uri (pypi-uri "EditorConfig" version))
973 (sha256
974 (base32
975 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
976 (build-system python-build-system)
977 (home-page "https://editorconfig.org/")
978 (synopsis "EditorConfig bindings for python")
979 (description "The EditorConfig project consists of a file format for
980 defining coding styles and a collection of text editor plugins that enable
981 editors to read the file format and adhere to defined styles. EditorConfig
982 files are easily readable and they work nicely with version control systems.")
983 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
984 (license (list license:bsd-2 license:psfl))))
985
986 (define-public python-et-xmlfile
987 (package
988 (name "python-et-xmlfile")
989 (version "1.0.1")
990 (source
991 (origin
992 (method url-fetch)
993 (uri (pypi-uri "et_xmlfile" version))
994 (sha256
995 (base32
996 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
997 (build-system python-build-system)
998 (arguments
999 `(#:phases (modify-phases %standard-phases
1000 (replace 'check
1001 (lambda _
1002 (invoke "pytest"))))))
1003 (native-inputs
1004 `(("python-pytest" ,python-pytest)
1005 ("python-lxml" ,python-lxml))) ;used for the tests
1006 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
1007 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
1008 (description "This Python library is based upon the @code{xmlfile} module
1009 from @code{lxml}. It aims to provide a low memory, compatible implementation
1010 of @code{xmlfile}.")
1011 (license license:expat)))
1012
1013 (define-public python2-et-xmlfile
1014 (package-with-python2 python-et-xmlfile))
1015
1016 (define-public python-openpyxl
1017 (package
1018 (name "python-openpyxl")
1019 (version "2.6.2")
1020 (source
1021 (origin
1022 ;; We use the upstream repository, as the tests are not included in the
1023 ;; PyPI releases.
1024 (method hg-fetch)
1025 (uri (hg-reference
1026 (url "https://bitbucket.org/openpyxl/openpyxl")
1027 (changeset version)))
1028 (file-name (string-append name "-" version "-checkout"))
1029 (sha256
1030 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
1031 (build-system python-build-system)
1032 (arguments
1033 `(#:phases (modify-phases %standard-phases
1034 (replace 'check
1035 (lambda _
1036 (invoke "pytest"))))))
1037 (native-inputs
1038 ;; For the test suite.
1039 `(("python-lxml" ,python-lxml)
1040 ("python-pillow" ,python-pillow)
1041 ("python-pytest" ,python-pytest)))
1042 (propagated-inputs
1043 `(("python-et-xmlfile" ,python-et-xmlfile)
1044 ("python-jdcal" ,python-jdcal)))
1045 (home-page "https://openpyxl.readthedocs.io")
1046 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1047 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1048 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1049 standard.")
1050 (license license:expat)))
1051
1052 (define-public python-eventlet
1053 (package
1054 (name "python-eventlet")
1055 (version "0.25.1")
1056 (source
1057 (origin
1058 (method url-fetch)
1059 (uri (pypi-uri "eventlet" version))
1060 (sha256
1061 (base32
1062 "1hgz8jq19wlz8vwqj900ry8cjv578nz4scc91mlc8944yid6573c"))))
1063 (build-system python-build-system)
1064 (propagated-inputs
1065 `(("python-greenlet" ,python-greenlet)))
1066 (arguments
1067 ;; TODO: Requires unpackaged 'enum-compat'.
1068 '(#:tests? #f))
1069 (home-page "https://eventlet.net")
1070 (synopsis "Concurrent networking library for Python")
1071 (description
1072 "Eventlet is a concurrent networking library for Python that
1073 allows you to change how you run your code, not how you write it.
1074 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1075 Coroutines ensure that the developer uses a blocking style of programming
1076 that is similar to threading, but provide the benefits of non-blocking I/O.
1077 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1078 from the Python interpreter, or as a small part of a larger application.")
1079 (license license:expat)))
1080
1081 (define-public python2-eventlet
1082 (let ((base (package-with-python2
1083 (strip-python2-variant python-eventlet))))
1084 (package (inherit base)
1085 (propagated-inputs
1086 `(("python2-enum34" ,python2-enum34)
1087 ,@(package-propagated-inputs base))))))
1088
1089 (define-public python-six
1090 (package
1091 (name "python-six")
1092 (version "1.12.0")
1093 (source
1094 (origin
1095 (method url-fetch)
1096 (uri (pypi-uri "six" version))
1097 (sha256
1098 (base32
1099 "0wxs1q74v07ssjywbbm7x6h5v9qx209ld2yfsif4060sxi0h2sni"))))
1100 (build-system python-build-system)
1101 (arguments
1102 `(#:phases
1103 (modify-phases %standard-phases
1104 (replace 'check
1105 (lambda _
1106 (invoke "py.test" "-v"))))))
1107 (native-inputs
1108 `(("python-py" ,python-py)
1109 ("python-pytest" ,python-pytest-bootstrap)))
1110 (home-page "https://pypi.python.org/pypi/six/")
1111 (synopsis "Python 2 and 3 compatibility utilities")
1112 (description
1113 "Six is a Python 2 and 3 compatibility library. It provides utility
1114 functions for smoothing over the differences between the Python versions with
1115 the goal of writing Python code that is compatible on both Python versions.
1116 Six supports every Python version since 2.5. It is contained in only one
1117 Python file, so it can be easily copied into your project.")
1118 (license license:x11)))
1119
1120 (define-public python2-six
1121 (package-with-python2 python-six))
1122
1123 (define-public python-six-bootstrap
1124 (package
1125 (inherit python-six)
1126 (name "python-six-bootstrap")
1127 (native-inputs `())
1128 (arguments `(#:tests? #f))))
1129
1130 (define-public python2-six-bootstrap
1131 (package-with-python2 python-six-bootstrap))
1132
1133 (define-public python-schedule
1134 (package
1135 (name "python-schedule")
1136 (version "0.4.3")
1137 (source
1138 (origin
1139 (method url-fetch)
1140 (uri (pypi-uri "schedule" version))
1141 (sha256
1142 (base32
1143 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1144 (build-system python-build-system)
1145 (native-inputs
1146 `(("python-pytest" ,python-pytest)
1147 ("python-mock" ,python-mock)))
1148 (home-page "https://github.com/dbader/schedule")
1149 (synopsis "Schedule periodic function calls in Python")
1150 (description
1151 "Schedule is an in-process scheduler for periodic jobs that uses the
1152 builder pattern for configuration. Schedule lets you run Python functions (or
1153 any other callable) periodically at pre-determined intervals using a simple,
1154 human-friendly syntax.")
1155 (license license:expat)))
1156
1157 (define-public python2-schedule
1158 (package-with-python2 python-schedule))
1159
1160 (define-public python2-mechanize
1161 (package
1162 (name "python2-mechanize")
1163 (version "0.2.5")
1164 (source
1165 (origin
1166 (method url-fetch)
1167 (uri (pypi-uri "mechanize" version))
1168 (sha256
1169 (base32
1170 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1171 (build-system python-build-system)
1172 (arguments
1173 `(#:python ,python-2 ; apparently incompatible with Python 3
1174 #:tests? #f))
1175 ;; test fails with message
1176 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1177 ;; (python-3.3.2) or
1178 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1179 ;; (python-2.7.5).
1180 ;; The source code is from March 2011 and probably not up-to-date
1181 ;; with respect to python unit tests.
1182 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1183 (synopsis
1184 "Stateful programmatic web browsing in Python")
1185 (description
1186 "Mechanize implements stateful programmatic web browsing in Python,
1187 after Andy Lester’s Perl module WWW::Mechanize.")
1188 (license (license:non-copyleft
1189 "file://COPYING"
1190 "See COPYING in the distribution."))))
1191
1192
1193 (define-public python-simplejson
1194 (package
1195 (name "python-simplejson")
1196 (version "3.14.0")
1197 (source
1198 (origin
1199 (method url-fetch)
1200 (uri (pypi-uri "simplejson" version))
1201 (sha256
1202 (base32
1203 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1204 (build-system python-build-system)
1205 (home-page "http://simplejson.readthedocs.org/en/latest/")
1206 (synopsis
1207 "Json library for Python")
1208 (description
1209 "JSON (JavaScript Object Notation) is a subset of JavaScript
1210 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1211 format.
1212
1213 Simplejson exposes an API familiar to users of the standard library marshal
1214 and pickle modules. It is the externally maintained version of the json
1215 library contained in Python 2.6, but maintains compatibility with Python 2.5
1216 and (currently) has significant performance advantages, even without using
1217 the optional C extension for speedups. Simplejson is also supported on
1218 Python 3.3+.")
1219 (license license:x11)))
1220
1221 (define-public python2-simplejson
1222 (package-with-python2 python-simplejson))
1223
1224
1225 (define-public python-pyicu
1226 (package
1227 (name "python-pyicu")
1228 (version "2.3.1")
1229 (source
1230 (origin
1231 (method url-fetch)
1232 (uri (pypi-uri "PyICU" version))
1233 (sha256
1234 (base32
1235 "1x4w8m7ifki9z2a187pgjr33z6z0rp2fii9b73djak1vhm9v9cnx"))))
1236 (build-system python-build-system)
1237 (inputs
1238 `(("icu4c" ,icu4c)))
1239 (native-inputs
1240 `(("python-pytest" ,python-pytest)
1241 ("python-six" ,python-six)))
1242 (home-page "https://github.com/ovalhub/pyicu")
1243 (synopsis "Python extension wrapping the ICU C++ API")
1244 (description
1245 "PyICU is a python extension wrapping the ICU C++ API.")
1246 (properties `((python2-variant . ,(delay python2-pyicu))))
1247 (license license:x11)))
1248
1249 (define-public python2-pyicu
1250 (let ((base (package-with-python2
1251 (strip-python2-variant python-pyicu))))
1252 (package
1253 (inherit base)
1254 (arguments
1255 `(,@(package-arguments base)
1256 #:phases
1257 (modify-phases %standard-phases
1258 (add-before 'check 'delete-failing-test
1259 (λ _
1260 ;; XXX: This fails due to Unicode issues unique to Python 2,
1261 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1262 (delete-file "test/test_Script.py")
1263 #t))))))))
1264
1265 (define-public python2-dogtail
1266 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1267 ;; spaces in indentation" with Python 3.
1268 (package
1269 (name "python2-dogtail")
1270 (version "0.9.9")
1271 (source (origin
1272 (method url-fetch)
1273 (uri (pypi-uri "dogtail" version))
1274 (sha256
1275 (base32
1276 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1277 (build-system python-build-system)
1278 (arguments `(#:python ,python-2
1279 #:tests? #f)) ; invalid command "test"
1280 ;; Currently no offical homepage.
1281 (home-page "https://pypi.python.org/pypi/dogtail/")
1282 (synopsis "GUI test tool and automation framework written in Python")
1283 (description
1284 "Dogtail is a GUI test tool and automation framework written in Python.
1285 It uses Accessibility (a11y) technologies to communicate with desktop
1286 applications. dogtail scripts are written in Python and executed like any
1287 other Python program.")
1288 (license license:gpl2+)))
1289
1290 (define-public python-empy
1291 (package
1292 (name "python-empy")
1293 (version "3.3.3")
1294 (source (origin
1295 (method url-fetch)
1296 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1297 version ".tar.gz"))
1298 (sha256
1299 (base32
1300 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
1301 (build-system python-build-system)
1302 (arguments
1303 `(#:tests? #f)) ; python2 only
1304 (home-page "http://www.alcyone.com/software/empy/")
1305 (synopsis "Templating system for Python")
1306 (description
1307 "EmPy is a system for embedding Python expressions and statements in
1308 template text; it takes an EmPy source file, processes it, and produces
1309 output. This is accomplished via expansions, which are special signals to the
1310 EmPy system and are set off by a special prefix (by default the at sign, @@).
1311 EmPy can expand arbitrary Python expressions and statements in this way, as
1312 well as a variety of special forms. Textual data not explicitly delimited in
1313 this way is sent unaffected to the output, allowing Python to be used in
1314 effect as a markup language. Also supported are callbacks via hooks,
1315 recording and playback via diversions, and dynamic, chainable filters. The
1316 system is highly configurable via command line options and embedded
1317 commands.")
1318 (license license:lgpl2.1+)))
1319
1320 (define-public python2-empy
1321 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1322 (package
1323 (inherit base)
1324 (arguments `(,@(package-arguments base)
1325 #:tests? #t)))))
1326
1327 (define-public python2-element-tree
1328 (package
1329 (name "python2-element-tree")
1330 (version "1.2.6")
1331 (source (origin
1332 (method url-fetch)
1333 (uri (string-append
1334 "http://effbot.org/media/downloads/elementtree-"
1335 version "-20050316.tar.gz"))
1336 (sha256
1337 (base32
1338 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1339 (build-system python-build-system)
1340 (arguments
1341 `(#:python ,python-2 ; seems to be part of Python 3
1342 #:tests? #f)) ; no 'test' sub-command
1343 (synopsis "Toolkit for XML processing in Python")
1344 (description
1345 "ElementTree is a Python library supporting lightweight XML processing.")
1346 (home-page "http://effbot.org/zone/element-index.htm")
1347 (license (license:x11-style
1348 "http://docs.python.org/2/license.html"
1349 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1350
1351 (define-public python2-pybugz
1352 (package
1353 (name "python2-pybugz")
1354 (version "0.6.11")
1355 (source (origin
1356 (method url-fetch)
1357 (uri (string-append
1358 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1359 version ".tar.gz"))
1360 (sha256
1361 (base32
1362 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1363 (patches (search-patches "pybugz-stty.patch"
1364 "pybugz-encode-error.patch"))))
1365 (build-system python-build-system)
1366 (arguments
1367 `(#:python ,python-2 ; SyntaxError with Python 3
1368 #:tests? #f)) ; no 'test' sub-command
1369 (propagated-inputs
1370 `(("element-tree" ,python2-element-tree)))
1371 (synopsis "Python and command-line interface to Bugzilla")
1372 (description
1373 "PyBugz is a Python library and command-line tool to query the Bugzilla
1374 bug tracking system. It is meant as an aid to speed up interaction with the
1375 bug tracker.")
1376 (home-page "http://www.liquidx.net/pybugz/")
1377 (license license:gpl2)))
1378
1379 (define-public python2-enum
1380 (package
1381 (name "python2-enum")
1382 (version "0.4.6")
1383 (source (origin
1384 (method url-fetch)
1385 (uri (pypi-uri "enum" version))
1386 (sha256
1387 (base32
1388 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1389 (build-system python-build-system)
1390 (arguments
1391 `(#:python ,python-2))
1392 (home-page "http://pypi.python.org/pypi/enum/")
1393 (synopsis "Robust enumerated type support in Python")
1394 (description
1395 "This provides a module for robust enumerations in Python. It has
1396 been superseded by the Python standard library and is provided only for
1397 compatibility.")
1398 ;; Choice of either license.
1399 (license (list license:gpl3+ license:psfl))))
1400
1401 (define-public python-enum34
1402 (package
1403 (name "python-enum34")
1404 (version "1.1.6")
1405 (source
1406 (origin
1407 (method url-fetch)
1408 (uri (pypi-uri "enum34" version))
1409 (sha256
1410 (base32
1411 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1412 (build-system python-build-system)
1413 (home-page "https://pypi.python.org/pypi/enum34")
1414 (synopsis "Backported Python 3.4 Enum")
1415 (description
1416 "Enum34 is the new Python stdlib enum module available in Python 3.4
1417 backported for previous versions of Python from 2.4 to 3.3.")
1418 (license license:bsd-3)))
1419
1420 (define-public python2-enum34
1421 (package-with-python2 python-enum34))
1422
1423 (define-public python-parse-type
1424 (package
1425 (name "python-parse-type")
1426 (version "0.4.2")
1427 (source
1428 (origin
1429 (method url-fetch)
1430 (uri (pypi-uri "parse_type" version))
1431 (sha256
1432 (base32
1433 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1434 (build-system python-build-system)
1435 (propagated-inputs
1436 `(("python-six" ,python-six)
1437 ("python-parse" ,python-parse)))
1438 (native-inputs
1439 `(("python-pytest" ,python-pytest)
1440 ("python-pytest-runner" ,python-pytest-runner)))
1441 (home-page "https://github.com/jenisys/parse_type")
1442 (synopsis "Extended parse module")
1443 (description
1444 "Parse_type extends the python parse module.")
1445 (properties
1446 `((python2-variant . ,(delay python2-parse-type))))
1447 (license license:bsd-3)))
1448
1449 (define-public python2-parse-type
1450 (let ((base (package-with-python2
1451 (strip-python2-variant python-parse-type))))
1452 (package (inherit base)
1453 (propagated-inputs
1454 `(("python2-enum34" ,python2-enum34)
1455 ,@(package-propagated-inputs base))))))
1456
1457 (define-public python-parse
1458 (package
1459 (name "python-parse")
1460 (version "1.8.4")
1461 (source
1462 (origin
1463 (method url-fetch)
1464 (uri (pypi-uri "parse" version))
1465 (sha256
1466 (base32
1467 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1468 (build-system python-build-system)
1469 (arguments
1470 `(#:phases
1471 (modify-phases %standard-phases
1472 (replace 'check
1473 (lambda _ (invoke "python" "test_parse.py"))))))
1474 (home-page "https://github.com/r1chardj0n3s/parse")
1475 (synopsis "Parse strings")
1476 (description
1477 "Parse strings using a specification based on the Python @code{format()}
1478 syntax.")
1479 (license license:x11)))
1480
1481 (define-public python-polib
1482 (package
1483 (name "python-polib")
1484 (version "1.0.8")
1485 (source (origin
1486 (method url-fetch)
1487 (uri (pypi-uri "polib" version))
1488 (sha256
1489 (base32
1490 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1491 (build-system python-build-system)
1492 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1493 (synopsis "Manipulate, create and modify gettext files")
1494 (description "Polib can manipulate any gettext format (po, pot and mo)
1495 files. It can be used to create po files from scratch or to modify
1496 existing ones.")
1497 (license license:expat)))
1498
1499 (define-public python2-polib
1500 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1501 (package
1502 (inherit base)
1503 (arguments `(,@(package-arguments base)
1504 ;; Tests don't work with python2.
1505 #:tests? #f)))))
1506
1507 (define-public python-poyo
1508 (package
1509 (name "python-poyo")
1510 (version "0.5.0")
1511 (source
1512 (origin
1513 (method url-fetch)
1514 (uri (pypi-uri "poyo" version))
1515 (sha256
1516 (base32
1517 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
1518 (build-system python-build-system)
1519 (home-page "https://github.com/hackebrot/poyo")
1520 (synopsis "Lightweight YAML Parser for Python")
1521 (description
1522 "This package provides a lightweight YAML Parser for Python. It supports
1523 only a chosen subset of the YAML format that is required to parse cookiecutter
1524 user configuration files. It does not have support for serializing into YAML
1525 and is not compatible with JSON.")
1526 (license license:expat)))
1527
1528 (define-public scons
1529 (package
1530 (name "scons")
1531 (version "3.0.4")
1532 (source (origin
1533 (method git-fetch)
1534 (uri (git-reference
1535 (url "https://github.com/SCons/scons.git")
1536 (commit version)))
1537 (file-name (git-file-name name version))
1538 (sha256
1539 (base32
1540 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
1541 (build-system python-build-system)
1542 (arguments
1543 `(#:use-setuptools? #f ; still relies on distutils
1544 #:tests? #f ; no 'python setup.py test' command
1545 #:phases
1546 (modify-phases %standard-phases
1547 (add-before 'build 'bootstrap
1548 (lambda _
1549 (substitute* "src/engine/SCons/compat/__init__.py"
1550 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1551 "sys.modules[new] = __import__(old)"))
1552 (substitute* "src/engine/SCons/Platform/__init__.py"
1553 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1554 "mod = __import__(full_name)"))
1555 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1556 (chdir "build/scons")
1557 #t)))))
1558 (home-page "http://scons.org/")
1559 (synopsis "Software construction tool written in Python")
1560 (description
1561 "SCons is a software construction tool. Think of SCons as an improved,
1562 cross-platform substitute for the classic Make utility with integrated
1563 functionality similar to autoconf/automake and compiler caches such as ccache.
1564 In short, SCons is an easier, more reliable and faster way to build
1565 software.")
1566 (license license:x11)))
1567
1568 (define-public scons-python2
1569 (package
1570 (inherit (package-with-python2 scons))
1571 (name "scons-python2")))
1572
1573 (define-public python-extras
1574 (package
1575 (name "python-extras")
1576 (version "1.0.0")
1577 (source
1578 (origin
1579 (method url-fetch)
1580 (uri (pypi-uri "extras" version))
1581 (sha256
1582 (base32
1583 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1584 (build-system python-build-system)
1585 (arguments
1586 ;; FIXME: Circular dependency on testtools.
1587 '(#:tests? #f))
1588 (home-page "https://github.com/testing-cabal/extras")
1589 (synopsis "Useful extensions to the Python standard library")
1590 (description
1591 "Extras is a set of extensions to the Python standard library.")
1592 (license license:expat)))
1593
1594 (define-public python2-extras
1595 (package-with-python2 python-extras))
1596
1597 (define-public python-mimeparse
1598 (package
1599 (name "python-mimeparse")
1600 (version "1.6.0")
1601 (source
1602 (origin
1603 (method url-fetch)
1604 (uri (pypi-uri "python-mimeparse" version))
1605 (sha256
1606 (base32
1607 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1608 (build-system python-build-system)
1609 (arguments
1610 '(#:phases
1611 (modify-phases %standard-phases
1612 (replace 'check
1613 (lambda _
1614 (invoke "./mimeparse_test.py"))))))
1615 (home-page
1616 "https://github.com/dbtsai/python-mimeparse")
1617 (synopsis "Python library for parsing MIME types")
1618 (description
1619 "Mimeparse provides basic functions for parsing MIME type names and
1620 matching them against a list of media-ranges.")
1621 (license license:expat)))
1622
1623 (define-public python2-mimeparse
1624 (package-with-python2 python-mimeparse))
1625
1626 (define-public python-miniboa
1627 (package
1628 (name "python-miniboa")
1629 (version "1.0.7")
1630 (source
1631 (origin
1632 (method url-fetch)
1633 (uri (pypi-uri "miniboa" version))
1634 (sha256
1635 (base32
1636 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1637 (build-system python-build-system)
1638 (home-page "https://github.com/shmup/miniboa")
1639 (synopsis "Simple, single-threaded Telnet server")
1640 (description
1641 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1642 server.")
1643 (license license:asl2.0)))
1644
1645 (define-public python2-miniboa
1646 (package-with-python2 python-miniboa))
1647
1648 (define-public python-pafy
1649 (package
1650 (name "python-pafy")
1651 (version "0.5.3.1")
1652 (source
1653 (origin
1654 (method url-fetch)
1655 (uri (pypi-uri "pafy" version))
1656 (sha256
1657 (base32
1658 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1659 (build-system python-build-system)
1660 (arguments
1661 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1662 (propagated-inputs
1663 ;; Youtube-dl is a python package which is imported in the file
1664 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1665 `(("youtube-dl" ,youtube-dl)))
1666 (home-page "https://np1.github.io/pafy/")
1667 (synopsis "Retrieve YouTube content and metadata")
1668 (description
1669 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1670 (license license:lgpl3+)))
1671
1672 (define-public python2-funcsigs
1673 (package
1674 (name "python2-funcsigs")
1675 (version "1.0.2")
1676 (source (origin
1677 (method url-fetch)
1678 (uri (pypi-uri "funcsigs" version))
1679 (sha256
1680 (base32
1681 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1682 (build-system python-build-system)
1683 (arguments
1684 `(#:python ,python-2))
1685 (native-inputs
1686 `(("python2-unittest2" ,python2-unittest2)))
1687 (home-page "http://funcsigs.readthedocs.org")
1688 (synopsis "Python function signatures from PEP362")
1689 (description
1690 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1691 (license license:asl2.0)))
1692
1693 (define-public python2-funcsigs-bootstrap
1694 (package
1695 (inherit python2-funcsigs)
1696 (name "python2-funcsigs-bootstrap")
1697 (native-inputs `())
1698 (arguments
1699 `(#:tests? #f
1700 ,@(package-arguments python2-funcsigs)))))
1701
1702 (define-public python-py
1703 (package
1704 (name "python-py")
1705 (version "1.8.0")
1706 (source
1707 (origin
1708 (method url-fetch)
1709 (uri (pypi-uri "py" version))
1710 (sha256
1711 (base32
1712 "0lsy1gajva083pzc7csj1cvbmminb7b4l6a0prdzyb3fd829nqyw"))))
1713 (build-system python-build-system)
1714 (arguments
1715 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1716 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1717 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1718 ;; Is this module globally installed?"
1719 '(#:tests? #f))
1720 (native-inputs
1721 `(("python-setuptools-scm" ,python-setuptools-scm)))
1722 (home-page "https://github.com/pytest-dev/py")
1723 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1724 (description
1725 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1726 code introspection, and logging.")
1727 (license license:expat)))
1728
1729 (define-public python2-py
1730 (package-with-python2 python-py))
1731
1732 ;; Recent versions of python-fixtures and python-testrepository need
1733 ;; python-pbr for packaging, which itself needs these two packages for
1734 ;; testing.
1735 ;; To fix this circular dependency, we use a build of python-pbr, based on the
1736 ;; same source, just without any test dependencies and with tests disabled.
1737 ;; python-pbr-minmal is then used to package python-fixtures and
1738 ;; python-testrepository.
1739 ;; Strictly speaking we currently could remove the test-requirements from the
1740 ;; normal python-pbr package (and save this package) since test are disabled
1741 ;; there anyway. But this may change in future.
1742 (define-public python-pbr-minimal
1743 (package
1744 (name "python-pbr-minimal")
1745 (version "3.0.1")
1746 (source
1747 (origin
1748 (method url-fetch)
1749 (uri (pypi-uri "pbr" version))
1750 (sha256
1751 (base32
1752 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1753 (build-system python-build-system)
1754 (arguments
1755 `(#:tests? #f))
1756 (home-page "http://docs.openstack.org/developer/pbr/")
1757 (synopsis "Minimal build of python-pbr used for bootstrapping")
1758 (description
1759 "Used only for bootstrapping python2-pbr, you should not need this.")
1760 (license license:asl2.0)))
1761
1762 (define-public python2-pbr-minimal
1763 (package-with-python2 python-pbr-minimal))
1764
1765 (define-public python-pbr
1766 (package
1767 (inherit python-pbr-minimal)
1768 (name "python-pbr")
1769 (arguments
1770 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1771 (propagated-inputs
1772 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1773 (native-inputs
1774 `(("python-fixtures" ,python-fixtures-bootstrap)
1775 ;; discover, coverage, hacking, subunit
1776 ("python-mock" ,python-mock)
1777 ("python-six" ,python-six)
1778 ("python-sphinx" ,python-sphinx)
1779 ("python-testrepository" ,python-testrepository-bootstrap)
1780 ("python-testresources" ,python-testresources-bootstrap)
1781 ("python-testscenarios" ,python-testscenarios-bootstrap)
1782 ("python-testtools" ,python-testtools-bootstrap)
1783 ("python-virtualenv" ,python-virtualenv)))
1784 (synopsis "Enhance the default behavior of Python’s setuptools")
1785 (description
1786 "Python Build Reasonableness (PBR) is a library that injects some useful
1787 and sensible default behaviors into your setuptools run. It will set
1788 versions, process requirements files and generate AUTHORS and ChangeLog file
1789 from git information.
1790 ")))
1791
1792 (define-public python2-pbr
1793 (package-with-python2 python-pbr))
1794
1795 (define-public python-pyrsistent
1796 (package
1797 (name "python-pyrsistent")
1798 (version "0.14.11")
1799 (home-page "https://github.com/tobgu/pyrsistent")
1800 (source (origin
1801 (method url-fetch)
1802 (uri (pypi-uri "pyrsistent" version))
1803 (sha256
1804 (base32
1805 "1qkh74bm296mp5g3r11lgsksr6bh4w1bf8pji4nmxdlfj542ga1w"))))
1806 (build-system python-build-system)
1807 (native-inputs
1808 `(("python-hypothesis" ,python-hypothesis)
1809 ("python-pytest" ,python-pytest)
1810 ("python-pytest-runner" ,python-pytest-runner)))
1811 (propagated-inputs
1812 `(("python-six" ,python-six)))
1813 (synopsis "Persistent data structures for Python")
1814 (description
1815 "Pyrsistent is a number of persistent collections (by some referred to as
1816 functional data structures). Persistent in the sense that they are immutable.
1817
1818 All methods on a data structure that would normally mutate it instead return a
1819 new copy of the structure containing the requested updates. The original
1820 structure is left untouched.")
1821 (license license:expat)))
1822
1823 (define-public python2-pyrsistent
1824 (package-with-python2 python-pyrsistent))
1825
1826 (define-public python-exif-read
1827 (package
1828 (name "python-exif-read")
1829 (version "2.1.2")
1830 (source (origin
1831 (method url-fetch)
1832 (uri (pypi-uri "ExifRead" version))
1833 (sha256
1834 (base32
1835 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1836 (build-system python-build-system)
1837 (arguments `(#:tests? #f)) ; no tests
1838 (home-page "https://github.com/ianare/exif-py")
1839 (synopsis "Python library to extract EXIF data from image files")
1840 (description
1841 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1842 files.")
1843 (license license:bsd-3)))
1844
1845 (define-public python2-exif-read
1846 (package-with-python2 python-exif-read))
1847
1848 (define-public python-pyld
1849 (package
1850 (name "python-pyld")
1851 (version "1.0.5")
1852 (source (origin
1853 (method url-fetch)
1854 (uri (pypi-uri "PyLD" version))
1855 (sha256
1856 (base32
1857 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
1858 (build-system python-build-system)
1859 (home-page "https://github.com/digitalbazaar/pyld")
1860 (synopsis "Python implementation of the JSON-LD specification")
1861 (description
1862 "PyLD is an implementation of the JSON-LD specification.")
1863 (license license:bsd-3)))
1864
1865 (define-public python2-pyld
1866 (package-with-python2 python-pyld))
1867
1868 (define-public python-click
1869 (package
1870 (name "python-click")
1871 (version "7.0")
1872 (source
1873 (origin
1874 (method url-fetch)
1875 (uri (pypi-uri "click" version))
1876 (sha256
1877 (base32
1878 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
1879 (build-system python-build-system)
1880 (arguments
1881 `(#:phases
1882 (modify-phases %standard-phases
1883 (add-after 'unpack 'fix-paths
1884 (lambda* (#:key inputs #:allow-other-keys)
1885 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1886 "cross-libc" "libc"))))
1887 (substitute* "click/_unicodefun.py"
1888 (("'locale'")
1889 (string-append "'" glibc "/bin/locale'"))))
1890 #t))
1891 (replace 'check
1892 (lambda _
1893 (invoke "python" "-m" "pytest"))))))
1894 (native-inputs
1895 `(("python-pytest" ,python-pytest)))
1896 (home-page "https://palletsprojects.com/p/click/")
1897 (synopsis "Command line library for Python")
1898 (description
1899 "Click is a Python package for creating command line interfaces in a
1900 composable way with as little code as necessary. Its name stands for
1901 \"Command Line Interface Creation Kit\". It's highly configurable but comes
1902 with sensible defaults out of the box.")
1903 (license license:bsd-3)))
1904
1905 (define-public python2-click
1906 (package-with-python2 python-click))
1907
1908 (define-public python-wheel
1909 (package
1910 (name "python-wheel")
1911 (version "0.32.3")
1912 (source
1913 (origin
1914 (method url-fetch)
1915 (uri (pypi-uri "wheel" version))
1916 (sha256
1917 (base32
1918 "1dhxl1bf18bx9szmqcnxbg6204hp3im8089q3hkwh5jfa6zh75q2"))))
1919 (build-system python-build-system)
1920 (native-inputs
1921 `(("python-jsonschema" ,python-jsonschema)
1922 ("python-pytest-cov" ,python-pytest-cov)))
1923 (home-page "https://bitbucket.org/pypa/wheel/")
1924 (synopsis "Format for built Python packages")
1925 (description
1926 "A wheel is a ZIP-format archive with a specially formatted filename and
1927 the @code{.whl} extension. It is designed to contain all the files for a PEP
1928 376 compatible install in a way that is very close to the on-disk format. Many
1929 packages will be properly installed with only the @code{Unpack} step and the
1930 unpacked archive preserves enough information to @code{Spread} (copy data and
1931 scripts to their final locations) at any later time. Wheel files can be
1932 installed with a newer @code{pip} or with wheel's own command line utility.")
1933 (license license:expat)
1934 (properties `((python2-variant . ,(delay python2-wheel))))))
1935
1936 (define-public python2-wheel
1937 (let ((wheel (package-with-python2
1938 (strip-python2-variant python-wheel))))
1939 (package (inherit wheel)
1940 (native-inputs `(("python2-functools32" ,python2-functools32)
1941 ,@(package-native-inputs wheel))))))
1942
1943 (define-public python-vcversioner
1944 (package
1945 (name "python-vcversioner")
1946 (version "2.16.0.0")
1947 (source
1948 (origin
1949 (method url-fetch)
1950 (uri (pypi-uri "vcversioner" version))
1951 (sha256
1952 (base32
1953 "16z10sm78jd7ca3jbkgc3q5i8a8q7y1h21q1li21yy3rlhbhrrns"))))
1954 (build-system python-build-system)
1955 (synopsis "Python library for version number discovery")
1956 (description "Vcversioner is a Python library that inspects tagging
1957 information in a variety of version control systems in order to discover
1958 version numbers.")
1959 (home-page "https://github.com/habnabit/vcversioner")
1960 (license license:isc)))
1961
1962 (define-public python2-vcversioner
1963 (package-with-python2 python-vcversioner))
1964
1965 (define-public python-jdcal
1966 (package
1967 (name "python-jdcal")
1968 (version "1.4")
1969 (source
1970 (origin
1971 (method url-fetch)
1972 (uri (pypi-uri "jdcal" version))
1973 (sha256
1974 (base32
1975 "1ja6j2xq97bsl6rv09mhdx7n0xnrsfx0mj5xqza0mxghqmkm02pa"))))
1976 (build-system python-build-system)
1977 (arguments
1978 `(#:phases (modify-phases %standard-phases
1979 (replace 'check
1980 (lambda _
1981 (invoke "pytest"))))))
1982 (native-inputs
1983 `(("python-pytest" ,python-pytest)))
1984 (home-page "https://github.com/phn/jdcal")
1985 (synopsis "Functions to convert between Julian dates Gregorian dates")
1986 (description "This Python library provides functions for converting
1987 between Julian dates and Gregorian dates.")
1988 (license license:bsd-2)))
1989
1990 (define-public python2-jdcal
1991 (package-with-python2 python-jdcal))
1992
1993 (define-public python-jsonschema
1994 (package
1995 (name "python-jsonschema")
1996 (version "3.0.1")
1997 (source (origin
1998 (method url-fetch)
1999 (uri (pypi-uri "jsonschema" version))
2000 (sha256
2001 (base32
2002 "03g20i1xfg4qdlk4475pl4pp7y0h37g1fbgs5qhy678q9xb822hc"))))
2003 (build-system python-build-system)
2004 (arguments
2005 '(#:phases
2006 (modify-phases %standard-phases
2007 (replace 'check
2008 (lambda _
2009 (setenv "PYTHONPATH" (string-append ".:" (getenv "PYTHONPATH")))
2010 (invoke "trial" "jsonschema"))))))
2011 (native-inputs
2012 `(("python-setuptools_scm" ,python-setuptools-scm)
2013 ("python-twisted" ,python-twisted)))
2014 (propagated-inputs
2015 `(("python-attrs" ,python-attrs)
2016 ("python-pyrsistent" ,python-pyrsistent)
2017 ("python-six" ,python-six)))
2018 (home-page "https://github.com/Julian/jsonschema")
2019 (synopsis "Implementation of JSON Schema for Python")
2020 (description
2021 "Jsonschema is an implementation of JSON Schema for Python.")
2022 (license license:expat)
2023 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2024
2025 (define-public python2-jsonschema
2026 (let ((jsonschema (package-with-python2
2027 (strip-python2-variant python-jsonschema))))
2028 (package (inherit jsonschema)
2029 (propagated-inputs
2030 `(("python2-functools32" ,python2-functools32)
2031 ,@(package-propagated-inputs jsonschema))))))
2032
2033 ;; This old version is still required by docker-compose as of 1.24.0.
2034 (define-public python-jsonschema-2.6
2035 (package
2036 (name "python-jsonschema")
2037 (version "2.6.0")
2038 (source (origin
2039 (method url-fetch)
2040 (uri (pypi-uri "jsonschema" version))
2041 (sha256
2042 (base32
2043 "00kf3zmpp9ya4sydffpifn0j0mzm342a2vzh82p6r0vh10cg7xbg"))))
2044 (build-system python-build-system)
2045 (arguments
2046 '(#:phases
2047 (modify-phases %standard-phases
2048 (replace 'check (lambda _ (invoke "nosetests"))))))
2049 (native-inputs
2050 `(("python-nose" ,python-nose)
2051 ("python-vcversioner" ,python-vcversioner)))
2052 (home-page "https://github.com/Julian/jsonschema")
2053 (synopsis "Implementation of JSON Schema for Python")
2054 (description
2055 "Jsonschema is an implementation of JSON Schema for Python.")
2056 (license license:expat)
2057 (properties `((python2-variant . ,(delay python2-jsonschema))))))
2058
2059 (define-public python-schema
2060 (package
2061 (name "python-schema")
2062 (version "0.6.6")
2063 (source
2064 (origin
2065 (method url-fetch)
2066 (uri (pypi-uri "schema" version))
2067 (sha256
2068 (base32
2069 "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm"))))
2070 (build-system python-build-system)
2071 (native-inputs
2072 `(("python-pytest" ,python-pytest)))
2073 (home-page "https://github.com/keleshev/schema")
2074 (synopsis "Simple data validation library")
2075 (description
2076 "@code{python-schema} is a library for validating Python data
2077 structures, such as those obtained from config-files, forms, external
2078 services or command-line parsing, converted from JSON/YAML (or
2079 something else) to Python data-types.")
2080 (license license:psfl)))
2081
2082 (define-public python2-schema
2083 (package-with-python2 python-schema))
2084
2085 (define-public python-schema-0.5
2086 (package (inherit python-schema)
2087 (version "0.5.0")
2088 (source
2089 (origin
2090 (method url-fetch)
2091 (uri (pypi-uri "schema" version))
2092 (sha256
2093 (base32
2094 "10zqvpaky51kgb8nd42bk7jwl8cn2zvayxjpdc1wwmpybj92x67s"))))))
2095
2096 (define-public python2-schema-0.5
2097 (package-with-python2 python-schema-0.5))
2098
2099 (define-public python-kitchen
2100 (package
2101 (name "python-kitchen")
2102 (version "1.2.5")
2103 (source
2104 (origin
2105 (method url-fetch)
2106 (uri (pypi-uri "kitchen" version))
2107 (sha256
2108 (base32
2109 "1zakh6l0yjvwic9p0nkvmbidpnkygkxbigh2skmb5gccyrhbp7xg"))))
2110 (build-system python-build-system)
2111 (propagated-inputs
2112 `(("python-chardet" ,python-chardet)))
2113 (home-page "https://github.com/fedora-infra/kitchen")
2114 (synopsis "Python API for snippets")
2115 (description "@code{kitchen} module provides a python API for all sorts of
2116 little useful snippets of code that everybody ends up writing for their projects
2117 but never seem big enough to build an independent release. Use kitchen and stop
2118 cutting and pasting that code over and over.")
2119 (license (list license:lgpl2.1+
2120 ;; subprocess.py, test_subprocess.py,
2121 ;; kitchen/pycompat25/defaultdict.py:
2122 license:psfl))))
2123
2124 (define-public python2-kitchen
2125 (package-with-python2 python-kitchen))
2126
2127 (define-public python-unidecode
2128 (package
2129 (name "python-unidecode")
2130 (version "1.1.1")
2131 (source (origin
2132 (method url-fetch)
2133 (uri (pypi-uri "Unidecode" version))
2134 (sha256
2135 (base32
2136 "1s6cp2lv4m0f00hjckjz8p6m7d3n3v16jvg353llf5ia1iqsnsib"))))
2137 (build-system python-build-system)
2138 (home-page "https://pypi.python.org/pypi/Unidecode")
2139 (synopsis "ASCII transliterations of Unicode text")
2140 (description
2141 "Unidecode provides ASCII transliterations of Unicode text. Unidecode is
2142 useful when integrating with legacy code that doesn't support Unicode, or for
2143 ease of entry of non-Roman names on a US keyboard, or when constructing ASCII
2144 machine identifiers from human-readable Unicode strings that should still be
2145 somewhat intelligible.")
2146 (license license:gpl2+)))
2147
2148 (define-public python2-unidecode
2149 (package-with-python2 python-unidecode))
2150
2151 (define-public python-pyjwt
2152 (package
2153 (name "python-pyjwt")
2154 (version "1.7.1")
2155 (source
2156 (origin
2157 (method url-fetch)
2158 (uri (pypi-uri "PyJWT" version))
2159 (sha256
2160 (base32
2161 "15hflax5qkw1v6nssk1r0wkj83jgghskcmn875m3wgvpzdvajncd"))
2162 (modules '((guix build utils)))
2163 (snippet
2164 '(begin
2165 (for-each delete-file-recursively
2166 (find-files "." "\\.pyc$"))
2167 #t))))
2168 (build-system python-build-system)
2169 (native-inputs
2170 `(("python-pytest" ,python-pytest)
2171 ("python-pytest-cov" ,python-pytest-cov)
2172 ("python-pytest-runner" ,python-pytest-runner)))
2173 (home-page "https://github.com/progrium/pyjwt")
2174 (synopsis "JSON Web Token implementation in Python")
2175 (description
2176 "PyJWT is a JSON Web Token implementation written in Python.")
2177 (license license:expat)))
2178
2179 (define-public python2-pyjwt
2180 (package-with-python2 python-pyjwt))
2181
2182 (define-public python-pykka
2183 (package
2184 (name "python-pykka")
2185 (version "1.2.1")
2186 (source
2187 (origin
2188 (method url-fetch)
2189 (uri (pypi-uri "Pykka" version))
2190 (sha256
2191 (base32
2192 "049w3r0mdnnw7xv19jiq7rvls9k7xs73x05b4qs5d6z4vvmgyiz8"))))
2193 (build-system python-build-system)
2194 (native-inputs
2195 `(("python-mock" ,python-mock)
2196 ("python-nose" ,python-nose)
2197 ("python-gevent" ,python-gevent)
2198 ("python-eventlet" ,python-eventlet)))
2199 (home-page "https://www.pykka.org/")
2200 (synopsis "Pykka is a Python implementation of the actor model")
2201 (description
2202 "Pykka is a Python implementation of the actor model.
2203 The actor model introduces some simple rules to control the sharing
2204 of state and cooperation between execution units, which makes it
2205 easier to build concurrent applications.")
2206 (license license:asl2.0)))
2207
2208 (define-public python2-pykka
2209 (package-with-python2 python-pykka))
2210
2211 (define-public python-pymsgbox
2212 (package
2213 (name "python-pymsgbox")
2214 (version "1.0.6")
2215 (source
2216 (origin
2217 (method git-fetch)
2218 (uri (git-reference
2219 ;; LICENSE.txt is not present on pypi
2220 (url "https://github.com/asweigart/PyMsgBox")
2221 (commit "55926b55f46caa969c5ddb87990ebea2737bd66f")))
2222 (file-name (git-file-name name version))
2223 (sha256
2224 (base32
2225 "0zy7rjfpwlrd8b64j7jk2lb8m2npc21rnpwakpfvwgl4nxdy80rg"))))
2226 (arguments
2227 ;; Circular dependency to run tests:
2228 ;; Tests need pyautogui, which depends on pymsgbox.
2229 '(#:tests? #f))
2230 (build-system python-build-system)
2231 (home-page "https://github.com/asweigart/PyMsgBox")
2232 (synopsis "Python module for JavaScript-like message boxes")
2233 (description
2234 "PyMsgBox is a simple, cross-platform, pure Python module for
2235 JavaScript-like message boxes. Types of dialog boxes include:
2236 @enumerate
2237 @item alert
2238 @item confirm
2239 @item prompt
2240 @item password
2241 @end enumerate
2242 ")
2243 (license license:bsd-3)))
2244
2245 (define-public python-pympler
2246 (package
2247 (name "python-pympler")
2248 (home-page "https://pythonhosted.org/Pympler/")
2249 (version "0.7")
2250 (source (origin
2251 (method url-fetch)
2252 (uri (pypi-uri "Pympler" version))
2253 (sha256
2254 (base32
2255 "0ki7bqp1h9l1xc2k1h4vjyzsgs20i8ingvcdhszyi72s28wyf4bs"))))
2256 (build-system python-build-system)
2257 (arguments
2258 `(#:phases (modify-phases %standard-phases
2259 (delete 'check)
2260 (add-after 'install 'check
2261 (lambda* (#:key inputs outputs #:allow-other-keys)
2262 (add-installed-pythonpath inputs outputs)
2263 (invoke "python" "setup.py" "test"))))))
2264 (synopsis "Measure, monitor and analyze memory behavior")
2265 (description
2266 "Pympler is a development tool to measure, monitor and analyze
2267 the memory behavior of Python objects in a running Python application.
2268
2269 By pympling a Python application, detailed insight in the size and the
2270 lifetime of Python objects can be obtained. Undesirable or unexpected
2271 runtime behavior like memory bloat and other @samp{pymples} can easily
2272 be identified.
2273
2274 A web profiling frontend exposes process statistics, garbage
2275 visualisation and class tracker statistics.")
2276 (license license:asl2.0)))
2277
2278 (define-public python2-pympler
2279 (package-with-python2 python-pympler))
2280
2281 (define-public python-itsdangerous
2282 (package
2283 (name "python-itsdangerous")
2284 (version "1.1.0")
2285 (source
2286 (origin
2287 (method url-fetch)
2288 (uri (pypi-uri "itsdangerous" version))
2289 (sha256
2290 (base32
2291 "068zpbksq5q2z4dckh2k1zbcq43ay74ylqn77rni797j0wyh66rj"))))
2292 (build-system python-build-system)
2293 (home-page "https://palletsprojects.com/p/itsdangerous/")
2294 (synopsis "Python library for passing data to/from untrusted environments")
2295 (description
2296 "Itsdangerous provides various helpers to pass trusted data to untrusted
2297 environments and back.")
2298 (license license:bsd-3)))
2299
2300 (define-public python2-itsdangerous
2301 (package-with-python2 python-itsdangerous))
2302
2303 (define-public python-pyyaml
2304 (package
2305 (name "python-pyyaml")
2306 (version "3.13")
2307 (source
2308 (origin
2309 (method url-fetch)
2310 (uri (pypi-uri "PyYAML" version))
2311 (sha256
2312 (base32
2313 "1gx603g484z46cb74j9rzr6sjlh2vndxayicvlyhxdz98lhhkwry"))))
2314 (build-system python-build-system)
2315 (inputs
2316 `(("libyaml" ,libyaml)))
2317 (home-page "http://pyyaml.org/wiki/PyYAML")
2318 (synopsis "YAML parser and emitter for Python")
2319 (description
2320 "PyYAML is a YAML parser and emitter for Python. PyYAML features a
2321 complete YAML 1.1 parser, Unicode support, pickle support, capable extension
2322 API, and sensible error messages. PyYAML supports standard YAML tags and
2323 provides Python-specific tags that allow to represent an arbitrary Python
2324 object.")
2325 (license license:expat)))
2326
2327 (define-public python2-pyyaml
2328 (package-with-python2 python-pyyaml))
2329
2330 (define-public python-vine
2331 (package
2332 (name "python-vine")
2333 (version "1.1.4")
2334 (source
2335 (origin
2336 (method url-fetch)
2337 (uri (pypi-uri "vine" version))
2338 (sha256
2339 (base32
2340 "0wkskb2hb494v9gixqnf4bl972p4ibcmxdykzpwjlfa5picns4aj"))))
2341 (build-system python-build-system)
2342 (native-inputs
2343 `(("python-pytest" ,python-pytest)
2344 ("python-case" ,python-case)))
2345 (home-page "https://github.com/celery/vine")
2346 (synopsis "Promises for Python")
2347 (description
2348 "@code{vine} provides a special implementation of promises in that it can
2349 be used both for \"promise of a value\" and lazy evaluation. The biggest
2350 upside for this is that everything in a promise can also be a promise,
2351 e.g. filters, callbacks and errbacks can all be promises.")
2352 (license license:bsd-3)))
2353
2354 (define-public python-virtualenv
2355 (package
2356 (name "python-virtualenv")
2357 (version "16.1.0")
2358 (source
2359 (origin
2360 (method url-fetch)
2361 (uri (pypi-uri "virtualenv" version))
2362 (sha256
2363 (base32
2364 "0242cg3hdq3qdvx5flyrki8lpwlgwf5k45c21ks5049fv7ygm6gq"))))
2365 (build-system python-build-system)
2366 (arguments
2367 `(#:phases
2368 (modify-phases %standard-phases
2369 (add-before 'check 'disable-failing-test
2370 (lambda _
2371 ;; Disable failing test. See upstream bug report
2372 ;; https://github.com/pypa/virtualenv/issues/957
2373 (substitute* "tests/test_virtualenv.py"
2374 (("skipif.*") "skipif(True, reason=\"Guix\")\n"))
2375 #t)))))
2376 (native-inputs
2377 `(("python-mock" ,python-mock)
2378 ("python-pytest" ,python-pytest)))
2379 (home-page "https://virtualenv.pypa.io/")
2380 (synopsis "Virtual Python environment builder")
2381 (description
2382 "Virtualenv is a tool to create isolated Python environments.")
2383 (license license:expat)))
2384
2385 (define-public python2-virtualenv
2386 (package-with-python2 python-virtualenv))
2387
2388 (define-public python-markupsafe
2389 (package
2390 (name "python-markupsafe")
2391 (version "1.1.1")
2392 (source
2393 (origin
2394 (method url-fetch)
2395 (uri (pypi-uri "MarkupSafe" version))
2396 (sha256
2397 (base32
2398 "0sqipg4fk7xbixqd8kq6rlkxj664d157bdwbh93farcphf92x1r9"))))
2399 (build-system python-build-system)
2400 (arguments
2401 `(#:modules ((ice-9 ftw)
2402 (srfi srfi-1)
2403 (srfi srfi-26)
2404 (guix build utils)
2405 (guix build python-build-system))
2406 #:phases (modify-phases %standard-phases
2407 (replace 'check
2408 (lambda _
2409 (let ((cwd (getcwd))
2410 (libdir (find (cut string-prefix? "lib." <>)
2411 (scandir "build"))))
2412 (setenv "PYTHONPATH"
2413 (string-append cwd "/build/" libdir ":"
2414 (getenv "PYTHONPATH")))
2415 (invoke "pytest" "-vv")))))))
2416 (native-inputs
2417 `(("python-pytest" ,python-pytest)))
2418 (home-page "https://github.com/mitsuhiko/markupsafe")
2419 (synopsis "XML/HTML/XHTML markup safe string implementation for Python")
2420 (description
2421 "Markupsafe provides an XML/HTML/XHTML markup safe string implementation
2422 for Python.")
2423 (license license:bsd-3)))
2424
2425 (define-public python2-markupsafe
2426 (package-with-python2 python-markupsafe))
2427
2428 (define-public python-jinja2
2429 (package
2430 (name "python-jinja2")
2431 (version "2.10.1")
2432 (source
2433 (origin
2434 (method url-fetch)
2435 (uri (pypi-uri "Jinja2" version))
2436 (sha256
2437 (base32
2438 "04shqrs56aj04ipyqykj512rw2l0zfammvj9krawzxz7xc14yp06"))))
2439 (build-system python-build-system)
2440 (propagated-inputs
2441 `(("python-markupsafe" ,python-markupsafe)))
2442 (home-page "http://jinja.pocoo.org/")
2443 (synopsis "Python template engine")
2444 (description
2445 "Jinja2 is a small but fast and easy to use stand-alone template engine
2446 written in pure Python.")
2447 (license license:bsd-3)))
2448
2449 (define-public python2-jinja2
2450 (package-with-python2 python-jinja2))
2451
2452 (define-public python-jinja2-time
2453 (package
2454 (name "python-jinja2-time")
2455 (version "0.2.0")
2456 (source
2457 (origin
2458 (method url-fetch)
2459 (uri (pypi-uri "jinja2-time" version))
2460 (sha256
2461 (base32
2462 "0h0dr7cfpjnjj8bgl2vk9063a53649pn37wnlkd8hxjy656slkni"))))
2463 (build-system python-build-system)
2464 (propagated-inputs
2465 `(("python-arrow" ,python-arrow)
2466 ("python-jinja2" ,python-jinja2)))
2467 (home-page
2468 "https://github.com/hackebrot/jinja2-time")
2469 (synopsis "Jinja2 Extension for Dates and Times")
2470 (description
2471 "This package provides an extension for the template engine Jinja2. It
2472 adds a 'now' tag providing a convenient access to the arrow.now() API from
2473 templates. A format string can be provided to control the output.")
2474 (license license:expat)))
2475
2476 (define-public python-pystache
2477 (package
2478 (name "python-pystache")
2479 (version "0.5.4")
2480 (source (origin
2481 (method url-fetch)
2482 (uri (pypi-uri "pystache" version))
2483 (sha256
2484 (base32
2485 "0nmqsfmiw4arjxqkmf9z66ml950pcdjk6aq4gin4sywmzdjw5fzp"))))
2486 (build-system python-build-system)
2487 (arguments
2488 '(#:tests? #f)) ; FIXME: Python 3 tests are failing.
2489 (home-page "http://defunkt.io/pystache/")
2490 (synopsis "Python logic-less template engine")
2491 (description
2492 "Pystache is a Python implementation of the framework agnostic,
2493 logic-free templating system Mustache.")
2494 (license license:expat)
2495 (properties `((python2-variant . ,(delay python2-pystache))))))
2496
2497 (define-public python2-pystache
2498 (package (inherit (package-with-python2
2499 (strip-python2-variant python-pystache)))
2500 (arguments
2501 `(#:python ,python-2
2502 #:phases
2503 (modify-phases %standard-phases
2504 (replace 'check
2505 (lambda _
2506 (invoke "python" "test_pystache.py"))))))))
2507
2508 (define-public python-joblib
2509 (package
2510 (name "python-joblib")
2511 (version "0.13.0")
2512 (source (origin
2513 (method url-fetch)
2514 (uri (pypi-uri "joblib" version))
2515 (sha256
2516 (base32
2517 "0612nazad8dxmn3xghfrmjax6456l4xy6hn9cngs7vydi14ds7v5"))))
2518 (build-system python-build-system)
2519 (arguments
2520 `(#:phases
2521 (modify-phases %standard-phases
2522 (replace 'check
2523 (lambda _ (invoke "pytest" "-v" "joblib"))))))
2524 (native-inputs
2525 `(("python-pytest" ,python-pytest)))
2526 (home-page "https://joblib.readthedocs.io/")
2527 (synopsis "Using Python functions as pipeline jobs")
2528 (description
2529 "Joblib is a set of tools to provide lightweight pipelining in Python.
2530 In particular, joblib offers: transparent disk-caching of the output values
2531 and lazy re-evaluation (memoize pattern), easy simple parallel computing
2532 logging and tracing of the execution.")
2533 (license license:bsd-3)))
2534
2535 (define-public python2-joblib
2536 (package-with-python2 python-joblib))
2537
2538 (define-public python-daemon
2539 (package
2540 (name "python-daemon")
2541 (version "2.2.3")
2542 (source
2543 (origin
2544 (method url-fetch)
2545 (uri (pypi-uri "python-daemon" version))
2546 (sha256
2547 (base32
2548 "09fcjdjzk9ywmpnrj62iyxqgcygzdafsz41qlrk2dknzbagcmzmg"))))
2549 (build-system python-build-system)
2550 (arguments
2551 `(#:phases
2552 (modify-phases %standard-phases
2553 (add-before 'check 'disable-tests
2554 (lambda _
2555 ;; FIXME: Determine why test fails
2556 (substitute* "test/test_daemon.py"
2557 (("test_detaches_process_context")
2558 "skip_test_detaches_process_context"))
2559 #t)))))
2560 (propagated-inputs
2561 `(("python-lockfile" ,python-lockfile)))
2562 (native-inputs
2563 `(("python-unittest2" ,python-unittest2)
2564 ("python-testtools" ,python-testtools)
2565 ("python-testscenarios" ,python-testscenarios)
2566 ("python-mock" ,python-mock)
2567 ("python-docutils" ,python-docutils)))
2568 (home-page "https://pagure.io/python-daemon/")
2569 (synopsis "Python library for making a Unix daemon process")
2570 (description "Python-daemon is a library that assists a Python program to
2571 turn itself into a well-behaved Unix daemon process, as specified in PEP 3143.
2572
2573 This library provides a @code{DaemonContext} class that manages the following
2574 important tasks for becoming a daemon process:
2575 @enumerate
2576 @item Detach the process into its own process group.
2577 @item Set process environment appropriate for running inside a chroot.
2578 @item Renounce suid and sgid privileges.
2579 @item Close all open file descriptors.
2580 @item Change the working directory, uid, gid, and umask.
2581 @item Set appropriate signal handlers.
2582 @item Open new file descriptors for stdin, stdout, and stderr.
2583 @item Manage a specified PID lock file.
2584 @item Register cleanup functions for at-exit processing.
2585 @end enumerate")
2586 ;; Only setup.py is gpl3+, everything else is apache 2.0 licensed.
2587 (license (list license:asl2.0 license:gpl3+))))
2588
2589 (define-public python-docutils
2590 (package
2591 (name "python-docutils")
2592 (version "0.14")
2593 (source
2594 (origin
2595 (method url-fetch)
2596 (uri (pypi-uri "docutils" version))
2597 (sha256
2598 (base32
2599 "0x22fs3pdmr42kvz6c654756wja305qv6cx1zbhwlagvxgr4xrji"))))
2600 (build-system python-build-system)
2601 (arguments
2602 '(#:tests? #f)) ; no setup.py test command
2603 (home-page "http://docutils.sourceforge.net/")
2604 (synopsis "Python Documentation Utilities")
2605 (description
2606 "Docutils is a modular system for processing documentation into useful
2607 formats, such as HTML, XML, and LaTeX. For input Docutils supports
2608 reStructuredText.")
2609 ;; Most of the source code is public domain, but some source files are
2610 ;; licensed under the PFSL, BSD 2-clause, and GPLv3+ licenses.
2611 (license (list license:public-domain license:psfl license:bsd-2 license:gpl3+))))
2612
2613 (define-public python2-docutils
2614 (package-with-python2 python-docutils))
2615
2616 (define-public python-pygments
2617 (package
2618 (name "python-pygments")
2619 (version "2.4.2")
2620 (source
2621 (origin
2622 (method url-fetch)
2623 (uri (pypi-uri "Pygments" version))
2624 (sha256
2625 (base32
2626 "15v2sqm5g12bqa0c7wikfh9ck2nl97ayizy1hpqhmws5gqalq748"))))
2627 (build-system python-build-system)
2628 (arguments
2629 ;; FIXME: Tests require sphinx, which depends on this.
2630 '(#:tests? #f))
2631 (home-page "http://pygments.org/")
2632 (synopsis "Syntax highlighting")
2633 (description
2634 "Pygments is a syntax highlighting package written in Python.")
2635 (license license:bsd-2)))
2636
2637 (define-public python2-pygments
2638 (package-with-python2 python-pygments))
2639
2640 (define-public python-bumpversion
2641 (package
2642 (name "python-bumpversion")
2643 (version "0.5.3")
2644 (source
2645 (origin
2646 (method url-fetch)
2647 (uri (pypi-uri "bumpversion" version))
2648 (sha256
2649 (base32
2650 "0zn7694yfipxg35ikkfh7kvgl2fissha3dnqad2c5bvsvmrwhi37"))))
2651 (build-system python-build-system)
2652 (home-page "https://github.com/peritus/bumpversion")
2653 (synopsis "Tool to bump software version")
2654 (description "This tool provides a command-line interface (CLI) to bump a
2655 software version simply.")
2656 (license license:expat)))
2657
2658 (define-public python-deprecated
2659 (package
2660 (name "python-deprecated")
2661 (version "1.2.5")
2662 (source
2663 (origin
2664 (method git-fetch)
2665 (uri (git-reference
2666 (url "https://github.com/tantale/deprecated.git")
2667 (commit (string-append "v" version))))
2668 (file-name (git-file-name name version))
2669 (sha256
2670 (base32
2671 "14909glxxwwc4b9qpz2b9jdriwzi5n65ichw85xqppap5f79wcwz"))))
2672 (build-system python-build-system)
2673 (arguments
2674 `(#:phases (modify-phases %standard-phases
2675 (replace 'check
2676 (lambda _
2677 (invoke "pytest"))))))
2678 (propagated-inputs
2679 `(("python-wrapt" ,python-wrapt)))
2680 (native-inputs
2681 `(("python-bumpversion" ,python-bumpversion)
2682 ("python-pytest" ,python-pytest)
2683 ("python-pytest-cov" ,python-pytest-cov)
2684 ("python-sphinx" ,python-sphinx)
2685 ("python-tox" ,python-tox)))
2686 (home-page "https://github.com/tantale/deprecated")
2687 (synopsis "Python decorator to deprecate classes, functions or methods")
2688 (description "The @code{deprecated} decorator provides a convenient way to deprecate
2689 to deprecate classes, functions or methods.")
2690 (license license:expat)))
2691
2692 (define-public python-pygithub
2693 (package
2694 (name "python-pygithub")
2695 (version "1.43.8")
2696 (source
2697 ;; We fetch from the Git repo because there are no tests in the PyPI
2698 ;; archive.
2699 (origin
2700 (method git-fetch)
2701 (uri (git-reference
2702 (url "https://github.com/PyGithub/PyGithub.git")
2703 (commit (string-append "v" version))))
2704 (file-name (git-file-name name version))
2705 (sha256
2706 (base32 "1625v558xga5mwhl9jqmibywy5qafmg1vqrirqz6zfq1la1d22mw"))))
2707 (build-system python-build-system)
2708 (arguments
2709 `(#:phases (modify-phases %standard-phases
2710 ;; Some tests rely on the network.
2711 (add-after 'unpack 'disable-failing-tests
2712 (lambda _
2713 (substitute* "tests/Issue142.py"
2714 (("testDecodeJson") "disabled_testDecodeJson"))
2715 #t))
2716 (add-before 'check 'prepare-for-tests
2717 (lambda _
2718 (for-each (lambda (f)
2719 (chmod f #o666))
2720 (find-files "./tests"))
2721 (system* "python" "-m" "lib2to3" "-w" "-n" "tests")
2722 (setenv "PYTHONPATH"
2723 (string-append "./tests:" (getenv "PYTHONPATH")))
2724 #t)))))
2725 (propagated-inputs
2726 `(("python-deprecated" ,python-deprecated)
2727 ("python-pyjwt" ,python-pyjwt)
2728 ("python-requests" ,python-requests)))
2729 (native-inputs `(("python-httpretty" ,python-httpretty)))
2730 (home-page "https://pygithub.readthedocs.io/en/latest/")
2731 (synopsis "Python library for the GitHub API")
2732 (description "This library allows managing GitHub resources such as
2733 repositories, user profiles, and organizations in your Python applications,
2734 using version 3 of the GitHub application programming interface (API).")
2735 (license license:lgpl3+)))
2736
2737 (define-public python-rellu
2738 (package
2739 (name "python-rellu")
2740 (version "0.7")
2741 (source
2742 (origin
2743 (method url-fetch)
2744 (uri (pypi-uri "rellu" version))
2745 (sha256
2746 (base32
2747 "1w0arpj1sm7vh29nrbnca4pnp8sx42l07r17inwqcjjf9bhng66x"))))
2748 (build-system python-build-system)
2749 (propagated-inputs
2750 `(("python-invoke" ,python-invoke)
2751 ("python-pygithub" ,python-pygithub)))
2752 (home-page "https://github.com/robotframework/rellu")
2753 (synopsis "Utilities to create PyPI releases")
2754 (description "This collection of utilities contains tooling and templates
2755 to assist in creating releases on GitHub and publishing them on PyPI. It is
2756 designed to be used by Robot Framework and tools and libraries in its
2757 ecosystem, but can naturally be used also by other projects.")
2758 (license license:asl2.0)))
2759
2760 (define-public python-robotframework
2761 (package
2762 (name "python-robotframework")
2763 (version "3.1.2")
2764 ;; There are no tests in the PyPI archive.
2765 (source
2766 (origin
2767 (method git-fetch)
2768 (uri (git-reference
2769 (url "https://github.com/robotframework/robotframework.git")
2770 (commit (string-append "v" version))))
2771 (file-name (git-file-name name version))
2772 (sha256
2773 (base32 "16gnxy0qinh8fhs0qvhff5z2xh49c3cqgm0d7bfjw120df6x7fym"))
2774 (patches (search-patches
2775 "python-robotframework-honor-source-date-epoch.patch"))))
2776 (build-system python-build-system)
2777 (arguments
2778 `(#:phases (modify-phases %standard-phases
2779 (add-before 'build 'build-and-install-doc
2780 (lambda* (#:key outputs #:allow-other-keys)
2781 (let* ((doc-output (assoc-ref outputs "doc"))
2782 (doc (string-append doc-output "/share/"
2783 ,name "-" ,version "/")))
2784 (invoke "invoke" "library-docs" "all")
2785 (mkdir-p doc)
2786 (copy-recursively "doc/libraries"
2787 (string-append doc "/libraries"))
2788 #t)))
2789 (replace 'check
2790 (lambda _
2791 (invoke "python" "utest/run.py"))))))
2792 (native-inputs
2793 `(("python-invoke" ,python-invoke)
2794 ("python-rellu" ,python-rellu)
2795 ("python:tk" ,python "tk"))) ;used when building the HTML doc
2796 (outputs '("out" "doc"))
2797 (home-page "https://robotframework.org")
2798 (synopsis "Generic automation framework")
2799 (description "Robot Framework is a generic automation framework for
2800 acceptance testing, acceptance test driven development (ATDD), and robotic
2801 process automation (RPA).")
2802 (license license:asl2.0)))
2803
2804 (define-public python-robotframework-lint
2805 ;; There is no properly tagged release; the commit below seems to correspond
2806 ;; to the 0.9 stable release available from PyPI. The tests are not
2807 ;; included in the PyPI archive, so we fetch the sources from the upstream
2808 ;; Git repo.
2809 (let ((commit "e851879bab1f63e4e53b34a4dc8a67ed95102830")
2810 (revision "1"))
2811 (package
2812 (name "python-robotframework-lint")
2813 (version (git-version "0.9.0" revision commit))
2814 (source
2815 (origin
2816 (method git-fetch)
2817 (uri (git-reference
2818 (url "https://github.com/boakley/robotframework-lint.git")
2819 (commit commit)))
2820 (file-name (git-file-name name version))
2821 (sha256
2822 (base32
2823 "1p6fknqg5sb9qz5857ji4a877657vgfjm5v3zn45994parx6ml1m"))))
2824 (build-system python-build-system)
2825 (arguments
2826 `(#:phases
2827 (modify-phases %standard-phases
2828 (replace 'check
2829 (lambda _
2830 (invoke "python" "-m" "robot" "-A"
2831 "tests/conf/default.args" "tests"))))))
2832 (propagated-inputs
2833 `(("python-robotframework" ,python-robotframework)))
2834 (home-page "https://github.com/boakley/robotframework-lint/")
2835 (synopsis "Static analysis tool (linter) for Robot Framework")
2836 (description "This package provides the @code{rflint} command-line
2837 utility, a static analysis tool (linter) for Robot Framework source files.")
2838 (license license:asl2.0))))
2839
2840 (define-public python-robotframework-sshlibrary
2841 (package
2842 (name "python-robotframework-sshlibrary")
2843 (version "3.3.0")
2844 ;; There are no tests in the PyPI archive.
2845 (source
2846 (origin
2847 (method git-fetch)
2848 (uri (git-reference
2849 (url "https://github.com/robotframework/SSHLibrary.git")
2850 (commit (string-append "v" version))))
2851 (file-name (git-file-name name version))
2852 (sha256
2853 (base32
2854 "1mk6dz2jqqndbx4yji09012q6rmadnqdywi7czvj62b0s07dr3r2"))))
2855 (build-system python-build-system)
2856 (arguments
2857 `(#:phases
2858 (modify-phases %standard-phases
2859 (add-before 'build 'build-and-install-doc
2860 (lambda* (#:key outputs #:allow-other-keys)
2861 (let* ((doc-output (assoc-ref outputs "doc"))
2862 (doc (string-append doc-output "/share/"
2863 ,name "-" ,version "/")))
2864 (invoke "chmod" "-R" "+w" "docs")
2865 (invoke "invoke" "kw-docs" "project-docs")
2866 (mkdir-p doc)
2867 (for-each delete-file (find-files "docs" "\\.rst"))
2868 (copy-recursively "docs" doc)
2869 #t)))
2870 (replace 'check
2871 (lambda _
2872 ;; Some tests require an SSH server; we remove them.
2873 (delete-file "utest/test_client_api.py")
2874 (delete-file "utest/test_scp.py")
2875 (invoke "python" "utest/run.py"))))))
2876 (propagated-inputs
2877 `(("python-robotframework" ,python-robotframework)
2878 ("python-paramiko" ,python-paramiko)
2879 ("python-scp" ,python-scp)))
2880 (native-inputs
2881 `(("openssh" ,openssh)
2882 ("which" ,which)
2883 ;; To generate the documentation
2884 ("python-docutils" ,python-docutils)
2885 ("python-invoke" ,python-invoke)
2886 ("python-pygments" ,python-pygments)
2887 ("python-rellu" ,python-rellu)))
2888 (outputs '("out" "doc"))
2889 (home-page "https://github.com/robotframework/SSHLibrary")
2890 (synopsis "Robot Framework library for SSH and SFTP")
2891 (description "SSHLibrary is a Robot Framework library providing support
2892 for SSH and SFTP. It has the following main usages:
2893 @itemize @bullet
2894 @item Executing commands on the remote machine, either blocking or non-blocking.
2895 @item Writing and reading in an interactive shell.
2896 @item Transferring files and directories over SFTP.
2897 @item Ensuring that files and directories exist on the remote machine.
2898 @end itemize")
2899 (license license:asl2.0)))
2900
2901 (define-public python-scp
2902 (package
2903 (name "python-scp")
2904 (version "0.13.2")
2905 (source
2906 (origin
2907 (method url-fetch)
2908 (uri (pypi-uri "scp" version))
2909 (sha256
2910 (base32
2911 "1crlpw9lnn58fs1c1rmh7s7s9y5gkgpgjsqlvg9qa51kq1knx7gg"))))
2912 (build-system python-build-system)
2913 (arguments
2914 '(#:tests? #f)) ;tests require an SSH server
2915 (propagated-inputs
2916 `(("python-paramiko" ,python-paramiko)))
2917 (home-page "https://github.com/jbardin/scp.py")
2918 (synopsis "SCP protocol module for Python and Paramiko")
2919 (description "The scp module extends the Paramiko library to send and
2920 receive files via the SCP1 protocol, as implemented by the OpenSSH
2921 @command{scp} program.")
2922 (license license:gpl2+)))
2923
2924 (define-public python-rst.linker
2925 (package
2926 (name "python-rst.linker")
2927 (version "1.11")
2928 (source
2929 (origin
2930 (method url-fetch)
2931 (uri (pypi-uri "rst.linker" version))
2932 (sha256
2933 (base32 "0pqsfqqx8h0pq21k8l3k62kznrgaj2ala93c64s4d9rpbr4mgkd2"))))
2934 (build-system python-build-system)
2935 (propagated-inputs
2936 `(("python-dateutil" ,python-dateutil)
2937 ("python-six" ,python-six)))
2938 (native-inputs
2939 `(("python-setuptools-scm" ,python-setuptools-scm)))
2940 ;; Test would require path.py, which would introduce a cyclic dependence.
2941 (arguments `(#:tests? #f))
2942 ;; Note: As of version 1.7 the documentation is not worth building.
2943 (home-page "https://github.com/jaraco/rst.linker")
2944 (synopsis "Sphinx plugin to add links and timestamps")
2945 (description "rst.linker allows to automatically replace text by a
2946 reStructuredText external reference or timestamps. It's primary purpose is to
2947 augment the changelog, but it can be used for other documents, too.")
2948 (license license:expat)))
2949
2950 (define-public python2-rst.linker
2951 (package-with-python2 python-rst.linker))
2952
2953 (define-public python-feedgenerator
2954 (package
2955 (name "python-feedgenerator")
2956 (version "1.9")
2957 (source
2958 (origin
2959 (method url-fetch)
2960 (uri (pypi-uri "feedgenerator" version))
2961 (sha256
2962 (base32
2963 "01mirwkm7xfx539hmvj7g9da1j51gw5lsx74dr0glizskjm5vq2s"))
2964 (modules '((guix build utils)))
2965 (snippet
2966 '(begin
2967 ;; Remove pre-compiled .pyc files from source.
2968 (for-each delete-file-recursively
2969 (find-files "." "__pycache__" #:directories? #t))
2970 (for-each delete-file (find-files "." "\\.pyc$"))
2971 #t))))
2972 (build-system python-build-system)
2973 (propagated-inputs
2974 `(("python-pytz" ,python-pytz)
2975 ("python-six" ,python-six)))
2976 (home-page "https://github.com/getpelican/feedgenerator")
2977 (synopsis
2978 "Standalone version of Django's Atom/RSS feed generator")
2979 (description
2980 "Feedgenerator-py3k is a standalone version of Django's feedgenerator,
2981 which can produce feeds in RSS 2.0, RSS 0.91, and Atom formats.")
2982 (license license:bsd-3)))
2983
2984 (define-public python2-feedgenerator
2985 (package-with-python2 python-feedgenerator))
2986
2987 (define-public python-toml
2988 (package
2989 (name "python-toml")
2990 (version "0.9.4")
2991 (source
2992 (origin
2993 (method url-fetch)
2994 (uri (pypi-uri "toml" version))
2995 (sha256
2996 (base32
2997 "0bdbpbip67wdm6c7xwc6mmbmskyradj4cdxn1iibj4fcx1nbv1lf"))))
2998 (build-system python-build-system)
2999 (arguments
3000 `(#:tests? #f)) ;no tests suite in release
3001 (home-page "https://github.com/uiri/toml")
3002 (synopsis "Library for TOML")
3003 (description
3004 "@code{toml} is a library for parsing and creating Tom's Obvious, Minimal
3005 Language (TOML) configuration files.")
3006 (license license:expat)))
3007
3008 (define-public python-jsonrpc-server
3009 (package
3010 (name "python-jsonrpc-server")
3011 (version "0.3.2")
3012 (source
3013 (origin
3014 (method url-fetch)
3015 (uri (pypi-uri "python-jsonrpc-server" version))
3016 (sha256
3017 (base32
3018 "0ddgdp26dfxaz6isjbb12974b3rxavgsqrn2zrmck62cmipg5g05"))))
3019 (build-system python-build-system)
3020 (propagated-inputs
3021 `(("python-future" ,python-future)
3022 ("python-mock" ,python-mock)
3023 ("python-pytest" ,python-pytest)
3024 ("python-ujson" ,python-ujson)))
3025 (home-page
3026 "https://github.com/palantir/python-jsonrpc-server")
3027 (synopsis "JSON RPC 2.0 server library")
3028 (description
3029 "This package provides a JSON RPC 2.0 server library for Python.")
3030 (license license:expat)))
3031
3032 (define-public python-pydocstyle
3033 (package
3034 (name "python-pydocstyle")
3035 (version "3.0.0")
3036 (source
3037 (origin
3038 (method url-fetch)
3039 (uri (pypi-uri "pydocstyle" version))
3040 (sha256
3041 (base32
3042 "1m1xv9clkg9lgzyza6dnj359z04vh5g0h49nhzghv7lg81gchhap"))))
3043 (build-system python-build-system)
3044 (propagated-inputs
3045 `(("python-six" ,python-six)
3046 ("python-snowballstemmer" ,python-snowballstemmer)))
3047 (home-page
3048 "https://github.com/PyCQA/pydocstyle/")
3049 (synopsis "Python docstring style checker")
3050 (description
3051 "This package provides a style checker for the Python Language
3052 Server (PLS).")
3053 (license license:expat)))
3054
3055 (define-public python-language-server
3056 (package
3057 (name "python-language-server")
3058 (version "0.31.2")
3059 (source
3060 (origin
3061 (method url-fetch)
3062 (uri (pypi-uri "python-language-server" version))
3063 (sha256
3064 (base32
3065 "1iq69wc1fyhirfyq25ih41wq9yvr7bchiw0i116adpdgcq6m9idq"))))
3066 (build-system python-build-system)
3067 (propagated-inputs
3068 `(("python-pluggy" ,python-pluggy)
3069 ("python-jsonrpc-server" ,python-jsonrpc-server)
3070 ("python-jedi" ,python-jedi)
3071 ("python-yapf" ,python-yapf)
3072 ("python-pyflakes" ,python-pyflakes)
3073 ("python-pydocstyle" ,python-pydocstyle)
3074 ("python-pycodestyle" ,python-pycodestyle)
3075 ("python-mccabe" ,python-mccabe)
3076 ("python-rope" ,python-rope)
3077 ("python-autopep8" ,python-autopep8)
3078 ("python-flake8" ,python-flake8)
3079 ("python-pylint" ,python-pylint)))
3080 (home-page "https://github.com/palantir/python-language-server")
3081 (synopsis "Python implementation of the Language Server Protocol")
3082 (description
3083 "The Python Language Server (pyls) is an implementation of the Python 3
3084 language specification for the Language Server Protocol (LSP). This tool is
3085 used in text editing environments to provide a complete and integrated
3086 feature-set for programming Python effectively.")
3087 (license license:expat)))
3088
3089 (define-public python-black
3090 (package
3091 (name "python-black")
3092 (version "18.6b4")
3093 (source
3094 (origin
3095 (method url-fetch)
3096 (uri (pypi-uri "black" version))
3097 (sha256
3098 (base32
3099 "0i4sfqgz6w15vd50kbhi7g7rifgqlf8yfr8y78rypd56q64qn592"))))
3100 (build-system python-build-system)
3101 (arguments
3102 `(#:phases
3103 (modify-phases %standard-phases
3104 (add-after 'patch-source-shebangs 'patch-extra-shebangs
3105 (lambda _
3106 (let ((python3 (which "python3")))
3107 (substitute* '("tests/data/fmtonoff.py"
3108 "tests/data/string_prefixes.py"
3109 "tests/data/function.py")
3110 (("#!/usr/bin/env python3(\\.[0-9]+)?" _ minor-version)
3111 (string-append "#!" python3 (if (string? minor-version)
3112 minor-version
3113 ""))))))))))
3114 (propagated-inputs
3115 `(("python-click" ,python-click)
3116 ("python-attrs" ,python-attrs)
3117 ("python-appdirs" ,python-appdirs)
3118 ("python-toml" ,python-toml)))
3119 (home-page "https://github.com/ambv/black")
3120 (synopsis "The uncompromising code formatter")
3121 (description "Black is the uncompromising Python code formatter.")
3122 (license license:expat)))
3123
3124 (define-public python-blinker
3125 (package
3126 (name "python-blinker")
3127 (version "1.4")
3128 (source
3129 (origin
3130 (method url-fetch)
3131 (uri (pypi-uri "blinker" version))
3132 (sha256
3133 (base32
3134 "1dpq0vb01p36jjwbhhd08ylvrnyvcc82yxx3mwjx6awrycjyw6j7"))))
3135 (build-system python-build-system)
3136 (home-page "http://pythonhosted.org/blinker/")
3137 (synopsis "Fast, simple object-to-object and broadcast signaling")
3138 (description
3139 "Blinker provides a fast dispatching system that allows any number of
3140 interested parties to subscribe to events, or \"signals\".")
3141 (license license:expat)))
3142
3143 (define-public python2-blinker
3144 (package-with-python2 python-blinker))
3145
3146 (define-public pelican
3147 (package
3148 (name "pelican")
3149 (version "4.2.0")
3150 (source
3151 (origin
3152 (method url-fetch)
3153 (uri (pypi-uri "pelican" version))
3154 (sha256
3155 (base32
3156 "0mp7hjyhs38ag1hyfcy882g400z0babqi72pnli46dqijfhajzmy"))))
3157 (build-system python-build-system)
3158 (propagated-inputs
3159 `(("python-blinker" ,python-blinker)
3160 ("python-dateutil" ,python-dateutil)
3161 ("python-docutils" ,python-docutils)
3162 ("python-feedgenerator" ,python-feedgenerator)
3163 ("python-jinja2" ,python-jinja2)
3164 ("python-markdown" ,python-markdown)
3165 ("python-pygments" ,python-pygments)
3166 ("python-pytz" ,python-pytz)
3167 ("python-six" ,python-six)
3168 ("python-unidecode" ,python-unidecode)))
3169 (home-page "https://getpelican.com/")
3170 (arguments
3171 `(;; XXX Requires a lot more packages to do unit tests :P
3172 #:tests? #f))
3173 (synopsis "Python-based static site publishing system")
3174 (description
3175 "Pelican is a tool to generate a static blog from reStructuredText,
3176 Markdown input files, and more. Pelican uses Jinja2 for templating
3177 and is very extensible.")
3178 (license license:agpl3+)))
3179
3180 (define-public mallard-ducktype
3181 (package
3182 (name "mallard-ducktype")
3183 (version "1.0.2")
3184 (source
3185 (origin
3186 (method git-fetch)
3187 ;; git-reference because tests are not included in pypi source tarball
3188 ;; https://issues.guix.gnu.org/issue/36755#2
3189 (uri (git-reference
3190 (url "https://github.com/projectmallard/mallard-ducktype.git")
3191 (commit version)))
3192 (file-name (git-file-name name version))
3193 (sha256
3194 (base32
3195 "1jk9bfz7g04ip78s03b0xak6d54rj4h9zpgadkziy1ji216g6y4c"))))
3196 (build-system python-build-system)
3197 (arguments
3198 '(#:phases
3199 (modify-phases %standard-phases
3200 (replace 'check
3201 (lambda _
3202 (with-directory-excursion "tests"
3203 (invoke "sh" "runtests")))))))
3204 (home-page "http://projectmallard.org")
3205 (synopsis "Convert Ducktype to Mallard documentation markup")
3206 (description
3207 "Ducktype is a lightweight syntax that can represent all the semantics
3208 of the Mallard XML documentation system. Ducktype files can be converted to
3209 Mallard using the @command{ducktype} tool. The yelp-tools package
3210 provides additional functionality on the produced Mallard documents.")
3211 (license license:expat)))
3212
3213 (define-public python-cython
3214 (package
3215 (name "python-cython")
3216 (version "0.29.13")
3217 (source
3218 (origin
3219 (method url-fetch)
3220 (uri (pypi-uri "Cython" version))
3221 (sha256
3222 (base32
3223 "13k37lrcgagwwnzr5bzririsscb793vndj234d475x1h9ad0d7f2"))))
3224 (build-system python-build-system)
3225 ;; we need the full python package and not just the python-wrapper
3226 ;; because we need libpython3.3m.so
3227 (inputs
3228 `(("python" ,python)))
3229 (arguments
3230 `(#:phases
3231 (modify-phases %standard-phases
3232 (add-before 'check 'set-HOME
3233 ;; some tests require access to "$HOME/.cython"
3234 (lambda _ (setenv "HOME" "/tmp") #t))
3235
3236 ;; FIXME: These tests started failing on armhf after the 0.28 update
3237 ;; (commit c69d11c5930), both with an error such as this:
3238 ;; compiling (cpp) and running dictcomp ...
3239 ;; === C/C++ compiler error output: ===
3240 ;; ‘
3241 ;; dictcomp.cpp:5221: confused by earlier errors, bailing out
3242 ;; See <https://hydra.gnu.org/build/2948724> for logs.
3243 ,@(if (target-arm32?)
3244 `((add-before 'check 'disable-failing-tests
3245 (lambda _
3246 (let ((disabled-tests (open-file "tests/bugs.txt" "a")))
3247 (for-each (lambda (test)
3248 (format disabled-tests "~a\n" test))
3249 '("memslice" "dictcomp"))
3250 (close-port disabled-tests)))))
3251 '())
3252
3253 (replace 'check
3254 (lambda _
3255 ;; Disable compiler optimizations to greatly reduce the running
3256 ;; time of the test suite.
3257 (setenv "CFLAGS" "-O0")
3258
3259 (invoke "python" "runtests.py" "-vv"
3260 "-j" (number->string (parallel-job-count))))))))
3261 (home-page "https://cython.org/")
3262 (synopsis "C extensions for Python")
3263 (description "Cython is an optimising static compiler for both the Python
3264 programming language and the extended Cython programming language. It makes
3265 writing C extensions for Python as easy as Python itself.")
3266 (license license:asl2.0)
3267 (properties `((python2-variant . ,(delay python2-cython))))))
3268
3269 (define-public python2-cython
3270 (let ((base (package-with-python2 (strip-python2-variant python-cython))))
3271 (package
3272 (inherit base)
3273 (name "python2-cython")
3274 (inputs
3275 `(("python-2" ,python-2))) ;this is not automatically changed
3276 (arguments
3277 (substitute-keyword-arguments (package-arguments base)
3278 ((#:phases phases)
3279 `(modify-phases ,phases
3280 (add-before 'check 'adjust-test_embed
3281 (lambda _
3282 (substitute* "runtests.py"
3283 ;; test_embed goes great lengths to find the static libpythonX.Y.a
3284 ;; so it can give the right -L flag to GCC when embedding static
3285 ;; builds of Python. It is unaware that the Python "config"
3286 ;; directory (where the static library lives) was renamed in
3287 ;; Python 3, and falls back to sysconfig.get_config_var('LIBDIR'),
3288 ;; which works fine, because that is where the shared library is.
3289 ;;
3290 ;; It also appears to be unaware that the Makefile in Demos/embed
3291 ;; already unconditionally pass the static library location to GCC,
3292 ;; after checking sysconfig.get_config_var('LIBPL).
3293 ;;
3294 ;; The effect is that the linker is unable to resolve libexpat
3295 ;; symbols when building for Python 2, because neither the Python 2
3296 ;; shared library nor Expat is available. To fix it, we can either
3297 ;; add Expat as an input and make it visible to the linker, or just
3298 ;; prevent it from overriding the Python shared library location.
3299 ;; The end result is identical, so we take the easy route.
3300 ((" or libname not in os\\.listdir\\(libdir\\)")
3301 ""))
3302 #t)))))))))
3303
3304 ;; The RPython toolchain currently does not support Python 3.
3305 (define-public python2-rpython
3306 (package
3307 (name "python2-rpython")
3308 (version "0.2.1")
3309 (source
3310 (origin
3311 (method url-fetch)
3312 (uri (pypi-uri "rpython" version))
3313 (sha256
3314 (base32
3315 "02z9cvxf0y41dcvwnvf2zn0albhhw1drvjjbq27m6i1piw1k6fc0"))))
3316 (build-system python-build-system)
3317 (arguments `(#:python ,python-2))
3318 (native-inputs
3319 `(("python2-pytest" ,python2-pytest))) ; needed for running tests
3320 (home-page "https://rpython.readthedocs.org")
3321 (synopsis "Framework for implementing interpreters and virtual machines")
3322 (description "RPython is a translation and support framework for
3323 producing implementations of dynamic languages, emphasizing a clean separation
3324 between language specification and implementation aspects.")
3325 (license license:expat)))
3326
3327 ;; NOTE: when upgrading numpy please make sure that python-pandas and
3328 ;; python-scipy still build, as these three packages are often used together.
3329 (define-public python-numpy
3330 (package
3331 (name "python-numpy")
3332 (version "1.17.3")
3333 (source
3334 (origin
3335 (method url-fetch)
3336 (uri (string-append
3337 "https://github.com/numpy/numpy/releases/download/v"
3338 version "/numpy-" version ".tar.gz"))
3339 (sha256
3340 (base32
3341 "1ak9dmjja0q90a7fsxli51ypcwssh8c4pb6f8wkrsnf2xgdk6dy9"))))
3342 (build-system python-build-system)
3343 (inputs
3344 `(("openblas" ,openblas)
3345 ("lapack" ,lapack)))
3346 (native-inputs
3347 `(("python-cython" ,python-cython)
3348 ("python-pytest" ,python-pytest)
3349 ("gfortran" ,gfortran)))
3350 (arguments
3351 `(#:phases
3352 (modify-phases %standard-phases
3353 (add-before 'build 'configure-blas-lapack
3354 (lambda* (#:key inputs #:allow-other-keys)
3355 (call-with-output-file "site.cfg"
3356 (lambda (port)
3357 (format port
3358 "[openblas]
3359 libraries = openblas
3360 library_dirs = ~a/lib
3361 include_dirs = ~a/include
3362
3363 # backslash-n to make emacs happy
3364 \n[lapack]
3365 lapack_libs = lapack
3366 library_dirs = ~a/lib
3367 include_dirs = ~a/include
3368 "
3369 (assoc-ref inputs "openblas")
3370 (assoc-ref inputs "openblas")
3371 (assoc-ref inputs "lapack")
3372 (assoc-ref inputs "lapack"))))
3373 #t))
3374 (add-before 'build 'fix-executable-paths
3375 (lambda* (#:key inputs #:allow-other-keys)
3376 ;; Make /gnu/store/...-bash-.../bin/sh the default shell,
3377 ;; instead of /bin/sh.
3378 (substitute* "numpy/distutils/exec_command.py"
3379 (("(os.environ.get\\('SHELL', ')(/bin/sh'\\))" match match-start match-end)
3380 (string-append match-start (assoc-ref inputs "bash") match-end)))
3381 ;; Use "gcc" executable, not "cc".
3382 (substitute* "numpy/distutils/system_info.py"
3383 (("c = distutils\\.ccompiler\\.new_compiler\\(\\)")
3384 "c = distutils.ccompiler.new_compiler(); c.set_executables(compiler='gcc',compiler_so='gcc',linker_exe='gcc',linker_so='gcc -shared')"))
3385 #t))
3386 ;; Tests can only be run after the library has been installed and not
3387 ;; within the source directory.
3388 (delete 'check)
3389 (add-after 'install 'check
3390 (lambda* (#:key outputs inputs #:allow-other-keys)
3391 ;; Make installed package available for running the tests
3392 (add-installed-pythonpath inputs outputs)
3393 ;; Make sure "f2py" etc is found.
3394 (setenv "PATH" (string-append (assoc-ref outputs "out") "/bin"
3395 ":" (getenv "PATH")))
3396 (with-directory-excursion "/tmp"
3397 (invoke "python" "-c"
3398 "import numpy; numpy.test(verbose=2)")))))))
3399 (home-page "http://www.numpy.org/")
3400 (synopsis "Fundamental package for scientific computing with Python")
3401 (description "NumPy is the fundamental package for scientific computing
3402 with Python. It contains among other things: a powerful N-dimensional array
3403 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3404 and Fortran code, useful linear algebra, Fourier transform, and random number
3405 capabilities.")
3406 (properties `((python2-variant . ,(delay python2-numpy))))
3407 (license license:bsd-3)))
3408
3409 ;; Numpy 1.16.x are the last versions that support Python 2.
3410 (define-public python2-numpy
3411 (let ((numpy (package-with-python2
3412 (strip-python2-variant python-numpy))))
3413 (package/inherit
3414 numpy
3415 (version "1.16.5")
3416 (source (origin
3417 (method url-fetch)
3418 (uri (string-append
3419 "https://github.com/numpy/numpy/releases/download/v"
3420 version "/numpy-" version ".tar.gz"))
3421 (sha256
3422 (base32
3423 "0lg1cycxzi4rvvrd5zxinpdz0ni792fpx6xjd75z1923zcac8qrb")))))))
3424
3425 ;; NOTE: NumPy 1.8 is packaged only for Python 2 because it is of
3426 ;; interest only for legacy code going back to NumPy's predecessor
3427 ;; Numeric.
3428 (define-public python2-numpy-1.8
3429 (package (inherit python2-numpy)
3430 (version "1.8.2")
3431 (source
3432 (origin
3433 (method url-fetch)
3434 (uri (string-append
3435 "https://github.com/numpy/numpy/archive/v" version ".tar.gz"))
3436 (file-name (string-append "python2-numpy-" version ".tar.gz"))
3437 (sha256
3438 (base32
3439 "0sc20gz1b17xnyrkp5frca3ql5qfalpv916hfg2kqxpwr6jg0f1g"))))
3440 (arguments
3441 (substitute-keyword-arguments (package-arguments python2-numpy)
3442 ((#:phases phases)
3443 `(modify-phases ,phases
3444 (replace 'configure-blas-lapack
3445 (lambda* (#:key inputs #:allow-other-keys)
3446 (call-with-output-file "site.cfg"
3447 (lambda (port)
3448 (format port
3449 "[openblas]
3450 libraries = openblas,lapack
3451 library_dirs = ~a/lib:~a/lib
3452 include_dirs = ~a/include:~a/include
3453 "
3454 (assoc-ref inputs "openblas")
3455 (assoc-ref inputs "lapack")
3456 (assoc-ref inputs "openblas")
3457 (assoc-ref inputs "lapack"))))
3458 #t))))))
3459 (native-inputs
3460 `(("python2-nose" ,python2-nose)))
3461 (description "NumPy is the fundamental package for scientific computing
3462 with Python. It contains among other things: a powerful N-dimensional array
3463 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3464 and Fortran code, useful linear algebra, Fourier transform, and random number
3465 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3466 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3467 Numeric.")
3468 (license license:bsd-3)))
3469
3470 (define-public python-munch
3471 (package
3472 (name "python-munch")
3473 (version "2.0.4")
3474 (source
3475 (origin
3476 (method url-fetch)
3477 (uri (pypi-uri "munch" version))
3478 (sha256
3479 (base32
3480 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3481 (build-system python-build-system)
3482 (home-page "https://github.com/Infinidat/munch")
3483 (synopsis "Dot-accessible dictionary")
3484 (description "Munch is a dot-accessible dictionary similar to JavaScript
3485 objects.")
3486 (license license:expat)))
3487
3488 (define-public python2-munch
3489 (package-with-python2 python-munch))
3490
3491 (define-public python-colormath
3492 (package
3493 (name "python-colormath")
3494 (version "3.0.0")
3495 (source
3496 (origin
3497 (method url-fetch)
3498 (uri (pypi-uri "colormath" version))
3499 (sha256
3500 (base32
3501 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3502 (build-system python-build-system)
3503 (propagated-inputs
3504 `(("python-networkx" ,python-networkx)
3505 ("python-numpy" ,python-numpy)))
3506 (home-page "https://github.com/gtaylor/python-colormath")
3507 (synopsis "Color math and conversion library")
3508 (description
3509 "This is a Python library for color math and conversions.")
3510 (license license:bsd-3)))
3511
3512 (define-public python2-colormath
3513 (package-with-python2 python-colormath))
3514
3515 (define-public python-spectra
3516 (package
3517 (name "python-spectra")
3518 (version "0.0.11")
3519 (source
3520 (origin
3521 (method url-fetch)
3522 (uri (pypi-uri "spectra" version))
3523 (sha256
3524 (base32
3525 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3526 (build-system python-build-system)
3527 (arguments
3528 `(#:phases
3529 (modify-phases %standard-phases
3530 (replace 'check
3531 (lambda _ (invoke "nosetests" "-v"))))))
3532 (propagated-inputs
3533 `(("python-colormath" ,python-colormath)))
3534 (native-inputs
3535 `(("python-nose" ,python-nose)))
3536 (home-page "https://github.com/jsvine/spectra")
3537 (synopsis "Color scales and color conversion")
3538 (description
3539 "This package provides a Python library intended to make color math,
3540 color scales, and color space conversion easy. It has support for:
3541
3542 @enumerate
3543 @item Color scales
3544 @item Color ranges
3545 @item Color blending
3546 @item Brightening/darkening colors
3547 @item Saturating/desaturating colors
3548 @item Conversion to/from multiple color spaces.
3549 @end enumerate\n")
3550 (license license:expat)))
3551
3552 (define-public python2-spectra
3553 (package-with-python2 python-spectra))
3554
3555 (define-public python-numpy-documentation
3556 (package
3557 (name "python-numpy-documentation")
3558 (version (package-version python-numpy))
3559 (source (package-source python-numpy))
3560 (build-system python-build-system)
3561 (native-inputs
3562 `(("python-matplotlib" ,python-matplotlib)
3563 ("python-numpy" ,python-numpy)
3564 ("pkg-config" ,pkg-config)
3565 ("python-sphinx" ,python-sphinx)
3566 ("python-numpydoc" ,python-numpydoc)
3567 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
3568 texlive-fonts-ec
3569 texlive-generic-ifxetex
3570 texlive-generic-pdftex
3571 texlive-amsfonts
3572 texlive-latex-capt-of
3573 texlive-latex-cmap
3574 texlive-latex-environ
3575 texlive-latex-eqparbox
3576 texlive-latex-etoolbox
3577 texlive-latex-expdlist
3578 texlive-latex-fancyhdr
3579 texlive-latex-fancyvrb
3580 texlive-latex-fncychap
3581 texlive-latex-float
3582 texlive-latex-framed
3583 texlive-latex-geometry
3584 texlive-latex-graphics
3585 texlive-latex-hyperref
3586 texlive-latex-mdwtools
3587 texlive-latex-multirow
3588 texlive-latex-needspace
3589 texlive-latex-oberdiek
3590 texlive-latex-parskip
3591 texlive-latex-preview
3592 texlive-latex-tabulary
3593 texlive-latex-threeparttable
3594 texlive-latex-titlesec
3595 texlive-latex-trimspaces
3596 texlive-latex-ucs
3597 texlive-latex-upquote
3598 texlive-latex-url
3599 texlive-latex-varwidth
3600 texlive-latex-wrapfig)))
3601 ("texinfo" ,texinfo)
3602 ("perl" ,perl)
3603 ("scipy-sphinx-theme"
3604 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3605 (method git-fetch)
3606 (uri (git-reference
3607 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3608 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3609 (sha256
3610 (base32
3611 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3612 ,@(package-native-inputs python-numpy)))
3613 (arguments
3614 `(#:tests? #f ; we're only generating the documentation
3615 #:phases
3616 (modify-phases %standard-phases
3617 (delete 'build)
3618 (replace 'install
3619 (lambda* (#:key inputs outputs #:allow-other-keys)
3620 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3621 (doc (string-append
3622 data "/doc/" ,name "-"
3623 ,(package-version python-numpy)))
3624 (info-reader (string-append data "/info"))
3625 (html (string-append doc "/html"))
3626 (scipy-sphinx-theme "scipy-sphinx-theme")
3627 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3628 (pyver ,(string-append "PYVER=")))
3629
3630 ;; FIXME: this is needed to for texlive-union to generate
3631 ;; fonts, which are not found.
3632 (setenv "HOME" "/tmp")
3633
3634 (with-directory-excursion "doc"
3635 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3636 (mkdir-p html)
3637 (invoke "make" "html" pyver)
3638 (invoke "make" "latex" "PAPER=a4" pyver)
3639 (invoke "make" "-C" "build/latex"
3640 "all-pdf" "PAPER=a4" pyver)
3641 ;; FIXME: Generation of the info file fails.
3642 ;; (invoke "make" "info" pyver)
3643 ;; (mkdir-p info)
3644 ;; (copy-file "build/texinfo/numpy.info"
3645 ;; (string-append info "/numpy.info"))
3646 (for-each (lambda (file)
3647 (copy-file (string-append "build/latex" file)
3648 (string-append doc file)))
3649 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3650 (with-directory-excursion "build/html"
3651 (for-each (lambda (file)
3652 (let* ((dir (dirname file))
3653 (tgt-dir (string-append html "/" dir)))
3654 (unless (equal? "." dir)
3655 (mkdir-p tgt-dir))
3656 (install-file file html)))
3657 (find-files "." ".*")))))
3658 #t)))))
3659 (home-page (package-home-page python-numpy))
3660 (synopsis "Documentation for the python-numpy package")
3661 (description (package-description python-numpy))
3662 (license (package-license python-numpy))))
3663
3664 (define-public python2-numpy-documentation
3665 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3666 (package
3667 (inherit numpy-documentation)
3668 (native-inputs `(("python2-functools32" ,python2-functools32)
3669 ,@(package-native-inputs numpy-documentation))))))
3670
3671 (define-public python-pygit2
3672 (package
3673 (name "python-pygit2")
3674 (version "0.28.2")
3675 (source
3676 (origin
3677 (method url-fetch)
3678 (uri (pypi-uri "pygit2" version))
3679 (sha256
3680 (base32 "11kzj5mjkspvplnpdb6bj8dcj6rgmkk986k8hjcklyg5yaxkz32d"))))
3681 (build-system python-build-system)
3682 (arguments
3683 '(#:tests? #f)) ; tests don't run correctly in our environment
3684 (propagated-inputs
3685 `(("python-six" ,python-six)
3686 ("python-cffi" ,python-cffi)
3687 ("libgit2" ,libgit2)
3688 ("python-tox" ,python-tox)))
3689 (native-inputs
3690 `(("python-pytest" ,python-pytest)))
3691 (home-page "https://github.com/libgit2/pygit2")
3692 (synopsis "Python bindings for libgit2")
3693 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3694 library, libgit2 implements Git plumbing.")
3695 ;; GPL2.0 only, with linking exception.
3696 (license license:gpl2)))
3697
3698 (define-public python2-pygit2
3699 (package-with-python2 python-pygit2))
3700
3701 (define-public python-pyparsing
3702 (package
3703 (name "python-pyparsing")
3704 (version "2.3.1")
3705 (source
3706 (origin
3707 (method url-fetch)
3708 (uri (pypi-uri "pyparsing" version))
3709 (sha256
3710 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
3711 (build-system python-build-system)
3712 (outputs '("out" "doc"))
3713 (arguments
3714 `(#:tests? #f ; no test target
3715 #:phases
3716 (modify-phases %standard-phases
3717 (add-after 'install 'install-doc
3718 (lambda* (#:key outputs #:allow-other-keys)
3719 (let* ((doc (string-append (assoc-ref outputs "doc")
3720 "/share/doc/" ,name "-" ,version))
3721 (html-doc (string-append doc "/html"))
3722 (examples (string-append doc "/examples")))
3723 (mkdir-p html-doc)
3724 (mkdir-p examples)
3725 (for-each
3726 (lambda (dir tgt)
3727 (map (lambda (file)
3728 (install-file file tgt))
3729 (find-files dir ".*")))
3730 (list "docs" "htmldoc" "examples")
3731 (list doc html-doc examples))
3732 #t))))))
3733 (home-page "https://github.com/pyparsing/pyparsing")
3734 (synopsis "Python parsing class library")
3735 (description
3736 "The pyparsing module is an alternative approach to creating and
3737 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3738 of regular expressions. The pyparsing module provides a library of classes
3739 that client code uses to construct the grammar directly in Python code.")
3740 (license license:expat)))
3741
3742 (define-public python2-pyparsing
3743 (package-with-python2 python-pyparsing))
3744
3745 (define-public python-numpydoc
3746 (package
3747 (name "python-numpydoc")
3748 (version "0.8.0")
3749 (source
3750 (origin
3751 (method url-fetch)
3752 (uri (pypi-uri "numpydoc" version))
3753 (sha256
3754 (base32
3755 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3756 (build-system python-build-system)
3757 (propagated-inputs
3758 `(("python-sphinx" ,python-sphinx)))
3759 (native-inputs
3760 `(("python-nose" ,python-nose)))
3761 (home-page "https://pypi.python.org/pypi/numpydoc")
3762 (synopsis
3763 "Numpy's Sphinx extensions")
3764 (description
3765 "Sphinx extension to support docstrings in Numpy format.")
3766 (license license:bsd-2)))
3767
3768 (define-public python2-numpydoc
3769 (package-with-python2 python-numpydoc))
3770
3771 (define-public python-numexpr
3772 (package
3773 (name "python-numexpr")
3774 (version "2.6.5")
3775 (source
3776 (origin
3777 (method url-fetch)
3778 (uri (pypi-uri "numexpr" version))
3779 (sha256
3780 (base32
3781 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3782 (build-system python-build-system)
3783 (arguments `(#:tests? #f)) ; no tests included
3784 (propagated-inputs
3785 `(("python-numpy" ,python-numpy)))
3786 (home-page "https://github.com/pydata/numexpr")
3787 (synopsis "Fast numerical expression evaluator for NumPy")
3788 (description
3789 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3790 expressions that operate on arrays are accelerated and use less memory than
3791 doing the same calculation in Python. In addition, its multi-threaded
3792 capabilities can make use of all your cores, which may accelerate
3793 computations, most specially if they are not memory-bounded (e.g. those using
3794 transcendental functions).")
3795 (license license:expat)))
3796
3797 (define-public python2-numexpr
3798 (package-with-python2 python-numexpr))
3799
3800 (define-public python-cycler
3801 (package
3802 (name "python-cycler")
3803 (version "0.10.0")
3804 (source (origin
3805 (method url-fetch)
3806 (uri (pypi-uri "cycler" version))
3807 (sha256
3808 (base32
3809 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3810 (build-system python-build-system)
3811 (arguments
3812 ;; XXX: The current version requires 'coveralls' which we don't have.
3813 ;; Enable this for the next release which uses 'python-pytest'.
3814 '(#:tests? #f))
3815 (propagated-inputs
3816 `(("python-six" ,python-six)))
3817 (home-page "http://matplotlib.org/cycler/")
3818 (synopsis "Composable keyword argument iterator")
3819 (description
3820 "When using @code{matplotlib} and plotting more than one line, it is
3821 common to want to be able to want to be able to cycle over one or more artist
3822 styles; but the plotting logic can quickly become involved.
3823 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3824 @code{Cycler} class was developed.")
3825 (license license:bsd-3)))
3826
3827 (define-public python2-cycler
3828 (package-with-python2 python-cycler))
3829
3830 (define-public python-colorspacious
3831 (package
3832 (name "python-colorspacious")
3833 (version "1.1.2")
3834 (source
3835 (origin
3836 (method git-fetch)
3837 (uri (git-reference
3838 (url "https://github.com/njsmith/colorspacious.git")
3839 (commit (string-append "v" version))))
3840 (file-name (git-file-name name version))
3841 (sha256
3842 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
3843 (build-system python-build-system)
3844 (propagated-inputs
3845 `(("python-numpy" ,python-numpy)))
3846 (native-inputs
3847 `(("python-nose" ,python-nose)))
3848 (arguments
3849 `(#:phases
3850 (modify-phases %standard-phases
3851 (replace 'check
3852 (lambda _
3853 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
3854 (home-page "https://github.com/njsmith/colorspacious")
3855 (synopsis "Python library for colorspace conversions")
3856 (description "@code{colorspacious} is a Python library that lets you
3857 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3858 (license license:expat)))
3859
3860 (define-public python2-colorspacious
3861 (package-with-python2 python-colorspacious))
3862
3863 (define-public python-matplotlib
3864 (package
3865 (name "python-matplotlib")
3866 (version "3.1.2")
3867 (source
3868 (origin
3869 (method url-fetch)
3870 (uri (pypi-uri "matplotlib" version))
3871 (sha256
3872 (base32
3873 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))))
3874 (build-system python-build-system)
3875 (propagated-inputs ; the following packages are all needed at run time
3876 `(("python-cycler" ,python-cycler)
3877 ("python-kiwisolver" ,python-kiwisolver)
3878 ("python-pyparsing" ,python-pyparsing)
3879 ("python-pygobject" ,python-pygobject)
3880 ("gobject-introspection" ,gobject-introspection)
3881 ("python-tkinter" ,python "tk")
3882 ("python-dateutil" ,python-dateutil)
3883 ("python-numpy" ,python-numpy)
3884 ("python-pillow" ,python-pillow)
3885 ("python-pytz" ,python-pytz)
3886 ("python-six" ,python-six)
3887 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3888 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3889 ;; object. For this reason we need to import both libraries.
3890 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
3891 ("python-pycairo" ,python-pycairo)
3892 ("python-cairocffi" ,python-cairocffi)))
3893 (inputs
3894 `(("libpng" ,libpng)
3895 ("imagemagick" ,imagemagick)
3896 ("freetype" ,freetype)
3897 ("cairo" ,cairo)
3898 ("glib" ,glib)
3899 ;; FIXME: Add backends when available.
3900 ;("python-wxpython" ,python-wxpython)
3901 ("tcl" ,tcl)
3902 ("tk" ,tk)))
3903 (native-inputs
3904 `(("pkg-config" ,pkg-config)
3905 ("python-pytest" ,python-pytest)
3906 ("python-mock" ,python-mock)
3907 ("unzip" ,unzip)
3908 ("jquery-ui"
3909 ,(origin
3910 (method url-fetch)
3911 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
3912 (sha256
3913 (base32
3914 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
3915 (arguments
3916 `(#:phases
3917 (modify-phases %standard-phases
3918 ;; XXX We disable all image comparison tests because we're using a
3919 ;; newer version of FreeType than matplotlib expects. This leads to
3920 ;; minor differences throughout the tests.
3921 (add-after 'unpack 'fix-and-disable-failing-tests
3922 (lambda _
3923 (substitute* (append (find-files "lib/matplotlib/tests/"
3924 "test_.*\\.py$")
3925 (find-files "lib/mpl_toolkits/tests"
3926 "test_.*\\.py$"))
3927 (("^from matplotlib" match)
3928 (string-append "import pytest\n" match))
3929 (("( *)@image_comparison" match indent)
3930 (string-append indent
3931 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
3932 match)))
3933 (substitute* "lib/matplotlib/tests/test_animation.py"
3934 (("/bin/sh") (which "sh")))
3935 (for-each delete-file
3936 ;; test_normal_axes, test_get_tightbbox_polar
3937 '("lib/matplotlib/tests/test_axes.py"
3938 ;; We don't use the webagg backend and this test forces it.
3939 "lib/matplotlib/tests/test_backend_webagg.py"
3940 ;; test_outward_ticks
3941 "lib/matplotlib/tests/test_tightlayout.py"
3942 ;; test_hidden_axes fails with minor extent
3943 ;; differences, possibly due to the use of a
3944 ;; different version of FreeType.
3945 "lib/matplotlib/tests/test_constrainedlayout.py"
3946 ;; Fontconfig returns no fonts.
3947 "lib/matplotlib/tests/test_font_manager.py"))
3948 #t))
3949 (add-before 'install 'install-jquery-ui
3950 (lambda* (#:key outputs inputs #:allow-other-keys)
3951 (let ((dir (string-append (assoc-ref outputs "out")
3952 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
3953 (mkdir-p dir)
3954 (invoke "unzip"
3955 (assoc-ref inputs "jquery-ui")
3956 "-d" dir))
3957 #t))
3958 (replace 'check
3959 (lambda* (#:key outputs inputs #:allow-other-keys)
3960 (add-installed-pythonpath inputs outputs)
3961 (invoke "python" "tests.py" "-v"
3962 "-m" "not network and not webagg")))
3963 (add-before 'build 'configure-environment
3964 (lambda* (#:key outputs inputs #:allow-other-keys)
3965 (let ((cairo (assoc-ref inputs "cairo")))
3966 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
3967 ;; has not effect.
3968 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
3969 (setenv "HOME" (getcwd))
3970 (call-with-output-file "setup.cfg"
3971 (lambda (port)
3972 (format port "[directories]~%
3973 basedirlist = ~a,~a~%
3974 [packages]~%
3975 tests = True~%"
3976 (assoc-ref inputs "tcl")
3977 (assoc-ref inputs "tk")))))
3978 #t)))))
3979 (home-page "https://matplotlib.org/")
3980 (synopsis "2D plotting library for Python")
3981 (description
3982 "Matplotlib is a Python 2D plotting library which produces publication
3983 quality figures in a variety of hardcopy formats and interactive environments
3984 across platforms. Matplotlib can be used in Python scripts, the python and
3985 ipython shell, web application servers, and six graphical user interface
3986 toolkits.")
3987 (license license:psfl)
3988 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3989
3990 (define-public python2-matplotlib
3991 (let ((matplotlib (package-with-python2
3992 (strip-python2-variant python-matplotlib))))
3993 (package (inherit matplotlib)
3994 (version "2.2.4")
3995 (source
3996 (origin
3997 (method url-fetch)
3998 (uri (pypi-uri "matplotlib" version))
3999 (sha256
4000 (base32
4001 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
4002 (arguments
4003 (substitute-keyword-arguments (package-arguments matplotlib)
4004 ((#:phases phases)
4005 `(modify-phases ,phases
4006 (replace 'install-jquery-ui
4007 (lambda* (#:key outputs inputs #:allow-other-keys)
4008 (let ((dir (string-append (assoc-ref outputs "out")
4009 "/lib/python2.7/site-packages/"
4010 "matplotlib/backends/web_backend/")))
4011 (mkdir-p dir)
4012 (invoke "unzip"
4013 (assoc-ref inputs "jquery-ui")
4014 "-d" dir))
4015 #t))
4016 (delete 'fix-and-disable-failing-tests)
4017 (delete 'check))))) ; These tests weren't run the the past.
4018 ;; Make sure to use special packages for Python 2 instead
4019 ;; of those automatically rewritten by package-with-python2.
4020 (propagated-inputs
4021 `(("python2-pycairo" ,python2-pycairo)
4022 ("python2-backports-functools-lru-cache"
4023 ,python2-backports-functools-lru-cache)
4024 ("python2-functools32" ,python2-functools32)
4025 ("python2-pygobject-2" ,python2-pygobject-2)
4026 ("python2-subprocess32" ,python2-subprocess32)
4027 ("python2-tkinter" ,python-2 "tk")
4028 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4029 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4030
4031 (define-public python-matplotlib-documentation
4032 (package
4033 (name "python-matplotlib-documentation")
4034 (version (package-version python-matplotlib))
4035 (source (package-source python-matplotlib))
4036 (build-system python-build-system)
4037 (native-inputs
4038 `(("python-matplotlib" ,python-matplotlib)
4039 ("python-colorspacious" ,python-colorspacious)
4040 ("python-sphinx" ,python-sphinx)
4041 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
4042 ("python-sphinx-gallery" ,python-sphinx-gallery)
4043 ("python-numpydoc" ,python-numpydoc)
4044 ("python-ipython" ,python-ipython)
4045 ("python-ipykernel" ,python-ipykernel)
4046 ("python-mock" ,python-mock)
4047 ("graphviz" ,graphviz)
4048 ("texlive" ,(texlive-union (list texlive-amsfonts
4049 texlive-latex-amsmath
4050 texlive-latex-enumitem
4051 texlive-latex-expdlist
4052 texlive-latex-geometry
4053 texlive-latex-preview
4054 texlive-latex-type1cm
4055 texlive-latex-ucs
4056
4057 texlive-generic-pdftex
4058
4059 texlive-fonts-ec
4060 texlive-fonts-adobe-times
4061 texlive-fonts-txfonts)))
4062 ("texinfo" ,texinfo)
4063 ,@(package-native-inputs python-matplotlib)))
4064 (arguments
4065 `(#:tests? #f ; we're only generating documentation
4066 #:phases
4067 (modify-phases %standard-phases
4068 ;; The tests in python-matplotlib are run after the install phase, so
4069 ;; we need to delete the extra phase here.
4070 (delete 'check)
4071 (replace 'build
4072 (lambda _
4073 (chdir "doc")
4074 (setenv "PYTHONPATH"
4075 (string-append (getenv "PYTHONPATH")
4076 ":" (getcwd) "/../examples/units"))
4077 (substitute* "conf.py"
4078 ;; Don't use git.
4079 (("^SHA = check_output.*")
4080 (string-append "SHA = \"" ,version "\"\n"))
4081 ;; Don't fetch intersphinx files from the Internet
4082 (("^explicit_order_folders" m)
4083 (string-append "intersphinx_mapping = {}\n" m))
4084 (("'sphinx.ext.intersphinx',") "")
4085 ;; Disable URL embedding which requires internet access.
4086 (("'https://docs.scipy.org/doc/numpy'") "None")
4087 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
4088 (invoke "make"
4089 "SPHINXBUILD=sphinx-build"
4090 "SPHINXOPTS=" ; don't abort on warnings
4091 "html" "texinfo")))
4092 (replace 'install
4093 (lambda* (#:key inputs outputs #:allow-other-keys)
4094 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4095 (doc (string-append data "/doc/python-matplotlib-" ,version))
4096 (info (string-append data "/info"))
4097 (html (string-append doc "/html")))
4098 (mkdir-p html)
4099 (mkdir-p info)
4100 (copy-recursively "build/html" html)
4101 (symlink (string-append html "/_images")
4102 (string-append info "/matplotlib-figures"))
4103 (with-directory-excursion "build/texinfo"
4104 (substitute* "matplotlib.texi"
4105 (("@image\\{([^,]*)" all file)
4106 (string-append "@image{matplotlib-figures/" file)))
4107 (symlink (string-append html "/_images")
4108 "./matplotlib-figures")
4109 (invoke "makeinfo" "--no-split"
4110 "-o" "matplotlib.info" "matplotlib.texi"))
4111 (install-file "build/texinfo/matplotlib.info" info))
4112 #t)))))
4113 (home-page (package-home-page python-matplotlib))
4114 (synopsis "Documentation for the python-matplotlib package")
4115 (description (package-description python-matplotlib))
4116 (license (package-license python-matplotlib))))
4117
4118 (define-public python2-matplotlib-documentation
4119 (let ((parent (package-with-python2 python-matplotlib-documentation)))
4120 (package
4121 (inherit parent)
4122 (native-inputs
4123 (alist-delete "python-sphinx-copybutton"
4124 (package-native-inputs parent))))))
4125
4126 (define-public python-matplotlib-venn
4127 (package
4128 (name "python-matplotlib-venn")
4129 (version "0.11.5")
4130 (source
4131 (origin
4132 (method url-fetch)
4133 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4134 (sha256
4135 (base32
4136 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4137 (build-system python-build-system)
4138 (arguments '(#:tests? #f)) ; tests are not included
4139 (propagated-inputs
4140 `(("python-matplotlib" ,python-matplotlib)
4141 ("python-numpy" ,python-numpy)
4142 ("python-scipy" ,python-scipy)))
4143 (native-inputs
4144 `(("unzip" ,unzip)))
4145 (home-page "https://github.com/konstantint/matplotlib-venn")
4146 (synopsis "Plot area-proportional Venn diagrams")
4147 (description
4148 "This package provides tools for plotting area-proportional two- and
4149 three-way Venn diagrams in @code{matplotlib}.")
4150 (license license:expat)))
4151
4152 (define-public python2-pysnptools
4153 (package
4154 (name "python2-pysnptools")
4155 (version "0.3.13")
4156 (source
4157 (origin
4158 (method url-fetch)
4159 (uri (pypi-uri "pysnptools" version))
4160 (sha256
4161 (base32
4162 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
4163 (build-system python-build-system)
4164 (arguments
4165 `(#:python ,python-2 ; only Python 2.7 is supported
4166 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
4167 (propagated-inputs
4168 `(("python2-numpy" ,python2-numpy)
4169 ("python2-scipy" ,python2-scipy)
4170 ("python2-pandas" ,python2-pandas)))
4171 (native-inputs
4172 `(("python2-cython" ,python2-cython)))
4173 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
4174 (synopsis "Library for reading and manipulating genetic data")
4175 (description
4176 "PySnpTools is a library for reading and manipulating genetic data. It
4177 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4178 those files. It can also efficiently manipulate ranges of integers using set
4179 operators such as union, intersection, and difference.")
4180 (license license:asl2.0)))
4181
4182 (define-public python-socksipy-branch
4183 (package
4184 (name "python-socksipy-branch")
4185 (version "1.01")
4186 (source
4187 (origin
4188 (method url-fetch)
4189 (uri (pypi-uri "SocksiPy-branch" version))
4190 (sha256
4191 (base32
4192 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4193 (build-system python-build-system)
4194 (arguments
4195 `(#:tests? #f)) ; There are no tests
4196 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4197 (synopsis "Python SOCKS module")
4198 (description
4199 "SocksiPy - A Python SOCKS client module. It provides a
4200 socket-like interface that supports connections to any TCP
4201 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4202 The original version was developed by Dan Haim, this is a
4203 branch created by Mario Vilas to address some open issues,
4204 as the original project seems to have been abandoned circa 2007.")
4205 (license license:bsd-3)))
4206
4207 (define-public python2-socksipy-branch
4208 (package-with-python2 python-socksipy-branch))
4209
4210 (define-public python-socksipychain
4211 (package
4212 (name "python-socksipychain")
4213 (version "2.1.0")
4214 (source
4215 (origin
4216 (method git-fetch)
4217 (uri (git-reference
4218 (url "https://github.com/pagekite/PySocksipyChain.git")
4219 (commit (string-append "v" version))))
4220 (file-name (git-file-name name version))
4221 (sha256
4222 (base32
4223 "0idm9a050rd2kbgbz2sk9ib9589kj4xh1xdnggs6xbq2v2y8f6zn"))))
4224 (build-system python-build-system)
4225 (arguments
4226 `(#:tests? #f)) ; Tests try to access the network.
4227 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
4228 (synopsis "Python SOCKS module with chained proxies support")
4229 (description
4230 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
4231 adds support for arbitrary chaining of proxy servers and various modes of
4232 TLS/SSL encryption. It was developed for use in PageKite, and also includes
4233 a simple netcat replacement with chaining support.")
4234 (license license:bsd-3)))
4235
4236 (define-public python-pycodestyle
4237 (package
4238 (name "python-pycodestyle")
4239 (version "2.5.0")
4240 (source
4241 (origin
4242 (method url-fetch)
4243 (uri (pypi-uri "pycodestyle" version))
4244 (sha256
4245 (base32
4246 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
4247 (build-system python-build-system)
4248 (home-page "https://pycodestyle.readthedocs.io/")
4249 (synopsis "Python style guide checker")
4250 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4251 Python code against some of the style conventions in
4252 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4253 (license license:expat)))
4254
4255 (define-public python2-pycodestyle
4256 (package-with-python2 python-pycodestyle))
4257
4258 (define-public python-multidict
4259 (package
4260 (name "python-multidict")
4261 (version "4.2.0")
4262 (source
4263 (origin
4264 (method url-fetch)
4265 (uri (pypi-uri "multidict" version))
4266 (sha256
4267 (base32
4268 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4269 (build-system python-build-system)
4270 (native-inputs
4271 `(("python-pytest" ,python-pytest)
4272 ("python-pytest-runner" ,python-pytest-runner)))
4273 (home-page "https://github.com/aio-libs/multidict/")
4274 (synopsis "Multidict implementation")
4275 (description "Multidict is dict-like collection of key-value pairs
4276 where key might be occurred more than once in the container.")
4277 (license license:asl2.0)))
4278
4279 (define-public python-orderedmultidict
4280 (package
4281 (name "python-orderedmultidict")
4282 (version "0.7.11")
4283 (source
4284 (origin
4285 (method url-fetch)
4286 (uri (pypi-uri "orderedmultidict" version))
4287 (sha256
4288 (base32
4289 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4290 (build-system python-build-system)
4291 (arguments
4292 `(#:phases
4293 (modify-phases %standard-phases
4294 (add-after 'unpack 'fix-tests
4295 (lambda _
4296 ;; The package uses nosetest for running the tests.
4297 ;; Adding this initfile allows to run the test suite
4298 ;; without requiring nosetest.
4299 (with-output-to-file "tests/__init__.py" newline)
4300 #t)))))
4301 (propagated-inputs
4302 `(("python-six" ,python-six)))
4303 (native-inputs
4304 `(("python-pycodestyle" ,python-pycodestyle)))
4305 (home-page "https://github.com/gruns/orderedmultidict")
4306 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4307 (description "This package contains a library for ordered multivalue
4308 dictionaries. A multivalue dictionary is a dictionary that can store
4309 multiple values for the same key. An ordered multivalue dictionary is a
4310 multivalue dictionary that retains the order of insertions and deletions.")
4311 (license license:unlicense)))
4312
4313 (define-public python2-orderedmultidict
4314 (package-with-python2 python-orderedmultidict))
4315
4316 (define-public python-autopep8
4317 (package
4318 (name "python-autopep8")
4319 (version "1.3.5")
4320 (source
4321 (origin
4322 (method url-fetch)
4323 (uri (pypi-uri "autopep8" version))
4324 (sha256
4325 (base32
4326 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4327 (build-system python-build-system)
4328 (propagated-inputs
4329 `(("python-pycodestyle" ,python-pycodestyle)))
4330 (home-page "https://github.com/hhatto/autopep8")
4331 (synopsis "Format Python code according to the PEP 8 style guide")
4332 (description
4333 "@code{autopep8} automatically formats Python code to conform to
4334 the PEP 8 style guide. It uses the pycodestyle utility to determine
4335 what parts of the code needs to be formatted. @code{autopep8} is
4336 capable of fixing most of the formatting issues that can be reported
4337 by pycodestyle.")
4338 (license (license:non-copyleft
4339 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4340
4341 (define-public python2-autopep8
4342 (package-with-python2 python-autopep8))
4343
4344 (define-public python-distutils-extra
4345 (package
4346 (name "python-distutils-extra")
4347 (version "2.38")
4348 (source
4349 (origin
4350 (method url-fetch)
4351 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4352 version "/+download/python-distutils-extra-"
4353 version ".tar.gz"))
4354 (sha256
4355 (base32
4356 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4357 (build-system python-build-system)
4358 (home-page "https://launchpad.net/python-distutils-extra/")
4359 (synopsis "Enhancements to Python's distutils")
4360 (description
4361 "The python-distutils-extra module enables you to easily integrate
4362 gettext support, themed icons, and scrollkeeper-based documentation into
4363 Python's distutils.")
4364 (license license:gpl2)))
4365
4366 (define-public python2-distutils-extra
4367 (package-with-python2 python-distutils-extra))
4368
4369 (define-public python2-elib.intl
4370 (package
4371 (name "python2-elib.intl")
4372 (version "0.0.3")
4373 (source
4374 (origin
4375 ;; This project doesn't tag releases or publish tarballs, so we take
4376 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4377 (method git-fetch)
4378 (uri (git-reference
4379 (url "https://github.com/dieterv/elib.intl.git")
4380 (commit "d09997cfef")))
4381 (file-name (string-append name "-" version "-checkout"))
4382 (sha256
4383 (base32
4384 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4385 (build-system python-build-system)
4386 (arguments
4387 ;; incompatible with Python 3 (exception syntax)
4388 `(#:python ,python-2
4389 #:tests? #f))
4390 (home-page "https://github.com/dieterv/elib.intl")
4391 (synopsis "Enhanced internationalization for Python")
4392 (description
4393 "The elib.intl module provides enhanced internationalization (I18N)
4394 services for your Python modules and applications.")
4395 (license license:lgpl3+)))
4396
4397 (define-public python-olefile
4398 (package
4399 (name "python-olefile")
4400 (version "0.46")
4401 (source
4402 (origin
4403 (method url-fetch)
4404 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4405 "download/v" version "/olefile-" version ".tar.gz"))
4406 (file-name (string-append name "-" version ".tar.gz"))
4407 (sha256
4408 (base32
4409 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
4410 (build-system python-build-system)
4411 (home-page "https://www.decalage.info/python/olefileio")
4412 (synopsis "Read and write Microsoft OLE2 files.")
4413 (description
4414 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4415 Storage or Compound Document, Microsoft Office). It is an improved version of
4416 the OleFileIO module from PIL, the Python Image Library.")
4417 (license license:bsd-3)))
4418
4419 (define-public python2-olefile
4420 (package-with-python2 python-olefile))
4421
4422 (define-public python-pillow
4423 (package
4424 (name "python-pillow")
4425 (version "6.2.1")
4426 (source
4427 (origin
4428 (method url-fetch)
4429 (uri (pypi-uri "Pillow" version))
4430 (sha256
4431 (base32
4432 "1c8wkzc58f5wdh006jvmwdk3wxld1xgagcbdvj7iv17qi0m9fkmz"))))
4433 (build-system python-build-system)
4434 (native-inputs
4435 `(("python-pytest" ,python-pytest)))
4436 (inputs
4437 `(("freetype" ,freetype)
4438 ("lcms" ,lcms)
4439 ("libjpeg" ,libjpeg)
4440 ("libtiff" ,libtiff)
4441 ("libwebp" ,libwebp)
4442 ("openjpeg" ,openjpeg)
4443 ("zlib" ,zlib)))
4444 (propagated-inputs
4445 `(("python-olefile" ,python-olefile)))
4446 (arguments
4447 `(#:phases
4448 (modify-phases %standard-phases
4449 (add-after 'unpack 'patch-ldconfig
4450 (lambda _
4451 (substitute* "setup.py"
4452 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4453 (replace 'check
4454 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
4455 (if tests?
4456 (begin
4457 (setenv "HOME" (getcwd))
4458 ;; Make installed package available for running the tests.
4459 (add-installed-pythonpath inputs outputs)
4460 (invoke "python" "selftest.py" "--installed")
4461 (invoke "python" "-m" "pytest" "-vv"))
4462 #t))))))
4463 (home-page "https://python-pillow.org")
4464 (synopsis "Fork of the Python Imaging Library")
4465 (description
4466 "The Python Imaging Library adds image processing capabilities to your
4467 Python interpreter. This library provides extensive file format support, an
4468 efficient internal representation, and fairly powerful image processing
4469 capabilities. The core image library is designed for fast access to data
4470 stored in a few basic pixel formats. It should provide a solid foundation for
4471 a general image processing tool.")
4472 (license (license:x11-style
4473 "http://www.pythonware.com/products/pil/license.htm"
4474 "The PIL Software License"))))
4475
4476 (define-public python2-pillow
4477 (package-with-python2 python-pillow))
4478
4479 (define-public python-pycparser
4480 (package
4481 (name "python-pycparser")
4482 (version "2.19")
4483 (source
4484 (origin
4485 (method url-fetch)
4486 (uri (pypi-uri "pycparser" version))
4487 (sha256
4488 (base32
4489 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
4490 (outputs '("out" "doc"))
4491 (build-system python-build-system)
4492 (native-inputs
4493 `(("pkg-config" ,pkg-config)))
4494 (arguments
4495 `(#:phases
4496 (modify-phases %standard-phases
4497 (replace 'check
4498 (lambda _
4499 (with-directory-excursion "tests"
4500 (invoke "python" "all_tests.py"))
4501 #t))
4502 (add-after 'install 'install-doc
4503 (lambda* (#:key outputs #:allow-other-keys)
4504 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4505 (doc (string-append data "/doc/" ,name "-" ,version))
4506 (examples (string-append doc "/examples")))
4507 (mkdir-p examples)
4508 (for-each (lambda (file)
4509 (copy-file (string-append "." file)
4510 (string-append doc file)))
4511 '("/README.rst" "/CHANGES" "/LICENSE"))
4512 (copy-recursively "examples" examples)
4513 #t))))))
4514 (home-page "https://github.com/eliben/pycparser")
4515 (synopsis "C parser in Python")
4516 (description
4517 "Pycparser is a complete parser of the C language, written in pure Python
4518 using the PLY parsing library. It parses C code into an AST and can serve as
4519 a front-end for C compilers or analysis tools.")
4520 (license license:bsd-3)))
4521
4522 (define-public python2-pycparser
4523 (package-with-python2 python-pycparser))
4524
4525 (define-public python-pywavelets
4526 (package
4527 (name "python-pywavelets")
4528 (version "1.0.1")
4529 (home-page "https://github.com/PyWavelets/pywt")
4530 (source (origin
4531 (method url-fetch)
4532 (uri (pypi-uri "PyWavelets" version))
4533 (sha256
4534 (base32
4535 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4536 (build-system python-build-system)
4537 (arguments
4538 '(#:modules ((ice-9 ftw)
4539 (srfi srfi-1)
4540 (srfi srfi-26)
4541 (guix build utils)
4542 (guix build python-build-system))
4543 #:phases (modify-phases %standard-phases
4544 (replace 'check
4545 (lambda _
4546 (let ((cwd (getcwd))
4547 (libdir (find (cut string-prefix? "lib." <>)
4548 (scandir "build"))))
4549 (with-directory-excursion (string-append cwd "/build/" libdir)
4550 (invoke "nosetests" "-v" "."))))))))
4551 (native-inputs
4552 `(("python-matplotlib" ,python-matplotlib) ;for tests
4553 ("python-nose" ,python-nose)))
4554 (propagated-inputs
4555 `(("python-numpy" ,python-numpy)))
4556 (synopsis "Wavelet transforms in Python")
4557 (description
4558 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4559 mathematical basis functions that are localized in both time and frequency.
4560 Wavelet transforms are time-frequency transforms employing wavelets. They are
4561 similar to Fourier transforms, the difference being that Fourier transforms are
4562 localized only in frequency instead of in time and frequency.")
4563 (license license:expat)))
4564
4565 (define-public python2-pywavelets
4566 (package-with-python2 python-pywavelets))
4567
4568 (define-public python-xcffib
4569 (package
4570 (name "python-xcffib")
4571 (version "0.6.0")
4572 (source
4573 (origin
4574 (method url-fetch)
4575 (uri (pypi-uri "xcffib" version))
4576 (sha256
4577 (base32
4578 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4579 (build-system python-build-system)
4580 (inputs
4581 `(("libxcb" ,libxcb)))
4582 (propagated-inputs
4583 `(("python-cffi" ,python-cffi) ; used at run time
4584 ("python-six" ,python-six)))
4585 (arguments
4586 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4587 #:tests? #f
4588 #:phases
4589 (modify-phases %standard-phases
4590 (add-after 'unpack 'fix-libxcb-path
4591 (lambda* (#:key inputs #:allow-other-keys)
4592 (let ((libxcb (assoc-ref inputs "libxcb")))
4593 (substitute* '("xcffib/__init__.py")
4594 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4595 #t)))
4596 (add-after 'install 'install-doc
4597 (lambda* (#:key outputs #:allow-other-keys)
4598 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4599 "/doc/" ,name "-" ,version)))
4600 (mkdir-p doc)
4601 (copy-file "README.md"
4602 (string-append doc "/README.md"))
4603 #t))))))
4604 (home-page "https://github.com/tych0/xcffib")
4605 (synopsis "XCB Python bindings")
4606 (description
4607 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4608 support for Python 3 and PyPy. It is based on cffi.")
4609 (license license:expat)))
4610
4611 (define-public python2-xcffib
4612 (package-with-python2 python-xcffib))
4613
4614 (define-public python-cairocffi
4615 (package
4616 (name "python-cairocffi")
4617 (version "0.9.0")
4618 (source
4619 (origin
4620 (method url-fetch)
4621 (uri (pypi-uri "cairocffi" version))
4622 (sha256
4623 (base32
4624 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4625 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4626 (build-system python-build-system)
4627 (outputs '("out" "doc"))
4628 (inputs
4629 `(("glib" ,glib)
4630 ("gtk+" ,gtk+)
4631 ("gdk-pixbuf" ,gdk-pixbuf)
4632 ("cairo" ,cairo)
4633 ("pango" ,pango)))
4634 (native-inputs
4635 `(("pkg-config" ,pkg-config)
4636 ("python-pytest" ,python-pytest)
4637 ("python-pytest-cov" ,python-pytest-cov)
4638 ("python-pytest-runner" ,python-pytest-runner)
4639 ("python-sphinx" ,python-sphinx)
4640 ("python-docutils" ,python-docutils)))
4641 (propagated-inputs
4642 `(("python-xcffib" ,python-xcffib))) ; used at run time
4643 (arguments
4644 `(#:phases
4645 (modify-phases %standard-phases
4646 (add-after 'unpack 'patch-paths
4647 (lambda* (#:key inputs outputs #:allow-other-keys)
4648 (substitute* (find-files "." "\\.py$")
4649 (("dlopen\\(ffi, 'cairo'")
4650 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4651 "/lib/libcairo.so.2'"))
4652 (("dlopen\\(ffi, 'gdk-3'")
4653 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4654 "/lib/libgtk-3.so.0'"))
4655 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4656 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4657 "/lib/libgdk_pixbuf-2.0.so.0'"))
4658 (("dlopen\\(ffi, 'glib-2.0'")
4659 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4660 "/lib/libglib-2.0.so.0'"))
4661 (("dlopen\\(ffi, 'gobject-2.0'")
4662 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4663 "/lib/libgobject-2.0.so.0'"))
4664 (("dlopen\\(ffi, 'pangocairo-1.0'")
4665 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4666 "/lib/libpangocairo-1.0.so.0'"))
4667 (("dlopen\\(ffi, 'pango-1.0'")
4668 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4669 "/lib/libpango-1.0.so.0'")))
4670 #t))
4671 (add-after 'install 'install-doc
4672 (lambda* (#:key inputs outputs #:allow-other-keys)
4673 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4674 (doc (string-append data "/doc/" ,name "-" ,version))
4675 (html (string-append doc "/html")))
4676 (setenv "LD_LIBRARY_PATH"
4677 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4678 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4679 (setenv "LANG" "en_US.UTF-8")
4680 (mkdir-p html)
4681 (for-each (lambda (file)
4682 (copy-file (string-append "." file)
4683 (string-append doc file)))
4684 '("/README.rst" "/CHANGES" "/LICENSE"))
4685 (system* "python" "setup.py" "build_sphinx")
4686 (copy-recursively "docs/_build/html" html)
4687 #t))))))
4688 (home-page "https://github.com/Kozea/cairocffi")
4689 (synopsis "Python bindings and object-oriented API for Cairo")
4690 (description
4691 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4692 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4693 graphics library with support for multiple backends including image buffers,
4694 PNG, PostScript, PDF, and SVG file output.")
4695 (license license:bsd-3)))
4696
4697 (define-public python2-cairocffi
4698 (package-with-python2 python-cairocffi))
4699
4700 (define-public python-decorator
4701 (package
4702 (name "python-decorator")
4703 (version "4.3.0")
4704 (source
4705 (origin
4706 (method url-fetch)
4707 (uri (pypi-uri "decorator" version))
4708 (sha256
4709 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4710 (build-system python-build-system)
4711 (home-page "https://pypi.python.org/pypi/decorator/")
4712 (synopsis "Python module to simplify usage of decorators")
4713 (description
4714 "The aim of the decorator module is to simplify the usage of decorators
4715 for the average programmer, and to popularize decorators usage giving examples
4716 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4717 etc. The core of this module is a decorator factory.")
4718 (license license:expat)))
4719
4720 (define-public python2-decorator
4721 (package-with-python2 python-decorator))
4722
4723 (define-public python-drmaa
4724 (package
4725 (name "python-drmaa")
4726 (version "0.7.7")
4727 (source
4728 (origin
4729 (method url-fetch)
4730 (uri (pypi-uri "drmaa" version))
4731 (sha256
4732 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4733 (build-system python-build-system)
4734 ;; The test suite requires libdrmaa which is provided by the cluster
4735 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4736 ;; should be set to the path of the libdrmaa library.
4737 (arguments '(#:tests? #f))
4738 (native-inputs
4739 `(("python-nose" ,python-nose)))
4740 (home-page "https://pypi.python.org/pypi/drmaa")
4741 (synopsis "Python bindings for the DRMAA library")
4742 (description
4743 "A Python package for Distributed Resource Management (DRM) job
4744 submission and control. This package is an implementation of the DRMAA 1.0
4745 Python language binding specification.")
4746 (license license:bsd-3)))
4747
4748 (define-public python2-drmaa
4749 (package-with-python2 python-drmaa))
4750
4751 (define-public python-grako
4752 (package
4753 (name "python-grako")
4754 (version "3.99.9")
4755 (source
4756 (origin
4757 (method url-fetch)
4758 (uri
4759 (pypi-uri "grako" version ".zip"))
4760 (sha256
4761 (base32
4762 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4763 (build-system python-build-system)
4764 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4765 (native-inputs
4766 `(("unzip" ,unzip)
4767 ("python-pytest" ,python-pytest)
4768 ("python-pytest-runner" ,python-pytest-runner)))
4769 (home-page "https://bitbucket.org/neogeny/grako")
4770 (synopsis "EBNF parser generator")
4771 (description
4772 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4773 memoizing PEG/Packrat parser in Python.")
4774 (license license:bsd-3)))
4775
4776 (define-public python2-grako
4777 (package-with-python2 python-grako))
4778
4779 (define-public python-gridmap
4780 (package
4781 (name "python-gridmap")
4782 (version "0.13.0")
4783 (source
4784 (origin
4785 (method git-fetch)
4786 (uri (git-reference
4787 (url "https://github.com/pygridtools/gridmap.git")
4788 (commit (string-append "v" version))))
4789 (file-name (git-file-name name version))
4790 (sha256
4791 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
4792 (build-system python-build-system)
4793 (arguments
4794 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4795 (propagated-inputs
4796 `(("python-psutil" ,python-psutil)
4797 ("python-drmaa" ,python-drmaa)
4798 ("python-pyzmq" ,python-pyzmq)))
4799 (home-page "https://github.com/pygridtools/gridmap")
4800 (synopsis "Create jobs on a cluster directly from Python")
4801 (description
4802 "Gridmap is a Python package to allow you to easily create jobs on the
4803 cluster directly from Python. You can directly map Python functions onto the
4804 cluster without needing to write any wrapper code yourself.")
4805 (license license:gpl3+)))
4806
4807 (define-public python2-gridmap
4808 (package-with-python2 python-gridmap))
4809
4810 (define-public python-honcho
4811 (package
4812 (name "python-honcho")
4813 (version "1.0.1")
4814 (source
4815 (origin
4816 (method git-fetch)
4817 (uri (git-reference
4818 (url "https://github.com/nickstenning/honcho.git")
4819 (commit (string-append "v" version))))
4820 (file-name (git-file-name name version))
4821 (sha256
4822 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
4823 (build-system python-build-system)
4824 (native-inputs
4825 `(("python-pytest" ,python-pytest)
4826 ("python-mock" ,python-mock)
4827 ("python-tox" ,python-tox)
4828 ("which" ,which))) ;for tests
4829 (propagated-inputs
4830 `(("python-jinja2" ,python-jinja2)))
4831 (arguments
4832 `(#:phases
4833 (modify-phases %standard-phases
4834 (delete 'check)
4835 (add-after 'install 'check
4836 (lambda* (#:key outputs inputs #:allow-other-keys)
4837 ;; fix honcho path in testsuite
4838 (substitute* "tests/conftest.py"
4839 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4840 "/bin/honcho" "'")))
4841 ;; It's easier to run tests after install.
4842 ;; Make installed package available for running the tests
4843 (add-installed-pythonpath inputs outputs)
4844 (invoke "py.test" "-v"))))))
4845 (home-page "https://github.com/nickstenning/honcho")
4846 (synopsis "Manage Procfile-based applications")
4847 (description
4848 "A Procfile is a file which describes how to run an application
4849 consisting of several processes. honcho starts all listed processes.
4850 The output of all running processes is collected by honcho and
4851 displayed.")
4852 (license license:expat)))
4853
4854 (define-public python2-honcho
4855 (package-with-python2 python-honcho))
4856
4857 (define-public python-pexpect
4858 (package
4859 (name "python-pexpect")
4860 (version "4.6.0")
4861 (source
4862 (origin
4863 (method url-fetch)
4864 (uri (pypi-uri "pexpect" version))
4865 (sha256
4866 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4867 (build-system python-build-system)
4868 (arguments
4869 `(#:phases
4870 (modify-phases %standard-phases
4871 (add-before 'check 'prepare-tests
4872 (lambda _
4873 (substitute* (find-files "tests")
4874 (("/bin/ls") (which "ls"))
4875 (("/bin/echo") (which "echo"))
4876 (("/bin/which") (which "which"))
4877 ;; Many tests try to use the /bin directory which
4878 ;; is not present in the build environment.
4879 ;; Use one that's non-empty and unlikely to change.
4880 (("/bin'") "/dev'"))
4881 ;; XXX: Socket connection test gets "Connection reset by peer".
4882 ;; Why does it not work? Delete for now.
4883 (delete-file "tests/test_socket.py")
4884 #t))
4885 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4886 (native-inputs
4887 `(("python-nose" ,python-nose)
4888 ("python-pytest" ,python-pytest)
4889 ("man-db" ,man-db)
4890 ("which" ,which)
4891 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4892 (propagated-inputs
4893 `(("python-ptyprocess" ,python-ptyprocess)))
4894 (home-page "http://pexpect.readthedocs.org/")
4895 (synopsis "Controlling interactive console applications")
4896 (description
4897 "Pexpect is a pure Python module for spawning child applications;
4898 controlling them; and responding to expected patterns in their output.
4899 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4900 child application and control it as if a human were typing commands.")
4901 (license license:isc)))
4902
4903 (define-public python2-pexpect
4904 (package-with-python2 python-pexpect))
4905
4906 (define-public python-setuptools-scm
4907 (package
4908 (name "python-setuptools-scm")
4909 (version "3.2.0")
4910 (source (origin
4911 (method url-fetch)
4912 (uri (pypi-uri "setuptools_scm" version))
4913 (sha256
4914 (base32
4915 "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj"))))
4916 (build-system python-build-system)
4917 (home-page "https://github.com/pypa/setuptools_scm/")
4918 (synopsis "Manage Python package versions in SCM metadata")
4919 (description
4920 "Setuptools_scm handles managing your Python package versions in
4921 @dfn{software configuration management} (SCM) metadata instead of declaring
4922 them as the version argument or in a SCM managed file.")
4923 (license license:expat)))
4924
4925 ;; Needed by python-lazy-object-proxy, remove on next update cycle.
4926 (define-public python-setuptools-scm-3.3
4927 (package
4928 (inherit python-setuptools-scm)
4929 (version "3.3.3")
4930 (source (origin
4931 (method url-fetch)
4932 (uri (pypi-uri "setuptools_scm" version))
4933 (sha256
4934 (base32
4935 "19cyndx23xmpbhz4qrwmfwsmnnaczd0dw7qg977ksq2dbvxy29dx"))))))
4936
4937 (define-public python2-setuptools-scm
4938 (package-with-python2 python-setuptools-scm))
4939
4940 (define-public python-pathlib2
4941 (package
4942 (name "python-pathlib2")
4943 (version "2.3.3")
4944 (source
4945 (origin
4946 (method url-fetch)
4947 (uri (pypi-uri "pathlib2" version))
4948 (sha256
4949 (base32
4950 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
4951 (build-system python-build-system)
4952 (propagated-inputs
4953 `(("python-scandir" ,python-scandir)
4954 ("python-six" ,python-six)))
4955 (home-page "https://pypi.python.org/pypi/pathlib2/")
4956 (synopsis "Object-oriented file system paths")
4957 (description "The goal of pathlib2 is to provide a backport of the
4958 standard @code{pathlib} module which tracks the standard library module, so
4959 all the newest features of the standard @code{pathlib} can be used also on
4960 older Python versions.")
4961 (license license:expat)))
4962
4963 (define-public python-importlib-metadata
4964 (package
4965 (name "python-importlib-metadata")
4966 (version "0.23")
4967 (source
4968 (origin
4969 (method url-fetch)
4970 (uri (pypi-uri "importlib_metadata" version))
4971 (sha256
4972 (base32 "09mdqdfv5rdrwz80jh9m379gxmvk2vhjfz0fg53hid00icvxf65a"))))
4973 (build-system python-build-system)
4974 (propagated-inputs
4975 `(("python-configparser" ,python-configparser)
4976 ("python-contextlib2" ,python-contextlib2)
4977 ("python-docutils" ,python-docutils)
4978 ("python-pathlib2" ,python-pathlib2)
4979 ("python-rst.linker" ,python-rst.linker)
4980 ("python-zipp" ,python-zipp)))
4981 (native-inputs
4982 `(("python-setuptools-scm" ,python-setuptools-scm)
4983 ("python-sphinx" ,python-sphinx)))
4984 (home-page "https://importlib-metadata.readthedocs.io/")
4985 (synopsis "Read metadata from Python packages")
4986 (description
4987 "@code{importlib_metadata} is a library which provides an API for
4988 accessing an installed Python package's metadata, such as its entry points or
4989 its top-level name. This functionality intends to replace most uses of
4990 @code{pkg_resources} entry point API and metadata API. Along with
4991 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
4992 need to use the older and less efficient @code{pkg_resources} package.")
4993 (license license:asl2.0)))
4994
4995 (define-public python-jaraco-packaging
4996 (package
4997 (name "python-jaraco-packaging")
4998 (version "6.1")
4999 (source
5000 (origin
5001 (method url-fetch)
5002 (uri (pypi-uri "jaraco.packaging" version))
5003 (sha256
5004 (base32
5005 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
5006 (build-system python-build-system)
5007 (propagated-inputs
5008 `(("python-pytest" ,python-pytest)
5009 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
5010 ("python-pytest-flake8" ,python-pytest-flake8)
5011 ("python-rst.linker" ,python-rst.linker)
5012 ("python-setuptools" ,python-setuptools)
5013 ("python-setuptools-scm" ,python-setuptools-scm)
5014 ("python-six" ,python-six)
5015 ("python-sphinx" ,python-sphinx)))
5016 (home-page "https://github.com/jaraco/jaraco.packaging")
5017 (synopsis "Tools to supplement packaging Python releases")
5018 (description
5019 "This package provides various tools to supplement packaging Python
5020 releases.")
5021 (license license:expat)))
5022
5023 (define-public python-pathpy
5024 (package
5025 (name "python-pathpy")
5026 (version "11.5.1")
5027 (source
5028 (origin
5029 (method url-fetch)
5030 (uri (pypi-uri "path.py" version))
5031 (sha256
5032 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
5033 (outputs '("out" "doc"))
5034 (build-system python-build-system)
5035 (propagated-inputs
5036 `(("python-appdirs" ,python-appdirs)
5037 ("python-importlib-metadata" ,python-importlib-metadata)))
5038 (native-inputs
5039 `(("python-setuptools-scm" ,python-setuptools-scm)
5040 ("python-sphinx" ,python-sphinx)
5041 ("python-rst.linker" ,python-rst.linker)
5042 ("python-pytest" ,python-pytest)
5043 ("python-pytest-runner" ,python-pytest-runner)
5044 ("python-jaraco-packaging" ,python-jaraco-packaging)))
5045 (arguments
5046 `(#:phases
5047 (modify-phases %standard-phases
5048 (add-after 'build 'build-doc
5049 (lambda _
5050 (setenv "LANG" "en_US.UTF-8")
5051 (invoke "python" "setup.py" "build_sphinx")))
5052 (add-after 'install 'install-doc
5053 (lambda* (#:key outputs #:allow-other-keys)
5054 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5055 (doc (string-append data "/doc/" ,name "-" ,version))
5056 (html (string-append doc "/html")))
5057 (mkdir-p html)
5058 (for-each (lambda (file)
5059 (copy-file file (string-append doc "/" file)))
5060 '("README.rst" "CHANGES.rst"))
5061 (copy-recursively "build/sphinx/html" html)
5062 #t)))
5063 (replace 'check
5064 (lambda _
5065 ;; The import time test aborts if an import takes longer than
5066 ;; 100ms. It may very well take a little longer than that.
5067 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
5068 (home-page "https://github.com/jaraco/path.py")
5069 (synopsis "Python module wrapper for built-in os.path")
5070 (description
5071 "@code{path.py} implements path objects as first-class entities, allowing
5072 common operations on files to be invoked on those path objects directly.")
5073 (license license:expat)))
5074
5075 (define-public python2-pathpy
5076 (package-with-python2 python-pathpy))
5077
5078 (define-public python-simplegeneric
5079 (package
5080 (name "python-simplegeneric")
5081 (version "0.8.1")
5082 (source
5083 (origin
5084 (method url-fetch)
5085 (uri (pypi-uri "simplegeneric" version ".zip"))
5086 (sha256
5087 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5088 (build-system python-build-system)
5089 (native-inputs
5090 `(("unzip" ,unzip)))
5091 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5092 (synopsis "Python module for simple generic functions")
5093 (description
5094 "The simplegeneric module lets you define simple single-dispatch generic
5095 functions, akin to Python’s built-in generic functions like @code{len()},
5096 @code{iter()} and so on. However, instead of using specially-named methods,
5097 these generic functions use simple lookup tables, akin to those used by
5098 e.g. @code{pickle.dump()} and other generic functions found in the Python
5099 standard library.")
5100 (license license:zpl2.1)))
5101
5102 (define-public python2-simplegeneric
5103 (package-with-python2 python-simplegeneric))
5104
5105 (define-public python-ipython-genutils
5106 ;; TODO: This package is retired, check if can be removed, see description.
5107 (package
5108 (name "python-ipython-genutils")
5109 (version "0.1.0")
5110 (source
5111 (origin
5112 (method url-fetch)
5113 (uri (pypi-uri "ipython_genutils" version))
5114 (sha256
5115 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5116 (build-system python-build-system)
5117 (arguments `(#:tests? #f)) ; no tests
5118 (home-page "https://ipython.org")
5119 (synopsis "Vestigial utilities from IPython")
5120 (description
5121 "This package provides retired utilities from IPython. No packages
5122 outside IPython/Jupyter should depend on it.
5123
5124 This package shouldn't exist. It contains some common utilities shared by
5125 Jupyter and IPython projects during The Big Split. As soon as possible, those
5126 packages will remove their dependency on this, and this package will go
5127 away.")
5128 (license license:bsd-3)))
5129
5130 (define-public python2-ipython-genutils
5131 (package-with-python2 python-ipython-genutils))
5132
5133 (define-public python-traitlets
5134 (package
5135 (name "python-traitlets")
5136 (version "4.3.3")
5137 (source
5138 (origin
5139 (method url-fetch)
5140 (uri (pypi-uri "traitlets" version))
5141 (sha256
5142 (base32
5143 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
5144 (build-system python-build-system)
5145 (arguments
5146 `(#:phases
5147 (modify-phases %standard-phases
5148 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5149 (propagated-inputs
5150 `(("python-ipython-genutils" ,python-ipython-genutils)
5151 ("python-decorator" ,python-decorator)))
5152 (native-inputs
5153 `(("python-pytest" ,python-pytest)))
5154 (properties `((python2-variant . ,(delay python2-traitlets))))
5155 (home-page "https://ipython.org")
5156 (synopsis "Configuration system for Python applications")
5157 (description
5158 "Traitlets is a framework that lets Python classes have attributes with
5159 type checking, dynamically calculated default values, and ‘on change’
5160 callbacks. The package also includes a mechanism to use traitlets for
5161 configuration, loading values from files or from command line arguments. This
5162 is a distinct layer on top of traitlets, so you can use traitlets in your code
5163 without using the configuration machinery.")
5164 (license license:bsd-3)))
5165
5166 (define-public python2-traitlets
5167 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5168 (package
5169 (inherit traitlets)
5170 (propagated-inputs
5171 `(("python2-enum34" ,python2-enum34)
5172 ,@(package-propagated-inputs traitlets))))))
5173
5174 (define-public python-jupyter-core
5175 (package
5176 (name "python-jupyter-core")
5177 (version "4.4.0")
5178 (source
5179 (origin
5180 (method url-fetch)
5181 (uri (string-append (pypi-uri "jupyter_core" version)))
5182 (sha256
5183 (base32
5184 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5185 (build-system python-build-system)
5186 ;; FIXME: not sure how to run the tests
5187 (arguments `(#:tests? #f))
5188 (propagated-inputs
5189 `(("python-traitlets" ,python-traitlets)))
5190 (home-page "http://jupyter.org/")
5191 (synopsis "Jupyter base package")
5192 (description
5193 "Jupyter core is the base package on which Jupyter projects rely.")
5194 (license license:bsd-3)))
5195
5196 (define-public python2-jupyter-core
5197 (package-with-python2 python-jupyter-core))
5198
5199 (define-public python-jupyter-client
5200 (package
5201 (name "python-jupyter-client")
5202 (version "5.2.4")
5203 (source
5204 (origin
5205 (method url-fetch)
5206 (uri (pypi-uri "jupyter_client" version))
5207 (sha256
5208 (base32
5209 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5210 (build-system python-build-system)
5211 ;; Tests fail because of missing native python kernel which I assume is
5212 ;; provided by the ipython package, which we cannot use because it would
5213 ;; cause a dependency cycle.
5214 (arguments
5215 `(#:tests? #f
5216
5217 #:phases (modify-phases %standard-phases
5218 (add-after 'unpack 'set-tool-file-names
5219 (lambda* (#:key inputs #:allow-other-keys)
5220 (let ((iproute (assoc-ref inputs "iproute")))
5221 (substitute* "jupyter_client/localinterfaces.py"
5222 (("'ip'")
5223 (string-append "'" iproute "/sbin/ip'")))
5224 #t))))))
5225 (inputs
5226 `(("iproute" ,iproute)))
5227 (propagated-inputs
5228 `(("python-pyzmq" ,python-pyzmq)
5229 ("python-traitlets" ,python-traitlets)
5230 ("python-jupyter-core" ,python-jupyter-core)))
5231 (home-page "http://jupyter.org/")
5232 (synopsis "Jupyter protocol implementation and client libraries")
5233 (description
5234 "The @code{jupyter_client} package contains the reference implementation
5235 of the Jupyter protocol. It also provides client and kernel management APIs
5236 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5237 installing @code{kernelspec}s for use with Jupyter frontends.")
5238 (license license:bsd-3)))
5239
5240 (define-public python2-jupyter-client
5241 (package-with-python2 python-jupyter-client))
5242
5243 (define-public python-ipykernel
5244 (package
5245 (name "python-ipykernel")
5246 (version "5.1.3")
5247 (source
5248 (origin
5249 (method url-fetch)
5250 (uri (pypi-uri "ipykernel" version))
5251 (sha256
5252 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
5253 (build-system python-build-system)
5254 (arguments
5255 `(#:phases
5256 (modify-phases %standard-phases
5257 (replace 'check
5258 (lambda _
5259 (setenv "HOME" "/tmp")
5260 (invoke "pytest" "-v")
5261 #t))
5262 (add-after 'install 'set-python-file-name
5263 (lambda* (#:key outputs #:allow-other-keys)
5264 ;; Record the absolute file name of the 'python' executable in
5265 ;; 'kernel.json'.
5266 (let ((out (assoc-ref outputs "out")))
5267 (substitute* (string-append out "/share/jupyter"
5268 "/kernels/python3/kernel.json")
5269 (("\"python\"")
5270 (string-append "\"" (which "python") "\"")))
5271 #t))))))
5272 (propagated-inputs
5273 `(("python-ipython" ,python-ipython)
5274 ;; imported at runtime during connect
5275 ("python-jupyter-client" ,python-jupyter-client)))
5276 (native-inputs
5277 `(("python-flaky" ,python-flaky)
5278 ("python-nose" ,python-nose)
5279 ("python-pytest" ,python-pytest)))
5280 (home-page "https://ipython.org")
5281 (synopsis "IPython Kernel for Jupyter")
5282 (description
5283 "This package provides the IPython kernel for Jupyter.")
5284 (license license:bsd-3)))
5285
5286 ;; Version 5.1.1 and above no longer support Python 2.
5287 (define-public python2-ipykernel
5288 (package
5289 (name "python2-ipykernel")
5290 (version "5.1.0")
5291 (source
5292 (origin
5293 (method url-fetch)
5294 (uri (pypi-uri "ipykernel" version))
5295 (sha256
5296 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5297 (build-system python-build-system)
5298 (arguments
5299 `(#:python ,python-2
5300 #:phases
5301 (modify-phases %standard-phases
5302 (replace 'check
5303 (lambda _
5304 (setenv "HOME" "/tmp")
5305 (invoke "pytest" "-v")
5306 #t)))))
5307 (propagated-inputs
5308 `(("python2-ipython" ,python2-ipython)
5309 ;; imported at runtime during connect
5310 ("python2-jupyter-client" ,python2-jupyter-client)))
5311 (native-inputs
5312 `(("python2-pytest" ,python2-pytest)
5313 ("python2-nose" ,python2-nose)))
5314 (home-page "https://ipython.org")
5315 (synopsis "IPython Kernel for Jupyter")
5316 (description
5317 "This package provides the IPython kernel for Jupyter.")
5318 (license license:bsd-3)))
5319
5320 (define-public python-pari-jupyter
5321 (package
5322 (name "python-pari-jupyter")
5323 (version "1.3.2")
5324 (source
5325 (origin
5326 (method url-fetch)
5327 (uri (pypi-uri "pari_jupyter" version))
5328 (sha256
5329 (base32
5330 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5331 (build-system python-build-system)
5332 (propagated-inputs
5333 `(("python-ipykernel" ,python-ipykernel)))
5334 (inputs
5335 `(("pari-gp" ,pari-gp)
5336 ("readline" ,readline)))
5337 (arguments
5338 `(#:tests? #f)) ; no test suite
5339 (home-page
5340 "https://github.com/jdemeyer/pari_jupyter")
5341 (synopsis "A Jupyter kernel for PARI/GP")
5342 (description "The package provides a PARI/GP kernel for Jupyter.")
5343 (license license:gpl3+)))
5344
5345 (define-public python-backcall
5346 (package
5347 (name "python-backcall")
5348 (version "0.1.0")
5349 (source
5350 (origin
5351 (method url-fetch)
5352 (uri (pypi-uri "backcall" version))
5353 (sha256
5354 (base32
5355 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5356 (build-system python-build-system)
5357 (home-page "https://github.com/takluyver/backcall/")
5358 (synopsis "Specifications for callback functions passed in to an API")
5359 (description
5360 "If your code lets other people supply callback functions, it's important
5361 to specify the function signature you expect, and check that functions support
5362 that. Adding extra parameters later would break other peoples code unless
5363 you're careful. The @code{backcall} package provides a way of specifying the
5364 callback signature using a prototype function.")
5365 (license license:bsd-3)))
5366
5367 ;; This is the latest release of the LTS version of ipython with support for
5368 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
5369 ;; dropped support for Python 2.7.
5370 (define-public python2-ipython
5371 (package
5372 (name "python2-ipython")
5373 (version "5.8.0")
5374 (source
5375 (origin
5376 (method url-fetch)
5377 (uri (pypi-uri "ipython" version ".tar.gz"))
5378 (sha256
5379 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5380 (build-system python-build-system)
5381 (propagated-inputs
5382 `(("python2-backports-shutil-get-terminal-size"
5383 ,python2-backports-shutil-get-terminal-size)
5384 ("python2-pathlib2" ,python2-pathlib2)
5385 ("python2-pyzmq" ,python2-pyzmq)
5386 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5387 ("python2-terminado" ,python2-terminado)
5388 ("python2-matplotlib" ,python2-matplotlib)
5389 ("python2-numpy" ,python2-numpy)
5390 ("python2-numpydoc" ,python2-numpydoc)
5391 ("python2-jinja2" ,python2-jinja2)
5392 ("python2-mistune" ,python2-mistune)
5393 ("python2-pexpect" ,python2-pexpect)
5394 ("python2-pickleshare" ,python2-pickleshare)
5395 ("python2-simplegeneric" ,python2-simplegeneric)
5396 ("python2-jsonschema" ,python2-jsonschema)
5397 ("python2-traitlets" ,python2-traitlets)
5398 ("python2-nbformat" ,python2-nbformat)
5399 ("python2-pygments" ,python2-pygments)))
5400 (inputs
5401 `(("readline" ,readline)
5402 ("which" ,which)))
5403 (native-inputs
5404 `(("graphviz" ,graphviz)
5405 ("pkg-config" ,pkg-config)
5406 ("python2-requests" ,python2-requests) ;; for tests
5407 ("python2-testpath" ,python2-testpath)
5408 ("python2-mock" ,python2-mock)
5409 ("python2-nose" ,python2-nose)))
5410 (arguments
5411 `(#:python ,python-2
5412 #:phases
5413 (modify-phases %standard-phases
5414 (add-before 'check 'delete-broken-tests
5415 (lambda* (#:key inputs #:allow-other-keys)
5416 ;; These tests throw errors for unknown reasons.
5417 (delete-file "IPython/core/tests/test_profile.py")
5418 (delete-file "IPython/core/tests/test_interactiveshell.py")
5419 (delete-file "IPython/core/tests/test_magic.py")
5420 #t)))))
5421 (home-page "https://ipython.org")
5422 (synopsis "IPython is a tool for interactive computing in Python")
5423 (description
5424 "IPython provides a rich architecture for interactive computing with:
5425 Powerful interactive shells, a browser-based notebook, support for interactive
5426 data visualization, embeddable interpreters and tools for parallel
5427 computing.")
5428 (license license:bsd-3)))
5429
5430 (define-public python-ipython
5431 (package
5432 (name "python-ipython")
5433 (version "7.9.0")
5434 (source
5435 (origin
5436 (method url-fetch)
5437 (uri (pypi-uri "ipython" version ".tar.gz"))
5438 (sha256
5439 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
5440 (build-system python-build-system)
5441 (propagated-inputs
5442 `(("python-backcall" ,python-backcall)
5443 ("python-pyzmq" ,python-pyzmq)
5444 ("python-prompt-toolkit" ,python-prompt-toolkit)
5445 ("python-terminado" ,python-terminado)
5446 ("python-matplotlib" ,python-matplotlib)
5447 ("python-numpy" ,python-numpy)
5448 ("python-numpydoc" ,python-numpydoc)
5449 ("python-jedi" ,python-jedi)
5450 ("python-jinja2" ,python-jinja2)
5451 ("python-mistune" ,python-mistune)
5452 ("python-pexpect" ,python-pexpect)
5453 ("python-pickleshare" ,python-pickleshare)
5454 ("python-simplegeneric" ,python-simplegeneric)
5455 ("python-jsonschema" ,python-jsonschema)
5456 ("python-traitlets" ,python-traitlets)
5457 ("python-nbformat" ,python-nbformat)
5458 ("python-pygments" ,python-pygments)))
5459 (inputs
5460 `(("readline" ,readline)
5461 ("which" ,which)))
5462 (native-inputs
5463 `(("graphviz" ,graphviz)
5464 ("pkg-config" ,pkg-config)
5465 ("python-requests" ,python-requests) ;; for tests
5466 ("python-testpath" ,python-testpath)
5467 ("python-nose" ,python-nose)))
5468 (arguments
5469 `(#:phases
5470 (modify-phases %standard-phases
5471 (add-after 'unpack 'make-docs-reproducible
5472 (lambda _
5473 (substitute* "IPython/sphinxext/ipython_directive.py"
5474 ((".*import datetime") "")
5475 ((".*datetime.datetime.now\\(\\)") "")
5476 (("%timeit") "# %timeit"))
5477 #t))
5478 ;; Tests can only be run after the library has been installed and not
5479 ;; within the source directory.
5480 (delete 'check)
5481 (add-after 'install 'check
5482 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5483 (if tests?
5484 (begin
5485 ;; Make installed package available for running the tests
5486 (add-installed-pythonpath inputs outputs)
5487 (setenv "HOME" "/tmp/") ;; required by a test
5488 ;; We only test the core because one of the other tests
5489 ;; tries to import ipykernel.
5490 (invoke "python" "IPython/testing/iptest.py"
5491 "-v" "IPython/core/tests"))
5492 #t)))
5493 (add-before 'check 'fix-tests
5494 (lambda* (#:key inputs #:allow-other-keys)
5495 (substitute* "./IPython/utils/_process_posix.py"
5496 (("/usr/bin/env', 'which") (which "which")))
5497 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5498 (("#!/usr/bin/env python")
5499 (string-append "#!" (which "python"))))
5500 ;; This test introduces a circular dependency on ipykernel
5501 ;; (which depends on ipython).
5502 (delete-file "IPython/core/tests/test_display.py")
5503 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
5504 (delete-file "IPython/core/tests/test_interactiveshell.py")
5505 #t)))))
5506 (home-page "https://ipython.org")
5507 (synopsis "IPython is a tool for interactive computing in Python")
5508 (description
5509 "IPython provides a rich architecture for interactive computing with:
5510 Powerful interactive shells, a browser-based notebook, support for interactive
5511 data visualization, embeddable interpreters and tools for parallel
5512 computing.")
5513 (license license:bsd-3)))
5514
5515 (define-public python-ipython-documentation
5516 (package
5517 (inherit python-ipython)
5518 (name "python-ipython-documentation")
5519 (version (package-version python-ipython))
5520 (arguments
5521 `(#:phases
5522 (modify-phases %standard-phases
5523 (delete 'build)
5524 (delete 'check)
5525 (replace 'install
5526 (lambda* (#:key outputs #:allow-other-keys)
5527 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5528 (doc (string-append data "/doc/" ,name "-" ,version))
5529 (html (string-append doc "/html"))
5530 (man1 (string-append data "/man/man1"))
5531 (info (string-append data "/info"))
5532 (examples (string-append doc "/examples"))
5533 (python-arg (string-append "PYTHON=" (which "python"))))
5534 (setenv "LANG" "en_US.utf8")
5535 (with-directory-excursion "docs"
5536 ;; FIXME: pdf fails to build
5537 ;;(system* "make" "pdf" "PAPER=a4")
5538 (system* "make" python-arg "html")
5539 ;; FIXME: the generated texi file contains ^@^@, which trips
5540 ;; up the parser.
5541 ;; (system* "make" python-arg "info")
5542 )
5543 (copy-recursively "docs/man" man1)
5544 (copy-recursively "examples" examples)
5545 (copy-recursively "docs/build/html" html)
5546 ;; (copy-file "docs/build/latex/ipython.pdf"
5547 ;; (string-append doc "/ipython.pdf"))
5548 (mkdir-p info)
5549 ;; (copy-file "docs/build/texinfo/ipython.info"
5550 ;; (string-append info "/ipython.info"))
5551 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5552 #t)))))
5553 (inputs
5554 `(("python-ipython" ,python-ipython)
5555 ("python-ipykernel" ,python-ipykernel)))
5556 (native-inputs
5557 `(("python-sphinx" ,python-sphinx)
5558 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
5559 ;; FIXME: It's possible that a smaller union would work just as well.
5560 ("texlive" ,(texlive-union (list texlive-amsfonts
5561 texlive-fonts-ec
5562 texlive-generic-ifxetex
5563 texlive-generic-pdftex
5564 texlive-latex-capt-of
5565 texlive-latex-cmap
5566 texlive-latex-environ
5567 texlive-latex-eqparbox
5568 texlive-latex-etoolbox
5569 texlive-latex-expdlist
5570 texlive-latex-fancyhdr
5571 texlive-latex-fancyvrb
5572 texlive-latex-fncychap
5573 texlive-latex-float
5574 texlive-latex-framed
5575 texlive-latex-geometry
5576 texlive-latex-graphics
5577 texlive-latex-hyperref
5578 texlive-latex-mdwtools
5579 texlive-latex-multirow
5580 texlive-latex-needspace
5581 texlive-latex-oberdiek
5582 texlive-latex-parskip
5583 texlive-latex-preview
5584 texlive-latex-tabulary
5585 texlive-latex-threeparttable
5586 texlive-latex-titlesec
5587 texlive-latex-trimspaces
5588 texlive-latex-ucs
5589 texlive-latex-upquote
5590 texlive-latex-url
5591 texlive-latex-varwidth
5592 texlive-latex-wrapfig)))
5593 ("texinfo" ,texinfo)))))
5594
5595 (define-public python-urwid
5596 (package
5597 (name "python-urwid")
5598 (version "2.0.1")
5599 (source
5600 (origin
5601 (method url-fetch)
5602 (uri (pypi-uri "urwid" version))
5603 (sha256
5604 (base32
5605 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5606 (build-system python-build-system)
5607 (home-page "http://urwid.org")
5608 (synopsis "Console user interface library for Python")
5609 (description
5610 "Urwid is a curses-based UI/widget library for Python. It includes many
5611 features useful for text console applications.")
5612 (license license:lgpl2.1+)))
5613
5614 (define-public python2-urwid
5615 (package-with-python2 python-urwid))
5616
5617 (define-public python-urwidtrees
5618 (package
5619 (name "python-urwidtrees")
5620 (version "1.0.2")
5621 (source
5622 (origin
5623 (method url-fetch)
5624 ;; package author intends on distributing via github rather than pypi:
5625 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5626 (uri (string-append "https://github.com/pazz/urwidtrees/archive/"
5627 version ".tar.gz"))
5628 (file-name (string-append name "-" version ".tar.gz"))
5629 (sha256
5630 (base32
5631 "0d30lyd3s2a97rhqfax5w9ssqds2z6aydqx3c6j2c2lk3cb4ngvh"))))
5632 (build-system python-build-system)
5633 (arguments
5634 '(#:tests? #f)) ; no tests
5635 (propagated-inputs `(("python-urwid" ,python-urwid)))
5636 (home-page "https://github.com/pazz/urwidtrees")
5637 (synopsis "Tree widgets for urwid")
5638 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5639 toolkit. Use it to build trees of widgets.")
5640 (license license:gpl3+)))
5641
5642 (define-public python2-urwidtrees
5643 (package-with-python2 python-urwidtrees))
5644
5645 (define-public python-ua-parser
5646 (package
5647 (name "python-ua-parser")
5648 (version "0.8.0")
5649 (source
5650 (origin
5651 (method url-fetch)
5652 (uri (pypi-uri "ua-parser" version))
5653 (sha256
5654 (base32
5655 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5656 (build-system python-build-system)
5657 (arguments
5658 `(#:tests? #f)) ;no test suite in release
5659 (native-inputs
5660 `(("python-pyyaml" ,python-pyyaml)))
5661 (home-page "https://github.com/ua-parser/uap-python")
5662 (synopsis "User agent parser")
5663 (description
5664 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5665 (license license:asl2.0)))
5666
5667 (define-public python2-ua-parser
5668 (package-with-python2 python-ua-parser))
5669
5670 (define-public python-user-agents
5671 (package
5672 (name "python-user-agents")
5673 (version "1.1.0")
5674 (source
5675 (origin
5676 (method url-fetch)
5677 (uri (pypi-uri "user-agents" version))
5678 (sha256
5679 (base32
5680 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5681 (build-system python-build-system)
5682 (arguments
5683 `(#:tests? #f)) ;missing devices.json test file in release
5684 (propagated-inputs
5685 `(("python-ua-parser" ,python-ua-parser)))
5686 (home-page "https://github.com/selwin/python-user-agents")
5687 (synopsis "User Agent strings parsing library")
5688 (description
5689 "A library to identify devices (phones, tablets) and their capabilities by
5690 parsing (browser/HTTP) user agent strings.")
5691 (license license:expat)))
5692
5693 (define-public python2-user-agents
5694 (package-with-python2 python-user-agents))
5695
5696 (define-public python-dbus
5697 (package
5698 (name "python-dbus")
5699 (version "1.2.14")
5700 (source
5701 (origin
5702 (method url-fetch)
5703 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5704 "dbus-python-" version ".tar.gz"))
5705 (sha256
5706 (base32 "0cdchkgnivlka4lf8q4qfk0yxq483i3r3aqickjf8hfn7nx0c0mi"))))
5707 (build-system gnu-build-system)
5708 (native-inputs
5709 `(("pkg-config" ,pkg-config)))
5710 (inputs
5711 `(("python" ,python-wrapper)
5712 ("dbus-glib" ,dbus-glib)))
5713 (synopsis "Python bindings for D-bus")
5714 (description "python-dbus provides bindings for libdbus, the reference
5715 implementation of D-Bus.")
5716 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5717 (license license:expat)))
5718
5719 (define-public python2-dbus
5720 (package (inherit python-dbus)
5721 (name "python2-dbus")
5722 (inputs `(("python" ,python-2)
5723 ,@(alist-delete "python"
5724 (package-inputs python-dbus)
5725 equal?)))))
5726
5727 (define-public python-notify2
5728 (package
5729 (name "python-notify2")
5730 (version "0.3.1")
5731 (source
5732 (origin
5733 (method url-fetch)
5734 (uri (pypi-uri "notify2" version))
5735 (sha256
5736 (base32
5737 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
5738 (build-system python-build-system)
5739 (arguments `(#:tests? #f)) ; tests depend on system state
5740 (native-inputs
5741 `(("python-dbus" ,python-dbus)))
5742 (home-page "https://bitbucket.org/takluyver/pynotify2")
5743 (synopsis "Python interface to D-Bus notifications")
5744 (description
5745 "Pynotify2 provides a Python interface for sending D-Bus notifications.
5746 It is a reimplementation of pynotify in pure Python, and an alternative to
5747 the GObject Introspection bindings to libnotify for non-GTK applications.")
5748 (license (list license:bsd-2
5749 license:lgpl2.1+))))
5750
5751 (define-public python2-notify2
5752 (package-with-python2 python-notify2))
5753
5754 (define-public python-lxml
5755 (package
5756 (name "python-lxml")
5757 (version "4.4.1")
5758 (source
5759 (origin
5760 (method url-fetch)
5761 (uri (pypi-uri "lxml" version))
5762 (sha256
5763 (base32
5764 "14jnpfcpgqr9sx8ppd286jzcbk0b36hbqsvd8jkvffipzw5v8768"))))
5765 (build-system python-build-system)
5766 (arguments
5767 `(#:phases (modify-phases %standard-phases
5768 (replace 'check
5769 (lambda _
5770 (invoke "make" "test"))))))
5771 (inputs
5772 `(("libxml2" ,libxml2)
5773 ("libxslt" ,libxslt)))
5774 (home-page "http://lxml.de/")
5775 (synopsis
5776 "Python XML processing library")
5777 (description
5778 "The lxml XML toolkit is a Pythonic binding for the C libraries
5779 libxml2 and libxslt.")
5780 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5781
5782 (define-public python2-lxml
5783 (package-with-python2 python-lxml))
5784
5785 ;; beautifulsoup4 has a totally different namespace than 3.x,
5786 ;; and pypi seems to put it under its own name, so I guess we should too
5787 (define-public python-beautifulsoup4
5788 (package
5789 (name "python-beautifulsoup4")
5790 (version "4.7.1")
5791 (source
5792 (origin
5793 (method url-fetch)
5794 (uri (pypi-uri "beautifulsoup4" version))
5795 (sha256
5796 (base32
5797 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
5798 (build-system python-build-system)
5799 (arguments
5800 `(#:phases
5801 (modify-phases %standard-phases
5802 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5803 ;; must use this conversion script when building with Python 3. The
5804 ;; conversion script also runs the tests.
5805 ;; For more information, see the file 'convert-py3k' in the source
5806 ;; distribution.
5807 (replace 'check
5808 (lambda _ (invoke "./convert-py3k"))))))
5809 (propagated-inputs
5810 `(("python-soupsieve" ,python-soupsieve)))
5811 (home-page
5812 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5813 (synopsis
5814 "Python screen-scraping library")
5815 (description
5816 "Beautiful Soup is a Python library designed for rapidly setting up
5817 screen-scraping projects. It offers Pythonic idioms for navigating,
5818 searching, and modifying a parse tree, providing a toolkit for
5819 dissecting a document and extracting what you need. It automatically
5820 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5821 (license license:expat)
5822 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5823
5824 (define-public python2-beautifulsoup4
5825 (package
5826 (inherit (package-with-python2
5827 (strip-python2-variant python-beautifulsoup4)))
5828 (arguments `(#:python ,python-2))))
5829
5830 (define-public python-soupsieve
5831 (package
5832 (name "python-soupsieve")
5833 (version "1.9.5")
5834 (source
5835 (origin
5836 (method url-fetch)
5837 (uri (pypi-uri "soupsieve" version))
5838 (sha256
5839 (base32
5840 "1nhd0q0ifwva9wn645s6pn74p1rd97asn3qfg75nphx1wkgcbhg2"))))
5841 (build-system python-build-system)
5842 (arguments `(#:tests? #f))
5843 ;;XXX: 2 tests fail currently despite claming they were to be
5844 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
5845 ;;don't want to create a circular dependency.
5846 (home-page "https://github.com/facelessuser/soupsieve")
5847 (synopsis "CSS selector library")
5848 (description
5849 "Soup Sieve is a CSS selector library designed to be used with Beautiful
5850 Soup 4. It aims to provide selecting, matching, and filtering using modern
5851 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
5852 specifications up through the latest CSS level 4 drafts and beyond (though
5853 some are not yet implemented).")
5854 (properties `((python2-variant . ,(delay python2-soupsieve))))
5855 (license license:expat)))
5856
5857 (define-public python2-soupsieve
5858 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
5859 (package
5860 (inherit base)
5861 (propagated-inputs
5862 `(("python2-backports-functools-lru-cache"
5863 ,python2-backports-functools-lru-cache)
5864 ,@(package-propagated-inputs base))))))
5865
5866 (define-public python-netifaces
5867 (package
5868 (name "python-netifaces")
5869 (version "0.10.7")
5870 (source
5871 (origin
5872 (method url-fetch)
5873 (uri (pypi-uri "netifaces" version))
5874 (sha256
5875 (base32
5876 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5877 (build-system python-build-system)
5878 (home-page "https://github.com/al45tair/netifaces")
5879 (synopsis
5880 "Python module for portable network interface information")
5881 (description
5882 "Netifaces is a Python module providing information on network
5883 interfaces in an easy and portable manner.")
5884 (license license:expat)))
5885
5886 (define-public python2-netifaces
5887 (package-with-python2 python-netifaces))
5888
5889 (define-public python-networkx
5890 (package
5891 (name "python-networkx")
5892 (version "2.2")
5893 (source
5894 (origin
5895 (method url-fetch)
5896 (uri (pypi-uri "networkx" version ".zip"))
5897 (sha256
5898 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5899 (build-system python-build-system)
5900 ;; python-decorator is needed at runtime.
5901 (propagated-inputs
5902 `(("python-decorator" ,python-decorator)))
5903 (native-inputs
5904 `(("python-nose" ,python-nose)
5905 ("unzip" ,unzip)))
5906 (home-page "https://networkx.github.io/")
5907 (synopsis "Python module for creating and manipulating graphs and networks")
5908 (description
5909 "NetworkX is a Python package for the creation, manipulation, and study
5910 of the structure, dynamics, and functions of complex networks.")
5911 (license license:bsd-3)))
5912
5913 (define-public python2-networkx
5914 (package-with-python2 python-networkx))
5915
5916 (define-public python-datrie
5917 (package
5918 (name "python-datrie")
5919 (version "0.8")
5920 (source
5921 (origin
5922 (method url-fetch)
5923 (uri (pypi-uri "datrie" version))
5924 (sha256
5925 (base32
5926 "0338r8xgmpy78556jhms0h6qkvyjr10p8bpgdvcpqzm9lrmxmmdx"))))
5927 (build-system python-build-system)
5928 (native-inputs
5929 `(("python-cython" ,python-cython)
5930 ("python-hypothesis" ,python-hypothesis)
5931 ("python-pytest" ,python-pytest)
5932 ("python-pytest-runner" ,python-pytest-runner)))
5933 (home-page "https://github.com/kmike/datrie")
5934 (synopsis "Fast, efficiently stored trie for Python")
5935 (description
5936 "This package provides a fast, efficiently stored trie implementation for
5937 Python.")
5938 (license license:lgpl2.1+)))
5939
5940 (define-public snakemake
5941 (package
5942 (name "snakemake")
5943 (version "5.7.1")
5944 (source
5945 (origin
5946 (method url-fetch)
5947 (uri (pypi-uri "snakemake" version))
5948 (sha256
5949 (base32 "1pnpvvn8n2a78cg360wz3ldmpqrsm2wzi0c0dmvki9fnsw6fxdas"))))
5950 (build-system python-build-system)
5951 (arguments
5952 ;; TODO: Package missing test dependencies.
5953 '(#:tests? #f
5954 #:phases
5955 (modify-phases %standard-phases
5956 ;; For cluster execution Snakemake will call Python. Since there is
5957 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5958 ;; this by calling the snakemake wrapper instead.
5959 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5960 (lambda* (#:key outputs #:allow-other-keys)
5961 (substitute* "snakemake/executors.py"
5962 (("\\{sys.executable\\} -m snakemake")
5963 (string-append (assoc-ref outputs "out")
5964 "/bin/snakemake")))
5965 #t)))))
5966 (propagated-inputs
5967 `(("python-appdirs" ,python-appdirs)
5968 ("python-configargparse" ,python-configargparse)
5969 ("python-datrie" ,python-datrie)
5970 ("python-docutils" ,python-docutils)
5971 ("python-gitpython" ,python-gitpython)
5972 ("python-jinja2" ,python-jinja2)
5973 ("python-jsonschema" ,python-jsonschema)
5974 ("python-networkx" ,python-networkx)
5975 ("python-psutil" ,python-psutil)
5976 ("python-pyyaml" ,python-pyyaml)
5977 ("python-ratelimiter" ,python-ratelimiter)
5978 ("python-requests" ,python-requests)
5979 ("python-wrapt" ,python-wrapt)))
5980 (home-page "https://snakemake.readthedocs.io")
5981 (synopsis "Python-based execution environment for make-like workflows")
5982 (description
5983 "Snakemake aims to reduce the complexity of creating workflows by
5984 providing a clean and modern domain specific specification language (DSL) in
5985 Python style, together with a fast and comfortable execution environment.")
5986 (license license:expat)))
5987
5988 (define-public python-pyqrcode
5989 (package
5990 (name "python-pyqrcode")
5991 (version "1.2.1")
5992 (source
5993 (origin
5994 (method url-fetch)
5995 (uri (pypi-uri "PyQRCode" version))
5996 (sha256
5997 (base32
5998 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
5999 (build-system python-build-system)
6000 (home-page
6001 "https://github.com/mnooner256/pyqrcode")
6002 (synopsis "QR code generator")
6003 (description
6004 "Pyqrcode is a QR code generator written purely in Python with
6005 SVG, EPS, PNG and terminal output.")
6006 (license license:bsd-3)))
6007
6008 (define-public python-seaborn
6009 (package
6010 (name "python-seaborn")
6011 (version "0.9.0")
6012 (source
6013 (origin
6014 (method url-fetch)
6015 (uri (pypi-uri "seaborn" version))
6016 (sha256
6017 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))
6018 (patches
6019 (list (origin
6020 (method url-fetch)
6021 ;; This has already been merged, but there is no new
6022 ;; release including this patch. It fixes problems
6023 ;; with axis rotation that would lead to test
6024 ;; failures.
6025 (uri "https://patch-diff.githubusercontent.com/raw/mwaskom/seaborn/pull/1716.diff")
6026 (sha256
6027 (base32
6028 "1lm870z316n9ivsyr86hpk1gxaraw0mrjvq42lqsm0znhjdp9q9w"))
6029 (file-name "seaborn-0.9.0-axis-rotation.patch"))))))
6030 (build-system python-build-system)
6031 (arguments
6032 `(#:phases
6033 (modify-phases %standard-phases
6034 (add-before 'check 'start-xserver
6035 (lambda* (#:key inputs #:allow-other-keys)
6036 (let ((xorg-server (assoc-ref inputs "xorg-server")))
6037 ;; There must be a running X server and make check doesn't
6038 ;; start one. Therefore we must do it.
6039 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
6040 (setenv "DISPLAY" ":1")
6041 #t)))
6042 (add-after 'unpack 'fix-tests
6043 (lambda _
6044 ;; test_cbar_ticks fails probably because of matplotlib's
6045 ;; expectation of using an older version of FreeType.
6046 (delete-file "seaborn/tests/test_matrix.py")
6047 #t))
6048 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
6049 (propagated-inputs
6050 `(("python-pandas" ,python-pandas)
6051 ("python-matplotlib" ,python-matplotlib)
6052 ("python-numpy" ,python-numpy)
6053 ("python-scipy" ,python-scipy)))
6054 (native-inputs
6055 `(("python-pytest" ,python-pytest)
6056 ("xorg-server" ,xorg-server-for-tests)))
6057 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6058 (synopsis "Statistical data visualization")
6059 (description
6060 "Seaborn is a library for making attractive and informative statistical
6061 graphics in Python. It is built on top of matplotlib and tightly integrated
6062 with the PyData stack, including support for numpy and pandas data structures
6063 and statistical routines from scipy and statsmodels.")
6064 (license license:bsd-3)))
6065
6066 (define-public python2-seaborn
6067 (package-with-python2 python-seaborn))
6068
6069 (define-public python-mpmath
6070 (package
6071 (name "python-mpmath")
6072 (version "0.19")
6073 (source (origin
6074 (method url-fetch)
6075 (uri (string-append "http://mpmath.org/files/mpmath-"
6076 version ".tar.gz"))
6077 (sha256
6078 (base32
6079 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6080 (build-system python-build-system)
6081 (arguments
6082 '(#:phases
6083 (modify-phases %standard-phases
6084 (replace 'check
6085 (lambda _
6086 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
6087 (home-page "http://mpmath.org")
6088 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6089 (description
6090 "@code{mpmath} can be used as an arbitrary-precision substitute for
6091 Python's float/complex types and math/cmath modules, but also does much
6092 more advanced mathematics.")
6093 (license license:bsd-3)))
6094
6095 (define-public python2-mpmath
6096 (package-with-python2 python-mpmath))
6097
6098 (define-public python-bigfloat
6099 (package
6100 (name "python-bigfloat")
6101 (version "0.3.0")
6102 (source
6103 (origin
6104 (method url-fetch)
6105 (uri (pypi-uri "bigfloat" version))
6106 (sha256
6107 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6108 (build-system python-build-system)
6109 (inputs
6110 `(("mpfr" ,mpfr)))
6111 (home-page "https://github.com/mdickinson/bigfloat")
6112 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6113 (description
6114 "This package provides a Python interface to the MPFR library for
6115 multiprecision arithmetic.")
6116 (license license:lgpl3+)))
6117
6118 (define-public python2-bigfloat
6119 (package-with-python2 python-bigfloat))
6120
6121 (define-public python-sympy
6122 (package
6123 (name "python-sympy")
6124 (version "1.1.1")
6125 (source
6126 (origin
6127 (method url-fetch)
6128 (uri (string-append
6129 "https://github.com/sympy/sympy/releases/download/sympy-"
6130 version "/sympy-" version ".tar.gz"))
6131 (sha256
6132 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6133 (build-system python-build-system)
6134 (arguments
6135 `(#:phases
6136 (modify-phases %standard-phases
6137 ;; Run the core tests after installation. By default it would run
6138 ;; *all* tests, which take a very long time to complete and are known
6139 ;; to be flaky.
6140 (delete 'check)
6141 (add-after 'install 'check
6142 (lambda* (#:key outputs #:allow-other-keys)
6143 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6144 #t)))))
6145 (propagated-inputs
6146 `(("python-mpmath" ,python-mpmath)))
6147 (home-page "http://www.sympy.org/")
6148 (synopsis "Python library for symbolic mathematics")
6149 (description
6150 "SymPy is a Python library for symbolic mathematics. It aims to become a
6151 full-featured computer algebra system (CAS) while keeping the code as simple
6152 as possible in order to be comprehensible and easily extensible.")
6153 (license license:bsd-3)))
6154
6155 (define-public python2-sympy
6156 (package
6157 (inherit (package-with-python2 python-sympy))
6158 (arguments
6159 `(#:phases
6160 (modify-phases %standard-phases
6161 ;; Run the core tests after installation. By default it would run
6162 ;; *all* tests, which take a very long time to complete and are known
6163 ;; to be flaky.
6164 (delete 'check)
6165 (add-after 'install 'check
6166 (lambda* (#:key outputs #:allow-other-keys)
6167 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6168 #t)))))))
6169
6170 (define-public python-q
6171 (package
6172 (name "python-q")
6173 (version "2.6")
6174 (source
6175 (origin
6176 (method url-fetch)
6177 (uri (pypi-uri "q" version))
6178 (sha256
6179 (base32
6180 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6181 (build-system python-build-system)
6182 (home-page "https://github.com/zestyping/q")
6183 (synopsis "Quick-and-dirty debugging output for tired programmers")
6184 (description
6185 "q is a Python module for \"print\" style of debugging Python code. It
6186 provides convenient short API for print out of values, tracebacks, and
6187 falling into the Python interpreter.")
6188 (license license:asl2.0)))
6189
6190 (define-public python2-q
6191 (package-with-python2 python-q))
6192
6193 (define-public python2-xlib
6194 (package
6195 (name "python2-xlib")
6196 (version "0.14")
6197 (source (origin
6198 (method url-fetch)
6199 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6200 "/" version "/"
6201 "python-xlib-" version ".tar.gz"))
6202 (sha256
6203 (base32
6204 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6205 (build-system python-build-system)
6206 (arguments
6207 `(#:python ,python-2 ;Python 2 only
6208 #:tests? #f)) ;no tests
6209 (home-page "http://python-xlib.sourceforge.net/")
6210 (synopsis "Python X11 client library")
6211 (description
6212 "The Python X Library is intended to be a fully functional X client
6213 library for Python programs. It is useful to implement low-level X clients.
6214 It is written entirely in Python.")
6215 (license license:gpl2+)))
6216
6217 (define-public python-singledispatch
6218 (package
6219 (name "python-singledispatch")
6220 (version "3.4.0.3")
6221 (source
6222 (origin
6223 (method url-fetch)
6224 (uri (pypi-uri "singledispatch" version))
6225 (sha256
6226 (base32
6227 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6228 (build-system python-build-system)
6229 (native-inputs
6230 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6231 (home-page
6232 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6233 (synopsis "Backport of singledispatch feature from Python 3.4")
6234 (description
6235 "This library brings functools.singledispatch from Python 3.4 to Python
6236 2.6-3.3.")
6237 (license license:expat)))
6238
6239 (define-public python2-singledispatch
6240 (package-with-python2 python-singledispatch))
6241
6242 ;; the python- version can be removed with python-3.5
6243 (define-public python-backports-abc
6244 (package
6245 (name "python-backports-abc")
6246 (version "0.5")
6247 (source
6248 (origin
6249 (method url-fetch)
6250 (uri (pypi-uri "backports_abc" version))
6251 (sha256
6252 (base32
6253 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6254 (build-system python-build-system)
6255 (home-page "https://github.com/cython/backports_abc")
6256 (synopsis "Backport of additions to the 'collections.abc' module")
6257 (description
6258 "Python-backports-abc provides a backport of additions to the
6259 @code{collections.abc} module in Python-3.5.")
6260 (license license:psfl)))
6261
6262 (define-public python2-backports-abc
6263 (package-with-python2 python-backports-abc))
6264
6265 (define-public python-backports-csv
6266 (package
6267 (name "python-backports-csv")
6268 (version "1.0.5")
6269 (source
6270 (origin
6271 (method url-fetch)
6272 (uri (pypi-uri "backports.csv" version))
6273 (sha256
6274 (base32
6275 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6276 (build-system python-build-system)
6277 (home-page "https://github.com/ryanhiebert/backports.csv")
6278 (synopsis "Backport of Python 3's csv module for Python 2")
6279 (description
6280 "Provides a backport of Python 3's @code{csv} module for parsing
6281 comma separated values. The API of the @code{csv} module in Python 2
6282 is drastically different from the @code{csv} module in Python 3.
6283 This is due, for the most part, to the difference between str in
6284 Python 2 and Python 3.")
6285 (license license:psfl)))
6286
6287 (define-public python2-backports-csv
6288 (package-with-python2 python-backports-csv))
6289
6290 (define-public python2-backports-shutil-get-terminal-size
6291 (package
6292 (name "python2-backports-shutil-get-terminal-size")
6293 (version "1.0.0")
6294 (source
6295 (origin
6296 (method url-fetch)
6297 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6298 (sha256
6299 (base32
6300 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6301 (build-system python-build-system)
6302 (arguments
6303 `(#:python ,python-2
6304 #:phases
6305 (modify-phases %standard-phases
6306 (replace 'check
6307 (lambda _
6308 (invoke "py.test" "-v"))))))
6309 (native-inputs
6310 `(("python2-pytest" ,python2-pytest)))
6311 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6312 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6313 (description
6314 "This package provides a backport of the @code{get_terminal_size
6315 function} from Python 3.3's @code{shutil}.
6316 Unlike the original version it is written in pure Python rather than C,
6317 so it might be a tiny bit slower.")
6318 (license license:expat)))
6319
6320 (define-public python-waf
6321 (package
6322 (name "python-waf")
6323 (version "2.0.19")
6324 (source (origin
6325 (method url-fetch)
6326 (uri (string-append "https://waf.io/"
6327 "waf-" version ".tar.bz2"))
6328 (sha256
6329 (base32
6330 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
6331 (build-system python-build-system)
6332 (arguments
6333 '(#:phases
6334 (modify-phases %standard-phases
6335 (replace 'build
6336 (lambda _
6337 ;; XXX: Find a way to add all extra tools.
6338 (let ((tools '("gccdeps"
6339 "clang_compilation_database")))
6340 (invoke "python" "waf-light" "configure" "build"
6341 (string-append "--tools="
6342 (string-join tools ","))))))
6343 (replace 'check
6344 (lambda _
6345 (invoke "python" "waf" "--version")))
6346 (replace 'install
6347 (lambda* (#:key outputs #:allow-other-keys)
6348 (let ((out (assoc-ref outputs "out")))
6349 (install-file "waf" (string-append out "/bin")))
6350 #t))
6351 ;; waf breaks when it is wrapped.
6352 (delete 'wrap))))
6353 (home-page "https://waf.io/")
6354 (synopsis "Python-based build system")
6355 (description
6356 "Waf is a Python-based framework for configuring, compiling and installing
6357 applications.")
6358 (license license:bsd-3)))
6359
6360 (define-public python2-waf
6361 (package-with-python2 python-waf))
6362
6363 (define-public python-pyzmq
6364 (package
6365 (name "python-pyzmq")
6366 (version "17.1.2")
6367 (source
6368 (origin
6369 (method url-fetch)
6370 (uri (pypi-uri "pyzmq" version))
6371 (sha256
6372 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6373 (build-system python-build-system)
6374 (arguments
6375 `(#:configure-flags
6376 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6377 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6378 ;; --inplace' for 'python setup.py test' to work.
6379 #:tests? #f))
6380 (inputs
6381 `(("zeromq" ,zeromq)))
6382 (native-inputs
6383 `(("pkg-config" ,pkg-config)
6384 ("python-nose" ,python-nose)))
6385 (home-page "https://github.com/zeromq/pyzmq")
6386 (synopsis "Python bindings for 0MQ")
6387 (description
6388 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6389 (license license:bsd-4)))
6390
6391 (define-public python2-pyzmq
6392 (package-with-python2 python-pyzmq))
6393
6394 (define-public python-pep8
6395 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6396 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6397 ;; some dependents' test suites, and nothing more.
6398 (package
6399 (name "python-pep8")
6400 (version "1.7.0")
6401 (source
6402 (origin
6403 (method url-fetch)
6404 (uri (pypi-uri "pep8" version))
6405 (sha256
6406 (base32
6407 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
6408 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
6409 (build-system python-build-system)
6410 (home-page "https://pep8.readthedocs.org/")
6411 (synopsis "Python style guide checker")
6412 (description
6413 "This tools checks Python code against some of the style conventions in
6414 PEP 8.")
6415 (license license:expat)))
6416
6417 (define-public python2-pep8
6418 (package-with-python2 python-pep8))
6419
6420 (define-public python-pyflakes
6421 (package
6422 (name "python-pyflakes")
6423 (version "2.1.1")
6424 (source
6425 (origin
6426 (method url-fetch)
6427 (uri (pypi-uri "pyflakes" version))
6428 (sha256
6429 (base32
6430 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
6431 (build-system python-build-system)
6432 (home-page
6433 "https://github.com/pyflakes/pyflakes")
6434 (synopsis "Passive checker of Python programs")
6435 (description
6436 "Pyflakes statically checks Python source code for common errors.")
6437 (license license:expat)))
6438
6439 (define-public python2-pyflakes
6440 (package-with-python2 python-pyflakes))
6441
6442 (define-public python-mccabe
6443 (package
6444 (name "python-mccabe")
6445 (version "0.6.1")
6446 (source
6447 (origin
6448 (method url-fetch)
6449 (uri (pypi-uri "mccabe" version))
6450 (sha256
6451 (base32
6452 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6453 (build-system python-build-system)
6454 (native-inputs
6455 `(("python-pytest" ,python-pytest-bootstrap)
6456 ("python-pytest-runner" ,python-pytest-runner)))
6457 (home-page "https://github.com/flintwork/mccabe")
6458 (synopsis "McCabe checker, plugin for flake8")
6459 (description
6460 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6461 complexity of Python source code.")
6462 (license license:expat)))
6463
6464 (define-public python2-mccabe
6465 (package-with-python2 python-mccabe))
6466
6467 (define-public python-mccabe-0.2.1
6468 (package (inherit python-mccabe)
6469 (version "0.2.1")
6470 (source
6471 (origin
6472 (method url-fetch)
6473 (uri (pypi-uri "mccabe" version))
6474 (sha256
6475 (base32
6476 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6477
6478 (define-public python2-mccabe-0.2.1
6479 (package-with-python2 python-mccabe-0.2.1))
6480
6481 ;; Flake8 2.4.1 requires an older version of pep8.
6482 ;; This should be removed ASAP.
6483 (define-public python-pep8-1.5.7
6484 (package (inherit python-pep8)
6485 (version "1.5.7")
6486 (source
6487 (origin
6488 (method url-fetch)
6489 (uri (pypi-uri "pep8" version))
6490 (sha256
6491 (base32
6492 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6493 (arguments
6494 ;; XXX Tests not compatible with Python 3.5.
6495 '(#:tests? #f))))
6496
6497 (define-public python2-pep8-1.5.7
6498 (package-with-python2 python-pep8-1.5.7))
6499
6500 ;; Flake8 2.4.1 requires an older version of pyflakes.
6501 ;; This should be removed ASAP.
6502 (define-public python-pyflakes-0.8.1
6503 (package (inherit python-pyflakes)
6504 (version "0.8.1")
6505 (source
6506 (origin
6507 (method url-fetch)
6508 (uri (pypi-uri "pyflakes" version))
6509 (sha256
6510 (base32
6511 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6512 (arguments
6513 ;; XXX Tests not compatible with Python 3.5.
6514 '(#:tests? #f))))
6515
6516 (define-public python2-pyflakes-0.8.1
6517 (package-with-python2 python-pyflakes-0.8.1))
6518
6519 (define-public python-flake8
6520 (package
6521 (name "python-flake8")
6522 (version "3.7.7")
6523 (source (origin
6524 (method url-fetch)
6525 (uri (pypi-uri "flake8" version))
6526 (sha256
6527 (base32
6528 "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5"))))
6529 (build-system python-build-system)
6530 (arguments
6531 `(#:phases
6532 (modify-phases %standard-phases
6533 (delete 'check)
6534 (add-after 'install 'check
6535 (lambda* (#:key inputs outputs #:allow-other-keys)
6536 (add-installed-pythonpath inputs outputs)
6537 (invoke "pytest" "-v")
6538 #t)))))
6539 (propagated-inputs
6540 `(("python-pycodestyle" ,python-pycodestyle)
6541 ("python-entrypoints" ,python-entrypoints)
6542 ("python-pyflakes" ,python-pyflakes)
6543 ("python-mccabe" ,python-mccabe)))
6544 (native-inputs
6545 `(("python-mock" ,python-mock)
6546 ("python-pytest" ,python-pytest-bootstrap)
6547 ("python-pytest-runner" ,python-pytest-runner)))
6548 (home-page "https://gitlab.com/pycqa/flake8")
6549 (synopsis
6550 "The modular source code checker: pep8, pyflakes and co")
6551 (description
6552 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6553 (properties `((python2-variant . ,(delay python2-flake8))))
6554 (license license:expat)))
6555
6556 (define-public python2-flake8
6557 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
6558 (package (inherit base)
6559 (propagated-inputs
6560 `(("python2-configparser" ,python2-configparser)
6561 ("python2-enum34" ,python2-enum34)
6562 ("python2-typing" ,python2-typing)
6563 ,@(package-propagated-inputs base))))))
6564
6565 ;; python-hacking requires flake8 <2.6.0.
6566 (define-public python-flake8-2.5
6567 (package
6568 (inherit python-flake8)
6569 (version "2.5.5")
6570 (source (origin
6571 (method url-fetch)
6572 (uri (pypi-uri "flake8" version))
6573 (sha256
6574 (base32
6575 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6576 (propagated-inputs
6577 `(("python-pep8" ,python-pep8)
6578 ,@(package-propagated-inputs python-flake8)))
6579 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6580
6581 (define-public python2-flake8-2.5
6582 (package
6583 (inherit python2-flake8)
6584 (version (package-version python-flake8-2.5))
6585 (source (origin
6586 (inherit (package-source python-flake8-2.5))))
6587 (propagated-inputs
6588 `(("python2-pep8" ,python2-pep8)
6589 ,@(package-propagated-inputs python2-flake8)))))
6590
6591 (define-public python-flake8-polyfill
6592 (package
6593 (name "python-flake8-polyfill")
6594 (version "1.0.2")
6595 (source
6596 (origin
6597 (method url-fetch)
6598 (uri (pypi-uri "flake8-polyfill" version))
6599 (sha256
6600 (base32
6601 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6602 (build-system python-build-system)
6603 (arguments
6604 '(#:phases
6605 (modify-phases %standard-phases
6606 (replace 'check
6607 (lambda _
6608 ;; Be compatible with Pytest 4:
6609 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
6610 (substitute* "setup.cfg"
6611 (("\\[pytest\\]")
6612 "[tool:pytest]"))
6613
6614 (setenv "PYTHONPATH"
6615 (string-append (getcwd) "/build/lib:"
6616 (getenv "PYTHONPATH")))
6617 (invoke "py.test" "-v"))))))
6618 (native-inputs
6619 `(("python-flake8" ,python-flake8)
6620 ("python-mock" ,python-mock)
6621 ("python-pep8" ,python-pep8)
6622 ("python-pycodestyle" ,python-pycodestyle)
6623 ("python-pytest" ,python-pytest)))
6624 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6625 (synopsis "Polyfill package for Flake8 plugins")
6626 (description
6627 "This package that provides some compatibility helpers for Flake8
6628 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6629 (license license:expat)))
6630
6631 (define-public python2-flake8-polyfill
6632 (package-with-python2 python-flake8-polyfill))
6633
6634 (define-public python-mistune
6635 (package
6636 (name "python-mistune")
6637 (version "0.8.4")
6638 (source
6639 (origin
6640 (method url-fetch)
6641 (uri (pypi-uri "mistune" version))
6642 (sha256
6643 (base32
6644 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6645 (build-system python-build-system)
6646 (native-inputs
6647 `(("python-nose" ,python-nose)
6648 ("python-cython" ,python-cython)))
6649 (home-page "https://github.com/lepture/mistune")
6650 (synopsis "Markdown parser in pure Python")
6651 (description "This package provides a fast markdown parser in pure
6652 Python.")
6653 (license license:bsd-3)))
6654
6655 (define-public python2-mistune
6656 (package-with-python2 python-mistune))
6657
6658 (define-public python-markdown
6659 (package
6660 (name "python-markdown")
6661 (version "3.1.1")
6662 (source
6663 (origin
6664 (method url-fetch)
6665 (uri (pypi-uri "Markdown" version))
6666 (sha256
6667 (base32
6668 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f"))))
6669 (build-system python-build-system)
6670 (native-inputs
6671 `(("python-nose" ,python-nose)
6672 ("python-pyyaml" ,python-pyyaml)))
6673 (home-page "https://python-markdown.github.io/")
6674 (synopsis "Python implementation of Markdown")
6675 (description
6676 "This package provides a Python implementation of John Gruber's
6677 Markdown. The library features international input, various Markdown
6678 extensions, and several HTML output formats. A command line wrapper
6679 markdown_py is also provided to convert Markdown files to HTML.")
6680 (license license:bsd-3)))
6681
6682 (define-public python2-markdown
6683 (package-with-python2 python-markdown))
6684
6685 (define-public python-ptyprocess
6686 (package
6687 (name "python-ptyprocess")
6688 (version "0.5.2")
6689 (source
6690 (origin
6691 (method url-fetch)
6692 (uri (pypi-uri "ptyprocess" version))
6693 (sha256
6694 (base32
6695 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6696 (build-system python-build-system)
6697 (native-inputs
6698 `(("python-nose" ,python-nose)))
6699 (arguments
6700 `(#:phases
6701 (modify-phases %standard-phases
6702 (replace 'check
6703 (lambda _ (invoke "nosetests"))))))
6704 (home-page "https://github.com/pexpect/ptyprocess")
6705 (synopsis "Run a subprocess in a pseudo terminal")
6706 (description
6707 "This package provides a Python library used to launch a subprocess in a
6708 pseudo terminal (pty), and interact with both the process and its pty.")
6709 (license license:isc)))
6710
6711 (define-public python2-ptyprocess
6712 (package-with-python2 python-ptyprocess))
6713
6714 (define-public python-cram
6715 (package
6716 (name "python-cram")
6717 (version "0.7")
6718 (home-page "https://bitheap.org/cram/")
6719 (source (origin
6720 (method url-fetch)
6721 (uri (list (string-append home-page "cram-"
6722 version ".tar.gz")
6723 (pypi-uri "cram" version)))
6724 (sha256
6725 (base32
6726 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6727 (arguments
6728 '(#:phases
6729 (modify-phases %standard-phases
6730 (add-after 'unpack 'patch-source
6731 (lambda _
6732 (substitute* (find-files "cram" ".*\\.py$")
6733 ;; Replace default shell path.
6734 (("/bin/sh") (which "sh")))
6735 (substitute* (find-files "tests" ".*\\.t$")
6736 (("md5") "md5sum")
6737 (("/bin/bash") (which "bash"))
6738 (("/bin/sh") (which "sh")))
6739 (substitute* "cram/_test.py"
6740 ;; This hack works around a bug triggered by substituting
6741 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6742 ;; "cram -h", which breaks the output at 80 characters. This
6743 ;; causes the line showing the default shell to break into two
6744 ;; lines, but the test expects a single line...
6745 (("env\\['COLUMNS'\\] = '80'")
6746 "env['COLUMNS'] = '160'"))
6747
6748 (substitute* "Makefile"
6749 ;; Recent versions of python-coverage have caused the test
6750 ;; coverage to decrease (as of version 0.7). Allow that.
6751 (("--fail-under=100")
6752 "--fail-under=90"))
6753
6754 #t))
6755 (replace 'check
6756 ;; The test phase uses the built library and executable.
6757 (lambda* (#:key inputs outputs #:allow-other-keys)
6758 (add-installed-pythonpath inputs outputs)
6759 (setenv "PATH" (string-append (getenv "PATH") ":"
6760 (assoc-ref outputs "out") "/bin"))
6761 (invoke "make" "test"))))))
6762 (build-system python-build-system)
6763 (native-inputs
6764 `(("python-coverage" ,python-coverage)
6765 ("which" ,which)))
6766 (synopsis "Simple testing framework for command line applications")
6767 (description
6768 "Cram is a functional testing framework for command line applications.
6769 Cram tests look like snippets of interactive shell sessions. Cram runs each
6770 command and compares the command output in the test with the command’s actual
6771 output.")
6772 (license license:gpl2+)))
6773
6774 (define-public python2-cram
6775 (package-with-python2 python-cram))
6776
6777 (define-public python-straight-plugin
6778 (package
6779 (name "python-straight-plugin")
6780 (version "1.4.1")
6781 (source
6782 (origin
6783 (method url-fetch)
6784 (uri (pypi-uri "straight.plugin" version))
6785 (sha256
6786 (base32
6787 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6788 (build-system python-build-system)
6789 (home-page "https://github.com/ironfroggy/straight.plugin")
6790 (synopsis "Simple namespaced plugin facility")
6791 (description "Straight Plugin provides a type of plugin you can create from
6792 almost any existing Python modules, and an easy way for outside developers to
6793 add functionality and customization to your projects with their own plugins.")
6794 (license license:expat)))
6795
6796 (define-public python2-straight-plugin
6797 (package-with-python2 python-straight-plugin))
6798
6799 (define-public python-fonttools
6800 (package
6801 (name "python-fonttools")
6802 (version "4.2.0")
6803 (source (origin
6804 (method url-fetch)
6805 (uri (pypi-uri "fonttools" version ".zip"))
6806 (sha256
6807 (base32
6808 "0psy6z52jn49wp93s3k7kj0jzji1cad3wnwgm6c26vphv5appk4v"))))
6809 (build-system python-build-system)
6810 (native-inputs
6811 `(("unzip" ,unzip)
6812 ("python-pytest" ,python-pytest)
6813 ("python-pytest-runner" ,python-pytest-runner)))
6814 (home-page "https://github.com/fonttools/fonttools")
6815 (synopsis "Tools to manipulate font files")
6816 (description
6817 "FontTools/TTX is a library to manipulate font files from Python. It
6818 supports reading and writing of TrueType/OpenType fonts, reading and writing
6819 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6820 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6821 from an XML-based format.")
6822 (license license:expat)))
6823
6824 ;; Fonttools 4.x dropped support for Python 2, so stick with 3.x here.
6825 (define-public python2-fonttools
6826 (let ((base (package-with-python2 (strip-python2-variant python-fonttools))))
6827 (package/inherit
6828 base
6829 (version "3.44.0")
6830 (source (origin
6831 (method url-fetch)
6832 (uri (pypi-uri "fonttools" version ".zip"))
6833 (sha256
6834 (base32
6835 "0v6399g755f2hn1ry62i5b6gdinf2fpx2966v3bxh6bjw1accb5p")))))))
6836
6837 (define-public python-ly
6838 (package
6839 (name "python-ly")
6840 (version "0.9.5")
6841 (source
6842 (origin
6843 (method url-fetch)
6844 (uri (pypi-uri name version))
6845 (sha256
6846 (base32
6847 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6848 (build-system python-build-system)
6849 (arguments
6850 ;; FIXME: Some tests need network access.
6851 '(#:tests? #f))
6852 (synopsis "Tool and library for manipulating LilyPond files")
6853 (description "This package provides a Python library to parse, manipulate
6854 or create documents in LilyPond format. A command line program ly is also
6855 provided that can be used to do various manipulations with LilyPond files.")
6856 (home-page "https://pypi.python.org/pypi/python-ly")
6857 (license license:gpl2+)))
6858
6859 (define-public python-appdirs
6860 (package
6861 (name "python-appdirs")
6862 (version "1.4.3")
6863 (source
6864 (origin
6865 (method url-fetch)
6866 (uri (pypi-uri "appdirs" version))
6867 (sha256
6868 (base32
6869 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6870 (build-system python-build-system)
6871 (home-page "https://github.com/ActiveState/appdirs")
6872 (synopsis
6873 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6874 (description
6875 "This module provides a portable way of finding out where user data
6876 should be stored on various operating systems.")
6877 (license license:expat)))
6878
6879 (define-public python2-appdirs
6880 (package-with-python2 python-appdirs))
6881
6882 (define-public python-llfuse
6883 (package
6884 (name "python-llfuse")
6885 (version "1.3.5")
6886 (source (origin
6887 (method url-fetch)
6888 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6889 (sha256
6890 (base32
6891 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6892 (build-system python-build-system)
6893 (inputs
6894 `(("fuse" ,fuse)
6895 ("attr" ,attr)))
6896 (native-inputs
6897 `(("pkg-config" ,pkg-config)))
6898 (synopsis "Python bindings for FUSE")
6899 (description
6900 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6901 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6902 (license license:lgpl2.0+)
6903 (properties `((python2-variant . ,(delay python2-llfuse))))))
6904
6905 (define-public python2-llfuse
6906 (package (inherit (package-with-python2
6907 (strip-python2-variant python-llfuse)))
6908 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6909
6910 ;; For attic-0.16
6911 (define-public python-llfuse-0.41
6912 (package (inherit python-llfuse)
6913 (version "0.41.1")
6914 (source (origin
6915 (method url-fetch)
6916 (uri (string-append
6917 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6918 "llfuse-" version ".tar.bz2"))
6919 (sha256
6920 (base32
6921 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6922 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6923 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6924 (license (list license:expat license:lgpl2.0+))))
6925
6926 (define-public python-msgpack
6927 (package
6928 (name "python-msgpack")
6929 (version "0.5.6")
6930 (source (origin
6931 (method url-fetch)
6932 (uri (pypi-uri "msgpack" version))
6933 (sha256
6934 (base32
6935 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6936 (build-system python-build-system)
6937 (arguments
6938 `(#:modules ((guix build utils)
6939 (guix build python-build-system)
6940 (ice-9 ftw)
6941 (srfi srfi-1)
6942 (srfi srfi-26))
6943 #:phases
6944 (modify-phases %standard-phases
6945 (replace 'check
6946 (lambda _
6947 (let ((cwd (getcwd)))
6948 (setenv "PYTHONPATH"
6949 (string-append cwd "/build/"
6950 (find (cut string-prefix? "lib" <>)
6951 (scandir (string-append cwd "/build")))
6952 ":"
6953 (getenv "PYTHONPATH")))
6954 (invoke "pytest" "-v" "test")))))))
6955 (native-inputs
6956 `(("python-pytest" ,python-pytest)))
6957 (synopsis "MessagePack (de)serializer")
6958 (description "MessagePack is a fast, compact binary serialization format,
6959 suitable for similar data to JSON. This package provides CPython bindings for
6960 reading and writing MessagePack data.")
6961 (home-page "https://pypi.python.org/pypi/msgpack/")
6962 (license license:asl2.0)))
6963
6964 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6965 ;; release 0.5. Some packages like borg still call it by the old name for now.
6966 ;; <https://bugs.gnu.org/30662>
6967 (define-public python-msgpack-transitional
6968 (package
6969 (inherit python-msgpack)
6970 (name "python-msgpack-transitional")
6971 (arguments
6972 (substitute-keyword-arguments (package-arguments python-msgpack)
6973 ((#:phases phases)
6974 `(modify-phases ,phases
6975 (add-after 'unpack 'configure-transitional
6976 (lambda _
6977 ;; Keep using the old name.
6978 (substitute* "setup.py"
6979 (("TRANSITIONAL = False")
6980 "TRANSITIONAL = 1"))
6981 #t))))))))
6982
6983 (define-public python2-msgpack
6984 (package-with-python2 python-msgpack))
6985
6986 (define-public python-netaddr
6987 (package
6988 (name "python-netaddr")
6989 (version "0.7.19")
6990 (source
6991 (origin
6992 (method url-fetch)
6993 (uri (pypi-uri "netaddr" version))
6994 (sha256
6995 (base32
6996 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6997 (build-system python-build-system)
6998 (arguments `(#:tests? #f)) ;; No tests.
6999 (home-page "https://github.com/drkjam/netaddr/")
7000 (synopsis "Pythonic manipulation of network addresses")
7001 (description
7002 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
7003 and MAC network addresses.")
7004 (license license:bsd-3)))
7005
7006 (define-public python2-netaddr
7007 (package-with-python2 python-netaddr))
7008
7009 (define-public python2-pyroute2
7010 (package
7011 (name "python2-pyroute2")
7012 (version "0.5.6")
7013 (source
7014 (origin
7015 (method url-fetch)
7016 (uri (pypi-uri "pyroute2" version))
7017 (sha256
7018 (base32
7019 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
7020 (build-system python-build-system)
7021 (arguments
7022 `(#:python ,python-2)) ;Python 3.x is not supported
7023 (home-page "https://github.com/svinota/pyroute2")
7024 (synopsis "Python netlink library")
7025 (description
7026 "Pyroute2 is a pure Python netlink library with minimal dependencies.
7027 Supported netlink families and protocols include:
7028 @itemize
7029 @item rtnl, network settings - addresses, routes, traffic controls
7030 @item nfnetlink - netfilter API: ipset, nftables, ...
7031 @item ipq - simplest userspace packet filtering, iptables QUEUE target
7032 @item devlink - manage and monitor devlink-enabled hardware
7033 @item generic - generic netlink families
7034 @itemize
7035 @item nl80211 - wireless functions API (basic support)
7036 @item taskstats - extended process statistics
7037 @item acpi_events - ACPI events monitoring
7038 @item thermal_events - thermal events monitoring
7039 @item VFS_DQUOT - disk quota events monitoring
7040 @end itemize
7041 @end itemize")
7042 (license license:gpl2+)))
7043
7044 (define-public python-wrapt
7045 (package
7046 (name "python-wrapt")
7047 (version "1.11.2")
7048 (source
7049 (origin
7050 (method url-fetch)
7051 (uri (pypi-uri "wrapt" version))
7052 (sha256
7053 (base32
7054 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
7055 (build-system python-build-system)
7056 (arguments
7057 ;; Tests are not included in the tarball, they are only available in the
7058 ;; git repository.
7059 `(#:tests? #f))
7060 (home-page "https://github.com/GrahamDumpleton/wrapt")
7061 (synopsis "Module for decorators, wrappers and monkey patching")
7062 (description
7063 "The aim of the wrapt module is to provide a transparent object proxy for
7064 Python, which can be used as the basis for the construction of function
7065 wrappers and decorator functions.")
7066 (license license:bsd-2)))
7067
7068 (define-public python2-wrapt
7069 (package-with-python2 python-wrapt))
7070
7071 (define-public python-xlrd
7072 (package
7073 (name "python-xlrd")
7074 (version "1.2.0")
7075 (source (origin
7076 (method url-fetch)
7077 (uri (pypi-uri "xlrd" version))
7078 (sha256
7079 (base32
7080 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
7081 (build-system python-build-system)
7082 (arguments
7083 `(#:phases
7084 (modify-phases %standard-phases
7085 ;; Some tests depend on writing a temporary file to the user's home
7086 ;; directory.
7087 (add-after 'unpack 'fix-tests
7088 (lambda _
7089 (delete-file "tests/test_open_workbook.py")
7090 #t)))))
7091 (home-page "http://www.python-excel.org/")
7092 (synopsis "Library for extracting data from Excel files")
7093 (description "This package provides a library to extract data from
7094 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7095 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7096 Unicode-aware. It is not intended as an end-user tool.")
7097 (license license:bsd-3)))
7098
7099 (define-public python2-xlrd
7100 (package-with-python2 python-xlrd))
7101
7102 (define-public python-prettytable
7103 (package
7104 (name "python-prettytable")
7105 (version "0.7.2")
7106 (source
7107 (origin
7108 (method url-fetch)
7109 (uri (pypi-uri "prettytable" version ".tar.bz2"))
7110 (sha256
7111 (base32
7112 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7113 (build-system python-build-system)
7114 (home-page "http://code.google.com/p/prettytable/")
7115 (synopsis "Display tabular data in an ASCII table format")
7116 (description
7117 "A library designed to represent tabular data in visually appealing ASCII
7118 tables. PrettyTable allows for selection of which columns are to be printed,
7119 independent alignment of columns (left or right justified or centred) and
7120 printing of sub-tables by specifying a row range.")
7121 (license license:bsd-3)))
7122
7123 (define-public python2-prettytable
7124 (package-with-python2 python-prettytable))
7125
7126 (define-public python-tables
7127 (package
7128 (name "python-tables")
7129 (version "3.4.4")
7130 (source
7131 (origin
7132 (method url-fetch)
7133 (uri (pypi-uri "tables" version))
7134 (sha256
7135 (base32
7136 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7137 (modules '((guix build utils)))
7138 (snippet
7139 '(begin
7140 ;; Remove pre-compiled .pyc files from source.
7141 (for-each delete-file-recursively
7142 (find-files "." "__pycache__" #:directories? #t))
7143 (for-each delete-file (find-files "." "\\.pyc$"))
7144 #t))))
7145 (build-system python-build-system)
7146 (arguments
7147 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7148 ;; or "check", so we must override the build and check phases.
7149 #:phases
7150 (modify-phases %standard-phases
7151 (add-after 'unpack 'use-gcc
7152 (lambda _
7153 (substitute* "setup.py"
7154 (("compiler = new_compiler\\(\\)" line)
7155 (string-append line
7156 "\ncompiler.set_executables(compiler='gcc',"
7157 "compiler_so='gcc',"
7158 "linker_exe='gcc',"
7159 "linker_so='gcc -shared')")))
7160 #t))
7161 (replace 'build
7162 (lambda* (#:key inputs #:allow-other-keys)
7163 (invoke "python" "setup.py" "build"
7164 (string-append "--hdf5="
7165 (assoc-ref inputs "hdf5")))))
7166 (replace 'check
7167 (lambda* (#:key inputs #:allow-other-keys)
7168 (invoke "python" "setup.py" "check"
7169 (string-append "--hdf5="
7170 (assoc-ref inputs "hdf5"))))))))
7171 (propagated-inputs
7172 `(("python-numexpr" ,python-numexpr)
7173 ("python-numpy" ,python-numpy)))
7174 (native-inputs
7175 `(("python-cython" ,python-cython)
7176 ("pkg-config" ,pkg-config)))
7177 (inputs
7178 `(("hdf5" ,hdf5)
7179 ("bzip2" ,bzip2)
7180 ("zlib" ,zlib)))
7181 (home-page "http://www.pytables.org/")
7182 (synopsis "Hierarchical datasets for Python")
7183 (description "PyTables is a package for managing hierarchical datasets and
7184 designed to efficiently cope with extremely large amounts of data.")
7185 (license license:bsd-3)))
7186
7187 (define-public python2-tables
7188 (package-with-python2 python-tables))
7189
7190 (define-public python-pyasn1
7191 (package
7192 (name "python-pyasn1")
7193 (version "0.4.3")
7194 (source
7195 (origin
7196 (method url-fetch)
7197 (uri (pypi-uri "pyasn1" version))
7198 (sha256
7199 (base32
7200 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7201 (build-system python-build-system)
7202 (home-page "http://pyasn1.sourceforge.net/")
7203 (synopsis "ASN.1 types and codecs")
7204 (description
7205 "This is an implementation of ASN.1 types and codecs in Python. It is
7206 suitable for a wide range of protocols based on the ASN.1 specification.")
7207 (license license:bsd-2)))
7208
7209 (define-public python2-pyasn1
7210 (package-with-python2 python-pyasn1))
7211
7212 (define-public python-pyasn1-modules
7213 (package
7214 (name "python-pyasn1-modules")
7215 (version "0.2.2")
7216 (source
7217 (origin
7218 (method url-fetch)
7219 (uri (pypi-uri "pyasn1-modules" version))
7220 (sha256
7221 (base32
7222 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7223 (build-system python-build-system)
7224 (propagated-inputs
7225 `(("python-pyasn1" ,python-pyasn1)))
7226 (home-page "https://sourceforge.net/projects/pyasn1/")
7227 (synopsis "ASN.1 codec implementations")
7228 (description
7229 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7230 implementations of ASN.1-based codecs and protocols.")
7231 (license license:bsd-3)))
7232
7233 (define-public python2-pyasn1-modules
7234 (package-with-python2 python-pyasn1-modules))
7235
7236 (define-public python-ipaddress
7237 (package
7238 (name "python-ipaddress")
7239 (version "1.0.22")
7240 (source (origin
7241 (method url-fetch)
7242 (uri (pypi-uri "ipaddress" version))
7243 (sha256
7244 (base32
7245 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7246 (build-system python-build-system)
7247 (home-page "https://github.com/phihag/ipaddress")
7248 (synopsis "IP address manipulation library")
7249 (description
7250 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7251 in Python. This library is used to create, poke at, and manipulate IPv4 and
7252 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7253 module to older versions of Python.")
7254 (license license:psfl)))
7255
7256 (define-public python2-ipaddress
7257 (package-with-python2 python-ipaddress))
7258
7259 (define-public python2-ipaddr
7260 (package
7261 (name "python2-ipaddr")
7262 (version "2.1.11")
7263 (source
7264 (origin
7265 (method url-fetch)
7266 (uri (pypi-uri "ipaddr" version))
7267 (sha256
7268 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7269 (build-system python-build-system)
7270 (arguments
7271 `(#:python ,python-2 ;version 2 only
7272 #:phases
7273 (modify-phases %standard-phases
7274 (replace 'check
7275 (lambda _ (invoke "python" "ipaddr_test.py"))))))
7276 (home-page "https://github.com/google/ipaddr-py")
7277 (synopsis "IP address manipulation library")
7278 (description
7279 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7280 IPv6 addresses and networks.
7281
7282 For new implementations you may prefer to use the standard module
7283 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
7284 versions of Python.")
7285 (license license:asl2.0)))
7286
7287 (define-public python-idna
7288 (package
7289 (name "python-idna")
7290 (version "2.8")
7291 (source
7292 (origin
7293 (method url-fetch)
7294 (uri (pypi-uri "idna" version))
7295 (sha256
7296 (base32
7297 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
7298 (build-system python-build-system)
7299 (home-page "https://github.com/kjd/idna")
7300 (synopsis "Internationalized domain names in applications")
7301 (description
7302 "This is a library to support the Internationalised Domain Names in
7303 Applications (IDNA) protocol as specified in RFC 5891. This version of the
7304 protocol is often referred to as “IDNA2008” and can produce different results
7305 from the earlier standard from 2003. The library is also intended to act as a
7306 suitable drop-in replacement for the “encodings.idna” module that comes with
7307 the Python standard library but currently only supports the older 2003
7308 specification.")
7309 (license license:bsd-4)))
7310
7311 (define-public python-idna-2.7
7312 (package (inherit python-idna)
7313 (version "2.7")
7314 (source (origin
7315 (method url-fetch)
7316 (uri (pypi-uri "idna" version))
7317 (sha256
7318 (base32
7319 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7320
7321
7322 (define-public python2-idna
7323 (package-with-python2 python-idna))
7324
7325 (define-public python-idna-ssl
7326 (package
7327 (name "python-idna-ssl")
7328 (version "1.0.1")
7329 (source
7330 (origin
7331 (method url-fetch)
7332 (uri (pypi-uri "idna-ssl" version))
7333 (sha256
7334 (base32
7335 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7336 (build-system python-build-system)
7337 (arguments
7338 `(#:tests? #f)) ;circular dependency with python-aiohttp
7339 (home-page "https://github.com/aio-libs/idna-ssl")
7340 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7341 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7342 domains support.")
7343 (license license:expat)))
7344
7345 (define-public python-pretend
7346 (package
7347 (name "python-pretend")
7348 (version "1.0.9")
7349 (source
7350 (origin
7351 (method url-fetch)
7352 (uri (pypi-uri "pretend" version))
7353 (sha256
7354 (base32
7355 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7356 (build-system python-build-system)
7357 (home-page "https://github.com/alex/pretend")
7358 (synopsis "Library for stubbing in Python")
7359 (description
7360 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7361 technique for writing tests. You may hear the term mixed up with mocks,
7362 fakes, or doubles. Basically, a stub is an object that returns pre-canned
7363 responses, rather than doing any computation.")
7364 (license license:bsd-3)))
7365
7366 (define-public python2-pretend
7367 (package-with-python2 python-pretend))
7368
7369 (define-public python-pip
7370 (package
7371 (name "python-pip")
7372 (version "19.2.1")
7373 (source
7374 (origin
7375 (method url-fetch)
7376 (uri (pypi-uri "pip" version))
7377 (sha256
7378 (base32
7379 "100sd12ss4mbdj5lf3wawad29cm573b27765mq098x6xhcj71395"))))
7380 (build-system python-build-system)
7381 (arguments
7382 '(#:tests? #f)) ; there are no tests in the pypi archive.
7383 (home-page "https://pip.pypa.io/")
7384 (synopsis "Package manager for Python software")
7385 (description
7386 "Pip is a package manager for Python software, that finds packages on the
7387 Python Package Index (PyPI).")
7388 (license license:expat)))
7389
7390 (define-public python2-pip
7391 (package-with-python2 python-pip))
7392
7393 (define-public python-tlsh
7394 (package
7395 (name "python-tlsh")
7396 (version "3.4.5")
7397 (home-page "https://github.com/trendmicro/tlsh")
7398 (source
7399 (origin
7400 (method git-fetch)
7401 (uri (git-reference
7402 (url "https://github.com/trendmicro/tlsh.git")
7403 (commit (string-append "v" version))))
7404 (file-name (git-file-name name version))
7405 (sha256
7406 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
7407 (build-system cmake-build-system)
7408 (arguments
7409 '(#:out-of-source? #f
7410 #:phases (modify-phases %standard-phases
7411 (replace
7412 'install
7413 (lambda* (#:key outputs #:allow-other-keys)
7414 ;; Build and install the Python bindings. The underlying
7415 ;; C++ library is apparently not meant to be installed.
7416 (let ((out (assoc-ref outputs "out")))
7417 (with-directory-excursion "py_ext"
7418 (and (system* "python" "setup.py" "build")
7419 (system* "python" "setup.py" "install"
7420 (string-append "--prefix=" out))))))))))
7421 (inputs `(("python" ,python-wrapper))) ;for the bindings
7422 (synopsis "Fuzzy matching library for Python")
7423 (description
7424 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7425 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7426 value which can be used for similarity comparisons. Similar objects have
7427 similar hash values, which allows for the detection of similar objects by
7428 comparing their hash values. The byte stream should have a sufficient amount
7429 of complexity; for example, a byte stream of identical bytes will not generate
7430 a hash value.")
7431 (license license:asl2.0)))
7432
7433 (define-public python2-tlsh
7434 (package
7435 (inherit python-tlsh)
7436 (name "python2-tlsh")
7437 (inputs `(("python" ,python-2)))))
7438
7439 (define-public python-termcolor
7440 (package
7441 (name "python-termcolor")
7442 (version "1.1.0")
7443 (source
7444 (origin
7445 (method url-fetch)
7446 (uri (pypi-uri "termcolor" version))
7447 (sha256
7448 (base32
7449 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7450 (build-system python-build-system)
7451 (arguments
7452 ;; There are no tests.
7453 `(#:tests? #f))
7454 (home-page "https://pypi.python.org/pypi/termcolor")
7455 (synopsis "ANSII Color formatting for terminal output")
7456 (description
7457 "This package provides ANSII Color formatting for output in terminals.")
7458 (license license:expat)))
7459
7460 (define-public python2-termcolor
7461 (package-with-python2 python-termcolor))
7462
7463 (define-public python-libarchive-c
7464 (package
7465 (name "python-libarchive-c")
7466 (version "2.8")
7467 (source (origin
7468 (method url-fetch)
7469 (uri (pypi-uri "libarchive-c" version))
7470 (sha256
7471 (base32
7472 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
7473 (build-system python-build-system)
7474 (arguments
7475 '(#:phases (modify-phases %standard-phases
7476 (add-before
7477 'build 'reference-libarchive
7478 (lambda* (#:key inputs #:allow-other-keys)
7479 ;; Retain the absolute file name of libarchive.so.
7480 (let ((libarchive (assoc-ref inputs "libarchive")))
7481 (substitute* "libarchive/ffi.py"
7482 (("find_library\\('archive'\\)")
7483 (string-append "'" libarchive
7484 "/lib/libarchive.so'"))))))
7485 (replace 'check
7486 (lambda _ (invoke "pytest" "-vv"))))))
7487 (native-inputs
7488 `(("python-mock" ,python-mock)
7489 ("python-pytest" ,python-pytest)))
7490 (inputs
7491 `(("libarchive" ,libarchive)))
7492 (home-page "https://github.com/Changaco/python-libarchive-c")
7493 (synopsis "Python interface to libarchive")
7494 (description
7495 "This package provides Python bindings to libarchive, a C library to
7496 access possibly compressed archives in many different formats. It uses
7497 Python's @code{ctypes} foreign function interface (FFI).")
7498 (license license:lgpl2.0+)))
7499
7500 (define-public python2-libarchive-c
7501 (package-with-python2 python-libarchive-c))
7502
7503 (define-public python-file
7504 (package
7505 (inherit file)
7506 (name "python-file")
7507 (build-system python-build-system)
7508 (arguments
7509 '(#:tests? #f ;no tests
7510 #:configure-flags '("--single-version-externally-managed" "--root=/")
7511 #:phases (modify-phases %standard-phases
7512 (add-before 'build 'change-directory
7513 (lambda _
7514 (chdir "python")
7515 #t))
7516 (add-before 'build 'set-library-file-name
7517 (lambda* (#:key inputs #:allow-other-keys)
7518 (let ((file (assoc-ref inputs "file")))
7519 (substitute* "magic.py"
7520 (("find_library\\('magic'\\)")
7521 (string-append "'" file "/lib/libmagic.so'")))
7522 #t))))))
7523 (inputs `(("file" ,file)))
7524 (native-inputs (if (%current-target-system)
7525 `(("self" ,this-package))
7526 '()))
7527 (synopsis "Python bindings to the libmagic file type guesser. Note that
7528 this module and the python-magic module both provide a \"magic.py\" file;
7529 these two modules, which are different and were developed separately, both
7530 serve the same purpose: provide Python bindings for libmagic.")))
7531
7532 (define-public python2-file
7533 (package-with-python2 python-file))
7534
7535 (define-public python-debian
7536 (package
7537 (name "python-debian")
7538 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
7539 (version "0.1.36")
7540 (source
7541 (origin
7542 ;; Use git-fetch, as pypi doesn't include test suite.
7543 (method git-fetch)
7544 (uri (git-reference
7545 (url home-page)
7546 (commit version)))
7547 (file-name (git-file-name name version))
7548 (sha256
7549 (base32
7550 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
7551 (build-system python-build-system)
7552 (arguments
7553 `(#:phases (modify-phases %standard-phases
7554 (add-after 'unpack 'remove-debian-specific-tests
7555 ;; python-apt, apt and dpkg are not yet available in guix,
7556 ;; and these tests heavily depend on them.
7557 (lambda _
7558 (delete-file "lib/debian/tests/test_deb822.py")
7559 (delete-file "lib/debian/tests/test_debfile.py")
7560 #t)))))
7561 (propagated-inputs
7562 `(("python-six" ,python-six)
7563 ("python-chardet" ,python-chardet)))
7564 (synopsis "Debian package related modules")
7565 (description
7566 ;; XXX: Use @enumerate instead of @itemize to work around
7567 ;; <http://bugs.gnu.org/21772>.
7568 "This package provides Python modules that abstract many formats of
7569 Debian-related files, such as:
7570
7571 @enumerate
7572 @item Debtags information;
7573 @item @file{debian/changelog} files;
7574 @item packages files, pdiffs;
7575 @item control files of single or multiple RFC822-style paragraphs---e.g.
7576 @file{debian/control}, @file{.changes}, @file{.dsc};
7577 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7578 contained files and meta-information.
7579 @end enumerate\n")
7580
7581 ;; Modules are either GPLv2+ or GPLv3+.
7582 (license license:gpl3+)))
7583
7584 (define-public python2-debian
7585 (package-with-python2 python-debian))
7586
7587 (define-public python-nbformat
7588 (package
7589 (name "python-nbformat")
7590 (version "4.4.0")
7591 (source
7592 (origin
7593 (method url-fetch)
7594 (uri (pypi-uri "nbformat" version))
7595 (sha256
7596 (base32
7597 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7598 (build-system python-build-system)
7599 (arguments `(#:tests? #f)) ; no test target
7600 (propagated-inputs
7601 `(("python-ipython-genutils" ,python-ipython-genutils)
7602 ("python-jsonschema" ,python-jsonschema)
7603 ("python-jupyter-core" ,python-jupyter-core)
7604 ("python-traitlets" ,python-traitlets)))
7605 (home-page "http://jupyter.org")
7606 (synopsis "Jupyter Notebook format")
7607 (description "This package provides the reference implementation of the
7608 Jupyter Notebook format and Python APIs for working with notebooks.")
7609 (license license:bsd-3)))
7610
7611 (define-public python2-nbformat
7612 (package-with-python2 python-nbformat))
7613
7614 (define-public python-bleach
7615 (package
7616 (name "python-bleach")
7617 (version "3.1.0")
7618 (source
7619 (origin
7620 (method url-fetch)
7621 (uri (pypi-uri "bleach" version))
7622 (sha256
7623 (base32
7624 "1yhrgrhkln8bd6gn3imj69g1h4xqah9gaz9q26crqr6gmmvpzprz"))))
7625 (build-system python-build-system)
7626 (propagated-inputs
7627 `(("python-webencodings" ,python-webencodings)
7628 ("python-six" ,python-six)))
7629 (native-inputs
7630 `(("python-pytest" ,python-pytest)
7631 ("python-pytest-runner" ,python-pytest-runner-2)))
7632 (home-page "https://github.com/jsocol/bleach")
7633 (synopsis "Whitelist-based HTML-sanitizing tool")
7634 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7635 (license license:asl2.0)))
7636
7637 (define-public python2-bleach
7638 (package-with-python2 python-bleach))
7639
7640 (define-public python-entrypoints
7641 (package
7642 (name "python-entrypoints")
7643 (version "0.3")
7644 (source
7645 (origin
7646 (method url-fetch)
7647 (uri (pypi-uri "entrypoints" version))
7648 (sha256
7649 (base32
7650 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
7651 (build-system python-build-system)
7652 ;; The package does not come with a setup.py file, so we have to generate
7653 ;; one ourselves.
7654 (arguments
7655 `(#:tests? #f
7656 #:phases
7657 (modify-phases %standard-phases
7658 (add-after 'unpack 'create-setup.py
7659 (lambda _
7660 (call-with-output-file "setup.py"
7661 (lambda (port)
7662 (format port "\
7663 from setuptools import setup
7664 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7665 " ,version))))))))
7666 (home-page "https://github.com/takluyver/entrypoints")
7667 (synopsis "Discover and load entry points from installed Python packages")
7668 (description "Entry points are a way for Python packages to advertise
7669 objects with some common interface. The most common examples are
7670 @code{console_scripts} entry points, which define shell commands by
7671 identifying a Python function to run. The @code{entrypoints} module contains
7672 functions to find and load entry points.")
7673 (license license:expat)))
7674
7675 (define-public python2-entrypoints
7676 (package-with-python2 python-entrypoints))
7677
7678 (define-public python-nbconvert
7679 (package
7680 (name "python-nbconvert")
7681 (version "5.0.0b1")
7682 (source
7683 (origin
7684 (method url-fetch)
7685 (uri (pypi-uri "nbconvert" version))
7686 (sha256
7687 (base32
7688 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7689 (build-system python-build-system)
7690 (arguments
7691 `(;; The "bdist_egg" target is disabled by default, causing the installation
7692 ;; to fail.
7693 #:configure-flags (list "bdist_egg")
7694 ;; FIXME: 5 failures, 40 errors.
7695 #:tests? #f))
7696 ;; #:phases
7697 ;; (modify-phases %standard-phases
7698 ;; (replace 'check
7699 ;; (lambda _
7700 ;; (zero? (system* "py.test" "-v")))))
7701 (native-inputs
7702 `(("python-pytest" ,python-pytest)))
7703 (propagated-inputs
7704 `(("python-bleach" ,python-bleach)
7705 ("python-entrypoints" ,python-entrypoints)
7706 ("python-jinja2" ,python-jinja2)
7707 ("python-jupyter-core" ,python-jupyter-core)
7708 ("python-mistune" ,python-mistune)
7709 ("python-nbformat" ,python-nbformat)
7710 ("python-pygments" ,python-pygments)
7711 ("python-traitlets" ,python-traitlets)))
7712 (home-page "http://jupyter.org")
7713 (synopsis "Converting Jupyter Notebooks")
7714 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7715 notebooks to various other formats via Jinja templates. It allows you to
7716 convert an @code{.ipynb} notebook file into various static formats including:
7717
7718 @enumerate
7719 @item HTML
7720 @item LaTeX
7721 @item PDF
7722 @item Reveal JS
7723 @item Markdown (md)
7724 @item ReStructured Text (rst)
7725 @item executable script
7726 @end enumerate\n")
7727 (license license:bsd-3)))
7728
7729 (define-public python2-nbconvert
7730 (package-with-python2 python-nbconvert))
7731
7732 (define-public python-notebook
7733 (package
7734 (name "python-notebook")
7735 (version "5.7.4")
7736 (source (origin
7737 (method url-fetch)
7738 (uri (pypi-uri "notebook" version))
7739 (sha256
7740 (base32
7741 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7742 (build-system python-build-system)
7743 (arguments
7744 `(#:phases
7745 (modify-phases %standard-phases
7746 (replace 'check
7747 (lambda _
7748 ;; These tests require a browser
7749 (delete-file-recursively "notebook/tests/selenium")
7750 ;; Some tests need HOME
7751 (setenv "HOME" "/tmp")
7752 ;; This file contains "warningfilters", which are not supported
7753 ;; by this version of nose.
7754 (delete-file "setup.cfg")
7755 (with-directory-excursion "/tmp"
7756 (invoke "nosetests" "-v"))
7757 #t)))))
7758 (propagated-inputs
7759 `(("python-jupyter-core" ,python-jupyter-core)
7760 ("python-nbformat" ,python-nbformat)
7761 ("python-nbconvert" ,python-nbconvert)
7762 ("python-prometheus-client" ,python-prometheus-client)
7763 ("python-send2trash" ,python-send2trash)
7764 ("python-terminado" ,python-terminado)))
7765 (native-inputs
7766 `(("python-nose" ,python-nose)
7767 ("python-sphinx" ,python-sphinx)
7768 ("python-requests" ,python-requests)))
7769 (home-page "http://jupyter.org/")
7770 (synopsis "Web-based notebook environment for interactive computing")
7771 (description
7772 "The Jupyter HTML notebook is a web-based notebook environment for
7773 interactive computing.")
7774 (properties `((python2-variant . ,(delay python2-notebook))))
7775 (license license:bsd-3)))
7776
7777 (define-public python2-notebook
7778 (let ((base (package-with-python2
7779 (strip-python2-variant python-notebook))))
7780 (package (inherit base)
7781 (native-inputs
7782 `(("python2-mock" ,python2-mock)
7783 ,@(package-native-inputs base)))
7784 (arguments
7785 (substitute-keyword-arguments (package-arguments base)
7786 ((#:phases phases)
7787 `(modify-phases ,phases
7788 (add-before 'check 'disable-test-case
7789 ;; The test requires network access to localhost. Curiously it
7790 ;; fails with Python 2 only. Simply make the test-case return
7791 ;; immediately.
7792 (lambda _
7793 (substitute*
7794 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7795 (("formats = self.nbconvert_api") "return #")))))))))))
7796
7797 (define-public python-widgetsnbextension
7798 (package
7799 (name "python-widgetsnbextension")
7800 (version "3.4.2")
7801 (source
7802 (origin
7803 (method url-fetch)
7804 (uri (pypi-uri "widgetsnbextension" version))
7805 (sha256
7806 (base32
7807 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7808 (build-system python-build-system)
7809 (propagated-inputs
7810 `(("python-ipykernel" ,python-ipykernel)
7811 ("python-notebook" ,python-notebook)))
7812 (native-inputs
7813 `(("python-certifi" ,python-certifi)
7814 ("python-nose" ,python-nose)))
7815 (home-page "https://ipython.org")
7816 (synopsis "IPython HTML widgets for Jupyter")
7817 (description "This package provides interactive HTML widgets for Jupyter
7818 notebooks.")
7819 (license license:bsd-3)))
7820
7821 (define-public python2-widgetsnbextension
7822 (package-with-python2 python-widgetsnbextension))
7823
7824 (define-public python-ipywidgets
7825 (package
7826 (name "python-ipywidgets")
7827 (version "5.2.2")
7828 (source
7829 (origin
7830 (method url-fetch)
7831 (uri (pypi-uri "ipywidgets" version))
7832 (sha256
7833 (base32
7834 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7835 (build-system python-build-system)
7836 (propagated-inputs
7837 `(("python-ipython" ,python-ipython)
7838 ("python-traitlets" ,python-traitlets)
7839 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7840 (native-inputs
7841 `(("python-nose" ,python-nose)
7842 ("python-pytest" ,python-pytest)))
7843 (home-page "https://ipython.org")
7844 (synopsis "IPython HTML widgets for Jupyter")
7845 (description "Ipywidgets are interactive HTML widgets for Jupyter
7846 notebooks and the IPython kernel. Notebooks come alive when interactive
7847 widgets are used. Users gain control of their data and can visualize changes
7848 in the data.")
7849 (license license:bsd-3)))
7850
7851 (define-public python2-ipywidgets
7852 (package-with-python2 python-ipywidgets))
7853
7854 (define-public python-jupyter-console
7855 (package
7856 (name "python-jupyter-console")
7857 (version "6.0.0")
7858 (source
7859 (origin
7860 (method url-fetch)
7861 (uri (pypi-uri "jupyter_console" version))
7862 (sha256
7863 (base32
7864 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
7865 (build-system python-build-system)
7866 (propagated-inputs
7867 `(("python-ipykernel" ,python-ipykernel)
7868 ("python-jupyter-client" ,python-jupyter-client)
7869 ("python-prompt-toolkit" ,python-prompt-toolkit)
7870 ("python-pygments" ,python-pygments)))
7871 (native-inputs
7872 `(("python-nose" ,python-nose)))
7873 (home-page "https://jupyter.org")
7874 (synopsis "Jupyter terminal console")
7875 (description "This package provides a terminal-based console frontend for
7876 Jupyter kernels. It also allows for console-based interaction with non-Python
7877 Jupyter kernels such as IJulia and IRKernel.")
7878 (license license:bsd-3)))
7879
7880 (define-public python2-jupyter-console
7881 (package
7882 (name "python2-jupyter-console")
7883 (version "5.2.0")
7884 (source
7885 (origin
7886 (method url-fetch)
7887 (uri (pypi-uri "jupyter_console" version))
7888 (sha256
7889 (base32
7890 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7891 (build-system python-build-system)
7892 ;; Tests only run in an TTY.
7893 (arguments `(#:tests? #f))
7894 (propagated-inputs
7895 `(("python2-ipykernel" ,python2-ipykernel)
7896 ("python2-jupyter-client" ,python2-jupyter-client)
7897 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7898 ("python2-pygments" ,python2-pygments)))
7899 (native-inputs
7900 `(("python2-nose" ,python2-nose)))
7901 (home-page "https://jupyter.org")
7902 (synopsis "Jupyter terminal console")
7903 (description "This package provides a terminal-based console frontend for
7904 Jupyter kernels. It also allows for console-based interaction with non-Python
7905 Jupyter kernels such as IJulia and IRKernel.")
7906 (license license:bsd-3)))
7907
7908 ;; The python-ipython and python-jupyter-console require each other. To get
7909 ;; the functionality in both packages working, strip down the
7910 ;; python-jupyter-console package when using it as an input to python-ipython.
7911 (define python-jupyter-console-minimal
7912 (package
7913 (inherit python-jupyter-console)
7914 (name "python-jupyter-console-minimal")
7915 (arguments
7916 (substitute-keyword-arguments
7917 (package-arguments python-jupyter-console)
7918 ((#:phases phases)
7919 `(modify-phases ,phases
7920 (add-after 'install 'delete-bin
7921 (lambda* (#:key outputs #:allow-other-keys)
7922 ;; Delete the bin files, to avoid conflicts in profiles
7923 ;; where python-ipython and python-jupyter-console are
7924 ;; both present.
7925 (delete-file-recursively
7926 (string-append
7927 (assoc-ref outputs "out") "/bin"))))))))
7928 ;; Remove the python-ipython propagated input, to avoid the cycle
7929 (propagated-inputs
7930 (alist-delete
7931 "python-ipython"
7932 (package-propagated-inputs python-jupyter-console)))))
7933
7934 (define-public python-qtconsole
7935 (package
7936 (name "python-qtconsole")
7937 (version "4.4.3")
7938 (source
7939 (origin
7940 (method url-fetch)
7941 (uri (pypi-uri "qtconsole" version))
7942 (sha256
7943 (base32
7944 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
7945 (build-system python-build-system)
7946 (arguments
7947 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
7948 ;; but we only have the LTS version 5.x. This means that there might be
7949 ;; runtime errors, but since this is a dependency of the Jupyter package,
7950 ;; and Jupyter can be used without the qtconsole we can overlook this for
7951 ;; now.
7952 `(#:tests? #f
7953 #:phases
7954 (modify-phases %standard-phases
7955 (add-before 'check 'pre-check
7956 (lambda _
7957 (setenv "QT_QPA_PLATFORM" "offscreen")
7958 #t)))))
7959 (propagated-inputs
7960 `(("python-ipykernel" ,python-ipykernel)
7961 ("python-ipython" ,python-ipython)))
7962 (native-inputs
7963 `(("python-pytest" ,python-pytest)))
7964 (home-page "http://jupyter.org")
7965 (synopsis "Jupyter Qt console")
7966 (description "This package provides a Qt-based console for Jupyter with
7967 support for rich media output.")
7968 (license license:bsd-3)))
7969
7970 (define-public python-jsbeautifier
7971 (package
7972 (name "python-jsbeautifier")
7973 (version "1.10.2")
7974 (home-page "https://github.com/beautify-web/js-beautify")
7975 (source (origin
7976 (method git-fetch)
7977 (uri (git-reference
7978 (url home-page)
7979 (commit (string-append "v" version))))
7980 (file-name (git-file-name name version))
7981 (sha256
7982 (base32
7983 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
7984 (build-system python-build-system)
7985 (arguments
7986 `(#:phases (modify-phases %standard-phases
7987 (add-after 'unpack 'chdir
7988 (lambda _
7989 ;; The upstream Git repository contains all the code,
7990 ;; but this package only builds the python code.
7991 (chdir "python")
7992 #t))
7993 (add-after 'unpack 'patch-python-six-requirements
7994 (lambda _
7995 (substitute* "python/setup.py"
7996 (("six>=1.12.0")
7997 "six>=1.11.0"))
7998 #t)))))
7999 (propagated-inputs
8000 `(("python-editorconfig" ,python-editorconfig)
8001 ("python-six" ,python-six)))
8002 (native-inputs
8003 `(("python-pytest" ,python-pytest)))
8004 (synopsis "JavaScript unobfuscator and beautifier")
8005 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
8006 popular online obfuscators.")
8007 (license license:expat)))
8008
8009 (define-public jupyter
8010 (package
8011 (name "jupyter")
8012 (version "1.0.0")
8013 (source
8014 (origin
8015 (method url-fetch)
8016 (uri (pypi-uri "jupyter" version))
8017 (sha256
8018 (base32
8019 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8020 (build-system python-build-system)
8021 (arguments '(#:tests? #f)) ; there are none.
8022 (propagated-inputs
8023 `(("python-ipykernel" ,python-ipykernel)
8024 ("python-ipywidgets" ,python-ipywidgets)
8025 ("python-jupyter-console" ,python-jupyter-console)
8026 ("python-nbconvert" ,python-nbconvert)
8027 ("python-notebook" ,python-notebook)
8028 ("python-qtconsole" ,python-qtconsole)))
8029 (native-search-paths
8030 (list (search-path-specification
8031 (variable "JUPYTER_PATH")
8032 (files '("share/jupyter")))))
8033 (home-page "https://jupyter.org")
8034 (synopsis "Web application for interactive documents")
8035 (description
8036 "The Jupyter Notebook is a web application that allows you to create and
8037 share documents that contain live code, equations, visualizations and
8038 explanatory text. Uses include: data cleaning and transformation, numerical
8039 simulation, statistical modeling, machine learning and much more.")
8040 (license license:bsd-3)))
8041
8042 (define-public python-chardet
8043 (package
8044 (name "python-chardet")
8045 (version "3.0.4")
8046 (source
8047 (origin
8048 (method url-fetch)
8049 (uri (pypi-uri "chardet" version))
8050 (sha256
8051 (base32
8052 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
8053 (native-inputs
8054 `(("python-hypothesis" ,python-hypothesis)
8055 ("python-pytest" ,python-pytest)
8056 ("python-pytest-runner" ,python-pytest-runner)))
8057 (build-system python-build-system)
8058 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
8059 (arguments `(#:tests? #f))
8060 (home-page "https://github.com/chardet/chardet")
8061 (synopsis "Universal encoding detector for Python 2 and 3")
8062 (description
8063 "This package provides @code{chardet}, a Python module that can
8064 automatically detect a wide range of file encodings.")
8065 (license license:lgpl2.1+)))
8066
8067 (define-public python2-chardet
8068 (package-with-python2 python-chardet))
8069
8070 (define-public python-docopt
8071 (package
8072 (name "python-docopt")
8073 (version "0.6.2")
8074 (source
8075 (origin
8076 (method url-fetch)
8077 ;; The release on PyPI does not include tests.
8078 (uri (string-append
8079 "https://github.com/docopt/docopt/archive/"
8080 version ".tar.gz"))
8081 (file-name (string-append name "-" version ".tar.gz"))
8082 (sha256
8083 (base32
8084 "16bf890xbdz3m30rsv2qacklh2rdn1zrfspfnwzx9g7vwz8yw4r1"))))
8085 (build-system python-build-system)
8086 (native-inputs
8087 `(("python-pytest" ,python-pytest)))
8088 (arguments
8089 `(#:phases
8090 (modify-phases %standard-phases
8091 (replace 'check
8092 (lambda _ (invoke "py.test"))))))
8093 (home-page "http://docopt.org")
8094 (synopsis "Command-line interface description language for Python")
8095 (description "This library allows the user to define a command-line
8096 interface from a program's help message rather than specifying it
8097 programmatically with command-line parsers like @code{getopt} and
8098 @code{argparse}.")
8099 (license license:expat)))
8100
8101 (define-public python2-docopt
8102 (package-with-python2 python-docopt))
8103
8104 (define-public python-pythondialog
8105 (package
8106 (name "python-pythondialog")
8107 (version "3.4.0")
8108 (source
8109 (origin
8110 (method url-fetch)
8111 (uri (pypi-uri "pythondialog" version))
8112 (sha256
8113 (base32
8114 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8115 (build-system python-build-system)
8116 (arguments
8117 `(#:phases
8118 (modify-phases %standard-phases
8119 (add-after 'unpack 'patch-path
8120 (lambda* (#:key inputs #:allow-other-keys)
8121 (let* ((dialog (assoc-ref inputs "dialog")))
8122 ;; Since this library really wants to grovel the search path, we
8123 ;; must hardcode dialog's store path into it.
8124 (substitute* "dialog.py"
8125 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8126 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8127 #t))))
8128 #:tests? #f)) ; no test suite
8129 (propagated-inputs
8130 `(("dialog" ,dialog)))
8131 (home-page "http://pythondialog.sourceforge.net/")
8132 (synopsis "Python interface to the UNIX dialog utility")
8133 (description "A Python wrapper for the dialog utility. Its purpose is to
8134 provide an easy to use, pythonic and comprehensive Python interface to dialog.
8135 This allows one to make simple text-mode user interfaces on Unix-like systems")
8136 (license license:lgpl2.1)
8137 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8138
8139 (define-public python2-pythondialog
8140 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8141 (package
8142 (inherit base)
8143 (version (package-version python-pythondialog))
8144 (source (origin
8145 (method url-fetch)
8146 (uri (pypi-uri "python2-pythondialog" version))
8147 (sha256
8148 (base32
8149 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8150
8151 (define-public python-configobj
8152 (package
8153 (name "python-configobj")
8154 (version "5.0.6")
8155 (source (origin
8156 (method url-fetch)
8157 (uri (pypi-uri "configobj" version))
8158 (sha256
8159 (base32
8160 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8161 ;; Patch setup.py so it looks for python-setuptools, which is
8162 ;; required to parse the keyword 'install_requires' in setup.py.
8163 (patches (search-patches "python-configobj-setuptools.patch"))))
8164 (build-system python-build-system)
8165 (propagated-inputs
8166 `(("python-six" ,python-six)))
8167 (synopsis "Config file reading, writing and validation")
8168 (description "ConfigObj is a simple but powerful config file reader and
8169 writer: an ini file round tripper. Its main feature is that it is very easy to
8170 use, with a straightforward programmer’s interface and a simple syntax for
8171 config files.")
8172 (home-page "https://github.com/DiffSK/configobj")
8173 (license license:bsd-3)))
8174
8175 (define-public python2-configobj
8176 (package-with-python2 python-configobj))
8177
8178 (define-public python-configargparse
8179 (package
8180 (name "python-configargparse")
8181 (version "0.14.0")
8182 (source (origin
8183 (method url-fetch)
8184 (uri (pypi-uri "ConfigArgParse" version))
8185 (sha256
8186 (base32
8187 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
8188 (build-system python-build-system)
8189 (native-inputs
8190 `(("python-pyyaml" ,python-pyyaml)))
8191 (arguments
8192 `(#:phases
8193 (modify-phases %standard-phases
8194 (replace 'check
8195 (lambda _
8196 ;; Bypass setuptools-shim because one test relies on "setup.py"
8197 ;; being the first argument passed to the python call.
8198 ;;
8199 ;; NOTE: Many tests do not run because they rely on Python's
8200 ;; built-in test.test_argparse, but we remove the unit tests from
8201 ;; our Python installation.
8202 (invoke "python" "setup.py" "test"))))))
8203 (synopsis "Replacement for argparse")
8204 (description "A drop-in replacement for argparse that allows options to also
8205 be set via config files and/or environment variables.")
8206 (home-page "https://github.com/bw2/ConfigArgParse")
8207 (license license:expat)))
8208
8209 (define-public python2-configargparse
8210 (package-with-python2 python-configargparse))
8211
8212 (define-public python-argparse-manpage
8213 (package
8214 (name "python-argparse-manpage")
8215 (version "1.1")
8216 (source
8217 (origin
8218 (method url-fetch)
8219 (uri (pypi-uri "argparse-manpage" version))
8220 (sha256
8221 (base32
8222 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8223 (build-system python-build-system)
8224 (home-page "https://github.com/praiskup/argparse-manpage")
8225 (synopsis "Build manual page from Python's ArgumentParser object")
8226 (description
8227 "This package provides tools to build manual pages from Python's
8228 @code{ArgumentParser} object.")
8229 (license license:asl2.0)))
8230
8231 (define-public python-contextlib2
8232 (package
8233 (name "python-contextlib2")
8234 (version "0.5.5")
8235 (source
8236 (origin
8237 (method url-fetch)
8238 (uri (pypi-uri "contextlib2" version))
8239 (sha256
8240 (base32
8241 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8242 (build-system python-build-system)
8243 (home-page "http://contextlib2.readthedocs.org/")
8244 (synopsis "Tools for decorators and context managers")
8245 (description "This module is primarily a backport of the Python
8246 3.2 contextlib to earlier Python versions. Like contextlib, it
8247 provides utilities for common tasks involving decorators and context
8248 managers. It also contains additional features that are not part of
8249 the standard library.")
8250 (license license:psfl)))
8251
8252 (define-public python2-contextlib2
8253 (package
8254 (name "python2-contextlib2")
8255 (version "0.5.5")
8256 (source
8257 (origin
8258 (method url-fetch)
8259 (uri (pypi-uri "contextlib2" version))
8260 (sha256
8261 (base32
8262 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8263 (build-system python-build-system)
8264 (arguments
8265 `(#:python ,python-2
8266 #:phases
8267 (modify-phases %standard-phases
8268 (replace 'check
8269 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
8270 (native-inputs
8271 `(("python2-unittest2" ,python2-unittest2)))
8272 (home-page "http://contextlib2.readthedocs.org/")
8273 (synopsis "Tools for decorators and context managers")
8274 (description "This module is primarily a backport of the Python
8275 3.2 contextlib to earlier Python versions. Like contextlib, it
8276 provides utilities for common tasks involving decorators and context
8277 managers. It also contains additional features that are not part of
8278 the standard library.")
8279 (license license:psfl)))
8280
8281 (define-public python-texttable
8282 (package
8283 (name "python-texttable")
8284 (version "0.9.1")
8285 (source
8286 (origin
8287 (method url-fetch)
8288 (uri (pypi-uri "texttable" version))
8289 (sha256
8290 (base32
8291 "0yawv64c0zbawwv6zz84whb32fnb2n9jylwjcfsrcdgh7xvl340i"))))
8292 (build-system python-build-system)
8293 (arguments '(#:tests? #f)) ; no tests
8294 (home-page "https://github.com/foutaise/texttable/")
8295 (synopsis "Python module for creating simple ASCII tables")
8296 (description "Texttable is a Python module for creating simple ASCII
8297 tables.")
8298 (license license:lgpl2.1+)))
8299
8300 (define-public python2-texttable
8301 (package-with-python2 python-texttable))
8302
8303 (define-public python-atomicwrites
8304 (package
8305 (name "python-atomicwrites")
8306 (version "1.3.0")
8307 (source (origin
8308 (method url-fetch)
8309 (uri (pypi-uri "atomicwrites" version))
8310 (sha256
8311 (base32
8312 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
8313 (build-system python-build-system)
8314 (synopsis "Atomic file writes in Python")
8315 (description "Library for atomic file writes using platform dependent tools
8316 for atomic file system operations.")
8317 (home-page "https://github.com/untitaker/python-atomicwrites")
8318 (license license:expat)))
8319
8320 (define-public python2-atomicwrites
8321 (package-with-python2 python-atomicwrites))
8322
8323 (define-public python-click-threading
8324 (package
8325 (name "python-click-threading")
8326 (version "0.4.4")
8327 (source (origin
8328 (method url-fetch)
8329 (uri (pypi-uri "click-threading" version))
8330 (sha256
8331 (base32
8332 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8333 (build-system python-build-system)
8334 (propagated-inputs
8335 `(("python-click" ,python-click)))
8336 (synopsis "Utilities for multithreading in Click")
8337 (description "This package provides utilities for multithreading in Click
8338 applications.")
8339 (home-page "https://github.com/click-contrib/click-threading")
8340 (license license:expat)))
8341
8342 (define-public python-click-log
8343 (package
8344 (name "python-click-log")
8345 (version "0.3.2")
8346 (source (origin
8347 (method url-fetch)
8348 (uri (pypi-uri "click-log" version))
8349 (sha256
8350 (base32
8351 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8352 (build-system python-build-system)
8353 (propagated-inputs
8354 `(("python-click" ,python-click)))
8355 (synopsis "Logging for click applications")
8356 (description "This package provides a Python library for logging Click
8357 applications.")
8358 (home-page "https://github.com/click-contrib/click-log")
8359 (license license:expat)))
8360
8361 (define-public python-apipkg
8362 (package
8363 (name "python-apipkg")
8364 (version "1.4")
8365 (source (origin
8366 (method url-fetch)
8367 (uri (pypi-uri "apipkg" version))
8368 (sha256
8369 (base32
8370 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8371 (build-system python-build-system)
8372 (native-inputs
8373 `(("python-pytest" ,python-pytest)))
8374 (synopsis "Namespace control and lazy-import mechanism")
8375 (description "With apipkg you can control the exported namespace of a Python
8376 package and greatly reduce the number of imports for your users. It is a small
8377 pure Python module that works on virtually all Python versions.")
8378 (home-page "https://github.com/pytest-dev/apipkg")
8379 (license license:expat)))
8380
8381 (define-public python2-apipkg
8382 (package-with-python2 python-apipkg))
8383
8384 (define-public python-execnet
8385 (package
8386 (name "python-execnet")
8387 (version "1.4.1")
8388 (source (origin
8389 (method url-fetch)
8390 (uri (pypi-uri "execnet" version))
8391 (sha256
8392 (base32
8393 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8394 (build-system python-build-system)
8395 (arguments
8396 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8397 ;; The two test failures are caused by the lack of an `ssh` executable.
8398 ;; The test suite can be run with pytest after the 'install' phase.
8399 #:tests? #f))
8400 (native-inputs
8401 `(("python-pytest" ,python-pytest)
8402 ("python-setuptools-scm" ,python-setuptools-scm)))
8403 (propagated-inputs
8404 `(("python-apipkg" ,python-apipkg)))
8405 (synopsis "Rapid multi-Python deployment")
8406 (description "Execnet provides a share-nothing model with
8407 channel-send/receive communication for distributing execution across many
8408 Python interpreters across version, platform and network barriers. It has a
8409 minimal and fast API targeting the following uses:
8410 @enumerate
8411 @item distribute tasks to (many) local or remote CPUs
8412 @item write and deploy hybrid multi-process applications
8413 @item write scripts to administer multiple environments
8414 @end enumerate")
8415 (home-page "http://codespeak.net/execnet/")
8416 (license license:expat)))
8417
8418 (define-public python2-execnet
8419 (package-with-python2 python-execnet))
8420
8421 (define-public python-icalendar
8422 (package
8423 (name "python-icalendar")
8424 (version "4.0.4")
8425 (source (origin
8426 (method url-fetch)
8427 (uri (pypi-uri "icalendar" version))
8428 (sha256
8429 (base32
8430 "16gjvqv0n05jrb9g228pdjgzd3amz2pdhvcgsn1jypszjg5m2w9l"))))
8431 (build-system python-build-system)
8432 (propagated-inputs
8433 `(("python-dateutil" ,python-dateutil)
8434 ("python-pytz" ,python-pytz)))
8435 (synopsis "Python library for parsing iCalendar files")
8436 (description "The icalendar package is a parser/generator of iCalendar
8437 files for use with Python.")
8438 (home-page "https://github.com/collective/icalendar")
8439 (license license:bsd-2)))
8440
8441 (define-public python-args
8442 (package
8443 (name "python-args")
8444 (version "0.1.0")
8445 (source (origin
8446 (method url-fetch)
8447 (uri (pypi-uri "args" version))
8448 (sha256
8449 (base32
8450 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8451 (build-system python-build-system)
8452 (home-page "https://github.com/kennethreitz/args")
8453 (synopsis "Command-line argument parser")
8454 (description
8455 "This library provides a Python module to parse command-line arguments.")
8456 (license license:bsd-3)))
8457
8458 (define-public python2-args
8459 (package-with-python2 python-args))
8460
8461 (define-public python-clint
8462 (package
8463 (name "python-clint")
8464 (version "0.5.1")
8465 (source (origin
8466 (method url-fetch)
8467 (uri (pypi-uri "clint" version))
8468 (sha256
8469 (base32
8470 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8471 (build-system python-build-system)
8472 (arguments
8473 '(#:phases
8474 (modify-phases %standard-phases
8475 (replace 'check
8476 (lambda _ (invoke "py.test" "-v"))))))
8477 (native-inputs
8478 `(("python-pytest" ,python-pytest)))
8479 (propagated-inputs
8480 `(("python-args" ,python-args)))
8481 (home-page "https://github.com/kennethreitz/clint")
8482 (synopsis "Command-line interface tools")
8483 (description
8484 "Clint is a Python module filled with a set of tools for developing
8485 command-line applications, including tools for colored and indented
8486 output, progress bar display, and pipes.")
8487 (license license:isc)))
8488
8489 (define-public python2-clint
8490 (package-with-python2 python-clint))
8491
8492 (define-public python-rply
8493 (package
8494 (name "python-rply")
8495 (version "0.7.5")
8496 (source (origin
8497 (method url-fetch)
8498 (uri (pypi-uri "rply" version))
8499 (sha256
8500 (base32
8501 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8502 (build-system python-build-system)
8503 (propagated-inputs
8504 `(("python-appdirs" ,python-appdirs)))
8505 (home-page "https://github.com/alex/rply")
8506 (synopsis "Parser generator for Python")
8507 (description
8508 "This package provides a pure Python based parser generator, that also
8509 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8510 with a new public API, and RPython support.")
8511 (license license:bsd-3)))
8512
8513 (define-public python2-rply
8514 (package-with-python2 python-rply))
8515
8516 (define-public python-hy
8517 (package
8518 (name "python-hy")
8519 (version "0.17.0")
8520 (source (origin
8521 (method url-fetch)
8522 (uri (pypi-uri "hy" version))
8523 (sha256
8524 (base32
8525 "1gdbqsirsdxj320wnp7my5awzs1kfs6m4fqmkzbd1zd47qzj0zfi"))))
8526 (build-system python-build-system)
8527 (arguments
8528 '(#:phases
8529 (modify-phases %standard-phases
8530 (add-before 'install 'set-HOME
8531 (lambda _
8532 (setenv "HOME" "/tmp")))
8533 (replace 'check
8534 (lambda _
8535 ;; Tests require write access to HOME.
8536 (setenv "HOME" "/tmp")
8537 (invoke "nosetests"))))))
8538 (native-inputs
8539 `(("python-coverage" ,python-coverage)
8540 ("python-nose" ,python-nose)))
8541 (propagated-inputs
8542 `(("python-astor" ,python-astor)
8543 ("python-clint" ,python-clint)
8544 ("python-rply" ,python-rply)
8545 ("python-fastentrypoints"
8546 ,python-fastentrypoints)
8547 ("python-funcparserlib"
8548 ,python-funcparserlib)))
8549 (home-page "http://hylang.org/")
8550 (synopsis "Lisp frontend to Python")
8551 (description
8552 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8553 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8554 Python at your fingertips, in Lisp form.")
8555 (license license:expat)))
8556
8557 (define-public python2-hy
8558 (package-with-python2 python-hy))
8559
8560 (define-public python2-functools32
8561 (package
8562 (name "python2-functools32")
8563 (version "3.2.3-2")
8564 (source
8565 (origin
8566 (method url-fetch)
8567 (uri (pypi-uri "functools32" version))
8568 (sha256
8569 (base32
8570 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8571 (build-system python-build-system)
8572 (arguments
8573 `(#:python ,python-2
8574 #:tests? #f)) ; no test target
8575 (home-page "https://github.com/MiCHiLU/python-functools32")
8576 (synopsis
8577 "Backport of the functools module from Python 3.2.3")
8578 (description
8579 "This package is a backport of the @code{functools} module from Python
8580 3.2.3 for use with older versions of Python and PyPy.")
8581 (license license:expat)))
8582
8583 (define-public python2-subprocess32
8584 (package
8585 (name "python2-subprocess32")
8586 (version "3.2.7")
8587 (source (origin
8588 (method url-fetch)
8589 (uri (pypi-uri "subprocess32" version))
8590 (sha256
8591 (base32
8592 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8593 (patches
8594 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8595 (build-system python-build-system)
8596 (arguments
8597 `(#:python ,python-2
8598 ;; The test suite fails with Python > 2.7.13:
8599 ;; import test.support
8600 ;; ImportError: No module named support
8601 #:tests? #f
8602 #:phases
8603 (modify-phases %standard-phases
8604 (add-after 'unpack 'patch-/bin/sh
8605 (lambda _
8606 (substitute* '("subprocess32.py"
8607 "test_subprocess32.py")
8608 (("/bin/sh") (which "sh")))
8609 #t)))))
8610 (home-page "https://github.com/google/python-subprocess32")
8611 (synopsis "Backport of the subprocess module from Python 3.2")
8612 (description
8613 "This is a backport of the @code{subprocess} standard library module
8614 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8615 new features. On POSIX systems it is guaranteed to be reliable when used
8616 in threaded applications. It includes timeout support from Python 3.3 but
8617 otherwise matches 3.2’s API.")
8618 (license license:psfl)))
8619
8620 (define-public python2-futures
8621 (package
8622 (name "python2-futures")
8623 (version "3.2.0")
8624 (source
8625 (origin
8626 (method url-fetch)
8627 (uri (pypi-uri "futures" version))
8628 (sha256
8629 (base32
8630 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8631 (build-system python-build-system)
8632 (arguments
8633 `(#:python ,python-2
8634 #:phases
8635 (modify-phases %standard-phases
8636 (replace 'check
8637 (lambda _
8638 (invoke "python" "test_futures.py")
8639 #t)))))
8640 (home-page "https://github.com/agronholm/pythonfutures")
8641 (synopsis
8642 "Backport of the concurrent.futures package from Python 3.2")
8643 (description
8644 "The concurrent.futures module provides a high-level interface for
8645 asynchronously executing callables. This package backports the
8646 concurrent.futures package from Python 3.2")
8647 (license license:bsd-3)))
8648
8649 (define-public python-promise
8650 (package
8651 (name "python-promise")
8652 (version "0.4.2")
8653 (source
8654 (origin
8655 (method url-fetch)
8656 (uri (pypi-uri "promise" version))
8657 (sha256
8658 (base32
8659 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8660 (build-system python-build-system)
8661 ;; Tests wants python-futures, which is a python2 only program, and
8662 ;; can't be found by python-promise at test time.
8663 (arguments `(#:tests? #f))
8664 (home-page "https://github.com/syrusakbary/promise")
8665 (synopsis "Promises/A+ implementation for Python")
8666 (description
8667 "Promises/A+ implementation for Python")
8668 (properties `((python2-variant . ,(delay python2-promise))))
8669 (license license:expat)))
8670
8671 (define-public python2-promise
8672 (let ((promise (package-with-python2
8673 (strip-python2-variant python-promise))))
8674 (package (inherit promise)
8675 (arguments (substitute-keyword-arguments (package-arguments promise)
8676 ((#:tests? _) #t)))
8677 (native-inputs
8678 `(("python2-futures" ,python2-futures)
8679 ("python2-pytest" ,python2-pytest)
8680 ,@(package-native-inputs promise))))))
8681
8682 (define-public python-progressbar33
8683 (package
8684 (name "python-progressbar33")
8685 (version "2.4")
8686 (source
8687 (origin
8688 (method url-fetch)
8689 (uri (pypi-uri "progressbar33" version))
8690 (sha256
8691 (base32
8692 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
8693 (build-system python-build-system)
8694 (home-page "http://github.com/germangh/python-progressbar")
8695 (synopsis "Text progress bar library for Python")
8696 (description
8697 "This package provides a text progress bar library for Python. This
8698 version only differs from the original @code{progressbar} package in that it
8699 uses relative package imports instead of absolute imports, which is necessary
8700 for the module to work under Python 3.3.")
8701 ;; Either or both of these licenses may be selected.
8702 (license (list license:lgpl2.1+ license:bsd-3))))
8703
8704 (define-public python-colorama
8705 (package
8706 (name "python-colorama")
8707 (version "0.3.9")
8708 (source
8709 (origin
8710 (method url-fetch)
8711 (uri (pypi-uri "colorama" version))
8712 (sha256
8713 (base32
8714 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
8715 (build-system python-build-system)
8716 (synopsis "Colored terminal text rendering for Python")
8717 (description "Colorama is a Python library for rendering colored terminal
8718 text.")
8719 (home-page "https://pypi.python.org/pypi/colorama")
8720 (license license:bsd-3)))
8721
8722 (define-public python2-colorama
8723 (package-with-python2 python-colorama))
8724
8725 (define-public python-rsa
8726 (package
8727 (name "python-rsa")
8728 (version "3.4.2")
8729 (source
8730 (origin
8731 (method url-fetch)
8732 (uri (pypi-uri "rsa" version))
8733 (sha256
8734 (base32
8735 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8736 (build-system python-build-system)
8737 (propagated-inputs
8738 `(("python-pyasn1" ,python-pyasn1)))
8739 (synopsis "Pure-Python RSA implementation")
8740 (description "Python-RSA is a pure-Python RSA implementation. It supports
8741 encryption and decryption, signing and verifying signatures, and key
8742 generation according to PKCS#1 version 1.5. It can be used as a Python
8743 library as well as on the command line.")
8744 (home-page "https://stuvel.eu/rsa")
8745 (license license:asl2.0)))
8746
8747 (define-public python2-rsa
8748 (package-with-python2 python-rsa))
8749
8750 (define-public python-pluggy
8751 (package
8752 (name "python-pluggy")
8753 (version "0.11.0")
8754 (source
8755 (origin
8756 (method url-fetch)
8757 (uri (pypi-uri "pluggy" version))
8758 (sha256
8759 (base32
8760 "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895"))))
8761 (build-system python-build-system)
8762 (native-inputs
8763 `(("python-setuptools-scm" ,python-setuptools-scm)))
8764 (synopsis "Plugin and hook calling mechanism for Python")
8765 (description "Pluggy is an extraction of the plugin manager as used by
8766 Pytest but stripped of Pytest specific details.")
8767 (home-page "https://pypi.python.org/pypi/pluggy")
8768 (license license:expat)))
8769
8770 (define-public python2-pluggy
8771 (package-with-python2 python-pluggy))
8772
8773 (define-public python-tox
8774 (package
8775 (name "python-tox")
8776 (version "2.8.1")
8777 (source
8778 (origin
8779 (method url-fetch)
8780 (uri (pypi-uri "tox" version))
8781 (sha256
8782 (base32
8783 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8784 (build-system python-build-system)
8785 (arguments
8786 ;; FIXME: Tests require pytest-timeout, which itself requires
8787 ;; pytest>=2.8.0 for installation.
8788 '(#:tests? #f))
8789 (propagated-inputs
8790 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8791 ("python-py" ,python-py)
8792 ("python-virtualenv" ,python-virtualenv)))
8793 (native-inputs
8794 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8795 ("python-pytest" ,python-pytest) ; >= 2.3.5
8796 ("python-setuptools-scm" ,python-setuptools-scm)))
8797 (home-page "http://tox.testrun.org/")
8798 (synopsis "Virtualenv-based automation of test activities")
8799 (description "Tox is a generic virtualenv management and test command line
8800 tool. It can be used to check that a package installs correctly with
8801 different Python versions and interpreters, or run tests in each type of
8802 supported environment, or act as a frontend to continuous integration
8803 servers.")
8804 (license license:expat)))
8805
8806 (define-public python2-tox
8807 (package-with-python2 python-tox))
8808
8809 (define-public python-jmespath
8810 (package
8811 (name "python-jmespath")
8812 (version "0.9.4")
8813 (source
8814 (origin
8815 (method url-fetch)
8816 (uri (pypi-uri "jmespath" version))
8817 (sha256
8818 (base32
8819 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
8820 (build-system python-build-system)
8821 (native-inputs
8822 `(("python-nose" ,python-nose)))
8823 (synopsis "JSON Matching Expressions")
8824 (description "JMESPath (pronounced “james path”) is a Python library that
8825 allows one to declaratively specify how to extract elements from a JSON
8826 document.")
8827 (home-page "https://github.com/jmespath/jmespath.py")
8828 (license license:expat)))
8829
8830 (define-public python2-jmespath
8831 (package-with-python2 python-jmespath))
8832
8833 (define-public python-botocore
8834 (package
8835 (name "python-botocore")
8836 (version "1.12.149")
8837 (source
8838 (origin
8839 (method url-fetch)
8840 (uri (pypi-uri "botocore" version))
8841 (sha256
8842 (base32
8843 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
8844 (build-system python-build-system)
8845 (arguments
8846 ;; FIXME: Many tests are failing.
8847 '(#:tests? #f))
8848 (propagated-inputs
8849 `(("python-dateutil" ,python-dateutil)
8850 ("python-docutils" ,python-docutils)
8851 ("python-jmespath" ,python-jmespath)))
8852 (native-inputs
8853 `(("python-mock" ,python-mock)
8854 ("python-nose" ,python-nose)
8855 ("behave" ,behave)
8856 ("python-tox" ,python-tox)
8857 ("python-urllib3" ,python-urllib3)
8858 ("python-wheel" ,python-wheel)))
8859 (home-page "https://github.com/boto/botocore")
8860 (synopsis "Low-level interface to AWS")
8861 (description "Botocore is a Python library that provides a low-level
8862 interface to the Amazon Web Services (AWS) API.")
8863 (license license:asl2.0)))
8864
8865 (define-public python2-botocore
8866 (package-with-python2 python-botocore))
8867
8868 (define-public python-xdo
8869 (package
8870 (name "python-xdo")
8871 (version "0.3")
8872 (source (origin
8873 (method url-fetch)
8874 (uri (string-append
8875 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8876 "python-xdo_" version ".orig.tar.gz"))
8877 (sha256
8878 (base32
8879 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8880 (build-system python-build-system)
8881 (arguments
8882 '(#:phases
8883 (modify-phases %standard-phases
8884 (add-before 'install 'patch-libxdo-path
8885 ;; Hardcode the path of dynamically loaded libxdo library.
8886 (lambda* (#:key inputs #:allow-other-keys)
8887 (let ((libxdo (string-append
8888 (assoc-ref inputs "xdotool")
8889 "/lib/libxdo.so")))
8890 (substitute* "xdo/_xdo.py"
8891 (("find_library\\(\"xdo\"\\)")
8892 (simple-format #f "\"~a\"" libxdo)))
8893 #t))))
8894 #:tests? #f)) ; no tests provided
8895 (propagated-inputs
8896 `(("python-six" ,python-six)))
8897 (inputs
8898 `(("xdotool" ,xdotool)
8899 ("libX11" ,libx11)))
8900 (home-page "https://tracker.debian.org/pkg/python-xdo")
8901 (synopsis "Python library for simulating X11 keyboard/mouse input")
8902 (description "Provides bindings to libxdo for manipulating X11 via simulated
8903 input. (Note that this is mostly a legacy library; you may wish to look at
8904 python-xdo for newer bindings.)")
8905 (license license:bsd-3)))
8906
8907 (define-public python2-xdo
8908 (package-with-python2 python-xdo))
8909
8910 (define-public python-mako
8911 (package
8912 (name "python-mako")
8913 (version "1.1.0")
8914 (source
8915 (origin
8916 (method url-fetch)
8917 (uri (pypi-uri "Mako" version))
8918 (sha256
8919 (base32
8920 "0jqa3qfpykyn4fmkn0kh6043sfls7br8i2bsdbccazcvk9cijsd3"))))
8921 (build-system python-build-system)
8922 (arguments
8923 `(#:phases (modify-phases %standard-phases
8924 (replace 'check
8925 (lambda _
8926 (invoke "pytest" "-vv"))))))
8927 (propagated-inputs
8928 `(("python-markupsafe" ,python-markupsafe)))
8929 (native-inputs
8930 `(("python-mock" ,python-mock)
8931 ("python-pytest" ,python-pytest)))
8932 (home-page "https://www.makotemplates.org/")
8933 (synopsis "Templating language for Python")
8934 (description "Mako is a templating language for Python that compiles
8935 templates into Python modules.")
8936 (license license:expat)))
8937
8938 (define-public python2-mako
8939 (package-with-python2 python-mako))
8940
8941 (define-public python-waitress
8942 (package
8943 (name "python-waitress")
8944 (version "1.1.0")
8945 (source
8946 (origin
8947 (method url-fetch)
8948 (uri (pypi-uri "waitress" version))
8949 (patches (search-patches "python-waitress-fix-tests.patch"))
8950 (sha256
8951 (base32
8952 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
8953 (build-system python-build-system)
8954 (home-page "https://github.com/Pylons/waitress")
8955 (synopsis "Waitress WSGI server")
8956 (description "Waitress is meant to be a production-quality pure-Python WSGI
8957 server with very acceptable performance.")
8958 (license license:zpl2.1)))
8959
8960 (define-public python2-waitress
8961 (package-with-python2 python-waitress))
8962
8963 (define-public python-whichcraft
8964 (package
8965 (name "python-whichcraft")
8966 (version "0.6.1")
8967 (source
8968 (origin
8969 (method url-fetch)
8970 (uri (pypi-uri "whichcraft" version))
8971 (sha256
8972 (base32
8973 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
8974 (build-system python-build-system)
8975 (native-inputs
8976 `(("python-pytest" ,python-pytest)))
8977 (home-page "https://github.com/pydanny/whichcraft")
8978 (synopsis "Cross-platform cross-python shutil.which functionality")
8979 (description
8980 "This package provides a shim of the shutil.which function that's
8981 designed to work across multiple versions of Python.")
8982 (license license:bsd-3)))
8983
8984 (define-public python-cookiecutter
8985 (package
8986 (name "python-cookiecutter")
8987 (version "1.6.0")
8988 (source
8989 (origin
8990 (method url-fetch)
8991 (uri (pypi-uri "cookiecutter" version))
8992 (sha256
8993 (base32
8994 "0glsvaz8igi2wy1hsnhm9fkn6560vdvdixzvkq6dn20z3hpaa5hk"))))
8995 (build-system python-build-system)
8996 (native-inputs
8997 `(("python-freezegun" ,python-freezegun)
8998 ("python-pytest" ,python-pytest)
8999 ("python-pytest-catchlog" ,python-pytest-catchlog)
9000 ("python-pytest-cov" ,python-pytest-cov)
9001 ("python-pytest-mock" ,python-pytest-mock)))
9002 (propagated-inputs
9003 `(("python-binaryornot" ,python-binaryornot)
9004 ("python-click" ,python-click)
9005 ("python-future" ,python-future)
9006 ("python-jinja2" ,python-jinja2)
9007 ("python-jinja2-time" ,python-jinja2-time)
9008 ("python-poyo" ,python-poyo)
9009 ("python-requests" ,python-requests)
9010 ("python-whichcraft" ,python-whichcraft)))
9011 (home-page "https://github.com/audreyr/cookiecutter")
9012 (synopsis
9013 "Command-line utility that creates projects from project templates")
9014 (description
9015 "This package provides a command-line utility that creates projects from
9016 project templates, e.g. creating a Python package project from a Python package
9017 project template.")
9018 (license license:bsd-3)))
9019
9020 (define-public python-pyquery
9021 (package
9022 (name "python-pyquery")
9023 (version "1.2.17")
9024 (source
9025 (origin
9026 (method url-fetch)
9027 (uri (pypi-uri "pyquery" version))
9028 (sha256
9029 (base32
9030 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9031 (build-system python-build-system)
9032 (native-inputs
9033 `(("python-webob" ,python-webob)
9034 ("python-webtest" ,python-webtest)))
9035 (propagated-inputs
9036 `(("python-lxml" ,python-lxml)
9037 ("python-cssselect" ,python-cssselect)))
9038 (home-page "https://github.com/gawel/pyquery")
9039 (synopsis "Make jQuery-like queries on xml documents")
9040 (description "pyquery allows you to make jQuery queries on xml documents.
9041 The API is as much as possible the similar to jQuery. pyquery uses lxml for
9042 fast xml and html manipulation.")
9043 (license license:bsd-3)))
9044
9045 (define-public python-anyjson
9046 (package
9047 (name "python-anyjson")
9048 (version "0.3.3")
9049 (source
9050 (origin
9051 (method url-fetch)
9052 (uri (pypi-uri "anyjson" version))
9053 (sha256
9054 (base32
9055 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9056 (build-system python-build-system)
9057 (arguments
9058 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9059 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9060 ;; whatever) so this transformation needs to be done before the tests
9061 ;; can be run. Maybe we could add a build step to transform beforehand
9062 ;; but it could be annoying/difficult.
9063 ;; We can enable tests for the Python 2 version, though, and do below.
9064 #:tests? #f))
9065 (home-page "https://bitbucket.org/runeh/anyjson/")
9066 (synopsis
9067 "Wraps best available JSON implementation in a common interface")
9068 (description
9069 "Anyjson loads whichever is the fastest JSON module installed
9070 and provides a uniform API regardless of which JSON implementation is used.")
9071 (license license:bsd-3)
9072 (properties `((python2-variant . ,(delay python2-anyjson))))))
9073
9074 (define-public python2-anyjson
9075 (let ((anyjson (package-with-python2
9076 (strip-python2-variant python-anyjson))))
9077 (package
9078 (inherit anyjson)
9079 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9080 #:tests? #t
9081 ,@(package-arguments anyjson)))
9082 (native-inputs `(("python2-nose" ,python2-nose))))))
9083
9084 (define-public python-amqp
9085 (package
9086 (name "python-amqp")
9087 (version "2.3.2")
9088 (source
9089 (origin
9090 (method url-fetch)
9091 (uri (pypi-uri "amqp" version))
9092 (sha256
9093 (base32
9094 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
9095 (build-system python-build-system)
9096 (native-inputs
9097 `(("python-case" ,python-case)
9098 ("python-pytest-sugar" ,python-pytest-sugar)
9099 ("python-mock" ,python-mock)))
9100 (propagated-inputs
9101 `(("python-vine" ,python-vine)))
9102 (home-page "https://github.com/celery/py-amqp")
9103 (synopsis
9104 "Low-level AMQP client for Python (fork of amqplib)")
9105 (description
9106 "This is a fork of amqplib which was originally written by Barry Pederson.
9107 It is maintained by the Celery project, and used by kombu as a pure python
9108 alternative when librabbitmq is not available.")
9109 (license license:lgpl2.1+)
9110 (properties `((python2-variant . ,(delay python2-amqp))))))
9111
9112 (define-public python2-amqp
9113 (let ((amqp (package-with-python2
9114 (strip-python2-variant python-amqp))))
9115 (package
9116 (inherit amqp)
9117 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9118 ;; unmaintained. Weirdly, does not do this on the python 3
9119 ;; version?
9120 #:tests? #f
9121 ,@(package-arguments amqp))))))
9122
9123 (define-public python-txamqp
9124 (package
9125 (name "python-txamqp")
9126 (version "0.8.2")
9127 (source
9128 (origin
9129 (method url-fetch)
9130 (uri (pypi-uri "txAMQP" version))
9131 (sha256
9132 (base32
9133 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
9134 (build-system python-build-system)
9135 (propagated-inputs
9136 `(("python-six" ,python-six)
9137 ("python-twisted" ,python-twisted)))
9138 (home-page "https://github.com/txamqp/txamqp")
9139 (synopsis "Communicate with AMQP peers and brokers using Twisted")
9140 (description
9141 "This package provides a Python library for communicating with AMQP peers
9142 and brokers using the asynchronous networking framework Twisted. It contains
9143 all the necessary code to connect, send and receive messages to/from an
9144 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
9145 also includes support for using Thrift RPC over AMQP in Twisted
9146 applications.")
9147 (license license:asl2.0)))
9148
9149 (define-public python2-txamqp
9150 (package-with-python2 python-txamqp))
9151
9152 (define-public python-kombu
9153 (package
9154 (name "python-kombu")
9155 (version "4.2.2")
9156 (source
9157 (origin
9158 (method url-fetch)
9159 (uri (pypi-uri "kombu" version))
9160 (sha256
9161 (base32
9162 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
9163 (build-system python-build-system)
9164 (native-inputs
9165 `(("python-mock" ,python-mock)
9166 ("python-case" ,python-case)
9167 ("python-pyro4" ,python-pyro4)
9168 ("python-pytest-sugar" ,python-pytest-sugar)
9169 ("python-pytz" ,python-pytz)))
9170 (propagated-inputs
9171 `(("python-anyjson" ,python-anyjson)
9172 ("python-amqp" ,python-amqp)
9173 ("python-redis" ,python-redis)))
9174 (home-page "https://kombu.readthedocs.io")
9175 (synopsis "Message passing library for Python")
9176 (description "The aim of Kombu is to make messaging in Python as easy as
9177 possible by providing an idiomatic high-level interface for the AMQ protocol,
9178 and also provide proven and tested solutions to common messaging problems.
9179 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9180 message orientation, queuing, routing, reliability and security, for which the
9181 RabbitMQ messaging server is the most popular implementation.")
9182 (license license:bsd-3)
9183 (properties `((python2-variant . ,(delay python2-kombu))))))
9184
9185 (define-public python2-kombu
9186 (let ((kombu (package-with-python2
9187 (strip-python2-variant python-kombu))))
9188 (package
9189 (inherit kombu)
9190 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9191 ;; It works fine on the python3 variant.
9192 #:tests? #f
9193 ,@(package-arguments kombu)))
9194 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9195 ,@(package-native-inputs kombu))))))
9196
9197 (define-public python-billiard
9198 (package
9199 (name "python-billiard")
9200 (version "3.5.0.5")
9201 (source
9202 (origin
9203 (method url-fetch)
9204 (uri (pypi-uri "billiard" version))
9205 (sha256
9206 (base32
9207 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9208 (build-system python-build-system)
9209 (native-inputs
9210 `(("python-case" ,python-case)
9211 ("python-pytest" ,python-pytest)))
9212 (home-page "https://github.com/celery/billiard")
9213 (synopsis
9214 "Python multiprocessing fork with improvements and bugfixes")
9215 (description
9216 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9217 multiprocessing package itself is a renamed and updated version of R Oudkerk's
9218 pyprocessing package. This standalone variant is intended to be compatible with
9219 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9220 (license license:bsd-3)
9221 (properties `((python2-variant . ,(delay python2-billiard))))))
9222
9223 (define-public python2-billiard
9224 (let ((billiard (package-with-python2
9225 (strip-python2-variant python-billiard))))
9226 (package
9227 (inherit billiard)
9228 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9229 ("python2-mock" ,python2-mock)
9230 ,@(package-native-inputs billiard))))))
9231
9232 (define-public python-celery
9233 (package
9234 (name "python-celery")
9235 (version "4.2.1")
9236 (source
9237 (origin
9238 (method url-fetch)
9239 (uri (pypi-uri "celery" version))
9240 (sha256
9241 (base32
9242 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9243 (build-system python-build-system)
9244 (arguments
9245 '(;; TODO The tests fail with Python 3.7
9246 ;; https://github.com/celery/celery/issues/4849
9247 #:tests? #f
9248 #:phases
9249 (modify-phases %standard-phases
9250 (add-after 'unpack 'patch-requirements
9251 (lambda _
9252 (substitute* "requirements/test.txt"
9253 (("pytest>=3\\.0,<3\\.3")
9254 "pytest>=3.0"))
9255 #t)))))
9256 (native-inputs
9257 `(("python-case" ,python-case)
9258 ("python-pytest" ,python-pytest)))
9259 (propagated-inputs
9260 `(("python-pytz" ,python-pytz)
9261 ("python-billiard" ,python-billiard)
9262 ("python-kombu" ,python-kombu)))
9263 (home-page "https://celeryproject.org")
9264 (synopsis "Distributed Task Queue")
9265 (description "Celery is an asynchronous task queue/job queue based on
9266 distributed message passing. It is focused on real-time operation, but
9267 supports scheduling as well. The execution units, called tasks, are executed
9268 concurrently on a single or more worker servers using multiprocessing,
9269 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9270 synchronously (wait until ready).")
9271 (license license:bsd-3)
9272 (properties `((python2-variant . ,(delay python2-celery))))))
9273
9274 (define-public python2-celery
9275 (let ((celery (package-with-python2
9276 (strip-python2-variant python-celery))))
9277 (package
9278 (inherit celery)
9279 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9280 ("python2-mock" ,python2-mock)
9281 ,@(package-native-inputs celery))))))
9282
9283 (define-public python-translitcodec
9284 (package
9285 (name "python-translitcodec")
9286 (version "0.4.0")
9287 (source
9288 (origin
9289 (method url-fetch)
9290 (uri (pypi-uri "translitcodec" version))
9291 (sha256
9292 (base32
9293 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9294 (build-system python-build-system)
9295 (arguments
9296 `(#:tests? #f)) ; no tests provided
9297 (home-page
9298 "https://github.com/claudep/translitcodec")
9299 (synopsis
9300 "Unicode to 8-bit charset transliteration codec")
9301 (description
9302 "This package contains codecs for transliterating ISO 10646 texts into
9303 best-effort representations using smaller coded character sets (ASCII,
9304 ISO 8859, etc.).")
9305 (license license:expat)))
9306
9307 (define-public python2-translitcodec
9308 (package-with-python2 python-translitcodec))
9309
9310 (define-public python-editor
9311 (package
9312 (name "python-editor")
9313 (version "0.5")
9314 (source
9315 (origin
9316 (method url-fetch)
9317 (uri (pypi-uri "python-editor" version))
9318 (sha256
9319 (base32
9320 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9321 (build-system python-build-system)
9322 (home-page
9323 "https://github.com/fmoo/python-editor")
9324 (synopsis
9325 "Programmatically open an editor, capture the result")
9326 (description
9327 "python-editor is a library that provides the editor module for
9328 programmatically interfacing with your system's $EDITOR.")
9329 (license license:asl2.0)))
9330
9331 (define-public python2-editor
9332 (package-with-python2 python-editor))
9333
9334 (define-public python-vobject
9335 (package
9336 (name "python-vobject")
9337 (version "0.9.5")
9338 (source (origin
9339 (method url-fetch)
9340 (uri (pypi-uri "vobject" version))
9341 (sha256
9342 (base32
9343 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9344 (build-system python-build-system)
9345 (arguments
9346 '(;; The test suite relies on some non-portable Windows interfaces.
9347 #:tests? #f))
9348 (propagated-inputs
9349 `(("python-dateutil" ,python-dateutil)
9350 ("python-pyicu" ,python-pyicu)))
9351 (synopsis "Parse and generate vCard and vCalendar files")
9352 (description "Vobject is intended to be a full featured Python package for
9353 parsing and generating vCard and vCalendar files. Currently, iCalendar files
9354 are supported and well tested. vCard 3.0 files are supported, and all data
9355 should be imported, but only a few components are understood in a sophisticated
9356 way.")
9357 (home-page "http://eventable.github.io/vobject/")
9358 (license license:asl2.0)))
9359
9360 (define-public python2-vobject
9361 (package-with-python2 python-vobject))
9362
9363 (define-public python-munkres
9364 (package
9365 (name "python-munkres")
9366 (version "1.0.8")
9367 (source (origin
9368 (method url-fetch)
9369 (uri (pypi-uri "munkres" version))
9370 (sha256
9371 (base32
9372 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9373 (build-system python-build-system)
9374 (arguments
9375 '(#:tests? #f)) ; no test suite
9376 (home-page "http://software.clapper.org/munkres/")
9377 (synopsis "Implementation of the Munkres algorithm")
9378 (description "The Munkres module provides an implementation of the Munkres
9379 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9380 useful for solving the Assignment Problem.")
9381 (license license:bsd-3)))
9382
9383 (define-public python2-munkres
9384 (package-with-python2 python-munkres))
9385
9386 (define-public python-whoosh
9387 (package
9388 (name "python-whoosh")
9389 (version "2.7.4")
9390 (source
9391 (origin
9392 (method url-fetch)
9393 (uri (pypi-uri "Whoosh" version))
9394 (sha256
9395 (base32
9396 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9397 (build-system python-build-system)
9398 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
9399 (native-inputs
9400 `(("python-pytest" ,python-pytest)))
9401 (home-page "https://bitbucket.org/mchaput/whoosh")
9402 (synopsis "Full text indexing, search, and spell checking library")
9403 (description
9404 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9405 checking library.")
9406 (license license:bsd-2)))
9407
9408 (define-public python2-whoosh
9409 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9410 (package (inherit whoosh)
9411 (propagated-inputs
9412 `(("python2-backport-ssl-match-hostname"
9413 ,python2-backport-ssl-match-hostname)
9414 ,@(package-propagated-inputs whoosh))))))
9415
9416 (define-public python-pathlib
9417 (package
9418 (name "python-pathlib")
9419 (version "1.0.1")
9420 (source (origin
9421 (method url-fetch)
9422 (uri (pypi-uri "pathlib" version))
9423 (sha256
9424 (base32
9425 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9426 (build-system python-build-system)
9427 ;; The tests depend on the internal "test" module, which does not provide
9428 ;; a stable interface.
9429 (arguments `(#:tests? #f))
9430 (home-page "https://pathlib.readthedocs.org/")
9431 (synopsis "Object-oriented file system paths")
9432 (description "Pathlib offers a set of classes to handle file system paths.
9433 It offers the following advantages over using string objects:
9434
9435 @enumerate
9436 @item No more cumbersome use of os and os.path functions. Everything can
9437 be done easily through operators, attribute accesses, and method calls.
9438 @item Embodies the semantics of different path types. For example,
9439 comparing Windows paths ignores casing.
9440 @item Well-defined semantics, eliminating any inconsistencies or
9441 ambiguities (forward vs. backward slashes, etc.).
9442 @end enumerate
9443
9444 Note: In Python 3.4, pathlib is now part of the standard library. For other
9445 Python versions please consider python-pathlib2 instead, which tracks the
9446 standard library module. This module (python-pathlib) isn't maintained
9447 anymore.")
9448 (license license:expat)))
9449
9450 (define-public python2-pathlib
9451 (package-with-python2 python-pathlib))
9452
9453 (define-public python2-pathlib2
9454 (package
9455 (name "python2-pathlib2")
9456 (version "2.3.3")
9457 (source (origin
9458 (method url-fetch)
9459 (uri (pypi-uri "pathlib2" version))
9460 (sha256
9461 (base32
9462 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
9463 (build-system python-build-system)
9464 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9465 ;; version is 3.4 which already includes this package as part of the
9466 ;; standard library.
9467 (arguments
9468 `(#:python ,python-2))
9469 (propagated-inputs
9470 `(("python2-scandir" ,python2-scandir)
9471 ("python2-six" ,python2-six)))
9472 (home-page "https://pypi.python.org/pypi/pathlib2/")
9473 (synopsis "Object-oriented file system paths - backport of standard
9474 pathlib module")
9475 (description "The goal of pathlib2 is to provide a backport of standard
9476 pathlib module which tracks the standard library module, so all the newest
9477 features of the standard pathlib can be used also on older Python versions.
9478
9479 Pathlib offers a set of classes to handle file system paths. It offers the
9480 following advantages over using string objects:
9481
9482 @enumerate
9483 @item No more cumbersome use of os and os.path functions. Everything can
9484 be done easily through operators, attribute accesses, and method calls.
9485 @item Embodies the semantics of different path types. For example,
9486 comparing Windows paths ignores casing.
9487 @item Well-defined semantics, eliminating any inconsistencies or
9488 ambiguities (forward vs. backward slashes, etc.).
9489 @end enumerate")
9490 (license license:expat)))
9491
9492 (define-public python2-pathlib2-bootstrap
9493 (hidden-package
9494 (package
9495 (inherit python2-pathlib2)
9496 (name "python2-pathlib2-bootstrap")
9497 (propagated-inputs
9498 `(("python2-scandir" ,python2-scandir)
9499 ("python2-six" ,python2-six-bootstrap))))))
9500
9501 (define-public python-jellyfish
9502 (package
9503 (name "python-jellyfish")
9504 (version "0.5.6")
9505 (source (origin
9506 (method url-fetch)
9507 (uri (pypi-uri "jellyfish" version))
9508 (sha256
9509 (base32
9510 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9511 (build-system python-build-system)
9512 (native-inputs
9513 `(("python-pytest" ,python-pytest)))
9514 (home-page "https://github.com/jamesturk/jellyfish")
9515 (synopsis "Approximate and phonetic matching of strings")
9516 (description "Jellyfish uses a variety of string comparison and phonetic
9517 encoding algorithms to do fuzzy string matching.")
9518 (license license:bsd-2)
9519 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9520
9521 (define-public python2-jellyfish
9522 (let ((jellyfish (package-with-python2
9523 (strip-python2-variant python-jellyfish))))
9524 (package (inherit jellyfish)
9525 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9526 ,@(package-native-inputs jellyfish))))))
9527
9528 (define-public python2-unicodecsv
9529 (package
9530 (name "python2-unicodecsv")
9531 (version "0.14.1")
9532 (source (origin
9533 (method url-fetch)
9534 ;; The test suite is not included in the PyPi release.
9535 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9536 (uri (string-append "https://github.com/jdunck/python-unicodecsv/"
9537 "archive/" version ".tar.gz"))
9538 (file-name (string-append name "-" version ".tar.gz"))
9539 (sha256
9540 (base32
9541 "087nqanfcyp6mlfbbr5lva5f3w6iz1bybls9xlrb8icmc474wh4w"))))
9542 (build-system python-build-system)
9543 (arguments
9544 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9545 #:python ,python-2))
9546 (native-inputs
9547 `(("python2-unittest2" ,python2-unittest2)))
9548 (home-page "https://github.com/jdunck/python-unicodecsv")
9549 (synopsis "Unicode CSV module for Python 2")
9550 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9551 module, adding support for Unicode strings.")
9552 (license license:bsd-2)))
9553
9554 (define-public python-rarfile
9555 (package
9556 (name "python-rarfile")
9557 (version "2.8")
9558 (source (origin
9559 (method url-fetch)
9560 (uri (pypi-uri "rarfile" version))
9561 (sha256
9562 (base32
9563 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9564 (build-system python-build-system)
9565 (arguments
9566 '(#:phases
9567 (modify-phases %standard-phases
9568 (replace 'check
9569 ;; Many tests fail, but the installation proceeds.
9570 (lambda _ (invoke "make" "-C" "test" "test"))))))
9571 (native-inputs
9572 `(("which" ,which))) ; required for tests
9573 (propagated-inputs
9574 `(("libarchive" ,libarchive)))
9575 (home-page "https://github.com/markokr/rarfile")
9576 (synopsis "RAR archive reader for Python")
9577 (description "This is Python module for RAR archive reading. The interface
9578 is made as zipfile like as possible.")
9579 (license license:isc)))
9580
9581 (define-public python2-rarfile
9582 (package-with-python2 python-rarfile))
9583
9584 (define-public python-magic
9585 (package
9586 (name "python-magic")
9587 (version "0.4.15")
9588 (source
9589 (origin
9590 (method url-fetch)
9591 (uri (pypi-uri "python-magic" version))
9592 (sha256
9593 (base32
9594 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9595 (file-name (string-append name "-" version "-checkout"))))
9596 (build-system python-build-system)
9597 (arguments
9598 ;; The tests are unreliable, so don't run them. The tests fail
9599 ;; under Python3 because they were written for Python2 and
9600 ;; contain import statements that do not work in Python3. One of
9601 ;; the tests fails under Python2 because its assertions are
9602 ;; overly stringent; it relies on comparing output strings which
9603 ;; are brittle and can change depending on the version of
9604 ;; libmagic being used and the system on which the test is
9605 ;; running. In my case, under GuixSD 0.10.0, only one test
9606 ;; failed, and it seems to have failed only because the version
9607 ;; of libmagic that is packaged in Guix outputs a slightly
9608 ;; different (but not wrong) string than the one that the test
9609 ;; expected.
9610 '(#:tests? #f
9611 #:phases (modify-phases %standard-phases
9612 ;; Replace a specific method call with a hard-coded
9613 ;; path to the necessary libmagic.so file in the
9614 ;; store. If we don't do this, then the method call
9615 ;; will fail to find the libmagic.so file, which in
9616 ;; turn will cause any application using
9617 ;; python-magic to fail.
9618 (add-before 'build 'hard-code-path-to-libmagic
9619 (lambda* (#:key inputs #:allow-other-keys)
9620 (let ((file (assoc-ref inputs "file")))
9621 (substitute* "magic.py"
9622 (("ctypes.util.find_library\\('magic'\\)")
9623 (string-append "'" file "/lib/libmagic.so'")))
9624 #t)))
9625 (add-before 'install 'disable-egg-compression
9626 (lambda _
9627 (let ((port (open-file "setup.cfg" "a")))
9628 (display "\n[easy_install]\nzip_ok = 0\n"
9629 port)
9630 (close-port port)
9631 #t))))))
9632 (inputs
9633 ;; python-magic needs to be able to find libmagic.so.
9634 `(("file" ,file)))
9635 (home-page
9636 "https://github.com/ahupp/python-magic")
9637 (synopsis
9638 "File type identification using libmagic")
9639 (description
9640 "This module uses ctypes to access the libmagic file type
9641 identification library. It makes use of the local magic database and
9642 supports both textual and MIME-type output. Note that this module and
9643 the python-file module both provide a \"magic.py\" file; these two
9644 modules, which are different and were developed separately, both serve
9645 the same purpose: to provide Python bindings for libmagic.")
9646 (license license:expat)))
9647
9648 (define-public python2-magic
9649 (package-with-python2 python-magic))
9650
9651 (define-public python2-s3cmd
9652 (package
9653 (name "python2-s3cmd")
9654 (version "1.6.1")
9655 (source
9656 (origin
9657 (method url-fetch)
9658 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9659 "s3cmd-" version ".tar.gz"))
9660 (sha256
9661 (base32
9662 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9663 (build-system python-build-system)
9664 (arguments
9665 ;; s3cmd is written for python2 only and contains no tests.
9666 `(#:python ,python-2
9667 #:tests? #f))
9668 (propagated-inputs
9669 `(("python2-dateutil" ,python2-dateutil)
9670 ;; The python-file package also provides a magic.py module.
9671 ;; This is an unfortunate state of affairs; however, s3cmd
9672 ;; fails to install if it cannot find specifically the
9673 ;; python-magic package. Thus we include it, instead of using
9674 ;; python-file. Ironically, s3cmd sometimes works better
9675 ;; without libmagic bindings at all:
9676 ;; https://github.com/s3tools/s3cmd/issues/198
9677 ("python2-magic" ,python2-magic)))
9678 (home-page "http://s3tools.org/s3cmd")
9679 (synopsis "Command line tool for S3-compatible storage services")
9680 (description
9681 "S3cmd is a command line tool for uploading, retrieving and managing data
9682 in storage services that are compatible with the Amazon Simple Storage
9683 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9684 GnuPG encryption, and more. It also supports management of Amazon's
9685 CloudFront content delivery network.")
9686 (license license:gpl2+)))
9687
9688 (define-public python-pkgconfig
9689 (package
9690 (name "python-pkgconfig")
9691 (version "1.3.1")
9692 (source
9693 (origin
9694 (method url-fetch)
9695 (uri (pypi-uri "pkgconfig" version))
9696 (sha256
9697 (base32
9698 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9699 (build-system python-build-system)
9700 (native-inputs
9701 `(("python-nose" ,python-nose)))
9702 (inputs
9703 `(("pkg-config" ,pkg-config)))
9704 (arguments
9705 `(#:phases
9706 (modify-phases %standard-phases
9707 (add-before 'build 'patch
9708 ;; Hard-code the path to pkg-config.
9709 (lambda _
9710 (substitute* "pkgconfig/pkgconfig.py"
9711 (("cmd = 'pkg-config")
9712 (string-append "cmd = '" (which "pkg-config"))))
9713 #t))
9714 (replace 'check
9715 (lambda _
9716 (invoke "nosetests" "test.py"))))))
9717 (home-page "https://github.com/matze/pkgconfig")
9718 (synopsis "Python interface for pkg-config")
9719 (description "This module provides a Python interface to pkg-config. It
9720 can be used to find all pkg-config packages, check if a package exists,
9721 check if a package meets certain version requirements, query CFLAGS and
9722 LDFLAGS and parse the output to build extensions with setup.py.")
9723 (license license:expat)))
9724
9725 (define-public python2-pkgconfig
9726 (package-with-python2 python-pkgconfig))
9727
9728 (define-public python-bz2file
9729 (package
9730 (name "python-bz2file")
9731 (version "0.98")
9732 (source
9733 (origin
9734 (method url-fetch)
9735 (uri (pypi-uri "bz2file" version))
9736 (sha256
9737 (base32
9738 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9739 (build-system python-build-system)
9740 (arguments
9741 `(#:tests? #f)) ; Tests use deprecated python modules.
9742 (home-page "https://github.com/nvawda/bz2file")
9743 (synopsis "Read and write bzip2-compressed files")
9744 (description
9745 "Bz2file is a Python library for reading and writing bzip2-compressed
9746 files. It contains a drop-in replacement for the I/O interface in the
9747 standard library's @code{bz2} module, including features from the latest
9748 development version of CPython that are not available in older releases.")
9749 (license license:asl2.0)))
9750
9751 (define-public python2-bz2file
9752 (package-with-python2 python-bz2file))
9753
9754 (define-public python-future
9755 (package
9756 (name "python-future")
9757 (version "0.17.1")
9758 (source
9759 (origin
9760 (method url-fetch)
9761 (uri (pypi-uri "future" version))
9762 (sha256
9763 (base32
9764 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
9765 (build-system python-build-system)
9766 ;; Many tests connect to the network or are otherwise flawed.
9767 ;; https://github.com/PythonCharmers/python-future/issues/210
9768 (arguments
9769 `(#:tests? #f))
9770 (home-page "http://python-future.org")
9771 (synopsis "Single-source support for Python 3 and 2")
9772 (description
9773 "@code{python-future} is the missing compatibility layer between Python 2 and
9774 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9775 to support both Python 2 and Python 3 with minimal overhead.")
9776 (license license:expat)))
9777
9778 (define-public python2-future
9779 (package-with-python2 python-future))
9780
9781 (define-public python-cysignals
9782 (package
9783 (name "python-cysignals")
9784 (version "1.9.0")
9785 (source
9786 (origin
9787 (method url-fetch)
9788 (uri (pypi-uri "cysignals" version))
9789 (sha256
9790 (base32
9791 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
9792 (build-system python-build-system)
9793 (native-inputs
9794 `(("python-cython" ,python-cython)
9795 ("python-sphinx" ,python-sphinx)))
9796 (inputs
9797 `(("pari-gp" ,pari-gp)))
9798 (arguments
9799 `(#:modules ((guix build python-build-system)
9800 ((guix build gnu-build-system) #:prefix gnu:)
9801 (guix build utils))
9802 ;; FIXME: Tests are executed after installation and currently fail
9803 ;; when not installing into standard locations; the author is working
9804 ;; on a fix.
9805 #:tests? #f
9806 #:phases
9807 (modify-phases %standard-phases
9808 (add-before
9809 'build 'configure
9810 (assoc-ref gnu:%standard-phases 'configure)))))
9811 (home-page
9812 "https://github.com/sagemath/cysignals")
9813 (synopsis
9814 "Handling of interrupts and signals for Cython")
9815 (description
9816 "The cysignals package provides mechanisms to handle interrupts (and
9817 other signals and errors) in Cython code, using two related approaches,
9818 for mixed Cython/Python code or external C libraries and pure Cython code,
9819 respectively.")
9820 (license license:lgpl3+)))
9821
9822 (define-public python2-cysignals
9823 (package-with-python2 python-cysignals))
9824
9825 (define-public python2-shedskin
9826 (package
9827 (name "python2-shedskin")
9828 (version "0.9.4")
9829 (source
9830 (origin
9831 (method url-fetch)
9832 (uri (string-append "https://github.com/shedskin/shedskin/"
9833 "releases/download/v" version
9834 "/shedskin-" version ".tgz"))
9835 (sha256
9836 (base32
9837 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9838 (build-system python-build-system)
9839 (arguments
9840 `(#:python ,python-2
9841 #:phases (modify-phases %standard-phases
9842 (add-after 'unpack 'fix-resulting-include-libs
9843 (lambda* (#:key inputs #:allow-other-keys)
9844 (let ((libgc (assoc-ref inputs "libgc"))
9845 (pcre (assoc-ref inputs "pcre")))
9846 (substitute* "shedskin/makefile.py"
9847 (("variable == 'CCFLAGS':[ ]*")
9848 (string-append "variable == 'CCFLAGS':\n"
9849 " line += ' -I " pcre "/include"
9850 " -I " libgc "/include'"))
9851 (("variable == 'LFLAGS':[ ]*")
9852 (string-append "variable == 'LFLAGS':\n"
9853 " line += ' -L" pcre "/lib"
9854 " -L " libgc "/lib'")))
9855 #t))))))
9856 (inputs `(("pcre" ,pcre)
9857 ("libgc" ,libgc)))
9858 (home-page "https://shedskin.github.io/")
9859 (synopsis "Experimental Python-2 to C++ Compiler")
9860 (description (string-append "This is an experimental compiler for a subset of
9861 Python. It generates C++ code and a Makefile."))
9862 (license (list license:gpl3 license:bsd-3 license:expat))))
9863
9864 (define-public python2-rope
9865 (package
9866 (name "python2-rope")
9867 (version "0.11.0")
9868 (source
9869 (origin
9870 (method url-fetch)
9871 (uri (pypi-uri "rope" version))
9872 (sha256
9873 (base32
9874 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
9875 (arguments
9876 ;; Rope has only partial python3 support, see `python-rope'
9877 `(#:python ,python-2))
9878 (build-system python-build-system)
9879 (native-inputs
9880 `(("python2-unittest2" ,python2-unittest2)))
9881 (home-page "https://github.com/python-rope/rope")
9882 (synopsis "Refactoring library for Python")
9883 (description "Rope is a refactoring library for Python. It facilitates
9884 the renaming, moving and extracting of attributes, functions, modules, fields
9885 and parameters in Python 2 source code. These refactorings can also be applied
9886 to occurrences in strings and comments.")
9887 (license license:gpl2)))
9888
9889 (define-public python-rope
9890 (package
9891 (inherit python2-rope)
9892 (name "python-rope")
9893 (arguments `(#:python ,python-wrapper
9894 ;; XXX: Only partial python3 support, results in some failing
9895 ;; tests: <https://github.com/python-rope/rope/issues/247>.
9896 #:tests? #f))
9897 (properties `((python2-variant . ,(delay python2-rope))))))
9898
9899 (define-public python-py3status
9900 (package
9901 (name "python-py3status")
9902 (version "3.21")
9903 (source
9904 (origin
9905 (method url-fetch)
9906 (uri (pypi-uri "py3status" version))
9907 (sha256
9908 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
9909 (build-system python-build-system)
9910 (inputs
9911 `(("file" ,file)))
9912 (arguments
9913 '(#:phases
9914 (modify-phases %standard-phases
9915 ;; 'file' is used for detection of configuration file encoding
9916 ;; let's make link the dependency to particular input
9917 (add-before 'build 'patch-file-path
9918 (lambda* (#:key inputs #:allow-other-keys)
9919 (let ((file-path (assoc-ref inputs "file")))
9920 (substitute* "py3status/parse_config.py"
9921 (("\\['file', '-b'")
9922 (string-append "['" file-path "/bin/file', '-b'")))
9923 #t))))
9924 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9925 (home-page "https://github.com/ultrabug/py3status")
9926 (synopsis "Extensible i3status wrapper written in Python")
9927 (description "py3status is an i3status wrapper which extends i3status
9928 functionality in a modular way, allowing you to extend your panel with your
9929 own code, responding to click events and updating clock every second.")
9930 (license license:bsd-3)))
9931
9932 (define-public python-tblib
9933 (package
9934 (name "python-tblib")
9935 (version "1.3.2")
9936 (source (origin
9937 (method url-fetch)
9938 (uri (pypi-uri "tblib" version))
9939 (sha256 (base32
9940 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9941 (build-system python-build-system)
9942 (arguments
9943 `(#:phases
9944 (modify-phases %standard-phases
9945 (add-before 'check 'adjust-tests
9946 (lambda _
9947 (when (which "python3")
9948 ;; Adjust the example output to match that of Python 3.7:
9949 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
9950 (substitute* "README.rst"
9951 (("Exception\\('fail',") "Exception('fail'"))
9952 #t)))
9953 (replace 'check
9954 (lambda _
9955 ;; Upstream runs tests after installation and the package itself
9956 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9957 ;; found.
9958 (setenv "PYTHONPATH"
9959 (string-append (getcwd) "/build/lib:"
9960 (getenv "PYTHONPATH")))
9961 (invoke "py.test" "-vv" "tests" "README.rst"))))))
9962 (native-inputs
9963 `(("python-pytest" ,python-pytest)
9964 ("python-six" ,python-six)))
9965 (home-page "https://github.com/ionelmc/python-tblib")
9966 (synopsis "Traceback serialization library")
9967 (description
9968 "Traceback serialization allows you to:
9969
9970 @enumerate
9971 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
9972 different processes. This allows better error handling when running code over
9973 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9974
9975 @item Parse traceback strings and raise with the parsed tracebacks.
9976 @end enumerate\n")
9977 (license license:bsd-3)))
9978
9979 (define-public python2-tblib
9980 (package-with-python2 python-tblib))
9981
9982 (define-public python-greenlet
9983 (package
9984 (name "python-greenlet")
9985 (version "0.4.15")
9986 (source (origin
9987 (method url-fetch)
9988 (uri (pypi-uri "greenlet" version))
9989 (sha256
9990 (base32
9991 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
9992 (build-system python-build-system)
9993 (home-page "https://greenlet.readthedocs.io/")
9994 (synopsis "Lightweight in-process concurrent programming")
9995 (description
9996 "Greenlet package is a spin-off of Stackless, a version of CPython
9997 that supports micro-threads called \"tasklets\". Tasklets run
9998 pseudo-concurrently (typically in a single or a few OS-level threads) and
9999 are synchronized with data exchanges on \"channels\".")
10000 (license (list license:psfl license:expat))))
10001
10002 (define-public python2-greenlet
10003 (package-with-python2 python-greenlet))
10004
10005 (define-public python-objgraph
10006 (package
10007 (name "python-objgraph")
10008 (version "3.4.0")
10009 (source
10010 (origin
10011 (method url-fetch)
10012 (uri (pypi-uri "objgraph" version))
10013 (sha256
10014 (base32
10015 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
10016 (build-system python-build-system)
10017 (propagated-inputs
10018 `(("python-graphviz" ,python-graphviz)))
10019 (native-inputs
10020 `(("python-mock" ,python-mock)
10021 ("graphviz" ,graphviz)))
10022 (home-page "https://mg.pov.lt/objgraph/")
10023 (synopsis "Draw Python object reference graphs with graphviz")
10024 (description
10025 "This package provides tools to draw Python object reference graphs with
10026 graphviz.")
10027 (license license:expat)))
10028
10029 (define-public python-gevent
10030 (package
10031 (name "python-gevent")
10032 (version "1.3.7")
10033 (source (origin
10034 (method url-fetch)
10035 (uri (pypi-uri "gevent" version))
10036 (sha256
10037 (base32
10038 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
10039 (modules '((guix build utils)))
10040 (snippet
10041 '(begin
10042 ;; unbunding libev and c-ares
10043 (delete-file-recursively "deps")
10044 #t))))
10045 (build-system python-build-system)
10046 (arguments
10047 `(#:modules ((ice-9 ftw)
10048 (ice-9 match)
10049 (srfi srfi-26)
10050 (guix build utils)
10051 (guix build python-build-system))
10052 #:phases (modify-phases %standard-phases
10053 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
10054 (lambda _
10055 (substitute* "src/gevent/subprocess.py"
10056 (("/bin/sh") (which "sh")))
10057 (for-each (lambda (file)
10058 (substitute* file
10059 (("/bin/sh") (which "sh"))
10060 (("/bin/true") (which "true"))))
10061 (find-files "src/greentest" "\\.py$"))
10062 #t))
10063 (add-before 'build 'do-not-use-bundled-sources
10064 (lambda* (#:key inputs #:allow-other-keys)
10065 (setenv "CONFIG_SHELL" (which "bash"))
10066 (setenv "LIBEV_EMBED" "false")
10067 (setenv "CARES_EMBED" "false")
10068 (setenv "EMBED" "false")
10069
10070 ;; Prevent building bundled libev.
10071 (substitute* "setup.py"
10072 (("run_make=_BUILDING")
10073 "run_make=False"))
10074
10075 (let ((greenlet (string-append
10076 (assoc-ref inputs "python-greenlet")
10077 "/include")))
10078 (match (scandir greenlet
10079 (lambda (item)
10080 (string-prefix? "python" item)))
10081 ((python)
10082 (setenv "C_INCLUDE_PATH"
10083 (string-append greenlet "/" python)))))
10084 #t))
10085 (add-before 'check 'skip-timer-test
10086 (lambda _
10087 ;; XXX: Skip 'TestTimerResolution', which appears to be
10088 ;; unreliable.
10089 (substitute* "src/greentest/test__core_timer.py"
10090 (("not greentest.RUNNING_ON_CI") "False"))
10091 #t))
10092 (replace 'check
10093 (lambda _
10094 ;; Make sure the build directory is on PYTHONPATH.
10095 (setenv "PYTHONPATH"
10096 (string-append
10097 (getenv "PYTHONPATH") ":"
10098 (getcwd) "/build/"
10099 (car (scandir "build" (cut string-prefix? "lib." <>)))))
10100 (with-directory-excursion "src/greentest"
10101 ;; XXX: Many tests require network access. Instead we only
10102 ;; run known-good tests. Unfortunately we cannot use
10103 ;; recursion here since this directory also contains
10104 ;; Python-version-specific subfolders.
10105 (apply invoke "python" "testrunner.py" "--config"
10106 "known_failures.py"
10107 (scandir "." (cut regexp-exec
10108 (make-regexp "test_+(subprocess|core)")
10109 <>)))))))))
10110 (propagated-inputs
10111 `(("python-greenlet" ,python-greenlet)
10112 ("python-objgraph" ,python-objgraph)))
10113 (native-inputs
10114 `(("python-six" ,python-six)))
10115 (inputs
10116 `(("c-ares" ,c-ares)
10117 ("libev" ,libev)))
10118 (home-page "http://www.gevent.org/")
10119 (synopsis "Coroutine-based network library")
10120 (description
10121 "gevent is a coroutine-based Python networking library that uses greenlet
10122 to provide a high-level synchronous API on top of the libev event loop.")
10123 (license license:expat)
10124 (properties `((python2-variant . ,(delay python2-gevent))))))
10125
10126 (define-public python2-gevent
10127 (let ((base (package-with-python2
10128 (strip-python2-variant python-gevent))))
10129 (package
10130 (inherit base)
10131 (native-inputs `(,@(package-native-inputs python-gevent)
10132 ("python-mock" ,python2-mock))))))
10133
10134 (define-public python-fastimport
10135 (package
10136 (name "python-fastimport")
10137 (version "0.9.6")
10138 (source
10139 (origin
10140 (method url-fetch)
10141 (uri (pypi-uri "fastimport" version))
10142 (sha256
10143 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10144 (build-system python-build-system)
10145 (home-page "https://github.com/jelmer/python-fastimport")
10146 (synopsis "VCS fastimport parser and generator in Python")
10147 (description "This package provides a parser for and generator of the Git
10148 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
10149 format.")
10150 (license license:gpl2+)))
10151
10152 (define-public python2-fastimport
10153 (package-with-python2 python-fastimport))
10154
10155 (define-public python-twisted
10156 (package
10157 (name "python-twisted")
10158 (version "19.7.0")
10159 (source (origin
10160 (method url-fetch)
10161 (uri (pypi-uri "Twisted" version ".tar.bz2"))
10162 (sha256
10163 (base32
10164 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
10165 (build-system python-build-system)
10166 (arguments
10167 '(#:tests? #f)) ; FIXME: some tests fail
10168 (propagated-inputs
10169 `(("python-zope-interface" ,python-zope-interface)
10170 ("python-pyhamcrest" ,python-pyhamcrest)
10171 ("python-incremental" ,python-incremental)
10172 ("python-hyperlink" ,python-hyperlink)
10173 ("python-constantly" ,python-constantly)
10174 ("python-automat" ,python-automat)))
10175 (home-page "https://twistedmatrix.com/")
10176 (synopsis "Asynchronous networking framework written in Python")
10177 (description
10178 "Twisted is an extensible framework for Python programming, with special
10179 focus on event-based network programming and multiprotocol integration.")
10180 (license license:expat)))
10181
10182 (define-public python2-twisted
10183 (package-with-python2 python-twisted))
10184
10185 (define-public python-pika
10186 (package
10187 (name "python-pika")
10188 (version "0.12.0")
10189 (source
10190 (origin
10191 (method url-fetch)
10192 (uri (pypi-uri "pika" version))
10193 (sha256
10194 (base32
10195 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10196 (build-system python-build-system)
10197 (native-inputs
10198 `(("python-pyev" ,python-pyev)
10199 ("python-tornado" ,python-tornado)
10200 ("python-twisted" ,python-twisted)))
10201 (home-page "https://pika.readthedocs.org")
10202 (synopsis "Pure Python AMQP Client Library")
10203 (description
10204 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10205 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10206 network support library.")
10207 (license license:bsd-3)))
10208
10209 (define-public python2-pika
10210 (package-with-python2 python-pika))
10211
10212 (define-public python-ply
10213 (package
10214 (name "python-ply")
10215 (version "3.10")
10216 (source
10217 (origin
10218 (method url-fetch)
10219 (uri (pypi-uri "ply" version))
10220 (sha256
10221 (base32
10222 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10223 (build-system python-build-system)
10224 (home-page "http://www.dabeaz.com/ply/")
10225 (synopsis "Python Lex & Yacc")
10226 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10227 It uses LR parsing and does extensive error checking.")
10228 (license license:bsd-3)))
10229
10230 (define-public python2-ply
10231 (package-with-python2 python-ply))
10232
10233 (define-public python-tabulate
10234 (package
10235 (name "python-tabulate")
10236 (version "0.7.7")
10237 (source (origin
10238 (method url-fetch)
10239 (uri (pypi-uri "tabulate" version))
10240 (sha256
10241 (base32
10242 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10243 (build-system python-build-system)
10244 (arguments
10245 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10246 ;; and the latest release is not tagged in the upstream repository.
10247 '(#:tests? #f))
10248 (home-page "https://bitbucket.org/astanin/python-tabulate")
10249 (synopsis "Pretty-print tabular data")
10250 (description
10251 "Tabulate is a library and command-line utility to pretty-print tabular
10252 data in Python.")
10253 (license license:expat)))
10254
10255 (define-public python2-tabulate
10256 (package-with-python2 python-tabulate))
10257
10258 (define-public python-kazoo
10259 (package
10260 (name "python-kazoo")
10261 (version "2.4.0")
10262 (source
10263 (origin
10264 (method url-fetch)
10265 (uri (pypi-uri "kazoo" version))
10266 (sha256
10267 (base32
10268 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10269 (build-system python-build-system)
10270 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10271 (propagated-inputs
10272 `(("python-six" ,python-six)))
10273 (home-page "https://kazoo.readthedocs.org")
10274 (synopsis "High-level Zookeeper client library")
10275 (description
10276 "Kazoo is a Python client library for the Apache Zookeeper distributed
10277 application service. It is designed to be easy to use and to avoid common
10278 programming errors.")
10279 (license license:asl2.0)))
10280
10281 (define-public python2-kazoo
10282 (package-with-python2 python-kazoo))
10283
10284 (define-public python-pykafka
10285 (package
10286 (name "python-pykafka")
10287 (version "2.4.0")
10288 (source (origin
10289 (method url-fetch)
10290 (uri (pypi-uri "pykafka" version))
10291 (sha256
10292 (base32
10293 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10294 (build-system python-build-system)
10295 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10296 (propagated-inputs
10297 `(("python-gevent" ,python-gevent)
10298 ("python-kazoo" ,python-kazoo)
10299 ("python-tabulate" ,python-tabulate)))
10300 (inputs
10301 `(("librdkafka" ,librdkafka)))
10302 (home-page "https://pykafka.readthedocs.io/")
10303 (synopsis "Apache Kafka client for Python")
10304 (description
10305 "PyKafka is a client for the Apache Kafka distributed messaging system.
10306 It includes Python implementations of Kafka producers and consumers, which
10307 are optionally backed by a C extension built on librdkafka.")
10308 (license license:asl2.0)))
10309
10310 (define-public python2-pykafka
10311 (package-with-python2 python-pykafka))
10312
10313 (define-public python-wcwidth
10314 (package
10315 (name "python-wcwidth")
10316 (version "0.1.7")
10317 (source
10318 (origin
10319 (method url-fetch)
10320 (uri (pypi-uri "wcwidth" version))
10321 (sha256
10322 (base32
10323 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
10324 (build-system python-build-system)
10325 (home-page "https://github.com/jquast/wcwidth")
10326 (synopsis "Measure number of terminal column cells of wide-character codes")
10327 (description "Wcwidth measures the number of terminal column cells of
10328 wide-character codes. It is useful for those implementing a terminal emulator,
10329 or programs that carefully produce output to be interpreted by one. It is a
10330 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10331 specified in POSIX.1-2001 and POSIX.1-2008.")
10332 (license license:expat)))
10333
10334 (define-public python2-wcwidth
10335 (package-with-python2 python-wcwidth))
10336
10337 (define-public python2-jsonrpclib
10338 (package
10339 (name "python2-jsonrpclib")
10340 (version "0.1.7")
10341 (source (origin
10342 (method url-fetch)
10343 (uri (pypi-uri "jsonrpclib" version))
10344 (sha256
10345 (base32
10346 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10347 (build-system python-build-system)
10348 (arguments
10349 `(#:tests? #f
10350 #:python ,python-2))
10351 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10352 (synopsis "Implementation of JSON-RPC specification for Python")
10353 (description
10354 "This library is an implementation of the JSON-RPC specification.
10355 It supports both the original 1.0 specification, as well as the
10356 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10357 etc.")
10358 (license license:asl2.0)))
10359
10360 (define-public python-chai
10361 (package
10362 (name "python-chai")
10363 (version "1.1.2")
10364 (source (origin
10365 (method url-fetch)
10366 (uri (pypi-uri "chai" version))
10367 (sha256
10368 (base32
10369 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10370 (build-system python-build-system)
10371 (home-page "https://github.com/agoragames/chai")
10372 (synopsis "Mocking framework for Python")
10373 (description
10374 "Chai provides an api for mocking, stubbing and spying your python
10375 objects, patterned after the Mocha library for Ruby.")
10376 (license license:bsd-3)))
10377
10378 (define-public python2-chai
10379 (package-with-python2 python-chai))
10380
10381 (define-public python-inflection
10382 (package
10383 (name "python-inflection")
10384 (version "0.3.1")
10385 (source
10386 (origin (method url-fetch)
10387 (uri (pypi-uri "inflection" version))
10388 (sha256
10389 (base32
10390 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10391 (build-system python-build-system)
10392 (native-inputs
10393 `(("python-pytest" ,python-pytest)))
10394 (home-page "https://github.com/jpvanhal/inflection")
10395 (synopsis "Python string transformation library")
10396 (description
10397 "Inflection is a string transformation library. It singularizes
10398 and pluralizes English words, and transforms strings from CamelCase to
10399 underscored string.")
10400 (license license:expat)))
10401
10402 (define-public python2-inflection
10403 (package-with-python2 python-inflection))
10404
10405 (define-public python-pylev
10406 (package
10407 (name "python-pylev")
10408 (version "1.3.0")
10409 (source (origin
10410 (method url-fetch)
10411 (uri (pypi-uri "pylev" version))
10412 (sha256
10413 (base32
10414 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10415 (build-system python-build-system)
10416 (home-page "https://github.com/toastdriven/pylev")
10417 (synopsis "Levenshtein distance implementation in Python")
10418 (description "Pure Python Levenshtein implementation, based off the
10419 Wikipedia code samples at
10420 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10421 (license license:bsd-3)))
10422
10423 (define-public python2-pylev
10424 (package-with-python2 python-pylev))
10425
10426 (define-public python-cleo
10427 (package
10428 (name "python-cleo")
10429 (version "0.6.8")
10430 (source (origin
10431 (method url-fetch)
10432 (uri (pypi-uri "cleo" version))
10433 (sha256
10434 (base32
10435 "06zp695hq835rkaq6irr1ds1dp2qfzyf32v60vxpd8rcnxv319l5"))))
10436 (build-system python-build-system)
10437 (native-inputs
10438 `( ;; For testing
10439 ("python-mock" ,python-mock)
10440 ("python-pytest-mock" ,python-pytest-mock)
10441 ("python-pytest" ,python-pytest)))
10442 (propagated-inputs
10443 `(("python-backpack" ,python-backpack)
10444 ("python-pastel" ,python-pastel)
10445 ("python-pylev" ,python-pylev)))
10446 (home-page "https://github.com/sdispater/cleo")
10447 (synopsis "Command-line arguments library for Python")
10448 (description
10449 "Cleo allows you to create command-line commands with signature in
10450 docstring and colored output.")
10451 (license license:expat)))
10452
10453 (define-public python2-cleo
10454 (package-with-python2 python-cleo))
10455
10456 (define-public python-tomlkit
10457 (package
10458 (name "python-tomlkit")
10459 (version "0.5.7")
10460 (source
10461 (origin
10462 (method url-fetch)
10463 (uri (pypi-uri "tomlkit" version))
10464 (sha256
10465 (base32
10466 "18820ga5z3if1w8dvykxrfm000akracq01ic402xrbljgbn5grn4"))))
10467 (build-system python-build-system)
10468 (native-inputs
10469 `(("python-pytest" ,python-pytest)))
10470 (home-page
10471 "https://github.com/sdispater/tomlkit")
10472 (synopsis "Style preserving TOML library")
10473 (description
10474 "TOML Kit is a 0.5.0-compliant TOML library. It includes a parser that
10475 preserves all comments, indentations, whitespace and internal element ordering,
10476 and makes them accessible and editable via an intuitive API. It can also
10477 create new TOML documents from scratch using the provided helpers. Part of the
10478 implementation as been adapted, improved and fixed from Molten.")
10479 (license license:expat)))
10480
10481 (define-public python-shellingham
10482 (package
10483 (name "python-shellingham")
10484 (version "1.3.1")
10485 (source
10486 (origin
10487 (method url-fetch)
10488 (uri (pypi-uri "shellingham" version))
10489 (sha256
10490 (base32
10491 "1q7kws7w4x2hji3g7y0ni9ddk4sd676ylrb3db54gbpys6xj6nwq"))))
10492 (build-system python-build-system)
10493 (home-page
10494 "https://github.com/sarugaku/shellingham")
10495 (synopsis "Tool to detect surrounding shell")
10496 (description
10497 "Shellingham detects what shell the current Python executable is
10498 running in.")
10499 (license license:isc)))
10500
10501 (define-public python-memcached
10502 (package
10503 (name "python-memcached")
10504 (version "1.59")
10505 (source
10506 (origin
10507 (method url-fetch)
10508 (uri (pypi-uri "python-memcached" version))
10509 (sha256
10510 (base32
10511 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))))
10512 (build-system python-build-system)
10513 (propagated-inputs `(("python-six" ,python-six)))
10514 (home-page
10515 "https://github.com/linsomniac/python-memcached")
10516 (synopsis "Pure python memcached client")
10517 (description
10518 "This software is a pure Python interface to the memcached memory cache
10519 daemon. It is the client side software which allows storing values in one or
10520 more, possibly remote, memcached servers.")
10521 (license license:psfl)))
10522
10523 (define-public python-clikit
10524 (package
10525 (name "python-clikit")
10526 (version "0.2.4")
10527 (source
10528 (origin
10529 (method url-fetch)
10530 (uri (pypi-uri "clikit" version))
10531 (sha256
10532 (base32
10533 "0dc8czib5f4j9px1ivcpqnmivnx2zjpc0xb00ldrhsqylks7r06n"))))
10534 (build-system python-build-system)
10535 (propagated-inputs
10536 `(("python-pastel" ,python-pastel)
10537 ("python-pylev" ,python-pylev)))
10538 (home-page "https://github.com/sdispater/clikit")
10539 (synopsis "Group of utilities to build command line interfaces")
10540 (description
10541 "CliKit is a group of utilities to build testable command line
10542 interfaces.")
10543 (license license:expat)))
10544
10545 (define-public python-msgpack-python
10546 (package
10547 (name "python-msgpack-python")
10548 (version "0.5.6")
10549 (source
10550 (origin
10551 (method url-fetch)
10552 (uri (pypi-uri "msgpack-python" version))
10553 (sha256
10554 (base32
10555 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
10556 (build-system python-build-system)
10557 (home-page "http://msgpack.org/")
10558 (synopsis "Package to deserialize messages in MessagePack binary format")
10559 (description
10560 "MessagePack is an efficient binary serialization format. It lets you
10561 exchange data among multiple languages like JSON. But it's faster and
10562 smaller. Small integers are encoded into a single byte, and typical short
10563 strings require only one extra byte in addition to the strings themselves.")
10564 (license license:asl2.0)))
10565
10566 (define-public python-cachy
10567 (package
10568 (name "python-cachy")
10569 (version "0.2.0")
10570 (source
10571 (origin
10572 (method url-fetch)
10573 (uri (pypi-uri "cachy" version))
10574 (sha256
10575 (base32
10576 "0v6mjyhgx6j7ya20bk69cr3gdzdkdf6psay0h090rscclgji65dp"))))
10577 (build-system python-build-system)
10578 (native-inputs
10579 `(("python-fakeredis" ,python-fakeredis)
10580 ("python-flexmock" ,python-flexmock)
10581 ("python-pytest" ,python-pytest)))
10582 (propagated-inputs
10583 `(("python-memcached" ,python-memcached)
10584 ("python-msgpack-python" ,python-msgpack-python)
10585 ("python-redis" ,python-redis)))
10586 (home-page "https://github.com/sdispater/cachy")
10587 (synopsis "Simple yet effective caching library")
10588 (description
10589 "Cachy provides a simple yet effective caching library. A simple but
10590 powerful API: thread-safety; decorator syntax; support for memcached, redis,
10591 database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
10592 (license license:expat)))
10593
10594 (define-public poetry
10595 (package
10596 (name "poetry")
10597 (version "0.12.17")
10598 ;; Poetry can only be built from source with poetry.
10599 (source
10600 (origin
10601 (method url-fetch)
10602 (uri (pypi-uri "poetry" version))
10603 (sha256
10604 (base32
10605 "0gxwcd65qjmzqzppf53x51sic1rbcd9py6cdzx3aprppipimslvf"))))
10606 (build-system python-build-system)
10607 (arguments
10608 `(#:tests? #f ;; Pypi does not have tests.
10609 #:phases
10610 (modify-phases %standard-phases
10611 (replace 'build
10612 (lambda _
10613 ;; Bug in poetry https://github.com/sdispater/poetry/issues/866.
10614 (invoke "sed" "-i" "-e" "s/from distutils.core/from setuptools/"
10615 "setup.py")
10616 #t)))))
10617 (propagated-inputs
10618 `(("python-cachecontrol" ,python-cachecontrol)
10619 ("python-cachy" ,python-cachy)
10620 ("python-cleo" ,python-cleo)
10621 ("python-glob2" ,python-glob2)
10622 ("python-html5lib" ,python-html5lib)
10623 ("python-jsonschema" ,python-jsonschema)
10624 ("python-msgpack" ,python-msgpack)
10625 ("python-pathlib2" ,python-pathlib2)
10626 ("python-pkginfo" ,python-pkginfo)
10627 ("python-pyparsing" ,python-pyparsing)
10628 ("python-pyrsistent" ,python-pyrsistent)
10629 ("python-requests" ,python-requests)
10630 ("python-requests-toolbelt" ,python-requests-toolbelt)
10631 ("python-shellingham" ,python-shellingham)
10632 ("python-tomlkit" ,python-tomlkit)
10633 ("python-virtualenv" ,python-virtualenv)))
10634 (home-page "https://poetry.eustace.io/")
10635 (synopsis "Python dependency management and packaging made easy")
10636 (description "Poetry is a tool for dependency management and packaging
10637 in Python. It allows you to declare the libraries your project depends on and
10638 it will manage (install/update) them for you.")
10639 (license license:expat)))
10640
10641 (define-public python-lazy-object-proxy
10642 (package
10643 (name "python-lazy-object-proxy")
10644 (version "1.4.3")
10645 (source (origin
10646 (method url-fetch)
10647 (uri (pypi-uri "lazy-object-proxy" version))
10648 (sha256
10649 (base32
10650 "1w1aaay424ciz8fz3fkzxb0pxzfxn184f2whpyn4fx72bn50x47k"))))
10651 (native-inputs
10652 `(("python-setuptools-scm" ,python-setuptools-scm-3.3)))
10653 (build-system python-build-system)
10654 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10655 (synopsis "Lazy object proxy for python")
10656 (description
10657 "Lazy object proxy is an object that wraps a callable but defers the call
10658 until the object is actually required, and caches the result of said call.")
10659 (license license:bsd-2)))
10660
10661 (define-public python2-lazy-object-proxy
10662 (package-with-python2 python-lazy-object-proxy))
10663
10664 (define-public python-dnspython
10665 (package
10666 (name "python-dnspython")
10667 (version "1.15.0")
10668 (source (origin
10669 (method url-fetch)
10670 (uri (string-append "http://www.dnspython.org/kits/"
10671 version "/dnspython-" version ".tar.gz"))
10672 (sha256
10673 (base32
10674 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10675 (build-system python-build-system)
10676 (arguments '(#:tests? #f)) ; XXX: requires internet access
10677 (home-page "http://www.dnspython.org")
10678 (synopsis "DNS toolkit for Python")
10679 (description
10680 "dnspython is a DNS toolkit for Python. It supports almost all record
10681 types. It can be used for queries, zone transfers, and dynamic updates.
10682 It supports TSIG authenticated messages and EDNS0.")
10683 (license license:expat)))
10684
10685 (define-public python2-dnspython
10686 (package-with-python2 python-dnspython))
10687
10688 (define-public python-email-validator
10689 (package
10690 (name "python-email-validator")
10691 (version "1.0.2")
10692 (source
10693 (origin (method url-fetch)
10694 (uri (pypi-uri "email_validator" version))
10695 (sha256
10696 (base32
10697 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10698 (build-system python-build-system)
10699 (arguments
10700 '(#:phases
10701 (modify-phases %standard-phases
10702 (add-before 'build 'use-dnspython
10703 (lambda _
10704 (substitute* "setup.py"
10705 (("dnspython3") "dnspython"))
10706 #t)))))
10707 (propagated-inputs
10708 `(("python-dnspython" ,python-dnspython)
10709 ("python-idna" ,python-idna)))
10710 (home-page "https://github.com/JoshData/python-email-validator")
10711 (synopsis "Email address validation library for Python")
10712 (description
10713 "This library validates email address syntax and deliverability.")
10714 (license license:cc0)))
10715
10716 (define-public python2-email-validator
10717 (package-with-python2 python-email-validator))
10718
10719 (define-public python-ukpostcodeparser
10720 (package
10721 (name "python-ukpostcodeparser")
10722 (version "1.0.3")
10723 (source (origin
10724 (method url-fetch)
10725 (uri (pypi-uri "UkPostcodeParser" version))
10726 (sha256
10727 (base32
10728 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10729 (build-system python-build-system)
10730 (home-page "https://github.com/hamstah/ukpostcodeparser")
10731 (synopsis "UK Postcode parser for Python")
10732 (description
10733 "This library provides the @code{parse_uk_postcode} function for
10734 parsing UK postcodes.")
10735 (license license:expat)))
10736
10737 (define-public python2-ukpostcodeparser
10738 (package-with-python2 python-ukpostcodeparser))
10739
10740 (define-public python-faker
10741 (package
10742 (name "python-faker")
10743 (version "0.7.9")
10744 (source (origin
10745 (method url-fetch)
10746 (uri (pypi-uri "Faker" version))
10747 (sha256
10748 (base32
10749 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10750 (patches
10751 (search-patches "python-faker-fix-build-32bit.patch"))
10752 (modules '((guix build utils)))
10753 (snippet
10754 '(begin
10755 (for-each delete-file (find-files "." "\\.pyc$"))
10756 #t))))
10757 (build-system python-build-system)
10758 (arguments
10759 '(#:phases
10760 (modify-phases %standard-phases
10761 (replace 'check
10762 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
10763 (native-inputs
10764 `(;; For testing
10765 ("python-email-validator" ,python-email-validator)
10766 ("python-mock" ,python-mock)
10767 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10768 (propagated-inputs
10769 `(("python-dateutil" ,python-dateutil)
10770 ("python-six" ,python-six)))
10771 (home-page "https://github.com/joke2k/faker")
10772 (synopsis "Python package that generates fake data")
10773 (description
10774 "Faker is a Python package that generates fake data such as names,
10775 addresses, and phone numbers.")
10776 (license license:expat)
10777 (properties `((python2-variant . ,(delay python2-faker))))))
10778
10779 (define-public python2-faker
10780 (let ((base (package-with-python2 (strip-python2-variant
10781 python-faker))))
10782 (package
10783 (inherit base)
10784 (propagated-inputs
10785 `(("python2-ipaddress" ,python2-ipaddress)
10786 ,@(package-propagated-inputs base))))))
10787
10788 (define-public python-pyaml
10789 (package
10790 (name "python-pyaml")
10791 (version "18.11.0")
10792 (source (origin
10793 (method url-fetch)
10794 (uri (pypi-uri "pyaml" version))
10795 (sha256
10796 (base32
10797 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
10798 (build-system python-build-system)
10799 (native-inputs
10800 `(("python-unidecode" ,python-unidecode)))
10801 (propagated-inputs
10802 `(("python-pyyaml" ,python-pyyaml)))
10803 (home-page "https://github.com/mk-fg/pretty-yaml")
10804 (synopsis "YAML pretty-print library for Python")
10805 (description
10806 "pyaml is a PyYAML based python module to produce pretty and readable
10807 YAML-serialized data.")
10808 (license license:wtfpl2)))
10809
10810 (define-public python2-pyaml
10811 (package-with-python2 python-pyaml))
10812
10813 (define-public python-backpack
10814 (package
10815 (name "python-backpack")
10816 (version "0.1")
10817 (source
10818 (origin
10819 (method url-fetch)
10820 (uri (pypi-uri "backpack" version))
10821 (sha256
10822 (base32
10823 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10824 (build-system python-build-system)
10825 (native-inputs
10826 `(("python-pytest" ,python-pytest)
10827 ("python-nose" ,python-nose)))
10828 (propagated-inputs
10829 `(("python-simplejson" ,python-simplejson)))
10830 (home-page "https://github.com/sdispater/backpack")
10831 (synopsis "Utilities for working with Python collections")
10832 (description "Backpack provides some useful utilities for working with
10833 collections of data.")
10834 (license license:expat)))
10835
10836 (define-public python2-backpack
10837 (package-with-python2 python-backpack))
10838
10839 (define-public python-prompt-toolkit
10840 (package
10841 (name "python-prompt-toolkit")
10842 (version "2.0.7")
10843 (source
10844 (origin
10845 (method url-fetch)
10846 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10847 (sha256
10848 (base32
10849 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10850 (build-system python-build-system)
10851 (arguments
10852 `(#:phases
10853 (modify-phases %standard-phases
10854 (delete 'check)
10855 (add-after 'install 'post-install-check
10856 (lambda* (#:key inputs outputs #:allow-other-keys)
10857 ;; HOME is needed for the test
10858 ;; "test_pathcompleter_can_expanduser".
10859 (setenv "HOME" "/tmp")
10860 (add-installed-pythonpath inputs outputs)
10861 (invoke "py.test"))))))
10862 (propagated-inputs
10863 `(("python-wcwidth" ,python-wcwidth)
10864 ("python-six" ,python-six)
10865 ("python-pygments" ,python-pygments)))
10866 (native-inputs
10867 `(("python-pytest" ,python-pytest)))
10868 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10869 (synopsis "Library for building command line interfaces in Python")
10870 (description
10871 "Prompt-Toolkit is a library for building interactive command line
10872 interfaces in Python. It's like GNU Readline but it also features syntax
10873 highlighting while typing, out-of-the-box multi-line input editing, advanced
10874 code completion, incremental search, support for Chinese double-width
10875 characters, mouse support, and auto suggestions.")
10876 (license license:bsd-3)))
10877
10878 (define-public python2-prompt-toolkit
10879 (package-with-python2 python-prompt-toolkit))
10880
10881 (define-public python-prompt-toolkit-1
10882 (package (inherit python-prompt-toolkit)
10883 (version "1.0.15")
10884 (source
10885 (origin
10886 (method url-fetch)
10887 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10888 (sha256
10889 (base32
10890 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
10891
10892 (define-public python2-prompt-toolkit-1
10893 (package-with-python2 python-prompt-toolkit-1))
10894
10895 (define-public python-jedi
10896 (package
10897 (name "python-jedi")
10898 (version "0.15.1")
10899 (source
10900 (origin
10901 (method url-fetch)
10902 (uri (pypi-uri "jedi" version))
10903 (sha256
10904 (base32
10905 "0bp4pxhsynaarbvzblsn5x32lzp29svy3sxfy8i6m5iwz9s9r1ds"))))
10906 (build-system python-build-system)
10907 (arguments
10908 `(#:phases
10909 (modify-phases %standard-phases
10910 (add-after 'unpack 'disable-file-completion-test
10911 ;; A single parameterized test currently fail (see:
10912 ;; https://github.com/davidhalter/jedi/issues/1395). Remove it.
10913 (lambda _
10914 (substitute* "test/test_api/test_completion.py"
10915 ((".*'example.py', 'rb\"' \\+ join\\('\\.\\.'.*") ""))
10916 #t))
10917 (replace 'check
10918 (lambda _
10919 (setenv "HOME" "/tmp")
10920 (invoke "python" "-m" "pytest"))))))
10921 (native-inputs
10922 `(("python-pytest" ,python-pytest)
10923 ("python-docopt" ,python-docopt)))
10924 (propagated-inputs
10925 `(("python-parso" ,python-parso)))
10926 (home-page "https://github.com/davidhalter/jedi")
10927 (synopsis "Autocompletion and static analysis library for Python")
10928 (description
10929 "Jedi is a static analysis tool for Python that can be used in Integrated
10930 Development Environments (@dfn{IDE}s) and text editors. It understands Python
10931 on a deeper level than many other static analysis frameworks for Python.
10932
10933 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
10934 well.")
10935 (license license:expat)))
10936
10937 (define-public python2-jedi
10938 (package-with-python2 python-jedi))
10939
10940 (define-public ptpython
10941 (package
10942 (name "ptpython")
10943 (version "0.34")
10944 (source (origin
10945 (method url-fetch)
10946 (uri (pypi-uri "ptpython" version))
10947 (sha256
10948 (base32
10949 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10950 (build-system python-build-system)
10951 (arguments
10952 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
10953 (propagated-inputs
10954 `(("python-docopt" ,python-docopt)
10955 ("python-jedi" ,python-jedi)
10956 ("python-prompt-toolkit" ,python-prompt-toolkit)
10957 ("python-pygments" ,python-pygments)))
10958 (home-page "https://github.com/jonathanslenders/ptpython")
10959 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10960 (description
10961 "ptpython is a Python read-eval-print loop with IDE-like features.
10962 It supports syntax highlighting, multiline editing, autocompletion, mouse,
10963 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10964 etc.")
10965 (license license:bsd-3)
10966 (properties `((python2-variant . ,(delay ptpython-2))))))
10967
10968 (define-public ptpython-2
10969 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10970 (package
10971 (inherit base)
10972 (name "ptpython2"))))
10973
10974 (define-public python-stem
10975 (package
10976 (name "python-stem")
10977 (version "1.7.1")
10978 (source
10979 (origin
10980 (method url-fetch)
10981 (uri (pypi-uri "stem" version))
10982 (sha256
10983 (base32
10984 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
10985 (build-system python-build-system)
10986 (arguments
10987 `(#:phases
10988 (modify-phases %standard-phases
10989 (replace 'check
10990 (lambda _
10991 (invoke "./run_tests.py" "--unit")
10992 #t)))))
10993 (native-inputs
10994 `(("python-mock" ,python-mock)
10995 ("python-pycodestyle" ,python-pycodestyle)
10996 ("python-pyflakes" ,python-pyflakes)))
10997 (home-page "https://stem.torproject.org/")
10998 (synopsis
10999 "Python controller library that allows applications to interact with Tor")
11000 (description
11001 "Stem is a Python controller library for Tor. With it you can use Tor's
11002 control protocol to script against the Tor process and read descriptor data
11003 relays publish about themselves.")
11004 (license license:lgpl3)))
11005
11006 (define-public python2-stem
11007 (package-with-python2 python-stem))
11008
11009 (define-public python-pyserial
11010 (package
11011 (name "python-pyserial")
11012 (version "3.4")
11013 (source
11014 (origin
11015 (method url-fetch)
11016 (uri (pypi-uri "pyserial" version))
11017 (sha256
11018 (base32
11019 "09y68bczw324a4jb9a1cfwrbjhq179vnfkkkrybbksp0vqgl0bbf"))))
11020 (build-system python-build-system)
11021 (arguments
11022 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
11023 ;; #:phases
11024 ;; (modify-phases %standard-phases
11025 ;; (replace 'check
11026 ;; (lambda _
11027 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
11028 (home-page
11029 "https://github.com/pyserial/pyserial")
11030 (synopsis "Python Serial Port Bindings")
11031 (description "@code{pyserial} provide serial port bindings for Python. It
11032 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11033 and/or Xon/Xoff. The port is accessed in RAW mode.")
11034 (license license:bsd-3)))
11035
11036 (define-public python2-pyserial
11037 (package-with-python2 python-pyserial))
11038
11039 (define-public python-kivy
11040 (package
11041 (name "python-kivy")
11042 (version "1.10.1")
11043 (source
11044 (origin
11045 (method url-fetch)
11046 (uri (pypi-uri "Kivy" version))
11047 (file-name (string-append name "-" version ".tar.gz"))
11048 (sha256
11049 (base32
11050 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
11051 (build-system python-build-system)
11052 (arguments
11053 `(#:tests? #f ; Tests require many optional packages
11054 #:phases
11055 (modify-phases %standard-phases
11056 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11057 (lambda* (#:key inputs #:allow-other-keys)
11058 (setenv "KIVY_SDL2_PATH"
11059 (string-append (assoc-ref inputs "sdl-union")
11060 "/include/SDL2"))
11061 #t)))))
11062 (native-inputs
11063 `(("git" ,git)
11064 ("pkg-config" ,pkg-config)
11065 ("python-cython" ,python-cython)))
11066 (inputs
11067 `(("gstreamer" ,gstreamer)
11068 ("mesa" ,mesa)
11069 ("sdl-union"
11070 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11071 (home-page "http://kivy.org")
11072 (synopsis
11073 "Multitouch application framework")
11074 (description
11075 "A software library for rapid development of
11076 hardware-accelerated multitouch applications.")
11077 (license license:expat)))
11078
11079 (define-public python2-kivy
11080 (package-with-python2 python-kivy))
11081
11082 (define-public python-kivy-next
11083 (deprecated-package "python-kivy-next" python-kivy))
11084
11085 (define-public python2-kivy-next
11086 (deprecated-package "python2-kivy-next" python2-kivy))
11087
11088 (define-public python-binaryornot
11089 (package
11090 (name "python-binaryornot")
11091 (version "0.4.4")
11092 (source (origin
11093 (method url-fetch)
11094 (uri (pypi-uri "binaryornot" version))
11095 (sha256
11096 (base32
11097 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
11098 (build-system python-build-system)
11099 (arguments
11100 `(#:phases
11101 (modify-phases %standard-phases
11102 (add-after 'unpack 'patch-tests
11103 (lambda _
11104 ;; TypeError: binary() got an unexpected keyword argument
11105 ;; 'average_size'.
11106 (substitute* "tests/test_check.py"
11107 (("average_size=512") ""))
11108 #t)))))
11109 (propagated-inputs
11110 `(("python-chardet" ,python-chardet)
11111 ("python-hypothesis" ,python-hypothesis)))
11112 (home-page "https://github.com/audreyr/binaryornot")
11113 (synopsis "Package to check if a file is binary or text")
11114 (description "Ultra-lightweight pure Python package to check if a file is
11115 binary or text.")
11116 (license license:bsd-3)
11117 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11118
11119 (define-public python2-binaryornot
11120 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11121 (package (inherit base)
11122 (propagated-inputs
11123 `(("python2-enum34" ,python2-enum34)
11124 ,@(package-propagated-inputs base))))))
11125
11126 (define-public python-binwalk
11127 (let ((commit "64201acfb5b0a9cdd9faa58c40a36dcff8612e29")
11128 (revision "0"))
11129 (package
11130 (name "python-binwalk")
11131 (version (git-version "2.1.1" revision commit))
11132 (source
11133 (origin
11134 (method git-fetch)
11135 (uri (git-reference
11136 (url "https://github.com/ReFirmLabs/binwalk")
11137 (commit commit)))
11138 (file-name (git-file-name name version))
11139 (sha256
11140 (base32
11141 "1z7ca6rfp887hw5jc3sb45mm4fa0xid4lsp2z8g4r590dr7k7w15"))))
11142 (build-system python-build-system)
11143 (arguments
11144 `(#:phases
11145 (modify-phases %standard-phases
11146 (add-before 'check 'set-pythonpath
11147 (lambda _
11148 (setenv "PYTHONPATH"
11149 (string-append
11150 (getcwd) "/src/"
11151 ":" (getenv "PYTHONPATH")))
11152 (setenv "HOME" "")
11153 #t)))))
11154 (native-inputs
11155 `(("python-coverage" ,python-coverage)
11156 ("python-nose" ,python-nose)))
11157 (home-page "https://github.com/ReFirmLabs/binwalk")
11158 (synopsis "Firmware analysis tool")
11159 (description "Binwalk is a tool for analyzing, reverse engineering, and extracting firmware images")
11160 (license license:expat))))
11161
11162 (define-public python-nltk
11163 (package
11164 (name "python-nltk")
11165 (version "3.2.1")
11166 (source (origin
11167 (method url-fetch)
11168 (uri (pypi-uri "nltk" version))
11169 (sha256
11170 (base32
11171 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11172 (build-system python-build-system)
11173 (arguments
11174 '(;; The tests require some extra resources to be downloaded.
11175 ;; TODO Try packaging these resources.
11176 #:tests? #f))
11177 (home-page "http://nltk.org/")
11178 (synopsis "Natural Language Toolkit")
11179 (description "It provides interfaces to over 50 corpora and lexical
11180 resources such as WordNet, along with a suite of text processing libraries
11181 for classification, tokenization, stemming, tagging, parsing, and semantic
11182 reasoning, wrappers for natural language processing libraries.")
11183 (license license:asl2.0)))
11184
11185 (define-public python2-nltk
11186 (package-with-python2 python-nltk))
11187
11188 (define-public python-pymongo
11189 (package
11190 (name "python-pymongo")
11191 (version "3.7.2")
11192 (source (origin
11193 (method url-fetch)
11194 (uri (pypi-uri "pymongo" version))
11195 (sha256
11196 (base32
11197 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
11198 (build-system python-build-system)
11199 (propagated-inputs
11200 `(("python-certifi" ,python-certifi)))
11201 (home-page "https://github.com/mongodb/mongo-python-driver")
11202 (synopsis "Python driver for MongoDB")
11203 (description "Python driver for MongoDB.")
11204 (license license:asl2.0)))
11205
11206 (define-public python2-pymongo
11207 (package-with-python2 python-pymongo))
11208
11209 (define-public python-consul
11210 (package
11211 (name "python-consul")
11212 (version "0.6.1")
11213 (source
11214 (origin
11215 (method url-fetch)
11216 (uri (pypi-uri "python-consul" version))
11217 (sha256
11218 (base32
11219 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11220 (build-system python-build-system)
11221 (arguments
11222 '(#:tests? #f)) ; The tests are not distributed
11223 (propagated-inputs
11224 `(("python-requests" ,python-requests)
11225 ("python-six" ,python-six)))
11226 (home-page "https://github.com/cablehead/python-consul")
11227 (synopsis "Python client for Consul")
11228 (description
11229 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11230 discovery, monitoring and configuration.")
11231 (license license:expat)))
11232
11233 (define-public python2-consul
11234 (package-with-python2 python-consul))
11235
11236 (define-public python-schematics
11237 (package
11238 (name "python-schematics")
11239 (version "1.1.1")
11240 (source
11241 (origin
11242 (method git-fetch)
11243 (uri (git-reference
11244 (url "https://github.com/schematics/schematics.git")
11245 (commit (string-append "v" version))))
11246 (file-name (git-file-name name version))
11247 (sha256
11248 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
11249 (build-system python-build-system)
11250 (propagated-inputs
11251 `(("python-six" ,python-six)))
11252 (arguments
11253 ;; The tests require a bunch of not very nice packages with fixed
11254 ;; version requirements (e.g. python-coveralls).
11255 `(#:tests? #f))
11256 (home-page "https://github.com/schematics/schematics")
11257 (synopsis "Python Data Structures for Humans")
11258 (description "Python Data Structures for Humans.")
11259 (license license:bsd-3)))
11260
11261 (define-public python2-schematics
11262 (package-with-python2 python-schematics))
11263
11264 (define-public python-odfpy
11265 (package
11266 (name "python-odfpy")
11267 (version "1.3.3")
11268 (source (origin
11269 (method url-fetch)
11270 (uri (pypi-uri "odfpy" version))
11271 (sha256
11272 (base32
11273 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11274 (arguments
11275 `(#:modules ((srfi srfi-1)
11276 (guix build python-build-system)
11277 (guix build utils))
11278 #:phases
11279 (modify-phases %standard-phases
11280 (replace 'check
11281 ;; The test runner invokes python2 and python3 for test*.py.
11282 ;; To avoid having both in inputs, we replicate it here.
11283 (lambda _
11284 (for-each (lambda (test-file) (invoke "python" test-file))
11285 (find-files "tests" "^test.*\\.py$"))
11286 #t)))))
11287 (build-system python-build-system)
11288 (home-page "https://github.com/eea/odfpy")
11289 (synopsis "Python API and tools to manipulate OpenDocument files")
11290 (description "Collection of libraries and utility programs written in
11291 Python to manipulate OpenDocument 1.2 files.")
11292 (license
11293 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11294 ;; number of files with other licenses.
11295 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11296
11297 (define-public python2-odfpy
11298 (package-with-python2 python-odfpy))
11299
11300 (define-public python-natsort
11301 (package
11302 (name "python-natsort")
11303 (version "5.4.1")
11304 (source (origin
11305 (method url-fetch)
11306 (uri (pypi-uri "natsort" version))
11307 (sha256
11308 (base32
11309 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
11310 (build-system python-build-system)
11311 (arguments
11312 `(#:modules ((guix build utils)
11313 (guix build python-build-system)
11314 (srfi srfi-1)
11315 (srfi srfi-26)
11316 (ice-9 ftw))
11317 #:phases
11318 (modify-phases %standard-phases
11319 (add-before 'check 'set-cachedir
11320 ;; Tests require write access to $HOME by default
11321 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
11322 (replace 'check
11323 (lambda _
11324 (let ((cwd (getcwd)))
11325 (setenv "PYTHONPATH"
11326 (string-append
11327 cwd "/build/"
11328 (find (cut string-prefix? "lib" <>)
11329 (scandir (string-append cwd "/build")))
11330 ":"
11331 (getenv "PYTHONPATH")))
11332 (invoke "pytest" "-v")))))))
11333 (native-inputs
11334 `(("python-hypothesis" ,python-hypothesis)
11335 ("python-pytest-cov" ,python-pytest-cov)
11336 ("python-pytest-mock" ,python-pytest-mock)
11337 ("python-pytest" ,python-pytest)))
11338 (propagated-inputs ; TODO: Add python-fastnumbers.
11339 `(("python-pyicu" ,python-pyicu)))
11340 (home-page "https://github.com/SethMMorton/natsort")
11341 (synopsis "Natural sorting for python and shell")
11342 (description
11343 "Natsort lets you apply natural sorting on lists instead of
11344 lexicographical. If you use the built-in @code{sorted} method in python
11345 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
11346 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
11347 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
11348 identifies numbers and sorts them separately from strings. It can also sort
11349 version numbers, real numbers, mixed types and more, and comes with a shell
11350 command @command{natsort} that exposes this functionality in the command line.")
11351 (license license:expat)
11352 (properties `((python2-variant . ,(delay python2-natsort))))))
11353
11354 (define-public python2-natsort
11355 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11356 (package (inherit base)
11357 (native-inputs
11358 `(("python2-pathlib" ,python2-pathlib)
11359 ,@(package-native-inputs base))))))
11360
11361 (define-public python-glances
11362 (package
11363 (name "python-glances")
11364 (version "3.1.1")
11365 (source
11366 (origin
11367 (method url-fetch)
11368 (uri (pypi-uri "Glances" version))
11369 (sha256
11370 (base32
11371 "07j1ggzsqiskyz1i4mrnyr9i95v0dqi0i0hibnv1l188km8shmi8"))
11372 (modules '((guix build utils)))
11373 (snippet
11374 '(begin
11375 ;; Glances phones PyPI for weekly update checks by default.
11376 ;; Disable these. The user can re-enable them if desired.
11377 (substitute* "glances/outdated.py"
11378 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
11379 (string-append indentation
11380 "self.args.disable_check_update = True\n"
11381 line)))
11382 #t))))
11383 (build-system python-build-system)
11384 (propagated-inputs
11385 `(("python-future" ,python-future)
11386 ("python-psutil" ,python-psutil)))
11387 (home-page
11388 "https://github.com/nicolargo/glances")
11389 (synopsis "Cross-platform curses-based monitoring tool")
11390 (description
11391 "Glances is a curses-based monitoring tool for a wide variety of platforms.
11392 Glances uses the PsUtil library to get information from your system. It
11393 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
11394 (license license:lgpl3+)))
11395
11396 (define-public python2-glances
11397 (package-with-python2 python-glances))
11398
11399 (define-public python-graphql-core
11400 (package
11401 (name "python-graphql-core")
11402 (version "0.5.3")
11403 (source
11404 (origin
11405 (method url-fetch)
11406 (uri (pypi-uri "graphql-core" version))
11407 (sha256
11408 (base32
11409 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11410 (build-system python-build-system)
11411 (arguments
11412 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11413 #:phases
11414 (modify-phases %standard-phases
11415 (add-after 'unpack 'patch-hardcoded-version
11416 (lambda _ (substitute*
11417 "setup.py"
11418 (("'gevent==1.1rc1'") "'gevent'"))
11419 #t)))))
11420 (native-inputs
11421 `(("python-gevent" ,python-gevent)
11422 ("python-mock" ,python-mock)
11423 ("python-pytest-mock" ,python-pytest-mock)))
11424 (propagated-inputs
11425 `(("python-promise" ,python-promise)
11426 ("python-six" ,python-six)))
11427 (home-page "https://github.com/graphql-python/graphql-core")
11428 (synopsis "GraphQL implementation for Python")
11429 (description
11430 "GraphQL implementation for Python. GraphQL is a data query language and
11431 runtime designed and used to request and deliver data to mobile and web apps.
11432 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11433 to Python.")
11434 (license license:expat)))
11435
11436 (define-public python2-graphql-core
11437 (package-with-python2 python-graphql-core))
11438
11439 (define-public python-graphql-relay
11440 (package
11441 (name "python-graphql-relay")
11442 (version "0.4.5")
11443 (source
11444 (origin
11445 (method url-fetch)
11446 (uri (pypi-uri "graphql-relay" version))
11447 (sha256
11448 (base32
11449 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
11450 (build-system python-build-system)
11451 (arguments
11452 '(#:tests? #f)) ; The tests are not distributed
11453 (propagated-inputs
11454 `(("python-graphql-core" ,python-graphql-core)
11455 ("python-promise" ,python-promise)
11456 ("python-six" ,python-six)))
11457 (home-page "https://github.com/graphql-python/graphql-relay-py")
11458 (synopsis "Relay implementation for Python")
11459 (description
11460 "This is a library to allow the easy creation of Relay-compliant servers
11461 using the GraphQL Python reference implementation of a GraphQL server. It
11462 should be noted that the code is a exact port of the original
11463 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11464 from Facebook.")
11465 (license license:expat)))
11466
11467 (define-public python2-graphql-relay
11468 (package-with-python2 python-graphql-relay))
11469
11470 (define-public python-graphene
11471 (package
11472 (name "python-graphene")
11473 (version "0.10.2")
11474 (source
11475 (origin
11476 (method url-fetch)
11477 (uri (pypi-uri "graphene" version))
11478 (sha256
11479 (base32
11480 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11481 (build-system python-build-system)
11482 (propagated-inputs
11483 `(("python-graphql-core" ,python-graphql-core)
11484 ("python-graphql-relay" ,python-graphql-relay)
11485 ("python-iso8601" ,python-iso8601)
11486 ("python-promise" ,python-promise)
11487 ("python-six" ,python-six)))
11488 (arguments
11489 `(#:tests? #f)) ; no tests/ in the PyPI tarball
11490 (home-page "http://graphene-python.org/")
11491 (synopsis "GraphQL Framework for Python")
11492 (description
11493 "Graphene is a Python library for building GraphQL schemas/types.
11494 A GraphQL schema describes your data model, and provides a GraphQL server
11495 with an associated set of resolve methods that know how to fetch data.")
11496 (properties `((python2-variant . ,(delay python2-graphene))))
11497 (license license:expat)))
11498
11499 (define-public python2-graphene
11500 (let ((base (package-with-python2
11501 (strip-python2-variant python-graphene))))
11502 (package (inherit base)
11503 (native-inputs
11504 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11505 ,@(package-native-inputs base))))))
11506
11507 (define-public python-nautilus
11508 (package
11509 (name "python-nautilus")
11510 (version "0.4.9")
11511 (source
11512 (origin
11513 (method url-fetch)
11514 (uri (pypi-uri "nautilus" version))
11515 (sha256
11516 (base32
11517 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11518 (build-system python-build-system)
11519 (arguments `(#:tests? #f)) ; fails to import test modules
11520 (propagated-inputs
11521 `(("python-bcrypt" ,python-bcrypt)
11522 ("python-click" ,python-click)
11523 ("python-consul" ,python-consul)
11524 ("python-graphene" ,python-graphene)
11525 ("python-jinja2" ,python-jinja2)
11526 ("python-peewee" ,python-peewee)
11527 ("python-pika" ,python-pika)
11528 ("python-tornado" ,python-tornado)
11529 ("python-wtforms" ,python-wtforms)))
11530 (native-inputs
11531 `(("python-nose2" ,python-nose2)))
11532 (home-page "https://github.com/AlecAivazis/nautilus")
11533 (synopsis "Library for creating microservice applications")
11534 (description
11535 "Nautilus is a framework for flux based microservices that looks to
11536 provide extendible implementations of common aspects of a cloud so that you can
11537 focus on building massively scalable web applications.")
11538 (license license:expat)))
11539
11540 (define-public python-snowballstemmer
11541 (package
11542 (name "python-snowballstemmer")
11543 (version "1.2.1")
11544 (source (origin
11545 (method url-fetch)
11546 (uri (pypi-uri "snowballstemmer" version))
11547 (sha256
11548 (base32
11549 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11550 (build-system python-build-system)
11551 (arguments
11552 `(;; No tests exist
11553 #:tests? #f))
11554 (home-page "https://github.com/shibukawa/snowball_py")
11555 (synopsis "Snowball stemming library collection for Python")
11556 (description "This package provides 16 word stemmer algorithms generated
11557 from Snowball algorithms. It includes the 15 original ones plus the Poerter
11558 English stemmer.")
11559 (license license:bsd-3)))
11560
11561 (define-public python2-snowballstemmer
11562 (package-with-python2 python-snowballstemmer))
11563
11564 (define-public python-setproctitle
11565 (package
11566 (name "python-setproctitle")
11567 (version "1.1.10")
11568 (source
11569 (origin
11570 (method url-fetch)
11571 (uri (pypi-uri "setproctitle" version))
11572 (sha256
11573 (base32
11574 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11575 (build-system python-build-system)
11576 (arguments
11577 '(#:phases
11578 (modify-phases %standard-phases
11579 (add-before 'check 'patch-Makefile
11580 ;; Stricly this is only required for the python2 variant.
11581 ;; But adding a phase in an inherited package seems to be
11582 ;; cumbersum. So we patch even for python3.
11583 (lambda _
11584 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11585 (when nose
11586 (substitute* "Makefile"
11587 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11588 (string-append nose "/bin/nosetests "))))
11589 #t)))
11590 (replace 'check
11591 (lambda _
11592 (setenv "PYTHON" (or (which "python3") (which "python")))
11593 (setenv "PYCONFIG" (or (which "python3-config")
11594 (which "python-config")))
11595 (setenv "CC" "gcc")
11596 ;; No need to extend PYTHONPATH to find the built package, since
11597 ;; the Makefile will build anyway
11598 (invoke "make" "check"))))))
11599 (native-inputs
11600 `(("procps" ,procps))) ; required for tests
11601 (home-page
11602 "https://github.com/dvarrazzo/py-setproctitle")
11603 (synopsis
11604 "Setproctitle implementation for Python to customize the process title")
11605 (description "The library allows a process to change its title (as displayed
11606 by system tools such as ps and top).
11607
11608 Changing the title is mostly useful in multi-process systems, for
11609 example when a master process is forked: changing the children's title
11610 allows to identify the task each process is busy with. The technique
11611 is used by PostgreSQL and the OpenSSH Server for example.")
11612 (license license:bsd-3)
11613 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11614
11615 (define-public python2-setproctitle
11616 (let ((base (package-with-python2
11617 (strip-python2-variant python-setproctitle))))
11618 (package
11619 (inherit base)
11620 (native-inputs `(("python2-nose" ,python2-nose)
11621 ,@(package-native-inputs base))))))
11622
11623 (define-public python-validictory
11624 (package
11625 (name "python-validictory")
11626 (version "1.0.1")
11627 (source
11628 (origin
11629 (method url-fetch)
11630 (uri (pypi-uri "validictory" version))
11631 (sha256
11632 (base32
11633 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11634 (build-system python-build-system)
11635 (arguments
11636 '(#:phases
11637 (modify-phases %standard-phases
11638 (add-after 'unpack 'bootstrap
11639 ;; Move the tests out of the package directory to avoid
11640 ;; packaging them.
11641 (lambda* _
11642 (rename-file "validictory/tests" "tests")
11643 (delete-file "tests/__init__.py")))
11644 (replace 'check
11645 (lambda _
11646 ;; Extend PYTHONPATH so the built package will be found.
11647 (setenv "PYTHONPATH"
11648 (string-append (getcwd) "/build/lib:"
11649 (getenv "PYTHONPATH")))
11650 (invoke "py.test" "-vv" ))))))
11651 (native-inputs
11652 `(("python-pytest" ,python-pytest)))
11653 (home-page
11654 "https://github.com/jamesturk/validictory")
11655 (synopsis "General purpose Python data validator")
11656 (description "It allows validation of arbitrary Python data structures.
11657
11658 The schema format is based on the JSON Schema
11659 proposal (http://json-schema.org), so combined with json the library is also
11660 useful as a validator for JSON data.")
11661 (license license:expat)))
11662
11663 (define-public python2-validictory
11664 (package-with-python2 python-validictory))
11665
11666 (define-public python-pyelftools
11667 (package
11668 (name "python-pyelftools")
11669 (version "0.25")
11670 (source
11671 (origin
11672 (method url-fetch)
11673 (uri (pypi-uri "pyelftools" version))
11674 (sha256
11675 (base32
11676 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11677 (build-system python-build-system)
11678 (arguments
11679 `(#:phases
11680 (modify-phases %standard-phases
11681 (add-before 'check 'set-pythonpath
11682 (lambda _
11683 (setenv "PYTHONPATH"
11684 (string-append
11685 (getcwd) "/test/"
11686 ":" (getenv "PYTHONPATH")))
11687 #t)))))
11688 (home-page
11689 "https://github.com/eliben/pyelftools")
11690 (synopsis
11691 "Analyze binary and library file information")
11692 (description "This Python library provides interfaces for parsing and
11693 analyzing two binary and library file formats; the Executable and Linking
11694 Format (ELF), and debugging information in the Debugging With Attributed
11695 Record Format (DWARF).")
11696 (license license:public-domain)))
11697
11698 (define-public python-pyev
11699 (package
11700 (name "python-pyev")
11701 (version "0.9.0")
11702 (source
11703 (origin
11704 (method url-fetch)
11705 (uri (pypi-uri "pyev" version))
11706 (sha256
11707 (base32
11708 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11709 (build-system python-build-system)
11710 (arguments
11711 `(#:tests? #f ; no test suite
11712 #:phases
11713 (modify-phases %standard-phases
11714 (add-after 'unpack 'patch
11715 (lambda* (#:key inputs #:allow-other-keys)
11716 (let ((libev (string-append (assoc-ref inputs "libev")
11717 "/lib/libev.so.4")))
11718 (substitute* "setup.py"
11719 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11720 (string-append "libev_dll_name = \"" libev "\"")))))))))
11721 (inputs
11722 `(("libev" ,libev)))
11723 (home-page "http://pythonhosted.org/pyev/")
11724 (synopsis "Python libev interface")
11725 (description "Pyev provides a Python interface to libev.")
11726 (license license:gpl3)))
11727
11728 (define-public python2-pyev
11729 (package-with-python2 python-pyev))
11730
11731 (define-public python-imagesize
11732 (package
11733 (name "python-imagesize")
11734 (version "1.1.0")
11735 (source
11736 (origin
11737 (method url-fetch)
11738 (uri (pypi-uri "imagesize" version))
11739 (sha256
11740 (base32
11741 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11742 (build-system python-build-system)
11743 (home-page "https://github.com/shibukawa/imagesize_py")
11744 (synopsis "Gets image size of files in various formats in Python")
11745 (description
11746 "This package allows determination of image size from
11747 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11748 (license license:expat)))
11749
11750 (define-public python2-imagesize
11751 (package-with-python2 python-imagesize))
11752
11753 (define-public python-termstyle
11754 (package
11755 (name "python-termstyle")
11756 (version "0.1.11")
11757 (source
11758 (origin
11759 (method url-fetch)
11760 (uri (pypi-uri "termstyle" version))
11761 (sha256
11762 (base32
11763 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11764 (build-system python-build-system)
11765 (arguments
11766 '(#:phases
11767 (modify-phases %standard-phases
11768 (replace 'check
11769 (lambda _
11770 (invoke "python" "test3.py"))))))
11771 (home-page "https://github.com/gfxmonk/termstyle")
11772 (synopsis "Console text coloring for Python")
11773 (description "This package provides console text coloring for Python.")
11774 (license license:bsd-3)))
11775
11776 (define-public python-argcomplete
11777 (package
11778 (name "python-argcomplete")
11779 (version "1.10.3")
11780 (source
11781 (origin
11782 (method url-fetch)
11783 (uri (pypi-uri "argcomplete" version))
11784 (sha256
11785 (base32
11786 "02jkc44drb0yjz6x28lvg6rj607n8r2irdpdvyylm8xnycn54zx3"))))
11787 (build-system python-build-system)
11788 (arguments
11789 `(#:phases
11790 (modify-phases %standard-phases
11791 (add-after 'unpack 'embed-tool-references
11792 (lambda _
11793 (substitute* "argcomplete/bash_completion.d/python-argcomplete.sh"
11794 ((" grep")
11795 (string-append " " (which "grep")))
11796 ((" egrep")
11797 (string-append " " (which "egrep")))
11798 (("elif which")
11799 (string-append "elif " (which "which")))
11800 (("\\$\\(which")
11801 (string-append "$(" (which "which"))))
11802 #t)))))
11803 (inputs
11804 `(("grep" ,grep)
11805 ("which" ,which)))
11806 (native-inputs
11807 `(("python-coverage" ,python-coverage)
11808 ("python-flake8" ,python-flake8)
11809 ("python-pexpect" ,python-pexpect)
11810 ("python-wheel" ,python-wheel)
11811 ("tcsh" ,tcsh)
11812 ("fish" ,fish)
11813 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
11814 (home-page "https://github.com/kislyuk/argcomplete")
11815 (synopsis "Shell tab completion for Python argparse")
11816 (description "argcomplete provides extensible command line tab completion
11817 of arguments and options for Python scripts using @code{argparse}. It's
11818 particularly useful for programs with many options or sub-parsers that can
11819 dynamically suggest completions; for example, when browsing resources over the
11820 network.")
11821 (license license:asl2.0)))
11822
11823 (define-public python2-argcomplete
11824 (package-with-python2 python-argcomplete))
11825
11826 (define-public python-xopen
11827 (package
11828 (name "python-xopen")
11829 (version "0.5.0")
11830 (source
11831 (origin
11832 (method url-fetch)
11833 (uri (pypi-uri "xopen" version))
11834 (sha256
11835 (base32
11836 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
11837 (build-system python-build-system)
11838 (propagated-inputs
11839 `(("python-setuptools-scm" ,python-setuptools-scm)))
11840 (home-page "https://github.com/marcelm/xopen/")
11841 (synopsis "Open compressed files transparently")
11842 (description "This module provides an @code{xopen} function that works like
11843 Python's built-in @code{open} function, but can also deal with compressed files.
11844 Supported compression formats are gzip, bzip2 and, xz, and are automatically
11845 recognized by their file extensions. The focus is on being as efficient as
11846 possible on all supported Python versions.")
11847 (license license:expat)))
11848
11849 (define-public python2-xopen
11850 (let ((base (package-with-python2
11851 (strip-python2-variant python-xopen))))
11852 (package
11853 (inherit base)
11854 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
11855 ,@(package-propagated-inputs base))))))
11856
11857 (define-public python-cheetah
11858 (package
11859 (name "python-cheetah")
11860 (version "3.1.0")
11861 (source
11862 (origin
11863 (method url-fetch)
11864 (uri (pypi-uri "Cheetah3" version))
11865 (sha256
11866 (base32
11867 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
11868 (build-system python-build-system)
11869 (arguments
11870 `(#:modules ((guix build utils)
11871 (guix build python-build-system)
11872 (ice-9 ftw)
11873 (srfi srfi-1)
11874 (srfi srfi-26))
11875 #:phases (modify-phases %standard-phases
11876 (add-after 'unpack 'use-absolute-python
11877 (lambda _
11878 (substitute* "Cheetah/CheetahWrapper.py"
11879 (("#!/usr/bin/env python")
11880 (string-append "#!" (which "python"))))
11881 #t))
11882 (replace 'check
11883 (lambda _
11884 (let ((cwd (getcwd)))
11885 (setenv "PYTHONPATH"
11886 (string-append
11887 cwd "/build/"
11888 (find (cut string-prefix? "lib" <>)
11889 (scandir (string-append cwd "/build")))
11890 ":" (getenv "PYTHONPATH")))
11891 (setenv "PATH"
11892 (string-append (getenv "PATH")
11893 ":" cwd "/bin"))
11894 (setenv "TMPDIR" "/tmp")
11895
11896 (substitute* "Cheetah/Tests/Test.py"
11897 (("unittest.TextTestRunner\\(\\)")
11898 "unittest.TextTestRunner(verbosity=2)"))
11899
11900 (invoke "python" "Cheetah/Tests/Test.py")))))))
11901 (propagated-inputs
11902 `(("python-markdown" ,python-markdown))) ;optional
11903 (home-page "http://cheetahtemplate.org/")
11904 (synopsis "Template engine")
11905 (description "Cheetah is a text-based template engine and Python code
11906 generator.
11907
11908 Cheetah can be used as a standalone templating utility or referenced as
11909 a library from other Python applications. It has many potential uses,
11910 but web developers looking for a viable alternative to ASP, JSP, PHP and
11911 PSP are expected to be its principle user group.
11912
11913 Features:
11914 @enumerate
11915 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
11916 text-based format.
11917 @item Cleanly separates content, graphic design, and program code.
11918 @item Blends the power and flexibility of Python with a simple template language
11919 that non-programmers can understand.
11920 @item Gives template writers full access to any Python data structure, module,
11921 function, object, or method in their templates.
11922 @item Makes code reuse easy by providing an object-orientated interface to
11923 templates that is accessible from Python code or other Cheetah templates.
11924 One template can subclass another and selectively reimplement sections of it.
11925 @item Provides a simple, yet powerful, caching mechanism that can dramatically
11926 improve the performance of a dynamic website.
11927 @item Compiles templates into optimized, yet readable, Python code.
11928 @end enumerate")
11929 (license (license:x11-style "file://LICENSE"))))
11930
11931 (define-public python2-cheetah
11932 (package-with-python2 python-cheetah))
11933
11934 (define-public python-dulwich
11935 (package
11936 (name "python-dulwich")
11937 (version "0.18.6")
11938 (source
11939 (origin
11940 (method url-fetch)
11941 (uri (list (string-append "https://www.dulwich.io/releases/"
11942 "dulwich-" version ".tar.gz")
11943 (pypi-uri "dulwich" version)))
11944 (sha256
11945 (base32
11946 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
11947 (build-system python-build-system)
11948 (arguments
11949 `(#:phases
11950 (modify-phases %standard-phases
11951 (add-before 'check 'fix-tests
11952 (lambda* (#:key inputs #:allow-other-keys)
11953 ;; The tests use Popen with a custom environment which doesn't
11954 ;; include PATH.
11955 (substitute* "dulwich/tests/compat/utils.py"
11956 (("'git'") (string-append "'"
11957 (which "git")
11958 "'")))
11959 (substitute* '("dulwich/tests/test_repository.py"
11960 "dulwich/tests/test_hooks.py")
11961 (("#!/bin/sh") (string-append "#!" (which "sh"))))
11962 (setenv "TEST_RUNNER" "unittest")
11963 (setenv "PYTHONHASHSEED" "random")
11964 #t)))))
11965 (propagated-inputs
11966 `(("python-fastimport" ,python-fastimport)))
11967 (native-inputs
11968 `(("python-mock" ,python-mock)
11969 ("python-geventhttpclient" ,python-geventhttpclient)
11970 ("git" ,git)))
11971 (home-page "https://www.dulwich.io/")
11972 (synopsis "Git implementation in Python")
11973 (description "Dulwich is an implementation of the Git file formats and
11974 protocols written in pure Python.")
11975 ;; Can be used with either license.
11976 (license (list license:asl2.0 license:gpl2+))))
11977
11978 (define-public python2-dulwich
11979 (package-with-python2 python-dulwich))
11980
11981 (define-public python-pbkdf2
11982 (package
11983 (name "python-pbkdf2")
11984 (version "1.3")
11985 (source
11986 (origin
11987 (method url-fetch)
11988 (uri (pypi-uri "pbkdf2" version))
11989 (sha256
11990 (base32
11991 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
11992 (build-system python-build-system)
11993 (arguments
11994 '(#:phases
11995 (modify-phases %standard-phases
11996 (replace 'check
11997 (lambda _
11998 (setenv "PYTHONPATH"
11999 (string-append (getcwd) "/build/lib:"
12000 (getenv "PYTHONPATH")))
12001 (invoke "python" "test/test_pbkdf2.py"))))))
12002 (propagated-inputs
12003 `(("python-pycrypto" ,python-pycrypto))) ; optional
12004 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
12005 (synopsis "Password-based key derivation")
12006 (description "This module implements the password-based key derivation
12007 function, PBKDF2, specified in RSA PKCS#5 v2.0.
12008
12009 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
12010 is part of the RSA Public Key Cryptography Standards series. The provided
12011 implementation takes a password or a passphrase and a salt value (and
12012 optionally a iteration count, a digest module, and a MAC module) and provides
12013 a file-like object from which an arbitrarly-sized key can be read.")
12014 (license license:expat)))
12015
12016 (define-public python2-pbkdf2
12017 (package-with-python2 python-pbkdf2))
12018
12019 (define-public python-qrcode
12020 (package
12021 (name "python-qrcode")
12022 (version "6.1")
12023 (source
12024 (origin
12025 (method url-fetch)
12026 (uri (pypi-uri "qrcode" version))
12027 (sha256
12028 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
12029 (build-system python-build-system)
12030 (arguments
12031 ;; FIXME: Tests require packaging 'pymaging'.
12032 '(#:tests? #f))
12033 (propagated-inputs
12034 `(("python-lxml" ,python-lxml) ; for SVG output
12035 ("python-pillow" ,python-pillow) ; for PNG output
12036 ("python-six" ,python-six)))
12037 (home-page "https://github.com/lincolnloop/python-qrcode")
12038 (synopsis "QR Code image generator")
12039 (description "This package provides a pure Python QR Code generator
12040 module. It uses the Python Imaging Library (PIL) to allow for the generation
12041 of QR Codes.
12042
12043 In addition this package provides a command line tool to generate QR codes and
12044 either write these QR codes to a file or do the output as ascii art at the
12045 console.")
12046 (license license:bsd-3)))
12047
12048 (define-public python2-qrcode
12049 (package-with-python2 python-qrcode))
12050
12051 (define-public python-rst2ansi
12052 (package
12053 (name "python-rst2ansi")
12054 (version "0.1.5")
12055 (source
12056 (origin
12057 (method url-fetch)
12058 (uri (pypi-uri "rst2ansi" version))
12059 (sha256
12060 (base32
12061 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
12062 (build-system python-build-system)
12063 (propagated-inputs
12064 `(("python-docutils" ,python-docutils)))
12065 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
12066 (synopsis "Convert RST to ANSI-decorated console output")
12067 (description
12068 "Python module dedicated to rendering RST (reStructuredText) documents
12069 to ansi-escaped strings suitable for display in a terminal.")
12070 (license license:expat)))
12071
12072 (define-public python-ansi2html
12073 (package
12074 (name "python-ansi2html")
12075 (version "1.2.0")
12076 (source
12077 (origin
12078 (method url-fetch)
12079 (uri (pypi-uri "ansi2html" version))
12080 (sha256
12081 (base32
12082 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
12083 (build-system python-build-system)
12084 (native-inputs
12085 `(("python-mock" ,python-mock)
12086 ("python-nose" ,python-nose)))
12087 (propagated-inputs
12088 `(("python-six" ,python-six)))
12089 (home-page "https://github.com/ralphbean/ansi2html")
12090 (synopsis "Convert ANSI-decorated console output to HTML")
12091 (description
12092 "@command{ansi2html} is a Python library and command line utility for
12093 convering text with ANSI color codes to HTML or LaTeX.")
12094 (license license:gpl3+)))
12095
12096 (define-public python2-ansi2html
12097 (package-with-python2 python-ansi2html))
12098
12099 (define-public python-ddt
12100 (package
12101 (name "python-ddt")
12102 (version "1.1.3")
12103 (source
12104 (origin
12105 (method url-fetch)
12106 (uri (pypi-uri "ddt" version))
12107 (sha256
12108 (base32
12109 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
12110 (build-system python-build-system)
12111 (native-inputs
12112 `(("python-mock" ,python-mock)
12113 ("python-nose" ,python-nose)))
12114 (propagated-inputs
12115 `(("python-six" ,python-six)
12116 ("python-pyyaml" ,python-pyyaml)))
12117 (home-page "https://github.com/txels/ddt")
12118 (synopsis "Data-Driven Tests")
12119 (description
12120 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
12121 running it with different test data, and make it appear as multiple test
12122 cases.")
12123 (license license:expat)))
12124
12125 (define-public python2-ddt
12126 (package-with-python2 python-ddt))
12127
12128 (define-public python-pycountry
12129 (package
12130 (name "python-pycountry")
12131 (version "18.5.26")
12132 (source
12133 (origin
12134 (method url-fetch)
12135 (uri (pypi-uri "pycountry" version))
12136 (sha256
12137 (base32
12138 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
12139 (build-system python-build-system)
12140 (home-page "https://bitbucket.org/flyingcircus/pycountry")
12141 (synopsis "ISO databases for languages, countries, currencies, etc.")
12142 (description
12143 "@code{pycountry} provides the ISO databases for the standards:
12144 @enumerate
12145 @item 639-3 (Languages)
12146 @item 3166 (Countries)
12147 @item 3166-3 (Deleted Countries)
12148 @item 3166-2 (Subdivisions of countries)
12149 @item 4217 (Currencies)
12150 @item 15924 (Scripts)
12151 @end enumerate
12152 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
12153 through a Python API.")
12154 (license license:lgpl2.1+)))
12155
12156 (define-public python2-pycountry
12157 (package-with-python2 python-pycountry))
12158
12159 (define-public python-pycosat
12160 (package
12161 (name "python-pycosat")
12162 (version "0.6.1")
12163 (source
12164 (origin
12165 (method url-fetch)
12166 (uri (pypi-uri "pycosat" version))
12167 (sha256
12168 (base32
12169 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
12170 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
12171 (build-system python-build-system)
12172 (home-page "https://github.com/ContinuumIO/pycosat")
12173 (synopsis "Bindings to picosat (a SAT solver)")
12174 (description
12175 "This package provides efficient Python bindings to @code{picosat} on
12176 the C level. When importing pycosat, the @code{picosat} solver becomes part
12177 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
12178 Problem} (SAT) solver.")
12179 (license license:expat)))
12180
12181 (define-public python2-pycosat
12182 (package-with-python2 python-pycosat))
12183
12184 (define-public python2-ruamel.ordereddict
12185 (package
12186 (name "python2-ruamel.ordereddict")
12187 (version "0.4.9")
12188 (source
12189 (origin
12190 (method url-fetch)
12191 (uri (pypi-uri "ruamel.ordereddict" version))
12192 (sha256
12193 (base32
12194 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
12195 (build-system python-build-system)
12196 (arguments
12197 `(#:python ,python-2
12198 #:phases
12199 (modify-phases %standard-phases
12200 (delete 'check)
12201 (add-after 'install 'check
12202 (lambda* (#:key inputs outputs #:allow-other-keys)
12203 (add-installed-pythonpath inputs outputs)
12204 (invoke "python" "test/testordereddict.py"))))))
12205 (home-page "https://bitbucket.org/ruamel/ordereddict")
12206 (synopsis "Version of dict that keeps keys in insertion order")
12207 (description
12208 "This is an implementation of an ordered dictionary with @dfn{Key
12209 Insertion Order} (KIO: updates of values do not affect the position of the
12210 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
12211 removed and put at the back). The standard library module @code{OrderedDict},
12212 implemented later, implements a subset of @code{ordereddict} functionality.
12213 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
12214 Order} (KSO, no sorting function can be specified, but a transform can be
12215 specified to apply on the key before comparison (e.g. @code{string.lower})).")
12216 (license license:expat)))
12217
12218 (define-public python-pypeg2
12219 (package
12220 (name "python-pypeg2")
12221 (version "2.15.2")
12222 (source
12223 (origin
12224 (method url-fetch)
12225 (uri (pypi-uri "pyPEG2" version))
12226 (sha256
12227 (base32
12228 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
12229 (build-system python-build-system)
12230 (propagated-inputs `(("python-lxml" ,python-lxml)))
12231 (arguments
12232 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
12233 '(#:tests? #f))
12234 (home-page "https://fdik.org/pyPEG/")
12235 (synopsis "Parsering Expression Grammars in Python")
12236 (description "PyPEG is an intrinsic parser interpreter framework for
12237 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
12238 parse many formal languages.")
12239 (license license:gpl2)))
12240
12241 (define-public python-incremental
12242 (package
12243 (name "python-incremental")
12244 (version "17.5.0")
12245 (source
12246 (origin
12247 (method url-fetch)
12248 (uri (pypi-uri "incremental" version))
12249 (sha256
12250 (base32
12251 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
12252 (build-system python-build-system)
12253 (home-page "https://github.com/hawkowl/incremental")
12254 (synopsis "Library for versioning Python projects")
12255 (description "Incremental is a small library that versions your Python
12256 projects.")
12257 (license license:expat)))
12258
12259 (define-public python2-incremental
12260 (package-with-python2 python-incremental))
12261
12262 (define-public python-invoke
12263 (package
12264 (name "python-invoke")
12265 (home-page "http://www.pyinvoke.org/")
12266 (version "1.3.0")
12267 (source (origin
12268 (method url-fetch)
12269 (uri (pypi-uri "invoke" version))
12270 (sha256
12271 (base32
12272 "1nn7gad0rvy492acpyhkrp01zsk86acf34qhsvq4xmm6x39788n5"))))
12273 (build-system python-build-system)
12274 (arguments
12275 ;; XXX: Requires many dependencies that are not yet in Guix.
12276 `(#:tests? #f))
12277 (synopsis "Pythonic task execution")
12278 (description
12279 "Invoke is a Python task execution tool and library, drawing inspiration
12280 from various sources to arrive at a powerful and clean feature set. It is
12281 evolved from the Fabric project, but focuses on local and abstract concerns
12282 instead of servers and network commands.")
12283 (license license:bsd-3)))
12284
12285 (define-public python2-invoke
12286 (package-with-python2 python-invoke))
12287
12288 (define-public python-automat
12289 (package
12290 (name "python-automat")
12291 (version "0.7.0")
12292 (source (origin
12293 (method url-fetch)
12294 (uri (pypi-uri "Automat" version))
12295 (sha256
12296 (base32
12297 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
12298 (build-system python-build-system)
12299 ;; We disable the tests because they require python-twisted, while
12300 ;; python-twisted depends on python-automat. Twisted is optional, but the
12301 ;; tests fail if it is not available. Also see
12302 ;; <https://github.com/glyph/automat/issues/71>.
12303 (arguments '(#:tests? #f))
12304 (native-inputs
12305 `(("python-m2r" ,python-m2r)
12306 ("python-setuptools-scm" ,python-setuptools-scm)
12307 ("python-graphviz" ,python-graphviz)))
12308 (propagated-inputs
12309 `(("python-six" ,python-six)
12310 ("python-attrs" ,python-attrs)))
12311 (home-page "https://github.com/glyph/Automat")
12312 (synopsis "Self-service finite-state machines")
12313 (description "Automat is a library for concise, idiomatic Python
12314 expression of finite-state automata (particularly deterministic finite-state
12315 transducers).")
12316 (license license:expat)))
12317
12318 (define-public python2-automat
12319 (package-with-python2 python-automat))
12320
12321 (define-public python-m2r
12322 (package
12323 (name "python-m2r")
12324 (version "0.2.1")
12325 (source (origin
12326 (method url-fetch)
12327 (uri (pypi-uri "m2r" version))
12328 (sha256
12329 (base32
12330 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
12331 (build-system python-build-system)
12332 (propagated-inputs
12333 `(("python-docutils" ,python-docutils)
12334 ("python-mistune" ,python-mistune)))
12335 (native-inputs
12336 `(("python-pygments" ,python-pygments)
12337 ("python-mock" ,python-mock)))
12338 (home-page "https://github.com/miyakogi/m2r")
12339 (synopsis "Markdown to reStructuredText converter")
12340 (description "M2R converts a markdown file including reST markups to valid
12341 reST format.")
12342 (license license:expat)))
12343
12344 (define-public python2-m2r
12345 (package-with-python2 python-m2r))
12346
12347 (define-public python-constantly
12348 (package
12349 (name "python-constantly")
12350 (version "15.1.0")
12351 (source (origin
12352 (method url-fetch)
12353 (uri (pypi-uri "constantly" version))
12354 (sha256
12355 (base32
12356 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
12357 (build-system python-build-system)
12358 (home-page "https://github.com/twisted/constantly")
12359 (synopsis "Symbolic constants in Python")
12360 (description "Constantly is a Python library that provides symbolic
12361 constant support. It includes collections and constants with text, numeric,
12362 and bit flag values.")
12363 (license license:expat)))
12364
12365 (define-public python2-constantly
12366 (package-with-python2 python-constantly))
12367
12368 (define-public python-attrs
12369 (package
12370 (name "python-attrs")
12371 (version "19.1.0")
12372 (source (origin
12373 (method url-fetch)
12374 (uri (pypi-uri "attrs" version))
12375 (sha256
12376 (base32
12377 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
12378 (build-system python-build-system)
12379 (arguments
12380 `(#:modules ((guix build utils)
12381 (guix build python-build-system)
12382 (ice-9 ftw)
12383 (srfi srfi-1)
12384 (srfi srfi-26))
12385 #:phases (modify-phases %standard-phases
12386 (replace 'check
12387 (lambda _
12388 (let ((cwd (getcwd)))
12389 (setenv "PYTHONPATH"
12390 (string-append
12391 cwd "/build/"
12392 (find (cut string-prefix? "lib" <>)
12393 (scandir (string-append cwd "/build")))
12394 ":"
12395 (getenv "PYTHONPATH")))
12396 (invoke "python" "-m" "pytest")))))))
12397 (native-inputs
12398 `(("python-coverage" ,python-coverage)
12399 ("python-hypothesis" ,python-hypothesis)
12400 ("python-pympler" ,python-pympler)
12401 ("python-pytest" ,python-pytest)
12402 ("python-six" ,python-six)
12403 ("python-sphinx" ,python-sphinx)
12404 ("python-zope-interface" ,python-zope-interface)))
12405 (home-page "https://github.com/python-attrs/attrs/")
12406 (synopsis "Attributes without boilerplate")
12407 (description "@code{attrs} is a Python package with class decorators that
12408 ease the chores of implementing the most common attribute-related object
12409 protocols.")
12410 (license license:expat)))
12411
12412 (define-public python2-attrs
12413 (package-with-python2 python-attrs))
12414
12415 (define-public python-attrs-bootstrap
12416 (package
12417 (inherit python-attrs)
12418 (name "python-attrs-bootstrap")
12419 (native-inputs `())
12420 (arguments `(#:tests? #f))))
12421
12422 (define-public python2-attrs-bootstrap
12423 (package-with-python2 python-attrs-bootstrap))
12424
12425 (define-public python2-cliapp
12426 (package
12427 (name "python2-cliapp")
12428 (version "1.20180812.1")
12429 (source
12430 (origin
12431 (method url-fetch)
12432 (uri (string-append
12433 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
12434 version ".tar.gz"))
12435 (sha256
12436 (base32
12437 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
12438 (build-system python-build-system)
12439 (arguments
12440 `(#:python ,python-2
12441 #:phases
12442 (modify-phases %standard-phases
12443 ;; check phase needs to be run before the build phase. If not,
12444 ;; coverage-test-runner looks for tests for the built source files,
12445 ;; and fails.
12446 (delete 'check)
12447 (add-before 'build 'check
12448 (lambda _
12449 ;; Disable python3 tests
12450 (substitute* "check"
12451 (("python3") "# python3"))
12452 (invoke "./check"))))))
12453 (native-inputs
12454 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12455 ("python2-pep8" ,python2-pep8)))
12456 (propagated-inputs
12457 `(("python2-pyaml" ,python2-pyaml)))
12458 (home-page "https://liw.fi/cliapp/")
12459 (synopsis "Python framework for command line programs")
12460 (description "@code{python2-cliapp} is a python framework for
12461 command line programs. It contains the typical stuff such programs
12462 need to do, such as parsing the command line for options, and
12463 iterating over input files.")
12464 (license license:gpl2+)))
12465
12466 (define-public python2-ttystatus
12467 (package
12468 (name "python2-ttystatus")
12469 (version "0.36")
12470 (source
12471 (origin
12472 (method url-fetch)
12473 (uri (string-append
12474 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
12475 version ".tar.gz"))
12476 (sha256
12477 (base32
12478 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
12479 (build-system python-build-system)
12480 (native-inputs
12481 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12482 ("python2-pep8" ,python2-pep8)))
12483 (arguments
12484 `(#:python ,python-2
12485 #:phases
12486 (modify-phases %standard-phases
12487 ;; check phase needs to be run before the build phase. If not,
12488 ;; coverage-test-runner looks for tests for the built source files,
12489 ;; and fails.
12490 (delete 'check)
12491 (add-before 'build 'check
12492 (lambda _ (invoke "make" "check"))))))
12493 (home-page "https://liw.fi/ttystatus/")
12494 (synopsis "Python library for showing progress reporting and
12495 status updates on terminals")
12496 (description "@code{python2-ttystatus} is a python library for
12497 showing progress reporting and status updates on terminals, for
12498 command line programs. Output is automatically adapted to the width
12499 of the terminal: truncated if it does not fit, and resized if the
12500 terminal size changes.")
12501 (license license:gpl3+)))
12502
12503 (define-public python2-tracing
12504 (package
12505 (name "python2-tracing")
12506 (version "0.10")
12507 (source
12508 (origin
12509 (method url-fetch)
12510 (uri (string-append
12511 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
12512 version ".tar.gz"))
12513 (sha256
12514 (base32
12515 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
12516 (build-system python-build-system)
12517 (arguments
12518 `(#:python ,python-2))
12519 (home-page "https://liw.fi/tracing/")
12520 (synopsis "Python debug logging helper")
12521 (description "@code{python2-tracing} is a python library for
12522 logging debug messages. It provides a way to turn debugging messages
12523 on and off, based on the filename they occur in. It is much faster
12524 than using @code{logging.Filter} to accomplish the same thing, which
12525 matters when code is run in production mode. The actual logging still
12526 happens using the @code{logging} library.")
12527 (license license:gpl3+)))
12528
12529 (define-public python2-larch
12530 (package
12531 (name "python2-larch")
12532 (version "1.20151025")
12533 (source
12534 (origin
12535 (method url-fetch)
12536 (uri (string-append
12537 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12538 version ".tar.gz"))
12539 (patches (search-patches
12540 "python2-larch-coverage-4.0a6-compatibility.patch"))
12541 (sha256
12542 (base32
12543 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12544 (build-system python-build-system)
12545 (arguments
12546 `(#:python ,python-2
12547 #:phases
12548 (modify-phases %standard-phases
12549 ;; check phase needs to be run before the build phase. If not,
12550 ;; coverage-test-runner looks for tests for the built source files,
12551 ;; and fails.
12552 (delete 'check)
12553 (add-before 'build 'check
12554 (lambda _ (invoke "make" "check"))))))
12555 (native-inputs
12556 `(("cmdtest" ,cmdtest)
12557 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12558 (propagated-inputs
12559 `(("python2-tracing" ,python2-tracing)))
12560 (home-page "https://liw.fi/larch/")
12561 (synopsis "Python copy-on-write B-tree library")
12562 (description "@code{python2-larch} is an implementation of
12563 particular kind of B-tree, based on research by Ohad Rodeh. See
12564 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12565 on the data structure.
12566
12567 The distinctive feature of this B-tree is that a node is never
12568 (conceptually) modified. Instead, all updates are done by
12569 copy-on-write. This makes it easy to clone a tree, and modify only the
12570 clone, while other processes access the original tree.")
12571 (license license:gpl3+)))
12572
12573 (define-public python-astroid
12574 (package
12575 (name "python-astroid")
12576 (version "2.3.3")
12577 (source
12578 (origin
12579 (method url-fetch)
12580 (uri (pypi-uri "astroid" version))
12581 (sha256
12582 (base32 "0fnibsl2cb5mvzbfm7sycj85smx48f8w8m7ks1sqlmpr9ps0gski"))))
12583 (build-system python-build-system)
12584 (propagated-inputs
12585 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12586 ("python-six" ,python-six)
12587 ("python-typed-ast" ,python-typed-ast)
12588 ("python-wrapt" ,python-wrapt)))
12589 (native-inputs
12590 `(("python-dateutil" ,python-dateutil)
12591 ("python-nose" ,python-nose)
12592 ("python-pytest" ,python-pytest)
12593 ("python-pytest-runner" ,python-pytest-runner)))
12594 (arguments
12595 `(#:phases
12596 (modify-phases %standard-phases
12597 (add-after 'unpack 'remove-spurious-test
12598 (lambda _
12599 ;; This can be removed after upgrading from python-3.7
12600 ;; https://github.com/PyCQA/astroid/issues/593
12601 ;; https://bugs.python.org/issue34056
12602 (delete-file "astroid/tests/unittest_modutils.py")
12603 #t))
12604 (replace 'check
12605 (lambda _
12606 (invoke "pytest" "astroid"))))))
12607 (home-page "https://github.com/PyCQA/astroid")
12608 (synopsis "Common base representation of python source code for pylint and
12609 other projects")
12610 (description "@code{python-astroid} provides a common base representation
12611 of python source code for projects such as pychecker, pyreverse, pylint, etc.
12612
12613 It provides a compatible representation which comes from the _ast module. It
12614 rebuilds the tree generated by the builtin _ast module by recursively walking
12615 down the AST and building an extended ast. The new node classes have
12616 additional methods and attributes for different usages. They include some
12617 support for static inference and local name scopes. Furthermore, astroid
12618 builds partial trees by inspecting living objects.")
12619 (license license:lgpl2.1+)
12620 (properties `((python2-variant . ,(delay python2-astroid))))))
12621
12622 (define-public python2-astroid
12623 (let ((base (package-with-python2
12624 (strip-python2-variant python-astroid))))
12625 (package (inherit base)
12626 ;; Version 2.x removes python2 support.
12627 (version "1.6.5")
12628 (source
12629 (origin
12630 (method url-fetch)
12631 (uri (pypi-uri "astroid" version))
12632 (sha256
12633 (base32
12634 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12635 (arguments
12636 (substitute-keyword-arguments (package-arguments base)
12637 ((#:phases phases)
12638 `(modify-phases ,phases
12639 (add-after 'unpack 'remove-spurious-test
12640 (lambda _
12641 ;; https://github.com/PyCQA/astroid/issues/276
12642 (delete-file "astroid/tests/unittest_brain.py")
12643 #t))
12644 (replace 'check
12645 (lambda _
12646 (invoke"python" "-m" "unittest" "discover"
12647 "-p" "unittest*.py")))))))
12648 (native-inputs `())
12649 (propagated-inputs
12650 `(("python2-backports-functools-lru-cache"
12651 ,python2-backports-functools-lru-cache)
12652 ("python2-enum34" ,python2-enum34)
12653 ("python2-singledispatch" ,python2-singledispatch)
12654 ,@(alist-delete "python-typed-ast"
12655 (package-propagated-inputs base)))))))
12656
12657 (define-public python-isort
12658 (package
12659 (name "python-isort")
12660 (version "4.3.4")
12661 (source
12662 (origin
12663 (method git-fetch)
12664 (uri (git-reference
12665 ;; Tests pass only from the Github sources
12666 (url "https://github.com/timothycrosley/isort")
12667 (commit version)))
12668 (file-name (git-file-name name version))
12669 (sha256
12670 (base32
12671 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
12672 (build-system python-build-system)
12673 (native-inputs
12674 `(("python-mock" ,python-mock)
12675 ("python-pytest" ,python-pytest)))
12676 (home-page "https://github.com/timothycrosley/isort")
12677 (synopsis "Python utility/library to sort python imports")
12678 (description "@code{python-isort} is a python utility/library to sort
12679 imports alphabetically, and automatically separated into sections. It
12680 provides a command line utility, a python library and plugins for various
12681 editors.")
12682 (license license:expat)
12683 (properties `((python2-variant . ,(delay python2-isort))))))
12684
12685 (define-public python2-isort
12686 (let ((base (package-with-python2
12687 (strip-python2-variant python-isort))))
12688 (package (inherit base)
12689 (native-inputs
12690 `(("python2-futures" ,python2-futures)
12691 ,@(package-native-inputs base))))))
12692
12693 (define-public python2-backports-functools-lru-cache
12694 (package
12695 (name "python2-backports-functools-lru-cache")
12696 (version "1.5")
12697 (source
12698 (origin
12699 (method url-fetch)
12700 ;; only the pypi tarballs contain the necessary metadata
12701 (uri (pypi-uri "backports.functools_lru_cache" version))
12702 (sha256
12703 (base32
12704 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12705 (build-system python-build-system)
12706 (native-inputs
12707 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12708 (arguments
12709 `(#:python ,python-2))
12710 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12711 (synopsis "Backport of functools.lru_cache from Python 3.3")
12712 (description "@code{python2-backports-functools-lru-cache} is a backport
12713 of @code{functools.lru_cache} from python 3.3.")
12714 (license license:expat)))
12715
12716 (define-public python-configparser
12717 (package
12718 (name "python-configparser")
12719 (version "3.7.1")
12720 (source
12721 (origin
12722 (method url-fetch)
12723 (uri (pypi-uri "configparser" version))
12724 (sha256
12725 (base32
12726 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
12727 (build-system python-build-system)
12728 (home-page "https://github.com/jaraco/configparser/")
12729 (synopsis "Backport of configparser from python 3.5")
12730 (description "@code{python-configparser} is a backport of
12731 @code{configparser} from Python 3.5 so that it can be used directly
12732 in other versions.")
12733 (license license:expat)))
12734
12735 (define-public python2-configparser
12736 (package-with-python2 python-configparser))
12737
12738 (define-public python-mando
12739 (package
12740 (name "python-mando")
12741 (version "0.6.4")
12742 (source (origin
12743 (method url-fetch)
12744 (uri (pypi-uri "mando" version))
12745 (sha256
12746 (base32
12747 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12748 (build-system python-build-system)
12749 (propagated-inputs
12750 `(("python-rst2ansi" ,python-rst2ansi)
12751 ("python-six" ,python-six)))
12752 (native-inputs
12753 `(("python-pytest" ,python-pytest)))
12754 (home-page "https://mando.readthedocs.org/")
12755 (synopsis
12756 "Wrapper around argparse, allowing creation of complete CLI applications")
12757 (description
12758 "This package is a wrapper around argparse, allowing you to write complete CLI
12759 applications in seconds while maintaining all the flexibility.")
12760 (license license:expat)))
12761
12762 (define-public python2-mando
12763 (package-with-python2 python-mando))
12764
12765 (define-public python2-argparse
12766 (package
12767 (name "python2-argparse")
12768 (version "1.4.0")
12769 (source
12770 (origin
12771 (method url-fetch)
12772 (uri (pypi-uri "argparse" version))
12773 (sha256
12774 (base32
12775 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12776 (build-system python-build-system)
12777 (arguments
12778 `(#:python ,python-2))
12779 (home-page "https://github.com/ThomasWaldmann/argparse/")
12780 (synopsis "Python command-line parsing library")
12781 (description
12782 "This package is mostly for people who want to have @code{argparse} on
12783 older Pythons because it was not part of the standard library back then.")
12784 (license license:psfl)))
12785
12786 (define-public python-fudge
12787 (package
12788 (name "python-fudge")
12789 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
12790 ;; package, which is currently the only use of this package.
12791 (version "0.9.6")
12792 (source
12793 (origin
12794 (method url-fetch)
12795 (uri (pypi-uri "fudge" version))
12796 (sha256
12797 (base32
12798 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
12799 (build-system python-build-system)
12800 (arguments
12801 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
12802 (home-page "https://github.com/fudge-py/fudge")
12803 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
12804 (description
12805 "Fudge is a Python module for using fake objects (mocks and stubs) to
12806 test real ones.
12807
12808 In readable Python code, you declare the methods available on your fake object
12809 and how they should be called. Then you inject that into your application and
12810 start testing. This declarative approach means you don’t have to record and
12811 playback actions and you don’t have to inspect your fakes after running code.
12812 If the fake object was used incorrectly then you’ll see an informative
12813 exception message with a traceback that points to the culprit.")
12814 (license license:expat)))
12815
12816 (define-public python2-fudge
12817 (package-with-python2 python-fudge))
12818
12819 (define-public python-mwclient
12820 (package
12821 (name "python-mwclient")
12822 (version "0.8.4")
12823 (source
12824 (origin
12825 (method url-fetch)
12826 ;; The PyPI version wouldn't contain tests.
12827 (uri (string-append "https://github.com/mwclient/mwclient/archive/"
12828 "v" version ".tar.gz"))
12829 (file-name (string-append name "-" version ".tar.gz"))
12830 (sha256
12831 (base32
12832 "1jj0yhilkjir00719fc7w133x7hdyhkxhk6xblla4asig45klsfv"))))
12833 (build-system python-build-system)
12834 (propagated-inputs
12835 `(("python-requests" ,python-requests)
12836 ("python-requests-oauthlib"
12837 ,python-requests-oauthlib)
12838 ("python-six" ,python-six)))
12839 (native-inputs
12840 `(("python-mock" ,python-mock)
12841 ("python-pytest" ,python-pytest)
12842 ("python-pytest-pep8" ,python-pytest-pep8)
12843 ("python-pytest-cache" ,python-pytest-cache)
12844 ("python-pytest-cov" ,python-pytest-cov)
12845 ("python-responses" ,python-responses)))
12846 (home-page "https://github.com/btongminh/mwclient")
12847 (synopsis "MediaWiki API client")
12848 (description "This package provides a MediaWiki API client.")
12849 (license license:expat)))
12850
12851 (define-public python2-mwclient
12852 (package-with-python2 python-mwclient))
12853
12854 (define-public python-utils
12855 (package
12856 (name "python-utils")
12857 (version "2.1.0")
12858 (source (origin
12859 (method url-fetch)
12860 (uri (pypi-uri "python-utils" version))
12861 (sha256
12862 (base32
12863 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
12864 (build-system python-build-system)
12865 (native-inputs
12866 `(("pytest-runner" ,python-pytest-runner)
12867 ("pytest" ,python-pytest)
12868 ("six" ,python-six)))
12869 (home-page "https://github.com/WoLpH/python-utils")
12870 (synopsis "Convenient utilities not included with the standard Python install")
12871 (description
12872 "Python Utils is a collection of small Python functions and classes which
12873 make common patterns shorter and easier.")
12874 (license license:bsd-2)))
12875
12876 (define-public python2-utils
12877 (package-with-python2 python-utils))
12878
12879 (define-public python-diff-match-patch
12880 (package
12881 (name "python-diff-match-patch")
12882 (version "20121119")
12883 (source
12884 (origin
12885 (method url-fetch)
12886 (uri (pypi-uri "diff-match-patch" version))
12887 (sha256
12888 (base32
12889 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
12890 (build-system python-build-system)
12891 (home-page "https://code.google.com/p/google-diff-match-patch")
12892 (synopsis "Synchronize plain text")
12893 (description "Diff Match and Patch libraries offer robust algorithms to
12894 perform the operations required for synchronizing plain text.")
12895 (license license:asl2.0)))
12896
12897 (define-public python2-diff-match-patch
12898 (package-with-python2 python-diff-match-patch))
12899
12900 (define-public python-dirsync
12901 (package
12902 (name "python-dirsync")
12903 (version "2.2.3")
12904 (source
12905 (origin
12906 (method url-fetch)
12907 (uri (pypi-uri "dirsync" version))
12908 (sha256
12909 (base32
12910 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
12911 (build-system python-build-system)
12912 (propagated-inputs
12913 `(("six" ,python-six)))
12914 (home-page "https://bitbucket.org/tkhyn/dirsync")
12915 (synopsis "Advanced directory tree synchronisation tool")
12916 (description "Advanced directory tree synchronisation tool.")
12917 (license license:expat)))
12918
12919 (define-public python2-dirsync
12920 (package-with-python2 python-dirsync))
12921
12922 (define-public python-levenshtein
12923 (package
12924 (name "python-levenshtein")
12925 (version "0.12.0")
12926 (source
12927 (origin
12928 (method url-fetch)
12929 (uri (pypi-uri "python-Levenshtein" version))
12930 (sha256
12931 (base32
12932 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
12933 (build-system python-build-system)
12934 (home-page "https://github.com/ztane/python-Levenshtein")
12935 (synopsis "Fast computation of Levenshtein distance and string similarity")
12936 (description
12937 "The Levenshtein Python C extension module contains functions for fast computation of
12938 @enumerate
12939 @item Levenshtein (edit) distance, and edit operations
12940 @item string similarity
12941 @item approximate median strings, and generally string averaging
12942 @item string sequence and set similarity
12943 @end enumerate
12944 It supports both normal and Unicode strings.")
12945 (license license:gpl2+)))
12946
12947 (define-public python2-levenshtein
12948 (package-with-python2 python-levenshtein))
12949
12950 (define-public python-scandir
12951 (package
12952 (name "python-scandir")
12953 (version "1.9.0")
12954 (source
12955 (origin
12956 (method url-fetch)
12957 (uri (pypi-uri "scandir" version))
12958 (sha256
12959 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
12960 (build-system python-build-system)
12961 (arguments
12962 `(#:phases (modify-phases %standard-phases
12963 (replace 'check
12964 (lambda _
12965 (invoke "python" "test/run_tests.py"))))))
12966 (home-page "https://github.com/benhoyt/scandir")
12967 (synopsis "Directory iteration function")
12968 (description
12969 "Directory iteration function like os.listdir(), except that instead of
12970 returning a list of bare filenames, it yields DirEntry objects that include
12971 file type and stat information along with the name. Using scandir() increases
12972 the speed of os.walk() by 2-20 times (depending on the platform and file
12973 system) by avoiding unnecessary calls to os.stat() in most cases.
12974
12975 This package is part of the Python standard library since version 3.5.")
12976 (license license:bsd-3)))
12977
12978 (define-public python2-scandir
12979 (package-with-python2 python-scandir))
12980
12981 (define-public python2-stemming
12982 (package
12983 (name "python2-stemming")
12984 (version "1.0.1")
12985 (source
12986 (origin
12987 (method url-fetch)
12988 (uri (pypi-uri "stemming" version))
12989 (sha256
12990 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
12991 (build-system python-build-system)
12992 (arguments
12993 `(#:python ,python-2))
12994 (home-page "https://bitbucket.org/mchaput/stemming/overview")
12995 (synopsis "Python implementations of various stemming algorithms")
12996 (description
12997 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
12998 stemming algorithms for English. These implementations are straightforward and
12999 efficient, unlike some Python versions of the same algorithms available on the
13000 Web. This package is an extraction of the stemming code included in the Whoosh
13001 search engine.")
13002 (license license:public-domain)))
13003
13004 (define-public python-factory-boy
13005 (package
13006 (name "python-factory-boy")
13007 (version "2.8.1")
13008 (source
13009 (origin
13010 (method url-fetch)
13011 (uri (pypi-uri "factory_boy" version))
13012 (sha256
13013 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
13014 (build-system python-build-system)
13015 (arguments
13016 ;; Tests are not included in the tarball.
13017 `(#:tests? #f))
13018 (propagated-inputs
13019 `(("faker" ,python-faker)))
13020 (home-page "https://github.com/benhoyt/scandir")
13021 (synopsis "Versatile test fixtures replacement")
13022 (description
13023 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
13024
13025 As a fixtures replacement tool, it aims to replace static, hard to maintain
13026 fixtures with easy-to-use factories for complex object.
13027
13028 Instead of building an exhaustive test setup with every possible combination
13029 of corner cases, factory_boy allows you to use objects customized for the
13030 current test, while only declaring the test-specific fields")
13031 (license license:expat)))
13032
13033 (define-public python2-factory-boy
13034 (package-with-python2 python-factory-boy))
13035
13036 (define-public python-translate-toolkit
13037 (package
13038 (name "python-translate-toolkit")
13039 (version "2.1.0")
13040 (source
13041 (origin
13042 (method url-fetch)
13043 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
13044 (sha256
13045 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
13046 (build-system python-build-system)
13047 (native-inputs
13048 `(("python-pytest" ,python-pytest)
13049 ("python-sphinx" ,python-sphinx)))
13050 (propagated-inputs
13051 `(("python-babel" ,python-babel)
13052 ("python-beautifulsoup4" ,python-beautifulsoup4)
13053 ("python-chardet" ,python-chardet)
13054 ("python-diff-match-patch" ,python-diff-match-patch)
13055 ("python-levenshtein" ,python-levenshtein)
13056 ("python-lxml" ,python-lxml)
13057 ("python-six" ,python-six)
13058 ("python-vobject" ,python-vobject)
13059 ("python-pyyaml" ,python-pyyaml)))
13060 (arguments
13061 ;; TODO: tests are not run, because they end with
13062 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
13063 ;; 'parse_funcs'
13064 ;; during test setup.
13065 `(#:tests? #f))
13066 (home-page "https://toolkit.translatehouse.org")
13067 (synopsis "Tools and API for translation and localization engineering")
13068 (description
13069 "Tools and API for translation and localization engineering. It contains
13070 several utilities, as well as an API for building localization tools.")
13071 (license license:gpl2+)))
13072
13073 (define-public python2-translate-toolkit
13074 (package-with-python2 python-translate-toolkit))
13075
13076 (define-public python-packaging
13077 (package
13078 (name "python-packaging")
13079 (version "19.2")
13080 (source
13081 (origin
13082 (method url-fetch)
13083 (uri (pypi-uri "packaging" version))
13084 (sha256
13085 (base32
13086 "0izwlz9h0bw171a1chr311g2y7n657zjaf4mq4rgm8pp9lbj9f98"))))
13087 (build-system python-build-system)
13088 (arguments
13089 `(#:phases (modify-phases %standard-phases
13090 (replace 'check
13091 (lambda _ (invoke "py.test" "-vv"))))))
13092 (native-inputs
13093 `(("python-pretend" ,python-pretend)
13094 ("python-pytest" ,python-pytest)))
13095 (propagated-inputs
13096 `(("python-pyparsing" ,python-pyparsing)
13097 ("python-six" ,python-six)))
13098 (home-page "https://github.com/pypa/packaging")
13099 (synopsis "Core utilities for Python packages")
13100 (description "Packaging is a Python module for dealing with Python packages.
13101 It offers an interface for working with package versions, names, and dependency
13102 information.")
13103 ;; From 'LICENSE': This software is made available under the terms of
13104 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
13105 ;; Contributions to this software is made under the terms of *both* these
13106 ;; licenses.
13107 (license (list license:asl2.0 license:bsd-2))))
13108
13109 (define-public python2-packaging
13110 (package-with-python2 python-packaging))
13111
13112 (define-public python-relatorio
13113 (package
13114 (name "python-relatorio")
13115 (version "0.8.0")
13116 (source
13117 (origin
13118 (method url-fetch)
13119 (uri (pypi-uri "relatorio" version))
13120 (sha256
13121 (base32
13122 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
13123 (build-system python-build-system)
13124 (propagated-inputs
13125 `(("python-lxml" ,python-lxml)
13126 ("python-genshi" ,python-genshi)))
13127 (native-inputs
13128 `(("python-magic" ,python-magic)))
13129 (home-page "https://relatorio.tryton.org/")
13130 (synopsis "Templating library able to output ODT and PDF files")
13131 (description "Relatorio is a templating library which provides a way to
13132 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
13133 for more filetypes can be easily added by creating plugins for them.")
13134 (license license:gpl3+)))
13135
13136 (define-public python2-relatorio
13137 (package-with-python2 python-relatorio))
13138
13139 (define-public python-radon
13140 (package
13141 (name "python-radon")
13142 (version "2.2.0")
13143 (source
13144 (origin
13145 (method url-fetch)
13146 (uri (pypi-uri "radon" version))
13147 (sha256
13148 (base32
13149 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
13150 (build-system python-build-system)
13151 (arguments
13152 `(#:phases (modify-phases %standard-phases
13153 (replace 'check
13154 (lambda _
13155 (invoke "python" "radon/tests/run.py"))))))
13156 (propagated-inputs
13157 `(("python-colorama" ,python-colorama)
13158 ("python-flake8-polyfill" ,python-flake8-polyfill)
13159 ("python-mando" ,python-mando)))
13160 (native-inputs
13161 `(("python-pytest" ,python-pytest)
13162 ("python-pytest-mock" ,python-pytest-mock)))
13163 (home-page "https://radon.readthedocs.org/")
13164 (synopsis "Code Metrics in Python")
13165 (description "Radon is a Python tool which computes various code metrics.
13166 Supported metrics are:
13167 @itemize @bullet
13168 @item raw metrics: SLOC, comment lines, blank lines, &c.
13169 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
13170 @item Halstead metrics (all of them)
13171 @item the Maintainability Index (a Visual Studio metric)
13172 @end itemize")
13173 (license license:expat)))
13174
13175 (define-public python2-radon
13176 (package-with-python2 python-radon))
13177
13178 (define-public python-sure
13179 (package
13180 (name "python-sure")
13181 (version "1.4.11")
13182 (source
13183 (origin
13184 (method url-fetch)
13185 (uri (pypi-uri "sure" version))
13186 (sha256
13187 (base32
13188 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
13189 (build-system python-build-system)
13190 (propagated-inputs
13191 `(("python-mock" ,python-mock)
13192 ("python-six" ,python-six)))
13193 (native-inputs
13194 `(("python-nose" ,python-nose)))
13195 (home-page "https://github.com/gabrielfalcao/sure")
13196 (synopsis "Automated testing library in python for python")
13197 (description
13198 "Sure is a python library that leverages a DSL for writing assertions.
13199 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
13200 (license license:gpl3+)))
13201
13202 (define-public python2-sure
13203 (package-with-python2 python-sure))
13204
13205 (define-public python2-couleur
13206 ;; This package does not seem to support python3 at all, hence,
13207 ;; only the python2 variant definition is provided.
13208 (package
13209 (name "python2-couleur")
13210 (version "0.6.2")
13211 (source
13212 (origin
13213 (method url-fetch)
13214 (uri (pypi-uri "couleur" version))
13215 (sha256
13216 (base32
13217 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
13218 (build-system python-build-system)
13219 (arguments
13220 `(#:python ,python-2))
13221 (home-page "https://github.com/gabrielfalcao/couleur")
13222 (synopsis
13223 "ANSI terminal tool for python, colored shell and other handy fancy features")
13224 (description
13225 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
13226 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
13227 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
13228 ;; https://github.com/gabrielfalcao/couleur/issues/11
13229 (license license:lgpl3+)))
13230
13231 (define-public python-misaka
13232 (package
13233 (name "python-misaka")
13234 (version "2.1.1")
13235 (source
13236 (origin
13237 (method url-fetch)
13238 (uri (pypi-uri "misaka" version))
13239 (sha256
13240 (base32
13241 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
13242 (build-system python-build-system)
13243 (arguments
13244 `(;; Line 37 of setup.py calls self.run_command('develop')
13245 ;; in the 'check' phase. This command seems to be trying
13246 ;; to write to
13247 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
13248 ;; for which it does not have the permission to write.
13249 #:tests? #f))
13250 (propagated-inputs
13251 `(("python-cffi" ,python-cffi)))
13252 (home-page "https://github.com/FSX/misaka")
13253 (synopsis "Python binding for Hoedown")
13254 (description
13255 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
13256 library written in C. It features a fast HTML renderer and functionality to make custom
13257 renderers (e.g. man pages or LaTeX).")
13258 (license license:expat)))
13259
13260 (define-public python2-misaka
13261 (package-with-python2 python-misaka))
13262
13263 (define-public python2-steadymark
13264 ;; This is forced into being a python2 only variant
13265 ;; due to its dependence on couleur that has no support
13266 ;; for python3
13267 (package
13268 (name "python2-steadymark")
13269 (version "0.7.3")
13270 (source
13271 (origin
13272 (method url-fetch)
13273 (uri (pypi-uri "steadymark" version))
13274 (sha256
13275 (base32
13276 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
13277 (build-system python-build-system)
13278 (native-inputs
13279 `(("python-couleur" ,python2-couleur)
13280 ("python-sure" ,python2-sure)
13281 ("python-misaka" ,python2-misaka)))
13282 (arguments
13283 `(#:python ,python-2
13284 #:phases
13285 (modify-phases %standard-phases
13286 (add-before 'build 'patch-setup-py
13287 (lambda _
13288 ;; Update requirements from dependency==version
13289 ;; to dependency>=version
13290 (substitute* "setup.py"
13291 (("==") ">="))
13292 #t)))))
13293 (home-page "https://github.com/gabrielfalcao/steadymark")
13294 (synopsis "Markdown-based test runner for python")
13295 (description
13296 "@code{Steadymark} allows documentation to be written in github-flavoured
13297 markdown. The documentation may contain snippets of code surrounded by python
13298 code blocks and @code{Steadymark} will find these snippets and run them, making
13299 sure that there are no old malfunctional examples in the documentation examples.")
13300 (license license:expat)))
13301
13302 (define-public python-jsonpointer
13303 (package
13304 (name "python-jsonpointer")
13305 (version "1.10")
13306 (source
13307 (origin
13308 (method url-fetch)
13309 (uri (pypi-uri "jsonpointer" version))
13310 (sha256
13311 (base32
13312 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
13313 (build-system python-build-system)
13314 (home-page "https://github.com/stefankoegl/python-json-pointer")
13315 (synopsis "Identify specific nodes in a JSON document")
13316 (description "@code{jsonpointer} allows you to access specific nodes
13317 by path in a JSON document (see RFC 6901).")
13318 (license license:bsd-3)))
13319
13320 (define-public python2-jsonpointer
13321 (package-with-python2 python-jsonpointer))
13322
13323 (define-public python-jsonpatch
13324 (package
13325 (name "python-jsonpatch")
13326 (version "1.16")
13327 (source
13328 (origin
13329 (method url-fetch)
13330 ;; pypi version lacks tests.js
13331 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
13332 "archive/v" version ".tar.gz"))
13333 (file-name (string-append name "-" version ".tar.gz"))
13334 (sha256
13335 (base32
13336 "085ykisl8v7mv9h7hvhdy3l2fjzs4214gx32r5k6nx4f76hbv6y5"))))
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 url-fetch)
13356 (uri (string-append "https://github.com/stefankoegl/python-json-patch/"
13357 "archive/v" version ".tar.gz"))
13358 (file-name (string-append name "-" version ".tar.gz"))
13359 (sha256
13360 (base32
13361 "0j0cd9z9zyp8kppp464jxrfgrnbgkzl1yi10i5gsv8yz6d95929d"))))))
13362
13363 (define-public python2-jsonpatch-0.4
13364 (package-with-python2 python-jsonpatch-0.4))
13365
13366 (define-public python-rfc3986
13367 (package
13368 (name "python-rfc3986")
13369 (version "1.1.0")
13370 (source (origin
13371 (method url-fetch)
13372 (uri (pypi-uri "rfc3986" version))
13373 (sha256
13374 (base32
13375 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
13376 (build-system python-build-system)
13377 (arguments
13378 `(#:modules ((guix build utils)
13379 (guix build python-build-system)
13380 (ice-9 ftw)
13381 (srfi srfi-1)
13382 (srfi srfi-26))
13383 #:phases
13384 (modify-phases %standard-phases
13385 (replace 'check
13386 (lambda _
13387 (let ((cwd (getcwd)))
13388 (setenv "PYTHONPATH"
13389 (string-append cwd "/build/"
13390 (find (cut string-prefix? "lib" <>)
13391 (scandir (string-append cwd "/build")))
13392 ":"
13393 (getenv "PYTHONPATH")))
13394 (invoke "pytest" "-v")))))))
13395 (native-inputs
13396 `(("python-pytest" ,python-pytest)))
13397 (home-page "https://rfc3986.readthedocs.io/")
13398 (synopsis "Parse and validate URI references")
13399 (description
13400 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
13401 validation and authority parsing. This module also supports RFC@tie{}6874
13402 which adds support for zone identifiers to IPv6 addresses.")
13403 (license license:asl2.0)))
13404
13405 (define-public python2-rfc3986
13406 (package-with-python2 python-rfc3986))
13407
13408 (define-public python-rfc3987
13409 (package
13410 (name "python-rfc3987")
13411 (version "1.3.7")
13412 (source
13413 (origin
13414 (method url-fetch)
13415 (uri (pypi-uri "rfc3987" version))
13416 (sha256
13417 (base32
13418 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
13419 (build-system python-build-system)
13420 (home-page "https://pypi.python.org/pypi/rfc3987")
13421 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
13422 (description "@code{rfc3987} provides routines for parsing and
13423 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
13424 (license license:gpl3+)))
13425
13426 (define-public python2-rfc3987
13427 (package-with-python2 python-rfc3987))
13428
13429 (define-public python-validate-email
13430 (package
13431 (name "python-validate-email")
13432 (version "1.3")
13433 (source
13434 (origin
13435 (method url-fetch)
13436 (uri (pypi-uri "validate_email" version))
13437 (sha256
13438 (base32
13439 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
13440 (build-system python-build-system)
13441 (home-page "https://github.com/syrusakbary/validate_email")
13442 (synopsis "Verifies if an email address is valid and really exists")
13443 (description "@code{validate_email} can be used to verify if an email
13444 address is valid and really exists.")
13445 (license license:lgpl3+)))
13446
13447 (define-public python2-validate-email
13448 (package-with-python2 python-validate-email))
13449
13450 (define-public python-flex
13451 (package
13452 (name "python-flex")
13453 (version "6.10.0")
13454 (source
13455 (origin
13456 (method url-fetch)
13457 (uri (pypi-uri "flex" version))
13458 (sha256
13459 (base32
13460 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
13461 (build-system python-build-system)
13462 (propagated-inputs
13463 `(("python-click" ,python-click)
13464 ("python-iso8601" ,python-iso8601)
13465 ("python-jsonpointer" ,python-jsonpointer)
13466 ("python-pyyaml" ,python-pyyaml)
13467 ("python-requests" ,python-requests)
13468 ("python-rfc3987" ,python-rfc3987)
13469 ("python-six" ,python-six)
13470 ("python-validate-email" ,python-validate-email)))
13471 (home-page "https://github.com/pipermerriam/flex")
13472 (synopsis "Validates Swagger schemata")
13473 (description "@code{flex} can be used to validate Swagger schemata.")
13474 (license license:bsd-3)))
13475
13476 (define-public python2-flex
13477 (package-with-python2 python-flex))
13478
13479 (define-public python-marshmallow
13480 (package
13481 (name "python-marshmallow")
13482 (version "3.0.0b14")
13483 (source
13484 (origin
13485 (method url-fetch)
13486 (uri (pypi-uri "marshmallow" version))
13487 (sha256
13488 (base32
13489 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
13490 (build-system python-build-system)
13491 (propagated-inputs
13492 `(("python-dateutil" ,python-dateutil)
13493 ("python-simplejson" ,python-simplejson)))
13494 (native-inputs
13495 `(("python-pytest" ,python-pytest)
13496 ("python-pytz" ,python-pytz)))
13497 (home-page "https://github.com/marshmallow-code/marshmallow")
13498 (synopsis "Convert complex datatypes to and from native
13499 Python datatypes.")
13500 (description "@code{marshmallow} provides a library for converting
13501 complex datatypes to and from native Python datatypes.")
13502 (license license:expat)))
13503
13504 (define-public python2-marshmallow
13505 (package-with-python2 python-marshmallow))
13506
13507 (define-public python-apispec
13508 (package
13509 (name "python-apispec")
13510 (version "0.25.3")
13511 (source
13512 (origin
13513 (method url-fetch)
13514 (uri (pypi-uri "apispec" version))
13515 (sha256
13516 (base32
13517 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
13518 (build-system python-build-system)
13519 (propagated-inputs
13520 `(("python-pyyaml" ,python-pyyaml)))
13521 (native-inputs
13522 `(("python-pytest" ,python-pytest)
13523 ("python-flask" ,python-flask)
13524 ("python-marshmallow" ,python-marshmallow)
13525 ("python-tornado" ,python-tornado)
13526 ("python-bottle" ,python-bottle)
13527 ("python-mock" ,python-mock)))
13528 (home-page "https://github.com/marshmallow-code/apispec")
13529 (synopsis "Swagger 2.0 API specification generator")
13530 (description "@code{python-apispec} is a pluggable API specification
13531 generator. Currently supports the OpenAPI specification (f.k.a.
13532 Swagger 2.0).")
13533 (license license:expat)))
13534
13535 (define-public python2-apispec
13536 (package-with-python2 python-apispec))
13537
13538 (define-public python-flasgger
13539 (package
13540 (name "python-flasgger")
13541 (version "0.6.3")
13542 (source
13543 (origin
13544 (method git-fetch)
13545 (uri (git-reference
13546 (url "https://github.com/rochacbruno/flasgger.git")
13547 (commit version)))
13548 (file-name (git-file-name name version))
13549 (sha256
13550 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
13551 (build-system python-build-system)
13552 (arguments
13553 `(#:phases
13554 (modify-phases %standard-phases
13555 (replace 'check
13556 (lambda* (#:key inputs outputs #:allow-other-keys)
13557 (substitute* "Makefile"
13558 (("flake8 flasgger --ignore=F403")
13559 "flake8 flasgger --ignore=E731,F403"))
13560 (setenv "PYTHONPATH" (string-append (getcwd)
13561 ":"
13562 (getenv "PYTHONPATH")))
13563 (invoke "py.test"))))))
13564 (propagated-inputs
13565 `(("python-flask" ,python-flask)
13566 ("python-pyyaml" ,python-pyyaml)
13567 ("python-jsonschema" ,python-jsonschema)
13568 ("python-mistune" ,python-mistune)
13569 ("python-six" ,python-six)))
13570 (native-inputs
13571 `(("python-decorator" ,python-decorator)
13572 ("python-flake8" ,python-flake8)
13573 ("python-flask-restful" ,python-flask-restful)
13574 ("python-flex" ,python-flex)
13575 ("python-pytest" ,python-pytest)
13576 ("python-pytest-cov" ,python-pytest-cov)
13577 ("python-marshmallow" ,python-marshmallow)
13578 ("python-apispec" ,python-apispec)))
13579 (home-page "https://github.com/rochacbruno/flasgger/")
13580 (synopsis "Extract Swagger specs from your Flask project")
13581 (description "@code{python-flasgger} allows extracting Swagger specs
13582 from your Flask project. It is a fork of Flask-Swagger.")
13583 (license license:expat)))
13584
13585 (define-public python2-flasgger
13586 (package-with-python2 python-flasgger))
13587
13588 (define-public python-swagger-spec-validator
13589 (package
13590 (name "python-swagger-spec-validator")
13591 (version "2.4.3")
13592 (source
13593 (origin
13594 (method url-fetch)
13595 (uri (pypi-uri "swagger-spec-validator" version))
13596 (sha256
13597 (base32
13598 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
13599 (build-system python-build-system)
13600 (propagated-inputs
13601 `(("python-jsonschema" ,python-jsonschema)
13602 ("python-pyyaml" ,python-pyyaml)
13603 ("python-six" ,python-six)))
13604 (home-page
13605 "https://github.com/Yelp/swagger_spec_validator")
13606 (synopsis "Validation of Swagger specifications")
13607 (description "@code{swagger_spec_validator} provides a library for
13608 validating Swagger API specifications.")
13609 (license license:asl2.0)))
13610
13611 (define-public python2-swagger-spec-validator
13612 (package-with-python2 python-swagger-spec-validator))
13613
13614 (define-public python-apache-libcloud
13615 (package
13616 (name "python-apache-libcloud")
13617 (version "2.4.0")
13618 (source
13619 (origin
13620 (method url-fetch)
13621 (uri (pypi-uri "apache-libcloud" version))
13622 (sha256
13623 (base32
13624 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13625 (build-system python-build-system)
13626 (arguments
13627 `(#:phases
13628 (modify-phases %standard-phases
13629 (add-after 'unpack 'patch-ssh
13630 (lambda* (#:key inputs #:allow-other-keys)
13631 (substitute* "libcloud/compute/ssh.py"
13632 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13633 "/bin/ssh" "'")))
13634 #t))
13635 (add-after 'unpack 'patch-tests
13636 (lambda _
13637 (substitute* "./libcloud/test/test_file_fixtures.py"
13638 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13639 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13640 return (httplib.OK,
13641 \"1234abcd\",
13642 {\"test\": \"value\"},
13643 httplib.responses[httplib.OK])
13644 def _ascii"))
13645 (substitute* "libcloud/test/compute/test_ssh_client.py"
13646 (("class ShellOutSSHClientTests")
13647 "@unittest.skip(\"Guix container doesn't have ssh service\")
13648 class ShellOutSSHClientTests")
13649 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13650 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13651 (("'.xF0', '.x90', '.x8D', '.x88'")
13652 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13653 #t))
13654 (add-before 'check 'copy-secret
13655 (lambda _
13656 (copy-file "libcloud/test/secrets.py-dist"
13657 "libcloud/test/secrets.py")
13658 #t)))))
13659 (inputs
13660 `(("openssh" ,openssh)))
13661 (propagated-inputs
13662 `(("python-paramiko" ,python-paramiko)
13663 ("python-requests" ,python-requests)))
13664 (native-inputs
13665 `(("python-lockfile" ,python-lockfile)
13666 ("python-mock" ,python-mock)
13667 ("python-pytest" ,python-pytest)
13668 ("python-pytest-runner" ,python-pytest-runner)
13669 ("python-requests-mock" ,python-requests-mock)))
13670 (home-page "https://libcloud.apache.org/")
13671 (synopsis "Unified Cloud API")
13672 (description "@code{libcloud} is a Python library for interacting with
13673 many of the popular cloud service providers using a unified API.")
13674 (license license:asl2.0)))
13675
13676 (define-public python2-apache-libcloud
13677 (package-with-python2 python-apache-libcloud))
13678
13679 (define-public python-smmap2
13680 (package
13681 (name "python-smmap2")
13682 (version "2.0.3")
13683 (source
13684 (origin
13685 (method url-fetch)
13686 (uri (pypi-uri "smmap2" version))
13687 (sha256
13688 (base32
13689 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
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 url-fetch)
14625 (uri (string-append "https://github.com/Suor/whatever/archive/" version
14626 ".tar.gz"))
14627 (sha256
14628 (base32 "1rchg9hrlvw4sn20lq1zspczr4x1pv57c02gv73igiqx1hqpy2nc"))
14629 (file-name (string-append name "-" version ".tar.gz"))))
14630 (build-system python-build-system)
14631 (arguments
14632 `(#:phases
14633 (modify-phases %standard-phases
14634 (replace 'check
14635 (lambda _
14636 (invoke "py.test"))))))
14637 (native-inputs
14638 `(("python-pytest" ,python-pytest)))
14639 (home-page "http://github.com/Suor/whatever")
14640 (synopsis "Make anonymous functions by partial application of operators")
14641 (description "@code{whatever} provides an easy way to make anonymous
14642 functions by partial application of operators.")
14643 (license license:bsd-3)))
14644
14645 (define-public python2-whatever
14646 (package-with-python2 python-whatever))
14647
14648 (define-public python-funcy
14649 (package
14650 (name "python-funcy")
14651 (version "1.11")
14652 (source
14653 (origin
14654 (method git-fetch)
14655 (uri (git-reference
14656 (url "https://github.com/Suor/funcy.git")
14657 (commit version)))
14658 (sha256
14659 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14660 (file-name (git-file-name name version))))
14661 (build-system python-build-system)
14662 (arguments
14663 `(#:phases
14664 (modify-phases %standard-phases
14665 (replace 'check
14666 (lambda _
14667 (invoke "py.test"))))))
14668 (native-inputs
14669 `(("python-pytest" ,python-pytest)
14670 ("python-whatever" ,python-whatever)))
14671 (home-page "http://github.com/Suor/funcy")
14672 (synopsis "Functional tools")
14673 (description "@code{funcy} is a library that provides functional tools.
14674 Examples are:
14675 @enumerate
14676 @item merge - Merges collections of the same type
14677 @item walk - Type-preserving map
14678 @item select - Selects a part of a collection
14679 @item take - Takes the first n items of a collection
14680 @item first - Takes the first item of a collection
14681 @item remove - Predicated-removes items of a collection
14682 @item concat - Concatenates two collections
14683 @item flatten - Flattens a collection with subcollections
14684 @item distinct - Returns only distinct items
14685 @item split - Predicated-splits a collection
14686 @item split_at - Splits a collection at a given item
14687 @item group_by - Groups items by group
14688 @item pairwise - Pairs off adjacent items
14689 @item partial - Partially-applies a function
14690 @item curry - Curries a function
14691 @item compose - Composes functions
14692 @item complement - Complements a predicate
14693 @item all_fn - \"all\" with predicate
14694 @end enumerate")
14695 (license license:bsd-3)))
14696
14697 (define-public python2-funcy
14698 (package-with-python2 python-funcy))
14699
14700 (define-public python-isoweek
14701 (package
14702 (name "python-isoweek")
14703 (version "1.3.3")
14704 (source
14705 (origin
14706 (method url-fetch)
14707 (uri (pypi-uri "isoweek" version))
14708 (sha256
14709 (base32
14710 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14711 (build-system python-build-system)
14712 (home-page "https://github.com/gisle/isoweek")
14713 (synopsis "Objects representing a week")
14714 (description "The @code{isoweek} module provide the class Week that
14715 implements the week definition of ISO 8601. This standard also defines
14716 a notation for identifying weeks; yyyyWww (where the W is a literal).
14717 Week instances stringify to this form.")
14718 (license license:bsd-3)))
14719
14720 (define-public python2-isoweek
14721 (package-with-python2 python-isoweek))
14722
14723 (define-public python-tokenize-rt
14724 (package
14725 (name "python-tokenize-rt")
14726 (version "2.0.1")
14727 (source
14728 (origin
14729 (method url-fetch)
14730 (uri (pypi-uri "tokenize-rt" version))
14731 (sha256
14732 (base32
14733 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14734 (build-system python-build-system)
14735 (home-page "https://github.com/asottile/tokenize-rt")
14736 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14737 (description
14738 "This Python library is a wrapper around @code{tokenize} from the Python
14739 standard library. It provides two additional tokens @code{ESCAPED_NL} and
14740 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14741 and @code{tokens_to_src} to roundtrip.")
14742 (license license:expat)))
14743
14744 (define-public python-future-fstrings
14745 (package
14746 (name "python-future-fstrings")
14747 (version "0.4.1")
14748 (source
14749 (origin
14750 (method url-fetch)
14751 (uri (pypi-uri "future_fstrings" version))
14752 (sha256
14753 (base32
14754 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14755 (build-system python-build-system)
14756 (propagated-inputs
14757 `(("python-tokenize-rt" ,python-tokenize-rt)))
14758 (home-page "https://github.com/asottile/future-fstrings")
14759 (synopsis "Backport of fstrings to Python < 3.6")
14760 (description
14761 "This package provides a UTF-8 compatible encoding
14762 @code{future_fstrings}, which performs source manipulation. It decodes the
14763 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
14764 @code{f} strings.")
14765 (license license:expat)))
14766
14767 (define-public python-typed-ast
14768 (package
14769 (name "python-typed-ast")
14770 (version "1.4.0")
14771 (source
14772 (origin
14773 (method git-fetch)
14774 (uri (git-reference
14775 (url "https://github.com/python/typed_ast.git")
14776 (commit version)))
14777 (sha256
14778 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
14779 (file-name (git-file-name name version))))
14780 (build-system python-build-system)
14781 (arguments
14782 `(#:modules ((guix build utils)
14783 (guix build python-build-system)
14784 (ice-9 ftw)
14785 (srfi srfi-1)
14786 (srfi srfi-26))
14787 #:phases
14788 (modify-phases %standard-phases
14789 (replace 'check
14790 (lambda _
14791 (let ((cwd (getcwd)))
14792 (setenv "PYTHONPATH"
14793 (string-append cwd "/build/"
14794 (find (cut string-prefix? "lib" <>)
14795 (scandir (string-append cwd "/build")))
14796 ":"
14797 (getenv "PYTHONPATH"))))
14798 (invoke "pytest")
14799 #t)))))
14800 (native-inputs `(("python-pytest" ,python-pytest)))
14801 (home-page "https://github.com/python/typed_ast")
14802 (synopsis "Fork of Python @code{ast} modules with type comment support")
14803 (description "This package provides a parser similar to the standard
14804 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
14805 include PEP 484 type comments and are independent of the version of Python
14806 under which they are run. The @code{typed_ast} parsers produce the standard
14807 Python AST (plus type comments), and are both fast and correct, as they are
14808 based on the CPython 2.7 and 3.7 parsers.")
14809 ;; See the file "LICENSE" for the details.
14810 (license (list license:psfl
14811 license:asl2.0
14812 license:expat)))) ;ast27/Parser/spark.py
14813
14814 (define-public python-typing
14815 (package
14816 (name "python-typing")
14817 (version "3.6.6")
14818 (source
14819 (origin
14820 (method url-fetch)
14821 (uri (pypi-uri "typing" version))
14822 (sha256
14823 (base32
14824 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
14825 (build-system python-build-system)
14826 (home-page "https://docs.python.org/3/library/typing.html")
14827 (synopsis "Type hints for Python")
14828 (description "This is a backport of the standard library @code{typing}
14829 module to Python versions older than 3.5. Typing defines a standard notation
14830 for Python function and variable type annotations. The notation can be used
14831 for documenting code in a concise, standard format, and it has been designed
14832 to also be used by static and runtime type checkers, static analyzers, IDEs
14833 and other tools.")
14834 (license license:psfl)))
14835
14836 (define-public python2-typing
14837 (package-with-python2 python-typing))
14838
14839 (define-public python-typing-extensions
14840 (package
14841 (name "python-typing-extensions")
14842 (version "3.7.2")
14843 (source
14844 (origin
14845 (method url-fetch)
14846 (uri (pypi-uri "typing_extensions" version))
14847 (sha256
14848 (base32
14849 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
14850 (build-system python-build-system)
14851 (home-page
14852 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
14853 (synopsis "Experimental type hints for Python")
14854 (description
14855 "The typing_extensions module contains additional @code{typing} hints not
14856 yet present in the of the @code{typing} standard library.
14857 Included are implementations of:
14858 @enumerate
14859 @item ClassVar
14860 @item ContextManager
14861 @item Counter
14862 @item DefaultDict
14863 @item Deque
14864 @item NewType
14865 @item NoReturn
14866 @item overload
14867 @item Protocol
14868 @item runtime
14869 @item Text
14870 @item Type
14871 @item TYPE_CHECKING
14872 @item AsyncGenerator
14873 @end enumerate\n")
14874 (license license:psfl)))
14875
14876 (define-public bpython
14877 (package
14878 (name "bpython")
14879 (version "0.18")
14880 (source
14881 (origin
14882 (method url-fetch)
14883 (uri (pypi-uri "bpython" version))
14884 (sha256
14885 (base32 "1hl6frgvr2lqaxqczl8amg9xih32b3gzv429vs0qrjb8wpdj1k2n"))))
14886 (build-system python-build-system)
14887 (arguments
14888 `(#:phases
14889 (modify-phases %standard-phases
14890 (add-after 'unpack 'remove-failing-test
14891 (lambda _
14892 ;; Remove failing test. FIXME: make it pass
14893 (delete-file "bpython/test/test_args.py")
14894 #t))
14895 (add-after 'wrap 'add-aliases
14896 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
14897 (lambda* (#:key outputs #:allow-other-keys)
14898 (let ((out (assoc-ref outputs "out")))
14899 (for-each
14900 (lambda (old new)
14901 (symlink old (string-append out "/bin/" new)))
14902 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
14903 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
14904 #t)))))
14905 (propagated-inputs
14906 `(("python-pygments" ,python-pygments)
14907 ("python-requests" ,python-requests)
14908 ("python-babel" ,python-babel) ; optional, for internationalization
14909 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
14910 ("python-greenlet" ,python-greenlet)
14911 ("python-urwid" ,python-urwid) ; for bpython-urwid only
14912 ("python-six" ,python-six)))
14913 (native-inputs
14914 `(("python-sphinx" ,python-sphinx)
14915 ("python-mock" ,python-mock)))
14916 (home-page "https://bpython-interpreter.org/")
14917 (synopsis "Fancy interface to the Python interpreter")
14918 (description "Bpython is a fancy interface to the Python
14919 interpreter. bpython's main features are
14920
14921 @enumerate
14922 @item in-line syntax highlighting,
14923 @item readline-like autocomplete with suggestions displayed as you type,
14924 @item expected parameter list for any Python function,
14925 @item \"rewind\" function to pop the last line of code from memory and
14926 re-evaluate,
14927 @item send the code you've entered off to a pastebin,
14928 @item save the code you've entered to a file, and
14929 @item auto-indentation.
14930 @end enumerate")
14931 (license license:expat)))
14932
14933 (define-public bpython2
14934 (let ((base (package-with-python2
14935 (strip-python2-variant bpython))))
14936 (package (inherit base)
14937 (name "bpython2")
14938 (arguments
14939 `(#:python ,python-2
14940 #:phases
14941 (modify-phases %standard-phases
14942 (add-after 'unpack 'remove-failing-test
14943 (lambda _
14944 ;; Remove failing test. FIXME: make it pass
14945 (delete-file "bpython/test/test_args.py")
14946 ;; Disable failing test-cases (renaming inhibits they are
14947 ;; discovered)
14948 (substitute* "bpython/test/test_curtsies_repl.py"
14949 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
14950 (string-append a "xxx_off_" b))
14951 (("^(\\s*def )(test_complex\\W)" _ a b)
14952 (string-append a "xxx_off_" b)))
14953 #t))
14954 (add-before 'build 'rename-scripts
14955 ;; rename the scripts to bypthon2, bpdb2, etc.
14956 (lambda _
14957 (substitute* "setup.py"
14958 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
14959 (string-append name "2" rest "\n"))
14960 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
14961 (string-append name "2" (or sub "") rest "\n")))
14962 #t))))))))
14963
14964 (define-public python-pyinotify
14965 (package
14966 (name "python-pyinotify")
14967 (version "0.9.6")
14968 (source (origin
14969 (method url-fetch)
14970 (uri (pypi-uri "pyinotify" version))
14971 (sha256
14972 (base32
14973 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
14974 (build-system python-build-system)
14975 (arguments `(#:tests? #f)) ;no tests
14976 (home-page "https://github.com/seb-m/pyinotify")
14977 (synopsis "Python library for monitoring inotify events")
14978 (description
14979 "@code{pyinotify} provides a Python interface for monitoring
14980 file system events on Linux.")
14981 (license license:expat)))
14982
14983 (define-public python2-pyinotify
14984 (package-with-python2 python-pyinotify))
14985
14986 ;; Ada parser uses this version.
14987 (define-public python2-quex-0.67.3
14988 (package
14989 (name "python2-quex")
14990 (version "0.67.3")
14991 (source
14992 (origin
14993 (method url-fetch)
14994 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
14995 (version-major+minor version)
14996 "/quex-" version ".zip"))
14997 (sha256
14998 (base32
14999 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
15000 (build-system python-build-system)
15001 (native-inputs
15002 `(("unzip" ,unzip)))
15003 (arguments
15004 `(#:python ,python-2
15005 #:tests? #f
15006 #:phases
15007 (modify-phases %standard-phases
15008 (delete 'configure)
15009 (delete 'build)
15010 (replace 'install
15011 (lambda* (#:key outputs #:allow-other-keys)
15012 (let* ((out (assoc-ref outputs "out"))
15013 (share/quex (string-append out "/share/quex"))
15014 (bin (string-append out "/bin")))
15015 (copy-recursively "." share/quex)
15016 (mkdir-p bin)
15017 (symlink (string-append share/quex "/quex-exe.py")
15018 (string-append bin "/quex"))
15019 #t))))))
15020 (native-search-paths
15021 (list (search-path-specification
15022 (variable "QUEX_PATH")
15023 (files '("share/quex")))))
15024 (home-page "http://quex.sourceforge.net/")
15025 (synopsis "Lexical analyzer generator in Python")
15026 (description "@code{quex} is a lexical analyzer generator in Python.")
15027 (license license:lgpl2.1+))) ; Non-military
15028
15029 (define-public python2-quex
15030 (package (inherit python2-quex-0.67.3)
15031 (name "python2-quex")
15032 (version "0.68.1")
15033 (source
15034 (origin
15035 (method url-fetch)
15036 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
15037 (sha256
15038 (base32
15039 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
15040 (file-name (string-append name "-" version ".tar.gz"))))))
15041
15042 (define-public python-more-itertools
15043 (package
15044 (name "python-more-itertools")
15045 (version "7.1.0")
15046 (source
15047 (origin
15048 (method url-fetch)
15049 (uri (pypi-uri "more-itertools" version))
15050 (sha256
15051 (base32
15052 "16phg2f2dvm6ci5wr49ncha5lmc0m2in3bsl33c61vzca4gkvd4b"))))
15053 (build-system python-build-system)
15054 (home-page "https://github.com/erikrose/more-itertools")
15055 (synopsis "More routines for operating on iterables, beyond itertools")
15056 (description "Python's built-in @code{itertools} module implements a
15057 number of iterator building blocks inspired by constructs from APL, Haskell,
15058 and SML. @code{more-itertools} includes additional building blocks for
15059 working with iterables.")
15060 (properties `((python2-variant . ,(delay python2-more-itertools))))
15061 (license license:expat)))
15062
15063 ;; The 5.x series are the last versions supporting Python 2.7.
15064 (define-public python2-more-itertools
15065 (package
15066 (inherit python-more-itertools)
15067 (name "python2-more-itertools")
15068 (version "5.0.0")
15069 (source (origin
15070 (method url-fetch)
15071 (uri (pypi-uri "more-itertools" version))
15072 (sha256
15073 (base32
15074 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
15075 (arguments
15076 `(#:python ,python2-minimal))
15077 (propagated-inputs
15078 `(("python2-six" ,python2-six-bootstrap)))))
15079
15080 (define-public python-latexcodec
15081 (package
15082 (name "python-latexcodec")
15083 (version "1.0.7")
15084 (source
15085 (origin
15086 (method url-fetch)
15087 (uri (pypi-uri "latexcodec" version))
15088 (sha256
15089 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
15090 (build-system python-build-system)
15091 (inputs
15092 `(("python-six" ,python-six)))
15093 (home-page "https://readthedocs.org/projects/latexcodec/")
15094 (synopsis "Work with LaTeX code in Python")
15095 (description "Lexer and codec to work with LaTeX code in Python.")
15096 (license license:expat)))
15097
15098 (define-public python-pybtex
15099 (package
15100 (name "python-pybtex")
15101 (version "0.22.2")
15102 (source
15103 (origin
15104 (method url-fetch)
15105 (uri (pypi-uri "pybtex" version))
15106 (sha256
15107 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
15108 (build-system python-build-system)
15109 (native-inputs
15110 `(("python-nose" ,python-nose)))
15111 (inputs
15112 `(("python-latexcodec" ,python-latexcodec)
15113 ("python-pyyaml" ,python-pyyaml)
15114 ("python-six" ,python-six)))
15115 (arguments
15116 `(#:test-target "nosetests"))
15117 (home-page "https://pybtex.org/")
15118 (synopsis "BibTeX-compatible bibliography processor")
15119 (description "Pybtex is a BibTeX-compatible bibliography processor written
15120 in Python. You can simply type pybtex instead of bibtex.")
15121 (license license:expat)))
15122
15123 (define-public python-onetimepass
15124 (package
15125 (name "python-onetimepass")
15126 (version "1.0.1")
15127 (source
15128 (origin
15129 (method url-fetch)
15130 (uri (pypi-uri "onetimepass" version))
15131 (sha256
15132 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
15133 (build-system python-build-system)
15134 (propagated-inputs `(("python-six" ,python-six)))
15135 (home-page "https://github.com/tadeck/onetimepass/")
15136 (synopsis "One-time password library")
15137 (description "Python one-time password library for HMAC-based (HOTP) and
15138 time-based (TOTP) passwords.")
15139 (license license:expat)))
15140
15141 (define-public python-parso
15142 (package
15143 (name "python-parso")
15144 (version "0.5.1")
15145 (source
15146 (origin
15147 (method url-fetch)
15148 (uri (pypi-uri "parso" version))
15149 (sha256
15150 (base32
15151 "171a9ivhxwsd52h1cgsz40zgzpgzscn7yqb7sdjhy8m1lzj0wsv6"))))
15152 (native-inputs
15153 `(("python-pytest" ,python-pytest)))
15154 (build-system python-build-system)
15155 (arguments
15156 `(#:phases (modify-phases %standard-phases
15157 (replace 'check
15158 (lambda _ (invoke "pytest" "-vv"))))))
15159 (home-page "https://github.com/davidhalter/parso")
15160 (synopsis "Python Parser")
15161 (description "Parso is a Python parser that supports error recovery and
15162 round-trip parsing for different Python versions (in multiple Python versions).
15163 Parso is also able to list multiple syntax errors in your Python file.")
15164 (license license:expat)))
15165
15166 (define-public python2-parso
15167 (package-with-python2 python-parso))
15168
15169 (define-public python-async-generator
15170 (package
15171 (name "python-async-generator")
15172 (version "1.10")
15173 (source
15174 (origin
15175 (method url-fetch)
15176 (uri (pypi-uri "async_generator" version))
15177 (sha256
15178 (base32
15179 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
15180 (build-system python-build-system)
15181 (native-inputs
15182 `(("python-pytest" ,python-pytest)))
15183 (home-page "https://github.com/python-trio/async_generator")
15184 (synopsis "Async generators and context managers for Python 3.5+")
15185 (description "@code{async_generator} back-ports Python 3.6's native async
15186 generators and Python 3.7's context managers into Python 3.5.")
15187 ;; Dual licensed.
15188 (license (list license:expat license:asl2.0))))
15189
15190 (define-public python-async-timeout
15191 (package
15192 (name "python-async-timeout")
15193 (version "3.0.1")
15194 (source
15195 (origin
15196 (method url-fetch)
15197 (uri (pypi-uri "async-timeout" version))
15198 (sha256
15199 (base32
15200 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
15201 (build-system python-build-system)
15202 (home-page "https://github.com/aio-libs/async_timeout/")
15203 (synopsis "Timeout context manager for asyncio programs")
15204 (description "@code{async-timeout} provides a timeout timeout context
15205 manager compatible with @code{asyncio}.")
15206 (license license:asl2.0)))
15207
15208 (define-public python-glob2
15209 (package
15210 (name "python-glob2")
15211 (version "0.7")
15212 (source
15213 (origin
15214 (method git-fetch)
15215 (uri (git-reference
15216 (url "https://github.com/miracle2k/python-glob2.git")
15217 (commit (string-append "v" version))))
15218 (file-name (git-file-name name version))
15219 (sha256
15220 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
15221 (build-system python-build-system)
15222 (home-page "https://github.com/miracle2k/python-glob2/")
15223 (synopsis "Extended Version of the python buildin glob module")
15224 (description "This is an extended version of the Python
15225 @url{http://docs.python.org/library/glob.html, built-in glob module} which
15226 adds:
15227
15228 @itemize
15229 @item The ability to capture the text matched by glob patterns, and return
15230 those matches alongside the file names.
15231 @item A recursive @code{**} globbing syntax, akin for example to the
15232 @code{globstar} option of Bash.
15233 @item The ability to replace the file system functions used, in order to glob
15234 on virtual file systems.
15235 @item Compatible with Python 2 and Python 3 (tested with 3.3).
15236 @end itemize
15237
15238 Glob2 currently based on the glob code from Python 3.3.1.")
15239 (license license:bsd-2)))
15240
15241 (define-public python2-glob2
15242 (package-with-python2 python-glob2))
15243
15244 (define-public python-gipc
15245 (package
15246 (name "python-gipc")
15247 (version "0.6.0")
15248 (source
15249 (origin
15250 (method url-fetch)
15251 (uri (pypi-uri "gipc" version ".zip"))
15252 (sha256
15253 (base32
15254 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
15255 (build-system python-build-system)
15256 (native-inputs
15257 `(("unzip" ,unzip)))
15258 (propagated-inputs
15259 `(("python-gevent" ,python-gevent)))
15260 (home-page "http://gehrcke.de/gipc")
15261 (synopsis "Child process management in the context of gevent")
15262 (description "Usage of Python's multiprocessing package in a
15263 gevent-powered application may raise problems. With @code{gipc},
15264 process-based child processes can safely be created anywhere within a
15265 gevent-powered application.")
15266 (license license:expat)))
15267
15268 (define-public python2-gipc
15269 (package-with-python2 python-gipc))
15270
15271 (define-public python-fusepy
15272 (package
15273 (name "python-fusepy")
15274 (version "2.0.4")
15275 (source
15276 (origin
15277 (method url-fetch)
15278 (uri (pypi-uri "fusepy" version))
15279 (sha256
15280 (base32
15281 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
15282 (build-system python-build-system)
15283 (arguments
15284 `(#:phases
15285 (modify-phases %standard-phases
15286 (add-before 'build 'set-library-file-name
15287 (lambda* (#:key inputs #:allow-other-keys)
15288 (let ((fuse (assoc-ref inputs "fuse")))
15289 (substitute* "fuse.py"
15290 (("find_library\\('fuse'\\)")
15291 (string-append "'" fuse "/lib/libfuse.so'")))
15292 #t))))))
15293 (propagated-inputs
15294 `(("fuse" ,fuse)))
15295 (home-page "https://github.com/fusepy/fusepy")
15296 (synopsis "Simple ctypes bindings for FUSE")
15297 (description "Python module that provides a simple interface to FUSE and
15298 MacFUSE. The binding is created using the standard @code{ctypes} library.")
15299 (license license:isc)))
15300
15301 (define-public python2-fusepy
15302 (package-with-python2 python-fusepy))
15303
15304 (define-public python2-gdrivefs
15305 (package
15306 (name "python2-gdrivefs")
15307 (version "0.14.9")
15308 (source
15309 (origin
15310 (method url-fetch)
15311 (uri (pypi-uri "gdrivefs" version))
15312 (sha256
15313 (base32
15314 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
15315 (build-system python-build-system)
15316 (arguments
15317 `(#:python ,python-2
15318 #:phases
15319 (modify-phases %standard-phases
15320 (add-before 'build 'patch-setup-py
15321 (lambda _
15322 ;; Update requirements from dependency==version
15323 ;; to dependency>=version
15324 (substitute* "gdrivefs/resources/requirements.txt"
15325 (("==") ">="))
15326 #t)))))
15327 (native-inputs
15328 `(("python2-gipc" ,python2-gipc)
15329 ("python2-gevent" ,python2-gevent)
15330 ("python2-greenlet" ,python2-greenlet)
15331 ("python2-httplib2" ,python2-httplib2)
15332 ("python2-uritemplate" ,python2-uritemplate)
15333 ("python2-oauth2client" ,python2-oauth2client)
15334 ("python2-six" ,python2-six)))
15335 (propagated-inputs
15336 `(("python2-dateutil" ,python2-dateutil)
15337 ("python2-fusepy" ,python2-fusepy)
15338 ("python2-google-api-client" ,python2-google-api-client)))
15339 (home-page "https://github.com/dsoprea/GDriveFS")
15340 (synopsis "Mount Google Drive as a local file system")
15341 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
15342 under Python 2.7.")
15343 (license license:gpl2)))
15344
15345 (define-public pybind11
15346 (package
15347 (name "pybind11")
15348 (version "2.3.0")
15349 (source (origin
15350 (method git-fetch)
15351 (uri (git-reference
15352 (url "https://github.com/pybind/pybind11.git")
15353 (commit (string-append "v" version))))
15354 (sha256
15355 (base32
15356 "11b6dniri8m05spfd2a19irz82shf4sdca73566bniggrf3zclnf"))
15357 (file-name (git-file-name name version))))
15358 (build-system cmake-build-system)
15359 (native-inputs
15360 `(("python" ,python)
15361 ("python-pytest" ,python-pytest)))
15362 (arguments
15363 `(#:test-target "check"))
15364 (home-page "https://github.com/pybind/pybind11/")
15365 (synopsis "Seamless operability between C++11 and Python")
15366 (description "pybind11 is a lightweight header-only library that exposes
15367 C++ types in Python and vice versa, mainly to create Python bindings of
15368 existing C++ code. Its goals and syntax are similar to the excellent
15369 Boost.Python library by David Abrahams: to minimize boilerplate code in
15370 traditional extension modules by inferring type information using compile-time
15371 introspection.")
15372 (license license:expat)))
15373
15374 (define-public python-fasteners
15375 (package
15376 (name "python-fasteners")
15377 (version "0.14.1")
15378 (source
15379 (origin
15380 (method url-fetch)
15381 (uri (pypi-uri "fasteners" version))
15382 (sha256
15383 (base32
15384 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
15385 (build-system python-build-system)
15386 (propagated-inputs
15387 `(("python-monotonic" ,python-monotonic)
15388 ("python-six" ,python-six)
15389 ("python-testtools" ,python-testtools)))
15390 (home-page "https://github.com/harlowja/fasteners")
15391 (synopsis "Python package that provides useful locks")
15392 (description
15393 "This package provides a Python program that provides following locks:
15394
15395 @itemize
15396 @item Locking decorator
15397 @item Reader-writer locks
15398 @item Inter-process locks
15399 @item Generic helpers
15400 @end itemize\n")
15401 (properties `((python2-variant . ,(delay python2-fasteners))))
15402 (license license:asl2.0)))
15403
15404 (define-public python2-fasteners
15405 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
15406 (package
15407 (inherit base)
15408 (propagated-inputs
15409 `(("python2-futures" ,python2-futures)
15410 ,@(package-propagated-inputs base))))))
15411
15412 (define-public python-requests-file
15413 (package
15414 (name "python-requests-file")
15415 (version "1.4.3")
15416 (source
15417 (origin
15418 (method url-fetch)
15419 (uri (pypi-uri "requests-file" version))
15420 (sha256
15421 (base32
15422 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
15423 (build-system python-build-system)
15424 (propagated-inputs
15425 `(("python-requests" ,python-requests)
15426 ("python-six" ,python-six)))
15427 (home-page
15428 "https://github.com/dashea/requests-file")
15429 (synopsis "File transport adapter for Requests")
15430 (description
15431 "Requests-File is a transport adapter for use with the Requests Python
15432 library to allow local file system access via @code{file://} URLs.")
15433 (license license:asl2.0)))
15434
15435 (define-public python2-requests-file
15436 (package-with-python2 python-requests-file))
15437
15438 (define-public python-tldextract
15439 (package
15440 (name "python-tldextract")
15441 (version "2.2.0")
15442 (source
15443 (origin
15444 (method url-fetch)
15445 (uri (pypi-uri "tldextract" version))
15446 (sha256
15447 (base32
15448 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
15449 (build-system python-build-system)
15450 (native-inputs
15451 `(("python-pytest" ,python-pytest)
15452 ("python-responses" ,python-responses)))
15453 (propagated-inputs
15454 `(("python-idna" ,python-idna)
15455 ("python-requests" ,python-requests)
15456 ("python-requests-file" ,python-requests-file)))
15457 (home-page
15458 "https://github.com/john-kurkowski/tldextract")
15459 (synopsis
15460 "Separate the TLD from the registered domain and subdomains of a URL")
15461 (description
15462 "TLDExtract accurately separates the TLD from the registered domain and
15463 subdomains of a URL, using the Public Suffix List. By default, this includes
15464 the public ICANN TLDs and their exceptions. It can optionally support the
15465 Public Suffix List's private domains as well.")
15466 (license license:bsd-3)))
15467
15468 (define-public python2-tldextract
15469 (package-with-python2 python-tldextract))
15470
15471 (define-public python-pynamecheap
15472 (package
15473 (name "python-pynamecheap")
15474 (version "0.0.3")
15475 (source
15476 (origin
15477 (method url-fetch)
15478 (uri (pypi-uri "PyNamecheap" version))
15479 (sha256
15480 (base32
15481 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
15482 (build-system python-build-system)
15483 (propagated-inputs
15484 `(("python-requests" ,python-requests)))
15485 (home-page
15486 "https://github.com/Bemmu/PyNamecheap")
15487 (synopsis
15488 "Namecheap API client in Python")
15489 (description
15490 "PyNamecheap is a Namecheap API client in Python.")
15491 (license license:expat)))
15492
15493 (define-public python2-pynamecheap
15494 (package-with-python2 python-pynamecheap))
15495
15496 (define-public python-dns-lexicon
15497 (package
15498 (name "python-dns-lexicon")
15499 (version "2.4.0")
15500 (source
15501 (origin
15502 (method url-fetch)
15503 (uri (pypi-uri "dns-lexicon" version))
15504 (sha256
15505 (base32
15506 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
15507 (build-system python-build-system)
15508 (arguments
15509 `(#:tests? #f)) ;requires internet access
15510 (propagated-inputs
15511 `(("python-future" ,python-future)
15512 ("python-pynamecheap" ,python-pynamecheap)
15513 ("python-requests" ,python-requests)
15514 ("python-tldextract" ,python-tldextract)
15515 ("python-urllib3" ,python-urllib3)))
15516 (home-page "https://github.com/AnalogJ/lexicon")
15517 (synopsis
15518 "Manipulate DNS records on various DNS providers")
15519 (description
15520 "Lexicon provides a way to manipulate DNS records on multiple DNS
15521 providers in a standardized way. It has a CLI but it can also be used as a
15522 Python library. It was designed to be used in automation, specifically with
15523 Let's Encrypt.")
15524 (license license:expat)))
15525
15526 (define-public python2-dns-lexicon
15527 (package-with-python2 python-dns-lexicon))
15528
15529 (define-public python-commandlines
15530 (package
15531 (name "python-commandlines")
15532 (version "0.4.1")
15533 (source
15534 (origin
15535 (method url-fetch)
15536 (uri (pypi-uri "commandlines" version))
15537 (sha256
15538 (base32
15539 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15540 (build-system python-build-system)
15541 (home-page "https://github.com/chrissimpkins/commandlines")
15542 (synopsis "Command line argument to object parsing library")
15543 (description
15544 "@code{Commandlines} is a Python library for command line application
15545 development that supports command line argument parsing, command string
15546 validation testing and application logic.")
15547 (license license:expat)))
15548
15549 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15550 ;; python-numba. They have a very unflexible relationship.
15551 (define-public python-numba
15552 (package
15553 (name "python-numba")
15554 (version "0.46.0")
15555 (source
15556 (origin
15557 (method url-fetch)
15558 (uri (pypi-uri "numba" version))
15559 (sha256
15560 (base32
15561 "1vnfzcq6fcnkmdms6114d49awvvj5181fl7z1wlha27qc2paxjy2"))))
15562 (build-system python-build-system)
15563 (arguments
15564 `(#:modules ((guix build utils)
15565 (guix build python-build-system)
15566 (ice-9 ftw)
15567 (srfi srfi-1)
15568 (srfi srfi-26))
15569 #:phases
15570 (modify-phases %standard-phases
15571 (add-after 'unpack 'disable-proprietary-features
15572 (lambda _
15573 (setenv "NUMBA_DISABLE_HSA" "1")
15574 (setenv "NUMBA_DISABLE_CUDA" "1")
15575 #t))
15576 (add-after 'unpack 'remove-failing-tests
15577 (lambda _
15578 ;; FIXME: These tests fail for unknown reasons:
15579 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15580 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15581 (substitute* "numba/tests/test_dispatcher.py"
15582 (("def test(_non_writable_pycache)" _ m)
15583 (string-append "def guix_skip" m))
15584 (("def test(_non_creatable_pycache)" _ m)
15585 (string-append "def guix_skip" m))
15586 (("def test(_frozen)" _ m)
15587 (string-append "def guix_skip" m)))
15588
15589 ;; These tests fail because we don't run the tests from the build
15590 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
15591 ;; They are in numba.tests.test_pycc.TestDistutilsSupport.
15592 (substitute* "numba/tests/test_pycc.py"
15593 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15594 (string-append "def guix_skip" m)))
15595
15596 ;; These tests fail because our version of Python does not have
15597 ;; a recognizable front-end for the Numba distribution to use
15598 ;; to check against.
15599 (substitute* "numba/tests/test_entrypoints.py"
15600 (("def test(_init_entrypoint)" _ m)
15601 (string-append "def guix_skip" m)))
15602 (substitute* "numba/tests/test_jitclasses.py"
15603 (("def test(_jitclass_longlabel_not_truncated)" _ m)
15604 (string-append "def guix_skip" m)))
15605 #t))
15606 (replace 'check
15607 (lambda _
15608 (let ((cwd (getcwd)))
15609 (setenv "PYTHONPATH"
15610 (string-append cwd "/build/"
15611 (find (cut string-prefix? "lib" <>)
15612 (scandir (string-append cwd "/build")))
15613 ":"
15614 (getenv "PYTHONPATH")))
15615 ;; Something is wrong with the PYTHONPATH when running the
15616 ;; tests from the build directory, as it complains about not being
15617 ;; able to import certain modules.
15618 (with-directory-excursion "/tmp"
15619 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15620 #t)))))
15621 (propagated-inputs
15622 `(("python-llvmlite" ,python-llvmlite)
15623 ("python-numpy" ,python-numpy)
15624 ("python-singledispatch" ,python-singledispatch)))
15625 ;; Needed for tests.
15626 (inputs
15627 `(("python-jinja2" ,python-jinja2)
15628 ("python-pygments" ,python-pygments)))
15629 (home-page "https://numba.pydata.org")
15630 (synopsis "Compile Python code using LLVM")
15631 (description "Numba gives you the power to speed up your applications with
15632 high performance functions written directly in Python. With a few
15633 annotations, array-oriented and math-heavy Python code can be just-in-time
15634 compiled to native machine instructions, similar in performance to C, C++ and
15635 Fortran, without having to switch languages or Python interpreters.
15636
15637 Numba works by generating optimized machine code using the LLVM compiler
15638 infrastructure at import time, runtime, or statically (using the included pycc
15639 tool).")
15640 (license license:bsd-3)))
15641
15642 (define-public python-anndata
15643 (package
15644 (name "python-anndata")
15645 (version "0.6.18")
15646 (source
15647 (origin
15648 (method url-fetch)
15649 (uri (pypi-uri "anndata" version))
15650 (sha256
15651 (base32
15652 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
15653 (build-system python-build-system)
15654 (propagated-inputs
15655 `(("python-h5py" ,python-h5py)
15656 ("python-natsort" ,python-natsort)
15657 ("python-pandas" ,python-pandas)
15658 ("python-scipy" ,python-scipy)))
15659 (home-page "https://github.com/theislab/anndata")
15660 (synopsis "Annotated data for data analysis pipelines")
15661 (description "Anndata is a package for simple (functional) high-level APIs
15662 for data analysis pipelines. In this context, it provides an efficient,
15663 scalable way of keeping track of data together with learned annotations and
15664 reduces the code overhead typically encountered when using a mostly
15665 object-oriented library such as @code{scikit-learn}.")
15666 (license license:bsd-3)))
15667
15668 (define-public python-dill
15669 (package
15670 (name "python-dill")
15671 (version "0.3.1.1")
15672 (source
15673 (origin
15674 (method url-fetch)
15675 (uri (pypi-uri "dill" version))
15676 (sha256
15677 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
15678 (build-system python-build-system)
15679 (arguments
15680 `(#:phases
15681 (modify-phases %standard-phases
15682 (replace 'check
15683 (lambda _
15684 (with-directory-excursion "/tmp"
15685 (invoke "nosetests" "-v"))
15686 #t)))))
15687 (native-inputs
15688 `(("python-nose" ,python-nose)))
15689 (home-page "https://pypi.org/project/dill/")
15690 (synopsis "Serialize all of Python")
15691 (description "Dill extends Python's @code{pickle} module for serializing
15692 and de-serializing Python objects to the majority of the built-in Python
15693 types. Dill provides the user the same interface as the @code{pickle} module,
15694 and also includes some additional features. In addition to pickling Python
15695 objects, @code{dill} provides the ability to save the state of an interpreter
15696 session in a single command. Hence, it would be feasible to save a
15697 interpreter session, close the interpreter, ship the pickled file to another
15698 computer, open a new interpreter, unpickle the session and thus continue from
15699 the saved state of the original interpreter session.")
15700 (license license:bsd-3)))
15701
15702 (define-public python-multiprocess
15703 (package
15704 (name "python-multiprocess")
15705 (version "0.70.9")
15706 (source
15707 (origin
15708 (method url-fetch)
15709 (uri (pypi-uri "multiprocess" version))
15710 (sha256
15711 (base32
15712 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
15713 (build-system python-build-system)
15714 (arguments
15715 `(#:phases
15716 (modify-phases %standard-phases
15717 (add-after 'unpack 'disable-broken-tests
15718 (lambda _
15719 ;; This test is broken as there is no keyboard interrupt.
15720 (substitute* "py3.7/multiprocess/tests/__init__.py"
15721 (("^(.*)def test_wait_result"
15722 line indent)
15723 (string-append indent
15724 "@unittest.skip(\"Disabled by Guix\")\n"
15725 line)))
15726 #t))
15727 ;; Tests must be run after installation.
15728 (delete 'check)
15729 (add-after 'install 'check
15730 (lambda* (#:key inputs outputs #:allow-other-keys)
15731 (add-installed-pythonpath inputs outputs)
15732 (invoke "python" "-m" "multiprocess.tests")
15733 #t)))))
15734 (propagated-inputs
15735 `(("python-dill" ,python-dill)))
15736 (home-page "https://pypi.org/project/multiprocess/")
15737 (synopsis "Multiprocessing and multithreading in Python")
15738 (description
15739 "This package is a fork of the multiprocessing Python package, a package
15740 which supports the spawning of processes using the API of the standard
15741 library's @code{threading} module.")
15742 (license license:bsd-3)))
15743
15744 (define-public python-toolz
15745 (package
15746 (name "python-toolz")
15747 (version "0.9.0")
15748 (source
15749 (origin
15750 (method url-fetch)
15751 (uri (pypi-uri "toolz" version))
15752 (sha256
15753 (base32
15754 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
15755 (build-system python-build-system)
15756 ;; FIXME: tests cannot be computed: "Can't perform this operation for
15757 ;; unregistered loader type"
15758 (arguments '(#:tests? #f))
15759 (home-page "https://github.com/pytoolz/toolz/")
15760 (synopsis "List processing tools and functional utilities")
15761 (description
15762 "This package provides a set of utility functions for iterators,
15763 functions, and dictionaries.")
15764 (license license:bsd-3)))
15765
15766 (define-public python2-toolz
15767 (package-with-python2 python-toolz))
15768
15769 (define-public python-cytoolz
15770 (package
15771 (name "python-cytoolz")
15772 (version "0.9.0.1")
15773 (source
15774 (origin
15775 (method url-fetch)
15776 (uri (pypi-uri "cytoolz" version))
15777 (sha256
15778 (base32
15779 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
15780 (build-system python-build-system)
15781 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
15782 ;; 'exceptions'"
15783 (arguments '(#:tests? #f))
15784 (propagated-inputs
15785 `(("python-toolz" ,python-toolz)))
15786 (native-inputs
15787 `(("python-cython" ,python-cython)))
15788 (home-page "https://github.com/pytoolz/cytoolz")
15789 (synopsis "High performance functional utilities")
15790 (description
15791 "The cytoolz package implements the same API as provided by toolz. The
15792 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
15793 that is accessible to other projects developed in Cython.")
15794 (license license:bsd-3)))
15795
15796 (define-public python-sortedcontainers
15797 (package
15798 (name "python-sortedcontainers")
15799 (version "2.0.4")
15800 (source
15801 (origin
15802 (method url-fetch)
15803 (uri (pypi-uri "sortedcontainers" version))
15804 (sha256
15805 (base32
15806 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
15807 (build-system python-build-system)
15808 (native-inputs
15809 `(("python-tox" ,python-tox)))
15810 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
15811 (synopsis "Sorted List, Sorted Dict, Sorted Set")
15812 (description
15813 "This package provides a sorted collections library, written in
15814 pure-Python.")
15815 (license license:asl2.0)))
15816
15817 (define-public python-cloudpickle
15818 (package
15819 (name "python-cloudpickle")
15820 (version "0.6.1")
15821 (source
15822 (origin
15823 (method url-fetch)
15824 (uri (pypi-uri "cloudpickle" version))
15825 (sha256
15826 (base32
15827 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
15828 (build-system python-build-system)
15829 ;; FIXME: there are 5 errors in 122 tests:
15830 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
15831 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
15832 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15833 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15834 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
15835 ;; TypeError: cannot serialize '_io.BufferedRandom' object
15836 (arguments '(#:tests? #f))
15837 (native-inputs
15838 `(("python-pytest" ,python-pytest)
15839 ("python-mock" ,python-mock)
15840 ("python-tornado" ,python-tornado)))
15841 (home-page "https://github.com/cloudpipe/cloudpickle")
15842 (synopsis "Extended pickling support for Python objects")
15843 (description
15844 "Cloudpickle makes it possible to serialize Python constructs not
15845 supported by the default pickle module from the Python standard library. It
15846 is especially useful for cluster computing where Python expressions are
15847 shipped over the network to execute on remote hosts, possibly close to the
15848 data.")
15849 (license license:bsd-3)))
15850
15851 (define-public python2-cloudpickle
15852 (package-with-python2 python-cloudpickle))
15853
15854 (define-public python-locket
15855 (package
15856 (name "python-locket")
15857 (version "0.2.0")
15858 (source
15859 (origin
15860 (method url-fetch)
15861 (uri (pypi-uri "locket" version))
15862 (sha256
15863 (base32
15864 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
15865 (build-system python-build-system)
15866 (home-page "https://github.com/mwilliamson/locket.py")
15867 (synopsis "File-based locks for Python")
15868 (description
15869 "Locket implements a lock that can be used by multiple processes provided
15870 they use the same path.")
15871 (license license:bsd-2)))
15872
15873 (define-public python2-locket
15874 (package-with-python2 python-locket))
15875
15876 (define-public python-blosc
15877 (package
15878 (name "python-blosc")
15879 (version "1.5.1")
15880 (source
15881 (origin
15882 (method url-fetch)
15883 (uri (pypi-uri "blosc" version))
15884 (sha256
15885 (base32
15886 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
15887 (build-system python-build-system)
15888 ;; FIXME: all tests pass, but then this error is printed:
15889 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
15890 (arguments '(#:tests? #f))
15891 (propagated-inputs
15892 `(("python-numpy" ,python-numpy)))
15893 (home-page "https://github.com/blosc/python-blosc")
15894 (synopsis "Python wrapper for the Blosc data compressor library")
15895 (description "Blosc is a high performance compressor optimized for binary
15896 data. It has been designed to transmit data to the processor cache faster
15897 than the traditional, non-compressed, direct memory fetch approach via a
15898 @code{memcpy()} system call.
15899
15900 Blosc works well for compressing numerical arrays that contains data with
15901 relatively low entropy, like sparse data, time series, grids with
15902 regular-spaced values, etc.
15903
15904 This Python package wraps the Blosc library.")
15905 (license license:bsd-3)))
15906
15907 (define-public python2-blosc
15908 (package-with-python2 python-blosc))
15909
15910 (define-public python-partd
15911 (package
15912 (name "python-partd")
15913 (version "0.3.9")
15914 (source
15915 (origin
15916 (method url-fetch)
15917 (uri (pypi-uri "partd" version))
15918 (sha256
15919 (base32
15920 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
15921 (build-system python-build-system)
15922 (propagated-inputs
15923 `(("python-blosc" ,python-blosc)
15924 ("python-locket" ,python-locket)
15925 ("python-numpy" ,python-numpy)
15926 ("python-pandas" ,python-pandas)
15927 ("python-pyzmq" ,python-pyzmq)
15928 ("python-toolz" ,python-toolz)))
15929 (home-page "https://github.com/dask/partd/")
15930 (synopsis "Appendable key-value storage")
15931 (description "Partd stores key-value pairs. Values are raw bytes. We
15932 append on old values. Partd excels at shuffling operations.")
15933 (license license:bsd-3)))
15934
15935 (define-public python2-partd
15936 (package-with-python2 python-partd))
15937
15938 (define-public python-fsspec
15939 (package
15940 (name "python-fsspec")
15941 (version "0.6.1")
15942 (source
15943 (origin
15944 (method url-fetch)
15945 (uri (pypi-uri "fsspec" version))
15946 (sha256
15947 (base32
15948 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
15949 (build-system python-build-system)
15950 (arguments '(#:tests? #f)) ; there are none
15951 (home-page "https://github.com/intake/filesystem_spec")
15952 (synopsis "File-system specification")
15953 (description "The purpose of this package is to produce a template or
15954 specification for a file-system interface, that specific implementations
15955 should follow, so that applications making use of them can rely on a common
15956 behavior and not have to worry about the specific internal implementation
15957 decisions with any given backend.")
15958 (license license:bsd-3)))
15959
15960 (define-public python-dask
15961 (package
15962 (name "python-dask")
15963 (version "2.9.0")
15964 (source
15965 (origin
15966 (method url-fetch)
15967 (uri (pypi-uri "dask" version))
15968 (sha256
15969 (base32 "1w1hqr8vyx6ygwflj2737dcy0mmgvrc0s602gnny8pzlcbs9m76b"))))
15970 (build-system python-build-system)
15971 (arguments
15972 `(#:phases
15973 (modify-phases %standard-phases
15974 (add-after 'unpack 'disable-broken-tests
15975 (lambda _
15976 ;; This test is marked as xfail when pytest-xdist is used.
15977 (substitute* "dask/tests/test_threaded.py"
15978 (("def test_interrupt\\(\\)" m)
15979 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15980 m)))
15981 ;; This one fails with a type error:
15982 ;; TypeError: Already tz-aware, use tz_convert to convert.
15983 (substitute* "dask/dataframe/tests/test_shuffle.py"
15984 (("def test_set_index_timestamp\\(\\)" m)
15985 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15986 m)))
15987 #t))
15988 (replace 'check
15989 (lambda _ (invoke "pytest" "-vv"))))))
15990 (propagated-inputs
15991 `(("python-cloudpickle" ,python-cloudpickle)
15992 ("python-fsspec" ,python-fsspec)
15993 ("python-numpy" ,python-numpy)
15994 ("python-packaging" ,python-packaging)
15995 ("python-pandas" ,python-pandas)
15996 ("python-partd" ,python-partd)
15997 ("python-toolz" ,python-toolz)
15998 ("python-pyyaml" ,python-pyyaml)))
15999 (native-inputs
16000 `(("python-pytest" ,python-pytest)
16001 ("python-pytest-runner" ,python-pytest-runner)))
16002 (home-page "https://github.com/dask/dask/")
16003 (synopsis "Parallel computing with task scheduling")
16004 (description
16005 "Dask is a flexible parallel computing library for analytics. It
16006 consists of two components: dynamic task scheduling optimized for computation,
16007 and large data collections like parallel arrays, dataframes, and lists that
16008 extend common interfaces like NumPy, Pandas, or Python iterators to
16009 larger-than-memory or distributed environments. These parallel collections
16010 run on top of the dynamic task schedulers. ")
16011 (license license:bsd-3)))
16012
16013 (define-public python-ilinkedlist
16014 (package
16015 (name "python-ilinkedlist")
16016 (version "0.4.0")
16017 (source
16018 (origin
16019 (method url-fetch)
16020 (uri (pypi-uri "ilinkedlist" version))
16021 (sha256
16022 (base32
16023 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
16024 (build-system python-build-system)
16025 (native-inputs `(("python-pytest" ,python-pytest)))
16026 (inputs `(("python" ,python)))
16027 (home-page "https://github.com/luther9/ilinkedlist-py")
16028 (synopsis "Immutable linked list library")
16029 (description
16030 "This is a implementation of immutable linked lists for Python. It
16031 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
16032 Since a linked list is treated as immutable, it is hashable, and its length
16033 can be retrieved in constant time. Some of the terminology is inspired by
16034 LISP. It is possible to create an improper list by creating a @code{Pair}
16035 with a non-list @code{cdr}.")
16036 (license license:gpl3+)))
16037
16038 (define-public python-readlike
16039 (package
16040 (name "python-readlike")
16041 (version "0.1.3")
16042 (source
16043 (origin
16044 (method url-fetch)
16045 (uri (pypi-uri "readlike" version))
16046 (sha256
16047 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
16048 (build-system python-build-system)
16049 (home-page "https://github.com/jangler/readlike")
16050 (synopsis "GNU Readline-like line editing module")
16051 (description
16052 "This Python module provides line editing functions similar to the default
16053 Emacs-style ones of GNU Readline. Unlike the Python standard library's
16054 @code{readline} package, this one allows access to those capabilties in settings
16055 outside of a standard command-line interface. It is especially well-suited to
16056 interfacing with Urwid, due to a shared syntax for describing key inputs.
16057
16058 Currently, all stateless Readline commands are implemented. Yanking and history
16059 are not supported.")
16060 (license license:expat)))
16061
16062 (define-public python2-readlike
16063 (package-with-python2 python-readlike))
16064
16065 (define-public python-reparser
16066 (package
16067 (name "python-reparser")
16068 (version "1.4.3")
16069 (source
16070 (origin
16071 (method url-fetch)
16072 (uri (pypi-uri "ReParser" version))
16073 (sha256
16074 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
16075 (build-system python-build-system)
16076 (home-page "https://github.com/xmikos/reparser")
16077 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
16078 (description
16079 "This Python library provides a simple lexer/parser for inline markup based
16080 on regular expressions.")
16081 (license license:expat)))
16082
16083 (define-public python2-reparser
16084 (let ((reparser (package-with-python2
16085 (strip-python2-variant python-reparser))))
16086 (package (inherit reparser)
16087 (propagated-inputs
16088 `(("python2-enum34" ,python2-enum34)
16089 ,@(package-propagated-inputs reparser))))))
16090
16091 (define-public python-precis-i18n
16092 (package
16093 (name "python-precis-i18n")
16094 (version "1.0.0")
16095 (source
16096 (origin
16097 (method url-fetch)
16098 (uri (pypi-uri "precis_i18n" version))
16099 (sha256
16100 (base32
16101 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
16102 (build-system python-build-system)
16103 (home-page "https://github.com/byllyfish/precis_i18n")
16104 (synopsis "Implementation of the PRECIS framework")
16105 (description
16106 "This module implements the PRECIS Framework as described in RFC 8264,
16107 RFC 8265 and RFC 8266.")
16108 (license license:expat)))
16109
16110 (define-public python-absl-py
16111 (package
16112 (name "python-absl-py")
16113 (version "0.6.1")
16114 (source
16115 (origin
16116 (method url-fetch)
16117 (uri (pypi-uri "absl-py" version))
16118 (sha256
16119 (base32
16120 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
16121 (build-system python-build-system)
16122 (propagated-inputs
16123 `(("python-six" ,python-six)))
16124 (home-page "https://github.com/abseil/abseil-py")
16125 (synopsis "Abseil Python common libraries")
16126 (description
16127 "This package provides the Abseil Python Common Libraries, a collection
16128 of Python libraries for building Python applications.")
16129 (license license:asl2.0)))
16130
16131 (define-public python-astor
16132 (package
16133 (name "python-astor")
16134 (version "0.7.1")
16135 (source
16136 (origin
16137 (method url-fetch)
16138 (uri (pypi-uri "astor" version))
16139 (sha256
16140 (base32
16141 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
16142 (build-system python-build-system)
16143 ;; FIXME: There are two errors and two test failures.
16144 (arguments `(#:tests? #f))
16145 (home-page "https://github.com/berkerpeksag/astor")
16146 (synopsis "Read and write Python ASTs")
16147 (description "Astor is designed to allow easy manipulation of Python
16148 source via the Abstract Syntax Tree.")
16149 (license license:bsd-3)))
16150
16151 (define-public python2-astor
16152 (package-with-python2 python-astor))
16153
16154 (define-public python-grpcio
16155 (package
16156 (name "python-grpcio")
16157 (version "1.17.1")
16158 (source
16159 (origin
16160 (method url-fetch)
16161 (uri (pypi-uri "grpcio" version))
16162 (sha256
16163 (base32
16164 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
16165 (build-system python-build-system)
16166 (propagated-inputs
16167 `(("python-six" ,python-six)))
16168 (home-page "https://grpc.io")
16169 (synopsis "HTTP/2-based RPC framework")
16170 (description "This package provides a Python library for communicating
16171 with the HTTP/2-based RPC framework gRPC.")
16172 (license license:asl2.0)))
16173
16174 (define-public python-astunparse
16175 (package
16176 (name "python-astunparse")
16177 (version "1.6.2")
16178 (source
16179 (origin
16180 (method url-fetch)
16181 (uri (pypi-uri "astunparse" version))
16182 (sha256
16183 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
16184 (build-system python-build-system)
16185 (arguments '(#:tests? #f)) ; there are none
16186 (propagated-inputs
16187 `(("python-six" ,python-six)
16188 ("python-wheel" ,python-wheel)))
16189 (home-page "https://github.com/simonpercivall/astunparse")
16190 (synopsis "AST unparser for Python")
16191 (description "This package provides an AST unparser for Python. It is a
16192 factored out version of @code{unparse} found in the Python source
16193 distribution.")
16194 (license license:bsd-3)))
16195
16196 (define-public python-gast
16197 (package
16198 (name "python-gast")
16199 (version "0.2.2")
16200 (source
16201 (origin
16202 (method url-fetch)
16203 (uri (pypi-uri "gast" version))
16204 (sha256
16205 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
16206 (build-system python-build-system)
16207 (propagated-inputs
16208 `(("python-astunparse" ,python-astunparse)))
16209 (home-page "https://pypi.org/project/gast/")
16210 (synopsis "Generic Python AST that abstracts the underlying Python version")
16211 (description
16212 "GAST provides a compatibility layer between the AST of various Python
16213 versions, as produced by @code{ast.parse} from the standard @code{ast}
16214 module.")
16215 (license license:bsd-3)))
16216
16217 (define-public python-wikidata
16218 (package
16219 (name "python-wikidata")
16220 (version "0.6.1")
16221 (source
16222 (origin
16223 (method url-fetch)
16224 (uri (pypi-uri "Wikidata" version))
16225 (sha256
16226 (base32
16227 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
16228 (build-system python-build-system)
16229 (propagated-inputs
16230 `(("python-babel" ,python-babel)))
16231 (home-page "https://github.com/dahlia/wikidata")
16232 (synopsis "Wikidata client library")
16233 (description
16234 "This package provides a Python interface to
16235 @url{https://www.wikidata.org/, Wikidata}.")
16236 (properties '((upstream-name . "Wikidata")))
16237 (license license:gpl3+)))
16238
16239 (define-public python-doctest-ignore-unicode
16240 (package
16241 (name "python-doctest-ignore-unicode")
16242 (version "0.1.2")
16243 (source
16244 (origin
16245 (method url-fetch)
16246 (uri (pypi-uri "doctest-ignore-unicode" version))
16247 (sha256
16248 (base32
16249 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
16250 (build-system python-build-system)
16251 (native-inputs
16252 `(("python-nose" ,python-nose)))
16253 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
16254 (synopsis "Ignore Unicode literal prefixes in doctests")
16255 (description
16256 "This package adds support for a flag to ignore Unicode literal prefixes
16257 in doctests.")
16258 (license license:asl2.0)))
16259
16260 (define-public python-attr
16261 (package
16262 (name "python-attr")
16263 (version "0.3.1")
16264 (source
16265 (origin
16266 (method url-fetch)
16267 (uri (pypi-uri "attr" version))
16268 (sha256
16269 (base32
16270 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
16271 (build-system python-build-system)
16272 (home-page "https://github.com/denis-ryzhkov/attr")
16273 (synopsis "Decorator for attributes of target function or class")
16274 (description "Simple decorator to set attributes of target function or
16275 class in a @acronym{DRY, Don't Repeat Yourself} way.")
16276 (license license:expat)))
16277
16278 (define-public python-construct
16279 (package
16280 (name "python-construct")
16281 (version "2.9.45")
16282 (source
16283 (origin
16284 (method url-fetch)
16285 (uri (pypi-uri "construct" version))
16286 (sha256
16287 (base32
16288 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
16289 (build-system python-build-system)
16290 (arguments
16291 `(#:tests? #f)) ; No tests exist.
16292 (propagated-inputs
16293 `(("python-extras" ,python-extras)
16294 ("python-arrow" ,python-arrow)
16295 ("python-numpy" ,python-numpy)
16296 ("python-ruamel.yaml" ,python-ruamel.yaml)))
16297 (home-page "http://construct.readthedocs.io")
16298 (synopsis "Declarative and symmetrical parser and builder for binary data")
16299 (description
16300 "This package provides both simple, atomic constructs (such as
16301 integers of various sizes), as well as composite ones which allow you
16302 form hierarchical and sequential structures of increasing complexity.
16303 It features bit and byte granularity, easy debugging and testing, an
16304 easy-to-extend subclass system, and lots of primitive constructs to
16305 make your work easier.")
16306 (license license:expat)))
16307
16308 (define-public python-humanize
16309 (package
16310 (name "python-humanize")
16311 (version "0.5.1")
16312 (source
16313 (origin
16314 (method url-fetch)
16315 (uri (pypi-uri "humanize" version))
16316 (sha256
16317 (base32
16318 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
16319 (arguments
16320 '(#:tests? #f)) ; tests not in pypi archive
16321 (build-system python-build-system)
16322 (home-page "https://github.com/jmoiron/humanize")
16323 (synopsis "Print numerical information in a human-readable form")
16324 (description "This package provides a Python module that displays numbers
16325 and dates in \"human readable\" forms. For example, it would display
16326 \"12345591313\" as \"12.3 billion\".")
16327 (license license:expat)))
16328
16329 (define-public python-txaio
16330 (package
16331 (name "python-txaio")
16332 (version "18.8.1")
16333 (source
16334 (origin
16335 (method url-fetch)
16336 (uri (pypi-uri "txaio" version))
16337 (sha256
16338 (base32
16339 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
16340 (build-system python-build-system)
16341 (propagated-inputs
16342 `(("python-twisted" ,python-twisted)
16343 ("python-six" ,python-six)))
16344 (home-page "https://github.com/crossbario/txaio")
16345 (synopsis "Compatibility layer between Python asyncio and Twisted")
16346 (description "Txaio provides a compatibility layer between the Python
16347 @code{asyncio} module and @code{Twisted}.")
16348 (license license:expat)))
16349
16350 (define-public python-toolshed
16351 (package
16352 (name "python-toolshed")
16353 (version "0.4.6")
16354 (source
16355 (origin
16356 (method url-fetch)
16357 (uri (pypi-uri "toolshed" version))
16358 (sha256
16359 (base32
16360 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
16361 (build-system python-build-system)
16362 (native-inputs
16363 `(("python-nose" ,python-nose)))
16364 (home-page "https://github.com/brentp/toolshed/")
16365 (synopsis "Collection of modules and functions for working with data")
16366 (description "This is a collection of well-tested, simple modules and
16367 functions that aim to reduce boilerplate when working with data.")
16368 (license license:bsd-2)))
16369
16370 (define-public python-annoy
16371 (package
16372 (name "python-annoy")
16373 (version "1.15.1")
16374 (source
16375 (origin
16376 (method url-fetch)
16377 (uri (pypi-uri "annoy" version))
16378 (sha256
16379 (base32
16380 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
16381 (build-system python-build-system)
16382 (native-inputs
16383 `(("python-nose" ,python-nose)))
16384 (home-page "https://github.com/spotify/annoy/")
16385 (synopsis "Approximate nearest neighbors library")
16386 (description
16387 "Annoy is a C++ library with Python bindings to search for points in
16388 space that are close to a given query point. It also creates large read-only
16389 file-based data structures that are @code{mmap}ped into memory so that many
16390 processes may share the same data.")
16391 (license license:asl2.0)))
16392
16393 (define-public python-pylzma
16394 (package
16395 (name "python-pylzma")
16396 (version "0.5.0")
16397 (source
16398 (origin
16399 (method url-fetch)
16400 (uri (pypi-uri "pylzma" version))
16401 (sha256
16402 (base32
16403 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
16404 (build-system python-build-system)
16405 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
16406 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
16407 (description "This package provides Python bindings for the LZMA library
16408 by Igor Pavlov.")
16409 (license license:lgpl2.1+)))
16410
16411 (define-public python2-pylzma
16412 (package-with-python2 python-pylzma))
16413
16414 (define-public python2-zeroconf
16415 (package
16416 (name "python2-zeroconf")
16417
16418 ;; This is the last version that supports Python 2.x.
16419 (version "0.19.1")
16420 (source
16421 (origin
16422 (method url-fetch)
16423 (uri (pypi-uri "zeroconf" version))
16424 (sha256
16425 (base32
16426 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
16427 (build-system python-build-system)
16428 (arguments
16429 `(#:python ,python-2
16430 #:phases
16431 (modify-phases %standard-phases
16432 (add-after 'unpack 'patch-requires
16433 (lambda* (#:key inputs #:allow-other-keys)
16434 (substitute* "setup.py"
16435 (("enum-compat")
16436 "enum34"))
16437 #t)))))
16438 (native-inputs
16439 `(("python2-six" ,python2-six)
16440 ("python2-enum32" ,python2-enum34)
16441 ("python2-netifaces" ,python2-netifaces)
16442 ("python2-typing" ,python2-typing)))
16443 (home-page "https://github.com/jstasiak/python-zeroconf")
16444 (synopsis "Pure Python mDNS service discovery")
16445 (description
16446 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
16447 compatible).")
16448 (license license:lgpl2.1+)))
16449
16450 (define-public python-bsddb3
16451 (package
16452 (name "python-bsddb3")
16453 (version "6.2.6")
16454 (source
16455 (origin
16456 (method url-fetch)
16457 (uri (pypi-uri "bsddb3" version))
16458 (sha256
16459 (base32
16460 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
16461 (build-system python-build-system)
16462 (inputs
16463 `(("bdb" ,bdb)))
16464 (arguments
16465 '(#:phases
16466 (modify-phases %standard-phases
16467 (add-after 'unpack 'configure-locations
16468 (lambda* (#:key inputs #:allow-other-keys)
16469 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
16470 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
16471 #t))
16472 (replace 'check
16473 (lambda _
16474 (invoke "python3" "test3.py" "-v"))))))
16475 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
16476 (synopsis "Python bindings for Oracle Berkeley DB")
16477 (description
16478 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
16479 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
16480 Transaction objects, and each of these is exposed as a Python type in the
16481 bsddb3.db module. The database objects can use various access methods: btree,
16482 hash, recno, and queue. Complete support of Berkeley DB distributed
16483 transactions. Complete support for Berkeley DB Replication Manager.
16484 Complete support for Berkeley DB Base Replication. Support for RPC.")
16485 (license license:bsd-3)))
16486
16487 (define-public python-dbfread
16488 (package
16489 (name "python-dbfread")
16490 (version "2.0.7")
16491 (source (origin
16492 (method url-fetch)
16493 (uri (pypi-uri "dbfread" version))
16494 (sha256
16495 (base32
16496 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
16497 (build-system python-build-system)
16498 (native-inputs
16499 `(("python-pytest" ,python-pytest)))
16500 (home-page "https://dbfread.readthedocs.io")
16501 (synopsis "Read DBF Files with Python")
16502 (description
16503 "This library reads DBF files and returns the data as native Python data
16504 types for further processing. It is primarily intended for batch jobs and
16505 one-off scripts.")
16506 (license license:expat)))
16507
16508 (define-public python-cached-property
16509 (package
16510 (name "python-cached-property")
16511 (version "1.5.1")
16512 (source
16513 (origin
16514 (method url-fetch)
16515 (uri (pypi-uri "cached-property" version))
16516 (sha256
16517 (base32
16518 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
16519 (build-system python-build-system)
16520 (arguments
16521 `(#:phases
16522 (modify-phases %standard-phases
16523 ;; https://github.com/pydanny/cached-property/issues/131
16524 ;; recent versions of freezegun break one test
16525 (add-after 'unpack 'disable-broken-test
16526 (lambda _
16527 (substitute* "tests/test_cached_property.py"
16528 (("def test_threads_ttl_expiry\\(self\\)" m)
16529 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
16530 " " m)))
16531 #t)))))
16532 (native-inputs
16533 `(("python-freezegun" ,python-freezegun)))
16534 (home-page
16535 "https://github.com/pydanny/cached-property")
16536 (synopsis
16537 "Decorator for caching properties in classes")
16538 (description
16539 "This package provides a decorator which makes caching
16540 time-or-computationally-expensive properties quick and easy and works in Python
16541 2 or 3.")
16542 (license license:bsd-3)))
16543
16544 (define-public python-folium
16545 (package
16546 (name "python-folium")
16547 (version "0.10.0")
16548 (source
16549 (origin
16550 (method url-fetch)
16551 (uri (pypi-uri "folium" version))
16552 (sha256
16553 (base32
16554 "18fzxijsgrb95r0a8anc9ba5ijyw3nlnv3rpavfbkqa5v878x84f"))))
16555 (build-system python-build-system)
16556 (propagated-inputs
16557 `(("python-branca" ,python-branca)
16558 ("python-jinja2" ,python-jinja2)
16559 ("python-numpy" ,python-numpy)
16560 ("python-requests" ,python-requests)))
16561 (native-inputs
16562 `(("python-pytest" ,python-pytest)))
16563 (home-page "https://github.com/python-visualization/folium")
16564 (synopsis "Make beautiful maps with Leaflet.js & Python")
16565 (description "@code{folium} makes it easy to visualize data that’s been
16566 manipulated in Python on an interactive leaflet map. It enables both the
16567 binding of data to a map for @code{choropleth} visualizations as well as
16568 passing rich vector/raster/HTML visualizations as markers on the map.
16569
16570 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
16571 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
16572 supports Image, Video, GeoJSON and TopoJSON overlays.")
16573 (license license:expat)))
16574
16575 (define-public jube
16576 (package
16577 ;; This is a command-line tool, so no "python-" prefix.
16578 (name "jube")
16579 (version "2.2.2")
16580 (source (origin
16581 (method url-fetch)
16582 (uri (string-append
16583 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
16584 version))
16585 (sha256
16586 (base32
16587 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
16588 (file-name (string-append "jube-" version ".tar.gz"))))
16589 (build-system python-build-system)
16590 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
16591 (synopsis "Benchmarking environment")
16592 (description
16593 "JUBE helps perform and analyze benchmarks in a systematic way. For each
16594 benchmarked application, benchmark data is stored in a format that allows JUBE
16595 to deduct the desired information. This data can be parsed by automatic pre-
16596 and post-processing scripts that draw information and store it more densely
16597 for manual interpretation.")
16598 (license license:gpl3+)))
16599
16600 (define-public python-pyroutelib3
16601 (package
16602 (name "python-pyroutelib3")
16603 (version "1.3.post1")
16604 (source
16605 (origin
16606 (method url-fetch)
16607 (uri (pypi-uri "pyroutelib3" version))
16608 (sha256
16609 (base32
16610 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
16611 (build-system python-build-system)
16612 (propagated-inputs
16613 `(("python-dateutil" ,python-dateutil)))
16614 (home-page "https://github.com/MKuranowski/pyroutelib3")
16615 (synopsis "Library for simple routing on OSM data")
16616 (description "Library for simple routing on OSM data")
16617 (license license:gpl3+)))
16618
16619 (define-public python-elementpath
16620 (package
16621 (name "python-elementpath")
16622 (version "1.2.0")
16623 (source
16624 (origin
16625 (method url-fetch)
16626 (uri (pypi-uri "elementpath" version))
16627 (sha256
16628 (base32
16629 "1syn2z543brab23dskh3fjd9pqvz6npqbcicrs2d88dbg26xl08p"))))
16630 (build-system python-build-system)
16631 (home-page
16632 "https://github.com/sissaschool/elementpath")
16633 (synopsis
16634 "XPath 1.0/2.0 parsers and selectors for ElementTree and lxml")
16635 (description
16636 "The proposal of this package is to provide XPath 1.0 and 2.0 selectors
16637 for Python's ElementTree XML data structures, both for the standard
16638 ElementTree library and for the @uref{http://lxml.de, lxml.etree} library.
16639
16640 For lxml.etree this package can be useful for providing XPath 2.0 selectors,
16641 because lxml.etree already has it's own implementation of XPath 1.0.")
16642 (license license:expat)))
16643
16644 (define-public python-bibtexparser
16645 (package
16646 (name "python-bibtexparser")
16647 (version "1.1.0")
16648 (source
16649 (origin
16650 (method url-fetch)
16651 (uri (pypi-uri "bibtexparser" version))
16652 (sha256
16653 (base32
16654 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
16655 (build-system python-build-system)
16656 (propagated-inputs
16657 `(("python-pyparsing" ,python-pyparsing)))
16658 (native-inputs
16659 `(("python-future" ,python-future)))
16660 (home-page "https://github.com/sciunto-org/python-bibtexparser")
16661 (synopsis "Python library to parse BibTeX files")
16662 (description "BibtexParser is a Python library to parse BibTeX files.")
16663 (license (list license:bsd-3 license:lgpl3))))
16664
16665 (define-public python-distro
16666 (package
16667 (name "python-distro")
16668 (version "1.4.0")
16669 (source
16670 (origin
16671 (method url-fetch)
16672 (uri (pypi-uri "distro" version))
16673 (sha256
16674 (base32
16675 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
16676 (build-system python-build-system)
16677 (native-inputs
16678 `(("python-pytest" ,python-pytest)))
16679 (home-page "https://github.com/nir0s/distro")
16680 (synopsis
16681 "OS platform information API")
16682 (description
16683 "@code{distro} provides information about the OS distribution it runs on,
16684 such as a reliable machine-readable ID, or version information.
16685
16686 It is the recommended replacement for Python's original
16687 `platform.linux_distribution` function (which will be removed in Python 3.8).
16688 @code{distro} also provides a command-line interface to output the platform
16689 information in various formats.")
16690 (license license:asl2.0)))
16691
16692 (define-public python-cairosvg
16693 (package
16694 (name "python-cairosvg")
16695 (version "2.4.2")
16696 (source
16697 (origin
16698 (method url-fetch)
16699 (uri (pypi-uri "CairoSVG" version))
16700 (sha256
16701 (base32 "1bb7irxbaxxb9ahm3z5wsx1q96mm5gzskc7b6q07h9ikcnb8yrjf"))))
16702 (build-system python-build-system)
16703 (arguments
16704 `(#:phases
16705 (modify-phases %standard-phases
16706 (replace 'check
16707 (lambda _ (invoke "pytest"))))))
16708 (propagated-inputs
16709 `(("python-cairocffi" ,python-cairocffi)
16710 ("python-cssselect2" ,python-cssselect2)
16711 ("python-defusedxml" ,python-defusedxml)
16712 ("python-pillow" ,python-pillow)
16713 ("python-tinycss2" ,python-tinycss2)))
16714 (native-inputs
16715 `(("python-pytest-flake8" ,python-pytest-flake8)
16716 ("python-pytest-isort" ,python-pytest-isort)
16717 ("python-pytest-runner" ,python-pytest-runner)))
16718 (home-page "https://cairosvg.org/")
16719 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
16720 (description "CairoSVG is a SVG converter based on Cairo. It can export
16721 SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
16722 SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
16723 parsed, the result is drawn to a Cairo surface that can be exported to
16724 qvarious formats: PDF, PostScript, PNG and even SVG.")
16725 (license license:lgpl3+)))
16726
16727 (define-public python-pyphen
16728 (package
16729 (name "python-pyphen")
16730 (version "0.9.5")
16731 (source
16732 (origin
16733 (method url-fetch)
16734 (uri (pypi-uri "Pyphen" version))
16735 (sha256
16736 (base32 "08c9y69ry9d6m4zalhnalg86lsp9v2j5n1ziw5vxfmiihx83lqrv"))))
16737 (build-system python-build-system)
16738 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
16739 ;; embedded set provided by upstream - like Debian does.
16740 (home-page "https://github.com/Kozea/Pyphen")
16741 (synopsis "Pure Python module to hyphenate text")
16742 (description "Pyphen is a pure Python module to hyphenate text using
16743 existing Hunspell hyphenation dictionaries.")
16744 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
16745
16746 (define-public python-intelhex
16747 (package
16748 (name "python-intelhex")
16749 (version "2.2.1")
16750 (source
16751 (origin
16752 (method url-fetch)
16753 (uri (pypi-uri "intelhex" version))
16754 (sha256
16755 (base32
16756 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
16757 (build-system python-build-system)
16758 (arguments '(#:tests? #f)) ;issue with version
16759 (home-page "https://pypi.org/project/IntelHex/")
16760 (synopsis "Python library for Intel HEX files manipulations")
16761 (description "The Intel HEX file format is widely used in microprocessors
16762 and microcontrollers area (embedded systems etc.) as the de facto standard for
16763 representation of code to be programmed into microelectronic devices. This
16764 package provides an intelhex Python library to read, write, create from
16765 scratch and manipulate data from Intel HEX file format. It also includes
16766 several convenience Python scripts, including \"classic\" hex2bin and bin2hex
16767 converters and more, those based on the library itself.")
16768 (license license:bsd-3)))
16769
16770 (define-public python-pykwalify
16771 (package
16772 (name "python-pykwalify")
16773 (version "1.7.0")
16774 (source
16775 (origin
16776 (method url-fetch)
16777 (uri (pypi-uri "pykwalify" version))
16778 (sha256
16779 (base32
16780 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
16781 (build-system python-build-system)
16782 (arguments '(#:tests? #f)) ;missing dependencies
16783 (propagated-inputs
16784 `(("python-dateutil" ,python-dateutil)
16785 ("python-docopt" ,python-docopt)
16786 ("python-pyyaml" ,python-pyyaml)))
16787 (home-page "https://github.com/grokzen/pykwalify")
16788 (synopsis
16789 "Python lib/cli for JSON/YAML schema validation")
16790 (description
16791 "This package provides a parser, schema validator, and data binding tool
16792 for YAML and JSON.")
16793 (license license:expat)))
16794
16795 (define-public python-dbusmock
16796 (package
16797 (name "python-dbusmock")
16798 (version "0.18.3")
16799 (source
16800 (origin
16801 (method url-fetch)
16802 (uri (pypi-uri "python-dbusmock" version))
16803 (sha256
16804 (base32
16805 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
16806 (build-system python-build-system)
16807 (arguments
16808 '(#:phases
16809 (modify-phases %standard-phases
16810 (add-after 'unpack 'patch-shell-path
16811 (lambda _
16812 (substitute* "tests/test_code.py"
16813 (("/bin/bash") (which "bash")))
16814 #t)))))
16815 (native-inputs
16816 `(;; For tests.
16817 ("dbus" ,dbus) ; for dbus-daemon
16818 ("python-nose" ,python-nose)
16819 ("which" ,which)))
16820 (propagated-inputs
16821 `(("python-dbus" ,python-dbus)
16822 ("python-pygobject" ,python-pygobject)))
16823 (home-page "https://github.com/martinpitt/python-dbusmock")
16824 (synopsis "Python library for mock D-Bus objects")
16825 (description "python-dbusmock allows for the easy creation of mock objects on
16826 D-Bus. This is useful for writing tests for software which talks to D-Bus
16827 services such as upower, systemd, logind, gnome-session or others, and it is
16828 hard (or impossible without root privileges) to set the state of the real
16829 services to what you expect in your tests.")
16830 (license license:lgpl3+)))
16831
16832 (define-public python-ujson
16833 (package
16834 (name "python-ujson")
16835 (version "1.35")
16836 (source
16837 (origin
16838 (method url-fetch)
16839 (uri (pypi-uri "ujson" version))
16840 (sha256
16841 (base32
16842 "11jz5wi7mbgqcsz52iqhpyykiaasila4lq8cmc2d54bfa3jp6q7n"))))
16843 (build-system python-build-system)
16844 (home-page "http://www.esn.me")
16845 (synopsis
16846 "Ultra fast JSON encoder and decoder for Python")
16847 (description
16848 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
16849 bindings for Python 2.5+ and 3.")
16850 (license license:bsd-3)))
16851
16852 (define-public python2-ujson
16853 (package-with-python2 python-ujson))
16854
16855 (define-public python-iocapture
16856 ;; The latest release is more than a year older than this commit.
16857 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
16858 (revision "1"))
16859 (package
16860 (name "python-iocapture")
16861 (version "0.1.2")
16862 (source
16863 (origin
16864 (method git-fetch)
16865 (uri (git-reference
16866 (url "https://github.com/oinume/iocapture.git")
16867 (commit commit)))
16868 (file-name (git-file-name name version))
16869 (sha256
16870 (base32
16871 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
16872 (build-system python-build-system)
16873 (arguments
16874 `(#:phases
16875 (modify-phases %standard-phases
16876 (delete 'check)
16877 (add-after 'install 'check
16878 (lambda* (#:key inputs outputs #:allow-other-keys)
16879 (add-installed-pythonpath inputs outputs)
16880 (invoke "py.test" "-v" "tests")
16881 #t)))))
16882 (propagated-inputs
16883 `(("python-flexmock" ,python-flexmock)
16884 ("python-pytest" ,python-pytest)
16885 ("python-pytest-cov" ,python-pytest-cov)
16886 ("python-six" ,python-six)))
16887 (home-page "https://github.com/oinume/iocapture")
16888 (synopsis "Python capturing tool for stdout and stderr")
16889 (description
16890 "This package helps you to capture the standard out (stdout) and the
16891 standard error channel (stderr) in your program.")
16892 (license license:expat))))
16893
16894 (define-public python-argh
16895 ;; There are 21 commits since the latest release containing important
16896 ;; improvements.
16897 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
16898 (revision "1"))
16899 (package
16900 (name "python-argh")
16901 (version (git-version "0.26.2" revision commit))
16902 (source
16903 (origin
16904 (method git-fetch)
16905 (uri (git-reference
16906 (url "https://github.com/neithere/argh.git")
16907 (commit commit)))
16908 (file-name (git-file-name name version))
16909 (sha256
16910 (base32
16911 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
16912 (build-system python-build-system)
16913 (propagated-inputs
16914 `(("python-iocapture" ,python-iocapture)
16915 ("python-mock" ,python-mock)
16916 ("python-pytest" ,python-pytest)
16917 ("python-pytest-cov" ,python-pytest-cov)
16918 ("python-pytest-xdist" ,python-pytest-xdist)
16919 ("python-tox" ,python-tox)))
16920 (home-page "https://github.com/neithere/argh/")
16921 (synopsis "Argparse wrapper with natural syntax")
16922 (description
16923 "python-argh is a small library that provides several layers of
16924 abstraction on top of @code{python-argparse}. The layers can be mixed. It is
16925 always possible to declare a command with the highest possible (and least
16926 flexible) layer and then tune the behaviour with any of the lower layers
16927 including the native API of @code{python-argparse}.")
16928 (license license:lgpl3+))))
16929
16930 (define-public python-ppft
16931 (package
16932 (name "python-ppft")
16933 (version "1.6.6.1")
16934 (source
16935 (origin
16936 (method url-fetch)
16937 (uri (pypi-uri "ppft" version))
16938 (sha256
16939 (base32
16940 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
16941 (build-system python-build-system)
16942 (arguments '(#:tests? #f)) ; there are none
16943 (propagated-inputs
16944 `(("python-six" ,python-six)))
16945 (home-page "https://pypi.org/project/ppft/")
16946 (synopsis "Fork of Parallel Python")
16947 (description
16948 "This package is a fork of Parallel Python. The Parallel Python
16949 module (@code{pp}) provides an easy and efficient way to create
16950 parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
16951 computers and clusters. It features cross-platform portability and dynamic
16952 load balancing.")
16953 (license license:bsd-3)))
16954
16955 (define-public python-pox
16956 (package
16957 (name "python-pox")
16958 (version "0.2.7")
16959 (source
16960 (origin
16961 (method url-fetch)
16962 (uri (pypi-uri "pox" version))
16963 (sha256
16964 (base32
16965 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
16966 (build-system python-build-system)
16967 (arguments
16968 `(#:phases
16969 (modify-phases %standard-phases
16970 (replace 'check
16971 (lambda _
16972 (mkdir-p "/tmp/guix")
16973 (setenv "SHELL" "bash")
16974 (setenv "USERNAME" "guix")
16975 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
16976 (invoke "py.test" "-vv")
16977 #t)))))
16978 (native-inputs
16979 `(("python-pytest" ,python-pytest)
16980 ("which" ,which)))
16981 (home-page "https://pypi.org/project/pox/")
16982 (synopsis "Python utilities for filesystem exploration and automated builds")
16983 (description
16984 "Pox provides a collection of utilities for navigating and manipulating
16985 filesystems. This module is designed to facilitate some of the low level
16986 operating system interactions that are useful when exploring a filesystem on a
16987 remote host. Pox provides Python equivalents of several shell commands such
16988 as @command{which} and @command{find}. These commands allow automated
16989 discovery of what has been installed on an operating system, and where the
16990 essential tools are located.")
16991 (license license:bsd-3)))
16992
16993 (define-public python-pathos
16994 (package
16995 (name "python-pathos")
16996 (version "0.2.5")
16997 (source
16998 (origin
16999 (method url-fetch)
17000 (uri (pypi-uri "pathos" version))
17001 (sha256
17002 (base32
17003 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
17004 (build-system python-build-system)
17005 (arguments
17006 '(#:phases
17007 (modify-phases %standard-phases
17008 (replace 'check
17009 (lambda _
17010 (setenv "PYTHONPATH"
17011 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
17012 (invoke "python" "./tests/__main__.py"))))))
17013 (propagated-inputs
17014 `(("python-dill" ,python-dill)
17015 ("python-multiprocess" ,python-multiprocess)
17016 ("python-pox" ,python-pox)
17017 ("python-ppft" ,python-ppft)))
17018 (native-inputs
17019 `(("python-pytest" ,python-pytest)))
17020 (home-page "https://pypi.org/project/pathos/")
17021 (synopsis
17022 "Parallel graph management and execution in heterogeneous computing")
17023 (description
17024 "Python-pathos is a framework for heterogenous computing. It provides a
17025 consistent high-level interface for configuring and launching parallel
17026 computations across heterogenous resources. Python-pathos provides configurable
17027 launchers for parallel and distributed computing, where each launcher contains
17028 the syntactic logic to configure and launch jobs in an execution environment.")
17029 (license license:bsd-3)))
17030
17031 (define-public python-flit
17032 (package
17033 (name "python-flit")
17034 (version "2.1.0")
17035 (source
17036 (origin
17037 (method url-fetch)
17038 (uri (pypi-uri "flit" version))
17039 (sha256
17040 (base32
17041 "0h5vvmqinqzn97mr3ix7zx53af9ad4fimjjwqpx88yp8qhz4r5bc"))))
17042 (build-system python-build-system)
17043 (arguments
17044 `(#:tests? #f)) ; XXX: Check requires network access.
17045 (home-page "https://flit.readthedocs.io/")
17046 (synopsis
17047 "Simple packaging tool for simple packages")
17048 (description
17049 "Flit is a simple way to put Python packages and modules on PyPI. Flit
17050 packages a single importable module or package at a time, using the import
17051 name as the name on PyPI. All subpackages and data files within a package
17052 are included automatically.")
17053 (license license:bsd-3)))
17054
17055 (define-public python-pathtools
17056 (package
17057 (name "python-pathtools")
17058 (version "0.1.2")
17059 (source
17060 (origin
17061 (method url-fetch)
17062 (uri (pypi-uri "pathtools" version))
17063 (sha256
17064 (base32
17065 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
17066 (build-system python-build-system)
17067 (home-page
17068 "https://github.com/gorakhargosh/pathtools")
17069 (synopsis "Path utilities for Python")
17070 (description "Pattern matching and various utilities for file systems
17071 paths.")
17072 (license license:expat)))
17073
17074 (define-public python-fastentrypoints
17075 (package
17076 (name "python-fastentrypoints")
17077 (version "0.12")
17078 (source
17079 (origin
17080 (method url-fetch)
17081 (uri (pypi-uri "fastentrypoints" version))
17082 (sha256
17083 (base32
17084 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
17085 (build-system python-build-system)
17086 (home-page
17087 "https://github.com/ninjaaron/fast-entry_points")
17088 (synopsis
17089 "Makes entry_points specified in setup.py load more quickly")
17090 (description
17091 "Using entry_points in your setup.py makes scripts that start really
17092 slowly because it imports pkg_resources. This package allows such setup
17093 scripts to load entry points more quickly.")
17094 (license license:bsd-3)))
17095
17096 (define-public python-funcparserlib
17097 (package
17098 (name "python-funcparserlib")
17099 (version "0.3.6")
17100 (source
17101 (origin
17102 (method url-fetch)
17103 (uri (pypi-uri "funcparserlib" version))
17104 (sha256
17105 (base32
17106 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
17107 (native-inputs
17108 `(("python-tox" ,python-tox)))
17109 (arguments
17110 `(#:phases
17111 (modify-phases %standard-phases
17112 (replace 'check
17113 (lambda _
17114 (invoke "tox"))))))
17115 (build-system python-build-system)
17116 (home-page
17117 "https://github.com/vlasovskikh/funcparserlib")
17118 (synopsis
17119 "Recursive descent parsing library based on functional combinators")
17120 (description
17121 "This package is a recursive descent parsing library for Python based on
17122 functional combinators. Parser combinators are just higher-order functions
17123 that take parsers as their arguments and return them as result values.")
17124 (license license:expat)))