gnu: python2-unicodecsv: Don't use unstable tarball.
[jackhill/guix/guix.git] / gnu / packages / python-xyz.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
3 ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2013, 2014, 2015, 2016, 2019 Andreas Enge <andreas@enge.fr>
5 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
6 ;;; Copyright © 2014, 2017 Eric Bavier <bavier@member.fsf.org>
7 ;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch>
8 ;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com>
9 ;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu>
10 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
11 ;;; Copyright © 2015, 2016 Christopher Allan Webber <cwebber@dustycloud.org>
12 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
13 ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
14 ;;; Copyright © 2015, 2016, 2017, 2019 Leo Famulari <leo@famulari.name>
15 ;;; Copyright © 2015, 2017 Ben Woodcroft <donttrustben@gmail.com>
16 ;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
17 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
18 ;;; Copyright © 2015, 2017 Kyle Meyer <kyle@kyleam.com>
19 ;;; Copyright © 2015, 2016 Chris Marusich <cmmarusich@gmail.com>
20 ;;; Copyright © 2016 Danny Milosavljevic <dannym+a@scratchpost.org>
21 ;;; Copyright © 2016 Lukas Gradl <lgradl@openmailbox.org>
22 ;;; Copyright © 2016, 2018-2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
23 ;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
24 ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
25 ;;; Copyright © 2016, 2017 Troy Sankey <sankeytms@gmail.com>
26 ;;; Copyright © 2016, 2017 ng0 <ng0@n0.is>
27 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
28 ;;; Copyright © 2016 David Craven <david@craven.ch>
29 ;;; Copyright © 2016, 2017, 2018, 2019 Marius Bakke <mbakke@fastmail.com>
30 ;;; Copyright © 2016, 2017 Stefan Reichör <stefan@xsteve.at>
31 ;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
32 ;;; Copyright © 2016, 2017, 2019 Alex Vong <alexvong1995@gmail.com>
33 ;;; Copyright © 2016, 2017, 2018 Arun Isaac <arunisaac@systemreboot.net>
34 ;;; Copyright © 2016, 2017, 2018 Julien Lepiller <julien@lepiller.eu>
35 ;;; Copyright © 2016, 2017, 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
36 ;;; Copyright © 2016, 2017 Thomas Danckaert <post@thomasdanckaert.be>
37 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
38 ;;; Copyright © 2017 Frederick M. Muriithi <fredmanglis@gmail.com>
39 ;;; Copyright © 2017, 2018 Adriano Peluso <catonano@gmail.com>
40 ;;; Copyright © 2017 Ben Sturmfels <ben@sturm.com.au>
41 ;;; Copyright © 2017, 2018, 2019 Mathieu Othacehe <m.othacehe@gmail.com>
42 ;;; Copyright © 2017 José Miguel Sánchez García <jmi2k@openmailbox.org>
43 ;;; Copyright © 2017 Roel Janssen <roel@gnu.org>
44 ;;; Copyright © 2017, 2018, 2019 Kei Kebreau <kkebreau@posteo.net>
45 ;;; Copyright © 2017 Rutger Helling <rhelling@mykolab.com>
46 ;;; Copyright © 2017 Muriithi Frederick Muriuki <fredmanglis@gmail.com>
47 ;;; Copyright © 2017, 2019 Brendan Tildesley <mail@brendan.scot>
48 ;;; Copyright © 2018 Ethan R. Jones <ethanrjones97@gmail.com
49 ;;; Copyright © 2018 Fis Trivial <ybbs.daans@hotmail.com>
50 ;;; Copyright © 2018 Vijayalakshmi Vedantham <vijimay12@gmail.com>
51 ;;; Copyright © 2018 Mathieu Lirzin <mthl@gnu.org>
52 ;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
53 ;;; Copyright © 2016, 2018 Tomáš Čech <sleep_walker@gnu.org>
54 ;;; Copyright © 2018, 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
55 ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com>
56 ;;; Copyright © 2018, 2019 Clément Lassieur <clement@lassieur.org>
57 ;;; Copyright © 2018, 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
58 ;;; Copyright © 2018 Luther Thompson <lutheroto@gmail.com>
59 ;;; Copyright © 2018 Vagrant Cascadian <vagrant@debian.org>
60 ;;; Copyright © 2019, 2020 Brett Gilio <brettg@gnu.org>
61 ;;; Copyright © 2019 Sam <smbaines8@gmail.com>
62 ;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us>
63 ;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net>
64 ;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
65 ;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
66 ;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
67 ;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
68 ;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
69 ;;; Copyright © 2019 Tanguy Le Carrour <tanguy@bioneland.org>
70 ;;; Copyright © 2019 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de>
71 ;;;
72 ;;; This file is part of GNU Guix.
73 ;;;
74 ;;; GNU Guix is free software; you can redistribute it and/or modify it
75 ;;; under the terms of the GNU General Public License as published by
76 ;;; the Free Software Foundation; either version 3 of the License, or (at
77 ;;; your option) any later version.
78 ;;;
79 ;;; GNU Guix is distributed in the hope that it will be useful, but
80 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
81 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
82 ;;; GNU General Public License for more details.
83 ;;;
84 ;;; You should have received a copy of the GNU General Public License
85 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
86
87 (define-module (gnu packages python-xyz)
88 #:use-module ((guix licenses) #:prefix license:)
89 #:use-module (gnu packages)
90 #:use-module (gnu packages algebra)
91 #:use-module (gnu packages adns)
92 #:use-module (gnu packages attr)
93 #:use-module (gnu packages backup)
94 #:use-module (gnu packages bash)
95 #:use-module (gnu packages check)
96 #:use-module (gnu packages compression)
97 #:use-module (gnu packages crypto)
98 #:use-module (gnu packages databases)
99 #:use-module (gnu packages dbm)
100 #:use-module (gnu packages file)
101 #:use-module (gnu packages fontutils)
102 #:use-module (gnu packages gcc)
103 #:use-module (gnu packages geo)
104 #:use-module (gnu packages ghostscript)
105 #:use-module (gnu packages gl)
106 #:use-module (gnu packages glib)
107 #:use-module (gnu packages gnome)
108 #:use-module (gnu packages graphviz)
109 #:use-module (gnu packages graphics)
110 #:use-module (gnu packages gstreamer)
111 #:use-module (gnu packages gtk)
112 #:use-module (gnu packages icu4c)
113 #:use-module (gnu packages image)
114 #:use-module (gnu packages imagemagick)
115 #:use-module (gnu packages libevent)
116 #:use-module (gnu packages libffi)
117 #:use-module (gnu packages linux)
118 #:use-module (gnu packages llvm)
119 #:use-module (gnu packages man)
120 #:use-module (gnu packages maths)
121 #:use-module (gnu packages monitoring)
122 #:use-module (gnu packages multiprecision)
123 #:use-module (gnu packages networking)
124 #:use-module (gnu packages ncurses)
125 #:use-module (gnu packages openstack)
126 #:use-module (gnu packages pcre)
127 #:use-module (gnu packages perl)
128 #:use-module (gnu packages pkg-config)
129 #:use-module (gnu packages python)
130 #:use-module (gnu packages python-check)
131 #:use-module (gnu packages python-compression)
132 #:use-module (gnu packages python-crypto)
133 #:use-module (gnu packages python-science)
134 #:use-module (gnu packages python-web)
135 #:use-module (gnu packages qt)
136 #:use-module (gnu packages readline)
137 #:use-module (gnu packages sdl)
138 #:use-module (gnu packages search)
139 #:use-module (gnu packages shells)
140 #:use-module (gnu packages sphinx)
141 #:use-module (gnu packages ssh)
142 #:use-module (gnu packages terminals)
143 #:use-module (gnu packages tex)
144 #:use-module (gnu packages texinfo)
145 #:use-module (gnu packages time)
146 #:use-module (gnu packages tls)
147 #:use-module (gnu packages version-control)
148 #:use-module (gnu packages video)
149 #:use-module (gnu packages web)
150 #:use-module (gnu packages base)
151 #:use-module (gnu packages xml)
152 #:use-module (gnu packages xorg)
153 #:use-module (gnu packages xdisorg)
154 #:use-module (gnu packages tcl)
155 #:use-module (gnu packages bdw-gc)
156 #:use-module (gnu packages serialization)
157 #:use-module (guix packages)
158 #:use-module (guix download)
159 #:use-module (guix git-download)
160 #:use-module (guix hg-download)
161 #:use-module (guix utils)
162 #:use-module (guix build-system gnu)
163 #:use-module (guix build-system cmake)
164 #:use-module (guix build-system python)
165 #:use-module (guix build-system trivial)
166 #:use-module (srfi srfi-1)
167 #:use-module (srfi srfi-26))
168
169 (define-public python-psutil
170 (package
171 (name "python-psutil")
172 (version "5.6.5")
173 (source
174 (origin
175 (method url-fetch)
176 (uri (pypi-uri "psutil" version))
177 (sha256
178 (base32 "0isil5jxwwd8awz54qk28rpgjg43i5l6yl70g40vxwa4r4m56lfh"))))
179 (build-system python-build-system)
180 (arguments
181 ;; FIXME: some tests does not return and times out.
182 '(#:tests? #f))
183 (home-page "https://www.github.com/giampaolo/psutil")
184 (synopsis "Library for retrieving information on running processes")
185 (description
186 "psutil (Python system and process utilities) is a library for retrieving
187 information on running processes and system utilization (CPU, memory, disks,
188 network) in Python. It is useful mainly for system monitoring, profiling and
189 limiting process resources and management of running processes. It implements
190 many functionalities offered by command line tools such as: ps, top, lsof,
191 netstat, ifconfig, who, df, kill, free, nice, ionice, iostat, iotop, uptime,
192 pidof, tty, taskset, pmap.")
193 (properties `((python2-variant . ,(delay python2-psutil))))
194 (license license:bsd-3)))
195
196 (define-public python2-psutil
197 (let ((base (package-with-python2 (strip-python2-variant python-psutil))))
198 (package
199 (inherit base)
200 (propagated-inputs
201 `(("python2-enum34" ,python2-enum34) ;optional
202 ,@(package-propagated-inputs base))))))
203
204 (define-public python-shapely
205 (package
206 (name "python-shapely")
207 (version "1.6.4.post2")
208 (source
209 (origin
210 (method url-fetch)
211 (uri (pypi-uri "Shapely" version))
212 (sha256
213 (base32
214 "03r42fmd9alp6r3q95ad6rldq2f7n1wimrw53zy5kpn33yv7pf64"))))
215 (build-system python-build-system)
216 (native-inputs
217 `(("python-cython" ,python-cython)
218 ("python-matplotlib" ,python-matplotlib)
219 ("python-pytest" ,python-pytest)
220 ("python-pytest-cov" ,python-pytest-cov)))
221 (inputs
222 `(("geos" ,geos)))
223 (propagated-inputs
224 `(("python-numpy" ,python-numpy)))
225 (arguments
226 `(#:phases
227 (modify-phases %standard-phases
228 (add-after 'unpack 'patch-geos-path
229 (lambda* (#:key inputs #:allow-other-keys)
230 (let ((geos (assoc-ref inputs "geos"))
231 (glibc (assoc-ref inputs ,(if (%current-target-system)
232 "cross-libc" "libc"))))
233 (substitute* "shapely/geos.py"
234 (("_lgeos = load_dll\\('geos_c', fallbacks=.*\\)")
235 (string-append "_lgeos = load_dll('geos_c', fallbacks=['"
236 geos "/lib/libgeos_c.so'])"))
237 (("free = load_dll\\('c'\\)\\.free")
238 (string-append "free = load_dll('c', fallbacks=['"
239 glibc "/lib/libc.so.6']).free"))))
240 #t)))))
241 (home-page "https://github.com/Toblerity/Shapely")
242 (synopsis "Library for the manipulation and analysis of geometric objects")
243 (description "Shapely is a Python package for manipulation and analysis of
244 planar geometric objects. It is based on the @code{GEOS} library.")
245 (license license:bsd-3)))
246
247 (define-public python-shortuuid
248 (package
249 (name "python-shortuuid")
250 (version "0.5.0")
251 (source
252 (origin
253 (method url-fetch)
254 (uri (pypi-uri "shortuuid" version))
255 (sha256
256 (base32
257 "1f8i4zwj5vmpzbz6b17bljy4399gx5aq7vsyw63sz2qgyjcd73yh"))))
258 (build-system python-build-system)
259 (native-inputs
260 `(("python-pep8" ,python-pep8)))
261 (home-page "https://github.com/skorokithakis/shortuuid")
262 (synopsis "Generator library for concise, unambiguous and URL-safe UUIDs")
263 (description
264 "@code{shortuuid} is a Python library for generating concise, unambiguous
265 and URL-safe UUIDs. UUIDs are generated using the built-in Python @code{uuid}
266 module and then similar looking characters are removed.")
267 (license license:bsd-3)))
268
269 (define-public python-logwrap
270 (package
271 (name "python-logwrap")
272 (version "3.2.1")
273 (source
274 (origin
275 (method url-fetch)
276 (uri (pypi-uri "logwrap" version ".zip"))
277 (sha256
278 (base32
279 "1d2k0hvpbi51vl410y8fbs5m0nxnlh2k7gr2nrh3k81ibhzscsra"))))
280 (build-system python-build-system)
281 (propagated-inputs
282 `(("python-six" ,python-six)
283 ("python-typing" ,python-typing)))
284 (native-inputs
285 `(("unzip" ,unzip)
286 ("python-cython" ,python-cython)
287 ("python-pytest" ,python-pytest)
288 ("python-pytest-cov" ,python-pytest-cov)
289 ("python-pytest-runner" ,python-pytest-runner)))
290 (home-page "https://github.com/penguinolog/logwrap")
291 (synopsis "Decorator for logging function arguments")
292 (description "This package provides a decorator to log function arguments
293 and function call return values in a human-readable way.")
294 (license license:asl2.0)))
295
296 (define-public python2-shapely
297 (package-with-python2 python-shapely))
298
299 (define-public python-clyent
300 (package
301 (name "python-clyent")
302 (version "1.2.1")
303 (source
304 (origin
305 (method url-fetch)
306 (uri (pypi-uri "clyent" version))
307 (sha256
308 (base32
309 "1r9987qmy1pz3hq54160bapqsywpq14waw4w9x3ly8hmq7kpgfbj"))))
310 (build-system python-build-system)
311 (native-inputs
312 `(("python-mock" ,python-mock)))
313 (home-page "https://github.com/binstar/clyent")
314 (synopsis "Command line client library")
315 (description "Clyent is a Python command line utiliy library. It is used
316 by @code{binstar}, @code{binstar-build} and @code{chalmers}.")
317 (license license:bsd-3)))
318
319 (define-public python2-clyent
320 (package-with-python2 python-clyent))
321
322 (define-public python-babel
323 (package
324 (name "python-babel")
325 (version "2.7.0")
326 (source
327 (origin
328 (method url-fetch)
329 (uri (pypi-uri "Babel" version))
330 (sha256
331 (base32
332 "0a7wawx8vsg7igvz6p3x909fskhg4b2y1910xk4f4c8y22p3aqg8"))))
333 (build-system python-build-system)
334 (native-inputs
335 `(("python-freezegun" ,python-freezegun)
336 ("python-pytest" ,python-pytest)))
337 (propagated-inputs
338 `(("python-pytz" ,python-pytz)))
339 (arguments
340 `(#:phases (modify-phases %standard-phases
341 (replace 'check
342 (lambda _
343 (invoke "pytest" "-vv" "-k"
344 (string-append
345 ;; XXX: These tests fail when using Pytest 4.x and
346 ;; Babel 2.6.0. Try removing this for later versions.
347 "not test_no_inherit_metazone_marker_never_in_output"
348 " and not test_smoke_dates"
349 " and not test_smoke_numbers")))))))
350 (home-page "http://babel.pocoo.org/")
351 (synopsis
352 "Tools for internationalizing Python applications")
353 (description
354 "Babel is composed of two major parts:
355 - tools to build and work with gettext message catalogs
356 - a Python interface to the CLDR (Common Locale Data Repository), providing
357 access to various locale display names, localized number and date formatting,
358 etc. ")
359 (license license:bsd-3)))
360
361 (define-public python2-babel
362 (package-with-python2 python-babel))
363
364 ;; Sphinx < 2.0 requires this version. Remove once no longer needed.
365 (define-public python2-babel-2.6
366 (package
367 (inherit python2-babel)
368 (version "2.6.0")
369 (source (origin
370 (method url-fetch)
371 (uri (pypi-uri "Babel" version))
372 (sha256
373 (base32
374 "08rxmbx2s4irp0w0gmn498vns5xy0fagm0fg33xa772jiks51flc"))))))
375
376 (define-public python2-backport-ssl-match-hostname
377 (package
378 (name "python2-backport-ssl-match-hostname")
379 (version "3.5.0.1")
380 (source
381 (origin
382 (method url-fetch)
383 (uri (pypi-uri "backports.ssl_match_hostname" version))
384 (sha256
385 (base32
386 "1wndipik52cyqy0677zdgp90i435pmvwd89cz98lm7ri0y3xjajh"))))
387 (build-system python-build-system)
388 (arguments
389 `(#:python ,python-2
390 #:tests? #f)) ; no test target
391 (home-page "https://bitbucket.org/brandon/backports.ssl_match_hostname")
392 (synopsis "Backport of ssl.match_hostname() function from Python 3.5")
393 (description
394 "This backport brings the ssl.match_hostname() function to users of
395 earlier versions of Python. The function checks the hostname in the
396 certificate returned by the server to which a connection has been established,
397 and verifies that it matches the intended target hostname.")
398 (license license:psfl)))
399
400 (define-public python-boolean.py
401 (package
402 (name "python-boolean.py")
403 (version "3.6")
404 (source
405 (origin
406 ;; There's no source tarball on PyPI.
407 (method git-fetch)
408 (uri (git-reference
409 (url "https://github.com/bastikr/boolean.py")
410 (commit (string-append "v" version))))
411 (file-name (git-file-name name version))
412 (sha256
413 (base32 "1wc89y73va58cj7dsx6c199zpxsy9q53dsffsdj6zmc90inqz6qs"))))
414 (build-system python-build-system)
415 (home-page "https://github.com/bastikr/boolean.py")
416 (synopsis "Boolean algebra in one Python module")
417 (description
418 "This is a small Python library that implements boolean algebra.
419 It defines two base elements, @code{TRUE} and @code{FALSE}, and a
420 @code{Symbol} class that can take on one of these two values. Calculations
421 are done only in terms of @code{AND}, @code{OR}, and @code{NOT}---other
422 compositions like @code{XOR} and @code{NAND} are emulated on top of them.
423 Expressions are constructed from parsed strings or directly in Python.")
424 (license license:bsd-2)))
425
426 (define-public python-hdf4
427 (package
428 (name "python-hdf4")
429 (version "0.9")
430 (source
431 (origin
432 (method url-fetch)
433 (uri (pypi-uri name version))
434 (sha256
435 (base32
436 "1hjiyrxvxk9817qyqky3nar4y3fs4z8wxz0n884zzb5wi6skrjks"))))
437 (build-system python-build-system)
438 (native-inputs `(("nose" ,python-nose)))
439 (propagated-inputs `(("numpy" ,python-numpy)))
440 (inputs
441 `(("hdf4" ,hdf4)
442 ("libjpeg" ,libjpeg)
443 ("zlib" ,zlib)))
444 (arguments
445 `(#:phases
446 (modify-phases %standard-phases
447 (replace 'check
448 (lambda _
449 ;; The 'runexamples' script sets PYTHONPATH to CWD, then goes
450 ;; on to import numpy. Somehow this works on their CI system.
451 ;; Let's just manage PYTHONPATH here instead.
452 (substitute* "runexamples.sh"
453 (("export PYTHONPATH=.*") ""))
454 (setenv "PYTHONPATH"
455 (string-append (getcwd) ":"
456 (getenv "PYTHONPATH")))
457 (invoke "./runexamples.sh")
458 (invoke "nosetests" "-v"))))))
459 (home-page "https://github.com/fhs/python-hdf4")
460 (synopsis "Python interface to the NCSA HDF4 library")
461 (description
462 "Python-HDF4 is a python wrapper around the NCSA HDF version 4 library,
463 which implements the SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API’s.
464 NetCDF files can also be read and modified. Python-HDF4 is a fork of
465 @url{http://hdfeos.org/software/pyhdf.php,pyhdf}.")
466 (license license:expat)))
467
468 (define-public python2-hdf4
469 (package-with-python2 python-hdf4))
470
471 (define-public python-h5py
472 (package
473 (name "python-h5py")
474 (version "2.8.0")
475 (source
476 (origin
477 (method url-fetch)
478 (uri (pypi-uri "h5py" version))
479 (sha256
480 (base32
481 "0mdr6wrq02ac93m1aqx9kad0ppfzmm4imlxqgyy1x4l7hmdcc9p6"))))
482 (build-system python-build-system)
483 (arguments
484 `(#:tests? #f ; no test target
485 #:phases
486 (modify-phases %standard-phases
487 (add-after 'unpack 'fix-hdf5-paths
488 (lambda* (#:key inputs #:allow-other-keys)
489 (let ((prefix (assoc-ref inputs "hdf5")))
490 (substitute* "setup_build.py"
491 (("\\['/opt/local/lib', '/usr/local/lib'\\]")
492 (string-append "['" prefix "/lib" "']"))
493 (("'/opt/local/include', '/usr/local/include'")
494 (string-append "'" prefix "/include" "'")))
495 (substitute* "setup_configure.py"
496 (("\\['/usr/local/lib', '/opt/local/lib'\\]")
497 (string-append "['" prefix "/lib" "']")))
498 #t))))))
499 (propagated-inputs
500 `(("python-six" ,python-six)
501 ("python-numpy" ,python-numpy)))
502 (inputs
503 `(("hdf5" ,hdf5)))
504 (native-inputs
505 `(("python-cython" ,python-cython)
506 ("python-pkgconfig" ,python-pkgconfig)))
507 (home-page "http://www.h5py.org/")
508 (synopsis "Read and write HDF5 files from Python")
509 (description
510 "The h5py package provides both a high- and low-level interface to the
511 HDF5 library from Python. The low-level interface is intended to be a
512 complete wrapping of the HDF5 API, while the high-level component supports
513 access to HDF5 files, datasets and groups using established Python and NumPy
514 concepts.")
515 (license license:bsd-3)))
516
517 (define-public python2-h5py
518 (package-with-python2 python-h5py))
519
520 (define-public python-sh
521 (package
522 (name "python-sh")
523 (version "1.12.14")
524 (source
525 (origin
526 (method url-fetch)
527 (uri (pypi-uri "sh" version))
528 (sha256
529 (base32
530 "1z2hx357xp3v4cv44xmqp7lli3frndqpyfmpbxf7n76h7s1zaaxm"))))
531 (build-system python-build-system)
532 (arguments
533 '(#:phases
534 (modify-phases %standard-phases
535 (replace 'check
536 (lambda _
537 ;; XXX: A Python 2 test fails when HOME=/homeless-shelter.
538 (setenv "HOME" "/tmp")
539 (invoke "python" "sh.py" "test"))))))
540 (native-inputs
541 `(("python-coverage" ,python-coverage)))
542 (home-page "https://github.com/amoffat/sh")
543 (synopsis "Python subprocess replacement")
544 (description "This package provides a replacement for Python's
545 @code{subprocess} feature.")
546 (license license:expat)))
547
548 (define-public python2-sh
549 (package-with-python2 python-sh))
550
551 (define-public python-cftime
552 (package
553 (name "python-cftime")
554 (version "1.0.4.2")
555 (source
556 (origin
557 (method url-fetch)
558 (uri (pypi-uri "cftime" version))
559 (sha256
560 (base32 "0w0gi6jnch38hiygl62j4xkcirv4y3dcwrvxl9p7bsk6j27lzihs"))))
561 (build-system python-build-system)
562 (propagated-inputs
563 `(("python-numpy" ,python-numpy)))
564 (native-inputs
565 `(("python-coveralls" ,python-coveralls)
566 ("python-cython" ,python-cython)
567 ("python-pytest-cov" ,python-pytest-cov)))
568 (home-page "https://github.com/Unidata/cftime")
569 (synopsis "Library for time handling")
570 (description
571 "This package provides time-handling functionality that used to be part
572 of the netcdf4 package before.")
573 ;; This package claims to include code under the GPLv3 but is released
574 ;; under ISC.
575 (license (list license:isc license:gpl3+))))
576
577 (define-public python-netcdf4
578 (package
579 (name "python-netcdf4")
580 (version "1.4.2")
581 (source
582 (origin
583 (method url-fetch)
584 (uri (pypi-uri "netCDF4" version))
585 (sha256
586 (base32
587 "0c0sklgrmv15ygliin8qq0hp7vanmbi74m6zpi0r1ksr0hssyd5r"))))
588 (build-system python-build-system)
589 (arguments
590 '(#:phases
591 (modify-phases %standard-phases
592 (add-after 'unpack 'configure-locations
593 (lambda* (#:key inputs #:allow-other-keys)
594 (setenv "HDF5_DIR" (assoc-ref inputs "hdf5"))
595 #t)))))
596 (native-inputs
597 `(("python-cython" ,python-cython)))
598 (propagated-inputs
599 `(("python-numpy" ,python-numpy)
600 ("python-cftime" ,python-cftime)))
601 (inputs
602 `(("netcdf" ,netcdf)
603 ("hdf4" ,hdf4)
604 ("hdf5" ,hdf5)))
605 (home-page "https://github.com/Unidata/netcdf4-python")
606 (synopsis "Python/numpy interface to the netCDF library")
607 (description "Netcdf4-python is a Python interface to the netCDF C
608 library. netCDF version 4 has many features not found in earlier
609 versions of the library and is implemented on top of HDF5. This module
610 can read and write files in both the new netCDF 4 and the old netCDF 3
611 format, and can create files that are readable by HDF5 clients. The
612 API is modelled after @code{Scientific.IO.NetCDF}, and should be familiar
613 to users of that module.")
614 ;; The software is mainly ISC, but includes some files covered
615 ;; by the Expat license.
616 (license (list license:isc license:expat))))
617
618 (define-public python2-netcdf4
619 (package-with-python2 python-netcdf4))
620
621 (define-public python-license-expression
622 (package
623 (name "python-license-expression")
624 (version "0.999")
625 (source
626 (origin
627 (method url-fetch)
628 (uri (pypi-uri "license-expression" version))
629 (sha256
630 (base32 "08ppb0bxbrsxazy88sgpl9yffvdsabw6dkk1nc332wcz2mphwwyf"))))
631 (build-system python-build-system)
632 (propagated-inputs
633 `(("python-boolean.py" ,python-boolean.py)))
634 (home-page "https://github.com/nexB/license-expression")
635 (synopsis "Apply boolean logic to license expressions")
636 (description
637 "This Python module defines a tiny language to evaluate and compare
638 license expressions using boolean logic. Logical combinations of licenses can
639 be tested for equality, containment, and equivalence. They can be normalised
640 and simplified. It supports SPDX license expressions as well as other naming
641 conventions and aliases in the same expression.")
642 (license license:gpl2+)))
643
644 (define-public python-lockfile
645 (package
646 (name "python-lockfile")
647 (version "0.12.2")
648 (source
649 (origin
650 (method url-fetch)
651 (uri (pypi-uri "lockfile" version))
652 (sha256
653 (base32
654 "16gpx5hm73ah5n1079ng0vy381hl802v606npkx4x8nb0gg05vba"))))
655 (build-system python-build-system)
656 (arguments '(#:test-target "check"))
657 (native-inputs
658 `(("python-pbr" ,python-pbr)))
659 (home-page "https://launchpad.net/pylockfile")
660 (synopsis "Platform-independent file locking module")
661 (description
662 "The lockfile package exports a LockFile class which provides a simple
663 API for locking files.")
664 (license license:expat)))
665
666 (define-public python2-lockfile
667 (package-with-python2 python-lockfile))
668
669 (define-public python-semantic-version
670 (package
671 (name "python-semantic-version")
672 (version "2.6.0")
673 (source
674 (origin
675 (method url-fetch)
676 (uri (pypi-uri "semantic_version" version))
677 (sha256
678 (base32
679 "1h2l9xyg1zzsda6kjcmfcgycbvrafwci283vcr1v5sbk01l2hhra"))))
680 (build-system python-build-system)
681 (arguments
682 `(#:tests? #f)) ; PyPI tarball lacks tests
683 (home-page "https://github.com/rbarrois/python-semanticversion")
684 (synopsis "Semantic versioning module for Python")
685 (description
686 "The @code{semantic_version} class is a small library for handling
687 @uref{https://semver.org/, semantic versioning} (@dfn{SemVer}) in Python.
688
689 It can compare versions, generate a new version that represents a bump in one of
690 the version levels, and check whether any given string is a proper semantic
691 version identifier.")
692 (license license:bsd-3)))
693
694 (define-public python2-semantic-version
695 (package-with-python2 python-semantic-version))
696
697 (define-public python-serpent
698 (package
699 (name "python-serpent")
700 (version "1.28")
701 (source
702 (origin
703 (method url-fetch)
704 (uri (pypi-uri "serpent" version))
705 (sha256
706 (base32 "1arnckykpkvv2qrp49l1k7q5mr5pisswl0rvdx98x8wsl1n361pk"))))
707 (build-system python-build-system)
708 (native-inputs
709 `(("python-attrs" ,python-attrs)
710 ("python-pytz" ,python-pytz)))
711 (home-page "https://github.com/irmen/Serpent")
712 (synopsis "Serializer for literal Python expressions")
713 (description
714 "Serpent provides @code{ast.literal_eval()}-compatible object tree
715 serialization. It serializes an object tree into bytes (an utf-8 encoded
716 string) that can be decoded and then passed as-is to @code{ast.literal_eval()}
717 to rebuild the original object tree.
718
719 Because only safe literals are encoded, it is safe to send serpent data to
720 other machines, such as over the network.")
721 (license license:expat)))
722
723 (define-public python-setuptools
724 (package
725 (name "python-setuptools")
726 (version "41.0.1")
727 (source
728 (origin
729 (method url-fetch)
730 (uri (pypi-uri "setuptools" version ".zip"))
731 (sha256
732 (base32
733 "04sns22y2hhsrwfy1mha2lgslvpjsjsz8xws7h2rh5a7ylkd28m2"))
734 (modules '((guix build utils)))
735 (snippet
736 '(begin
737 ;; Remove included binaries which are used to build self-extracting
738 ;; installers for Windows.
739 ;; TODO: Find some way to build them ourself so we can include them.
740 (for-each delete-file (find-files "setuptools" "^(cli|gui).*\\.exe$"))
741 #t))))
742 (build-system python-build-system)
743 ;; FIXME: Tests require pytest, which itself relies on setuptools.
744 ;; One could bootstrap with an internal untested setuptools.
745 (arguments
746 `(#:tests? #f))
747 (home-page "https://pypi.python.org/pypi/setuptools")
748 (synopsis
749 "Library designed to facilitate packaging Python projects")
750 (description
751 "Setuptools is a fully-featured, stable library designed to facilitate
752 packaging Python projects, where packaging includes:
753 Python package and module definitions,
754 distribution package metadata,
755 test hooks,
756 project installation,
757 platform-specific details,
758 Python 3 support.")
759 ;; TODO: setuptools now bundles the following libraries:
760 ;; packaging, pyparsing, six and appdirs. How to unbundle?
761 (license (list license:psfl ; setuptools itself
762 license:expat ; six, appdirs, pyparsing
763 license:asl2.0 ; packaging is dual ASL2/BSD-2
764 license:bsd-2))))
765
766 (define-public python2-setuptools
767 (package-with-python2 python-setuptools))
768
769 ;; The setuptools provided by Python 3.7.4 is too new for Tensorflow.
770 (define-public python-setuptools-for-tensorflow
771 (hidden-package
772 (package
773 (inherit python-setuptools)
774 (version "39.1.0")
775 (source (origin
776 (inherit (package-source python-setuptools))
777 (uri (pypi-uri "setuptools" version ".zip"))
778 (sha256
779 (base32
780 "1mzdhvfhnv4lggxa8rjl0dzqxvfx377gg5sqs57v89wrp09lwj65")))))))
781
782 (define-public python-uniseg
783 (package
784 (name "python-uniseg")
785 (version "0.7.1")
786 (source
787 (origin
788 (method url-fetch)
789 (uri (pypi-uri "uniseg" version ".zip"))
790 (sha256
791 (base32
792 "05jsazvz6nbmh6l3v1rph5ydkqn1hzx1pyggdyvgp2qgmgrnmiz2"))))
793 (build-system python-build-system)
794 (arguments
795 '(#:tests? #f)) ; The test suite requires network access.
796 (native-inputs
797 `(("unzip" ,unzip)))
798 (home-page
799 "https://bitbucket.org/emptypage/uniseg-python")
800 (synopsis
801 "Python library to determine Unicode text segmentations")
802 (description
803 "Uniseg is a Python package used to determine Unicode text segmentations.
804 Supported segmentations include:
805 @enumerate
806 @item @dfn{Code point} (any value in the Unicode codespace)
807 @item @dfn{Grapheme cluster} (user-perceived character made of a single or
808 multiple Unicode code points, e.g. \"G\" + acute-accent)
809 @item Word break
810 @item Sentence break
811 @item Line break
812 @end enumerate")
813 (license license:expat)))
814
815 (define-public python2-uniseg
816 (package-with-python2 python-uniseg))
817
818 (define-public python-humanfriendly
819 (package
820 (name "python-humanfriendly")
821 (version "4.4.1")
822 (source
823 (origin
824 (method url-fetch)
825 (uri (pypi-uri "humanfriendly" version))
826 (sha256
827 (base32
828 "0pisgizjql86785jchfjv217g0lsgk114g2lja5j4y3lsc3b9szi"))))
829 (build-system python-build-system)
830 (arguments
831 `(;; XXX: Tests depend on coloredlogs, which in turn depends on humanfriendly.
832 #:tests? #f))
833 (propagated-inputs
834 `(("python-monotonic" ,python-monotonic)))
835 (home-page "https://humanfriendly.readthedocs.io")
836 (synopsis "Human-friendly input and output in Python")
837 (description
838 "The functions and classes in @code{humanfriendly} can be used to make
839 text interfaces more user-friendly. It includes tools to parse and format
840 numbers, file sizes, and timespans, timers for long-running operations, menus
841 to allow the user to choose from a list of options, and terminal interaction
842 helpers.")
843 (license license:expat)))
844
845 (define-public python2-humanfriendly
846 (package-with-python2 python-humanfriendly))
847
848 (define-public python-capturer
849 (package
850 (name "python-capturer")
851 (version "2.4")
852 (source
853 (origin
854 (method url-fetch)
855 (uri (pypi-uri "capturer" version))
856 (sha256
857 (base32
858 "05d6ji4j8ipiq0br7bwam38qc6hd9l1djmfxlzrxx19ziyjl4089"))))
859 (build-system python-build-system)
860 (arguments
861 `(#:tests? #f))
862 (propagated-inputs
863 `(("python-humanfriendly" ,python-humanfriendly)))
864 (home-page "https://capturer.readthedocs.io")
865 (synopsis "Capture stdout and stderr streams of the current process")
866 (description
867 "The capturer package makes it easy to capture the stdout and stderr
868 streams of the current process and subprocesses. Output can be relayed
869 to the terminal in real time but is also available to the Python program
870 for additional processing.")
871 (license license:expat)))
872
873 (define-public python2-capturer
874 (package-with-python2 python-capturer))
875
876 (define-public python-case
877 (package
878 (name "python-case")
879 (version "1.5.3")
880 (source
881 (origin
882 (method url-fetch)
883 (uri (pypi-uri "case" version))
884 (sha256
885 (base32
886 "1cagg06vfph864s6l5jb0zqliwxh647bki8j6lf4a4qrv40jnhs8"))))
887 (build-system python-build-system)
888 (propagated-inputs
889 `(("python-mock" ,python-mock)
890 ("python-nose" ,python-nose)
891 ("python-six" ,python-six)
892 ("python-unittest2" ,python-unittest2)))
893 (native-inputs
894 `(("python-coverage" ,python-coverage)))
895 (home-page "https://github.com/celery/case")
896 (synopsis "Unittest utilities and convenience methods")
897 (description
898 "The @code{case} package provides utilities on top of unittest, including
899 some helpful Python 2 compatibility convenience methods.")
900 (license license:bsd-3)))
901
902 (define-public python-verboselogs
903 (package
904 (name "python-verboselogs")
905 (version "1.7")
906 (source
907 (origin
908 (method url-fetch)
909 (uri (pypi-uri "verboselogs" version))
910 (sha256
911 (base32
912 "09z4d1jiasn7k1hs5af2ckmnrd0i1d1m04bhfjhv7z6svzfdwgg3"))))
913 (build-system python-build-system)
914 (arguments
915 `(#:phases
916 (modify-phases %standard-phases
917 (replace 'check
918 (lambda _
919 ;; Do not run pylint plugin test, as astroid is an old
920 ;; unsupported version.
921 (invoke "pytest" "-v" "-k" "not test_pylint_plugin"
922 "verboselogs/tests.py"))))))
923 (native-inputs
924 `(("python-mock" ,python-mock)
925 ("python-pytest" ,python-pytest)))
926 (home-page "https://verboselogs.readthedocs.io")
927 (synopsis "Verbose logging level for Python's logging module")
928 (description
929 "The @code{verboselogs} package extends Python's @code{logging} module to
930 add the log levels NOTICE, SPAM, SUCCESS and VERBOSE.")
931 (license license:expat)))
932
933 (define-public python2-verboselogs
934 (package-with-python2 python-verboselogs))
935
936 (define-public python-coloredlogs
937 (package
938 (name "python-coloredlogs")
939 (version "10.0")
940 (source
941 (origin
942 (method url-fetch)
943 (uri (pypi-uri "coloredlogs" version))
944 (sha256
945 (base32
946 "0dkw6xp0r1dwgz4s2f58npx5nxfq51wf4l6qkm5ib27slgfs4sdq"))))
947 (build-system python-build-system)
948 (arguments
949 `(;Tests require some updated modules
950 #:tests? #f))
951 (propagated-inputs
952 `(("python-capturer" ,python-capturer)))
953 (home-page "https://coloredlogs.readthedocs.io")
954 (synopsis "Colored stream handler for Python's logging module")
955 (description
956 "The @code{coloredlogs} package enables colored terminal output for
957 Python's logging module. The @code{ColoredFormatter} class inherits from
958 @code{logging.Formatter} and uses ANSI escape sequences to render your logging
959 messages in color.")
960 (license license:expat)))
961
962 (define-public python2-coloredlogs
963 (package-with-python2 python-coloredlogs))
964
965 (define-public python-editorconfig
966 (package
967 (name "python-editorconfig")
968 (version "0.12.2")
969 (source
970 (origin
971 (method url-fetch)
972 (uri (pypi-uri "EditorConfig" version))
973 (sha256
974 (base32
975 "0v55z351p9qkyp3bbspwywwn28sbcknhirngjbj779n3z52z63hv"))))
976 (build-system python-build-system)
977 (home-page "https://editorconfig.org/")
978 (synopsis "EditorConfig bindings for python")
979 (description "The EditorConfig project consists of a file format for
980 defining coding styles and a collection of text editor plugins that enable
981 editors to read the file format and adhere to defined styles. EditorConfig
982 files are easily readable and they work nicely with version control systems.")
983 ;; "fnmatch.py" and "ini.py" are licensed under psfl, the rest is bsd-2.
984 (license (list license:bsd-2 license:psfl))))
985
986 (define-public python-et-xmlfile
987 (package
988 (name "python-et-xmlfile")
989 (version "1.0.1")
990 (source
991 (origin
992 (method url-fetch)
993 (uri (pypi-uri "et_xmlfile" version))
994 (sha256
995 (base32
996 "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1"))))
997 (build-system python-build-system)
998 (arguments
999 `(#:phases (modify-phases %standard-phases
1000 (replace 'check
1001 (lambda _
1002 (invoke "pytest"))))))
1003 (native-inputs
1004 `(("python-pytest" ,python-pytest)
1005 ("python-lxml" ,python-lxml))) ;used for the tests
1006 (home-page "https://bitbucket.org/openpyxl/et_xmlfile")
1007 (synopsis "Low memory implementation of @code{lxml.xmlfile}")
1008 (description "This Python library is based upon the @code{xmlfile} module
1009 from @code{lxml}. It aims to provide a low memory, compatible implementation
1010 of @code{xmlfile}.")
1011 (license license:expat)))
1012
1013 (define-public python2-et-xmlfile
1014 (package-with-python2 python-et-xmlfile))
1015
1016 (define-public python-openpyxl
1017 (package
1018 (name "python-openpyxl")
1019 (version "2.6.2")
1020 (source
1021 (origin
1022 ;; We use the upstream repository, as the tests are not included in the
1023 ;; PyPI releases.
1024 (method hg-fetch)
1025 (uri (hg-reference
1026 (url "https://bitbucket.org/openpyxl/openpyxl")
1027 (changeset version)))
1028 (file-name (string-append name "-" version "-checkout"))
1029 (sha256
1030 (base32 "1qhij6kcvdxqjy4g6193nsv4q7fy8n4fwyd3c2z047idlm6s3j4w"))))
1031 (build-system python-build-system)
1032 (arguments
1033 `(#:phases (modify-phases %standard-phases
1034 (replace 'check
1035 (lambda _
1036 (invoke "pytest"))))))
1037 (native-inputs
1038 ;; For the test suite.
1039 `(("python-lxml" ,python-lxml)
1040 ("python-pillow" ,python-pillow)
1041 ("python-pytest" ,python-pytest)))
1042 (propagated-inputs
1043 `(("python-et-xmlfile" ,python-et-xmlfile)
1044 ("python-jdcal" ,python-jdcal)))
1045 (home-page "https://openpyxl.readthedocs.io")
1046 (synopsis "Python library to read/write Excel 2010 XLSX/XLSM files")
1047 (description "This Python library allows reading and writing to the Excel XLSX, XLSM,
1048 XLTX and XLTM file formats that are defined by the Office Open XML (OOXML)
1049 standard.")
1050 (license license:expat)))
1051
1052 (define-public python-eventlet
1053 (package
1054 (name "python-eventlet")
1055 (version "0.25.1")
1056 (source
1057 (origin
1058 (method url-fetch)
1059 (uri (pypi-uri "eventlet" version))
1060 (sha256
1061 (base32
1062 "1hgz8jq19wlz8vwqj900ry8cjv578nz4scc91mlc8944yid6573c"))))
1063 (build-system python-build-system)
1064 (propagated-inputs
1065 `(("python-greenlet" ,python-greenlet)))
1066 (arguments
1067 ;; TODO: Requires unpackaged 'enum-compat'.
1068 '(#:tests? #f))
1069 (home-page "https://eventlet.net")
1070 (synopsis "Concurrent networking library for Python")
1071 (description
1072 "Eventlet is a concurrent networking library for Python that
1073 allows you to change how you run your code, not how you write it.
1074 It uses @code{epoll} or @code{libevent} for highly scalable non-blocking I/O.
1075 Coroutines ensure that the developer uses a blocking style of programming
1076 that is similar to threading, but provide the benefits of non-blocking I/O.
1077 The event dispatch is implicit, which means you can easily use @code{Eventlet}
1078 from the Python interpreter, or as a small part of a larger application.")
1079 (license license:expat)))
1080
1081 (define-public python2-eventlet
1082 (let ((base (package-with-python2
1083 (strip-python2-variant python-eventlet))))
1084 (package (inherit base)
1085 (propagated-inputs
1086 `(("python2-enum34" ,python2-enum34)
1087 ,@(package-propagated-inputs base))))))
1088
1089 (define-public python-six
1090 (package
1091 (name "python-six")
1092 (version "1.12.0")
1093 (source
1094 (origin
1095 (method url-fetch)
1096 (uri (pypi-uri "six" version))
1097 (sha256
1098 (base32
1099 "0wxs1q74v07ssjywbbm7x6h5v9qx209ld2yfsif4060sxi0h2sni"))))
1100 (build-system python-build-system)
1101 (arguments
1102 `(#:phases
1103 (modify-phases %standard-phases
1104 (replace 'check
1105 (lambda _
1106 (invoke "py.test" "-v"))))))
1107 (native-inputs
1108 `(("python-py" ,python-py)
1109 ("python-pytest" ,python-pytest-bootstrap)))
1110 (home-page "https://pypi.python.org/pypi/six/")
1111 (synopsis "Python 2 and 3 compatibility utilities")
1112 (description
1113 "Six is a Python 2 and 3 compatibility library. It provides utility
1114 functions for smoothing over the differences between the Python versions with
1115 the goal of writing Python code that is compatible on both Python versions.
1116 Six supports every Python version since 2.5. It is contained in only one
1117 Python file, so it can be easily copied into your project.")
1118 (license license:x11)))
1119
1120 (define-public python2-six
1121 (package-with-python2 python-six))
1122
1123 (define-public python-six-bootstrap
1124 (package
1125 (inherit python-six)
1126 (name "python-six-bootstrap")
1127 (native-inputs `())
1128 (arguments `(#:tests? #f))))
1129
1130 (define-public python2-six-bootstrap
1131 (package-with-python2 python-six-bootstrap))
1132
1133 (define-public python-schedule
1134 (package
1135 (name "python-schedule")
1136 (version "0.4.3")
1137 (source
1138 (origin
1139 (method url-fetch)
1140 (uri (pypi-uri "schedule" version))
1141 (sha256
1142 (base32
1143 "0vplyjcbfrq50sphlwya749z8p2pcyi2nycw3518i0qpd9a6189i"))))
1144 (build-system python-build-system)
1145 (native-inputs
1146 `(("python-pytest" ,python-pytest)
1147 ("python-mock" ,python-mock)))
1148 (home-page "https://github.com/dbader/schedule")
1149 (synopsis "Schedule periodic function calls in Python")
1150 (description
1151 "Schedule is an in-process scheduler for periodic jobs that uses the
1152 builder pattern for configuration. Schedule lets you run Python functions (or
1153 any other callable) periodically at pre-determined intervals using a simple,
1154 human-friendly syntax.")
1155 (license license:expat)))
1156
1157 (define-public python2-schedule
1158 (package-with-python2 python-schedule))
1159
1160 (define-public python2-mechanize
1161 (package
1162 (name "python2-mechanize")
1163 (version "0.2.5")
1164 (source
1165 (origin
1166 (method url-fetch)
1167 (uri (pypi-uri "mechanize" version))
1168 (sha256
1169 (base32
1170 "0rj7r166i1dyrq0ihm5rijfmvhs8a04im28lv05c0c3v206v4rrf"))))
1171 (build-system python-build-system)
1172 (arguments
1173 `(#:python ,python-2 ; apparently incompatible with Python 3
1174 #:tests? #f))
1175 ;; test fails with message
1176 ;; AttributeError: 'module' object has no attribute 'test_pullparser'
1177 ;; (python-3.3.2) or
1178 ;; AttributeError: 'module' object has no attribute 'test_urllib2_localnet'
1179 ;; (python-2.7.5).
1180 ;; The source code is from March 2011 and probably not up-to-date
1181 ;; with respect to python unit tests.
1182 (home-page "http://wwwsearch.sourceforge.net/mechanize/")
1183 (synopsis
1184 "Stateful programmatic web browsing in Python")
1185 (description
1186 "Mechanize implements stateful programmatic web browsing in Python,
1187 after Andy Lester’s Perl module WWW::Mechanize.")
1188 (license (license:non-copyleft
1189 "file://COPYING"
1190 "See COPYING in the distribution."))))
1191
1192
1193 (define-public python-simplejson
1194 (package
1195 (name "python-simplejson")
1196 (version "3.14.0")
1197 (source
1198 (origin
1199 (method url-fetch)
1200 (uri (pypi-uri "simplejson" version))
1201 (sha256
1202 (base32
1203 "1lkv3xlf7ryzi69zqfdbkvpxdfy1rg1rq2yzcnxgf4km5m6difqy"))))
1204 (build-system python-build-system)
1205 (home-page "http://simplejson.readthedocs.org/en/latest/")
1206 (synopsis
1207 "Json library for Python")
1208 (description
1209 "JSON (JavaScript Object Notation) is a subset of JavaScript
1210 syntax (ECMA-262 3rd edition) used as a lightweight data interchange
1211 format.
1212
1213 Simplejson exposes an API familiar to users of the standard library marshal
1214 and pickle modules. It is the externally maintained version of the json
1215 library contained in Python 2.6, but maintains compatibility with Python 2.5
1216 and (currently) has significant performance advantages, even without using
1217 the optional C extension for speedups. Simplejson is also supported on
1218 Python 3.3+.")
1219 (license license:x11)))
1220
1221 (define-public python2-simplejson
1222 (package-with-python2 python-simplejson))
1223
1224
1225 (define-public python-pyicu
1226 (package
1227 (name "python-pyicu")
1228 (version "2.3.1")
1229 (source
1230 (origin
1231 (method url-fetch)
1232 (uri (pypi-uri "PyICU" version))
1233 (sha256
1234 (base32
1235 "1x4w8m7ifki9z2a187pgjr33z6z0rp2fii9b73djak1vhm9v9cnx"))))
1236 (build-system python-build-system)
1237 (inputs
1238 `(("icu4c" ,icu4c)))
1239 (native-inputs
1240 `(("python-pytest" ,python-pytest)
1241 ("python-six" ,python-six)))
1242 (home-page "https://github.com/ovalhub/pyicu")
1243 (synopsis "Python extension wrapping the ICU C++ API")
1244 (description
1245 "PyICU is a python extension wrapping the ICU C++ API.")
1246 (properties `((python2-variant . ,(delay python2-pyicu))))
1247 (license license:x11)))
1248
1249 (define-public python2-pyicu
1250 (let ((base (package-with-python2
1251 (strip-python2-variant python-pyicu))))
1252 (package
1253 (inherit base)
1254 (arguments
1255 `(,@(package-arguments base)
1256 #:phases
1257 (modify-phases %standard-phases
1258 (add-before 'check 'delete-failing-test
1259 (λ _
1260 ;; XXX: This fails due to Unicode issues unique to Python 2,
1261 ;; it seems: <https://github.com/ovalhub/pyicu/issues/61>.
1262 (delete-file "test/test_Script.py")
1263 #t))))))))
1264
1265 (define-public python2-dogtail
1266 ;; Python 2 only, as it leads to "TabError: inconsistent use of tabs and
1267 ;; spaces in indentation" with Python 3.
1268 (package
1269 (name "python2-dogtail")
1270 (version "0.9.9")
1271 (source (origin
1272 (method url-fetch)
1273 (uri (pypi-uri "dogtail" version))
1274 (sha256
1275 (base32
1276 "0p5wfssvzr9w0bvhllzbbd8fnp4cca2qxcpcsc33dchrmh5n552x"))))
1277 (build-system python-build-system)
1278 (arguments `(#:python ,python-2
1279 #:tests? #f)) ; invalid command "test"
1280 ;; Currently no offical homepage.
1281 (home-page "https://pypi.python.org/pypi/dogtail/")
1282 (synopsis "GUI test tool and automation framework written in Python")
1283 (description
1284 "Dogtail is a GUI test tool and automation framework written in Python.
1285 It uses Accessibility (a11y) technologies to communicate with desktop
1286 applications. dogtail scripts are written in Python and executed like any
1287 other Python program.")
1288 (license license:gpl2+)))
1289
1290 (define-public python-empy
1291 (package
1292 (name "python-empy")
1293 (version "3.3.3")
1294 (source (origin
1295 (method url-fetch)
1296 (uri (string-append "http://www.alcyone.com/software/empy/empy-"
1297 version ".tar.gz"))
1298 (sha256
1299 (base32
1300 "1mxfy5mgp473ga1pgz2nvm8ds6z4g3hdky8523z6jzvcs9ny6hcq"))))
1301 (build-system python-build-system)
1302 (arguments
1303 `(#:tests? #f)) ; python2 only
1304 (home-page "http://www.alcyone.com/software/empy/")
1305 (synopsis "Templating system for Python")
1306 (description
1307 "EmPy is a system for embedding Python expressions and statements in
1308 template text; it takes an EmPy source file, processes it, and produces
1309 output. This is accomplished via expansions, which are special signals to the
1310 EmPy system and are set off by a special prefix (by default the at sign, @@).
1311 EmPy can expand arbitrary Python expressions and statements in this way, as
1312 well as a variety of special forms. Textual data not explicitly delimited in
1313 this way is sent unaffected to the output, allowing Python to be used in
1314 effect as a markup language. Also supported are callbacks via hooks,
1315 recording and playback via diversions, and dynamic, chainable filters. The
1316 system is highly configurable via command line options and embedded
1317 commands.")
1318 (license license:lgpl2.1+)))
1319
1320 (define-public python2-empy
1321 (let ((base (package-with-python2 (strip-python2-variant python-empy))))
1322 (package
1323 (inherit base)
1324 (arguments `(,@(package-arguments base)
1325 #:tests? #t)))))
1326
1327 (define-public python2-element-tree
1328 (package
1329 (name "python2-element-tree")
1330 (version "1.2.6")
1331 (source (origin
1332 (method url-fetch)
1333 (uri (string-append
1334 "http://effbot.org/media/downloads/elementtree-"
1335 version "-20050316.tar.gz"))
1336 (sha256
1337 (base32
1338 "016bphqnlg0l4vslahhw4r0aanw95bpypy65r1i1acyb2wj5z7dj"))))
1339 (build-system python-build-system)
1340 (arguments
1341 `(#:python ,python-2 ; seems to be part of Python 3
1342 #:tests? #f)) ; no 'test' sub-command
1343 (synopsis "Toolkit for XML processing in Python")
1344 (description
1345 "ElementTree is a Python library supporting lightweight XML processing.")
1346 (home-page "http://effbot.org/zone/element-index.htm")
1347 (license (license:x11-style
1348 "http://docs.python.org/2/license.html"
1349 "Like \"CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2\"."))))
1350
1351 (define-public python2-pybugz
1352 (package
1353 (name "python2-pybugz")
1354 (version "0.6.11")
1355 (source (origin
1356 (method url-fetch)
1357 (uri (string-append
1358 "http://bits.liquidx.net/projects/pybugz/pybugz-"
1359 version ".tar.gz"))
1360 (sha256
1361 (base32
1362 "17ni00p08gp5lkxlrrcnvi3x09fmajnlbz4da03qcgl9q21ym4jd"))
1363 (patches (search-patches "pybugz-stty.patch"
1364 "pybugz-encode-error.patch"))))
1365 (build-system python-build-system)
1366 (arguments
1367 `(#:python ,python-2 ; SyntaxError with Python 3
1368 #:tests? #f)) ; no 'test' sub-command
1369 (propagated-inputs
1370 `(("element-tree" ,python2-element-tree)))
1371 (synopsis "Python and command-line interface to Bugzilla")
1372 (description
1373 "PyBugz is a Python library and command-line tool to query the Bugzilla
1374 bug tracking system. It is meant as an aid to speed up interaction with the
1375 bug tracker.")
1376 (home-page "http://www.liquidx.net/pybugz/")
1377 (license license:gpl2)))
1378
1379 (define-public python2-enum
1380 (package
1381 (name "python2-enum")
1382 (version "0.4.6")
1383 (source (origin
1384 (method url-fetch)
1385 (uri (pypi-uri "enum" version))
1386 (sha256
1387 (base32
1388 "13lk3yrwj42vl30kw3c194f739nrfrdg64s6i0v2p636n4k8brsl"))))
1389 (build-system python-build-system)
1390 (arguments
1391 `(#:python ,python-2))
1392 (home-page "http://pypi.python.org/pypi/enum/")
1393 (synopsis "Robust enumerated type support in Python")
1394 (description
1395 "This provides a module for robust enumerations in Python. It has
1396 been superseded by the Python standard library and is provided only for
1397 compatibility.")
1398 ;; Choice of either license.
1399 (license (list license:gpl3+ license:psfl))))
1400
1401 (define-public python-enum34
1402 (package
1403 (name "python-enum34")
1404 (version "1.1.6")
1405 (source
1406 (origin
1407 (method url-fetch)
1408 (uri (pypi-uri "enum34" version))
1409 (sha256
1410 (base32
1411 "1cgm5ng2gcfrkrm3hc22brl6chdmv67b9zvva9sfs7gn7dwc9n4a"))))
1412 (build-system python-build-system)
1413 (home-page "https://pypi.python.org/pypi/enum34")
1414 (synopsis "Backported Python 3.4 Enum")
1415 (description
1416 "Enum34 is the new Python stdlib enum module available in Python 3.4
1417 backported for previous versions of Python from 2.4 to 3.3.")
1418 (license license:bsd-3)))
1419
1420 (define-public python2-enum34
1421 (package-with-python2 python-enum34))
1422
1423 (define-public python-parse-type
1424 (package
1425 (name "python-parse-type")
1426 (version "0.4.2")
1427 (source
1428 (origin
1429 (method url-fetch)
1430 (uri (pypi-uri "parse_type" version))
1431 (sha256
1432 (base32
1433 "0g3b6gsdwnm8dpkh2vn34q6dzxm9gl908ggyzcv31n9xbp3vv5pm"))))
1434 (build-system python-build-system)
1435 (propagated-inputs
1436 `(("python-six" ,python-six)
1437 ("python-parse" ,python-parse)))
1438 (native-inputs
1439 `(("python-pytest" ,python-pytest)
1440 ("python-pytest-runner" ,python-pytest-runner)))
1441 (home-page "https://github.com/jenisys/parse_type")
1442 (synopsis "Extended parse module")
1443 (description
1444 "Parse_type extends the python parse module.")
1445 (properties
1446 `((python2-variant . ,(delay python2-parse-type))))
1447 (license license:bsd-3)))
1448
1449 (define-public python2-parse-type
1450 (let ((base (package-with-python2
1451 (strip-python2-variant python-parse-type))))
1452 (package (inherit base)
1453 (propagated-inputs
1454 `(("python2-enum34" ,python2-enum34)
1455 ,@(package-propagated-inputs base))))))
1456
1457 (define-public python-parse
1458 (package
1459 (name "python-parse")
1460 (version "1.8.4")
1461 (source
1462 (origin
1463 (method url-fetch)
1464 (uri (pypi-uri "parse" version))
1465 (sha256
1466 (base32
1467 "0f8997xr8nq2nq35iiviq8ningd1zvy59fg503xfpbi2dwhgdkf3"))))
1468 (build-system python-build-system)
1469 (arguments
1470 `(#:phases
1471 (modify-phases %standard-phases
1472 (replace 'check
1473 (lambda _ (invoke "python" "test_parse.py"))))))
1474 (home-page "https://github.com/r1chardj0n3s/parse")
1475 (synopsis "Parse strings")
1476 (description
1477 "Parse strings using a specification based on the Python @code{format()}
1478 syntax.")
1479 (license license:x11)))
1480
1481 (define-public python-polib
1482 (package
1483 (name "python-polib")
1484 (version "1.0.8")
1485 (source (origin
1486 (method url-fetch)
1487 (uri (pypi-uri "polib" version))
1488 (sha256
1489 (base32
1490 "1pq2hbm3m2q0cjdszk8mc4qa1vl3wcblh5nfyirlfnzb2pcy7zss"))))
1491 (build-system python-build-system)
1492 (home-page "https://bitbucket.org/izi/polib/wiki/Home")
1493 (synopsis "Manipulate, create and modify gettext files")
1494 (description "Polib can manipulate any gettext format (po, pot and mo)
1495 files. It can be used to create po files from scratch or to modify
1496 existing ones.")
1497 (license license:expat)))
1498
1499 (define-public python2-polib
1500 (let ((base (package-with-python2 (strip-python2-variant python-polib))))
1501 (package
1502 (inherit base)
1503 (arguments `(,@(package-arguments base)
1504 ;; Tests don't work with python2.
1505 #:tests? #f)))))
1506
1507 (define-public python-poyo
1508 (package
1509 (name "python-poyo")
1510 (version "0.5.0")
1511 (source
1512 (origin
1513 (method url-fetch)
1514 (uri (pypi-uri "poyo" version))
1515 (sha256
1516 (base32
1517 "1pflivs6j22frz0v3dqxnvc8yb8fb52g11lqr88z0i8cg2m5csg2"))))
1518 (build-system python-build-system)
1519 (home-page "https://github.com/hackebrot/poyo")
1520 (synopsis "Lightweight YAML Parser for Python")
1521 (description
1522 "This package provides a lightweight YAML Parser for Python. It supports
1523 only a chosen subset of the YAML format that is required to parse cookiecutter
1524 user configuration files. It does not have support for serializing into YAML
1525 and is not compatible with JSON.")
1526 (license license:expat)))
1527
1528 (define-public scons
1529 (package
1530 (name "scons")
1531 (version "3.0.4")
1532 (source (origin
1533 (method git-fetch)
1534 (uri (git-reference
1535 (url "https://github.com/SCons/scons.git")
1536 (commit version)))
1537 (file-name (git-file-name name version))
1538 (sha256
1539 (base32
1540 "1xy8jrwz87y589ihcld4hv7wn122sjbz914xn8h50ww77wbhk8hn"))))
1541 (build-system python-build-system)
1542 (arguments
1543 `(#:use-setuptools? #f ; still relies on distutils
1544 #:tests? #f ; no 'python setup.py test' command
1545 #:phases
1546 (modify-phases %standard-phases
1547 (add-before 'build 'bootstrap
1548 (lambda _
1549 (substitute* "src/engine/SCons/compat/__init__.py"
1550 (("sys.modules\\[new\\] = imp.load_module\\(old, \\*imp.find_module\\(old\\)\\)")
1551 "sys.modules[new] = __import__(old)"))
1552 (substitute* "src/engine/SCons/Platform/__init__.py"
1553 (("mod = imp.load_module\\(full_name, file, path, desc\\)")
1554 "mod = __import__(full_name)"))
1555 (invoke "python" "bootstrap.py" "build/scons" "DEVELOPER=guix")
1556 (chdir "build/scons")
1557 #t)))))
1558 (home-page "http://scons.org/")
1559 (synopsis "Software construction tool written in Python")
1560 (description
1561 "SCons is a software construction tool. Think of SCons as an improved,
1562 cross-platform substitute for the classic Make utility with integrated
1563 functionality similar to autoconf/automake and compiler caches such as ccache.
1564 In short, SCons is an easier, more reliable and faster way to build
1565 software.")
1566 (license license:x11)))
1567
1568 (define-public scons-python2
1569 (package
1570 (inherit (package-with-python2 scons))
1571 (name "scons-python2")))
1572
1573 (define-public python-extras
1574 (package
1575 (name "python-extras")
1576 (version "1.0.0")
1577 (source
1578 (origin
1579 (method url-fetch)
1580 (uri (pypi-uri "extras" version))
1581 (sha256
1582 (base32
1583 "0khvm08rcwm62wc47j8niyl6h13f8w51c8669ifivjdr23g3cbhk"))))
1584 (build-system python-build-system)
1585 (arguments
1586 ;; FIXME: Circular dependency on testtools.
1587 '(#:tests? #f))
1588 (home-page "https://github.com/testing-cabal/extras")
1589 (synopsis "Useful extensions to the Python standard library")
1590 (description
1591 "Extras is a set of extensions to the Python standard library.")
1592 (license license:expat)))
1593
1594 (define-public python2-extras
1595 (package-with-python2 python-extras))
1596
1597 (define-public python-mimeparse
1598 (package
1599 (name "python-mimeparse")
1600 (version "1.6.0")
1601 (source
1602 (origin
1603 (method url-fetch)
1604 (uri (pypi-uri "python-mimeparse" version))
1605 (sha256
1606 (base32
1607 "0y2g6cl660bpz11srgqyvvm8gmywpgyx8g0xfvbiyr0af0yv1r3n"))))
1608 (build-system python-build-system)
1609 (arguments
1610 '(#:phases
1611 (modify-phases %standard-phases
1612 (replace 'check
1613 (lambda _
1614 (invoke "./mimeparse_test.py"))))))
1615 (home-page
1616 "https://github.com/dbtsai/python-mimeparse")
1617 (synopsis "Python library for parsing MIME types")
1618 (description
1619 "Mimeparse provides basic functions for parsing MIME type names and
1620 matching them against a list of media-ranges.")
1621 (license license:expat)))
1622
1623 (define-public python2-mimeparse
1624 (package-with-python2 python-mimeparse))
1625
1626 (define-public python-miniboa
1627 (package
1628 (name "python-miniboa")
1629 (version "1.0.7")
1630 (source
1631 (origin
1632 (method url-fetch)
1633 (uri (pypi-uri "miniboa" version))
1634 (sha256
1635 (base32
1636 "09jh3pn4rh7kh7jayanf8jzy6gp03791b5a193w6148cf3i6k9m3"))))
1637 (build-system python-build-system)
1638 (home-page "https://github.com/shmup/miniboa")
1639 (synopsis "Simple, single-threaded Telnet server")
1640 (description
1641 "Miniboa is a simple, asynchronous, single-threaded, poll-based Telnet
1642 server.")
1643 (license license:asl2.0)))
1644
1645 (define-public python2-miniboa
1646 (package-with-python2 python-miniboa))
1647
1648 (define-public python-pafy
1649 (package
1650 (name "python-pafy")
1651 (version "0.5.3.1")
1652 (source
1653 (origin
1654 (method url-fetch)
1655 (uri (pypi-uri "pafy" version))
1656 (sha256
1657 (base32
1658 "1a7dxi95m1043rxx1r5x3ngb66nwlq6aqcasyqqjzmmmjps4zrim"))))
1659 (build-system python-build-system)
1660 (arguments
1661 `(#:tests? #f)) ; Currently pafy can not find itself in the tests
1662 (propagated-inputs
1663 ;; Youtube-dl is a python package which is imported in the file
1664 ;; "backend_youtube_dl.py", therefore it needs to be propagated.
1665 `(("youtube-dl" ,youtube-dl)))
1666 (home-page "https://np1.github.io/pafy/")
1667 (synopsis "Retrieve YouTube content and metadata")
1668 (description
1669 "@code{pafy} is a python library to retrieve YouTube content and metadata.")
1670 (license license:lgpl3+)))
1671
1672 (define-public python2-funcsigs
1673 (package
1674 (name "python2-funcsigs")
1675 (version "1.0.2")
1676 (source (origin
1677 (method url-fetch)
1678 (uri (pypi-uri "funcsigs" version))
1679 (sha256
1680 (base32
1681 "0l4g5818ffyfmfs1a924811azhjj8ax9xd1cffr1mzd3ycn0zfx7"))))
1682 (build-system python-build-system)
1683 (arguments
1684 `(#:python ,python-2))
1685 (native-inputs
1686 `(("python2-unittest2" ,python2-unittest2)))
1687 (home-page "http://funcsigs.readthedocs.org")
1688 (synopsis "Python function signatures from PEP362")
1689 (description
1690 "Backport of @code{funcsigs} which was introduced in Python 3.3.")
1691 (license license:asl2.0)))
1692
1693 (define-public python2-funcsigs-bootstrap
1694 (package
1695 (inherit python2-funcsigs)
1696 (name "python2-funcsigs-bootstrap")
1697 (native-inputs `())
1698 (arguments
1699 `(#:tests? #f
1700 ,@(package-arguments python2-funcsigs)))))
1701
1702 (define-public python-py
1703 (package
1704 (name "python-py")
1705 (version "1.8.0")
1706 (source
1707 (origin
1708 (method url-fetch)
1709 (uri (pypi-uri "py" version))
1710 (sha256
1711 (base32
1712 "0lsy1gajva083pzc7csj1cvbmminb7b4l6a0prdzyb3fd829nqyw"))))
1713 (build-system python-build-system)
1714 (arguments
1715 ;; FIXME: "ImportError: 'test' module incorrectly imported from
1716 ;; '/gnu/store/...-python-pytest-mimimal-3.0.5/lib/python3.5/site-packages'.
1717 ;; Expected '/tmp/guix-build-python-py-1.4.31.drv-0/py-1.4.31/py'.
1718 ;; Is this module globally installed?"
1719 '(#:tests? #f))
1720 (native-inputs
1721 `(("python-setuptools-scm" ,python-setuptools-scm)))
1722 (home-page "https://github.com/pytest-dev/py")
1723 (synopsis "Python library for parsing, I/O, instrospection, and logging")
1724 (description
1725 "Py is a Python library for file name parsing, .ini file parsing, I/O,
1726 code introspection, and logging.")
1727 (license license:expat)))
1728
1729 (define-public python2-py
1730 (package-with-python2 python-py))
1731
1732 ;; Recent versions of python-fixtures and python-testrepository need
1733 ;; python-pbr for packaging, which itself needs these two packages for
1734 ;; testing.
1735 ;; To fix this circular dependency, we use a build of python-pbr, based on the
1736 ;; same source, just without any test dependencies and with tests disabled.
1737 ;; python-pbr-minmal is then used to package python-fixtures and
1738 ;; python-testrepository.
1739 ;; Strictly speaking we currently could remove the test-requirements from the
1740 ;; normal python-pbr package (and save this package) since test are disabled
1741 ;; there anyway. But this may change in future.
1742 (define-public python-pbr-minimal
1743 (package
1744 (name "python-pbr-minimal")
1745 (version "3.0.1")
1746 (source
1747 (origin
1748 (method url-fetch)
1749 (uri (pypi-uri "pbr" version))
1750 (sha256
1751 (base32
1752 "14fs5acnalnb3h62s7q7av239j541fk0n0z0lawh4h09b1s93s6p"))))
1753 (build-system python-build-system)
1754 (arguments
1755 `(#:tests? #f))
1756 (home-page "http://docs.openstack.org/developer/pbr/")
1757 (synopsis "Minimal build of python-pbr used for bootstrapping")
1758 (description
1759 "Used only for bootstrapping python2-pbr, you should not need this.")
1760 (license license:asl2.0)))
1761
1762 (define-public python2-pbr-minimal
1763 (package-with-python2 python-pbr-minimal))
1764
1765 (define-public python-pbr
1766 (package
1767 (inherit python-pbr-minimal)
1768 (name "python-pbr")
1769 (arguments
1770 `(#:tests? #f)) ;; Most tests seem to use the Internet.
1771 (propagated-inputs
1772 `(("git" ,git))) ;; pbr actually uses the "git" binary.
1773 (native-inputs
1774 `(("python-fixtures" ,python-fixtures-bootstrap)
1775 ;; discover, coverage, hacking, subunit
1776 ("python-mock" ,python-mock)
1777 ("python-six" ,python-six)
1778 ("python-sphinx" ,python-sphinx)
1779 ("python-testrepository" ,python-testrepository-bootstrap)
1780 ("python-testresources" ,python-testresources-bootstrap)
1781 ("python-testscenarios" ,python-testscenarios-bootstrap)
1782 ("python-testtools" ,python-testtools-bootstrap)
1783 ("python-virtualenv" ,python-virtualenv)))
1784 (synopsis "Enhance the default behavior of Python’s setuptools")
1785 (description
1786 "Python Build Reasonableness (PBR) is a library that injects some useful
1787 and sensible default behaviors into your setuptools run. It will set
1788 versions, process requirements files and generate AUTHORS and ChangeLog file
1789 from git information.
1790 ")))
1791
1792 (define-public python2-pbr
1793 (package-with-python2 python-pbr))
1794
1795 (define-public python-pyrsistent
1796 (package
1797 (name "python-pyrsistent")
1798 (version "0.14.11")
1799 (home-page "https://github.com/tobgu/pyrsistent")
1800 (source (origin
1801 (method url-fetch)
1802 (uri (pypi-uri "pyrsistent" version))
1803 (sha256
1804 (base32
1805 "1qkh74bm296mp5g3r11lgsksr6bh4w1bf8pji4nmxdlfj542ga1w"))))
1806 (build-system python-build-system)
1807 (native-inputs
1808 `(("python-hypothesis" ,python-hypothesis)
1809 ("python-pytest" ,python-pytest)
1810 ("python-pytest-runner" ,python-pytest-runner)))
1811 (propagated-inputs
1812 `(("python-six" ,python-six)))
1813 (synopsis "Persistent data structures for Python")
1814 (description
1815 "Pyrsistent is a number of persistent collections (by some referred to as
1816 functional data structures). Persistent in the sense that they are immutable.
1817
1818 All methods on a data structure that would normally mutate it instead return a
1819 new copy of the structure containing the requested updates. The original
1820 structure is left untouched.")
1821 (license license:expat)))
1822
1823 (define-public python2-pyrsistent
1824 (package-with-python2 python-pyrsistent))
1825
1826 (define-public python-exif-read
1827 (package
1828 (name "python-exif-read")
1829 (version "2.1.2")
1830 (source (origin
1831 (method url-fetch)
1832 (uri (pypi-uri "ExifRead" version))
1833 (sha256
1834 (base32
1835 "1b90jf6m9vxh9nanhpyvqdq7hmfx5iggw1l8kq10jrs6xgr49qkr"))))
1836 (build-system python-build-system)
1837 (arguments `(#:tests? #f)) ; no tests
1838 (home-page "https://github.com/ianare/exif-py")
1839 (synopsis "Python library to extract EXIF data from image files")
1840 (description
1841 "ExifRead is a Python library to extract EXIF data from tiff and jpeg
1842 files.")
1843 (license license:bsd-3)))
1844
1845 (define-public python2-exif-read
1846 (package-with-python2 python-exif-read))
1847
1848 (define-public python-pyld
1849 (package
1850 (name "python-pyld")
1851 (version "1.0.5")
1852 (source (origin
1853 (method url-fetch)
1854 (uri (pypi-uri "PyLD" version))
1855 (sha256
1856 (base32
1857 "1ywbdbsrkg533qh8xn9ifjh2mvam6v5msrjyqq73jfpvcp89qvff"))))
1858 (build-system python-build-system)
1859 (home-page "https://github.com/digitalbazaar/pyld")
1860 (synopsis "Python implementation of the JSON-LD specification")
1861 (description
1862 "PyLD is an implementation of the JSON-LD specification.")
1863 (license license:bsd-3)))
1864
1865 (define-public python2-pyld
1866 (package-with-python2 python-pyld))
1867
1868 (define-public python-click
1869 (package
1870 (name "python-click")
1871 (version "7.0")
1872 (source
1873 (origin
1874 (method url-fetch)
1875 (uri (pypi-uri "click" version))
1876 (sha256
1877 (base32
1878 "1mzjixd4vjbjvzb6vylki9w1556a9qmdh35kzmq6cign46av952v"))))
1879 (build-system python-build-system)
1880 (arguments
1881 `(#:phases
1882 (modify-phases %standard-phases
1883 (add-after 'unpack 'fix-paths
1884 (lambda* (#:key inputs #:allow-other-keys)
1885 (let ((glibc (assoc-ref inputs ,(if (%current-target-system)
1886 "cross-libc" "libc"))))
1887 (substitute* "click/_unicodefun.py"
1888 (("'locale'")
1889 (string-append "'" glibc "/bin/locale'"))))
1890 #t))
1891 (replace 'check
1892 (lambda _
1893 (invoke "python" "-m" "pytest"))))))
1894 (native-inputs
1895 `(("python-pytest" ,python-pytest)))
1896 (home-page "https://palletsprojects.com/p/click/")
1897 (synopsis "Command line library for Python")
1898 (description
1899 "Click is a Python package for creating command line interfaces in a
1900 composable way with as little code as necessary. Its name stands for
1901 \"Command Line Interface Creation Kit\". It's highly configurable but comes
1902 with sensible defaults out of the box.")
1903 (license license:bsd-3)))
1904
1905 (define-public python2-click
1906 (package-with-python2 python-click))
1907
1908 (define-public python-wheel
1909 (package
1910 (name "python-wheel")
1911 (version "0.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.4")
3059 (source
3060 (origin
3061 (method url-fetch)
3062 (uri (pypi-uri "python-language-server" version))
3063 (sha256
3064 (base32
3065 "1nrs56jpx7dvghaas0kc5k9lxas5vr3awj3k87p4akki43nsblb8"))))
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 git-fetch)
3434 (uri (git-reference
3435 (url "https://github.com/numpy/numpy")
3436 (commit (string-append "v" version))))
3437 (file-name (git-file-name "numpy" version))
3438 (sha256
3439 (base32
3440 "0ikgi15rsqwbkfsjjxrwh40lqyal2wvyp3923y6w6ch3dcr82sfk"))))
3441 (arguments
3442 (substitute-keyword-arguments (package-arguments python2-numpy)
3443 ((#:phases phases)
3444 `(modify-phases ,phases
3445 (replace 'configure-blas-lapack
3446 (lambda* (#:key inputs #:allow-other-keys)
3447 (call-with-output-file "site.cfg"
3448 (lambda (port)
3449 (format port
3450 "[openblas]
3451 libraries = openblas,lapack
3452 library_dirs = ~a/lib:~a/lib
3453 include_dirs = ~a/include:~a/include
3454 "
3455 (assoc-ref inputs "openblas")
3456 (assoc-ref inputs "lapack")
3457 (assoc-ref inputs "openblas")
3458 (assoc-ref inputs "lapack"))))
3459 #t))))))
3460 (native-inputs
3461 `(("python2-nose" ,python2-nose)))
3462 (description "NumPy is the fundamental package for scientific computing
3463 with Python. It contains among other things: a powerful N-dimensional array
3464 object, sophisticated (broadcasting) functions, tools for integrating C/C++
3465 and Fortran code, useful linear algebra, Fourier transform, and random number
3466 capabilities. Version 1.8 is the last one to contain the numpy.oldnumeric API
3467 that includes the compatibility layer numpy.oldnumeric with NumPy's predecessor
3468 Numeric.")
3469 (license license:bsd-3)))
3470
3471 (define-public python-munch
3472 (package
3473 (name "python-munch")
3474 (version "2.0.4")
3475 (source
3476 (origin
3477 (method url-fetch)
3478 (uri (pypi-uri "munch" version))
3479 (sha256
3480 (base32
3481 "1cmqg91xnqx8gvnh4pmp0bfl1dfcm65d5p9mg73zz8pkjhx6h80l"))))
3482 (build-system python-build-system)
3483 (home-page "https://github.com/Infinidat/munch")
3484 (synopsis "Dot-accessible dictionary")
3485 (description "Munch is a dot-accessible dictionary similar to JavaScript
3486 objects.")
3487 (license license:expat)))
3488
3489 (define-public python2-munch
3490 (package-with-python2 python-munch))
3491
3492 (define-public python-colormath
3493 (package
3494 (name "python-colormath")
3495 (version "3.0.0")
3496 (source
3497 (origin
3498 (method url-fetch)
3499 (uri (pypi-uri "colormath" version))
3500 (sha256
3501 (base32
3502 "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix"))))
3503 (build-system python-build-system)
3504 (propagated-inputs
3505 `(("python-networkx" ,python-networkx)
3506 ("python-numpy" ,python-numpy)))
3507 (home-page "https://github.com/gtaylor/python-colormath")
3508 (synopsis "Color math and conversion library")
3509 (description
3510 "This is a Python library for color math and conversions.")
3511 (license license:bsd-3)))
3512
3513 (define-public python2-colormath
3514 (package-with-python2 python-colormath))
3515
3516 (define-public python-spectra
3517 (package
3518 (name "python-spectra")
3519 (version "0.0.11")
3520 (source
3521 (origin
3522 (method url-fetch)
3523 (uri (pypi-uri "spectra" version))
3524 (sha256
3525 (base32
3526 "1f322x914bhkg6r5gv1vmnir3iy0k5kih0fd2gp3rdkw32jn5cwf"))))
3527 (build-system python-build-system)
3528 (arguments
3529 `(#:phases
3530 (modify-phases %standard-phases
3531 (replace 'check
3532 (lambda _ (invoke "nosetests" "-v"))))))
3533 (propagated-inputs
3534 `(("python-colormath" ,python-colormath)))
3535 (native-inputs
3536 `(("python-nose" ,python-nose)))
3537 (home-page "https://github.com/jsvine/spectra")
3538 (synopsis "Color scales and color conversion")
3539 (description
3540 "This package provides a Python library intended to make color math,
3541 color scales, and color space conversion easy. It has support for:
3542
3543 @enumerate
3544 @item Color scales
3545 @item Color ranges
3546 @item Color blending
3547 @item Brightening/darkening colors
3548 @item Saturating/desaturating colors
3549 @item Conversion to/from multiple color spaces.
3550 @end enumerate\n")
3551 (license license:expat)))
3552
3553 (define-public python2-spectra
3554 (package-with-python2 python-spectra))
3555
3556 (define-public python-numpy-documentation
3557 (package
3558 (name "python-numpy-documentation")
3559 (version (package-version python-numpy))
3560 (source (package-source python-numpy))
3561 (build-system python-build-system)
3562 (native-inputs
3563 `(("python-matplotlib" ,python-matplotlib)
3564 ("python-numpy" ,python-numpy)
3565 ("pkg-config" ,pkg-config)
3566 ("python-sphinx" ,python-sphinx)
3567 ("python-numpydoc" ,python-numpydoc)
3568 ("texlive" ,(texlive-union (list texlive-fonts-cm-super
3569 texlive-fonts-ec
3570 texlive-generic-ifxetex
3571 texlive-generic-pdftex
3572 texlive-amsfonts
3573 texlive-latex-capt-of
3574 texlive-latex-cmap
3575 texlive-latex-environ
3576 texlive-latex-eqparbox
3577 texlive-latex-etoolbox
3578 texlive-latex-expdlist
3579 texlive-latex-fancyhdr
3580 texlive-latex-fancyvrb
3581 texlive-latex-fncychap
3582 texlive-latex-float
3583 texlive-latex-framed
3584 texlive-latex-geometry
3585 texlive-latex-graphics
3586 texlive-latex-hyperref
3587 texlive-latex-mdwtools
3588 texlive-latex-multirow
3589 texlive-latex-needspace
3590 texlive-latex-oberdiek
3591 texlive-latex-parskip
3592 texlive-latex-preview
3593 texlive-latex-tabulary
3594 texlive-latex-threeparttable
3595 texlive-latex-titlesec
3596 texlive-latex-trimspaces
3597 texlive-latex-ucs
3598 texlive-latex-upquote
3599 texlive-latex-url
3600 texlive-latex-varwidth
3601 texlive-latex-wrapfig)))
3602 ("texinfo" ,texinfo)
3603 ("perl" ,perl)
3604 ("scipy-sphinx-theme"
3605 ,(origin ; The build script expects scipy-sphinx-theme as a git submodule
3606 (method git-fetch)
3607 (uri (git-reference
3608 (url "https://github.com/scipy/scipy-sphinx-theme.git")
3609 (commit "c466764e2231ba132c09826b5b138fffa1cfcec3")))
3610 (sha256
3611 (base32
3612 "0q2y87clwlsgc7wvlsn9pzyssybcq10plwhq2w1ydykfsyyqbmkl"))))
3613 ,@(package-native-inputs python-numpy)))
3614 (arguments
3615 `(#:tests? #f ; we're only generating the documentation
3616 #:phases
3617 (modify-phases %standard-phases
3618 (delete 'build)
3619 (replace 'install
3620 (lambda* (#:key inputs outputs #:allow-other-keys)
3621 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
3622 (doc (string-append
3623 data "/doc/" ,name "-"
3624 ,(package-version python-numpy)))
3625 (info-reader (string-append data "/info"))
3626 (html (string-append doc "/html"))
3627 (scipy-sphinx-theme "scipy-sphinx-theme")
3628 (sphinx-theme-checkout (assoc-ref inputs scipy-sphinx-theme))
3629 (pyver ,(string-append "PYVER=")))
3630
3631 ;; FIXME: this is needed to for texlive-union to generate
3632 ;; fonts, which are not found.
3633 (setenv "HOME" "/tmp")
3634
3635 (with-directory-excursion "doc"
3636 (copy-recursively sphinx-theme-checkout scipy-sphinx-theme)
3637 (mkdir-p html)
3638 (invoke "make" "html" pyver)
3639 (invoke "make" "latex" "PAPER=a4" pyver)
3640 (invoke "make" "-C" "build/latex"
3641 "all-pdf" "PAPER=a4" pyver)
3642 ;; FIXME: Generation of the info file fails.
3643 ;; (invoke "make" "info" pyver)
3644 ;; (mkdir-p info)
3645 ;; (copy-file "build/texinfo/numpy.info"
3646 ;; (string-append info "/numpy.info"))
3647 (for-each (lambda (file)
3648 (copy-file (string-append "build/latex" file)
3649 (string-append doc file)))
3650 '("/numpy-ref.pdf" "/numpy-user.pdf"))
3651 (with-directory-excursion "build/html"
3652 (for-each (lambda (file)
3653 (let* ((dir (dirname file))
3654 (tgt-dir (string-append html "/" dir)))
3655 (unless (equal? "." dir)
3656 (mkdir-p tgt-dir))
3657 (install-file file html)))
3658 (find-files "." ".*")))))
3659 #t)))))
3660 (home-page (package-home-page python-numpy))
3661 (synopsis "Documentation for the python-numpy package")
3662 (description (package-description python-numpy))
3663 (license (package-license python-numpy))))
3664
3665 (define-public python2-numpy-documentation
3666 (let ((numpy-documentation (package-with-python2 python-numpy-documentation)))
3667 (package
3668 (inherit numpy-documentation)
3669 (native-inputs `(("python2-functools32" ,python2-functools32)
3670 ,@(package-native-inputs numpy-documentation))))))
3671
3672 (define-public python-pygit2
3673 (package
3674 (name "python-pygit2")
3675 (version "0.28.2")
3676 (source
3677 (origin
3678 (method url-fetch)
3679 (uri (pypi-uri "pygit2" version))
3680 (sha256
3681 (base32 "11kzj5mjkspvplnpdb6bj8dcj6rgmkk986k8hjcklyg5yaxkz32d"))))
3682 (build-system python-build-system)
3683 (arguments
3684 '(#:tests? #f)) ; tests don't run correctly in our environment
3685 (propagated-inputs
3686 `(("python-six" ,python-six)
3687 ("python-cffi" ,python-cffi)
3688 ("libgit2" ,libgit2)
3689 ("python-tox" ,python-tox)))
3690 (native-inputs
3691 `(("python-pytest" ,python-pytest)))
3692 (home-page "https://github.com/libgit2/pygit2")
3693 (synopsis "Python bindings for libgit2")
3694 (description "Pygit2 is a set of Python bindings to the libgit2 shared
3695 library, libgit2 implements Git plumbing.")
3696 ;; GPL2.0 only, with linking exception.
3697 (license license:gpl2)))
3698
3699 (define-public python2-pygit2
3700 (package-with-python2 python-pygit2))
3701
3702 (define-public python-pyparsing
3703 (package
3704 (name "python-pyparsing")
3705 (version "2.3.1")
3706 (source
3707 (origin
3708 (method url-fetch)
3709 (uri (pypi-uri "pyparsing" version))
3710 (sha256
3711 (base32 "0yk6xl885b91dmlhlsap7x78hk2rdr879fln9anbq6k4ca42djb6"))))
3712 (build-system python-build-system)
3713 (outputs '("out" "doc"))
3714 (arguments
3715 `(#:tests? #f ; no test target
3716 #:phases
3717 (modify-phases %standard-phases
3718 (add-after 'install 'install-doc
3719 (lambda* (#:key outputs #:allow-other-keys)
3720 (let* ((doc (string-append (assoc-ref outputs "doc")
3721 "/share/doc/" ,name "-" ,version))
3722 (html-doc (string-append doc "/html"))
3723 (examples (string-append doc "/examples")))
3724 (mkdir-p html-doc)
3725 (mkdir-p examples)
3726 (for-each
3727 (lambda (dir tgt)
3728 (map (lambda (file)
3729 (install-file file tgt))
3730 (find-files dir ".*")))
3731 (list "docs" "htmldoc" "examples")
3732 (list doc html-doc examples))
3733 #t))))))
3734 (home-page "https://github.com/pyparsing/pyparsing")
3735 (synopsis "Python parsing class library")
3736 (description
3737 "The pyparsing module is an alternative approach to creating and
3738 executing simple grammars, vs. the traditional lex/yacc approach, or the use
3739 of regular expressions. The pyparsing module provides a library of classes
3740 that client code uses to construct the grammar directly in Python code.")
3741 (license license:expat)))
3742
3743 (define-public python2-pyparsing
3744 (package-with-python2 python-pyparsing))
3745
3746 (define-public python-numpydoc
3747 (package
3748 (name "python-numpydoc")
3749 (version "0.8.0")
3750 (source
3751 (origin
3752 (method url-fetch)
3753 (uri (pypi-uri "numpydoc" version))
3754 (sha256
3755 (base32
3756 "1zazxg3m8j4fksv3f7v7vpf4bj9qb1vj3r326am0vdip141vzx31"))))
3757 (build-system python-build-system)
3758 (propagated-inputs
3759 `(("python-sphinx" ,python-sphinx)))
3760 (native-inputs
3761 `(("python-nose" ,python-nose)))
3762 (home-page "https://pypi.python.org/pypi/numpydoc")
3763 (synopsis
3764 "Numpy's Sphinx extensions")
3765 (description
3766 "Sphinx extension to support docstrings in Numpy format.")
3767 (license license:bsd-2)))
3768
3769 (define-public python2-numpydoc
3770 (package-with-python2 python-numpydoc))
3771
3772 (define-public python-numexpr
3773 (package
3774 (name "python-numexpr")
3775 (version "2.6.5")
3776 (source
3777 (origin
3778 (method url-fetch)
3779 (uri (pypi-uri "numexpr" version))
3780 (sha256
3781 (base32
3782 "1frnbcwmsi312154x274xl28xazr1k8vjby83fwyla2n10a81bgq"))))
3783 (build-system python-build-system)
3784 (arguments `(#:tests? #f)) ; no tests included
3785 (propagated-inputs
3786 `(("python-numpy" ,python-numpy)))
3787 (home-page "https://github.com/pydata/numexpr")
3788 (synopsis "Fast numerical expression evaluator for NumPy")
3789 (description
3790 "Numexpr is a fast numerical expression evaluator for NumPy. With it,
3791 expressions that operate on arrays are accelerated and use less memory than
3792 doing the same calculation in Python. In addition, its multi-threaded
3793 capabilities can make use of all your cores, which may accelerate
3794 computations, most specially if they are not memory-bounded (e.g. those using
3795 transcendental functions).")
3796 (license license:expat)))
3797
3798 (define-public python2-numexpr
3799 (package-with-python2 python-numexpr))
3800
3801 (define-public python-cycler
3802 (package
3803 (name "python-cycler")
3804 (version "0.10.0")
3805 (source (origin
3806 (method url-fetch)
3807 (uri (pypi-uri "cycler" version))
3808 (sha256
3809 (base32
3810 "1n69n23fak1gjxlrbhqisi2b9pv3ckrfj98llx3p53953082syyd"))))
3811 (build-system python-build-system)
3812 (arguments
3813 ;; XXX: The current version requires 'coveralls' which we don't have.
3814 ;; Enable this for the next release which uses 'python-pytest'.
3815 '(#:tests? #f))
3816 (propagated-inputs
3817 `(("python-six" ,python-six)))
3818 (home-page "http://matplotlib.org/cycler/")
3819 (synopsis "Composable keyword argument iterator")
3820 (description
3821 "When using @code{matplotlib} and plotting more than one line, it is
3822 common to want to be able to want to be able to cycle over one or more artist
3823 styles; but the plotting logic can quickly become involved.
3824 To address this and enable easy cycling over arbitrary @code{kwargs}, the
3825 @code{Cycler} class was developed.")
3826 (license license:bsd-3)))
3827
3828 (define-public python2-cycler
3829 (package-with-python2 python-cycler))
3830
3831 (define-public python-colorspacious
3832 (package
3833 (name "python-colorspacious")
3834 (version "1.1.2")
3835 (source
3836 (origin
3837 (method git-fetch)
3838 (uri (git-reference
3839 (url "https://github.com/njsmith/colorspacious.git")
3840 (commit (string-append "v" version))))
3841 (file-name (git-file-name name version))
3842 (sha256
3843 (base32 "0x7nkphr6g5ql5fvgss8l56rgiyjgh6fm8zzs73i94ci9wzlm63w"))))
3844 (build-system python-build-system)
3845 (propagated-inputs
3846 `(("python-numpy" ,python-numpy)))
3847 (native-inputs
3848 `(("python-nose" ,python-nose)))
3849 (arguments
3850 `(#:phases
3851 (modify-phases %standard-phases
3852 (replace 'check
3853 (lambda _
3854 (invoke "nosetests" "--all-modules" "-v" "colorspacious"))))))
3855 (home-page "https://github.com/njsmith/colorspacious")
3856 (synopsis "Python library for colorspace conversions")
3857 (description "@code{colorspacious} is a Python library that lets you
3858 convert between colorspaces like sRGB, XYZ, CIEL*a*b*, CIECAM02, CAM02-UCS, etc.")
3859 (license license:expat)))
3860
3861 (define-public python2-colorspacious
3862 (package-with-python2 python-colorspacious))
3863
3864 (define-public python-matplotlib
3865 (package
3866 (name "python-matplotlib")
3867 (version "3.1.2")
3868 (source
3869 (origin
3870 (method url-fetch)
3871 (uri (pypi-uri "matplotlib" version))
3872 (sha256
3873 (base32
3874 "1nmshfqh7wyg15i16hx1yiylcvzkws29ivn66n3i0wyqwcpjr3lf"))))
3875 (build-system python-build-system)
3876 (propagated-inputs ; the following packages are all needed at run time
3877 `(("python-cycler" ,python-cycler)
3878 ("python-kiwisolver" ,python-kiwisolver)
3879 ("python-pyparsing" ,python-pyparsing)
3880 ("python-pygobject" ,python-pygobject)
3881 ("gobject-introspection" ,gobject-introspection)
3882 ("python-tkinter" ,python "tk")
3883 ("python-dateutil" ,python-dateutil)
3884 ("python-numpy" ,python-numpy)
3885 ("python-pillow" ,python-pillow)
3886 ("python-pytz" ,python-pytz)
3887 ("python-six" ,python-six)
3888 ;; From version 1.4.0 'matplotlib' makes use of 'cairocffi' instead of
3889 ;; 'pycairo'. However, 'pygobject' makes use of a 'pycairo' 'context'
3890 ;; object. For this reason we need to import both libraries.
3891 ;; https://cairocffi.readthedocs.io/en/stable/cffi_api.html#converting-pycairo-wrappers-to-cairocffi
3892 ("python-pycairo" ,python-pycairo)
3893 ("python-cairocffi" ,python-cairocffi)))
3894 (inputs
3895 `(("libpng" ,libpng)
3896 ("imagemagick" ,imagemagick)
3897 ("freetype" ,freetype)
3898 ("cairo" ,cairo)
3899 ("glib" ,glib)
3900 ;; FIXME: Add backends when available.
3901 ;("python-wxpython" ,python-wxpython)
3902 ("tcl" ,tcl)
3903 ("tk" ,tk)))
3904 (native-inputs
3905 `(("pkg-config" ,pkg-config)
3906 ("python-pytest" ,python-pytest)
3907 ("python-mock" ,python-mock)
3908 ("unzip" ,unzip)
3909 ("jquery-ui"
3910 ,(origin
3911 (method url-fetch)
3912 (uri "https://jqueryui.com/resources/download/jquery-ui-1.12.1.zip")
3913 (sha256
3914 (base32
3915 "0kb21xf38diqgxcdi1z3s9ssq36pldvyqxy56hn6pcva6rs3c8zq"))))))
3916 (arguments
3917 `(#:phases
3918 (modify-phases %standard-phases
3919 ;; XXX We disable all image comparison tests because we're using a
3920 ;; newer version of FreeType than matplotlib expects. This leads to
3921 ;; minor differences throughout the tests.
3922 (add-after 'unpack 'fix-and-disable-failing-tests
3923 (lambda _
3924 (substitute* (append (find-files "lib/matplotlib/tests/"
3925 "test_.*\\.py$")
3926 (find-files "lib/mpl_toolkits/tests"
3927 "test_.*\\.py$"))
3928 (("^from matplotlib" match)
3929 (string-append "import pytest\n" match))
3930 (("( *)@image_comparison" match indent)
3931 (string-append indent
3932 "@pytest.mark.skip(reason=\"unknown minor image differences\")\n"
3933 match)))
3934 (substitute* "lib/matplotlib/tests/test_animation.py"
3935 (("/bin/sh") (which "sh")))
3936 (for-each delete-file
3937 ;; test_normal_axes, test_get_tightbbox_polar
3938 '("lib/matplotlib/tests/test_axes.py"
3939 ;; We don't use the webagg backend and this test forces it.
3940 "lib/matplotlib/tests/test_backend_webagg.py"
3941 ;; test_outward_ticks
3942 "lib/matplotlib/tests/test_tightlayout.py"
3943 ;; test_hidden_axes fails with minor extent
3944 ;; differences, possibly due to the use of a
3945 ;; different version of FreeType.
3946 "lib/matplotlib/tests/test_constrainedlayout.py"
3947 ;; Fontconfig returns no fonts.
3948 "lib/matplotlib/tests/test_font_manager.py"))
3949 #t))
3950 (add-before 'install 'install-jquery-ui
3951 (lambda* (#:key outputs inputs #:allow-other-keys)
3952 (let ((dir (string-append (assoc-ref outputs "out")
3953 "/lib/python3.7/site-packages/matplotlib/backends/web_backend/")))
3954 (mkdir-p dir)
3955 (invoke "unzip"
3956 (assoc-ref inputs "jquery-ui")
3957 "-d" dir))
3958 #t))
3959 (replace 'check
3960 (lambda* (#:key outputs inputs #:allow-other-keys)
3961 (add-installed-pythonpath inputs outputs)
3962 (invoke "python" "tests.py" "-v"
3963 "-m" "not network and not webagg")))
3964 (add-before 'build 'configure-environment
3965 (lambda* (#:key outputs inputs #:allow-other-keys)
3966 (let ((cairo (assoc-ref inputs "cairo")))
3967 ;; Setting this directory in the 'basedirlist' of 'setup.cfg'
3968 ;; has not effect.
3969 (setenv "LD_LIBRARY_PATH" (string-append cairo "/lib"))
3970 (setenv "HOME" (getcwd))
3971 (call-with-output-file "setup.cfg"
3972 (lambda (port)
3973 (format port "[directories]~%
3974 basedirlist = ~a,~a~%
3975 [packages]~%
3976 tests = True~%"
3977 (assoc-ref inputs "tcl")
3978 (assoc-ref inputs "tk")))))
3979 #t)))))
3980 (home-page "https://matplotlib.org/")
3981 (synopsis "2D plotting library for Python")
3982 (description
3983 "Matplotlib is a Python 2D plotting library which produces publication
3984 quality figures in a variety of hardcopy formats and interactive environments
3985 across platforms. Matplotlib can be used in Python scripts, the python and
3986 ipython shell, web application servers, and six graphical user interface
3987 toolkits.")
3988 (license license:psfl)
3989 (properties `((python2-variant . ,(delay python2-matplotlib))))))
3990
3991 (define-public python2-matplotlib
3992 (let ((matplotlib (package-with-python2
3993 (strip-python2-variant python-matplotlib))))
3994 (package (inherit matplotlib)
3995 (version "2.2.4")
3996 (source
3997 (origin
3998 (method url-fetch)
3999 (uri (pypi-uri "matplotlib" version))
4000 (sha256
4001 (base32
4002 "09i1gnrra1590brc1f8d5rh2zvnknmfgzp613ab0462qkrwj15h2"))))
4003 (arguments
4004 (substitute-keyword-arguments (package-arguments matplotlib)
4005 ((#:phases phases)
4006 `(modify-phases ,phases
4007 (replace 'install-jquery-ui
4008 (lambda* (#:key outputs inputs #:allow-other-keys)
4009 (let ((dir (string-append (assoc-ref outputs "out")
4010 "/lib/python2.7/site-packages/"
4011 "matplotlib/backends/web_backend/")))
4012 (mkdir-p dir)
4013 (invoke "unzip"
4014 (assoc-ref inputs "jquery-ui")
4015 "-d" dir))
4016 #t))
4017 (delete 'fix-and-disable-failing-tests)
4018 (delete 'check))))) ; These tests weren't run the the past.
4019 ;; Make sure to use special packages for Python 2 instead
4020 ;; of those automatically rewritten by package-with-python2.
4021 (propagated-inputs
4022 `(("python2-pycairo" ,python2-pycairo)
4023 ("python2-backports-functools-lru-cache"
4024 ,python2-backports-functools-lru-cache)
4025 ("python2-functools32" ,python2-functools32)
4026 ("python2-pygobject-2" ,python2-pygobject-2)
4027 ("python2-subprocess32" ,python2-subprocess32)
4028 ("python2-tkinter" ,python-2 "tk")
4029 ,@(fold alist-delete (package-propagated-inputs matplotlib)
4030 '("python-pycairo" "python-pygobject" "python-tkinter")))))))
4031
4032 (define-public python-matplotlib-documentation
4033 (package
4034 (name "python-matplotlib-documentation")
4035 (version (package-version python-matplotlib))
4036 (source (package-source python-matplotlib))
4037 (build-system python-build-system)
4038 (native-inputs
4039 `(("python-matplotlib" ,python-matplotlib)
4040 ("python-colorspacious" ,python-colorspacious)
4041 ("python-sphinx" ,python-sphinx)
4042 ("python-sphinx-copybutton" ,python-sphinx-copybutton)
4043 ("python-sphinx-gallery" ,python-sphinx-gallery)
4044 ("python-numpydoc" ,python-numpydoc)
4045 ("python-ipython" ,python-ipython)
4046 ("python-ipykernel" ,python-ipykernel)
4047 ("python-mock" ,python-mock)
4048 ("graphviz" ,graphviz)
4049 ("texlive" ,(texlive-union (list texlive-amsfonts
4050 texlive-latex-amsmath
4051 texlive-latex-enumitem
4052 texlive-latex-expdlist
4053 texlive-latex-geometry
4054 texlive-latex-preview
4055 texlive-latex-type1cm
4056 texlive-latex-ucs
4057
4058 texlive-generic-pdftex
4059
4060 texlive-fonts-ec
4061 texlive-fonts-adobe-times
4062 texlive-fonts-txfonts)))
4063 ("texinfo" ,texinfo)
4064 ,@(package-native-inputs python-matplotlib)))
4065 (arguments
4066 `(#:tests? #f ; we're only generating documentation
4067 #:phases
4068 (modify-phases %standard-phases
4069 ;; The tests in python-matplotlib are run after the install phase, so
4070 ;; we need to delete the extra phase here.
4071 (delete 'check)
4072 (replace 'build
4073 (lambda _
4074 (chdir "doc")
4075 (setenv "PYTHONPATH"
4076 (string-append (getenv "PYTHONPATH")
4077 ":" (getcwd) "/../examples/units"))
4078 (substitute* "conf.py"
4079 ;; Don't use git.
4080 (("^SHA = check_output.*")
4081 (string-append "SHA = \"" ,version "\"\n"))
4082 ;; Don't fetch intersphinx files from the Internet
4083 (("^explicit_order_folders" m)
4084 (string-append "intersphinx_mapping = {}\n" m))
4085 (("'sphinx.ext.intersphinx',") "")
4086 ;; Disable URL embedding which requires internet access.
4087 (("'https://docs.scipy.org/doc/numpy'") "None")
4088 (("'https://docs.scipy.org/doc/scipy/reference'") "None"))
4089 (invoke "make"
4090 "SPHINXBUILD=sphinx-build"
4091 "SPHINXOPTS=" ; don't abort on warnings
4092 "html" "texinfo")))
4093 (replace 'install
4094 (lambda* (#:key inputs outputs #:allow-other-keys)
4095 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
4096 (doc (string-append data "/doc/python-matplotlib-" ,version))
4097 (info (string-append data "/info"))
4098 (html (string-append doc "/html")))
4099 (mkdir-p html)
4100 (mkdir-p info)
4101 (copy-recursively "build/html" html)
4102 (symlink (string-append html "/_images")
4103 (string-append info "/matplotlib-figures"))
4104 (with-directory-excursion "build/texinfo"
4105 (substitute* "matplotlib.texi"
4106 (("@image\\{([^,]*)" all file)
4107 (string-append "@image{matplotlib-figures/" file)))
4108 (symlink (string-append html "/_images")
4109 "./matplotlib-figures")
4110 (invoke "makeinfo" "--no-split"
4111 "-o" "matplotlib.info" "matplotlib.texi"))
4112 (install-file "build/texinfo/matplotlib.info" info))
4113 #t)))))
4114 (home-page (package-home-page python-matplotlib))
4115 (synopsis "Documentation for the python-matplotlib package")
4116 (description (package-description python-matplotlib))
4117 (license (package-license python-matplotlib))))
4118
4119 (define-public python2-matplotlib-documentation
4120 (let ((parent (package-with-python2 python-matplotlib-documentation)))
4121 (package
4122 (inherit parent)
4123 (native-inputs
4124 (alist-delete "python-sphinx-copybutton"
4125 (package-native-inputs parent))))))
4126
4127 (define-public python-matplotlib-venn
4128 (package
4129 (name "python-matplotlib-venn")
4130 (version "0.11.5")
4131 (source
4132 (origin
4133 (method url-fetch)
4134 (uri (pypi-uri "matplotlib-venn" version ".zip"))
4135 (sha256
4136 (base32
4137 "13w3i1wih0mij08hrgppzg0g9z50y54rc28l6gdi1r5w45l7l0dy"))))
4138 (build-system python-build-system)
4139 (arguments '(#:tests? #f)) ; tests are not included
4140 (propagated-inputs
4141 `(("python-matplotlib" ,python-matplotlib)
4142 ("python-numpy" ,python-numpy)
4143 ("python-scipy" ,python-scipy)))
4144 (native-inputs
4145 `(("unzip" ,unzip)))
4146 (home-page "https://github.com/konstantint/matplotlib-venn")
4147 (synopsis "Plot area-proportional Venn diagrams")
4148 (description
4149 "This package provides tools for plotting area-proportional two- and
4150 three-way Venn diagrams in @code{matplotlib}.")
4151 (license license:expat)))
4152
4153 (define-public python2-pysnptools
4154 (package
4155 (name "python2-pysnptools")
4156 (version "0.3.13")
4157 (source
4158 (origin
4159 (method url-fetch)
4160 (uri (pypi-uri "pysnptools" version))
4161 (sha256
4162 (base32
4163 "0lnis5xsl7bi0hz4f7gbicahzi5zlxkc21nk3g374xv8fb5hb3qm"))))
4164 (build-system python-build-system)
4165 (arguments
4166 `(#:python ,python-2 ; only Python 2.7 is supported
4167 #:tests? #f)) ; test files (e.g. examples/toydata.bim) not included
4168 (propagated-inputs
4169 `(("python2-numpy" ,python2-numpy)
4170 ("python2-scipy" ,python2-scipy)
4171 ("python2-pandas" ,python2-pandas)))
4172 (native-inputs
4173 `(("python2-cython" ,python2-cython)))
4174 (home-page "http://microsoftgenomics.github.io/PySnpTools/")
4175 (synopsis "Library for reading and manipulating genetic data")
4176 (description
4177 "PySnpTools is a library for reading and manipulating genetic data. It
4178 can, for example, efficiently read whole PLINK *.bed/bim/fam files or parts of
4179 those files. It can also efficiently manipulate ranges of integers using set
4180 operators such as union, intersection, and difference.")
4181 (license license:asl2.0)))
4182
4183 (define-public python-socksipy-branch
4184 (package
4185 (name "python-socksipy-branch")
4186 (version "1.01")
4187 (source
4188 (origin
4189 (method url-fetch)
4190 (uri (pypi-uri "SocksiPy-branch" version))
4191 (sha256
4192 (base32
4193 "01l41v4g7fy9fzvinmjxy6zcbhgqaif8dhdqm4w90fwcw9h51a8p"))))
4194 (build-system python-build-system)
4195 (arguments
4196 `(#:tests? #f)) ; There are no tests
4197 (home-page "https://code.google.com/archive/p/socksipy-branch/")
4198 (synopsis "Python SOCKS module")
4199 (description
4200 "SocksiPy - A Python SOCKS client module. It provides a
4201 socket-like interface that supports connections to any TCP
4202 service through the use of a SOCKS4, SOCKS5 or HTTP proxy.
4203 The original version was developed by Dan Haim, this is a
4204 branch created by Mario Vilas to address some open issues,
4205 as the original project seems to have been abandoned circa 2007.")
4206 (license license:bsd-3)))
4207
4208 (define-public python2-socksipy-branch
4209 (package-with-python2 python-socksipy-branch))
4210
4211 (define-public python-socksipychain
4212 (package
4213 (name "python-socksipychain")
4214 (version "2.1.0")
4215 (source
4216 (origin
4217 (method git-fetch)
4218 (uri (git-reference
4219 (url "https://github.com/pagekite/PySocksipyChain.git")
4220 (commit (string-append "v" version))))
4221 (file-name (git-file-name name version))
4222 (sha256
4223 (base32
4224 "0idm9a050rd2kbgbz2sk9ib9589kj4xh1xdnggs6xbq2v2y8f6zn"))))
4225 (build-system python-build-system)
4226 (arguments
4227 `(#:tests? #f)) ; Tests try to access the network.
4228 (home-page "http://pagekite.net/wiki/Floss/PySocksipyChain/")
4229 (synopsis "Python SOCKS module with chained proxies support")
4230 (description
4231 "SocksiPyChain is a modified version of the SocksiPy SOCKS module, which
4232 adds support for arbitrary chaining of proxy servers and various modes of
4233 TLS/SSL encryption. It was developed for use in PageKite, and also includes
4234 a simple netcat replacement with chaining support.")
4235 (license license:bsd-3)))
4236
4237 (define-public python-pycodestyle
4238 (package
4239 (name "python-pycodestyle")
4240 (version "2.5.0")
4241 (source
4242 (origin
4243 (method url-fetch)
4244 (uri (pypi-uri "pycodestyle" version))
4245 (sha256
4246 (base32
4247 "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4"))))
4248 (build-system python-build-system)
4249 (home-page "https://pycodestyle.readthedocs.io/")
4250 (synopsis "Python style guide checker")
4251 (description "@code{pycodestyle} (formerly pep8) is a tool to check
4252 Python code against some of the style conventions in
4253 @url{http://www.python.org/dev/peps/pep-0008/,PEP 8}.")
4254 (license license:expat)))
4255
4256 (define-public python2-pycodestyle
4257 (package-with-python2 python-pycodestyle))
4258
4259 (define-public python-multidict
4260 (package
4261 (name "python-multidict")
4262 (version "4.2.0")
4263 (source
4264 (origin
4265 (method url-fetch)
4266 (uri (pypi-uri "multidict" version))
4267 (sha256
4268 (base32
4269 "1vf5bq8hn5a9rvhr5v4fwbmarfsp35hhr8gs74kqfijy34j2f194"))))
4270 (build-system python-build-system)
4271 (native-inputs
4272 `(("python-pytest" ,python-pytest)
4273 ("python-pytest-runner" ,python-pytest-runner)))
4274 (home-page "https://github.com/aio-libs/multidict/")
4275 (synopsis "Multidict implementation")
4276 (description "Multidict is dict-like collection of key-value pairs
4277 where key might be occurred more than once in the container.")
4278 (license license:asl2.0)))
4279
4280 (define-public python-orderedmultidict
4281 (package
4282 (name "python-orderedmultidict")
4283 (version "0.7.11")
4284 (source
4285 (origin
4286 (method url-fetch)
4287 (uri (pypi-uri "orderedmultidict" version))
4288 (sha256
4289 (base32
4290 "0dls862ibm7qbq4fnvwx0xn1v9hwyzywbff8xjjdr42dd75208yw"))))
4291 (build-system python-build-system)
4292 (arguments
4293 `(#:phases
4294 (modify-phases %standard-phases
4295 (add-after 'unpack 'fix-tests
4296 (lambda _
4297 ;; The package uses nosetest for running the tests.
4298 ;; Adding this initfile allows to run the test suite
4299 ;; without requiring nosetest.
4300 (with-output-to-file "tests/__init__.py" newline)
4301 #t)))))
4302 (propagated-inputs
4303 `(("python-six" ,python-six)))
4304 (native-inputs
4305 `(("python-pycodestyle" ,python-pycodestyle)))
4306 (home-page "https://github.com/gruns/orderedmultidict")
4307 (synopsis "Python Ordered Multivalue Dictionary - omdict")
4308 (description "This package contains a library for ordered multivalue
4309 dictionaries. A multivalue dictionary is a dictionary that can store
4310 multiple values for the same key. An ordered multivalue dictionary is a
4311 multivalue dictionary that retains the order of insertions and deletions.")
4312 (license license:unlicense)))
4313
4314 (define-public python2-orderedmultidict
4315 (package-with-python2 python-orderedmultidict))
4316
4317 (define-public python-autopep8
4318 (package
4319 (name "python-autopep8")
4320 (version "1.3.5")
4321 (source
4322 (origin
4323 (method url-fetch)
4324 (uri (pypi-uri "autopep8" version))
4325 (sha256
4326 (base32
4327 "192bvhzi4d0claqxgzymvv7k3qnj627742bc8sgxpzjj42pd9112"))))
4328 (build-system python-build-system)
4329 (propagated-inputs
4330 `(("python-pycodestyle" ,python-pycodestyle)))
4331 (home-page "https://github.com/hhatto/autopep8")
4332 (synopsis "Format Python code according to the PEP 8 style guide")
4333 (description
4334 "@code{autopep8} automatically formats Python code to conform to
4335 the PEP 8 style guide. It uses the pycodestyle utility to determine
4336 what parts of the code needs to be formatted. @code{autopep8} is
4337 capable of fixing most of the formatting issues that can be reported
4338 by pycodestyle.")
4339 (license (license:non-copyleft
4340 "https://github.com/hhatto/autopep8/blob/master/LICENSE"))))
4341
4342 (define-public python2-autopep8
4343 (package-with-python2 python-autopep8))
4344
4345 (define-public python-distutils-extra
4346 (package
4347 (name "python-distutils-extra")
4348 (version "2.38")
4349 (source
4350 (origin
4351 (method url-fetch)
4352 (uri (string-append "https://launchpad.net/python-distutils-extra/trunk/"
4353 version "/+download/python-distutils-extra-"
4354 version ".tar.gz"))
4355 (sha256
4356 (base32
4357 "0lx15kcbby9zisx33p2h5hgakgwh2bvh0ibag8z0px4j6ifhs41x"))))
4358 (build-system python-build-system)
4359 (home-page "https://launchpad.net/python-distutils-extra/")
4360 (synopsis "Enhancements to Python's distutils")
4361 (description
4362 "The python-distutils-extra module enables you to easily integrate
4363 gettext support, themed icons, and scrollkeeper-based documentation into
4364 Python's distutils.")
4365 (license license:gpl2)))
4366
4367 (define-public python2-distutils-extra
4368 (package-with-python2 python-distutils-extra))
4369
4370 (define-public python2-elib.intl
4371 (package
4372 (name "python2-elib.intl")
4373 (version "0.0.3")
4374 (source
4375 (origin
4376 ;; This project doesn't tag releases or publish tarballs, so we take
4377 ;; source from a (semi-arbitrary, i.e. latest as of now) git commit.
4378 (method git-fetch)
4379 (uri (git-reference
4380 (url "https://github.com/dieterv/elib.intl.git")
4381 (commit "d09997cfef")))
4382 (file-name (string-append name "-" version "-checkout"))
4383 (sha256
4384 (base32
4385 "0y7vzff9xgbnaay7m0va1arl6g68ncwrvbgwl7jqlclsahzzb09d"))))
4386 (build-system python-build-system)
4387 (arguments
4388 ;; incompatible with Python 3 (exception syntax)
4389 `(#:python ,python-2
4390 #:tests? #f))
4391 (home-page "https://github.com/dieterv/elib.intl")
4392 (synopsis "Enhanced internationalization for Python")
4393 (description
4394 "The elib.intl module provides enhanced internationalization (I18N)
4395 services for your Python modules and applications.")
4396 (license license:lgpl3+)))
4397
4398 (define-public python-olefile
4399 (package
4400 (name "python-olefile")
4401 (version "0.46")
4402 (source
4403 (origin
4404 (method url-fetch)
4405 (uri (string-append "https://github.com/decalage2/olefile/releases/"
4406 "download/v" version "/olefile-" version ".tar.gz"))
4407 (file-name (string-append name "-" version ".tar.gz"))
4408 (sha256
4409 (base32
4410 "1kjxh4gr651hpqkjfv89cfzr40hyvf3vjlda7mifiail83j7j07m"))))
4411 (build-system python-build-system)
4412 (home-page "https://www.decalage.info/python/olefileio")
4413 (synopsis "Read and write Microsoft OLE2 files.")
4414 (description
4415 "@code{olefile} can parse, read and write Microsoft OLE2 files (Structured
4416 Storage or Compound Document, Microsoft Office). It is an improved version of
4417 the OleFileIO module from PIL, the Python Image Library.")
4418 (license license:bsd-3)))
4419
4420 (define-public python2-olefile
4421 (package-with-python2 python-olefile))
4422
4423 (define-public python-pillow
4424 (package
4425 (name "python-pillow")
4426 (version "6.2.1")
4427 (source
4428 (origin
4429 (method url-fetch)
4430 (uri (pypi-uri "Pillow" version))
4431 (sha256
4432 (base32
4433 "1c8wkzc58f5wdh006jvmwdk3wxld1xgagcbdvj7iv17qi0m9fkmz"))))
4434 (build-system python-build-system)
4435 (native-inputs
4436 `(("python-pytest" ,python-pytest)))
4437 (inputs
4438 `(("freetype" ,freetype)
4439 ("lcms" ,lcms)
4440 ("libjpeg" ,libjpeg)
4441 ("libtiff" ,libtiff)
4442 ("libwebp" ,libwebp)
4443 ("openjpeg" ,openjpeg)
4444 ("zlib" ,zlib)))
4445 (propagated-inputs
4446 `(("python-olefile" ,python-olefile)))
4447 (arguments
4448 `(#:phases
4449 (modify-phases %standard-phases
4450 (add-after 'unpack 'patch-ldconfig
4451 (lambda _
4452 (substitute* "setup.py"
4453 (("\\['/sbin/ldconfig', '-p'\\]") "['true']"))))
4454 (replace 'check
4455 (lambda* (#:key outputs inputs tests? #:allow-other-keys)
4456 (if tests?
4457 (begin
4458 (setenv "HOME" (getcwd))
4459 ;; Make installed package available for running the tests.
4460 (add-installed-pythonpath inputs outputs)
4461 (invoke "python" "selftest.py" "--installed")
4462 (invoke "python" "-m" "pytest" "-vv"))
4463 #t))))))
4464 (home-page "https://python-pillow.org")
4465 (synopsis "Fork of the Python Imaging Library")
4466 (description
4467 "The Python Imaging Library adds image processing capabilities to your
4468 Python interpreter. This library provides extensive file format support, an
4469 efficient internal representation, and fairly powerful image processing
4470 capabilities. The core image library is designed for fast access to data
4471 stored in a few basic pixel formats. It should provide a solid foundation for
4472 a general image processing tool.")
4473 (license (license:x11-style
4474 "http://www.pythonware.com/products/pil/license.htm"
4475 "The PIL Software License"))))
4476
4477 (define-public python2-pillow
4478 (package-with-python2 python-pillow))
4479
4480 (define-public python-pycparser
4481 (package
4482 (name "python-pycparser")
4483 (version "2.19")
4484 (source
4485 (origin
4486 (method url-fetch)
4487 (uri (pypi-uri "pycparser" version))
4488 (sha256
4489 (base32
4490 "1cr5dcj9628lkz1qlwq3fv97c25363qppkmcayqvd05dpy573259"))))
4491 (outputs '("out" "doc"))
4492 (build-system python-build-system)
4493 (native-inputs
4494 `(("pkg-config" ,pkg-config)))
4495 (arguments
4496 `(#:phases
4497 (modify-phases %standard-phases
4498 (replace 'check
4499 (lambda _
4500 (with-directory-excursion "tests"
4501 (invoke "python" "all_tests.py"))
4502 #t))
4503 (add-after 'install 'install-doc
4504 (lambda* (#:key outputs #:allow-other-keys)
4505 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4506 (doc (string-append data "/doc/" ,name "-" ,version))
4507 (examples (string-append doc "/examples")))
4508 (mkdir-p examples)
4509 (for-each (lambda (file)
4510 (copy-file (string-append "." file)
4511 (string-append doc file)))
4512 '("/README.rst" "/CHANGES" "/LICENSE"))
4513 (copy-recursively "examples" examples)
4514 #t))))))
4515 (home-page "https://github.com/eliben/pycparser")
4516 (synopsis "C parser in Python")
4517 (description
4518 "Pycparser is a complete parser of the C language, written in pure Python
4519 using the PLY parsing library. It parses C code into an AST and can serve as
4520 a front-end for C compilers or analysis tools.")
4521 (license license:bsd-3)))
4522
4523 (define-public python2-pycparser
4524 (package-with-python2 python-pycparser))
4525
4526 (define-public python-pywavelets
4527 (package
4528 (name "python-pywavelets")
4529 (version "1.0.1")
4530 (home-page "https://github.com/PyWavelets/pywt")
4531 (source (origin
4532 (method url-fetch)
4533 (uri (pypi-uri "PyWavelets" version))
4534 (sha256
4535 (base32
4536 "1p3qv2v66ghnqrb1f98wyyhp9dz71jwcd6kfpsax65sfdpiyqp1w"))))
4537 (build-system python-build-system)
4538 (arguments
4539 '(#:modules ((ice-9 ftw)
4540 (srfi srfi-1)
4541 (srfi srfi-26)
4542 (guix build utils)
4543 (guix build python-build-system))
4544 #:phases (modify-phases %standard-phases
4545 (replace 'check
4546 (lambda _
4547 (let ((cwd (getcwd))
4548 (libdir (find (cut string-prefix? "lib." <>)
4549 (scandir "build"))))
4550 (with-directory-excursion (string-append cwd "/build/" libdir)
4551 (invoke "nosetests" "-v" "."))))))))
4552 (native-inputs
4553 `(("python-matplotlib" ,python-matplotlib) ;for tests
4554 ("python-nose" ,python-nose)))
4555 (propagated-inputs
4556 `(("python-numpy" ,python-numpy)))
4557 (synopsis "Wavelet transforms in Python")
4558 (description
4559 "PyWavelets is a library for wavelet transforms in Python. Wavelets are
4560 mathematical basis functions that are localized in both time and frequency.
4561 Wavelet transforms are time-frequency transforms employing wavelets. They are
4562 similar to Fourier transforms, the difference being that Fourier transforms are
4563 localized only in frequency instead of in time and frequency.")
4564 (license license:expat)))
4565
4566 (define-public python2-pywavelets
4567 (package-with-python2 python-pywavelets))
4568
4569 (define-public python-xcffib
4570 (package
4571 (name "python-xcffib")
4572 (version "0.6.0")
4573 (source
4574 (origin
4575 (method url-fetch)
4576 (uri (pypi-uri "xcffib" version))
4577 (sha256
4578 (base32
4579 "04k91yxyb3pgc5lvxmivh8w71yjrap2g57yk3s73x4rm4nvjq51n"))))
4580 (build-system python-build-system)
4581 (inputs
4582 `(("libxcb" ,libxcb)))
4583 (propagated-inputs
4584 `(("python-cffi" ,python-cffi) ; used at run time
4585 ("python-six" ,python-six)))
4586 (arguments
4587 `(;; FIXME: Tests need more work. See ".travis.yml" in the repository.
4588 #:tests? #f
4589 #:phases
4590 (modify-phases %standard-phases
4591 (add-after 'unpack 'fix-libxcb-path
4592 (lambda* (#:key inputs #:allow-other-keys)
4593 (let ((libxcb (assoc-ref inputs "libxcb")))
4594 (substitute* '("xcffib/__init__.py")
4595 (("^soname = \"") (string-append "soname = \"" libxcb "/lib/")))
4596 #t)))
4597 (add-after 'install 'install-doc
4598 (lambda* (#:key outputs #:allow-other-keys)
4599 (let ((doc (string-append (assoc-ref outputs "out") "/share"
4600 "/doc/" ,name "-" ,version)))
4601 (mkdir-p doc)
4602 (copy-file "README.md"
4603 (string-append doc "/README.md"))
4604 #t))))))
4605 (home-page "https://github.com/tych0/xcffib")
4606 (synopsis "XCB Python bindings")
4607 (description
4608 "Xcffib is a replacement for xpyb, an XCB Python bindings. It adds
4609 support for Python 3 and PyPy. It is based on cffi.")
4610 (license license:expat)))
4611
4612 (define-public python2-xcffib
4613 (package-with-python2 python-xcffib))
4614
4615 (define-public python-cairocffi
4616 (package
4617 (name "python-cairocffi")
4618 (version "0.9.0")
4619 (source
4620 (origin
4621 (method url-fetch)
4622 (uri (pypi-uri "cairocffi" version))
4623 (sha256
4624 (base32
4625 "0dq3k4zhqd8cwsf3nyjqvjqm8wkvrjn1wjf44rl3v0h8kqx6qf0m"))
4626 (patches (search-patches "python-cairocffi-dlopen-path.patch"))))
4627 (build-system python-build-system)
4628 (outputs '("out" "doc"))
4629 (inputs
4630 `(("glib" ,glib)
4631 ("gtk+" ,gtk+)
4632 ("gdk-pixbuf" ,gdk-pixbuf)
4633 ("cairo" ,cairo)
4634 ("pango" ,pango)))
4635 (native-inputs
4636 `(("pkg-config" ,pkg-config)
4637 ("python-pytest" ,python-pytest)
4638 ("python-pytest-cov" ,python-pytest-cov)
4639 ("python-pytest-runner" ,python-pytest-runner)
4640 ("python-sphinx" ,python-sphinx)
4641 ("python-docutils" ,python-docutils)))
4642 (propagated-inputs
4643 `(("python-xcffib" ,python-xcffib))) ; used at run time
4644 (arguments
4645 `(#:phases
4646 (modify-phases %standard-phases
4647 (add-after 'unpack 'patch-paths
4648 (lambda* (#:key inputs outputs #:allow-other-keys)
4649 (substitute* (find-files "." "\\.py$")
4650 (("dlopen\\(ffi, 'cairo'")
4651 (string-append "dlopen(ffi, '" (assoc-ref inputs "cairo")
4652 "/lib/libcairo.so.2'"))
4653 (("dlopen\\(ffi, 'gdk-3'")
4654 (string-append "dlopen(ffi, '" (assoc-ref inputs "gtk+")
4655 "/lib/libgtk-3.so.0'"))
4656 (("dlopen\\(ffi, 'gdk_pixbuf-2.0'")
4657 (string-append "dlopen(ffi, '" (assoc-ref inputs "gdk-pixbuf")
4658 "/lib/libgdk_pixbuf-2.0.so.0'"))
4659 (("dlopen\\(ffi, 'glib-2.0'")
4660 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4661 "/lib/libglib-2.0.so.0'"))
4662 (("dlopen\\(ffi, 'gobject-2.0'")
4663 (string-append "dlopen(ffi, '" (assoc-ref inputs "glib")
4664 "/lib/libgobject-2.0.so.0'"))
4665 (("dlopen\\(ffi, 'pangocairo-1.0'")
4666 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4667 "/lib/libpangocairo-1.0.so.0'"))
4668 (("dlopen\\(ffi, 'pango-1.0'")
4669 (string-append "dlopen(ffi, '" (assoc-ref inputs "pango")
4670 "/lib/libpango-1.0.so.0'")))
4671 #t))
4672 (add-after 'install 'install-doc
4673 (lambda* (#:key inputs outputs #:allow-other-keys)
4674 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
4675 (doc (string-append data "/doc/" ,name "-" ,version))
4676 (html (string-append doc "/html")))
4677 (setenv "LD_LIBRARY_PATH"
4678 (string-append (assoc-ref inputs "cairo") "/lib" ":"
4679 (assoc-ref inputs "gdk-pixbuf") "/lib"))
4680 (setenv "LANG" "en_US.UTF-8")
4681 (mkdir-p html)
4682 (for-each (lambda (file)
4683 (copy-file (string-append "." file)
4684 (string-append doc file)))
4685 '("/README.rst" "/CHANGES" "/LICENSE"))
4686 (system* "python" "setup.py" "build_sphinx")
4687 (copy-recursively "docs/_build/html" html)
4688 #t))))))
4689 (home-page "https://github.com/Kozea/cairocffi")
4690 (synopsis "Python bindings and object-oriented API for Cairo")
4691 (description
4692 "Cairocffi is a CFFI-based drop-in replacement for Pycairo, a set of
4693 Python bindings and object-oriented API for cairo. Cairo is a 2D vector
4694 graphics library with support for multiple backends including image buffers,
4695 PNG, PostScript, PDF, and SVG file output.")
4696 (license license:bsd-3)))
4697
4698 (define-public python2-cairocffi
4699 (package-with-python2 python-cairocffi))
4700
4701 (define-public python-decorator
4702 (package
4703 (name "python-decorator")
4704 (version "4.3.0")
4705 (source
4706 (origin
4707 (method url-fetch)
4708 (uri (pypi-uri "decorator" version))
4709 (sha256
4710 (base32 "0308djallnh00v112y5b7nadl657ysmkp6vc8xn51d6yzc9zm7n3"))))
4711 (build-system python-build-system)
4712 (home-page "https://pypi.python.org/pypi/decorator/")
4713 (synopsis "Python module to simplify usage of decorators")
4714 (description
4715 "The aim of the decorator module is to simplify the usage of decorators
4716 for the average programmer, and to popularize decorators usage giving examples
4717 of useful decorators, such as memoize, tracing, redirecting_stdout, locked,
4718 etc. The core of this module is a decorator factory.")
4719 (license license:expat)))
4720
4721 (define-public python2-decorator
4722 (package-with-python2 python-decorator))
4723
4724 (define-public python-drmaa
4725 (package
4726 (name "python-drmaa")
4727 (version "0.7.7")
4728 (source
4729 (origin
4730 (method url-fetch)
4731 (uri (pypi-uri "drmaa" version))
4732 (sha256
4733 (base32 "0xzqriqyvk5b8hszbavsyxd29wm3sxirm8zvvdm73rs2iq7w4hkx"))))
4734 (build-system python-build-system)
4735 ;; The test suite requires libdrmaa which is provided by the cluster
4736 ;; environment. At runtime the environment variable DRMAA_LIBRARY_PATH
4737 ;; should be set to the path of the libdrmaa library.
4738 (arguments '(#:tests? #f))
4739 (native-inputs
4740 `(("python-nose" ,python-nose)))
4741 (home-page "https://pypi.python.org/pypi/drmaa")
4742 (synopsis "Python bindings for the DRMAA library")
4743 (description
4744 "A Python package for Distributed Resource Management (DRM) job
4745 submission and control. This package is an implementation of the DRMAA 1.0
4746 Python language binding specification.")
4747 (license license:bsd-3)))
4748
4749 (define-public python2-drmaa
4750 (package-with-python2 python-drmaa))
4751
4752 (define-public python-grako
4753 (package
4754 (name "python-grako")
4755 (version "3.99.9")
4756 (source
4757 (origin
4758 (method url-fetch)
4759 (uri
4760 (pypi-uri "grako" version ".zip"))
4761 (sha256
4762 (base32
4763 "0r63i68wcnv63rfjkasq1ah81frz61a6mzbcnaxhrkdpx84p7hzw"))))
4764 (build-system python-build-system)
4765 (arguments '(#:tests? #f)) ; Test file 'grako.ebnf' is missing from archive.
4766 (native-inputs
4767 `(("unzip" ,unzip)
4768 ("python-pytest" ,python-pytest)
4769 ("python-pytest-runner" ,python-pytest-runner)))
4770 (home-page "https://bitbucket.org/neogeny/grako")
4771 (synopsis "EBNF parser generator")
4772 (description
4773 "Grako takes a grammar in a variation of EBNF as input, and outputs a
4774 memoizing PEG/Packrat parser in Python.")
4775 (license license:bsd-3)))
4776
4777 (define-public python2-grako
4778 (package-with-python2 python-grako))
4779
4780 (define-public python-gridmap
4781 (package
4782 (name "python-gridmap")
4783 (version "0.13.0")
4784 (source
4785 (origin
4786 (method git-fetch)
4787 (uri (git-reference
4788 (url "https://github.com/pygridtools/gridmap.git")
4789 (commit (string-append "v" version))))
4790 (file-name (git-file-name name version))
4791 (sha256
4792 (base32 "1478lbwsr1w24cii2x01m2910fvh8r43ghnb78nc972a96hqiknm"))))
4793 (build-system python-build-system)
4794 (arguments
4795 '(#:tests? #f)) ; FIXME: Requires python-cherrypy.
4796 (propagated-inputs
4797 `(("python-psutil" ,python-psutil)
4798 ("python-drmaa" ,python-drmaa)
4799 ("python-pyzmq" ,python-pyzmq)))
4800 (home-page "https://github.com/pygridtools/gridmap")
4801 (synopsis "Create jobs on a cluster directly from Python")
4802 (description
4803 "Gridmap is a Python package to allow you to easily create jobs on the
4804 cluster directly from Python. You can directly map Python functions onto the
4805 cluster without needing to write any wrapper code yourself.")
4806 (license license:gpl3+)))
4807
4808 (define-public python2-gridmap
4809 (package-with-python2 python-gridmap))
4810
4811 (define-public python-honcho
4812 (package
4813 (name "python-honcho")
4814 (version "1.0.1")
4815 (source
4816 (origin
4817 (method git-fetch)
4818 (uri (git-reference
4819 (url "https://github.com/nickstenning/honcho.git")
4820 (commit (string-append "v" version))))
4821 (file-name (git-file-name name version))
4822 (sha256
4823 (base32 "11bd87474qpif20xdcn0ra1idj5k16ka51i658wfpxwc6nzsn92b"))))
4824 (build-system python-build-system)
4825 (native-inputs
4826 `(("python-pytest" ,python-pytest)
4827 ("python-mock" ,python-mock)
4828 ("python-tox" ,python-tox)
4829 ("which" ,which))) ;for tests
4830 (propagated-inputs
4831 `(("python-jinja2" ,python-jinja2)))
4832 (arguments
4833 `(#:phases
4834 (modify-phases %standard-phases
4835 (delete 'check)
4836 (add-after 'install 'check
4837 (lambda* (#:key outputs inputs #:allow-other-keys)
4838 ;; fix honcho path in testsuite
4839 (substitute* "tests/conftest.py"
4840 (("'honcho'") (string-append "'" (assoc-ref outputs "out")
4841 "/bin/honcho" "'")))
4842 ;; It's easier to run tests after install.
4843 ;; Make installed package available for running the tests
4844 (add-installed-pythonpath inputs outputs)
4845 (invoke "py.test" "-v"))))))
4846 (home-page "https://github.com/nickstenning/honcho")
4847 (synopsis "Manage Procfile-based applications")
4848 (description
4849 "A Procfile is a file which describes how to run an application
4850 consisting of several processes. honcho starts all listed processes.
4851 The output of all running processes is collected by honcho and
4852 displayed.")
4853 (license license:expat)))
4854
4855 (define-public python2-honcho
4856 (package-with-python2 python-honcho))
4857
4858 (define-public python-pexpect
4859 (package
4860 (name "python-pexpect")
4861 (version "4.6.0")
4862 (source
4863 (origin
4864 (method url-fetch)
4865 (uri (pypi-uri "pexpect" version))
4866 (sha256
4867 (base32 "1fla85g47iaxxpjhp9vkxdnv4pgc7rplfy6ja491smrrk0jqi3ia"))))
4868 (build-system python-build-system)
4869 (arguments
4870 `(#:phases
4871 (modify-phases %standard-phases
4872 (add-before 'check 'prepare-tests
4873 (lambda _
4874 (substitute* (find-files "tests")
4875 (("/bin/ls") (which "ls"))
4876 (("/bin/echo") (which "echo"))
4877 (("/bin/which") (which "which"))
4878 ;; Many tests try to use the /bin directory which
4879 ;; is not present in the build environment.
4880 ;; Use one that's non-empty and unlikely to change.
4881 (("/bin'") "/dev'"))
4882 ;; XXX: Socket connection test gets "Connection reset by peer".
4883 ;; Why does it not work? Delete for now.
4884 (delete-file "tests/test_socket.py")
4885 #t))
4886 (replace 'check (lambda _ (invoke "nosetests" "-v"))))))
4887 (native-inputs
4888 `(("python-nose" ,python-nose)
4889 ("python-pytest" ,python-pytest)
4890 ("man-db" ,man-db)
4891 ("which" ,which)
4892 ("bash-full" ,bash))) ;full Bash for 'test_replwrap.py'
4893 (propagated-inputs
4894 `(("python-ptyprocess" ,python-ptyprocess)))
4895 (home-page "http://pexpect.readthedocs.org/")
4896 (synopsis "Controlling interactive console applications")
4897 (description
4898 "Pexpect is a pure Python module for spawning child applications;
4899 controlling them; and responding to expected patterns in their output.
4900 Pexpect works like Don Libes’ Expect. Pexpect allows your script to spawn a
4901 child application and control it as if a human were typing commands.")
4902 (license license:isc)))
4903
4904 (define-public python2-pexpect
4905 (package-with-python2 python-pexpect))
4906
4907 (define-public python-setuptools-scm
4908 (package
4909 (name "python-setuptools-scm")
4910 (version "3.2.0")
4911 (source (origin
4912 (method url-fetch)
4913 (uri (pypi-uri "setuptools_scm" version))
4914 (sha256
4915 (base32
4916 "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj"))))
4917 (build-system python-build-system)
4918 (home-page "https://github.com/pypa/setuptools_scm/")
4919 (synopsis "Manage Python package versions in SCM metadata")
4920 (description
4921 "Setuptools_scm handles managing your Python package versions in
4922 @dfn{software configuration management} (SCM) metadata instead of declaring
4923 them as the version argument or in a SCM managed file.")
4924 (license license:expat)))
4925
4926 ;; Needed by python-lazy-object-proxy, remove on next update cycle.
4927 (define-public python-setuptools-scm-3.3
4928 (package
4929 (inherit python-setuptools-scm)
4930 (version "3.3.3")
4931 (source (origin
4932 (method url-fetch)
4933 (uri (pypi-uri "setuptools_scm" version))
4934 (sha256
4935 (base32
4936 "19cyndx23xmpbhz4qrwmfwsmnnaczd0dw7qg977ksq2dbvxy29dx"))))))
4937
4938 (define-public python2-setuptools-scm
4939 (package-with-python2 python-setuptools-scm))
4940
4941 (define-public python-pathlib2
4942 (package
4943 (name "python-pathlib2")
4944 (version "2.3.3")
4945 (source
4946 (origin
4947 (method url-fetch)
4948 (uri (pypi-uri "pathlib2" version))
4949 (sha256
4950 (base32
4951 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
4952 (build-system python-build-system)
4953 (propagated-inputs
4954 `(("python-scandir" ,python-scandir)
4955 ("python-six" ,python-six)))
4956 (home-page "https://pypi.python.org/pypi/pathlib2/")
4957 (synopsis "Object-oriented file system paths")
4958 (description "The goal of pathlib2 is to provide a backport of the
4959 standard @code{pathlib} module which tracks the standard library module, so
4960 all the newest features of the standard @code{pathlib} can be used also on
4961 older Python versions.")
4962 (license license:expat)))
4963
4964 (define-public python-importlib-metadata
4965 (package
4966 (name "python-importlib-metadata")
4967 (version "0.23")
4968 (source
4969 (origin
4970 (method url-fetch)
4971 (uri (pypi-uri "importlib_metadata" version))
4972 (sha256
4973 (base32 "09mdqdfv5rdrwz80jh9m379gxmvk2vhjfz0fg53hid00icvxf65a"))))
4974 (build-system python-build-system)
4975 (propagated-inputs
4976 `(("python-configparser" ,python-configparser)
4977 ("python-contextlib2" ,python-contextlib2)
4978 ("python-docutils" ,python-docutils)
4979 ("python-pathlib2" ,python-pathlib2)
4980 ("python-rst.linker" ,python-rst.linker)
4981 ("python-zipp" ,python-zipp)))
4982 (native-inputs
4983 `(("python-setuptools-scm" ,python-setuptools-scm)
4984 ("python-sphinx" ,python-sphinx)))
4985 (home-page "https://importlib-metadata.readthedocs.io/")
4986 (synopsis "Read metadata from Python packages")
4987 (description
4988 "@code{importlib_metadata} is a library which provides an API for
4989 accessing an installed Python package's metadata, such as its entry points or
4990 its top-level name. This functionality intends to replace most uses of
4991 @code{pkg_resources} entry point API and metadata API. Along with
4992 @code{importlib.resources} in Python 3.7 and newer, this can eliminate the
4993 need to use the older and less efficient @code{pkg_resources} package.")
4994 (license license:asl2.0)))
4995
4996 (define-public python-jaraco-packaging
4997 (package
4998 (name "python-jaraco-packaging")
4999 (version "6.1")
5000 (source
5001 (origin
5002 (method url-fetch)
5003 (uri (pypi-uri "jaraco.packaging" version))
5004 (sha256
5005 (base32
5006 "0zimrnkh33b9g8ffw11mjh6kvs54cy5gcjw1h5cl1r7dc833dmkm"))))
5007 (build-system python-build-system)
5008 (propagated-inputs
5009 `(("python-pytest" ,python-pytest)
5010 ("python-pytest-checkdocs" ,python-pytest-checkdocs)
5011 ("python-pytest-flake8" ,python-pytest-flake8)
5012 ("python-rst.linker" ,python-rst.linker)
5013 ("python-setuptools" ,python-setuptools)
5014 ("python-setuptools-scm" ,python-setuptools-scm)
5015 ("python-six" ,python-six)
5016 ("python-sphinx" ,python-sphinx)))
5017 (home-page "https://github.com/jaraco/jaraco.packaging")
5018 (synopsis "Tools to supplement packaging Python releases")
5019 (description
5020 "This package provides various tools to supplement packaging Python
5021 releases.")
5022 (license license:expat)))
5023
5024 (define-public python-pathpy
5025 (package
5026 (name "python-pathpy")
5027 (version "11.5.1")
5028 (source
5029 (origin
5030 (method url-fetch)
5031 (uri (pypi-uri "path.py" version))
5032 (sha256
5033 (base32 "0ir9j1haq2jbi7aip6k2fa9l7q1l03k4hp1awxhjhcwzsnwp3ll8"))))
5034 (outputs '("out" "doc"))
5035 (build-system python-build-system)
5036 (propagated-inputs
5037 `(("python-appdirs" ,python-appdirs)
5038 ("python-importlib-metadata" ,python-importlib-metadata)))
5039 (native-inputs
5040 `(("python-setuptools-scm" ,python-setuptools-scm)
5041 ("python-sphinx" ,python-sphinx)
5042 ("python-rst.linker" ,python-rst.linker)
5043 ("python-pytest" ,python-pytest)
5044 ("python-pytest-runner" ,python-pytest-runner)
5045 ("python-jaraco-packaging" ,python-jaraco-packaging)))
5046 (arguments
5047 `(#:phases
5048 (modify-phases %standard-phases
5049 (add-after 'build 'build-doc
5050 (lambda _
5051 (setenv "LANG" "en_US.UTF-8")
5052 (invoke "python" "setup.py" "build_sphinx")))
5053 (add-after 'install 'install-doc
5054 (lambda* (#:key outputs #:allow-other-keys)
5055 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
5056 (doc (string-append data "/doc/" ,name "-" ,version))
5057 (html (string-append doc "/html")))
5058 (mkdir-p html)
5059 (for-each (lambda (file)
5060 (copy-file file (string-append doc "/" file)))
5061 '("README.rst" "CHANGES.rst"))
5062 (copy-recursively "build/sphinx/html" html)
5063 #t)))
5064 (replace 'check
5065 (lambda _
5066 ;; The import time test aborts if an import takes longer than
5067 ;; 100ms. It may very well take a little longer than that.
5068 (invoke "pytest" "-v" "-k" "not test_import_time"))))))
5069 (home-page "https://github.com/jaraco/path.py")
5070 (synopsis "Python module wrapper for built-in os.path")
5071 (description
5072 "@code{path.py} implements path objects as first-class entities, allowing
5073 common operations on files to be invoked on those path objects directly.")
5074 (license license:expat)))
5075
5076 (define-public python2-pathpy
5077 (package-with-python2 python-pathpy))
5078
5079 (define-public python-simplegeneric
5080 (package
5081 (name "python-simplegeneric")
5082 (version "0.8.1")
5083 (source
5084 (origin
5085 (method url-fetch)
5086 (uri (pypi-uri "simplegeneric" version ".zip"))
5087 (sha256
5088 (base32 "0wwi1c6md4vkbcsfsf8dklf3vr4mcdj4mpxkanwgb6jb1432x5yw"))))
5089 (build-system python-build-system)
5090 (native-inputs
5091 `(("unzip" ,unzip)))
5092 (home-page "http://cheeseshop.python.org/pypi/simplegeneric")
5093 (synopsis "Python module for simple generic functions")
5094 (description
5095 "The simplegeneric module lets you define simple single-dispatch generic
5096 functions, akin to Python’s built-in generic functions like @code{len()},
5097 @code{iter()} and so on. However, instead of using specially-named methods,
5098 these generic functions use simple lookup tables, akin to those used by
5099 e.g. @code{pickle.dump()} and other generic functions found in the Python
5100 standard library.")
5101 (license license:zpl2.1)))
5102
5103 (define-public python2-simplegeneric
5104 (package-with-python2 python-simplegeneric))
5105
5106 (define-public python-ipython-genutils
5107 ;; TODO: This package is retired, check if can be removed, see description.
5108 (package
5109 (name "python-ipython-genutils")
5110 (version "0.1.0")
5111 (source
5112 (origin
5113 (method url-fetch)
5114 (uri (pypi-uri "ipython_genutils" version))
5115 (sha256
5116 (base32 "19l2pp1c64ansr89l3cqh19jdi2ixhssdzx0vz4n6r52a6i281is"))))
5117 (build-system python-build-system)
5118 (arguments `(#:tests? #f)) ; no tests
5119 (home-page "https://ipython.org")
5120 (synopsis "Vestigial utilities from IPython")
5121 (description
5122 "This package provides retired utilities from IPython. No packages
5123 outside IPython/Jupyter should depend on it.
5124
5125 This package shouldn't exist. It contains some common utilities shared by
5126 Jupyter and IPython projects during The Big Split. As soon as possible, those
5127 packages will remove their dependency on this, and this package will go
5128 away.")
5129 (license license:bsd-3)))
5130
5131 (define-public python2-ipython-genutils
5132 (package-with-python2 python-ipython-genutils))
5133
5134 (define-public python-traitlets
5135 (package
5136 (name "python-traitlets")
5137 (version "4.3.3")
5138 (source
5139 (origin
5140 (method url-fetch)
5141 (uri (pypi-uri "traitlets" version))
5142 (sha256
5143 (base32
5144 "1xsrwgivpkxlbr4dfndfsi098s29yqgswgjc1qqn69yxklvfw8yh"))))
5145 (build-system python-build-system)
5146 (arguments
5147 `(#:phases
5148 (modify-phases %standard-phases
5149 (replace 'check (lambda _ (invoke "pytest" "-vv" "traitlets"))))))
5150 (propagated-inputs
5151 `(("python-ipython-genutils" ,python-ipython-genutils)
5152 ("python-decorator" ,python-decorator)))
5153 (native-inputs
5154 `(("python-pytest" ,python-pytest)))
5155 (properties `((python2-variant . ,(delay python2-traitlets))))
5156 (home-page "https://ipython.org")
5157 (synopsis "Configuration system for Python applications")
5158 (description
5159 "Traitlets is a framework that lets Python classes have attributes with
5160 type checking, dynamically calculated default values, and ‘on change’
5161 callbacks. The package also includes a mechanism to use traitlets for
5162 configuration, loading values from files or from command line arguments. This
5163 is a distinct layer on top of traitlets, so you can use traitlets in your code
5164 without using the configuration machinery.")
5165 (license license:bsd-3)))
5166
5167 (define-public python2-traitlets
5168 (let ((traitlets (package-with-python2 (strip-python2-variant python-traitlets))))
5169 (package
5170 (inherit traitlets)
5171 (propagated-inputs
5172 `(("python2-enum34" ,python2-enum34)
5173 ,@(package-propagated-inputs traitlets))))))
5174
5175 (define-public python-jupyter-core
5176 (package
5177 (name "python-jupyter-core")
5178 (version "4.4.0")
5179 (source
5180 (origin
5181 (method url-fetch)
5182 (uri (string-append (pypi-uri "jupyter_core" version)))
5183 (sha256
5184 (base32
5185 "1dy083rarba8prn9f9srxq3c7n7vyql02ycrqq306c40lr57aw5s"))))
5186 (build-system python-build-system)
5187 ;; FIXME: not sure how to run the tests
5188 (arguments `(#:tests? #f))
5189 (propagated-inputs
5190 `(("python-traitlets" ,python-traitlets)))
5191 (home-page "http://jupyter.org/")
5192 (synopsis "Jupyter base package")
5193 (description
5194 "Jupyter core is the base package on which Jupyter projects rely.")
5195 (license license:bsd-3)))
5196
5197 (define-public python2-jupyter-core
5198 (package-with-python2 python-jupyter-core))
5199
5200 (define-public python-jupyter-client
5201 (package
5202 (name "python-jupyter-client")
5203 (version "5.2.4")
5204 (source
5205 (origin
5206 (method url-fetch)
5207 (uri (pypi-uri "jupyter_client" version))
5208 (sha256
5209 (base32
5210 "0l9mh7ccrpl3lppym3dnky8n1nk7xarzzdcxf4q2s7aw203cpydm"))))
5211 (build-system python-build-system)
5212 ;; Tests fail because of missing native python kernel which I assume is
5213 ;; provided by the ipython package, which we cannot use because it would
5214 ;; cause a dependency cycle.
5215 (arguments
5216 `(#:tests? #f
5217
5218 #:phases (modify-phases %standard-phases
5219 (add-after 'unpack 'set-tool-file-names
5220 (lambda* (#:key inputs #:allow-other-keys)
5221 (let ((iproute (assoc-ref inputs "iproute")))
5222 (substitute* "jupyter_client/localinterfaces.py"
5223 (("'ip'")
5224 (string-append "'" iproute "/sbin/ip'")))
5225 #t))))))
5226 (inputs
5227 `(("iproute" ,iproute)))
5228 (propagated-inputs
5229 `(("python-pyzmq" ,python-pyzmq)
5230 ("python-traitlets" ,python-traitlets)
5231 ("python-jupyter-core" ,python-jupyter-core)))
5232 (home-page "http://jupyter.org/")
5233 (synopsis "Jupyter protocol implementation and client libraries")
5234 (description
5235 "The @code{jupyter_client} package contains the reference implementation
5236 of the Jupyter protocol. It also provides client and kernel management APIs
5237 for working with kernels, and the @code{jupyter kernelspec} entrypoint for
5238 installing @code{kernelspec}s for use with Jupyter frontends.")
5239 (license license:bsd-3)))
5240
5241 (define-public python2-jupyter-client
5242 (package-with-python2 python-jupyter-client))
5243
5244 (define-public python-ipykernel
5245 (package
5246 (name "python-ipykernel")
5247 (version "5.1.3")
5248 (source
5249 (origin
5250 (method url-fetch)
5251 (uri (pypi-uri "ipykernel" version))
5252 (sha256
5253 (base32 "1a08y677lpn80qzvv7z0smgggmr5m5ayf0bs6vds47xpxl9sss5k"))))
5254 (build-system python-build-system)
5255 (arguments
5256 `(#:phases
5257 (modify-phases %standard-phases
5258 (replace 'check
5259 (lambda _
5260 (setenv "HOME" "/tmp")
5261 (invoke "pytest" "-v")
5262 #t))
5263 (add-after 'install 'set-python-file-name
5264 (lambda* (#:key outputs #:allow-other-keys)
5265 ;; Record the absolute file name of the 'python' executable in
5266 ;; 'kernel.json'.
5267 (let ((out (assoc-ref outputs "out")))
5268 (substitute* (string-append out "/share/jupyter"
5269 "/kernels/python3/kernel.json")
5270 (("\"python\"")
5271 (string-append "\"" (which "python") "\"")))
5272 #t))))))
5273 (propagated-inputs
5274 `(("python-ipython" ,python-ipython)
5275 ;; imported at runtime during connect
5276 ("python-jupyter-client" ,python-jupyter-client)))
5277 (native-inputs
5278 `(("python-flaky" ,python-flaky)
5279 ("python-nose" ,python-nose)
5280 ("python-pytest" ,python-pytest)))
5281 (home-page "https://ipython.org")
5282 (synopsis "IPython Kernel for Jupyter")
5283 (description
5284 "This package provides the IPython kernel for Jupyter.")
5285 (license license:bsd-3)))
5286
5287 ;; Version 5.1.1 and above no longer support Python 2.
5288 (define-public python2-ipykernel
5289 (package
5290 (name "python2-ipykernel")
5291 (version "5.1.0")
5292 (source
5293 (origin
5294 (method url-fetch)
5295 (uri (pypi-uri "ipykernel" version))
5296 (sha256
5297 (base32 "0br95qhrd5k65g10djngiy27hs0642301hlf2q142i8djabvzh0g"))))
5298 (build-system python-build-system)
5299 (arguments
5300 `(#:python ,python-2
5301 #:phases
5302 (modify-phases %standard-phases
5303 (replace 'check
5304 (lambda _
5305 (setenv "HOME" "/tmp")
5306 (invoke "pytest" "-v")
5307 #t)))))
5308 (propagated-inputs
5309 `(("python2-ipython" ,python2-ipython)
5310 ;; imported at runtime during connect
5311 ("python2-jupyter-client" ,python2-jupyter-client)))
5312 (native-inputs
5313 `(("python2-pytest" ,python2-pytest)
5314 ("python2-nose" ,python2-nose)))
5315 (home-page "https://ipython.org")
5316 (synopsis "IPython Kernel for Jupyter")
5317 (description
5318 "This package provides the IPython kernel for Jupyter.")
5319 (license license:bsd-3)))
5320
5321 (define-public python-pari-jupyter
5322 (package
5323 (name "python-pari-jupyter")
5324 (version "1.3.2")
5325 (source
5326 (origin
5327 (method url-fetch)
5328 (uri (pypi-uri "pari_jupyter" version))
5329 (sha256
5330 (base32
5331 "1yash0p422nnin7z58b99d0p23nx79f5m0mainc9hsjg72jhdhr6"))))
5332 (build-system python-build-system)
5333 (propagated-inputs
5334 `(("python-ipykernel" ,python-ipykernel)))
5335 (inputs
5336 `(("pari-gp" ,pari-gp)
5337 ("readline" ,readline)))
5338 (arguments
5339 `(#:tests? #f)) ; no test suite
5340 (home-page
5341 "https://github.com/jdemeyer/pari_jupyter")
5342 (synopsis "A Jupyter kernel for PARI/GP")
5343 (description "The package provides a PARI/GP kernel for Jupyter.")
5344 (license license:gpl3+)))
5345
5346 (define-public python-backcall
5347 (package
5348 (name "python-backcall")
5349 (version "0.1.0")
5350 (source
5351 (origin
5352 (method url-fetch)
5353 (uri (pypi-uri "backcall" version))
5354 (sha256
5355 (base32
5356 "1r01dqch3f8fdj3n6fviw8hxqrs6w5v0qw4izmvqzry1w9dxiv1q"))))
5357 (build-system python-build-system)
5358 (home-page "https://github.com/takluyver/backcall/")
5359 (synopsis "Specifications for callback functions passed in to an API")
5360 (description
5361 "If your code lets other people supply callback functions, it's important
5362 to specify the function signature you expect, and check that functions support
5363 that. Adding extra parameters later would break other peoples code unless
5364 you're careful. The @code{backcall} package provides a way of specifying the
5365 callback signature using a prototype function.")
5366 (license license:bsd-3)))
5367
5368 ;; This is the latest release of the LTS version of ipython with support for
5369 ;; Python 2.7 and Python 3.x. Later non-LTS versions starting from 6.0 have
5370 ;; dropped support for Python 2.7.
5371 (define-public python2-ipython
5372 (package
5373 (name "python2-ipython")
5374 (version "5.8.0")
5375 (source
5376 (origin
5377 (method url-fetch)
5378 (uri (pypi-uri "ipython" version ".tar.gz"))
5379 (sha256
5380 (base32 "01l93i4hspf0lvhmycvc8j378bslm9rw30mwfspsl6v1ayc69b2b"))))
5381 (build-system python-build-system)
5382 (propagated-inputs
5383 `(("python2-backports-shutil-get-terminal-size"
5384 ,python2-backports-shutil-get-terminal-size)
5385 ("python2-pathlib2" ,python2-pathlib2)
5386 ("python2-pyzmq" ,python2-pyzmq)
5387 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
5388 ("python2-terminado" ,python2-terminado)
5389 ("python2-matplotlib" ,python2-matplotlib)
5390 ("python2-numpy" ,python2-numpy)
5391 ("python2-numpydoc" ,python2-numpydoc)
5392 ("python2-jinja2" ,python2-jinja2)
5393 ("python2-mistune" ,python2-mistune)
5394 ("python2-pexpect" ,python2-pexpect)
5395 ("python2-pickleshare" ,python2-pickleshare)
5396 ("python2-simplegeneric" ,python2-simplegeneric)
5397 ("python2-jsonschema" ,python2-jsonschema)
5398 ("python2-traitlets" ,python2-traitlets)
5399 ("python2-nbformat" ,python2-nbformat)
5400 ("python2-pygments" ,python2-pygments)))
5401 (inputs
5402 `(("readline" ,readline)
5403 ("which" ,which)))
5404 (native-inputs
5405 `(("graphviz" ,graphviz)
5406 ("pkg-config" ,pkg-config)
5407 ("python2-requests" ,python2-requests) ;; for tests
5408 ("python2-testpath" ,python2-testpath)
5409 ("python2-mock" ,python2-mock)
5410 ("python2-nose" ,python2-nose)))
5411 (arguments
5412 `(#:python ,python-2
5413 #:phases
5414 (modify-phases %standard-phases
5415 (add-before 'check 'delete-broken-tests
5416 (lambda* (#:key inputs #:allow-other-keys)
5417 ;; These tests throw errors for unknown reasons.
5418 (delete-file "IPython/core/tests/test_profile.py")
5419 (delete-file "IPython/core/tests/test_interactiveshell.py")
5420 (delete-file "IPython/core/tests/test_magic.py")
5421 #t)))))
5422 (home-page "https://ipython.org")
5423 (synopsis "IPython is a tool for interactive computing in Python")
5424 (description
5425 "IPython provides a rich architecture for interactive computing with:
5426 Powerful interactive shells, a browser-based notebook, support for interactive
5427 data visualization, embeddable interpreters and tools for parallel
5428 computing.")
5429 (license license:bsd-3)))
5430
5431 (define-public python-ipython
5432 (package
5433 (name "python-ipython")
5434 (version "7.9.0")
5435 (source
5436 (origin
5437 (method url-fetch)
5438 (uri (pypi-uri "ipython" version ".tar.gz"))
5439 (sha256
5440 (base32 "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz"))))
5441 (build-system python-build-system)
5442 (propagated-inputs
5443 `(("python-backcall" ,python-backcall)
5444 ("python-pyzmq" ,python-pyzmq)
5445 ("python-prompt-toolkit" ,python-prompt-toolkit)
5446 ("python-terminado" ,python-terminado)
5447 ("python-matplotlib" ,python-matplotlib)
5448 ("python-numpy" ,python-numpy)
5449 ("python-numpydoc" ,python-numpydoc)
5450 ("python-jedi" ,python-jedi)
5451 ("python-jinja2" ,python-jinja2)
5452 ("python-mistune" ,python-mistune)
5453 ("python-pexpect" ,python-pexpect)
5454 ("python-pickleshare" ,python-pickleshare)
5455 ("python-simplegeneric" ,python-simplegeneric)
5456 ("python-jsonschema" ,python-jsonschema)
5457 ("python-traitlets" ,python-traitlets)
5458 ("python-nbformat" ,python-nbformat)
5459 ("python-pygments" ,python-pygments)))
5460 (inputs
5461 `(("readline" ,readline)
5462 ("which" ,which)))
5463 (native-inputs
5464 `(("graphviz" ,graphviz)
5465 ("pkg-config" ,pkg-config)
5466 ("python-requests" ,python-requests) ;; for tests
5467 ("python-testpath" ,python-testpath)
5468 ("python-nose" ,python-nose)))
5469 (arguments
5470 `(#:phases
5471 (modify-phases %standard-phases
5472 (add-after 'unpack 'make-docs-reproducible
5473 (lambda _
5474 (substitute* "IPython/sphinxext/ipython_directive.py"
5475 ((".*import datetime") "")
5476 ((".*datetime.datetime.now\\(\\)") "")
5477 (("%timeit") "# %timeit"))
5478 #t))
5479 ;; Tests can only be run after the library has been installed and not
5480 ;; within the source directory.
5481 (delete 'check)
5482 (add-after 'install 'check
5483 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
5484 (if tests?
5485 (begin
5486 ;; Make installed package available for running the tests
5487 (add-installed-pythonpath inputs outputs)
5488 (setenv "HOME" "/tmp/") ;; required by a test
5489 ;; We only test the core because one of the other tests
5490 ;; tries to import ipykernel.
5491 (invoke "python" "IPython/testing/iptest.py"
5492 "-v" "IPython/core/tests"))
5493 #t)))
5494 (add-before 'check 'fix-tests
5495 (lambda* (#:key inputs #:allow-other-keys)
5496 (substitute* "./IPython/utils/_process_posix.py"
5497 (("/usr/bin/env', 'which") (which "which")))
5498 (substitute* "./IPython/core/tests/test_inputtransformer.py"
5499 (("#!/usr/bin/env python")
5500 (string-append "#!" (which "python"))))
5501 ;; This test introduces a circular dependency on ipykernel
5502 ;; (which depends on ipython).
5503 (delete-file "IPython/core/tests/test_display.py")
5504 ;; AttributeError: module 'IPython.core' has no attribute 'formatters'
5505 (delete-file "IPython/core/tests/test_interactiveshell.py")
5506 #t)))))
5507 (home-page "https://ipython.org")
5508 (synopsis "IPython is a tool for interactive computing in Python")
5509 (description
5510 "IPython provides a rich architecture for interactive computing with:
5511 Powerful interactive shells, a browser-based notebook, support for interactive
5512 data visualization, embeddable interpreters and tools for parallel
5513 computing.")
5514 (license license:bsd-3)))
5515
5516 (define-public python-ipython-documentation
5517 (package
5518 (inherit python-ipython)
5519 (name "python-ipython-documentation")
5520 (version (package-version python-ipython))
5521 (arguments
5522 `(#:phases
5523 (modify-phases %standard-phases
5524 (delete 'build)
5525 (delete 'check)
5526 (replace 'install
5527 (lambda* (#:key outputs #:allow-other-keys)
5528 (let* ((data (string-append (assoc-ref outputs "out") "/share"))
5529 (doc (string-append data "/doc/" ,name "-" ,version))
5530 (html (string-append doc "/html"))
5531 (man1 (string-append data "/man/man1"))
5532 (info (string-append data "/info"))
5533 (examples (string-append doc "/examples"))
5534 (python-arg (string-append "PYTHON=" (which "python"))))
5535 (setenv "LANG" "en_US.utf8")
5536 (with-directory-excursion "docs"
5537 ;; FIXME: pdf fails to build
5538 ;;(system* "make" "pdf" "PAPER=a4")
5539 (system* "make" python-arg "html")
5540 ;; FIXME: the generated texi file contains ^@^@, which trips
5541 ;; up the parser.
5542 ;; (system* "make" python-arg "info")
5543 )
5544 (copy-recursively "docs/man" man1)
5545 (copy-recursively "examples" examples)
5546 (copy-recursively "docs/build/html" html)
5547 ;; (copy-file "docs/build/latex/ipython.pdf"
5548 ;; (string-append doc "/ipython.pdf"))
5549 (mkdir-p info)
5550 ;; (copy-file "docs/build/texinfo/ipython.info"
5551 ;; (string-append info "/ipython.info"))
5552 (copy-file "COPYING.rst" (string-append doc "/COPYING.rst")))
5553 #t)))))
5554 (inputs
5555 `(("python-ipython" ,python-ipython)
5556 ("python-ipykernel" ,python-ipykernel)))
5557 (native-inputs
5558 `(("python-sphinx" ,python-sphinx)
5559 ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme)
5560 ;; FIXME: It's possible that a smaller union would work just as well.
5561 ("texlive" ,(texlive-union (list texlive-amsfonts
5562 texlive-fonts-ec
5563 texlive-generic-ifxetex
5564 texlive-generic-pdftex
5565 texlive-latex-capt-of
5566 texlive-latex-cmap
5567 texlive-latex-environ
5568 texlive-latex-eqparbox
5569 texlive-latex-etoolbox
5570 texlive-latex-expdlist
5571 texlive-latex-fancyhdr
5572 texlive-latex-fancyvrb
5573 texlive-latex-fncychap
5574 texlive-latex-float
5575 texlive-latex-framed
5576 texlive-latex-geometry
5577 texlive-latex-graphics
5578 texlive-latex-hyperref
5579 texlive-latex-mdwtools
5580 texlive-latex-multirow
5581 texlive-latex-needspace
5582 texlive-latex-oberdiek
5583 texlive-latex-parskip
5584 texlive-latex-preview
5585 texlive-latex-tabulary
5586 texlive-latex-threeparttable
5587 texlive-latex-titlesec
5588 texlive-latex-trimspaces
5589 texlive-latex-ucs
5590 texlive-latex-upquote
5591 texlive-latex-url
5592 texlive-latex-varwidth
5593 texlive-latex-wrapfig)))
5594 ("texinfo" ,texinfo)))))
5595
5596 (define-public python-urwid
5597 (package
5598 (name "python-urwid")
5599 (version "2.0.1")
5600 (source
5601 (origin
5602 (method url-fetch)
5603 (uri (pypi-uri "urwid" version))
5604 (sha256
5605 (base32
5606 "1g6cpicybvbananpjikmjk8npmjk4xvak1wjzji62wc600wkwkb4"))))
5607 (build-system python-build-system)
5608 (home-page "http://urwid.org")
5609 (synopsis "Console user interface library for Python")
5610 (description
5611 "Urwid is a curses-based UI/widget library for Python. It includes many
5612 features useful for text console applications.")
5613 (license license:lgpl2.1+)))
5614
5615 (define-public python2-urwid
5616 (package-with-python2 python-urwid))
5617
5618 (define-public python-urwidtrees
5619 (package
5620 (name "python-urwidtrees")
5621 (version "1.0.2")
5622 (source
5623 (origin
5624 (method git-fetch)
5625 ;; package author intends on distributing via github rather than pypi:
5626 ;; https://github.com/pazz/alot/issues/877#issuecomment-230173331
5627 (uri (git-reference
5628 (url "https://github.com/pazz/urwidtrees")
5629 (commit version)))
5630 (file-name (git-file-name name version))
5631 (sha256
5632 (base32
5633 "1n1kpidvkdnsqyb82vlvk78gmly96kh8351lqxn2pzgwwns6fml2"))))
5634 (build-system python-build-system)
5635 (arguments
5636 '(#:use-setuptools? #f
5637 #:tests? #f)) ; no tests
5638 (propagated-inputs `(("python-urwid" ,python-urwid)))
5639 (home-page "https://github.com/pazz/urwidtrees")
5640 (synopsis "Tree widgets for urwid")
5641 (description "Urwidtrees is a Widget Container API for the @code{urwid}
5642 toolkit. Use it to build trees of widgets.")
5643 (license license:gpl3+)))
5644
5645 (define-public python2-urwidtrees
5646 (package-with-python2 python-urwidtrees))
5647
5648 (define-public python-ua-parser
5649 (package
5650 (name "python-ua-parser")
5651 (version "0.8.0")
5652 (source
5653 (origin
5654 (method url-fetch)
5655 (uri (pypi-uri "ua-parser" version))
5656 (sha256
5657 (base32
5658 "1jwdf58rhchjzzrad405pviv0iq24xa2xmmmdgcm2c8s6b4wzfwp"))))
5659 (build-system python-build-system)
5660 (arguments
5661 `(#:tests? #f)) ;no test suite in release
5662 (native-inputs
5663 `(("python-pyyaml" ,python-pyyaml)))
5664 (home-page "https://github.com/ua-parser/uap-python")
5665 (synopsis "User agent parser")
5666 (description
5667 "@code{ua-parser} is a Python port of Browserscope's user agent parser.")
5668 (license license:asl2.0)))
5669
5670 (define-public python2-ua-parser
5671 (package-with-python2 python-ua-parser))
5672
5673 (define-public python-user-agents
5674 (package
5675 (name "python-user-agents")
5676 (version "1.1.0")
5677 (source
5678 (origin
5679 (method url-fetch)
5680 (uri (pypi-uri "user-agents" version))
5681 (sha256
5682 (base32
5683 "0fc00cd3j8dahq1zzn8pkgfgd7lq37bp2scmdma2n1c049vicgb4"))))
5684 (build-system python-build-system)
5685 (arguments
5686 `(#:tests? #f)) ;missing devices.json test file in release
5687 (propagated-inputs
5688 `(("python-ua-parser" ,python-ua-parser)))
5689 (home-page "https://github.com/selwin/python-user-agents")
5690 (synopsis "User Agent strings parsing library")
5691 (description
5692 "A library to identify devices (phones, tablets) and their capabilities by
5693 parsing (browser/HTTP) user agent strings.")
5694 (license license:expat)))
5695
5696 (define-public python2-user-agents
5697 (package-with-python2 python-user-agents))
5698
5699 (define-public python-dbus
5700 (package
5701 (name "python-dbus")
5702 (version "1.2.14")
5703 (source
5704 (origin
5705 (method url-fetch)
5706 (uri (string-append "https://dbus.freedesktop.org/releases/dbus-python/"
5707 "dbus-python-" version ".tar.gz"))
5708 (sha256
5709 (base32 "0cdchkgnivlka4lf8q4qfk0yxq483i3r3aqickjf8hfn7nx0c0mi"))))
5710 (build-system gnu-build-system)
5711 (native-inputs
5712 `(("pkg-config" ,pkg-config)))
5713 (inputs
5714 `(("python" ,python-wrapper)
5715 ("dbus-glib" ,dbus-glib)))
5716 (synopsis "Python bindings for D-bus")
5717 (description "python-dbus provides bindings for libdbus, the reference
5718 implementation of D-Bus.")
5719 (home-page "https://www.freedesktop.org/wiki/Software/DBusBindings/")
5720 (license license:expat)))
5721
5722 (define-public python2-dbus
5723 (package (inherit python-dbus)
5724 (name "python2-dbus")
5725 (inputs `(("python" ,python-2)
5726 ,@(alist-delete "python"
5727 (package-inputs python-dbus)
5728 equal?)))))
5729
5730 (define-public python-notify2
5731 (package
5732 (name "python-notify2")
5733 (version "0.3.1")
5734 (source
5735 (origin
5736 (method url-fetch)
5737 (uri (pypi-uri "notify2" version))
5738 (sha256
5739 (base32
5740 "0z8rrv9rsg1r2qgh2dxj3dfj5xnki98kgi3w839kqby4a26i1yik"))))
5741 (build-system python-build-system)
5742 (arguments `(#:tests? #f)) ; tests depend on system state
5743 (native-inputs
5744 `(("python-dbus" ,python-dbus)))
5745 (home-page "https://bitbucket.org/takluyver/pynotify2")
5746 (synopsis "Python interface to D-Bus notifications")
5747 (description
5748 "Pynotify2 provides a Python interface for sending D-Bus notifications.
5749 It is a reimplementation of pynotify in pure Python, and an alternative to
5750 the GObject Introspection bindings to libnotify for non-GTK applications.")
5751 (license (list license:bsd-2
5752 license:lgpl2.1+))))
5753
5754 (define-public python2-notify2
5755 (package-with-python2 python-notify2))
5756
5757 (define-public python-lxml
5758 (package
5759 (name "python-lxml")
5760 (version "4.4.1")
5761 (source
5762 (origin
5763 (method url-fetch)
5764 (uri (pypi-uri "lxml" version))
5765 (sha256
5766 (base32
5767 "14jnpfcpgqr9sx8ppd286jzcbk0b36hbqsvd8jkvffipzw5v8768"))))
5768 (build-system python-build-system)
5769 (arguments
5770 `(#:phases (modify-phases %standard-phases
5771 (replace 'check
5772 (lambda _
5773 (invoke "make" "test"))))))
5774 (inputs
5775 `(("libxml2" ,libxml2)
5776 ("libxslt" ,libxslt)))
5777 (home-page "http://lxml.de/")
5778 (synopsis
5779 "Python XML processing library")
5780 (description
5781 "The lxml XML toolkit is a Pythonic binding for the C libraries
5782 libxml2 and libxslt.")
5783 (license license:bsd-3))) ; and a few more, see LICENSES.txt
5784
5785 (define-public python2-lxml
5786 (package-with-python2 python-lxml))
5787
5788 ;; beautifulsoup4 has a totally different namespace than 3.x,
5789 ;; and pypi seems to put it under its own name, so I guess we should too
5790 (define-public python-beautifulsoup4
5791 (package
5792 (name "python-beautifulsoup4")
5793 (version "4.7.1")
5794 (source
5795 (origin
5796 (method url-fetch)
5797 (uri (pypi-uri "beautifulsoup4" version))
5798 (sha256
5799 (base32
5800 "0j2kycz2dxgx68xzjm7rxg5xn6v61gq5ifvxyg99slmqkybnal4l"))))
5801 (build-system python-build-system)
5802 (arguments
5803 `(#:phases
5804 (modify-phases %standard-phases
5805 ;; The Python 2 source is the definitive source of beautifulsoup4. We
5806 ;; must use this conversion script when building with Python 3. The
5807 ;; conversion script also runs the tests.
5808 ;; For more information, see the file 'convert-py3k' in the source
5809 ;; distribution.
5810 (replace 'check
5811 (lambda _ (invoke "./convert-py3k"))))))
5812 (propagated-inputs
5813 `(("python-soupsieve" ,python-soupsieve)))
5814 (home-page
5815 "https://www.crummy.com/software/BeautifulSoup/bs4/")
5816 (synopsis
5817 "Python screen-scraping library")
5818 (description
5819 "Beautiful Soup is a Python library designed for rapidly setting up
5820 screen-scraping projects. It offers Pythonic idioms for navigating,
5821 searching, and modifying a parse tree, providing a toolkit for
5822 dissecting a document and extracting what you need. It automatically
5823 converts incoming documents to Unicode and outgoing documents to UTF-8.")
5824 (license license:expat)
5825 (properties `((python2-variant . ,(delay python2-beautifulsoup4))))))
5826
5827 (define-public python2-beautifulsoup4
5828 (package
5829 (inherit (package-with-python2
5830 (strip-python2-variant python-beautifulsoup4)))
5831 (arguments `(#:python ,python-2))))
5832
5833 (define-public python-soupsieve
5834 (package
5835 (name "python-soupsieve")
5836 (version "1.9.5")
5837 (source
5838 (origin
5839 (method url-fetch)
5840 (uri (pypi-uri "soupsieve" version))
5841 (sha256
5842 (base32
5843 "1nhd0q0ifwva9wn645s6pn74p1rd97asn3qfg75nphx1wkgcbhg2"))))
5844 (build-system python-build-system)
5845 (arguments `(#:tests? #f))
5846 ;;XXX: 2 tests fail currently despite claming they were to be
5847 ;;skipped. Also, beautifulsoup4 may depend on this in the future, so we
5848 ;;don't want to create a circular dependency.
5849 (home-page "https://github.com/facelessuser/soupsieve")
5850 (synopsis "CSS selector library")
5851 (description
5852 "Soup Sieve is a CSS selector library designed to be used with Beautiful
5853 Soup 4. It aims to provide selecting, matching, and filtering using modern
5854 CSS selectors. Soup Sieve currently provides selectors from the CSS level 1
5855 specifications up through the latest CSS level 4 drafts and beyond (though
5856 some are not yet implemented).")
5857 (properties `((python2-variant . ,(delay python2-soupsieve))))
5858 (license license:expat)))
5859
5860 (define-public python2-soupsieve
5861 (let ((base (package-with-python2 (strip-python2-variant python-soupsieve))))
5862 (package
5863 (inherit base)
5864 (propagated-inputs
5865 `(("python2-backports-functools-lru-cache"
5866 ,python2-backports-functools-lru-cache)
5867 ,@(package-propagated-inputs base))))))
5868
5869 (define-public python-netifaces
5870 (package
5871 (name "python-netifaces")
5872 (version "0.10.7")
5873 (source
5874 (origin
5875 (method url-fetch)
5876 (uri (pypi-uri "netifaces" version))
5877 (sha256
5878 (base32
5879 "1gccklrcplbbqh81g1mdgpa5y8na7kkf29cq2ka3f5a2fp5hyndx"))))
5880 (build-system python-build-system)
5881 (home-page "https://github.com/al45tair/netifaces")
5882 (synopsis
5883 "Python module for portable network interface information")
5884 (description
5885 "Netifaces is a Python module providing information on network
5886 interfaces in an easy and portable manner.")
5887 (license license:expat)))
5888
5889 (define-public python2-netifaces
5890 (package-with-python2 python-netifaces))
5891
5892 (define-public python-networkx
5893 (package
5894 (name "python-networkx")
5895 (version "2.2")
5896 (source
5897 (origin
5898 (method url-fetch)
5899 (uri (pypi-uri "networkx" version ".zip"))
5900 (sha256
5901 (base32 "12swxb15299v9vqjsq4z8rgh5sdhvpx497xwnhpnb0gynrx6zra5"))))
5902 (build-system python-build-system)
5903 ;; python-decorator is needed at runtime.
5904 (propagated-inputs
5905 `(("python-decorator" ,python-decorator)))
5906 (native-inputs
5907 `(("python-nose" ,python-nose)
5908 ("unzip" ,unzip)))
5909 (home-page "https://networkx.github.io/")
5910 (synopsis "Python module for creating and manipulating graphs and networks")
5911 (description
5912 "NetworkX is a Python package for the creation, manipulation, and study
5913 of the structure, dynamics, and functions of complex networks.")
5914 (license license:bsd-3)))
5915
5916 (define-public python2-networkx
5917 (package-with-python2 python-networkx))
5918
5919 (define-public python-datrie
5920 (package
5921 (name "python-datrie")
5922 (version "0.8")
5923 (source
5924 (origin
5925 (method url-fetch)
5926 (uri (pypi-uri "datrie" version))
5927 (sha256
5928 (base32
5929 "0338r8xgmpy78556jhms0h6qkvyjr10p8bpgdvcpqzm9lrmxmmdx"))))
5930 (build-system python-build-system)
5931 (native-inputs
5932 `(("python-cython" ,python-cython)
5933 ("python-hypothesis" ,python-hypothesis)
5934 ("python-pytest" ,python-pytest)
5935 ("python-pytest-runner" ,python-pytest-runner)))
5936 (home-page "https://github.com/kmike/datrie")
5937 (synopsis "Fast, efficiently stored trie for Python")
5938 (description
5939 "This package provides a fast, efficiently stored trie implementation for
5940 Python.")
5941 (license license:lgpl2.1+)))
5942
5943 (define-public snakemake
5944 (package
5945 (name "snakemake")
5946 (version "5.7.1")
5947 (source
5948 (origin
5949 (method url-fetch)
5950 (uri (pypi-uri "snakemake" version))
5951 (sha256
5952 (base32 "1pnpvvn8n2a78cg360wz3ldmpqrsm2wzi0c0dmvki9fnsw6fxdas"))))
5953 (build-system python-build-system)
5954 (arguments
5955 ;; TODO: Package missing test dependencies.
5956 '(#:tests? #f
5957 #:phases
5958 (modify-phases %standard-phases
5959 ;; For cluster execution Snakemake will call Python. Since there is
5960 ;; no suitable PYTHONPATH set, cluster execution will fail. We fix
5961 ;; this by calling the snakemake wrapper instead.
5962 (add-after 'unpack 'call-wrapper-not-wrapped-snakemake
5963 (lambda* (#:key outputs #:allow-other-keys)
5964 (substitute* "snakemake/executors.py"
5965 (("\\{sys.executable\\} -m snakemake")
5966 (string-append (assoc-ref outputs "out")
5967 "/bin/snakemake")))
5968 #t)))))
5969 (propagated-inputs
5970 `(("python-appdirs" ,python-appdirs)
5971 ("python-configargparse" ,python-configargparse)
5972 ("python-datrie" ,python-datrie)
5973 ("python-docutils" ,python-docutils)
5974 ("python-gitpython" ,python-gitpython)
5975 ("python-jinja2" ,python-jinja2)
5976 ("python-jsonschema" ,python-jsonschema)
5977 ("python-networkx" ,python-networkx)
5978 ("python-psutil" ,python-psutil)
5979 ("python-pyyaml" ,python-pyyaml)
5980 ("python-ratelimiter" ,python-ratelimiter)
5981 ("python-requests" ,python-requests)
5982 ("python-wrapt" ,python-wrapt)))
5983 (home-page "https://snakemake.readthedocs.io")
5984 (synopsis "Python-based execution environment for make-like workflows")
5985 (description
5986 "Snakemake aims to reduce the complexity of creating workflows by
5987 providing a clean and modern domain specific specification language (DSL) in
5988 Python style, together with a fast and comfortable execution environment.")
5989 (license license:expat)))
5990
5991 (define-public python-pyqrcode
5992 (package
5993 (name "python-pyqrcode")
5994 (version "1.2.1")
5995 (source
5996 (origin
5997 (method url-fetch)
5998 (uri (pypi-uri "PyQRCode" version))
5999 (sha256
6000 (base32
6001 "1m9ln8k9v7dfbh1i81225hx5mdsh8mpf9g7r4wpbfmiyfcs7dgzx"))))
6002 (build-system python-build-system)
6003 (home-page
6004 "https://github.com/mnooner256/pyqrcode")
6005 (synopsis "QR code generator")
6006 (description
6007 "Pyqrcode is a QR code generator written purely in Python with
6008 SVG, EPS, PNG and terminal output.")
6009 (license license:bsd-3)))
6010
6011 (define-public python-seaborn
6012 (package
6013 (name "python-seaborn")
6014 (version "0.9.0")
6015 (source
6016 (origin
6017 (method url-fetch)
6018 (uri (pypi-uri "seaborn" version))
6019 (sha256
6020 (base32 "0bqysi3fxfjl1866m5jq8z7mynhqbqnikim74dmzn8539iwkzj3n"))
6021 (patches
6022 (list (origin
6023 (method url-fetch)
6024 ;; This has already been merged, but there is no new
6025 ;; release including this patch. It fixes problems
6026 ;; with axis rotation that would lead to test
6027 ;; failures.
6028 (uri "https://patch-diff.githubusercontent.com/raw/mwaskom/seaborn/pull/1716.diff")
6029 (sha256
6030 (base32
6031 "1lm870z316n9ivsyr86hpk1gxaraw0mrjvq42lqsm0znhjdp9q9w"))
6032 (file-name "seaborn-0.9.0-axis-rotation.patch"))))))
6033 (build-system python-build-system)
6034 (arguments
6035 `(#:phases
6036 (modify-phases %standard-phases
6037 (add-before 'check 'start-xserver
6038 (lambda* (#:key inputs #:allow-other-keys)
6039 (let ((xorg-server (assoc-ref inputs "xorg-server")))
6040 ;; There must be a running X server and make check doesn't
6041 ;; start one. Therefore we must do it.
6042 (system (format #f "~a/bin/Xvfb :1 &" xorg-server))
6043 (setenv "DISPLAY" ":1")
6044 #t)))
6045 (add-after 'unpack 'fix-tests
6046 (lambda _
6047 ;; test_cbar_ticks fails probably because of matplotlib's
6048 ;; expectation of using an older version of FreeType.
6049 (delete-file "seaborn/tests/test_matrix.py")
6050 #t))
6051 (replace 'check (lambda _ (invoke "pytest" "seaborn") #t)))))
6052 (propagated-inputs
6053 `(("python-pandas" ,python-pandas)
6054 ("python-matplotlib" ,python-matplotlib)
6055 ("python-numpy" ,python-numpy)
6056 ("python-scipy" ,python-scipy)))
6057 (native-inputs
6058 `(("python-pytest" ,python-pytest)
6059 ("xorg-server" ,xorg-server-for-tests)))
6060 (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
6061 (synopsis "Statistical data visualization")
6062 (description
6063 "Seaborn is a library for making attractive and informative statistical
6064 graphics in Python. It is built on top of matplotlib and tightly integrated
6065 with the PyData stack, including support for numpy and pandas data structures
6066 and statistical routines from scipy and statsmodels.")
6067 (license license:bsd-3)))
6068
6069 (define-public python2-seaborn
6070 (package-with-python2 python-seaborn))
6071
6072 (define-public python-mpmath
6073 (package
6074 (name "python-mpmath")
6075 (version "0.19")
6076 (source (origin
6077 (method url-fetch)
6078 (uri (string-append "http://mpmath.org/files/mpmath-"
6079 version ".tar.gz"))
6080 (sha256
6081 (base32
6082 "08ijsr4ifrqv3cjc26mkw0dbvyygsa99in376hr4b96ddm1gdpb8"))))
6083 (build-system python-build-system)
6084 (arguments
6085 '(#:phases
6086 (modify-phases %standard-phases
6087 (replace 'check
6088 (lambda _
6089 (invoke "python" "mpmath/tests/runtests.py" "-local"))))))
6090 (home-page "http://mpmath.org")
6091 (synopsis "Arbitrary-precision floating-point arithmetic in python")
6092 (description
6093 "@code{mpmath} can be used as an arbitrary-precision substitute for
6094 Python's float/complex types and math/cmath modules, but also does much
6095 more advanced mathematics.")
6096 (license license:bsd-3)))
6097
6098 (define-public python2-mpmath
6099 (package-with-python2 python-mpmath))
6100
6101 (define-public python-bigfloat
6102 (package
6103 (name "python-bigfloat")
6104 (version "0.3.0")
6105 (source
6106 (origin
6107 (method url-fetch)
6108 (uri (pypi-uri "bigfloat" version))
6109 (sha256
6110 (base32 "0xd7q4l7v0f463diznjv4k9wlaks80pn9drdqmfifi7zx8qvybi6"))))
6111 (build-system python-build-system)
6112 (inputs
6113 `(("mpfr" ,mpfr)))
6114 (home-page "https://github.com/mdickinson/bigfloat")
6115 (synopsis "Arbitrary precision floating-point arithmetic for Python")
6116 (description
6117 "This package provides a Python interface to the MPFR library for
6118 multiprecision arithmetic.")
6119 (license license:lgpl3+)))
6120
6121 (define-public python2-bigfloat
6122 (package-with-python2 python-bigfloat))
6123
6124 (define-public python-sympy
6125 (package
6126 (name "python-sympy")
6127 (version "1.1.1")
6128 (source
6129 (origin
6130 (method url-fetch)
6131 (uri (string-append
6132 "https://github.com/sympy/sympy/releases/download/sympy-"
6133 version "/sympy-" version ".tar.gz"))
6134 (sha256
6135 (base32 "190n29sppw7g8ihilc5451y7jlfcaw56crqiqbf1jff43dlmfnxc"))))
6136 (build-system python-build-system)
6137 (arguments
6138 `(#:phases
6139 (modify-phases %standard-phases
6140 ;; Run the core tests after installation. By default it would run
6141 ;; *all* tests, which take a very long time to complete and are known
6142 ;; to be flaky.
6143 (delete 'check)
6144 (add-after 'install 'check
6145 (lambda* (#:key outputs #:allow-other-keys)
6146 (invoke "python3" "-c" "import sympy; sympy.test(\"/core\")")
6147 #t)))))
6148 (propagated-inputs
6149 `(("python-mpmath" ,python-mpmath)))
6150 (home-page "http://www.sympy.org/")
6151 (synopsis "Python library for symbolic mathematics")
6152 (description
6153 "SymPy is a Python library for symbolic mathematics. It aims to become a
6154 full-featured computer algebra system (CAS) while keeping the code as simple
6155 as possible in order to be comprehensible and easily extensible.")
6156 (license license:bsd-3)))
6157
6158 (define-public python2-sympy
6159 (package
6160 (inherit (package-with-python2 python-sympy))
6161 (arguments
6162 `(#:phases
6163 (modify-phases %standard-phases
6164 ;; Run the core tests after installation. By default it would run
6165 ;; *all* tests, which take a very long time to complete and are known
6166 ;; to be flaky.
6167 (delete 'check)
6168 (add-after 'install 'check
6169 (lambda* (#:key outputs #:allow-other-keys)
6170 (invoke "python" "-c" "import sympy; sympy.test(\"/core\")")
6171 #t)))))))
6172
6173 (define-public python-q
6174 (package
6175 (name "python-q")
6176 (version "2.6")
6177 (source
6178 (origin
6179 (method url-fetch)
6180 (uri (pypi-uri "q" version))
6181 (sha256
6182 (base32
6183 "1mgfazh8fkizh6walra2zv885f3lcgr3nb02v1frfm4p8ddcy3yy"))))
6184 (build-system python-build-system)
6185 (home-page "https://github.com/zestyping/q")
6186 (synopsis "Quick-and-dirty debugging output for tired programmers")
6187 (description
6188 "q is a Python module for \"print\" style of debugging Python code. It
6189 provides convenient short API for print out of values, tracebacks, and
6190 falling into the Python interpreter.")
6191 (license license:asl2.0)))
6192
6193 (define-public python2-q
6194 (package-with-python2 python-q))
6195
6196 (define-public python2-xlib
6197 (package
6198 (name "python2-xlib")
6199 (version "0.14")
6200 (source (origin
6201 (method url-fetch)
6202 (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
6203 "/" version "/"
6204 "python-xlib-" version ".tar.gz"))
6205 (sha256
6206 (base32
6207 "1sv0447j0rx8cgs3jhjl695p5pv13ihglcjlrrz1kq05lsvb0wa7"))))
6208 (build-system python-build-system)
6209 (arguments
6210 `(#:python ,python-2 ;Python 2 only
6211 #:tests? #f)) ;no tests
6212 (home-page "http://python-xlib.sourceforge.net/")
6213 (synopsis "Python X11 client library")
6214 (description
6215 "The Python X Library is intended to be a fully functional X client
6216 library for Python programs. It is useful to implement low-level X clients.
6217 It is written entirely in Python.")
6218 (license license:gpl2+)))
6219
6220 (define-public python-singledispatch
6221 (package
6222 (name "python-singledispatch")
6223 (version "3.4.0.3")
6224 (source
6225 (origin
6226 (method url-fetch)
6227 (uri (pypi-uri "singledispatch" version))
6228 (sha256
6229 (base32
6230 "171b7ip0hsq5qm83np40h3phlr36ym18w0lay0a8v08kvy3sy1jv"))))
6231 (build-system python-build-system)
6232 (native-inputs
6233 `(("python-six" ,python-six))) ; required for conversion, not at run-time
6234 (home-page
6235 "http://docs.python.org/3/library/functools.html#functools.singledispatch")
6236 (synopsis "Backport of singledispatch feature from Python 3.4")
6237 (description
6238 "This library brings functools.singledispatch from Python 3.4 to Python
6239 2.6-3.3.")
6240 (license license:expat)))
6241
6242 (define-public python2-singledispatch
6243 (package-with-python2 python-singledispatch))
6244
6245 ;; the python- version can be removed with python-3.5
6246 (define-public python-backports-abc
6247 (package
6248 (name "python-backports-abc")
6249 (version "0.5")
6250 (source
6251 (origin
6252 (method url-fetch)
6253 (uri (pypi-uri "backports_abc" version))
6254 (sha256
6255 (base32
6256 "1pkv8d1zxj5f9i227dxbjczncbv7ks7ywnjwyxfjagm02i2yafq3"))))
6257 (build-system python-build-system)
6258 (home-page "https://github.com/cython/backports_abc")
6259 (synopsis "Backport of additions to the 'collections.abc' module")
6260 (description
6261 "Python-backports-abc provides a backport of additions to the
6262 @code{collections.abc} module in Python-3.5.")
6263 (license license:psfl)))
6264
6265 (define-public python2-backports-abc
6266 (package-with-python2 python-backports-abc))
6267
6268 (define-public python-backports-csv
6269 (package
6270 (name "python-backports-csv")
6271 (version "1.0.5")
6272 (source
6273 (origin
6274 (method url-fetch)
6275 (uri (pypi-uri "backports.csv" version))
6276 (sha256
6277 (base32
6278 "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc"))))
6279 (build-system python-build-system)
6280 (home-page "https://github.com/ryanhiebert/backports.csv")
6281 (synopsis "Backport of Python 3's csv module for Python 2")
6282 (description
6283 "Provides a backport of Python 3's @code{csv} module for parsing
6284 comma separated values. The API of the @code{csv} module in Python 2
6285 is drastically different from the @code{csv} module in Python 3.
6286 This is due, for the most part, to the difference between str in
6287 Python 2 and Python 3.")
6288 (license license:psfl)))
6289
6290 (define-public python2-backports-csv
6291 (package-with-python2 python-backports-csv))
6292
6293 (define-public python2-backports-shutil-get-terminal-size
6294 (package
6295 (name "python2-backports-shutil-get-terminal-size")
6296 (version "1.0.0")
6297 (source
6298 (origin
6299 (method url-fetch)
6300 (uri (pypi-uri "backports.shutil_get_terminal_size" version))
6301 (sha256
6302 (base32
6303 "107cmn7g3jnbkp826zlj8rrj19fam301qvaqf0f3905f5217lgki"))))
6304 (build-system python-build-system)
6305 (arguments
6306 `(#:python ,python-2
6307 #:phases
6308 (modify-phases %standard-phases
6309 (replace 'check
6310 (lambda _
6311 (invoke "py.test" "-v"))))))
6312 (native-inputs
6313 `(("python2-pytest" ,python2-pytest)))
6314 (home-page "https://github.com/chrippa/backports.shutil_get_terminal_size")
6315 (synopsis "Backport of Python 3.3's @code{shutil.get_terminal_size}")
6316 (description
6317 "This package provides a backport of the @code{get_terminal_size
6318 function} from Python 3.3's @code{shutil}.
6319 Unlike the original version it is written in pure Python rather than C,
6320 so it might be a tiny bit slower.")
6321 (license license:expat)))
6322
6323 (define-public python-waf
6324 (package
6325 (name "python-waf")
6326 (version "2.0.19")
6327 (source (origin
6328 (method url-fetch)
6329 (uri (string-append "https://waf.io/"
6330 "waf-" version ".tar.bz2"))
6331 (sha256
6332 (base32
6333 "19dvqbsvxz7ch03dh1v0znklrwxlz6yzddc3k9smzrrgny4jch6q"))))
6334 (build-system python-build-system)
6335 (arguments
6336 '(#:phases
6337 (modify-phases %standard-phases
6338 (replace 'build
6339 (lambda _
6340 ;; XXX: Find a way to add all extra tools.
6341 (let ((tools '("gccdeps"
6342 "clang_compilation_database")))
6343 (invoke "python" "waf-light" "configure" "build"
6344 (string-append "--tools="
6345 (string-join tools ","))))))
6346 (replace 'check
6347 (lambda _
6348 (invoke "python" "waf" "--version")))
6349 (replace 'install
6350 (lambda* (#:key outputs #:allow-other-keys)
6351 (let ((out (assoc-ref outputs "out")))
6352 (install-file "waf" (string-append out "/bin")))
6353 #t))
6354 ;; waf breaks when it is wrapped.
6355 (delete 'wrap))))
6356 (home-page "https://waf.io/")
6357 (synopsis "Python-based build system")
6358 (description
6359 "Waf is a Python-based framework for configuring, compiling and installing
6360 applications.")
6361 (license license:bsd-3)))
6362
6363 (define-public python2-waf
6364 (package-with-python2 python-waf))
6365
6366 (define-public python-pyzmq
6367 (package
6368 (name "python-pyzmq")
6369 (version "17.1.2")
6370 (source
6371 (origin
6372 (method url-fetch)
6373 (uri (pypi-uri "pyzmq" version))
6374 (sha256
6375 (base32 "1pyxxrz60f88ffm0y6vpbx3q8jcr9ybz8fcilihwzwhh36n84ax7"))))
6376 (build-system python-build-system)
6377 (arguments
6378 `(#:configure-flags
6379 (list (string-append "--zmq=" (assoc-ref %build-inputs "zeromq")))
6380 ;; FIXME: You must build pyzmq with 'python setup.py build_ext
6381 ;; --inplace' for 'python setup.py test' to work.
6382 #:tests? #f))
6383 (inputs
6384 `(("zeromq" ,zeromq)))
6385 (native-inputs
6386 `(("pkg-config" ,pkg-config)
6387 ("python-nose" ,python-nose)))
6388 (home-page "https://github.com/zeromq/pyzmq")
6389 (synopsis "Python bindings for 0MQ")
6390 (description
6391 "PyZMQ is the official Python binding for the ZeroMQ messaging library.")
6392 (license license:bsd-4)))
6393
6394 (define-public python2-pyzmq
6395 (package-with-python2 python-pyzmq))
6396
6397 (define-public python-pep8
6398 ;; This package has been renamed to ‘pycodestyle’ and is no longer updated.
6399 ;; Its last release (1.7.1) adds only a scary warning to this effect, breaking
6400 ;; some dependents' test suites, and nothing more.
6401 (package
6402 (name "python-pep8")
6403 (version "1.7.0")
6404 (source
6405 (origin
6406 (method url-fetch)
6407 (uri (pypi-uri "pep8" version))
6408 (sha256
6409 (base32
6410 "002rkl4lsn6x2mxmf8ar00l0m8i3mzrc6pnzz77blyksmpsxa4x1"))
6411 (patches (search-patches "python-pep8-stdlib-tokenize-compat.patch"))))
6412 (build-system python-build-system)
6413 (home-page "https://pep8.readthedocs.org/")
6414 (synopsis "Python style guide checker")
6415 (description
6416 "This tools checks Python code against some of the style conventions in
6417 PEP 8.")
6418 (license license:expat)))
6419
6420 (define-public python2-pep8
6421 (package-with-python2 python-pep8))
6422
6423 (define-public python-pyflakes
6424 (package
6425 (name "python-pyflakes")
6426 (version "2.1.1")
6427 (source
6428 (origin
6429 (method url-fetch)
6430 (uri (pypi-uri "pyflakes" version))
6431 (sha256
6432 (base32
6433 "18pq95a1xj2dgdd0m85gyfsn40jajj4xc3lp8wfv7igqhrc86xnr"))))
6434 (build-system python-build-system)
6435 (home-page
6436 "https://github.com/pyflakes/pyflakes")
6437 (synopsis "Passive checker of Python programs")
6438 (description
6439 "Pyflakes statically checks Python source code for common errors.")
6440 (license license:expat)))
6441
6442 (define-public python2-pyflakes
6443 (package-with-python2 python-pyflakes))
6444
6445 (define-public python-mccabe
6446 (package
6447 (name "python-mccabe")
6448 (version "0.6.1")
6449 (source
6450 (origin
6451 (method url-fetch)
6452 (uri (pypi-uri "mccabe" version))
6453 (sha256
6454 (base32
6455 "07w3p1qm44hgxf3vvwz84kswpsx6s7kvaibzrsx5dzm0hli1i3fx"))))
6456 (build-system python-build-system)
6457 (native-inputs
6458 `(("python-pytest" ,python-pytest-bootstrap)
6459 ("python-pytest-runner" ,python-pytest-runner)))
6460 (home-page "https://github.com/flintwork/mccabe")
6461 (synopsis "McCabe checker, plugin for flake8")
6462 (description
6463 "This package provides a Flake8 plug-in to compute the McCabe cyclomatic
6464 complexity of Python source code.")
6465 (license license:expat)))
6466
6467 (define-public python2-mccabe
6468 (package-with-python2 python-mccabe))
6469
6470 (define-public python-mccabe-0.2.1
6471 (package (inherit python-mccabe)
6472 (version "0.2.1")
6473 (source
6474 (origin
6475 (method url-fetch)
6476 (uri (pypi-uri "mccabe" version))
6477 (sha256
6478 (base32
6479 "0fi4a81kr5bcv5p4xgibqr595hyj5dafkqgsmfk96mfy8w71fajs"))))))
6480
6481 (define-public python2-mccabe-0.2.1
6482 (package-with-python2 python-mccabe-0.2.1))
6483
6484 ;; Flake8 2.4.1 requires an older version of pep8.
6485 ;; This should be removed ASAP.
6486 (define-public python-pep8-1.5.7
6487 (package (inherit python-pep8)
6488 (version "1.5.7")
6489 (source
6490 (origin
6491 (method url-fetch)
6492 (uri (pypi-uri "pep8" version))
6493 (sha256
6494 (base32
6495 "12b9bbdbwnspxgak14xg58c130x2n0blxzlms5jn2dszn8qj3d0m"))))
6496 (arguments
6497 ;; XXX Tests not compatible with Python 3.5.
6498 '(#:tests? #f))))
6499
6500 (define-public python2-pep8-1.5.7
6501 (package-with-python2 python-pep8-1.5.7))
6502
6503 ;; Flake8 2.4.1 requires an older version of pyflakes.
6504 ;; This should be removed ASAP.
6505 (define-public python-pyflakes-0.8.1
6506 (package (inherit python-pyflakes)
6507 (version "0.8.1")
6508 (source
6509 (origin
6510 (method url-fetch)
6511 (uri (pypi-uri "pyflakes" version))
6512 (sha256
6513 (base32
6514 "0sbpq6pqm1i9wqi41mlfrsc5rk92jv4mskvlyxmnhlbdnc80ma1z"))))
6515 (arguments
6516 ;; XXX Tests not compatible with Python 3.5.
6517 '(#:tests? #f))))
6518
6519 (define-public python2-pyflakes-0.8.1
6520 (package-with-python2 python-pyflakes-0.8.1))
6521
6522 (define-public python-flake8
6523 (package
6524 (name "python-flake8")
6525 (version "3.7.7")
6526 (source (origin
6527 (method url-fetch)
6528 (uri (pypi-uri "flake8" version))
6529 (sha256
6530 (base32
6531 "0qg6zggqigrd4k3gv88shd1a27d0cwgfql8vfiq2c7rl7w3rd6c5"))))
6532 (build-system python-build-system)
6533 (arguments
6534 `(#:phases
6535 (modify-phases %standard-phases
6536 (delete 'check)
6537 (add-after 'install 'check
6538 (lambda* (#:key inputs outputs #:allow-other-keys)
6539 (add-installed-pythonpath inputs outputs)
6540 (invoke "pytest" "-v")
6541 #t)))))
6542 (propagated-inputs
6543 `(("python-pycodestyle" ,python-pycodestyle)
6544 ("python-entrypoints" ,python-entrypoints)
6545 ("python-pyflakes" ,python-pyflakes)
6546 ("python-mccabe" ,python-mccabe)))
6547 (native-inputs
6548 `(("python-mock" ,python-mock)
6549 ("python-pytest" ,python-pytest-bootstrap)
6550 ("python-pytest-runner" ,python-pytest-runner)))
6551 (home-page "https://gitlab.com/pycqa/flake8")
6552 (synopsis
6553 "The modular source code checker: pep8, pyflakes and co")
6554 (description
6555 "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.")
6556 (properties `((python2-variant . ,(delay python2-flake8))))
6557 (license license:expat)))
6558
6559 (define-public python2-flake8
6560 (let ((base (package-with-python2 (strip-python2-variant python-flake8))))
6561 (package (inherit base)
6562 (propagated-inputs
6563 `(("python2-configparser" ,python2-configparser)
6564 ("python2-enum34" ,python2-enum34)
6565 ("python2-typing" ,python2-typing)
6566 ,@(package-propagated-inputs base))))))
6567
6568 ;; python-hacking requires flake8 <2.6.0.
6569 (define-public python-flake8-2.5
6570 (package
6571 (inherit python-flake8)
6572 (version "2.5.5")
6573 (source (origin
6574 (method url-fetch)
6575 (uri (pypi-uri "flake8" version))
6576 (sha256
6577 (base32
6578 "1snylqwbmrylbx3r1wpz8ggk98f6bcag4441ag8mm2l7wyn58sij"))))
6579 (propagated-inputs
6580 `(("python-pep8" ,python-pep8)
6581 ,@(package-propagated-inputs python-flake8)))
6582 (properties `((python2-variant . ,(delay python2-flake8-2.5))))))
6583
6584 (define-public python2-flake8-2.5
6585 (package
6586 (inherit python2-flake8)
6587 (version (package-version python-flake8-2.5))
6588 (source (origin
6589 (inherit (package-source python-flake8-2.5))))
6590 (propagated-inputs
6591 `(("python2-pep8" ,python2-pep8)
6592 ,@(package-propagated-inputs python2-flake8)))))
6593
6594 (define-public python-flake8-polyfill
6595 (package
6596 (name "python-flake8-polyfill")
6597 (version "1.0.2")
6598 (source
6599 (origin
6600 (method url-fetch)
6601 (uri (pypi-uri "flake8-polyfill" version))
6602 (sha256
6603 (base32
6604 "1nlf1mkqw856vi6782qcglqhaacb23khk9wkcgn55npnjxshhjz4"))))
6605 (build-system python-build-system)
6606 (arguments
6607 '(#:phases
6608 (modify-phases %standard-phases
6609 (replace 'check
6610 (lambda _
6611 ;; Be compatible with Pytest 4:
6612 ;; https://gitlab.com/pycqa/flake8-polyfill/merge_requests/7
6613 (substitute* "setup.cfg"
6614 (("\\[pytest\\]")
6615 "[tool:pytest]"))
6616
6617 (setenv "PYTHONPATH"
6618 (string-append (getcwd) "/build/lib:"
6619 (getenv "PYTHONPATH")))
6620 (invoke "py.test" "-v"))))))
6621 (native-inputs
6622 `(("python-flake8" ,python-flake8)
6623 ("python-mock" ,python-mock)
6624 ("python-pep8" ,python-pep8)
6625 ("python-pycodestyle" ,python-pycodestyle)
6626 ("python-pytest" ,python-pytest)))
6627 (home-page "https://gitlab.com/pycqa/flake8-polyfill")
6628 (synopsis "Polyfill package for Flake8 plugins")
6629 (description
6630 "This package that provides some compatibility helpers for Flake8
6631 plugins that intend to support Flake8 2.x and 3.x simultaneously.")
6632 (license license:expat)))
6633
6634 (define-public python2-flake8-polyfill
6635 (package-with-python2 python-flake8-polyfill))
6636
6637 (define-public python-mistune
6638 (package
6639 (name "python-mistune")
6640 (version "0.8.4")
6641 (source
6642 (origin
6643 (method url-fetch)
6644 (uri (pypi-uri "mistune" version))
6645 (sha256
6646 (base32
6647 "0vkmsh0x480rni51lhyvigfdf06b9247z868pk3bal1wnnfl58sr"))))
6648 (build-system python-build-system)
6649 (native-inputs
6650 `(("python-nose" ,python-nose)
6651 ("python-cython" ,python-cython)))
6652 (home-page "https://github.com/lepture/mistune")
6653 (synopsis "Markdown parser in pure Python")
6654 (description "This package provides a fast markdown parser in pure
6655 Python.")
6656 (license license:bsd-3)))
6657
6658 (define-public python2-mistune
6659 (package-with-python2 python-mistune))
6660
6661 (define-public python-markdown
6662 (package
6663 (name "python-markdown")
6664 (version "3.1.1")
6665 (source
6666 (origin
6667 (method url-fetch)
6668 (uri (pypi-uri "Markdown" version))
6669 (sha256
6670 (base32
6671 "0yhylk4ffqqs7x086fav4pnfsl1021v7lghznzkififprmmqfl1f"))))
6672 (build-system python-build-system)
6673 (native-inputs
6674 `(("python-nose" ,python-nose)
6675 ("python-pyyaml" ,python-pyyaml)))
6676 (home-page "https://python-markdown.github.io/")
6677 (synopsis "Python implementation of Markdown")
6678 (description
6679 "This package provides a Python implementation of John Gruber's
6680 Markdown. The library features international input, various Markdown
6681 extensions, and several HTML output formats. A command line wrapper
6682 markdown_py is also provided to convert Markdown files to HTML.")
6683 (license license:bsd-3)))
6684
6685 (define-public python2-markdown
6686 (package-with-python2 python-markdown))
6687
6688 (define-public python-ptyprocess
6689 (package
6690 (name "python-ptyprocess")
6691 (version "0.5.2")
6692 (source
6693 (origin
6694 (method url-fetch)
6695 (uri (pypi-uri "ptyprocess" version))
6696 (sha256
6697 (base32
6698 "0ra31k10v3629xq0kdn8lwmfbi97anmk48r03yvh7mks0kq96hg6"))))
6699 (build-system python-build-system)
6700 (native-inputs
6701 `(("python-nose" ,python-nose)))
6702 (arguments
6703 `(#:phases
6704 (modify-phases %standard-phases
6705 (replace 'check
6706 (lambda _ (invoke "nosetests"))))))
6707 (home-page "https://github.com/pexpect/ptyprocess")
6708 (synopsis "Run a subprocess in a pseudo terminal")
6709 (description
6710 "This package provides a Python library used to launch a subprocess in a
6711 pseudo terminal (pty), and interact with both the process and its pty.")
6712 (license license:isc)))
6713
6714 (define-public python2-ptyprocess
6715 (package-with-python2 python-ptyprocess))
6716
6717 (define-public python-cram
6718 (package
6719 (name "python-cram")
6720 (version "0.7")
6721 (home-page "https://bitheap.org/cram/")
6722 (source (origin
6723 (method url-fetch)
6724 (uri (list (string-append home-page "cram-"
6725 version ".tar.gz")
6726 (pypi-uri "cram" version)))
6727 (sha256
6728 (base32
6729 "0bvz6fwdi55rkrz3f50zsy35gvvwhlppki2yml5bj5ffy9d499vx"))))
6730 (arguments
6731 '(#:phases
6732 (modify-phases %standard-phases
6733 (add-after 'unpack 'patch-source
6734 (lambda _
6735 (substitute* (find-files "cram" ".*\\.py$")
6736 ;; Replace default shell path.
6737 (("/bin/sh") (which "sh")))
6738 (substitute* (find-files "tests" ".*\\.t$")
6739 (("md5") "md5sum")
6740 (("/bin/bash") (which "bash"))
6741 (("/bin/sh") (which "sh")))
6742 (substitute* "cram/_test.py"
6743 ;; This hack works around a bug triggered by substituting
6744 ;; the /bin/sh paths. "tests/usage.t" compares the output of
6745 ;; "cram -h", which breaks the output at 80 characters. This
6746 ;; causes the line showing the default shell to break into two
6747 ;; lines, but the test expects a single line...
6748 (("env\\['COLUMNS'\\] = '80'")
6749 "env['COLUMNS'] = '160'"))
6750
6751 (substitute* "Makefile"
6752 ;; Recent versions of python-coverage have caused the test
6753 ;; coverage to decrease (as of version 0.7). Allow that.
6754 (("--fail-under=100")
6755 "--fail-under=90"))
6756
6757 #t))
6758 (replace 'check
6759 ;; The test phase uses the built library and executable.
6760 (lambda* (#:key inputs outputs #:allow-other-keys)
6761 (add-installed-pythonpath inputs outputs)
6762 (setenv "PATH" (string-append (getenv "PATH") ":"
6763 (assoc-ref outputs "out") "/bin"))
6764 (invoke "make" "test"))))))
6765 (build-system python-build-system)
6766 (native-inputs
6767 `(("python-coverage" ,python-coverage)
6768 ("which" ,which)))
6769 (synopsis "Simple testing framework for command line applications")
6770 (description
6771 "Cram is a functional testing framework for command line applications.
6772 Cram tests look like snippets of interactive shell sessions. Cram runs each
6773 command and compares the command output in the test with the command’s actual
6774 output.")
6775 (license license:gpl2+)))
6776
6777 (define-public python2-cram
6778 (package-with-python2 python-cram))
6779
6780 (define-public python-straight-plugin
6781 (package
6782 (name "python-straight-plugin")
6783 (version "1.4.1")
6784 (source
6785 (origin
6786 (method url-fetch)
6787 (uri (pypi-uri "straight.plugin" version))
6788 (sha256
6789 (base32
6790 "069pjll4383p4kkgvcc40hgyvf79j2wdbpgwz77yigzxksh1gj62"))))
6791 (build-system python-build-system)
6792 (home-page "https://github.com/ironfroggy/straight.plugin")
6793 (synopsis "Simple namespaced plugin facility")
6794 (description "Straight Plugin provides a type of plugin you can create from
6795 almost any existing Python modules, and an easy way for outside developers to
6796 add functionality and customization to your projects with their own plugins.")
6797 (license license:expat)))
6798
6799 (define-public python2-straight-plugin
6800 (package-with-python2 python-straight-plugin))
6801
6802 (define-public python-fonttools
6803 (package
6804 (name "python-fonttools")
6805 (version "3.38.0")
6806 (source (origin
6807 (method url-fetch)
6808 (uri (pypi-uri "fonttools" version ".zip"))
6809 (sha256
6810 (base32
6811 "12ripk3s7skgxr1bs9r8n13r94ym3s8iir7ivfixls9fa4dabmlh"))))
6812 (build-system python-build-system)
6813 (native-inputs
6814 `(("unzip" ,unzip)
6815 ("python-pytest" ,python-pytest)
6816 ("python-pytest-runner" ,python-pytest-runner)))
6817 (home-page "https://github.com/fonttools/fonttools")
6818 (synopsis "Tools to manipulate font files")
6819 (description
6820 "FontTools/TTX is a library to manipulate font files from Python. It
6821 supports reading and writing of TrueType/OpenType fonts, reading and writing
6822 of AFM files, reading (and partially writing) of PS Type 1 fonts. The package
6823 also contains a tool called “TTX” which converts TrueType/OpenType fonts to and
6824 from an XML-based format.")
6825 (license license:expat)))
6826
6827 (define-public python2-fonttools
6828 (package-with-python2 python-fonttools))
6829
6830 (define-public python-ly
6831 (package
6832 (name "python-ly")
6833 (version "0.9.5")
6834 (source
6835 (origin
6836 (method url-fetch)
6837 (uri (pypi-uri name version))
6838 (sha256
6839 (base32
6840 "0x98dv7p8mg26p4816yy8hz4f34zf6hpnnfmr56msgh9jnsm2qfl"))))
6841 (build-system python-build-system)
6842 (arguments
6843 ;; FIXME: Some tests need network access.
6844 '(#:tests? #f))
6845 (synopsis "Tool and library for manipulating LilyPond files")
6846 (description "This package provides a Python library to parse, manipulate
6847 or create documents in LilyPond format. A command line program ly is also
6848 provided that can be used to do various manipulations with LilyPond files.")
6849 (home-page "https://pypi.python.org/pypi/python-ly")
6850 (license license:gpl2+)))
6851
6852 (define-public python-appdirs
6853 (package
6854 (name "python-appdirs")
6855 (version "1.4.3")
6856 (source
6857 (origin
6858 (method url-fetch)
6859 (uri (pypi-uri "appdirs" version))
6860 (sha256
6861 (base32
6862 "14id6wxi12lgyw0mg3bcfnf888ad07jz9yj46gfzhn186z8rcn4y"))))
6863 (build-system python-build-system)
6864 (home-page "https://github.com/ActiveState/appdirs")
6865 (synopsis
6866 "Determine platform-specific dirs, e.g. a \"user data dir\"")
6867 (description
6868 "This module provides a portable way of finding out where user data
6869 should be stored on various operating systems.")
6870 (license license:expat)))
6871
6872 (define-public python2-appdirs
6873 (package-with-python2 python-appdirs))
6874
6875 (define-public python-llfuse
6876 (package
6877 (name "python-llfuse")
6878 (version "1.3.5")
6879 (source (origin
6880 (method url-fetch)
6881 (uri (pypi-uri "llfuse" version ".tar.bz2"))
6882 (sha256
6883 (base32
6884 "1n7a90jww3ly49fm7x27m3xw3la3qfrnykcakga654g6kcyjlhbf"))))
6885 (build-system python-build-system)
6886 (inputs
6887 `(("fuse" ,fuse)
6888 ("attr" ,attr)))
6889 (native-inputs
6890 `(("pkg-config" ,pkg-config)))
6891 (synopsis "Python bindings for FUSE")
6892 (description
6893 "Python-LLFUSE is a set of Python bindings for the low level FUSE API.")
6894 (home-page "https://bitbucket.org/nikratio/python-llfuse/")
6895 (license license:lgpl2.0+)
6896 (properties `((python2-variant . ,(delay python2-llfuse))))))
6897
6898 (define-public python2-llfuse
6899 (package (inherit (package-with-python2
6900 (strip-python2-variant python-llfuse)))
6901 (propagated-inputs `(("python2-contextlib2" ,python2-contextlib2)))))
6902
6903 ;; For attic-0.16
6904 (define-public python-llfuse-0.41
6905 (package (inherit python-llfuse)
6906 (version "0.41.1")
6907 (source (origin
6908 (method url-fetch)
6909 (uri (string-append
6910 "https://bitbucket.org/nikratio/python-llfuse/downloads/"
6911 "llfuse-" version ".tar.bz2"))
6912 (sha256
6913 (base32
6914 "1imlqw9b73086y97izr036f58pgc5akv4ihc2rrf8j5h75jbrlaa"))))
6915 ;; Python-LLFUSE < 0.42 includes underscore.js, which is MIT (expat)
6916 ;; licensed. The rest of the package is licensed under LGPL2.0 or later.
6917 (license (list license:expat license:lgpl2.0+))))
6918
6919 (define-public python-msgpack
6920 (package
6921 (name "python-msgpack")
6922 (version "0.5.6")
6923 (source (origin
6924 (method url-fetch)
6925 (uri (pypi-uri "msgpack" version))
6926 (sha256
6927 (base32
6928 "1hz2dba1nvvn52afg34liijsm7kn65cmn06dl0xbwld6bb4cis0f"))))
6929 (build-system python-build-system)
6930 (arguments
6931 `(#:modules ((guix build utils)
6932 (guix build python-build-system)
6933 (ice-9 ftw)
6934 (srfi srfi-1)
6935 (srfi srfi-26))
6936 #:phases
6937 (modify-phases %standard-phases
6938 (replace 'check
6939 (lambda _
6940 (let ((cwd (getcwd)))
6941 (setenv "PYTHONPATH"
6942 (string-append cwd "/build/"
6943 (find (cut string-prefix? "lib" <>)
6944 (scandir (string-append cwd "/build")))
6945 ":"
6946 (getenv "PYTHONPATH")))
6947 (invoke "pytest" "-v" "test")))))))
6948 (native-inputs
6949 `(("python-pytest" ,python-pytest)))
6950 (synopsis "MessagePack (de)serializer")
6951 (description "MessagePack is a fast, compact binary serialization format,
6952 suitable for similar data to JSON. This package provides CPython bindings for
6953 reading and writing MessagePack data.")
6954 (home-page "https://pypi.python.org/pypi/msgpack/")
6955 (license license:asl2.0)))
6956
6957 ;; This msgpack library's name changed from "python-msgpack" to "msgpack" with
6958 ;; release 0.5. Some packages like borg still call it by the old name for now.
6959 ;; <https://bugs.gnu.org/30662>
6960 (define-public python-msgpack-transitional
6961 (package
6962 (inherit python-msgpack)
6963 (name "python-msgpack-transitional")
6964 (arguments
6965 (substitute-keyword-arguments (package-arguments python-msgpack)
6966 ((#:phases phases)
6967 `(modify-phases ,phases
6968 (add-after 'unpack 'configure-transitional
6969 (lambda _
6970 ;; Keep using the old name.
6971 (substitute* "setup.py"
6972 (("TRANSITIONAL = False")
6973 "TRANSITIONAL = 1"))
6974 #t))))))))
6975
6976 (define-public python2-msgpack
6977 (package-with-python2 python-msgpack))
6978
6979 (define-public python-netaddr
6980 (package
6981 (name "python-netaddr")
6982 (version "0.7.19")
6983 (source
6984 (origin
6985 (method url-fetch)
6986 (uri (pypi-uri "netaddr" version))
6987 (sha256
6988 (base32
6989 "1zdfadvpq4lmcqzr383gywxn4xyn355kj1n3lk9q2l03vmyfrbiq"))))
6990 (build-system python-build-system)
6991 (arguments `(#:tests? #f)) ;; No tests.
6992 (home-page "https://github.com/drkjam/netaddr/")
6993 (synopsis "Pythonic manipulation of network addresses")
6994 (description
6995 "A Python library for representing and manipulating IPv4, IPv6, CIDR, EUI
6996 and MAC network addresses.")
6997 (license license:bsd-3)))
6998
6999 (define-public python2-netaddr
7000 (package-with-python2 python-netaddr))
7001
7002 (define-public python2-pyroute2
7003 (package
7004 (name "python2-pyroute2")
7005 (version "0.5.6")
7006 (source
7007 (origin
7008 (method url-fetch)
7009 (uri (pypi-uri "pyroute2" version))
7010 (sha256
7011 (base32
7012 "1gmz4r1w0yzj6fjjypnalmfyy0lnfznydyn62gi3wk50j5hhxbny"))))
7013 (build-system python-build-system)
7014 (arguments
7015 `(#:python ,python-2)) ;Python 3.x is not supported
7016 (home-page "https://github.com/svinota/pyroute2")
7017 (synopsis "Python netlink library")
7018 (description
7019 "Pyroute2 is a pure Python netlink library with minimal dependencies.
7020 Supported netlink families and protocols include:
7021 @itemize
7022 @item rtnl, network settings - addresses, routes, traffic controls
7023 @item nfnetlink - netfilter API: ipset, nftables, ...
7024 @item ipq - simplest userspace packet filtering, iptables QUEUE target
7025 @item devlink - manage and monitor devlink-enabled hardware
7026 @item generic - generic netlink families
7027 @itemize
7028 @item nl80211 - wireless functions API (basic support)
7029 @item taskstats - extended process statistics
7030 @item acpi_events - ACPI events monitoring
7031 @item thermal_events - thermal events monitoring
7032 @item VFS_DQUOT - disk quota events monitoring
7033 @end itemize
7034 @end itemize")
7035 (license license:gpl2+)))
7036
7037 (define-public python-wrapt
7038 (package
7039 (name "python-wrapt")
7040 (version "1.11.2")
7041 (source
7042 (origin
7043 (method url-fetch)
7044 (uri (pypi-uri "wrapt" version))
7045 (sha256
7046 (base32
7047 "1q81762dgsgrd12f8qc39zk8s5wll3m5xc32jdmlf6cls4gh4njn"))))
7048 (build-system python-build-system)
7049 (arguments
7050 ;; Tests are not included in the tarball, they are only available in the
7051 ;; git repository.
7052 `(#:tests? #f))
7053 (home-page "https://github.com/GrahamDumpleton/wrapt")
7054 (synopsis "Module for decorators, wrappers and monkey patching")
7055 (description
7056 "The aim of the wrapt module is to provide a transparent object proxy for
7057 Python, which can be used as the basis for the construction of function
7058 wrappers and decorator functions.")
7059 (license license:bsd-2)))
7060
7061 (define-public python2-wrapt
7062 (package-with-python2 python-wrapt))
7063
7064 (define-public python-xlrd
7065 (package
7066 (name "python-xlrd")
7067 (version "1.2.0")
7068 (source (origin
7069 (method url-fetch)
7070 (uri (pypi-uri "xlrd" version))
7071 (sha256
7072 (base32
7073 "1ci93fda4n67qhdvfl16zasyxrpygzk53hs6m8z0rd4dxrnb6vjl"))))
7074 (build-system python-build-system)
7075 (arguments
7076 `(#:phases
7077 (modify-phases %standard-phases
7078 ;; Some tests depend on writing a temporary file to the user's home
7079 ;; directory.
7080 (add-after 'unpack 'fix-tests
7081 (lambda _
7082 (delete-file "tests/test_open_workbook.py")
7083 #t)))))
7084 (home-page "http://www.python-excel.org/")
7085 (synopsis "Library for extracting data from Excel files")
7086 (description "This package provides a library to extract data from
7087 spreadsheets using Microsoft Excel proprietary file formats @samp{.xls} and
7088 @samp{.xlsx} (versions 2.0 onwards). It has support for Excel dates and is
7089 Unicode-aware. It is not intended as an end-user tool.")
7090 (license license:bsd-3)))
7091
7092 (define-public python2-xlrd
7093 (package-with-python2 python-xlrd))
7094
7095 (define-public python-prettytable
7096 (package
7097 (name "python-prettytable")
7098 (version "0.7.2")
7099 (source
7100 (origin
7101 (method url-fetch)
7102 (uri (pypi-uri "prettytable" version ".tar.bz2"))
7103 (sha256
7104 (base32
7105 "0diwsicwmiq2cpzpxri7cyl5fmsvicafw6nfqf6p6p322dji2g45"))))
7106 (build-system python-build-system)
7107 (home-page "http://code.google.com/p/prettytable/")
7108 (synopsis "Display tabular data in an ASCII table format")
7109 (description
7110 "A library designed to represent tabular data in visually appealing ASCII
7111 tables. PrettyTable allows for selection of which columns are to be printed,
7112 independent alignment of columns (left or right justified or centred) and
7113 printing of sub-tables by specifying a row range.")
7114 (license license:bsd-3)))
7115
7116 (define-public python2-prettytable
7117 (package-with-python2 python-prettytable))
7118
7119 (define-public python-tables
7120 (package
7121 (name "python-tables")
7122 (version "3.4.4")
7123 (source
7124 (origin
7125 (method url-fetch)
7126 (uri (pypi-uri "tables" version))
7127 (sha256
7128 (base32
7129 "0affz7k8babh8wdmsgrz5jxrd569by2w8ffimcxs9wiaf5rw1idx"))
7130 (modules '((guix build utils)))
7131 (snippet
7132 '(begin
7133 ;; Remove pre-compiled .pyc files from source.
7134 (for-each delete-file-recursively
7135 (find-files "." "__pycache__" #:directories? #t))
7136 (for-each delete-file (find-files "." "\\.pyc$"))
7137 #t))))
7138 (build-system python-build-system)
7139 (arguments
7140 `(;; FIXME: python-build-system does not pass configure-flags to "build"
7141 ;; or "check", so we must override the build and check phases.
7142 #:phases
7143 (modify-phases %standard-phases
7144 (add-after 'unpack 'use-gcc
7145 (lambda _
7146 (substitute* "setup.py"
7147 (("compiler = new_compiler\\(\\)" line)
7148 (string-append line
7149 "\ncompiler.set_executables(compiler='gcc',"
7150 "compiler_so='gcc',"
7151 "linker_exe='gcc',"
7152 "linker_so='gcc -shared')")))
7153 #t))
7154 (replace 'build
7155 (lambda* (#:key inputs #:allow-other-keys)
7156 (invoke "python" "setup.py" "build"
7157 (string-append "--hdf5="
7158 (assoc-ref inputs "hdf5")))))
7159 (replace 'check
7160 (lambda* (#:key inputs #:allow-other-keys)
7161 (invoke "python" "setup.py" "check"
7162 (string-append "--hdf5="
7163 (assoc-ref inputs "hdf5"))))))))
7164 (propagated-inputs
7165 `(("python-numexpr" ,python-numexpr)
7166 ("python-numpy" ,python-numpy)))
7167 (native-inputs
7168 `(("python-cython" ,python-cython)
7169 ("pkg-config" ,pkg-config)))
7170 (inputs
7171 `(("hdf5" ,hdf5)
7172 ("bzip2" ,bzip2)
7173 ("zlib" ,zlib)))
7174 (home-page "http://www.pytables.org/")
7175 (synopsis "Hierarchical datasets for Python")
7176 (description "PyTables is a package for managing hierarchical datasets and
7177 designed to efficiently cope with extremely large amounts of data.")
7178 (license license:bsd-3)))
7179
7180 (define-public python2-tables
7181 (package-with-python2 python-tables))
7182
7183 (define-public python-pyasn1
7184 (package
7185 (name "python-pyasn1")
7186 (version "0.4.3")
7187 (source
7188 (origin
7189 (method url-fetch)
7190 (uri (pypi-uri "pyasn1" version))
7191 (sha256
7192 (base32
7193 "1z5h38anjzzrxpraa9iq9llffyx2zs8gx0q6dc1g029miwnn50gv"))))
7194 (build-system python-build-system)
7195 (home-page "http://pyasn1.sourceforge.net/")
7196 (synopsis "ASN.1 types and codecs")
7197 (description
7198 "This is an implementation of ASN.1 types and codecs in Python. It is
7199 suitable for a wide range of protocols based on the ASN.1 specification.")
7200 (license license:bsd-2)))
7201
7202 (define-public python2-pyasn1
7203 (package-with-python2 python-pyasn1))
7204
7205 (define-public python-pyasn1-modules
7206 (package
7207 (name "python-pyasn1-modules")
7208 (version "0.2.2")
7209 (source
7210 (origin
7211 (method url-fetch)
7212 (uri (pypi-uri "pyasn1-modules" version))
7213 (sha256
7214 (base32
7215 "0ivm850yi7ajjbi8j115qpsj95bgxdsx48nbjzg0zip788c3xkx0"))))
7216 (build-system python-build-system)
7217 (propagated-inputs
7218 `(("python-pyasn1" ,python-pyasn1)))
7219 (home-page "https://sourceforge.net/projects/pyasn1/")
7220 (synopsis "ASN.1 codec implementations")
7221 (description
7222 "Pyasn1-modules is a collection of Python modules providing ASN.1 types and
7223 implementations of ASN.1-based codecs and protocols.")
7224 (license license:bsd-3)))
7225
7226 (define-public python2-pyasn1-modules
7227 (package-with-python2 python-pyasn1-modules))
7228
7229 (define-public python-ipaddress
7230 (package
7231 (name "python-ipaddress")
7232 (version "1.0.22")
7233 (source (origin
7234 (method url-fetch)
7235 (uri (pypi-uri "ipaddress" version))
7236 (sha256
7237 (base32
7238 "0b570bm6xqpjwqis15pvdy6lyvvzfndjvkynilcddjj5x98wfimi"))))
7239 (build-system python-build-system)
7240 (home-page "https://github.com/phihag/ipaddress")
7241 (synopsis "IP address manipulation library")
7242 (description
7243 "This package provides a fast, lightweight IPv4/IPv6 manipulation library
7244 in Python. This library is used to create, poke at, and manipulate IPv4 and
7245 IPv6 addresses and networks. This is a port of the Python 3.3 ipaddress
7246 module to older versions of Python.")
7247 (license license:psfl)))
7248
7249 (define-public python2-ipaddress
7250 (package-with-python2 python-ipaddress))
7251
7252 (define-public python2-ipaddr
7253 (package
7254 (name "python2-ipaddr")
7255 (version "2.1.11")
7256 (source
7257 (origin
7258 (method url-fetch)
7259 (uri (pypi-uri "ipaddr" version))
7260 (sha256
7261 (base32 "1dwq3ngsapjc93fw61rp17fvzggmab5x1drjzvd4y4q0i255nm8v"))))
7262 (build-system python-build-system)
7263 (arguments
7264 `(#:python ,python-2 ;version 2 only
7265 #:phases
7266 (modify-phases %standard-phases
7267 (replace 'check
7268 (lambda _ (invoke "python" "ipaddr_test.py"))))))
7269 (home-page "https://github.com/google/ipaddr-py")
7270 (synopsis "IP address manipulation library")
7271 (description
7272 "Ipaddr is a Python@tie{}2 library for creating and manupilating IPv4 and
7273 IPv6 addresses and networks.
7274
7275 For new implementations you may prefer to use the standard module
7276 @code{ipaddress}, which was introduced in Python 3.3 and backported to older
7277 versions of Python.")
7278 (license license:asl2.0)))
7279
7280 (define-public python-idna
7281 (package
7282 (name "python-idna")
7283 (version "2.8")
7284 (source
7285 (origin
7286 (method url-fetch)
7287 (uri (pypi-uri "idna" version))
7288 (sha256
7289 (base32
7290 "01rlkigdxg17sf9yar1jl8n18ls59367wqh59hnawlyg53vb6my3"))))
7291 (build-system python-build-system)
7292 (home-page "https://github.com/kjd/idna")
7293 (synopsis "Internationalized domain names in applications")
7294 (description
7295 "This is a library to support the Internationalised Domain Names in
7296 Applications (IDNA) protocol as specified in RFC 5891. This version of the
7297 protocol is often referred to as “IDNA2008” and can produce different results
7298 from the earlier standard from 2003. The library is also intended to act as a
7299 suitable drop-in replacement for the “encodings.idna” module that comes with
7300 the Python standard library but currently only supports the older 2003
7301 specification.")
7302 (license license:bsd-4)))
7303
7304 (define-public python-idna-2.7
7305 (package (inherit python-idna)
7306 (version "2.7")
7307 (source (origin
7308 (method url-fetch)
7309 (uri (pypi-uri "idna" version))
7310 (sha256
7311 (base32
7312 "05jam7d31767dr12x0rbvvs8lxnpb1mhdb2zdlfxgh83z6k3hjk8"))))))
7313
7314
7315 (define-public python2-idna
7316 (package-with-python2 python-idna))
7317
7318 (define-public python-idna-ssl
7319 (package
7320 (name "python-idna-ssl")
7321 (version "1.0.1")
7322 (source
7323 (origin
7324 (method url-fetch)
7325 (uri (pypi-uri "idna-ssl" version))
7326 (sha256
7327 (base32
7328 "0ydrc8hpg9mdr5hqq1lqfsfbn6sjq69slwpfrnlrm3k0phqg14qj"))))
7329 (build-system python-build-system)
7330 (arguments
7331 `(#:tests? #f)) ;circular dependency with python-aiohttp
7332 (home-page "https://github.com/aio-libs/idna-ssl")
7333 (synopsis "Patch @code{ssl.match_hostname} for Unicode(idna) domains support")
7334 (description "Patch @code{ssl.match_hostname} for Unicode(idna)
7335 domains support.")
7336 (license license:expat)))
7337
7338 (define-public python-pretend
7339 (package
7340 (name "python-pretend")
7341 (version "1.0.9")
7342 (source
7343 (origin
7344 (method url-fetch)
7345 (uri (pypi-uri "pretend" version))
7346 (sha256
7347 (base32
7348 "040vm94lcbscg5p81g1icmwwwa2jm7wrd1ybmxnv1sz8rl8bh3n9"))))
7349 (build-system python-build-system)
7350 (home-page "https://github.com/alex/pretend")
7351 (synopsis "Library for stubbing in Python")
7352 (description
7353 "Pretend is a library to make stubbing with Python easier. Stubbing is a
7354 technique for writing tests. You may hear the term mixed up with mocks,
7355 fakes, or doubles. Basically, a stub is an object that returns pre-canned
7356 responses, rather than doing any computation.")
7357 (license license:bsd-3)))
7358
7359 (define-public python2-pretend
7360 (package-with-python2 python-pretend))
7361
7362 (define-public python-pip
7363 (package
7364 (name "python-pip")
7365 (version "19.2.1")
7366 (source
7367 (origin
7368 (method url-fetch)
7369 (uri (pypi-uri "pip" version))
7370 (sha256
7371 (base32
7372 "100sd12ss4mbdj5lf3wawad29cm573b27765mq098x6xhcj71395"))))
7373 (build-system python-build-system)
7374 (arguments
7375 '(#:tests? #f)) ; there are no tests in the pypi archive.
7376 (home-page "https://pip.pypa.io/")
7377 (synopsis "Package manager for Python software")
7378 (description
7379 "Pip is a package manager for Python software, that finds packages on the
7380 Python Package Index (PyPI).")
7381 (license license:expat)))
7382
7383 (define-public python2-pip
7384 (package-with-python2 python-pip))
7385
7386 (define-public python-tlsh
7387 (package
7388 (name "python-tlsh")
7389 (version "3.4.5")
7390 (home-page "https://github.com/trendmicro/tlsh")
7391 (source
7392 (origin
7393 (method git-fetch)
7394 (uri (git-reference
7395 (url "https://github.com/trendmicro/tlsh.git")
7396 (commit (string-append "v" version))))
7397 (file-name (git-file-name name version))
7398 (sha256
7399 (base32 "1ydliir308xn4ywy705mmsh7863ldlixdvpqwdhbipzq9vfpmvll"))))
7400 (build-system cmake-build-system)
7401 (arguments
7402 '(#:out-of-source? #f
7403 #:phases (modify-phases %standard-phases
7404 (replace
7405 'install
7406 (lambda* (#:key outputs #:allow-other-keys)
7407 ;; Build and install the Python bindings. The underlying
7408 ;; C++ library is apparently not meant to be installed.
7409 (let ((out (assoc-ref outputs "out")))
7410 (with-directory-excursion "py_ext"
7411 (and (system* "python" "setup.py" "build")
7412 (system* "python" "setup.py" "install"
7413 (string-append "--prefix=" out))))))))))
7414 (inputs `(("python" ,python-wrapper))) ;for the bindings
7415 (synopsis "Fuzzy matching library for Python")
7416 (description
7417 "Trend Micro Locality Sensitive Hash (TLSH) is a fuzzy matching library.
7418 Given a byte stream with a minimum length of 256 bytes, TLSH generates a hash
7419 value which can be used for similarity comparisons. Similar objects have
7420 similar hash values, which allows for the detection of similar objects by
7421 comparing their hash values. The byte stream should have a sufficient amount
7422 of complexity; for example, a byte stream of identical bytes will not generate
7423 a hash value.")
7424 (license license:asl2.0)))
7425
7426 (define-public python2-tlsh
7427 (package
7428 (inherit python-tlsh)
7429 (name "python2-tlsh")
7430 (inputs `(("python" ,python-2)))))
7431
7432 (define-public python-termcolor
7433 (package
7434 (name "python-termcolor")
7435 (version "1.1.0")
7436 (source
7437 (origin
7438 (method url-fetch)
7439 (uri (pypi-uri "termcolor" version))
7440 (sha256
7441 (base32
7442 "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
7443 (build-system python-build-system)
7444 (arguments
7445 ;; There are no tests.
7446 `(#:tests? #f))
7447 (home-page "https://pypi.python.org/pypi/termcolor")
7448 (synopsis "ANSII Color formatting for terminal output")
7449 (description
7450 "This package provides ANSII Color formatting for output in terminals.")
7451 (license license:expat)))
7452
7453 (define-public python2-termcolor
7454 (package-with-python2 python-termcolor))
7455
7456 (define-public python-libarchive-c
7457 (package
7458 (name "python-libarchive-c")
7459 (version "2.8")
7460 (source (origin
7461 (method url-fetch)
7462 (uri (pypi-uri "libarchive-c" version))
7463 (sha256
7464 (base32
7465 "0qg0v1s9c1xdk9philhnv8k6c6nicvnvfwlc0j9srg90jmdlvm06"))))
7466 (build-system python-build-system)
7467 (arguments
7468 '(#:phases (modify-phases %standard-phases
7469 (add-before
7470 'build 'reference-libarchive
7471 (lambda* (#:key inputs #:allow-other-keys)
7472 ;; Retain the absolute file name of libarchive.so.
7473 (let ((libarchive (assoc-ref inputs "libarchive")))
7474 (substitute* "libarchive/ffi.py"
7475 (("find_library\\('archive'\\)")
7476 (string-append "'" libarchive
7477 "/lib/libarchive.so'"))))))
7478 (replace 'check
7479 (lambda _ (invoke "pytest" "-vv"))))))
7480 (native-inputs
7481 `(("python-mock" ,python-mock)
7482 ("python-pytest" ,python-pytest)))
7483 (inputs
7484 `(("libarchive" ,libarchive)))
7485 (home-page "https://github.com/Changaco/python-libarchive-c")
7486 (synopsis "Python interface to libarchive")
7487 (description
7488 "This package provides Python bindings to libarchive, a C library to
7489 access possibly compressed archives in many different formats. It uses
7490 Python's @code{ctypes} foreign function interface (FFI).")
7491 (license license:lgpl2.0+)))
7492
7493 (define-public python2-libarchive-c
7494 (package-with-python2 python-libarchive-c))
7495
7496 (define-public python-file
7497 (package
7498 (inherit file)
7499 (name "python-file")
7500 (build-system python-build-system)
7501 (arguments
7502 '(#:tests? #f ;no tests
7503 #:configure-flags '("--single-version-externally-managed" "--root=/")
7504 #:phases (modify-phases %standard-phases
7505 (add-before 'build 'change-directory
7506 (lambda _
7507 (chdir "python")
7508 #t))
7509 (add-before 'build 'set-library-file-name
7510 (lambda* (#:key inputs #:allow-other-keys)
7511 (let ((file (assoc-ref inputs "file")))
7512 (substitute* "magic.py"
7513 (("find_library\\('magic'\\)")
7514 (string-append "'" file "/lib/libmagic.so'")))
7515 #t))))))
7516 (inputs `(("file" ,file)))
7517 (native-inputs (if (%current-target-system)
7518 `(("self" ,this-package))
7519 '()))
7520 (synopsis "Python bindings to the libmagic file type guesser. Note that
7521 this module and the python-magic module both provide a \"magic.py\" file;
7522 these two modules, which are different and were developed separately, both
7523 serve the same purpose: provide Python bindings for libmagic.")))
7524
7525 (define-public python2-file
7526 (package-with-python2 python-file))
7527
7528 (define-public python-debian
7529 (package
7530 (name "python-debian")
7531 (home-page "https://salsa.debian.org/python-debian-team/python-debian")
7532 (version "0.1.36")
7533 (source
7534 (origin
7535 ;; Use git-fetch, as pypi doesn't include test suite.
7536 (method git-fetch)
7537 (uri (git-reference
7538 (url home-page)
7539 (commit version)))
7540 (file-name (git-file-name name version))
7541 (sha256
7542 (base32
7543 "0qy6x28bj6yfikhjww932v5xq4mf5bm1iczl7acy4c7zm6mwhqfa"))))
7544 (build-system python-build-system)
7545 (arguments
7546 `(#:phases (modify-phases %standard-phases
7547 (add-after 'unpack 'remove-debian-specific-tests
7548 ;; python-apt, apt and dpkg are not yet available in guix,
7549 ;; and these tests heavily depend on them.
7550 (lambda _
7551 (delete-file "lib/debian/tests/test_deb822.py")
7552 (delete-file "lib/debian/tests/test_debfile.py")
7553 #t)))))
7554 (propagated-inputs
7555 `(("python-six" ,python-six)
7556 ("python-chardet" ,python-chardet)))
7557 (synopsis "Debian package related modules")
7558 (description
7559 ;; XXX: Use @enumerate instead of @itemize to work around
7560 ;; <http://bugs.gnu.org/21772>.
7561 "This package provides Python modules that abstract many formats of
7562 Debian-related files, such as:
7563
7564 @enumerate
7565 @item Debtags information;
7566 @item @file{debian/changelog} files;
7567 @item packages files, pdiffs;
7568 @item control files of single or multiple RFC822-style paragraphs---e.g.
7569 @file{debian/control}, @file{.changes}, @file{.dsc};
7570 @item Raw @file{.deb} and @file{.ar} files, with (read-only) access to
7571 contained files and meta-information.
7572 @end enumerate\n")
7573
7574 ;; Modules are either GPLv2+ or GPLv3+.
7575 (license license:gpl3+)))
7576
7577 (define-public python2-debian
7578 (package-with-python2 python-debian))
7579
7580 (define-public python-nbformat
7581 (package
7582 (name "python-nbformat")
7583 (version "4.4.0")
7584 (source
7585 (origin
7586 (method url-fetch)
7587 (uri (pypi-uri "nbformat" version))
7588 (sha256
7589 (base32
7590 "00nlf08h8yc4q73nphfvfhxrcnilaqanb8z0mdy6nxk0vzq4wjgp"))))
7591 (build-system python-build-system)
7592 (arguments `(#:tests? #f)) ; no test target
7593 (propagated-inputs
7594 `(("python-ipython-genutils" ,python-ipython-genutils)
7595 ("python-jsonschema" ,python-jsonschema)
7596 ("python-jupyter-core" ,python-jupyter-core)
7597 ("python-traitlets" ,python-traitlets)))
7598 (home-page "http://jupyter.org")
7599 (synopsis "Jupyter Notebook format")
7600 (description "This package provides the reference implementation of the
7601 Jupyter Notebook format and Python APIs for working with notebooks.")
7602 (license license:bsd-3)))
7603
7604 (define-public python2-nbformat
7605 (package-with-python2 python-nbformat))
7606
7607 (define-public python-bleach
7608 (package
7609 (name "python-bleach")
7610 (version "3.1.0")
7611 (source
7612 (origin
7613 (method url-fetch)
7614 (uri (pypi-uri "bleach" version))
7615 (sha256
7616 (base32
7617 "1yhrgrhkln8bd6gn3imj69g1h4xqah9gaz9q26crqr6gmmvpzprz"))))
7618 (build-system python-build-system)
7619 (propagated-inputs
7620 `(("python-webencodings" ,python-webencodings)
7621 ("python-six" ,python-six)))
7622 (native-inputs
7623 `(("python-pytest" ,python-pytest)
7624 ("python-pytest-runner" ,python-pytest-runner-2)))
7625 (home-page "https://github.com/jsocol/bleach")
7626 (synopsis "Whitelist-based HTML-sanitizing tool")
7627 (description "Bleach is an easy whitelist-based HTML-sanitizing tool.")
7628 (license license:asl2.0)))
7629
7630 (define-public python2-bleach
7631 (package-with-python2 python-bleach))
7632
7633 (define-public python-entrypoints
7634 (package
7635 (name "python-entrypoints")
7636 (version "0.3")
7637 (source
7638 (origin
7639 (method url-fetch)
7640 (uri (pypi-uri "entrypoints" version))
7641 (sha256
7642 (base32
7643 "0lc4si3xb7hza424414rdqdc3vng3kcrph8jbvjqb32spqddf3f7"))))
7644 (build-system python-build-system)
7645 ;; The package does not come with a setup.py file, so we have to generate
7646 ;; one ourselves.
7647 (arguments
7648 `(#:tests? #f
7649 #:phases
7650 (modify-phases %standard-phases
7651 (add-after 'unpack 'create-setup.py
7652 (lambda _
7653 (call-with-output-file "setup.py"
7654 (lambda (port)
7655 (format port "\
7656 from setuptools import setup
7657 setup(name='entrypoints', version='~a', py_modules=['entrypoints'])
7658 " ,version))))))))
7659 (home-page "https://github.com/takluyver/entrypoints")
7660 (synopsis "Discover and load entry points from installed Python packages")
7661 (description "Entry points are a way for Python packages to advertise
7662 objects with some common interface. The most common examples are
7663 @code{console_scripts} entry points, which define shell commands by
7664 identifying a Python function to run. The @code{entrypoints} module contains
7665 functions to find and load entry points.")
7666 (license license:expat)))
7667
7668 (define-public python2-entrypoints
7669 (package-with-python2 python-entrypoints))
7670
7671 (define-public python-nbconvert
7672 (package
7673 (name "python-nbconvert")
7674 (version "5.0.0b1")
7675 (source
7676 (origin
7677 (method url-fetch)
7678 (uri (pypi-uri "nbconvert" version))
7679 (sha256
7680 (base32
7681 "0brclbb18l4nmd5qy3dl9wn05rjdh1fz4rmzdlfqacj12rcdvdgp"))))
7682 (build-system python-build-system)
7683 (arguments
7684 `(;; The "bdist_egg" target is disabled by default, causing the installation
7685 ;; to fail.
7686 #:configure-flags (list "bdist_egg")
7687 ;; FIXME: 5 failures, 40 errors.
7688 #:tests? #f))
7689 ;; #:phases
7690 ;; (modify-phases %standard-phases
7691 ;; (replace 'check
7692 ;; (lambda _
7693 ;; (zero? (system* "py.test" "-v")))))
7694 (native-inputs
7695 `(("python-pytest" ,python-pytest)))
7696 (propagated-inputs
7697 `(("python-bleach" ,python-bleach)
7698 ("python-entrypoints" ,python-entrypoints)
7699 ("python-jinja2" ,python-jinja2)
7700 ("python-jupyter-core" ,python-jupyter-core)
7701 ("python-mistune" ,python-mistune)
7702 ("python-nbformat" ,python-nbformat)
7703 ("python-pygments" ,python-pygments)
7704 ("python-traitlets" ,python-traitlets)))
7705 (home-page "http://jupyter.org")
7706 (synopsis "Converting Jupyter Notebooks")
7707 (description "The @code{nbconvert} tool, @{jupyter nbconvert}, converts
7708 notebooks to various other formats via Jinja templates. It allows you to
7709 convert an @code{.ipynb} notebook file into various static formats including:
7710
7711 @enumerate
7712 @item HTML
7713 @item LaTeX
7714 @item PDF
7715 @item Reveal JS
7716 @item Markdown (md)
7717 @item ReStructured Text (rst)
7718 @item executable script
7719 @end enumerate\n")
7720 (license license:bsd-3)))
7721
7722 (define-public python2-nbconvert
7723 (package-with-python2 python-nbconvert))
7724
7725 (define-public python-notebook
7726 (package
7727 (name "python-notebook")
7728 (version "5.7.4")
7729 (source (origin
7730 (method url-fetch)
7731 (uri (pypi-uri "notebook" version))
7732 (sha256
7733 (base32
7734 "0jm7324mbxljmn9hgapj66q7swyz5ai92blmr0jpcy0h80x6f26r"))))
7735 (build-system python-build-system)
7736 (arguments
7737 `(#:phases
7738 (modify-phases %standard-phases
7739 (replace 'check
7740 (lambda _
7741 ;; These tests require a browser
7742 (delete-file-recursively "notebook/tests/selenium")
7743 ;; Some tests need HOME
7744 (setenv "HOME" "/tmp")
7745 ;; This file contains "warningfilters", which are not supported
7746 ;; by this version of nose.
7747 (delete-file "setup.cfg")
7748 (with-directory-excursion "/tmp"
7749 (invoke "nosetests" "-v"))
7750 #t)))))
7751 (propagated-inputs
7752 `(("python-jupyter-core" ,python-jupyter-core)
7753 ("python-nbformat" ,python-nbformat)
7754 ("python-nbconvert" ,python-nbconvert)
7755 ("python-prometheus-client" ,python-prometheus-client)
7756 ("python-send2trash" ,python-send2trash)
7757 ("python-terminado" ,python-terminado)))
7758 (native-inputs
7759 `(("python-nose" ,python-nose)
7760 ("python-sphinx" ,python-sphinx)
7761 ("python-requests" ,python-requests)))
7762 (home-page "http://jupyter.org/")
7763 (synopsis "Web-based notebook environment for interactive computing")
7764 (description
7765 "The Jupyter HTML notebook is a web-based notebook environment for
7766 interactive computing.")
7767 (properties `((python2-variant . ,(delay python2-notebook))))
7768 (license license:bsd-3)))
7769
7770 (define-public python2-notebook
7771 (let ((base (package-with-python2
7772 (strip-python2-variant python-notebook))))
7773 (package (inherit base)
7774 (native-inputs
7775 `(("python2-mock" ,python2-mock)
7776 ,@(package-native-inputs base)))
7777 (arguments
7778 (substitute-keyword-arguments (package-arguments base)
7779 ((#:phases phases)
7780 `(modify-phases ,phases
7781 (add-before 'check 'disable-test-case
7782 ;; The test requires network access to localhost. Curiously it
7783 ;; fails with Python 2 only. Simply make the test-case return
7784 ;; immediately.
7785 (lambda _
7786 (substitute*
7787 "notebook/services/nbconvert/tests/test_nbconvert_api.py"
7788 (("formats = self.nbconvert_api") "return #")))))))))))
7789
7790 (define-public python-widgetsnbextension
7791 (package
7792 (name "python-widgetsnbextension")
7793 (version "3.4.2")
7794 (source
7795 (origin
7796 (method url-fetch)
7797 (uri (pypi-uri "widgetsnbextension" version))
7798 (sha256
7799 (base32
7800 "0rc2nivdy7k4m3vljx7wdh2jh11djapcgwhvzlbs0isl8gl8nqgs"))))
7801 (build-system python-build-system)
7802 (propagated-inputs
7803 `(("python-ipykernel" ,python-ipykernel)
7804 ("python-notebook" ,python-notebook)))
7805 (native-inputs
7806 `(("python-certifi" ,python-certifi)
7807 ("python-nose" ,python-nose)))
7808 (home-page "https://ipython.org")
7809 (synopsis "IPython HTML widgets for Jupyter")
7810 (description "This package provides interactive HTML widgets for Jupyter
7811 notebooks.")
7812 (license license:bsd-3)))
7813
7814 (define-public python2-widgetsnbextension
7815 (package-with-python2 python-widgetsnbextension))
7816
7817 (define-public python-ipywidgets
7818 (package
7819 (name "python-ipywidgets")
7820 (version "5.2.2")
7821 (source
7822 (origin
7823 (method url-fetch)
7824 (uri (pypi-uri "ipywidgets" version))
7825 (sha256
7826 (base32
7827 "1lk0qrr5l9a0z7qkkn30hv5832whxwxymf1l576fmmad0n7hkxms"))))
7828 (build-system python-build-system)
7829 (propagated-inputs
7830 `(("python-ipython" ,python-ipython)
7831 ("python-traitlets" ,python-traitlets)
7832 ("python-widgetsnbextension" ,python-widgetsnbextension)))
7833 (native-inputs
7834 `(("python-nose" ,python-nose)
7835 ("python-pytest" ,python-pytest)))
7836 (home-page "https://ipython.org")
7837 (synopsis "IPython HTML widgets for Jupyter")
7838 (description "Ipywidgets are interactive HTML widgets for Jupyter
7839 notebooks and the IPython kernel. Notebooks come alive when interactive
7840 widgets are used. Users gain control of their data and can visualize changes
7841 in the data.")
7842 (license license:bsd-3)))
7843
7844 (define-public python2-ipywidgets
7845 (package-with-python2 python-ipywidgets))
7846
7847 (define-public python-jupyter-console
7848 (package
7849 (name "python-jupyter-console")
7850 (version "6.0.0")
7851 (source
7852 (origin
7853 (method url-fetch)
7854 (uri (pypi-uri "jupyter_console" version))
7855 (sha256
7856 (base32
7857 "1xdjw11cppf1fxvwkw2bk13ckkwas3bdah8baingn9296mvfi31h"))))
7858 (build-system python-build-system)
7859 (propagated-inputs
7860 `(("python-ipykernel" ,python-ipykernel)
7861 ("python-jupyter-client" ,python-jupyter-client)
7862 ("python-prompt-toolkit" ,python-prompt-toolkit)
7863 ("python-pygments" ,python-pygments)))
7864 (native-inputs
7865 `(("python-nose" ,python-nose)))
7866 (home-page "https://jupyter.org")
7867 (synopsis "Jupyter terminal console")
7868 (description "This package provides a terminal-based console frontend for
7869 Jupyter kernels. It also allows for console-based interaction with non-Python
7870 Jupyter kernels such as IJulia and IRKernel.")
7871 (license license:bsd-3)))
7872
7873 (define-public python2-jupyter-console
7874 (package
7875 (name "python2-jupyter-console")
7876 (version "5.2.0")
7877 (source
7878 (origin
7879 (method url-fetch)
7880 (uri (pypi-uri "jupyter_console" version))
7881 (sha256
7882 (base32
7883 "1kam1qzgwr7srhm5r6aj90di5sws4bq0jmiw15452ddamb9yspal"))))
7884 (build-system python-build-system)
7885 ;; Tests only run in an TTY.
7886 (arguments `(#:tests? #f))
7887 (propagated-inputs
7888 `(("python2-ipykernel" ,python2-ipykernel)
7889 ("python2-jupyter-client" ,python2-jupyter-client)
7890 ("python2-prompt-toolkit" ,python2-prompt-toolkit-1)
7891 ("python2-pygments" ,python2-pygments)))
7892 (native-inputs
7893 `(("python2-nose" ,python2-nose)))
7894 (home-page "https://jupyter.org")
7895 (synopsis "Jupyter terminal console")
7896 (description "This package provides a terminal-based console frontend for
7897 Jupyter kernels. It also allows for console-based interaction with non-Python
7898 Jupyter kernels such as IJulia and IRKernel.")
7899 (license license:bsd-3)))
7900
7901 ;; The python-ipython and python-jupyter-console require each other. To get
7902 ;; the functionality in both packages working, strip down the
7903 ;; python-jupyter-console package when using it as an input to python-ipython.
7904 (define python-jupyter-console-minimal
7905 (package
7906 (inherit python-jupyter-console)
7907 (name "python-jupyter-console-minimal")
7908 (arguments
7909 (substitute-keyword-arguments
7910 (package-arguments python-jupyter-console)
7911 ((#:phases phases)
7912 `(modify-phases ,phases
7913 (add-after 'install 'delete-bin
7914 (lambda* (#:key outputs #:allow-other-keys)
7915 ;; Delete the bin files, to avoid conflicts in profiles
7916 ;; where python-ipython and python-jupyter-console are
7917 ;; both present.
7918 (delete-file-recursively
7919 (string-append
7920 (assoc-ref outputs "out") "/bin"))))))))
7921 ;; Remove the python-ipython propagated input, to avoid the cycle
7922 (propagated-inputs
7923 (alist-delete
7924 "python-ipython"
7925 (package-propagated-inputs python-jupyter-console)))))
7926
7927 (define-public python-qtconsole
7928 (package
7929 (name "python-qtconsole")
7930 (version "4.4.3")
7931 (source
7932 (origin
7933 (method url-fetch)
7934 (uri (pypi-uri "qtconsole" version))
7935 (sha256
7936 (base32
7937 "1b03n1ixzscm0jw97l4dq5iy4fslnqxq5bb8287xb7n2a1gs26xw"))))
7938 (build-system python-build-system)
7939 (arguments
7940 ;; XXX: Tests are disabled, because this package needs python-ipython 7,
7941 ;; but we only have the LTS version 5.x. This means that there might be
7942 ;; runtime errors, but since this is a dependency of the Jupyter package,
7943 ;; and Jupyter can be used without the qtconsole we can overlook this for
7944 ;; now.
7945 `(#:tests? #f
7946 #:phases
7947 (modify-phases %standard-phases
7948 (add-before 'check 'pre-check
7949 (lambda _
7950 (setenv "QT_QPA_PLATFORM" "offscreen")
7951 #t)))))
7952 (propagated-inputs
7953 `(("python-ipykernel" ,python-ipykernel)
7954 ("python-ipython" ,python-ipython)))
7955 (native-inputs
7956 `(("python-pytest" ,python-pytest)))
7957 (home-page "http://jupyter.org")
7958 (synopsis "Jupyter Qt console")
7959 (description "This package provides a Qt-based console for Jupyter with
7960 support for rich media output.")
7961 (license license:bsd-3)))
7962
7963 (define-public python-jsbeautifier
7964 (package
7965 (name "python-jsbeautifier")
7966 (version "1.10.2")
7967 (home-page "https://github.com/beautify-web/js-beautify")
7968 (source (origin
7969 (method git-fetch)
7970 (uri (git-reference
7971 (url home-page)
7972 (commit (string-append "v" version))))
7973 (file-name (git-file-name name version))
7974 (sha256
7975 (base32
7976 "0wawb070ki1axb3jc9xvsrgpji52vcfif3zmjzc3z4g98m5xw4kg"))))
7977 (build-system python-build-system)
7978 (arguments
7979 `(#:phases (modify-phases %standard-phases
7980 (add-after 'unpack 'chdir
7981 (lambda _
7982 ;; The upstream Git repository contains all the code,
7983 ;; but this package only builds the python code.
7984 (chdir "python")
7985 #t))
7986 (add-after 'unpack 'patch-python-six-requirements
7987 (lambda _
7988 (substitute* "python/setup.py"
7989 (("six>=1.12.0")
7990 "six>=1.11.0"))
7991 #t)))))
7992 (propagated-inputs
7993 `(("python-editorconfig" ,python-editorconfig)
7994 ("python-six" ,python-six)))
7995 (native-inputs
7996 `(("python-pytest" ,python-pytest)))
7997 (synopsis "JavaScript unobfuscator and beautifier")
7998 (description "Beautify, unpack or deobfuscate JavaScript, leveraging
7999 popular online obfuscators.")
8000 (license license:expat)))
8001
8002 (define-public jupyter
8003 (package
8004 (name "jupyter")
8005 (version "1.0.0")
8006 (source
8007 (origin
8008 (method url-fetch)
8009 (uri (pypi-uri "jupyter" version))
8010 (sha256
8011 (base32
8012 "0pwf3pminkzyzgx5kcplvvbvwrrzd3baa7lmh96f647k30rlpp6r"))))
8013 (build-system python-build-system)
8014 (arguments '(#:tests? #f)) ; there are none.
8015 (propagated-inputs
8016 `(("python-ipykernel" ,python-ipykernel)
8017 ("python-ipywidgets" ,python-ipywidgets)
8018 ("python-jupyter-console" ,python-jupyter-console)
8019 ("python-nbconvert" ,python-nbconvert)
8020 ("python-notebook" ,python-notebook)
8021 ("python-qtconsole" ,python-qtconsole)))
8022 (native-search-paths
8023 (list (search-path-specification
8024 (variable "JUPYTER_PATH")
8025 (files '("share/jupyter")))))
8026 (home-page "https://jupyter.org")
8027 (synopsis "Web application for interactive documents")
8028 (description
8029 "The Jupyter Notebook is a web application that allows you to create and
8030 share documents that contain live code, equations, visualizations and
8031 explanatory text. Uses include: data cleaning and transformation, numerical
8032 simulation, statistical modeling, machine learning and much more.")
8033 (license license:bsd-3)))
8034
8035 (define-public python-chardet
8036 (package
8037 (name "python-chardet")
8038 (version "3.0.4")
8039 (source
8040 (origin
8041 (method url-fetch)
8042 (uri (pypi-uri "chardet" version))
8043 (sha256
8044 (base32
8045 "1bpalpia6r5x1kknbk11p1fzph56fmmnp405ds8icksd3knr5aw4"))))
8046 (native-inputs
8047 `(("python-hypothesis" ,python-hypothesis)
8048 ("python-pytest" ,python-pytest)
8049 ("python-pytest-runner" ,python-pytest-runner)))
8050 (build-system python-build-system)
8051 ;; XXX: Incompatible with Pytest 4: <https://github.com/chardet/chardet/issues/173>.
8052 (arguments `(#:tests? #f))
8053 (home-page "https://github.com/chardet/chardet")
8054 (synopsis "Universal encoding detector for Python 2 and 3")
8055 (description
8056 "This package provides @code{chardet}, a Python module that can
8057 automatically detect a wide range of file encodings.")
8058 (license license:lgpl2.1+)))
8059
8060 (define-public python2-chardet
8061 (package-with-python2 python-chardet))
8062
8063 (define-public python-docopt
8064 (package
8065 (name "python-docopt")
8066 (version "0.6.2")
8067 (source
8068 (origin
8069 (method git-fetch)
8070 ;; The release on PyPI does not include tests.
8071 (uri (git-reference
8072 (url "https://github.com/docopt/docopt")
8073 (commit version)))
8074 (file-name (git-file-name name version))
8075 (sha256
8076 (base32
8077 "0aad9gbswnnhssin2q0m5lmpm0ahyf80ahs2zjigbn5y7fvljnd0"))))
8078 (build-system python-build-system)
8079 (native-inputs
8080 `(("python-pytest" ,python-pytest)))
8081 (arguments
8082 `(#:phases
8083 (modify-phases %standard-phases
8084 (replace 'check
8085 (lambda _ (invoke "py.test"))))))
8086 (home-page "http://docopt.org")
8087 (synopsis "Command-line interface description language for Python")
8088 (description "This library allows the user to define a command-line
8089 interface from a program's help message rather than specifying it
8090 programmatically with command-line parsers like @code{getopt} and
8091 @code{argparse}.")
8092 (license license:expat)))
8093
8094 (define-public python2-docopt
8095 (package-with-python2 python-docopt))
8096
8097 (define-public python-pythondialog
8098 (package
8099 (name "python-pythondialog")
8100 (version "3.4.0")
8101 (source
8102 (origin
8103 (method url-fetch)
8104 (uri (pypi-uri "pythondialog" version))
8105 (sha256
8106 (base32
8107 "1728ghsran47jczn9bhlnkvk5bvqmmbihabgif5h705b84r1272c"))))
8108 (build-system python-build-system)
8109 (arguments
8110 `(#:phases
8111 (modify-phases %standard-phases
8112 (add-after 'unpack 'patch-path
8113 (lambda* (#:key inputs #:allow-other-keys)
8114 (let* ((dialog (assoc-ref inputs "dialog")))
8115 ;; Since this library really wants to grovel the search path, we
8116 ;; must hardcode dialog's store path into it.
8117 (substitute* "dialog.py"
8118 (("os.getenv\\(\"PATH\", \":/bin:/usr/bin\"\\)")
8119 (string-append "os.getenv(\"PATH\") + \":" dialog "/bin\"")))
8120 #t))))
8121 #:tests? #f)) ; no test suite
8122 (propagated-inputs
8123 `(("dialog" ,dialog)))
8124 (home-page "http://pythondialog.sourceforge.net/")
8125 (synopsis "Python interface to the UNIX dialog utility")
8126 (description "A Python wrapper for the dialog utility. Its purpose is to
8127 provide an easy to use, pythonic and comprehensive Python interface to dialog.
8128 This allows one to make simple text-mode user interfaces on Unix-like systems")
8129 (license license:lgpl2.1)
8130 (properties `((python2-variant . ,(delay python2-pythondialog))))))
8131
8132 (define-public python2-pythondialog
8133 (let ((base (package-with-python2 (strip-python2-variant python-pythondialog))))
8134 (package
8135 (inherit base)
8136 (version (package-version python-pythondialog))
8137 (source (origin
8138 (method url-fetch)
8139 (uri (pypi-uri "python2-pythondialog" version))
8140 (sha256
8141 (base32
8142 "0d8k7lxk50imdyx85lv8j98i4c93a71iwpapnl1506rpkbm9qvd9")))))))
8143
8144 (define-public python-configobj
8145 (package
8146 (name "python-configobj")
8147 (version "5.0.6")
8148 (source (origin
8149 (method url-fetch)
8150 (uri (pypi-uri "configobj" version))
8151 (sha256
8152 (base32
8153 "00h9rcmws03xvdlfni11yb60bz3kxfvsj6dg6nrpzj71f03nbxd2"))
8154 ;; Patch setup.py so it looks for python-setuptools, which is
8155 ;; required to parse the keyword 'install_requires' in setup.py.
8156 (patches (search-patches "python-configobj-setuptools.patch"))))
8157 (build-system python-build-system)
8158 (propagated-inputs
8159 `(("python-six" ,python-six)))
8160 (synopsis "Config file reading, writing and validation")
8161 (description "ConfigObj is a simple but powerful config file reader and
8162 writer: an ini file round tripper. Its main feature is that it is very easy to
8163 use, with a straightforward programmer’s interface and a simple syntax for
8164 config files.")
8165 (home-page "https://github.com/DiffSK/configobj")
8166 (license license:bsd-3)))
8167
8168 (define-public python2-configobj
8169 (package-with-python2 python-configobj))
8170
8171 (define-public python-configargparse
8172 (package
8173 (name "python-configargparse")
8174 (version "0.14.0")
8175 (source (origin
8176 (method url-fetch)
8177 (uri (pypi-uri "ConfigArgParse" version))
8178 (sha256
8179 (base32
8180 "149fy4zya0rsnlkvxbbq43cyr8lscb5k4pj1m6n7f1grwcmzwbif"))))
8181 (build-system python-build-system)
8182 (native-inputs
8183 `(("python-pyyaml" ,python-pyyaml)))
8184 (arguments
8185 `(#:phases
8186 (modify-phases %standard-phases
8187 (replace 'check
8188 (lambda _
8189 ;; Bypass setuptools-shim because one test relies on "setup.py"
8190 ;; being the first argument passed to the python call.
8191 ;;
8192 ;; NOTE: Many tests do not run because they rely on Python's
8193 ;; built-in test.test_argparse, but we remove the unit tests from
8194 ;; our Python installation.
8195 (invoke "python" "setup.py" "test"))))))
8196 (synopsis "Replacement for argparse")
8197 (description "A drop-in replacement for argparse that allows options to also
8198 be set via config files and/or environment variables.")
8199 (home-page "https://github.com/bw2/ConfigArgParse")
8200 (license license:expat)))
8201
8202 (define-public python2-configargparse
8203 (package-with-python2 python-configargparse))
8204
8205 (define-public python-argparse-manpage
8206 (package
8207 (name "python-argparse-manpage")
8208 (version "1.1")
8209 (source
8210 (origin
8211 (method url-fetch)
8212 (uri (pypi-uri "argparse-manpage" version))
8213 (sha256
8214 (base32
8215 "0blh31zns68anina9lba5wh81d1414s97p60zw5l0d0shhh0wj5p"))))
8216 (build-system python-build-system)
8217 (home-page "https://github.com/praiskup/argparse-manpage")
8218 (synopsis "Build manual page from Python's ArgumentParser object")
8219 (description
8220 "This package provides tools to build manual pages from Python's
8221 @code{ArgumentParser} object.")
8222 (license license:asl2.0)))
8223
8224 (define-public python-contextlib2
8225 (package
8226 (name "python-contextlib2")
8227 (version "0.5.5")
8228 (source
8229 (origin
8230 (method url-fetch)
8231 (uri (pypi-uri "contextlib2" version))
8232 (sha256
8233 (base32
8234 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8235 (build-system python-build-system)
8236 (home-page "http://contextlib2.readthedocs.org/")
8237 (synopsis "Tools for decorators and context managers")
8238 (description "This module is primarily a backport of the Python
8239 3.2 contextlib to earlier Python versions. Like contextlib, it
8240 provides utilities for common tasks involving decorators and context
8241 managers. It also contains additional features that are not part of
8242 the standard library.")
8243 (license license:psfl)))
8244
8245 (define-public python2-contextlib2
8246 (package
8247 (name "python2-contextlib2")
8248 (version "0.5.5")
8249 (source
8250 (origin
8251 (method url-fetch)
8252 (uri (pypi-uri "contextlib2" version))
8253 (sha256
8254 (base32
8255 "0j6ad6lwwyc9kv71skj098v5l7x5biyj2hs4lc5x1kcixqcr97sh"))))
8256 (build-system python-build-system)
8257 (arguments
8258 `(#:python ,python-2
8259 #:phases
8260 (modify-phases %standard-phases
8261 (replace 'check
8262 (lambda _ (invoke "python" "test_contextlib2.py" "-v"))))))
8263 (native-inputs
8264 `(("python2-unittest2" ,python2-unittest2)))
8265 (home-page "http://contextlib2.readthedocs.org/")
8266 (synopsis "Tools for decorators and context managers")
8267 (description "This module is primarily a backport of the Python
8268 3.2 contextlib to earlier Python versions. Like contextlib, it
8269 provides utilities for common tasks involving decorators and context
8270 managers. It also contains additional features that are not part of
8271 the standard library.")
8272 (license license:psfl)))
8273
8274 (define-public python-texttable
8275 (package
8276 (name "python-texttable")
8277 (version "0.9.1")
8278 (source
8279 (origin
8280 (method url-fetch)
8281 (uri (pypi-uri "texttable" version))
8282 (sha256
8283 (base32
8284 "0yawv64c0zbawwv6zz84whb32fnb2n9jylwjcfsrcdgh7xvl340i"))))
8285 (build-system python-build-system)
8286 (arguments '(#:tests? #f)) ; no tests
8287 (home-page "https://github.com/foutaise/texttable/")
8288 (synopsis "Python module for creating simple ASCII tables")
8289 (description "Texttable is a Python module for creating simple ASCII
8290 tables.")
8291 (license license:lgpl2.1+)))
8292
8293 (define-public python2-texttable
8294 (package-with-python2 python-texttable))
8295
8296 (define-public python-atomicwrites
8297 (package
8298 (name "python-atomicwrites")
8299 (version "1.3.0")
8300 (source (origin
8301 (method url-fetch)
8302 (uri (pypi-uri "atomicwrites" version))
8303 (sha256
8304 (base32
8305 "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm"))))
8306 (build-system python-build-system)
8307 (synopsis "Atomic file writes in Python")
8308 (description "Library for atomic file writes using platform dependent tools
8309 for atomic file system operations.")
8310 (home-page "https://github.com/untitaker/python-atomicwrites")
8311 (license license:expat)))
8312
8313 (define-public python2-atomicwrites
8314 (package-with-python2 python-atomicwrites))
8315
8316 (define-public python-click-threading
8317 (package
8318 (name "python-click-threading")
8319 (version "0.4.4")
8320 (source (origin
8321 (method url-fetch)
8322 (uri (pypi-uri "click-threading" version))
8323 (sha256
8324 (base32
8325 "1rsxc2fbkxlhwhlmxsdjzq3spn284l6rvjfcz9mbb17ibgdgmc5j"))))
8326 (build-system python-build-system)
8327 (propagated-inputs
8328 `(("python-click" ,python-click)))
8329 (synopsis "Utilities for multithreading in Click")
8330 (description "This package provides utilities for multithreading in Click
8331 applications.")
8332 (home-page "https://github.com/click-contrib/click-threading")
8333 (license license:expat)))
8334
8335 (define-public python-click-log
8336 (package
8337 (name "python-click-log")
8338 (version "0.3.2")
8339 (source (origin
8340 (method url-fetch)
8341 (uri (pypi-uri "click-log" version))
8342 (sha256
8343 (base32
8344 "091i03bhxyzsdbc6kilxhivfda2f8ymz3b33xa6cj5kbzjiirz8n"))))
8345 (build-system python-build-system)
8346 (propagated-inputs
8347 `(("python-click" ,python-click)))
8348 (synopsis "Logging for click applications")
8349 (description "This package provides a Python library for logging Click
8350 applications.")
8351 (home-page "https://github.com/click-contrib/click-log")
8352 (license license:expat)))
8353
8354 (define-public python-apipkg
8355 (package
8356 (name "python-apipkg")
8357 (version "1.4")
8358 (source (origin
8359 (method url-fetch)
8360 (uri (pypi-uri "apipkg" version))
8361 (sha256
8362 (base32
8363 "1iks5701qnp3dlr3q1d9qm68y2plp2m029irhpz92a44psfkjf1f"))))
8364 (build-system python-build-system)
8365 (native-inputs
8366 `(("python-pytest" ,python-pytest)))
8367 (synopsis "Namespace control and lazy-import mechanism")
8368 (description "With apipkg you can control the exported namespace of a Python
8369 package and greatly reduce the number of imports for your users. It is a small
8370 pure Python module that works on virtually all Python versions.")
8371 (home-page "https://github.com/pytest-dev/apipkg")
8372 (license license:expat)))
8373
8374 (define-public python2-apipkg
8375 (package-with-python2 python-apipkg))
8376
8377 (define-public python-execnet
8378 (package
8379 (name "python-execnet")
8380 (version "1.4.1")
8381 (source (origin
8382 (method url-fetch)
8383 (uri (pypi-uri "execnet" version))
8384 (sha256
8385 (base32
8386 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn"))))
8387 (build-system python-build-system)
8388 (arguments
8389 `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed
8390 ;; The two test failures are caused by the lack of an `ssh` executable.
8391 ;; The test suite can be run with pytest after the 'install' phase.
8392 #:tests? #f))
8393 (native-inputs
8394 `(("python-pytest" ,python-pytest)
8395 ("python-setuptools-scm" ,python-setuptools-scm)))
8396 (propagated-inputs
8397 `(("python-apipkg" ,python-apipkg)))
8398 (synopsis "Rapid multi-Python deployment")
8399 (description "Execnet provides a share-nothing model with
8400 channel-send/receive communication for distributing execution across many
8401 Python interpreters across version, platform and network barriers. It has a
8402 minimal and fast API targeting the following uses:
8403 @enumerate
8404 @item distribute tasks to (many) local or remote CPUs
8405 @item write and deploy hybrid multi-process applications
8406 @item write scripts to administer multiple environments
8407 @end enumerate")
8408 (home-page "http://codespeak.net/execnet/")
8409 (license license:expat)))
8410
8411 (define-public python2-execnet
8412 (package-with-python2 python-execnet))
8413
8414 (define-public python-icalendar
8415 (package
8416 (name "python-icalendar")
8417 (version "4.0.4")
8418 (source (origin
8419 (method url-fetch)
8420 (uri (pypi-uri "icalendar" version))
8421 (sha256
8422 (base32
8423 "16gjvqv0n05jrb9g228pdjgzd3amz2pdhvcgsn1jypszjg5m2w9l"))))
8424 (build-system python-build-system)
8425 (propagated-inputs
8426 `(("python-dateutil" ,python-dateutil)
8427 ("python-pytz" ,python-pytz)))
8428 (synopsis "Python library for parsing iCalendar files")
8429 (description "The icalendar package is a parser/generator of iCalendar
8430 files for use with Python.")
8431 (home-page "https://github.com/collective/icalendar")
8432 (license license:bsd-2)))
8433
8434 (define-public python-args
8435 (package
8436 (name "python-args")
8437 (version "0.1.0")
8438 (source (origin
8439 (method url-fetch)
8440 (uri (pypi-uri "args" version))
8441 (sha256
8442 (base32
8443 "057qzi46h5dmxdqknsbrssn78lmqjlnm624iqdhrnpk26zcbi1d7"))))
8444 (build-system python-build-system)
8445 (home-page "https://github.com/kennethreitz/args")
8446 (synopsis "Command-line argument parser")
8447 (description
8448 "This library provides a Python module to parse command-line arguments.")
8449 (license license:bsd-3)))
8450
8451 (define-public python2-args
8452 (package-with-python2 python-args))
8453
8454 (define-public python-clint
8455 (package
8456 (name "python-clint")
8457 (version "0.5.1")
8458 (source (origin
8459 (method url-fetch)
8460 (uri (pypi-uri "clint" version))
8461 (sha256
8462 (base32
8463 "1an5lkkqk1zha47198p42ji3m94xmzx1a03dn7866m87n4r4q8h5"))))
8464 (build-system python-build-system)
8465 (arguments
8466 '(#:phases
8467 (modify-phases %standard-phases
8468 (replace 'check
8469 (lambda _ (invoke "py.test" "-v"))))))
8470 (native-inputs
8471 `(("python-pytest" ,python-pytest)))
8472 (propagated-inputs
8473 `(("python-args" ,python-args)))
8474 (home-page "https://github.com/kennethreitz/clint")
8475 (synopsis "Command-line interface tools")
8476 (description
8477 "Clint is a Python module filled with a set of tools for developing
8478 command-line applications, including tools for colored and indented
8479 output, progress bar display, and pipes.")
8480 (license license:isc)))
8481
8482 (define-public python2-clint
8483 (package-with-python2 python-clint))
8484
8485 (define-public python-rply
8486 (package
8487 (name "python-rply")
8488 (version "0.7.5")
8489 (source (origin
8490 (method url-fetch)
8491 (uri (pypi-uri "rply" version))
8492 (sha256
8493 (base32
8494 "0lv428895zxsz43968qx0q9bimwqnfykndz4dpjbq515w2gvzhjh"))))
8495 (build-system python-build-system)
8496 (propagated-inputs
8497 `(("python-appdirs" ,python-appdirs)))
8498 (home-page "https://github.com/alex/rply")
8499 (synopsis "Parser generator for Python")
8500 (description
8501 "This package provides a pure Python based parser generator, that also
8502 works with RPython. It is a more-or-less direct port of David Bazzley's PLY,
8503 with a new public API, and RPython support.")
8504 (license license:bsd-3)))
8505
8506 (define-public python2-rply
8507 (package-with-python2 python-rply))
8508
8509 (define-public python-hy
8510 (package
8511 (name "python-hy")
8512 (version "0.17.0")
8513 (source (origin
8514 (method url-fetch)
8515 (uri (pypi-uri "hy" version))
8516 (sha256
8517 (base32
8518 "1gdbqsirsdxj320wnp7my5awzs1kfs6m4fqmkzbd1zd47qzj0zfi"))))
8519 (build-system python-build-system)
8520 (arguments
8521 '(#:phases
8522 (modify-phases %standard-phases
8523 (add-before 'install 'set-HOME
8524 (lambda _
8525 (setenv "HOME" "/tmp")))
8526 (replace 'check
8527 (lambda _
8528 ;; Tests require write access to HOME.
8529 (setenv "HOME" "/tmp")
8530 (invoke "nosetests"))))))
8531 (native-inputs
8532 `(("python-coverage" ,python-coverage)
8533 ("python-nose" ,python-nose)))
8534 (propagated-inputs
8535 `(("python-astor" ,python-astor)
8536 ("python-clint" ,python-clint)
8537 ("python-rply" ,python-rply)
8538 ("python-fastentrypoints"
8539 ,python-fastentrypoints)
8540 ("python-funcparserlib"
8541 ,python-funcparserlib)))
8542 (home-page "http://hylang.org/")
8543 (synopsis "Lisp frontend to Python")
8544 (description
8545 "Hy is a dialect of Lisp that's embedded in Python. Since Hy transforms
8546 its Lisp code into the Python Abstract Syntax Tree, you have the whole world of
8547 Python at your fingertips, in Lisp form.")
8548 (license license:expat)))
8549
8550 (define-public python2-hy
8551 (package-with-python2 python-hy))
8552
8553 (define-public python2-functools32
8554 (package
8555 (name "python2-functools32")
8556 (version "3.2.3-2")
8557 (source
8558 (origin
8559 (method url-fetch)
8560 (uri (pypi-uri "functools32" version))
8561 (sha256
8562 (base32
8563 "0v8ya0b58x47wp216n1zamimv4iw57cxz3xxhzix52jkw3xks9gn"))))
8564 (build-system python-build-system)
8565 (arguments
8566 `(#:python ,python-2
8567 #:tests? #f)) ; no test target
8568 (home-page "https://github.com/MiCHiLU/python-functools32")
8569 (synopsis
8570 "Backport of the functools module from Python 3.2.3")
8571 (description
8572 "This package is a backport of the @code{functools} module from Python
8573 3.2.3 for use with older versions of Python and PyPy.")
8574 (license license:expat)))
8575
8576 (define-public python2-subprocess32
8577 (package
8578 (name "python2-subprocess32")
8579 (version "3.2.7")
8580 (source (origin
8581 (method url-fetch)
8582 (uri (pypi-uri "subprocess32" version))
8583 (sha256
8584 (base32
8585 "14350dhhlhyz5gqzi3lihn9m6lvskx5mcb20srx1kgsk9i50li8y"))
8586 (patches
8587 (search-patches "python2-subprocess32-disable-input-test.patch"))))
8588 (build-system python-build-system)
8589 (arguments
8590 `(#:python ,python-2
8591 ;; The test suite fails with Python > 2.7.13:
8592 ;; import test.support
8593 ;; ImportError: No module named support
8594 #:tests? #f
8595 #:phases
8596 (modify-phases %standard-phases
8597 (add-after 'unpack 'patch-/bin/sh
8598 (lambda _
8599 (substitute* '("subprocess32.py"
8600 "test_subprocess32.py")
8601 (("/bin/sh") (which "sh")))
8602 #t)))))
8603 (home-page "https://github.com/google/python-subprocess32")
8604 (synopsis "Backport of the subprocess module from Python 3.2")
8605 (description
8606 "This is a backport of the @code{subprocess} standard library module
8607 from Python 3.2 and 3.3 for use on Python 2. It includes bugfixes and some
8608 new features. On POSIX systems it is guaranteed to be reliable when used
8609 in threaded applications. It includes timeout support from Python 3.3 but
8610 otherwise matches 3.2’s API.")
8611 (license license:psfl)))
8612
8613 (define-public python2-futures
8614 (package
8615 (name "python2-futures")
8616 (version "3.2.0")
8617 (source
8618 (origin
8619 (method url-fetch)
8620 (uri (pypi-uri "futures" version))
8621 (sha256
8622 (base32
8623 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y"))))
8624 (build-system python-build-system)
8625 (arguments
8626 `(#:python ,python-2
8627 #:phases
8628 (modify-phases %standard-phases
8629 (replace 'check
8630 (lambda _
8631 (invoke "python" "test_futures.py")
8632 #t)))))
8633 (home-page "https://github.com/agronholm/pythonfutures")
8634 (synopsis
8635 "Backport of the concurrent.futures package from Python 3.2")
8636 (description
8637 "The concurrent.futures module provides a high-level interface for
8638 asynchronously executing callables. This package backports the
8639 concurrent.futures package from Python 3.2")
8640 (license license:bsd-3)))
8641
8642 (define-public python-promise
8643 (package
8644 (name "python-promise")
8645 (version "0.4.2")
8646 (source
8647 (origin
8648 (method url-fetch)
8649 (uri (pypi-uri "promise" version))
8650 (sha256
8651 (base32
8652 "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h"))))
8653 (build-system python-build-system)
8654 ;; Tests wants python-futures, which is a python2 only program, and
8655 ;; can't be found by python-promise at test time.
8656 (arguments `(#:tests? #f))
8657 (home-page "https://github.com/syrusakbary/promise")
8658 (synopsis "Promises/A+ implementation for Python")
8659 (description
8660 "Promises/A+ implementation for Python")
8661 (properties `((python2-variant . ,(delay python2-promise))))
8662 (license license:expat)))
8663
8664 (define-public python2-promise
8665 (let ((promise (package-with-python2
8666 (strip-python2-variant python-promise))))
8667 (package (inherit promise)
8668 (arguments (substitute-keyword-arguments (package-arguments promise)
8669 ((#:tests? _) #t)))
8670 (native-inputs
8671 `(("python2-futures" ,python2-futures)
8672 ("python2-pytest" ,python2-pytest)
8673 ,@(package-native-inputs promise))))))
8674
8675 (define-public python-progressbar33
8676 (package
8677 (name "python-progressbar33")
8678 (version "2.4")
8679 (source
8680 (origin
8681 (method url-fetch)
8682 (uri (pypi-uri "progressbar33" version))
8683 (sha256
8684 (base32
8685 "1zvf6zs5hzrc03p9nfs4p16vhilqikycvv1yk0pxn8s07fdhvzji"))))
8686 (build-system python-build-system)
8687 (home-page "http://github.com/germangh/python-progressbar")
8688 (synopsis "Text progress bar library for Python")
8689 (description
8690 "This package provides a text progress bar library for Python. This
8691 version only differs from the original @code{progressbar} package in that it
8692 uses relative package imports instead of absolute imports, which is necessary
8693 for the module to work under Python 3.3.")
8694 ;; Either or both of these licenses may be selected.
8695 (license (list license:lgpl2.1+ license:bsd-3))))
8696
8697 (define-public python-colorama
8698 (package
8699 (name "python-colorama")
8700 (version "0.3.9")
8701 (source
8702 (origin
8703 (method url-fetch)
8704 (uri (pypi-uri "colorama" version))
8705 (sha256
8706 (base32
8707 "1wd1szk0z3073ghx26ynw43gnc140ibln1safgsis6s6z3s25ss8"))))
8708 (build-system python-build-system)
8709 (synopsis "Colored terminal text rendering for Python")
8710 (description "Colorama is a Python library for rendering colored terminal
8711 text.")
8712 (home-page "https://pypi.python.org/pypi/colorama")
8713 (license license:bsd-3)))
8714
8715 (define-public python2-colorama
8716 (package-with-python2 python-colorama))
8717
8718 (define-public python-rsa
8719 (package
8720 (name "python-rsa")
8721 (version "3.4.2")
8722 (source
8723 (origin
8724 (method url-fetch)
8725 (uri (pypi-uri "rsa" version))
8726 (sha256
8727 (base32
8728 "1dcxvszbikgzh99ybdc7jq0zb9wspy2ds8z9mjsqiyv3q884xpr5"))))
8729 (build-system python-build-system)
8730 (propagated-inputs
8731 `(("python-pyasn1" ,python-pyasn1)))
8732 (synopsis "Pure-Python RSA implementation")
8733 (description "Python-RSA is a pure-Python RSA implementation. It supports
8734 encryption and decryption, signing and verifying signatures, and key
8735 generation according to PKCS#1 version 1.5. It can be used as a Python
8736 library as well as on the command line.")
8737 (home-page "https://stuvel.eu/rsa")
8738 (license license:asl2.0)))
8739
8740 (define-public python2-rsa
8741 (package-with-python2 python-rsa))
8742
8743 (define-public python-pluggy
8744 (package
8745 (name "python-pluggy")
8746 (version "0.11.0")
8747 (source
8748 (origin
8749 (method url-fetch)
8750 (uri (pypi-uri "pluggy" version))
8751 (sha256
8752 (base32
8753 "10511a54dvafw1jrk75mrhml53c7b7w4yaw7241696lc2hfvr895"))))
8754 (build-system python-build-system)
8755 (native-inputs
8756 `(("python-setuptools-scm" ,python-setuptools-scm)))
8757 (synopsis "Plugin and hook calling mechanism for Python")
8758 (description "Pluggy is an extraction of the plugin manager as used by
8759 Pytest but stripped of Pytest specific details.")
8760 (home-page "https://pypi.python.org/pypi/pluggy")
8761 (license license:expat)))
8762
8763 (define-public python2-pluggy
8764 (package-with-python2 python-pluggy))
8765
8766 (define-public python-tox
8767 (package
8768 (name "python-tox")
8769 (version "2.8.1")
8770 (source
8771 (origin
8772 (method url-fetch)
8773 (uri (pypi-uri "tox" version))
8774 (sha256
8775 (base32
8776 "1drp6mwm8wdypjym15ia8lwjxbhcksb9vzxg4ay5dh4ji57by2ny"))))
8777 (build-system python-build-system)
8778 (arguments
8779 ;; FIXME: Tests require pytest-timeout, which itself requires
8780 ;; pytest>=2.8.0 for installation.
8781 '(#:tests? #f))
8782 (propagated-inputs
8783 `(("python-pluggy" ,python-pluggy) ; >=0.3.0,<0.4.0
8784 ("python-py" ,python-py)
8785 ("python-virtualenv" ,python-virtualenv)))
8786 (native-inputs
8787 `(; FIXME: Missing: ("python-pytest-timeout" ,python-pytest-timeout)
8788 ("python-pytest" ,python-pytest) ; >= 2.3.5
8789 ("python-setuptools-scm" ,python-setuptools-scm)))
8790 (home-page "http://tox.testrun.org/")
8791 (synopsis "Virtualenv-based automation of test activities")
8792 (description "Tox is a generic virtualenv management and test command line
8793 tool. It can be used to check that a package installs correctly with
8794 different Python versions and interpreters, or run tests in each type of
8795 supported environment, or act as a frontend to continuous integration
8796 servers.")
8797 (license license:expat)))
8798
8799 (define-public python2-tox
8800 (package-with-python2 python-tox))
8801
8802 (define-public python-jmespath
8803 (package
8804 (name "python-jmespath")
8805 (version "0.9.4")
8806 (source
8807 (origin
8808 (method url-fetch)
8809 (uri (pypi-uri "jmespath" version))
8810 (sha256
8811 (base32
8812 "0k0765x1mybcrzajh3hiqkl8sy9hs0bmn4900frxy0j3ykvaxqmx"))))
8813 (build-system python-build-system)
8814 (native-inputs
8815 `(("python-nose" ,python-nose)))
8816 (synopsis "JSON Matching Expressions")
8817 (description "JMESPath (pronounced “james path”) is a Python library that
8818 allows one to declaratively specify how to extract elements from a JSON
8819 document.")
8820 (home-page "https://github.com/jmespath/jmespath.py")
8821 (license license:expat)))
8822
8823 (define-public python2-jmespath
8824 (package-with-python2 python-jmespath))
8825
8826 (define-public python-botocore
8827 (package
8828 (name "python-botocore")
8829 (version "1.12.149")
8830 (source
8831 (origin
8832 (method url-fetch)
8833 (uri (pypi-uri "botocore" version))
8834 (sha256
8835 (base32
8836 "12597f74khp3ngwr282cb949w0gcqj20rkfc3x275dijavyy5cmf"))))
8837 (build-system python-build-system)
8838 (arguments
8839 ;; FIXME: Many tests are failing.
8840 '(#:tests? #f))
8841 (propagated-inputs
8842 `(("python-dateutil" ,python-dateutil)
8843 ("python-docutils" ,python-docutils)
8844 ("python-jmespath" ,python-jmespath)))
8845 (native-inputs
8846 `(("python-mock" ,python-mock)
8847 ("python-nose" ,python-nose)
8848 ("behave" ,behave)
8849 ("python-tox" ,python-tox)
8850 ("python-urllib3" ,python-urllib3)
8851 ("python-wheel" ,python-wheel)))
8852 (home-page "https://github.com/boto/botocore")
8853 (synopsis "Low-level interface to AWS")
8854 (description "Botocore is a Python library that provides a low-level
8855 interface to the Amazon Web Services (AWS) API.")
8856 (license license:asl2.0)))
8857
8858 (define-public python2-botocore
8859 (package-with-python2 python-botocore))
8860
8861 (define-public python-xdo
8862 (package
8863 (name "python-xdo")
8864 (version "0.3")
8865 (source (origin
8866 (method url-fetch)
8867 (uri (string-append
8868 "http://http.debian.net/debian/pool/main/p/python-xdo/"
8869 "python-xdo_" version ".orig.tar.gz"))
8870 (sha256
8871 (base32
8872 "1vqh1n5yy5dhnq312kwrl90fnck4v26is3lq3lxdvcn60vv19da0"))))
8873 (build-system python-build-system)
8874 (arguments
8875 '(#:phases
8876 (modify-phases %standard-phases
8877 (add-before 'install 'patch-libxdo-path
8878 ;; Hardcode the path of dynamically loaded libxdo library.
8879 (lambda* (#:key inputs #:allow-other-keys)
8880 (let ((libxdo (string-append
8881 (assoc-ref inputs "xdotool")
8882 "/lib/libxdo.so")))
8883 (substitute* "xdo/_xdo.py"
8884 (("find_library\\(\"xdo\"\\)")
8885 (simple-format #f "\"~a\"" libxdo)))
8886 #t))))
8887 #:tests? #f)) ; no tests provided
8888 (propagated-inputs
8889 `(("python-six" ,python-six)))
8890 (inputs
8891 `(("xdotool" ,xdotool)
8892 ("libX11" ,libx11)))
8893 (home-page "https://tracker.debian.org/pkg/python-xdo")
8894 (synopsis "Python library for simulating X11 keyboard/mouse input")
8895 (description "Provides bindings to libxdo for manipulating X11 via simulated
8896 input. (Note that this is mostly a legacy library; you may wish to look at
8897 python-xdo for newer bindings.)")
8898 (license license:bsd-3)))
8899
8900 (define-public python2-xdo
8901 (package-with-python2 python-xdo))
8902
8903 (define-public python-mako
8904 (package
8905 (name "python-mako")
8906 (version "1.1.0")
8907 (source
8908 (origin
8909 (method url-fetch)
8910 (uri (pypi-uri "Mako" version))
8911 (sha256
8912 (base32
8913 "0jqa3qfpykyn4fmkn0kh6043sfls7br8i2bsdbccazcvk9cijsd3"))))
8914 (build-system python-build-system)
8915 (arguments
8916 `(#:phases (modify-phases %standard-phases
8917 (replace 'check
8918 (lambda _
8919 (invoke "pytest" "-vv"))))))
8920 (propagated-inputs
8921 `(("python-markupsafe" ,python-markupsafe)))
8922 (native-inputs
8923 `(("python-mock" ,python-mock)
8924 ("python-pytest" ,python-pytest)))
8925 (home-page "https://www.makotemplates.org/")
8926 (synopsis "Templating language for Python")
8927 (description "Mako is a templating language for Python that compiles
8928 templates into Python modules.")
8929 (license license:expat)))
8930
8931 (define-public python2-mako
8932 (package-with-python2 python-mako))
8933
8934 (define-public python-waitress
8935 (package
8936 (name "python-waitress")
8937 (version "1.1.0")
8938 (source
8939 (origin
8940 (method url-fetch)
8941 (uri (pypi-uri "waitress" version))
8942 (patches (search-patches "python-waitress-fix-tests.patch"))
8943 (sha256
8944 (base32
8945 "1a85gyji0kajc3p0s1pwwfm06w4wfxjkvvl4rnrz3h164kbd6g6k"))))
8946 (build-system python-build-system)
8947 (home-page "https://github.com/Pylons/waitress")
8948 (synopsis "Waitress WSGI server")
8949 (description "Waitress is meant to be a production-quality pure-Python WSGI
8950 server with very acceptable performance.")
8951 (license license:zpl2.1)))
8952
8953 (define-public python2-waitress
8954 (package-with-python2 python-waitress))
8955
8956 (define-public python-whichcraft
8957 (package
8958 (name "python-whichcraft")
8959 (version "0.6.1")
8960 (source
8961 (origin
8962 (method url-fetch)
8963 (uri (pypi-uri "whichcraft" version))
8964 (sha256
8965 (base32
8966 "11yfkzyplizdgndy34vyd5qlmr1n5mxis3a3svxmx8fnccdvknxc"))))
8967 (build-system python-build-system)
8968 (native-inputs
8969 `(("python-pytest" ,python-pytest)))
8970 (home-page "https://github.com/pydanny/whichcraft")
8971 (synopsis "Cross-platform cross-python shutil.which functionality")
8972 (description
8973 "This package provides a shim of the shutil.which function that's
8974 designed to work across multiple versions of Python.")
8975 (license license:bsd-3)))
8976
8977 (define-public python-cookiecutter
8978 (package
8979 (name "python-cookiecutter")
8980 (version "1.6.0")
8981 (source
8982 (origin
8983 (method url-fetch)
8984 (uri (pypi-uri "cookiecutter" version))
8985 (sha256
8986 (base32
8987 "0glsvaz8igi2wy1hsnhm9fkn6560vdvdixzvkq6dn20z3hpaa5hk"))))
8988 (build-system python-build-system)
8989 (native-inputs
8990 `(("python-freezegun" ,python-freezegun)
8991 ("python-pytest" ,python-pytest)
8992 ("python-pytest-catchlog" ,python-pytest-catchlog)
8993 ("python-pytest-cov" ,python-pytest-cov)
8994 ("python-pytest-mock" ,python-pytest-mock)))
8995 (propagated-inputs
8996 `(("python-binaryornot" ,python-binaryornot)
8997 ("python-click" ,python-click)
8998 ("python-future" ,python-future)
8999 ("python-jinja2" ,python-jinja2)
9000 ("python-jinja2-time" ,python-jinja2-time)
9001 ("python-poyo" ,python-poyo)
9002 ("python-requests" ,python-requests)
9003 ("python-whichcraft" ,python-whichcraft)))
9004 (home-page "https://github.com/audreyr/cookiecutter")
9005 (synopsis
9006 "Command-line utility that creates projects from project templates")
9007 (description
9008 "This package provides a command-line utility that creates projects from
9009 project templates, e.g. creating a Python package project from a Python package
9010 project template.")
9011 (license license:bsd-3)))
9012
9013 (define-public python-pyquery
9014 (package
9015 (name "python-pyquery")
9016 (version "1.2.17")
9017 (source
9018 (origin
9019 (method url-fetch)
9020 (uri (pypi-uri "pyquery" version))
9021 (sha256
9022 (base32
9023 "1xia20wm0vx5dk85kcwgh13bylz8qh47ffjxssd2586r60xi783a"))))
9024 (build-system python-build-system)
9025 (native-inputs
9026 `(("python-webob" ,python-webob)
9027 ("python-webtest" ,python-webtest)))
9028 (propagated-inputs
9029 `(("python-lxml" ,python-lxml)
9030 ("python-cssselect" ,python-cssselect)))
9031 (home-page "https://github.com/gawel/pyquery")
9032 (synopsis "Make jQuery-like queries on xml documents")
9033 (description "pyquery allows you to make jQuery queries on xml documents.
9034 The API is as much as possible the similar to jQuery. pyquery uses lxml for
9035 fast xml and html manipulation.")
9036 (license license:bsd-3)))
9037
9038 (define-public python-anyjson
9039 (package
9040 (name "python-anyjson")
9041 (version "0.3.3")
9042 (source
9043 (origin
9044 (method url-fetch)
9045 (uri (pypi-uri "anyjson" version))
9046 (sha256
9047 (base32
9048 "1fjph4alvcscsl5d4b6qpv1yh31jy05jxi1l0xff7lws7j32v09p"))))
9049 (build-system python-build-system)
9050 (arguments
9051 `(;; We could possibly get tests working, but on Python 3 it's not so easy.
9052 ;; Very strangely, 2to3 is run *during setup.py install* (or bdist, or
9053 ;; whatever) so this transformation needs to be done before the tests
9054 ;; can be run. Maybe we could add a build step to transform beforehand
9055 ;; but it could be annoying/difficult.
9056 ;; We can enable tests for the Python 2 version, though, and do below.
9057 #:tests? #f))
9058 (home-page "https://bitbucket.org/runeh/anyjson/")
9059 (synopsis
9060 "Wraps best available JSON implementation in a common interface")
9061 (description
9062 "Anyjson loads whichever is the fastest JSON module installed
9063 and provides a uniform API regardless of which JSON implementation is used.")
9064 (license license:bsd-3)
9065 (properties `((python2-variant . ,(delay python2-anyjson))))))
9066
9067 (define-public python2-anyjson
9068 (let ((anyjson (package-with-python2
9069 (strip-python2-variant python-anyjson))))
9070 (package
9071 (inherit anyjson)
9072 (arguments `(;; Unlike the python 3 variant, we do run tests. See above!
9073 #:tests? #t
9074 ,@(package-arguments anyjson)))
9075 (native-inputs `(("python2-nose" ,python2-nose))))))
9076
9077 (define-public python-amqp
9078 (package
9079 (name "python-amqp")
9080 (version "2.3.2")
9081 (source
9082 (origin
9083 (method url-fetch)
9084 (uri (pypi-uri "amqp" version))
9085 (sha256
9086 (base32
9087 "1sv600dgqwpimr6i1g59y9hpn50mc236gdqkr7zin13kvlpx0g87"))))
9088 (build-system python-build-system)
9089 (native-inputs
9090 `(("python-case" ,python-case)
9091 ("python-pytest-sugar" ,python-pytest-sugar)
9092 ("python-mock" ,python-mock)))
9093 (propagated-inputs
9094 `(("python-vine" ,python-vine)))
9095 (home-page "https://github.com/celery/py-amqp")
9096 (synopsis
9097 "Low-level AMQP client for Python (fork of amqplib)")
9098 (description
9099 "This is a fork of amqplib which was originally written by Barry Pederson.
9100 It is maintained by the Celery project, and used by kombu as a pure python
9101 alternative when librabbitmq is not available.")
9102 (license license:lgpl2.1+)
9103 (properties `((python2-variant . ,(delay python2-amqp))))))
9104
9105 (define-public python2-amqp
9106 (let ((amqp (package-with-python2
9107 (strip-python2-variant python-amqp))))
9108 (package
9109 (inherit amqp)
9110 (arguments `(;; Tries to run coverage tests with nose-cover3, which seems
9111 ;; unmaintained. Weirdly, does not do this on the python 3
9112 ;; version?
9113 #:tests? #f
9114 ,@(package-arguments amqp))))))
9115
9116 (define-public python-txamqp
9117 (package
9118 (name "python-txamqp")
9119 (version "0.8.2")
9120 (source
9121 (origin
9122 (method url-fetch)
9123 (uri (pypi-uri "txAMQP" version))
9124 (sha256
9125 (base32
9126 "0jd9864k3csc06kipiwzjlk9mq4054s8kzk5q1cfnxj8572s4iv4"))))
9127 (build-system python-build-system)
9128 (propagated-inputs
9129 `(("python-six" ,python-six)
9130 ("python-twisted" ,python-twisted)))
9131 (home-page "https://github.com/txamqp/txamqp")
9132 (synopsis "Communicate with AMQP peers and brokers using Twisted")
9133 (description
9134 "This package provides a Python library for communicating with AMQP peers
9135 and brokers using the asynchronous networking framework Twisted. It contains
9136 all the necessary code to connect, send and receive messages to/from an
9137 AMQP-compliant peer or broker (Qpid, OpenAMQ, RabbitMQ) using Twisted. It
9138 also includes support for using Thrift RPC over AMQP in Twisted
9139 applications.")
9140 (license license:asl2.0)))
9141
9142 (define-public python2-txamqp
9143 (package-with-python2 python-txamqp))
9144
9145 (define-public python-kombu
9146 (package
9147 (name "python-kombu")
9148 (version "4.2.2")
9149 (source
9150 (origin
9151 (method url-fetch)
9152 (uri (pypi-uri "kombu" version))
9153 (sha256
9154 (base32
9155 "15k8f7mzqr049sg9vi48m19vjykviafk3f0p5xzgw9by0x0kyxjj"))))
9156 (build-system python-build-system)
9157 (native-inputs
9158 `(("python-mock" ,python-mock)
9159 ("python-case" ,python-case)
9160 ("python-pyro4" ,python-pyro4)
9161 ("python-pytest-sugar" ,python-pytest-sugar)
9162 ("python-pytz" ,python-pytz)))
9163 (propagated-inputs
9164 `(("python-anyjson" ,python-anyjson)
9165 ("python-amqp" ,python-amqp)
9166 ("python-redis" ,python-redis)))
9167 (home-page "https://kombu.readthedocs.io")
9168 (synopsis "Message passing library for Python")
9169 (description "The aim of Kombu is to make messaging in Python as easy as
9170 possible by providing an idiomatic high-level interface for the AMQ protocol,
9171 and also provide proven and tested solutions to common messaging problems.
9172 AMQP is the Advanced Message Queuing Protocol, an open standard protocol for
9173 message orientation, queuing, routing, reliability and security, for which the
9174 RabbitMQ messaging server is the most popular implementation.")
9175 (license license:bsd-3)
9176 (properties `((python2-variant . ,(delay python2-kombu))))))
9177
9178 (define-public python2-kombu
9179 (let ((kombu (package-with-python2
9180 (strip-python2-variant python-kombu))))
9181 (package
9182 (inherit kombu)
9183 (arguments `(;; FIXME: 'TestTransport.test_del_sync' fails on python2.
9184 ;; It works fine on the python3 variant.
9185 #:tests? #f
9186 ,@(package-arguments kombu)))
9187 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9188 ,@(package-native-inputs kombu))))))
9189
9190 (define-public python-billiard
9191 (package
9192 (name "python-billiard")
9193 (version "3.5.0.5")
9194 (source
9195 (origin
9196 (method url-fetch)
9197 (uri (pypi-uri "billiard" version))
9198 (sha256
9199 (base32
9200 "03msmapj3s5zgqk87d646mafz7a01h5bm2wijalgpi0s80ks5na2"))))
9201 (build-system python-build-system)
9202 (native-inputs
9203 `(("python-case" ,python-case)
9204 ("python-pytest" ,python-pytest)))
9205 (home-page "https://github.com/celery/billiard")
9206 (synopsis
9207 "Python multiprocessing fork with improvements and bugfixes")
9208 (description
9209 "Billiard is a fork of the Python 2.7 multiprocessing package. The
9210 multiprocessing package itself is a renamed and updated version of R Oudkerk's
9211 pyprocessing package. This standalone variant is intended to be compatible with
9212 Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.")
9213 (license license:bsd-3)
9214 (properties `((python2-variant . ,(delay python2-billiard))))))
9215
9216 (define-public python2-billiard
9217 (let ((billiard (package-with-python2
9218 (strip-python2-variant python-billiard))))
9219 (package
9220 (inherit billiard)
9221 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9222 ("python2-mock" ,python2-mock)
9223 ,@(package-native-inputs billiard))))))
9224
9225 (define-public python-celery
9226 (package
9227 (name "python-celery")
9228 (version "4.2.1")
9229 (source
9230 (origin
9231 (method url-fetch)
9232 (uri (pypi-uri "celery" version))
9233 (sha256
9234 (base32
9235 "0y66rz7z8dfcgs3s0qxmdddlaq57bzbgxgfz896nbp14grkv9nkp"))))
9236 (build-system python-build-system)
9237 (arguments
9238 '(;; TODO The tests fail with Python 3.7
9239 ;; https://github.com/celery/celery/issues/4849
9240 #:tests? #f
9241 #:phases
9242 (modify-phases %standard-phases
9243 (add-after 'unpack 'patch-requirements
9244 (lambda _
9245 (substitute* "requirements/test.txt"
9246 (("pytest>=3\\.0,<3\\.3")
9247 "pytest>=3.0"))
9248 #t)))))
9249 (native-inputs
9250 `(("python-case" ,python-case)
9251 ("python-pytest" ,python-pytest)))
9252 (propagated-inputs
9253 `(("python-pytz" ,python-pytz)
9254 ("python-billiard" ,python-billiard)
9255 ("python-kombu" ,python-kombu)))
9256 (home-page "https://celeryproject.org")
9257 (synopsis "Distributed Task Queue")
9258 (description "Celery is an asynchronous task queue/job queue based on
9259 distributed message passing. It is focused on real-time operation, but
9260 supports scheduling as well. The execution units, called tasks, are executed
9261 concurrently on a single or more worker servers using multiprocessing,
9262 Eventlet, or gevent. Tasks can execute asynchronously (in the background) or
9263 synchronously (wait until ready).")
9264 (license license:bsd-3)
9265 (properties `((python2-variant . ,(delay python2-celery))))))
9266
9267 (define-public python2-celery
9268 (let ((celery (package-with-python2
9269 (strip-python2-variant python-celery))))
9270 (package
9271 (inherit celery)
9272 (native-inputs `(("python2-unittest2" ,python2-unittest2)
9273 ("python2-mock" ,python2-mock)
9274 ,@(package-native-inputs celery))))))
9275
9276 (define-public python-translitcodec
9277 (package
9278 (name "python-translitcodec")
9279 (version "0.4.0")
9280 (source
9281 (origin
9282 (method url-fetch)
9283 (uri (pypi-uri "translitcodec" version))
9284 (sha256
9285 (base32
9286 "10x6pvblkzky1zhjs8nmx64nb9jdzxad4bxhq4iwv0j4z2aqjnki"))))
9287 (build-system python-build-system)
9288 (arguments
9289 `(#:tests? #f)) ; no tests provided
9290 (home-page
9291 "https://github.com/claudep/translitcodec")
9292 (synopsis
9293 "Unicode to 8-bit charset transliteration codec")
9294 (description
9295 "This package contains codecs for transliterating ISO 10646 texts into
9296 best-effort representations using smaller coded character sets (ASCII,
9297 ISO 8859, etc.).")
9298 (license license:expat)))
9299
9300 (define-public python2-translitcodec
9301 (package-with-python2 python-translitcodec))
9302
9303 (define-public python-editor
9304 (package
9305 (name "python-editor")
9306 (version "0.5")
9307 (source
9308 (origin
9309 (method url-fetch)
9310 (uri (pypi-uri "python-editor" version))
9311 (sha256
9312 (base32
9313 "1ypnpgvzpkbwsg4rdvy4sy51j28b5xq9v8pnkwxncn07vqz06p7n"))))
9314 (build-system python-build-system)
9315 (home-page
9316 "https://github.com/fmoo/python-editor")
9317 (synopsis
9318 "Programmatically open an editor, capture the result")
9319 (description
9320 "python-editor is a library that provides the editor module for
9321 programmatically interfacing with your system's $EDITOR.")
9322 (license license:asl2.0)))
9323
9324 (define-public python2-editor
9325 (package-with-python2 python-editor))
9326
9327 (define-public python-vobject
9328 (package
9329 (name "python-vobject")
9330 (version "0.9.5")
9331 (source (origin
9332 (method url-fetch)
9333 (uri (pypi-uri "vobject" version))
9334 (sha256
9335 (base32
9336 "0hqjgf3ay1m5w1c0k00g5yfpdz1zni5qnr5rh9b8fg9hjvhwlmhg"))))
9337 (build-system python-build-system)
9338 (arguments
9339 '(;; The test suite relies on some non-portable Windows interfaces.
9340 #:tests? #f))
9341 (propagated-inputs
9342 `(("python-dateutil" ,python-dateutil)
9343 ("python-pyicu" ,python-pyicu)))
9344 (synopsis "Parse and generate vCard and vCalendar files")
9345 (description "Vobject is intended to be a full featured Python package for
9346 parsing and generating vCard and vCalendar files. Currently, iCalendar files
9347 are supported and well tested. vCard 3.0 files are supported, and all data
9348 should be imported, but only a few components are understood in a sophisticated
9349 way.")
9350 (home-page "http://eventable.github.io/vobject/")
9351 (license license:asl2.0)))
9352
9353 (define-public python2-vobject
9354 (package-with-python2 python-vobject))
9355
9356 (define-public python-munkres
9357 (package
9358 (name "python-munkres")
9359 (version "1.0.8")
9360 (source (origin
9361 (method url-fetch)
9362 (uri (pypi-uri "munkres" version))
9363 (sha256
9364 (base32
9365 "0mbspx4zv8id4x6pim6ybsa1xh96qwpbqj7skbqz4c9c9nf1lpqq"))))
9366 (build-system python-build-system)
9367 (arguments
9368 '(#:tests? #f)) ; no test suite
9369 (home-page "http://software.clapper.org/munkres/")
9370 (synopsis "Implementation of the Munkres algorithm")
9371 (description "The Munkres module provides an implementation of the Munkres
9372 algorithm (also called the Hungarian algorithm or the Kuhn-Munkres algorithm),
9373 useful for solving the Assignment Problem.")
9374 (license license:bsd-3)))
9375
9376 (define-public python2-munkres
9377 (package-with-python2 python-munkres))
9378
9379 (define-public python-whoosh
9380 (package
9381 (name "python-whoosh")
9382 (version "2.7.4")
9383 (source
9384 (origin
9385 (method url-fetch)
9386 (uri (pypi-uri "Whoosh" version))
9387 (sha256
9388 (base32
9389 "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw"))))
9390 (build-system python-build-system)
9391 (arguments '(#:tests? #f)) ; Test invocation is no longer supported by Python.
9392 (native-inputs
9393 `(("python-pytest" ,python-pytest)))
9394 (home-page "https://bitbucket.org/mchaput/whoosh")
9395 (synopsis "Full text indexing, search, and spell checking library")
9396 (description
9397 "Whoosh is a fast, pure-Python full text indexing, search, and spell
9398 checking library.")
9399 (license license:bsd-2)))
9400
9401 (define-public python2-whoosh
9402 (let ((whoosh (package-with-python2 (strip-python2-variant python-whoosh))))
9403 (package (inherit whoosh)
9404 (propagated-inputs
9405 `(("python2-backport-ssl-match-hostname"
9406 ,python2-backport-ssl-match-hostname)
9407 ,@(package-propagated-inputs whoosh))))))
9408
9409 (define-public python-pathlib
9410 (package
9411 (name "python-pathlib")
9412 (version "1.0.1")
9413 (source (origin
9414 (method url-fetch)
9415 (uri (pypi-uri "pathlib" version))
9416 (sha256
9417 (base32
9418 "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39"))))
9419 (build-system python-build-system)
9420 ;; The tests depend on the internal "test" module, which does not provide
9421 ;; a stable interface.
9422 (arguments `(#:tests? #f))
9423 (home-page "https://pathlib.readthedocs.org/")
9424 (synopsis "Object-oriented file system paths")
9425 (description "Pathlib offers a set of classes to handle file system paths.
9426 It offers the following advantages over using string objects:
9427
9428 @enumerate
9429 @item No more cumbersome use of os and os.path functions. Everything can
9430 be done easily through operators, attribute accesses, and method calls.
9431 @item Embodies the semantics of different path types. For example,
9432 comparing Windows paths ignores casing.
9433 @item Well-defined semantics, eliminating any inconsistencies or
9434 ambiguities (forward vs. backward slashes, etc.).
9435 @end enumerate
9436
9437 Note: In Python 3.4, pathlib is now part of the standard library. For other
9438 Python versions please consider python-pathlib2 instead, which tracks the
9439 standard library module. This module (python-pathlib) isn't maintained
9440 anymore.")
9441 (license license:expat)))
9442
9443 (define-public python2-pathlib
9444 (package-with-python2 python-pathlib))
9445
9446 (define-public python2-pathlib2
9447 (package
9448 (name "python2-pathlib2")
9449 (version "2.3.3")
9450 (source (origin
9451 (method url-fetch)
9452 (uri (pypi-uri "pathlib2" version))
9453 (sha256
9454 (base32
9455 "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695"))))
9456 (build-system python-build-system)
9457 ;; We only need the the Python 2 variant, since for Python 3 our minimum
9458 ;; version is 3.4 which already includes this package as part of the
9459 ;; standard library.
9460 (arguments
9461 `(#:python ,python-2))
9462 (propagated-inputs
9463 `(("python2-scandir" ,python2-scandir)
9464 ("python2-six" ,python2-six)))
9465 (home-page "https://pypi.python.org/pypi/pathlib2/")
9466 (synopsis "Object-oriented file system paths - backport of standard
9467 pathlib module")
9468 (description "The goal of pathlib2 is to provide a backport of standard
9469 pathlib module which tracks the standard library module, so all the newest
9470 features of the standard pathlib can be used also on older Python versions.
9471
9472 Pathlib offers a set of classes to handle file system paths. It offers the
9473 following advantages over using string objects:
9474
9475 @enumerate
9476 @item No more cumbersome use of os and os.path functions. Everything can
9477 be done easily through operators, attribute accesses, and method calls.
9478 @item Embodies the semantics of different path types. For example,
9479 comparing Windows paths ignores casing.
9480 @item Well-defined semantics, eliminating any inconsistencies or
9481 ambiguities (forward vs. backward slashes, etc.).
9482 @end enumerate")
9483 (license license:expat)))
9484
9485 (define-public python2-pathlib2-bootstrap
9486 (hidden-package
9487 (package
9488 (inherit python2-pathlib2)
9489 (name "python2-pathlib2-bootstrap")
9490 (propagated-inputs
9491 `(("python2-scandir" ,python2-scandir)
9492 ("python2-six" ,python2-six-bootstrap))))))
9493
9494 (define-public python-jellyfish
9495 (package
9496 (name "python-jellyfish")
9497 (version "0.5.6")
9498 (source (origin
9499 (method url-fetch)
9500 (uri (pypi-uri "jellyfish" version))
9501 (sha256
9502 (base32
9503 "1j9rplb16ba2prjj6mip46z0w9pnhnqpwgiwi0x93vnas14rlyl8"))))
9504 (build-system python-build-system)
9505 (native-inputs
9506 `(("python-pytest" ,python-pytest)))
9507 (home-page "https://github.com/jamesturk/jellyfish")
9508 (synopsis "Approximate and phonetic matching of strings")
9509 (description "Jellyfish uses a variety of string comparison and phonetic
9510 encoding algorithms to do fuzzy string matching.")
9511 (license license:bsd-2)
9512 (properties `((python2-variant . ,(delay python2-jellyfish))))))
9513
9514 (define-public python2-jellyfish
9515 (let ((jellyfish (package-with-python2
9516 (strip-python2-variant python-jellyfish))))
9517 (package (inherit jellyfish)
9518 (native-inputs `(("python2-unicodecsv" ,python2-unicodecsv)
9519 ,@(package-native-inputs jellyfish))))))
9520
9521 (define-public python2-unicodecsv
9522 (package
9523 (name "python2-unicodecsv")
9524 (version "0.14.1")
9525 (source (origin
9526 (method git-fetch)
9527 ;; The test suite is not included in the PyPi release.
9528 ;; https://github.com/jdunck/python-unicodecsv/issues/19
9529 (uri (git-reference
9530 (url "https://github.com/jdunck/python-unicodecsv")
9531 (commit version)))
9532 (file-name (git-file-name name version))
9533 (sha256
9534 (base32
9535 "15hx2k41a2lpv4hcml9zp4cvlx1171mnb5s4s13xc1pxkq3vgdjy"))))
9536 (build-system python-build-system)
9537 (arguments
9538 `(;; It supports Python 3, but Python 3 can already do Unicode CSV.
9539 #:python ,python-2))
9540 (native-inputs
9541 `(("python2-unittest2" ,python2-unittest2)))
9542 (home-page "https://github.com/jdunck/python-unicodecsv")
9543 (synopsis "Unicode CSV module for Python 2")
9544 (description "Unicodecsv is a drop-in replacement for Python 2.7's CSV
9545 module, adding support for Unicode strings.")
9546 (license license:bsd-2)))
9547
9548 (define-public python-rarfile
9549 (package
9550 (name "python-rarfile")
9551 (version "2.8")
9552 (source (origin
9553 (method url-fetch)
9554 (uri (pypi-uri "rarfile" version))
9555 (sha256
9556 (base32
9557 "0qfad483kcbga0bn4qmcz953xjk16r52fahiy46zzn56v80y89ra"))))
9558 (build-system python-build-system)
9559 (arguments
9560 '(#:phases
9561 (modify-phases %standard-phases
9562 (replace 'check
9563 ;; Many tests fail, but the installation proceeds.
9564 (lambda _ (invoke "make" "-C" "test" "test"))))))
9565 (native-inputs
9566 `(("which" ,which))) ; required for tests
9567 (propagated-inputs
9568 `(("libarchive" ,libarchive)))
9569 (home-page "https://github.com/markokr/rarfile")
9570 (synopsis "RAR archive reader for Python")
9571 (description "This is Python module for RAR archive reading. The interface
9572 is made as zipfile like as possible.")
9573 (license license:isc)))
9574
9575 (define-public python2-rarfile
9576 (package-with-python2 python-rarfile))
9577
9578 (define-public python-magic
9579 (package
9580 (name "python-magic")
9581 (version "0.4.15")
9582 (source
9583 (origin
9584 (method url-fetch)
9585 (uri (pypi-uri "python-magic" version))
9586 (sha256
9587 (base32
9588 "1mgwig9pnzgkf86q9ji9pnc99bngms15lfszq5rgqb9db07mqxpk"))
9589 (file-name (string-append name "-" version "-checkout"))))
9590 (build-system python-build-system)
9591 (arguments
9592 ;; The tests are unreliable, so don't run them. The tests fail
9593 ;; under Python3 because they were written for Python2 and
9594 ;; contain import statements that do not work in Python3. One of
9595 ;; the tests fails under Python2 because its assertions are
9596 ;; overly stringent; it relies on comparing output strings which
9597 ;; are brittle and can change depending on the version of
9598 ;; libmagic being used and the system on which the test is
9599 ;; running. In my case, under GuixSD 0.10.0, only one test
9600 ;; failed, and it seems to have failed only because the version
9601 ;; of libmagic that is packaged in Guix outputs a slightly
9602 ;; different (but not wrong) string than the one that the test
9603 ;; expected.
9604 '(#:tests? #f
9605 #:phases (modify-phases %standard-phases
9606 ;; Replace a specific method call with a hard-coded
9607 ;; path to the necessary libmagic.so file in the
9608 ;; store. If we don't do this, then the method call
9609 ;; will fail to find the libmagic.so file, which in
9610 ;; turn will cause any application using
9611 ;; python-magic to fail.
9612 (add-before 'build 'hard-code-path-to-libmagic
9613 (lambda* (#:key inputs #:allow-other-keys)
9614 (let ((file (assoc-ref inputs "file")))
9615 (substitute* "magic.py"
9616 (("ctypes.util.find_library\\('magic'\\)")
9617 (string-append "'" file "/lib/libmagic.so'")))
9618 #t)))
9619 (add-before 'install 'disable-egg-compression
9620 (lambda _
9621 (let ((port (open-file "setup.cfg" "a")))
9622 (display "\n[easy_install]\nzip_ok = 0\n"
9623 port)
9624 (close-port port)
9625 #t))))))
9626 (inputs
9627 ;; python-magic needs to be able to find libmagic.so.
9628 `(("file" ,file)))
9629 (home-page
9630 "https://github.com/ahupp/python-magic")
9631 (synopsis
9632 "File type identification using libmagic")
9633 (description
9634 "This module uses ctypes to access the libmagic file type
9635 identification library. It makes use of the local magic database and
9636 supports both textual and MIME-type output. Note that this module and
9637 the python-file module both provide a \"magic.py\" file; these two
9638 modules, which are different and were developed separately, both serve
9639 the same purpose: to provide Python bindings for libmagic.")
9640 (license license:expat)))
9641
9642 (define-public python2-magic
9643 (package-with-python2 python-magic))
9644
9645 (define-public python2-s3cmd
9646 (package
9647 (name "python2-s3cmd")
9648 (version "1.6.1")
9649 (source
9650 (origin
9651 (method url-fetch)
9652 (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
9653 "s3cmd-" version ".tar.gz"))
9654 (sha256
9655 (base32
9656 "0ki1rzhm5icvi9ry5jswi4b22yqwyj0d2wsqsgilwx6qhi7pjxa6"))))
9657 (build-system python-build-system)
9658 (arguments
9659 ;; s3cmd is written for python2 only and contains no tests.
9660 `(#:python ,python-2
9661 #:tests? #f))
9662 (propagated-inputs
9663 `(("python2-dateutil" ,python2-dateutil)
9664 ;; The python-file package also provides a magic.py module.
9665 ;; This is an unfortunate state of affairs; however, s3cmd
9666 ;; fails to install if it cannot find specifically the
9667 ;; python-magic package. Thus we include it, instead of using
9668 ;; python-file. Ironically, s3cmd sometimes works better
9669 ;; without libmagic bindings at all:
9670 ;; https://github.com/s3tools/s3cmd/issues/198
9671 ("python2-magic" ,python2-magic)))
9672 (home-page "http://s3tools.org/s3cmd")
9673 (synopsis "Command line tool for S3-compatible storage services")
9674 (description
9675 "S3cmd is a command line tool for uploading, retrieving and managing data
9676 in storage services that are compatible with the Amazon Simple Storage
9677 Service (S3) protocol, including S3 itself. It supports rsync-like backup,
9678 GnuPG encryption, and more. It also supports management of Amazon's
9679 CloudFront content delivery network.")
9680 (license license:gpl2+)))
9681
9682 (define-public python-pkgconfig
9683 (package
9684 (name "python-pkgconfig")
9685 (version "1.3.1")
9686 (source
9687 (origin
9688 (method url-fetch)
9689 (uri (pypi-uri "pkgconfig" version))
9690 (sha256
9691 (base32
9692 "107x2wmchlch8saixb488cgjz9n6inl38wi7nxkb942rbaapxiqb"))))
9693 (build-system python-build-system)
9694 (native-inputs
9695 `(("python-nose" ,python-nose)))
9696 (inputs
9697 `(("pkg-config" ,pkg-config)))
9698 (arguments
9699 `(#:phases
9700 (modify-phases %standard-phases
9701 (add-before 'build 'patch
9702 ;; Hard-code the path to pkg-config.
9703 (lambda _
9704 (substitute* "pkgconfig/pkgconfig.py"
9705 (("cmd = 'pkg-config")
9706 (string-append "cmd = '" (which "pkg-config"))))
9707 #t))
9708 (replace 'check
9709 (lambda _
9710 (invoke "nosetests" "test.py"))))))
9711 (home-page "https://github.com/matze/pkgconfig")
9712 (synopsis "Python interface for pkg-config")
9713 (description "This module provides a Python interface to pkg-config. It
9714 can be used to find all pkg-config packages, check if a package exists,
9715 check if a package meets certain version requirements, query CFLAGS and
9716 LDFLAGS and parse the output to build extensions with setup.py.")
9717 (license license:expat)))
9718
9719 (define-public python2-pkgconfig
9720 (package-with-python2 python-pkgconfig))
9721
9722 (define-public python-bz2file
9723 (package
9724 (name "python-bz2file")
9725 (version "0.98")
9726 (source
9727 (origin
9728 (method url-fetch)
9729 (uri (pypi-uri "bz2file" version))
9730 (sha256
9731 (base32
9732 "126s53fkpx04f33a829yqqk8fj4png3qwg4m66cvlmhmwc8zihb4"))))
9733 (build-system python-build-system)
9734 (arguments
9735 `(#:tests? #f)) ; Tests use deprecated python modules.
9736 (home-page "https://github.com/nvawda/bz2file")
9737 (synopsis "Read and write bzip2-compressed files")
9738 (description
9739 "Bz2file is a Python library for reading and writing bzip2-compressed
9740 files. It contains a drop-in replacement for the I/O interface in the
9741 standard library's @code{bz2} module, including features from the latest
9742 development version of CPython that are not available in older releases.")
9743 (license license:asl2.0)))
9744
9745 (define-public python2-bz2file
9746 (package-with-python2 python-bz2file))
9747
9748 (define-public python-future
9749 (package
9750 (name "python-future")
9751 (version "0.17.1")
9752 (source
9753 (origin
9754 (method url-fetch)
9755 (uri (pypi-uri "future" version))
9756 (sha256
9757 (base32
9758 "1f2rlqn9rh7adgir52dlbqz69gsab44x0mlm8gf1cs7xvhv54137"))))
9759 (build-system python-build-system)
9760 ;; Many tests connect to the network or are otherwise flawed.
9761 ;; https://github.com/PythonCharmers/python-future/issues/210
9762 (arguments
9763 `(#:tests? #f))
9764 (home-page "http://python-future.org")
9765 (synopsis "Single-source support for Python 3 and 2")
9766 (description
9767 "@code{python-future} is the missing compatibility layer between Python 2 and
9768 Python 3. It allows you to use a single, clean Python 3.x-compatible codebase
9769 to support both Python 2 and Python 3 with minimal overhead.")
9770 (license license:expat)))
9771
9772 (define-public python2-future
9773 (package-with-python2 python-future))
9774
9775 (define-public python-cysignals
9776 (package
9777 (name "python-cysignals")
9778 (version "1.9.0")
9779 (source
9780 (origin
9781 (method url-fetch)
9782 (uri (pypi-uri "cysignals" version))
9783 (sha256
9784 (base32
9785 "15ix8crpad26cfl1skyg7qajqqfdrm8q5ahhmlfmqi1aw0jqj2g2"))))
9786 (build-system python-build-system)
9787 (native-inputs
9788 `(("python-cython" ,python-cython)
9789 ("python-sphinx" ,python-sphinx)))
9790 (inputs
9791 `(("pari-gp" ,pari-gp)))
9792 (arguments
9793 `(#:modules ((guix build python-build-system)
9794 ((guix build gnu-build-system) #:prefix gnu:)
9795 (guix build utils))
9796 ;; FIXME: Tests are executed after installation and currently fail
9797 ;; when not installing into standard locations; the author is working
9798 ;; on a fix.
9799 #:tests? #f
9800 #:phases
9801 (modify-phases %standard-phases
9802 (add-before
9803 'build 'configure
9804 (assoc-ref gnu:%standard-phases 'configure)))))
9805 (home-page
9806 "https://github.com/sagemath/cysignals")
9807 (synopsis
9808 "Handling of interrupts and signals for Cython")
9809 (description
9810 "The cysignals package provides mechanisms to handle interrupts (and
9811 other signals and errors) in Cython code, using two related approaches,
9812 for mixed Cython/Python code or external C libraries and pure Cython code,
9813 respectively.")
9814 (license license:lgpl3+)))
9815
9816 (define-public python2-cysignals
9817 (package-with-python2 python-cysignals))
9818
9819 (define-public python2-shedskin
9820 (package
9821 (name "python2-shedskin")
9822 (version "0.9.4")
9823 (source
9824 (origin
9825 (method url-fetch)
9826 (uri (string-append "https://github.com/shedskin/shedskin/"
9827 "releases/download/v" version
9828 "/shedskin-" version ".tgz"))
9829 (sha256
9830 (base32
9831 "0nzwrzgw1ga8rw6f0ryq7zr9kkiavd1cqz5hzxkcbicl1dk7kz41"))))
9832 (build-system python-build-system)
9833 (arguments
9834 `(#:python ,python-2
9835 #:phases (modify-phases %standard-phases
9836 (add-after 'unpack 'fix-resulting-include-libs
9837 (lambda* (#:key inputs #:allow-other-keys)
9838 (let ((libgc (assoc-ref inputs "libgc"))
9839 (pcre (assoc-ref inputs "pcre")))
9840 (substitute* "shedskin/makefile.py"
9841 (("variable == 'CCFLAGS':[ ]*")
9842 (string-append "variable == 'CCFLAGS':\n"
9843 " line += ' -I " pcre "/include"
9844 " -I " libgc "/include'"))
9845 (("variable == 'LFLAGS':[ ]*")
9846 (string-append "variable == 'LFLAGS':\n"
9847 " line += ' -L" pcre "/lib"
9848 " -L " libgc "/lib'")))
9849 #t))))))
9850 (inputs `(("pcre" ,pcre)
9851 ("libgc" ,libgc)))
9852 (home-page "https://shedskin.github.io/")
9853 (synopsis "Experimental Python-2 to C++ Compiler")
9854 (description (string-append "This is an experimental compiler for a subset of
9855 Python. It generates C++ code and a Makefile."))
9856 (license (list license:gpl3 license:bsd-3 license:expat))))
9857
9858 (define-public python2-rope
9859 (package
9860 (name "python2-rope")
9861 (version "0.11.0")
9862 (source
9863 (origin
9864 (method url-fetch)
9865 (uri (pypi-uri "rope" version))
9866 (sha256
9867 (base32
9868 "1cppm0pa9aqgsbkq130lskrzmrvjs5vpiavjjbhpz2fdw52w8251"))))
9869 (arguments
9870 ;; Rope has only partial python3 support, see `python-rope'
9871 `(#:python ,python-2))
9872 (build-system python-build-system)
9873 (native-inputs
9874 `(("python2-unittest2" ,python2-unittest2)))
9875 (home-page "https://github.com/python-rope/rope")
9876 (synopsis "Refactoring library for Python")
9877 (description "Rope is a refactoring library for Python. It facilitates
9878 the renaming, moving and extracting of attributes, functions, modules, fields
9879 and parameters in Python 2 source code. These refactorings can also be applied
9880 to occurrences in strings and comments.")
9881 (license license:gpl2)))
9882
9883 (define-public python-rope
9884 (package
9885 (inherit python2-rope)
9886 (name "python-rope")
9887 (arguments `(#:python ,python-wrapper
9888 ;; XXX: Only partial python3 support, results in some failing
9889 ;; tests: <https://github.com/python-rope/rope/issues/247>.
9890 #:tests? #f))
9891 (properties `((python2-variant . ,(delay python2-rope))))))
9892
9893 (define-public python-py3status
9894 (package
9895 (name "python-py3status")
9896 (version "3.21")
9897 (source
9898 (origin
9899 (method url-fetch)
9900 (uri (pypi-uri "py3status" version))
9901 (sha256
9902 (base32 "16z8zq83hxy48g6hh4xczbdz50qvxv9k1aahr4fqq7jis60cc262"))))
9903 (build-system python-build-system)
9904 (inputs
9905 `(("file" ,file)))
9906 (arguments
9907 '(#:phases
9908 (modify-phases %standard-phases
9909 ;; 'file' is used for detection of configuration file encoding
9910 ;; let's make link the dependency to particular input
9911 (add-before 'build 'patch-file-path
9912 (lambda* (#:key inputs #:allow-other-keys)
9913 (let ((file-path (assoc-ref inputs "file")))
9914 (substitute* "py3status/parse_config.py"
9915 (("\\['file', '-b'")
9916 (string-append "['" file-path "/bin/file', '-b'")))
9917 #t))))
9918 #:tests? #f)) ; TODO: Requires many libraries not in Guix.
9919 (home-page "https://github.com/ultrabug/py3status")
9920 (synopsis "Extensible i3status wrapper written in Python")
9921 (description "py3status is an i3status wrapper which extends i3status
9922 functionality in a modular way, allowing you to extend your panel with your
9923 own code, responding to click events and updating clock every second.")
9924 (license license:bsd-3)))
9925
9926 (define-public python-tblib
9927 (package
9928 (name "python-tblib")
9929 (version "1.3.2")
9930 (source (origin
9931 (method url-fetch)
9932 (uri (pypi-uri "tblib" version))
9933 (sha256 (base32
9934 "1rsg8h069kqgncyv8fgzyj6qflk6j10cb78pa5jk34ixwq044vj3"))))
9935 (build-system python-build-system)
9936 (arguments
9937 `(#:phases
9938 (modify-phases %standard-phases
9939 (add-before 'check 'adjust-tests
9940 (lambda _
9941 (when (which "python3")
9942 ;; Adjust the example output to match that of Python 3.7:
9943 ;; <https://github.com/ionelmc/python-tblib/issues/36>.
9944 (substitute* "README.rst"
9945 (("Exception\\('fail',") "Exception('fail'"))
9946 #t)))
9947 (replace 'check
9948 (lambda _
9949 ;; Upstream runs tests after installation and the package itself
9950 ;; resides in a subdirectory. Extend PYTHONPATH so it will be
9951 ;; found.
9952 (setenv "PYTHONPATH"
9953 (string-append (getcwd) "/build/lib:"
9954 (getenv "PYTHONPATH")))
9955 (invoke "py.test" "-vv" "tests" "README.rst"))))))
9956 (native-inputs
9957 `(("python-pytest" ,python-pytest)
9958 ("python-six" ,python-six)))
9959 (home-page "https://github.com/ionelmc/python-tblib")
9960 (synopsis "Traceback serialization library")
9961 (description
9962 "Traceback serialization allows you to:
9963
9964 @enumerate
9965 @item Pickle tracebacks and raise exceptions with pickled tracebacks in
9966 different processes. This allows better error handling when running code over
9967 multiple processes (imagine multiprocessing, billiard, futures, celery etc).
9968
9969 @item Parse traceback strings and raise with the parsed tracebacks.
9970 @end enumerate\n")
9971 (license license:bsd-3)))
9972
9973 (define-public python2-tblib
9974 (package-with-python2 python-tblib))
9975
9976 (define-public python-greenlet
9977 (package
9978 (name "python-greenlet")
9979 (version "0.4.15")
9980 (source (origin
9981 (method url-fetch)
9982 (uri (pypi-uri "greenlet" version))
9983 (sha256
9984 (base32
9985 "1g4g1wwc472ds89zmqlpyan3fbnzpa8qm48z3z1y6mlk44z485ll"))))
9986 (build-system python-build-system)
9987 (home-page "https://greenlet.readthedocs.io/")
9988 (synopsis "Lightweight in-process concurrent programming")
9989 (description
9990 "Greenlet package is a spin-off of Stackless, a version of CPython
9991 that supports micro-threads called \"tasklets\". Tasklets run
9992 pseudo-concurrently (typically in a single or a few OS-level threads) and
9993 are synchronized with data exchanges on \"channels\".")
9994 (license (list license:psfl license:expat))))
9995
9996 (define-public python2-greenlet
9997 (package-with-python2 python-greenlet))
9998
9999 (define-public python-objgraph
10000 (package
10001 (name "python-objgraph")
10002 (version "3.4.0")
10003 (source
10004 (origin
10005 (method url-fetch)
10006 (uri (pypi-uri "objgraph" version))
10007 (sha256
10008 (base32
10009 "184m09am5gpbqfaiy7l0hwh476mczbrly1dffs0rw2p1d1i2q32a"))))
10010 (build-system python-build-system)
10011 (propagated-inputs
10012 `(("python-graphviz" ,python-graphviz)))
10013 (native-inputs
10014 `(("python-mock" ,python-mock)
10015 ("graphviz" ,graphviz)))
10016 (home-page "https://mg.pov.lt/objgraph/")
10017 (synopsis "Draw Python object reference graphs with graphviz")
10018 (description
10019 "This package provides tools to draw Python object reference graphs with
10020 graphviz.")
10021 (license license:expat)))
10022
10023 (define-public python-gevent
10024 (package
10025 (name "python-gevent")
10026 (version "1.3.7")
10027 (source (origin
10028 (method url-fetch)
10029 (uri (pypi-uri "gevent" version))
10030 (sha256
10031 (base32
10032 "0b0fr04qdk1p4sniv87fh8z5psac60x01pv054kpgi94520g81iz"))
10033 (modules '((guix build utils)))
10034 (snippet
10035 '(begin
10036 ;; unbunding libev and c-ares
10037 (delete-file-recursively "deps")
10038 #t))))
10039 (build-system python-build-system)
10040 (arguments
10041 `(#:modules ((ice-9 ftw)
10042 (ice-9 match)
10043 (srfi srfi-26)
10044 (guix build utils)
10045 (guix build python-build-system))
10046 #:phases (modify-phases %standard-phases
10047 (add-before 'patch-source-shebangs 'patch-hard-coded-paths
10048 (lambda _
10049 (substitute* "src/gevent/subprocess.py"
10050 (("/bin/sh") (which "sh")))
10051 (for-each (lambda (file)
10052 (substitute* file
10053 (("/bin/sh") (which "sh"))
10054 (("/bin/true") (which "true"))))
10055 (find-files "src/greentest" "\\.py$"))
10056 #t))
10057 (add-before 'build 'do-not-use-bundled-sources
10058 (lambda* (#:key inputs #:allow-other-keys)
10059 (setenv "CONFIG_SHELL" (which "bash"))
10060 (setenv "LIBEV_EMBED" "false")
10061 (setenv "CARES_EMBED" "false")
10062 (setenv "EMBED" "false")
10063
10064 ;; Prevent building bundled libev.
10065 (substitute* "setup.py"
10066 (("run_make=_BUILDING")
10067 "run_make=False"))
10068
10069 (let ((greenlet (string-append
10070 (assoc-ref inputs "python-greenlet")
10071 "/include")))
10072 (match (scandir greenlet
10073 (lambda (item)
10074 (string-prefix? "python" item)))
10075 ((python)
10076 (setenv "C_INCLUDE_PATH"
10077 (string-append greenlet "/" python)))))
10078 #t))
10079 (add-before 'check 'skip-timer-test
10080 (lambda _
10081 ;; XXX: Skip 'TestTimerResolution', which appears to be
10082 ;; unreliable.
10083 (substitute* "src/greentest/test__core_timer.py"
10084 (("not greentest.RUNNING_ON_CI") "False"))
10085 #t))
10086 (replace 'check
10087 (lambda _
10088 ;; Make sure the build directory is on PYTHONPATH.
10089 (setenv "PYTHONPATH"
10090 (string-append
10091 (getenv "PYTHONPATH") ":"
10092 (getcwd) "/build/"
10093 (car (scandir "build" (cut string-prefix? "lib." <>)))))
10094 (with-directory-excursion "src/greentest"
10095 ;; XXX: Many tests require network access. Instead we only
10096 ;; run known-good tests. Unfortunately we cannot use
10097 ;; recursion here since this directory also contains
10098 ;; Python-version-specific subfolders.
10099 (apply invoke "python" "testrunner.py" "--config"
10100 "known_failures.py"
10101 (scandir "." (cut regexp-exec
10102 (make-regexp "test_+(subprocess|core)")
10103 <>)))))))))
10104 (propagated-inputs
10105 `(("python-greenlet" ,python-greenlet)
10106 ("python-objgraph" ,python-objgraph)))
10107 (native-inputs
10108 `(("python-six" ,python-six)))
10109 (inputs
10110 `(("c-ares" ,c-ares)
10111 ("libev" ,libev)))
10112 (home-page "http://www.gevent.org/")
10113 (synopsis "Coroutine-based network library")
10114 (description
10115 "gevent is a coroutine-based Python networking library that uses greenlet
10116 to provide a high-level synchronous API on top of the libev event loop.")
10117 (license license:expat)
10118 (properties `((python2-variant . ,(delay python2-gevent))))))
10119
10120 (define-public python2-gevent
10121 (let ((base (package-with-python2
10122 (strip-python2-variant python-gevent))))
10123 (package
10124 (inherit base)
10125 (native-inputs `(,@(package-native-inputs python-gevent)
10126 ("python-mock" ,python2-mock))))))
10127
10128 (define-public python-fastimport
10129 (package
10130 (name "python-fastimport")
10131 (version "0.9.6")
10132 (source
10133 (origin
10134 (method url-fetch)
10135 (uri (pypi-uri "fastimport" version))
10136 (sha256
10137 (base32 "1aqjsin4rmqm7ln4j0p73fzxifws6c6ikgyhav7r137m2ixsxl43"))))
10138 (build-system python-build-system)
10139 (home-page "https://github.com/jelmer/python-fastimport")
10140 (synopsis "VCS fastimport parser and generator in Python")
10141 (description "This package provides a parser for and generator of the Git
10142 @url{https://www.kernel.org/pub/software/scm/git/docs/git-fast-import.html,fastimport}
10143 format.")
10144 (license license:gpl2+)))
10145
10146 (define-public python2-fastimport
10147 (package-with-python2 python-fastimport))
10148
10149 (define-public python-twisted
10150 (package
10151 (name "python-twisted")
10152 (version "19.7.0")
10153 (source (origin
10154 (method url-fetch)
10155 (uri (pypi-uri "Twisted" version ".tar.bz2"))
10156 (sha256
10157 (base32
10158 "17d3hnxv9qndagzz63mdpyk99xj63p9gq586vjn0rxk8cl197nym"))))
10159 (build-system python-build-system)
10160 (arguments
10161 '(#:tests? #f)) ; FIXME: some tests fail
10162 (propagated-inputs
10163 `(("python-zope-interface" ,python-zope-interface)
10164 ("python-pyhamcrest" ,python-pyhamcrest)
10165 ("python-incremental" ,python-incremental)
10166 ("python-hyperlink" ,python-hyperlink)
10167 ("python-constantly" ,python-constantly)
10168 ("python-automat" ,python-automat)))
10169 (home-page "https://twistedmatrix.com/")
10170 (synopsis "Asynchronous networking framework written in Python")
10171 (description
10172 "Twisted is an extensible framework for Python programming, with special
10173 focus on event-based network programming and multiprotocol integration.")
10174 (license license:expat)))
10175
10176 (define-public python2-twisted
10177 (package-with-python2 python-twisted))
10178
10179 (define-public python-pika
10180 (package
10181 (name "python-pika")
10182 (version "0.12.0")
10183 (source
10184 (origin
10185 (method url-fetch)
10186 (uri (pypi-uri "pika" version))
10187 (sha256
10188 (base32
10189 "0ld7akgm93s8pfa4dsx9qlzlhj76zspbr5m9ms0ns09yd2w4aq9h"))))
10190 (build-system python-build-system)
10191 (native-inputs
10192 `(("python-pyev" ,python-pyev)
10193 ("python-tornado" ,python-tornado)
10194 ("python-twisted" ,python-twisted)))
10195 (home-page "https://pika.readthedocs.org")
10196 (synopsis "Pure Python AMQP Client Library")
10197 (description
10198 "Pika is a pure-Python implementation of the AMQP (Advanced Message Queuing
10199 Protocol) 0-9-1 protocol that tries to stay fairly independent of the underlying
10200 network support library.")
10201 (license license:bsd-3)))
10202
10203 (define-public python2-pika
10204 (package-with-python2 python-pika))
10205
10206 (define-public python-ply
10207 (package
10208 (name "python-ply")
10209 (version "3.10")
10210 (source
10211 (origin
10212 (method url-fetch)
10213 (uri (pypi-uri "ply" version))
10214 (sha256
10215 (base32
10216 "1jxsr1d2f732r6ljhvm827113dckwl6qwakfvpbdhcbhvpvlmscn"))))
10217 (build-system python-build-system)
10218 (home-page "http://www.dabeaz.com/ply/")
10219 (synopsis "Python Lex & Yacc")
10220 (description "PLY is a @code{lex}/@code{yacc} implemented purely in Python.
10221 It uses LR parsing and does extensive error checking.")
10222 (license license:bsd-3)))
10223
10224 (define-public python2-ply
10225 (package-with-python2 python-ply))
10226
10227 (define-public python-tabulate
10228 (package
10229 (name "python-tabulate")
10230 (version "0.7.7")
10231 (source (origin
10232 (method url-fetch)
10233 (uri (pypi-uri "tabulate" version))
10234 (sha256
10235 (base32
10236 "1inqhspd4frxnp08c32yndr0lc4px1xfkqah184i5w09gkhvi843"))))
10237 (build-system python-build-system)
10238 (arguments
10239 ;; FIXME: The pypi release tarball is missing a 'test/common.py'
10240 ;; and the latest release is not tagged in the upstream repository.
10241 '(#:tests? #f))
10242 (home-page "https://bitbucket.org/astanin/python-tabulate")
10243 (synopsis "Pretty-print tabular data")
10244 (description
10245 "Tabulate is a library and command-line utility to pretty-print tabular
10246 data in Python.")
10247 (license license:expat)))
10248
10249 (define-public python2-tabulate
10250 (package-with-python2 python-tabulate))
10251
10252 (define-public python-kazoo
10253 (package
10254 (name "python-kazoo")
10255 (version "2.4.0")
10256 (source
10257 (origin
10258 (method url-fetch)
10259 (uri (pypi-uri "kazoo" version))
10260 (sha256
10261 (base32
10262 "16y213k7r8shyn2zw1k6lkzjgcrvm441pqv8scvcjixhvpbx3hm7"))))
10263 (build-system python-build-system)
10264 (arguments '(#:tests? #f)) ; XXX: needs zookeeper
10265 (propagated-inputs
10266 `(("python-six" ,python-six)))
10267 (home-page "https://kazoo.readthedocs.org")
10268 (synopsis "High-level Zookeeper client library")
10269 (description
10270 "Kazoo is a Python client library for the Apache Zookeeper distributed
10271 application service. It is designed to be easy to use and to avoid common
10272 programming errors.")
10273 (license license:asl2.0)))
10274
10275 (define-public python2-kazoo
10276 (package-with-python2 python-kazoo))
10277
10278 (define-public python-pykafka
10279 (package
10280 (name "python-pykafka")
10281 (version "2.4.0")
10282 (source (origin
10283 (method url-fetch)
10284 (uri (pypi-uri "pykafka" version))
10285 (sha256
10286 (base32
10287 "1id6sr159p6aa13bxcqyr9gln8sqg1l0ddzns5iws8kk5q1p5cfv"))))
10288 (build-system python-build-system)
10289 (arguments '(#:tests? #f)) ; XXX: needs zookeeper, kafka, etc.
10290 (propagated-inputs
10291 `(("python-gevent" ,python-gevent)
10292 ("python-kazoo" ,python-kazoo)
10293 ("python-tabulate" ,python-tabulate)))
10294 (inputs
10295 `(("librdkafka" ,librdkafka)))
10296 (home-page "https://pykafka.readthedocs.io/")
10297 (synopsis "Apache Kafka client for Python")
10298 (description
10299 "PyKafka is a client for the Apache Kafka distributed messaging system.
10300 It includes Python implementations of Kafka producers and consumers, which
10301 are optionally backed by a C extension built on librdkafka.")
10302 (license license:asl2.0)))
10303
10304 (define-public python2-pykafka
10305 (package-with-python2 python-pykafka))
10306
10307 (define-public python-wcwidth
10308 (package
10309 (name "python-wcwidth")
10310 (version "0.1.7")
10311 (source
10312 (origin
10313 (method url-fetch)
10314 (uri (pypi-uri "wcwidth" version))
10315 (sha256
10316 (base32
10317 "0pn6dflzm609m4r3i8ik5ni9ijjbb5fa3vg1n7hn6vkd49r77wrx"))))
10318 (build-system python-build-system)
10319 (home-page "https://github.com/jquast/wcwidth")
10320 (synopsis "Measure number of terminal column cells of wide-character codes")
10321 (description "Wcwidth measures the number of terminal column cells of
10322 wide-character codes. It is useful for those implementing a terminal emulator,
10323 or programs that carefully produce output to be interpreted by one. It is a
10324 Python implementation of the @code{wcwidth} and @code{wcswidth} C functions
10325 specified in POSIX.1-2001 and POSIX.1-2008.")
10326 (license license:expat)))
10327
10328 (define-public python2-wcwidth
10329 (package-with-python2 python-wcwidth))
10330
10331 (define-public python2-jsonrpclib
10332 (package
10333 (name "python2-jsonrpclib")
10334 (version "0.1.7")
10335 (source (origin
10336 (method url-fetch)
10337 (uri (pypi-uri "jsonrpclib" version))
10338 (sha256
10339 (base32
10340 "02vgirw2bcgvpcxhv5hf3yvvb4h5wzd1lpjx8na5psdmaffj6l3z"))))
10341 (build-system python-build-system)
10342 (arguments
10343 `(#:tests? #f
10344 #:python ,python-2))
10345 (home-page "https://github.com/joshmarshall/jsonrpclib/")
10346 (synopsis "Implementation of JSON-RPC specification for Python")
10347 (description
10348 "This library is an implementation of the JSON-RPC specification.
10349 It supports both the original 1.0 specification, as well as the
10350 new (proposed) 2.0 spec, which includes batch submission, keyword arguments,
10351 etc.")
10352 (license license:asl2.0)))
10353
10354 (define-public python-chai
10355 (package
10356 (name "python-chai")
10357 (version "1.1.2")
10358 (source (origin
10359 (method url-fetch)
10360 (uri (pypi-uri "chai" version))
10361 (sha256
10362 (base32
10363 "1k6n6zbgrrs83crp6mr3yqj9zlv40b8rpisyrliwsq7naml2p3gz"))))
10364 (build-system python-build-system)
10365 (home-page "https://github.com/agoragames/chai")
10366 (synopsis "Mocking framework for Python")
10367 (description
10368 "Chai provides an api for mocking, stubbing and spying your python
10369 objects, patterned after the Mocha library for Ruby.")
10370 (license license:bsd-3)))
10371
10372 (define-public python2-chai
10373 (package-with-python2 python-chai))
10374
10375 (define-public python-inflection
10376 (package
10377 (name "python-inflection")
10378 (version "0.3.1")
10379 (source
10380 (origin (method url-fetch)
10381 (uri (pypi-uri "inflection" version))
10382 (sha256
10383 (base32
10384 "1jhnxgnw8y3mbzjssixh6qkc7a3afc4fygajhqrqalnilyvpzshq"))))
10385 (build-system python-build-system)
10386 (native-inputs
10387 `(("python-pytest" ,python-pytest)))
10388 (home-page "https://github.com/jpvanhal/inflection")
10389 (synopsis "Python string transformation library")
10390 (description
10391 "Inflection is a string transformation library. It singularizes
10392 and pluralizes English words, and transforms strings from CamelCase to
10393 underscored string.")
10394 (license license:expat)))
10395
10396 (define-public python2-inflection
10397 (package-with-python2 python-inflection))
10398
10399 (define-public python-pylev
10400 (package
10401 (name "python-pylev")
10402 (version "1.3.0")
10403 (source (origin
10404 (method url-fetch)
10405 (uri (pypi-uri "pylev" version))
10406 (sha256
10407 (base32
10408 "1hz1x9blsbxya1y9nnhnwwdnqmakxi9mc0jkwj0rn6b1h44i0f86"))))
10409 (build-system python-build-system)
10410 (home-page "https://github.com/toastdriven/pylev")
10411 (synopsis "Levenshtein distance implementation in Python")
10412 (description "Pure Python Levenshtein implementation, based off the
10413 Wikipedia code samples at
10414 @url{http://en.wikipedia.org/wiki/Levenshtein_distance}.")
10415 (license license:bsd-3)))
10416
10417 (define-public python2-pylev
10418 (package-with-python2 python-pylev))
10419
10420 (define-public python-cleo
10421 (package
10422 (name "python-cleo")
10423 (version "0.6.8")
10424 (source (origin
10425 (method url-fetch)
10426 (uri (pypi-uri "cleo" version))
10427 (sha256
10428 (base32
10429 "06zp695hq835rkaq6irr1ds1dp2qfzyf32v60vxpd8rcnxv319l5"))))
10430 (build-system python-build-system)
10431 (native-inputs
10432 `( ;; For testing
10433 ("python-mock" ,python-mock)
10434 ("python-pytest-mock" ,python-pytest-mock)
10435 ("python-pytest" ,python-pytest)))
10436 (propagated-inputs
10437 `(("python-backpack" ,python-backpack)
10438 ("python-pastel" ,python-pastel)
10439 ("python-pylev" ,python-pylev)))
10440 (home-page "https://github.com/sdispater/cleo")
10441 (synopsis "Command-line arguments library for Python")
10442 (description
10443 "Cleo allows you to create command-line commands with signature in
10444 docstring and colored output.")
10445 (license license:expat)))
10446
10447 (define-public python2-cleo
10448 (package-with-python2 python-cleo))
10449
10450 (define-public python-tomlkit
10451 (package
10452 (name "python-tomlkit")
10453 (version "0.5.7")
10454 (source
10455 (origin
10456 (method url-fetch)
10457 (uri (pypi-uri "tomlkit" version))
10458 (sha256
10459 (base32
10460 "18820ga5z3if1w8dvykxrfm000akracq01ic402xrbljgbn5grn4"))))
10461 (build-system python-build-system)
10462 (native-inputs
10463 `(("python-pytest" ,python-pytest)))
10464 (home-page
10465 "https://github.com/sdispater/tomlkit")
10466 (synopsis "Style preserving TOML library")
10467 (description
10468 "TOML Kit is a 0.5.0-compliant TOML library. It includes a parser that
10469 preserves all comments, indentations, whitespace and internal element ordering,
10470 and makes them accessible and editable via an intuitive API. It can also
10471 create new TOML documents from scratch using the provided helpers. Part of the
10472 implementation as been adapted, improved and fixed from Molten.")
10473 (license license:expat)))
10474
10475 (define-public python-shellingham
10476 (package
10477 (name "python-shellingham")
10478 (version "1.3.1")
10479 (source
10480 (origin
10481 (method url-fetch)
10482 (uri (pypi-uri "shellingham" version))
10483 (sha256
10484 (base32
10485 "1q7kws7w4x2hji3g7y0ni9ddk4sd676ylrb3db54gbpys6xj6nwq"))))
10486 (build-system python-build-system)
10487 (home-page
10488 "https://github.com/sarugaku/shellingham")
10489 (synopsis "Tool to detect surrounding shell")
10490 (description
10491 "Shellingham detects what shell the current Python executable is
10492 running in.")
10493 (license license:isc)))
10494
10495 (define-public python-memcached
10496 (package
10497 (name "python-memcached")
10498 (version "1.59")
10499 (source
10500 (origin
10501 (method url-fetch)
10502 (uri (pypi-uri "python-memcached" version))
10503 (sha256
10504 (base32
10505 "0kvyapavbirk2x3n1jx4yb9nyigrj1s3x15nm3qhpvhkpqvqdqm2"))))
10506 (build-system python-build-system)
10507 (propagated-inputs `(("python-six" ,python-six)))
10508 (home-page
10509 "https://github.com/linsomniac/python-memcached")
10510 (synopsis "Pure python memcached client")
10511 (description
10512 "This software is a pure Python interface to the memcached memory cache
10513 daemon. It is the client side software which allows storing values in one or
10514 more, possibly remote, memcached servers.")
10515 (license license:psfl)))
10516
10517 (define-public python-clikit
10518 (package
10519 (name "python-clikit")
10520 (version "0.2.4")
10521 (source
10522 (origin
10523 (method url-fetch)
10524 (uri (pypi-uri "clikit" version))
10525 (sha256
10526 (base32
10527 "0dc8czib5f4j9px1ivcpqnmivnx2zjpc0xb00ldrhsqylks7r06n"))))
10528 (build-system python-build-system)
10529 (propagated-inputs
10530 `(("python-pastel" ,python-pastel)
10531 ("python-pylev" ,python-pylev)))
10532 (home-page "https://github.com/sdispater/clikit")
10533 (synopsis "Group of utilities to build command line interfaces")
10534 (description
10535 "CliKit is a group of utilities to build testable command line
10536 interfaces.")
10537 (license license:expat)))
10538
10539 (define-public python-msgpack-python
10540 (package
10541 (name "python-msgpack-python")
10542 (version "0.5.6")
10543 (source
10544 (origin
10545 (method url-fetch)
10546 (uri (pypi-uri "msgpack-python" version))
10547 (sha256
10548 (base32
10549 "16wh8qgybmfh4pjp8vfv78mdlkxfmcasg78lzlnm6nslsfkci31p"))))
10550 (build-system python-build-system)
10551 (home-page "http://msgpack.org/")
10552 (synopsis "Package to deserialize messages in MessagePack binary format")
10553 (description
10554 "MessagePack is an efficient binary serialization format. It lets you
10555 exchange data among multiple languages like JSON. But it's faster and
10556 smaller. Small integers are encoded into a single byte, and typical short
10557 strings require only one extra byte in addition to the strings themselves.")
10558 (license license:asl2.0)))
10559
10560 (define-public python-cachy
10561 (package
10562 (name "python-cachy")
10563 (version "0.2.0")
10564 (source
10565 (origin
10566 (method url-fetch)
10567 (uri (pypi-uri "cachy" version))
10568 (sha256
10569 (base32
10570 "0v6mjyhgx6j7ya20bk69cr3gdzdkdf6psay0h090rscclgji65dp"))))
10571 (build-system python-build-system)
10572 (native-inputs
10573 `(("python-fakeredis" ,python-fakeredis)
10574 ("python-flexmock" ,python-flexmock)
10575 ("python-pytest" ,python-pytest)))
10576 (propagated-inputs
10577 `(("python-memcached" ,python-memcached)
10578 ("python-msgpack-python" ,python-msgpack-python)
10579 ("python-redis" ,python-redis)))
10580 (home-page "https://github.com/sdispater/cachy")
10581 (synopsis "Simple yet effective caching library")
10582 (description
10583 "Cachy provides a simple yet effective caching library. A simple but
10584 powerful API: thread-safety; decorator syntax; support for memcached, redis,
10585 database, file, dict stores. Cachy supports python versions 2.7+ and 3.2+.")
10586 (license license:expat)))
10587
10588 (define-public poetry
10589 (package
10590 (name "poetry")
10591 (version "0.12.17")
10592 ;; Poetry can only be built from source with poetry.
10593 (source
10594 (origin
10595 (method url-fetch)
10596 (uri (pypi-uri "poetry" version))
10597 (sha256
10598 (base32
10599 "0gxwcd65qjmzqzppf53x51sic1rbcd9py6cdzx3aprppipimslvf"))))
10600 (build-system python-build-system)
10601 (arguments
10602 `(#:tests? #f ;; Pypi does not have tests.
10603 #:phases
10604 (modify-phases %standard-phases
10605 (replace 'build
10606 (lambda _
10607 ;; Bug in poetry https://github.com/sdispater/poetry/issues/866.
10608 (invoke "sed" "-i" "-e" "s/from distutils.core/from setuptools/"
10609 "setup.py")
10610 #t)))))
10611 (propagated-inputs
10612 `(("python-cachecontrol" ,python-cachecontrol)
10613 ("python-cachy" ,python-cachy)
10614 ("python-cleo" ,python-cleo)
10615 ("python-glob2" ,python-glob2)
10616 ("python-html5lib" ,python-html5lib)
10617 ("python-jsonschema" ,python-jsonschema)
10618 ("python-msgpack" ,python-msgpack)
10619 ("python-pathlib2" ,python-pathlib2)
10620 ("python-pkginfo" ,python-pkginfo)
10621 ("python-pyparsing" ,python-pyparsing)
10622 ("python-pyrsistent" ,python-pyrsistent)
10623 ("python-requests" ,python-requests)
10624 ("python-requests-toolbelt" ,python-requests-toolbelt)
10625 ("python-shellingham" ,python-shellingham)
10626 ("python-tomlkit" ,python-tomlkit)
10627 ("python-virtualenv" ,python-virtualenv)))
10628 (home-page "https://poetry.eustace.io/")
10629 (synopsis "Python dependency management and packaging made easy")
10630 (description "Poetry is a tool for dependency management and packaging
10631 in Python. It allows you to declare the libraries your project depends on and
10632 it will manage (install/update) them for you.")
10633 (license license:expat)))
10634
10635 (define-public python-lazy-object-proxy
10636 (package
10637 (name "python-lazy-object-proxy")
10638 (version "1.4.3")
10639 (source (origin
10640 (method url-fetch)
10641 (uri (pypi-uri "lazy-object-proxy" version))
10642 (sha256
10643 (base32
10644 "1w1aaay424ciz8fz3fkzxb0pxzfxn184f2whpyn4fx72bn50x47k"))))
10645 (native-inputs
10646 `(("python-setuptools-scm" ,python-setuptools-scm-3.3)))
10647 (build-system python-build-system)
10648 (home-page "https://github.com/ionelmc/python-lazy-object-proxy")
10649 (synopsis "Lazy object proxy for python")
10650 (description
10651 "Lazy object proxy is an object that wraps a callable but defers the call
10652 until the object is actually required, and caches the result of said call.")
10653 (license license:bsd-2)))
10654
10655 (define-public python2-lazy-object-proxy
10656 (package-with-python2 python-lazy-object-proxy))
10657
10658 (define-public python-dnspython
10659 (package
10660 (name "python-dnspython")
10661 (version "1.15.0")
10662 (source (origin
10663 (method url-fetch)
10664 (uri (string-append "http://www.dnspython.org/kits/"
10665 version "/dnspython-" version ".tar.gz"))
10666 (sha256
10667 (base32
10668 "0jr4v2pd90i6l1xxbss2m05psbjaxvyvvvpq44wycijpfgjqln8i"))))
10669 (build-system python-build-system)
10670 (arguments '(#:tests? #f)) ; XXX: requires internet access
10671 (home-page "http://www.dnspython.org")
10672 (synopsis "DNS toolkit for Python")
10673 (description
10674 "dnspython is a DNS toolkit for Python. It supports almost all record
10675 types. It can be used for queries, zone transfers, and dynamic updates.
10676 It supports TSIG authenticated messages and EDNS0.")
10677 (license license:expat)))
10678
10679 (define-public python2-dnspython
10680 (package-with-python2 python-dnspython))
10681
10682 (define-public python-email-validator
10683 (package
10684 (name "python-email-validator")
10685 (version "1.0.2")
10686 (source
10687 (origin (method url-fetch)
10688 (uri (pypi-uri "email_validator" version))
10689 (sha256
10690 (base32
10691 "1ja9149l9ck5n45a72h3is7v476hjny5ybxbcamx1nw6iplsm7k6"))))
10692 (build-system python-build-system)
10693 (arguments
10694 '(#:phases
10695 (modify-phases %standard-phases
10696 (add-before 'build 'use-dnspython
10697 (lambda _
10698 (substitute* "setup.py"
10699 (("dnspython3") "dnspython"))
10700 #t)))))
10701 (propagated-inputs
10702 `(("python-dnspython" ,python-dnspython)
10703 ("python-idna" ,python-idna)))
10704 (home-page "https://github.com/JoshData/python-email-validator")
10705 (synopsis "Email address validation library for Python")
10706 (description
10707 "This library validates email address syntax and deliverability.")
10708 (license license:cc0)))
10709
10710 (define-public python2-email-validator
10711 (package-with-python2 python-email-validator))
10712
10713 (define-public python-ukpostcodeparser
10714 (package
10715 (name "python-ukpostcodeparser")
10716 (version "1.0.3")
10717 (source (origin
10718 (method url-fetch)
10719 (uri (pypi-uri "UkPostcodeParser" version))
10720 (sha256
10721 (base32
10722 "1jwg9z4rz51mcka1821rwgycsd0mcicyp1kiwjfa2kvg8bm9p2qd"))))
10723 (build-system python-build-system)
10724 (home-page "https://github.com/hamstah/ukpostcodeparser")
10725 (synopsis "UK Postcode parser for Python")
10726 (description
10727 "This library provides the @code{parse_uk_postcode} function for
10728 parsing UK postcodes.")
10729 (license license:expat)))
10730
10731 (define-public python2-ukpostcodeparser
10732 (package-with-python2 python-ukpostcodeparser))
10733
10734 (define-public python-faker
10735 (package
10736 (name "python-faker")
10737 (version "0.7.9")
10738 (source (origin
10739 (method url-fetch)
10740 (uri (pypi-uri "Faker" version))
10741 (sha256
10742 (base32
10743 "1fh2p2yz0fsdr4fqwxgddwbvfb6qn6vp8yx0qwqzra27yq5d1wsm"))
10744 (patches
10745 (search-patches "python-faker-fix-build-32bit.patch"))
10746 (modules '((guix build utils)))
10747 (snippet
10748 '(begin
10749 (for-each delete-file (find-files "." "\\.pyc$"))
10750 #t))))
10751 (build-system python-build-system)
10752 (arguments
10753 '(#:phases
10754 (modify-phases %standard-phases
10755 (replace 'check
10756 (lambda _ (invoke "python" "-m" "unittest" "-v" "tests"))))))
10757 (native-inputs
10758 `(;; For testing
10759 ("python-email-validator" ,python-email-validator)
10760 ("python-mock" ,python-mock)
10761 ("python-ukpostcodeparser" ,python-ukpostcodeparser)))
10762 (propagated-inputs
10763 `(("python-dateutil" ,python-dateutil)
10764 ("python-six" ,python-six)))
10765 (home-page "https://github.com/joke2k/faker")
10766 (synopsis "Python package that generates fake data")
10767 (description
10768 "Faker is a Python package that generates fake data such as names,
10769 addresses, and phone numbers.")
10770 (license license:expat)
10771 (properties `((python2-variant . ,(delay python2-faker))))))
10772
10773 (define-public python2-faker
10774 (let ((base (package-with-python2 (strip-python2-variant
10775 python-faker))))
10776 (package
10777 (inherit base)
10778 (propagated-inputs
10779 `(("python2-ipaddress" ,python2-ipaddress)
10780 ,@(package-propagated-inputs base))))))
10781
10782 (define-public python-pyaml
10783 (package
10784 (name "python-pyaml")
10785 (version "18.11.0")
10786 (source (origin
10787 (method url-fetch)
10788 (uri (pypi-uri "pyaml" version))
10789 (sha256
10790 (base32
10791 "0fi604ix8lbpj1266q7js6szm771saprdzzcdwmj43wy83694qmr"))))
10792 (build-system python-build-system)
10793 (native-inputs
10794 `(("python-unidecode" ,python-unidecode)))
10795 (propagated-inputs
10796 `(("python-pyyaml" ,python-pyyaml)))
10797 (home-page "https://github.com/mk-fg/pretty-yaml")
10798 (synopsis "YAML pretty-print library for Python")
10799 (description
10800 "pyaml is a PyYAML based python module to produce pretty and readable
10801 YAML-serialized data.")
10802 (license license:wtfpl2)))
10803
10804 (define-public python2-pyaml
10805 (package-with-python2 python-pyaml))
10806
10807 (define-public python-backpack
10808 (package
10809 (name "python-backpack")
10810 (version "0.1")
10811 (source
10812 (origin
10813 (method url-fetch)
10814 (uri (pypi-uri "backpack" version))
10815 (sha256
10816 (base32
10817 "14rq1mvm0jda90lcx9gyyby9dvq4x3js2cmxvd6vl4686ixwyqh1"))))
10818 (build-system python-build-system)
10819 (native-inputs
10820 `(("python-pytest" ,python-pytest)
10821 ("python-nose" ,python-nose)))
10822 (propagated-inputs
10823 `(("python-simplejson" ,python-simplejson)))
10824 (home-page "https://github.com/sdispater/backpack")
10825 (synopsis "Utilities for working with Python collections")
10826 (description "Backpack provides some useful utilities for working with
10827 collections of data.")
10828 (license license:expat)))
10829
10830 (define-public python2-backpack
10831 (package-with-python2 python-backpack))
10832
10833 (define-public python-prompt-toolkit
10834 (package
10835 (name "python-prompt-toolkit")
10836 (version "2.0.7")
10837 (source
10838 (origin
10839 (method url-fetch)
10840 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10841 (sha256
10842 (base32
10843 "0fgacqk73w7s932vy46pan2yp8rvjmlkag20xvaydh9mhf6h85zx"))))
10844 (build-system python-build-system)
10845 (arguments
10846 `(#:phases
10847 (modify-phases %standard-phases
10848 (delete 'check)
10849 (add-after 'install 'post-install-check
10850 (lambda* (#:key inputs outputs #:allow-other-keys)
10851 ;; HOME is needed for the test
10852 ;; "test_pathcompleter_can_expanduser".
10853 (setenv "HOME" "/tmp")
10854 (add-installed-pythonpath inputs outputs)
10855 (invoke "py.test"))))))
10856 (propagated-inputs
10857 `(("python-wcwidth" ,python-wcwidth)
10858 ("python-six" ,python-six)
10859 ("python-pygments" ,python-pygments)))
10860 (native-inputs
10861 `(("python-pytest" ,python-pytest)))
10862 (home-page "https://github.com/jonathanslenders/python-prompt-toolkit")
10863 (synopsis "Library for building command line interfaces in Python")
10864 (description
10865 "Prompt-Toolkit is a library for building interactive command line
10866 interfaces in Python. It's like GNU Readline but it also features syntax
10867 highlighting while typing, out-of-the-box multi-line input editing, advanced
10868 code completion, incremental search, support for Chinese double-width
10869 characters, mouse support, and auto suggestions.")
10870 (license license:bsd-3)))
10871
10872 (define-public python2-prompt-toolkit
10873 (package-with-python2 python-prompt-toolkit))
10874
10875 (define-public python-prompt-toolkit-1
10876 (package (inherit python-prompt-toolkit)
10877 (version "1.0.15")
10878 (source
10879 (origin
10880 (method url-fetch)
10881 (uri (pypi-uri "prompt_toolkit" version ".tar.gz"))
10882 (sha256
10883 (base32
10884 "05v9h5nydljwpj5nm8n804ms0glajwfy1zagrzqrg91wk3qqi1c5"))))))
10885
10886 (define-public python2-prompt-toolkit-1
10887 (package-with-python2 python-prompt-toolkit-1))
10888
10889 (define-public python-jedi
10890 (package
10891 (name "python-jedi")
10892 (version "0.15.1")
10893 (source
10894 (origin
10895 (method url-fetch)
10896 (uri (pypi-uri "jedi" version))
10897 (sha256
10898 (base32
10899 "0bp4pxhsynaarbvzblsn5x32lzp29svy3sxfy8i6m5iwz9s9r1ds"))))
10900 (build-system python-build-system)
10901 (arguments
10902 `(#:phases
10903 (modify-phases %standard-phases
10904 (add-after 'unpack 'disable-file-completion-test
10905 ;; A single parameterized test currently fail (see:
10906 ;; https://github.com/davidhalter/jedi/issues/1395). Remove it.
10907 (lambda _
10908 (substitute* "test/test_api/test_completion.py"
10909 ((".*'example.py', 'rb\"' \\+ join\\('\\.\\.'.*") ""))
10910 #t))
10911 (replace 'check
10912 (lambda _
10913 (setenv "HOME" "/tmp")
10914 (invoke "python" "-m" "pytest"))))))
10915 (native-inputs
10916 `(("python-pytest" ,python-pytest)
10917 ("python-docopt" ,python-docopt)))
10918 (propagated-inputs
10919 `(("python-parso" ,python-parso)))
10920 (home-page "https://github.com/davidhalter/jedi")
10921 (synopsis "Autocompletion and static analysis library for Python")
10922 (description
10923 "Jedi is a static analysis tool for Python that can be used in Integrated
10924 Development Environments (@dfn{IDE}s) and text editors. It understands Python
10925 on a deeper level than many other static analysis frameworks for Python.
10926
10927 Jedi understands docstrings and you can use Jedi autocompletion in your REPL as
10928 well.")
10929 (license license:expat)))
10930
10931 (define-public python2-jedi
10932 (package-with-python2 python-jedi))
10933
10934 (define-public ptpython
10935 (package
10936 (name "ptpython")
10937 (version "0.34")
10938 (source (origin
10939 (method url-fetch)
10940 (uri (pypi-uri "ptpython" version))
10941 (sha256
10942 (base32
10943 "1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
10944 (build-system python-build-system)
10945 (arguments
10946 '(#:tests? #f)) ; FIXME: No tests in pypi tarball.
10947 (propagated-inputs
10948 `(("python-docopt" ,python-docopt)
10949 ("python-jedi" ,python-jedi)
10950 ("python-prompt-toolkit" ,python-prompt-toolkit)
10951 ("python-pygments" ,python-pygments)))
10952 (home-page "https://github.com/jonathanslenders/ptpython")
10953 (synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
10954 (description
10955 "ptpython is a Python read-eval-print loop with IDE-like features.
10956 It supports syntax highlighting, multiline editing, autocompletion, mouse,
10957 color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
10958 etc.")
10959 (license license:bsd-3)
10960 (properties `((python2-variant . ,(delay ptpython-2))))))
10961
10962 (define-public ptpython-2
10963 (let ((base (package-with-python2 (strip-python2-variant ptpython))))
10964 (package
10965 (inherit base)
10966 (name "ptpython2"))))
10967
10968 (define-public python-stem
10969 (package
10970 (name "python-stem")
10971 (version "1.7.1")
10972 (source
10973 (origin
10974 (method url-fetch)
10975 (uri (pypi-uri "stem" version))
10976 (sha256
10977 (base32
10978 "18lc95pmc7i089nlsb06dsxyjl5wbhxfqgdxbjcia35ndh8z7sn9"))))
10979 (build-system python-build-system)
10980 (arguments
10981 `(#:phases
10982 (modify-phases %standard-phases
10983 (replace 'check
10984 (lambda _
10985 (invoke "./run_tests.py" "--unit")
10986 #t)))))
10987 (native-inputs
10988 `(("python-mock" ,python-mock)
10989 ("python-pycodestyle" ,python-pycodestyle)
10990 ("python-pyflakes" ,python-pyflakes)))
10991 (home-page "https://stem.torproject.org/")
10992 (synopsis
10993 "Python controller library that allows applications to interact with Tor")
10994 (description
10995 "Stem is a Python controller library for Tor. With it you can use Tor's
10996 control protocol to script against the Tor process and read descriptor data
10997 relays publish about themselves.")
10998 (license license:lgpl3)))
10999
11000 (define-public python2-stem
11001 (package-with-python2 python-stem))
11002
11003 (define-public python-pyserial
11004 (package
11005 (name "python-pyserial")
11006 (version "3.4")
11007 (source
11008 (origin
11009 (method url-fetch)
11010 (uri (pypi-uri "pyserial" version))
11011 (sha256
11012 (base32
11013 "09y68bczw324a4jb9a1cfwrbjhq179vnfkkkrybbksp0vqgl0bbf"))))
11014 (build-system python-build-system)
11015 (arguments
11016 '(#:tests? #f)) ; FIXME: 3/49 tests are failing.
11017 ;; #:phases
11018 ;; (modify-phases %standard-phases
11019 ;; (replace 'check
11020 ;; (lambda _
11021 ;; (zero? (system* "python" "test/run_all_tests.py" "loop://")))))))
11022 (home-page
11023 "https://github.com/pyserial/pyserial")
11024 (synopsis "Python Serial Port Bindings")
11025 (description "@code{pyserial} provide serial port bindings for Python. It
11026 supports different byte sizes, stop bits, parity and flow control with RTS/CTS
11027 and/or Xon/Xoff. The port is accessed in RAW mode.")
11028 (license license:bsd-3)))
11029
11030 (define-public python2-pyserial
11031 (package-with-python2 python-pyserial))
11032
11033 (define-public python-kivy
11034 (package
11035 (name "python-kivy")
11036 (version "1.10.1")
11037 (source
11038 (origin
11039 (method url-fetch)
11040 (uri (pypi-uri "Kivy" version))
11041 (file-name (string-append name "-" version ".tar.gz"))
11042 (sha256
11043 (base32
11044 "1zzxjdp78hfjjiklzr82l4zwibwcq4j6kgicspqs6iyyfn5yisbw"))))
11045 (build-system python-build-system)
11046 (arguments
11047 `(#:tests? #f ; Tests require many optional packages
11048 #:phases
11049 (modify-phases %standard-phases
11050 (add-after 'patch-generated-file-shebangs 'set-sdl-paths
11051 (lambda* (#:key inputs #:allow-other-keys)
11052 (setenv "KIVY_SDL2_PATH"
11053 (string-append (assoc-ref inputs "sdl-union")
11054 "/include/SDL2"))
11055 #t)))))
11056 (native-inputs
11057 `(("git" ,git)
11058 ("pkg-config" ,pkg-config)
11059 ("python-cython" ,python-cython)))
11060 (inputs
11061 `(("gstreamer" ,gstreamer)
11062 ("mesa" ,mesa)
11063 ("sdl-union"
11064 ,(sdl-union (list sdl2 sdl2-image sdl2-mixer sdl2-ttf)))))
11065 (home-page "http://kivy.org")
11066 (synopsis
11067 "Multitouch application framework")
11068 (description
11069 "A software library for rapid development of
11070 hardware-accelerated multitouch applications.")
11071 (license license:expat)))
11072
11073 (define-public python2-kivy
11074 (package-with-python2 python-kivy))
11075
11076 (define-public python-kivy-next
11077 (deprecated-package "python-kivy-next" python-kivy))
11078
11079 (define-public python2-kivy-next
11080 (deprecated-package "python2-kivy-next" python2-kivy))
11081
11082 (define-public python-binaryornot
11083 (package
11084 (name "python-binaryornot")
11085 (version "0.4.4")
11086 (source (origin
11087 (method url-fetch)
11088 (uri (pypi-uri "binaryornot" version))
11089 (sha256
11090 (base32
11091 "0qc006986rb6bcbmiymwgcl1mns2jphr1j7sr7nk41nlr7gh359m"))))
11092 (build-system python-build-system)
11093 (arguments
11094 `(#:phases
11095 (modify-phases %standard-phases
11096 (add-after 'unpack 'patch-tests
11097 (lambda _
11098 ;; TypeError: binary() got an unexpected keyword argument
11099 ;; 'average_size'.
11100 (substitute* "tests/test_check.py"
11101 (("average_size=512") ""))
11102 #t)))))
11103 (propagated-inputs
11104 `(("python-chardet" ,python-chardet)
11105 ("python-hypothesis" ,python-hypothesis)))
11106 (home-page "https://github.com/audreyr/binaryornot")
11107 (synopsis "Package to check if a file is binary or text")
11108 (description "Ultra-lightweight pure Python package to check if a file is
11109 binary or text.")
11110 (license license:bsd-3)
11111 (properties `((python2-variant . ,(delay python2-binaryornot))))))
11112
11113 (define-public python2-binaryornot
11114 (let ((base (package-with-python2 (strip-python2-variant python-binaryornot))))
11115 (package (inherit base)
11116 (propagated-inputs
11117 `(("python2-enum34" ,python2-enum34)
11118 ,@(package-propagated-inputs base))))))
11119
11120 (define-public python-binwalk
11121 (let ((commit "64201acfb5b0a9cdd9faa58c40a36dcff8612e29")
11122 (revision "0"))
11123 (package
11124 (name "python-binwalk")
11125 (version (git-version "2.1.1" revision commit))
11126 (source
11127 (origin
11128 (method git-fetch)
11129 (uri (git-reference
11130 (url "https://github.com/ReFirmLabs/binwalk")
11131 (commit commit)))
11132 (file-name (git-file-name name version))
11133 (sha256
11134 (base32
11135 "1z7ca6rfp887hw5jc3sb45mm4fa0xid4lsp2z8g4r590dr7k7w15"))))
11136 (build-system python-build-system)
11137 (arguments
11138 `(#:phases
11139 (modify-phases %standard-phases
11140 (add-before 'check 'set-pythonpath
11141 (lambda _
11142 (setenv "PYTHONPATH"
11143 (string-append
11144 (getcwd) "/src/"
11145 ":" (getenv "PYTHONPATH")))
11146 (setenv "HOME" "")
11147 #t)))))
11148 (native-inputs
11149 `(("python-coverage" ,python-coverage)
11150 ("python-nose" ,python-nose)))
11151 (home-page "https://github.com/ReFirmLabs/binwalk")
11152 (synopsis "Firmware analysis tool")
11153 (description "Binwalk is a tool for analyzing, reverse engineering, and extracting firmware images")
11154 (license license:expat))))
11155
11156 (define-public python-nltk
11157 (package
11158 (name "python-nltk")
11159 (version "3.2.1")
11160 (source (origin
11161 (method url-fetch)
11162 (uri (pypi-uri "nltk" version))
11163 (sha256
11164 (base32
11165 "0skxbhnymwlspjkzga0f7x1hg3y50fwpfghs8g8k7fh6f4nknlym"))))
11166 (build-system python-build-system)
11167 (arguments
11168 '(;; The tests require some extra resources to be downloaded.
11169 ;; TODO Try packaging these resources.
11170 #:tests? #f))
11171 (home-page "http://nltk.org/")
11172 (synopsis "Natural Language Toolkit")
11173 (description "It provides interfaces to over 50 corpora and lexical
11174 resources such as WordNet, along with a suite of text processing libraries
11175 for classification, tokenization, stemming, tagging, parsing, and semantic
11176 reasoning, wrappers for natural language processing libraries.")
11177 (license license:asl2.0)))
11178
11179 (define-public python2-nltk
11180 (package-with-python2 python-nltk))
11181
11182 (define-public python-pymongo
11183 (package
11184 (name "python-pymongo")
11185 (version "3.7.2")
11186 (source (origin
11187 (method url-fetch)
11188 (uri (pypi-uri "pymongo" version))
11189 (sha256
11190 (base32
11191 "0zis4707r9hdg5qgkhp3wss9camr9h56ixyfc8n9dxwlnnly4x4c"))))
11192 (build-system python-build-system)
11193 (propagated-inputs
11194 `(("python-certifi" ,python-certifi)))
11195 (home-page "https://github.com/mongodb/mongo-python-driver")
11196 (synopsis "Python driver for MongoDB")
11197 (description "Python driver for MongoDB.")
11198 (license license:asl2.0)))
11199
11200 (define-public python2-pymongo
11201 (package-with-python2 python-pymongo))
11202
11203 (define-public python-consul
11204 (package
11205 (name "python-consul")
11206 (version "0.6.1")
11207 (source
11208 (origin
11209 (method url-fetch)
11210 (uri (pypi-uri "python-consul" version))
11211 (sha256
11212 (base32
11213 "0rfyxcy4cr3x848vhx876ifalxd5ghq6l5x813m49h4vq2d4jiq8"))))
11214 (build-system python-build-system)
11215 (arguments
11216 '(#:tests? #f)) ; The tests are not distributed
11217 (propagated-inputs
11218 `(("python-requests" ,python-requests)
11219 ("python-six" ,python-six)))
11220 (home-page "https://github.com/cablehead/python-consul")
11221 (synopsis "Python client for Consul")
11222 (description
11223 "Python client for @url{http://www.consul.io/,Consul}, a tool for service
11224 discovery, monitoring and configuration.")
11225 (license license:expat)))
11226
11227 (define-public python2-consul
11228 (package-with-python2 python-consul))
11229
11230 (define-public python-schematics
11231 (package
11232 (name "python-schematics")
11233 (version "1.1.1")
11234 (source
11235 (origin
11236 (method git-fetch)
11237 (uri (git-reference
11238 (url "https://github.com/schematics/schematics.git")
11239 (commit (string-append "v" version))))
11240 (file-name (git-file-name name version))
11241 (sha256
11242 (base32 "0xdqskycznqc7mfp60bhw1zq8wx7yx1dvmbq3brnm1dx3xnqa0zd"))))
11243 (build-system python-build-system)
11244 (propagated-inputs
11245 `(("python-six" ,python-six)))
11246 (arguments
11247 ;; The tests require a bunch of not very nice packages with fixed
11248 ;; version requirements (e.g. python-coveralls).
11249 `(#:tests? #f))
11250 (home-page "https://github.com/schematics/schematics")
11251 (synopsis "Python Data Structures for Humans")
11252 (description "Python Data Structures for Humans.")
11253 (license license:bsd-3)))
11254
11255 (define-public python2-schematics
11256 (package-with-python2 python-schematics))
11257
11258 (define-public python-odfpy
11259 (package
11260 (name "python-odfpy")
11261 (version "1.3.3")
11262 (source (origin
11263 (method url-fetch)
11264 (uri (pypi-uri "odfpy" version))
11265 (sha256
11266 (base32
11267 "1a6ms0w9zfhhkqhvrnynwwbxrivw6hgjc0s5k7j06npc7rq0blxw"))))
11268 (arguments
11269 `(#:modules ((srfi srfi-1)
11270 (guix build python-build-system)
11271 (guix build utils))
11272 #:phases
11273 (modify-phases %standard-phases
11274 (replace 'check
11275 ;; The test runner invokes python2 and python3 for test*.py.
11276 ;; To avoid having both in inputs, we replicate it here.
11277 (lambda _
11278 (for-each (lambda (test-file) (invoke "python" test-file))
11279 (find-files "tests" "^test.*\\.py$"))
11280 #t)))))
11281 (build-system python-build-system)
11282 (home-page "https://github.com/eea/odfpy")
11283 (synopsis "Python API and tools to manipulate OpenDocument files")
11284 (description "Collection of libraries and utility programs written in
11285 Python to manipulate OpenDocument 1.2 files.")
11286 (license
11287 ;; The software is mainly dual GPL2+ and ASL2.0, but includes a
11288 ;; number of files with other licenses.
11289 (list license:gpl2+ license:asl2.0 license:lgpl2.1+ license:cc-by-sa3.0))))
11290
11291 (define-public python2-odfpy
11292 (package-with-python2 python-odfpy))
11293
11294 (define-public python-natsort
11295 (package
11296 (name "python-natsort")
11297 (version "5.4.1")
11298 (source (origin
11299 (method url-fetch)
11300 (uri (pypi-uri "natsort" version))
11301 (sha256
11302 (base32
11303 "0i732amg6yzkx4g4c9j09jmqq39q377x9cl2nbkm5hax2c2v0wxf"))))
11304 (build-system python-build-system)
11305 (arguments
11306 `(#:modules ((guix build utils)
11307 (guix build python-build-system)
11308 (srfi srfi-1)
11309 (srfi srfi-26)
11310 (ice-9 ftw))
11311 #:phases
11312 (modify-phases %standard-phases
11313 (add-before 'check 'set-cachedir
11314 ;; Tests require write access to $HOME by default
11315 (lambda _ (setenv "PYTHON_EGG_CACHE" "/tmp") #t))
11316 (replace 'check
11317 (lambda _
11318 (let ((cwd (getcwd)))
11319 (setenv "PYTHONPATH"
11320 (string-append
11321 cwd "/build/"
11322 (find (cut string-prefix? "lib" <>)
11323 (scandir (string-append cwd "/build")))
11324 ":"
11325 (getenv "PYTHONPATH")))
11326 (invoke "pytest" "-v")))))))
11327 (native-inputs
11328 `(("python-hypothesis" ,python-hypothesis)
11329 ("python-pytest-cov" ,python-pytest-cov)
11330 ("python-pytest-mock" ,python-pytest-mock)
11331 ("python-pytest" ,python-pytest)))
11332 (propagated-inputs ; TODO: Add python-fastnumbers.
11333 `(("python-pyicu" ,python-pyicu)))
11334 (home-page "https://github.com/SethMMorton/natsort")
11335 (synopsis "Natural sorting for python and shell")
11336 (description
11337 "Natsort lets you apply natural sorting on lists instead of
11338 lexicographical. If you use the built-in @code{sorted} method in python
11339 on a list such as @code{[@code{a20}, @code{a9}, @code{a1}, @code{a4},
11340 @code{a10}]}, it would be returned as @code{[@code{a1}, @code{a10}, @code{a20},
11341 @code{a4}, @code{a9}]}. Natsort provides a function @code{natsorted} that
11342 identifies numbers and sorts them separately from strings. It can also sort
11343 version numbers, real numbers, mixed types and more, and comes with a shell
11344 command @command{natsort} that exposes this functionality in the command line.")
11345 (license license:expat)
11346 (properties `((python2-variant . ,(delay python2-natsort))))))
11347
11348 (define-public python2-natsort
11349 (let ((base (package-with-python2 (strip-python2-variant python-natsort))))
11350 (package (inherit base)
11351 (native-inputs
11352 `(("python2-pathlib" ,python2-pathlib)
11353 ,@(package-native-inputs base))))))
11354
11355 (define-public python-glances
11356 (package
11357 (name "python-glances")
11358 (version "3.1.1")
11359 (source
11360 (origin
11361 (method url-fetch)
11362 (uri (pypi-uri "Glances" version))
11363 (sha256
11364 (base32
11365 "07j1ggzsqiskyz1i4mrnyr9i95v0dqi0i0hibnv1l188km8shmi8"))
11366 (modules '((guix build utils)))
11367 (snippet
11368 '(begin
11369 ;; Glances phones PyPI for weekly update checks by default.
11370 ;; Disable these. The user can re-enable them if desired.
11371 (substitute* "glances/outdated.py"
11372 (("^(.*)self\\.load_config\\(config\\)\n" line indentation)
11373 (string-append indentation
11374 "self.args.disable_check_update = True\n"
11375 line)))
11376 #t))))
11377 (build-system python-build-system)
11378 (propagated-inputs
11379 `(("python-future" ,python-future)
11380 ("python-psutil" ,python-psutil)))
11381 (home-page
11382 "https://github.com/nicolargo/glances")
11383 (synopsis "Cross-platform curses-based monitoring tool")
11384 (description
11385 "Glances is a curses-based monitoring tool for a wide variety of platforms.
11386 Glances uses the PsUtil library to get information from your system. It
11387 monitors CPU, load, memory, network bandwidth, disk I/O, disk use, and more.")
11388 (license license:lgpl3+)))
11389
11390 (define-public python2-glances
11391 (package-with-python2 python-glances))
11392
11393 (define-public python-graphql-core
11394 (package
11395 (name "python-graphql-core")
11396 (version "0.5.3")
11397 (source
11398 (origin
11399 (method url-fetch)
11400 (uri (pypi-uri "graphql-core" version))
11401 (sha256
11402 (base32
11403 "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0"))))
11404 (build-system python-build-system)
11405 (arguments
11406 `(#:tests? #f ; Tests require the unpackaged pytest-benchmark.
11407 #:phases
11408 (modify-phases %standard-phases
11409 (add-after 'unpack 'patch-hardcoded-version
11410 (lambda _ (substitute*
11411 "setup.py"
11412 (("'gevent==1.1rc1'") "'gevent'"))
11413 #t)))))
11414 (native-inputs
11415 `(("python-gevent" ,python-gevent)
11416 ("python-mock" ,python-mock)
11417 ("python-pytest-mock" ,python-pytest-mock)))
11418 (propagated-inputs
11419 `(("python-promise" ,python-promise)
11420 ("python-six" ,python-six)))
11421 (home-page "https://github.com/graphql-python/graphql-core")
11422 (synopsis "GraphQL implementation for Python")
11423 (description
11424 "GraphQL implementation for Python. GraphQL is a data query language and
11425 runtime designed and used to request and deliver data to mobile and web apps.
11426 This library is a port of @url{https://github.com/graphql/graphql-js,graphql-js}
11427 to Python.")
11428 (license license:expat)))
11429
11430 (define-public python2-graphql-core
11431 (package-with-python2 python-graphql-core))
11432
11433 (define-public python-graphql-relay
11434 (package
11435 (name "python-graphql-relay")
11436 (version "0.4.5")
11437 (source
11438 (origin
11439 (method url-fetch)
11440 (uri (pypi-uri "graphql-relay" version))
11441 (sha256
11442 (base32
11443 "1nv5dxcj59zv31qvl8bd142njmxcmymny2dz3br1l2cpbljbf5i7"))))
11444 (build-system python-build-system)
11445 (arguments
11446 '(#:tests? #f)) ; The tests are not distributed
11447 (propagated-inputs
11448 `(("python-graphql-core" ,python-graphql-core)
11449 ("python-promise" ,python-promise)
11450 ("python-six" ,python-six)))
11451 (home-page "https://github.com/graphql-python/graphql-relay-py")
11452 (synopsis "Relay implementation for Python")
11453 (description
11454 "This is a library to allow the easy creation of Relay-compliant servers
11455 using the GraphQL Python reference implementation of a GraphQL server. It
11456 should be noted that the code is a exact port of the original
11457 @url{https://github.com/graphql/graphql-relay-js,graphql-relay js implementation}
11458 from Facebook.")
11459 (license license:expat)))
11460
11461 (define-public python2-graphql-relay
11462 (package-with-python2 python-graphql-relay))
11463
11464 (define-public python-graphene
11465 (package
11466 (name "python-graphene")
11467 (version "0.10.2")
11468 (source
11469 (origin
11470 (method url-fetch)
11471 (uri (pypi-uri "graphene" version))
11472 (sha256
11473 (base32
11474 "09zhac7igh9ixdz0ay6csy35b40l1jwbf2wrbxmgxwfhy51iy06q"))))
11475 (build-system python-build-system)
11476 (propagated-inputs
11477 `(("python-graphql-core" ,python-graphql-core)
11478 ("python-graphql-relay" ,python-graphql-relay)
11479 ("python-iso8601" ,python-iso8601)
11480 ("python-promise" ,python-promise)
11481 ("python-six" ,python-six)))
11482 (arguments
11483 `(#:tests? #f)) ; no tests/ in the PyPI tarball
11484 (home-page "http://graphene-python.org/")
11485 (synopsis "GraphQL Framework for Python")
11486 (description
11487 "Graphene is a Python library for building GraphQL schemas/types.
11488 A GraphQL schema describes your data model, and provides a GraphQL server
11489 with an associated set of resolve methods that know how to fetch data.")
11490 (properties `((python2-variant . ,(delay python2-graphene))))
11491 (license license:expat)))
11492
11493 (define-public python2-graphene
11494 (let ((base (package-with-python2
11495 (strip-python2-variant python-graphene))))
11496 (package (inherit base)
11497 (native-inputs
11498 `(("python2-sqlalchemy" ,python2-sqlalchemy)
11499 ,@(package-native-inputs base))))))
11500
11501 (define-public python-nautilus
11502 (package
11503 (name "python-nautilus")
11504 (version "0.4.9")
11505 (source
11506 (origin
11507 (method url-fetch)
11508 (uri (pypi-uri "nautilus" version))
11509 (sha256
11510 (base32
11511 "01hwzjc1zshk4vvxrcghm398fpy4jls66dyz06g07mrwqif8878p"))))
11512 (build-system python-build-system)
11513 (arguments `(#:tests? #f)) ; fails to import test modules
11514 (propagated-inputs
11515 `(("python-bcrypt" ,python-bcrypt)
11516 ("python-click" ,python-click)
11517 ("python-consul" ,python-consul)
11518 ("python-graphene" ,python-graphene)
11519 ("python-jinja2" ,python-jinja2)
11520 ("python-peewee" ,python-peewee)
11521 ("python-pika" ,python-pika)
11522 ("python-tornado" ,python-tornado)
11523 ("python-wtforms" ,python-wtforms)))
11524 (native-inputs
11525 `(("python-nose2" ,python-nose2)))
11526 (home-page "https://github.com/AlecAivazis/nautilus")
11527 (synopsis "Library for creating microservice applications")
11528 (description
11529 "Nautilus is a framework for flux based microservices that looks to
11530 provide extendible implementations of common aspects of a cloud so that you can
11531 focus on building massively scalable web applications.")
11532 (license license:expat)))
11533
11534 (define-public python-snowballstemmer
11535 (package
11536 (name "python-snowballstemmer")
11537 (version "1.2.1")
11538 (source (origin
11539 (method url-fetch)
11540 (uri (pypi-uri "snowballstemmer" version))
11541 (sha256
11542 (base32
11543 "0a0idq4y5frv7qsg2x62jd7rd272749xk4x99misf5rcifk2d7wi"))))
11544 (build-system python-build-system)
11545 (arguments
11546 `(;; No tests exist
11547 #:tests? #f))
11548 (home-page "https://github.com/shibukawa/snowball_py")
11549 (synopsis "Snowball stemming library collection for Python")
11550 (description "This package provides 16 word stemmer algorithms generated
11551 from Snowball algorithms. It includes the 15 original ones plus the Poerter
11552 English stemmer.")
11553 (license license:bsd-3)))
11554
11555 (define-public python2-snowballstemmer
11556 (package-with-python2 python-snowballstemmer))
11557
11558 (define-public python-setproctitle
11559 (package
11560 (name "python-setproctitle")
11561 (version "1.1.10")
11562 (source
11563 (origin
11564 (method url-fetch)
11565 (uri (pypi-uri "setproctitle" version))
11566 (sha256
11567 (base32
11568 "163kplw9dcrw0lffq1bvli5yws3rngpnvrxrzdw89pbphjjvg0v2"))))
11569 (build-system python-build-system)
11570 (arguments
11571 '(#:phases
11572 (modify-phases %standard-phases
11573 (add-before 'check 'patch-Makefile
11574 ;; Stricly this is only required for the python2 variant.
11575 ;; But adding a phase in an inherited package seems to be
11576 ;; cumbersum. So we patch even for python3.
11577 (lambda _
11578 (let ((nose (assoc-ref %build-inputs "python2-nose")))
11579 (when nose
11580 (substitute* "Makefile"
11581 (("\\$\\(PYTHON\\) [^ ]which nosetests[^ ] ")
11582 (string-append nose "/bin/nosetests "))))
11583 #t)))
11584 (replace 'check
11585 (lambda _
11586 (setenv "PYTHON" (or (which "python3") (which "python")))
11587 (setenv "PYCONFIG" (or (which "python3-config")
11588 (which "python-config")))
11589 (setenv "CC" "gcc")
11590 ;; No need to extend PYTHONPATH to find the built package, since
11591 ;; the Makefile will build anyway
11592 (invoke "make" "check"))))))
11593 (native-inputs
11594 `(("procps" ,procps))) ; required for tests
11595 (home-page
11596 "https://github.com/dvarrazzo/py-setproctitle")
11597 (synopsis
11598 "Setproctitle implementation for Python to customize the process title")
11599 (description "The library allows a process to change its title (as displayed
11600 by system tools such as ps and top).
11601
11602 Changing the title is mostly useful in multi-process systems, for
11603 example when a master process is forked: changing the children's title
11604 allows to identify the task each process is busy with. The technique
11605 is used by PostgreSQL and the OpenSSH Server for example.")
11606 (license license:bsd-3)
11607 (properties `((python2-variant . ,(delay python2-setproctitle))))))
11608
11609 (define-public python2-setproctitle
11610 (let ((base (package-with-python2
11611 (strip-python2-variant python-setproctitle))))
11612 (package
11613 (inherit base)
11614 (native-inputs `(("python2-nose" ,python2-nose)
11615 ,@(package-native-inputs base))))))
11616
11617 (define-public python-validictory
11618 (package
11619 (name "python-validictory")
11620 (version "1.0.1")
11621 (source
11622 (origin
11623 (method url-fetch)
11624 (uri (pypi-uri "validictory" version))
11625 (sha256
11626 (base32
11627 "1zf1g9sw47xzp5f80bd94pb42j9yqv82lcrgcvdwr6nkaphfi37q"))))
11628 (build-system python-build-system)
11629 (arguments
11630 '(#:phases
11631 (modify-phases %standard-phases
11632 (add-after 'unpack 'bootstrap
11633 ;; Move the tests out of the package directory to avoid
11634 ;; packaging them.
11635 (lambda* _
11636 (rename-file "validictory/tests" "tests")
11637 (delete-file "tests/__init__.py")))
11638 (replace 'check
11639 (lambda _
11640 ;; Extend PYTHONPATH so the built package will be found.
11641 (setenv "PYTHONPATH"
11642 (string-append (getcwd) "/build/lib:"
11643 (getenv "PYTHONPATH")))
11644 (invoke "py.test" "-vv" ))))))
11645 (native-inputs
11646 `(("python-pytest" ,python-pytest)))
11647 (home-page
11648 "https://github.com/jamesturk/validictory")
11649 (synopsis "General purpose Python data validator")
11650 (description "It allows validation of arbitrary Python data structures.
11651
11652 The schema format is based on the JSON Schema
11653 proposal (http://json-schema.org), so combined with json the library is also
11654 useful as a validator for JSON data.")
11655 (license license:expat)))
11656
11657 (define-public python2-validictory
11658 (package-with-python2 python-validictory))
11659
11660 (define-public python-pyelftools
11661 (package
11662 (name "python-pyelftools")
11663 (version "0.25")
11664 (source
11665 (origin
11666 (method url-fetch)
11667 (uri (pypi-uri "pyelftools" version))
11668 (sha256
11669 (base32
11670 "090vdksbz341f7ljvr0zswblw4lspa8qaiikzyjkf318arpxmil9"))))
11671 (build-system python-build-system)
11672 (arguments
11673 `(#:phases
11674 (modify-phases %standard-phases
11675 (add-before 'check 'set-pythonpath
11676 (lambda _
11677 (setenv "PYTHONPATH"
11678 (string-append
11679 (getcwd) "/test/"
11680 ":" (getenv "PYTHONPATH")))
11681 #t)))))
11682 (home-page
11683 "https://github.com/eliben/pyelftools")
11684 (synopsis
11685 "Analyze binary and library file information")
11686 (description "This Python library provides interfaces for parsing and
11687 analyzing two binary and library file formats; the Executable and Linking
11688 Format (ELF), and debugging information in the Debugging With Attributed
11689 Record Format (DWARF).")
11690 (license license:public-domain)))
11691
11692 (define-public python-pyev
11693 (package
11694 (name "python-pyev")
11695 (version "0.9.0")
11696 (source
11697 (origin
11698 (method url-fetch)
11699 (uri (pypi-uri "pyev" version))
11700 (sha256
11701 (base32
11702 "0rf603lc0s6zpa1nb25vhd8g4y337wg2wyz56i0agsdh7jchl0sx"))))
11703 (build-system python-build-system)
11704 (arguments
11705 `(#:tests? #f ; no test suite
11706 #:phases
11707 (modify-phases %standard-phases
11708 (add-after 'unpack 'patch
11709 (lambda* (#:key inputs #:allow-other-keys)
11710 (let ((libev (string-append (assoc-ref inputs "libev")
11711 "/lib/libev.so.4")))
11712 (substitute* "setup.py"
11713 (("libev_dll_name = find_library\\(\\\"ev\\\"\\)")
11714 (string-append "libev_dll_name = \"" libev "\"")))))))))
11715 (inputs
11716 `(("libev" ,libev)))
11717 (home-page "http://pythonhosted.org/pyev/")
11718 (synopsis "Python libev interface")
11719 (description "Pyev provides a Python interface to libev.")
11720 (license license:gpl3)))
11721
11722 (define-public python2-pyev
11723 (package-with-python2 python-pyev))
11724
11725 (define-public python-imagesize
11726 (package
11727 (name "python-imagesize")
11728 (version "1.1.0")
11729 (source
11730 (origin
11731 (method url-fetch)
11732 (uri (pypi-uri "imagesize" version))
11733 (sha256
11734 (base32
11735 "1dg3wn7qpwmhgqc0r9na2ding1wif9q5spz3j9zn2riwphc2k0zk"))))
11736 (build-system python-build-system)
11737 (home-page "https://github.com/shibukawa/imagesize_py")
11738 (synopsis "Gets image size of files in various formats in Python")
11739 (description
11740 "This package allows determination of image size from
11741 PNG, JPEG, JPEG2000 and GIF files in pure Python.")
11742 (license license:expat)))
11743
11744 (define-public python2-imagesize
11745 (package-with-python2 python-imagesize))
11746
11747 (define-public python-termstyle
11748 (package
11749 (name "python-termstyle")
11750 (version "0.1.11")
11751 (source
11752 (origin
11753 (method url-fetch)
11754 (uri (pypi-uri "termstyle" version))
11755 (sha256
11756 (base32
11757 "17wzkkcqy5zc0g68xlad3kcv66iw14d2pwqc0h9420gak0vbhx7g"))))
11758 (build-system python-build-system)
11759 (arguments
11760 '(#:phases
11761 (modify-phases %standard-phases
11762 (replace 'check
11763 (lambda _
11764 (invoke "python" "test3.py"))))))
11765 (home-page "https://github.com/gfxmonk/termstyle")
11766 (synopsis "Console text coloring for Python")
11767 (description "This package provides console text coloring for Python.")
11768 (license license:bsd-3)))
11769
11770 (define-public python-argcomplete
11771 (package
11772 (name "python-argcomplete")
11773 (version "1.10.3")
11774 (source
11775 (origin
11776 (method url-fetch)
11777 (uri (pypi-uri "argcomplete" version))
11778 (sha256
11779 (base32
11780 "02jkc44drb0yjz6x28lvg6rj607n8r2irdpdvyylm8xnycn54zx3"))))
11781 (build-system python-build-system)
11782 (arguments
11783 `(#:phases
11784 (modify-phases %standard-phases
11785 (add-after 'unpack 'embed-tool-references
11786 (lambda _
11787 (substitute* "argcomplete/bash_completion.d/python-argcomplete.sh"
11788 ((" grep")
11789 (string-append " " (which "grep")))
11790 ((" egrep")
11791 (string-append " " (which "egrep")))
11792 (("elif which")
11793 (string-append "elif " (which "which")))
11794 (("\\$\\(which")
11795 (string-append "$(" (which "which"))))
11796 #t)))))
11797 (inputs
11798 `(("grep" ,grep)
11799 ("which" ,which)))
11800 (native-inputs
11801 `(("python-coverage" ,python-coverage)
11802 ("python-flake8" ,python-flake8)
11803 ("python-pexpect" ,python-pexpect)
11804 ("python-wheel" ,python-wheel)
11805 ("tcsh" ,tcsh)
11806 ("fish" ,fish)
11807 ("bash-full" ,bash))) ;full Bash for 'test_file_completion'
11808 (home-page "https://github.com/kislyuk/argcomplete")
11809 (synopsis "Shell tab completion for Python argparse")
11810 (description "argcomplete provides extensible command line tab completion
11811 of arguments and options for Python scripts using @code{argparse}. It's
11812 particularly useful for programs with many options or sub-parsers that can
11813 dynamically suggest completions; for example, when browsing resources over the
11814 network.")
11815 (license license:asl2.0)))
11816
11817 (define-public python2-argcomplete
11818 (package-with-python2 python-argcomplete))
11819
11820 (define-public python-xopen
11821 (package
11822 (name "python-xopen")
11823 (version "0.5.0")
11824 (source
11825 (origin
11826 (method url-fetch)
11827 (uri (pypi-uri "xopen" version))
11828 (sha256
11829 (base32
11830 "17xbrgi23l87yg6h0qcknssp2q812miiy33qw6v45v5gx0jwv5xh"))))
11831 (build-system python-build-system)
11832 (propagated-inputs
11833 `(("python-setuptools-scm" ,python-setuptools-scm)))
11834 (home-page "https://github.com/marcelm/xopen/")
11835 (synopsis "Open compressed files transparently")
11836 (description "This module provides an @code{xopen} function that works like
11837 Python's built-in @code{open} function, but can also deal with compressed files.
11838 Supported compression formats are gzip, bzip2 and, xz, and are automatically
11839 recognized by their file extensions. The focus is on being as efficient as
11840 possible on all supported Python versions.")
11841 (license license:expat)))
11842
11843 (define-public python2-xopen
11844 (let ((base (package-with-python2
11845 (strip-python2-variant python-xopen))))
11846 (package
11847 (inherit base)
11848 (propagated-inputs `(("python2-bz2file" ,python2-bz2file)
11849 ,@(package-propagated-inputs base))))))
11850
11851 (define-public python-cheetah
11852 (package
11853 (name "python-cheetah")
11854 (version "3.1.0")
11855 (source
11856 (origin
11857 (method url-fetch)
11858 (uri (pypi-uri "Cheetah3" version))
11859 (sha256
11860 (base32
11861 "1ihag9cxll6b86fc8v5lkhmr3brdbi4yiz16zpgw79yylmv8fgr9"))))
11862 (build-system python-build-system)
11863 (arguments
11864 `(#:modules ((guix build utils)
11865 (guix build python-build-system)
11866 (ice-9 ftw)
11867 (srfi srfi-1)
11868 (srfi srfi-26))
11869 #:phases (modify-phases %standard-phases
11870 (add-after 'unpack 'use-absolute-python
11871 (lambda _
11872 (substitute* "Cheetah/CheetahWrapper.py"
11873 (("#!/usr/bin/env python")
11874 (string-append "#!" (which "python"))))
11875 #t))
11876 (replace 'check
11877 (lambda _
11878 (let ((cwd (getcwd)))
11879 (setenv "PYTHONPATH"
11880 (string-append
11881 cwd "/build/"
11882 (find (cut string-prefix? "lib" <>)
11883 (scandir (string-append cwd "/build")))
11884 ":" (getenv "PYTHONPATH")))
11885 (setenv "PATH"
11886 (string-append (getenv "PATH")
11887 ":" cwd "/bin"))
11888 (setenv "TMPDIR" "/tmp")
11889
11890 (substitute* "Cheetah/Tests/Test.py"
11891 (("unittest.TextTestRunner\\(\\)")
11892 "unittest.TextTestRunner(verbosity=2)"))
11893
11894 (invoke "python" "Cheetah/Tests/Test.py")))))))
11895 (propagated-inputs
11896 `(("python-markdown" ,python-markdown))) ;optional
11897 (home-page "http://cheetahtemplate.org/")
11898 (synopsis "Template engine")
11899 (description "Cheetah is a text-based template engine and Python code
11900 generator.
11901
11902 Cheetah can be used as a standalone templating utility or referenced as
11903 a library from other Python applications. It has many potential uses,
11904 but web developers looking for a viable alternative to ASP, JSP, PHP and
11905 PSP are expected to be its principle user group.
11906
11907 Features:
11908 @enumerate
11909 @item Generates HTML, SGML, XML, SQL, Postscript, form email, LaTeX, or any other
11910 text-based format.
11911 @item Cleanly separates content, graphic design, and program code.
11912 @item Blends the power and flexibility of Python with a simple template language
11913 that non-programmers can understand.
11914 @item Gives template writers full access to any Python data structure, module,
11915 function, object, or method in their templates.
11916 @item Makes code reuse easy by providing an object-orientated interface to
11917 templates that is accessible from Python code or other Cheetah templates.
11918 One template can subclass another and selectively reimplement sections of it.
11919 @item Provides a simple, yet powerful, caching mechanism that can dramatically
11920 improve the performance of a dynamic website.
11921 @item Compiles templates into optimized, yet readable, Python code.
11922 @end enumerate")
11923 (license (license:x11-style "file://LICENSE"))))
11924
11925 (define-public python2-cheetah
11926 (package-with-python2 python-cheetah))
11927
11928 (define-public python-dulwich
11929 (package
11930 (name "python-dulwich")
11931 (version "0.18.6")
11932 (source
11933 (origin
11934 (method url-fetch)
11935 (uri (list (string-append "https://www.dulwich.io/releases/"
11936 "dulwich-" version ".tar.gz")
11937 (pypi-uri "dulwich" version)))
11938 (sha256
11939 (base32
11940 "1aa1xfrxkc3j9s4xi0llhf5gndyi9ryprcxsqfa5fcb8ph34981q"))))
11941 (build-system python-build-system)
11942 (arguments
11943 `(#:phases
11944 (modify-phases %standard-phases
11945 (add-before 'check 'fix-tests
11946 (lambda* (#:key inputs #:allow-other-keys)
11947 ;; The tests use Popen with a custom environment which doesn't
11948 ;; include PATH.
11949 (substitute* "dulwich/tests/compat/utils.py"
11950 (("'git'") (string-append "'"
11951 (which "git")
11952 "'")))
11953 (substitute* '("dulwich/tests/test_repository.py"
11954 "dulwich/tests/test_hooks.py")
11955 (("#!/bin/sh") (string-append "#!" (which "sh"))))
11956 (setenv "TEST_RUNNER" "unittest")
11957 (setenv "PYTHONHASHSEED" "random")
11958 #t)))))
11959 (propagated-inputs
11960 `(("python-fastimport" ,python-fastimport)))
11961 (native-inputs
11962 `(("python-mock" ,python-mock)
11963 ("python-geventhttpclient" ,python-geventhttpclient)
11964 ("git" ,git)))
11965 (home-page "https://www.dulwich.io/")
11966 (synopsis "Git implementation in Python")
11967 (description "Dulwich is an implementation of the Git file formats and
11968 protocols written in pure Python.")
11969 ;; Can be used with either license.
11970 (license (list license:asl2.0 license:gpl2+))))
11971
11972 (define-public python2-dulwich
11973 (package-with-python2 python-dulwich))
11974
11975 (define-public python-pbkdf2
11976 (package
11977 (name "python-pbkdf2")
11978 (version "1.3")
11979 (source
11980 (origin
11981 (method url-fetch)
11982 (uri (pypi-uri "pbkdf2" version))
11983 (sha256
11984 (base32
11985 "0yb99rl2mbsaamj571s1mf6vgniqh23v98k4632150hjkwv9fqxc"))))
11986 (build-system python-build-system)
11987 (arguments
11988 '(#:phases
11989 (modify-phases %standard-phases
11990 (replace 'check
11991 (lambda _
11992 (setenv "PYTHONPATH"
11993 (string-append (getcwd) "/build/lib:"
11994 (getenv "PYTHONPATH")))
11995 (invoke "python" "test/test_pbkdf2.py"))))))
11996 (propagated-inputs
11997 `(("python-pycrypto" ,python-pycrypto))) ; optional
11998 (home-page "https://www.dlitz.net/software/python-pbkdf2/")
11999 (synopsis "Password-based key derivation")
12000 (description "This module implements the password-based key derivation
12001 function, PBKDF2, specified in RSA PKCS#5 v2.0.
12002
12003 PKCS#5 v2.0 Password-Based Key Derivation is a key derivation function which
12004 is part of the RSA Public Key Cryptography Standards series. The provided
12005 implementation takes a password or a passphrase and a salt value (and
12006 optionally a iteration count, a digest module, and a MAC module) and provides
12007 a file-like object from which an arbitrarly-sized key can be read.")
12008 (license license:expat)))
12009
12010 (define-public python2-pbkdf2
12011 (package-with-python2 python-pbkdf2))
12012
12013 (define-public python-qrcode
12014 (package
12015 (name "python-qrcode")
12016 (version "6.1")
12017 (source
12018 (origin
12019 (method url-fetch)
12020 (uri (pypi-uri "qrcode" version))
12021 (sha256
12022 (base32 "0sa3n298b9jpz6zn0birnjii3mg9sihjq28n9nzjlzv09y2m6ljh"))))
12023 (build-system python-build-system)
12024 (arguments
12025 ;; FIXME: Tests require packaging 'pymaging'.
12026 '(#:tests? #f))
12027 (propagated-inputs
12028 `(("python-lxml" ,python-lxml) ; for SVG output
12029 ("python-pillow" ,python-pillow) ; for PNG output
12030 ("python-six" ,python-six)))
12031 (home-page "https://github.com/lincolnloop/python-qrcode")
12032 (synopsis "QR Code image generator")
12033 (description "This package provides a pure Python QR Code generator
12034 module. It uses the Python Imaging Library (PIL) to allow for the generation
12035 of QR Codes.
12036
12037 In addition this package provides a command line tool to generate QR codes and
12038 either write these QR codes to a file or do the output as ascii art at the
12039 console.")
12040 (license license:bsd-3)))
12041
12042 (define-public python2-qrcode
12043 (package-with-python2 python-qrcode))
12044
12045 (define-public python-rst2ansi
12046 (package
12047 (name "python-rst2ansi")
12048 (version "0.1.5")
12049 (source
12050 (origin
12051 (method url-fetch)
12052 (uri (pypi-uri "rst2ansi" version))
12053 (sha256
12054 (base32
12055 "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv"))))
12056 (build-system python-build-system)
12057 (propagated-inputs
12058 `(("python-docutils" ,python-docutils)))
12059 (home-page "https://github.com/Snaipe/python-rst-to-ansi")
12060 (synopsis "Convert RST to ANSI-decorated console output")
12061 (description
12062 "Python module dedicated to rendering RST (reStructuredText) documents
12063 to ansi-escaped strings suitable for display in a terminal.")
12064 (license license:expat)))
12065
12066 (define-public python-ansi2html
12067 (package
12068 (name "python-ansi2html")
12069 (version "1.2.0")
12070 (source
12071 (origin
12072 (method url-fetch)
12073 (uri (pypi-uri "ansi2html" version))
12074 (sha256
12075 (base32
12076 "1wa00zffprb78w1mqq90dk47czz1knanys2a40zbw2vyapd5lp9y"))))
12077 (build-system python-build-system)
12078 (native-inputs
12079 `(("python-mock" ,python-mock)
12080 ("python-nose" ,python-nose)))
12081 (propagated-inputs
12082 `(("python-six" ,python-six)))
12083 (home-page "https://github.com/ralphbean/ansi2html")
12084 (synopsis "Convert ANSI-decorated console output to HTML")
12085 (description
12086 "@command{ansi2html} is a Python library and command line utility for
12087 convering text with ANSI color codes to HTML or LaTeX.")
12088 (license license:gpl3+)))
12089
12090 (define-public python2-ansi2html
12091 (package-with-python2 python-ansi2html))
12092
12093 (define-public python-ddt
12094 (package
12095 (name "python-ddt")
12096 (version "1.1.3")
12097 (source
12098 (origin
12099 (method url-fetch)
12100 (uri (pypi-uri "ddt" version))
12101 (sha256
12102 (base32
12103 "1lw17420iimhghkgzgax85nn8d1an2d6k2cfvb7j5kwn2dqlr1vk"))))
12104 (build-system python-build-system)
12105 (native-inputs
12106 `(("python-mock" ,python-mock)
12107 ("python-nose" ,python-nose)))
12108 (propagated-inputs
12109 `(("python-six" ,python-six)
12110 ("python-pyyaml" ,python-pyyaml)))
12111 (home-page "https://github.com/txels/ddt")
12112 (synopsis "Data-Driven Tests")
12113 (description
12114 "Data-Driven Tests (@dfn{DDT}) allow you to multiply one test case by
12115 running it with different test data, and make it appear as multiple test
12116 cases.")
12117 (license license:expat)))
12118
12119 (define-public python2-ddt
12120 (package-with-python2 python-ddt))
12121
12122 (define-public python-pycountry
12123 (package
12124 (name "python-pycountry")
12125 (version "18.5.26")
12126 (source
12127 (origin
12128 (method url-fetch)
12129 (uri (pypi-uri "pycountry" version))
12130 (sha256
12131 (base32
12132 "15q9j047s3yc9cfcxq1ch8b71f81na44cr6dydd5gxk0ki9a4akz"))))
12133 (build-system python-build-system)
12134 (home-page "https://bitbucket.org/flyingcircus/pycountry")
12135 (synopsis "ISO databases for languages, countries, currencies, etc.")
12136 (description
12137 "@code{pycountry} provides the ISO databases for the standards:
12138 @enumerate
12139 @item 639-3 (Languages)
12140 @item 3166 (Countries)
12141 @item 3166-3 (Deleted Countries)
12142 @item 3166-2 (Subdivisions of countries)
12143 @item 4217 (Currencies)
12144 @item 15924 (Scripts)
12145 @end enumerate
12146 It includes a copy from Debian’s pkg-isocodes and makes the data accessible
12147 through a Python API.")
12148 (license license:lgpl2.1+)))
12149
12150 (define-public python2-pycountry
12151 (package-with-python2 python-pycountry))
12152
12153 (define-public python-pycosat
12154 (package
12155 (name "python-pycosat")
12156 (version "0.6.1")
12157 (source
12158 (origin
12159 (method url-fetch)
12160 (uri (pypi-uri "pycosat" version))
12161 (sha256
12162 (base32
12163 "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l"))))
12164 ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/
12165 (build-system python-build-system)
12166 (home-page "https://github.com/ContinuumIO/pycosat")
12167 (synopsis "Bindings to picosat (a SAT solver)")
12168 (description
12169 "This package provides efficient Python bindings to @code{picosat} on
12170 the C level. When importing pycosat, the @code{picosat} solver becomes part
12171 of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability
12172 Problem} (SAT) solver.")
12173 (license license:expat)))
12174
12175 (define-public python2-pycosat
12176 (package-with-python2 python-pycosat))
12177
12178 (define-public python2-ruamel.ordereddict
12179 (package
12180 (name "python2-ruamel.ordereddict")
12181 (version "0.4.9")
12182 (source
12183 (origin
12184 (method url-fetch)
12185 (uri (pypi-uri "ruamel.ordereddict" version))
12186 (sha256
12187 (base32
12188 "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h"))))
12189 (build-system python-build-system)
12190 (arguments
12191 `(#:python ,python-2
12192 #:phases
12193 (modify-phases %standard-phases
12194 (delete 'check)
12195 (add-after 'install 'check
12196 (lambda* (#:key inputs outputs #:allow-other-keys)
12197 (add-installed-pythonpath inputs outputs)
12198 (invoke "python" "test/testordereddict.py"))))))
12199 (home-page "https://bitbucket.org/ruamel/ordereddict")
12200 (synopsis "Version of dict that keeps keys in insertion order")
12201 (description
12202 "This is an implementation of an ordered dictionary with @dfn{Key
12203 Insertion Order} (KIO: updates of values do not affect the position of the
12204 key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is
12205 removed and put at the back). The standard library module @code{OrderedDict},
12206 implemented later, implements a subset of @code{ordereddict} functionality.
12207 Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted
12208 Order} (KSO, no sorting function can be specified, but a transform can be
12209 specified to apply on the key before comparison (e.g. @code{string.lower})).")
12210 (license license:expat)))
12211
12212 (define-public python-pypeg2
12213 (package
12214 (name "python-pypeg2")
12215 (version "2.15.2")
12216 (source
12217 (origin
12218 (method url-fetch)
12219 (uri (pypi-uri "pyPEG2" version))
12220 (sha256
12221 (base32
12222 "0v8ziaam2r637v94ra4dbjw6jzxz99gs5x4i585kgag1v204yb9b"))))
12223 (build-system python-build-system)
12224 (propagated-inputs `(("python-lxml" ,python-lxml)))
12225 (arguments
12226 ;;https://bitbucket.org/fdik/pypeg/issues/36/test-failures-on-py35
12227 '(#:tests? #f))
12228 (home-page "https://fdik.org/pyPEG/")
12229 (synopsis "Parsering Expression Grammars in Python")
12230 (description "PyPEG is an intrinsic parser interpreter framework for
12231 Python. It is based on Parsing Expression Grammars, PEG. With pyPEG you can
12232 parse many formal languages.")
12233 (license license:gpl2)))
12234
12235 (define-public python-incremental
12236 (package
12237 (name "python-incremental")
12238 (version "17.5.0")
12239 (source
12240 (origin
12241 (method url-fetch)
12242 (uri (pypi-uri "incremental" version))
12243 (sha256
12244 (base32
12245 "1cylxdz1cnkm5g3pklna3h2n0i0rks95ir1pnpxfnvpkmab1cxbv"))))
12246 (build-system python-build-system)
12247 (home-page "https://github.com/hawkowl/incremental")
12248 (synopsis "Library for versioning Python projects")
12249 (description "Incremental is a small library that versions your Python
12250 projects.")
12251 (license license:expat)))
12252
12253 (define-public python2-incremental
12254 (package-with-python2 python-incremental))
12255
12256 (define-public python-invoke
12257 (package
12258 (name "python-invoke")
12259 (home-page "http://www.pyinvoke.org/")
12260 (version "1.3.0")
12261 (source (origin
12262 (method url-fetch)
12263 (uri (pypi-uri "invoke" version))
12264 (sha256
12265 (base32
12266 "1nn7gad0rvy492acpyhkrp01zsk86acf34qhsvq4xmm6x39788n5"))))
12267 (build-system python-build-system)
12268 (arguments
12269 ;; XXX: Requires many dependencies that are not yet in Guix.
12270 `(#:tests? #f))
12271 (synopsis "Pythonic task execution")
12272 (description
12273 "Invoke is a Python task execution tool and library, drawing inspiration
12274 from various sources to arrive at a powerful and clean feature set. It is
12275 evolved from the Fabric project, but focuses on local and abstract concerns
12276 instead of servers and network commands.")
12277 (license license:bsd-3)))
12278
12279 (define-public python2-invoke
12280 (package-with-python2 python-invoke))
12281
12282 (define-public python-automat
12283 (package
12284 (name "python-automat")
12285 (version "0.7.0")
12286 (source (origin
12287 (method url-fetch)
12288 (uri (pypi-uri "Automat" version))
12289 (sha256
12290 (base32
12291 "03ivg70n3b1cbcd2zvjhk8y4kmqxcvhmili39lmgx09dza1qpmyb"))))
12292 (build-system python-build-system)
12293 ;; We disable the tests because they require python-twisted, while
12294 ;; python-twisted depends on python-automat. Twisted is optional, but the
12295 ;; tests fail if it is not available. Also see
12296 ;; <https://github.com/glyph/automat/issues/71>.
12297 (arguments '(#:tests? #f))
12298 (native-inputs
12299 `(("python-m2r" ,python-m2r)
12300 ("python-setuptools-scm" ,python-setuptools-scm)
12301 ("python-graphviz" ,python-graphviz)))
12302 (propagated-inputs
12303 `(("python-six" ,python-six)
12304 ("python-attrs" ,python-attrs)))
12305 (home-page "https://github.com/glyph/Automat")
12306 (synopsis "Self-service finite-state machines")
12307 (description "Automat is a library for concise, idiomatic Python
12308 expression of finite-state automata (particularly deterministic finite-state
12309 transducers).")
12310 (license license:expat)))
12311
12312 (define-public python2-automat
12313 (package-with-python2 python-automat))
12314
12315 (define-public python-m2r
12316 (package
12317 (name "python-m2r")
12318 (version "0.2.1")
12319 (source (origin
12320 (method url-fetch)
12321 (uri (pypi-uri "m2r" version))
12322 (sha256
12323 (base32
12324 "16gdm8i06jjmlpvckpfmlkr4693dh0vs192vgsqn84fsdkbbm45z"))))
12325 (build-system python-build-system)
12326 (propagated-inputs
12327 `(("python-docutils" ,python-docutils)
12328 ("python-mistune" ,python-mistune)))
12329 (native-inputs
12330 `(("python-pygments" ,python-pygments)
12331 ("python-mock" ,python-mock)))
12332 (home-page "https://github.com/miyakogi/m2r")
12333 (synopsis "Markdown to reStructuredText converter")
12334 (description "M2R converts a markdown file including reST markups to valid
12335 reST format.")
12336 (license license:expat)))
12337
12338 (define-public python2-m2r
12339 (package-with-python2 python-m2r))
12340
12341 (define-public python-constantly
12342 (package
12343 (name "python-constantly")
12344 (version "15.1.0")
12345 (source (origin
12346 (method url-fetch)
12347 (uri (pypi-uri "constantly" version))
12348 (sha256
12349 (base32
12350 "0dgwdla5kfpqz83hfril716inm41hgn9skxskvi77605jbmp4qsq"))))
12351 (build-system python-build-system)
12352 (home-page "https://github.com/twisted/constantly")
12353 (synopsis "Symbolic constants in Python")
12354 (description "Constantly is a Python library that provides symbolic
12355 constant support. It includes collections and constants with text, numeric,
12356 and bit flag values.")
12357 (license license:expat)))
12358
12359 (define-public python2-constantly
12360 (package-with-python2 python-constantly))
12361
12362 (define-public python-attrs
12363 (package
12364 (name "python-attrs")
12365 (version "19.1.0")
12366 (source (origin
12367 (method url-fetch)
12368 (uri (pypi-uri "attrs" version))
12369 (sha256
12370 (base32
12371 "16g33zr5f449lqc5wgvzpknxryfzrfsxcr6kpgxwn7l5fkv71f7h"))))
12372 (build-system python-build-system)
12373 (arguments
12374 `(#:modules ((guix build utils)
12375 (guix build python-build-system)
12376 (ice-9 ftw)
12377 (srfi srfi-1)
12378 (srfi srfi-26))
12379 #:phases (modify-phases %standard-phases
12380 (replace 'check
12381 (lambda _
12382 (let ((cwd (getcwd)))
12383 (setenv "PYTHONPATH"
12384 (string-append
12385 cwd "/build/"
12386 (find (cut string-prefix? "lib" <>)
12387 (scandir (string-append cwd "/build")))
12388 ":"
12389 (getenv "PYTHONPATH")))
12390 (invoke "python" "-m" "pytest")))))))
12391 (native-inputs
12392 `(("python-coverage" ,python-coverage)
12393 ("python-hypothesis" ,python-hypothesis)
12394 ("python-pympler" ,python-pympler)
12395 ("python-pytest" ,python-pytest)
12396 ("python-six" ,python-six)
12397 ("python-sphinx" ,python-sphinx)
12398 ("python-zope-interface" ,python-zope-interface)))
12399 (home-page "https://github.com/python-attrs/attrs/")
12400 (synopsis "Attributes without boilerplate")
12401 (description "@code{attrs} is a Python package with class decorators that
12402 ease the chores of implementing the most common attribute-related object
12403 protocols.")
12404 (license license:expat)))
12405
12406 (define-public python2-attrs
12407 (package-with-python2 python-attrs))
12408
12409 (define-public python-attrs-bootstrap
12410 (package
12411 (inherit python-attrs)
12412 (name "python-attrs-bootstrap")
12413 (native-inputs `())
12414 (arguments `(#:tests? #f))))
12415
12416 (define-public python2-attrs-bootstrap
12417 (package-with-python2 python-attrs-bootstrap))
12418
12419 (define-public python2-cliapp
12420 (package
12421 (name "python2-cliapp")
12422 (version "1.20180812.1")
12423 (source
12424 (origin
12425 (method url-fetch)
12426 (uri (string-append
12427 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/snapshot/cliapp-"
12428 version ".tar.gz"))
12429 (sha256
12430 (base32
12431 "1c1jlblbns8qhiaqjpg4xi6lip8xwfc5w643p43rg543havaj45x"))))
12432 (build-system python-build-system)
12433 (arguments
12434 `(#:python ,python-2
12435 #:phases
12436 (modify-phases %standard-phases
12437 ;; check phase needs to be run before the build phase. If not,
12438 ;; coverage-test-runner looks for tests for the built source files,
12439 ;; and fails.
12440 (delete 'check)
12441 (add-before 'build 'check
12442 (lambda _
12443 ;; Disable python3 tests
12444 (substitute* "check"
12445 (("python3") "# python3"))
12446 (invoke "./check"))))))
12447 (native-inputs
12448 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12449 ("python2-pep8" ,python2-pep8)))
12450 (propagated-inputs
12451 `(("python2-pyaml" ,python2-pyaml)))
12452 (home-page "https://liw.fi/cliapp/")
12453 (synopsis "Python framework for command line programs")
12454 (description "@code{python2-cliapp} is a python framework for
12455 command line programs. It contains the typical stuff such programs
12456 need to do, such as parsing the command line for options, and
12457 iterating over input files.")
12458 (license license:gpl2+)))
12459
12460 (define-public python2-ttystatus
12461 (package
12462 (name "python2-ttystatus")
12463 (version "0.36")
12464 (source
12465 (origin
12466 (method url-fetch)
12467 (uri (string-append
12468 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/ttystatus/snapshot/ttystatus-"
12469 version ".tar.gz"))
12470 (sha256
12471 (base32
12472 "06mdk4d19zw2j3is54gndhzl396g3xc8k52m7i86z69s9hcz71by"))))
12473 (build-system python-build-system)
12474 (native-inputs
12475 `(("python2-coverage-test-runner" ,python2-coverage-test-runner)
12476 ("python2-pep8" ,python2-pep8)))
12477 (arguments
12478 `(#:python ,python-2
12479 #:phases
12480 (modify-phases %standard-phases
12481 ;; check phase needs to be run before the build phase. If not,
12482 ;; coverage-test-runner looks for tests for the built source files,
12483 ;; and fails.
12484 (delete 'check)
12485 (add-before 'build 'check
12486 (lambda _ (invoke "make" "check"))))))
12487 (home-page "https://liw.fi/ttystatus/")
12488 (synopsis "Python library for showing progress reporting and
12489 status updates on terminals")
12490 (description "@code{python2-ttystatus} is a python library for
12491 showing progress reporting and status updates on terminals, for
12492 command line programs. Output is automatically adapted to the width
12493 of the terminal: truncated if it does not fit, and resized if the
12494 terminal size changes.")
12495 (license license:gpl3+)))
12496
12497 (define-public python2-tracing
12498 (package
12499 (name "python2-tracing")
12500 (version "0.10")
12501 (source
12502 (origin
12503 (method url-fetch)
12504 (uri (string-append
12505 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/python-tracing/snapshot/tracing-"
12506 version ".tar.gz"))
12507 (sha256
12508 (base32
12509 "06cw4zg42fsvqy372vi2whj26w56vzg5axhzwdjc2bgwf03garbw"))))
12510 (build-system python-build-system)
12511 (arguments
12512 `(#:python ,python-2))
12513 (home-page "https://liw.fi/tracing/")
12514 (synopsis "Python debug logging helper")
12515 (description "@code{python2-tracing} is a python library for
12516 logging debug messages. It provides a way to turn debugging messages
12517 on and off, based on the filename they occur in. It is much faster
12518 than using @code{logging.Filter} to accomplish the same thing, which
12519 matters when code is run in production mode. The actual logging still
12520 happens using the @code{logging} library.")
12521 (license license:gpl3+)))
12522
12523 (define-public python2-larch
12524 (package
12525 (name "python2-larch")
12526 (version "1.20151025")
12527 (source
12528 (origin
12529 (method url-fetch)
12530 (uri (string-append
12531 "http://git.liw.fi/cgi-bin/cgit/cgit.cgi/larch/snapshot/larch-"
12532 version ".tar.gz"))
12533 (patches (search-patches
12534 "python2-larch-coverage-4.0a6-compatibility.patch"))
12535 (sha256
12536 (base32
12537 "1p4knkkavlqymgciz2wbcnfrdgdbafhg14maplnk4vbw0q8xs663"))))
12538 (build-system python-build-system)
12539 (arguments
12540 `(#:python ,python-2
12541 #:phases
12542 (modify-phases %standard-phases
12543 ;; check phase needs to be run before the build phase. If not,
12544 ;; coverage-test-runner looks for tests for the built source files,
12545 ;; and fails.
12546 (delete 'check)
12547 (add-before 'build 'check
12548 (lambda _ (invoke "make" "check"))))))
12549 (native-inputs
12550 `(("cmdtest" ,cmdtest)
12551 ("python2-coverage-test-runner" ,python2-coverage-test-runner)))
12552 (propagated-inputs
12553 `(("python2-tracing" ,python2-tracing)))
12554 (home-page "https://liw.fi/larch/")
12555 (synopsis "Python copy-on-write B-tree library")
12556 (description "@code{python2-larch} is an implementation of
12557 particular kind of B-tree, based on research by Ohad Rodeh. See
12558 @url{http://liw.fi/larch/ohad-btrees-shadowing-clones.pdf} for details
12559 on the data structure.
12560
12561 The distinctive feature of this B-tree is that a node is never
12562 (conceptually) modified. Instead, all updates are done by
12563 copy-on-write. This makes it easy to clone a tree, and modify only the
12564 clone, while other processes access the original tree.")
12565 (license license:gpl3+)))
12566
12567 (define-public python-astroid
12568 (package
12569 (name "python-astroid")
12570 (version "2.3.3")
12571 (source
12572 (origin
12573 (method url-fetch)
12574 (uri (pypi-uri "astroid" version))
12575 (sha256
12576 (base32 "0fnibsl2cb5mvzbfm7sycj85smx48f8w8m7ks1sqlmpr9ps0gski"))))
12577 (build-system python-build-system)
12578 (propagated-inputs
12579 `(("python-lazy-object-proxy" ,python-lazy-object-proxy)
12580 ("python-six" ,python-six)
12581 ("python-typed-ast" ,python-typed-ast)
12582 ("python-wrapt" ,python-wrapt)))
12583 (native-inputs
12584 `(("python-dateutil" ,python-dateutil)
12585 ("python-nose" ,python-nose)
12586 ("python-pytest" ,python-pytest)
12587 ("python-pytest-runner" ,python-pytest-runner)))
12588 (arguments
12589 `(#:phases
12590 (modify-phases %standard-phases
12591 (add-after 'unpack 'remove-spurious-test
12592 (lambda _
12593 ;; This can be removed after upgrading from python-3.7
12594 ;; https://github.com/PyCQA/astroid/issues/593
12595 ;; https://bugs.python.org/issue34056
12596 (delete-file "astroid/tests/unittest_modutils.py")
12597 #t))
12598 (replace 'check
12599 (lambda _
12600 (invoke "pytest" "astroid"))))))
12601 (home-page "https://github.com/PyCQA/astroid")
12602 (synopsis "Common base representation of python source code for pylint and
12603 other projects")
12604 (description "@code{python-astroid} provides a common base representation
12605 of python source code for projects such as pychecker, pyreverse, pylint, etc.
12606
12607 It provides a compatible representation which comes from the _ast module. It
12608 rebuilds the tree generated by the builtin _ast module by recursively walking
12609 down the AST and building an extended ast. The new node classes have
12610 additional methods and attributes for different usages. They include some
12611 support for static inference and local name scopes. Furthermore, astroid
12612 builds partial trees by inspecting living objects.")
12613 (license license:lgpl2.1+)
12614 (properties `((python2-variant . ,(delay python2-astroid))))))
12615
12616 (define-public python2-astroid
12617 (let ((base (package-with-python2
12618 (strip-python2-variant python-astroid))))
12619 (package (inherit base)
12620 ;; Version 2.x removes python2 support.
12621 (version "1.6.5")
12622 (source
12623 (origin
12624 (method url-fetch)
12625 (uri (pypi-uri "astroid" version))
12626 (sha256
12627 (base32
12628 "0fir4b67sm7shcacah9n61pvq313m523jb4q80sycrh3p8nmi6zw"))))
12629 (arguments
12630 (substitute-keyword-arguments (package-arguments base)
12631 ((#:phases phases)
12632 `(modify-phases ,phases
12633 (add-after 'unpack 'remove-spurious-test
12634 (lambda _
12635 ;; https://github.com/PyCQA/astroid/issues/276
12636 (delete-file "astroid/tests/unittest_brain.py")
12637 #t))
12638 (replace 'check
12639 (lambda _
12640 (invoke"python" "-m" "unittest" "discover"
12641 "-p" "unittest*.py")))))))
12642 (native-inputs `())
12643 (propagated-inputs
12644 `(("python2-backports-functools-lru-cache"
12645 ,python2-backports-functools-lru-cache)
12646 ("python2-enum34" ,python2-enum34)
12647 ("python2-singledispatch" ,python2-singledispatch)
12648 ,@(alist-delete "python-typed-ast"
12649 (package-propagated-inputs base)))))))
12650
12651 (define-public python-isort
12652 (package
12653 (name "python-isort")
12654 (version "4.3.4")
12655 (source
12656 (origin
12657 (method git-fetch)
12658 (uri (git-reference
12659 ;; Tests pass only from the Github sources
12660 (url "https://github.com/timothycrosley/isort")
12661 (commit version)))
12662 (file-name (git-file-name name version))
12663 (sha256
12664 (base32
12665 "1q0mlrpki5vjbgwxag5rghljjcfg7mvb0pbkwid80p0sqrxlm2p6"))))
12666 (build-system python-build-system)
12667 (native-inputs
12668 `(("python-mock" ,python-mock)
12669 ("python-pytest" ,python-pytest)))
12670 (home-page "https://github.com/timothycrosley/isort")
12671 (synopsis "Python utility/library to sort python imports")
12672 (description "@code{python-isort} is a python utility/library to sort
12673 imports alphabetically, and automatically separated into sections. It
12674 provides a command line utility, a python library and plugins for various
12675 editors.")
12676 (license license:expat)
12677 (properties `((python2-variant . ,(delay python2-isort))))))
12678
12679 (define-public python2-isort
12680 (let ((base (package-with-python2
12681 (strip-python2-variant python-isort))))
12682 (package (inherit base)
12683 (native-inputs
12684 `(("python2-futures" ,python2-futures)
12685 ,@(package-native-inputs base))))))
12686
12687 (define-public python2-backports-functools-lru-cache
12688 (package
12689 (name "python2-backports-functools-lru-cache")
12690 (version "1.5")
12691 (source
12692 (origin
12693 (method url-fetch)
12694 ;; only the pypi tarballs contain the necessary metadata
12695 (uri (pypi-uri "backports.functools_lru_cache" version))
12696 (sha256
12697 (base32
12698 "06jgv8gib4fhky0p5cmxdghvsgjyzcdgk48k8pxb1ccf11znk64x"))))
12699 (build-system python-build-system)
12700 (native-inputs
12701 `(("python2-setuptools-scm" ,python2-setuptools-scm)))
12702 (arguments
12703 `(#:python ,python-2))
12704 (home-page "https://github.com/jaraco/backports.functools_lru_cache")
12705 (synopsis "Backport of functools.lru_cache from Python 3.3")
12706 (description "@code{python2-backports-functools-lru-cache} is a backport
12707 of @code{functools.lru_cache} from python 3.3.")
12708 (license license:expat)))
12709
12710 (define-public python-configparser
12711 (package
12712 (name "python-configparser")
12713 (version "3.7.1")
12714 (source
12715 (origin
12716 (method url-fetch)
12717 (uri (pypi-uri "configparser" version))
12718 (sha256
12719 (base32
12720 "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav"))))
12721 (build-system python-build-system)
12722 (home-page "https://github.com/jaraco/configparser/")
12723 (synopsis "Backport of configparser from python 3.5")
12724 (description "@code{python-configparser} is a backport of
12725 @code{configparser} from Python 3.5 so that it can be used directly
12726 in other versions.")
12727 (license license:expat)))
12728
12729 (define-public python2-configparser
12730 (package-with-python2 python-configparser))
12731
12732 (define-public python-mando
12733 (package
12734 (name "python-mando")
12735 (version "0.6.4")
12736 (source (origin
12737 (method url-fetch)
12738 (uri (pypi-uri "mando" version))
12739 (sha256
12740 (base32
12741 "0q6rl085q1hw1wic52pqfndr0x3nirbxnhqj9akdm5zhq2fv3zkr"))))
12742 (build-system python-build-system)
12743 (propagated-inputs
12744 `(("python-rst2ansi" ,python-rst2ansi)
12745 ("python-six" ,python-six)))
12746 (native-inputs
12747 `(("python-pytest" ,python-pytest)))
12748 (home-page "https://mando.readthedocs.org/")
12749 (synopsis
12750 "Wrapper around argparse, allowing creation of complete CLI applications")
12751 (description
12752 "This package is a wrapper around argparse, allowing you to write complete CLI
12753 applications in seconds while maintaining all the flexibility.")
12754 (license license:expat)))
12755
12756 (define-public python2-mando
12757 (package-with-python2 python-mando))
12758
12759 (define-public python2-argparse
12760 (package
12761 (name "python2-argparse")
12762 (version "1.4.0")
12763 (source
12764 (origin
12765 (method url-fetch)
12766 (uri (pypi-uri "argparse" version))
12767 (sha256
12768 (base32
12769 "1r6nznp64j68ih1k537wms7h57nvppq0szmwsaf99n71bfjqkc32"))))
12770 (build-system python-build-system)
12771 (arguments
12772 `(#:python ,python-2))
12773 (home-page "https://github.com/ThomasWaldmann/argparse/")
12774 (synopsis "Python command-line parsing library")
12775 (description
12776 "This package is mostly for people who want to have @code{argparse} on
12777 older Pythons because it was not part of the standard library back then.")
12778 (license license:psfl)))
12779
12780 (define-public python-fudge
12781 (package
12782 (name "python-fudge")
12783 ;; 0.9.6 is the latest version suitable for testing the "fabric" Python 2
12784 ;; package, which is currently the only use of this package.
12785 (version "0.9.6")
12786 (source
12787 (origin
12788 (method url-fetch)
12789 (uri (pypi-uri "fudge" version))
12790 (sha256
12791 (base32
12792 "185ia3vr3qk4f2s1a9hdxb8ci4qc0x0xidrad96pywg8j930qs9l"))))
12793 (build-system python-build-system)
12794 (arguments
12795 `(#:tests? #f)) ;XXX: Tests require the NoseJS Python package.
12796 (home-page "https://github.com/fudge-py/fudge")
12797 (synopsis "Replace real objects with fakes/mocks/stubs while testing")
12798 (description
12799 "Fudge is a Python module for using fake objects (mocks and stubs) to
12800 test real ones.
12801
12802 In readable Python code, you declare the methods available on your fake object
12803 and how they should be called. Then you inject that into your application and
12804 start testing. This declarative approach means you don’t have to record and
12805 playback actions and you don’t have to inspect your fakes after running code.
12806 If the fake object was used incorrectly then you’ll see an informative
12807 exception message with a traceback that points to the culprit.")
12808 (license license:expat)))
12809
12810 (define-public python2-fudge
12811 (package-with-python2 python-fudge))
12812
12813 (define-public python-mwclient
12814 (package
12815 (name "python-mwclient")
12816 (version "0.10.0")
12817 (source
12818 (origin
12819 (method git-fetch)
12820 ;; The PyPI version wouldn't contain tests.
12821 (uri (git-reference
12822 (url "https://github.com/mwclient/mwclient")
12823 (commit (string-append "v" version))))
12824 (file-name (git-file-name name version))
12825 (sha256
12826 (base32
12827 "1c3q6lwmb05yqywc4ya98ca7hsl15niili8rccl4n1yqp77c103v"))))
12828 (build-system python-build-system)
12829 (propagated-inputs
12830 `(("python-requests-oauthlib" ,python-requests-oauthlib)
12831 ("python-six" ,python-six)))
12832 (native-inputs
12833 `(("python-mock" ,python-mock)
12834 ("python-pytest" ,python-pytest)
12835 ("python-pytest-cov" ,python-pytest-cov)
12836 ("python-pytest-runner" ,python-pytest-runner)
12837 ("python-responses" ,python-responses)))
12838 (home-page "https://github.com/btongminh/mwclient")
12839 (synopsis "MediaWiki API client")
12840 (description "This package provides a MediaWiki API client.")
12841 (license license:expat)))
12842
12843 (define-public python2-mwclient
12844 (package-with-python2 python-mwclient))
12845
12846 (define-public python-utils
12847 (package
12848 (name "python-utils")
12849 (version "2.1.0")
12850 (source (origin
12851 (method url-fetch)
12852 (uri (pypi-uri "python-utils" version))
12853 (sha256
12854 (base32
12855 "1mcsy6q5am4ya72rgkpb6kax6vv7c93cfkkas89xnpa4sj9zf28p"))))
12856 (build-system python-build-system)
12857 (native-inputs
12858 `(("pytest-runner" ,python-pytest-runner)
12859 ("pytest" ,python-pytest)
12860 ("six" ,python-six)))
12861 (home-page "https://github.com/WoLpH/python-utils")
12862 (synopsis "Convenient utilities not included with the standard Python install")
12863 (description
12864 "Python Utils is a collection of small Python functions and classes which
12865 make common patterns shorter and easier.")
12866 (license license:bsd-2)))
12867
12868 (define-public python2-utils
12869 (package-with-python2 python-utils))
12870
12871 (define-public python-diff-match-patch
12872 (package
12873 (name "python-diff-match-patch")
12874 (version "20121119")
12875 (source
12876 (origin
12877 (method url-fetch)
12878 (uri (pypi-uri "diff-match-patch" version))
12879 (sha256
12880 (base32
12881 "0k1f3v8nbidcmmrk65m7h8v41jqi37653za9fcs96y7jzc8mdflx"))))
12882 (build-system python-build-system)
12883 (home-page "https://code.google.com/p/google-diff-match-patch")
12884 (synopsis "Synchronize plain text")
12885 (description "Diff Match and Patch libraries offer robust algorithms to
12886 perform the operations required for synchronizing plain text.")
12887 (license license:asl2.0)))
12888
12889 (define-public python2-diff-match-patch
12890 (package-with-python2 python-diff-match-patch))
12891
12892 (define-public python-dirsync
12893 (package
12894 (name "python-dirsync")
12895 (version "2.2.3")
12896 (source
12897 (origin
12898 (method url-fetch)
12899 (uri (pypi-uri "dirsync" version))
12900 (sha256
12901 (base32
12902 "1r40fkanksagcszf1ag85mdr8w7rgc7196n6s1qlsk2abw6i7v0z"))))
12903 (build-system python-build-system)
12904 (propagated-inputs
12905 `(("six" ,python-six)))
12906 (home-page "https://bitbucket.org/tkhyn/dirsync")
12907 (synopsis "Advanced directory tree synchronisation tool")
12908 (description "Advanced directory tree synchronisation tool.")
12909 (license license:expat)))
12910
12911 (define-public python2-dirsync
12912 (package-with-python2 python-dirsync))
12913
12914 (define-public python-levenshtein
12915 (package
12916 (name "python-levenshtein")
12917 (version "0.12.0")
12918 (source
12919 (origin
12920 (method url-fetch)
12921 (uri (pypi-uri "python-Levenshtein" version))
12922 (sha256
12923 (base32
12924 "1c9ybqcja31nghfcc8xxbbz9h60s9qi12b9hr4jyl69xbvg12fh3"))))
12925 (build-system python-build-system)
12926 (home-page "https://github.com/ztane/python-Levenshtein")
12927 (synopsis "Fast computation of Levenshtein distance and string similarity")
12928 (description
12929 "The Levenshtein Python C extension module contains functions for fast computation of
12930 @enumerate
12931 @item Levenshtein (edit) distance, and edit operations
12932 @item string similarity
12933 @item approximate median strings, and generally string averaging
12934 @item string sequence and set similarity
12935 @end enumerate
12936 It supports both normal and Unicode strings.")
12937 (license license:gpl2+)))
12938
12939 (define-public python2-levenshtein
12940 (package-with-python2 python-levenshtein))
12941
12942 (define-public python-scandir
12943 (package
12944 (name "python-scandir")
12945 (version "1.9.0")
12946 (source
12947 (origin
12948 (method url-fetch)
12949 (uri (pypi-uri "scandir" version))
12950 (sha256
12951 (base32 "0r3hvf1a9jm1rkqgx40gxkmccknkaiqjavs8lccgq9s8khh5x5s4"))))
12952 (build-system python-build-system)
12953 (arguments
12954 `(#:phases (modify-phases %standard-phases
12955 (replace 'check
12956 (lambda _
12957 (invoke "python" "test/run_tests.py"))))))
12958 (home-page "https://github.com/benhoyt/scandir")
12959 (synopsis "Directory iteration function")
12960 (description
12961 "Directory iteration function like os.listdir(), except that instead of
12962 returning a list of bare filenames, it yields DirEntry objects that include
12963 file type and stat information along with the name. Using scandir() increases
12964 the speed of os.walk() by 2-20 times (depending on the platform and file
12965 system) by avoiding unnecessary calls to os.stat() in most cases.
12966
12967 This package is part of the Python standard library since version 3.5.")
12968 (license license:bsd-3)))
12969
12970 (define-public python2-scandir
12971 (package-with-python2 python-scandir))
12972
12973 (define-public python2-stemming
12974 (package
12975 (name "python2-stemming")
12976 (version "1.0.1")
12977 (source
12978 (origin
12979 (method url-fetch)
12980 (uri (pypi-uri "stemming" version))
12981 (sha256
12982 (base32 "0ldwa24gnnxhniv0fhygkpc2mwgd93q10ag8rvzayv6hw418frsr"))))
12983 (build-system python-build-system)
12984 (arguments
12985 `(#:python ,python-2))
12986 (home-page "https://bitbucket.org/mchaput/stemming/overview")
12987 (synopsis "Python implementations of various stemming algorithms")
12988 (description
12989 "Python implementations of the Porter, Porter2, Paice-Husk, and Lovins
12990 stemming algorithms for English. These implementations are straightforward and
12991 efficient, unlike some Python versions of the same algorithms available on the
12992 Web. This package is an extraction of the stemming code included in the Whoosh
12993 search engine.")
12994 (license license:public-domain)))
12995
12996 (define-public python-factory-boy
12997 (package
12998 (name "python-factory-boy")
12999 (version "2.8.1")
13000 (source
13001 (origin
13002 (method url-fetch)
13003 (uri (pypi-uri "factory_boy" version))
13004 (sha256
13005 (base32 "1fvin6san5xsjh2c4y18caj2lnmwxlylyqm8mh1yc6rp38wlwr56"))))
13006 (build-system python-build-system)
13007 (arguments
13008 ;; Tests are not included in the tarball.
13009 `(#:tests? #f))
13010 (propagated-inputs
13011 `(("faker" ,python-faker)))
13012 (home-page "https://github.com/benhoyt/scandir")
13013 (synopsis "Versatile test fixtures replacement")
13014 (description
13015 "Factory_boy is a fixtures replacement based on thoughtbot’s factory_girl.
13016
13017 As a fixtures replacement tool, it aims to replace static, hard to maintain
13018 fixtures with easy-to-use factories for complex object.
13019
13020 Instead of building an exhaustive test setup with every possible combination
13021 of corner cases, factory_boy allows you to use objects customized for the
13022 current test, while only declaring the test-specific fields")
13023 (license license:expat)))
13024
13025 (define-public python2-factory-boy
13026 (package-with-python2 python-factory-boy))
13027
13028 (define-public python-translate-toolkit
13029 (package
13030 (name "python-translate-toolkit")
13031 (version "2.1.0")
13032 (source
13033 (origin
13034 (method url-fetch)
13035 (uri (pypi-uri "translate-toolkit" version ".tar.bz2"))
13036 (sha256
13037 (base32 "1vlkwrg83vb17jc36pmwh2b7jphwf390lz0jw8hakcg16qhwypvq"))))
13038 (build-system python-build-system)
13039 (native-inputs
13040 `(("python-pytest" ,python-pytest)
13041 ("python-sphinx" ,python-sphinx)))
13042 (propagated-inputs
13043 `(("python-babel" ,python-babel)
13044 ("python-beautifulsoup4" ,python-beautifulsoup4)
13045 ("python-chardet" ,python-chardet)
13046 ("python-diff-match-patch" ,python-diff-match-patch)
13047 ("python-levenshtein" ,python-levenshtein)
13048 ("python-lxml" ,python-lxml)
13049 ("python-six" ,python-six)
13050 ("python-vobject" ,python-vobject)
13051 ("python-pyyaml" ,python-pyyaml)))
13052 (arguments
13053 ;; TODO: tests are not run, because they end with
13054 ;; TypeError: parse() missing 2 required positional arguments: 'tree' and
13055 ;; 'parse_funcs'
13056 ;; during test setup.
13057 `(#:tests? #f))
13058 (home-page "https://toolkit.translatehouse.org")
13059 (synopsis "Tools and API for translation and localization engineering")
13060 (description
13061 "Tools and API for translation and localization engineering. It contains
13062 several utilities, as well as an API for building localization tools.")
13063 (license license:gpl2+)))
13064
13065 (define-public python2-translate-toolkit
13066 (package-with-python2 python-translate-toolkit))
13067
13068 (define-public python-packaging
13069 (package
13070 (name "python-packaging")
13071 (version "19.2")
13072 (source
13073 (origin
13074 (method url-fetch)
13075 (uri (pypi-uri "packaging" version))
13076 (sha256
13077 (base32
13078 "0izwlz9h0bw171a1chr311g2y7n657zjaf4mq4rgm8pp9lbj9f98"))))
13079 (build-system python-build-system)
13080 (arguments
13081 `(#:phases (modify-phases %standard-phases
13082 (replace 'check
13083 (lambda _ (invoke "py.test" "-vv"))))))
13084 (native-inputs
13085 `(("python-pretend" ,python-pretend)
13086 ("python-pytest" ,python-pytest)))
13087 (propagated-inputs
13088 `(("python-pyparsing" ,python-pyparsing)
13089 ("python-six" ,python-six)))
13090 (home-page "https://github.com/pypa/packaging")
13091 (synopsis "Core utilities for Python packages")
13092 (description "Packaging is a Python module for dealing with Python packages.
13093 It offers an interface for working with package versions, names, and dependency
13094 information.")
13095 ;; From 'LICENSE': This software is made available under the terms of
13096 ;; *either* of the licenses found in LICENSE.APACHE or LICENSE.BSD.
13097 ;; Contributions to this software is made under the terms of *both* these
13098 ;; licenses.
13099 (license (list license:asl2.0 license:bsd-2))))
13100
13101 (define-public python2-packaging
13102 (package-with-python2 python-packaging))
13103
13104 (define-public python-relatorio
13105 (package
13106 (name "python-relatorio")
13107 (version "0.8.0")
13108 (source
13109 (origin
13110 (method url-fetch)
13111 (uri (pypi-uri "relatorio" version))
13112 (sha256
13113 (base32
13114 "1na6hlhz1awi1hbjg1gyclq0khz42iz90wvdjw7mmj655788bpxx"))))
13115 (build-system python-build-system)
13116 (propagated-inputs
13117 `(("python-lxml" ,python-lxml)
13118 ("python-genshi" ,python-genshi)))
13119 (native-inputs
13120 `(("python-magic" ,python-magic)))
13121 (home-page "https://relatorio.tryton.org/")
13122 (synopsis "Templating library able to output ODT and PDF files")
13123 (description "Relatorio is a templating library which provides a way to
13124 easily output ODT, ODS, PNG, SVG and several other kinds of files. Support
13125 for more filetypes can be easily added by creating plugins for them.")
13126 (license license:gpl3+)))
13127
13128 (define-public python2-relatorio
13129 (package-with-python2 python-relatorio))
13130
13131 (define-public python-radon
13132 (package
13133 (name "python-radon")
13134 (version "2.2.0")
13135 (source
13136 (origin
13137 (method url-fetch)
13138 (uri (pypi-uri "radon" version))
13139 (sha256
13140 (base32
13141 "07gq5hq4nrffxnlnksws9hrx7fd001gam63j62i82gyfr23gvdym"))))
13142 (build-system python-build-system)
13143 (arguments
13144 `(#:phases (modify-phases %standard-phases
13145 (replace 'check
13146 (lambda _
13147 (invoke "python" "radon/tests/run.py"))))))
13148 (propagated-inputs
13149 `(("python-colorama" ,python-colorama)
13150 ("python-flake8-polyfill" ,python-flake8-polyfill)
13151 ("python-mando" ,python-mando)))
13152 (native-inputs
13153 `(("python-pytest" ,python-pytest)
13154 ("python-pytest-mock" ,python-pytest-mock)))
13155 (home-page "https://radon.readthedocs.org/")
13156 (synopsis "Code Metrics in Python")
13157 (description "Radon is a Python tool which computes various code metrics.
13158 Supported metrics are:
13159 @itemize @bullet
13160 @item raw metrics: SLOC, comment lines, blank lines, &c.
13161 @item Cyclomatic Complexity (i.e. McCabe’s Complexity)
13162 @item Halstead metrics (all of them)
13163 @item the Maintainability Index (a Visual Studio metric)
13164 @end itemize")
13165 (license license:expat)))
13166
13167 (define-public python2-radon
13168 (package-with-python2 python-radon))
13169
13170 (define-public python-sure
13171 (package
13172 (name "python-sure")
13173 (version "1.4.11")
13174 (source
13175 (origin
13176 (method url-fetch)
13177 (uri (pypi-uri "sure" version))
13178 (sha256
13179 (base32
13180 "1and0drq8w9iplsic22n2h7hkpyq03a1mbqk4sgcdqhqzdqm539w"))))
13181 (build-system python-build-system)
13182 (propagated-inputs
13183 `(("python-mock" ,python-mock)
13184 ("python-six" ,python-six)))
13185 (native-inputs
13186 `(("python-nose" ,python-nose)))
13187 (home-page "https://github.com/gabrielfalcao/sure")
13188 (synopsis "Automated testing library in python for python")
13189 (description
13190 "Sure is a python library that leverages a DSL for writing assertions.
13191 Sure is heavily inspired by @code{RSpec Expectations} and @code{should.js}.")
13192 (license license:gpl3+)))
13193
13194 (define-public python2-sure
13195 (package-with-python2 python-sure))
13196
13197 (define-public python2-couleur
13198 ;; This package does not seem to support python3 at all, hence,
13199 ;; only the python2 variant definition is provided.
13200 (package
13201 (name "python2-couleur")
13202 (version "0.6.2")
13203 (source
13204 (origin
13205 (method url-fetch)
13206 (uri (pypi-uri "couleur" version))
13207 (sha256
13208 (base32
13209 "1qqaxyqz74wvid0cr119dhcwz0h0if5b5by44zl49pd5z65v58k1"))))
13210 (build-system python-build-system)
13211 (arguments
13212 `(#:python ,python-2))
13213 (home-page "https://github.com/gabrielfalcao/couleur")
13214 (synopsis
13215 "ANSI terminal tool for python, colored shell and other handy fancy features")
13216 (description
13217 "@code{Couleur} provides python programs a way to use the ANSI features in a unix
13218 terminal such as coloured output in the shell, overwriting output, indentation, etc.")
13219 ;; README.md says ASL2.0, but all source code headers are LGPL3+.
13220 ;; https://github.com/gabrielfalcao/couleur/issues/11
13221 (license license:lgpl3+)))
13222
13223 (define-public python-misaka
13224 (package
13225 (name "python-misaka")
13226 (version "2.1.1")
13227 (source
13228 (origin
13229 (method url-fetch)
13230 (uri (pypi-uri "misaka" version))
13231 (sha256
13232 (base32
13233 "1mzc29wwyhyardclj1vg2xsfdibg2lzb7f1azjcxi580ama55wv2"))))
13234 (build-system python-build-system)
13235 (arguments
13236 `(;; Line 37 of setup.py calls self.run_command('develop')
13237 ;; in the 'check' phase. This command seems to be trying
13238 ;; to write to
13239 ;; /gnu/store/...-python-<version>/lib/python<version>/site-packages/
13240 ;; for which it does not have the permission to write.
13241 #:tests? #f))
13242 (propagated-inputs
13243 `(("python-cffi" ,python-cffi)))
13244 (home-page "https://github.com/FSX/misaka")
13245 (synopsis "Python binding for Hoedown")
13246 (description
13247 "@code{Misaka} is a CFFI-based binding for @code{Hoedown}, a fast markdown processing
13248 library written in C. It features a fast HTML renderer and functionality to make custom
13249 renderers (e.g. man pages or LaTeX).")
13250 (license license:expat)))
13251
13252 (define-public python2-misaka
13253 (package-with-python2 python-misaka))
13254
13255 (define-public python2-steadymark
13256 ;; This is forced into being a python2 only variant
13257 ;; due to its dependence on couleur that has no support
13258 ;; for python3
13259 (package
13260 (name "python2-steadymark")
13261 (version "0.7.3")
13262 (source
13263 (origin
13264 (method url-fetch)
13265 (uri (pypi-uri "steadymark" version))
13266 (sha256
13267 (base32
13268 "1640i9g8dycql3cc8j0bky0jkzj0q39blfbp4lsgpkprkfgcdk8v"))))
13269 (build-system python-build-system)
13270 (native-inputs
13271 `(("python-couleur" ,python2-couleur)
13272 ("python-sure" ,python2-sure)
13273 ("python-misaka" ,python2-misaka)))
13274 (arguments
13275 `(#:python ,python-2
13276 #:phases
13277 (modify-phases %standard-phases
13278 (add-before 'build 'patch-setup-py
13279 (lambda _
13280 ;; Update requirements from dependency==version
13281 ;; to dependency>=version
13282 (substitute* "setup.py"
13283 (("==") ">="))
13284 #t)))))
13285 (home-page "https://github.com/gabrielfalcao/steadymark")
13286 (synopsis "Markdown-based test runner for python")
13287 (description
13288 "@code{Steadymark} allows documentation to be written in github-flavoured
13289 markdown. The documentation may contain snippets of code surrounded by python
13290 code blocks and @code{Steadymark} will find these snippets and run them, making
13291 sure that there are no old malfunctional examples in the documentation examples.")
13292 (license license:expat)))
13293
13294 (define-public python-jsonpointer
13295 (package
13296 (name "python-jsonpointer")
13297 (version "1.10")
13298 (source
13299 (origin
13300 (method url-fetch)
13301 (uri (pypi-uri "jsonpointer" version))
13302 (sha256
13303 (base32
13304 "1cg0gvgqjysydv6p45v4jywg1jb3v48c7m3cbpi57zgf6nndr9cz"))))
13305 (build-system python-build-system)
13306 (home-page "https://github.com/stefankoegl/python-json-pointer")
13307 (synopsis "Identify specific nodes in a JSON document")
13308 (description "@code{jsonpointer} allows you to access specific nodes
13309 by path in a JSON document (see RFC 6901).")
13310 (license license:bsd-3)))
13311
13312 (define-public python2-jsonpointer
13313 (package-with-python2 python-jsonpointer))
13314
13315 (define-public python-jsonpatch
13316 (package
13317 (name "python-jsonpatch")
13318 (version "1.16")
13319 (source
13320 (origin
13321 (method git-fetch)
13322 ;; pypi version lacks tests.js
13323 (uri (git-reference
13324 (url "https://github.com/stefankoegl/python-json-patch")
13325 (commit (string-append "v" version))))
13326 (file-name (git-file-name name version))
13327 (sha256
13328 (base32
13329 "0k9pff06lxama3nhsc7cdxbp83422bdy8ifs52i6xkas8hpyzfzr"))))
13330 (build-system python-build-system)
13331 (native-inputs
13332 `(("python-jsonpointer" ,python-jsonpointer)))
13333 (home-page "https://github.com/stefankoegl/python-json-patch")
13334 (synopsis "Applying JSON Patches in Python 2.6+ and 3.x")
13335 (description "@code{jsonpatch} is a library and program that allows
13336 applying JSON Patches according to RFC 6902.")
13337 (license license:bsd-3)))
13338
13339 (define-public python2-jsonpatch
13340 (package-with-python2 python-jsonpatch))
13341
13342 (define-public python-jsonpatch-0.4
13343 (package (inherit python-jsonpatch)
13344 (name "python-jsonpatch")
13345 (version "0.4")
13346 (source
13347 (origin
13348 (method git-fetch)
13349 (uri (git-reference
13350 (url "https://github.com/stefankoegl/python-json-patch")
13351 (commit (string-append "v" version))))
13352 (file-name (git-file-name name version))
13353 (sha256
13354 (base32
13355 "1fq02y57kinyknxjcav0slcb0k9mwdffqw2hnlhdkpj7palh2mwk"))))))
13356
13357 (define-public python2-jsonpatch-0.4
13358 (package-with-python2 python-jsonpatch-0.4))
13359
13360 (define-public python-rfc3986
13361 (package
13362 (name "python-rfc3986")
13363 (version "1.1.0")
13364 (source (origin
13365 (method url-fetch)
13366 (uri (pypi-uri "rfc3986" version))
13367 (sha256
13368 (base32
13369 "06wlmysw83f75ff84zr1yr6n0shvc2xn1n1sb4iwzqap9hf5fn44"))))
13370 (build-system python-build-system)
13371 (arguments
13372 `(#:modules ((guix build utils)
13373 (guix build python-build-system)
13374 (ice-9 ftw)
13375 (srfi srfi-1)
13376 (srfi srfi-26))
13377 #:phases
13378 (modify-phases %standard-phases
13379 (replace 'check
13380 (lambda _
13381 (let ((cwd (getcwd)))
13382 (setenv "PYTHONPATH"
13383 (string-append cwd "/build/"
13384 (find (cut string-prefix? "lib" <>)
13385 (scandir (string-append cwd "/build")))
13386 ":"
13387 (getenv "PYTHONPATH")))
13388 (invoke "pytest" "-v")))))))
13389 (native-inputs
13390 `(("python-pytest" ,python-pytest)))
13391 (home-page "https://rfc3986.readthedocs.io/")
13392 (synopsis "Parse and validate URI references")
13393 (description
13394 "@code{rfc3986} is a Python implementation of RFC@tie{}3986 including
13395 validation and authority parsing. This module also supports RFC@tie{}6874
13396 which adds support for zone identifiers to IPv6 addresses.")
13397 (license license:asl2.0)))
13398
13399 (define-public python2-rfc3986
13400 (package-with-python2 python-rfc3986))
13401
13402 (define-public python-rfc3987
13403 (package
13404 (name "python-rfc3987")
13405 (version "1.3.7")
13406 (source
13407 (origin
13408 (method url-fetch)
13409 (uri (pypi-uri "rfc3987" version))
13410 (sha256
13411 (base32
13412 "192pclzs2y0yaywqkrlvd0x73740q310kvqvm6jldhi619mq59wi"))))
13413 (build-system python-build-system)
13414 (home-page "https://pypi.python.org/pypi/rfc3987")
13415 (synopsis "Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)")
13416 (description "@code{rfc3987} provides routines for parsing and
13417 validation of URIs (see RFC 3986) and IRIs (see RFC 3987).")
13418 (license license:gpl3+)))
13419
13420 (define-public python2-rfc3987
13421 (package-with-python2 python-rfc3987))
13422
13423 (define-public python-validate-email
13424 (package
13425 (name "python-validate-email")
13426 (version "1.3")
13427 (source
13428 (origin
13429 (method url-fetch)
13430 (uri (pypi-uri "validate_email" version))
13431 (sha256
13432 (base32
13433 "1bxffaf5yz2cph8ki55vdvdypbwkvn2xr1firlcy62vqbzf1jivq"))))
13434 (build-system python-build-system)
13435 (home-page "https://github.com/syrusakbary/validate_email")
13436 (synopsis "Verifies if an email address is valid and really exists")
13437 (description "@code{validate_email} can be used to verify if an email
13438 address is valid and really exists.")
13439 (license license:lgpl3+)))
13440
13441 (define-public python2-validate-email
13442 (package-with-python2 python-validate-email))
13443
13444 (define-public python-flex
13445 (package
13446 (name "python-flex")
13447 (version "6.10.0")
13448 (source
13449 (origin
13450 (method url-fetch)
13451 (uri (pypi-uri "flex" version))
13452 (sha256
13453 (base32
13454 "00pamnwla3khk8nyla7y28dq9jnh69swd7f4jfsl7sn1izs8n8zk"))))
13455 (build-system python-build-system)
13456 (propagated-inputs
13457 `(("python-click" ,python-click)
13458 ("python-iso8601" ,python-iso8601)
13459 ("python-jsonpointer" ,python-jsonpointer)
13460 ("python-pyyaml" ,python-pyyaml)
13461 ("python-requests" ,python-requests)
13462 ("python-rfc3987" ,python-rfc3987)
13463 ("python-six" ,python-six)
13464 ("python-validate-email" ,python-validate-email)))
13465 (home-page "https://github.com/pipermerriam/flex")
13466 (synopsis "Validates Swagger schemata")
13467 (description "@code{flex} can be used to validate Swagger schemata.")
13468 (license license:bsd-3)))
13469
13470 (define-public python2-flex
13471 (package-with-python2 python-flex))
13472
13473 (define-public python-marshmallow
13474 (package
13475 (name "python-marshmallow")
13476 (version "3.0.0b14")
13477 (source
13478 (origin
13479 (method url-fetch)
13480 (uri (pypi-uri "marshmallow" version))
13481 (sha256
13482 (base32
13483 "1digk3f5cfk7wmlka65mc7bzsd96pbsgcsvp6pimd5b4ff9zb5p3"))))
13484 (build-system python-build-system)
13485 (propagated-inputs
13486 `(("python-dateutil" ,python-dateutil)
13487 ("python-simplejson" ,python-simplejson)))
13488 (native-inputs
13489 `(("python-pytest" ,python-pytest)
13490 ("python-pytz" ,python-pytz)))
13491 (home-page "https://github.com/marshmallow-code/marshmallow")
13492 (synopsis "Convert complex datatypes to and from native
13493 Python datatypes.")
13494 (description "@code{marshmallow} provides a library for converting
13495 complex datatypes to and from native Python datatypes.")
13496 (license license:expat)))
13497
13498 (define-public python2-marshmallow
13499 (package-with-python2 python-marshmallow))
13500
13501 (define-public python-apispec
13502 (package
13503 (name "python-apispec")
13504 (version "0.25.3")
13505 (source
13506 (origin
13507 (method url-fetch)
13508 (uri (pypi-uri "apispec" version))
13509 (sha256
13510 (base32
13511 "0kxa8723zbisx10363yh4mmmn4higxrspymbjfz5zq8f644zagm9"))))
13512 (build-system python-build-system)
13513 (propagated-inputs
13514 `(("python-pyyaml" ,python-pyyaml)))
13515 (native-inputs
13516 `(("python-pytest" ,python-pytest)
13517 ("python-flask" ,python-flask)
13518 ("python-marshmallow" ,python-marshmallow)
13519 ("python-tornado" ,python-tornado)
13520 ("python-bottle" ,python-bottle)
13521 ("python-mock" ,python-mock)))
13522 (home-page "https://github.com/marshmallow-code/apispec")
13523 (synopsis "Swagger 2.0 API specification generator")
13524 (description "@code{python-apispec} is a pluggable API specification
13525 generator. Currently supports the OpenAPI specification (f.k.a.
13526 Swagger 2.0).")
13527 (license license:expat)))
13528
13529 (define-public python2-apispec
13530 (package-with-python2 python-apispec))
13531
13532 (define-public python-flasgger
13533 (package
13534 (name "python-flasgger")
13535 (version "0.6.3")
13536 (source
13537 (origin
13538 (method git-fetch)
13539 (uri (git-reference
13540 (url "https://github.com/rochacbruno/flasgger.git")
13541 (commit version)))
13542 (file-name (git-file-name name version))
13543 (sha256
13544 (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
13545 (build-system python-build-system)
13546 (arguments
13547 `(#:phases
13548 (modify-phases %standard-phases
13549 (replace 'check
13550 (lambda* (#:key inputs outputs #:allow-other-keys)
13551 (substitute* "Makefile"
13552 (("flake8 flasgger --ignore=F403")
13553 "flake8 flasgger --ignore=E731,F403"))
13554 (setenv "PYTHONPATH" (string-append (getcwd)
13555 ":"
13556 (getenv "PYTHONPATH")))
13557 (invoke "py.test"))))))
13558 (propagated-inputs
13559 `(("python-flask" ,python-flask)
13560 ("python-pyyaml" ,python-pyyaml)
13561 ("python-jsonschema" ,python-jsonschema)
13562 ("python-mistune" ,python-mistune)
13563 ("python-six" ,python-six)))
13564 (native-inputs
13565 `(("python-decorator" ,python-decorator)
13566 ("python-flake8" ,python-flake8)
13567 ("python-flask-restful" ,python-flask-restful)
13568 ("python-flex" ,python-flex)
13569 ("python-pytest" ,python-pytest)
13570 ("python-pytest-cov" ,python-pytest-cov)
13571 ("python-marshmallow" ,python-marshmallow)
13572 ("python-apispec" ,python-apispec)))
13573 (home-page "https://github.com/rochacbruno/flasgger/")
13574 (synopsis "Extract Swagger specs from your Flask project")
13575 (description "@code{python-flasgger} allows extracting Swagger specs
13576 from your Flask project. It is a fork of Flask-Swagger.")
13577 (license license:expat)))
13578
13579 (define-public python2-flasgger
13580 (package-with-python2 python-flasgger))
13581
13582 (define-public python-swagger-spec-validator
13583 (package
13584 (name "python-swagger-spec-validator")
13585 (version "2.4.3")
13586 (source
13587 (origin
13588 (method url-fetch)
13589 (uri (pypi-uri "swagger-spec-validator" version))
13590 (sha256
13591 (base32
13592 "11g627icrsqwazsncwi0sdvprcj6hwaayw5xk3xsj8d97bmrzqjp"))))
13593 (build-system python-build-system)
13594 (propagated-inputs
13595 `(("python-jsonschema" ,python-jsonschema)
13596 ("python-pyyaml" ,python-pyyaml)
13597 ("python-six" ,python-six)))
13598 (home-page
13599 "https://github.com/Yelp/swagger_spec_validator")
13600 (synopsis "Validation of Swagger specifications")
13601 (description "@code{swagger_spec_validator} provides a library for
13602 validating Swagger API specifications.")
13603 (license license:asl2.0)))
13604
13605 (define-public python2-swagger-spec-validator
13606 (package-with-python2 python-swagger-spec-validator))
13607
13608 (define-public python-apache-libcloud
13609 (package
13610 (name "python-apache-libcloud")
13611 (version "2.4.0")
13612 (source
13613 (origin
13614 (method url-fetch)
13615 (uri (pypi-uri "apache-libcloud" version))
13616 (sha256
13617 (base32
13618 "0daj3mkzw79v5zin2r1s2wkrz1hplfc16bwj4ss68i5qjq4l2p0j"))))
13619 (build-system python-build-system)
13620 (arguments
13621 `(#:phases
13622 (modify-phases %standard-phases
13623 (add-after 'unpack 'patch-ssh
13624 (lambda* (#:key inputs #:allow-other-keys)
13625 (substitute* "libcloud/compute/ssh.py"
13626 (("'ssh'") (string-append "'" (assoc-ref inputs "openssh")
13627 "/bin/ssh" "'")))
13628 #t))
13629 (add-after 'unpack 'patch-tests
13630 (lambda _
13631 (substitute* "./libcloud/test/test_file_fixtures.py"
13632 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-923>.
13633 (("def _ascii") "def _raw_data(self, method, url, body, headers):
13634 return (httplib.OK,
13635 \"1234abcd\",
13636 {\"test\": \"value\"},
13637 httplib.responses[httplib.OK])
13638 def _ascii"))
13639 (substitute* "libcloud/test/compute/test_ssh_client.py"
13640 (("class ShellOutSSHClientTests")
13641 "@unittest.skip(\"Guix container doesn't have ssh service\")
13642 class ShellOutSSHClientTests")
13643 ;; See <https://issues.apache.org/jira/browse/LIBCLOUD-924>.
13644 (("'.xf0.x90.x8d.x88'") "b'\\xF0\\x90\\x8D\\x88'")
13645 (("'.xF0', '.x90', '.x8D', '.x88'")
13646 "b'\\xF0', b'\\x90', b'\\x8D', b'\\x88'"))
13647 #t))
13648 (add-before 'check 'copy-secret
13649 (lambda _
13650 (copy-file "libcloud/test/secrets.py-dist"
13651 "libcloud/test/secrets.py")
13652 #t)))))
13653 (inputs
13654 `(("openssh" ,openssh)))
13655 (propagated-inputs
13656 `(("python-paramiko" ,python-paramiko)
13657 ("python-requests" ,python-requests)))
13658 (native-inputs
13659 `(("python-lockfile" ,python-lockfile)
13660 ("python-mock" ,python-mock)
13661 ("python-pytest" ,python-pytest)
13662 ("python-pytest-runner" ,python-pytest-runner)
13663 ("python-requests-mock" ,python-requests-mock)))
13664 (home-page "https://libcloud.apache.org/")
13665 (synopsis "Unified Cloud API")
13666 (description "@code{libcloud} is a Python library for interacting with
13667 many of the popular cloud service providers using a unified API.")
13668 (license license:asl2.0)))
13669
13670 (define-public python2-apache-libcloud
13671 (package-with-python2 python-apache-libcloud))
13672
13673 (define-public python-smmap2
13674 (package
13675 (name "python-smmap2")
13676 (version "2.0.3")
13677 (source
13678 (origin
13679 (method url-fetch)
13680 (uri (pypi-uri "smmap2" version))
13681 (sha256
13682 (base32
13683 "1hvn28p3zvxa98sbi9lrqvv2ps4q284j4jq9a619zw0m7yv0sly7"))))
13684 (build-system python-build-system)
13685 (native-inputs
13686 `(("python-nosexcover" ,python-nosexcover)))
13687 (home-page "https://github.com/Byron/smmap")
13688 (synopsis "Python sliding window memory map manager")
13689 (description "@code{smmap2} is a pure Python implementation of a sliding
13690 window memory map manager.")
13691 (license license:bsd-3)))
13692
13693 (define-public python2-smmap2
13694 (package-with-python2 python-smmap2))
13695
13696 (define-public python-regex
13697 (package
13698 (name "python-regex")
13699 (version "2019.04.14")
13700 (source (origin
13701 (method url-fetch)
13702 (uri (pypi-uri "regex" version))
13703 (sha256
13704 (base32
13705 "1a6hhfs6l6snr1z654ay6wzbmwdkmv282fzfkd5hk2d1n73y8v6m"))))
13706 ;; TODO: Fix and enable regex_test.py tests that complain about the
13707 ;; test.support module not existing.
13708 (build-system python-build-system)
13709 (home-page "https://bitbucket.org/mrabarnett/mrab-regex")
13710 (synopsis "Alternative regular expression module")
13711 (description "This regular expression implementation is backwards-
13712 compatible with the standard @code{re} module, but offers additional
13713 functionality like full case-folding for case-insensitive matches in Unicode.")
13714 (license license:psfl)))
13715
13716 (define-public python2-regex
13717 (package-with-python2 python-regex))
13718
13719 (define-public python2-pyopengl
13720 (package
13721 (name "python2-pyopengl")
13722 (version "3.1.0")
13723 (source
13724 (origin
13725 (method url-fetch)
13726 (uri (pypi-uri "PyOpenGL" version))
13727 (sha256
13728 (base32
13729 "1byxjj6a8rwzhxhjqlc588zdad2qwxdd7vlam2653ylll31waiwv"))))
13730 (arguments
13731 `(#:python ,python-2))
13732 (build-system python-build-system)
13733 (home-page "http://pyopengl.sourceforge.net")
13734 (synopsis "Standard OpenGL bindings for Python")
13735 (description
13736 "PyOpenGL is the most common cross platform Python binding to OpenGL and
13737 related APIs. The binding is created using the standard @code{ctypes}
13738 library.")
13739 (license license:bsd-3)))
13740
13741 (define-public python2-pyopengl-accelerate
13742 (package
13743 (inherit python2-pyopengl)
13744 (name "python2-pyopengl-accelerate")
13745 (version "3.1.0")
13746 (source
13747 (origin
13748 (method url-fetch)
13749 (uri (pypi-uri "PyOpenGL-accelerate" version))
13750 (sha256
13751 (base32
13752 "0464c1ifzk0k92lyndikmvzjgnx1y25r7bkkc8pnxm4kp1q4czwj"))))
13753 (synopsis "Acceleration code for PyOpenGL")
13754 (description
13755 "This is the Cython-coded accelerator module for PyOpenGL.")))
13756
13757 (define-public python-rencode
13758 (package
13759 (name "python-rencode")
13760 (version "1.0.5")
13761 (source
13762 (origin
13763 (method url-fetch)
13764 (uri (pypi-uri "rencode" version))
13765 (sha256
13766 (base32
13767 "0mzwdq1is7kyyr32i5k4iz6g5xxdvmiyc132jnc60p9m6lnwjrpv"))))
13768 (build-system python-build-system)
13769 (arguments
13770 `(#:phases
13771 (modify-phases %standard-phases
13772 (add-before 'check 'delete-bogus-test
13773 ;; This test requires /home/aresch/Downloads, which is not provided by
13774 ;; the build environment.
13775 (lambda _
13776 (delete-file "rencode/t.py")
13777 #t)))))
13778 (native-inputs `(("pkg-config" ,pkg-config)
13779 ("python-cython" ,python-cython)))
13780 (home-page "https://github.com/aresch/rencode")
13781 (synopsis "Serialization of heterogeneous data structures")
13782 (description
13783 "The @code{rencode} module is a data structure serialization library,
13784 similar to @code{bencode} from the BitTorrent project. For complex,
13785 heterogeneous data structures with many small elements, r-encoding stake up
13786 significantly less space than b-encodings. This version of rencode is a
13787 complete rewrite in Cython to attempt to increase the performance over the
13788 pure Python module.")
13789 (license license:bsd-3)))
13790
13791 (define-public python2-rencode
13792 (package-with-python2 python-rencode))
13793
13794 (define-public python-xenon
13795 (package
13796 (name "python-xenon")
13797 (version "0.5.4")
13798 (source
13799 (origin
13800 (method url-fetch)
13801 (uri (pypi-uri "xenon" version))
13802 (sha256
13803 (base32
13804 "029cbhysg2vr5n4jz8gpg2793f8wkwnqpr1qgv6c1dn685vy31mc"))))
13805 (build-system python-build-system)
13806 (native-inputs
13807 `(("python-pyyaml" ,python-pyyaml)
13808 ("python-radon" ,python-radon)
13809 ("python-requests" ,python-requests)
13810 ("python-flake8" ,python-flake8)
13811 ("python-tox" ,python-tox)))
13812 (arguments
13813 `(#:phases
13814 (modify-phases %standard-phases
13815 (add-before 'build 'patch-test-requirements
13816 (lambda _
13817 ;; Remove httpretty dependency for tests.
13818 (substitute* "setup.py"
13819 (("httpretty") ""))
13820 #t)))))
13821 (home-page "https://xenon.readthedocs.org/")
13822 (synopsis "Monitor code metrics for Python on your CI server")
13823 (description
13824 "Xenon is a monitoring tool based on Radon. It monitors code complexity.
13825 Ideally, @code{xenon} is run every time code is committed. Through command
13826 line options, various thresholds can be set for the complexity of code. It
13827 will fail (i.e. it will exit with a non-zero exit code) when any of these
13828 requirements is not met.")
13829 (license license:expat)))
13830
13831 (define-public python2-xenon
13832 (package-with-python2 python-xenon))
13833
13834 (define-public python-pysocks
13835 (package
13836 (name "python-pysocks")
13837 (version "1.7.0")
13838 (source
13839 (origin
13840 (method url-fetch)
13841 (uri (pypi-uri "PySocks" version))
13842 (sha256
13843 (base32
13844 "0z4p31bpqm893cf87qqgb30k7nwd8kqfjwwjm5cvxb6zbyj1w0yr"))))
13845 (build-system python-build-system)
13846 (arguments `(#:tests? #f))
13847 (home-page "https://github.com/Anorov/PySocks")
13848 (synopsis "SOCKS client module")
13849 (description "@code{pysocks} is an updated and semi-actively maintained
13850 version of @code{SocksiPy} with bug fixes and extra features.")
13851 (license license:bsd-3)))
13852
13853 (define-public python2-pysocks
13854 (package-with-python2 python-pysocks))
13855
13856 (define-public python-pydiff
13857 (package
13858 (name "python-pydiff")
13859 (version "0.2")
13860 (source
13861 (origin
13862 (method url-fetch)
13863 (uri (pypi-uri "pydiff" version))
13864 (sha256
13865 (base32
13866 "1als83h9w0gab24ipyna6khm390qmpnpkc5jksmdbs2xc8hp2z44"))))
13867 (build-system python-build-system)
13868 (home-page "https://github.com/myint/pydiff")
13869 (synopsis "Library to diff two Python files at the bytecode level")
13870 (description
13871 "@code{pydiff} makes it easy to look for actual code changes while
13872 ignoring formatting changes.")
13873 (license license:expat)))
13874
13875 (define-public python2-pydiff
13876 (package-with-python2 python-pydiff))
13877
13878 (define-public python-tqdm
13879 (package
13880 (name "python-tqdm")
13881 (version "4.19.6")
13882 (source
13883 (origin
13884 (method url-fetch)
13885 (uri (pypi-uri "tqdm" version))
13886 (sha256
13887 (base32
13888 "1pw0ngm0zn9papdmkwipi3yih5c3di6d0w849bdmrraq4d2d9h2y"))))
13889 (build-system python-build-system)
13890 (native-inputs
13891 `(("python-flake8" ,python-flake8)
13892 ("python-nose" ,python-nose)
13893 ("python-coverage" ,python-coverage)))
13894 (home-page "https://github.com/tqdm/tqdm")
13895 (synopsis "Fast, extensible progress meter")
13896 (description
13897 "Make loops show a progress bar on the console by just wrapping any
13898 iterable with @code{|tqdm(iterable)|}. Offers many options to define
13899 design and layout.")
13900 (license (list license:mpl2.0 license:expat))
13901 (properties `((python2-variant . ,(delay python2-tqdm))))))
13902
13903 (define-public python2-tqdm
13904 (let ((tqdm (package-with-python2
13905 (strip-python2-variant python-tqdm))))
13906 (package (inherit tqdm)
13907 (native-inputs `(("python2-functools32" ,python2-functools32)
13908 ,@(package-native-inputs tqdm))))))
13909
13910 (define-public python-pkginfo
13911 (package
13912 (name "python-pkginfo")
13913 (version "1.4.2")
13914 (source
13915 (origin
13916 (method url-fetch)
13917 (uri (pypi-uri "pkginfo" version))
13918 (sha256
13919 (base32
13920 "0x6lm17p1ks031mj6pajyp4rkq74vpqq8qwjb7ikgwmkli1day2q"))))
13921 (build-system python-build-system)
13922 (arguments
13923 ;; The tests are broken upstream.
13924 '(#:tests? #f))
13925 (home-page
13926 "https://code.launchpad.net/~tseaver/pkginfo/trunk")
13927 (synopsis
13928 "Query metadatdata from sdists, bdists, and installed packages")
13929 (description
13930 "API to query the distutils metadata written in @file{PKG-INFO} inside a
13931 source distriubtion (an sdist) or a binary distribution (e.g., created by
13932 running bdist_egg). It can also query the EGG-INFO directory of an installed
13933 distribution, and the *.egg-info stored in a \"development checkout\" (e.g,
13934 created by running @code{python setup.py develop}).")
13935 (license license:expat)))
13936
13937 (define-public python2-pkginfo
13938 (package-with-python2 python-pkginfo))
13939
13940 (define-public python-twine
13941 (package
13942 (name "python-twine")
13943 (version "1.9.1")
13944 (source
13945 (origin
13946 (method url-fetch)
13947 (uri (pypi-uri "twine" version))
13948 (sha256
13949 (base32
13950 "1ay1b6kdq6k4bfbjsvf6ymj41wrgpvinhxndb09355pwhxwmp96a"))))
13951 (build-system python-build-system)
13952 (propagated-inputs
13953 `(("python-tqdm" ,python-tqdm)
13954 ("python-pkginfo" ,python-pkginfo)
13955 ("python-requests" ,python-requests)
13956 ("python-requests-toolbelt" ,python-requests-toolbelt)))
13957 (home-page "https://github.com/pypa/twine")
13958 (synopsis "Collection of utilities for interacting with PyPI")
13959 (description
13960 "@code{twine} currently supports registering projects and uploading
13961 distributions. It authenticates the user over HTTPS, allows them to pre-sign
13962 their files and supports any packaging format (including wheels).")
13963 (license license:asl2.0)))
13964
13965 (define-public python2-twine
13966 (package-with-python2 python-twine))
13967
13968 (define-public python-linecache2
13969 (package
13970 (name "python-linecache2")
13971 (version "1.0.0")
13972 (source
13973 (origin
13974 (method url-fetch)
13975 (uri (pypi-uri "linecache2" version))
13976 (sha256
13977 (base32
13978 "0z79g3ds5wk2lvnqw0y2jpakjf32h95bd9zmnvp7dnqhf57gy9jb"))))
13979 (build-system python-build-system)
13980 (arguments
13981 `(;; The tests depend on unittest2, and our version is a bit too old.
13982 #:tests? #f))
13983 (native-inputs
13984 `(("python-pbr" ,python-pbr-minimal)))
13985 (home-page
13986 "https://github.com/testing-cabal/linecache2")
13987 (synopsis "Backports of the linecache module")
13988 (description
13989 "The linecache module allows one to get any line from any file, while
13990 attempting to optimize internally, using a cache, the common case where many
13991 lines are read from a single file.")
13992 (license license:psfl)))
13993
13994 (define-public python2-linecache2
13995 (package-with-python2 python-linecache2))
13996
13997 (define-public python-traceback2
13998 (package
13999 (name "python-traceback2")
14000 (version "1.4.0")
14001 (source
14002 (origin
14003 (method url-fetch)
14004 (uri (pypi-uri "traceback2" version))
14005 (sha256
14006 (base32
14007 "0c1h3jas1jp1fdbn9z2mrgn3jj0hw1x3yhnkxp7jw34q15xcdb05"))))
14008 (build-system python-build-system)
14009 (arguments
14010 `(;; python-traceback2 and python-unittest2 depend on one another.
14011 #:tests? #f))
14012 (native-inputs
14013 `(("python-pbr" ,python-pbr-minimal)))
14014 (propagated-inputs
14015 `(("python-linecache2" ,python-linecache2)))
14016 (home-page
14017 "https://github.com/testing-cabal/traceback2")
14018 (synopsis "Backports of the traceback module")
14019 (description
14020 "This module provides a standard interface to extract, format and print
14021 stack traces of Python programs. It exactly mimics the behavior of the Python
14022 interpreter when it prints a stack trace.")
14023 (license license:psfl)))
14024
14025 (define-public python2-traceback2
14026 (package-with-python2 python-traceback2))
14027
14028 (define-public python-ratelimiter
14029 (package
14030 (name "python-ratelimiter")
14031 (version "1.2.0")
14032 (source
14033 (origin
14034 (method url-fetch)
14035 (uri (pypi-uri "ratelimiter" version))
14036 (sha256
14037 (base32
14038 "1dhz85mj5bqd2mij84ncs6pz32hgidr79hay4aqfmzaa4rbb497p"))))
14039 (build-system python-build-system)
14040 (arguments
14041 '(#:tests? #f)) ; There are no tests in the pypi archive.
14042 (home-page "https://github.com/RazerM/ratelimiter")
14043 (synopsis "Simple rate limiting object")
14044 (description
14045 "The @code{ratelimiter} module ensures that an operation will not be
14046 executed more than a given number of times during a given period.")
14047 (license license:asl2.0)))
14048
14049 (define-public python2-ratelimiter
14050 (package-with-python2 python-ratelimiter))
14051
14052 (define-public python-dukpy
14053 (package
14054 (name "python-dukpy")
14055 (version "0.3")
14056 (source
14057 (origin
14058 (method git-fetch)
14059 (uri (git-reference
14060 (url "https://github.com/kovidgoyal/dukpy.git")
14061 (commit (string-append "v" version))))
14062 (file-name (git-file-name name version))
14063 (sha256
14064 (base32 "13h21nqzasv4zj32xs61brmc106pr2cx243672crcmwxxnjgaxls"))))
14065 (build-system python-build-system)
14066 (home-page "https://github.com/kovidgoyal/dukpy")
14067 (synopsis "Run JavaScript in python")
14068 (description
14069 "dukpy is a JavaScript runtime environment for Python using the duktape
14070 embeddable JavaScript engine.")
14071 ;; Dukpy is licensed under MIT like the embedded duktape library,
14072 ;; with 'errors.c' as GPL3.
14073 (license (list license:expat license:gpl3))))
14074
14075 (define-public python2-dukpy
14076 (package-with-python2 python-dukpy))
14077
14078 (define-public python-jsonrpclib-pelix
14079 (package
14080 (name "python-jsonrpclib-pelix")
14081 (version "0.3.2")
14082 (source
14083 (origin
14084 (method url-fetch)
14085 (uri (pypi-uri "jsonrpclib-pelix" version))
14086 (sha256
14087 (base32
14088 "0f83z5zi7w32vprhk1dyc94ir1bh4hdd57bjdbwkq9ykng8qilhl"))))
14089 (build-system python-build-system)
14090 (arguments
14091 `(#:tests? #f)) ; no tests in PyPI tarball
14092 (home-page "https://github.com/tcalmant/jsonrpclib/")
14093 (synopsis "JSON-RPC 2.0 client library for Python")
14094 (description
14095 "This library implements the JSON-RPC v2.0
14096 specification (backwards-compatible) as a client library for Python. This
14097 version is a fork of jsonrpclib by Josh Marshall, usable with Pelix remote
14098 services.")
14099 (license license:asl2.0)))
14100
14101 (define-public python2-jsonrpclib-pelix
14102 (package-with-python2 python-jsonrpclib-pelix))
14103
14104 (define-public python-setuptools-scm-git-archive
14105 (package
14106 (name "python-setuptools-scm-git-archive")
14107 (version "1.0")
14108 (source
14109 (origin
14110 (method url-fetch)
14111 (uri (pypi-uri "setuptools_scm_git_archive" version))
14112 (sha256
14113 (base32
14114 "1nii1sz5jq75ilf18bjnr11l9rz1lvdmyk66bxl7q90qan85yhjj"))))
14115 (build-system python-build-system)
14116 (native-inputs
14117 `(("python-pytest" ,python-pytest)))
14118 (propagated-inputs
14119 `(("python-setuptools-scm" ,python-setuptools-scm)))
14120 (home-page "https://github.com/Changaco/setuptools_scm_git_archive/")
14121 (synopsis "Setuptools_scm plugin for git archives")
14122 (description
14123 "The setuptools_scm_git_archive package is a plugin to
14124 setuptools_scm, which supports obtaining versions from git archives that
14125 belong to tagged versions.")
14126 (license license:expat)))
14127
14128 (define-public python2-setuptools-scm-git-archive
14129 (package-with-python2 python-setuptools-scm-git-archive))
14130
14131 (define-public python-setuptools-git
14132 (package
14133 (name "python-setuptools-git")
14134 (version "1.2")
14135 (source
14136 (origin
14137 (method url-fetch)
14138 (uri (pypi-uri "setuptools-git" version))
14139 (sha256
14140 (base32
14141 "0i84qjwp5m0l9qagdjww2frdh63r37km1c48mrvbmaqsl1ni6r7z"))))
14142 (build-system python-build-system)
14143 (arguments
14144 `(#:phases
14145 (modify-phases %standard-phases
14146 ;; This is needed for tests.
14147 (add-after 'unpack 'configure-git
14148 (lambda _
14149 (setenv "HOME" "/tmp")
14150 (invoke "git" "config" "--global" "user.email" "guix")
14151 (invoke "git" "config" "--global" "user.name" "guix")
14152 #t)))))
14153 (native-inputs
14154 `(("git" ,git-minimal)))
14155 (home-page "https://github.com/msabramo/setuptools-git")
14156 (synopsis "Setuptools revision control system plugin for Git")
14157 (description
14158 "This package provides a plugin for Setuptools for revision control with
14159 Git.")
14160 (license license:bsd-3)))
14161
14162 (define-public python-pyclipper
14163 (package
14164 (name "python-pyclipper")
14165 (version "1.1.0.post3")
14166 (source
14167 (origin
14168 (method url-fetch)
14169 (uri (pypi-uri "pyclipper" version ".zip"))
14170 (sha256
14171 (base32 "164yksvqwqvwzh8f8lq92asg87hd8rvcy2xb5vm4y4ccvd5xgb7i"))
14172 (modules '((guix build utils)))
14173 (snippet
14174 '(begin
14175 ;; This file is generated by Cython.
14176 (delete-file "pyclipper/pyclipper.cpp") #t))))
14177 (build-system python-build-system)
14178 (arguments
14179 `(#:phases
14180 (modify-phases %standard-phases
14181 (add-before 'build 'cythonize-sources
14182 (lambda _
14183 (with-directory-excursion "pyclipper"
14184 (invoke "cython" "--cplus" "pyclipper.pyx")))))))
14185 (propagated-inputs
14186 `(("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive)))
14187 (native-inputs
14188 `(("python-cython" ,python-cython)
14189 ("python-pytest" ,python-pytest)
14190 ("python-pytest-runner" ,python-pytest-runner)
14191 ("python-unittest2" ,python-unittest2)
14192 ("unzip" ,unzip)))
14193 (home-page "https://github.com/greginvm/pyclipper")
14194 (synopsis "Wrapper for Angus Johnson's Clipper library")
14195 (description
14196 "Pyclipper is a Cython wrapper for the C++ translation of the
14197 Angus Johnson's polygon clipping Clipper library (ver. 6.4.2).")
14198 (license license:expat)))
14199
14200 (define-public python2-pyclipper
14201 (package-with-python2 python-pyclipper))
14202
14203 (define-public python2-booleanoperations
14204 (package
14205 (name "python2-booleanoperations")
14206 (version "0.7.1")
14207 (source
14208 (origin
14209 (method url-fetch)
14210 (uri (pypi-uri "booleanOperations" version ".zip"))
14211 (sha256
14212 (base32
14213 "1hw42fazdpvsn77glx96hwsj9l17mvx37sc5707s08y5w6fx16mn"))))
14214 (build-system python-build-system)
14215 (arguments
14216 `(#:python ,python-2))
14217 (native-inputs
14218 `(("unzip" ,unzip)
14219 ("python2-pytest" ,python2-pytest)
14220 ("python2-pytest-runner" ,python2-pytest-runner)))
14221 (propagated-inputs
14222 `(("python-fonttools" ,python2-fonttools)
14223 ("python-pyclipper" ,python2-pyclipper)
14224 ("python-ufolib" ,python2-ufolib)))
14225 (home-page "https://github.com/typemytype/booleanOperations")
14226 (synopsis "Boolean operations on paths")
14227 (description
14228 "BooleanOperations provides a Python library that enables
14229 boolean operations on paths.")
14230 (license license:expat)))
14231
14232 (define-public python-tempdir
14233 (package
14234 (name "python-tempdir")
14235 (version "0.7.1")
14236 (source
14237 (origin
14238 (method url-fetch)
14239 (uri (pypi-uri "tempdir" version))
14240 (sha256
14241 (base32
14242 "13msyyxqbicr111a294x7fsqbkl6a31fyrqflx3q7k547gnq15k8"))))
14243 (build-system python-build-system)
14244 (home-page "https://pypi.org/project/tempdir/")
14245 (arguments
14246 ;; the package has no tests
14247 '(#:tests? #f))
14248 (synopsis "Python library for managing temporary directories")
14249 (description
14250 "This library manages temporary directories that are automatically
14251 deleted with all their contents when they are no longer needed. It is
14252 particularly convenient for use in tests.")
14253 (license license:expat)))
14254
14255 (define-public python2-tempdir
14256 (package-with-python2 python-tempdir))
14257
14258 (define-public python-activepapers
14259 (package
14260 (name "python-activepapers")
14261 (version "0.2.2")
14262 (source
14263 (origin
14264 (method url-fetch)
14265 (uri (pypi-uri "ActivePapers.Py" version))
14266 (sha256
14267 (base32
14268 "12wkhjh90ffipjzv10swndp2xv9hd7xrxvg6v0n4n3i411pj4xb8"))))
14269 (build-system python-build-system)
14270 (arguments
14271 `(#:modules ((ice-9 ftw)
14272 (srfi srfi-1)
14273 (guix build utils)
14274 (guix build python-build-system))
14275
14276 #:phases
14277 (modify-phases %standard-phases
14278 (add-after 'unpack 'delete-python2-code
14279 (lambda _
14280 (for-each delete-file
14281 '("lib/activepapers/builtins2.py"
14282 "lib/activepapers/standardlib2.py"
14283 "lib/activepapers/utility2.py"))))
14284 (replace 'check
14285 (lambda _
14286 ;; Deactivate the test cases that download files
14287 (setenv "NO_NETWORK_ACCESS" "1")
14288 ;; For some strange reason, some tests fail if nosetests runs all
14289 ;; test modules in a single execution. They pass if each test
14290 ;; module is run individually.
14291 (for-each (lambda (filename)
14292 (invoke "nosetests"
14293 (string-append "tests/" filename)))
14294 (scandir "tests"
14295 (lambda (filename)
14296 (string-suffix? ".py" filename)))))))))
14297 (native-inputs
14298 `(("python-tempdir" ,python-tempdir)
14299 ("python-nose" ,python-nose)))
14300 (propagated-inputs
14301 `(("python-h5py" ,python-h5py)))
14302 (home-page "http://www.activepapers.org/")
14303 (synopsis "Executable papers for scientific computing")
14304 (description
14305 "ActivePapers is a tool for working with executable papers, which
14306 combine data, code, and documentation in single-file packages,
14307 suitable for publication as supplementary material or on repositories
14308 such as figshare or Zenodo.")
14309 (properties `((python2-variant . ,(delay python2-activepapers))))
14310 (license license:bsd-3)))
14311
14312 (define-public python2-activepapers
14313 (let ((base (package-with-python2
14314 (strip-python2-variant python-activepapers))))
14315 (package
14316 (inherit base)
14317 (arguments
14318 (substitute-keyword-arguments (package-arguments base)
14319 ((#:phases phases)
14320 `(modify-phases ,phases
14321 (delete 'delete-python2-code)
14322 (add-after 'unpack 'delete-python3-code
14323 (lambda _
14324 (for-each delete-file
14325 '("lib/activepapers/builtins3.py"
14326 "lib/activepapers/standardlib3.py"
14327 "lib/activepapers/utility3.py")))))))))))
14328
14329 (define-public python-semver
14330 (package
14331 (name "python-semver")
14332 (version "2.9.0")
14333 (source
14334 (origin
14335 (method url-fetch)
14336 (uri (pypi-uri "semver" version))
14337 (sha256
14338 (base32
14339 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd"))))
14340 (build-system python-build-system)
14341 (native-inputs
14342 `(("python-tox" ,python-tox)
14343 ("python-virtualenv" ,python-virtualenv)))
14344 (home-page "https://github.com/k-bx/python-semver")
14345 (synopsis "Python helper for Semantic Versioning")
14346 (description "This package provides a Python library for
14347 @url{Semantic Versioning, http://semver.org/}.")
14348 (license license:bsd-3)))
14349
14350 (define-public python2-semver
14351 (package-with-python2 python-semver))
14352
14353 (define-public python-pyro4
14354 (package
14355 (name "python-pyro4")
14356 (version "4.77")
14357 (source
14358 (origin
14359 (method url-fetch)
14360 (uri (pypi-uri "Pyro4" version))
14361 (sha256
14362 (base32 "0gsjg869y4gpy265s1gj1f2qy6jn5iz8r2bwwnq78r1r5yi15zib"))))
14363 (build-system python-build-system)
14364 (arguments
14365 '(#:tests? #f)) ;FIXME: Some tests require network access.
14366 (native-inputs
14367 `(("python-cloudpickle" ,python-cloudpickle)
14368 ("python-dill" ,python-dill)
14369 ("python-msgpack" ,python-msgpack)))
14370 (propagated-inputs
14371 `(("python-serpent" ,python-serpent)))
14372 (home-page "https://pyro4.readthedocs.io")
14373 (synopsis "Distributed object middleware for Python")
14374 (description
14375 "Pyro enables you to build applications in which objects can talk to each
14376 other over the network. You can just use normal Python method calls to call
14377 objects on other machines, also known as remote procedure calls (RPC).")
14378 (license license:expat)))
14379
14380 (define-public python2-pyro
14381 (package
14382 (name "python2-pyro")
14383 (version "3.16")
14384 (source
14385 (origin
14386 (method url-fetch)
14387 (uri (pypi-uri "Pyro" version))
14388 (file-name (string-append "Pyro-" version ".tar.gz"))
14389 (sha256
14390 (base32
14391 "0y75wzdqbjy565rpxaxscav4j8xg060sa90lnmb7aypgaf251v8v"))))
14392 (build-system python-build-system)
14393 (arguments
14394 ;; Pyro is not compatible with Python 3
14395 `(#:python ,python-2
14396 ;; Pyro has no test cases for automatic execution
14397 #:tests? #f))
14398 (home-page "http://pythonhosted.org/Pyro/")
14399 (synopsis "Distributed object manager for Python")
14400 (description "Pyro is a Distributed Object Technology system
14401 written in Python that is designed to be easy to use. It resembles
14402 Java's Remote Method Invocation (RMI). It has less similarity to CORBA,
14403 which is a system and language independent Distributed Object Technology
14404 and has much more to offer than Pyro or RMI. Pyro 3.x is no
14405 longer maintained. New projects should use Pyro4 instead, which
14406 is the new Pyro version that is actively developed.")
14407 (license license:expat)))
14408
14409 (define-public python2-scientific
14410 (package
14411 (name "python2-scientific")
14412 (version "2.9.4")
14413 (source
14414 (origin
14415 (method git-fetch)
14416 (uri (git-reference
14417 (url "https://github.com/khinsen/ScientificPython")
14418 (commit (string-append "rel" version))))
14419 (file-name (git-file-name name version))
14420 (sha256
14421 (base32
14422 "16l48aj9fps9r7jyk8gpxppwrv0fqvlc13sayxskz28r5s6sjwbl"))))
14423 (build-system python-build-system)
14424 (inputs
14425 `(("netcdf" ,netcdf)))
14426 (propagated-inputs
14427 `(("python-numpy" ,python2-numpy-1.8)
14428 ("python-pyro" ,python2-pyro)))
14429 (arguments
14430 ;; ScientificPython is not compatible with Python 3
14431 `(#:python ,python-2
14432 #:tests? #f ; No test suite
14433 #:phases
14434 (modify-phases %standard-phases
14435 (replace 'build
14436 (lambda* (#:key inputs #:allow-other-keys)
14437 (invoke "python" "setup.py" "build"
14438 (string-append "--netcdf_prefix="
14439 (assoc-ref inputs "netcdf"))))))))
14440 (home-page "http://dirac.cnrs-orleans.fr/ScientificPython")
14441 (synopsis "Python modules for scientific computing")
14442 (description "ScientificPython is a collection of Python modules that are
14443 useful for scientific computing. Most modules are rather general (Geometry,
14444 physical units, automatic derivatives, ...) whereas others are more
14445 domain-specific (e.g. netCDF and PDB support). The library is currently
14446 not actively maintained and works only with Python 2 and NumPy < 1.9.")
14447 (license license:cecill-c)))
14448
14449 (define-public python2-mmtk
14450 (package
14451 (name "python2-mmtk")
14452 (version "2.7.12")
14453 (source
14454 (origin
14455 (method git-fetch)
14456 (uri (git-reference
14457 (url "https://github.com/khinsen/MMTK")
14458 (commit (string-append "rel" version))))
14459 (file-name (git-file-name name version))
14460 (sha256
14461 (base32
14462 "1fqwh3ba9jd42nigvn5shndgwb1zy7kh9520ncvqci7n8ffjr6p1"))))
14463 (build-system python-build-system)
14464 (native-inputs
14465 `(("netcdf" ,netcdf)))
14466 (propagated-inputs
14467 `(("python-scientific" ,python2-scientific)
14468 ("python-tkinter" ,python-2 "tk")))
14469 (arguments
14470 `(#:python ,python-2
14471 #:tests? #f
14472 #:phases
14473 (modify-phases %standard-phases
14474 (add-before 'build 'includes-from-scientific
14475 (lambda* (#:key inputs #:allow-other-keys)
14476 (mkdir-p "Include/Scientific")
14477 (copy-recursively
14478 (string-append
14479 (assoc-ref inputs "python-scientific")
14480 "/include/python2.7/Scientific")
14481 "Include/Scientific"))))))
14482 (home-page "http://dirac.cnrs-orleans.fr/MMTK")
14483 (synopsis "Python library for molecular simulation")
14484 (description "MMTK is a library for molecular simulations with an emphasis
14485 on biomolecules. It provides widely used methods such as Molecular Dynamics
14486 and normal mode analysis, but also basic routines for implementing new methods
14487 for simulation and analysis. The library is currently not actively maintained
14488 and works only with Python 2 and NumPy < 1.9.")
14489 (license license:cecill-c)))
14490
14491 (define-public python-phonenumbers
14492 (package
14493 (name "python-phonenumbers")
14494 (version "8.9.1")
14495 (source
14496 (origin
14497 (method url-fetch)
14498 (uri (pypi-uri "phonenumbers" version))
14499 (sha256
14500 (base32
14501 "03fmrgb4r8x3ykmddjs9i3zhs703in8smikj3a6447blqpimwyh1"))))
14502 (build-system python-build-system)
14503 (home-page
14504 "https://github.com/daviddrysdale/python-phonenumbers")
14505 (synopsis
14506 "Python library for dealing with international phone numbers")
14507 (description
14508 "This package provides a Python port of Google's libphonenumber library.")
14509 (license license:asl2.0)))
14510
14511 (define-public python2-phonenumbers
14512 (package-with-python2 python-phonenumbers))
14513
14514 (define-public python-send2trash
14515 (package
14516 (name "python-send2trash")
14517 (version "1.5.0")
14518 (source
14519 (origin (method git-fetch)
14520 ;; Source tarball on PyPI doesn't include tests.
14521 (uri (git-reference
14522 (url "https://github.com/hsoft/send2trash.git")
14523 (commit version)))
14524 (file-name (git-file-name name version))
14525 (sha256
14526 (base32
14527 "1c76zldhw2ay7q7r00nnzcampjz9lkqfcbzqpm0iqp5i6bmmv30v"))))
14528 (build-system python-build-system)
14529 (arguments
14530 '(#:phases
14531 (modify-phases %standard-phases
14532 (add-before 'check 'pre-check
14533 (lambda _
14534 (mkdir-p "/tmp/foo")
14535 (setenv "HOME" "/tmp/foo")
14536 #t)))))
14537 (home-page "https://github.com/hsoft/send2trash")
14538 (synopsis "Send files to the user's @file{~/Trash} directory")
14539 (description "This package provides a Python library to send files to the
14540 user's @file{~/Trash} directory.")
14541 (properties `((python2-variant . ,(delay python2-send2trash))))
14542 (license license:bsd-3)))
14543
14544 (define-public python2-send2trash
14545 (package
14546 (inherit (package-with-python2 (strip-python2-variant python-send2trash)))
14547 (arguments
14548 (substitute-keyword-arguments (package-arguments python-send2trash)
14549 ((#:phases phases)
14550 `(modify-phases ,phases
14551 (add-before 'check 'setenv
14552 (lambda _
14553 (setenv "PYTHONPATH"
14554 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
14555 #t))))))))
14556
14557 (define-public python-yapf
14558 (package
14559 (name "python-yapf")
14560 (version "0.29.0")
14561 (source
14562 (origin
14563 (method url-fetch)
14564 (uri (pypi-uri "yapf" version))
14565 (sha256
14566 (base32
14567 "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki"))))
14568 (build-system python-build-system)
14569 (home-page "https://github.com/google/yapf")
14570 (synopsis "Formatter for Python code")
14571 (description "YAPF is a formatter for Python code. It's based off of
14572 @dfn{clang-format}, developed by Daniel Jasper. In essence, the algorithm
14573 takes the code and reformats it to the best formatting that conforms to the
14574 style guide, even if the original code didn't violate the style guide.")
14575 (license license:asl2.0)))
14576
14577 (define-public python2-yapf
14578 (package-with-python2 python-yapf))
14579
14580 (define-public python-gyp
14581 (let ((commit "5e2b3ddde7cda5eb6bc09a5546a76b00e49d888f")
14582 (revision "0"))
14583 (package
14584 (name "python-gyp")
14585 ;; Google does not release versions,
14586 ;; based on second most recent commit date.
14587 (version (git-version "0.0.0" revision commit))
14588 (source
14589 (origin
14590 ;; Google does not release tarballs,
14591 ;; git checkout is needed.
14592 (method git-fetch)
14593 (uri (git-reference
14594 (url "https://chromium.googlesource.com/external/gyp")
14595 (commit commit)))
14596 (file-name (git-file-name name version))
14597 (sha256
14598 (base32
14599 "0fr7nxcrk292djmxzpcjaphnsd123k31gp8jnd91vwknhq6snmv9"))))
14600 (build-system python-build-system)
14601 (home-page "https://gyp.gsrc.io/")
14602 (synopsis "GYP is a Meta-Build system")
14603 (description
14604 "GYP builds build systems for large, cross platform applications.
14605 It can be used to generate XCode projects, Visual Studio projects, Ninja build
14606 files, and Makefiles.")
14607 (license license:bsd-3))))
14608
14609 (define-public python2-gyp
14610 (package-with-python2 python-gyp))
14611
14612 (define-public python-whatever
14613 (package
14614 (name "python-whatever")
14615 (version "0.6")
14616 (source
14617 (origin
14618 (method git-fetch)
14619 (uri (git-reference
14620 (url "https://github.com/Suor/whatever")
14621 (commit version)))
14622 (file-name (git-file-name name version))
14623 (sha256
14624 (base32 "1q7ajgqjfivxqsqgnhp4lc4p6jxyh4zprcsdbpd6dw54inaf0av5"))))
14625 (build-system python-build-system)
14626 (arguments
14627 `(#:phases
14628 (modify-phases %standard-phases
14629 (replace 'check
14630 (lambda _
14631 (invoke "py.test"))))))
14632 (native-inputs
14633 `(("python-pytest" ,python-pytest)))
14634 (home-page "http://github.com/Suor/whatever")
14635 (synopsis "Make anonymous functions by partial application of operators")
14636 (description "@code{whatever} provides an easy way to make anonymous
14637 functions by partial application of operators.")
14638 (license license:bsd-3)))
14639
14640 (define-public python2-whatever
14641 (package-with-python2 python-whatever))
14642
14643 (define-public python-funcy
14644 (package
14645 (name "python-funcy")
14646 (version "1.11")
14647 (source
14648 (origin
14649 (method git-fetch)
14650 (uri (git-reference
14651 (url "https://github.com/Suor/funcy.git")
14652 (commit version)))
14653 (sha256
14654 (base32 "1s98vkjnq3zq71737hn8xa15kssvmy1sfzsll3vrlv53902418mw"))
14655 (file-name (git-file-name name version))))
14656 (build-system python-build-system)
14657 (arguments
14658 `(#:phases
14659 (modify-phases %standard-phases
14660 (replace 'check
14661 (lambda _
14662 (invoke "py.test"))))))
14663 (native-inputs
14664 `(("python-pytest" ,python-pytest)
14665 ("python-whatever" ,python-whatever)))
14666 (home-page "http://github.com/Suor/funcy")
14667 (synopsis "Functional tools")
14668 (description "@code{funcy} is a library that provides functional tools.
14669 Examples are:
14670 @enumerate
14671 @item merge - Merges collections of the same type
14672 @item walk - Type-preserving map
14673 @item select - Selects a part of a collection
14674 @item take - Takes the first n items of a collection
14675 @item first - Takes the first item of a collection
14676 @item remove - Predicated-removes items of a collection
14677 @item concat - Concatenates two collections
14678 @item flatten - Flattens a collection with subcollections
14679 @item distinct - Returns only distinct items
14680 @item split - Predicated-splits a collection
14681 @item split_at - Splits a collection at a given item
14682 @item group_by - Groups items by group
14683 @item pairwise - Pairs off adjacent items
14684 @item partial - Partially-applies a function
14685 @item curry - Curries a function
14686 @item compose - Composes functions
14687 @item complement - Complements a predicate
14688 @item all_fn - \"all\" with predicate
14689 @end enumerate")
14690 (license license:bsd-3)))
14691
14692 (define-public python2-funcy
14693 (package-with-python2 python-funcy))
14694
14695 (define-public python-isoweek
14696 (package
14697 (name "python-isoweek")
14698 (version "1.3.3")
14699 (source
14700 (origin
14701 (method url-fetch)
14702 (uri (pypi-uri "isoweek" version))
14703 (sha256
14704 (base32
14705 "1s7zsf0pab0l9gn6456qadnz5i5h90hafcjwnhx5mq23qjxggwvk"))))
14706 (build-system python-build-system)
14707 (home-page "https://github.com/gisle/isoweek")
14708 (synopsis "Objects representing a week")
14709 (description "The @code{isoweek} module provide the class Week that
14710 implements the week definition of ISO 8601. This standard also defines
14711 a notation for identifying weeks; yyyyWww (where the W is a literal).
14712 Week instances stringify to this form.")
14713 (license license:bsd-3)))
14714
14715 (define-public python2-isoweek
14716 (package-with-python2 python-isoweek))
14717
14718 (define-public python-tokenize-rt
14719 (package
14720 (name "python-tokenize-rt")
14721 (version "2.0.1")
14722 (source
14723 (origin
14724 (method url-fetch)
14725 (uri (pypi-uri "tokenize-rt" version))
14726 (sha256
14727 (base32
14728 "1yjvbz7rvrz31zjyax1cgy3xhf4wb3j18jwnj4bnl77ca4gliyiw"))))
14729 (build-system python-build-system)
14730 (home-page "https://github.com/asottile/tokenize-rt")
14731 (synopsis "Wrapper around the stdlib tokenize which roundtrips.")
14732 (description
14733 "This Python library is a wrapper around @code{tokenize} from the Python
14734 standard library. It provides two additional tokens @code{ESCAPED_NL} and
14735 @code{UNIMPORTANT_WS}, and a @code{Token} data type. Use @code{src_to_tokens}
14736 and @code{tokens_to_src} to roundtrip.")
14737 (license license:expat)))
14738
14739 (define-public python-future-fstrings
14740 (package
14741 (name "python-future-fstrings")
14742 (version "0.4.1")
14743 (source
14744 (origin
14745 (method url-fetch)
14746 (uri (pypi-uri "future_fstrings" version))
14747 (sha256
14748 (base32
14749 "0ydxqz2dvns44g55p8ix2x18qkfk3aaz0m0dc70f3g6n8js35h47"))))
14750 (build-system python-build-system)
14751 (propagated-inputs
14752 `(("python-tokenize-rt" ,python-tokenize-rt)))
14753 (home-page "https://github.com/asottile/future-fstrings")
14754 (synopsis "Backport of fstrings to Python < 3.6")
14755 (description
14756 "This package provides a UTF-8 compatible encoding
14757 @code{future_fstrings}, which performs source manipulation. It decodes the
14758 source bytes using the UTF-8 encoding and then rewrites Python 3.6 style
14759 @code{f} strings.")
14760 (license license:expat)))
14761
14762 (define-public python-typed-ast
14763 (package
14764 (name "python-typed-ast")
14765 (version "1.4.0")
14766 (source
14767 (origin
14768 (method git-fetch)
14769 (uri (git-reference
14770 (url "https://github.com/python/typed_ast.git")
14771 (commit version)))
14772 (sha256
14773 (base32 "0l0hz809f7i356kmqkvfsaswiidb98j9hs9rrjnfawzqcbffzgyb"))
14774 (file-name (git-file-name name version))))
14775 (build-system python-build-system)
14776 (arguments
14777 `(#:modules ((guix build utils)
14778 (guix build python-build-system)
14779 (ice-9 ftw)
14780 (srfi srfi-1)
14781 (srfi srfi-26))
14782 #:phases
14783 (modify-phases %standard-phases
14784 (replace 'check
14785 (lambda _
14786 (let ((cwd (getcwd)))
14787 (setenv "PYTHONPATH"
14788 (string-append cwd "/build/"
14789 (find (cut string-prefix? "lib" <>)
14790 (scandir (string-append cwd "/build")))
14791 ":"
14792 (getenv "PYTHONPATH"))))
14793 (invoke "pytest")
14794 #t)))))
14795 (native-inputs `(("python-pytest" ,python-pytest)))
14796 (home-page "https://github.com/python/typed_ast")
14797 (synopsis "Fork of Python @code{ast} modules with type comment support")
14798 (description "This package provides a parser similar to the standard
14799 @code{ast} library. Unlike @code{ast}, the parsers in @code{typed_ast}
14800 include PEP 484 type comments and are independent of the version of Python
14801 under which they are run. The @code{typed_ast} parsers produce the standard
14802 Python AST (plus type comments), and are both fast and correct, as they are
14803 based on the CPython 2.7 and 3.7 parsers.")
14804 ;; See the file "LICENSE" for the details.
14805 (license (list license:psfl
14806 license:asl2.0
14807 license:expat)))) ;ast27/Parser/spark.py
14808
14809 (define-public python-typing
14810 (package
14811 (name "python-typing")
14812 (version "3.6.6")
14813 (source
14814 (origin
14815 (method url-fetch)
14816 (uri (pypi-uri "typing" version))
14817 (sha256
14818 (base32
14819 "0ba9acs4awx15bf9v3nrs781msbd2nx826906nj6fqks2bvca9s0"))))
14820 (build-system python-build-system)
14821 (home-page "https://docs.python.org/3/library/typing.html")
14822 (synopsis "Type hints for Python")
14823 (description "This is a backport of the standard library @code{typing}
14824 module to Python versions older than 3.5. Typing defines a standard notation
14825 for Python function and variable type annotations. The notation can be used
14826 for documenting code in a concise, standard format, and it has been designed
14827 to also be used by static and runtime type checkers, static analyzers, IDEs
14828 and other tools.")
14829 (license license:psfl)))
14830
14831 (define-public python2-typing
14832 (package-with-python2 python-typing))
14833
14834 (define-public python-typing-extensions
14835 (package
14836 (name "python-typing-extensions")
14837 (version "3.7.2")
14838 (source
14839 (origin
14840 (method url-fetch)
14841 (uri (pypi-uri "typing_extensions" version))
14842 (sha256
14843 (base32
14844 "0wfsv71pvkyf2na938l579jh0v3kzl6g744ijgnahcwd4d9x0b7v"))))
14845 (build-system python-build-system)
14846 (home-page
14847 "https://github.com/python/typing/blob/master/typing_extensions/README.rst")
14848 (synopsis "Experimental type hints for Python")
14849 (description
14850 "The typing_extensions module contains additional @code{typing} hints not
14851 yet present in the of the @code{typing} standard library.
14852 Included are implementations of:
14853 @enumerate
14854 @item ClassVar
14855 @item ContextManager
14856 @item Counter
14857 @item DefaultDict
14858 @item Deque
14859 @item NewType
14860 @item NoReturn
14861 @item overload
14862 @item Protocol
14863 @item runtime
14864 @item Text
14865 @item Type
14866 @item TYPE_CHECKING
14867 @item AsyncGenerator
14868 @end enumerate\n")
14869 (license license:psfl)))
14870
14871 (define-public bpython
14872 (package
14873 (name "bpython")
14874 (version "0.18")
14875 (source
14876 (origin
14877 (method url-fetch)
14878 (uri (pypi-uri "bpython" version))
14879 (sha256
14880 (base32 "1hl6frgvr2lqaxqczl8amg9xih32b3gzv429vs0qrjb8wpdj1k2n"))))
14881 (build-system python-build-system)
14882 (arguments
14883 `(#:phases
14884 (modify-phases %standard-phases
14885 (add-after 'unpack 'remove-failing-test
14886 (lambda _
14887 ;; Remove failing test. FIXME: make it pass
14888 (delete-file "bpython/test/test_args.py")
14889 #t))
14890 (add-after 'wrap 'add-aliases
14891 ;; for symmetry to bpython2, add symlinks bypthon3, bpdb3, etc.
14892 (lambda* (#:key outputs #:allow-other-keys)
14893 (let ((out (assoc-ref outputs "out")))
14894 (for-each
14895 (lambda (old new)
14896 (symlink old (string-append out "/bin/" new)))
14897 '("bpython" "bpython-curses" "bpython-urwid" "bpdb")
14898 '("bpython3" "bpython3-curses" "bpython3-urwid" "bpdb3")))
14899 #t)))))
14900 (propagated-inputs
14901 `(("python-pygments" ,python-pygments)
14902 ("python-requests" ,python-requests)
14903 ("python-babel" ,python-babel) ; optional, for internationalization
14904 ("python-curtsies" ,python-curtsies) ; >= 0.1.18
14905 ("python-greenlet" ,python-greenlet)
14906 ("python-urwid" ,python-urwid) ; for bpython-urwid only
14907 ("python-six" ,python-six)))
14908 (native-inputs
14909 `(("python-sphinx" ,python-sphinx)
14910 ("python-mock" ,python-mock)))
14911 (home-page "https://bpython-interpreter.org/")
14912 (synopsis "Fancy interface to the Python interpreter")
14913 (description "Bpython is a fancy interface to the Python
14914 interpreter. bpython's main features are
14915
14916 @enumerate
14917 @item in-line syntax highlighting,
14918 @item readline-like autocomplete with suggestions displayed as you type,
14919 @item expected parameter list for any Python function,
14920 @item \"rewind\" function to pop the last line of code from memory and
14921 re-evaluate,
14922 @item send the code you've entered off to a pastebin,
14923 @item save the code you've entered to a file, and
14924 @item auto-indentation.
14925 @end enumerate")
14926 (license license:expat)))
14927
14928 (define-public bpython2
14929 (let ((base (package-with-python2
14930 (strip-python2-variant bpython))))
14931 (package (inherit base)
14932 (name "bpython2")
14933 (arguments
14934 `(#:python ,python-2
14935 #:phases
14936 (modify-phases %standard-phases
14937 (add-after 'unpack 'remove-failing-test
14938 (lambda _
14939 ;; Remove failing test. FIXME: make it pass
14940 (delete-file "bpython/test/test_args.py")
14941 ;; Disable failing test-cases (renaming inhibits they are
14942 ;; discovered)
14943 (substitute* "bpython/test/test_curtsies_repl.py"
14944 (("^(\\s*def )(test_get_last_word_with_prev_line\\W)" _ a b)
14945 (string-append a "xxx_off_" b))
14946 (("^(\\s*def )(test_complex\\W)" _ a b)
14947 (string-append a "xxx_off_" b)))
14948 #t))
14949 (add-before 'build 'rename-scripts
14950 ;; rename the scripts to bypthon2, bpdb2, etc.
14951 (lambda _
14952 (substitute* "setup.py"
14953 (("^(\\s+'bpdb)(\\s+=.*',?)\\s*?$" _ name rest)
14954 (string-append name "2" rest "\n"))
14955 (("^(\\s+'bpython)(-\\S+)?(\\s+=.*',?)\\s*?$" _ name sub rest)
14956 (string-append name "2" (or sub "") rest "\n")))
14957 #t))))))))
14958
14959 (define-public python-pyinotify
14960 (package
14961 (name "python-pyinotify")
14962 (version "0.9.6")
14963 (source (origin
14964 (method url-fetch)
14965 (uri (pypi-uri "pyinotify" version))
14966 (sha256
14967 (base32
14968 "1x3i9wmzw33fpkis203alygfnrkcmq9w1aydcm887jh6frfqm6cw"))))
14969 (build-system python-build-system)
14970 (arguments `(#:tests? #f)) ;no tests
14971 (home-page "https://github.com/seb-m/pyinotify")
14972 (synopsis "Python library for monitoring inotify events")
14973 (description
14974 "@code{pyinotify} provides a Python interface for monitoring
14975 file system events on Linux.")
14976 (license license:expat)))
14977
14978 (define-public python2-pyinotify
14979 (package-with-python2 python-pyinotify))
14980
14981 ;; Ada parser uses this version.
14982 (define-public python2-quex-0.67.3
14983 (package
14984 (name "python2-quex")
14985 (version "0.67.3")
14986 (source
14987 (origin
14988 (method url-fetch)
14989 (uri (string-append "mirror://sourceforge/quex/HISTORY/"
14990 (version-major+minor version)
14991 "/quex-" version ".zip"))
14992 (sha256
14993 (base32
14994 "14gv8ll3ipqv4kyc2xiy891nrmjl4ic823zfyx8hassagyclyppw"))))
14995 (build-system python-build-system)
14996 (native-inputs
14997 `(("unzip" ,unzip)))
14998 (arguments
14999 `(#:python ,python-2
15000 #:tests? #f
15001 #:phases
15002 (modify-phases %standard-phases
15003 (delete 'configure)
15004 (delete 'build)
15005 (replace 'install
15006 (lambda* (#:key outputs #:allow-other-keys)
15007 (let* ((out (assoc-ref outputs "out"))
15008 (share/quex (string-append out "/share/quex"))
15009 (bin (string-append out "/bin")))
15010 (copy-recursively "." share/quex)
15011 (mkdir-p bin)
15012 (symlink (string-append share/quex "/quex-exe.py")
15013 (string-append bin "/quex"))
15014 #t))))))
15015 (native-search-paths
15016 (list (search-path-specification
15017 (variable "QUEX_PATH")
15018 (files '("share/quex")))))
15019 (home-page "http://quex.sourceforge.net/")
15020 (synopsis "Lexical analyzer generator in Python")
15021 (description "@code{quex} is a lexical analyzer generator in Python.")
15022 (license license:lgpl2.1+))) ; Non-military
15023
15024 (define-public python2-quex
15025 (package (inherit python2-quex-0.67.3)
15026 (name "python2-quex")
15027 (version "0.68.1")
15028 (source
15029 (origin
15030 (method url-fetch)
15031 (uri (string-append "mirror://sourceforge/quex/DOWNLOAD/quex-" version ".tar.gz"))
15032 (sha256
15033 (base32
15034 "0svc9nla3b9145d6b7fb9dizx412l3difzqw0ilh9lz52nsixw8j"))
15035 (file-name (string-append name "-" version ".tar.gz"))))))
15036
15037 (define-public python-more-itertools
15038 (package
15039 (name "python-more-itertools")
15040 (version "7.1.0")
15041 (source
15042 (origin
15043 (method url-fetch)
15044 (uri (pypi-uri "more-itertools" version))
15045 (sha256
15046 (base32
15047 "16phg2f2dvm6ci5wr49ncha5lmc0m2in3bsl33c61vzca4gkvd4b"))))
15048 (build-system python-build-system)
15049 (home-page "https://github.com/erikrose/more-itertools")
15050 (synopsis "More routines for operating on iterables, beyond itertools")
15051 (description "Python's built-in @code{itertools} module implements a
15052 number of iterator building blocks inspired by constructs from APL, Haskell,
15053 and SML. @code{more-itertools} includes additional building blocks for
15054 working with iterables.")
15055 (properties `((python2-variant . ,(delay python2-more-itertools))))
15056 (license license:expat)))
15057
15058 ;; The 5.x series are the last versions supporting Python 2.7.
15059 (define-public python2-more-itertools
15060 (package
15061 (inherit python-more-itertools)
15062 (name "python2-more-itertools")
15063 (version "5.0.0")
15064 (source (origin
15065 (method url-fetch)
15066 (uri (pypi-uri "more-itertools" version))
15067 (sha256
15068 (base32
15069 "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q"))))
15070 (arguments
15071 `(#:python ,python2-minimal))
15072 (propagated-inputs
15073 `(("python2-six" ,python2-six-bootstrap)))))
15074
15075 (define-public python-latexcodec
15076 (package
15077 (name "python-latexcodec")
15078 (version "1.0.7")
15079 (source
15080 (origin
15081 (method url-fetch)
15082 (uri (pypi-uri "latexcodec" version))
15083 (sha256
15084 (base32 "0wnp3yqcgx0rpy8dz51vh75lbp2qif67da19zi7m3ca98n887hgb"))))
15085 (build-system python-build-system)
15086 (inputs
15087 `(("python-six" ,python-six)))
15088 (home-page "https://readthedocs.org/projects/latexcodec/")
15089 (synopsis "Work with LaTeX code in Python")
15090 (description "Lexer and codec to work with LaTeX code in Python.")
15091 (license license:expat)))
15092
15093 (define-public python-pybtex
15094 (package
15095 (name "python-pybtex")
15096 (version "0.22.2")
15097 (source
15098 (origin
15099 (method url-fetch)
15100 (uri (pypi-uri "pybtex" version))
15101 (sha256
15102 (base32 "070wfcmxrd7xg1si421mi9150gmx2qwx431nwf69sq3hhmgnx080"))))
15103 (build-system python-build-system)
15104 (native-inputs
15105 `(("python-nose" ,python-nose)))
15106 (inputs
15107 `(("python-latexcodec" ,python-latexcodec)
15108 ("python-pyyaml" ,python-pyyaml)
15109 ("python-six" ,python-six)))
15110 (arguments
15111 `(#:test-target "nosetests"))
15112 (home-page "https://pybtex.org/")
15113 (synopsis "BibTeX-compatible bibliography processor")
15114 (description "Pybtex is a BibTeX-compatible bibliography processor written
15115 in Python. You can simply type pybtex instead of bibtex.")
15116 (license license:expat)))
15117
15118 (define-public python-onetimepass
15119 (package
15120 (name "python-onetimepass")
15121 (version "1.0.1")
15122 (source
15123 (origin
15124 (method url-fetch)
15125 (uri (pypi-uri "onetimepass" version))
15126 (sha256
15127 (base32 "09vagxgbq78wvq4xbikmn2hpqqsa2i96kqsmphf7dqynfv0dlsd5"))))
15128 (build-system python-build-system)
15129 (propagated-inputs `(("python-six" ,python-six)))
15130 (home-page "https://github.com/tadeck/onetimepass/")
15131 (synopsis "One-time password library")
15132 (description "Python one-time password library for HMAC-based (HOTP) and
15133 time-based (TOTP) passwords.")
15134 (license license:expat)))
15135
15136 (define-public python-parso
15137 (package
15138 (name "python-parso")
15139 (version "0.5.1")
15140 (source
15141 (origin
15142 (method url-fetch)
15143 (uri (pypi-uri "parso" version))
15144 (sha256
15145 (base32
15146 "171a9ivhxwsd52h1cgsz40zgzpgzscn7yqb7sdjhy8m1lzj0wsv6"))))
15147 (native-inputs
15148 `(("python-pytest" ,python-pytest)))
15149 (build-system python-build-system)
15150 (arguments
15151 `(#:phases (modify-phases %standard-phases
15152 (replace 'check
15153 (lambda _ (invoke "pytest" "-vv"))))))
15154 (home-page "https://github.com/davidhalter/parso")
15155 (synopsis "Python Parser")
15156 (description "Parso is a Python parser that supports error recovery and
15157 round-trip parsing for different Python versions (in multiple Python versions).
15158 Parso is also able to list multiple syntax errors in your Python file.")
15159 (license license:expat)))
15160
15161 (define-public python2-parso
15162 (package-with-python2 python-parso))
15163
15164 (define-public python-async-generator
15165 (package
15166 (name "python-async-generator")
15167 (version "1.10")
15168 (source
15169 (origin
15170 (method url-fetch)
15171 (uri (pypi-uri "async_generator" version))
15172 (sha256
15173 (base32
15174 "0i11f6z6lix8ixi3vsk6s76zvvpmgrw6zjrcwjm0m4hjdh83vfvf"))))
15175 (build-system python-build-system)
15176 (native-inputs
15177 `(("python-pytest" ,python-pytest)))
15178 (home-page "https://github.com/python-trio/async_generator")
15179 (synopsis "Async generators and context managers for Python 3.5+")
15180 (description "@code{async_generator} back-ports Python 3.6's native async
15181 generators and Python 3.7's context managers into Python 3.5.")
15182 ;; Dual licensed.
15183 (license (list license:expat license:asl2.0))))
15184
15185 (define-public python-async-timeout
15186 (package
15187 (name "python-async-timeout")
15188 (version "3.0.1")
15189 (source
15190 (origin
15191 (method url-fetch)
15192 (uri (pypi-uri "async-timeout" version))
15193 (sha256
15194 (base32
15195 "0pscbyr840m7fyfc3r8zv9kgkwdcn9f78p7zsrczciwd09m82g0c"))))
15196 (build-system python-build-system)
15197 (home-page "https://github.com/aio-libs/async_timeout/")
15198 (synopsis "Timeout context manager for asyncio programs")
15199 (description "@code{async-timeout} provides a timeout timeout context
15200 manager compatible with @code{asyncio}.")
15201 (license license:asl2.0)))
15202
15203 (define-public python-glob2
15204 (package
15205 (name "python-glob2")
15206 (version "0.7")
15207 (source
15208 (origin
15209 (method git-fetch)
15210 (uri (git-reference
15211 (url "https://github.com/miracle2k/python-glob2.git")
15212 (commit (string-append "v" version))))
15213 (file-name (git-file-name name version))
15214 (sha256
15215 (base32 "160nh2ay9lw2hi0rixpzb2k87r6ql56k0j2cm87lqz8xc8zbw919"))))
15216 (build-system python-build-system)
15217 (home-page "https://github.com/miracle2k/python-glob2/")
15218 (synopsis "Extended Version of the python buildin glob module")
15219 (description "This is an extended version of the Python
15220 @url{http://docs.python.org/library/glob.html, built-in glob module} which
15221 adds:
15222
15223 @itemize
15224 @item The ability to capture the text matched by glob patterns, and return
15225 those matches alongside the file names.
15226 @item A recursive @code{**} globbing syntax, akin for example to the
15227 @code{globstar} option of Bash.
15228 @item The ability to replace the file system functions used, in order to glob
15229 on virtual file systems.
15230 @item Compatible with Python 2 and Python 3 (tested with 3.3).
15231 @end itemize
15232
15233 Glob2 currently based on the glob code from Python 3.3.1.")
15234 (license license:bsd-2)))
15235
15236 (define-public python2-glob2
15237 (package-with-python2 python-glob2))
15238
15239 (define-public python-gipc
15240 (package
15241 (name "python-gipc")
15242 (version "0.6.0")
15243 (source
15244 (origin
15245 (method url-fetch)
15246 (uri (pypi-uri "gipc" version ".zip"))
15247 (sha256
15248 (base32
15249 "0pd9by719qh882hqs6xpby61sn1x5h98hms5p2p8yqnycrf1s0h2"))))
15250 (build-system python-build-system)
15251 (native-inputs
15252 `(("unzip" ,unzip)))
15253 (propagated-inputs
15254 `(("python-gevent" ,python-gevent)))
15255 (home-page "http://gehrcke.de/gipc")
15256 (synopsis "Child process management in the context of gevent")
15257 (description "Usage of Python's multiprocessing package in a
15258 gevent-powered application may raise problems. With @code{gipc},
15259 process-based child processes can safely be created anywhere within a
15260 gevent-powered application.")
15261 (license license:expat)))
15262
15263 (define-public python2-gipc
15264 (package-with-python2 python-gipc))
15265
15266 (define-public python-fusepy
15267 (package
15268 (name "python-fusepy")
15269 (version "2.0.4")
15270 (source
15271 (origin
15272 (method url-fetch)
15273 (uri (pypi-uri "fusepy" version))
15274 (sha256
15275 (base32
15276 "0v5grm4zyf58hsplwsxfbihddw95lz9w8cy3rpzbyha287swgx8h"))))
15277 (build-system python-build-system)
15278 (arguments
15279 `(#:phases
15280 (modify-phases %standard-phases
15281 (add-before 'build 'set-library-file-name
15282 (lambda* (#:key inputs #:allow-other-keys)
15283 (let ((fuse (assoc-ref inputs "fuse")))
15284 (substitute* "fuse.py"
15285 (("find_library\\('fuse'\\)")
15286 (string-append "'" fuse "/lib/libfuse.so'")))
15287 #t))))))
15288 (propagated-inputs
15289 `(("fuse" ,fuse)))
15290 (home-page "https://github.com/fusepy/fusepy")
15291 (synopsis "Simple ctypes bindings for FUSE")
15292 (description "Python module that provides a simple interface to FUSE and
15293 MacFUSE. The binding is created using the standard @code{ctypes} library.")
15294 (license license:isc)))
15295
15296 (define-public python2-fusepy
15297 (package-with-python2 python-fusepy))
15298
15299 (define-public python2-gdrivefs
15300 (package
15301 (name "python2-gdrivefs")
15302 (version "0.14.9")
15303 (source
15304 (origin
15305 (method url-fetch)
15306 (uri (pypi-uri "gdrivefs" version))
15307 (sha256
15308 (base32
15309 "0v9sp2cfg4ki3wagkwf3rnfpjhvgf845anz3757il9z95yvvcvb7"))))
15310 (build-system python-build-system)
15311 (arguments
15312 `(#:python ,python-2
15313 #:phases
15314 (modify-phases %standard-phases
15315 (add-before 'build 'patch-setup-py
15316 (lambda _
15317 ;; Update requirements from dependency==version
15318 ;; to dependency>=version
15319 (substitute* "gdrivefs/resources/requirements.txt"
15320 (("==") ">="))
15321 #t)))))
15322 (native-inputs
15323 `(("python2-gipc" ,python2-gipc)
15324 ("python2-gevent" ,python2-gevent)
15325 ("python2-greenlet" ,python2-greenlet)
15326 ("python2-httplib2" ,python2-httplib2)
15327 ("python2-uritemplate" ,python2-uritemplate)
15328 ("python2-oauth2client" ,python2-oauth2client)
15329 ("python2-six" ,python2-six)))
15330 (propagated-inputs
15331 `(("python2-dateutil" ,python2-dateutil)
15332 ("python2-fusepy" ,python2-fusepy)
15333 ("python2-google-api-client" ,python2-google-api-client)))
15334 (home-page "https://github.com/dsoprea/GDriveFS")
15335 (synopsis "Mount Google Drive as a local file system")
15336 (description "@code{gdrivefs} provides a FUSE wrapper for Google Drive
15337 under Python 2.7.")
15338 (license license:gpl2)))
15339
15340 (define-public pybind11
15341 (package
15342 (name "pybind11")
15343 (version "2.3.0")
15344 (source (origin
15345 (method git-fetch)
15346 (uri (git-reference
15347 (url "https://github.com/pybind/pybind11.git")
15348 (commit (string-append "v" version))))
15349 (sha256
15350 (base32
15351 "11b6dniri8m05spfd2a19irz82shf4sdca73566bniggrf3zclnf"))
15352 (file-name (git-file-name name version))))
15353 (build-system cmake-build-system)
15354 (native-inputs
15355 `(("python" ,python)
15356 ("python-pytest" ,python-pytest)))
15357 (arguments
15358 `(#:test-target "check"))
15359 (home-page "https://github.com/pybind/pybind11/")
15360 (synopsis "Seamless operability between C++11 and Python")
15361 (description "pybind11 is a lightweight header-only library that exposes
15362 C++ types in Python and vice versa, mainly to create Python bindings of
15363 existing C++ code. Its goals and syntax are similar to the excellent
15364 Boost.Python library by David Abrahams: to minimize boilerplate code in
15365 traditional extension modules by inferring type information using compile-time
15366 introspection.")
15367 (license license:expat)))
15368
15369 (define-public python-fasteners
15370 (package
15371 (name "python-fasteners")
15372 (version "0.14.1")
15373 (source
15374 (origin
15375 (method url-fetch)
15376 (uri (pypi-uri "fasteners" version))
15377 (sha256
15378 (base32
15379 "063y20kx01ihbz2mziapmjxi2cd0dq48jzg587xdsdp07xvpcz22"))))
15380 (build-system python-build-system)
15381 (propagated-inputs
15382 `(("python-monotonic" ,python-monotonic)
15383 ("python-six" ,python-six)
15384 ("python-testtools" ,python-testtools)))
15385 (home-page "https://github.com/harlowja/fasteners")
15386 (synopsis "Python package that provides useful locks")
15387 (description
15388 "This package provides a Python program that provides following locks:
15389
15390 @itemize
15391 @item Locking decorator
15392 @item Reader-writer locks
15393 @item Inter-process locks
15394 @item Generic helpers
15395 @end itemize\n")
15396 (properties `((python2-variant . ,(delay python2-fasteners))))
15397 (license license:asl2.0)))
15398
15399 (define-public python2-fasteners
15400 (let ((base (package-with-python2 (strip-python2-variant python-fasteners))))
15401 (package
15402 (inherit base)
15403 (propagated-inputs
15404 `(("python2-futures" ,python2-futures)
15405 ,@(package-propagated-inputs base))))))
15406
15407 (define-public python-requests-file
15408 (package
15409 (name "python-requests-file")
15410 (version "1.4.3")
15411 (source
15412 (origin
15413 (method url-fetch)
15414 (uri (pypi-uri "requests-file" version))
15415 (sha256
15416 (base32
15417 "1yp2jaxg3v86pia0q512dg3hz6s9y5vzdivsgrba1kds05ial14g"))))
15418 (build-system python-build-system)
15419 (propagated-inputs
15420 `(("python-requests" ,python-requests)
15421 ("python-six" ,python-six)))
15422 (home-page
15423 "https://github.com/dashea/requests-file")
15424 (synopsis "File transport adapter for Requests")
15425 (description
15426 "Requests-File is a transport adapter for use with the Requests Python
15427 library to allow local file system access via @code{file://} URLs.")
15428 (license license:asl2.0)))
15429
15430 (define-public python2-requests-file
15431 (package-with-python2 python-requests-file))
15432
15433 (define-public python-tldextract
15434 (package
15435 (name "python-tldextract")
15436 (version "2.2.0")
15437 (source
15438 (origin
15439 (method url-fetch)
15440 (uri (pypi-uri "tldextract" version))
15441 (sha256
15442 (base32
15443 "1d5s8v6kpsgazyahflhji1cfdcf89rv7l7z55v774bhzvcjp2y99"))))
15444 (build-system python-build-system)
15445 (native-inputs
15446 `(("python-pytest" ,python-pytest)
15447 ("python-responses" ,python-responses)))
15448 (propagated-inputs
15449 `(("python-idna" ,python-idna)
15450 ("python-requests" ,python-requests)
15451 ("python-requests-file" ,python-requests-file)))
15452 (home-page
15453 "https://github.com/john-kurkowski/tldextract")
15454 (synopsis
15455 "Separate the TLD from the registered domain and subdomains of a URL")
15456 (description
15457 "TLDExtract accurately separates the TLD from the registered domain and
15458 subdomains of a URL, using the Public Suffix List. By default, this includes
15459 the public ICANN TLDs and their exceptions. It can optionally support the
15460 Public Suffix List's private domains as well.")
15461 (license license:bsd-3)))
15462
15463 (define-public python2-tldextract
15464 (package-with-python2 python-tldextract))
15465
15466 (define-public python-pynamecheap
15467 (package
15468 (name "python-pynamecheap")
15469 (version "0.0.3")
15470 (source
15471 (origin
15472 (method url-fetch)
15473 (uri (pypi-uri "PyNamecheap" version))
15474 (sha256
15475 (base32
15476 "0wkbwz208j8nfrsmzmclvxg22ymknn0mlz76wbdza9k2bx2zja6l"))))
15477 (build-system python-build-system)
15478 (propagated-inputs
15479 `(("python-requests" ,python-requests)))
15480 (home-page
15481 "https://github.com/Bemmu/PyNamecheap")
15482 (synopsis
15483 "Namecheap API client in Python")
15484 (description
15485 "PyNamecheap is a Namecheap API client in Python.")
15486 (license license:expat)))
15487
15488 (define-public python2-pynamecheap
15489 (package-with-python2 python-pynamecheap))
15490
15491 (define-public python-dns-lexicon
15492 (package
15493 (name "python-dns-lexicon")
15494 (version "2.4.0")
15495 (source
15496 (origin
15497 (method url-fetch)
15498 (uri (pypi-uri "dns-lexicon" version))
15499 (sha256
15500 (base32
15501 "0jdn3ns71bsybr7njgsqr9xlxsqh7zh6phn4ld0liazqdn2l5f6m"))))
15502 (build-system python-build-system)
15503 (arguments
15504 `(#:tests? #f)) ;requires internet access
15505 (propagated-inputs
15506 `(("python-future" ,python-future)
15507 ("python-pynamecheap" ,python-pynamecheap)
15508 ("python-requests" ,python-requests)
15509 ("python-tldextract" ,python-tldextract)
15510 ("python-urllib3" ,python-urllib3)))
15511 (home-page "https://github.com/AnalogJ/lexicon")
15512 (synopsis
15513 "Manipulate DNS records on various DNS providers")
15514 (description
15515 "Lexicon provides a way to manipulate DNS records on multiple DNS
15516 providers in a standardized way. It has a CLI but it can also be used as a
15517 Python library. It was designed to be used in automation, specifically with
15518 Let's Encrypt.")
15519 (license license:expat)))
15520
15521 (define-public python2-dns-lexicon
15522 (package-with-python2 python-dns-lexicon))
15523
15524 (define-public python-commandlines
15525 (package
15526 (name "python-commandlines")
15527 (version "0.4.1")
15528 (source
15529 (origin
15530 (method url-fetch)
15531 (uri (pypi-uri "commandlines" version))
15532 (sha256
15533 (base32
15534 "0r7xcr0knv02p4mswa2bng61nn8nbhhrs6kvdnb9bb3hhjvm1dl6"))))
15535 (build-system python-build-system)
15536 (home-page "https://github.com/chrissimpkins/commandlines")
15537 (synopsis "Command line argument to object parsing library")
15538 (description
15539 "@code{Commandlines} is a Python library for command line application
15540 development that supports command line argument parsing, command string
15541 validation testing and application logic.")
15542 (license license:expat)))
15543
15544 ;; Make sure to upgrade python-llvmlite in (gnu packages llvm) together with
15545 ;; python-numba. They have a very unflexible relationship.
15546 (define-public python-numba
15547 (package
15548 (name "python-numba")
15549 (version "0.46.0")
15550 (source
15551 (origin
15552 (method url-fetch)
15553 (uri (pypi-uri "numba" version))
15554 (sha256
15555 (base32
15556 "1vnfzcq6fcnkmdms6114d49awvvj5181fl7z1wlha27qc2paxjy2"))))
15557 (build-system python-build-system)
15558 (arguments
15559 `(#:modules ((guix build utils)
15560 (guix build python-build-system)
15561 (ice-9 ftw)
15562 (srfi srfi-1)
15563 (srfi srfi-26))
15564 #:phases
15565 (modify-phases %standard-phases
15566 (add-after 'unpack 'disable-proprietary-features
15567 (lambda _
15568 (setenv "NUMBA_DISABLE_HSA" "1")
15569 (setenv "NUMBA_DISABLE_CUDA" "1")
15570 #t))
15571 (add-after 'unpack 'remove-failing-tests
15572 (lambda _
15573 ;; FIXME: These tests fail for unknown reasons:
15574 ;; test_non_writable_pycache, test_non_creatable_pycache, and
15575 ;; test_frozen (all in numba.tests.test_dispatcher.TestCache).
15576 (substitute* "numba/tests/test_dispatcher.py"
15577 (("def test(_non_writable_pycache)" _ m)
15578 (string-append "def guix_skip" m))
15579 (("def test(_non_creatable_pycache)" _ m)
15580 (string-append "def guix_skip" m))
15581 (("def test(_frozen)" _ m)
15582 (string-append "def guix_skip" m)))
15583
15584 ;; These tests fail because we don't run the tests from the build
15585 ;; directory: test_setup_py_distutils, test_setup_py_setuptools
15586 ;; They are in numba.tests.test_pycc.TestDistutilsSupport.
15587 (substitute* "numba/tests/test_pycc.py"
15588 (("def test(_setup_py_distutils|_setup_py_setuptools)" _ m)
15589 (string-append "def guix_skip" m)))
15590
15591 ;; These tests fail because our version of Python does not have
15592 ;; a recognizable front-end for the Numba distribution to use
15593 ;; to check against.
15594 (substitute* "numba/tests/test_entrypoints.py"
15595 (("def test(_init_entrypoint)" _ m)
15596 (string-append "def guix_skip" m)))
15597 (substitute* "numba/tests/test_jitclasses.py"
15598 (("def test(_jitclass_longlabel_not_truncated)" _ m)
15599 (string-append "def guix_skip" m)))
15600 #t))
15601 (replace 'check
15602 (lambda _
15603 (let ((cwd (getcwd)))
15604 (setenv "PYTHONPATH"
15605 (string-append cwd "/build/"
15606 (find (cut string-prefix? "lib" <>)
15607 (scandir (string-append cwd "/build")))
15608 ":"
15609 (getenv "PYTHONPATH")))
15610 ;; Something is wrong with the PYTHONPATH when running the
15611 ;; tests from the build directory, as it complains about not being
15612 ;; able to import certain modules.
15613 (with-directory-excursion "/tmp"
15614 (invoke "python3" "-m" "numba.runtests" "-v" "-m")))
15615 #t)))))
15616 (propagated-inputs
15617 `(("python-llvmlite" ,python-llvmlite)
15618 ("python-numpy" ,python-numpy)
15619 ("python-singledispatch" ,python-singledispatch)))
15620 ;; Needed for tests.
15621 (inputs
15622 `(("python-jinja2" ,python-jinja2)
15623 ("python-pygments" ,python-pygments)))
15624 (home-page "https://numba.pydata.org")
15625 (synopsis "Compile Python code using LLVM")
15626 (description "Numba gives you the power to speed up your applications with
15627 high performance functions written directly in Python. With a few
15628 annotations, array-oriented and math-heavy Python code can be just-in-time
15629 compiled to native machine instructions, similar in performance to C, C++ and
15630 Fortran, without having to switch languages or Python interpreters.
15631
15632 Numba works by generating optimized machine code using the LLVM compiler
15633 infrastructure at import time, runtime, or statically (using the included pycc
15634 tool).")
15635 (license license:bsd-3)))
15636
15637 (define-public python-anndata
15638 (package
15639 (name "python-anndata")
15640 (version "0.6.18")
15641 (source
15642 (origin
15643 (method url-fetch)
15644 (uri (pypi-uri "anndata" version))
15645 (sha256
15646 (base32
15647 "03x83yjaccbqszj7x4fwwmpil0ai59yx64d1zmf2691za3j03w73"))))
15648 (build-system python-build-system)
15649 (propagated-inputs
15650 `(("python-h5py" ,python-h5py)
15651 ("python-natsort" ,python-natsort)
15652 ("python-pandas" ,python-pandas)
15653 ("python-scipy" ,python-scipy)))
15654 (home-page "https://github.com/theislab/anndata")
15655 (synopsis "Annotated data for data analysis pipelines")
15656 (description "Anndata is a package for simple (functional) high-level APIs
15657 for data analysis pipelines. In this context, it provides an efficient,
15658 scalable way of keeping track of data together with learned annotations and
15659 reduces the code overhead typically encountered when using a mostly
15660 object-oriented library such as @code{scikit-learn}.")
15661 (license license:bsd-3)))
15662
15663 (define-public python-dill
15664 (package
15665 (name "python-dill")
15666 (version "0.3.1.1")
15667 (source
15668 (origin
15669 (method url-fetch)
15670 (uri (pypi-uri "dill" version))
15671 (sha256
15672 (base32 "1704g8z70d210ksgbccs2v545v9w0wc6lx15m296alb7jf0yzn22"))))
15673 (build-system python-build-system)
15674 (arguments
15675 `(#:phases
15676 (modify-phases %standard-phases
15677 (replace 'check
15678 (lambda _
15679 (with-directory-excursion "/tmp"
15680 (invoke "nosetests" "-v"))
15681 #t)))))
15682 (native-inputs
15683 `(("python-nose" ,python-nose)))
15684 (home-page "https://pypi.org/project/dill/")
15685 (synopsis "Serialize all of Python")
15686 (description "Dill extends Python's @code{pickle} module for serializing
15687 and de-serializing Python objects to the majority of the built-in Python
15688 types. Dill provides the user the same interface as the @code{pickle} module,
15689 and also includes some additional features. In addition to pickling Python
15690 objects, @code{dill} provides the ability to save the state of an interpreter
15691 session in a single command. Hence, it would be feasible to save a
15692 interpreter session, close the interpreter, ship the pickled file to another
15693 computer, open a new interpreter, unpickle the session and thus continue from
15694 the saved state of the original interpreter session.")
15695 (license license:bsd-3)))
15696
15697 (define-public python-multiprocess
15698 (package
15699 (name "python-multiprocess")
15700 (version "0.70.9")
15701 (source
15702 (origin
15703 (method url-fetch)
15704 (uri (pypi-uri "multiprocess" version))
15705 (sha256
15706 (base32
15707 "1r882nvd44xqwbrclwqx5rhs80l6809rcvpc7pkpgnij06cvvmcz"))))
15708 (build-system python-build-system)
15709 (arguments
15710 `(#:phases
15711 (modify-phases %standard-phases
15712 (add-after 'unpack 'disable-broken-tests
15713 (lambda _
15714 ;; This test is broken as there is no keyboard interrupt.
15715 (substitute* "py3.7/multiprocess/tests/__init__.py"
15716 (("^(.*)def test_wait_result"
15717 line indent)
15718 (string-append indent
15719 "@unittest.skip(\"Disabled by Guix\")\n"
15720 line)))
15721 #t))
15722 ;; Tests must be run after installation.
15723 (delete 'check)
15724 (add-after 'install 'check
15725 (lambda* (#:key inputs outputs #:allow-other-keys)
15726 (add-installed-pythonpath inputs outputs)
15727 (invoke "python" "-m" "multiprocess.tests")
15728 #t)))))
15729 (propagated-inputs
15730 `(("python-dill" ,python-dill)))
15731 (home-page "https://pypi.org/project/multiprocess/")
15732 (synopsis "Multiprocessing and multithreading in Python")
15733 (description
15734 "This package is a fork of the multiprocessing Python package, a package
15735 which supports the spawning of processes using the API of the standard
15736 library's @code{threading} module.")
15737 (license license:bsd-3)))
15738
15739 (define-public python-toolz
15740 (package
15741 (name "python-toolz")
15742 (version "0.9.0")
15743 (source
15744 (origin
15745 (method url-fetch)
15746 (uri (pypi-uri "toolz" version))
15747 (sha256
15748 (base32
15749 "1j9i7fdjnx9dz35fdj5gvgxx6585ja9sxgaiv65if77nlxz0m7wj"))))
15750 (build-system python-build-system)
15751 ;; FIXME: tests cannot be computed: "Can't perform this operation for
15752 ;; unregistered loader type"
15753 (arguments '(#:tests? #f))
15754 (home-page "https://github.com/pytoolz/toolz/")
15755 (synopsis "List processing tools and functional utilities")
15756 (description
15757 "This package provides a set of utility functions for iterators,
15758 functions, and dictionaries.")
15759 (license license:bsd-3)))
15760
15761 (define-public python2-toolz
15762 (package-with-python2 python-toolz))
15763
15764 (define-public python-cytoolz
15765 (package
15766 (name "python-cytoolz")
15767 (version "0.9.0.1")
15768 (source
15769 (origin
15770 (method url-fetch)
15771 (uri (pypi-uri "cytoolz" version))
15772 (sha256
15773 (base32
15774 "1r80p88hm3f3r4zpixzr047y5hw4bzy41m4xywnhycda83x0dk44"))))
15775 (build-system python-build-system)
15776 ;; FIXME: tests fail with "module 'cytoolz.curried' has no attribute
15777 ;; 'exceptions'"
15778 (arguments '(#:tests? #f))
15779 (propagated-inputs
15780 `(("python-toolz" ,python-toolz)))
15781 (native-inputs
15782 `(("python-cython" ,python-cython)))
15783 (home-page "https://github.com/pytoolz/cytoolz")
15784 (synopsis "High performance functional utilities")
15785 (description
15786 "The cytoolz package implements the same API as provided by toolz. The
15787 main differences are that @code{cytoolz} is faster and cytoolz offers a C API
15788 that is accessible to other projects developed in Cython.")
15789 (license license:bsd-3)))
15790
15791 (define-public python-sortedcontainers
15792 (package
15793 (name "python-sortedcontainers")
15794 (version "2.0.4")
15795 (source
15796 (origin
15797 (method url-fetch)
15798 (uri (pypi-uri "sortedcontainers" version))
15799 (sha256
15800 (base32
15801 "10hrk2k0hbf9x78vd3f0lj277m1yzfhzzxr0hja718liwb398wk0"))))
15802 (build-system python-build-system)
15803 (native-inputs
15804 `(("python-tox" ,python-tox)))
15805 (home-page "http://www.grantjenks.com/docs/sortedcontainers/")
15806 (synopsis "Sorted List, Sorted Dict, Sorted Set")
15807 (description
15808 "This package provides a sorted collections library, written in
15809 pure-Python.")
15810 (license license:asl2.0)))
15811
15812 (define-public python-cloudpickle
15813 (package
15814 (name "python-cloudpickle")
15815 (version "0.6.1")
15816 (source
15817 (origin
15818 (method url-fetch)
15819 (uri (pypi-uri "cloudpickle" version))
15820 (sha256
15821 (base32
15822 "1wdw89mlm7fqa3fm3ymskx05jrys66n8m1z1a8s0mss0799ahsgi"))))
15823 (build-system python-build-system)
15824 ;; FIXME: there are 5 errors in 122 tests:
15825 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.CloudPickleTest)
15826 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.CloudPickleTest)
15827 ;; ERROR: test_function_pickle_compat_0_4_0 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15828 ;; ERROR: test_function_pickle_compat_0_4_1 (tests.cloudpickle_test.Protocol2CloudPickleTest)
15829 ;; ERROR: test_temp_file (tests.cloudpickle_file_test.CloudPickleFileTests)
15830 ;; TypeError: cannot serialize '_io.BufferedRandom' object
15831 (arguments '(#:tests? #f))
15832 (native-inputs
15833 `(("python-pytest" ,python-pytest)
15834 ("python-mock" ,python-mock)
15835 ("python-tornado" ,python-tornado)))
15836 (home-page "https://github.com/cloudpipe/cloudpickle")
15837 (synopsis "Extended pickling support for Python objects")
15838 (description
15839 "Cloudpickle makes it possible to serialize Python constructs not
15840 supported by the default pickle module from the Python standard library. It
15841 is especially useful for cluster computing where Python expressions are
15842 shipped over the network to execute on remote hosts, possibly close to the
15843 data.")
15844 (license license:bsd-3)))
15845
15846 (define-public python2-cloudpickle
15847 (package-with-python2 python-cloudpickle))
15848
15849 (define-public python-locket
15850 (package
15851 (name "python-locket")
15852 (version "0.2.0")
15853 (source
15854 (origin
15855 (method url-fetch)
15856 (uri (pypi-uri "locket" version))
15857 (sha256
15858 (base32
15859 "1d4z2zngrpqkrfhnd4yhysh66kjn4mblys2l06sh5dix2p0n7vhz"))))
15860 (build-system python-build-system)
15861 (home-page "https://github.com/mwilliamson/locket.py")
15862 (synopsis "File-based locks for Python")
15863 (description
15864 "Locket implements a lock that can be used by multiple processes provided
15865 they use the same path.")
15866 (license license:bsd-2)))
15867
15868 (define-public python2-locket
15869 (package-with-python2 python-locket))
15870
15871 (define-public python-blosc
15872 (package
15873 (name "python-blosc")
15874 (version "1.5.1")
15875 (source
15876 (origin
15877 (method url-fetch)
15878 (uri (pypi-uri "blosc" version))
15879 (sha256
15880 (base32
15881 "1cm91c6r431yla2mbs4895bgiianjf30dfz14vvv99dslygd65jw"))))
15882 (build-system python-build-system)
15883 ;; FIXME: all tests pass, but then this error is printed:
15884 ;; TypeError: calling <function run at 0x7ffff2568d90> returned None, not a test
15885 (arguments '(#:tests? #f))
15886 (propagated-inputs
15887 `(("python-numpy" ,python-numpy)))
15888 (home-page "https://github.com/blosc/python-blosc")
15889 (synopsis "Python wrapper for the Blosc data compressor library")
15890 (description "Blosc is a high performance compressor optimized for binary
15891 data. It has been designed to transmit data to the processor cache faster
15892 than the traditional, non-compressed, direct memory fetch approach via a
15893 @code{memcpy()} system call.
15894
15895 Blosc works well for compressing numerical arrays that contains data with
15896 relatively low entropy, like sparse data, time series, grids with
15897 regular-spaced values, etc.
15898
15899 This Python package wraps the Blosc library.")
15900 (license license:bsd-3)))
15901
15902 (define-public python2-blosc
15903 (package-with-python2 python-blosc))
15904
15905 (define-public python-partd
15906 (package
15907 (name "python-partd")
15908 (version "0.3.9")
15909 (source
15910 (origin
15911 (method url-fetch)
15912 (uri (pypi-uri "partd" version))
15913 (sha256
15914 (base32
15915 "0sz6rwlnl4fqq220pyz863cnv0gjdxl4m7lscl71ishl5z0xkmhz"))))
15916 (build-system python-build-system)
15917 (propagated-inputs
15918 `(("python-blosc" ,python-blosc)
15919 ("python-locket" ,python-locket)
15920 ("python-numpy" ,python-numpy)
15921 ("python-pandas" ,python-pandas)
15922 ("python-pyzmq" ,python-pyzmq)
15923 ("python-toolz" ,python-toolz)))
15924 (home-page "https://github.com/dask/partd/")
15925 (synopsis "Appendable key-value storage")
15926 (description "Partd stores key-value pairs. Values are raw bytes. We
15927 append on old values. Partd excels at shuffling operations.")
15928 (license license:bsd-3)))
15929
15930 (define-public python2-partd
15931 (package-with-python2 python-partd))
15932
15933 (define-public python-fsspec
15934 (package
15935 (name "python-fsspec")
15936 (version "0.6.1")
15937 (source
15938 (origin
15939 (method url-fetch)
15940 (uri (pypi-uri "fsspec" version))
15941 (sha256
15942 (base32
15943 "1g9ba8v04s1nrh7pvzfm2md7ivl2mrz3hcq3y9d1a44gd62h17zj"))))
15944 (build-system python-build-system)
15945 (arguments '(#:tests? #f)) ; there are none
15946 (home-page "https://github.com/intake/filesystem_spec")
15947 (synopsis "File-system specification")
15948 (description "The purpose of this package is to produce a template or
15949 specification for a file-system interface, that specific implementations
15950 should follow, so that applications making use of them can rely on a common
15951 behavior and not have to worry about the specific internal implementation
15952 decisions with any given backend.")
15953 (license license:bsd-3)))
15954
15955 (define-public python-dask
15956 (package
15957 (name "python-dask")
15958 (version "2.9.0")
15959 (source
15960 (origin
15961 (method url-fetch)
15962 (uri (pypi-uri "dask" version))
15963 (sha256
15964 (base32 "1w1hqr8vyx6ygwflj2737dcy0mmgvrc0s602gnny8pzlcbs9m76b"))))
15965 (build-system python-build-system)
15966 (arguments
15967 `(#:phases
15968 (modify-phases %standard-phases
15969 (add-after 'unpack 'disable-broken-tests
15970 (lambda _
15971 ;; This test is marked as xfail when pytest-xdist is used.
15972 (substitute* "dask/tests/test_threaded.py"
15973 (("def test_interrupt\\(\\)" m)
15974 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15975 m)))
15976 ;; This one fails with a type error:
15977 ;; TypeError: Already tz-aware, use tz_convert to convert.
15978 (substitute* "dask/dataframe/tests/test_shuffle.py"
15979 (("def test_set_index_timestamp\\(\\)" m)
15980 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
15981 m)))
15982 #t))
15983 (replace 'check
15984 (lambda _ (invoke "pytest" "-vv"))))))
15985 (propagated-inputs
15986 `(("python-cloudpickle" ,python-cloudpickle)
15987 ("python-fsspec" ,python-fsspec)
15988 ("python-numpy" ,python-numpy)
15989 ("python-packaging" ,python-packaging)
15990 ("python-pandas" ,python-pandas)
15991 ("python-partd" ,python-partd)
15992 ("python-toolz" ,python-toolz)
15993 ("python-pyyaml" ,python-pyyaml)))
15994 (native-inputs
15995 `(("python-pytest" ,python-pytest)
15996 ("python-pytest-runner" ,python-pytest-runner)))
15997 (home-page "https://github.com/dask/dask/")
15998 (synopsis "Parallel computing with task scheduling")
15999 (description
16000 "Dask is a flexible parallel computing library for analytics. It
16001 consists of two components: dynamic task scheduling optimized for computation,
16002 and large data collections like parallel arrays, dataframes, and lists that
16003 extend common interfaces like NumPy, Pandas, or Python iterators to
16004 larger-than-memory or distributed environments. These parallel collections
16005 run on top of the dynamic task schedulers. ")
16006 (license license:bsd-3)))
16007
16008 (define-public python-ilinkedlist
16009 (package
16010 (name "python-ilinkedlist")
16011 (version "0.4.0")
16012 (source
16013 (origin
16014 (method url-fetch)
16015 (uri (pypi-uri "ilinkedlist" version))
16016 (sha256
16017 (base32
16018 "0nrw4sr3afldrp7073hvc0rgdz282s0l819jdmj1i6nn05v33h0l"))))
16019 (build-system python-build-system)
16020 (native-inputs `(("python-pytest" ,python-pytest)))
16021 (inputs `(("python" ,python)))
16022 (home-page "https://github.com/luther9/ilinkedlist-py")
16023 (synopsis "Immutable linked list library")
16024 (description
16025 "This is a implementation of immutable linked lists for Python. It
16026 contains @code{nil} (the empty linked list) and a @code{Pair} class for nodes.
16027 Since a linked list is treated as immutable, it is hashable, and its length
16028 can be retrieved in constant time. Some of the terminology is inspired by
16029 LISP. It is possible to create an improper list by creating a @code{Pair}
16030 with a non-list @code{cdr}.")
16031 (license license:gpl3+)))
16032
16033 (define-public python-readlike
16034 (package
16035 (name "python-readlike")
16036 (version "0.1.3")
16037 (source
16038 (origin
16039 (method url-fetch)
16040 (uri (pypi-uri "readlike" version))
16041 (sha256
16042 (base32 "027w8fvi50ksl57q0a7kb5zvmq8jxaawnviib1jdqw0p3igvm1j4"))))
16043 (build-system python-build-system)
16044 (home-page "https://github.com/jangler/readlike")
16045 (synopsis "GNU Readline-like line editing module")
16046 (description
16047 "This Python module provides line editing functions similar to the default
16048 Emacs-style ones of GNU Readline. Unlike the Python standard library's
16049 @code{readline} package, this one allows access to those capabilties in settings
16050 outside of a standard command-line interface. It is especially well-suited to
16051 interfacing with Urwid, due to a shared syntax for describing key inputs.
16052
16053 Currently, all stateless Readline commands are implemented. Yanking and history
16054 are not supported.")
16055 (license license:expat)))
16056
16057 (define-public python2-readlike
16058 (package-with-python2 python-readlike))
16059
16060 (define-public python-reparser
16061 (package
16062 (name "python-reparser")
16063 (version "1.4.3")
16064 (source
16065 (origin
16066 (method url-fetch)
16067 (uri (pypi-uri "ReParser" version))
16068 (sha256
16069 (base32 "0nniqb69xr0fv7ydlmrr877wyyjb61nlayka7xr08vlxl9caz776"))))
16070 (build-system python-build-system)
16071 (home-page "https://github.com/xmikos/reparser")
16072 (synopsis "Simple lexer/parser for inline markup based on regular expressions")
16073 (description
16074 "This Python library provides a simple lexer/parser for inline markup based
16075 on regular expressions.")
16076 (license license:expat)))
16077
16078 (define-public python2-reparser
16079 (let ((reparser (package-with-python2
16080 (strip-python2-variant python-reparser))))
16081 (package (inherit reparser)
16082 (propagated-inputs
16083 `(("python2-enum34" ,python2-enum34)
16084 ,@(package-propagated-inputs reparser))))))
16085
16086 (define-public python-precis-i18n
16087 (package
16088 (name "python-precis-i18n")
16089 (version "1.0.0")
16090 (source
16091 (origin
16092 (method url-fetch)
16093 (uri (pypi-uri "precis_i18n" version))
16094 (sha256
16095 (base32
16096 "0gjhvwd8aifx94rl1ag08vlmndyx2q3fkyqb0c4i46x3p2bc2yi2"))))
16097 (build-system python-build-system)
16098 (home-page "https://github.com/byllyfish/precis_i18n")
16099 (synopsis "Implementation of the PRECIS framework")
16100 (description
16101 "This module implements the PRECIS Framework as described in RFC 8264,
16102 RFC 8265 and RFC 8266.")
16103 (license license:expat)))
16104
16105 (define-public python-absl-py
16106 (package
16107 (name "python-absl-py")
16108 (version "0.6.1")
16109 (source
16110 (origin
16111 (method url-fetch)
16112 (uri (pypi-uri "absl-py" version))
16113 (sha256
16114 (base32
16115 "1mp9lk0b2qa37b7y6ak4lvf6ifw2ylyy6bkf9ik77md3j4xrwlc7"))))
16116 (build-system python-build-system)
16117 (propagated-inputs
16118 `(("python-six" ,python-six)))
16119 (home-page "https://github.com/abseil/abseil-py")
16120 (synopsis "Abseil Python common libraries")
16121 (description
16122 "This package provides the Abseil Python Common Libraries, a collection
16123 of Python libraries for building Python applications.")
16124 (license license:asl2.0)))
16125
16126 (define-public python-astor
16127 (package
16128 (name "python-astor")
16129 (version "0.7.1")
16130 (source
16131 (origin
16132 (method url-fetch)
16133 (uri (pypi-uri "astor" version))
16134 (sha256
16135 (base32
16136 "13gv6f2xz9i564byp21gcpc0l3w4cs23k1wbcam8kky2ls3hvhwm"))))
16137 (build-system python-build-system)
16138 ;; FIXME: There are two errors and two test failures.
16139 (arguments `(#:tests? #f))
16140 (home-page "https://github.com/berkerpeksag/astor")
16141 (synopsis "Read and write Python ASTs")
16142 (description "Astor is designed to allow easy manipulation of Python
16143 source via the Abstract Syntax Tree.")
16144 (license license:bsd-3)))
16145
16146 (define-public python2-astor
16147 (package-with-python2 python-astor))
16148
16149 (define-public python-grpcio
16150 (package
16151 (name "python-grpcio")
16152 (version "1.17.1")
16153 (source
16154 (origin
16155 (method url-fetch)
16156 (uri (pypi-uri "grpcio" version))
16157 (sha256
16158 (base32
16159 "0qb9y6j83nxa6d4kc60i8yfgdm7a8ms7b54kncjzf5y7nsxp8rzx"))))
16160 (build-system python-build-system)
16161 (propagated-inputs
16162 `(("python-six" ,python-six)))
16163 (home-page "https://grpc.io")
16164 (synopsis "HTTP/2-based RPC framework")
16165 (description "This package provides a Python library for communicating
16166 with the HTTP/2-based RPC framework gRPC.")
16167 (license license:asl2.0)))
16168
16169 (define-public python-astunparse
16170 (package
16171 (name "python-astunparse")
16172 (version "1.6.2")
16173 (source
16174 (origin
16175 (method url-fetch)
16176 (uri (pypi-uri "astunparse" version))
16177 (sha256
16178 (base32 "0rzbc44xcvzjhhiy7wac96mgal5mcjz1mfq8rmvgswskf4kf9cys"))))
16179 (build-system python-build-system)
16180 (arguments '(#:tests? #f)) ; there are none
16181 (propagated-inputs
16182 `(("python-six" ,python-six)
16183 ("python-wheel" ,python-wheel)))
16184 (home-page "https://github.com/simonpercivall/astunparse")
16185 (synopsis "AST unparser for Python")
16186 (description "This package provides an AST unparser for Python. It is a
16187 factored out version of @code{unparse} found in the Python source
16188 distribution.")
16189 (license license:bsd-3)))
16190
16191 (define-public python-gast
16192 (package
16193 (name "python-gast")
16194 (version "0.2.2")
16195 (source
16196 (origin
16197 (method url-fetch)
16198 (uri (pypi-uri "gast" version))
16199 (sha256
16200 (base32 "1w5dzdb3gpcfmd2s0b93d8gff40a1s41rv31458z14inb3s9v4zy"))))
16201 (build-system python-build-system)
16202 (propagated-inputs
16203 `(("python-astunparse" ,python-astunparse)))
16204 (home-page "https://pypi.org/project/gast/")
16205 (synopsis "Generic Python AST that abstracts the underlying Python version")
16206 (description
16207 "GAST provides a compatibility layer between the AST of various Python
16208 versions, as produced by @code{ast.parse} from the standard @code{ast}
16209 module.")
16210 (license license:bsd-3)))
16211
16212 (define-public python-wikidata
16213 (package
16214 (name "python-wikidata")
16215 (version "0.6.1")
16216 (source
16217 (origin
16218 (method url-fetch)
16219 (uri (pypi-uri "Wikidata" version))
16220 (sha256
16221 (base32
16222 "08nlnydddfp1jj0cdmshvld1irzngbp3dij928wqsg9ziklm6mw9"))))
16223 (build-system python-build-system)
16224 (propagated-inputs
16225 `(("python-babel" ,python-babel)))
16226 (home-page "https://github.com/dahlia/wikidata")
16227 (synopsis "Wikidata client library")
16228 (description
16229 "This package provides a Python interface to
16230 @url{https://www.wikidata.org/, Wikidata}.")
16231 (properties '((upstream-name . "Wikidata")))
16232 (license license:gpl3+)))
16233
16234 (define-public python-doctest-ignore-unicode
16235 (package
16236 (name "python-doctest-ignore-unicode")
16237 (version "0.1.2")
16238 (source
16239 (origin
16240 (method url-fetch)
16241 (uri (pypi-uri "doctest-ignore-unicode" version))
16242 (sha256
16243 (base32
16244 "1m9aa4qnyj21lbq4sbvmv1vcz7zksss4rz37ddf2hxv4hk8b547w"))))
16245 (build-system python-build-system)
16246 (native-inputs
16247 `(("python-nose" ,python-nose)))
16248 (home-page "https://github.com/gnublade/doctest-ignore-unicode")
16249 (synopsis "Ignore Unicode literal prefixes in doctests")
16250 (description
16251 "This package adds support for a flag to ignore Unicode literal prefixes
16252 in doctests.")
16253 (license license:asl2.0)))
16254
16255 (define-public python-attr
16256 (package
16257 (name "python-attr")
16258 (version "0.3.1")
16259 (source
16260 (origin
16261 (method url-fetch)
16262 (uri (pypi-uri "attr" version))
16263 (sha256
16264 (base32
16265 "0pbpskvxp5hzdvcaf766ljwpckshir8sf7z6jqji6zyib20594ch"))))
16266 (build-system python-build-system)
16267 (home-page "https://github.com/denis-ryzhkov/attr")
16268 (synopsis "Decorator for attributes of target function or class")
16269 (description "Simple decorator to set attributes of target function or
16270 class in a @acronym{DRY, Don't Repeat Yourself} way.")
16271 (license license:expat)))
16272
16273 (define-public python-construct
16274 (package
16275 (name "python-construct")
16276 (version "2.9.45")
16277 (source
16278 (origin
16279 (method url-fetch)
16280 (uri (pypi-uri "construct" version))
16281 (sha256
16282 (base32
16283 "130iy05awzigm2xah2yvlmb08mac5bi4gzr5m3g7k1krs3ps0w92"))))
16284 (build-system python-build-system)
16285 (arguments
16286 `(#:tests? #f)) ; No tests exist.
16287 (propagated-inputs
16288 `(("python-extras" ,python-extras)
16289 ("python-arrow" ,python-arrow)
16290 ("python-numpy" ,python-numpy)
16291 ("python-ruamel.yaml" ,python-ruamel.yaml)))
16292 (home-page "http://construct.readthedocs.io")
16293 (synopsis "Declarative and symmetrical parser and builder for binary data")
16294 (description
16295 "This package provides both simple, atomic constructs (such as
16296 integers of various sizes), as well as composite ones which allow you
16297 form hierarchical and sequential structures of increasing complexity.
16298 It features bit and byte granularity, easy debugging and testing, an
16299 easy-to-extend subclass system, and lots of primitive constructs to
16300 make your work easier.")
16301 (license license:expat)))
16302
16303 (define-public python-humanize
16304 (package
16305 (name "python-humanize")
16306 (version "0.5.1")
16307 (source
16308 (origin
16309 (method url-fetch)
16310 (uri (pypi-uri "humanize" version))
16311 (sha256
16312 (base32
16313 "06dvhm3k8lf2rayn1gxbd46y0fy1db26m3h9vrq7rb1ib08mfgx4"))))
16314 (arguments
16315 '(#:tests? #f)) ; tests not in pypi archive
16316 (build-system python-build-system)
16317 (home-page "https://github.com/jmoiron/humanize")
16318 (synopsis "Print numerical information in a human-readable form")
16319 (description "This package provides a Python module that displays numbers
16320 and dates in \"human readable\" forms. For example, it would display
16321 \"12345591313\" as \"12.3 billion\".")
16322 (license license:expat)))
16323
16324 (define-public python-txaio
16325 (package
16326 (name "python-txaio")
16327 (version "18.8.1")
16328 (source
16329 (origin
16330 (method url-fetch)
16331 (uri (pypi-uri "txaio" version))
16332 (sha256
16333 (base32
16334 "1zmpdph6zddgrnkkcykh6qk5s46l7s5mzfqrh82m4b5iffn61qv7"))))
16335 (build-system python-build-system)
16336 (propagated-inputs
16337 `(("python-twisted" ,python-twisted)
16338 ("python-six" ,python-six)))
16339 (home-page "https://github.com/crossbario/txaio")
16340 (synopsis "Compatibility layer between Python asyncio and Twisted")
16341 (description "Txaio provides a compatibility layer between the Python
16342 @code{asyncio} module and @code{Twisted}.")
16343 (license license:expat)))
16344
16345 (define-public python-toolshed
16346 (package
16347 (name "python-toolshed")
16348 (version "0.4.6")
16349 (source
16350 (origin
16351 (method url-fetch)
16352 (uri (pypi-uri "toolshed" version))
16353 (sha256
16354 (base32
16355 "14zvz51gzf9i1i3d1sj363ba4rksl6lcf4lz1arl8hpqgcbir8r3"))))
16356 (build-system python-build-system)
16357 (native-inputs
16358 `(("python-nose" ,python-nose)))
16359 (home-page "https://github.com/brentp/toolshed/")
16360 (synopsis "Collection of modules and functions for working with data")
16361 (description "This is a collection of well-tested, simple modules and
16362 functions that aim to reduce boilerplate when working with data.")
16363 (license license:bsd-2)))
16364
16365 (define-public python-annoy
16366 (package
16367 (name "python-annoy")
16368 (version "1.15.1")
16369 (source
16370 (origin
16371 (method url-fetch)
16372 (uri (pypi-uri "annoy" version))
16373 (sha256
16374 (base32
16375 "1rxn6snn0r32r07g45hdjhh8aa1xzx6fjrm8g62d8vzp46z7rzrp"))))
16376 (build-system python-build-system)
16377 (native-inputs
16378 `(("python-nose" ,python-nose)))
16379 (home-page "https://github.com/spotify/annoy/")
16380 (synopsis "Approximate nearest neighbors library")
16381 (description
16382 "Annoy is a C++ library with Python bindings to search for points in
16383 space that are close to a given query point. It also creates large read-only
16384 file-based data structures that are @code{mmap}ped into memory so that many
16385 processes may share the same data.")
16386 (license license:asl2.0)))
16387
16388 (define-public python-pylzma
16389 (package
16390 (name "python-pylzma")
16391 (version "0.5.0")
16392 (source
16393 (origin
16394 (method url-fetch)
16395 (uri (pypi-uri "pylzma" version))
16396 (sha256
16397 (base32
16398 "074anvhyjgsv2iby2ql1ixfvjgmhnvcwjbdz8gk70xzkzcm1fx5q"))))
16399 (build-system python-build-system)
16400 (home-page "http://www.joachim-bauch.de/projects/pylzma/")
16401 (synopsis "Python bindings for the LZMA library by Igor Pavlov.")
16402 (description "This package provides Python bindings for the LZMA library
16403 by Igor Pavlov.")
16404 (license license:lgpl2.1+)))
16405
16406 (define-public python2-pylzma
16407 (package-with-python2 python-pylzma))
16408
16409 (define-public python2-zeroconf
16410 (package
16411 (name "python2-zeroconf")
16412
16413 ;; This is the last version that supports Python 2.x.
16414 (version "0.19.1")
16415 (source
16416 (origin
16417 (method url-fetch)
16418 (uri (pypi-uri "zeroconf" version))
16419 (sha256
16420 (base32
16421 "0ykzg730n915qbrq9bn5pn06bv6rb5zawal4sqjyfnjjm66snkj3"))))
16422 (build-system python-build-system)
16423 (arguments
16424 `(#:python ,python-2
16425 #:phases
16426 (modify-phases %standard-phases
16427 (add-after 'unpack 'patch-requires
16428 (lambda* (#:key inputs #:allow-other-keys)
16429 (substitute* "setup.py"
16430 (("enum-compat")
16431 "enum34"))
16432 #t)))))
16433 (native-inputs
16434 `(("python2-six" ,python2-six)
16435 ("python2-enum32" ,python2-enum34)
16436 ("python2-netifaces" ,python2-netifaces)
16437 ("python2-typing" ,python2-typing)))
16438 (home-page "https://github.com/jstasiak/python-zeroconf")
16439 (synopsis "Pure Python mDNS service discovery")
16440 (description
16441 "Pure Python multicast DNS (mDNS) service discovery library (Bonjour/Avahi
16442 compatible).")
16443 (license license:lgpl2.1+)))
16444
16445 (define-public python-bsddb3
16446 (package
16447 (name "python-bsddb3")
16448 (version "6.2.6")
16449 (source
16450 (origin
16451 (method url-fetch)
16452 (uri (pypi-uri "bsddb3" version))
16453 (sha256
16454 (base32
16455 "019db2y6bfmiqbrgg9x9f6h72qjmqh05czdn2v5sy9bl0gs23mj2"))))
16456 (build-system python-build-system)
16457 (inputs
16458 `(("bdb" ,bdb)))
16459 (arguments
16460 '(#:phases
16461 (modify-phases %standard-phases
16462 (add-after 'unpack 'configure-locations
16463 (lambda* (#:key inputs #:allow-other-keys)
16464 (setenv "BERKELEYDB_DIR" (assoc-ref inputs "bdb"))
16465 (setenv "YES_I_HAVE_THE_RIGHT_TO_USE_THIS_BERKELEY_DB_VERSION" "1")
16466 #t))
16467 (replace 'check
16468 (lambda _
16469 (invoke "python3" "test3.py" "-v"))))))
16470 (home-page "https://www.jcea.es/programacion/pybsddb.htm")
16471 (synopsis "Python bindings for Oracle Berkeley DB")
16472 (description
16473 "This module provides a nearly complete wrapping of the Oracle/Sleepycat
16474 C API for the Database Environment, Database, Cursor, Log Cursor, Sequence and
16475 Transaction objects, and each of these is exposed as a Python type in the
16476 bsddb3.db module. The database objects can use various access methods: btree,
16477 hash, recno, and queue. Complete support of Berkeley DB distributed
16478 transactions. Complete support for Berkeley DB Replication Manager.
16479 Complete support for Berkeley DB Base Replication. Support for RPC.")
16480 (license license:bsd-3)))
16481
16482 (define-public python-dbfread
16483 (package
16484 (name "python-dbfread")
16485 (version "2.0.7")
16486 (source (origin
16487 (method url-fetch)
16488 (uri (pypi-uri "dbfread" version))
16489 (sha256
16490 (base32
16491 "0gdpwdzf1fngsi6jrdyj4qdf6cr7gnnr3zp80dpkzbgz0spskj07"))))
16492 (build-system python-build-system)
16493 (native-inputs
16494 `(("python-pytest" ,python-pytest)))
16495 (home-page "https://dbfread.readthedocs.io")
16496 (synopsis "Read DBF Files with Python")
16497 (description
16498 "This library reads DBF files and returns the data as native Python data
16499 types for further processing. It is primarily intended for batch jobs and
16500 one-off scripts.")
16501 (license license:expat)))
16502
16503 (define-public python-cached-property
16504 (package
16505 (name "python-cached-property")
16506 (version "1.5.1")
16507 (source
16508 (origin
16509 (method url-fetch)
16510 (uri (pypi-uri "cached-property" version))
16511 (sha256
16512 (base32
16513 "010m1bl380l2r3vwq24r5v14l6gwvgm9v0mqqjkjss552jgsa5wj"))))
16514 (build-system python-build-system)
16515 (arguments
16516 `(#:phases
16517 (modify-phases %standard-phases
16518 ;; https://github.com/pydanny/cached-property/issues/131
16519 ;; recent versions of freezegun break one test
16520 (add-after 'unpack 'disable-broken-test
16521 (lambda _
16522 (substitute* "tests/test_cached_property.py"
16523 (("def test_threads_ttl_expiry\\(self\\)" m)
16524 (string-append "@unittest.skip(\"Disabled by Guix\")\n"
16525 " " m)))
16526 #t)))))
16527 (native-inputs
16528 `(("python-freezegun" ,python-freezegun)))
16529 (home-page
16530 "https://github.com/pydanny/cached-property")
16531 (synopsis
16532 "Decorator for caching properties in classes")
16533 (description
16534 "This package provides a decorator which makes caching
16535 time-or-computationally-expensive properties quick and easy and works in Python
16536 2 or 3.")
16537 (license license:bsd-3)))
16538
16539 (define-public python-folium
16540 (package
16541 (name "python-folium")
16542 (version "0.10.1")
16543 (source
16544 (origin
16545 (method url-fetch)
16546 (uri (pypi-uri "folium" version))
16547 (sha256
16548 (base32
16549 "0gcc267wxwxr57ry86pqpbiyfvl0g48hfvgy0f2mz9s58g87kgzd"))))
16550 (build-system python-build-system)
16551 (propagated-inputs
16552 `(("python-branca" ,python-branca)
16553 ("python-jinja2" ,python-jinja2)
16554 ("python-numpy" ,python-numpy)
16555 ("python-requests" ,python-requests)))
16556 (native-inputs
16557 `(("python-pytest" ,python-pytest)))
16558 (home-page "https://github.com/python-visualization/folium")
16559 (synopsis "Make beautiful maps with Leaflet.js & Python")
16560 (description "@code{folium} makes it easy to visualize data that’s been
16561 manipulated in Python on an interactive leaflet map. It enables both the
16562 binding of data to a map for @code{choropleth} visualizations as well as
16563 passing rich vector/raster/HTML visualizations as markers on the map.
16564
16565 The library has a number of built-in tilesets from OpenStreetMap, Mapbox, and
16566 Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys. It
16567 supports Image, Video, GeoJSON and TopoJSON overlays.")
16568 (license license:expat)))
16569
16570 (define-public jube
16571 (package
16572 ;; This is a command-line tool, so no "python-" prefix.
16573 (name "jube")
16574 (version "2.2.2")
16575 (source (origin
16576 (method url-fetch)
16577 (uri (string-append
16578 "http://apps.fz-juelich.de/jsc/jube/jube2/download.php?version="
16579 version))
16580 (sha256
16581 (base32
16582 "0xq4k1q63s1p6swgyp61vahlrd1fqmgbm0gm5kpj8ikwy0yc0nqk"))
16583 (file-name (string-append "jube-" version ".tar.gz"))))
16584 (build-system python-build-system)
16585 (home-page "https://apps.fz-juelich.de/jsc/jube/jube2/docu/index.html")
16586 (synopsis "Benchmarking environment")
16587 (description
16588 "JUBE helps perform and analyze benchmarks in a systematic way. For each
16589 benchmarked application, benchmark data is stored in a format that allows JUBE
16590 to deduct the desired information. This data can be parsed by automatic pre-
16591 and post-processing scripts that draw information and store it more densely
16592 for manual interpretation.")
16593 (license license:gpl3+)))
16594
16595 (define-public python-pyroutelib3
16596 (package
16597 (name "python-pyroutelib3")
16598 (version "1.3.post1")
16599 (source
16600 (origin
16601 (method url-fetch)
16602 (uri (pypi-uri "pyroutelib3" version))
16603 (sha256
16604 (base32
16605 "1hpbydpn2alyswiajfbvhzq4c7f36vdmvxy91hgv8l1lb2g2vfrj"))))
16606 (build-system python-build-system)
16607 (propagated-inputs
16608 `(("python-dateutil" ,python-dateutil)))
16609 (home-page "https://github.com/MKuranowski/pyroutelib3")
16610 (synopsis "Library for simple routing on OSM data")
16611 (description "Library for simple routing on OSM data")
16612 (license license:gpl3+)))
16613
16614 (define-public python-elementpath
16615 (package
16616 (name "python-elementpath")
16617 (version "1.2.0")
16618 (source
16619 (origin
16620 (method url-fetch)
16621 (uri (pypi-uri "elementpath" version))
16622 (sha256
16623 (base32
16624 "1syn2z543brab23dskh3fjd9pqvz6npqbcicrs2d88dbg26xl08p"))))
16625 (build-system python-build-system)
16626 (home-page
16627 "https://github.com/sissaschool/elementpath")
16628 (synopsis
16629 "XPath 1.0/2.0 parsers and selectors for ElementTree and lxml")
16630 (description
16631 "The proposal of this package is to provide XPath 1.0 and 2.0 selectors
16632 for Python's ElementTree XML data structures, both for the standard
16633 ElementTree library and for the @uref{http://lxml.de, lxml.etree} library.
16634
16635 For lxml.etree this package can be useful for providing XPath 2.0 selectors,
16636 because lxml.etree already has it's own implementation of XPath 1.0.")
16637 (license license:expat)))
16638
16639 (define-public python-bibtexparser
16640 (package
16641 (name "python-bibtexparser")
16642 (version "1.1.0")
16643 (source
16644 (origin
16645 (method url-fetch)
16646 (uri (pypi-uri "bibtexparser" version))
16647 (sha256
16648 (base32
16649 "0zwhfkrzf3n5847dbnfng92k7ak199l9v6x6ax3dgdidfpm6d2fz"))))
16650 (build-system python-build-system)
16651 (propagated-inputs
16652 `(("python-pyparsing" ,python-pyparsing)))
16653 (native-inputs
16654 `(("python-future" ,python-future)))
16655 (home-page "https://github.com/sciunto-org/python-bibtexparser")
16656 (synopsis "Python library to parse BibTeX files")
16657 (description "BibtexParser is a Python library to parse BibTeX files.")
16658 (license (list license:bsd-3 license:lgpl3))))
16659
16660 (define-public python-distro
16661 (package
16662 (name "python-distro")
16663 (version "1.4.0")
16664 (source
16665 (origin
16666 (method url-fetch)
16667 (uri (pypi-uri "distro" version))
16668 (sha256
16669 (base32
16670 "0mrg75w4ap7mdzyga75yaid9n8bgb345ih5mwjp3plj6v1jxwb9n"))))
16671 (build-system python-build-system)
16672 (native-inputs
16673 `(("python-pytest" ,python-pytest)))
16674 (home-page "https://github.com/nir0s/distro")
16675 (synopsis
16676 "OS platform information API")
16677 (description
16678 "@code{distro} provides information about the OS distribution it runs on,
16679 such as a reliable machine-readable ID, or version information.
16680
16681 It is the recommended replacement for Python's original
16682 `platform.linux_distribution` function (which will be removed in Python 3.8).
16683 @code{distro} also provides a command-line interface to output the platform
16684 information in various formats.")
16685 (license license:asl2.0)))
16686
16687 (define-public python-cairosvg
16688 (package
16689 (name "python-cairosvg")
16690 (version "2.4.2")
16691 (source
16692 (origin
16693 (method url-fetch)
16694 (uri (pypi-uri "CairoSVG" version))
16695 (sha256
16696 (base32 "1bb7irxbaxxb9ahm3z5wsx1q96mm5gzskc7b6q07h9ikcnb8yrjf"))))
16697 (build-system python-build-system)
16698 (arguments
16699 `(#:phases
16700 (modify-phases %standard-phases
16701 (replace 'check
16702 (lambda _ (invoke "pytest"))))))
16703 (propagated-inputs
16704 `(("python-cairocffi" ,python-cairocffi)
16705 ("python-cssselect2" ,python-cssselect2)
16706 ("python-defusedxml" ,python-defusedxml)
16707 ("python-pillow" ,python-pillow)
16708 ("python-tinycss2" ,python-tinycss2)))
16709 (native-inputs
16710 `(("python-pytest-flake8" ,python-pytest-flake8)
16711 ("python-pytest-isort" ,python-pytest-isort)
16712 ("python-pytest-runner" ,python-pytest-runner)))
16713 (home-page "https://cairosvg.org/")
16714 (synopsis "SVG to PDF/PS/PNG converter based on Cairo")
16715 (description "CairoSVG is a SVG converter based on Cairo. It can export
16716 SVG files to PDF, PostScript and PNG files. The main part of CairoSVG is a
16717 SVG parser, trying to follow the SVG 1.1 recommendation from the W3C. Once
16718 parsed, the result is drawn to a Cairo surface that can be exported to
16719 qvarious formats: PDF, PostScript, PNG and even SVG.")
16720 (license license:lgpl3+)))
16721
16722 (define-public python-pyphen
16723 (package
16724 (name "python-pyphen")
16725 (version "0.9.5")
16726 (source
16727 (origin
16728 (method url-fetch)
16729 (uri (pypi-uri "Pyphen" version))
16730 (sha256
16731 (base32 "08c9y69ry9d6m4zalhnalg86lsp9v2j5n1ziw5vxfmiihx83lqrv"))))
16732 (build-system python-build-system)
16733 ;; TODO: Use the Guix system hyphenation packages hyphen-* rather than the
16734 ;; embedded set provided by upstream - like Debian does.
16735 (home-page "https://github.com/Kozea/Pyphen")
16736 (synopsis "Pure Python module to hyphenate text")
16737 (description "Pyphen is a pure Python module to hyphenate text using
16738 existing Hunspell hyphenation dictionaries.")
16739 (license (list license:gpl2 license:lgpl2.1 license:mpl1.1))))
16740
16741 (define-public python-intelhex
16742 (package
16743 (name "python-intelhex")
16744 (version "2.2.1")
16745 (source
16746 (origin
16747 (method url-fetch)
16748 (uri (pypi-uri "intelhex" version))
16749 (sha256
16750 (base32
16751 "0ckqjbxd8gwcg98gfzpn4vq1qxzfvq3rdbrr1hikj1nmw08qb780"))))
16752 (build-system python-build-system)
16753 (arguments '(#:tests? #f)) ;issue with version
16754 (home-page "https://pypi.org/project/IntelHex/")
16755 (synopsis "Python library for Intel HEX files manipulations")
16756 (description "The Intel HEX file format is widely used in microprocessors
16757 and microcontrollers area (embedded systems etc.) as the de facto standard for
16758 representation of code to be programmed into microelectronic devices. This
16759 package provides an intelhex Python library to read, write, create from
16760 scratch and manipulate data from Intel HEX file format. It also includes
16761 several convenience Python scripts, including \"classic\" hex2bin and bin2hex
16762 converters and more, those based on the library itself.")
16763 (license license:bsd-3)))
16764
16765 (define-public python-pykwalify
16766 (package
16767 (name "python-pykwalify")
16768 (version "1.7.0")
16769 (source
16770 (origin
16771 (method url-fetch)
16772 (uri (pypi-uri "pykwalify" version))
16773 (sha256
16774 (base32
16775 "1cnfzkg1b01f825ikpw2fhjclf9c8akxjfrbd1vc22x1lg2kk2vy"))))
16776 (build-system python-build-system)
16777 (arguments '(#:tests? #f)) ;missing dependencies
16778 (propagated-inputs
16779 `(("python-dateutil" ,python-dateutil)
16780 ("python-docopt" ,python-docopt)
16781 ("python-pyyaml" ,python-pyyaml)))
16782 (home-page "https://github.com/grokzen/pykwalify")
16783 (synopsis
16784 "Python lib/cli for JSON/YAML schema validation")
16785 (description
16786 "This package provides a parser, schema validator, and data binding tool
16787 for YAML and JSON.")
16788 (license license:expat)))
16789
16790 (define-public python-dbusmock
16791 (package
16792 (name "python-dbusmock")
16793 (version "0.18.3")
16794 (source
16795 (origin
16796 (method url-fetch)
16797 (uri (pypi-uri "python-dbusmock" version))
16798 (sha256
16799 (base32
16800 "0hp2kyac88nh9iv6l8hlmv7s1sa1s5f1a3wc2pmlmmxnd211fjlr"))))
16801 (build-system python-build-system)
16802 (arguments
16803 '(#:phases
16804 (modify-phases %standard-phases
16805 (add-after 'unpack 'patch-shell-path
16806 (lambda _
16807 (substitute* "tests/test_code.py"
16808 (("/bin/bash") (which "bash")))
16809 #t)))))
16810 (native-inputs
16811 `(;; For tests.
16812 ("dbus" ,dbus) ; for dbus-daemon
16813 ("python-nose" ,python-nose)
16814 ("which" ,which)))
16815 (propagated-inputs
16816 `(("python-dbus" ,python-dbus)
16817 ("python-pygobject" ,python-pygobject)))
16818 (home-page "https://github.com/martinpitt/python-dbusmock")
16819 (synopsis "Python library for mock D-Bus objects")
16820 (description "python-dbusmock allows for the easy creation of mock objects on
16821 D-Bus. This is useful for writing tests for software which talks to D-Bus
16822 services such as upower, systemd, logind, gnome-session or others, and it is
16823 hard (or impossible without root privileges) to set the state of the real
16824 services to what you expect in your tests.")
16825 (license license:lgpl3+)))
16826
16827 (define-public python-ujson
16828 (package
16829 (name "python-ujson")
16830 (version "1.35")
16831 (source
16832 (origin
16833 (method url-fetch)
16834 (uri (pypi-uri "ujson" version))
16835 (sha256
16836 (base32
16837 "11jz5wi7mbgqcsz52iqhpyykiaasila4lq8cmc2d54bfa3jp6q7n"))))
16838 (build-system python-build-system)
16839 (home-page "http://www.esn.me")
16840 (synopsis
16841 "Ultra fast JSON encoder and decoder for Python")
16842 (description
16843 "UltraJSON is an ultra fast JSON encoder and decoder written in pure C with
16844 bindings for Python 2.5+ and 3.")
16845 (license license:bsd-3)))
16846
16847 (define-public python2-ujson
16848 (package-with-python2 python-ujson))
16849
16850 (define-public python-iocapture
16851 ;; The latest release is more than a year older than this commit.
16852 (let ((commit "fdc021c431d0840303908dfc3ca8769db383595c")
16853 (revision "1"))
16854 (package
16855 (name "python-iocapture")
16856 (version "0.1.2")
16857 (source
16858 (origin
16859 (method git-fetch)
16860 (uri (git-reference
16861 (url "https://github.com/oinume/iocapture.git")
16862 (commit commit)))
16863 (file-name (git-file-name name version))
16864 (sha256
16865 (base32
16866 "1mkbhqibxvgwg0p7slr8dfraa3g2s6bsayladhax2jccwj4kcndz"))))
16867 (build-system python-build-system)
16868 (arguments
16869 `(#:phases
16870 (modify-phases %standard-phases
16871 (delete 'check)
16872 (add-after 'install 'check
16873 (lambda* (#:key inputs outputs #:allow-other-keys)
16874 (add-installed-pythonpath inputs outputs)
16875 (invoke "py.test" "-v" "tests")
16876 #t)))))
16877 (propagated-inputs
16878 `(("python-flexmock" ,python-flexmock)
16879 ("python-pytest" ,python-pytest)
16880 ("python-pytest-cov" ,python-pytest-cov)
16881 ("python-six" ,python-six)))
16882 (home-page "https://github.com/oinume/iocapture")
16883 (synopsis "Python capturing tool for stdout and stderr")
16884 (description
16885 "This package helps you to capture the standard out (stdout) and the
16886 standard error channel (stderr) in your program.")
16887 (license license:expat))))
16888
16889 (define-public python-argh
16890 ;; There are 21 commits since the latest release containing important
16891 ;; improvements.
16892 (let ((commit "dcd3253f2994400a6a58a700c118c53765bc50a4")
16893 (revision "1"))
16894 (package
16895 (name "python-argh")
16896 (version (git-version "0.26.2" revision commit))
16897 (source
16898 (origin
16899 (method git-fetch)
16900 (uri (git-reference
16901 (url "https://github.com/neithere/argh.git")
16902 (commit commit)))
16903 (file-name (git-file-name name version))
16904 (sha256
16905 (base32
16906 "1p5h3dnpbsjmqrvil96s71asc6i3gpinmbrabqmwnrsxprz7r3ns"))))
16907 (build-system python-build-system)
16908 (propagated-inputs
16909 `(("python-iocapture" ,python-iocapture)
16910 ("python-mock" ,python-mock)
16911 ("python-pytest" ,python-pytest)
16912 ("python-pytest-cov" ,python-pytest-cov)
16913 ("python-pytest-xdist" ,python-pytest-xdist)
16914 ("python-tox" ,python-tox)))
16915 (home-page "https://github.com/neithere/argh/")
16916 (synopsis "Argparse wrapper with natural syntax")
16917 (description
16918 "python-argh is a small library that provides several layers of
16919 abstraction on top of @code{python-argparse}. The layers can be mixed. It is
16920 always possible to declare a command with the highest possible (and least
16921 flexible) layer and then tune the behaviour with any of the lower layers
16922 including the native API of @code{python-argparse}.")
16923 (license license:lgpl3+))))
16924
16925 (define-public python-ppft
16926 (package
16927 (name "python-ppft")
16928 (version "1.6.6.1")
16929 (source
16930 (origin
16931 (method url-fetch)
16932 (uri (pypi-uri "ppft" version))
16933 (sha256
16934 (base32
16935 "1z1invkhszc5d2mvgr221v7cszzifcc77mz0pv3wjp6x5q2768cy"))))
16936 (build-system python-build-system)
16937 (arguments '(#:tests? #f)) ; there are none
16938 (propagated-inputs
16939 `(("python-six" ,python-six)))
16940 (home-page "https://pypi.org/project/ppft/")
16941 (synopsis "Fork of Parallel Python")
16942 (description
16943 "This package is a fork of Parallel Python. The Parallel Python
16944 module (@code{pp}) provides an easy and efficient way to create
16945 parallel-enabled applications for @dfn{symmetric multiprocessing} (SMP)
16946 computers and clusters. It features cross-platform portability and dynamic
16947 load balancing.")
16948 (license license:bsd-3)))
16949
16950 (define-public python-pox
16951 (package
16952 (name "python-pox")
16953 (version "0.2.7")
16954 (source
16955 (origin
16956 (method url-fetch)
16957 (uri (pypi-uri "pox" version))
16958 (sha256
16959 (base32
16960 "0y17ckc2p6i6709s279sjdj4q459mpcc38ymg9zv9y6vl6jf3bq6"))))
16961 (build-system python-build-system)
16962 (arguments
16963 `(#:phases
16964 (modify-phases %standard-phases
16965 (replace 'check
16966 (lambda _
16967 (mkdir-p "/tmp/guix")
16968 (setenv "SHELL" "bash")
16969 (setenv "USERNAME" "guix")
16970 (setenv "HOME" "/tmp/guix") ; must end on USERNAME...
16971 (invoke "py.test" "-vv")
16972 #t)))))
16973 (native-inputs
16974 `(("python-pytest" ,python-pytest)
16975 ("which" ,which)))
16976 (home-page "https://pypi.org/project/pox/")
16977 (synopsis "Python utilities for filesystem exploration and automated builds")
16978 (description
16979 "Pox provides a collection of utilities for navigating and manipulating
16980 filesystems. This module is designed to facilitate some of the low level
16981 operating system interactions that are useful when exploring a filesystem on a
16982 remote host. Pox provides Python equivalents of several shell commands such
16983 as @command{which} and @command{find}. These commands allow automated
16984 discovery of what has been installed on an operating system, and where the
16985 essential tools are located.")
16986 (license license:bsd-3)))
16987
16988 (define-public python-pathos
16989 (package
16990 (name "python-pathos")
16991 (version "0.2.5")
16992 (source
16993 (origin
16994 (method url-fetch)
16995 (uri (pypi-uri "pathos" version))
16996 (sha256
16997 (base32
16998 "0in8hxdz7k081ijn6q94gr39ycy7363sx4zysmbwyvd7snqjrbi1"))))
16999 (build-system python-build-system)
17000 (arguments
17001 '(#:phases
17002 (modify-phases %standard-phases
17003 (replace 'check
17004 (lambda _
17005 (setenv "PYTHONPATH"
17006 (string-append (getcwd) ":" (getenv "PYTHONPATH")))
17007 (invoke "python" "./tests/__main__.py"))))))
17008 (propagated-inputs
17009 `(("python-dill" ,python-dill)
17010 ("python-multiprocess" ,python-multiprocess)
17011 ("python-pox" ,python-pox)
17012 ("python-ppft" ,python-ppft)))
17013 (native-inputs
17014 `(("python-pytest" ,python-pytest)))
17015 (home-page "https://pypi.org/project/pathos/")
17016 (synopsis
17017 "Parallel graph management and execution in heterogeneous computing")
17018 (description
17019 "Python-pathos is a framework for heterogenous computing. It provides a
17020 consistent high-level interface for configuring and launching parallel
17021 computations across heterogenous resources. Python-pathos provides configurable
17022 launchers for parallel and distributed computing, where each launcher contains
17023 the syntactic logic to configure and launch jobs in an execution environment.")
17024 (license license:bsd-3)))
17025
17026 (define-public python-flit
17027 (package
17028 (name "python-flit")
17029 (version "2.1.0")
17030 (source
17031 (origin
17032 (method url-fetch)
17033 (uri (pypi-uri "flit" version))
17034 (sha256
17035 (base32
17036 "0h5vvmqinqzn97mr3ix7zx53af9ad4fimjjwqpx88yp8qhz4r5bc"))))
17037 (build-system python-build-system)
17038 (arguments
17039 `(#:tests? #f)) ; XXX: Check requires network access.
17040 (home-page "https://flit.readthedocs.io/")
17041 (synopsis
17042 "Simple packaging tool for simple packages")
17043 (description
17044 "Flit is a simple way to put Python packages and modules on PyPI. Flit
17045 packages a single importable module or package at a time, using the import
17046 name as the name on PyPI. All subpackages and data files within a package
17047 are included automatically.")
17048 (license license:bsd-3)))
17049
17050 (define-public python-pathtools
17051 (package
17052 (name "python-pathtools")
17053 (version "0.1.2")
17054 (source
17055 (origin
17056 (method url-fetch)
17057 (uri (pypi-uri "pathtools" version))
17058 (sha256
17059 (base32
17060 "1h7iam33vwxk8bvslfj4qlsdprdnwf8bvzhqh3jq5frr391cadbw"))))
17061 (build-system python-build-system)
17062 (home-page
17063 "https://github.com/gorakhargosh/pathtools")
17064 (synopsis "Path utilities for Python")
17065 (description "Pattern matching and various utilities for file systems
17066 paths.")
17067 (license license:expat)))
17068
17069 (define-public python-fastentrypoints
17070 (package
17071 (name "python-fastentrypoints")
17072 (version "0.12")
17073 (source
17074 (origin
17075 (method url-fetch)
17076 (uri (pypi-uri "fastentrypoints" version))
17077 (sha256
17078 (base32
17079 "02s1j8i2dzbpbwgq2a3fiqwm3cnmhii2qzc0k42l0rdxd4a4ya7z"))))
17080 (build-system python-build-system)
17081 (home-page
17082 "https://github.com/ninjaaron/fast-entry_points")
17083 (synopsis
17084 "Makes entry_points specified in setup.py load more quickly")
17085 (description
17086 "Using entry_points in your setup.py makes scripts that start really
17087 slowly because it imports pkg_resources. This package allows such setup
17088 scripts to load entry points more quickly.")
17089 (license license:bsd-3)))
17090
17091 (define-public python-funcparserlib
17092 (package
17093 (name "python-funcparserlib")
17094 (version "0.3.6")
17095 (source
17096 (origin
17097 (method url-fetch)
17098 (uri (pypi-uri "funcparserlib" version))
17099 (sha256
17100 (base32
17101 "07f9cgjr3h4j2m67fhwapn8fja87vazl58zsj4yppf9y3an2x6dp"))))
17102 (native-inputs
17103 `(("python-tox" ,python-tox)))
17104 (arguments
17105 `(#:phases
17106 (modify-phases %standard-phases
17107 (replace 'check
17108 (lambda _
17109 (invoke "tox"))))))
17110 (build-system python-build-system)
17111 (home-page
17112 "https://github.com/vlasovskikh/funcparserlib")
17113 (synopsis
17114 "Recursive descent parsing library based on functional combinators")
17115 (description
17116 "This package is a recursive descent parsing library for Python based on
17117 functional combinators. Parser combinators are just higher-order functions
17118 that take parsers as their arguments and return them as result values.")
17119 (license license:expat)))